[PATCH] core i7 detection in drio

12 views
Skip to first unread message

nick black

unread,
May 1, 2010, 7:11:23 PM5/1/10
to dynamor...@googlegroups.com, Nate Clark
Please apply the following trivial patch, so that Gainestown and Clarksville
Core i7 processors might be distinguished. Inline and attached. There are
almost certainly other Nehalem models which this patch does not cover, alas.

I needed this for my daytripper project:
http://dank.qemfd.net/dankwiki/index.php/Daytripper

Thanks!

diff -ur ../pris/dynamorio-read-only//core/x86/proc.h ./core/x86/proc.h
--- ../pris/dynamorio-read-only//core/x86/proc.h 2010-05-01 19:08:53.285131607 -0400
+++ ./core/x86/proc.h 2010-05-01 19:05:09.608462296 -0400
@@ -77,6 +77,7 @@
* Intel Pentium M Family 6, Model 9 and 13
* Intel Core Family 6, Model 14
* Intel Core 2 Family 6, Model 15
+ * Intel Core i7 Family 6, Model 26 and 30
*/
/* DR_API EXPORT END */
#ifdef IA32_ON_IA64 /* don't export IA64 stuff! */
@@ -91,7 +92,7 @@
#define FAMILY_K8 15 /**< proc_get_family() processor family: AMD K8 */
#define FAMILY_PENTIUM_4 15 /**< proc_get_family() processor family: Pentium 4 */
#define FAMILY_ITANIUM 7 /**< proc_get_family() processor family: Itanium */
-/* Pentium Pro, Pentium II, Pentium III, Athlon, Pentium M, Core, Core 2 */
+/* Pentium Pro, Pentium II, Pentium III, Athlon, Pentium M, Core, Core 2, Core i7 */
#define FAMILY_CORE_2 6 /**< proc_get_family() processor family: Core 2 */
#define FAMILY_CORE 6 /**< proc_get_family() processor family: Core */
#define FAMILY_PENTIUM_M 6 /**< proc_get_family() processor family: Pentium M */
@@ -109,10 +110,12 @@
/* We do not enumerate all models; just relevant ones needed to distinguish
* major processors in the same family.
*/
-#define MODEL_PENTIUM_M_1MB 9 /**< proc_get_model() processor model: Pentium M 1MB L2 */
-#define MODEL_PENTIUM_M 13 /**< proc_get_model() processor model: Pentium M 2MB L2 */
-#define MODEL_CORE 14 /**< proc_get_model() processor model: Core */
-#define MODEL_CORE_2 15 /**< proc_get_model() processor model: Core 2 */
+#define MODEL_PENTIUM_M_1MB 9 /**< proc_get_model() processor model: Pentium M 1MB L2 */
+#define MODEL_PENTIUM_M 13 /**< proc_get_model() processor model: Pentium M 2MB L2 */
+#define MODEL_CORE 14 /**< proc_get_model() processor model: Core */
+#define MODEL_CORE_2 15 /**< proc_get_model() processor model: Core 2 */
+#define MODEL_I7_GAINESTOWN 26 /**< proc_get_model() processor model: Core i7 Gainestown */
+#define MODEL_I7_CLARKSFIELD 30 /**< proc_get_model() processor model: Core i7 Clarksfield */

/**
* Struct to hold all 4 32-bit feature values returned by cpuid.

--
Nick Black <nick...@linux.com>
Grad student, GT College of Computing
"np: the class of dashed hopes, and idle dreams..."

dyrio-corei7.patch
signature.asc

Zhao Qin

unread,
May 4, 2010, 1:20:25 PM5/4/10
to dynamor...@googlegroups.com
Hi Nick:

Thank you for providing the patch for core i7.
We usually do not commit the code for minor changes for a easier-to-see commit history. We will commit the changes once there is a patch for relative complete processor models set.
You are highly appreciated if you would like to help us on it.

Best Regards
Qin

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkvctRsACgkQzjCRTpolKGtw7QCgqjP9OHoyVvlf91ZaxLT2bhct
FdEAn0md8sCvVEY7SavTIc2lshP2EDfq
=ESQx
-----END PGP SIGNATURE-----




--
http://people.csail.mit.edu/qin_zhao/

--
You received this message because you are subscribed to the Google Groups "DynamoRIO Users" group.
To post to this group, send email to dynamor...@googlegroups.com.
To unsubscribe from this group, send email to dynamorio-use...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/dynamorio-users?hl=en.

Derek Bruening

unread,
Oct 10, 2010, 7:48:35 PM10/10/10
to Nate Clark, dynamor...@googlegroups.com
Thank you for the patch. It has been expanded and incorporated in r447.

- Derek

Reply all
Reply to author
Forward
0 new messages