Changeset 5fceec7 in mainline
- Timestamp:
- 2006-03-17T00:40:01Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9f52563
- Parents:
- 93165be
- Location:
- arch/amd64
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/amd64/include/mm/page.h
r93165be r5fceec7 62 62 return x - 0xffff800000000000; 63 63 } 64 /* Linker symbol */65 extern int ktext_start;66 extern int kdata_end;67 static inline __address pa2ka(__address x)68 {69 if (x >= ka2pa((__address)(&kdata_end)) || \70 x <= ka2pa((__address)&ktext_start))71 return x + 0xffff800000000000;72 else73 return x + 0xffffffff80000000;74 }75 64 # define KA2PA(x) ka2pa((__address)x) 76 # define PA2KA(x) pa2ka((__address)x)77 # define PA2KA_IDENT(x) (((__address) (x)) + 0xffff800000000000)78 65 # define PA2KA_CODE(x) (((__address) (x)) + 0xffffffff80000000) 66 # define PA2KA(x) (((__address) (x)) + 0xffff800000000000) 79 67 #else 80 68 # define KA2PA(x) ((x) - 0xffffffff80000000) 81 69 # define PA2KA(x) ((x) + 0xffffffff80000000) 82 # define PA2KA_DATA(x) ((x) + 0xffff800000000000)83 70 #endif 84 71 -
arch/amd64/src/mm/page.c
r93165be r5fceec7 86 86 for (cur = 0; cur < last_frame; cur += FRAME_SIZE) { 87 87 /* Standard identity mapping */ 88 page_mapping_insert(AS_KERNEL, PA2KA _IDENT(cur), cur, identity_flags);88 page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, identity_flags); 89 89 } 90 90 /* Upper kernel mapping … … 129 129 130 130 SET_FRAME_FLAGS_ARCH(aptl_3, PTL3_INDEX_ARCH(oldpage), PAGE_NOT_PRESENT); 131 if ( aptl_3 == helper_ptl3)131 if (KA2PA(aptl_3) == KA2PA(helper_ptl3)) 132 132 SET_PTL3_FLAGS_ARCH(aptl_2, PTL2_INDEX_ARCH(oldpage), PAGE_NOT_PRESENT); 133 if ( aptl_2 == helper_ptl2)133 if (KA2PA(aptl_2) == KA2PA(helper_ptl2)) 134 134 SET_PTL2_FLAGS_ARCH(aptl_1, PTL1_INDEX_ARCH(oldpage), PAGE_NOT_PRESENT); 135 if ( aptl_1 == helper_ptl1)135 if (KA2PA(aptl_1) == KA2PA(helper_ptl1)) 136 136 SET_PTL1_FLAGS_ARCH(&ptl_0, PTL0_INDEX_ARCH(oldpage), PAGE_NOT_PRESENT); 137 137 }
Note:
See TracChangeset
for help on using the changeset viewer.