diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2013-12-06 13:52:16 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2013-12-07 12:59:35 -0500 |
commit | b94170cc4b6b08d03ac21e1c2390c94b7b881e7c (patch) | |
tree | 181270dd377b506f78aaf79aaaa6cdbbe1324ba7 /src/malloc.c | |
parent | 0f0612e8dc287d568f2eaa8407ed3f76cfae4018 (diff) | |
download | seabios-b94170cc4b6b08d03ac21e1c2390c94b7b881e7c.zip seabios-b94170cc4b6b08d03ac21e1c2390c94b7b881e7c.tar.gz seabios-b94170cc4b6b08d03ac21e1c2390c94b7b881e7c.tar.bz2 |
Separate out sec32init sections even when not doing code relocation.
The current code does not boot on QEMU with 256K roms when code
relocation is disabled, because QEMU only maps the last 128K of the
rom to low memory. The seabios make_bios_writable() call copies the
full rom to low memory.
This patch separates out the init sections even if code relocations
are disabled. This effectively ensures that make_bios_writable() code
is in the last 128K of the rom.
This also introduces a new build symbol (final_readonly_start) which
stores the address of where the final runtime read-only memory begins.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/malloc.c')
-rw-r--r-- | src/malloc.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/malloc.c b/src/malloc.c index 65104f6..6ef418a 100644 --- a/src/malloc.c +++ b/src/malloc.c @@ -332,9 +332,8 @@ rom_get_max(void) if (CONFIG_MALLOC_UPPERMEMORY) return ALIGN_DOWN((u32)RomBase->allocend - OPROM_HEADER_RESERVE , OPTION_ROM_ALIGN); - extern u8 code32init_end[]; - u32 end = (u32)code32init_end; - return end > BUILD_BIOS_ADDR ? BUILD_BIOS_ADDR : end; + extern u8 final_readonly_start[]; + return (u32)final_readonly_start; } // Return the end of the last deployed option rom. |