diff options
Diffstat (limited to 'MdePkg/Library/BaseLib/Ipf/CpuBreakpoint.c')
-rw-r--r-- | MdePkg/Library/BaseLib/Ipf/CpuBreakpoint.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/MdePkg/Library/BaseLib/Ipf/CpuBreakpoint.c b/MdePkg/Library/BaseLib/Ipf/CpuBreakpoint.c index 7923e92fa9..478cac8c91 100644 --- a/MdePkg/Library/BaseLib/Ipf/CpuBreakpoint.c +++ b/MdePkg/Library/BaseLib/Ipf/CpuBreakpoint.c @@ -19,6 +19,22 @@ #pragma intrinsic (__break)
#pragma intrinsic (__mfa)
+typedef struct {
+ UINT64 Status;
+ UINT64 r9;
+ UINT64 r10;
+ UINT64 r11;
+} PAL_PROC_RETURN;
+
+PAL_PROC_RETURN
+PalCallStatic (
+ IN CONST VOID *PalEntryPoint,
+ IN UINT64 Arg1,
+ IN UINT64 Arg2,
+ IN UINT64 Arg3,
+ IN UINT64 Arg4
+ );
+
/**
Generates a breakpoint on the CPU.
@@ -117,3 +133,20 @@ EnableDisableInterrupts ( EnableInterrupts ();
DisableInterrupts ();
}
+
+/**
+ Places the CPU in a sleep state until an interrupt is received.
+
+ Places the CPU in a sleep state until an interrupt is received. If interrupts
+ are disabled prior to calling this function, then the CPU will be placed in a
+ sleep state indefinitely.
+
+**/
+VOID
+EFIAPI
+CpuSleep (
+ VOID
+ )
+{
+ PalCallStatic (NULL, 29, 0, 0, 0);
+}
|