mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
Support 1T segments on ppc
Traditionally, the "segments" used for the two-stage translation used on powerpc MMUs were 256MB in size. This was the only option on all hash page table based 32-bit powerpc cpus, and on the earlier 64-bit hash page table based cpus. However, newer 64-bit cpus also permit 1TB segments This patch adds support for 1TB segment translation to the qemu code. Signed-off-by: David Gibson <dwg@au1.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
256cebe5d1
commit
cdaee00633
2 changed files with 45 additions and 12 deletions
|
@ -114,6 +114,7 @@ enum powerpc_mmu_t {
|
|||
POWERPC_MMU_601 = 0x0000000A,
|
||||
#if defined(TARGET_PPC64)
|
||||
#define POWERPC_MMU_64 0x00010000
|
||||
#define POWERPC_MMU_1TSEG 0x00020000
|
||||
/* 64 bits PowerPC MMU */
|
||||
POWERPC_MMU_64B = POWERPC_MMU_64 | 0x00000001,
|
||||
/* 620 variant (no segment exceptions) */
|
||||
|
@ -382,9 +383,11 @@ struct ppc_slb_t {
|
|||
|
||||
/* Bits in the SLB VSID word */
|
||||
#define SLB_VSID_SHIFT 12
|
||||
#define SLB_VSID_SHIFT_1T 24
|
||||
#define SLB_VSID_SSIZE_SHIFT 62
|
||||
#define SLB_VSID_B 0xc000000000000000ULL
|
||||
#define SLB_VSID_B_256M 0x0000000000000000ULL
|
||||
#define SLB_VSID_B_1T 0x4000000000000000ULL
|
||||
#define SLB_VSID_VSID 0x3FFFFFFFFFFFF000ULL
|
||||
#define SLB_VSID_PTEM (SLB_VSID_B | SLB_VSID_VSID)
|
||||
#define SLB_VSID_KS 0x0000000000000800ULL
|
||||
|
@ -398,6 +401,10 @@ struct ppc_slb_t {
|
|||
#define SEGMENT_SHIFT_256M 28
|
||||
#define SEGMENT_MASK_256M (~((1ULL << SEGMENT_SHIFT_256M) - 1))
|
||||
|
||||
#define SEGMENT_SHIFT_1T 40
|
||||
#define SEGMENT_MASK_1T (~((1ULL << SEGMENT_SHIFT_1T) - 1))
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Machine state register bits definition */
|
||||
#define MSR_SF 63 /* Sixty-four-bit mode hflags */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue