Changeset 67 for trunk/hal/x86_64
- Timestamp:
- Jun 27, 2017, 10:02:15 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/x86_64/core/hal_types.h
r51 r67 162 162 * - ptr : pointer in the virtual space of a single cluster. 163 163 * 164 * In Intel 64 bits, the kernel virtual space has 4 Gbytes per cluster165 * - the cxy field occupies bits[ 34:32]166 * - the ptr field occupies bits[3 1:0]164 * In Intel 64 bits, the kernel virtual space has 64 Gbytes per cluster 165 * - the cxy field occupies bits[43:36] 166 * - the ptr field occupies bits[35:0] 167 167 *************************************************************************** 168 168 * A physical address is a 64 bits integer, structured in two fields : … … 171 171 * 172 172 * In Intel 64 bits, the physical space has 8 Gbytes per cluster. 173 * - the cxy field occupies bits[ 35:33]173 * - the cxy field occupies bits[40:33] 174 174 * - the lpa field occupies bits[32:0] 175 175 **************************************************************************/ … … 193 193 #define XPTR_NULL 0 194 194 195 /* virtual (heap)*/196 #define PTR_MASK 0x0000000 0FFFFFFFFULL197 #define CXY_MASK 0x00000 00700000000ULL198 #define PTR_SHIFT 3 2195 /* virtual */ 196 #define PTR_MASK 0x0000000FFFFFFFFFULL 197 #define CXY_MASK 0x00000FF000000000ULL 198 #define PTR_SHIFT 36 199 199 #define GET_CXY(xp) ((cxy_t)(((xp) & CXY_MASK) >> PTR_SHIFT)) 200 200 #define GET_PTR(xp) ((void*)((xp) & PTR_MASK)) 201 201 #define XPTR(cxy,ptr) (((uint64_t)(cxy) << PTR_SHIFT) | (((uint64_t)(ptr)) & PTR_MASK)) 202 203 /* virtual (kimg). A KIMG entry has 2GB of VA. */204 #define PTR_KIMG_MASK 0x000000007FFFFFFFULL205 #define CXY_KIMG_MASK 0x0000000380000000ULL206 #define PTR_KIMG_SHIFT 31207 #define GET_KIMG_CXY(xp) ((cxy_t)(((xp) & CXY_KIMG_MASK) >> PTR_KIMG_SHIFT))208 #define GET_KIMG_PTR(xp) ((void*)((xp) & PTR_KIMG_MASK))209 #define XPTR_KIMG(cxy,ptr) (((uint64_t)(cxy) << PTR_KIMG_SHIFT) | (((uint64_t)(ptr)) & PTR_KIMG_MASK))210 202 211 203 /* physical */
Note: See TracChangeset
for help on using the changeset viewer.