diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2009-11-25 18:53:52 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2009-11-25 18:53:52 -0500 |
commit | c945b2f632461b8cb4709bf20c2ccf581068be8a (patch) | |
tree | a81b8c7f7894d039025be14470cae9646e3cbbd5 | |
parent | 8f4409b6f0ac4adc72d94b519c54e0c1ddac0191 (diff) | |
download | seabios-c945b2f632461b8cb4709bf20c2ccf581068be8a.tar.gz |
Clear unused parts of f-segment.
On coreboot, the unused parts of the f-segment could contain leftover
bios tables which may confuse an OS. So clear unused parts of
f-segment.
-rw-r--r-- | src/pmm.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -285,6 +285,10 @@ malloc_setup() PMMAllocs = NULL; // Memory in 0xf0000 area. + extern u8 code32_start[]; + if ((u32)code32_start > BUILD_BIOS_ADDR) + // Clear unused parts of f-segment + memset((void*)BUILD_BIOS_ADDR, 0, (u32)code32_start - BUILD_BIOS_ADDR); memset(BiosTableSpace, 0, CONFIG_MAX_BIOSTABLE); ZoneFSeg.bottom = (u32)BiosTableSpace; ZoneFSeg.top = ZoneFSeg.cur = ZoneFSeg.bottom + CONFIG_MAX_BIOSTABLE; |