[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 13/19] ppc/pnv: Implement Power9 CPU core thread state indirec
From: |
Nicholas Piggin |
Subject: |
[PATCH v3 13/19] ppc/pnv: Implement Power9 CPU core thread state indirect register |
Date: |
Wed, 17 Jul 2024 02:26:09 +1000 |
Power9 CPUs have a core thread state register accessible via SPRC/SPRD
indirect registers. This register includes a bit for big-core mode,
which skiboot requires.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
target/ppc/misc_helper.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/target/ppc/misc_helper.c b/target/ppc/misc_helper.c
index 692e48e6bc..e69236d2de 100644
--- a/target/ppc/misc_helper.c
+++ b/target/ppc/misc_helper.c
@@ -319,6 +319,23 @@ target_ulong helper_load_sprd(CPUPPCState *env)
case 0: /* SCRATCH0-3 */
case 1: /* SCRATCH4-7 */
return pc->scratch[(sprc >> 3) & 0x7];
+
+ case 0x1e0: /* core thread state */
+ if (env->excp_model == POWERPC_EXCP_POWER9) {
+ /*
+ * Only implement for POWER9 because skiboot uses it to check
+ * big-core mode. Other bits are unimplemented so we would
+ * prefer to get unimplemented message on POWER10 if it were
+ * used anywhere.
+ */
+ if (pc->big_core) {
+ return PPC_BIT(63);
+ } else {
+ return 0;
+ }
+ }
+ /* fallthru */
+
default:
qemu_log_mask(LOG_UNIMP, "mfSPRD: Unimplemented SPRC:0x"
TARGET_FMT_lx"\n", sprc);
--
2.45.1
- [PATCH v3 03/19] ppc/pnv: Move timebase state into PnvCore, (continued)
- [PATCH v3 03/19] ppc/pnv: Move timebase state into PnvCore, Nicholas Piggin, 2024/07/16
- [PATCH v3 05/19] ppc/pnv: use class attribute to limit SMT threads for different machines, Nicholas Piggin, 2024/07/16
- [PATCH v3 11/19] ppc/pnv: Add allow for big-core differences in DT generation, Nicholas Piggin, 2024/07/16
- [PATCH v3 06/19] ppc/pnv: Extend chip_pir class method to TIR as well, Nicholas Piggin, 2024/07/16
- [PATCH v3 07/19] ppc: Add a core_index to CPUPPCState for SMT vCPUs, Nicholas Piggin, 2024/07/16
- [PATCH v3 10/19] ppc/pnv: Add a big-core mode that joins two regular cores, Nicholas Piggin, 2024/07/16
- [PATCH v3 09/19] ppc: Add has_smt_siblings property to CPUPPCState, Nicholas Piggin, 2024/07/16
- [PATCH v3 08/19] target/ppc: Add helpers to check for SMT sibling threads, Nicholas Piggin, 2024/07/16
- [PATCH v3 12/19] ppc/pnv: Implement big-core PVR for Power9/10, Nicholas Piggin, 2024/07/16
- [PATCH v3 13/19] ppc/pnv: Implement Power9 CPU core thread state indirect register,
Nicholas Piggin <=
- [PATCH v3 14/19] ppc/pnv: Add POWER10 ChipTOD quirk for big-core, Nicholas Piggin, 2024/07/16
- [PATCH v3 15/19] ppc/pnv: Add big-core machine property, Nicholas Piggin, 2024/07/16
- [PATCH v3 18/19] ppc/pnv: Implement POWER10 PC xscom registers for direct controls, Nicholas Piggin, 2024/07/16
- [PATCH v3 16/19] system/cpus: Add cpu_pause() function, Nicholas Piggin, 2024/07/16
- [PATCH v3 17/19] ppc/pnv: Add a CPU nmi and resume function, Nicholas Piggin, 2024/07/16
- [PATCH v3 19/19] ppc/pnv: Add an LPAR per core machine option, Nicholas Piggin, 2024/07/16