[OpenBIOS] [PATCH 2/3] SPARC64: set upper bound for virtual memory allocations

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


Comparing with real device trees, the maximum virtual memory address
available for allocation on sun4u machines is 0xff000000.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>
---
 arch/sparc64/ofmem_sparc64.c         |    2 +-
 include/arch/sparc64/ofmem_sparc64.h |    2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/sparc64/ofmem_sparc64.c b/arch/sparc64/ofmem_sparc64.c
index bdfaf56..5c742cd 100644
--- a/arch/sparc64/ofmem_sparc64.c
+++ b/arch/sparc64/ofmem_sparc64.c
@@ -62,7 +62,7 @@ ucell ofmem_arch_get_heap_top(void)
 
 ucell ofmem_arch_get_virt_top(void)
 {
-	return (ucell)TOP_OF_RAM;
+	return (ucell)OFMEM_VIRT_TOP;
 }
 
 ucell ofmem_arch_get_iomem_base(void)
diff --git a/include/arch/sparc64/ofmem_sparc64.h b/include/arch/sparc64/ofmem_sparc64.h
index 7ff24ae..19f2747 100644
--- a/include/arch/sparc64/ofmem_sparc64.h
+++ b/include/arch/sparc64/ofmem_sparc64.h
@@ -16,6 +16,8 @@
 
 #include "libopenbios/ofmem.h"
 
+#define OFMEM_VIRT_TOP 0xff000000
+
 #define PAGE_SIZE_4M   (4 * 1024 * 1024)
 #define PAGE_SIZE_512K (512 * 1024)
 #define PAGE_SIZE_64K  (64 * 1024)
-- 
1.7.10.4




More information about the OpenBIOS mailing list