mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
MIPS: fix fulong bios loading
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
parent
aa8f40090a
commit
33dd298323
1 changed files with 5 additions and 6 deletions
|
@ -256,7 +256,6 @@ static void mips_fulong2e_init(ram_addr_t ram_size, const char *boot_device,
|
||||||
const char *initrd_filename, const char *cpu_model)
|
const char *initrd_filename, const char *cpu_model)
|
||||||
{
|
{
|
||||||
char *filename;
|
char *filename;
|
||||||
char buf[1024];
|
|
||||||
unsigned long ram_offset, bios_offset;
|
unsigned long ram_offset, bios_offset;
|
||||||
unsigned long bios_size;
|
unsigned long bios_size;
|
||||||
int64_t kernel_entry;
|
int64_t kernel_entry;
|
||||||
|
@ -311,8 +310,8 @@ static void mips_fulong2e_init(ram_addr_t ram_size, const char *boot_device,
|
||||||
kernel_entry = load_kernel (env);
|
kernel_entry = load_kernel (env);
|
||||||
write_bootloader(env, qemu_get_ram_ptr(bios_offset), kernel_entry);
|
write_bootloader(env, qemu_get_ram_ptr(bios_offset), kernel_entry);
|
||||||
} else {
|
} else {
|
||||||
if (bios_name == NULL) {
|
if (bios_name == NULL) {
|
||||||
bios_name = FULONG_BIOSNAME;
|
bios_name = FULONG_BIOSNAME;
|
||||||
}
|
}
|
||||||
filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name);
|
filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name);
|
||||||
if (filename) {
|
if (filename) {
|
||||||
|
@ -323,10 +322,10 @@ static void mips_fulong2e_init(ram_addr_t ram_size, const char *boot_device,
|
||||||
bios_size = -1;
|
bios_size = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((bios_size < 0 || bios_size > BIOS_SIZE) && !kernel_filename) {
|
if ((bios_size < 0 || bios_size > BIOS_SIZE) && !kernel_filename) {
|
||||||
fprintf(stderr, "qemu: Could not load MIPS bios '%s'\n", buf);
|
fprintf(stderr, "qemu: Could not load MIPS bios '%s'\n", bios_name);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Init internal devices */
|
/* Init internal devices */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue