coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
microcode.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 #ifndef __CPU__INTEL__MICROCODE__
3 #define __CPU__INTEL__MICROCODE__
4 
5 #include <stdint.h>
6 
8 /* Find a microcode that matches the revision and platform family returning
9  * NULL if none found. The found microcode is cached for faster access on
10  * subsequent calls of this function.
11  *
12  * Since this function caches the found microcode (NULL or a valid microcode
13  * pointer), it is expected to be run from BSP before starting any other APs.
14  * It is not multithread safe otherwise. */
15 const void *intel_microcode_find(void);
16 
17 /* It is up to the caller to determine if parallel loading is possible as
18  * well as ensuring the microcode matches the family and revision (i.e. with
19  * intel_microcode_find()). */
21 
22 /* SoC specific check to determine if microcode update is really
23  * required, will skip microcode update if true. */
24 int soc_skip_ucode_update(u32 current_patch_id, u32 new_patch_id);
25 
26 /* return the version of the currently running microcode */
28 
29 /* extract microcode revision from the given patch */
31 /* extract microcode size from the given patch */
33 /* extract checksum from the given patch */
35 #endif
static const void * microcode_patch
Definition: haswell_init.c:567
void intel_microcode_load_unlocked(const void *microcode_patch)
Definition: microcode.c:71
int soc_skip_ucode_update(u32 current_patch_id, u32 new_patch_id)
Definition: cpu.c:206
uint32_t get_microcode_size(const void *microcode)
Definition: microcode.c:122
uint32_t get_microcode_checksum(const void *microcode)
Definition: microcode.c:127
uint32_t get_microcode_rev(const void *microcode)
Definition: microcode.c:117
void intel_update_microcode_from_cbfs(void)
Definition: microcode.c:242
uint32_t get_current_microcode_rev(void)
Definition: microcode.c:112
const void * intel_microcode_find(void)
Definition: microcode.c:223
unsigned int uint32_t
Definition: stdint.h:14
uint32_t u32
Definition: stdint.h:51