[commit] r1244 - trunk/openbios-devel/arch/sparc64

Author: mcayland Date: Mon Dec 16 19:06:24 2013 New Revision: 1244 URL: http://tracker.coreboot.org/trac/openbios/changeset/1244 Log: SPARC64: move retained area from top of physical RAM to static variable Currently the low-level SPARC entry routine reserves the top of physical RAM which is also where we happen to store our retained memory structure; because of the way this memory is mapped, a fault is generated when trying to access the retained memory area outside of OpenBIOS. Move the retained area into a static variable for the moment; the existing routine is unlikely to survive a reboot anyhow but at least we can store the requested information for analysis later. 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 Dec 16 19:06:22 2013 (r1243) +++ trunk/openbios-devel/arch/sparc64/ofmem_sparc64.c Mon Dec 16 19:06:24 2013 (r1244) @@ -29,6 +29,7 @@ #define OFMEM (&s_ofmem_data.ofmem) #define TOP_OF_RAM (s_ofmem_data.memory + MEMSIZE) +static retain_t s_retained; translation_t **g_ofmem_translations = &s_ofmem_data.ofmem.trans; ucell *va2ttedata = 0; @@ -41,7 +42,7 @@ static ucell get_heap_top( void ) { - return (ucell)(TOP_OF_RAM - ALIGN_SIZE(sizeof(retain_t), 8)); + return (ucell)TOP_OF_RAM; } ofmem_t* ofmem_arch_get_private(void) @@ -85,8 +86,7 @@ retain_t *ofmem_arch_get_retained(void) { - /* Retained area is at the top of physical RAM */ - return (retain_t *)(qemu_mem_size - sizeof(retain_t)); + return (&s_retained); } int ofmem_arch_get_translation_entry_size(void)
participants (1)
-
repository service