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@siriusit.co.uk --- openbios-devel/libopenbios/ofmem_common.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/openbios-devel/libopenbios/ofmem_common.c b/openbios-devel/libopenbios/ofmem_common.c index a2c69f8..ac36fca 100644 --- a/openbios-devel/libopenbios/ofmem_common.c +++ b/openbios-devel/libopenbios/ofmem_common.c @@ -347,7 +347,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, 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(); }