1 #ifndef _ASM_POWERPC_MMU_HASH32_H_
2 #define _ASM_POWERPC_MMU_HASH32_H_
4 * 32-bit hash table MMU support
11 /* Block size masks */
25 /* BAT Access Protection */
26 #define BPP_XX 0x00 /* No access */
27 #define BPP_RX 0x01 /* Read only */
28 #define BPP_RW 0x02 /* Read/write */
31 /* Contort a phys_addr_t into the right format/bits for a BAT */
32 #ifdef CONFIG_PHYS_64BIT
33 #define BAT_PHYS_ADDR(x) ((u32)((x & 0x00000000fffe0000ULL) | \
34 ((x & 0x0000000e00000000ULL) >> 24) | \
35 ((x & 0x0000000100000000ULL) >> 30)))
37 #define BAT_PHYS_ADDR(x) (x)
44 #endif /* !__ASSEMBLY__ */
50 /* Values for PP (assumes Ks=0, Kp=1) */
51 #define PP_RWXX 0 /* Supervisor read/write, User none */
52 #define PP_RWRX 1 /* Supervisor read/write, User read */
53 #define PP_RWRW 2 /* Supervisor read/write, User read/write */
54 #define PP_RXRX 3 /* Supervisor read, User read */
59 * Hardware Page Table Entry
60 * Note that the xpn and x bitfields are used only by processors that
61 * support extended addressing; otherwise, those bits are reserved.
64 unsigned long v
:1; /* Entry is valid */
65 unsigned long vsid
:24; /* Virtual segment identifier */
66 unsigned long h
:1; /* Hash algorithm indicator */
67 unsigned long api
:6; /* Abbreviated page index */
68 unsigned long rpn
:20; /* Real (physical) page number */
69 unsigned long xpn
:3; /* Real page number bits 0-2, optional */
70 unsigned long r
:1; /* Referenced */
71 unsigned long c
:1; /* Changed */
72 unsigned long w
:1; /* Write-thru cache mode */
73 unsigned long i
:1; /* Cache inhibited */
74 unsigned long m
:1; /* Memory coherence */
75 unsigned long g
:1; /* Guarded */
76 unsigned long x
:1; /* Real page number bit 3, optional */
77 unsigned long pp
:2; /* Page protection */
82 unsigned long vdso_base
;
85 #endif /* !__ASSEMBLY__ */
87 /* We happily ignore the smaller BATs on 601, we don't actually use
88 * those definitions on hash32 at the moment anyway
90 #define mmu_virtual_psize MMU_PAGE_4K
91 #define mmu_linear_psize MMU_PAGE_256M
93 #endif /* _ASM_POWERPC_MMU_HASH32_H_ */