projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add warnings for missing disks with various projects.
[pintos-anon]
/
src
/
userprog
/
gdt.c
diff --git
a/src/userprog/gdt.c
b/src/userprog/gdt.c
index e3e1ddea4a3e82baa10cbc318230fc6c2d380fac..42cad61449265c0e1179dfaf0dbc03b57c3010c0 100644
(file)
--- a/
src/userprog/gdt.c
+++ b/
src/userprog/gdt.c
@@
-1,8
+1,8
@@
-#include "gdt.h"
-#include
"debug.h"
-#include "
mmu
.h"
-#include "
palloc
.h"
-#include "t
ss
.h"
+#include "
userprog/
gdt.h"
+#include
<debug.h>
+#include "
userprog/tss
.h"
+#include "
threads/mmu
.h"
+#include "t
hreads/palloc
.h"
/* The Global Descriptor Table (GDT).
/* The Global Descriptor Table (GDT).
@@
-44,7
+44,7
@@
gdt_init (void)
gdt[SEL_UDSEG / sizeof *gdt] = make_data_desc (3);
gdt[SEL_TSS / sizeof *gdt] = make_tss_desc (tss_get ());
gdt[SEL_UDSEG / sizeof *gdt] = make_data_desc (3);
gdt[SEL_TSS / sizeof *gdt] = make_tss_desc (tss_get ());
- /* Load GDTR, TR. */
+ /* Load GDTR, TR.
See [IA32-v3] 2.4.1, 2.4.4, 6.2.3.
*/
gdtr_operand = make_gdtr_operand (sizeof gdt - 1, gdt);
asm volatile ("lgdt %0" :: "m" (gdtr_operand));
asm volatile ("ltr %w0" :: "r" (SEL_TSS));
gdtr_operand = make_gdtr_operand (sizeof gdt - 1, gdt);
asm volatile ("lgdt %0" :: "m" (gdtr_operand));
asm volatile ("ltr %w0" :: "r" (SEL_TSS));
@@
-125,7
+125,8
@@
make_data_desc (int dpl)
/* Returns a descriptor for an "available" 32-bit Task-State
Segment with its base at the given linear address, a limit of
/* Returns a descriptor for an "available" 32-bit Task-State
Segment with its base at the given linear address, a limit of
- 0x67 bytes (the size of a 32-bit TSS), and a DPL of 0. */
+ 0x67 bytes (the size of a 32-bit TSS), and a DPL of 0.
+ See [IA32-v3] 6.2.2. */
static uint64_t
make_tss_desc (void *laddr)
{
static uint64_t
make_tss_desc (void *laddr)
{