summary refs log tree commit diff stats
path: root/target/hppa (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* | cpu: Call object_class_dynamic_cast() once in cpu_class_by_name()Philippe Mathieu-Daudé2024-01-051-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For all targets, the CPU class returned from CPUClass::class_by_name() and object_class_dynamic_cast(oc, CPU_RESOLVING_TYPE) need to be compatible. Lets apply the check in cpu_class_by_name() for once, instead of having the check in CPUClass::class_by_name() for individual target. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Gavin Shan <gshan@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Gavin Shan <gshan@redhat.com> Message-ID: <20231114235628.534334-4-gshan@redhat.com>
* | target/hppa: Remove object_class_is_abstract()Gavin Shan2024-01-051-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 3a9d0d7b64 ("hw/cpu: Call object_class_is_abstract() once in cpu_class_by_name()"), there is no need to check if @oc is abstract because it has been covered by cpu_class_by_name(). Signed-off-by: Gavin Shan <gshan@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20231114235628.534334-3-gshan@redhat.com> [PMD: Mention commit 3a9d0d7b64] Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
* | target/hppa: Constify VMState in machine.cRichard Henderson2023-12-291-1/+1
|/ | | | | Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20231221031652.119827-8-richard.henderson@linaro.org>
* Merge tag 'hppa64-fixes-pull-request' of ↵Stefan Hajnoczi2023-11-201-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://github.com/hdeller/qemu-hppa into staging HPPA64-PATCHES-for-8.2 Two patches for 8.2. The SHRPD patch fixes a real translation bug which then allows to boot the 64-bit Linux kernels of the Debian-11 and Debian-12 installation CDs. The second patch adds the instruction byte sequence to the assembly log. This is not an actual bug fix, but it's important since it helps a lot when trying to fix qemu translation bugs on hppa. # -----BEGIN PGP SIGNATURE----- # # iHUEABYKAB0WIQS86RI+GtKfB8BJu973ErUQojoPXwUCZVfHPwAKCRD3ErUQojoP # X3TrAQD2SfFsTWIYqTamh1ZHmydaJRL1xhXmPMqXgXFkDmiyhQD/VeyIyWEGj5Oe # x70WR8HrtkadsUddgSGzFRChaVb0/wI= # =Sapq # -----END PGP SIGNATURE----- # gpg: Signature made Fri 17 Nov 2023 15:04:15 EST # 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 'hppa64-fixes-pull-request' of https://github.com/hdeller/qemu-hppa: disas/hppa: Show hexcode of instruction along with disassembly target/hppa: Fix 64-bit SHRPD instruction Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * target/hppa: Fix 64-bit SHRPD instructionHelge Deller2023-11-171-2/+2
| | | | | | | | | | | | | | | | | | When shifting the two joined 64-bit registers right, shift the upper 64-bit register to the left and the lower 64-bit register to the right before merging them with OR. Signed-off-by: Helge Deller <deller@gmx.de> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
* | target/hppa: spelling fixes: Indicies, TruelyMichael Tokarev2023-11-152-2/+2
|/ | | | | | | Fixes: bb67ec32a0bb "target/hppa: Include PSW_P in tb flags and mmu index" Fixes: d7553f3591bb "target/hppa: Populate an interval tree with valid tlb entries" Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* target/hppa: Reduce TARGET_PHYS_ADDR_SPACE_BITS to 40Richard Henderson2023-11-132-18/+35
| | | | | | | | | This is the value that is supported by both PA-8500 and Astro. If we support a larger address space than expected, we trip up software that did not fill in all of the page table bits, expecting them to be ignored. Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/hppa: Replace MMU_PHYS_IDX with MMU_ABS_IDX, MMU_ABS_W_IDXRichard Henderson2023-11-133-36/+39
| | | | | | | | Align the language with pa2.0, separating absolute and physical. The translation from absolute to physical depends on PSW.W, and we prefer not to flush between changes, therefore use 2 mmu_idx. Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/hppa: Introduce MMU_IDX_MMU_DISABLEDRichard Henderson2023-11-133-11/+14
| | | | | | | Reduce the number of direct checks against MMU_PHYS_IDX. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/hppa: Fix possible overflow in TLB size calculationHelge Deller2023-11-131-2/+2
| | | | | | | | | | | | Coverty found that the shift of TARGET_PAGE_SIZE (32-bit type) might overflow. Fix it by casting TARGET_PAGE_SIZE to a 64-bit type before doing the shift (CID 1523902 and CID 1523908). Reported-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Helge Deller <deller@gmx.de> Message-Id: <ZU6F/H8CZr3q4pP/@p100> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/hppa: Fix calculation of CR_IIASQ back registerHelge Deller2023-11-131-1/+1
| | | | | | | | | Need to use iasq_b and iaoq_b to determine back register of CR_IIASQ. This fixes random faults when booting up Linux user space. Signed-off-by: Helge Deller <deller@gmx.de> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/hppa: Use PRIV_P_TO_MMU_IDX in helper_probeRichard Henderson2023-11-131-2/+3
| | | | | | | | | Direct privilege level to mmu_idx mapping has been false for some time. Provide the correct value to hppa_get_physical_address. Fixes: fa824d99f9b ("target/hppa: Switch to use MMU indices 11-15") Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/hppa: Use only low 2 immediate bits for PROBEIRichard Henderson2023-11-131-1/+1
| | | | | | | | During the conversion to decodetree, the 2-bit mask was lost. Fixes: deee69a19fd ("target/hppa: Convert memory management insns") Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/hppa: Mask reserved PSW bits in expand_sm_immHelge Deller2023-11-121-5/+8
| | | | | | | | | | | The system mask is a restricted subset of the psw, with only a couple of reserved bits. It is better to handle this up front in the translator than require helper_swap_system_mask to use cpu_hppa_get_psw and cpu_hppa_put_psw. Signed-off-by: Helge Deller <deller@gmx.de> [rth: Handle this in expand_sm_imm not helper_swap_system_mask.] Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target: Move ArchCPUClass definition to 'cpu.h'Philippe Mathieu-Daudé2023-11-072-16/+14
| | | | | | | | | | | | | The OBJECT_DECLARE_CPU_TYPE() macro forward-declares each ArchCPUClass type. These forward declarations are sufficient for code in hw/ to use the QOM definitions. No need to expose these structure definitions. Keep each local to their target/ by moving them to the corresponding "cpu.h" header. Suggested-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20231013140116.255-13-philmd@linaro.org>
* target: Mention 'cpu-qom.h' is target agnosticPhilippe Mathieu-Daudé2023-11-071-1/+1
| | | | | | | | | | "target/foo/cpu-qom.h" is supposed to be target agnostic (include-able by any target). Add such mention in the header. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20231013140116.255-3-philmd@linaro.org>
* target: Unify QOM stylePhilippe Mathieu-Daudé2023-11-072-4/+0
| | | | | | | | | | | | | | | | Enforce the style described by commit 067109a11c ("docs/devel: mention the spacing requirement for QOM"): The first declaration of a storage or class structure should always be the parent and leave a visual space between that declaration and the new code. It is also useful to separate backing for properties (options driven by the user) and internal state to make navigation easier. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Message-Id: <20231013140116.255-2-philmd@linaro.org>
* target/hppa: Improve interrupt loggingRichard Henderson2023-11-061-8/+4
| | | | Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/hppa: Update IIAOQ, IIASQ for pa2.0Richard Henderson2023-11-062-18/+38
| | | | | | These registers have a different format for pa2.0. Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/hppa: Create raise_exception_with_iorRichard Henderson2023-11-061-13/+51
| | | | | | Handle pa2.0 logic for filling in ISR+IOR. Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/hppa: Add unwind_breg to CPUHPPAStateRichard Henderson2023-11-063-2/+20
| | | | | | | | Fill in the insn_start value during form_gva, and copy it out to the env field in hppa_restore_state_to_opc. The value is not yet consumed. Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/hppa: Clear upper bits in mtctl for pa1.xHelge Deller2023-11-061-1/+7
| | | | | Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/hppa: Avoid async_safe_run_on_cpu on uniprocessor systemRichard Henderson2023-11-061-1/+7
| | | | Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/hppa: Add pa2.0 cpu local tlb flushesHelge Deller2023-11-065-12/+84
| | | | | | | | | | | | The previous decoding misnamed the bit it called "local". Other than the name, the implementation was correct for pa1.x. Rename this field to "tlbe". PA2.0 adds (a real) local bit to PxTLB, and also adds a range of pages to flush in GR[b]. Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/hppa: Implement pa2.0 data prefetch instructionsRichard Henderson2023-11-061-1/+9
| | | | | | | These are aliased onto the normal integer loads to %g0. Since we don't emulate caches, prefetch is a nop. Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/hppa: Return zero for r0 from load_gprRichard Henderson2023-11-061-3/+1
| | | | | Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/hppa: Precompute zero into DisasContextRichard Henderson2023-11-061-16/+18
| | | | | | | Reduce the number of times we look for the constant 0. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/hppa: Fix interruption based on default PSWHelge Deller2023-11-062-4/+16
| | | | | | | | | | The default PSW is set by the operating system with the PDC_PSW firmware call. Use that setting to decide if wide mode is to be enabled for interruptions and EIRR usage. Signed-off-by: Helge Deller <deller@gmx.de> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/hppa: Implement PERMHRichard Henderson2023-11-062-0/+31
| | | | Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/hppa: Implement MIXH, MIXWRichard Henderson2023-11-062-0/+60
| | | | Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/hppa: Implement HSHLADD, HSHRADDRichard Henderson2023-11-064-2/+76
| | | | Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/hppa: Implement HSHL, HSHRRichard Henderson2023-11-062-0/+40
| | | | Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/hppa: Implement HAVGRichard Henderson2023-11-064-0/+22
| | | | Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/hppa: Implement HSUBRichard Henderson2023-11-064-0/+53
| | | | Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/hppa: Implement HADDRichard Henderson2023-11-064-1/+79
| | | | Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/hppa: Replace tcg_gen_*_tl with tcg_gen_*_i64Richard Henderson2023-11-061-4/+4
| | | | Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/hppa: Use tcg_temp_new_i64 not tcg_temp_newRichard Henderson2023-11-061-80/+82
| | | | Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/hppa: Adjust vmstate_env for pa2.0 tlbRichard Henderson2023-11-061-37/+58
| | | | | | | | Split out the tlb to a subsection so that it can be separately versioned -- the format is only partially following the architecture and is partially guided by the qemu implementation. Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/hppa: Remove remaining TARGET_REGISTER_BITS redirectionsRichard Henderson2023-11-061-33/+13
| | | | | | | The conversions to/from i64 can be eliminated entirely, folding computation into adjacent operations. Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/hppa: Remove most of the TARGET_REGISTER_BITS redirectionsRichard Henderson2023-11-061-505/+407
| | | | | | Remove all but those intended to change type to or from i64. Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/hppa: Remove TARGET_REGISTER_BITSRichard Henderson2023-11-0611-299/+135
| | | | | | Rely only on TARGET_LONG_BITS, fixed at 64, and hppa_is_pa20. Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/hppa: Implement IDTLBT, IITLBTRichard Henderson2023-11-064-13/+100
| | | | | | | | Rename the existing insert tlb helpers to emphasize that they are for pa1.1 cpus. Implement a combined i/d tlb for pa2.0. Still missing is the new 'P' tlb bit. Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/hppa: Implement STDBYRichard Henderson2023-11-064-5/+213
| | | | Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/hppa: Implement CLRBTS, POPBTS, PUSHBTS, PUSHNOMRichard Henderson2023-11-062-0/+8
| | | | Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/hppa: Implement SHRPDRichard Henderson2023-11-062-32/+73
| | | | Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/hppa: Implement EXTRDRichard Henderson2023-11-062-13/+36
| | | | Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/hppa: Implement DEPD, DEPDIRichard Henderson2023-11-062-30/+69
| | | | Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/hppa: Implement LDD, LDCD, LDDA, STD, STDARichard Henderson2023-11-062-4/+15
| | | | Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/hppa: Decode ADDB double-wordRichard Henderson2023-11-061-0/+11
| | | | Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* target/hppa: Decode CMPIB double-wordRichard Henderson2023-11-062-3/+18
| | | | Signed-off-by: Richard Henderson <richard.henderson@linaro.org>