Changeset a35b458 in mainline for kernel/arch/arm32/include/arch/mm/page_armv4.h
- Timestamp:
- 2018-03-02T20:10:49Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f1380b7
- Parents:
- 3061bc1
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/arm32/include/arch/mm/page_armv4.h
r3061bc1 ra35b458 137 137 pte_level0_t *p = &pt[i].l0; 138 138 int np = (p->descriptor_type == PTE_DESCRIPTOR_NOT_PRESENT); 139 139 140 140 return (np << PAGE_PRESENT_SHIFT) | (1 << PAGE_USER_SHIFT) | 141 141 (1 << PAGE_READ_SHIFT) | (1 << PAGE_WRITE_SHIFT) | … … 152 152 { 153 153 pte_level1_t *p = &pt[i].l1; 154 154 155 155 int dt = p->descriptor_type; 156 156 int ap = p->access_permission_0; 157 157 158 158 return ((dt == PTE_DESCRIPTOR_NOT_PRESENT) << PAGE_PRESENT_SHIFT) | 159 159 ((ap == PTE_AP_USER_RO_KERNEL_RW) << PAGE_READ_SHIFT) | … … 177 177 { 178 178 pte_level0_t *p = &pt[i].l0; 179 179 180 180 if (flags & PAGE_NOT_PRESENT) { 181 181 p->descriptor_type = PTE_DESCRIPTOR_NOT_PRESENT; … … 206 206 { 207 207 pte_level1_t *p = &pt[i].l1; 208 208 209 209 if (flags & PAGE_NOT_PRESENT) 210 210 p->descriptor_type = PTE_DESCRIPTOR_NOT_PRESENT; 211 211 else 212 212 p->descriptor_type = PTE_DESCRIPTOR_SMALL_PAGE; 213 213 214 214 p->cacheable = p->bufferable = (flags & PAGE_CACHEABLE) != 0; 215 215 216 216 /* default access permission */ 217 217 p->access_permission_0 = p->access_permission_1 = 218 218 p->access_permission_2 = p->access_permission_3 = 219 219 PTE_AP_USER_NO_KERNEL_RW; 220 220 221 221 if (flags & PAGE_USER) { 222 222 if (flags & PAGE_READ) {
Note:
See TracChangeset
for help on using the changeset viewer.