Author: markj Date: Wed Jan 17 21:52:12 2018 New Revision: 328096 URL: https://svnweb.freebsd.org/changeset/base/328096
Log: Annotate a couple of changes from r328083. Reviewed by: kib X-MFC with: r328083 Modified: head/sys/amd64/amd64/exception.S head/sys/amd64/amd64/machdep.c Modified: head/sys/amd64/amd64/exception.S ============================================================================== --- head/sys/amd64/amd64/exception.S Wed Jan 17 20:43:30 2018 (r328095) +++ head/sys/amd64/amd64/exception.S Wed Jan 17 21:52:12 2018 (r328096) @@ -325,7 +325,7 @@ page_cr2: movq PCPU(KCR3),%rax movq %rax,%cr3 movq PCPU(RSP0),%rax - subq $2*PTI_SIZE-3*8,%rax + subq $2*PTI_SIZE-3*8,%rax /* no err, %rax, %rdx in faulted frame */ MOVE_STACKS (PTI_SIZE / 4 - 3) movq %rax,%rsp popq %rdx Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Wed Jan 17 20:43:30 2018 (r328095) +++ head/sys/amd64/amd64/machdep.c Wed Jan 17 21:52:12 2018 (r328096) @@ -115,6 +115,7 @@ __FBSDID("$FreeBSD$"); #include <machine/clock.h> #include <machine/cpu.h> #include <machine/cputypes.h> +#include <machine/frame.h> #include <machine/intr_machdep.h> #include <x86/mca.h> #include <machine/md_var.h> @@ -146,6 +147,14 @@ __FBSDID("$FreeBSD$"); /* Sanity check for __curthread() */ CTASSERT(offsetof(struct pcpu, pc_curthread) == 0); + +/* + * The PTI trampoline stack needs enough space for a hardware trapframe and a + * couple of scratch registers, as well as the trapframe left behind after an + * iret fault. + */ +CTASSERT(PC_PTI_STACK_SZ * sizeof(register_t) >= 2 * sizeof(struct pti_frame) - + offsetof(struct pti_frame, pti_rip)); extern u_int64_t hammer_time(u_int64_t, u_int64_t); _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"