X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fthreads%2Floader.h;h=7b317f3989f449d62640e1d814dc95aeba77ccd0;hb=9869570326bb4e6d39fb41912a9076d53a82ad2d;hp=b412af362f546f429324d60cee952cd6577ebf73;hpb=2f2b3a9b0e72eb25010d1fa757687fd8a87658ef;p=pintos-anon diff --git a/src/threads/loader.h b/src/threads/loader.h index b412af3..7b317f3 100644 --- a/src/threads/loader.h +++ b/src/threads/loader.h @@ -1,12 +1,10 @@ #ifndef THREADS_LOADER_H #define THREADS_LOADER_H -/* Constants fixed by the PC BIOS. */ -#define LOADER_BASE 0x7c00 /* Physical address of loader's base. */ -#define LOADER_END 0x7e00 /* Physical address of end of loader. */ - -/* Physical address of kernel base. */ -#define LOADER_KERN_BASE 0x100000 /* 1 MB. */ +/* Physical addresses of important kernel components. */ +#define LOADER_PD_BASE 0x0f000 /* Page directory: 4 kB starting at 60 kB. */ +#define LOADER_PT_BASE 0x10000 /* Page tables: 64 kB starting at 64 kB. */ +#define LOADER_KERN_BASE 0x20000 /* Kernel: up to 512 kB starting at 128 kB. */ /* Kernel virtual address at which all physical memory is mapped. @@ -17,13 +15,6 @@ This must be aligned on a 4 MB boundary. */ #define LOADER_PHYS_BASE 0xc0000000 /* 3 GB. */ -/* Offsets within the loader. */ -#define LOADER_BIOS_SIG (LOADER_END - 2) /* 0xaa55 BIOS signature. */ -#define LOADER_CMD_LINE_LEN 0x80 /* Command line length. */ -#define LOADER_CMD_LINE (LOADER_BIOS_SIG - LOADER_CMD_LINE_LEN) - /* Kernel command line. */ -#define LOADER_RAM_PAGES (LOADER_CMD_LINE - 4) /* # of pages of RAM. */ - /* GDT selectors defined by loader. More selectors are defined by userprog/gdt.h. */ #define SEL_NULL 0x00 /* Null selector. */