[SeaBIOS] [PATCH] mark VBE mapping as reserved in e820

Izik Eidus ieidus at redhat.com
Sun Jan 24 00:35:21 CET 2010

On Sat, 23 Jan 2010 18:10:37 -0500
"Kevin O'Connor" <kevin at koconnor.net> wrote:

> On Sat, Jan 23, 2010 at 11:30:33PM +0200, Izik Eidus wrote:
> > On Sat, 23 Jan 2010 15:37:12 -0500
> > "Kevin O'Connor" <kevin at koconnor.net> wrote:
> > > It is not normal to add e820 entries for device memory.
> > 
> > This is true for pci and isa hot plug devices, but how in this case we can tell
> > the os not to map to this physical address pci devices?
> > 
> > If the range doesnt reserved I dont see how windows wont try to end up mapping
> > pci devices to there.
> What is special about 0xe0000000 that the OS can't map pci devices
> there?  Normal machines don't treat 0xe0000000 as special, why does
> the VBE device require that?

From the last time I looked on the code 0xe0000000 was the LFB address,
LFB is used by vesa devices as the framebuffer memory area,
this mean that vesa devices (not the case for vga) will try to map this
0xe000000 physical memory.

The last real spec that I have checked x48 and as far as I remember it clearly said
that the beahivor is unspecificed in case you map physical memory more than once.

To make life easier for us we can look on the acpi spec (3b) that say:

14.5 Example Address Map
This sample address map (for an Intel processor-based system) describes a machine that has 128 MB of
RAM, 640 KB of base memory and 127 MB of extended memory. The base memory has 639 KB available
for the user and 1 KB for an extended BIOS data area. A 4-MB Linear Frame Buffer (LFB) is based at 12
MB. The memory hole created by the chip set is from 8 MB to 16 MB. Memory-mapped APIC devices are
in the system. The I/O Unit is at FEC00000 and the Local Unit is at FEE00000. The system BIOS is
remapped to 1 GB–64 KB.
The 639-KB endpoint of the first memory range is also the base memory size reported in the BIOS data
segment at 40:13. The following table shows the memory map of a typical system.
                                    Table 14-8 Sample Memory Map
  Base (Hex)      Length     Type                      Description
  0000 0000       639 KB     AddressRangeMemory        Available Base memory. Typically the same value
                                                       as is returned using the INT 12 function.
                                                  System Address Map Interfaces 399
Base (Hex) Length Type                 Description
0009 FC00  1 KB   AddressRangeReserved Memory reserved for use by the BIOS(s). This
                                       area typically includes the Extended BIOS data
000F 0000  64 KB  AddressRangeReserved System BIOS
0010 0000  7 MB   AddressRangeMemory   Extended memory, which is not limited to the
                                       64-MB address range.
0080 0000  4 MB   AddressRangeReserved Chip set memory hole required to support the
                                       LFB mapping at 12 MB.
0100 0000  120 MB AddressRangeMemory   Baseboard RAM relocated above a chip set
                                       memory hole.
FEC0 0000  4 KB   AddressRangeReserved I/O APIC memory mapped I/O at FEC00000.
FEE0 0000  4 KB   AddressRangeReserved Local APIC memory mapped I/O at FEE00000.
FFFF 0000  64 KB  AddressRangeReserved Remapped System BIOS at end of address space.

So we can see that even the acpi spec example mark the LFB region as reserved.


> -Kevin

More information about the SeaBIOS mailing list