Skip to contentSkip to conversation

hw/mips_malta: Fix KVM PC initialisation

PATCH In review James Hogan 3 participants 3 messages Oct 12, 2015 – Oct 16, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/mips_malta: Fix KVM PC initialisation

Commit 71c199c81d29 ("mips_malta: provide ememsize env variable to kernels") changed the meaning of loaderparams.ram_size to be the whole of RAM rather than just the low part below where the boot code is placed for KVM, but it didn't update the PC initialisation for KVM to use ram_low_size. Fix that now.

Fixes 71c199c81d29 ("mips_malta: provide ememsize env variable to kernels")
Cc Paul Burton <[email protected]>
Cc Leon Alrae <[email protected]>
Cc Aurelien Jarno <[email protected]>
---
 hw/mips/mips_malta.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/mips/mips_malta.c +1 -1
index c1f570a79f8f..91c36baa55d6 100644
@@ -901,7 +901,7 @@ static void main_cpu_reset(void *opaque)
 
     if (kvm_enabled()) {
         /* Start running from the bootloader we wrote to end of RAM */
-        env->active_tc.PC = 0x40000000 + loaderparams.ram_size;
+        env->active_tc.PC = 0x40000000 + loaderparams.ram_low_size;
     }
 }
 
Signature · 1 line
2.4.9
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · James Hogan

Commit 71c199c81d29 ("mips_malta: provide ememsize env variable to kernels") changed the meaning of loaderparams.ram_size to be the whole of RAM rather than just the low part below where the boot code is placed for KVM, but it didn't update the PC initialisation for KVM to use ram_low_size. Fix that now.

Quoted 8 lines
Fixes 71c199c81d29 ("mips_malta: provide ememsize env variable to kernels")
Cc Paul Burton <[email protected]>
Cc Leon Alrae <[email protected]>
Cc Aurelien Jarno <[email protected]>
---
 hw/mips/mips_malta.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 2 lines
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
[email protected]                 http://www.aurel32.net
Reviewed-by on v1 1/1
#2 lore raw
In reply to James Hogan
Quoted 6 lines · James Hogan

Commit 71c199c81d29 ("mips_malta: provide ememsize env variable to kernels") changed the meaning of loaderparams.ram_size to be the whole of RAM rather than just the low part below where the boot code is placed for KVM, but it didn't update the PC initialisation for KVM to use ram_low_size. Fix that now.

Quoted 8 lines
Fixes 71c199c81d29 ("mips_malta: provide ememsize env variable to kernels")
Cc Paul Burton <[email protected]>
Cc Leon Alrae <[email protected]>
Cc Aurelien Jarno <[email protected]>
---
 hw/mips/mips_malta.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)