diff options
author | Jiaxun Yang <jiaxun.yang@flygoat.com> | 2020-12-15 14:41:53 +0800 |
---|---|---|
committer | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2021-01-04 23:36:03 +0100 |
commit | dde989943b401aec3a063214278474d2f8c1a9de (patch) | |
tree | 0441f1af1f07e9697853d9b3b15ea02b4b11f021 /hw/mips/mipssim.c | |
parent | c7784e42c7cce358ba9b21231dffe376f670cd5f (diff) |
hw/mips: Make bootloader addresses unsigned
Address should be unsigned anyway, otherwise it may carry
calculations wrongly.
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-2-jiaxun.yang@flygoat.com>
[PMD: Fixed typo and convert hw/mips/mipssim.c too]
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'hw/mips/mipssim.c')
-rw-r--r-- | hw/mips/mipssim.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/mips/mipssim.c b/hw/mips/mipssim.c index f2e6273525..f5d0da05aa 100644 --- a/hw/mips/mipssim.c +++ b/hw/mips/mipssim.c @@ -60,9 +60,9 @@ typedef struct ResetData { uint64_t vector; } ResetData; -static int64_t load_kernel(void) +static uint64_t load_kernel(void) { - int64_t entry, kernel_high, initrd_size; + uint64_t entry, kernel_high, initrd_size; long kernel_size; ram_addr_t initrd_offset; int big_endian; @@ -75,8 +75,8 @@ static int64_t load_kernel(void) kernel_size = load_elf(loaderparams.kernel_filename, NULL, cpu_mips_kseg0_to_phys, NULL, - (uint64_t *)&entry, NULL, - (uint64_t *)&kernel_high, NULL, big_endian, + &entry, NULL, + &kernel_high, NULL, big_endian, EM_MIPS, 1, 0); if (kernel_size < 0) { error_report("could not load kernel '%s': %s", |