Changeset 272 for trunk


Ignore:
Timestamp:
Jul 24, 2017, 4:30:00 PM (7 years ago)
Author:
max@…
Message:

Use local_cxy for GET_PTR, instead of the triple map. This fixes a number
of inconsistencies.

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

Legend:

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

    r236 r272  
    151151        (CLUSTER_MIN_VA(n) + CLUSTER_VA_SIZE)
    152152
    153 /* Macros indicating the VA ranges for the local cluster*/
    154 #define LOCAL_CLUSTER_MIN_VA    HAL_VA_LOCAL_CLUSTER
    155 #define LOCAL_CLUSTER_MAX_VA    (LOCAL_CLUSTER_MIN_VA + CLUSTER_VA_SIZE)
    156 
  • trunk/hal/x86_64/core/hal_gpt.c

    r234 r272  
    231231        hal_gpt_enter_range(CLUSTER_MIN_VA(0), 0, CLUSTER_PA_SIZE / PAGE_SIZE);
    232232        hal_gpt_leave_range(CLUSTER_MIN_VA(0), (KERNTEXTOFF - KERNBASE) / PAGE_SIZE);
    233 
    234         /*
    235          * Do the same, but now in the local cluster map.
    236          */
    237         hal_gpt_maptree_area(LOCAL_CLUSTER_MIN_VA, LOCAL_CLUSTER_MIN_VA + CLUSTER_PA_SIZE);
    238         hal_gpt_enter_range(LOCAL_CLUSTER_MIN_VA, 0, CLUSTER_PA_SIZE / PAGE_SIZE);
    239         hal_gpt_leave_range(LOCAL_CLUSTER_MIN_VA, (KERNTEXTOFF - KERNBASE) / PAGE_SIZE);
    240233}
    241234
  • trunk/hal/x86_64/core/hal_types.h

    r226 r272  
    204204#define PTR_SHIFT              36
    205205#define GET_CXY(xp)            ((cxy_t)(((xp) & CXY_MASK) >> PTR_SHIFT))
    206 #define GET_PTR(xp)            ((void*)(HAL_VA_LOCAL_CLUSTER | ((xp) & PTR_MASK)))
     206
     207#define GET_PTR(xp)            ((void *)((uint64_t)HAL_VA_BASE | \
     208                                ((uint64_t)(local_cxy) << PTR_SHIFT) | \
     209                                (((uint64_t)(xp)) & PTR_MASK)))
     210
    207211#define XPTR(cxy,ptr)          ((uint64_t)HAL_VA_BASE | \
    208212                                ((uint64_t)(cxy) << PTR_SHIFT) | \
Note: See TracChangeset for help on using the changeset viewer.