summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
e48bfc1)
kernel thread. Shouldn't actually matter in practice, because that
pointer is only used on a user->kernel transition, and the initial
kernel thread never runs a user process.
Reported by Godmar Back.
/* Set thread's kernel stack for use in processing
interrupts. */
/* Set thread's kernel stack for use in processing
interrupts. */
- tss_set_esp0 ((uint8_t *) t + PGSIZE);
}
\f
/* We load ELF binaries. The following definitions are taken
}
\f
/* We load ELF binaries. The following definitions are taken
few fields of it are ever referenced, and those are the only
ones we initialize. */
tss = palloc_get_page (PAL_ASSERT | PAL_ZERO);
few fields of it are ever referenced, and those are the only
ones we initialize. */
tss = palloc_get_page (PAL_ASSERT | PAL_ZERO);
- tss->esp0 = ptov(0x20000);
tss->ss0 = SEL_KDSEG;
tss->bitmap = 0xdfff;
tss->ss0 = SEL_KDSEG;
tss->bitmap = 0xdfff;
}
/* Returns the kernel TSS. */
}
/* Returns the kernel TSS. */
-/* Sets the ring 0 stack pointer in the TSS to ESP0. */
+/* Sets the ring 0 stack pointer in the TSS to point to the end
+ of the thread stack. */
-tss_set_esp0 (uint8_t *esp0)
+ tss->esp0 = (uint8_t *) thread_current () + PGSIZE;
struct tss;
void tss_init (void);
struct tss *tss_get (void);
struct tss;
void tss_init (void);
struct tss *tss_get (void);
-void tss_set_esp0 (uint8_t *);
#endif /* userprog/tss.h */
#endif /* userprog/tss.h */