From 4fa5afc2b460b4d92ba11433a4fbd0951039b005 Mon Sep 17 00:00:00 2001 From: Philip Guenther Date: Wed, 23 May 2018 05:37:02 +0000 Subject: Move CR4_DEFAULT to specialreg.h where the CR4_* values are defined ok mlarkin@ --- sys/arch/amd64/amd64/genassym.cf | 5 +---- sys/arch/amd64/include/cpu.h | 10 +--------- sys/arch/amd64/include/specialreg.h | 5 +++-- 3 files changed, 5 insertions(+), 15 deletions(-) (limited to 'sys/arch/amd64') diff --git a/sys/arch/amd64/amd64/genassym.cf b/sys/arch/amd64/amd64/genassym.cf index 4d65a3a56a2..1d71bf8a2eb 100644 --- a/sys/arch/amd64/amd64/genassym.cf +++ b/sys/arch/amd64/amd64/genassym.cf @@ -1,4 +1,4 @@ -# $OpenBSD: genassym.cf,v 1.34 2018/02/21 19:24:15 guenther Exp $ +# $OpenBSD: genassym.cf,v 1.35 2018/05/23 05:37:01 guenther Exp $ # Written by Artur Grabowski art@openbsd.org, Public Domain include @@ -178,6 +178,3 @@ export NBPD_L2 export NPDPG export PDIR_SLOT_DIRECT - -export CR4_DEFAULT - diff --git a/sys/arch/amd64/include/cpu.h b/sys/arch/amd64/include/cpu.h index f456c1a4681..2fe3b7e3574 100644 --- a/sys/arch/amd64/include/cpu.h +++ b/sys/arch/amd64/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.120 2018/03/29 01:21:02 guenther Exp $ */ +/* $OpenBSD: cpu.h,v 1.121 2018/05/23 05:37:01 guenther Exp $ */ /* $NetBSD: cpu.h,v 1.1 2003/04/26 18:39:39 fvdl Exp $ */ /*- @@ -469,12 +469,4 @@ void mp_setperf_init(void); { "invarianttsc", CTLTYPE_INT }, \ } -/* - * Default cr4 flags. - * Doesn't really belong here, but doesn't really belong anywhere else - * either. Just to avoid painful mismatches of cr4 flags since they are - * set in three different places. - */ -#define CR4_DEFAULT (CR4_PAE|CR4_PGE|CR4_PSE|CR4_OSFXSR|CR4_OSXMMEXCPT) - #endif /* !_MACHINE_CPU_H_ */ diff --git a/sys/arch/amd64/include/specialreg.h b/sys/arch/amd64/include/specialreg.h index ebbd13c76dd..9a298597abf 100644 --- a/sys/arch/amd64/include/specialreg.h +++ b/sys/arch/amd64/include/specialreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: specialreg.h,v 1.71 2018/05/22 15:55:30 guenther Exp $ */ +/* $OpenBSD: specialreg.h,v 1.72 2018/05/23 05:37:01 guenther Exp $ */ /* $NetBSD: specialreg.h,v 1.1 2003/04/26 18:39:48 fvdl Exp $ */ /* $NetBSD: x86/specialreg.h,v 1.2 2003/04/25 21:54:30 fvdl Exp $ */ @@ -1398,6 +1398,7 @@ /* - * Default cr0 flags. + * Default cr0 and cr4 flags. */ #define CR0_DEFAULT (CR0_PE|CR0_PG|CR0_NE|CR0_TS|CR0_MP|CR0_WP) +#define CR4_DEFAULT (CR4_PAE|CR4_PGE|CR4_PSE|CR4_OSFXSR|CR4_OSXMMEXCPT) -- cgit v1.2.3