Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Simon Glass | f79d538 | 2014-11-12 22:42:21 -0700 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (c) 2015 Google, Inc |
Simon Glass | f79d538 | 2014-11-12 22:42:21 -0700 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #ifndef __ASM_ARCH_MICROCODE_H |
| 7 | #define __ASM_ARCH_MICROCODE_H |
| 8 | |
Simon Glass | 9281eb5 | 2015-01-01 16:18:14 -0700 | [diff] [blame] | 9 | #ifndef __ASSEMBLY__ |
| 10 | |
Simon Glass | 8dda587 | 2016-03-11 22:07:11 -0700 | [diff] [blame] | 11 | /* This is a declaration for ucode_base in start.S */ |
| 12 | extern u32 ucode_base; |
Ivan Gorinov | 7fe4075 | 2018-06-21 21:16:16 -0700 | [diff] [blame] | 13 | extern u32 ucode_size; |
Simon Glass | 8dda587 | 2016-03-11 22:07:11 -0700 | [diff] [blame] | 14 | |
Simon Glass | f79d538 | 2014-11-12 22:42:21 -0700 | [diff] [blame] | 15 | /** |
| 16 | * microcode_update_intel() - Apply microcode updates |
| 17 | * |
| 18 | * Applies any microcode updates in the device tree. |
| 19 | * |
Heinrich Schuchardt | 47b4c02 | 2022-01-19 18:05:50 +0100 | [diff] [blame] | 20 | * Return: 0 if OK, -EEXIST if the updates were already applied, -ENOENT if |
Simon Glass | f79d538 | 2014-11-12 22:42:21 -0700 | [diff] [blame] | 21 | * not updates were found, -EINVAL if an update was invalid |
| 22 | */ |
| 23 | int microcode_update_intel(void); |
Simon Glass | c17d450 | 2016-03-11 22:07:09 -0700 | [diff] [blame] | 24 | |
| 25 | /** |
| 26 | * microcode_read_rev() - Read the microcode version |
| 27 | * |
| 28 | * This reads the microcode version of the currently running CPU |
| 29 | * |
Heinrich Schuchardt | 47b4c02 | 2022-01-19 18:05:50 +0100 | [diff] [blame] | 30 | * Return: microcode version number |
Simon Glass | c17d450 | 2016-03-11 22:07:09 -0700 | [diff] [blame] | 31 | */ |
| 32 | int microcode_read_rev(void); |
Simon Glass | 9281eb5 | 2015-01-01 16:18:14 -0700 | [diff] [blame] | 33 | #endif /* __ASSEMBLY__ */ |
Simon Glass | f79d538 | 2014-11-12 22:42:21 -0700 | [diff] [blame] | 34 | |
| 35 | #endif |