[LinuxBIOS] pci_rom_load() bug for non-VGA ROM
Li-Ta Lo
ollie at lanl.gov
Fri Jul 15 19:41:48 CEST 2005
On Fri, 2005-07-15 at 07:52 -0700, yhlu wrote:
> ollie,
>
> can you look at that?
>
I will check this one later.
> Also
> static void *pci_ram_image_start = PCI_RAM_IMAGE_START;
>
> should be changed to
> static void *pci_ram_image_start = PCI_RAM_IMAGE_START + 0x10000;//
> leave first 64k for VGA
>
No. There are to #define constants:
#define PCI_RAM_IMAGE_START 0xD0000
#define PCI_VGA_RAM_IMAGE_START 0xC0000
I already reserved 64KB for VGA BIOS.
> YH
>
>
>
> On 7/15/05, Tao Liu <liutao1980 at gmail.com> wrote:
> > Hello,
> >
> > pci_rom_load() returns wrong rom_header for non-VGA ROM case ?
> >
> >
> > --- orig/src/devices/pci_rom.c
> > +++ mod/src/devices/pci_rom.c
> > @@ -95,11 +95,11 @@
> > return (struct rom_header *) (PCI_VGA_RAM_IMAGE_START);
> > #endif
> > } else {
> > - printk_spew("%s, copying non-VGA ROM Image from %x to %x, %x bytes\n",
> > - __func__, rom_header, pci_ram_image_start, rom_size);
> > + printk_debug("copying non-VGA ROM Image from %x to %x, %x bytes\n",
> > + rom_header, pci_ram_image_start, rom_size);
> > memcpy(pci_ram_image_start, rom_header, rom_size);
> > pci_ram_image_start += rom_size;
> > - return (struct rom_header *) pci_ram_image_start;
> > + return (struct rom_header *) (pci_ram_image_start - rom_size);
> > }
> > /* disable expansion ROM address decoding */
> > pci_write_config32(dev, PCI_ROM_ADDRESS, rom_address &
> > ~PCI_ROM_ADDRESS_ENABLE);
> >
> >
> > --
> > Regards,
> > Liu Tao
> >
> > _______________________________________________
> > LinuxBIOS mailing list
> > LinuxBIOS at openbios.org
> > http://www.openbios.org/mailman/listinfo/linuxbios
> >
>
> _______________________________________________
> LinuxBIOS mailing list
> LinuxBIOS at openbios.org
> http://www.openbios.org/mailman/listinfo/linuxbios
--
Li-Ta Lo <ollie at lanl.gov>
Los Alamos National Lab
More information about the coreboot
mailing list