Changeset 67 for trunk/hal/x86_64


Ignore:
Timestamp:
Jun 27, 2017, 10:02:15 AM (7 years ago)
Author:
max@…
Message:

switch to 64GB of VA per cluster, with 256 clusters

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/x86_64/core/hal_types.h

    r51 r67  
    162162 * - ptr : pointer in the virtual space of a single cluster.
    163163 *
    164  * In Intel 64 bits, the kernel virtual space has 4 Gbytes per cluster
    165  * - the cxy field occupies bits[34:32]
    166  * - the ptr field occupies bits[31: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]
    167167 ***************************************************************************
    168168 * A physical address is a 64 bits integer, structured in two fields :
     
    171171 *
    172172 * 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]
    174174 * - the lpa field occupies bits[32:0]
    175175 **************************************************************************/
     
    193193#define XPTR_NULL              0
    194194
    195 /* virtual (heap) */
    196 #define PTR_MASK               0x00000000FFFFFFFFULL
    197 #define CXY_MASK               0x0000000700000000ULL
    198 #define PTR_SHIFT              32
     195/* virtual */
     196#define PTR_MASK               0x0000000FFFFFFFFFULL
     197#define CXY_MASK               0x00000FF000000000ULL
     198#define PTR_SHIFT              36
    199199#define GET_CXY(xp)            ((cxy_t)(((xp) & CXY_MASK) >> PTR_SHIFT))
    200200#define GET_PTR(xp)            ((void*)((xp) & PTR_MASK))
    201201#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          0x000000007FFFFFFFULL
    205 #define CXY_KIMG_MASK          0x0000000380000000ULL
    206 #define PTR_KIMG_SHIFT         31
    207 #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))
    210202
    211203/* physical */
Note: See TracChangeset for help on using the changeset viewer.