diff options
-rw-r--r-- | i386/i386/vm_param.h | 9 | ||||
-rw-r--r-- | i386/i386at/model_dep.c | 6 |
2 files changed, 6 insertions, 9 deletions
diff --git a/i386/i386/vm_param.h b/i386/i386/vm_param.h index 1b79dda..57a2166 100644 --- a/i386/i386/vm_param.h +++ b/i386/i386/vm_param.h @@ -50,10 +50,13 @@ /* * Physical memory is direct-mapped to virtual memory - * starting at virtual address phys_mem_va. + * starting at virtual address VM_MIN_KERNEL_ADDRESS. */ -extern vm_offset_t phys_mem_va; -#define phystokv(a) ((vm_offset_t)(a) + phys_mem_va) +#define phystokv(a) ((vm_offset_t)(a) + VM_MIN_KERNEL_ADDRESS) +/* + * This can not be used with virtual mappings, but can be used during bootstrap + */ +#define _kvtophys(a) ((vm_offset_t)(a) - VM_MIN_KERNEL_ADDRESS) /* * Kernel virtual memory is actually at 0xc0000000 in linear addresses. diff --git a/i386/i386at/model_dep.c b/i386/i386at/model_dep.c index 7dfeb1c..1dcb8f6 100644 --- a/i386/i386at/model_dep.c +++ b/i386/i386at/model_dep.c @@ -80,9 +80,6 @@ static vm_offset_t kern_sym_start, kern_sym_end; vm_offset_t phys_first_addr = 0; vm_offset_t phys_last_addr; -/* Virtual address of physical memory, for the kvtophys/phystokv macros. */ -vm_offset_t phys_mem_va; - /* A copy of the multiboot info structure passed by the boot loader. */ struct multiboot_info boot_info; @@ -377,9 +374,6 @@ void c_boot_entry(vm_offset_t bi) boot_info = *(struct multiboot_info*)phystokv(bi); int cpu_type; - /* XXX we currently assume phys_mem_va is always 0 here - - if it isn't, we must tweak the pointers in the boot_info. */ - /* Before we do _anything_ else, print the hello message. If there are no initialized console devices yet, it will be stored and printed at the first opportunity. */ |