mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 18:44:58 -06:00
hw/hppa/machine: Load 64-bit firmware on 64-bit machines
Load the 64-bit SeaBIOS-hppa firmware by default when running on a 64-bit machine. This will enable us to later support more than 4GB of RAM and is required that the OS (or PALO bootloader) will start or install a 64-bit kernel instead of a 32-bit kernel. Note that SeaBIOS-hppa v16 provides the "-fw_cfg opt/OS64,string=3" option with which the user can control what the firmware shall report back to the OS: Support of 32-bit OS, support of a 64-bit OS, or support for both (default). Wrap firmware loading inside !qtest_enabled() to avoid this warning with qtest: "qemu-system-hppa: no firmware provided". Signed-off-by: Helge Deller <deller@gmx.de> Acked-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
7c0dfcf939
commit
a9314795f0
1 changed files with 30 additions and 22 deletions
|
@ -13,6 +13,7 @@
|
||||||
#include "qemu/error-report.h"
|
#include "qemu/error-report.h"
|
||||||
#include "sysemu/reset.h"
|
#include "sysemu/reset.h"
|
||||||
#include "sysemu/sysemu.h"
|
#include "sysemu/sysemu.h"
|
||||||
|
#include "sysemu/qtest.h"
|
||||||
#include "sysemu/runstate.h"
|
#include "sysemu/runstate.h"
|
||||||
#include "hw/rtc/mc146818rtc.h"
|
#include "hw/rtc/mc146818rtc.h"
|
||||||
#include "hw/timer/i8254.h"
|
#include "hw/timer/i8254.h"
|
||||||
|
@ -333,6 +334,7 @@ static void machine_HP_common_init_tail(MachineState *machine, PCIBus *pci_bus,
|
||||||
const char *kernel_filename = machine->kernel_filename;
|
const char *kernel_filename = machine->kernel_filename;
|
||||||
const char *kernel_cmdline = machine->kernel_cmdline;
|
const char *kernel_cmdline = machine->kernel_cmdline;
|
||||||
const char *initrd_filename = machine->initrd_filename;
|
const char *initrd_filename = machine->initrd_filename;
|
||||||
|
const char *firmware = machine->firmware;
|
||||||
MachineClass *mc = MACHINE_GET_CLASS(machine);
|
MachineClass *mc = MACHINE_GET_CLASS(machine);
|
||||||
DeviceState *dev;
|
DeviceState *dev;
|
||||||
PCIDevice *pci_dev;
|
PCIDevice *pci_dev;
|
||||||
|
@ -408,9 +410,14 @@ static void machine_HP_common_init_tail(MachineState *machine, PCIBus *pci_bus,
|
||||||
|
|
||||||
/* Load firmware. Given that this is not "real" firmware,
|
/* Load firmware. Given that this is not "real" firmware,
|
||||||
but one explicitly written for the emulation, we might as
|
but one explicitly written for the emulation, we might as
|
||||||
well load it directly from an ELF image. */
|
well load it directly from an ELF image. Load the 64-bit
|
||||||
firmware_filename = qemu_find_file(QEMU_FILE_TYPE_BIOS,
|
firmware on 64-bit machines by default if not specified
|
||||||
machine->firmware ?: "hppa-firmware.img");
|
on command line. */
|
||||||
|
if (!qtest_enabled()) {
|
||||||
|
if (!firmware) {
|
||||||
|
firmware = lasi_dev ? "hppa-firmware.img" : "hppa-firmware64.img";
|
||||||
|
}
|
||||||
|
firmware_filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, firmware);
|
||||||
if (firmware_filename == NULL) {
|
if (firmware_filename == NULL) {
|
||||||
error_report("no firmware provided");
|
error_report("no firmware provided");
|
||||||
exit(1);
|
exit(1);
|
||||||
|
@ -433,6 +440,7 @@ static void machine_HP_common_init_tail(MachineState *machine, PCIBus *pci_bus,
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
g_free(firmware_filename);
|
g_free(firmware_filename);
|
||||||
|
}
|
||||||
|
|
||||||
rom_region = g_new(MemoryRegion, 1);
|
rom_region = g_new(MemoryRegion, 1);
|
||||||
memory_region_init_ram(rom_region, NULL, "firmware",
|
memory_region_init_ram(rom_region, NULL, "firmware",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue