#define pr_fmt(fmt) …
#include <linux/earlycpio.h>
#include <linux/firmware.h>
#include <linux/uaccess.h>
#include <linux/initrd.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/cpu.h>
#include <linux/uio.h>
#include <linux/mm.h>
#include <asm/cpu_device_id.h>
#include <asm/processor.h>
#include <asm/tlbflush.h>
#include <asm/setup.h>
#include <asm/msr.h>
#include "internal.h"
static const char ucode_path[] = …;
#define UCODE_BSP_LOADED …
static struct microcode_intel *ucode_patch_va __read_mostly;
static struct microcode_intel *ucode_patch_late __read_mostly;
static unsigned int llc_size_per_core __ro_after_init;
struct extended_signature { … };
struct extended_sigtable { … };
#define DEFAULT_UCODE_TOTALSIZE …
#define EXT_HEADER_SIZE …
#define EXT_SIGNATURE_SIZE …
static inline unsigned int get_totalsize(struct microcode_header_intel *hdr)
{ … }
static inline unsigned int exttable_size(struct extended_sigtable *et)
{ … }
void intel_collect_cpu_info(struct cpu_signature *sig)
{ … }
EXPORT_SYMBOL_GPL(…);
static inline bool cpu_signatures_match(struct cpu_signature *s1, unsigned int sig2,
unsigned int pf2)
{ … }
bool intel_find_matching_signature(void *mc, struct cpu_signature *sig)
{ … }
EXPORT_SYMBOL_GPL(…);
int intel_microcode_sanity_check(void *mc, bool print_err, int hdr_type)
{ … }
EXPORT_SYMBOL_GPL(…);
static void update_ucode_pointer(struct microcode_intel *mc)
{ … }
static void save_microcode_patch(struct microcode_intel *patch)
{ … }
static __init struct microcode_intel *scan_microcode(void *data, size_t size,
struct ucode_cpu_info *uci,
bool save)
{ … }
static enum ucode_state __apply_microcode(struct ucode_cpu_info *uci,
struct microcode_intel *mc,
u32 *cur_rev)
{ … }
static enum ucode_state apply_microcode_early(struct ucode_cpu_info *uci)
{ … }
static __init bool load_builtin_intel_microcode(struct cpio_data *cp)
{ … }
static __init struct microcode_intel *get_microcode_blob(struct ucode_cpu_info *uci, bool save)
{ … }
static int __init save_builtin_microcode(void)
{ … }
early_initcall(save_builtin_microcode);
void __init load_ucode_intel_bsp(struct early_load_data *ed)
{ … }
void load_ucode_intel_ap(void)
{ … }
void reload_ucode_intel(void)
{ … }
static int collect_cpu_info(int cpu_num, struct cpu_signature *csig)
{ … }
static enum ucode_state apply_microcode_late(int cpu)
{ … }
static bool ucode_validate_minrev(struct microcode_header_intel *mc_header)
{ … }
static enum ucode_state parse_microcode_blobs(int cpu, struct iov_iter *iter)
{ … }
static bool is_blacklisted(unsigned int cpu)
{ … }
static enum ucode_state request_microcode_fw(int cpu, struct device *device)
{ … }
static void finalize_late_load(int result)
{ … }
static struct microcode_ops microcode_intel_ops = …;
static __init void calc_llc_size_per_core(struct cpuinfo_x86 *c)
{ … }
struct microcode_ops * __init init_intel_microcode(void)
{ … }