blob: f7b32a5eb166aebda168fe7d1b294ea433c7a7a1 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Simon Glass77f9b1f2014-11-12 22:42:21 -07002/*
3 * Copyright (c) 2015 Google, Inc
Simon Glass77f9b1f2014-11-12 22:42:21 -07004 */
5
6#ifndef __ASM_ARCH_MICROCODE_H
7#define __ASM_ARCH_MICROCODE_H
8
Simon Glassc72f74e2015-01-01 16:18:14 -07009#ifndef __ASSEMBLY__
10
Simon Glasse77b62e2016-03-11 22:07:11 -070011/* This is a declaration for ucode_base in start.S */
12extern u32 ucode_base;
13
Simon Glass77f9b1f2014-11-12 22:42:21 -070014/**
15 * microcode_update_intel() - Apply microcode updates
16 *
17 * Applies any microcode updates in the device tree.
18 *
19 * @return 0 if OK, -EEXIST if the updates were already applied, -ENOENT if
20 * not updates were found, -EINVAL if an update was invalid
21 */
22int microcode_update_intel(void);
Simon Glass6bcb6752016-03-11 22:07:09 -070023
24/**
25 * microcode_read_rev() - Read the microcode version
26 *
27 * This reads the microcode version of the currently running CPU
28 *
29 * @return microcode version number
30 */
31int microcode_read_rev(void);
Simon Glassc72f74e2015-01-01 16:18:14 -070032#endif /* __ASSEMBLY__ */
Simon Glass77f9b1f2014-11-12 22:42:21 -070033
34#endif