coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
cpu.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #ifndef _SOC_APOLLOLAKE_CPU_H_
4 #define _SOC_APOLLOLAKE_CPU_H_
5 
6 #include <cpu/x86/msr.h>
7 #include <intelblocks/msr.h>
8 #include <soc/msr.h>
9 
10 struct device;
11 void apollolake_init_cpus(struct device *dev);
12 void mainboard_devtree_update(struct device *dev);
13 
14 /* Flush L1D to L2 */
15 static inline void flush_l1d_to_l2(void)
16 {
17  msr_t msr = rdmsr(MSR_POWER_MISC);
18  msr.lo |= FLUSH_DL1_L2;
19  wrmsr(MSR_POWER_MISC, msr);
20 }
21 #endif /* _SOC_APOLLOLAKE_CPU_H_ */
static __always_inline msr_t rdmsr(unsigned int index)
Definition: msr.h:146
static __always_inline void wrmsr(unsigned int index, msr_t msr)
Definition: msr.h:157
void apollolake_init_cpus(struct device *dev)
Definition: cpu.c:263
static void flush_l1d_to_l2(void)
Definition: cpu.h:15
void mainboard_devtree_update(struct device *dev)
Definition: mainboard.c:230
#define FLUSH_DL1_L2
Definition: msr.h:10
#define MSR_POWER_MISC
Definition: msr.h:8
Definition: device.h:107
unsigned int lo
Definition: msr.h:111