Ignore:
Timestamp:
Jul 18, 2017, 10:29:58 AM (5 years ago)
Author:
max@…
Message:

Create a (virtual) copy of the local cluster in 0xffffe00000000000, and
make GET_PTR() point to it. This way we can use pointers from GET_PTR()
directly, instead of reconstructing a XPTR with local_cxy.

File:
1 edited

Legend:

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

    r145 r224  
    196196
    197197/* virtual */
     198#define HAL_VA_LOCAL_CLUSTER   0xffffe00000000000ULL
    198199#define HAL_VA_BASE            0xffff800000000000ULL
    199200#define PTR_MASK               0x0000000FFFFFFFFFULL
     
    201202#define PTR_SHIFT              36
    202203#define GET_CXY(xp)            ((cxy_t)(((xp) & CXY_MASK) >> PTR_SHIFT))
    203 #define GET_PTR(xp)            ((void*)((xp) & PTR_MASK))
     204#define GET_PTR(xp)            ((void*)(HAL_VA_LOCAL_CLUSTER | ((xp) & PTR_MASK)))
    204205#define XPTR(cxy,ptr)          ((uint64_t)HAL_VA_BASE | \
    205206                                ((uint64_t)(cxy) << PTR_SHIFT) | \
Note: See TracChangeset for help on using the changeset viewer.