Author: mcayland Date: Mon May 12 17:44:03 2014 New Revision: 1298 URL: http://tracker.coreboot.org/trac/openbios/changeset/1298
Log: SPARC64: only map 8MB RAM on startup
Due to a (bug?) in OpenBSD's pmap_bootstrap(), the kernel attempts to locate its text segment and size by searching the translations property for continuous regions in use starting from the kernel load address.
Unfortunately if we have already mapped memory above the kernel load address of 0x1000000 then the kernel extends the text region way beyond the text segement causing an exception when eventually trying to set non-existent mappings in the TLB.
Fix this by only mapping 8MB of RAM so that we guarantee that the region above 0x1000000 will always be free, and hence the text/data regions will be discrete so that the sizing algorithms return the correct answer.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk
Modified: trunk/openbios-devel/arch/sparc64/ofmem_sparc64.c
Modified: trunk/openbios-devel/arch/sparc64/ofmem_sparc64.c ============================================================================== --- trunk/openbios-devel/arch/sparc64/ofmem_sparc64.c Mon May 12 17:44:01 2014 (r1297) +++ trunk/openbios-devel/arch/sparc64/ofmem_sparc64.c Mon May 12 17:44:03 2014 (r1298) @@ -366,7 +366,7 @@ ofmem_walk_boot_map(remap_page_range);
/* Map the memory */ - ofmem_map_page_range(PAGE_SIZE, PAGE_SIZE, qemu_mem_size, 0x36); + ofmem_map_page_range(PAGE_SIZE, PAGE_SIZE, 0x800000, 0x36);
if (!(retained->magic == RETAIN_MAGIC)) { OFMEM_TRACE("ofmem_init: no retained magic found, creating\n");