diff options
| author | Frans Kaashoek <kaashoek@79.sub-75-194-237.myvzw.com> | 2011-08-08 13:30:08 -0400 |
|---|---|---|
| committer | Frans Kaashoek <kaashoek@79.sub-75-194-237.myvzw.com> | 2011-08-08 13:30:08 -0400 |
| commit | a56c8d609b24e4c1c3a8a5bacdced6ae53376ee2 (patch) | |
| tree | 9d049eae2080a7c330fb7ac3ec9ff6e557a310e4 /multiboot.S | |
| parent | 11b7438b1046eecca6135b52ddbe686008099fa5 (diff) | |
| download | xv6-labs-2022-a56c8d609b24e4c1c3a8a5bacdced6ae53376ee2.tar.xz xv6-labs-2022-a56c8d609b24e4c1c3a8a5bacdced6ae53376ee2.zip | |
One definition of several macros and constants
Diffstat (limited to 'multiboot.S')
| -rw-r--r-- | multiboot.S | 10 |
1 files changed, 3 insertions, 7 deletions
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 |
