[SeaBIOS] [PATCH RFC 3/7] Add configuration menu for the VGA ROM

Julian Pidancet julian.pidancet at gmail.com
Sat Dec 17 17:22:01 CET 2011


On Sat, Dec 17, 2011 at 4:07 PM, Kevin O'Connor <kevin at koconnor.net> wrote:
> On Fri, Dec 16, 2011 at 02:15:09PM +0000, Julian Pidancet wrote:
>> This patch adds a configuration menu for the VGA ROM, it also allow
>> the creation of a PCI header so the ROM can be extracted from a PCI
>> device.
> [...]
>> +/****************************************************************
>> + * PCI Data
>> + ****************************************************************/
>> +#ifdef CONFIG_PCIBIOS
>> +_rom_pci_data:
>> +        .ascii "PCIR"
>> +#if defined(CONFIG_VGA_VID) && defined(CONFIG_VGA_DID)
>> +        .word CONFIG_VGA_VID /* VendorID */
>> +        .word CONFIG_VGA_DID /* DeviceID */
>> +#elif defined(CONFIG_VGA_CIRRUS)
>> +        .word 0x1013
>> +        .word 0x00b8
>> +#elif defined(CONFIG_VGA_BOCHS)
>> +        .word 0x1234
>> +        .word 0x1111
>
> One other note on this - can't _rom_pci_data be declared in the C code
> as:
>
> struct pci_data rom_pci_data VAR16VISIBLE = {
>    .vendor = CONFIG_VGA_VID,
>    .device = CONFIG_VGA_DID,
>    .dlen = 0x18,
>    .class_hi = 0x300,
>    ...
> };
>

The PCI firmware specification only requires the PCI header to be
located in the first 64KB of the option ROM image, I don't know if
there's a way we can enforce that if it is declared in C.

-- 
Julian



More information about the SeaBIOS mailing list