pgtable.h (db5b7169474882fabbd811a4cf5c1bae3157e677) | pgtable.h (8ec53663d2698076468b3e1edc4e1b418bd54de3) |
---|---|
1/* 2 * arch/arm/include/asm/pgtable.h 3 * 4 * Copyright (C) 1995-2002 Russell King 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License version 2 as 8 * published by the Free Software Foundation. --- 183 unchanged lines hidden (view full) --- 192 193/* 194 * The pgprot_* and protection_map entries will be fixed up in runtime 195 * to include the cachable and bufferable bits based on memory policy, 196 * as well as any architecture dependent bits like global/ASID and SMP 197 * shared mapping bits. 198 */ 199#define _L_PTE_DEFAULT L_PTE_PRESENT | L_PTE_YOUNG | 1/* 2 * arch/arm/include/asm/pgtable.h 3 * 4 * Copyright (C) 1995-2002 Russell King 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License version 2 as 8 * published by the Free Software Foundation. --- 183 unchanged lines hidden (view full) --- 192 193/* 194 * The pgprot_* and protection_map entries will be fixed up in runtime 195 * to include the cachable and bufferable bits based on memory policy, 196 * as well as any architecture dependent bits like global/ASID and SMP 197 * shared mapping bits. 198 */ 199#define _L_PTE_DEFAULT L_PTE_PRESENT | L_PTE_YOUNG |
200#define _L_PTE_READ L_PTE_USER | L_PTE_EXEC | |
201 202extern pgprot_t pgprot_user; 203extern pgprot_t pgprot_kernel; 204 | 200 201extern pgprot_t pgprot_user; 202extern pgprot_t pgprot_kernel; 203 |
205#define PAGE_NONE pgprot_user 206#define PAGE_COPY __pgprot(pgprot_val(pgprot_user) | _L_PTE_READ) 207#define PAGE_SHARED __pgprot(pgprot_val(pgprot_user) | _L_PTE_READ | \ 208 L_PTE_WRITE) 209#define PAGE_READONLY __pgprot(pgprot_val(pgprot_user) | _L_PTE_READ) 210#define PAGE_KERNEL pgprot_kernel | 204#define _MOD_PROT(p, b) __pgprot(pgprot_val(p) | (b)) |
211 | 205 |
212#define __PAGE_NONE __pgprot(_L_PTE_DEFAULT) 213#define __PAGE_COPY __pgprot(_L_PTE_DEFAULT | _L_PTE_READ) 214#define __PAGE_SHARED __pgprot(_L_PTE_DEFAULT | _L_PTE_READ | L_PTE_WRITE) 215#define __PAGE_READONLY __pgprot(_L_PTE_DEFAULT | _L_PTE_READ) | 206#define PAGE_NONE pgprot_user 207#define PAGE_SHARED _MOD_PROT(pgprot_user, L_PTE_USER | L_PTE_WRITE) 208#define PAGE_SHARED_EXEC _MOD_PROT(pgprot_user, L_PTE_USER | L_PTE_WRITE | L_PTE_EXEC) 209#define PAGE_COPY _MOD_PROT(pgprot_user, L_PTE_USER) 210#define PAGE_COPY_EXEC _MOD_PROT(pgprot_user, L_PTE_USER | L_PTE_EXEC) 211#define PAGE_READONLY _MOD_PROT(pgprot_user, L_PTE_USER) 212#define PAGE_READONLY_EXEC _MOD_PROT(pgprot_user, L_PTE_USER | L_PTE_EXEC) 213#define PAGE_KERNEL pgprot_kernel 214#define PAGE_KERNEL_EXEC _MOD_PROT(pgprot_kernel, L_PTE_EXEC) |
216 | 215 |
216#define __PAGE_NONE __pgprot(_L_PTE_DEFAULT) 217#define __PAGE_SHARED __pgprot(_L_PTE_DEFAULT | L_PTE_USER | L_PTE_WRITE) 218#define __PAGE_SHARED_EXEC __pgprot(_L_PTE_DEFAULT | L_PTE_USER | L_PTE_WRITE | L_PTE_EXEC) 219#define __PAGE_COPY __pgprot(_L_PTE_DEFAULT | L_PTE_USER) 220#define __PAGE_COPY_EXEC __pgprot(_L_PTE_DEFAULT | L_PTE_USER | L_PTE_EXEC) 221#define __PAGE_READONLY __pgprot(_L_PTE_DEFAULT | L_PTE_USER) 222#define __PAGE_READONLY_EXEC __pgprot(_L_PTE_DEFAULT | L_PTE_USER | L_PTE_EXEC) 223 |
|
217#endif /* __ASSEMBLY__ */ 218 219/* 220 * The table below defines the page protection levels that we insert into our 221 * Linux page table version. These get translated into the best that the 222 * architecture can perform. Note that on most ARM hardware: 223 * 1) We cannot do execute protection 224 * 2) If we could do execute protection, then read is implied 225 * 3) write implies read permissions 226 */ 227#define __P000 __PAGE_NONE 228#define __P001 __PAGE_READONLY 229#define __P010 __PAGE_COPY 230#define __P011 __PAGE_COPY | 224#endif /* __ASSEMBLY__ */ 225 226/* 227 * The table below defines the page protection levels that we insert into our 228 * Linux page table version. These get translated into the best that the 229 * architecture can perform. Note that on most ARM hardware: 230 * 1) We cannot do execute protection 231 * 2) If we could do execute protection, then read is implied 232 * 3) write implies read permissions 233 */ 234#define __P000 __PAGE_NONE 235#define __P001 __PAGE_READONLY 236#define __P010 __PAGE_COPY 237#define __P011 __PAGE_COPY |
231#define __P100 __PAGE_READONLY 232#define __P101 __PAGE_READONLY 233#define __P110 __PAGE_COPY 234#define __P111 __PAGE_COPY | 238#define __P100 __PAGE_READONLY_EXEC 239#define __P101 __PAGE_READONLY_EXEC 240#define __P110 __PAGE_COPY_EXEC 241#define __P111 __PAGE_COPY_EXEC |
235 236#define __S000 __PAGE_NONE 237#define __S001 __PAGE_READONLY 238#define __S010 __PAGE_SHARED 239#define __S011 __PAGE_SHARED | 242 243#define __S000 __PAGE_NONE 244#define __S001 __PAGE_READONLY 245#define __S010 __PAGE_SHARED 246#define __S011 __PAGE_SHARED |
240#define __S100 __PAGE_READONLY 241#define __S101 __PAGE_READONLY 242#define __S110 __PAGE_SHARED 243#define __S111 __PAGE_SHARED | 247#define __S100 __PAGE_READONLY_EXEC 248#define __S101 __PAGE_READONLY_EXEC 249#define __S110 __PAGE_SHARED_EXEC 250#define __S111 __PAGE_SHARED_EXEC |
244 245#ifndef __ASSEMBLY__ 246/* 247 * ZERO_PAGE is a global shared page that is always zero: used 248 * for zero-mapped memory areas etc.. 249 */ 250extern struct page *empty_zero_page; 251#define ZERO_PAGE(vaddr) (empty_zero_page) --- 168 unchanged lines hidden --- | 251 252#ifndef __ASSEMBLY__ 253/* 254 * ZERO_PAGE is a global shared page that is always zero: used 255 * for zero-mapped memory areas etc.. 256 */ 257extern struct page *empty_zero_page; 258#define ZERO_PAGE(vaddr) (empty_zero_page) --- 168 unchanged lines hidden --- |