socsvn commit: r271270 - in soc2014/op/freebsd-base/sys: kern sys x86/include

op at FreeBSD.org op at FreeBSD.org
Wed Jul 23 13:06:23 UTC 2014


Author: op
Date: Wed Jul 23 13:06:21 2014
New Revision: 271270
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271270

Log:
  KSP: renamed feature selectors
  
  Signed-off-by: Oliver Pinter <oliver.pntr at gmail.com>
  
  git: https://github.com/opntr/opBSD/tree/op/gsoc2014/kpatch

Modified:
  soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c
  soc2014/op/freebsd-base/sys/sys/selfpatch.h
  soc2014/op/freebsd-base/sys/x86/include/selfpatch-asmacros.h

Modified: soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c
==============================================================================
--- soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c	Wed Jul 23 13:06:11 2014	(r271269)
+++ soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c	Wed Jul 23 13:06:21 2014	(r271270)
@@ -72,32 +72,32 @@
 	}
 
 	switch (p->feature_selector) {
-	case KSP_CPU_FEATURE         :
+	case KSP_CPUID :
 		if ((cpu_feature & p->feature) != 0)
 			return (true);
 		break;
-	case KSP_CPU_FEATURE2        :
+	case KSP_CPUID2 :
 		if ((cpu_feature2 & p->feature) != 0)
 			return (true);
 		break;
-	case KSP_AMD_FEATURE         :
+	case KSP_AMDID :
 		if ((amd_feature & p->feature) != 0)
 			return (true);
 		break;
-	case KSP_AMD_FEATURE2        :
+	case KSP_AMDID2 :
 		if ((amd_feature2 & p->feature) != 0)
 			return (true);
 		break;
-	case KSP_VIA_FEATURE_RNG     :
-		if ((via_feature_rng & p->feature) != 0)
+	case KSP_CPUID_STDEXT :
+		if ((cpu_stdext_feature & p->feature) != 0)
 			return (true);
 		break;
-	case KSP_VIA_FEATURE_XCRYPT  :
-		if ((via_feature_xcrypt & p->feature) != 0)
+	case KSP_VIA_CPUID :
+		if ((via_feature_rng & p->feature) != 0)
 			return (true);
 		break;
-	case KSP_CPU_STDEXT_FEATURE  :
-		if ((cpu_stdext_feature & p->feature) != 0)
+	case KSP_VIA_CRYPT_CWLO :
+		if ((via_feature_xcrypt & p->feature) != 0)
 			return (true);
 		break;
 	case KSP_SELFTEST:

Modified: soc2014/op/freebsd-base/sys/sys/selfpatch.h
==============================================================================
--- soc2014/op/freebsd-base/sys/sys/selfpatch.h	Wed Jul 23 13:06:11 2014	(r271269)
+++ soc2014/op/freebsd-base/sys/sys/selfpatch.h	Wed Jul 23 13:06:21 2014	(r271270)
@@ -33,6 +33,7 @@
 #define KSP_FEATURE_SELFTEST	1
 
 #include <machine/selfpatch-machdep.h>
+#include <machine/selfpatch-asmacros.h>
 
 struct linker_file_t;
 

Modified: soc2014/op/freebsd-base/sys/x86/include/selfpatch-asmacros.h
==============================================================================
--- soc2014/op/freebsd-base/sys/x86/include/selfpatch-asmacros.h	Wed Jul 23 13:06:11 2014	(r271269)
+++ soc2014/op/freebsd-base/sys/x86/include/selfpatch-asmacros.h	Wed Jul 23 13:06:21 2014	(r271270)
@@ -30,13 +30,13 @@
 #ifndef	__X86_SELFPATCH_ASMACROS_H__
 #define	__X86_SELFPATCH_ASMACROS_H__
 
-#define KSP_CPU_FEATURE		1
-#define KSP_CPU_FEATURE2	2
-#define KSP_AMD_FEATURE		3
-#define KSP_AMD_FEATURE2	4
-#define KSP_VIA_FEATURE_RNG	5
-#define KSP_VIA_FEATURE_XCRYPT	6
-#define KSP_CPU_STDEXT_FEATURE	7
+#define KSP_CPUID		1
+#define KSP_CPUID2		2
+#define KSP_AMDID		3
+#define KSP_AMDID2		4
+#define KSP_CPUID_STDEXT	5
+#define KSP_VIA_CPUID		6
+#define KSP_VIA_CRYPT_CWLO	7
 
 /*
  * Intel Instruction Set Reference M-Z
@@ -76,7 +76,7 @@
 	"		.quad   0725b ; "				\
 	"		.int    0724b-0723b ;	"			\
 	"		.int    0726b-0725b ;	"			\
-	"		.int    " KSP_CPU_FEATURE2 " ; "		\
+	"		.int    " KSP_CPUID2 " ; "			\
 	"		.int    " CPUID2_OSXSAVE " ; "			\
 	"		.quad	0 ; "					\
 	"	.popsection ; "
@@ -98,7 +98,7 @@
 	"		.quad   0725b ; "				\
 	"		.int    0724b-0723b ;	"			\
 	"		.int    0726b-0725b ;	"			\
-	"		.int    " KSP_CPU_STDEXT_FEATURE " ; "		\
+	"		.int    " KSP_CPUID_STDEXT " ; "		\
 	"		.int    " CPUID_STDEXT_SMAP " ; "		\
 	"		.quad	0 ; "					\
 	"	.popsection ; "
@@ -120,7 +120,7 @@
 	"		.quad   0725b ; "				\
 	"		.int    0724b-0723b ;	"			\
 	"		.int    0726b-0725b ;	"			\
-	"		.int    " KSP_CPU_STDEXT_FEATURE " ; "		\
+	"		.int    " KSP_CPUID_STDEXT " ; "		\
 	"		.int    " CPUID_STDEXT_SMAP " ; "		\
 	"		.quad	0 ; "					\
 	"	.popsection ; "


More information about the svn-soc-all mailing list