UefiCpuLib.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /** @file
  2. Public header file for UEFI CPU library class.
  3. This library class defines some routines that are generic for IA32 family CPU
  4. to be UEFI specification compliant.
  5. Copyright (c) 2009 - 2021, Intel Corporation. All rights reserved.<BR>
  6. Copyright (c) 2020, AMD Inc. All rights reserved.<BR>
  7. SPDX-License-Identifier: BSD-2-Clause-Patent
  8. **/
  9. #ifndef __UEFI_CPU_LIB_H__
  10. #define __UEFI_CPU_LIB_H__
  11. /**
  12. Initializes floating point units for requirement of UEFI specification.
  13. This function initializes floating-point control word to 0x027F (all exceptions
  14. masked,double-precision, round-to-nearest) and multimedia-extensions control word
  15. (if supported) to 0x1F80 (all exceptions masked, round-to-nearest, flush to zero
  16. for masked underflow).
  17. **/
  18. VOID
  19. EFIAPI
  20. InitializeFloatingPointUnits (
  21. VOID
  22. );
  23. /**
  24. Determine if the standard CPU signature is "AuthenticAMD".
  25. @retval TRUE The CPU signature matches.
  26. @retval FALSE The CPU signature does not match.
  27. **/
  28. BOOLEAN
  29. EFIAPI
  30. StandardSignatureIsAuthenticAMD (
  31. VOID
  32. );
  33. /**
  34. Return the 32bit CPU family and model value.
  35. @return CPUID[01h].EAX with Processor Type and Stepping ID cleared.
  36. **/
  37. UINT32
  38. EFIAPI
  39. GetCpuFamilyModel (
  40. VOID
  41. );
  42. /**
  43. Return the CPU stepping ID.
  44. @return CPU stepping ID value in CPUID[01h].EAX.
  45. **/
  46. UINT8
  47. EFIAPI
  48. GetCpuSteppingId (
  49. VOID
  50. );
  51. #endif