coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
boot_cpu.c
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-only */
2
3
#include <
smp/node.h
>
4
#include <
cpu/x86/msr.h
>
5
#include <
cpu/x86/lapic_def.h
>
6
7
#if CONFIG(SMP)
8
int
boot_cpu
(
void
)
9
{
10
int
bsp;
11
msr_t
msr;
12
msr =
rdmsr
(
LAPIC_BASE_MSR
);
13
bsp = !!(msr.
lo
& (1 << 8));
14
return
bsp;
15
}
16
#endif
boot_cpu
int boot_cpu(void)
Definition:
psp.c:5
msr.h
rdmsr
static __always_inline msr_t rdmsr(unsigned int index)
Definition:
msr.h:146
lapic_def.h
LAPIC_BASE_MSR
#define LAPIC_BASE_MSR
Definition:
lapic_def.h:4
node.h
msr_struct
Definition:
msr.h:110
msr_struct::lo
unsigned int lo
Definition:
msr.h:111
src
cpu
x86
lapic
boot_cpu.c
Generated by
1.9.1