2018-05-06 21:58:06 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
2014-11-13 05:42:21 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2015 Google, Inc
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ASM_ARCH_MICROCODE_H
|
|
|
|
#define __ASM_ARCH_MICROCODE_H
|
|
|
|
|
2015-01-01 23:18:14 +00:00
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
|
2016-03-12 05:07:11 +00:00
|
|
|
/* This is a declaration for ucode_base in start.S */
|
|
|
|
extern u32 ucode_base;
|
2018-06-22 04:16:16 +00:00
|
|
|
extern u32 ucode_size;
|
2016-03-12 05:07:11 +00:00
|
|
|
|
2014-11-13 05:42:21 +00:00
|
|
|
/**
|
|
|
|
* microcode_update_intel() - Apply microcode updates
|
|
|
|
*
|
|
|
|
* Applies any microcode updates in the device tree.
|
|
|
|
*
|
2022-01-19 17:05:50 +00:00
|
|
|
* Return: 0 if OK, -EEXIST if the updates were already applied, -ENOENT if
|
2014-11-13 05:42:21 +00:00
|
|
|
* not updates were found, -EINVAL if an update was invalid
|
|
|
|
*/
|
|
|
|
int microcode_update_intel(void);
|
2016-03-12 05:07:09 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* microcode_read_rev() - Read the microcode version
|
|
|
|
*
|
|
|
|
* This reads the microcode version of the currently running CPU
|
|
|
|
*
|
2022-01-19 17:05:50 +00:00
|
|
|
* Return: microcode version number
|
2016-03-12 05:07:09 +00:00
|
|
|
*/
|
|
|
|
int microcode_read_rev(void);
|
2015-01-01 23:18:14 +00:00
|
|
|
#endif /* __ASSEMBLY__ */
|
2014-11-13 05:42:21 +00:00
|
|
|
|
|
|
|
#endif
|