qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Helge Deller <deller@gmx.de>
To: qemu-devel@nongnu.org
Cc: Helge Deller <deller@gmx.de>, Richard Henderson <rth@twiddle.net>
Subject: [PATCH 4/7] hw/hppa: Inform SeaBIOS about fw_cfg port address
Date: Tue,  1 Sep 2020 20:34:49 +0200	[thread overview]
Message-ID: <20200901183452.24967-5-deller@gmx.de> (raw)
In-Reply-To: <20200901183452.24967-1-deller@gmx.de>

Signed-off-by: Helge Deller <deller@gmx.de>
---
 hw/hppa/hppa_hardware.h | 3 +--
 hw/hppa/machine.c       | 7 ++++++-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/hw/hppa/hppa_hardware.h b/hw/hppa/hppa_hardware.h
index cdb7fa6240..bc258895c9 100644
--- a/hw/hppa/hppa_hardware.h
+++ b/hw/hppa/hppa_hardware.h
@@ -38,8 +38,7 @@
 #define PORT_PCI_CMD    (PCI_HPA + DINO_PCI_ADDR)
 #define PORT_PCI_DATA   (PCI_HPA + DINO_CONFIG_DATA)

-/* QEMU fw_cfg interface port */
-#define QEMU_FW_CFG_IO_BASE     (MEMORY_HPA + 0x80)
+#define FW_CFG_IO_BASE  0xfffa0000

 #define PORT_SERIAL1    (DINO_UART_HPA + 0x800)
 #define PORT_SERIAL2    (LASI_UART_HPA + 0x800)
diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c
index 4b35afc9d5..2bed49807b 100644
--- a/hw/hppa/machine.c
+++ b/hw/hppa/machine.c
@@ -69,7 +69,7 @@ static FWCfgState *create_fw_cfg(MachineState *ms)
     FWCfgState *fw_cfg;
     uint64_t val;

-    fw_cfg = fw_cfg_init_mem(QEMU_FW_CFG_IO_BASE, QEMU_FW_CFG_IO_BASE + 4);
+    fw_cfg = fw_cfg_init_mem(FW_CFG_IO_BASE, FW_CFG_IO_BASE + 4);
     fw_cfg_add_i16(fw_cfg, FW_CFG_NB_CPUS, ms->smp.cpus);
     fw_cfg_add_i16(fw_cfg, FW_CFG_MAX_CPUS, HPPA_MAX_CPUS);
     fw_cfg_add_i64(fw_cfg, FW_CFG_RAM_SIZE, ram_size);
@@ -290,6 +290,9 @@ static void machine_hppa_init(MachineState *machine)

     /* tell firmware how many SMP CPUs to present in inventory table */
     cpu[0]->env.gr[21] = smp_cpus;
+
+    /* tell firmware fw_cfg port */
+    cpu[0]->env.gr[19] = FW_CFG_IO_BASE;
 }

 static void hppa_machine_reset(MachineState *ms)
@@ -317,6 +320,8 @@ static void hppa_machine_reset(MachineState *ms)
     cpu[0]->env.gr[24] = 'c';
     /* gr22/gr23 unused, no initrd while reboot. */
     cpu[0]->env.gr[21] = smp_cpus;
+    /* tell firmware fw_cfg port */
+    cpu[0]->env.gr[19] = FW_CFG_IO_BASE;
 }


--
2.21.3



  parent reply	other threads:[~2020-09-01 18:38 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-01 18:34 [PATCH 0/7] hppa power button support, graphics updates and firmware fixes Helge Deller
2020-09-01 18:34 ` [PATCH 1/7] seabios-hppa: Update SeaBIOS to hppa-qemu-5.2-2 tag Helge Deller
2020-09-01 18:34 ` [PATCH 2/7] hw/hppa: Make number of TLB and BTLB entries configurable Helge Deller
2020-09-01 21:36   ` Richard Henderson
2020-09-02 11:16     ` Helge Deller
2020-09-02 16:52       ` Richard Henderson
2020-09-02 19:36         ` Helge Deller
2020-09-01 18:34 ` [PATCH 3/7] hw/hppa: Store boot device in fw_cfg section Helge Deller
2020-09-01 21:37   ` Richard Henderson
2020-09-01 18:34 ` Helge Deller [this message]
2020-09-01 21:39   ` [PATCH 4/7] hw/hppa: Inform SeaBIOS about fw_cfg port address Richard Henderson
2020-09-02 11:24     ` Helge Deller
2020-09-02 16:46       ` Richard Henderson
2020-09-02 19:37         ` Helge Deller
2020-09-01 18:34 ` [PATCH 5/7] hw/hppa: Add power button emulation Helge Deller
2020-09-01 21:42   ` Richard Henderson
2020-09-01 18:34 ` [PATCH 6/7] hw/display/artist: Fix artist screen resolution Helge Deller
2020-09-01 21:49   ` Richard Henderson
2020-09-02 21:48     ` Helge Deller
2020-09-02 22:09       ` Richard Henderson
2020-09-03  6:07         ` Helge Deller
2020-09-03  6:08         ` Helge Deller
2020-09-03  6:09         ` Helge Deller
2020-09-03 15:09           ` Richard Henderson
2020-09-01 18:34 ` [PATCH 7/7] target/hppa: Fix boot with old Linux installation CDs Helge Deller
2020-09-01 19:37 ` [PATCH 0/7] hppa power button support, graphics updates and firmware fixes Philippe Mathieu-Daudé
2020-09-01 19:49   ` Helge Deller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200901183452.24967-5-deller@gmx.de \
    --to=deller@gmx.de \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).