[OpenBIOS] [PATCH 09/16] 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.

Mark Cave-Ayland mark.cave-ayland at siriusit.co.uk
Thu Dec 30 19:07:12 CET 2010


Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at siriusit.co.uk>
---
 openbios-devel/arch/sparc32/openbios.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/openbios-devel/arch/sparc32/openbios.c b/openbios-devel/arch/sparc32/openbios.c
index 1419468..c940a5f 100644
--- a/openbios-devel/arch/sparc32/openbios.c
+++ b/openbios-devel/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
-- 
1.7.2.3




More information about the OpenBIOS mailing list