1
0
Fork 0
mirror of https://github.com/anrieff/libcpuid synced 2024-12-16 16:35:45 +00:00

Add INFO_BUS_CLOCK in cpu_msrinfo() as a more generic term (same as INFO_BCLK)

BCLK is specific to Intel
This commit is contained in:
Xorg 2016-06-04 20:31:01 +02:00
parent eeb7a6f3c7
commit 9059fb6ff5
2 changed files with 9 additions and 6 deletions

View file

@ -902,9 +902,11 @@ typedef enum {
INFO_THROTTLING, /*!< 1 if the current logical processor is
throttling. 0 if it is running normally. */
INFO_VOLTAGE, /*!< The current core voltage in Volt,
multiplied by 100. */
INFO_BCLK, /*!< The BCLK (base clock) in MHz,
multiplied by 100. */
multiplied by 100. */
INFO_BCLK, /*!< See \ref INFO_BUS_CLOCK. */
INFO_BUS_CLOCK, /*!< The main bus clock in MHz,
e.g., FSB/QPI/DMI/HT base clock,
multiplied by 100. */
} cpu_msrinfo_request_t;
/**

View file

@ -700,8 +700,8 @@ static double get_info_voltage(struct msr_driver_t* handle, struct cpu_id_t *id,
return CPU_INVALID_VALUE;
}
static double get_info_bclk(struct msr_driver_t* handle, struct cpu_id_t *id,
struct internal_id_info_t *internal)
static double get_info_bus_clock(struct msr_driver_t* handle, struct cpu_id_t *id,
struct internal_id_info_t *internal)
{
int err;
static int clock = 0;
@ -789,7 +789,8 @@ int cpu_msrinfo(struct msr_driver_t* handle, cpu_msrinfo_request_t which)
case INFO_VOLTAGE:
return get_info_voltage(handle, &id, &internal) * 100;
case INFO_BCLK:
return get_info_bclk(handle, &id, &internal) * 100;
case INFO_BUS_CLOCK:
return get_info_bus_clock(handle, &id, &internal) * 100;
default:
return CPU_INVALID_VALUE;
}