diff options
author | kaashoek <kaashoek> | 2006-06-22 15:28:09 +0000 |
---|---|---|
committer | kaashoek <kaashoek> | 2006-06-22 15:28:09 +0000 |
commit | 8352b998019565946b8f5b3b8f72175c5076efec (patch) | |
tree | f5d4fde6840dd8868266e4880bdaa5c32c4d4745 /asm.h | |
parent | 21a88fd487177841c882d9017bd9f4476801c6f6 (diff) | |
download | xv6-labs-8352b998019565946b8f5b3b8f72175c5076efec.tar.gz xv6-labs-8352b998019565946b8f5b3b8f72175c5076efec.tar.bz2 xv6-labs-8352b998019565946b8f5b3b8f72175c5076efec.zip |
oops
Diffstat (limited to 'asm.h')
-rw-r--r-- | asm.h | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -0,0 +1,14 @@ +#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 |