MIPS patches 2017-07-28
Changes: * Improve ths MIPS board kernel load error reporting * Revert unnecessary warning messages -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iQIVAwUAWXsyeCI464bV95fCAQJwLA//S/4pz25g3tGtrjZR+7GQnMUyY4jl7a70 +ut7uGCU9/6KgbAL3XgCLVaxAAth5Swh7rrOb2Yp1TxyL4PC/M4o/dYaKY8+okWu /s4v2UFSwtZPkVCkzeZRMx/suM9jAdFuEkB9CzwPKVyqnC5ghZs68xWZMuSi8cyL VPj8ovPEo7G5Sw1icSRHq9jdmi5lOMI72U+AFC8hz6r6IWVI584vR7D7ozqharhV 7JK5oY5gFFeq39Ip8sRiP+VXaclroOg5nC+NTVcArtRGgvTSxWz7SQhTusbSALX3 Q/iCyecpEkK88AOesGVcRZPA3no5zkCBbnSbxU0E/Eq1wYQmOg1D25WFsirUNhS+ JhspYVmAIWZ9S8mdaLtEJEkJW+3srMauB7HGLCSravgWH1ZKVEqI10Ewsew2mErb ncPvO3flH9y1QFqwMZy8879WMVBF5Z4dGDwnF+fShj9TDgFPwrtDK6aaIV9kC+iQ dh8rOSw7RQYigqj1VWIF356n1R2c1V0fvI0d8jJqau+SbNRQYFMJ4UaCFQtzD748 FUPuP5rCOs+BxyYBYQnW5nSn7Jno19imQEwxDAfSATDDTTKM8moK97ZrisMzXT0S 3UcgfBapcyL9RCXi4/Ums2Q5GIVXtxi2xsZ0HW1ZIezIs0UpmMqOfsMXiDfD+fFC hcpKCFsGCTo= =ci7G -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/yongbok/tags/mips-20170728' into staging MIPS patches 2017-07-28 Changes: * Improve ths MIPS board kernel load error reporting * Revert unnecessary warning messages # gpg: Signature made Fri 28 Jul 2017 13:47:52 BST # gpg: using RSA key 0x2238EB86D5F797C2 # gpg: Good signature from "Yongbok Kim <yongbok.kim@imgtec.com>" # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 8600 4CF5 3415 A5D9 4CFA 2B5C 2238 EB86 D5F7 97C2 * remotes/yongbok/tags/mips-20170728: Revert "elf-loader: warn about invalid endianness" hw/mips: load_elf_strerror to report kernel loading failure Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
3aabfec2c8
|
@ -480,7 +480,6 @@ int load_elf_ram(const char *filename,
|
|||
}
|
||||
|
||||
if (target_data_order != e_ident[EI_DATA]) {
|
||||
fprintf(stderr, "%s: wrong endianness\n", filename);
|
||||
ret = ELF_LOAD_WRONG_ENDIAN;
|
||||
goto fail;
|
||||
}
|
||||
|
|
|
@ -110,16 +110,19 @@ static int64_t load_kernel (CPUMIPSState *env)
|
|||
{
|
||||
int64_t kernel_entry, kernel_low, kernel_high;
|
||||
int index = 0;
|
||||
long initrd_size;
|
||||
long kernel_size, initrd_size;
|
||||
ram_addr_t initrd_offset;
|
||||
uint32_t *prom_buf;
|
||||
long prom_size;
|
||||
|
||||
if (load_elf(loaderparams.kernel_filename, cpu_mips_kseg0_to_phys, NULL,
|
||||
(uint64_t *)&kernel_entry, (uint64_t *)&kernel_low,
|
||||
(uint64_t *)&kernel_high, 0, EM_MIPS, 1, 0) < 0) {
|
||||
fprintf(stderr, "qemu: could not load kernel '%s'\n",
|
||||
loaderparams.kernel_filename);
|
||||
kernel_size = load_elf(loaderparams.kernel_filename, cpu_mips_kseg0_to_phys,
|
||||
NULL, (uint64_t *)&kernel_entry,
|
||||
(uint64_t *)&kernel_low, (uint64_t *)&kernel_high,
|
||||
0, EM_MIPS, 1, 0);
|
||||
if (kernel_size < 0) {
|
||||
error_report("qemu: could not load kernel '%s': %s",
|
||||
loaderparams.kernel_filename,
|
||||
load_elf_strerror(kernel_size));
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
|
|
@ -794,7 +794,7 @@ static void GCC_FMT_ATTR(3, 4) prom_set(uint32_t* prom_buf, int index,
|
|||
static int64_t load_kernel (void)
|
||||
{
|
||||
int64_t kernel_entry, kernel_high;
|
||||
long initrd_size;
|
||||
long kernel_size, initrd_size;
|
||||
ram_addr_t initrd_offset;
|
||||
int big_endian;
|
||||
uint32_t *prom_buf;
|
||||
|
@ -808,11 +808,13 @@ static int64_t load_kernel (void)
|
|||
big_endian = 0;
|
||||
#endif
|
||||
|
||||
if (load_elf(loaderparams.kernel_filename, cpu_mips_kseg0_to_phys, NULL,
|
||||
(uint64_t *)&kernel_entry, NULL, (uint64_t *)&kernel_high,
|
||||
big_endian, EM_MIPS, 1, 0) < 0) {
|
||||
fprintf(stderr, "qemu: could not load kernel '%s'\n",
|
||||
loaderparams.kernel_filename);
|
||||
kernel_size = load_elf(loaderparams.kernel_filename, cpu_mips_kseg0_to_phys,
|
||||
NULL, (uint64_t *)&kernel_entry, NULL,
|
||||
(uint64_t *)&kernel_high, big_endian, EM_MIPS, 1, 0);
|
||||
if (kernel_size < 0) {
|
||||
error_report("qemu: could not load kernel '%s': %s",
|
||||
loaderparams.kernel_filename,
|
||||
load_elf_strerror(kernel_size));
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
|
|
@ -78,8 +78,9 @@ static int64_t load_kernel(void)
|
|||
if ((entry & ~0x7fffffffULL) == 0x80000000)
|
||||
entry = (int32_t)entry;
|
||||
} else {
|
||||
fprintf(stderr, "qemu: could not load kernel '%s'\n",
|
||||
loaderparams.kernel_filename);
|
||||
error_report("qemu: could not load kernel '%s': %s",
|
||||
loaderparams.kernel_filename,
|
||||
load_elf_strerror(kernel_size));
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include "sysemu/block-backend.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "sysemu/qtest.h"
|
||||
#include "qemu/error-report.h"
|
||||
|
||||
#define MAX_IDE_BUS 2
|
||||
|
||||
|
@ -96,8 +97,9 @@ static int64_t load_kernel(void)
|
|||
if ((entry & ~0x7fffffffULL) == 0x80000000)
|
||||
entry = (int32_t)entry;
|
||||
} else {
|
||||
fprintf(stderr, "qemu: could not load kernel '%s'\n",
|
||||
loaderparams.kernel_filename);
|
||||
error_report("qemu: could not load kernel '%s': %s",
|
||||
loaderparams.kernel_filename,
|
||||
load_elf_strerror(kernel_size));
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue