coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
common.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 "model_206ax.h"
5 
6 int get_platform_id(void)
7 {
8  msr_t msr;
9 
10  msr = rdmsr(IA32_PLATFORM_ID);
11  /* Read Platform Id Bits 52:50 */
12  return (msr.hi >> 18) & 0x7;
13 }
int get_platform_id(void)
Definition: common.c:6
static __always_inline msr_t rdmsr(unsigned int index)
Definition: msr.h:146
#define IA32_PLATFORM_ID
Definition: msr.h:18
unsigned int hi
Definition: msr.h:112