search for: romsignatur

Displaying 10 results from an estimated 10 matches for "romsignatur".

Did you mean: romsignature
2007 Apr 18
1
Handling PCI/ROM space
...Anyway, I've got these patches to deal with these cases: --- a/arch/i386/kernel/setup.c +++ b/arch/i386/kernel/setup.c @@ -276,7 +276,14 @@ static struct resource standard_io_resou #define STANDARD_IO_RESOURCES \ (sizeof standard_io_resources / sizeof standard_io_resources[0]) -#define romsignature(x) (*(unsigned short *)(x) == 0xaa55) +static inline int romsignature(const unsigned char *x) +{ + unsigned short sig; + int ret = 0; + if (__get_user(sig, (const unsigned short *)x) == 0) + ret = (sig == 0xaa55); + return ret; +} static int __init romchecksum(unsigned char *r...
2007 Apr 18
1
Handling PCI/ROM space
...Anyway, I've got these patches to deal with these cases: --- a/arch/i386/kernel/setup.c +++ b/arch/i386/kernel/setup.c @@ -276,7 +276,14 @@ static struct resource standard_io_resou #define STANDARD_IO_RESOURCES \ (sizeof standard_io_resources / sizeof standard_io_resources[0]) -#define romsignature(x) (*(unsigned short *)(x) == 0xaa55) +static inline int romsignature(const unsigned char *x) +{ + unsigned short sig; + int ret = 0; + if (__get_user(sig, (const unsigned short *)x) == 0) + ret = (sig == 0xaa55); + return ret; +} static int __init romchecksum(unsigned char *r...
2007 Apr 18
2
[PATCH 1/4] Prep for paravirt: move pagetable includes.
Move header includes for the nopud / nopmd types to the location of the actual pte / pgd type definitions. This allows generic 4-level page type code to be written before the split 2/3 level page table headers are included. Signed-off-by: Zachary Amsden <zach@vmware.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2007 Apr 18
2
[PATCH 1/4] Prep for paravirt: move pagetable includes.
Move header includes for the nopud / nopmd types to the location of the actual pte / pgd type definitions. This allows generic 4-level page type code to be written before the split 2/3 level page table headers are included. Signed-off-by: Zachary Amsden <zach@vmware.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2007 Apr 18
4
[RFC, PATCH 3/24] i386 Vmi interface definition
...initions + * + *--------------------------------------------------------------------- + */ + +/* VROM call table definitions */ +#define VROM_CALL_LEN 32 + +typedef struct VROMCallEntry { + char f[VROM_CALL_LEN]; +} VROMCallEntry; + +typedef struct VROMHeader { + VMI_UINT16 romSignature; // option ROM signature + VMI_INT8 romLength; // ROM length in 512 byte chunks + unsigned char romEntry[4]; // 16-bit code entry point + VMI_UINT8 romPad0; // 4-byte align pad + VMI_UINT32 vRomSig...
2007 Apr 18
4
[RFC, PATCH 3/24] i386 Vmi interface definition
...initions + * + *--------------------------------------------------------------------- + */ + +/* VROM call table definitions */ +#define VROM_CALL_LEN 32 + +typedef struct VROMCallEntry { + char f[VROM_CALL_LEN]; +} VROMCallEntry; + +typedef struct VROMHeader { + VMI_UINT16 romSignature; // option ROM signature + VMI_INT8 romLength; // ROM length in 512 byte chunks + unsigned char romEntry[4]; // 16-bit code entry point + VMI_UINT8 romPad0; // 4-byte align pad + VMI_UINT32 vRomSig...
2007 Apr 18
4
[RFC, PATCH 1/24] i386 Vmi documentation
...region of the first megabyte of physical memory. Multiple + ROMs may be provided to support older API versions for legacy guest + OS support. ROM detection is done in the traditional manner, by + scanning the memory region from C8000h - DFFFFh in 2 kilobyte + increments. The romSignature bytes must be '0x55, 0xAA', and the + checksum of the region indicated by the romLength field must be zero. + The checksum is a simple 8-bit addition of all bytes in the ROM region. + + Data layout + + typedef struct HyperRomHeader { + uint16_t romSignature;...
2007 Apr 18
4
[RFC, PATCH 1/24] i386 Vmi documentation
...region of the first megabyte of physical memory. Multiple + ROMs may be provided to support older API versions for legacy guest + OS support. ROM detection is done in the traditional manner, by + scanning the memory region from C8000h - DFFFFh in 2 kilobyte + increments. The romSignature bytes must be '0x55, 0xAA', and the + checksum of the region indicated by the romLength field must be zero. + The checksum is a simple 8-bit addition of all bytes in the ROM region. + + Data layout + + typedef struct HyperRomHeader { + uint16_t romSignature;...
2007 Apr 18
7
[RFC, PATCH 5/24] i386 Vmi code patching
...oid __init probe_vmi_rom(void) +{ + unsigned long base; + + hypervisor_found = 0; + + /* VMI ROM is in option ROM area, check signature */ + for (base = 0xC0000; base < 0xE0000; base += 2048) { + VROMHeader *romstart; + romstart = (VROMHeader *)isa_bus_to_virt(base); + if (romstart->romSignature != 0xaa55) + continue; + if (romstart->vRomSignature == VMI_SIGNATURE && !vmi_rom) { + printk(KERN_WARNING "Detected VMI ROM version %d.%d\n", + romstart->APIVersionMajor, + romstart->APIVersionMinor); + vmi_rom = romstart; + if (romstart->APIVersionMaj...
2007 Apr 18
7
[RFC, PATCH 5/24] i386 Vmi code patching
...oid __init probe_vmi_rom(void) +{ + unsigned long base; + + hypervisor_found = 0; + + /* VMI ROM is in option ROM area, check signature */ + for (base = 0xC0000; base < 0xE0000; base += 2048) { + VROMHeader *romstart; + romstart = (VROMHeader *)isa_bus_to_virt(base); + if (romstart->romSignature != 0xaa55) + continue; + if (romstart->vRomSignature == VMI_SIGNATURE && !vmi_rom) { + printk(KERN_WARNING "Detected VMI ROM version %d.%d\n", + romstart->APIVersionMajor, + romstart->APIVersionMinor); + vmi_rom = romstart; + if (romstart->APIVersionMaj...