summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/include/pte.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/powerpc/include/pte.h')
-rw-r--r--sys/powerpc/include/pte.h27
1 files changed, 24 insertions, 3 deletions
diff --git a/sys/powerpc/include/pte.h b/sys/powerpc/include/pte.h
index 67cd5fd..b5d2ecf 100644
--- a/sys/powerpc/include/pte.h
+++ b/sys/powerpc/include/pte.h
@@ -163,7 +163,7 @@ extern u_int dsisr(void);
#endif /* _KERNEL */
#endif /* LOCORE */
-#else
+#else /* BOOKE */
#include <machine/tlb.h>
@@ -224,6 +224,8 @@ typedef struct pte pte_t;
/* RPN mask, TLB0 4K pages */
#define PTE_PA_MASK PAGE_MASK
+#if defined(BOOKE_E500)
+
/* PTE bits assigned to MAS2, MAS3 flags */
#define PTE_W MAS2_W
#define PTE_I MAS2_I
@@ -241,6 +243,26 @@ typedef struct pte pte_t;
#define PTE_MAS3_MASK ((MAS3_UX | MAS3_SX | MAS3_UW \
| MAS3_SW | MAS3_UR | MAS3_SR) << PTE_MAS3_SHIFT)
+#elif defined(BOOKE_PPC4XX)
+
+#define PTE_WL1 TLB_WL1
+#define PTE_IL2I TLB_IL2I
+#define PTE_IL2D TLB_IL2D
+
+#define PTE_W TLB_W
+#define PTE_I TLB_I
+#define PTE_M TLB_M
+#define PTE_G TLB_G
+
+#define PTE_UX TLB_UX
+#define PTE_SX TLB_SX
+#define PTE_UW TLB_UW
+#define PTE_SW TLB_SW
+#define PTE_UR TLB_UR
+#define PTE_SR TLB_SR
+
+#endif
+
/* Other PTE flags */
#define PTE_VALID 0x80000000 /* Valid */
#define PTE_MODIFIED 0x40000000 /* Modified */
@@ -256,6 +278,5 @@ typedef struct pte pte_t;
#define PTE_ISMODIFIED(pte) ((pte)->flags & PTE_MODIFIED)
#define PTE_ISREFERENCED(pte) ((pte)->flags & PTE_REFERENCED)
-#endif /* #elif defined(E500) */
-
+#endif /* BOOKE_PPC4XX */
#endif /* _MACHINE_PTE_H_ */
OpenPOWER on IntegriCloud