diff options
| author | Borislav Petkov (AMD) <bp@alien8.de> | 2025-08-20 15:50:43 +0200 |
|---|---|---|
| committer | Borislav Petkov (AMD) <bp@alien8.de> | 2025-09-04 16:15:19 +0200 |
| commit | 43181a47263dd9f2bee0afd688a841b09f9b7d12 (patch) | |
| tree | e247c277258fbe184bc8ec92734fcefb374ed9d8 /arch/x86/kernel/cpu/microcode/internal.h | |
| parent | x86/microcode: Add microcode= cmdline parsing (diff) | |
| download | linux-43181a47263dd9f2bee0afd688a841b09f9b7d12.tar.gz linux-43181a47263dd9f2bee0afd688a841b09f9b7d12.zip | |
x86/microcode: Add microcode loader debugging functionality
Instead of adding ad-hoc debugging glue to the microcode loader each
time I need it, add debugging functionality which is not built by
default.
Simulate all patch handling the loader does except the actual loading of
the microcode patch into the hardware.
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/20250820135043.19048-3-bp@kernel.org
Diffstat (limited to 'arch/x86/kernel/cpu/microcode/internal.h')
| -rw-r--r-- | arch/x86/kernel/cpu/microcode/internal.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/microcode/internal.h b/arch/x86/kernel/cpu/microcode/internal.h index 50a9702ae4e2..ae8dbc2b908d 100644 --- a/arch/x86/kernel/cpu/microcode/internal.h +++ b/arch/x86/kernel/cpu/microcode/internal.h @@ -44,6 +44,9 @@ struct early_load_data { extern struct early_load_data early_data; extern struct ucode_cpu_info ucode_cpu_info[]; +extern u32 microcode_rev[NR_CPUS]; +extern u32 base_rev; + struct cpio_data find_microcode_in_initrd(const char *path); #define MAX_UCODE_COUNT 128 @@ -122,4 +125,10 @@ static inline void reload_ucode_intel(void) { } static inline struct microcode_ops *init_intel_microcode(void) { return NULL; } #endif /* !CONFIG_CPU_SUP_INTEL */ +#define ucode_dbg(fmt, ...) \ +({ \ + if (IS_ENABLED(CONFIG_MICROCODE_DBG)) \ + pr_info(fmt, ##__VA_ARGS__); \ +}) + #endif /* _X86_MICROCODE_INTERNAL_H */ |
