diff options
author | Helge Deller <deller@gmx.de> | 2023-11-21 19:29:22 +0100 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2023-11-21 19:29:22 +0100 |
commit | be021c7fca92ebd95bbbd6da95eb3103d51c3268 (patch) | |
tree | 939d2ba7d10aa082acba1b62c427db0cc5b4d5c1 | |
parent | 2a23dd388fcc1068f9c4a3077e0662803743e1c8 (diff) | |
download | seabios-hppa-be021c7fca92ebd95bbbd6da95eb3103d51c3268.zip seabios-hppa-be021c7fca92ebd95bbbd6da95eb3103d51c3268.tar.gz seabios-hppa-be021c7fca92ebd95bbbd6da95eb3103d51c3268.tar.bz2 |
parisc: Fix system reboot
In order to fix the reboot issues, re-initialize PAGE0->mem_cons.hpa to
zero to fix console output and set default PCI bus to DINO to not break
the following qemu_cfg() call.
Reported-by: Bruno Haible <bruno@clisp.org>
Fixes: https://gitlab.com/qemu-project/qemu/-/issues/1991
Signed-off-by: Helge Deller <deller@gmx.de>
-rw-r--r-- | src/parisc/parisc.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/parisc/parisc.c b/src/parisc/parisc.c index 61dd651..71360c1 100644 --- a/src/parisc/parisc.c +++ b/src/parisc/parisc.c @@ -2981,6 +2981,19 @@ void __VISIBLE start_parisc_firmware(void) // PlatformRunningOn = PF_QEMU; // emulate runningOnQEMU() + /* + * Initialize main variables at reboot, e.g. initialize the HPA of the main + * console to "unknown" (0), which is required to get output via + * parisc_putchar() at bootup. Set initial PCI bus to Dino, which will be + * corrected later when we get the machine model (C3000/B160L) via cfg(), + * but cfg() tries to initialize the PCI bus. + */ + PAGE0->mem_cons.hpa = 0; + has_astro = 0; + pci_hpa = PCI_HPA; /* HPA of Dino or Elroy0 */ + hppa_port_pci_cmd = (PCI_HPA + DINO_PCI_ADDR); + hppa_port_pci_data = (PCI_HPA + DINO_CONFIG_DATA); + /* Initialize qemu fw_cfg interface */ PORT_QEMU_CFG_CTL = fw_cfg_port; qemu_cfg_init(); |