ppc32: Support 36-bit physical addressing on e500
PATCH 35/198 ppc32: Support 36-bit physical addressing on e500
From: Kumar Gala <[email protected]>
To add support for 36-bit physical addressing on e500 the following changes have been made. The changes are generalized to support any physical address size larger than 32-bits:
* Allow FSL Book-E parts to use a 64-bit PTE, it is 44-bits of pfn, 20-bits of flags.
* Introduced new CPU feature (CPU_FTR_BIG_PHYS) to allow runtime handling of updating hardware register (SPRN_MAS7) which holds the upper 32-bits of physical address that will be written into the TLB. This is useful since not all e500 cores support 36-bit physical addressing.
* Currently have a pass through implementation of fixup_bigphys_addr
* Moved _PAGE_DIRTY in the 64-bit PTE case to free room for three additional storage attributes that may exist in future FSL Book-E cores and updated fault handler to copy these bits into the hardware TLBs.
---
25-akpm/arch/ppc/Kconfig | 16 +++- 25-akpm/arch/ppc/kernel/head_fsl_booke.S | 113 ++++++++++++++++++++----------- 25-akpm/arch/ppc/syslib/ppc85xx_common.c | 8 ++ 25-akpm/include/asm-ppc/cputable.h | 3 25-akpm/include/asm-ppc/pgtable.h | 45 +++++++----- 25-akpm/include/asm-ppc/reg_booke.h | 1 6 files changed, 123 insertions(+), 63 deletions(-)
arch/ppc/Kconfig renamed from arch/ppc/Kconfig~ppc32-support-36-bit-physical-addressing-on-e500 +11 -5
@@ -98,13 +98,19 @@ config FSL_BOOKE config PTE_64BIT bool - depends on 44x - default y + depends on 44x || E500 + default y if 44x + default y if E500 && PHYS_64BIT config PHYS_64BIT - bool - depends on 44x - default y + bool 'Large physical address support' if E500 + depends on 44x || E500 + default y if 44x + ---help--- + This option enables kernel support for larger than 32-bit physical + addresses. This features is not be available on all e500 cores. + + If in doubt, say N here. config ALTIVEC bool "AltiVec Support"
arch/ppc/kernel/head_fsl_booke.S renamed from arch/ppc/kernel/head_fsl_booke.S~ppc32-support-36-bit-physical-addressing-on-e500 +73 -40
176 lines not on this page · raw message
arch/ppc/syslib/ppc85xx_common.c renamed from arch/ppc/syslib/ppc85xx_common.c~ppc32-support-36-bit-physical-addressing-on-e500 +8 -0
@@ -31,3 +31,11 @@ get_ccsrbar(void) }EXPORT_SYMBOL (get_ccsrbar); + +/* For now this is a pass through */ +phys_addr_t fixup_bigphys_addr (phys_addr_t addr,phys_addr_t size) +{ +return addr; +}; +EXPORT_SYMBOL (fixup_bigphys_addr); +
include/asm-ppc/cputable.h renamed from include/asm-ppc/cputable.h~ppc32-support-36-bit-physical-addressing-on-e500 +2 -1
@@ -86,8 +86,9 @@ static inline unsigned int cpu_has_featu#define CPU_FTR_DUAL_PLL_750FX 0x00004000#define CPU_FTR_NO_DPM 0x00008000#define CPU_FTR_HAS_HIGH_BATS 0x00010000 -#define CPU_FTR_NEED_COHERENT 0x00020000 +#define CPU_FTR_NEED_COHERENT 0x00020000#define CPU_FTR_NO_BTIC 0x00040000 +#define CPU_FTR_BIG_PHYS 0x00080000#ifdef __ASSEMBLY__
include/asm-ppc/pgtable.h renamed from include/asm-ppc/pgtable.h~ppc32-support-36-bit-physical-addressing-on-e500 +28 -17
64 lines not on this page · raw message
include/asm-ppc/reg_booke.h renamed from include/asm-ppc/reg_booke.h~ppc32-support-36-bit-physical-addressing-on-e500 +1 -0
@@ -172,6 +172,7 @@ do { \#define SPRN_MAS4 0x274/* MMU Assist Register 4 */ #define SPRN_MAS5 0x275/* MMU Assist Register 5 */ #define SPRN_MAS6 0x276/* MMU Assist Register 6 */ +#define SPRN_MAS7 0x3b0/* MMU Assist Register 7 */ #define SPRN_PID1 0x279/* Process ID Register 1 */ #define SPRN_PID2 0x27A/* Process ID Register 2 */ #define SPRN_TLB0CFG 0x2B0/* TLB 0 Config Register */
_