[OpenBIOS] [PATCH 2/3] SPARC32: Fix OpenBIOS Forth dictionary location so that it is just below the ROM image.

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Sat Apr 6 19:58:24 CEST 2013


In preparation for changing the virtual memory allocator range so it is lower in
memory, keep the Forth dictionary in high memory. Even with the previous commit
now correctly setting the memory properties, Linux seems to crash on boot if we
don't maintain the Forth dictionary location in high memory.

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

diff --git a/openbios-devel/arch/sparc32/openbios.c b/openbios-devel/arch/sparc32/openbios.c
index 53c6760..ce1a1cc 100644
--- a/openbios-devel/arch/sparc32/openbios.c
+++ b/openbios-devel/arch/sparc32/openbios.c
@@ -25,7 +25,7 @@
 #include "packages/video.h"
 #define NO_QEMU_PROTOS
 #include "arch/common/fw_cfg.h"
-#include "libopenbios/ofmem.h"
+#include "arch/sparc32/ofmem_sparc32.h"
 
 #define MEMORY_SIZE     (512*1024)       /* 512K ram for hosted system */
 #define UUID_FMT "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x"
@@ -812,8 +812,8 @@ static void init_memory(void)
     phys = ofmem_claim_phys(-1, MEMORY_SIZE, PAGE_SIZE);
     if (!phys)
         printk("panic: not enough physical memory on host system.\n");
-    
-    virt = ofmem_claim_virt(-1, MEMORY_SIZE, PAGE_SIZE);
+
+    virt = ofmem_claim_virt(OF_CODE_START - MEMORY_SIZE, MEMORY_SIZE, 0);
     if (!virt)
         printk("panic: not enough virtual memory on host system.\n");
 
-- 
1.7.10.4




More information about the OpenBIOS mailing list