[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 17/32] target-ppc: Add support for POWER8 pvr 0x4D0000
From: |
Alexander Graf |
Subject: |
[Qemu-ppc] [PULL 17/32] target-ppc: Add support for POWER8 pvr 0x4D0000 |
Date: |
Fri, 27 Jun 2014 13:52:09 +0200 |
From: Alexey Kardashevskiy <address@hidden>
At the moment QEMU knows about one version of POWER8 CPU with
PVR 0x4B.0000. This CPU class is defined as "POWER8". The linux
kernel names it as "POWER8E" which is different from the name QEMU uses.
Now we get another version of POWER8 which is architecturally equivalent
to POWER8E but has different PVR 0x4D.0000 so QEMU fails to find
a PPC CPU class on these machines. The linux kernel names these CPUs as
"POWER8".
This renames the existing "POWER8" to "POWER8E" to be more precise and
stay in sync with the linux kernel.
This adds a new "POWER8" family which calls POWER8E class init function
and defines own PVR mask (used to match a CPU class) and desc (used to
create dynamic version-less CPU class).
This does not change CPU class fw_name attribute as the host POWER8
firmware keeps using "PowerPC,POWER8" on both POWER8 and POWER8E.
Signed-off-by: Alexey Kardashevskiy <address@hidden>
Signed-off-by: Alexander Graf <address@hidden>
---
target-ppc/cpu-models.c | 3 +++
target-ppc/cpu-models.h | 7 +++++--
target-ppc/translate_init.c | 20 ++++++++++++++++----
3 files changed, 24 insertions(+), 6 deletions(-)
diff --git a/target-ppc/cpu-models.c b/target-ppc/cpu-models.c
index 97a81d8..9a91af9 100644
--- a/target-ppc/cpu-models.c
+++ b/target-ppc/cpu-models.c
@@ -1138,6 +1138,8 @@
"POWER7 v2.3")
POWERPC_DEF("POWER7+_v2.1", CPU_POWERPC_POWER7P_v21, POWER7P,
"POWER7+ v2.1")
+ POWERPC_DEF("POWER8E_v1.0", CPU_POWERPC_POWER8E_v10, POWER8E,
+ "POWER8E v1.0")
POWERPC_DEF("POWER8_v1.0", CPU_POWERPC_POWER8_v10, POWER8,
"POWER8 v1.0")
POWERPC_DEF("970", CPU_POWERPC_970, 970,
@@ -1386,6 +1388,7 @@ PowerPCCPUAlias ppc_cpu_aliases[] = {
{ "POWER5gs", "POWER5+" },
{ "POWER7", "POWER7_v2.3" },
{ "POWER7+", "POWER7+_v2.1" },
+ { "POWER8E", "POWER8E_v1.0" },
{ "POWER8", "POWER8_v1.0" },
{ "970fx", "970fx_v3.1" },
{ "970mp", "970mp_v1.1" },
diff --git a/target-ppc/cpu-models.h b/target-ppc/cpu-models.h
index db75896..c39d03a 100644
--- a/target-ppc/cpu-models.h
+++ b/target-ppc/cpu-models.h
@@ -559,9 +559,12 @@ enum {
CPU_POWERPC_POWER7P_BASE = 0x004A0000,
CPU_POWERPC_POWER7P_MASK = 0xFFFF0000,
CPU_POWERPC_POWER7P_v21 = 0x004A0201,
- CPU_POWERPC_POWER8_BASE = 0x004B0000,
+ CPU_POWERPC_POWER8E_BASE = 0x004B0000,
+ CPU_POWERPC_POWER8E_MASK = 0xFFFF0000,
+ CPU_POWERPC_POWER8E_v10 = 0x004B0100,
+ CPU_POWERPC_POWER8_BASE = 0x004D0000,
CPU_POWERPC_POWER8_MASK = 0xFFFF0000,
- CPU_POWERPC_POWER8_v10 = 0x004B0100,
+ CPU_POWERPC_POWER8_v10 = 0x004D0100,
CPU_POWERPC_970 = 0x00390202,
CPU_POWERPC_970FX_v10 = 0x00391100,
CPU_POWERPC_970FX_v20 = 0x003C0200,
diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
index 594f7ac..a3bb336 100644
--- a/target-ppc/translate_init.c
+++ b/target-ppc/translate_init.c
@@ -8189,16 +8189,16 @@ static void init_proc_POWER8(CPUPPCState *env)
init_proc_book3s_64(env, BOOK3S_CPU_POWER8);
}
-POWERPC_FAMILY(POWER8)(ObjectClass *oc, void *data)
+POWERPC_FAMILY(POWER8E)(ObjectClass *oc, void *data)
{
DeviceClass *dc = DEVICE_CLASS(oc);
PowerPCCPUClass *pcc = POWERPC_CPU_CLASS(oc);
dc->fw_name = "PowerPC,POWER8";
- dc->desc = "POWER8";
+ dc->desc = "POWER8E";
dc->props = powerpc_servercpu_properties;
- pcc->pvr = CPU_POWERPC_POWER8_BASE;
- pcc->pvr_mask = CPU_POWERPC_POWER8_MASK;
+ pcc->pvr = CPU_POWERPC_POWER8E_BASE;
+ pcc->pvr_mask = CPU_POWERPC_POWER8E_MASK;
pcc->pcr_mask = PCR_COMPAT_2_05 | PCR_COMPAT_2_06;
pcc->init_proc = init_proc_POWER8;
pcc->check_pow = check_pow_nocheck;
@@ -8252,6 +8252,18 @@ POWERPC_FAMILY(POWER8)(ObjectClass *oc, void *data)
pcc->l1_icache_size = 0x8000;
pcc->interrupts_big_endian = ppc_cpu_interrupts_big_endian_lpcr;
}
+
+POWERPC_FAMILY(POWER8)(ObjectClass *oc, void *data)
+{
+ DeviceClass *dc = DEVICE_CLASS(oc);
+ PowerPCCPUClass *pcc = POWERPC_CPU_CLASS(oc);
+
+ ppc_POWER8E_cpu_family_class_init(oc, data);
+
+ dc->desc = "POWER8";
+ pcc->pvr = CPU_POWERPC_POWER8_BASE;
+ pcc->pvr_mask = CPU_POWERPC_POWER8_MASK;
+}
#endif /* defined (TARGET_PPC64) */
--
1.8.1.4
- [Qemu-ppc] [PULL 00/32] ppc patch queue 2014-06-27, Alexander Graf, 2014/06/27
- [Qemu-ppc] [PULL 11/32] spapr_pci_vfio: Add spapr-pci-vfio-host-bridge to support vfio, Alexander Graf, 2014/06/27
- [Qemu-ppc] [PULL 13/32] target-ppc: Remove unused IMM and d extract helpers, Alexander Graf, 2014/06/27
- [Qemu-ppc] [PULL 12/32] vfio: Enable for SPAPR, Alexander Graf, 2014/06/27
- [Qemu-ppc] [PULL 01/32] linux-user: Correct AUXV Cache Line Sizes for PowerPC, Alexander Graf, 2014/06/27
- [Qemu-ppc] [PULL 14/32] target-ppc: Remove unused gen_qemu_ld8s(), Alexander Graf, 2014/06/27
- [Qemu-ppc] [PULL 09/32] spapr_iommu: Make in-kernel TCE table optional, Alexander Graf, 2014/06/27
- [Qemu-ppc] [PULL 17/32] target-ppc: Add support for POWER8 pvr 0x4D0000,
Alexander Graf <=
- [Qemu-ppc] [PULL 03/32] linux-user: Identify Addition Hardware Capabilities for PowerPC, Alexander Graf, 2014/06/27
- [Qemu-ppc] [PULL 08/32] spapr: Fix RTAS token numbers, Alexander Graf, 2014/06/27
- [Qemu-ppc] [PULL 18/32] spapr: Fix code design style (s/SPAPRMachine/sPAPRMachineState), Alexander Graf, 2014/06/27
- [Qemu-ppc] [PULL 02/32] target-ppc: Add DFP to Emulated Instructions Flag, Alexander Graf, 2014/06/27
- [Qemu-ppc] [PULL 05/32] spapr: Add "qemu, boot-menu" property to /chosen, Alexander Graf, 2014/06/27
- [Qemu-ppc] [PULL 15/32] mac99: Add motherboard devices before PCI cards, Alexander Graf, 2014/06/27
- [Qemu-ppc] [PULL 07/32] PPC: Add support for Apple gdb in gdbstub, Alexander Graf, 2014/06/27
- [Qemu-ppc] [PULL 04/32] linux-user: Support HWCAP2 in PowerPC, Alexander Graf, 2014/06/27
- [Qemu-ppc] [PULL 19/32] spapr: Define a 2.1 pseries machine, Alexander Graf, 2014/06/27
- [Qemu-ppc] [PULL 22/32] spapr: Add RTAS sysparm UUID, Alexander Graf, 2014/06/27