summaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm/pte-8xx.h
diff options
context:
space:
mode:
authorLEROY Christophe <christophe.leroy@c-s.fr>2015-04-22 12:06:45 +0200
committerScott Wood <scottwood@freescale.com>2015-06-02 21:37:28 -0500
commit5b2753fc3e8a72253310d01a8b0a5bb05d917ef8 (patch)
treed4d7b44ddaf5d49b59ae27dce318961ef8cf7906 /arch/powerpc/include/asm/pte-8xx.h
parente0a8e0d90a9f0be66ba49f4f2380a63c22d4aaae (diff)
powerpc/8xx: Implementation of PAGE_EXEC
This patch implements PAGE_EXEC capability on the 8xx. All pages PP exec bits are set to 000, which means Execute for Supervisor and no Execute for User. Then we use the APG to say whether accesses are according to Page rules, "all Supervisor" rules (Exec for all) and "all User" rules (Exec for noone) Therefore, we define 4 APG groups. msb is _PAGE_EXEC, lsb is _PAGE_USER. MI_AP is initialised as follows: GP0 (00) => Not User, no exec => 11 (all accesses performed as user) GP1 (01) => User but no exec => 11 (all accesses performed as user) GP2 (10) => Not User, exec => 01 (rights according to page definition) GP3 (11) => User, exec => 00 (all accesses performed as supervisor) Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> [scottwood: comments: s/exec/data/ on data side, and s/pages/pages'/] Signed-off-by: Scott Wood <scottwood@freescale.com>
Diffstat (limited to 'arch/powerpc/include/asm/pte-8xx.h')
-rw-r--r--arch/powerpc/include/asm/pte-8xx.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/pte-8xx.h b/arch/powerpc/include/asm/pte-8xx.h
index b82094e4c242..a0e2ba960976 100644
--- a/arch/powerpc/include/asm/pte-8xx.h
+++ b/arch/powerpc/include/asm/pte-8xx.h
@@ -39,8 +39,9 @@
*/
#define _PAGE_GUARDED 0x0010 /* Copied to L1 G entry in DTLB */
#define _PAGE_USER 0x0020 /* Copied to L1 APG lsb */
-#define _PAGE_ACCESSED 0x0040 /* software: page referenced */
+#define _PAGE_EXEC 0x0040 /* Copied to L1 APG */
#define _PAGE_WRITETHRU 0x0080 /* software: caching is write through */
+#define _PAGE_ACCESSED 0x0800 /* software: page referenced */
#define _PAGE_RO 0x0600 /* Supervisor RO, User no access */