X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fthreads%2Floader.h;h=b412af362f546f429324d60cee952cd6577ebf73;hb=ac7b54c81e81f4b7a4cc404b5aa21f46a5dbdddd;hp=9507a6b4ad4426fc0e8e1ce6f1337950cfd09927;hpb=5ca4944f013a17ec694a1fcb30b5d63e07d51c70;p=pintos-anon diff --git a/src/threads/loader.h b/src/threads/loader.h index 9507a6b..b412af3 100644 --- a/src/threads/loader.h +++ b/src/threads/loader.h @@ -1,5 +1,5 @@ -#ifndef HEADER_LOADER_H -#define HEADER_LOADER_H +#ifndef THREADS_LOADER_H +#define THREADS_LOADER_H /* Constants fixed by the PC BIOS. */ #define LOADER_BASE 0x7c00 /* Physical address of loader's base. */ @@ -24,4 +24,10 @@ /* Kernel command line. */ #define LOADER_RAM_PAGES (LOADER_CMD_LINE - 4) /* # of pages of RAM. */ -#endif /* loader.h */ +/* GDT selectors defined by loader. + More selectors are defined by userprog/gdt.h. */ +#define SEL_NULL 0x00 /* Null selector. */ +#define SEL_KCSEG 0x08 /* Kernel code selector. */ +#define SEL_KDSEG 0x10 /* Kernel data selector. */ + +#endif /* threads/loader.h */