]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/Library/MpInitLib/MpLib.h
UefiCpuPkg/MpInitLib: Add AsmRelocateApLoop() assembly code
[mirror_edk2.git] / UefiCpuPkg / Library / MpInitLib / MpLib.h
index 28a3cd4b82686d2e67f1e9fefd3dbfe5e7287975..39ec5def5ba741334d0c75ec13c5b9c82269470c 100644 (file)
@@ -60,5 +60,26 @@ typedef struct {
 } MP_CPU_EXCHANGE_INFO;\r
 \r
 #pragma pack()\r
+/**\r
+  Assembly code to place AP into safe loop mode.\r
+\r
+  Place AP into targeted C-State if MONITOR is supported, otherwise\r
+  place AP into hlt state.\r
+  Place AP in protected mode if the current is long mode. Due to AP maybe\r
+  wakeup by some hardware event. It could avoid accessing page table that\r
+  may not available during booting to OS.\r
+\r
+  @param[in] MwaitSupport    TRUE indicates MONITOR is supported.\r
+                             FALSE indicates MONITOR is not supported.\r
+  @param[in] ApTargetCState  Target C-State value.\r
+  @param[in] PmCodeSegment   Protected mode code segment value.\r
+**/\r
+typedef\r
+VOID\r
+(EFIAPI * ASM_RELOCATE_AP_LOOP) (\r
+  IN BOOLEAN                 MwaitSupport,\r
+  IN UINTN                   ApTargetCState,\r
+  IN UINTN                   PmCodeSegment\r
+  );\r
 #endif\r
 \r