Simon Glass | 77f9b1f | 2014-11-12 22:42:21 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2015 Google, Inc |
| 3 | * |
| 4 | * SPDX-License-Identifier: GPL-2.0+ |
| 5 | */ |
| 6 | |
| 7 | #ifndef __ASM_ARCH_MICROCODE_H |
| 8 | #define __ASM_ARCH_MICROCODE_H |
| 9 | |
Simon Glass | c72f74e | 2015-01-01 16:18:14 -0700 | [diff] [blame] | 10 | #ifndef __ASSEMBLY__ |
| 11 | |
Simon Glass | e77b62e | 2016-03-11 22:07:11 -0700 | [diff] [blame] | 12 | /* This is a declaration for ucode_base in start.S */ |
| 13 | extern u32 ucode_base; |
| 14 | |
Simon Glass | 77f9b1f | 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 | * |
| 20 | * @return 0 if OK, -EEXIST if the updates were already applied, -ENOENT if |
| 21 | * not updates were found, -EINVAL if an update was invalid |
| 22 | */ |
| 23 | int microcode_update_intel(void); |
Simon Glass | 6bcb675 | 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 | * |
| 30 | * @return microcode version number |
| 31 | */ |
| 32 | int microcode_read_rev(void); |
Simon Glass | c72f74e | 2015-01-01 16:18:14 -0700 | [diff] [blame] | 33 | #endif /* __ASSEMBLY__ */ |
Simon Glass | 77f9b1f | 2014-11-12 22:42:21 -0700 | [diff] [blame] | 34 | |
| 35 | #endif |