[OpenBIOS] [commit] r1024 - trunk/openbios-devel/libopenbios

repository service svn at openbios.org
Tue Feb 8 23:07:00 CET 2011


Author: mcayland
Date: Tue Feb  8 23:06:59 2011
New Revision: 1024
URL: http://tracker.coreboot.org/trac/openbios/changeset/1024

Log:
OFMEM: Fix bogus tail entry added to the end of the virtual memory available list.

Since top_address is 64-bit, the existing code would incorrectly think that the end of
virtual memory had not been reached and so add a bogus tail entry. Casting -1 to ucell
should ensure that we pass the correct top address for virtual memory.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at siriusit.co.uk>

Modified:
   trunk/openbios-devel/libopenbios/ofmem_common.c

Modified: trunk/openbios-devel/libopenbios/ofmem_common.c
==============================================================================
--- trunk/openbios-devel/libopenbios/ofmem_common.c	Tue Feb  8 23:06:56 2011	(r1023)
+++ trunk/openbios-devel/libopenbios/ofmem_common.c	Tue Feb  8 23:06:59 2011	(r1024)
@@ -347,7 +347,7 @@
 	ofmem_update_memory_available(s_phandle_memory, ofmem->phys_range, 
 			&phys_range_prop, &phys_range_prop_size, &phys_range_prop_used, ofmem_arch_get_phys_top());
 	ofmem_update_memory_available(s_phandle_mmu, ofmem->virt_range, 
-			&virt_range_prop, &virt_range_prop_size, &virt_range_prop_used, -1ULL);
+			&virt_range_prop, &virt_range_prop_size, &virt_range_prop_used, (ucell)-1);
 	ofmem_update_mmu_translations();
 }
 



More information about the OpenBIOS mailing list