diff options
author | Leandro Lupori <leandro.lupori@eldorado.org.br> | 2021-11-29 15:57:51 -0300 |
---|---|---|
committer | Cédric Le Goater <clg@kaod.org> | 2021-11-29 21:00:08 +0100 |
commit | 7bf00dfb51566070960e0b7977e41abba96c130e (patch) | |
tree | 5bf295d2edf52f01636b3b2b230dec199362f4df /target/ppc/mmu-hash64.h | |
parent | a0fd8a5492240379a07c0b39c8dae3b8341b458f (diff) |
target/ppc: fix Hash64 MMU update of PTE bit R
When updating the R bit of a PTE, the Hash64 MMU was using a wrong byte
offset, causing the first byte of the adjacent PTE to be corrupted.
This caused a panic when booting FreeBSD, using the Hash MMU.
Fixes: a2dd4e83e76b ("ppc/hash64: Rework R and C bit updates")
Signed-off-by: Leandro Lupori <leandro.lupori@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'target/ppc/mmu-hash64.h')
-rw-r--r-- | target/ppc/mmu-hash64.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/target/ppc/mmu-hash64.h b/target/ppc/mmu-hash64.h index c5b2f97ff7..1496955d38 100644 --- a/target/ppc/mmu-hash64.h +++ b/target/ppc/mmu-hash64.h @@ -97,6 +97,11 @@ void ppc_hash64_finalize(PowerPCCPU *cpu); #define HPTE64_V_1TB_SEG 0x4000000000000000ULL #define HPTE64_V_VRMA_MASK 0x4001ffffff000000ULL +/* PTE offsets */ +#define HPTE64_DW1 (HASH_PTE_SIZE_64 / 2) +#define HPTE64_DW1_R (HPTE64_DW1 + 6) +#define HPTE64_DW1_C (HPTE64_DW1 + 7) + /* Format changes for ARCH v3 */ #define HPTE64_V_COMMON_BITS 0x000fffffffffffffULL #define HPTE64_R_3_0_SSIZE_SHIFT 58 |