HPPA64 updates

-----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQS86RI+GtKfB8BJu973ErUQojoPXwUCZeQOtQAKCRD3ErUQojoP
 Xzh6AP9Gs8sJzRbR+HLlbrs3ACR7kQEVGOYuuBEJpKqkTyDbLwD/YdOjzgtTRKLd
 imxaWOJaLhpvBrmFLxn3Q58K3n9u1wY=
 =bnMy
 -----END PGP SIGNATURE-----

Merge tag 'hppa-latest-pull-request' of https://github.com/hdeller/qemu-hppa into staging

HPPA64 updates

# -----BEGIN PGP SIGNATURE-----
#
# iHUEABYKAB0WIQS86RI+GtKfB8BJu973ErUQojoPXwUCZeQOtQAKCRD3ErUQojoP
# Xzh6AP9Gs8sJzRbR+HLlbrs3ACR7kQEVGOYuuBEJpKqkTyDbLwD/YdOjzgtTRKLd
# imxaWOJaLhpvBrmFLxn3Q58K3n9u1wY=
# =bnMy
# -----END PGP SIGNATURE-----
# gpg: Signature made Sun 03 Mar 2024 05:46:29 GMT
# gpg:                using EDDSA key BCE9123E1AD29F07C049BBDEF712B510A23A0F5F
# gpg: Good signature from "Helge Deller <deller@gmx.de>" [unknown]
# gpg:                 aka "Helge Deller <deller@kernel.org>" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 4544 8228 2CD9 10DB EF3D  25F8 3E5F 3D04 A7A2 4603
#      Subkey fingerprint: BCE9 123E 1AD2 9F07 C049  BBDE F712 B510 A23A 0F5F

* tag 'hppa-latest-pull-request' of https://github.com/hdeller/qemu-hppa:
  roms/hppa: Add build rules for hppa-firmware
  pc-bios/README: Add information about hppa-firmware
  pc-bios/meson: Add hppa-firmware64.img blob
  target/hppa: Restore unwind_breg before calculating ior
  target: hppa: Fix unaligned double word accesses for hppa64

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell 2024-03-04 16:01:33 +00:00
commit 52e7db443b
7 changed files with 22 additions and 4 deletions

View file

@ -75,3 +75,9 @@
initialize and run boot images stored in SPI flash, but may grow more initialize and run boot images stored in SPI flash, but may grow more
features over time as needed. The source code is available at: features over time as needed. The source code is available at:
https://github.com/google/vbootrom https://github.com/google/vbootrom
- hppa-firmware.img (32-bit) and hppa-firmware64.img (64-bit) are firmware
files for the HP-PARISC (hppa) architecture.
They are built form the SeaBIOS-hppa sources, which is a fork of SeaBIOS
adapted for hppa.
SeaBIOS-hppa is available at https://github.com/hdeller/seabios-hppa

View file

@ -73,6 +73,7 @@ blobs = [
'qemu_vga.ndrv', 'qemu_vga.ndrv',
'edk2-licenses.txt', 'edk2-licenses.txt',
'hppa-firmware.img', 'hppa-firmware.img',
'hppa-firmware64.img',
'opensbi-riscv32-generic-fw_dynamic.bin', 'opensbi-riscv32-generic-fw_dynamic.bin',
'opensbi-riscv64-generic-fw_dynamic.bin', 'opensbi-riscv64-generic-fw_dynamic.bin',
'npcm7xx_bootrom.bin', 'npcm7xx_bootrom.bin',

View file

@ -68,6 +68,7 @@ default help:
@echo " opensbi32-generic -- update OpenSBI for 32-bit generic machine" @echo " opensbi32-generic -- update OpenSBI for 32-bit generic machine"
@echo " opensbi64-generic -- update OpenSBI for 64-bit generic machine" @echo " opensbi64-generic -- update OpenSBI for 64-bit generic machine"
@echo " qboot -- update qboot" @echo " qboot -- update qboot"
@echo " hppa-firmware -- update 32- and 64-bit hppa firmware"
@echo " clean -- delete the files generated by the previous" \ @echo " clean -- delete the files generated by the previous" \
"build targets" "build targets"
@ -177,6 +178,11 @@ npcm7xx_bootrom:
$(MAKE) -C vbootrom CROSS_COMPILE=$(arm_cross_prefix) $(MAKE) -C vbootrom CROSS_COMPILE=$(arm_cross_prefix)
cp vbootrom/npcm7xx_bootrom.bin ../pc-bios/npcm7xx_bootrom.bin cp vbootrom/npcm7xx_bootrom.bin ../pc-bios/npcm7xx_bootrom.bin
hppa-firmware:
$(MAKE) -C seabios-hppa parisc
cp seabios-hppa/out/hppa-firmware.img ../pc-bios/
cp seabios-hppa/out-64/hppa-firmware64.img ../pc-bios/
clean: clean:
rm -rf seabios/.config seabios/out seabios/builds rm -rf seabios/.config seabios/out seabios/builds
$(MAKE) -C ipxe/src veryclean $(MAKE) -C ipxe/src veryclean
@ -189,3 +195,4 @@ clean:
$(MAKE) -C opensbi clean $(MAKE) -C opensbi clean
$(MAKE) -C qboot clean $(MAKE) -C qboot clean
$(MAKE) -C vbootrom clean $(MAKE) -C vbootrom clean
$(MAKE) -C seabios-hppa clean

View file

@ -121,9 +121,10 @@ void hppa_cpu_do_unaligned_access(CPUState *cs, vaddr addr,
CPUHPPAState *env = &cpu->env; CPUHPPAState *env = &cpu->env;
cs->exception_index = EXCP_UNALIGN; cs->exception_index = EXCP_UNALIGN;
cpu_restore_state(cs, retaddr);
hppa_set_ior_and_isr(env, addr, MMU_IDX_MMU_DISABLED(mmu_idx)); hppa_set_ior_and_isr(env, addr, MMU_IDX_MMU_DISABLED(mmu_idx));
cpu_loop_exit_restore(cs, retaddr); cpu_loop_exit(cs);
} }
#endif /* CONFIG_USER_ONLY */ #endif /* CONFIG_USER_ONLY */

View file

@ -76,7 +76,8 @@ void cpu_hppa_put_psw(CPUHPPAState *env, target_ulong psw)
} }
psw &= ~reserved; psw &= ~reserved;
env->psw = psw & ~(PSW_N | PSW_V | PSW_CB); env->psw = psw & (uint32_t)~(PSW_N | PSW_V | PSW_CB);
env->psw_n = (psw / PSW_N) & 1; env->psw_n = (psw / PSW_N) & 1;
env->psw_v = -((psw / PSW_V) & 1); env->psw_v = -((psw / PSW_V) & 1);

View file

@ -348,9 +348,10 @@ raise_exception_with_ior(CPUHPPAState *env, int excp, uintptr_t retaddr,
CPUState *cs = env_cpu(env); CPUState *cs = env_cpu(env);
cs->exception_index = excp; cs->exception_index = excp;
cpu_restore_state(cs, retaddr);
hppa_set_ior_and_isr(env, addr, mmu_disabled); hppa_set_ior_and_isr(env, addr, mmu_disabled);
cpu_loop_exit_restore(cs, retaddr); cpu_loop_exit(cs);
} }
void hppa_cpu_do_transaction_failed(CPUState *cs, hwaddr physaddr, void hppa_cpu_do_transaction_failed(CPUState *cs, hwaddr physaddr,

View file

@ -351,11 +351,12 @@ target_ulong HELPER(probe)(CPUHPPAState *env, target_ulong addr,
excp = hppa_get_physical_address(env, addr, mmu_idx, 0, &phys, excp = hppa_get_physical_address(env, addr, mmu_idx, 0, &phys,
&prot, NULL); &prot, NULL);
if (excp >= 0) { if (excp >= 0) {
cpu_restore_state(env_cpu(env), GETPC());
hppa_set_ior_and_isr(env, addr, MMU_IDX_MMU_DISABLED(mmu_idx)); hppa_set_ior_and_isr(env, addr, MMU_IDX_MMU_DISABLED(mmu_idx));
if (excp == EXCP_DTLB_MISS) { if (excp == EXCP_DTLB_MISS) {
excp = EXCP_NA_DTLB_MISS; excp = EXCP_NA_DTLB_MISS;
} }
hppa_dynamic_excp(env, excp, GETPC()); helper_excp(env, excp);
} }
return (want & prot) != 0; return (want & prot) != 0;
#endif #endif