diff options
Diffstat (limited to 'sys/arch/i386/include/cpu_full.h')
-rw-r--r-- | sys/arch/i386/include/cpu_full.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/arch/i386/include/cpu_full.h b/sys/arch/i386/include/cpu_full.h index da2dee89e72..c7375af16c1 100644 --- a/sys/arch/i386/include/cpu_full.h +++ b/sys/arch/i386/include/cpu_full.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu_full.h,v 1.2 2018/05/28 20:52:44 bluhm Exp $ */ +/* $OpenBSD: cpu_full.h,v 1.3 2018/06/22 13:21:14 bluhm Exp $ */ /* * Copyright (c) 2018 Philip Guenther <guenther@openbsd.org> * Copyright (c) 2018 Hans-Joerg Hoexer <hshoexer@genua.de> @@ -28,16 +28,19 @@ struct cpu_info_full { union { struct { struct i386tss uu_tss; + struct i386tss uu_nmi_tss; union descriptor uu_gdt[NGDT]; } u_tssgdt; char u_align[PAGE_SIZE]; } cif_TSS_RO; #define cif_tss cif_TSS_RO.u_tssgdt.uu_tss +#define cif_nmi_tss cif_TSS_RO.u_tssgdt.uu_nmi_tss #define cif_gdt cif_TSS_RO.u_tssgdt.uu_gdt /* start of page mapped kRW in u-k */ - uint32_t cif_tramp_stack[(PAGE_SIZE + uint32_t cif_tramp_stack[(PAGE_SIZE / 4 - offsetof(struct cpu_info, ci_PAGEALIGN)) / sizeof(uint32_t)]; + uint32_t cif_nmi_stack[(3 * PAGE_SIZE / 4) / sizeof(uint32_t)]; /* * Beginning of this hangs over into the kRW page; rest is @@ -47,7 +50,7 @@ struct cpu_info_full { } __aligned(PAGE_SIZE); /* tss, align shim, and gdt must fit in a page */ -CTASSERT(_ALIGN(sizeof(struct i386tss)) + +CTASSERT(_ALIGN(2 * sizeof(struct i386tss)) + sizeof(struct segment_descriptor) * NGDT < PAGE_SIZE); /* verify expected alignment */ |