[OpenBIOS] [PATCH 3/3] libopenbios: limit upper virtual memory range to ofmem_arch_get_virt_top()

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


64-bit Solaris appears to overflow in its memory list calculations if the
entire virtual memory space is represented in the available memory list.

Enforcing the upper limit from the previous patch enables 64-bit Solaris
9 boot to get beyond the "VAC too big!" error message upon boot.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>
---
 libopenbios/ofmem_common.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libopenbios/ofmem_common.c b/libopenbios/ofmem_common.c
index 052aa2f..217bd9b 100644
--- a/libopenbios/ofmem_common.c
+++ b/libopenbios/ofmem_common.c
@@ -350,7 +350,7 @@ static void ofmem_update_translations( void )
 	ofmem_update_memory_available(s_phandle_memory, ofmem->phys_range, 
 			&phys_range_prop, &phys_range_prop_size, &phys_range_prop_used, get_ram_size() - 1);
 	ofmem_update_memory_available(s_phandle_mmu, ofmem->virt_range, 
-			&virt_range_prop, &virt_range_prop_size, &virt_range_prop_used, (ucell)-1);
+			&virt_range_prop, &virt_range_prop_size, &virt_range_prop_used, ofmem_arch_get_virt_top() - 1);
 	ofmem_update_mmu_translations();
 }
 
-- 
1.7.10.4




More information about the OpenBIOS mailing list