In preparation for applying the ofmem_arch_get_virt_top() restriction to the virtual memory region, fix up the calculation of the available list tail plus increase the virtual memory region to cover the IO memory.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk --- arch/sparc32/boot.c | 2 +- include/arch/sparc32/ofmem_sparc32.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/sparc32/boot.c b/arch/sparc32/boot.c index d458658..e9605f5 100644 --- a/arch/sparc32/boot.c +++ b/arch/sparc32/boot.c @@ -178,7 +178,7 @@ void setup_romvec(void) (**pp).num_bytes = (intprop_ptr[4] + intprop_ptr[5]) - (intprop_ptr[1] + intprop_ptr[2]); } else { /* Tail (size from top of virtual memory) */ - (**pp).num_bytes = 0xffffffffUL - (intprop_ptr[1] + intprop_ptr[2]) + 1; + (**pp).num_bytes = ofmem_arch_get_virt_top() - 1 - (intprop_ptr[1] + intprop_ptr[2]) + 1; }
intprop_ptr += 3; diff --git a/include/arch/sparc32/ofmem_sparc32.h b/include/arch/sparc32/ofmem_sparc32.h index efc21b4..a23780b 100644 --- a/include/arch/sparc32/ofmem_sparc32.h +++ b/include/arch/sparc32/ofmem_sparc32.h @@ -17,7 +17,7 @@ #include "libopenbios/ofmem.h"
#define OF_CODE_START 0xffd00000 -#define OFMEM_VIRT_TOP 0xfe000000 +#define OFMEM_VIRT_TOP 0xffff0000
struct mem; extern struct mem cdvmem;