diff --git a/debian/changelog b/debian/changelog index 273342c..e6e0c74 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +libcpuid (0.4.0+ubuntu1~1) artful; urgency=low + + * built for artful + * got rid of lintian errors + + -- Jeffrey Cliff Fri, 20 Apr 2018 15:39:37 +0600 + libcpuid (0.4.0) unstable; urgency=low * Better detection of AMD clock multiplier with msrinfo. diff --git a/debian/control b/debian/control index b70c5da..1e0b48c 100644 --- a/debian/control +++ b/debian/control @@ -1,5 +1,5 @@ Source: libcpuid -Section: utils +Section: libs Priority: optional Maintainer: Zhang, Guodong Build-Depends: debhelper (>= 9), autotools-dev, libtool, automake, autoconf, python, doxygen diff --git a/libcpuid/libcpuid.h b/libcpuid/libcpuid.h index f99c0fe..2bf445f 100644 --- a/libcpuid/libcpuid.h +++ b/libcpuid/libcpuid.h @@ -60,7 +60,7 @@ */ /** @mainpage A simple libcpuid introduction - * + * * LibCPUID provides CPU identification and access to the CPUID and RDTSC * instructions on the x86. *

@@ -82,6 +82,7 @@ */ /** @defgroup libcpuid LibCPUID + * @brief LibCPUID provides CPU identification @{ */ /* Include some integer type specifications: */ @@ -535,23 +536,23 @@ typedef enum { * @brief Describes common library error codes */ typedef enum { - ERR_OK = 0, /*!< "No error" */ - ERR_NO_CPUID = -1, /*!< "CPUID instruction is not supported" */ - ERR_NO_RDTSC = -2, /*!< "RDTSC instruction is not supported" */ - ERR_NO_MEM = -3, /*!< "Memory allocation failed" */ - ERR_OPEN = -4, /*!< "File open operation failed" */ - ERR_BADFMT = -5, /*!< "Bad file format" */ - ERR_NOT_IMP = -6, /*!< "Not implemented" */ - ERR_CPU_UNKN = -7, /*!< "Unsupported processor" */ - ERR_NO_RDMSR = -8, /*!< "RDMSR instruction is not supported" */ - ERR_NO_DRIVER= -9, /*!< "RDMSR driver error (generic)" */ - ERR_NO_PERMS = -10, /*!< "No permissions to install RDMSR driver" */ - ERR_EXTRACT = -11, /*!< "Cannot extract RDMSR driver (read only media?)" */ - ERR_HANDLE = -12, /*!< "Bad handle" */ - ERR_INVMSR = -13, /*!< "Invalid MSR" */ - ERR_INVCNB = -14, /*!< "Invalid core number" */ - ERR_HANDLE_R = -15, /*!< "Error on handle read" */ - ERR_INVRANGE = -16, /*!< "Invalid given range" */ + ERR_OK = 0, /*!< No error */ + ERR_NO_CPUID = -1, /*!< CPUID instruction is not supported */ + ERR_NO_RDTSC = -2, /*!< RDTSC instruction is not supported */ + ERR_NO_MEM = -3, /*!< Memory allocation failed */ + ERR_OPEN = -4, /*!< File open operation failed */ + ERR_BADFMT = -5, /*!< Bad file format */ + ERR_NOT_IMP = -6, /*!< Not implemented */ + ERR_CPU_UNKN = -7, /*!< Unsupported processor */ + ERR_NO_RDMSR = -8, /*!< RDMSR instruction is not supported */ + ERR_NO_DRIVER= -9, /*!< RDMSR driver error (generic) */ + ERR_NO_PERMS = -10, /*!< No permissions to install RDMSR driver */ + ERR_EXTRACT = -11, /*!< Cannot extract RDMSR driver (read only media?) */ + ERR_HANDLE = -12, /*!< Bad handle */ + ERR_INVMSR = -13, /*!< Invalid MSR */ + ERR_INVCNB = -14, /*!< Invalid core number */ + ERR_HANDLE_R = -15, /*!< Error on handle read */ + ERR_INVRANGE = -16, /*!< Invalid given range */ } cpu_error_t; /** @@ -1108,7 +1109,7 @@ int cpu_msrinfo(struct msr_driver_t* handle, cpu_msrinfo_request_t which); /** * @brief Writes the raw MSR data to a text file - * @param data - a pointer to msr_driver_t structure + * @param handle - a handle to the MSR reader driver, as created by cpu_msr_driver_open * @param filename - the path of the file, where the serialized data should be * written. If empty, stdout will be used. * @note This is intended primarily for debugging. On some processor, which is @@ -1131,8 +1132,7 @@ int msr_serialize_raw_data(struct msr_driver_t* handle, const char* filename); * This function unloads the MSR driver opened by cpu_msr_driver_open and * frees any resources associated with it. * - * @param handle - a handle to the MSR reader driver, as created by - * cpu_msr_driver_open + * @param handle - a handle to the MSR reader driver, as created by cpu_msr_driver_open * * @returns zero if successful, and some negative number on error. * The error message can be obtained by calling \ref cpuid_error. diff --git a/tests/intel/qemu/qemu.test b/tests/intel/qemu/qemu.test new file mode 100644 index 0000000..6341195 --- /dev/null +++ b/tests/intel/qemu/qemu.test @@ -0,0 +1,100 @@ +basic_cpuid[0]=00000004 756e6547 6c65746e 49656e69 +basic_cpuid[1]=000006d3 00000800 80002001 078bfbfd +basic_cpuid[2]=00000001 00000000 00000000 002c307d +basic_cpuid[3]=00000000 00000000 00000000 00000000 +basic_cpuid[4]=00000121 01c0003f 0000003f 00000001 +basic_cpuid[5]=00000121 01c0003f 0000003f 00000001 +basic_cpuid[6]=00000121 01c0003f 0000003f 00000001 +basic_cpuid[7]=00000121 01c0003f 0000003f 00000001 +basic_cpuid[8]=00000121 01c0003f 0000003f 00000001 +basic_cpuid[9]=00000121 01c0003f 0000003f 00000001 +basic_cpuid[10]=00000121 01c0003f 0000003f 00000001 +basic_cpuid[11]=00000121 01c0003f 0000003f 00000001 +basic_cpuid[12]=00000121 01c0003f 0000003f 00000001 +basic_cpuid[13]=00000121 01c0003f 0000003f 00000001 +basic_cpuid[14]=00000121 01c0003f 0000003f 00000001 +basic_cpuid[15]=00000121 01c0003f 0000003f 00000001 +basic_cpuid[16]=00000121 01c0003f 0000003f 00000001 +basic_cpuid[17]=00000121 01c0003f 0000003f 00000001 +basic_cpuid[18]=00000121 01c0003f 0000003f 00000001 +basic_cpuid[19]=00000121 01c0003f 0000003f 00000001 +basic_cpuid[20]=00000121 01c0003f 0000003f 00000001 +basic_cpuid[21]=00000121 01c0003f 0000003f 00000001 +basic_cpuid[22]=00000121 01c0003f 0000003f 00000001 +basic_cpuid[23]=00000121 01c0003f 0000003f 00000001 +basic_cpuid[24]=00000121 01c0003f 0000003f 00000001 +basic_cpuid[25]=00000121 01c0003f 0000003f 00000001 +basic_cpuid[26]=00000121 01c0003f 0000003f 00000001 +basic_cpuid[27]=00000121 01c0003f 0000003f 00000001 +basic_cpuid[28]=00000121 01c0003f 0000003f 00000001 +basic_cpuid[29]=00000121 01c0003f 0000003f 00000001 +basic_cpuid[30]=00000121 01c0003f 0000003f 00000001 +basic_cpuid[31]=00000121 01c0003f 0000003f 00000001 +ext_cpuid[0]=8000000a 68747541 444d4163 69746e65 +ext_cpuid[1]=000006d3 00000000 00000001 2191abfd +ext_cpuid[2]=554d4551 72695620 6c617574 55504320 +ext_cpuid[3]=72657620 6e6f6973 70632820 2d343675 +ext_cpuid[4]=6c656872 00002936 00000000 00000000 +ext_cpuid[5]=01ff01ff 01ff01ff 40020140 40020140 +ext_cpuid[6]=00000000 42004200 02008140 00000000 +ext_cpuid[7]=00000000 00000000 00000000 00000000 +ext_cpuid[8]=0000302e 00000000 00000000 00000000 +ext_cpuid[9]=00000000 00000000 00000000 00000000 +ext_cpuid[10]=00000001 00000010 00000000 00000000 +ext_cpuid[11]=00000121 01c0003f 0000003f 00000001 +ext_cpuid[12]=00000121 01c0003f 0000003f 00000001 +ext_cpuid[13]=00000121 01c0003f 0000003f 00000001 +ext_cpuid[14]=00000121 01c0003f 0000003f 00000001 +ext_cpuid[15]=00000121 01c0003f 0000003f 00000001 +ext_cpuid[16]=00000121 01c0003f 0000003f 00000001 +ext_cpuid[17]=00000121 01c0003f 0000003f 00000001 +ext_cpuid[18]=00000121 01c0003f 0000003f 00000001 +ext_cpuid[19]=00000121 01c0003f 0000003f 00000001 +ext_cpuid[20]=00000121 01c0003f 0000003f 00000001 +ext_cpuid[21]=00000121 01c0003f 0000003f 00000001 +ext_cpuid[22]=00000121 01c0003f 0000003f 00000001 +ext_cpuid[23]=00000121 01c0003f 0000003f 00000001 +ext_cpuid[24]=00000121 01c0003f 0000003f 00000001 +ext_cpuid[25]=00000121 01c0003f 0000003f 00000001 +ext_cpuid[26]=00000121 01c0003f 0000003f 00000001 +ext_cpuid[27]=00000121 01c0003f 0000003f 00000001 +ext_cpuid[28]=00000121 01c0003f 0000003f 00000001 +ext_cpuid[29]=00000121 01c0003f 0000003f 00000001 +ext_cpuid[30]=00000121 01c0003f 0000003f 00000001 +ext_cpuid[31]=00000121 01c0003f 0000003f 00000001 +intel_fn4[0]=00000121 01c0003f 0000003f 00000001 +intel_fn4[1]=00000122 01c0003f 0000003f 00000001 +intel_fn4[2]=00000143 03c0003f 00000fff 00000001 +intel_fn4[3]=00000000 00000000 00000000 00000000 +intel_fn4[4]=00000000 00000000 00000000 00000000 +intel_fn4[5]=00000000 00000000 00000000 00000000 +intel_fn4[6]=00000000 00000000 00000000 00000000 +intel_fn4[7]=00000000 00000000 00000000 00000000 +intel_fn11[0]=00000121 01c0003f 0000003f 00000001 +intel_fn11[1]=00000122 01c0003f 0000003f 00000001 +intel_fn11[2]=00000143 03c0003f 00000fff 00000001 +intel_fn11[3]=00000000 00000000 00000000 00000000 +-------------------------------------------------------------------------------- +6 +13 +3 +6 +13 +1 +1 +32 +32 +4096 +-1 +-1 +8 +16 +-1 +-1 +64 +64 +-1 +-1 +64 (non-authoritative) +Pentium M (Dothan) +fpu de pse tsc msr pae mce cx8 apic mtrr sep pge mca cmov pat pse36 clflush mmx fxsr sse sse2 pni cx16 syscall xd lm lahf_lm