diff options
author | Jiaxun Yang | 2020-12-15 07:41:54 +0100 |
---|---|---|
committer | Philippe Mathieu-Daudé | 2021-01-04 23:36:03 +0100 |
commit | 5052b6e82ccad696f63b9e7107e49c53965f750c (patch) | |
tree | 9d2a82fbe06fecd95087f566ce6b09707f1ae827 /hw/mips/malta.c | |
parent | hw/mips: Make bootloader addresses unsigned (diff) | |
download | qemu-5052b6e82ccad696f63b9e7107e49c53965f750c.tar.gz qemu-5052b6e82ccad696f63b9e7107e49c53965f750c.tar.xz qemu-5052b6e82ccad696f63b9e7107e49c53965f750c.zip |
hw/mips/malta: Use address translation helper to calculate bootloader_run_addr
So it will sign extend adresses properly.
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20201215064200.28751-3-jiaxun.yang@flygoat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'hw/mips/malta.c')
-rw-r--r-- | hw/mips/malta.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/mips/malta.c b/hw/mips/malta.c index 7db009a3e9..1fbb8a3220 100644 --- a/hw/mips/malta.c +++ b/hw/mips/malta.c @@ -1302,9 +1302,9 @@ void mips_malta_init(MachineState *machine) /* For KVM we reserve 1MB of RAM for running bootloader */ if (kvm_enabled()) { ram_low_size -= 0x100000; - bootloader_run_addr = 0x40000000 + ram_low_size; + bootloader_run_addr = cpu_mips_kvm_um_phys_to_kseg0(NULL, ram_low_size); } else { - bootloader_run_addr = 0xbfc00000; + bootloader_run_addr = cpu_mips_phys_to_kseg0(NULL, RESET_ADDRESS); } /* Write a small bootloader to the flash location. */ |