]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseLib/Ipf/CpuBreakpoint.c
Removed duplicate PalCallStatic functions in different libraries. Moved ReadItc and...
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ipf / CpuBreakpoint.c
index 987fc9c846bb402100fd11e345e8d23f554c1323..49bd06b8c2a3063cc9b03b5e701a1b644531ccc2 100644 (file)
@@ -19,6 +19,7 @@
 #pragma intrinsic (__break)\r
 #pragma intrinsic (__mfa)\r
 \r
+\r
 /**\r
   Generates a breakpoint on the CPU.\r
 \r
@@ -82,20 +83,36 @@ EnableInterrupts (
 }\r
 \r
 /**\r
-  Retrieves the current CPU interrupt state.\r
+  Enables CPU interrupts for the smallest window required to capture any\r
+  pending interrupts.\r
+\r
+  Enables CPU interrupts for the smallest window required to capture any\r
+  pending interrupts.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+EnableDisableInterrupts (\r
+  VOID\r
+  )\r
+{\r
+  EnableInterrupts ();\r
+  DisableInterrupts ();\r
+}\r
 \r
-  Retrieves the current CPU interrupt state. Returns TRUE is interrupts are\r
-  currently enabled. Otherwise returns FALSE.\r
+/**\r
+  Places the CPU in a sleep state until an interrupt is received.\r
 \r
-  @retval TRUE  CPU interrupts are enabled.\r
-  @retval FALSE CPU interrupts are disabled.\r
+  Places the CPU in a sleep state until an interrupt is received. If interrupts\r
+  are disabled prior to calling this function, then the CPU will be placed in a\r
+  sleep state indefinitely.\r
 \r
 **/\r
-BOOLEAN\r
+VOID\r
 EFIAPI\r
-GetInterruptState (\r
+CpuSleep (\r
   VOID\r
   )\r
 {\r
-  return FALSE;\r
+  PalCallStatic (NULL, 29, 0, 0, 0);\r
 }\r