Changeset 42 for trunk/hal/x86_64


Ignore:
Timestamp:
Jun 22, 2017, 4:06:44 PM (8 years ago)
Author:
max@…
Message:

Explicitly use configurable parameters

Location:
trunk/hal/x86_64
Files:
2 edited

Legend:

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

    r35 r42  
    130130#define NPDPG   (PAGE_SIZE / sizeof (pt_entry_t))
    131131
    132 #define CLUSTER0_MIN_VA 0xffff800000000000
    133 #define CLUSTER0_MAX_VA 0xffff800100000000 /* MIN + 4GB */
     132#define CLUSTERS_BASE_VA        0xffff800000000000
    134133
     134/*
     135 * These parameters are configurable.
     136 */
     137#define CLUSTER_VA_SIZE 0x100000000 /* 4GB */
     138#define CLUSTER_PA_SIZE 0x200000000 /* 8GB */
     139
     140#define CLUSTER_MIN_VA(n)       (CLUSTERS_BASE_VA + n * CLUSTER_VA_SIZE)
     141#define CLUSTER_MAX_VA(n)       (CLUSTER_MIN_VA(n) + CLUSTER_VA_SIZE)
     142
  • trunk/hal/x86_64/hal_gpt.c

    r39 r42  
    177177{
    178178        pa_avail = firstpa;
    179         va_avail = CLUSTER0_MIN_VA;
    180         hal_gpt_maptree_area(CLUSTER0_MIN_VA, CLUSTER0_MAX_VA);
     179        va_avail = CLUSTER_MIN_VA(0);
     180        hal_gpt_maptree_area(CLUSTER_MIN_VA(0), CLUSTER_MAX_VA(0));
    181181}
    182182
Note: See TracChangeset for help on using the changeset viewer.