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