[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 13/18] ppc/pnv: Implement big-core PVR for Power9/10
From: |
Nicholas Piggin |
Subject: |
[PATCH 13/18] ppc/pnv: Implement big-core PVR for Power9/10 |
Date: |
Fri, 12 Jul 2024 00:18:45 +1000 |
Power9/10 CPUs have PVR[51] set in small-core mode and clear in big-core
mode. This is used by skiboot firmware.
PVR is not hypervisor-privileged but it is not so important that spapr
to implement this because it's generally masked out of PVR matching code
in kernels, and only used by firmware.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
hw/ppc/pnv_core.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/hw/ppc/pnv_core.c b/hw/ppc/pnv_core.c
index 16d40392db..a96ec4e2b9 100644
--- a/hw/ppc/pnv_core.c
+++ b/hw/ppc/pnv_core.c
@@ -58,6 +58,10 @@ static void pnv_core_cpu_reset(PnvCore *pc, PowerPCCPU *cpu)
env->nip = 0x10;
env->msr |= MSR_HVB; /* Hypervisor mode */
env->spr[SPR_HRMOR] = pc->hrmor;
+ if (pc->big_core) {
+ /* Clear "small core" bit on Power9/10 (this is set in default PVR) */
+ env->spr[SPR_PVR] &= ~PPC_BIT(51);
+ }
hreg_compute_hflags(env);
ppc_maybe_interrupt(env);
--
2.45.1
- [PATCH 07/18] ppc/pnv: Extend chip_pir class method to TIR as well, (continued)
- [PATCH 07/18] ppc/pnv: Extend chip_pir class method to TIR as well, Nicholas Piggin, 2024/07/11
- [PATCH 08/18] ppc: Add a core_index to CPUPPCState for SMT vCPUs, Nicholas Piggin, 2024/07/11
- [PATCH 10/18] ppc: Add has_smt_siblings property to CPUPPCState, Nicholas Piggin, 2024/07/11
- [PATCH 11/18] ppc/pnv: Add a big-core mode that joins two regular cores, Nicholas Piggin, 2024/07/11
- [PATCH 12/18] ppc/pnv: Add allow for big-core differences in DT generation, Nicholas Piggin, 2024/07/11
- [PATCH 09/18] target/ppc: Add helpers to check for SMT sibling threads, Nicholas Piggin, 2024/07/11
- [PATCH 13/18] ppc/pnv: Implement big-core PVR for Power9/10,
Nicholas Piggin <=
- [PATCH 14/18] ppc/pnv: Implement Power9 CPU core thread state indirect register, Nicholas Piggin, 2024/07/11
- [PATCH 15/18] ppc/pnv: Add POWER10 ChipTOD quirk for big-core, Nicholas Piggin, 2024/07/11
- [PATCH 16/18] ppc/pnv: Add big-core machine property, Nicholas Piggin, 2024/07/11
- [PATCH 18/18] ppc/pnv: Add an LPAR per core machine option, Nicholas Piggin, 2024/07/11
- [PATCH 17/18] ppc/pnv: Implement POWER10 PC xscom registers for direct controls, Nicholas Piggin, 2024/07/11
- Re: [PATCH 00/18] ppc/pnv: Better big-core model, lpar-per-core, PC unit, Cédric Le Goater, 2024/07/11