[SeaBIOS] [PATCH 4/8] seabios: pciinit: make pci bar assigner preferchable memory aware.
Isaku Yamahata
yamahata at valinux.co.jp
Tue Jun 22 05:22:50 CEST 2010
On Mon, Jun 21, 2010 at 10:20:14PM -0400, Kevin O'Connor wrote:
> On Thu, Jun 17, 2010 at 08:03:12PM +0900, Isaku Yamahata wrote:
> > Make pci bar assigner preferchable memory aware.
> > This is needed for PCI bridge support because memory space and
> > prefetchable memory space is filtered independently based on
> > memory base/limit and prefetchable memory base/limit of pci bridge.
> > On bus 0, such a distinction isn't necessary so keep existing behavior
> > by checking bus=0.
> [...]
> > pci_bios_io_addr = 0xc000;
> > pci_bios_mem_addr = BUILD_PCIMEM_START;
> >
> > + /* pci_bios_mem_addr + <some value> */
> > + pci_bios_prefmem_addr = pci_bios_mem_addr + 0x08000000;
>
> How can we be sure that the "mem" space doesn't overlap with the
> "prefmem" space?
No check at the moment. Which way do you prefer?
- do nothing and pray that user wouldn't add so many devices.
(current implementation)
I chose this implementation because the existing code doesn't
check whether mem area overlaps with around 4GB area which is
used for other purpose.
- add overlap check.
If mem area reaches to perfmem area, abandon further mapping with warning.
- Add one more path to scan pci bus to sum up size of mem and prefmem
and calculate pci_bios_prefmem_addr more smartly.
If mapping area is lacking, warn it and map them as possible as much.
- any better idea?
>
> -Kevin
>
> _______________________________________________
> SeaBIOS mailing list
> SeaBIOS at seabios.org
> http://www.seabios.org/mailman/listinfo/seabios
>
--
yamahata
More information about the SeaBIOS
mailing list