[OpenBIOS] [PATCH 1/3] SPARC32: fixup available memory list and modify ofmem_arch_get_virt_top()

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Sun Oct 16 19:26:08 CEST 2016


In preparation for applying the ofmem_arch_get_virt_top() restriction to the
virtual memory region, fix up the calculation of the available list tail plus
increase the virtual memory region to cover the IO memory.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>
---
 arch/sparc32/boot.c                  |    2 +-
 include/arch/sparc32/ofmem_sparc32.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/sparc32/boot.c b/arch/sparc32/boot.c
index d458658..e9605f5 100644
--- a/arch/sparc32/boot.c
+++ b/arch/sparc32/boot.c
@@ -178,7 +178,7 @@ void setup_romvec(void)
 			(**pp).num_bytes = (intprop_ptr[4] + intprop_ptr[5]) - (intprop_ptr[1] + intprop_ptr[2]);
 		} else {
 			/* Tail (size from top of virtual memory) */
-			(**pp).num_bytes = 0xffffffffUL - (intprop_ptr[1] + intprop_ptr[2]) + 1;
+			(**pp).num_bytes = ofmem_arch_get_virt_top() - 1 - (intprop_ptr[1] + intprop_ptr[2]) + 1;
 		}
 
 		intprop_ptr += 3;
diff --git a/include/arch/sparc32/ofmem_sparc32.h b/include/arch/sparc32/ofmem_sparc32.h
index efc21b4..a23780b 100644
--- a/include/arch/sparc32/ofmem_sparc32.h
+++ b/include/arch/sparc32/ofmem_sparc32.h
@@ -17,7 +17,7 @@
 #include "libopenbios/ofmem.h"
 
 #define OF_CODE_START 0xffd00000
-#define OFMEM_VIRT_TOP 0xfe000000
+#define OFMEM_VIRT_TOP 0xffff0000
 
 struct mem;
 extern struct mem cdvmem;
-- 
1.7.10.4




More information about the OpenBIOS mailing list