mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
target/ppc: Add Power11 DD2.0 processor
Add CPU target code to add support for new Power11 Processor. Power11 core is same as Power10, hence reuse functions defined for Power10. Reviewed-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Aditya Gupta <adityag@linux.ibm.com> Tested-by: Amit Machhiwal <amachhiw@linux.ibm.com> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
This commit is contained in:
parent
ac0fbbb2d0
commit
c0d964076c
7 changed files with 86 additions and 0 deletions
|
@ -6675,6 +6675,66 @@ POWERPC_FAMILY(POWER10)(ObjectClass *oc, void *data)
|
|||
pcc->l1_icache_size = 0x8000;
|
||||
}
|
||||
|
||||
static void init_proc_POWER11(CPUPPCState *env)
|
||||
{
|
||||
init_proc_POWER10(env);
|
||||
}
|
||||
|
||||
static bool ppc_pvr_match_power11(PowerPCCPUClass *pcc, uint32_t pvr, bool best)
|
||||
{
|
||||
uint32_t base = pvr & CPU_POWERPC_POWER_SERVER_MASK;
|
||||
uint32_t pcc_base = pcc->pvr & CPU_POWERPC_POWER_SERVER_MASK;
|
||||
|
||||
if (!best && (base == CPU_POWERPC_POWER11_BASE)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (base != pcc_base) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((pvr & 0x0f00) == (pcc->pvr & 0x0f00)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
POWERPC_FAMILY(POWER11)(ObjectClass *oc, void *data)
|
||||
{
|
||||
DeviceClass *dc = DEVICE_CLASS(oc);
|
||||
PowerPCCPUClass *pcc = POWERPC_CPU_CLASS(oc);
|
||||
|
||||
dc->fw_name = "PowerPC,POWER11";
|
||||
dc->desc = "POWER11";
|
||||
pcc->spapr_logical_pvr = CPU_POWERPC_LOGICAL_3_10_P11;
|
||||
pcc->pvr_match = ppc_pvr_match_power11;
|
||||
pcc->pcr_mask = PPC_PCR_MASK_POWER11;
|
||||
pcc->pcr_supported = PPC_PCR_SUPPORTED_POWER11;
|
||||
pcc->init_proc = init_proc_POWER11;
|
||||
pcc->check_pow = check_pow_nocheck;
|
||||
pcc->check_attn = check_attn_hid0_power9;
|
||||
pcc->insns_flags = PPC_INSNS_FLAGS_POWER11;
|
||||
pcc->insns_flags2 = PPC_INSNS_FLAGS2_POWER11;
|
||||
pcc->msr_mask = PPC_MSR_MASK_POWER11;
|
||||
pcc->lpcr_mask = PPC_LPCR_MASK_POWER11;
|
||||
|
||||
pcc->lpcr_pm = LPCR_PDEE | LPCR_HDEE | LPCR_EEE | LPCR_DEE | LPCR_OEE;
|
||||
pcc->mmu_model = POWERPC_MMU_3_00;
|
||||
#if !defined(CONFIG_USER_ONLY)
|
||||
/* segment page size remain the same */
|
||||
pcc->hash64_opts = &ppc_hash64_opts_POWER7;
|
||||
pcc->radix_page_info = &POWER10_radix_page_info;
|
||||
pcc->lrg_decr_bits = 56;
|
||||
#endif
|
||||
pcc->excp_model = POWERPC_EXCP_POWER11;
|
||||
pcc->bus_model = PPC_FLAGS_INPUT_POWER9;
|
||||
pcc->bfd_mach = bfd_mach_ppc64;
|
||||
pcc->flags = POWERPC_FLAGS_POWER11;
|
||||
pcc->l1_dcache_size = 0x8000;
|
||||
pcc->l1_icache_size = 0x8000;
|
||||
}
|
||||
|
||||
#if !defined(CONFIG_USER_ONLY)
|
||||
void cpu_ppc_set_vhyp(PowerPCCPU *cpu, PPCVirtualHypervisor *vhyp)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue