target/hppa: Fix TOC handler for 64-bit CPUs
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>
Helge Deller committed
Mar 29, 2026 at 20:46 UTC
afcb125165eb3168ea95424a7355ea7e66256790
1 file changed
+6
-1
target/hppa/int_helper.c
+6
-1
@@ -203,7 +203,12 @@ void hppa_cpu_do_interrupt(CPUState *cs)
203
204
/* step 7 */
205
if (i == EXCP_TOC) {
206
- env->iaoq_f = hppa_form_gva(env, 0, FIRMWARE_START);
206
+ hwaddr pdc_toc_addr = FIRMWARE_START;
207
+
208
+ /* for 64-bit include the high bits of PDC */
209
+ pdc_toc_addr |= ((uint64_t) FIRMWARE_HIGH) << 32;
210
+ env->iaoq_f = hppa_form_gva(env, 0, pdc_toc_addr);
211
+
212
/* help SeaBIOS and provide iaoq_b and iasq_back in shadow regs */
213
env->gr[24] = env->cr_back[0];
214
env->gr[25] = env->cr_back[1];