Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146990258
D24754.id71531.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D24754.id71531.diff
View Options
Index: sys/amd64/amd64/machdep.c
===================================================================
--- sys/amd64/amd64/machdep.c
+++ sys/amd64/amd64/machdep.c
@@ -1857,7 +1857,7 @@
setidt(IDT_IO_INTS + 15, IDTVEC(spuriousint), SDT_SYSIGT, SEL_KPL, 0);
#endif
#else
-#error "have you forgotten the isa device?";
+#error "have you forgotten the isa device?"
#endif
if (late_console)
@@ -1867,12 +1867,13 @@
fpuinit();
/*
- * Set up thread0 pcb save area after fpuinit calculated fpu save
- * area size. Zero out the extended state header in fpu save
- * area.
+ * Reinitialize thread0's stack base now that the xsave area size is
+ * known. Set up thread0's pcb save area after fpuinit calculated fpu
+ * save area size. Zero out the extended state header in fpu save area.
*/
+ set_top_of_stack_td(&thread0);
thread0.td_pcb->pcb_save = get_pcb_user_save_td(&thread0);
- bzero(get_pcb_user_save_td(&thread0), cpu_max_ext_state_size);
+ bzero(thread0.td_pcb->pcb_save, cpu_max_ext_state_size);
if (use_xsave) {
xhdr = (struct xstate_hdr *)(get_pcb_user_save_td(&thread0) +
1);
@@ -1882,7 +1883,7 @@
rsp0 = thread0.td_md.md_stack_base;
/* Ensure the stack is aligned to 16 bytes */
rsp0 &= ~0xFul;
- __pcpu[0].pc_common_tss.tss_rsp0 = rsp0;
+ PCPU_PTR(common_tss)->tss_rsp0 = rsp0;
amd64_bsp_pcpu_init2(rsp0);
/* transfer to user mode */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 8, 10:03 AM (8 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29402537
Default Alt Text
D24754.id71531.diff (1 KB)
Attached To
Mode
D24754: Reinitialize thread0's stack base after enabling XSAVE.
Attached
Detach File
Event Timeline
Log In to Comment