[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 16/22] PPC: Disable non-440 CPUs for ppcemb target
From: |
Alexander Graf |
Subject: |
[Qemu-devel] [PATCH 16/22] PPC: Disable non-440 CPUs for ppcemb target |
Date: |
Sun, 30 Oct 2011 21:23:07 +0100 |
The sole reason we have the ppcemb target is to support MMUs that have
less than the usual 4k possible page size. There are very few of these
chips and I don't want to add additional QA and testing burden to everyone
to ensure that code still works when TARGET_PAGE_SIZE is not 4k.
So this patch disables all CPUs except for MMU_BOOKE capable ones from
the ppcemb target.
Signed-off-by: Alexander Graf <address@hidden>
---
target-ppc/translate_init.c | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
index 7de097d..f0ae1d1 100644
--- a/target-ppc/translate_init.c
+++ b/target-ppc/translate_init.c
@@ -10047,11 +10047,27 @@ int cpu_ppc_register_internal (CPUPPCState *env,
const ppc_def_t *def)
return 0;
}
+static bool ppc_cpu_usable(const ppc_def_t *def)
+{
+#if defined(TARGET_PPCEMB)
+ /* When using the ppcemb target, we only support 440 style cores */
+ if (def->mmu_model != POWERPC_MMU_BOOKE) {
+ return false;
+ }
+#endif
+
+ return true;
+}
+
const ppc_def_t *ppc_find_by_pvr(uint32_t pvr)
{
int i;
for (i = 0; i < ARRAY_SIZE(ppc_defs); i++) {
+ if (!ppc_cpu_usable(&ppc_defs[i])) {
+ continue;
+ }
+
/* If we have an exact match, we're done */
if (pvr == ppc_defs[i].pvr) {
return &ppc_defs[i];
@@ -10091,6 +10107,10 @@ const ppc_def_t *cpu_ppc_find_by_name (const char
*name)
ret = NULL;
max = ARRAY_SIZE(ppc_defs);
for (i = 0; i < max; i++) {
+ if (!ppc_cpu_usable(&ppc_defs[i])) {
+ continue;
+ }
+
if (strcasecmp(name, ppc_defs[i].name) == 0) {
ret = &ppc_defs[i];
break;
@@ -10106,6 +10126,10 @@ void ppc_cpu_list (FILE *f, fprintf_function
cpu_fprintf)
max = ARRAY_SIZE(ppc_defs);
for (i = 0; i < max; i++) {
+ if (!ppc_cpu_usable(&ppc_defs[i])) {
+ continue;
+ }
+
(*cpu_fprintf)(f, "PowerPC %-16s PVR %08x\n",
ppc_defs[i].name, ppc_defs[i].pvr);
}
--
1.6.0.2
- [Qemu-devel] [PATCH 18/22] PPC: Fail configure when libfdt is not available, (continued)
- [Qemu-devel] [PATCH 18/22] PPC: Fail configure when libfdt is not available, Alexander Graf, 2011/10/30
- [Qemu-devel] [PATCH 17/22] ppc: Avoid decrementer related kvm exits, Alexander Graf, 2011/10/30
- [Qemu-devel] [PATCH 11/22] ppc: Remove broken partial PVR matching, Alexander Graf, 2011/10/30
- [Qemu-devel] [PATCH 21/22] KVM: PPC: Override host vmx/vsx/dfp only when information known, Alexander Graf, 2011/10/30
- [Qemu-devel] [PATCH 14/22] pseries: Under kvm use guest cpu = host cpu by default, Alexander Graf, 2011/10/30
- [Qemu-devel] [PATCH 08/22] ppc: Generalize the kvmppc_get_clockfreq() function, Alexander Graf, 2011/10/30
- [Qemu-devel] [PATCH 22/22] pseries: Allow writes to KVM accelerated TCE table, Alexander Graf, 2011/10/30
- [Qemu-devel] [PATCH 12/22] ppc: First cut implementation of -cpu host, Alexander Graf, 2011/10/30
- [Qemu-devel] [PATCH 19/22] pseries: Correct vmx/dfp handling in both KVM and TCG cases, Alexander Graf, 2011/10/30
- [Qemu-devel] [PATCH 20/22] ppc: Fix up usermode only builds, Alexander Graf, 2011/10/30
- [Qemu-devel] [PATCH 16/22] PPC: Disable non-440 CPUs for ppcemb target,
Alexander Graf <=
- [Qemu-devel] [PATCH 10/22] pseries: Update SLOF firmware image, Alexander Graf, 2011/10/30
- [Qemu-devel] [PATCH 23/22] ppc: Alter CPU state to mask out TCG unimplemented instructions as appropriate, Alexander Graf, 2011/10/31
- [Qemu-devel] [PATCH 24/22] pseries: Add partial support for PCI, Alexander Graf, 2011/10/31
- Re: [Qemu-devel] [PULL 00/22] ppc patch queue 2011-10-30, Alexander Graf, 2011/10/31