[OpenBIOS] [PATCH 1/3] SPARC32: reserve top of physical memory directly rather than with ofmem_arch_get_phys_top()

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Sun May 10 10:51:39 CEST 2015


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

diff --git a/openbios-devel/arch/sparc32/ofmem_sparc32.c b/openbios-devel/arch/sparc32/ofmem_sparc32.c
index d2935a8..bc3efaf 100644
--- a/openbios-devel/arch/sparc32/ofmem_sparc32.c
+++ b/openbios-devel/arch/sparc32/ofmem_sparc32.c
@@ -30,6 +30,8 @@ static union {
 #define OFMEM      	(&s_ofmem_data.ofmem)
 #define TOP_OF_RAM 	(s_ofmem_data.memory + MEMSIZE)
 
+#define OFMEM_PHYS_RESERVED	0x1000000
+
 translation_t **g_ofmem_translations = &s_ofmem_data.ofmem.trans;
 
 extern uint32_t qemu_mem_size;
@@ -251,7 +253,7 @@ void ofmem_init( void )
 	ofmem_claim_virt(0, PAGE_SIZE, 0);
 	
 	/* Claim reserved physical addresses at top of RAM */
-	ofmem_claim_phys(ofmem_arch_get_phys_top(), s_ofmem_data.ofmem.ramsize - ofmem_arch_get_phys_top(), 0);
+	ofmem_claim_phys(s_ofmem_data.ofmem.ramsize - OFMEM_PHYS_RESERVED, OFMEM_PHYS_RESERVED, 0);
 	
 	/* Claim OpenBIOS reserved space */
 	ofmem_claim_virt(0xffd00000, 0x300000, 0);
-- 
1.7.10.4




More information about the OpenBIOS mailing list