microcode.h 792 B

1234567891011121314151617181920212223242526272829303132333435
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (c) 2015 Google, Inc
  4. */
  5. #ifndef __ASM_ARCH_MICROCODE_H
  6. #define __ASM_ARCH_MICROCODE_H
  7. #ifndef __ASSEMBLY__
  8. /* This is a declaration for ucode_base in start.S */
  9. extern u32 ucode_base;
  10. extern u32 ucode_size;
  11. /**
  12. * microcode_update_intel() - Apply microcode updates
  13. *
  14. * Applies any microcode updates in the device tree.
  15. *
  16. * @return 0 if OK, -EEXIST if the updates were already applied, -ENOENT if
  17. * not updates were found, -EINVAL if an update was invalid
  18. */
  19. int microcode_update_intel(void);
  20. /**
  21. * microcode_read_rev() - Read the microcode version
  22. *
  23. * This reads the microcode version of the currently running CPU
  24. *
  25. * @return microcode version number
  26. */
  27. int microcode_read_rev(void);
  28. #endif /* __ASSEMBLY__ */
  29. #endif