diff --git a/Readme.md b/Readme.md index 5b52fbb..19865f6 100644 --- a/Readme.md +++ b/Readme.md @@ -2,7 +2,7 @@ libcpuid ======== libcpuid provides CPU identification for the x86 (and x86_64). -For details about the programming API, you might want to +For details about the programming API, you might want to take a look at the project's website on sourceforge (http://libcpuid.sourceforge.net/). There you'd find a short [tutorial](http://libcpuid.sf.net/documentation.html), as well @@ -52,7 +52,7 @@ a good idea to run `make test`. If some test fails, and you're confident that the test is wrong and needs fixing, run `make fix-tests`. You can also add a new test (which is basically a file containing -the raw CPUID data and the expected decoded items) by using +the raw CPUID data and the expected decoded items) by using `tests/create_test.py`. The workflow there is as follows: 1. Run "cpuid_tool" with no arguments. It will tell you that it diff --git a/contrib/MSR Driver/Kernel/TmpRdr.c b/contrib/MSR Driver/Kernel/TmpRdr.c index a332a58..842dab2 100644 --- a/contrib/MSR Driver/Kernel/TmpRdr.c +++ b/contrib/MSR Driver/Kernel/TmpRdr.c @@ -1,127 +1,127 @@ -#include - -#define FILE_DEVICE_UNKNOWN 0x00000022 -#define IOCTL_UNKNOWN_BASE FILE_DEVICE_UNKNOWN -#define IOCTL_PROCVIEW_RDMSR CTL_CODE(IOCTL_UNKNOWN_BASE, 0x0803, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS) - -#define FLAG_HANDLE_OPENED 1 - -void UnloadDriver(PDRIVER_OBJECT DriverObject); -NTSTATUS DispatchCreateClose(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp); -NTSTATUS DispatchIoctl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp); - -NTSTATUS DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath); - -typedef struct _DEVICE_EXTENSION{ - PDEVICE_OBJECT DeviceObject; -} DEVICE_EXTENSION, *PDEVICE_EXTENSION; - -PDEVICE_OBJECT g_pDeviceObject; - -#pragma alloc_text(PAGE0DEF, DriverEntry) - -// -NTSTATUS DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath){ - NTSTATUS ntStatus; - UNICODE_STRING uszDriverString; - UNICODE_STRING uszDeviceString; - - PDEVICE_OBJECT pDeviceObject; - PDEVICE_EXTENSION extension; - - // Point uszDriverString at the driver name - RtlInitUnicodeString(&uszDriverString, L"\\Device\\TmpRdr"); - - // Create and initialize device object - ntStatus = IoCreateDevice(DriverObject, sizeof(DEVICE_EXTENSION), &uszDriverString, FILE_DEVICE_UNKNOWN, 0, FALSE, &pDeviceObject); - if(ntStatus != STATUS_SUCCESS) - return ntStatus; - - // Assign extension variable - extension = pDeviceObject->DeviceExtension; - - // Point uszDeviceString at the device name - RtlInitUnicodeString(&uszDeviceString, L"\\DosDevices\\TmpRdr"); - - // Create symbolic link to the user-visible name - ntStatus = IoCreateSymbolicLink(&uszDeviceString, &uszDriverString); - - if(ntStatus != STATUS_SUCCESS){ - // Delete device object if not successful - IoDeleteDevice(pDeviceObject); - return ntStatus; - } - - // Assign global pointer to the device object for use by the callback functions - g_pDeviceObject = pDeviceObject; - - // Load structure to point to IRP handlers - DriverObject->DriverUnload = UnloadDriver; - DriverObject->MajorFunction[IRP_MJ_CREATE] = DispatchCreateClose; - DriverObject->MajorFunction[IRP_MJ_CLOSE] = DispatchCreateClose; - DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = DispatchIoctl; - - // Return success - return ntStatus; -} - -// -NTSTATUS DispatchCreateClose(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp){ - PDEVICE_EXTENSION extension = DeviceObject->DeviceExtension; - - Irp->IoStatus.Status = STATUS_SUCCESS; - Irp->IoStatus.Information = 0; - - IoCompleteRequest(Irp, IO_NO_INCREMENT); - return STATUS_SUCCESS; -} - -// -NTSTATUS DispatchIoctl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp){ - NTSTATUS ntStatus = STATUS_UNSUCCESSFUL; - PIO_STACK_LOCATION irpStack = IoGetCurrentIrpStackLocation(Irp); - PDEVICE_EXTENSION extension = DeviceObject->DeviceExtension; - __int64 *p__int64; - int iMSRregister; - - switch(irpStack->Parameters.DeviceIoControl.IoControlCode){ - case IOCTL_PROCVIEW_RDMSR: - if(irpStack->Parameters.DeviceIoControl.OutputBufferLength >= sizeof(__int64)){ - if(irpStack->Parameters.DeviceIoControl.InputBufferLength == sizeof(int)) - iMSRregister = *((int *)Irp->AssociatedIrp.SystemBuffer); - else - iMSRregister = 0x19c; - - p__int64 = Irp->AssociatedIrp.SystemBuffer; - *p__int64 = __readmsr(iMSRregister); - - ntStatus = STATUS_SUCCESS; - Irp->IoStatus.Information = sizeof(__int64); - IoCompleteRequest(Irp, IO_NO_INCREMENT); - return ntStatus; - } - break; - default: - break; - } - - Irp->IoStatus.Status = ntStatus; - - if(ntStatus == STATUS_SUCCESS) - Irp->IoStatus.Information = irpStack->Parameters.DeviceIoControl.OutputBufferLength; - else - Irp->IoStatus.Information = 0; - - IoCompleteRequest(Irp, IO_NO_INCREMENT); - return ntStatus; -} - -// -void UnloadDriver(IN PDRIVER_OBJECT DriverObject){ - UNICODE_STRING uszDeviceString; - - IoDeleteDevice(DriverObject->DeviceObject); - - RtlInitUnicodeString(&uszDeviceString, L"\\DosDevices\\TmpRdr"); - IoDeleteSymbolicLink(&uszDeviceString); -} +#include + +#define FILE_DEVICE_UNKNOWN 0x00000022 +#define IOCTL_UNKNOWN_BASE FILE_DEVICE_UNKNOWN +#define IOCTL_PROCVIEW_RDMSR CTL_CODE(IOCTL_UNKNOWN_BASE, 0x0803, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS) + +#define FLAG_HANDLE_OPENED 1 + +void UnloadDriver(PDRIVER_OBJECT DriverObject); +NTSTATUS DispatchCreateClose(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp); +NTSTATUS DispatchIoctl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp); + +NTSTATUS DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath); + +typedef struct _DEVICE_EXTENSION{ + PDEVICE_OBJECT DeviceObject; +} DEVICE_EXTENSION, *PDEVICE_EXTENSION; + +PDEVICE_OBJECT g_pDeviceObject; + +#pragma alloc_text(PAGE0DEF, DriverEntry) + +// +NTSTATUS DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath){ + NTSTATUS ntStatus; + UNICODE_STRING uszDriverString; + UNICODE_STRING uszDeviceString; + + PDEVICE_OBJECT pDeviceObject; + PDEVICE_EXTENSION extension; + + // Point uszDriverString at the driver name + RtlInitUnicodeString(&uszDriverString, L"\\Device\\TmpRdr"); + + // Create and initialize device object + ntStatus = IoCreateDevice(DriverObject, sizeof(DEVICE_EXTENSION), &uszDriverString, FILE_DEVICE_UNKNOWN, 0, FALSE, &pDeviceObject); + if(ntStatus != STATUS_SUCCESS) + return ntStatus; + + // Assign extension variable + extension = pDeviceObject->DeviceExtension; + + // Point uszDeviceString at the device name + RtlInitUnicodeString(&uszDeviceString, L"\\DosDevices\\TmpRdr"); + + // Create symbolic link to the user-visible name + ntStatus = IoCreateSymbolicLink(&uszDeviceString, &uszDriverString); + + if(ntStatus != STATUS_SUCCESS){ + // Delete device object if not successful + IoDeleteDevice(pDeviceObject); + return ntStatus; + } + + // Assign global pointer to the device object for use by the callback functions + g_pDeviceObject = pDeviceObject; + + // Load structure to point to IRP handlers + DriverObject->DriverUnload = UnloadDriver; + DriverObject->MajorFunction[IRP_MJ_CREATE] = DispatchCreateClose; + DriverObject->MajorFunction[IRP_MJ_CLOSE] = DispatchCreateClose; + DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = DispatchIoctl; + + // Return success + return ntStatus; +} + +// +NTSTATUS DispatchCreateClose(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp){ + PDEVICE_EXTENSION extension = DeviceObject->DeviceExtension; + + Irp->IoStatus.Status = STATUS_SUCCESS; + Irp->IoStatus.Information = 0; + + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return STATUS_SUCCESS; +} + +// +NTSTATUS DispatchIoctl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp){ + NTSTATUS ntStatus = STATUS_UNSUCCESSFUL; + PIO_STACK_LOCATION irpStack = IoGetCurrentIrpStackLocation(Irp); + PDEVICE_EXTENSION extension = DeviceObject->DeviceExtension; + __int64 *p__int64; + int iMSRregister; + + switch(irpStack->Parameters.DeviceIoControl.IoControlCode){ + case IOCTL_PROCVIEW_RDMSR: + if(irpStack->Parameters.DeviceIoControl.OutputBufferLength >= sizeof(__int64)){ + if(irpStack->Parameters.DeviceIoControl.InputBufferLength == sizeof(int)) + iMSRregister = *((int *)Irp->AssociatedIrp.SystemBuffer); + else + iMSRregister = 0x19c; + + p__int64 = Irp->AssociatedIrp.SystemBuffer; + *p__int64 = __readmsr(iMSRregister); + + ntStatus = STATUS_SUCCESS; + Irp->IoStatus.Information = sizeof(__int64); + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return ntStatus; + } + break; + default: + break; + } + + Irp->IoStatus.Status = ntStatus; + + if(ntStatus == STATUS_SUCCESS) + Irp->IoStatus.Information = irpStack->Parameters.DeviceIoControl.OutputBufferLength; + else + Irp->IoStatus.Information = 0; + + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return ntStatus; +} + +// +void UnloadDriver(IN PDRIVER_OBJECT DriverObject){ + UNICODE_STRING uszDeviceString; + + IoDeleteDevice(DriverObject->DeviceObject); + + RtlInitUnicodeString(&uszDeviceString, L"\\DosDevices\\TmpRdr"); + IoDeleteSymbolicLink(&uszDeviceString); +} diff --git a/contrib/MSR Driver/Kernel/TmpRdr.vcproj b/contrib/MSR Driver/Kernel/TmpRdr.vcproj index 332e349..b42d33a 100644 --- a/contrib/MSR Driver/Kernel/TmpRdr.vcproj +++ b/contrib/MSR Driver/Kernel/TmpRdr.vcproj @@ -1,272 +1,272 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/contrib/MSR Driver/Kernel/resource.h b/contrib/MSR Driver/Kernel/resource.h index 6f9273c..85ef397 100644 --- a/contrib/MSR Driver/Kernel/resource.h +++ b/contrib/MSR Driver/Kernel/resource.h @@ -1,14 +1,14 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by tmprdr.rc - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 101 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1001 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by tmprdr.rc + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 101 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/contrib/MSR Driver/Kernel/tmprdr.rc b/contrib/MSR Driver/Kernel/tmprdr.rc index 919329d..4180a1f 100644 --- a/contrib/MSR Driver/Kernel/tmprdr.rc +++ b/contrib/MSR Driver/Kernel/tmprdr.rc @@ -1,115 +1,115 @@ -// Microsoft Visual C++ generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "windows.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// Bulgarian resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_BGR) -#ifdef _WIN32 -LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT -#pragma code_page(1251) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""windows.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - -#endif // Bulgarian resources -///////////////////////////////////////////////////////////////////////////// - - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,1 - PRODUCTVERSION 1,0,0,1 - FILEFLAGSMASK 0x17L -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x3L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "Comments", "MSR reader 32-bit kernel driver" - VALUE "CompanyName", "Iron Steeds Inc." - VALUE "FileDescription", "TmpRdr 32-bit Kernel Module" - VALUE "FileVersion", "1, 0, 0, 1" - VALUE "InternalName", "TmpRdr" - VALUE "LegalCopyright", "Nick Gabarev '2009" - VALUE "OriginalFilename", "TmpRdr.sys" - VALUE "ProductName", "Core 2 Temperature Reader" - VALUE "ProductVersion", "1, 0, 0, 1" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "windows.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Bulgarian resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_BGR) +#ifdef _WIN32 +LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT +#pragma code_page(1251) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""windows.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + +#endif // Bulgarian resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,0,0,1 + PRODUCTVERSION 1,0,0,1 + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x40004L + FILETYPE 0x3L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "MSR reader 32-bit kernel driver" + VALUE "CompanyName", "Iron Steeds Inc." + VALUE "FileDescription", "TmpRdr 32-bit Kernel Module" + VALUE "FileVersion", "1, 0, 0, 1" + VALUE "InternalName", "TmpRdr" + VALUE "LegalCopyright", "Nick Gabarev '2009" + VALUE "OriginalFilename", "TmpRdr.sys" + VALUE "ProductName", "Core 2 Temperature Reader" + VALUE "ProductVersion", "1, 0, 0, 1" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/contrib/MSR Driver/TmpRdr.sys b/contrib/MSR Driver/TmpRdr.sys index 7349726..6bc84ae 100644 Binary files a/contrib/MSR Driver/TmpRdr.sys and b/contrib/MSR Driver/TmpRdr.sys differ diff --git a/contrib/MSR Driver/TmpRdr64.sys b/contrib/MSR Driver/TmpRdr64.sys index d35db37..1290022 100644 Binary files a/contrib/MSR Driver/TmpRdr64.sys and b/contrib/MSR Driver/TmpRdr64.sys differ diff --git a/cpuid_tool/Makefile.x64 b/cpuid_tool/Makefile.x64 index 7321e2a..5a7a7db 100644 --- a/cpuid_tool/Makefile.x64 +++ b/cpuid_tool/Makefile.x64 @@ -1,12 +1,12 @@ -# Makefile for cpuid_tool, MSVC, for AMD64 - -OPTFLAGS = -LINKFLAGS = /MT - -all: cpuid_tool.exe - -cpuid_tool.exe: cpuid_tool.c ..\libcpuid\libcpuid.lib - cl /TC $(OPTFLAGS) $(LINKFLAGS) /I ..\libcpuid cpuid_tool.c /link ..\libcpuid\libcpuid.lib advapi32.lib - -clean: - del cpuid_tool.obj cpuid_tool.exe +# Makefile for cpuid_tool, MSVC, for AMD64 + +OPTFLAGS = +LINKFLAGS = /MT + +all: cpuid_tool.exe + +cpuid_tool.exe: cpuid_tool.c ..\libcpuid\libcpuid.lib + cl /TC $(OPTFLAGS) $(LINKFLAGS) /I ..\libcpuid cpuid_tool.c /link ..\libcpuid\libcpuid.lib advapi32.lib + +clean: + del cpuid_tool.obj cpuid_tool.exe diff --git a/cpuid_tool/cpuid_tool.c b/cpuid_tool/cpuid_tool.c index a6ba731..4721904 100644 --- a/cpuid_tool/cpuid_tool.c +++ b/cpuid_tool/cpuid_tool.c @@ -174,7 +174,7 @@ static void usage(void) printf(" --version - print library version\n"); printf("\n"); printf("Query switches (generate 1 line of output per switch; in order of appearance):"); - + line_fill = 80; for (i = 0; i < sz_match; i++) { l = (int) strlen(matchtable[i].synopsis); @@ -305,7 +305,7 @@ static int parse_cmdline(int argc, char** argv) recog = 1; break; } - + if (!recog) { fprintf(stderr, "Unrecognized option: `%s'\n\n", arg); fprintf(stderr, "Use -h to get a list of supported options\n"); @@ -323,7 +323,7 @@ static void close_out(void) static int check_need_raw_data(void) { int i, j; - + if (need_output || need_report || need_identify) return 1; for (i = 0; i < num_requests; i++) { for (j = 0; j < sz_match; j++) @@ -476,7 +476,7 @@ static void print_info(output_data_switch query, struct cpu_raw_data_t* raw, } case NEED_SSE_UNIT_SIZE: { - fprintf(fout, "%d (%s)\n", data->sse_size, + fprintf(fout, "%d (%s)\n", data->sse_size, data->detection_hints[CPU_HINT_SSE_SIZE_AUTH] ? "authoritative" : "non-authoritative"); break; } @@ -546,7 +546,7 @@ int main(int argc, char** argv) /* In quiet mode, disable libcpuid warning messages: */ if (need_quiet) cpuid_set_warn_function(NULL); - + cpuid_set_verbosiness_level(verbose_level); /* Redirect output, if necessary: */ @@ -561,11 +561,11 @@ int main(int argc, char** argv) } else { fout = stdout; } - + /* If requested, print library version: */ if (need_version) fprintf(fout, "%s\n", cpuid_lib_version()); - + if (need_input) { /* We have a request to input raw CPUID data from file: */ if (!strcmp(raw_data_file, "-")) @@ -599,7 +599,7 @@ int main(int argc, char** argv) } } } - + /* Need to dump raw CPUID data to file: */ if (need_output) { if (verbose_level >= 1) @@ -635,7 +635,7 @@ int main(int argc, char** argv) */ if (cpu_identify(&raw, &data) < 0) fprintf(fout, "Error identifying the CPU: %s\n", cpuid_error()); - + /* OK, now write what we have in `data'...: */ fprintf(fout, "CPU Info:\n------------------\n"); fprintf(fout, " vendor_str : `%s'\n", data.vendor_str); @@ -673,7 +673,7 @@ int main(int argc, char** argv) if (data.flags[i]) fprintf(fout, " %s", cpu_feature_str(i)); fprintf(fout, "\n"); - + /* Is CPU clock info requested? */ if (need_clockreport) { if (need_timed_clockreport) { @@ -719,6 +719,6 @@ int main(int argc, char** argv) if (need_sgx) { print_sgx_data(&raw, &data); } - + return 0; } diff --git a/cpuid_tool/cpuid_tool.dsp b/cpuid_tool/cpuid_tool.dsp index 1ae5706..4ed7ab3 100644 --- a/cpuid_tool/cpuid_tool.dsp +++ b/cpuid_tool/cpuid_tool.dsp @@ -1,100 +1,100 @@ -# Microsoft Developer Studio Project File - Name="cpuid_tool" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=cpuid_tool - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "cpuid_tool.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "cpuid_tool.mak" CFG="cpuid_tool - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "cpuid_tool - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "cpuid_tool - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "cpuid_tool - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "../libcpuid" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "cpuid_tool - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../libcpuid" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "cpuid_tool - Win32 Release" -# Name "cpuid_tool - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\cpuid_tool.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="cpuid_tool" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=cpuid_tool - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "cpuid_tool.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "cpuid_tool.mak" CFG="cpuid_tool - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "cpuid_tool - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "cpuid_tool - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "cpuid_tool - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "../libcpuid" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "cpuid_tool - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../libcpuid" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "cpuid_tool - Win32 Release" +# Name "cpuid_tool - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\cpuid_tool.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/cpuid_tool/cpuid_tool_vc10.vcxproj b/cpuid_tool/cpuid_tool_vc10.vcxproj index 10f29af..932a70b 100644 --- a/cpuid_tool/cpuid_tool_vc10.vcxproj +++ b/cpuid_tool/cpuid_tool_vc10.vcxproj @@ -1,249 +1,249 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - ReleaseDLL - Win32 - - - ReleaseDLL - x64 - - - Release - Win32 - - - Release - x64 - - - - cpuid_tool - {854A36FB-EA23-4165-9110-A55EB97C6377} - cpuid_tool - Win32Proj - - - - Application - NotSet - true - - - Application - NotSet - true - - - Application - NotSet - true - - - Application - NotSet - true - - - Application - NotSet - - - Application - NotSet - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(ProjectDir)x$(PlatformArchitecture)\$(Configuration)\ - $(ProjectDir)x$(PlatformArchitecture)\$(Configuration)\ - x$(PlatformArchitecture)\$(Configuration)\ - x$(PlatformArchitecture)\$(Configuration)\ - true - true - $(ProjectDir)x$(PlatformArchitecture)\$(Configuration)\ - $(ProjectDir)x$(PlatformArchitecture)\$(Configuration)\ - $(ProjectDir)x$(PlatformArchitecture)\$(Configuration)\ - $(ProjectDir)x$(PlatformArchitecture)\$(Configuration)\ - x$(PlatformArchitecture)\$(Configuration)\ - x$(PlatformArchitecture)\$(Configuration)\ - x$(PlatformArchitecture)\$(Configuration)\ - x$(PlatformArchitecture)\$(Configuration)\ - false - false - false - false - - - - Disabled - ../libcpuid;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - - - Level3 - EditAndContinue - CompileAsC - 4996;%(DisableSpecificWarnings) - - - libcpuid.lib;%(AdditionalDependencies) - ../libcpuid/x$(PlatformArchitecture)/$(Configuration);%(AdditionalLibraryDirectories) - true - Console - MachineX86 - - - - - Disabled - ../libcpuid;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebug - - - Level3 - ProgramDatabase - CompileAsC - 4996;%(DisableSpecificWarnings) - - - libcpuid.lib;%(AdditionalDependencies) - ../libcpuid/x$(PlatformArchitecture)/$(Configuration);%(AdditionalLibraryDirectories) - true - Console - - - - - ../libcpuid;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - MultiThreaded - - - Level3 - ProgramDatabase - CompileAsC - 4996;%(DisableSpecificWarnings) - - - libcpuid.lib;%(AdditionalDependencies) - ../libcpuid/x$(PlatformArchitecture)/$(Configuration);%(AdditionalLibraryDirectories) - true - Console - true - true - MachineX86 - - - - - ../libcpuid;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - MultiThreaded - - - Level3 - ProgramDatabase - CompileAsC - 4996;%(DisableSpecificWarnings) - - - libcpuid.lib;%(AdditionalDependencies) - ../libcpuid/x$(PlatformArchitecture)/$(Configuration);%(AdditionalLibraryDirectories) - true - Console - true - true - MachineX86 - - - - - ../libcpuid;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - MultiThreaded - - - Level3 - ProgramDatabase - CompileAsC - 4996;%(DisableSpecificWarnings) - - - libcpuid.lib;%(AdditionalDependencies) - ../libcpuid/x$(PlatformArchitecture)/$(Configuration);%(AdditionalLibraryDirectories) - true - Console - true - true - - - - - ../libcpuid;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - MultiThreaded - - - Level3 - ProgramDatabase - CompileAsC - 4996;%(DisableSpecificWarnings) - - - libcpuid.lib;%(AdditionalDependencies) - ../libcpuid/x$(PlatformArchitecture)/$(Configuration);%(AdditionalLibraryDirectories) - true - Console - true - true - - - - - - - - {92bdba37-96e3-4d85-b762-185e4407bb49} - false - - - - - + + + + + Debug + Win32 + + + Debug + x64 + + + ReleaseDLL + Win32 + + + ReleaseDLL + x64 + + + Release + Win32 + + + Release + x64 + + + + cpuid_tool + {854A36FB-EA23-4165-9110-A55EB97C6377} + cpuid_tool + Win32Proj + + + + Application + NotSet + true + + + Application + NotSet + true + + + Application + NotSet + true + + + Application + NotSet + true + + + Application + NotSet + + + Application + NotSet + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + $(ProjectDir)x$(PlatformArchitecture)\$(Configuration)\ + $(ProjectDir)x$(PlatformArchitecture)\$(Configuration)\ + x$(PlatformArchitecture)\$(Configuration)\ + x$(PlatformArchitecture)\$(Configuration)\ + true + true + $(ProjectDir)x$(PlatformArchitecture)\$(Configuration)\ + $(ProjectDir)x$(PlatformArchitecture)\$(Configuration)\ + $(ProjectDir)x$(PlatformArchitecture)\$(Configuration)\ + $(ProjectDir)x$(PlatformArchitecture)\$(Configuration)\ + x$(PlatformArchitecture)\$(Configuration)\ + x$(PlatformArchitecture)\$(Configuration)\ + x$(PlatformArchitecture)\$(Configuration)\ + x$(PlatformArchitecture)\$(Configuration)\ + false + false + false + false + + + + Disabled + ../libcpuid;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + CompileAsC + 4996;%(DisableSpecificWarnings) + + + libcpuid.lib;%(AdditionalDependencies) + ../libcpuid/x$(PlatformArchitecture)/$(Configuration);%(AdditionalLibraryDirectories) + true + Console + MachineX86 + + + + + Disabled + ../libcpuid;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + CompileAsC + 4996;%(DisableSpecificWarnings) + + + libcpuid.lib;%(AdditionalDependencies) + ../libcpuid/x$(PlatformArchitecture)/$(Configuration);%(AdditionalLibraryDirectories) + true + Console + + + + + ../libcpuid;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreaded + + + Level3 + ProgramDatabase + CompileAsC + 4996;%(DisableSpecificWarnings) + + + libcpuid.lib;%(AdditionalDependencies) + ../libcpuid/x$(PlatformArchitecture)/$(Configuration);%(AdditionalLibraryDirectories) + true + Console + true + true + MachineX86 + + + + + ../libcpuid;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreaded + + + Level3 + ProgramDatabase + CompileAsC + 4996;%(DisableSpecificWarnings) + + + libcpuid.lib;%(AdditionalDependencies) + ../libcpuid/x$(PlatformArchitecture)/$(Configuration);%(AdditionalLibraryDirectories) + true + Console + true + true + MachineX86 + + + + + ../libcpuid;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreaded + + + Level3 + ProgramDatabase + CompileAsC + 4996;%(DisableSpecificWarnings) + + + libcpuid.lib;%(AdditionalDependencies) + ../libcpuid/x$(PlatformArchitecture)/$(Configuration);%(AdditionalLibraryDirectories) + true + Console + true + true + + + + + ../libcpuid;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreaded + + + Level3 + ProgramDatabase + CompileAsC + 4996;%(DisableSpecificWarnings) + + + libcpuid.lib;%(AdditionalDependencies) + ../libcpuid/x$(PlatformArchitecture)/$(Configuration);%(AdditionalLibraryDirectories) + true + Console + true + true + + + + + + + + {92bdba37-96e3-4d85-b762-185e4407bb49} + false + + + + + \ No newline at end of file diff --git a/cpuid_tool/cpuid_tool_vc10.vcxproj.filters b/cpuid_tool/cpuid_tool_vc10.vcxproj.filters index 8ac9731..8ee85b7 100644 --- a/cpuid_tool/cpuid_tool_vc10.vcxproj.filters +++ b/cpuid_tool/cpuid_tool_vc10.vcxproj.filters @@ -1,22 +1,22 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav - - - - - Source Files - - + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + \ No newline at end of file diff --git a/cpuid_tool/cpuid_tool_vc71.vcproj b/cpuid_tool/cpuid_tool_vc71.vcproj index 4377c21..2756a00 100644 --- a/cpuid_tool/cpuid_tool_vc71.vcproj +++ b/cpuid_tool/cpuid_tool_vc71.vcproj @@ -1,190 +1,190 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/debian/changelog b/debian/changelog index 1b864d2..30559d0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -38,7 +38,7 @@ libcpuid (0.3.0) unstable; urgency=low * Support up to 8 subleaf entries for CPUID leaf 04 and detection of L4 cache. * MSR functions supported on FreeBSD. - * INFO_VOLTAGE request supported by cpu_msrinfo(). + * INFO_VOLTAGE request supported by cpu_msrinfo(). -- eloaders Mon, 22 Aug 2016 17:45:21 +0200 diff --git a/libcpuid.dsw b/libcpuid.dsw index 08465e5..49b8894 100644 --- a/libcpuid.dsw +++ b/libcpuid.dsw @@ -1,44 +1,44 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "cpuid_tool"=.\cpuid_tool\cpuid_tool.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name libcpuid - End Project Dependency -}}} - -############################################################################### - -Project: "libcpuid"=.\libcpuid\libcpuid.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "cpuid_tool"=.\cpuid_tool\cpuid_tool.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name libcpuid + End Project Dependency +}}} + +############################################################################### + +Project: "libcpuid"=.\libcpuid\libcpuid.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/libcpuid/Doxyfile.in b/libcpuid/Doxyfile.in index cb9ba9f..31e7603 100644 --- a/libcpuid/Doxyfile.in +++ b/libcpuid/Doxyfile.in @@ -14,190 +14,190 @@ # Project related configuration options #--------------------------------------------------------------------------- -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = libcpuid -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = @PACKAGE_VERSION@ -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = docs -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = NO -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, -# Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian, -# Italian, Japanese, Japanese-en (Japanese with English messages), Korean, -# Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian, +# Italian, Japanese, Japanese-en (Japanese with English messages), Korean, +# Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, # Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. OUTPUT_LANGUAGE = English -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" -ABBREVIATE_BRIEF = +ABBREVIATE_BRIEF = -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = NO -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = YES -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the # path to strip. -STRIP_FROM_PATH = +STRIP_FROM_PATH = -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. -STRIP_FROM_INC_PATH = +STRIP_FROM_INC_PATH = -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like the Qt-style comments (thus requiring an +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like the Qt-style comments (thus requiring an # explicit @brief command for a brief description. JAVADOC_AUTOBRIEF = NO -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO -# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 8 -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. -ALIASES = +ALIASES = -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = YES -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for Java. -# For instance, namespaces will be presented as packages, qualified scopes +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for Java. +# For instance, namespaces will be presented as packages, qualified scopes # will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to -# include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also make the inheritance and collaboration +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to +# include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. BUILTIN_STL_SUPPORT = NO -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES @@ -206,320 +206,320 @@ SUBGROUPING = YES # Build related configuration options #--------------------------------------------------------------------------- -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = NO -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO -# If the EXTRACT_STATIC tag is set to YES all static members of a file +# If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = NO -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = NO -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = YES -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the +# Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES -# The ENABLED_SECTIONS tag can be used to enable conditional +# The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. -ENABLED_SECTIONS = +ENABLED_SECTIONS = -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from the -# version control system). Doxygen will invoke the program by executing (via -# popen()) the command , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the program writes to standard output +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from the +# version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples. -FILE_VERSION_FILTER = +FILE_VERSION_FILTER = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- -# The QUIET tag can be used to turn on/off the messages that are generated +# The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = NO -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = NO -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES -# This WARN_NO_PARAMDOC option can be abled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of # documentation. WARN_NO_PARAMDOC = NO -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could # be obtained via FILE_VERSION_FILTER) WARN_FORMAT = "$file:$line: $text" -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written # to stderr. -WARN_LOGFILE = +WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = @top_srcdir@/libcpuid @top_srcdir@/cpuid_tool/cpuid_tool.c -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py FILE_PATTERNS = *.h -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = NO -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. -EXCLUDE = +EXCLUDE = -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are excluded +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* -EXCLUDE_PATTERNS = +EXCLUDE_PATTERNS = -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see # the \include command). -EXAMPLE_PATH = +EXAMPLE_PATH = -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left # blank all files are included. -EXAMPLE_PATTERNS = +EXAMPLE_PATTERNS = -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see # the \image command). -IMAGE_PATH = +IMAGE_PATH = -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. If FILTER_PATTERNS is specified, this tag will be +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. If FILTER_PATTERNS is specified, this tag will be # ignored. -INPUT_FILTER = +INPUT_FILTER = -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER # is applied to all files. -FILTER_PATTERNS = +FILTER_PATTERNS = -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO @@ -528,32 +528,32 @@ FILTER_SOURCE_FILES = NO # configuration options related to source browsing #--------------------------------------------------------------------------- -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = NO -# Setting the INLINE_SOURCES tag to YES will include the body +# Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES -# If the REFERENCED_BY_RELATION tag is set to YES (the default) -# then for each documented function all documented +# If the REFERENCED_BY_RELATION tag is set to YES (the default) +# then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = YES -# If the REFERENCES_RELATION tag is set to YES (the default) -# then for each documented function all documented entities +# If the REFERENCES_RELATION tag is set to YES (the default) +# then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = YES @@ -565,16 +565,16 @@ REFERENCES_RELATION = YES REFERENCES_LINK_SOURCE = YES -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES @@ -583,127 +583,127 @@ VERBATIM_HEADERS = YES # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = NO -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. -IGNORE_PREFIX = +IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a # standard header. -HTML_HEADER = +HTML_HEADER = -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a # standard footer. -HTML_FOOTER = +HTML_FOOTER = -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own # stylesheet in the HTML output directory as well, or it will be erased! -HTML_STYLESHEET = +HTML_STYLESHEET = -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be # written to the html output directory. -CHM_FILE = +CHM_FILE = -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. -HHC_LOCATION = +HHC_LOCATION = -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO -# The TOC_EXPAND flag can be set to YES to add extra items for group members +# The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO -# This tag can be used to set the number of enum values (range [1..20]) +# This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation. ENUM_VALUES_PER_LINE = 4 # If the GENERATE_TREEVIEW tag is set to YES, a side panel will be -# generated containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are +# generated containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, +# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are # probably better off using the HTML help feature. GENERATE_TREEVIEW = NO -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 @@ -712,74 +712,74 @@ TREEVIEW_WIDTH = 250 # configuration options related to the LaTeX output #--------------------------------------------------------------------------- -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = YES -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. LATEX_CMD_NAME = latex -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4wide -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. -EXTRA_PACKAGES = +EXTRA_PACKAGES = -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! -LATEX_HEADER = +LATEX_HEADER = -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = NO -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = NO -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO @@ -788,68 +788,68 @@ LATEX_HIDE_INDICES = NO # configuration options related to the RTF output #--------------------------------------------------------------------------- -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. -RTF_STYLESHEET_FILE = +RTF_STYLESHEET_FILE = -# Set optional variables used in the generation of an rtf document. +# Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. -RTF_EXTENSIONS_FILE = +RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = YES -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man -# The MAN_EXTENSION tag determines the extension that is added to +# The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO @@ -858,21 +858,21 @@ MAN_LINKS = NO # configuration options related to the XML output #--------------------------------------------------------------------------- -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = NO -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = YES @@ -881,10 +881,10 @@ XML_PROGRAMLISTING = YES # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO @@ -893,303 +893,303 @@ GENERATE_AUTOGEN_DEF = NO # configuration options related to the Perl module output #--------------------------------------------------------------------------- -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. This is useful +# if you want to understand what is going on. On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. -PERLMOD_MAKEVAR_PREFIX = +PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- -# Configuration options related to the preprocessor +# Configuration options related to the preprocessor #--------------------------------------------------------------------------- -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = NO -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = NO -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by # the preprocessor. -INCLUDE_PATH = +INCLUDE_PATH = -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. -INCLUDE_FILE_PATTERNS = +INCLUDE_FILE_PATTERNS = -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator # instead of the = operator. -PREDEFINED = +PREDEFINED = -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. -EXPAND_AS_DEFINED = +EXPAND_AS_DEFINED = -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse # the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- -# Configuration::additions related to external references +# Configuration::additions related to external references #--------------------------------------------------------------------------- -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # Note that each tag file must have a unique name # (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen +# If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. -TAGFILES = +TAGFILES = -# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. -GENERATE_TAGFILE = +GENERATE_TAGFILE = -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES -# The PERL_PATH should be the absolute path and name of the perl script +# The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- -# Configuration options related to the dot tool +# Configuration options related to the dot tool #--------------------------------------------------------------------------- -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option is superseded by the HAVE_DOT option below. This is only a -# fallback. It is recommended to install and use dot, since it yields more +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more # powerful graphs. CLASS_DIAGRAMS = YES -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = NO -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies GROUP_GRAPHS = YES -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO -# If set to YES, the inheritance and collaboration graphs will show the +# If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = NO -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES -# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a call dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable call graphs for selected +# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will +# generate a call dependency graph for every global function or class method. +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable call graphs for selected # functions only using the \callgraph command. CALL_GRAPH = NO -# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a caller dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable caller graphs for selected +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will +# generate a caller dependency graph for every global function or class method. +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable caller graphs for selected # functions only using the \callergraph command. CALLER_GRAPH = NO -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES -# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES -# then doxygen will show the dependencies a directory has on other directories +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, jpg, or gif # If left blank png will be used. DOT_IMAGE_FORMAT = png -# The tag DOT_PATH can be used to specify the path where the dot tool can be +# The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. -DOT_PATH = +DOT_PATH = -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the # \dotfile command). -DOTFILE_DIRS = +DOTFILE_DIRS = -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes -# that lay further from the root node will be omitted. Note that setting this -# option to 1 or 2 may greatly reduce the computation time needed for large -# code bases. Also note that a graph may be further truncated if the graph's -# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH -# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that a graph may be further truncated if the graph's +# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH +# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), # the graph is not depth-constrained. MAX_DOT_GRAPH_DEPTH = 0 -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is disabled by default, which results in a white background. -# Warning: Depending on the platform used, enabling this option may lead to -# badly anti-aliased labels on the edges of a graph (i.e. they become hard to +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, which results in a white background. +# Warning: Depending on the platform used, enabling this option may lead to +# badly anti-aliased labels on the edges of a graph (i.e. they become hard to # read). DOT_TRANSPARENT = NO -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -# files in one run (i.e. multiple -o and -T options on the command line). This -# makes dot run faster, but since only newer versions of dot (>1.8.10) +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = NO -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES #--------------------------------------------------------------------------- -# Configuration::additions related to the search engine +# Configuration::additions related to the search engine #--------------------------------------------------------------------------- -# The SEARCHENGINE tag specifies whether or not a search engine should be +# The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = NO diff --git a/libcpuid/Makefile.x64 b/libcpuid/Makefile.x64 index 8ff118c..6897466 100644 --- a/libcpuid/Makefile.x64 +++ b/libcpuid/Makefile.x64 @@ -1,36 +1,36 @@ -## Makefile for libcpuid, MSVC compiler, X64 - -all: libcpuid.lib - -ASM = ml64 /nologo -CC = cl.exe /nologo /TC -OPTFLAGS = /MT -DEFINES = /D "VERSION=\"0.4.1\"" -OBJECTS = masm-x64.obj asm-bits.obj cpuid_main.obj libcpuid_util.obj recog_amd.obj recog_intel.obj rdtsc.obj - -libcpuid.lib: $(OBJECTS) - lib /nologo /MACHINE:AMD64 /out:libcpuid.lib $(OBJECTS) bufferoverflowU.lib - -masm-x64.obj: masm-x64.asm - $(ASM) /c masm-x64.asm - -asm-bits.obj: asm-bits.c - $(CC) $(OPTFLAGS) $(DEFINES) /c asm-bits.c - -cpuid_main.obj: cpuid_main.c - $(CC) $(OPTFLAGS) $(DEFINES) /c cpuid_main.c - -libcpuid_util.obj: libcpuid_util.c - $(CC) $(OPTFLAGS) $(DEFINES) /c libcpuid_util.c - -recog_amd.obj: recog_amd.c - $(CC) $(OPTFLAGS) $(DEFINES) /c recog_amd.c - -recog_intel.obj: recog_intel.c - $(CC) $(OPTFLAGS) $(DEFINES) /c recog_intel.c - -rdtsc.obj: rdtsc.c - $(CC) $(OPTFLAGS) $(DEFINES) /c rdtsc.c - -clean: - del *.obj libcpuid.lib +## Makefile for libcpuid, MSVC compiler, X64 + +all: libcpuid.lib + +ASM = ml64 /nologo +CC = cl.exe /nologo /TC +OPTFLAGS = /MT +DEFINES = /D "VERSION=\"0.4.1\"" +OBJECTS = masm-x64.obj asm-bits.obj cpuid_main.obj libcpuid_util.obj recog_amd.obj recog_intel.obj rdtsc.obj + +libcpuid.lib: $(OBJECTS) + lib /nologo /MACHINE:AMD64 /out:libcpuid.lib $(OBJECTS) bufferoverflowU.lib + +masm-x64.obj: masm-x64.asm + $(ASM) /c masm-x64.asm + +asm-bits.obj: asm-bits.c + $(CC) $(OPTFLAGS) $(DEFINES) /c asm-bits.c + +cpuid_main.obj: cpuid_main.c + $(CC) $(OPTFLAGS) $(DEFINES) /c cpuid_main.c + +libcpuid_util.obj: libcpuid_util.c + $(CC) $(OPTFLAGS) $(DEFINES) /c libcpuid_util.c + +recog_amd.obj: recog_amd.c + $(CC) $(OPTFLAGS) $(DEFINES) /c recog_amd.c + +recog_intel.obj: recog_intel.c + $(CC) $(OPTFLAGS) $(DEFINES) /c recog_intel.c + +rdtsc.obj: rdtsc.c + $(CC) $(OPTFLAGS) $(DEFINES) /c rdtsc.c + +clean: + del *.obj libcpuid.lib diff --git a/libcpuid/Makefile.x86 b/libcpuid/Makefile.x86 index 90e0421..162f3af 100644 --- a/libcpuid/Makefile.x86 +++ b/libcpuid/Makefile.x86 @@ -1,40 +1,40 @@ -# Makefile for Win32 -# -# This is required on machines with multiple versions of the Microsoft compiler -# -# E.g. if you have Visual Studio 2008 and compile libcpuid with it, the static lib -# will not link in an executable, created through makefiles and MSVC 2003 (7.1). -# -# The solution is to use this custom makefile and compile libcpuid for MSVC 2003 -# - -all: libcpuid.lib - -CC = cl.exe /nologo /TC -OPTFLAGS = /MT -DEFINES = /D "VERSION=\"0.4.1\"" -OBJECTS = asm-bits.obj cpuid_main.obj libcpuid_util.obj recog_amd.obj recog_intel.obj rdtsc.obj - -libcpuid.lib: $(OBJECTS) - lib /nologo /out:libcpuid.lib $(OBJECTS) - -asm-bits.obj: asm-bits.c - $(CC) $(OPTFLAGS) $(DEFINES) /c asm-bits.c - -cpuid_main.obj: cpuid_main.c - $(CC) $(OPTFLAGS) $(DEFINES) /c cpuid_main.c - -libcpuid_util.obj: libcpuid_util.c - $(CC) $(OPTFLAGS) $(DEFINES) /c libcpuid_util.c - -recog_amd.obj: recog_amd.c - $(CC) $(OPTFLAGS) $(DEFINES) /c recog_amd.c - -recog_intel.obj: recog_intel.c - $(CC) $(OPTFLAGS) $(DEFINES) /c recog_intel.c - -rdtsc.obj: rdtsc.c - $(CC) $(OPTFLAGS) $(DEFINES) /c rdtsc.c - -clean: - del *.obj libcpuid.lib +# Makefile for Win32 +# +# This is required on machines with multiple versions of the Microsoft compiler +# +# E.g. if you have Visual Studio 2008 and compile libcpuid with it, the static lib +# will not link in an executable, created through makefiles and MSVC 2003 (7.1). +# +# The solution is to use this custom makefile and compile libcpuid for MSVC 2003 +# + +all: libcpuid.lib + +CC = cl.exe /nologo /TC +OPTFLAGS = /MT +DEFINES = /D "VERSION=\"0.4.1\"" +OBJECTS = asm-bits.obj cpuid_main.obj libcpuid_util.obj recog_amd.obj recog_intel.obj rdtsc.obj + +libcpuid.lib: $(OBJECTS) + lib /nologo /out:libcpuid.lib $(OBJECTS) + +asm-bits.obj: asm-bits.c + $(CC) $(OPTFLAGS) $(DEFINES) /c asm-bits.c + +cpuid_main.obj: cpuid_main.c + $(CC) $(OPTFLAGS) $(DEFINES) /c cpuid_main.c + +libcpuid_util.obj: libcpuid_util.c + $(CC) $(OPTFLAGS) $(DEFINES) /c libcpuid_util.c + +recog_amd.obj: recog_amd.c + $(CC) $(OPTFLAGS) $(DEFINES) /c recog_amd.c + +recog_intel.obj: recog_intel.c + $(CC) $(OPTFLAGS) $(DEFINES) /c recog_intel.c + +rdtsc.obj: rdtsc.c + $(CC) $(OPTFLAGS) $(DEFINES) /c rdtsc.c + +clean: + del *.obj libcpuid.lib diff --git a/libcpuid/amd_code_t.h b/libcpuid/amd_code_t.h index 058e895..d6d89f4 100644 --- a/libcpuid/amd_code_t.h +++ b/libcpuid/amd_code_t.h @@ -36,4 +36,4 @@ CODE(FUSION_EA), CODE(FUSION_Z), CODE(FUSION_A), - + diff --git a/libcpuid/asm-bits.c b/libcpuid/asm-bits.c index baf171c..db1f2fb 100644 --- a/libcpuid/asm-bits.c +++ b/libcpuid/asm-bits.c @@ -76,7 +76,7 @@ int cpuid_exists_by_eflags(void) } #ifdef INLINE_ASM_SUPPORTED -/* +/* * with MSVC/AMD64, the exec_cpuid() and cpu_rdtsc() functions * are implemented in separate .asm files. Otherwise, use inline assembly */ @@ -90,14 +90,14 @@ void exec_cpuid(uint32_t *regs) " push %%rbx\n" " push %%rcx\n" " push %%rdx\n" - + " mov (%%rdi), %%eax\n" " mov 4(%%rdi), %%ebx\n" " mov 8(%%rdi), %%ecx\n" " mov 12(%%rdi), %%edx\n" - + " cpuid\n" - + " movl %%eax, (%%rdi)\n" " movl %%ebx, 4(%%rdi)\n" " movl %%ecx, 8(%%rdi)\n" @@ -116,14 +116,14 @@ void exec_cpuid(uint32_t *regs) " push %%ebx\n" " push %%ecx\n" " push %%edx\n" - + " mov (%%edi), %%eax\n" " mov 4(%%edi), %%ebx\n" " mov 8(%%edi), %%ecx\n" " mov 12(%%edi), %%edx\n" - + " cpuid\n" - + " mov %%eax, (%%edi)\n" " mov %%ebx, 4(%%edi)\n" " mov %%ecx, 8(%%edi)\n" @@ -144,19 +144,19 @@ void exec_cpuid(uint32_t *regs) push edx push edi mov edi, regs - + mov eax, [edi] mov ebx, [edi+4] mov ecx, [edi+8] mov edx, [edi+12] - + cpuid - + mov [edi], eax mov [edi+4], ebx mov [edi+8], ecx mov [edi+12], edx - + pop edi pop edx pop ecx @@ -510,7 +510,7 @@ void busy_sse_loop(int cycles) " addps %%xmm6, %%xmm5\n" " addps %%xmm7, %%xmm6\n" " addps %%xmm0, %%xmm7\n" - + " dec %%eax\n" /* "jnz .bsLoop\n" */ " jnz 1b\n" diff --git a/libcpuid/cpuid_main.c b/libcpuid/cpuid_main.c index d51e096..2a1ab05 100644 --- a/libcpuid/cpuid_main.c +++ b/libcpuid/cpuid_main.c @@ -128,7 +128,7 @@ static int get_total_cpus(void) #if defined linux || defined __linux__ || defined __sun #include #include - + static int get_total_cpus(void) { return sysconf(_SC_NPROCESSORS_ONLN); @@ -314,7 +314,7 @@ static int cpuid_basic_identify(struct cpu_raw_data_t* raw, struct cpu_id_t* dat data->ext_model = data->model + (xmodel << 4); } ext = raw->ext_cpuid[0][0] - 0x8000000; - + /* obtain the brand string, if present: */ if (ext >= 4) { for (i = 0; i < 3; i++) @@ -417,13 +417,13 @@ int cpuid_serialize_raw_data(struct cpu_raw_data_t* data, const char* filename) { int i; FILE *f; - + if (!strcmp(filename, "")) f = stdout; else f = fopen(filename, "wt"); if (!f) return set_error(ERR_OPEN); - + fprintf(f, "version=%s\n", VERSION); for (i = 0; i < MAX_CPUID_LEVEL; i++) fprintf(f, "basic_cpuid[%d]=%08x %08x %08x %08x\n", i, @@ -449,7 +449,7 @@ int cpuid_serialize_raw_data(struct cpu_raw_data_t* data, const char* filename) fprintf(f, "intel_fn14h[%d]=%08x %08x %08x %08x\n", i, data->intel_fn14h[i][0], data->intel_fn14h[i][1], data->intel_fn14h[i][2], data->intel_fn14h[i][3]); - + if (strcmp(filename, "")) fclose(f); return set_error(ERR_OK); @@ -465,9 +465,9 @@ int cpuid_deserialize_raw_data(struct cpu_raw_data_t* data, const char* filename int cur_line = 0; int recognized; FILE *f; - + raw_data_t_constructor(data); - + if (!strcmp(filename, "")) f = stdin; else @@ -508,7 +508,7 @@ int cpuid_deserialize_raw_data(struct cpu_raw_data_t* data, const char* filename warnf("Warning: %s:%d not understood!\n", filename, cur_line); } } - + if (strcmp(filename, "")) fclose(f); return set_error(ERR_OK); diff --git a/libcpuid/embed_drivers.cpp b/libcpuid/embed_drivers.cpp index 38d7470..5fa2152 100644 --- a/libcpuid/embed_drivers.cpp +++ b/libcpuid/embed_drivers.cpp @@ -1,84 +1,84 @@ -// A simple utility to read and embed the MSR drivers for X86 - -#include -#include -#include -#include -#include -using namespace std; - -const char* drivers_root = "..\\contrib\\MSR Driver\\"; -const char* sourcefile = "msrdriver.c"; - -char* images[2]; -int sizes[2]; -const char* filenames[] = { "TmpRdr.sys", "TmpRdr64.sys" }; -vector source; - -bool read_image(const char* filename, char*& image, int& isize) -{ - char fn[512]; - sprintf(fn, "%s%s", drivers_root, filename); - FILE* f = fopen(fn, "rb"); - if (!f) return false; - fseek(f, 0, SEEK_END); - long size = ftell(f); - isize = (int) size; - rewind(f); - image = new char[size]; - fread(image, 1, size, f); - fclose(f); - return true; -} - -bool read_source(const char* filename) -{ - source.clear(); - FILE* f = fopen(filename, "rt"); - if (!f) return false; - char line[200]; - while (fgets(line, sizeof(line), f)) { - int i = (int) strlen(line); - if (i && line[i - 1] == '\n') line[--i] = 0; - source.push_back(string(line)); - } - fclose(f); - return true; -} - -void print_image(FILE* f, const char* arch, const char* image, int size) -{ - fprintf(f, "int cc_%sdriver_code_size = %d;\n", arch, size); - fprintf(f, "uint8_t cc_%sdriver_code[%d] = {", arch, size); - for (int i = 0; i < size; i++) { - if (i % 18 == 0) fprintf(f, "\n\t"); - fprintf(f, "0x%02x,", (unsigned) (unsigned char) image[i]); - } - fprintf(f, "\n};\n"); -} - -int main(void) -{ - for (int i = 0; i < 2; i++) - if (!read_image(filenames[i], images[i], sizes[i])) { - printf("Cannot read image `%s' from `%s'!\n", filenames[i], drivers_root); - return -1; - } - if (!read_source(sourcefile)) { - printf("Cannot read source `%s'\n", sourcefile); - return -2; - } - FILE* f = fopen(sourcefile, "wt"); - bool on = true; - for (unsigned i = 0; i < source.size(); i++) { - if (source[i] == "//} end") - on = true; - if (on) fprintf(f, "%s\n", source[i].c_str()); - if (source[i] == "//begin {") { - on = false; - print_image(f, "x86", images[0], sizes[0]); - print_image(f, "x64", images[1], sizes[1]); - } - } - return 0; -} +// A simple utility to read and embed the MSR drivers for X86 + +#include +#include +#include +#include +#include +using namespace std; + +const char* drivers_root = "..\\contrib\\MSR Driver\\"; +const char* sourcefile = "msrdriver.c"; + +char* images[2]; +int sizes[2]; +const char* filenames[] = { "TmpRdr.sys", "TmpRdr64.sys" }; +vector source; + +bool read_image(const char* filename, char*& image, int& isize) +{ + char fn[512]; + sprintf(fn, "%s%s", drivers_root, filename); + FILE* f = fopen(fn, "rb"); + if (!f) return false; + fseek(f, 0, SEEK_END); + long size = ftell(f); + isize = (int) size; + rewind(f); + image = new char[size]; + fread(image, 1, size, f); + fclose(f); + return true; +} + +bool read_source(const char* filename) +{ + source.clear(); + FILE* f = fopen(filename, "rt"); + if (!f) return false; + char line[200]; + while (fgets(line, sizeof(line), f)) { + int i = (int) strlen(line); + if (i && line[i - 1] == '\n') line[--i] = 0; + source.push_back(string(line)); + } + fclose(f); + return true; +} + +void print_image(FILE* f, const char* arch, const char* image, int size) +{ + fprintf(f, "int cc_%sdriver_code_size = %d;\n", arch, size); + fprintf(f, "uint8_t cc_%sdriver_code[%d] = {", arch, size); + for (int i = 0; i < size; i++) { + if (i % 18 == 0) fprintf(f, "\n\t"); + fprintf(f, "0x%02x,", (unsigned) (unsigned char) image[i]); + } + fprintf(f, "\n};\n"); +} + +int main(void) +{ + for (int i = 0; i < 2; i++) + if (!read_image(filenames[i], images[i], sizes[i])) { + printf("Cannot read image `%s' from `%s'!\n", filenames[i], drivers_root); + return -1; + } + if (!read_source(sourcefile)) { + printf("Cannot read source `%s'\n", sourcefile); + return -2; + } + FILE* f = fopen(sourcefile, "wt"); + bool on = true; + for (unsigned i = 0; i < source.size(); i++) { + if (source[i] == "//} end") + on = true; + if (on) fprintf(f, "%s\n", source[i].c_str()); + if (source[i] == "//begin {") { + on = false; + print_image(f, "x86", images[0], sizes[0]); + print_image(f, "x64", images[1], sizes[1]); + } + } + return 0; +} diff --git a/libcpuid/exports.def b/libcpuid/exports.def index b680d9e..acd9da3 100644 --- a/libcpuid/exports.def +++ b/libcpuid/exports.def @@ -1,35 +1,35 @@ -LIBRARY LIBCPUID - -EXPORTS -cpuid_present @1 -cpu_exec_cpuid @2 -cpu_exec_cpuid_ext @3 -cpuid_get_raw_data @4 -cpuid_serialize_raw_data @5 -cpuid_deserialize_raw_data @6 -cpu_identify @7 -cpu_feature_str @8 -cpuid_error @9 -cpu_rdtsc @10 -cpu_tsc_mark @11 -cpu_tsc_unmark @12 -cpu_clock_by_mark @13 -cpu_clock_by_os @14 -cpu_clock_measure @15 -cpu_clock @16 -cpuid_lib_version @17 -cpuid_set_warn_function @18 -cpuid_set_verbosiness_level @19 -cpuid_get_cpu_list @20 -cpuid_free_cpu_list @21 -cpu_msr_driver_open @22 -cpu_rdmsr @23 -cpu_msrinfo @24 -cpu_msr_driver_close @25 -cpu_clock_by_ic @26 -cpuid_get_total_cpus @27 -cpu_msr_driver_open_core @28 -cpuid_get_vendor @29 -cpu_rdmsr_range @30 -cpuid_get_epc @31 -msr_serialize_raw_data @32 +LIBRARY LIBCPUID + +EXPORTS +cpuid_present @1 +cpu_exec_cpuid @2 +cpu_exec_cpuid_ext @3 +cpuid_get_raw_data @4 +cpuid_serialize_raw_data @5 +cpuid_deserialize_raw_data @6 +cpu_identify @7 +cpu_feature_str @8 +cpuid_error @9 +cpu_rdtsc @10 +cpu_tsc_mark @11 +cpu_tsc_unmark @12 +cpu_clock_by_mark @13 +cpu_clock_by_os @14 +cpu_clock_measure @15 +cpu_clock @16 +cpuid_lib_version @17 +cpuid_set_warn_function @18 +cpuid_set_verbosiness_level @19 +cpuid_get_cpu_list @20 +cpuid_free_cpu_list @21 +cpu_msr_driver_open @22 +cpu_rdmsr @23 +cpu_msrinfo @24 +cpu_msr_driver_close @25 +cpu_clock_by_ic @26 +cpuid_get_total_cpus @27 +cpu_msr_driver_open_core @28 +cpuid_get_vendor @29 +cpu_rdmsr_range @30 +cpuid_get_epc @31 +msr_serialize_raw_data @32 diff --git a/libcpuid/intel_code_t.h b/libcpuid/intel_code_t.h index 718ca33..41fd15d 100644 --- a/libcpuid/intel_code_t.h +++ b/libcpuid/intel_code_t.h @@ -29,20 +29,20 @@ * of no external use and isn't a complete list of intel products. */ CODE2(PENTIUM, 2000), - + CODE(IRWIN), CODE(POTOMAC), CODE(GAINESTOWN), CODE(WESTMERE), - + CODE(PENTIUM_M), - CODE(NOT_CELERON), - + CODE(NOT_CELERON), + CODE(CORE_SOLO), CODE(MOBILE_CORE_SOLO), CODE(CORE_DUO), CODE(MOBILE_CORE_DUO), - + CODE(WOLFDALE), CODE(MEROM), CODE(PENRYN), @@ -51,7 +51,7 @@ CODE(QUAD_CORE_HT), CODE(MORE_THAN_QUADCORE), CODE(PENTIUM_D), - + CODE(SILVERTHORNE), CODE(DIAMONDVILLE), CODE(PINEVIEW), diff --git a/libcpuid/libcpuid.dsp b/libcpuid/libcpuid.dsp index 380fd6b..7d63ef2 100644 --- a/libcpuid/libcpuid.dsp +++ b/libcpuid/libcpuid.dsp @@ -1,156 +1,156 @@ -# Microsoft Developer Studio Project File - Name="libcpuid" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=libcpuid - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "libcpuid.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "libcpuid.mak" CFG="libcpuid - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "libcpuid - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "libcpuid - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "libcpuid - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D VERSION=\"0.4.1\" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "libcpuid - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D VERSION=\"0.4.1\" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "libcpuid - Win32 Release" -# Name "libcpuid - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=".\asm-bits.c" -# End Source File -# Begin Source File - -SOURCE=.\cpuid_main.c -# End Source File -# Begin Source File - -SOURCE=.\libcpuid_util.c -# End Source File -# Begin Source File - -SOURCE=.\msrdriver.c -# End Source File -# Begin Source File - -SOURCE=.\rdmsr.c -# End Source File -# Begin Source File - -SOURCE=.\rdtsc.c -# End Source File -# Begin Source File - -SOURCE=.\recog_amd.c -# End Source File -# Begin Source File - -SOURCE=.\recog_intel.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=".\asm-bits.h" -# End Source File -# Begin Source File - -SOURCE=.\libcpuid.h -# End Source File -# Begin Source File - -SOURCE=.\libcpuid_constants.h -# End Source File -# Begin Source File - -SOURCE=.\libcpuid_types.h -# End Source File -# Begin Source File - -SOURCE=.\libcpuid_util.h -# End Source File -# Begin Source File - -SOURCE=.\rdtsc.h -# End Source File -# Begin Source File - -SOURCE=.\recog_amd.h -# End Source File -# Begin Source File - -SOURCE=.\recog_intel.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="libcpuid" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=libcpuid - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "libcpuid.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "libcpuid.mak" CFG="libcpuid - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "libcpuid - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "libcpuid - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "libcpuid - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D VERSION=\"0.4.1\" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "libcpuid - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D VERSION=\"0.4.1\" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "libcpuid - Win32 Release" +# Name "libcpuid - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=".\asm-bits.c" +# End Source File +# Begin Source File + +SOURCE=.\cpuid_main.c +# End Source File +# Begin Source File + +SOURCE=.\libcpuid_util.c +# End Source File +# Begin Source File + +SOURCE=.\msrdriver.c +# End Source File +# Begin Source File + +SOURCE=.\rdmsr.c +# End Source File +# Begin Source File + +SOURCE=.\rdtsc.c +# End Source File +# Begin Source File + +SOURCE=.\recog_amd.c +# End Source File +# Begin Source File + +SOURCE=.\recog_intel.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=".\asm-bits.h" +# End Source File +# Begin Source File + +SOURCE=.\libcpuid.h +# End Source File +# Begin Source File + +SOURCE=.\libcpuid_constants.h +# End Source File +# Begin Source File + +SOURCE=.\libcpuid_types.h +# End Source File +# Begin Source File + +SOURCE=.\libcpuid_util.h +# End Source File +# Begin Source File + +SOURCE=.\rdtsc.h +# End Source File +# Begin Source File + +SOURCE=.\recog_amd.h +# End Source File +# Begin Source File + +SOURCE=.\recog_intel.h +# End Source File +# End Group +# End Target +# End Project diff --git a/libcpuid/libcpuid.h b/libcpuid/libcpuid.h index 63cd1d2..82bc664 100644 --- a/libcpuid/libcpuid.h +++ b/libcpuid/libcpuid.h @@ -61,7 +61,7 @@ */ /** @mainpage A simple libcpuid introduction - * + * * LibCPUID provides CPU identification and access to the CPUID and RDTSC * instructions on the x86. *

@@ -74,7 +74,7 @@ * \ref cpu_tsc_mark + \ref cpu_tsc_unmark + \ref cpu_clock_by_mark, * \ref cpu_clock_measure or \ref cpu_clock_by_ic. * Read carefully for pros/cons of each method.
- * + * * To read MSRs, use \ref cpu_msr_driver_open to get a handle, and then * \ref cpu_rdmsr for querying abilities. Some MSR decoding is available on recent * CPUs, and can be queried through \ref cpu_msrinfo; the various types of queries @@ -111,7 +111,7 @@ typedef enum { VENDOR_SIS, /*!< x86 CPU by SiS */ VENDOR_NSC, /*!< x86 CPU by National Semiconductor */ VENDOR_HYGON, /*!< Hygon CPU */ - + NUM_CPU_VENDORS, /*!< Valid CPU vendor ids: 0..NUM_CPU_VENDORS - 1 */ VENDOR_UNKNOWN = -1, } cpu_vendor_t; @@ -130,17 +130,17 @@ struct cpu_raw_data_t { /** contains results of CPUID for eax = 0x80000000, 0x80000001, ...*/ uint32_t ext_cpuid[MAX_EXT_CPUID_LEVEL][4]; - + /** when the CPU is intel and it supports deterministic cache information: this contains the results of CPUID for eax = 4 and ecx = 0, 1, ... */ uint32_t intel_fn4[MAX_INTELFN4_LEVEL][4]; - + /** when the CPU is intel and it supports leaf 0Bh (Extended Topology - enumeration leaf), this stores the result of CPUID with + enumeration leaf), this stores the result of CPUID with eax = 11 and ecx = 0, 1, 2... */ uint32_t intel_fn11[MAX_INTELFN11_LEVEL][4]; - + /** when the CPU is intel and supports leaf 12h (SGX enumeration leaf), * this stores the result of CPUID with eax = 0x12 and * ecx = 0, 1, 2... */ @@ -160,7 +160,7 @@ struct cpu_raw_data_t { * ... * struct cpu_raw_data_t raw; * struct cpu_id_t id; - * + * * if (cpuid_get_raw_data(&raw) == 0 && cpu_identify(&raw, &id) == 0 && id.sgx.present) { * printf("SGX is present.\n"); * printf("SGX1 instructions: %s.\n", id.sgx.flags[INTEL_SGX1] ? "present" : "absent"); @@ -175,42 +175,42 @@ struct cpu_raw_data_t { * printf("SGX is not present.\n"); * } * @endcode - */ + */ struct cpu_sgx_t { /** Whether SGX is present (boolean) */ uint32_t present; - + /** Max enclave size in 32-bit mode. This is a power-of-two value: * if it is "31", then the max enclave size is 2^31 bytes (2 GiB). */ uint8_t max_enclave_32bit; - + /** Max enclave size in 64-bit mode. This is a power-of-two value: * if it is "36", then the max enclave size is 2^36 bytes (64 GiB). */ uint8_t max_enclave_64bit; - + /** * contains SGX feature flags. See the \ref cpu_sgx_feature_t * "INTEL_SGX*" macros below. */ uint8_t flags[SGX_FLAGS_MAX]; - + /** number of Enclave Page Cache (EPC) sections. Info for each * section is available through the \ref cpuid_get_epc() function */ int num_epc_sections; - + /** bit vector of the supported extended features that can be written * to the MISC region of the SSA (Save State Area) - */ + */ uint32_t misc_select; - + /** a bit vector of the attributes that can be set to SECS.ATTRIBUTES * via ECREATE. Corresponds to bits 0-63 (incl.) of SECS.ATTRIBUTES. - */ + */ uint64_t secs_attributes; - + /** a bit vector of the bits that can be set in the XSAVE feature * request mask; Corresponds to bits 64-127 of SECS.ATTRIBUTES. */ @@ -223,45 +223,45 @@ struct cpu_sgx_t { struct cpu_id_t { /** contains the CPU vendor string, e.g. "GenuineIntel" */ char vendor_str[VENDOR_STR_MAX]; - + /** contains the brand string, e.g. "Intel(R) Xeon(TM) CPU 2.40GHz" */ char brand_str[BRAND_STR_MAX]; - + /** contains the recognized CPU vendor */ cpu_vendor_t vendor; - + /** * contain CPU flags. Used to test for features. See * the \ref cpu_feature_t "CPU_FEATURE_*" macros below. * @see Features */ uint8_t flags[CPU_FLAGS_MAX]; - + /** CPU family */ int32_t family; - + /** CPU model */ int32_t model; - + /** CPU stepping */ int32_t stepping; - + /** CPU extended family */ int32_t ext_family; - + /** CPU extended model */ int32_t ext_model; - + /** Number of CPU cores on the current processor */ int32_t num_cores; - + /** * Number of logical processors on the current processor. * Could be more than the number of physical cores, * e.g. when the processor has HyperThreading. */ int32_t num_logical_cpus; - + /** * The total number of logical processors. * The same value is available through \ref cpuid_get_total_cpus. @@ -277,13 +277,13 @@ struct cpu_id_t { * */ int32_t total_logical_cpus; - + /** * L1 data cache size in KB. Could be zero, if the CPU lacks cache. * If the size cannot be determined, it will be -1. */ int32_t l1_data_cache; - + /** * L1 instruction cache size in KB. Could be zero, if the CPU lacks * cache. If the size cannot be determined, it will be -1. @@ -291,40 +291,40 @@ struct cpu_id_t { * a trace cache, the size will be expressed in K uOps. */ int32_t l1_instruction_cache; - + /** * L2 cache size in KB. Could be zero, if the CPU lacks L2 cache. * If the size of the cache could not be determined, it will be -1 */ int32_t l2_cache; - + /** L3 cache size in KB. Zero on most systems */ int32_t l3_cache; /** L4 cache size in KB. Zero on most systems */ int32_t l4_cache; - + /** Cache associativity for the L1 data cache. -1 if undetermined */ int32_t l1_assoc; - + /** Cache associativity for the L2 cache. -1 if undetermined */ int32_t l2_assoc; - + /** Cache associativity for the L3 cache. -1 if undetermined */ int32_t l3_assoc; /** Cache associativity for the L4 cache. -1 if undetermined */ int32_t l4_assoc; - + /** Cache-line size for L1 data cache. -1 if undetermined */ int32_t l1_cacheline; - + /** Cache-line size for L2 cache. -1 if undetermined */ int32_t l2_cacheline; - + /** Cache-line size for L3 cache. -1 if undetermined */ int32_t l3_cacheline; - + /** Cache-line size for L4 cache. -1 if undetermined */ int32_t l4_cacheline; @@ -343,17 +343,17 @@ struct cpu_id_t { * @endcode */ char cpu_codename[64]; - + /** SSE execution unit size (64 or 128; -1 if N/A) */ int32_t sse_size; - + /** * contain miscellaneous detection information. Used to test about specifics of * certain detected features. See \ref cpu_hint_t "CPU_HINT_*" macros below. * @see Hints */ uint8_t detection_hints[CPU_HINTS_MAX]; - + /** contains information about SGX features if the processor, if present */ struct cpu_sgx_t sgx; }; @@ -526,11 +526,11 @@ typedef enum { * } * @endcode */ - + typedef enum { INTEL_SGX1, /*!< SGX1 instructions support */ INTEL_SGX2, /*!< SGX2 instructions support */ - + /* termination: */ NUM_SGX_FEATURES, } cpu_sgx_feature_t; @@ -859,7 +859,7 @@ int cpu_clock_measure(int millis, int quad_check); * * Recommended values - millis = 50, runs = 4. For more robustness, * increase the number of runs. - * + * * NOTE: on Bulldozer and later CPUs, the busy-wait cycle runs at 1.4 IPC, thus * the results are skewed. This is corrected internally by dividing the resulting * value by 1.4. @@ -894,7 +894,7 @@ int cpu_clock(void); * Describes an EPC (Enclave Page Cache) layout (physical address and size). * A CPU may have one or more EPC areas, and information about each is * fetched via \ref cpuid_get_epc. - */ + */ struct cpu_epc_t { uint64_t start_addr; uint64_t length; diff --git a/libcpuid/libcpuid_internal.h b/libcpuid/libcpuid_internal.h index c6c5ad8..1895475 100644 --- a/libcpuid/libcpuid_internal.h +++ b/libcpuid/libcpuid_internal.h @@ -105,7 +105,7 @@ typedef enum _amd_bits_t amd_bits_t; -int cpu_ident_internal(struct cpu_raw_data_t* raw, struct cpu_id_t* data, +int cpu_ident_internal(struct cpu_raw_data_t* raw, struct cpu_id_t* data, struct internal_id_info_t* internal); #endif /* __LIBCPUID_INTERNAL_H__ */ diff --git a/libcpuid/libcpuid_util.c b/libcpuid/libcpuid_util.c index 4de1871..f7a0868 100644 --- a/libcpuid/libcpuid_util.c +++ b/libcpuid/libcpuid_util.c @@ -77,12 +77,12 @@ void debugf(int verboselevel, const char* format, ...) static int popcount64(uint64_t mask) { int num_set_bits = 0; - + while (mask) { mask &= mask - 1; num_set_bits++; } - + return num_set_bits; } @@ -100,7 +100,7 @@ static int score(const struct match_entry_t* entry, const struct cpu_id_t* data, if (entry->l3cache == data->l3_cache ) res += 1; if (entry->brand_code == brand_code ) res += 2; if (entry->model_code == model_code ) res += 2; - + res += popcount64(entry->model_bits & bits) * 2; return res; } @@ -112,11 +112,11 @@ int match_cpu_codename(const struct match_entry_t* matchtable, int count, int bestscore = -1; int bestindex = 0; int i, t; - + debugf(3, "Matching cpu f:%d, m:%d, s:%d, xf:%d, xm:%d, ncore:%d, l2:%d, bcode:%d, bits:%llu, code:%d\n", data->family, data->model, data->stepping, data->ext_family, data->ext_model, data->num_cores, data->l2_cache, brand_code, (unsigned long long) bits, model_code); - + for (i = 0; i < count; i++) { t = score(&matchtable[i], data, brand_code, bits, model_code); debugf(3, "Entry %d, `%s', score %d\n", i, matchtable[i].name, t); diff --git a/libcpuid/libcpuid_util.h b/libcpuid/libcpuid_util.h index c3b5393..2ccc535 100644 --- a/libcpuid/libcpuid_util.h +++ b/libcpuid/libcpuid_util.h @@ -32,7 +32,7 @@ struct feature_map_t { unsigned bit; cpu_feature_t feature; }; - + void match_features(const struct feature_map_t* matchtable, int count, uint32_t reg, struct cpu_id_t* data); diff --git a/libcpuid/libcpuid_vc10.vcxproj b/libcpuid/libcpuid_vc10.vcxproj index e36efa3..c76ad27 100644 --- a/libcpuid/libcpuid_vc10.vcxproj +++ b/libcpuid/libcpuid_vc10.vcxproj @@ -1,216 +1,216 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - ReleaseDLL - Win32 - - - ReleaseDLL - x64 - - - Release - Win32 - - - Release - x64 - - - - libcpuid - {92BDBA37-96E3-4D85-B762-185E4407BB49} - libcpuid - Win32Proj - - - - StaticLibrary - NotSet - true - - - DynamicLibrary - NotSet - true - - - StaticLibrary - NotSet - true - - - DynamicLibrary - NotSet - true - - - StaticLibrary - NotSet - - - StaticLibrary - NotSet - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(ProjectDir)x$(PlatformArchitecture)\$(Configuration)\ - $(ProjectDir)x$(PlatformArchitecture)\$(Configuration)\ - x$(PlatformArchitecture)\$(Configuration)\ - x$(PlatformArchitecture)\$(Configuration)\ - $(ProjectDir)x$(PlatformArchitecture)\$(Configuration)\ - $(ProjectDir)x$(PlatformArchitecture)\$(Configuration)\ - $(ProjectDir)x$(PlatformArchitecture)\$(Configuration)\ - $(ProjectDir)x$(PlatformArchitecture)\$(Configuration)\ - x$(PlatformArchitecture)\$(Configuration)\ - x$(PlatformArchitecture)\$(Configuration)\ - x$(PlatformArchitecture)\$(Configuration)\ - x$(PlatformArchitecture)\$(Configuration)\ - - - - Disabled - WIN32;_DEBUG;_LIB;VERSION="0.4.1";%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - - - Level3 - EditAndContinue - CompileAsC - 4996;%(DisableSpecificWarnings) - - - - - Disabled - WIN32;_DEBUG;_LIB;VERSION="0.4.1";%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebug - - - Level3 - ProgramDatabase - CompileAsC - 4996;%(DisableSpecificWarnings) - - - - - WIN32;NDEBUG;_LIB;VERSION="0.4.1";%(PreprocessorDefinitions) - MultiThreaded - - - Level3 - ProgramDatabase - CompileAsC - 4996;%(DisableSpecificWarnings) - - - - - WIN32;NDEBUG;_LIB;VERSION="0.4.1";%(PreprocessorDefinitions) - MultiThreaded - - - Level3 - ProgramDatabase - CompileAsC - 4996;%(DisableSpecificWarnings) - - - exports.def - - - - - WIN32;NDEBUG;_LIB;VERSION="0.4.1";%(PreprocessorDefinitions) - MultiThreaded - - - Level3 - ProgramDatabase - CompileAsC - 4996;%(DisableSpecificWarnings) - - - - - WIN32;NDEBUG;_LIB;VERSION="0.4.1";%(PreprocessorDefinitions) - MultiThreaded - - - Level3 - ProgramDatabase - CompileAsC - 4996;%(DisableSpecificWarnings) - - - exports.def - - - - - - - - - - - - - - - - - - - - - - - - - true - true - true - - - - - - - \ No newline at end of file + + + + + Debug + Win32 + + + Debug + x64 + + + ReleaseDLL + Win32 + + + ReleaseDLL + x64 + + + Release + Win32 + + + Release + x64 + + + + libcpuid + {92BDBA37-96E3-4D85-B762-185E4407BB49} + libcpuid + Win32Proj + + + + StaticLibrary + NotSet + true + + + DynamicLibrary + NotSet + true + + + StaticLibrary + NotSet + true + + + DynamicLibrary + NotSet + true + + + StaticLibrary + NotSet + + + StaticLibrary + NotSet + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + $(ProjectDir)x$(PlatformArchitecture)\$(Configuration)\ + $(ProjectDir)x$(PlatformArchitecture)\$(Configuration)\ + x$(PlatformArchitecture)\$(Configuration)\ + x$(PlatformArchitecture)\$(Configuration)\ + $(ProjectDir)x$(PlatformArchitecture)\$(Configuration)\ + $(ProjectDir)x$(PlatformArchitecture)\$(Configuration)\ + $(ProjectDir)x$(PlatformArchitecture)\$(Configuration)\ + $(ProjectDir)x$(PlatformArchitecture)\$(Configuration)\ + x$(PlatformArchitecture)\$(Configuration)\ + x$(PlatformArchitecture)\$(Configuration)\ + x$(PlatformArchitecture)\$(Configuration)\ + x$(PlatformArchitecture)\$(Configuration)\ + + + + Disabled + WIN32;_DEBUG;_LIB;VERSION="0.4.1";%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + CompileAsC + 4996;%(DisableSpecificWarnings) + + + + + Disabled + WIN32;_DEBUG;_LIB;VERSION="0.4.1";%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + CompileAsC + 4996;%(DisableSpecificWarnings) + + + + + WIN32;NDEBUG;_LIB;VERSION="0.4.1";%(PreprocessorDefinitions) + MultiThreaded + + + Level3 + ProgramDatabase + CompileAsC + 4996;%(DisableSpecificWarnings) + + + + + WIN32;NDEBUG;_LIB;VERSION="0.4.1";%(PreprocessorDefinitions) + MultiThreaded + + + Level3 + ProgramDatabase + CompileAsC + 4996;%(DisableSpecificWarnings) + + + exports.def + + + + + WIN32;NDEBUG;_LIB;VERSION="0.4.1";%(PreprocessorDefinitions) + MultiThreaded + + + Level3 + ProgramDatabase + CompileAsC + 4996;%(DisableSpecificWarnings) + + + + + WIN32;NDEBUG;_LIB;VERSION="0.4.1";%(PreprocessorDefinitions) + MultiThreaded + + + Level3 + ProgramDatabase + CompileAsC + 4996;%(DisableSpecificWarnings) + + + exports.def + + + + + + + + + + + + + + + + + + + + + + + + + true + true + true + + + + + + + \ No newline at end of file diff --git a/libcpuid/libcpuid_vc10.vcxproj.filters b/libcpuid/libcpuid_vc10.vcxproj.filters index eb26ef3..b61e7f5 100644 --- a/libcpuid/libcpuid_vc10.vcxproj.filters +++ b/libcpuid/libcpuid_vc10.vcxproj.filters @@ -1,74 +1,74 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + \ No newline at end of file diff --git a/libcpuid/libcpuid_vc71.vcproj b/libcpuid/libcpuid_vc71.vcproj index 0d4d845..e58189a 100644 --- a/libcpuid/libcpuid_vc71.vcproj +++ b/libcpuid/libcpuid_vc71.vcproj @@ -1,226 +1,226 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libcpuid/masm-x64.asm b/libcpuid/masm-x64.asm index 51e9865..e9d6a54 100644 --- a/libcpuid/masm-x64.asm +++ b/libcpuid/masm-x64.asm @@ -1,359 +1,359 @@ - -.code -; procedure exec_cpuid -; Signature: void exec_cpiud(uint32_t *regs) -exec_cpuid Proc - push rbx - push rcx - push rdx - push rdi - - mov rdi, rcx - - mov eax, [rdi] - mov ebx, [rdi+4] - mov ecx, [rdi+8] - mov edx, [rdi+12] - - cpuid - - mov [rdi], eax - mov [rdi+4], ebx - mov [rdi+8], ecx - mov [rdi+12], edx - pop rdi - pop rdx - pop rcx - pop rbx - ret -exec_cpuid endp - -; procedure cpu_rdtsc -; Signature: void cpu_rdtsc(uint64_t *result) -cpu_rdtsc Proc - push rdx - rdtsc - mov [rcx], eax - mov [rcx+4], edx - pop rdx - ret -cpu_rdtsc endp - -; procedure busy_sse_loop -; Signature: void busy_sse_loop(int cycles) -busy_sse_loop Proc - ; save xmm6 & xmm7 into the shadow area, as Visual C++ 2008 - ; expects that we don't touch them: - movups [rsp + 8], xmm6 - movups [rsp + 24], xmm7 - - xorps xmm0, xmm0 - xorps xmm1, xmm1 - xorps xmm2, xmm2 - xorps xmm3, xmm3 - xorps xmm4, xmm4 - xorps xmm5, xmm5 - xorps xmm6, xmm6 - xorps xmm7, xmm7 - ; -- - align 16 -bsLoop: - ; 0: - addps xmm0, xmm1 - addps xmm1, xmm2 - addps xmm2, xmm3 - addps xmm3, xmm4 - addps xmm4, xmm5 - addps xmm5, xmm6 - addps xmm6, xmm7 - addps xmm7, xmm0 - ; 1: - addps xmm0, xmm1 - addps xmm1, xmm2 - addps xmm2, xmm3 - addps xmm3, xmm4 - addps xmm4, xmm5 - addps xmm5, xmm6 - addps xmm6, xmm7 - addps xmm7, xmm0 - ; 2: - addps xmm0, xmm1 - addps xmm1, xmm2 - addps xmm2, xmm3 - addps xmm3, xmm4 - addps xmm4, xmm5 - addps xmm5, xmm6 - addps xmm6, xmm7 - addps xmm7, xmm0 - ; 3: - addps xmm0, xmm1 - addps xmm1, xmm2 - addps xmm2, xmm3 - addps xmm3, xmm4 - addps xmm4, xmm5 - addps xmm5, xmm6 - addps xmm6, xmm7 - addps xmm7, xmm0 - ; 4: - addps xmm0, xmm1 - addps xmm1, xmm2 - addps xmm2, xmm3 - addps xmm3, xmm4 - addps xmm4, xmm5 - addps xmm5, xmm6 - addps xmm6, xmm7 - addps xmm7, xmm0 - ; 5: - addps xmm0, xmm1 - addps xmm1, xmm2 - addps xmm2, xmm3 - addps xmm3, xmm4 - addps xmm4, xmm5 - addps xmm5, xmm6 - addps xmm6, xmm7 - addps xmm7, xmm0 - ; 6: - addps xmm0, xmm1 - addps xmm1, xmm2 - addps xmm2, xmm3 - addps xmm3, xmm4 - addps xmm4, xmm5 - addps xmm5, xmm6 - addps xmm6, xmm7 - addps xmm7, xmm0 - ; 7: - addps xmm0, xmm1 - addps xmm1, xmm2 - addps xmm2, xmm3 - addps xmm3, xmm4 - addps xmm4, xmm5 - addps xmm5, xmm6 - addps xmm6, xmm7 - addps xmm7, xmm0 - ; 8: - addps xmm0, xmm1 - addps xmm1, xmm2 - addps xmm2, xmm3 - addps xmm3, xmm4 - addps xmm4, xmm5 - addps xmm5, xmm6 - addps xmm6, xmm7 - addps xmm7, xmm0 - ; 9: - addps xmm0, xmm1 - addps xmm1, xmm2 - addps xmm2, xmm3 - addps xmm3, xmm4 - addps xmm4, xmm5 - addps xmm5, xmm6 - addps xmm6, xmm7 - addps xmm7, xmm0 - ; 10: - addps xmm0, xmm1 - addps xmm1, xmm2 - addps xmm2, xmm3 - addps xmm3, xmm4 - addps xmm4, xmm5 - addps xmm5, xmm6 - addps xmm6, xmm7 - addps xmm7, xmm0 - ; 11: - addps xmm0, xmm1 - addps xmm1, xmm2 - addps xmm2, xmm3 - addps xmm3, xmm4 - addps xmm4, xmm5 - addps xmm5, xmm6 - addps xmm6, xmm7 - addps xmm7, xmm0 - ; 12: - addps xmm0, xmm1 - addps xmm1, xmm2 - addps xmm2, xmm3 - addps xmm3, xmm4 - addps xmm4, xmm5 - addps xmm5, xmm6 - addps xmm6, xmm7 - addps xmm7, xmm0 - ; 13: - addps xmm0, xmm1 - addps xmm1, xmm2 - addps xmm2, xmm3 - addps xmm3, xmm4 - addps xmm4, xmm5 - addps xmm5, xmm6 - addps xmm6, xmm7 - addps xmm7, xmm0 - ; 14: - addps xmm0, xmm1 - addps xmm1, xmm2 - addps xmm2, xmm3 - addps xmm3, xmm4 - addps xmm4, xmm5 - addps xmm5, xmm6 - addps xmm6, xmm7 - addps xmm7, xmm0 - ; 15: - addps xmm0, xmm1 - addps xmm1, xmm2 - addps xmm2, xmm3 - addps xmm3, xmm4 - addps xmm4, xmm5 - addps xmm5, xmm6 - addps xmm6, xmm7 - addps xmm7, xmm0 - ; 16: - addps xmm0, xmm1 - addps xmm1, xmm2 - addps xmm2, xmm3 - addps xmm3, xmm4 - addps xmm4, xmm5 - addps xmm5, xmm6 - addps xmm6, xmm7 - addps xmm7, xmm0 - ; 17: - addps xmm0, xmm1 - addps xmm1, xmm2 - addps xmm2, xmm3 - addps xmm3, xmm4 - addps xmm4, xmm5 - addps xmm5, xmm6 - addps xmm6, xmm7 - addps xmm7, xmm0 - ; 18: - addps xmm0, xmm1 - addps xmm1, xmm2 - addps xmm2, xmm3 - addps xmm3, xmm4 - addps xmm4, xmm5 - addps xmm5, xmm6 - addps xmm6, xmm7 - addps xmm7, xmm0 - ; 19: - addps xmm0, xmm1 - addps xmm1, xmm2 - addps xmm2, xmm3 - addps xmm3, xmm4 - addps xmm4, xmm5 - addps xmm5, xmm6 - addps xmm6, xmm7 - addps xmm7, xmm0 - ; 20: - addps xmm0, xmm1 - addps xmm1, xmm2 - addps xmm2, xmm3 - addps xmm3, xmm4 - addps xmm4, xmm5 - addps xmm5, xmm6 - addps xmm6, xmm7 - addps xmm7, xmm0 - ; 21: - addps xmm0, xmm1 - addps xmm1, xmm2 - addps xmm2, xmm3 - addps xmm3, xmm4 - addps xmm4, xmm5 - addps xmm5, xmm6 - addps xmm6, xmm7 - addps xmm7, xmm0 - ; 22: - addps xmm0, xmm1 - addps xmm1, xmm2 - addps xmm2, xmm3 - addps xmm3, xmm4 - addps xmm4, xmm5 - addps xmm5, xmm6 - addps xmm6, xmm7 - addps xmm7, xmm0 - ; 23: - addps xmm0, xmm1 - addps xmm1, xmm2 - addps xmm2, xmm3 - addps xmm3, xmm4 - addps xmm4, xmm5 - addps xmm5, xmm6 - addps xmm6, xmm7 - addps xmm7, xmm0 - ; 24: - addps xmm0, xmm1 - addps xmm1, xmm2 - addps xmm2, xmm3 - addps xmm3, xmm4 - addps xmm4, xmm5 - addps xmm5, xmm6 - addps xmm6, xmm7 - addps xmm7, xmm0 - ; 25: - addps xmm0, xmm1 - addps xmm1, xmm2 - addps xmm2, xmm3 - addps xmm3, xmm4 - addps xmm4, xmm5 - addps xmm5, xmm6 - addps xmm6, xmm7 - addps xmm7, xmm0 - ; 26: - addps xmm0, xmm1 - addps xmm1, xmm2 - addps xmm2, xmm3 - addps xmm3, xmm4 - addps xmm4, xmm5 - addps xmm5, xmm6 - addps xmm6, xmm7 - addps xmm7, xmm0 - ; 27: - addps xmm0, xmm1 - addps xmm1, xmm2 - addps xmm2, xmm3 - addps xmm3, xmm4 - addps xmm4, xmm5 - addps xmm5, xmm6 - addps xmm6, xmm7 - addps xmm7, xmm0 - ; 28: - addps xmm0, xmm1 - addps xmm1, xmm2 - addps xmm2, xmm3 - addps xmm3, xmm4 - addps xmm4, xmm5 - addps xmm5, xmm6 - addps xmm6, xmm7 - addps xmm7, xmm0 - ; 29: - addps xmm0, xmm1 - addps xmm1, xmm2 - addps xmm2, xmm3 - addps xmm3, xmm4 - addps xmm4, xmm5 - addps xmm5, xmm6 - addps xmm6, xmm7 - addps xmm7, xmm0 - ; 30: - addps xmm0, xmm1 - addps xmm1, xmm2 - addps xmm2, xmm3 - addps xmm3, xmm4 - addps xmm4, xmm5 - addps xmm5, xmm6 - addps xmm6, xmm7 - addps xmm7, xmm0 - ; 31: - addps xmm0, xmm1 - addps xmm1, xmm2 - addps xmm2, xmm3 - addps xmm3, xmm4 - addps xmm4, xmm5 - addps xmm5, xmm6 - addps xmm6, xmm7 - addps xmm7, xmm0 - ; ---------------------- - dec ecx - jnz bsLoop - - ; restore xmm6 & xmm7: - movups xmm6, [rsp + 8] - movups xmm7, [rsp + 24] - ret -busy_sse_loop endp - -END + +.code +; procedure exec_cpuid +; Signature: void exec_cpiud(uint32_t *regs) +exec_cpuid Proc + push rbx + push rcx + push rdx + push rdi + + mov rdi, rcx + + mov eax, [rdi] + mov ebx, [rdi+4] + mov ecx, [rdi+8] + mov edx, [rdi+12] + + cpuid + + mov [rdi], eax + mov [rdi+4], ebx + mov [rdi+8], ecx + mov [rdi+12], edx + pop rdi + pop rdx + pop rcx + pop rbx + ret +exec_cpuid endp + +; procedure cpu_rdtsc +; Signature: void cpu_rdtsc(uint64_t *result) +cpu_rdtsc Proc + push rdx + rdtsc + mov [rcx], eax + mov [rcx+4], edx + pop rdx + ret +cpu_rdtsc endp + +; procedure busy_sse_loop +; Signature: void busy_sse_loop(int cycles) +busy_sse_loop Proc + ; save xmm6 & xmm7 into the shadow area, as Visual C++ 2008 + ; expects that we don't touch them: + movups [rsp + 8], xmm6 + movups [rsp + 24], xmm7 + + xorps xmm0, xmm0 + xorps xmm1, xmm1 + xorps xmm2, xmm2 + xorps xmm3, xmm3 + xorps xmm4, xmm4 + xorps xmm5, xmm5 + xorps xmm6, xmm6 + xorps xmm7, xmm7 + ; -- + align 16 +bsLoop: + ; 0: + addps xmm0, xmm1 + addps xmm1, xmm2 + addps xmm2, xmm3 + addps xmm3, xmm4 + addps xmm4, xmm5 + addps xmm5, xmm6 + addps xmm6, xmm7 + addps xmm7, xmm0 + ; 1: + addps xmm0, xmm1 + addps xmm1, xmm2 + addps xmm2, xmm3 + addps xmm3, xmm4 + addps xmm4, xmm5 + addps xmm5, xmm6 + addps xmm6, xmm7 + addps xmm7, xmm0 + ; 2: + addps xmm0, xmm1 + addps xmm1, xmm2 + addps xmm2, xmm3 + addps xmm3, xmm4 + addps xmm4, xmm5 + addps xmm5, xmm6 + addps xmm6, xmm7 + addps xmm7, xmm0 + ; 3: + addps xmm0, xmm1 + addps xmm1, xmm2 + addps xmm2, xmm3 + addps xmm3, xmm4 + addps xmm4, xmm5 + addps xmm5, xmm6 + addps xmm6, xmm7 + addps xmm7, xmm0 + ; 4: + addps xmm0, xmm1 + addps xmm1, xmm2 + addps xmm2, xmm3 + addps xmm3, xmm4 + addps xmm4, xmm5 + addps xmm5, xmm6 + addps xmm6, xmm7 + addps xmm7, xmm0 + ; 5: + addps xmm0, xmm1 + addps xmm1, xmm2 + addps xmm2, xmm3 + addps xmm3, xmm4 + addps xmm4, xmm5 + addps xmm5, xmm6 + addps xmm6, xmm7 + addps xmm7, xmm0 + ; 6: + addps xmm0, xmm1 + addps xmm1, xmm2 + addps xmm2, xmm3 + addps xmm3, xmm4 + addps xmm4, xmm5 + addps xmm5, xmm6 + addps xmm6, xmm7 + addps xmm7, xmm0 + ; 7: + addps xmm0, xmm1 + addps xmm1, xmm2 + addps xmm2, xmm3 + addps xmm3, xmm4 + addps xmm4, xmm5 + addps xmm5, xmm6 + addps xmm6, xmm7 + addps xmm7, xmm0 + ; 8: + addps xmm0, xmm1 + addps xmm1, xmm2 + addps xmm2, xmm3 + addps xmm3, xmm4 + addps xmm4, xmm5 + addps xmm5, xmm6 + addps xmm6, xmm7 + addps xmm7, xmm0 + ; 9: + addps xmm0, xmm1 + addps xmm1, xmm2 + addps xmm2, xmm3 + addps xmm3, xmm4 + addps xmm4, xmm5 + addps xmm5, xmm6 + addps xmm6, xmm7 + addps xmm7, xmm0 + ; 10: + addps xmm0, xmm1 + addps xmm1, xmm2 + addps xmm2, xmm3 + addps xmm3, xmm4 + addps xmm4, xmm5 + addps xmm5, xmm6 + addps xmm6, xmm7 + addps xmm7, xmm0 + ; 11: + addps xmm0, xmm1 + addps xmm1, xmm2 + addps xmm2, xmm3 + addps xmm3, xmm4 + addps xmm4, xmm5 + addps xmm5, xmm6 + addps xmm6, xmm7 + addps xmm7, xmm0 + ; 12: + addps xmm0, xmm1 + addps xmm1, xmm2 + addps xmm2, xmm3 + addps xmm3, xmm4 + addps xmm4, xmm5 + addps xmm5, xmm6 + addps xmm6, xmm7 + addps xmm7, xmm0 + ; 13: + addps xmm0, xmm1 + addps xmm1, xmm2 + addps xmm2, xmm3 + addps xmm3, xmm4 + addps xmm4, xmm5 + addps xmm5, xmm6 + addps xmm6, xmm7 + addps xmm7, xmm0 + ; 14: + addps xmm0, xmm1 + addps xmm1, xmm2 + addps xmm2, xmm3 + addps xmm3, xmm4 + addps xmm4, xmm5 + addps xmm5, xmm6 + addps xmm6, xmm7 + addps xmm7, xmm0 + ; 15: + addps xmm0, xmm1 + addps xmm1, xmm2 + addps xmm2, xmm3 + addps xmm3, xmm4 + addps xmm4, xmm5 + addps xmm5, xmm6 + addps xmm6, xmm7 + addps xmm7, xmm0 + ; 16: + addps xmm0, xmm1 + addps xmm1, xmm2 + addps xmm2, xmm3 + addps xmm3, xmm4 + addps xmm4, xmm5 + addps xmm5, xmm6 + addps xmm6, xmm7 + addps xmm7, xmm0 + ; 17: + addps xmm0, xmm1 + addps xmm1, xmm2 + addps xmm2, xmm3 + addps xmm3, xmm4 + addps xmm4, xmm5 + addps xmm5, xmm6 + addps xmm6, xmm7 + addps xmm7, xmm0 + ; 18: + addps xmm0, xmm1 + addps xmm1, xmm2 + addps xmm2, xmm3 + addps xmm3, xmm4 + addps xmm4, xmm5 + addps xmm5, xmm6 + addps xmm6, xmm7 + addps xmm7, xmm0 + ; 19: + addps xmm0, xmm1 + addps xmm1, xmm2 + addps xmm2, xmm3 + addps xmm3, xmm4 + addps xmm4, xmm5 + addps xmm5, xmm6 + addps xmm6, xmm7 + addps xmm7, xmm0 + ; 20: + addps xmm0, xmm1 + addps xmm1, xmm2 + addps xmm2, xmm3 + addps xmm3, xmm4 + addps xmm4, xmm5 + addps xmm5, xmm6 + addps xmm6, xmm7 + addps xmm7, xmm0 + ; 21: + addps xmm0, xmm1 + addps xmm1, xmm2 + addps xmm2, xmm3 + addps xmm3, xmm4 + addps xmm4, xmm5 + addps xmm5, xmm6 + addps xmm6, xmm7 + addps xmm7, xmm0 + ; 22: + addps xmm0, xmm1 + addps xmm1, xmm2 + addps xmm2, xmm3 + addps xmm3, xmm4 + addps xmm4, xmm5 + addps xmm5, xmm6 + addps xmm6, xmm7 + addps xmm7, xmm0 + ; 23: + addps xmm0, xmm1 + addps xmm1, xmm2 + addps xmm2, xmm3 + addps xmm3, xmm4 + addps xmm4, xmm5 + addps xmm5, xmm6 + addps xmm6, xmm7 + addps xmm7, xmm0 + ; 24: + addps xmm0, xmm1 + addps xmm1, xmm2 + addps xmm2, xmm3 + addps xmm3, xmm4 + addps xmm4, xmm5 + addps xmm5, xmm6 + addps xmm6, xmm7 + addps xmm7, xmm0 + ; 25: + addps xmm0, xmm1 + addps xmm1, xmm2 + addps xmm2, xmm3 + addps xmm3, xmm4 + addps xmm4, xmm5 + addps xmm5, xmm6 + addps xmm6, xmm7 + addps xmm7, xmm0 + ; 26: + addps xmm0, xmm1 + addps xmm1, xmm2 + addps xmm2, xmm3 + addps xmm3, xmm4 + addps xmm4, xmm5 + addps xmm5, xmm6 + addps xmm6, xmm7 + addps xmm7, xmm0 + ; 27: + addps xmm0, xmm1 + addps xmm1, xmm2 + addps xmm2, xmm3 + addps xmm3, xmm4 + addps xmm4, xmm5 + addps xmm5, xmm6 + addps xmm6, xmm7 + addps xmm7, xmm0 + ; 28: + addps xmm0, xmm1 + addps xmm1, xmm2 + addps xmm2, xmm3 + addps xmm3, xmm4 + addps xmm4, xmm5 + addps xmm5, xmm6 + addps xmm6, xmm7 + addps xmm7, xmm0 + ; 29: + addps xmm0, xmm1 + addps xmm1, xmm2 + addps xmm2, xmm3 + addps xmm3, xmm4 + addps xmm4, xmm5 + addps xmm5, xmm6 + addps xmm6, xmm7 + addps xmm7, xmm0 + ; 30: + addps xmm0, xmm1 + addps xmm1, xmm2 + addps xmm2, xmm3 + addps xmm3, xmm4 + addps xmm4, xmm5 + addps xmm5, xmm6 + addps xmm6, xmm7 + addps xmm7, xmm0 + ; 31: + addps xmm0, xmm1 + addps xmm1, xmm2 + addps xmm2, xmm3 + addps xmm3, xmm4 + addps xmm4, xmm5 + addps xmm5, xmm6 + addps xmm6, xmm7 + addps xmm7, xmm0 + ; ---------------------- + dec ecx + jnz bsLoop + + ; restore xmm6 & xmm7: + movups xmm6, [rsp + 8] + movups xmm7, [rsp + 24] + ret +busy_sse_loop endp + +END diff --git a/libcpuid/rdmsr.c b/libcpuid/rdmsr.c index c8e82d8..bedf09e 100644 --- a/libcpuid/rdmsr.c +++ b/libcpuid/rdmsr.c @@ -191,7 +191,7 @@ int cpu_rdmsr(struct msr_driver_t* driver, uint32_t msr_index, uint64_t* result) if(ioctl(driver->fd, CPUCTL_RDMSR, &args)) return set_error(ERR_INVMSR); - *result = args.data; + *result = args.data; return 0; } @@ -237,7 +237,7 @@ struct msr_driver_t* cpu_msr_driver_open(void) set_error(ERR_NO_RDMSR); return NULL; } - + drv = (struct msr_driver_t*) malloc(sizeof(struct msr_driver_t)); if (!drv) { set_error(ERR_NO_MEM); @@ -250,7 +250,7 @@ struct msr_driver_t* cpu_msr_driver_open(void) set_error(ERR_EXTRACT); return NULL; } - + status = load_driver(drv); if (!DeleteFile(drv->driver_path)) debugf(1, "Deleting temporary driver file failed.\n"); @@ -285,7 +285,7 @@ static int extract_driver(struct msr_driver_t* driver) FILE *f; if (!GetTempPath(sizeof(driver->driver_path), driver->driver_path)) return 0; strcat(driver->driver_path, "TmpRdr.sys"); - + f = fopen(driver->driver_path, "wb"); if (!f) return 0; if (is_running_x64()) @@ -303,15 +303,15 @@ static BOOL wait_for_service_state(SC_HANDLE hService, DWORD dwDesiredState, SER if(hService != NULL){ while(TRUE){ fOK = QueryServiceStatus(hService, lpsrvStatus); - if(!fOK) + if(!fOK) break; - if(lpsrvStatus->dwCurrentState == dwDesiredState) + if(lpsrvStatus->dwCurrentState == dwDesiredState) break; dwWaitHint = lpsrvStatus->dwWaitHint / 10; // Poll 1/10 of the wait hint - if (dwWaitHint < 1000) + if (dwWaitHint < 1000) dwWaitHint = 1000; // At most once per second - if (dwWaitHint > 10000) + if (dwWaitHint > 10000) dwWaitHint = 10000; // At least every 10 seconds Sleep(dwWaitHint); } @@ -372,7 +372,7 @@ static int load_driver(struct msr_driver_t* drv) default: debugf(1, "Create driver service failed: %d\n", dwLastError); break; - } + } } if(drv->scDriver != NULL){ if(StartService(drv->scDriver, 0, NULL)){ @@ -400,7 +400,7 @@ static int load_driver(struct msr_driver_t* drv) if(fRunning) debugf(1, "Driver already running.\n"); else - debugf(1, "Driver loaded.\n"); + debugf(1, "Driver loaded.\n"); CloseServiceHandle(drv->scManager); drv->hhDriver = CreateFile(lpszDriverName, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, 0, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, 0); drv->ovl.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL); @@ -438,7 +438,7 @@ int cpu_rdmsr(struct msr_driver_t* driver, uint32_t msr_index, uint64_t* result) if (!driver) return set_error(ERR_HANDLE); DeviceIoControl(driver->hhDriver, IOCTL_PROCVIEW_RDMSR, &msr_index, sizeof(int), &msrdata, sizeof(__int64), &dwBytesReturned, &driver->ovl); - GetOverlappedResult(driver->hhDriver, &driver->ovl, &dwBytesReturned, TRUE); + GetOverlappedResult(driver->hhDriver, &driver->ovl, &dwBytesReturned, TRUE); *result = msrdata; return 0; } diff --git a/libcpuid/rdtsc.c b/libcpuid/rdtsc.c index 5e948cc..ce8fe87 100644 --- a/libcpuid/rdtsc.c +++ b/libcpuid/rdtsc.c @@ -78,13 +78,13 @@ void cpu_tsc_unmark(struct cpu_mark_t* mark) int cpu_clock_by_mark(struct cpu_mark_t* mark) { uint64_t result; - + /* Check if some subtraction resulted in a negative number: */ if ((mark->tsc >> 63) != 0 || (mark->sys_clock >> 63) != 0) return -1; - + /* Divide-by-zero check: */ if (mark->sys_clock == 0) return -1; - + /* Check if the result fits in 32bits */ result = mark->tsc / mark->sys_clock; if (result > (uint64_t) 0x7fffffff) return -1; @@ -97,16 +97,16 @@ int cpu_clock_by_os(void) HKEY key; DWORD result; DWORD size = 4; - + if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, TEXT("HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0"), 0, KEY_READ, &key) != ERROR_SUCCESS) return -1; - + if (RegQueryValueEx(key, TEXT("~MHz"), NULL, NULL, (LPBYTE) &result, (LPDWORD) &size) != ERROR_SUCCESS) { RegCloseKey(key); return -1; } RegCloseKey(key); - + return (int)result; } #else @@ -129,10 +129,10 @@ int cpu_clock_by_os(void) FILE *f; char line[1024], *s; int result; - + f = fopen("/proc/cpuinfo", "rt"); if (!f) return -1; - + while (fgets(line, sizeof(line), f)) { if (!strncmp(line, "cpu MHz", 7)) { s = strchr(line, ':'); @@ -184,7 +184,7 @@ int cpu_clock_measure(int millis, int quad_check) struct cpu_mark_t begin[4], end[4], temp, temp2; int results[4], cycles, n, k, i, j, bi, bj, mdiff, diff, _zero = 0; uint64_t tl; - + if (millis < 1) return -1; tl = millis * (uint64_t) 1000; if (quad_check) @@ -301,7 +301,7 @@ int cpu_clock_by_ic(int millis, int runs) } while (t1 - t0 < tl * (uint64_t) 8); // cpu_Hz = cycles_inner * cycles_outer * 256 / (t1 - t0) * 1000000 debugf(2, "c = %d, td = %d\n", c, (int) (t1 - t0)); - hz = ((uint64_t) cycles_inner * (uint64_t) 256 + 12) * + hz = ((uint64_t) cycles_inner * (uint64_t) 256 + 12) * (uint64_t) cycles_outer * (uint64_t) multiplier_numerator * (uint64_t) c * (uint64_t) 1000000 / ((t1 - t0) * (uint64_t) multiplier_denom); cur_value = (int) (hz / 1000000); diff --git a/libcpuid/recog_amd.c b/libcpuid/recog_amd.c index 4eeda2d..cb52a85 100644 --- a/libcpuid/recog_amd.c +++ b/libcpuid/recog_amd.c @@ -48,47 +48,47 @@ struct amd_code_and_bits_t { const struct match_entry_t cpudb_amd[] = { // F M S EF EM #cores L2$ L3$ BC ModelBits ModelCode Name { -1, -1, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "Unknown AMD CPU" }, - + /* 486 and the likes */ { 4, -1, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "Unknown AMD 486" }, { 4, 3, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "AMD 486DX2" }, { 4, 7, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "AMD 486DX2WB" }, { 4, 8, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "AMD 486DX4" }, { 4, 9, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "AMD 486DX4WB" }, - + /* Pentia clones */ { 5, -1, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "Unknown AMD 586" }, { 5, 0, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "K5" }, { 5, 1, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "K5" }, { 5, 2, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "K5" }, { 5, 3, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "K5" }, - + /* The K6 */ { 5, 6, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "K6" }, { 5, 7, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "K6" }, - + { 5, 8, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "K6-2" }, { 5, 9, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "K6-III" }, { 5, 10, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "Unknown K6" }, { 5, 11, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "Unknown K6" }, { 5, 12, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "Unknown K6" }, { 5, 13, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "K6-2+" }, - + /* Athlon et al. */ { 6, 1, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "Athlon (Slot-A)" }, { 6, 2, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "Athlon (Slot-A)" }, { 6, 3, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "Duron (Spitfire)" }, { 6, 4, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "Athlon (ThunderBird)" }, - + { 6, 6, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "Unknown Athlon" }, { 6, 6, -1, -1, -1, 1, -1, -1, NC, ATHLON_ , 0, "Athlon (Palomino)" }, { 6, 6, -1, -1, -1, 1, -1, -1, NC, ATHLON_|_MP_ , 0, "Athlon MP (Palomino)" }, { 6, 6, -1, -1, -1, 1, -1, -1, NC, DURON_ , 0, "Duron (Palomino)" }, { 6, 6, -1, -1, -1, 1, -1, -1, NC, ATHLON_|_XP_ , 0, "Athlon XP" }, - + { 6, 7, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "Unknown Athlon XP" }, { 6, 7, -1, -1, -1, 1, -1, -1, NC, DURON_ , 0, "Duron (Morgan)" }, - + { 6, 8, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "Athlon XP" }, { 6, 8, -1, -1, -1, 1, -1, -1, NC, ATHLON_ , 0, "Athlon XP (Thoroughbred)" }, { 6, 8, -1, -1, -1, 1, -1, -1, NC, ATHLON_|_XP_ , 0, "Athlon XP (Thoroughbred)" }, @@ -99,7 +99,7 @@ const struct match_entry_t cpudb_amd[] = { { 6, 8, -1, -1, -1, 1, -1, -1, NC, ATHLON_|_MP_ , 0, "Athlon MP (Thoroughbred)" }, { 6, 8, -1, -1, -1, 1, -1, -1, NC, ATHLON_|_XP_|_M_ , 0, "Mobile Athlon (T-Bred)" }, { 6, 8, -1, -1, -1, 1, -1, -1, NC, ATHLON_|_XP_|_M_|_LV_, 0, "Mobile Athlon (T-Bred)" }, - + { 6, 10, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "Athlon XP (Barton)" }, { 6, 10, -1, -1, -1, 1, 512, -1, NC, ATHLON_|_XP_ , 0, "Athlon XP (Barton)" }, { 6, 10, -1, -1, -1, 1, 512, -1, NC, SEMPRON_ , 0, "Sempron (Barton)" }, @@ -108,11 +108,11 @@ const struct match_entry_t cpudb_amd[] = { { 6, 10, -1, -1, -1, 1, -1, -1, NC, ATHLON_|_MP_ , 0, "Athlon MP (Barton)" }, { 6, 10, -1, -1, -1, 1, -1, -1, NC, ATHLON_|_XP_|_M_ , 0, "Mobile Athlon (Barton)" }, { 6, 10, -1, -1, -1, 1, -1, -1, NC, ATHLON_|_XP_|_M_|_LV_, 0, "Mobile Athlon (Barton)" }, - + /* K8 Architecture */ { 15, -1, -1, 15, -1, 1, -1, -1, NC, 0 , 0, "Unknown K8" }, { 15, -1, -1, 16, -1, 1, -1, -1, NC, 0 , 0, "Unknown K9" }, - + { 15, -1, -1, 15, -1, 1, -1, -1, NC, 0 , 0, "Unknown A64" }, { 15, -1, -1, 15, -1, 1, -1, -1, NC, OPTERON_ , 0, "Opteron" }, { 15, -1, -1, 15, -1, 2, -1, -1, NC, OPTERON_|_X2 , 0, "Opteron (Dual Core)" }, @@ -141,22 +141,22 @@ const struct match_entry_t cpudb_amd[] = { { 15, -1, -1, 15, 0x27, 1, 512, -1, NC, ATHLON_|_64_ , 0, "Athlon 64 (San Diego/512K)" }, { 15, -1, -1, 15, 0x37, 1, 512, -1, NC, ATHLON_|_64_ , 0, "Athlon 64 (San Diego/512K)" }, { 15, -1, -1, 15, 0x04, 1, 512, -1, NC, ATHLON_|_64_ , 0, "Athlon 64 (ClawHammer/512K)" }, - + { 15, -1, -1, 15, 0x5f, 1, 1024, -1, NC, ATHLON_|_64_ , 0, "Athlon 64 (Orleans/1024K)" }, { 15, -1, -1, 15, 0x27, 1, 1024, -1, NC, ATHLON_|_64_ , 0, "Athlon 64 (San Diego/1024K)" }, { 15, -1, -1, 15, 0x04, 1, 1024, -1, NC, ATHLON_|_64_ , 0, "Athlon 64 (ClawHammer/1024K)" }, - + { 15, -1, -1, 15, 0x4b, 2, 256, -1, NC, SEMPRON_ , 0, "Athlon 64 X2 (Windsor/256K)" }, - + { 15, -1, -1, 15, 0x23, 2, 512, -1, NC, ATHLON_|_64_|_X2 , 0, "Athlon 64 X2 (Toledo/512K)" }, { 15, -1, -1, 15, 0x4b, 2, 512, -1, NC, ATHLON_|_64_|_X2 , 0, "Athlon 64 X2 (Windsor/512K)" }, { 15, -1, -1, 15, 0x43, 2, 512, -1, NC, ATHLON_|_64_|_X2 , 0, "Athlon 64 X2 (Windsor/512K)" }, { 15, -1, -1, 15, 0x6b, 2, 512, -1, NC, ATHLON_|_64_|_X2 , 0, "Athlon 64 X2 (Brisbane/512K)" }, { 15, -1, -1, 15, 0x2b, 2, 512, -1, NC, ATHLON_|_64_|_X2 , 0, "Athlon 64 X2 (Manchester/512K)"}, - + { 15, -1, -1, 15, 0x23, 2, 1024, -1, NC, ATHLON_|_64_|_X2 , 0, "Athlon 64 X2 (Toledo/1024K)" }, { 15, -1, -1, 15, 0x43, 2, 1024, -1, NC, ATHLON_|_64_|_X2 , 0, "Athlon 64 X2 (Windsor/1024K)" }, - + { 15, -1, -1, 15, 0x08, 1, 128, -1, NC, MOBILE_|SEMPRON_ , 0, "Mobile Sempron 64 (Dublin/128K)"}, { 15, -1, -1, 15, 0x08, 1, 256, -1, NC, MOBILE_|SEMPRON_ , 0, "Mobile Sempron 64 (Dublin/256K)"}, { 15, -1, -1, 15, 0x0c, 1, 256, -1, NC, SEMPRON_ , 0, "Sempron 64 (Paris)" }, @@ -181,7 +181,7 @@ const struct match_entry_t cpudb_amd[] = { { 15, -1, -1, 15, 0x4c, 1, 256, -1, NC, MOBILE_| SEMPRON_ , 0, "Mobile Sempron 64 (Keene/256K)"}, { 15, -1, -1, 15, 0x4c, 1, 512, -1, NC, MOBILE_| SEMPRON_ , 0, "Mobile Sempron 64 (Keene/512K)"}, { 15, -1, -1, 15, -1, 2, -1, -1, NC, SEMPRON_ , 0, "Sempron Dual Core" }, - + { 15, -1, -1, 15, 0x24, 1, 512, -1, NC, TURION_|_64_ , 0, "Turion 64 (Lancaster/512K)" }, { 15, -1, -1, 15, 0x24, 1, 1024, -1, NC, TURION_|_64_ , 0, "Turion 64 (Lancaster/1024K)" }, { 15, -1, -1, 15, 0x48, 2, 256, -1, NC, TURION_|_X2 , 0, "Turion X2 (Taylor)" }, @@ -373,7 +373,7 @@ static void decode_amd_cache_info(struct cpu_raw_data_t* raw, struct cpu_id_t* d 0, 1, 2, 0, 4, 0, 8, 0, 16, 16, 32, 48, 64, 96, 128, 255 }; unsigned n = raw->ext_cpuid[0][0]; - + if (n >= 0x80000005) { data->l1_data_cache = (raw->ext_cpuid[5][2] >> 24) & 0xff; data->l1_assoc = (raw->ext_cpuid[5][2] >> 16) & 0xff; @@ -384,7 +384,7 @@ static void decode_amd_cache_info(struct cpu_raw_data_t* raw, struct cpu_id_t* d data->l2_cache = (raw->ext_cpuid[6][2] >> 16) & 0xffff; data->l2_assoc = assoc_table[(raw->ext_cpuid[6][2] >> 12) & 0xf]; data->l2_cacheline = (raw->ext_cpuid[6][2]) & 0xff; - + l3_result = (raw->ext_cpuid[6][3] >> 18); if (l3_result > 0) { l3_result = 512 * l3_result; /* AMD spec says it's a range, @@ -401,7 +401,7 @@ static void decode_amd_cache_info(struct cpu_raw_data_t* raw, struct cpu_id_t* d static void decode_amd_number_of_cores(struct cpu_raw_data_t* raw, struct cpu_id_t* data) { int logical_cpus = -1, num_cores = -1; - + if (raw->basic_cpuid[0][0] >= 1) { logical_cpus = (raw->basic_cpuid[1][1] >> 16) & 0xff; if (raw->ext_cpuid[0][0] >= 8) { diff --git a/libcpuid/recog_intel.c b/libcpuid/recog_intel.c index 06a0f44..8f66e58 100644 --- a/libcpuid/recog_intel.c +++ b/libcpuid/recog_intel.c @@ -62,7 +62,7 @@ typedef enum _intel_model_t intel_model_t; const struct match_entry_t cpudb_intel[] = { // F M S EF EM #cores L2$ L3$ BC ModelBits ModelCode Name { -1, -1, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "Unknown Intel CPU" }, - + /* i486 */ { 4, -1, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "Unknown i486" }, { 4, 0, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "i486 DX-25/33" }, @@ -74,7 +74,7 @@ const struct match_entry_t cpudb_intel[] = { { 4, 7, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "i486 DX2 WriteBack" }, { 4, 8, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "i486 DX4" }, { 4, 9, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "i486 DX4 WriteBack" }, - + /* All Pentia: Pentium 1 */ { 5, -1, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "Unknown Pentium" }, @@ -85,7 +85,7 @@ const struct match_entry_t cpudb_intel[] = { { 5, 4, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "Pentium 1 (0.35u)" }, { 5, 7, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "Pentium 1 (0.35u)" }, { 5, 8, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "Pentium MMX (0.25u)" }, - + /* Pentium 2 / 3 / M / Conroe / whatsnext - all P6 based. */ { 6, -1, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "Unknown P6" }, { 6, 0, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "Pentium Pro" }, @@ -94,27 +94,27 @@ const struct match_entry_t cpudb_intel[] = { { 6, 5, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "Pentium II (Deschutes)" }, { 6, 5, -1, -1, -1, 1, -1, -1, NC, MOBILE_|PENTIUM_, 0, "Mobile Pentium II (Tonga)"}, { 6, 6, -1, -1, -1, 1, -1, -1, NC,0 , 0, "Pentium II (Dixon)" }, - + { 6, 3, -1, -1, -1, 1, -1, -1, NC, XEON_ , 0, "P-II Xeon (Klamath)" }, { 6, 5, -1, -1, -1, 1, -1, -1, NC, XEON_ , 0, "P-II Xeon (Drake)" }, { 6, 6, -1, -1, -1, 1, -1, -1, NC, XEON_ , 0, "P-II Xeon (Dixon)" }, - + { 6, 5, -1, -1, -1, 1, -1, -1, NC, CELERON_ , 0, "P-II Celeron (Covington)" }, { 6, 6, -1, -1, -1, 1, -1, -1, NC, CELERON_ , 0, "P-II Celeron (Mendocino)" }, - + /* -------------------------------------------------- */ - + { 6, 7, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "Pentium III (Katmai)" }, { 6, 8, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "Pentium III (Coppermine)"}, { 6, 10, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "Pentium III (Coppermine)"}, { 6, 11, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "Pentium III (Tualatin)" }, { 6, 11, -1, -1, -1, 1, 512, -1, NC, 0 , 0, "Pentium III (Tualatin)" }, - + { 6, 7, -1, -1, -1, 1, -1, -1, NC, XEON_ , 0, "P-III Xeon (Tanner)" }, { 6, 8, -1, -1, -1, 1, -1, -1, NC, XEON_ , 0, "P-III Xeon (Cascades)" }, { 6, 10, -1, -1, -1, 1, -1, -1, NC, XEON_ , 0, "P-III Xeon (Cascades)" }, { 6, 11, -1, -1, -1, 1, -1, -1, NC, XEON_ , 0, "P-III Xeon (Tualatin)" }, - + { 6, 7, -1, -1, -1, 1, 128, -1, NC, CELERON_ , 0, "P-III Celeron (Katmai)" }, { 6, 8, -1, -1, -1, 1, 128, -1, NC, CELERON_ , 0, "P-III Celeron (Coppermine)" }, { 6, 10, -1, -1, -1, 1, 128, -1, NC, CELERON_ , 0, "P-III Celeron (Coppermine)" }, @@ -125,7 +125,7 @@ const struct match_entry_t cpudb_intel[] = { { 15, -1, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "Unknown Pentium 4" }, { 15, -1, -1, 15, -1, 1, -1, -1, NC, CELERON_ , 0, "Unknown P-4 Celeron" }, { 15, -1, -1, 15, -1, 1, -1, -1, NC, XEON_ , 0, "Unknown Xeon" }, - + { 15, 0, -1, 15, -1, 1, -1, -1, NC, PENTIUM_ , 0, "Pentium 4 (Willamette)" }, { 15, 1, -1, 15, -1, 1, -1, -1, NC, PENTIUM_ , 0, "Pentium 4 (Willamette)" }, { 15, 2, -1, 15, -1, 1, -1, -1, NC, PENTIUM_ , 0, "Pentium 4 (Northwood)" }, @@ -138,7 +138,7 @@ const struct match_entry_t cpudb_intel[] = { { 15, 3, -1, 15, -1, 1, -1, -1, NC, MOBILE_|PENTIUM_, 0, "Mobile P-4 (Prescott)" }, { 15, 4, -1, 15, -1, 1, -1, -1, NC, MOBILE_|PENTIUM_, 0, "Mobile P-4 (Prescott)" }, { 15, 6, -1, 15, -1, 1, -1, -1, NC, MOBILE_|PENTIUM_, 0, "Mobile P-4 (Cedar Mill)" }, - + /* server CPUs */ { 15, 0, -1, 15, -1, 1, -1, -1, NC, XEON_ , 0, "Xeon (Foster)" }, { 15, 1, -1, 15, -1, 1, -1, -1, NC, XEON_ , 0, "Xeon (Foster)" }, @@ -150,7 +150,7 @@ const struct match_entry_t cpudb_intel[] = { { 15, 4, -1, 15, -1, 1, -1, -1, NC, XEON_|_MP_ , 0, "Xeon (Cranford)" }, { 15, 4, -1, 15, -1, 1, -1, -1, POTOMAC, XEON_ , 0, "Xeon (Potomac)" }, { 15, 6, -1, 15, -1, 1, -1, -1, NC, XEON_ , 0, "Xeon (Dempsey)" }, - + /* Pentium Ds */ { 15, 4, 4, 15, -1, 1, -1, -1, NC, 0 , 0, "Pentium D (SmithField)" }, { 15, 4, -1, 15, -1, 1, -1, -1, PENTIUM_D, 0 , 0, "Pentium D (SmithField)" }, @@ -163,10 +163,10 @@ const struct match_entry_t cpudb_intel[] = { { 15, 3, -1, 15, -1, 1, -1, -1, NC, CELERON_ , 0, "P-4 Celeron D (Prescott)" }, { 15, 4, -1, 15, -1, 1, -1, -1, NC, CELERON_ , 0, "P-4 Celeron D (Prescott)" }, { 15, 6, -1, 15, -1, 1, -1, -1, NC, CELERON_ , 0, "P-4 Celeron D (Cedar Mill)" }, - + /* -------------------------------------------------- */ /* Intel Core microarchitecture - P6-based */ - + { 6, 9, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "Unknown Pentium M" }, { 6, 9, -1, -1, -1, 1, -1, -1, PENTIUM_M, 0 , 0, "Unknown Pentium M" }, { 6, 9, -1, -1, -1, 1, -1, -1, NC, PENTIUM_ , 0, "Pentium M (Banias)" }, @@ -175,23 +175,23 @@ const struct match_entry_t cpudb_intel[] = { { 6, 13, -1, -1, -1, 1, -1, -1, NC, PENTIUM_ , 0, "Pentium M (Dothan)" }, { 6, 13, -1, -1, -1, 1, -1, -1, PENTIUM_M, 0 , 0, "Pentium M (Dothan)" }, { 6, 13, -1, -1, -1, 1, -1, -1, NC, CELERON_ , 0, "Celeron M" }, - + { 6, 12, -1, -1, -1, -1, -1, -1, NC, ATOM_ , 0, "Unknown Atom" }, { 6, 12, -1, -1, -1, -1, -1, -1, DIAMONDVILLE,ATOM_, 0, "Atom (Diamondville)" }, { 6, 12, -1, -1, -1, -1, -1, -1, SILVERTHORNE,ATOM_, 0, "Atom (Silverthorne)" }, { 6, 12, -1, -1, -1, -1, -1, -1, CEDARVIEW, ATOM_ , 0, "Atom (Cedarview)" }, { 6, 6, -1, -1, -1, -1, -1, -1, CEDARVIEW, ATOM_ , 0, "Atom (Cedarview)" }, { 6, 12, -1, -1, -1, -1, -1, -1, PINEVIEW, ATOM_ , 0, "Atom (Pineview)" }, - + /* -------------------------------------------------- */ - + { 6, 14, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "Unknown Yonah" }, { 6, 14, -1, -1, -1, 1, -1, -1, CORE_SOLO, 0 , 0, "Yonah (Core Solo)" }, { 6, 14, -1, -1, -1, 2, -1, -1, CORE_DUO, 0 , 0, "Yonah (Core Duo)" }, { 6, 14, -1, -1, -1, 1, -1, -1, CORE_SOLO, MOBILE_, 0, "Yonah (Core Solo)" }, { 6, 14, -1, -1, -1, 2, -1, -1, CORE_DUO , MOBILE_, 0, "Yonah (Core Duo)" }, { 6, 14, -1, -1, -1, 1, -1, -1, CORE_SOLO, 0 , 0, "Yonah (Core Solo)" }, - + { 6, 15, -1, -1, -1, 1, -1, -1, NC, 0 , 0, "Unknown Core 2" }, { 6, 15, -1, -1, -1, 2, 4096, -1, CORE_DUO, 0 , 0, "Conroe (Core 2 Duo)" }, { 6, 15, -1, -1, -1, 2, 1024, -1, CORE_DUO, 0 , 0, "Conroe (Core 2 Duo) 1024K" }, @@ -203,18 +203,18 @@ const struct match_entry_t cpudb_intel[] = { { 6, 15, -1, -1, -1, 2, -1, -1, MOBILE_CORE_DUO, 0, 0, "Merom (Core 2 Duo)" }, { 6, 15, -1, -1, -1, 2, 2048, -1, MEROM, 0 , 0, "Merom (Core 2 Duo) 2048K" }, { 6, 15, -1, -1, -1, 2, 4096, -1, MEROM, 0 , 0, "Merom (Core 2 Duo) 4096K" }, - + { 6, 15, -1, -1, 15, 1, -1, -1, NC, CELERON_ , 0, "Conroe-L (Celeron)" }, { 6, 6, -1, -1, 22, 1, -1, -1, NC, CELERON_ , 0, "Conroe-L (Celeron)" }, { 6, 15, -1, -1, 15, 2, -1, -1, NC, CELERON_ , 0, "Conroe-L (Allendale)" }, { 6, 6, -1, -1, 22, 2, -1, -1, NC, CELERON_ , 0, "Conroe-L (Allendale)" }, - - + + { 6, 6, -1, -1, 22, 1, -1, -1, NC, 0 , 0, "Unknown Core ?" }, { 6, 7, -1, -1, 23, 1, -1, -1, NC, 0 , 0, "Unknown Core ?" }, { 6, 6, -1, -1, 22, 400, -1, -1, MORE_THAN_QUADCORE, 0, 0, "More than quad-core" }, { 6, 7, -1, -1, 23, 400, -1, -1, MORE_THAN_QUADCORE, 0, 0, "More than quad-core" }, - + { 6, 7, -1, -1, 23, 1, -1, -1, CORE_SOLO , 0, 0, "Unknown Core 45nm" }, { 6, 7, -1, -1, 23, 1, -1, -1, CORE_DUO , 0, 0, "Unknown Core 45nm" }, { 6, 7, -1, -1, 23, 2, 1024, -1, WOLFDALE , 0, 0, "Celeron Wolfdale 1M" }, @@ -228,7 +228,7 @@ const struct match_entry_t cpudb_intel[] = { { 6, 7, -1, -1, 23, 4, 2048, -1, NC , 0, 0, "Yorkfield (Core 2 Quad) 2M"}, { 6, 7, -1, -1, 23, 4, 3072, -1, NC , 0, 0, "Yorkfield (Core 2 Quad) 3M"}, { 6, 7, -1, -1, 23, 4, 6144, -1, NC , 0, 0, "Yorkfield (Core 2 Quad) 6M"}, - + /* Core microarchitecture-based Xeons: */ { 6, 14, -1, -1, 14, 1, -1, -1, NC, XEON_ , 0, "Xeon LV" }, { 6, 15, -1, -1, 15, 2, 4096, -1, NC, XEON_ , _5100, "Xeon (Woodcrest)" }, @@ -285,7 +285,7 @@ const struct match_entry_t cpudb_intel[] = { { 6, 10, -1, -1, 58, 1, -1, -1, NC, CELERON_ , 0, "Ivy Bridge (Celeron)" }, { 6, 10, -1, -1, 58, 2, -1, -1, NC, CELERON_ , 0, "Ivy Bridge (Celeron)" }, { 6, 14, -1, -1, 62, -1, -1, -1, NC, 0 , 0, "Ivy Bridge-E" }, - + /* Haswell CPUs (4th gen, 22nm): */ { 6, 12, -1, -1, 60, -1, -1, -1, NC, XEON_ , 0, "Haswell (Xeon)" }, { 6, 12, -1, -1, 60, 4, -1, -1, NC, CORE_|_I_|_7 , 0, "Haswell (Core i7)" }, @@ -369,7 +369,7 @@ const struct match_entry_t cpudb_intel[] = { { 6, 14, 12, -1, 158, 8, -1, -1, NC, CORE_|_I_|_7 , 0, "Coffee Lake-R (Core i7)" }, { 6, 14, 13, -1, 158, 6, -1, -1, NC, CORE_|_I_|_5 , 0, "Coffee Lake-R (Core i5)" }, { 6, 14, 11, -1, 158, 4, -1, -1, NC, CORE_|_I_|_3 , 0, "Coffee Lake-R (Core i3)" }, - + /* Comet Lake CPUs (10th gen, 14nm): */ { 6, 5, -1, -1, 165, 10, -1, -1, NC, CORE_|_I_|_9 , 0, "Comet Lake (Core i9)" }, { 6, 5, -1, -1, 165, 8, -1, -1, NC, CORE_|_I_|_7 , 0, "Comet Lake (Core i7)" }, @@ -502,7 +502,7 @@ static void decode_intel_oldstyle_cache_info(struct cpu_raw_data_t* raw, struct x >>= 8; } } - + check_case(f[0x06], L1I, 8, 4, 32, data); check_case(f[0x08], L1I, 16, 4, 32, data); check_case(f[0x0A], L1D, 8, 2, 32, data); @@ -542,7 +542,7 @@ static void decode_intel_oldstyle_cache_info(struct cpu_raw_data_t* raw, struct check_case(f[0x71], L1I, 16, 8, -1, data); check_case(f[0x72], L1I, 32, 8, -1, data); check_case(f[0x73], L1I, 64, 8, -1, data); - + check_case(f[0x78], L2, 1024, 4, 64, data); check_case(f[0x79], L2, 128, 8, 64, data); check_case(f[0x7A], L2, 256, 8, 64, data); @@ -556,7 +556,7 @@ static void decode_intel_oldstyle_cache_info(struct cpu_raw_data_t* raw, struct check_case(f[0x85], L2, 2048, 8, 32, data); check_case(f[0x86], L2, 512, 4, 64, data); check_case(f[0x87], L2, 1024, 8, 64, data); - + if (f[0x49]) { /* This flag is overloaded with two meanings. On Xeon MP * (family 0xf, model 0x6) this means L3 cache. On all other @@ -651,11 +651,11 @@ static void decode_intel_number_of_cores(struct cpu_raw_data_t* raw, struct cpu_id_t* data) { int logical_cpus = -1, num_cores = -1; - + if (raw->basic_cpuid[0][0] >= 11) { if (decode_intel_extended_topology(raw, data)) return; } - + if (raw->basic_cpuid[0][0] >= 1) { logical_cpus = (raw->basic_cpuid[1][1] >> 16) & 0xff; if (raw->basic_cpuid[0][0] >= 4) { @@ -697,7 +697,7 @@ static intel_code_and_bits_t get_brand_code_and_bits(struct cpu_id_t* data) { PINEVIEW, "CPU [ND][45]## " }, { CEDARVIEW, "CPU [ND]#### " }, }; - + const struct { uint64_t bit; const char* search; } bit_matchtable[] = { { XEON_, "Xeon" }, { _MP_, " MP" }, @@ -706,12 +706,12 @@ static intel_code_and_bits_t get_brand_code_and_bits(struct cpu_id_t* data) { CELERON_, "Celeron" }, { PENTIUM_, "Pentium" }, }; - + for (i = 0; i < COUNT_OF(bit_matchtable); i++) { if (match_pattern(bs, bit_matchtable[i].search)) bits |= bit_matchtable[i].bit; } - + if ((i = match_pattern(bs, "Core(TM) [im][3579]")) != 0) { bits |= CORE_; i--; @@ -775,7 +775,7 @@ static intel_code_and_bits_t get_brand_code_and_bits(struct cpu_id_t* data) code = MORE_THAN_QUADCORE; break; } } - + if (code == CORE_DUO && (bits & MOBILE_) && data->model != 14) { if (data->ext_model < 23) { code = MEROM; @@ -807,7 +807,7 @@ static intel_model_t get_model_code(struct cpu_id_t* data) if (bs[i] == '3') return _3xxx; return UNKNOWN; } - + /* For Core2-based Xeons: */ while (i < l - 3) { if (bs[i] == 'C' && bs[i+1] == 'P' && bs[i+2] == 'U') @@ -856,10 +856,10 @@ static void decode_intel_sgx_features(const struct cpu_raw_data_t* raw, struct c { struct cpu_epc_t epc; int i; - + if (raw->basic_cpuid[0][0] < 0x12) return; // no 12h leaf if (raw->basic_cpuid[0x12][0] == 0) return; // no sub-leafs available, probably it's disabled by BIOS - + // decode sub-leaf 0: if (raw->basic_cpuid[0x12][0] & 1) data->sgx.flags[INTEL_SGX1] = 1; if (raw->basic_cpuid[0x12][0] & 2) data->sgx.flags[INTEL_SGX2] = 1; @@ -868,11 +868,11 @@ static void decode_intel_sgx_features(const struct cpu_raw_data_t* raw, struct c data->sgx.misc_select = raw->basic_cpuid[0x12][1]; data->sgx.max_enclave_32bit = (raw->basic_cpuid[0x12][3] ) & 0xff; data->sgx.max_enclave_64bit = (raw->basic_cpuid[0x12][3] >> 8) & 0xff; - + // decode sub-leaf 1: data->sgx.secs_attributes = raw->intel_fn12h[1][0] | (((uint64_t) raw->intel_fn12h[1][1]) << 32); data->sgx.secs_xfrm = raw->intel_fn12h[1][2] | (((uint64_t) raw->intel_fn12h[1][3]) << 32); - + // decode higher-order subleafs, whenever present: data->sgx.num_epc_sections = -1; for (i = 0; i < 1000000; i++) { @@ -903,7 +903,7 @@ struct cpu_epc_t cpuid_get_epc(int index, const struct cpu_raw_data_t* raw) regs[1] = regs[3] = 0; cpu_exec_cpuid_ext(regs); } - + // decode values: if ((regs[0] & 0xf) == 0x1) { retval.start_addr |= (regs[0] & 0xfffff000); // bits [12, 32) -> bits [12, 32) @@ -947,10 +947,10 @@ int cpuid_identify_intel(struct cpu_raw_data_t* raw, struct cpu_id_t* data, stru debug_print_lbits(2, brand.bits); } debugf(2, "Detected Intel model code: %d\n", model_code); - + internal->code.intel = brand.code; internal->bits = brand.bits; - + if (data->flags[CPU_FEATURE_SGX]) { debugf(2, "SGX seems to be present, decoding...\n"); // if SGX is indicated by the CPU, verify its presence: diff --git a/libcpuid_vc10.sln b/libcpuid_vc10.sln index e6163cc..43e3f79 100644 --- a/libcpuid_vc10.sln +++ b/libcpuid_vc10.sln @@ -1,45 +1,45 @@ -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcpuid", "libcpuid\libcpuid_vc10.vcxproj", "{92BDBA37-96E3-4D85-B762-185E4407BB49}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpuid_tool", "cpuid_tool\cpuid_tool_vc10.vcxproj", "{854A36FB-EA23-4165-9110-A55EB97C6377}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - ReleaseDLL|Win32 = ReleaseDLL|Win32 - ReleaseDLL|x64 = ReleaseDLL|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {92BDBA37-96E3-4D85-B762-185E4407BB49}.Debug|Win32.ActiveCfg = Debug|Win32 - {92BDBA37-96E3-4D85-B762-185E4407BB49}.Debug|Win32.Build.0 = Debug|Win32 - {92BDBA37-96E3-4D85-B762-185E4407BB49}.Debug|x64.ActiveCfg = Debug|x64 - {92BDBA37-96E3-4D85-B762-185E4407BB49}.Debug|x64.Build.0 = Debug|x64 - {92BDBA37-96E3-4D85-B762-185E4407BB49}.Release|Win32.ActiveCfg = Release|Win32 - {92BDBA37-96E3-4D85-B762-185E4407BB49}.Release|Win32.Build.0 = Release|Win32 - {92BDBA37-96E3-4D85-B762-185E4407BB49}.Release|x64.ActiveCfg = Release|x64 - {92BDBA37-96E3-4D85-B762-185E4407BB49}.Release|x64.Build.0 = Release|x64 - {92BDBA37-96E3-4D85-B762-185E4407BB49}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32 - {92BDBA37-96E3-4D85-B762-185E4407BB49}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32 - {92BDBA37-96E3-4D85-B762-185E4407BB49}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64 - {92BDBA37-96E3-4D85-B762-185E4407BB49}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64 - {854A36FB-EA23-4165-9110-A55EB97C6377}.Debug|Win32.ActiveCfg = Debug|Win32 - {854A36FB-EA23-4165-9110-A55EB97C6377}.Debug|Win32.Build.0 = Debug|Win32 - {854A36FB-EA23-4165-9110-A55EB97C6377}.Debug|x64.ActiveCfg = Debug|x64 - {854A36FB-EA23-4165-9110-A55EB97C6377}.Debug|x64.Build.0 = Debug|x64 - {854A36FB-EA23-4165-9110-A55EB97C6377}.Release|Win32.ActiveCfg = Release|Win32 - {854A36FB-EA23-4165-9110-A55EB97C6377}.Release|Win32.Build.0 = Release|Win32 - {854A36FB-EA23-4165-9110-A55EB97C6377}.Release|x64.ActiveCfg = Release|x64 - {854A36FB-EA23-4165-9110-A55EB97C6377}.Release|x64.Build.0 = Release|x64 - {854A36FB-EA23-4165-9110-A55EB97C6377}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32 - {854A36FB-EA23-4165-9110-A55EB97C6377}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32 - {854A36FB-EA23-4165-9110-A55EB97C6377}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64 - {854A36FB-EA23-4165-9110-A55EB97C6377}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcpuid", "libcpuid\libcpuid_vc10.vcxproj", "{92BDBA37-96E3-4D85-B762-185E4407BB49}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpuid_tool", "cpuid_tool\cpuid_tool_vc10.vcxproj", "{854A36FB-EA23-4165-9110-A55EB97C6377}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + ReleaseDLL|Win32 = ReleaseDLL|Win32 + ReleaseDLL|x64 = ReleaseDLL|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {92BDBA37-96E3-4D85-B762-185E4407BB49}.Debug|Win32.ActiveCfg = Debug|Win32 + {92BDBA37-96E3-4D85-B762-185E4407BB49}.Debug|Win32.Build.0 = Debug|Win32 + {92BDBA37-96E3-4D85-B762-185E4407BB49}.Debug|x64.ActiveCfg = Debug|x64 + {92BDBA37-96E3-4D85-B762-185E4407BB49}.Debug|x64.Build.0 = Debug|x64 + {92BDBA37-96E3-4D85-B762-185E4407BB49}.Release|Win32.ActiveCfg = Release|Win32 + {92BDBA37-96E3-4D85-B762-185E4407BB49}.Release|Win32.Build.0 = Release|Win32 + {92BDBA37-96E3-4D85-B762-185E4407BB49}.Release|x64.ActiveCfg = Release|x64 + {92BDBA37-96E3-4D85-B762-185E4407BB49}.Release|x64.Build.0 = Release|x64 + {92BDBA37-96E3-4D85-B762-185E4407BB49}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32 + {92BDBA37-96E3-4D85-B762-185E4407BB49}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32 + {92BDBA37-96E3-4D85-B762-185E4407BB49}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64 + {92BDBA37-96E3-4D85-B762-185E4407BB49}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64 + {854A36FB-EA23-4165-9110-A55EB97C6377}.Debug|Win32.ActiveCfg = Debug|Win32 + {854A36FB-EA23-4165-9110-A55EB97C6377}.Debug|Win32.Build.0 = Debug|Win32 + {854A36FB-EA23-4165-9110-A55EB97C6377}.Debug|x64.ActiveCfg = Debug|x64 + {854A36FB-EA23-4165-9110-A55EB97C6377}.Debug|x64.Build.0 = Debug|x64 + {854A36FB-EA23-4165-9110-A55EB97C6377}.Release|Win32.ActiveCfg = Release|Win32 + {854A36FB-EA23-4165-9110-A55EB97C6377}.Release|Win32.Build.0 = Release|Win32 + {854A36FB-EA23-4165-9110-A55EB97C6377}.Release|x64.ActiveCfg = Release|x64 + {854A36FB-EA23-4165-9110-A55EB97C6377}.Release|x64.Build.0 = Release|x64 + {854A36FB-EA23-4165-9110-A55EB97C6377}.ReleaseDLL|Win32.ActiveCfg = ReleaseDLL|Win32 + {854A36FB-EA23-4165-9110-A55EB97C6377}.ReleaseDLL|Win32.Build.0 = ReleaseDLL|Win32 + {854A36FB-EA23-4165-9110-A55EB97C6377}.ReleaseDLL|x64.ActiveCfg = ReleaseDLL|x64 + {854A36FB-EA23-4165-9110-A55EB97C6377}.ReleaseDLL|x64.Build.0 = ReleaseDLL|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/libcpuid_vc71.sln b/libcpuid_vc71.sln index c8115a5..61b3e81 100644 --- a/libcpuid_vc71.sln +++ b/libcpuid_vc71.sln @@ -1,35 +1,35 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcpuid", "libcpuid\libcpuid_vc71.vcproj", "{A517C21D-1467-41B4-966A-7C7FC5E99D62}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpuid_tool", "cpuid_tool\cpuid_tool_vc71.vcproj", "{DD903FEE-4A59-4307-8DE2-0F777DC21FFE}" - ProjectSection(ProjectDependencies) = postProject - {A517C21D-1467-41B4-966A-7C7FC5E99D62} = {A517C21D-1467-41B4-966A-7C7FC5E99D62} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - Release DLL = Release DLL - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {A517C21D-1467-41B4-966A-7C7FC5E99D62}.Debug.ActiveCfg = Debug|Win32 - {A517C21D-1467-41B4-966A-7C7FC5E99D62}.Debug.Build.0 = Debug|Win32 - {A517C21D-1467-41B4-966A-7C7FC5E99D62}.Release.ActiveCfg = Release|Win32 - {A517C21D-1467-41B4-966A-7C7FC5E99D62}.Release.Build.0 = Release|Win32 - {A517C21D-1467-41B4-966A-7C7FC5E99D62}.Release DLL.ActiveCfg = Release DLL|Win32 - {A517C21D-1467-41B4-966A-7C7FC5E99D62}.Release DLL.Build.0 = Release DLL|Win32 - {DD903FEE-4A59-4307-8DE2-0F777DC21FFE}.Debug.ActiveCfg = Debug|Win32 - {DD903FEE-4A59-4307-8DE2-0F777DC21FFE}.Debug.Build.0 = Debug|Win32 - {DD903FEE-4A59-4307-8DE2-0F777DC21FFE}.Release.ActiveCfg = Release|Win32 - {DD903FEE-4A59-4307-8DE2-0F777DC21FFE}.Release.Build.0 = Release|Win32 - {DD903FEE-4A59-4307-8DE2-0F777DC21FFE}.Release DLL.ActiveCfg = Release DLL|Win32 - {DD903FEE-4A59-4307-8DE2-0F777DC21FFE}.Release DLL.Build.0 = Release DLL|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 8.00 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcpuid", "libcpuid\libcpuid_vc71.vcproj", "{A517C21D-1467-41B4-966A-7C7FC5E99D62}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpuid_tool", "cpuid_tool\cpuid_tool_vc71.vcproj", "{DD903FEE-4A59-4307-8DE2-0F777DC21FFE}" + ProjectSection(ProjectDependencies) = postProject + {A517C21D-1467-41B4-966A-7C7FC5E99D62} = {A517C21D-1467-41B4-966A-7C7FC5E99D62} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfiguration) = preSolution + Debug = Debug + Release = Release + Release DLL = Release DLL + EndGlobalSection + GlobalSection(ProjectConfiguration) = postSolution + {A517C21D-1467-41B4-966A-7C7FC5E99D62}.Debug.ActiveCfg = Debug|Win32 + {A517C21D-1467-41B4-966A-7C7FC5E99D62}.Debug.Build.0 = Debug|Win32 + {A517C21D-1467-41B4-966A-7C7FC5E99D62}.Release.ActiveCfg = Release|Win32 + {A517C21D-1467-41B4-966A-7C7FC5E99D62}.Release.Build.0 = Release|Win32 + {A517C21D-1467-41B4-966A-7C7FC5E99D62}.Release DLL.ActiveCfg = Release DLL|Win32 + {A517C21D-1467-41B4-966A-7C7FC5E99D62}.Release DLL.Build.0 = Release DLL|Win32 + {DD903FEE-4A59-4307-8DE2-0F777DC21FFE}.Debug.ActiveCfg = Debug|Win32 + {DD903FEE-4A59-4307-8DE2-0F777DC21FFE}.Debug.Build.0 = Debug|Win32 + {DD903FEE-4A59-4307-8DE2-0F777DC21FFE}.Release.ActiveCfg = Release|Win32 + {DD903FEE-4A59-4307-8DE2-0F777DC21FFE}.Release.Build.0 = Release|Win32 + {DD903FEE-4A59-4307-8DE2-0F777DC21FFE}.Release DLL.ActiveCfg = Release DLL|Win32 + {DD903FEE-4A59-4307-8DE2-0F777DC21FFE}.Release DLL.Build.0 = Release DLL|Win32 + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + EndGlobalSection + GlobalSection(ExtensibilityAddIns) = postSolution + EndGlobalSection +EndGlobal diff --git a/tests/convert_instlatx64.c b/tests/convert_instlatx64.c index d3d4169..b9e2cca 100644 --- a/tests/convert_instlatx64.c +++ b/tests/convert_instlatx64.c @@ -62,7 +62,7 @@ int main(int argc, char *argv[]) fclose(fout); snprintf(cmd, CMD_LEN, "cpuid_tool --load=%s --report --outfile=%s", raw_filename, report_filename); system(cmd); - + /* Invoke create_test */ snprintf(cmd, CMD_LEN, "./create_test.py %s %s > %s.test", raw_filename, report_filename, output_filename); if((argc > 3) && !strcmp(argv[3], "--create")) diff --git a/tests/run_tests.py b/tests/run_tests.py index 1b4f16c..5a9523c 100755 --- a/tests/run_tests.py +++ b/tests/run_tests.py @@ -101,7 +101,7 @@ def do_test(inp, expected_out, binary, test_file_name): fixFile(test_file_name, inp, real_out) return "Mismatch, fixed." else: - return "Mismatch in fields:\n%s" % "\n".join([fmt_error(err) for err in err_fields]) + return "Mismatch in fields:\n%s" % "\n".join([fmt_error(err) for err in err_fields]) errors = False print "Testing..."