qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-ppc] [PATCH 03/10] PPC: Add stub emulation for HDBCR0


From: Alexander Graf
Subject: [Qemu-ppc] [PATCH 03/10] PPC: Add stub emulation for HDBCR0
Date: Mon, 20 Jan 2014 00:44:30 +0100

The HDBCR0 register is available for hardware debuggers which we don't
emulate.

However, we can treat it as a generic storage register that doesn't
have any effect, making guests happy.

Signed-off-by: Alexander Graf <address@hidden>
---
 target-ppc/cpu.h            | 1 +
 target-ppc/translate_init.c | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h
index 70708d4..1289e13 100644
--- a/target-ppc/cpu.h
+++ b/target-ppc/cpu.h
@@ -1597,6 +1597,7 @@ static inline int cpu_mmu_index (CPUPPCState *env)
 #define SPR_403_VTBL          (0x3CC)
 #define SPR_403_VTBU          (0x3CD)
 #define SPR_DMISS             (0x3D0)
+#define SPR_Exxx_HDBCR0       (0x3D0)
 #define SPR_DCMP              (0x3D1)
 #define SPR_HASH1             (0x3D2)
 #define SPR_HASH2             (0x3D3)
diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
index 35470d4..37a0ed2 100644
--- a/target-ppc/translate_init.c
+++ b/target-ppc/translate_init.c
@@ -4581,6 +4581,10 @@ static void init_proc_e500 (CPUPPCState *env, int 
version)
                  SPR_NOACCESS, SPR_NOACCESS,
                  &spr_read_generic, SPR_NOACCESS,
                  0x00000000);
+    spr_register(env, SPR_Exxx_HDBCR0, "HDBCR0",
+                 SPR_NOACCESS, SPR_NOACCESS,
+                 &spr_read_generic, &spr_write_generic,
+                 0x00000000);
     /* XXX better abstract into Emb.xxx features */
     if (version == fsl_e5500) {
         spr_register(env, SPR_BOOKE_EPCR, "EPCR",
-- 
1.8.1.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]