coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
voltage.c
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-only */
2
3
#include <
cpu/x86/msr.h
>
4
#include <smbios.h>
5
6
/* This is not an architectural MSR. */
7
#define MSR_PERF_STATUS 0x198
8
9
unsigned
int
smbios_cpu_get_voltage
(
void
)
10
{
11
return
(
rdmsr
(
MSR_PERF_STATUS
).hi & 0xffff) * 10 / 8192;
12
}
msr.h
rdmsr
static __always_inline msr_t rdmsr(unsigned int index)
Definition:
msr.h:146
MSR_PERF_STATUS
#define MSR_PERF_STATUS
Definition:
voltage.c:7
smbios_cpu_get_voltage
unsigned int smbios_cpu_get_voltage(void)
Definition:
voltage.c:9
src
cpu
intel
common
voltage.c
Generated by
1.9.1