]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/Library/MpInitLib/MpLib.h
UefiCpuPkg/MpInitLib: Remove Executable attribute from MpLib.h
[mirror_edk2.git] / UefiCpuPkg / Library / MpInitLib / MpLib.h
index d7e20f0b745407feec32b518bda192d3ba535b41..a8ca03efb8e3d8e75363dd66ad77fcb740b1c8ed 100644 (file)
@@ -2,6 +2,8 @@
   Common header file for MP Initialize Library.\r
 \r
   Copyright (c) 2016 - 2020, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2020, AMD Inc. All rights reserved.<BR>\r
+\r
   SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
@@ -12,6 +14,7 @@
 #include <PiPei.h>\r
 \r
 #include <Register/Intel/Cpuid.h>\r
+#include <Register/Amd/Cpuid.h>\r
 #include <Register/Intel/Msr.h>\r
 #include <Register/Intel/LocalApic.h>\r
 #include <Register/Intel/Microcode.h>\r
@@ -28,9 +31,9 @@
 #include <Library/SynchronizationLib.h>\r
 #include <Library/MtrrLib.h>\r
 #include <Library/HobLib.h>\r
+#include <Library/PcdLib.h>\r
 \r
-#include <IndustryStandard/FirmwareInterfaceTable.h>\r
-\r
+#include <Guid/MicrocodePatchHob.h>\r
 \r
 #define WAKEUP_AP_SIGNAL SIGNATURE_32 ('S', 'T', 'A', 'P')\r
 \r
@@ -599,6 +602,27 @@ ShadowMicrocodeUpdatePatch (
   IN OUT CPU_MP_DATA             *CpuMpData\r
   );\r
 \r
+/**\r
+  Get the cached microcode patch base address and size from the microcode patch\r
+  information cache HOB.\r
+\r
+  @param[out] Address       Base address of the microcode patches data.\r
+                            It will be updated if the microcode patch\r
+                            information cache HOB is found.\r
+  @param[out] RegionSize    Size of the microcode patches data.\r
+                            It will be updated if the microcode patch\r
+                            information cache HOB is found.\r
+\r
+  @retval  TRUE     The microcode patch information cache HOB is found.\r
+  @retval  FALSE    The microcode patch information cache HOB is not found.\r
+\r
+**/\r
+BOOLEAN\r
+GetMicrocodePatchInfoFromHob (\r
+  UINT64                         *Address,\r
+  UINT64                         *RegionSize\r
+  );\r
+\r
 /**\r
   Detect whether Mwait-monitor feature is supported.\r
 \r
@@ -634,5 +658,21 @@ GetProcessorNumber (
   OUT UINTN                    *ProcessorNumber\r
   );\r
 \r
+/**\r
+  This funtion will try to invoke platform specific microcode shadow logic to\r
+  relocate microcode update patches into memory.\r
+\r
+  @param[in, out] CpuMpData  The pointer to CPU MP Data structure.\r
+\r
+  @retval EFI_SUCCESS              Shadow microcode success.\r
+  @retval EFI_OUT_OF_RESOURCES     No enough resource to complete the operation.\r
+  @retval EFI_UNSUPPORTED          Can't find platform specific microcode shadow\r
+                                   PPI/Protocol.\r
+**/\r
+EFI_STATUS\r
+PlatformShadowMicrocode (\r
+  IN OUT CPU_MP_DATA             *CpuMpData\r
+  );\r
+\r
 #endif\r
 \r