blob: 09652b95a3990aa026bafe689cbb34b0af622f84 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Simon Glassf79d5382014-11-12 22:42:21 -07002/*
3 * Copyright (c) 2015 Google, Inc
Simon Glassf79d5382014-11-12 22:42:21 -07004 */
5
6#ifndef __ASM_ARCH_MICROCODE_H
7#define __ASM_ARCH_MICROCODE_H
8
Simon Glass9281eb52015-01-01 16:18:14 -07009#ifndef __ASSEMBLY__
10
Simon Glass8dda5872016-03-11 22:07:11 -070011/* This is a declaration for ucode_base in start.S */
12extern u32 ucode_base;
Ivan Gorinov7fe40752018-06-21 21:16:16 -070013extern u32 ucode_size;
Simon Glass8dda5872016-03-11 22:07:11 -070014
Simon Glassf79d5382014-11-12 22:42:21 -070015/**
16 * microcode_update_intel() - Apply microcode updates
17 *
18 * Applies any microcode updates in the device tree.
19 *
Heinrich Schuchardt47b4c022022-01-19 18:05:50 +010020 * Return: 0 if OK, -EEXIST if the updates were already applied, -ENOENT if
Simon Glassf79d5382014-11-12 22:42:21 -070021 * not updates were found, -EINVAL if an update was invalid
22 */
23int microcode_update_intel(void);
Simon Glassc17d4502016-03-11 22:07:09 -070024
25/**
26 * microcode_read_rev() - Read the microcode version
27 *
28 * This reads the microcode version of the currently running CPU
29 *
Heinrich Schuchardt47b4c022022-01-19 18:05:50 +010030 * Return: microcode version number
Simon Glassc17d4502016-03-11 22:07:09 -070031 */
32int microcode_read_rev(void);
Simon Glass9281eb52015-01-01 16:18:14 -070033#endif /* __ASSEMBLY__ */
Simon Glassf79d5382014-11-12 22:42:21 -070034
35#endif