On 08.09.2008 03:37, Kevin O'Connor wrote:
On Mon, Sep 08, 2008 at 02:33:01AM +0200, Carl-Daniel Hailfinger wrote:
On 08.09.2008 02:20, Kevin O'Connor wrote:
Using the space at 0xc8000 - 0xf0000 would work, but it would limit the maximum number of option roms.
That applies to any location between 0xA0000 and 0xFFFFF, though.
Option roms reside between 0xc0000 and 0xf0000. The a and b segments are used for something else - vga mmio I think.
Thanks for clearing up that misconception.
(You can't use 0xc0000 for long term storage, because the vga option rom must reside there.)
Fortunately, the stack is designed to be discarded the moment we run a payload, so there are no survival requirements at all.
On resume though, the CAR area would overwrite the VGA rom that was installed during the first boot.
That's bad.
Any memory that coreboot might clobber would need to be reserved, and 0xc0000 can't be reserved because vga option roms expect to be located there.
OK. The problem here is that large multicore machines need 48 kB CAR size, probably more in the future. Are VGA option ROMs guaranteed to be 16 kB or smaller? IIRC my laptop has a 36 kB VGA option ROM, but it's been a long time since I touched that.
An alternative (as you mentioned in an early email) would be to save and restore some area of memory below 1MB.
Yes, but the problem is that the CAR area can't be saved before enabling CAR. That means we have to reserve the memory. Let me summarize the current black list: - 0x00000-0x9FFFF is low 640 kB. May break bootloaders and 16-bit OS. - 0xA0000-0xAFFFF is VGA graphics memory mapped area. - 0xB0000-0xB7FFF is ancient monochrome memmapped, but may still be decoded by newer VGA cards. - 0xB8000-0xBFFFF is VGA text mode memory mapped area. - 0xC0000-???? is VGA ROM location. - 0xF0000-0xFFFFF is used by SeaBIOS.
IMO, the first choice would be 0xC4000-0xCFFFF (if VGA ROMs are 16 kB or smaller). 0xE0000-0xEFFFF would be the next possibility. If we can verify that bootloaders and operating systems can handle a reserved area below 0x9FFFF, that might be a viable choice as well.
The good thing about v3 is that we can change the CAR location easily, so postponing the decision will work as well.
Regards, Carl-Daniel