From 3644b846572049a803618a24e64d74580f7dc37d Mon Sep 17 00:00:00 2001 From: mcayland Date: Sun, 2 Jan 2011 00:06:34 +0000 Subject: [PATCH] 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 Tested-by: Blue Swirl Reviewed-by: Blue Swirl git-svn-id: svn://openbios.org/openbios/trunk/openbios-devel@1003 f158a5a8-5612-0410-a976-696ce0be7e32 --- arch/sparc32/openbios.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/sparc32/openbios.c b/arch/sparc32/openbios.c index 1419468..c940a5f 100644 --- a/arch/sparc32/openbios.c +++ b/arch/sparc32/openbios.c @@ -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 @@ int openbios(void) 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 -- 2.11.4.GIT