Changeset 73 for trunk/hal/x86_64


Ignore:
Timestamp:
Jun 27, 2017, 11:03:16 AM (7 years ago)
Author:
max@…
Message:

now that the fields are stable, embed the VA base in XPTR

Location:
trunk/hal/x86_64/core
Files:
2 edited

Legend:

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

    r51 r73  
    131131
    132132#define KERNEL_VA_SIZE          (NKL2_KIMG_ENTRIES * NBPD_L2)
    133 #define CLUSTERS_BASE_VA        0xffff800000000000
     133#define CLUSTERS_BASE_VA        HAL_VA_BASE
    134134
    135135/* These parameters are configurable. */
  • trunk/hal/x86_64/core/hal_types.h

    r70 r73  
    196196
    197197/* virtual */
     198#define HAL_VA_BASE            0xffff800000000000ULL
    198199#define PTR_MASK               0x0000000FFFFFFFFFULL
    199200#define CXY_MASK               0x00000FF000000000ULL
     
    201202#define GET_CXY(xp)            ((cxy_t)(((xp) & CXY_MASK) >> PTR_SHIFT))
    202203#define GET_PTR(xp)            ((void*)((xp) & PTR_MASK))
    203 #define XPTR(cxy,ptr)          (((uint64_t)(cxy) << PTR_SHIFT) | (((uint64_t)(ptr)) & PTR_MASK))
     204#define XPTR(cxy,ptr)          ((uint64_t)HAL_VA_BASE | \
     205                                ((uint64_t)(cxy) << PTR_SHIFT) | \
     206                                (((uint64_t)(ptr)) & PTR_MASK))
    204207
    205208/* physical */
Note: See TracChangeset for help on using the changeset viewer.