j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Author: mcayland Date: Sun Jan 2 01:06:34 2011 New Revision: 1003 URL: http://tracker.coreboot.org/trac/openbios/changeset/1003
Log: Add ofmem_init() function to openbios.c taking into account that unlike SPARC64, OFMEM needs to be setup *before* the MMU so that the page table allocation routines can use it.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@siriusit.co.uk Tested-by: Blue Swirl blauwirbel@gmail.com Reviewed-by: Blue Swirl blauwirbel@gmail.com
Modified: trunk/openbios-devel/arch/sparc32/openbios.c
Modified: trunk/openbios-devel/arch/sparc32/openbios.c ============================================================================== --- trunk/openbios-devel/arch/sparc32/openbios.c Sun Jan 2 01:06:12 2011 (r1002) +++ trunk/openbios-devel/arch/sparc32/openbios.c Sun Jan 2 01:06:34 2011 (r1003) @@ -25,6 +25,7 @@ #include "packages/video.h" #define NO_QEMU_PROTOS #include "arch/common/fw_cfg.h" +#include "libopenbios/ofmem.h"
#define MEMORY_SIZE (16*1024) /* 16K ram for hosted system */ #define DICTIONARY_SIZE (256*1024) /* 256K for the dictionary */ @@ -946,6 +947,9 @@ if (!hwdef) for(;;); // Internal inconsistency, hang
+ /* Make sure we setup OFMEM before the MMU as we need malloc() to setup page tables */ + ofmem_init(); + #ifdef CONFIG_DRIVER_SBUS init_mmu_swift(); #endif