]>
Commit | Line | Data |
---|---|---|
df667535 KG |
1 | /** @file\r |
2 | This library defines some routines that are generic for IA32 family CPU.\r | |
3 | \r | |
4 | The library routines are UEFI specification compliant.\r | |
5 | \r | |
6 | Copyright (c) 2020, AMD Inc. All rights reserved.<BR>\r | |
7 | SPDX-License-Identifier: BSD-2-Clause-Patent\r | |
8 | \r | |
9 | **/\r | |
10 | \r | |
11 | #include <Register/Intel/Cpuid.h>\r | |
12 | #include <Register/Amd/Cpuid.h>\r | |
13 | \r | |
14 | #include <Library/BaseLib.h>\r | |
15 | #include <Library/UefiCpuLib.h>\r | |
16 | \r | |
17 | /**\r | |
18 | Determine if the standard CPU signature is "AuthenticAMD".\r | |
19 | \r | |
20 | @retval TRUE The CPU signature matches.\r | |
21 | @retval FALSE The CPU signature does not match.\r | |
22 | \r | |
23 | **/\r | |
24 | BOOLEAN\r | |
25 | EFIAPI\r | |
26 | StandardSignatureIsAuthenticAMD (\r | |
27 | VOID\r | |
28 | )\r | |
29 | {\r | |
30 | UINT32 RegEbx;\r | |
31 | UINT32 RegEcx;\r | |
32 | UINT32 RegEdx;\r | |
33 | \r | |
34 | AsmCpuid (CPUID_SIGNATURE, NULL, &RegEbx, &RegEcx, &RegEdx);\r | |
35 | return (RegEbx == CPUID_SIGNATURE_AUTHENTIC_AMD_EBX &&\r | |
36 | RegEcx == CPUID_SIGNATURE_AUTHENTIC_AMD_ECX &&\r | |
37 | RegEdx == CPUID_SIGNATURE_AUTHENTIC_AMD_EDX);\r | |
38 | }\r |