All of lore.kernel.org
 help / color / mirror / Atom feed
From: Helge Deller <deller@kernel.org>
To: qemu-devel@nongnu.org
Cc: Helge Deller <deller@gmx.de>,
	Richard Henderson <richard.henderson@linaro.org>
Subject: [PULL 6/8] target/hppa: Fix TOC handler for 64-bit CPUs
Date: Tue, 31 Mar 2026 20:52:17 +0200	[thread overview]
Message-ID: <20260331185219.12187-7-deller@kernel.org> (raw)
In-Reply-To: <20260331185219.12187-1-deller@kernel.org>

From: Helge Deller <deller@gmx.de>

When the TOC handler is triggered, e.g. by using the "NMI" command
in the QEMU monitor, make sure to call the full 64-bit TOC handler
address in SeaBIOS-hppa firmware.
This fixes the TOC handler on 64-bit CPUs (and 64-bit SeaBIOS).

Signed-off-by: Helge Deller <deller@gmx.de>
---
 target/hppa/int_helper.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/target/hppa/int_helper.c b/target/hppa/int_helper.c
index d5a20cd549..3e87b9a001 100644
--- a/target/hppa/int_helper.c
+++ b/target/hppa/int_helper.c
@@ -203,7 +203,12 @@ void hppa_cpu_do_interrupt(CPUState *cs)
 
     /* step 7 */
     if (i == EXCP_TOC) {
-        env->iaoq_f = hppa_form_gva(env, 0, FIRMWARE_START);
+        hwaddr pdc_toc_addr = FIRMWARE_START;
+
+        /* for 64-bit include the high bits of PDC */
+        pdc_toc_addr |= ((uint64_t) FIRMWARE_HIGH) << 32;
+        env->iaoq_f = hppa_form_gva(env, 0, pdc_toc_addr);
+
         /* help SeaBIOS and provide iaoq_b and iasq_back in shadow regs */
         env->gr[24] = env->cr_back[0];
         env->gr[25] = env->cr_back[1];
-- 
2.53.0



  parent reply	other threads:[~2026-03-31 18:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-31 18:52 [PULL 0/8] Hppa more v11 fixes patches Helge Deller
2026-03-31 18:52 ` [PULL 1/8] hw/pci-host/astro: Make astro address arrays accessible for other users Helge Deller
2026-03-31 18:52 ` [PULL 2/8] hw/pci-host/astro: Fix initial addresses in IOC Helge Deller
2026-03-31 18:52 ` [PULL 3/8] hw/pci-host/astro: Implement LMMIO registers Helge Deller
2026-03-31 18:52 ` [PULL 4/8] hw/pci-host/astro: Fix LMMIO DIRECT mappings Helge Deller
2026-03-31 18:52 ` [PULL 5/8] hw/pci-host/astro: Add GMMIO mapping Helge Deller
2026-03-31 18:52 ` Helge Deller [this message]
2026-03-31 18:52 ` [PULL 7/8] hw/hppa: Implement memory ranges Helge Deller
2026-03-31 18:52 ` [PULL 8/8] target/hppa: Update SeaBIOS-hppa to version 24 Helge Deller
2026-03-31 21:23 ` [PULL 0/8] Hppa more v11 fixes patches Peter Maydell

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=20260331185219.12187-7-deller@kernel.org \
    --to=deller@kernel.org \
    --cc=deller@gmx.de \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.