From a56c8d609b24e4c1c3a8a5bacdced6ae53376ee2 Mon Sep 17 00:00:00 2001 From: Frans Kaashoek Date: Mon, 8 Aug 2011 13:30:08 -0400 Subject: One definition of several macros and constants --- multiboot.S | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'multiboot.S') diff --git a/multiboot.S b/multiboot.S index 84ab638..4aa9f20 100644 --- a/multiboot.S +++ b/multiboot.S @@ -16,14 +16,10 @@ #include "asm.h" #include "memlayout.h" - -#define RELOC(x) ((x) - KERNBASE) // same as V2P, but without casts +#include "mmu.h" #define STACK 4096 -#define SEG_KCODE 1 // kernel code -#define SEG_KDATA 2 // kernel data+stack - # Multiboot header. Data to direct multiboot loader. .p2align 2 .text @@ -45,7 +41,7 @@ multiboot_header: # boot loader - bootasm.S - sets up. .globl multiboot_entry multiboot_entry: - lgdt RELOC(gdtdesc) + lgdt V2P_WO(gdtdesc) ljmp $(SEG_KCODE<<3), $mbstart32 mbstart32: @@ -73,6 +69,6 @@ gdt: gdtdesc: .word (gdtdesc - gdt - 1) # sizeof(gdt) - 1 - .long RELOC(gdt) # address gdt + .long V2P_WO(gdt) # address gdt .comm stack, STACK -- cgit v1.2.3