projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix TSS descriptor.
[pintos-anon]
/
src
/
threads
/
init.c
diff --git
a/src/threads/init.c
b/src/threads/init.c
index 8a2c4919008291e1f049c9694989991e235d7c9a..234c41eb249c64def96f49d22d6775c3d3ee52ba 100644
(file)
--- a/
src/threads/init.c
+++ b/
src/threads/init.c
@@
-120,9
+120,10
@@
make_data_desc (int dpl)
}
static uint64_t
}
static uint64_t
-make_tss_desc (
uint32_t base
)
+make_tss_desc (
void *vaddr
)
{
{
- return make_seg_desc (base, 0x67, SYS_SYSTEM, TYPE_TSS_32_A, 0, GRAN_BYTE);
+ return make_seg_desc ((uint32_t) vaddr,
+ 0x67, SYS_SYSTEM, TYPE_TSS_32_A, 0, GRAN_BYTE);
}
uint64_t gdt[SEL_CNT];
}
uint64_t gdt[SEL_CNT];
@@
-150,7
+151,7
@@
gdt_init (void)
gdt[SEL_KDSEG / sizeof *gdt] = make_data_desc (0);
gdt[SEL_UCSEG / sizeof *gdt] = make_code_desc (3);
gdt[SEL_UDSEG / sizeof *gdt] = make_data_desc (3);
gdt[SEL_KDSEG / sizeof *gdt] = make_data_desc (0);
gdt[SEL_UCSEG / sizeof *gdt] = make_code_desc (3);
gdt[SEL_UDSEG / sizeof *gdt] = make_data_desc (3);
- gdt[SEL_TSS / sizeof *gdt] = make_tss_desc (
vtop (tss)
);
+ gdt[SEL_TSS / sizeof *gdt] = make_tss_desc (
tss
);
/* Load GDTR, TR. */
gdtr_operand = make_dtr_operand (sizeof gdt - 1, gdt);
/* Load GDTR, TR. */
gdtr_operand = make_dtr_operand (sizeof gdt - 1, gdt);