summaryrefslogtreecommitdiff
path: root/bootasm.S
diff options
context:
space:
mode:
authorkaashoek <kaashoek>2006-06-22 01:28:57 +0000
committerkaashoek <kaashoek>2006-06-22 01:28:57 +0000
commit21a88fd487177841c882d9017bd9f4476801c6f6 (patch)
treebfa061e00662efde2186d6c0498fc78f889356ce /bootasm.S
parent7baa34a421e4c970ee90c2537ceacd7230f2474e (diff)
downloadxv6-labs-21a88fd487177841c882d9017bd9f4476801c6f6.tar.gz
xv6-labs-21a88fd487177841c882d9017bd9f4476801c6f6.tar.bz2
xv6-labs-21a88fd487177841c882d9017bd9f4476801c6f6.zip
checkpoint. booting second processor. stack is messed up, but thanks to cliff
and plan 9 code, at least boots and gets into C code.
Diffstat (limited to 'bootasm.S')
-rw-r--r--bootasm.S15
1 files changed, 1 insertions, 14 deletions
diff --git a/bootasm.S b/bootasm.S
index 00cbdc9..c2a3c3e 100644
--- a/bootasm.S
+++ b/bootasm.S
@@ -1,17 +1,4 @@
-#define SEG_NULL \
- .word 0, 0; \
- .byte 0, 0, 0, 0
-#define SEG(type,base,lim) \
- .word (((lim) >> 12) & 0xffff), ((base) & 0xffff); \
- .byte (((base) >> 16) & 0xff), (0x90 | (type)), \
- (0xC0 | (((lim) >> 28) & 0xf)), (((base) >> 24) & 0xff)
-
-#define STA_X 0x8 // Executable segment
-#define STA_E 0x4 // Expand down (non-executable segments)
-#define STA_C 0x4 // Conforming code segment (executable only)
-#define STA_W 0x2 // Writeable (non-executable segments)
-#define STA_R 0x2 // Readable (executable segments)
-#define STA_A 0x1 // Accessed
+#include "asm.h"
.set PROT_MODE_CSEG,0x8 # code segment selector
.set PROT_MODE_DSEG,0x10 # data segment selector