diff mbox

hw/mips_malta: Fix KVM PC initialisation

Message ID 1444668879-1577-1-git-send-email-james.hogan@imgtec.com
State New
Headers show

Commit Message

James Hogan Oct. 12, 2015, 4:54 p.m. UTC
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")
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: Leon Alrae <leon.alrae@imgtec.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
---
 hw/mips/mips_malta.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Aurelien Jarno Oct. 13, 2015, 3:46 p.m. UTC | #1
On 2015-10-12 17:54, James Hogan wrote:
> 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")
> Signed-off-by: James Hogan <james.hogan@imgtec.com>
> Cc: Paul Burton <paul.burton@imgtec.com>
> Cc: Leon Alrae <leon.alrae@imgtec.com>
> Cc: Aurelien Jarno <aurelien@aurel32.net>
> ---
>  hw/mips/mips_malta.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Leon Alrae Oct. 16, 2015, 2:58 p.m. UTC | #2
On 12/10/15 17:54, James Hogan wrote:
> 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")
> Signed-off-by: James Hogan <james.hogan@imgtec.com>
> Cc: Paul Burton <paul.burton@imgtec.com>
> Cc: Leon Alrae <leon.alrae@imgtec.com>
> Cc: Aurelien Jarno <aurelien@aurel32.net>
> ---
>  hw/mips/mips_malta.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Leon Alrae <leon.alrae@imgtec.com>
diff mbox

Patch

diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
index c1f570a79f8f..91c36baa55d6 100644
--- a/hw/mips/mips_malta.c
+++ b/hw/mips/mips_malta.c
@@ -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;
     }
 }