[edk2-devel] [PATCH 3/6] MdePkg/BaseLib: Implement EnableInterruptsAndSleep
Gao, Zhichao
zhichao.gao at intel.com
Fri May 24 05:04:34 UTC 2019
From: Sean Brogan <sean.brogan at microsoft.com>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1400
Implement EnableInterruptsAndSleep.
Cc: Michael D Kinney <michael.d.kinney at intel.com>
Cc: Liming Gao <liming.gao at intel.com>
Cc: Sean Brogan <sean.brogan at microsoft.com>
Cc: Michael Turner <Michael.Turner at microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew at microsoft.com>
Signed-off-by: Zhichao Gao <zhichao.gao at intel.com>
---
MdePkg/Library/BaseLib/Ia32/EnableInterrupts.c | 18 +++++++++++++++++-
.../Library/BaseLib/Ia32/EnableInterrupts.nasm | 15 ++++++++++++++-
.../Library/BaseLib/X64/EnableInterrupts.nasm | 15 ++++++++++++++-
3 files changed, 45 insertions(+), 3 deletions(-)
diff --git a/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.c b/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.c
index bc03144c42..c2a84342b1 100644
--- a/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.c
+++ b/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.c
@@ -1,7 +1,7 @@
/** @file
EnableInterrupts function
- Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -24,3 +24,19 @@ EnableInterrupts (
}
}
+/**
+ Enables CPU interrupts and then waits for an interrupt to arrive.
+
+**/
+VOID
+EFIAPI
+EnableInterruptsAndSleep (
+ VOID
+ )
+{
+ _asm {
+ sti
+ hlt
+ }
+}
+
diff --git a/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.nasm b/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.nasm
index 979e708207..86902f61b6 100644
--- a/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.nasm
+++ b/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.nasm
@@ -1,6 +1,6 @@
;------------------------------------------------------------------------------
;
-; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
+; Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
; SPDX-License-Identifier: BSD-2-Clause-Patent
;
; Module Name:
@@ -29,3 +29,16 @@ ASM_PFX(EnableInterrupts):
sti
ret
+;------------------------------------------------------------------------------
+; VOID
+; EFIAPI
+; EnableInterruptsAndSleep (
+; VOID
+; );
+;------------------------------------------------------------------------------
+global ASM_PFX(EnableInterruptsAndSleep)
+ASM_PFX(EnableInterruptsAndSleep):
+ sti
+ hlt
+ ret
+
diff --git a/MdePkg/Library/BaseLib/X64/EnableInterrupts.nasm b/MdePkg/Library/BaseLib/X64/EnableInterrupts.nasm
index 6057afd626..de8f2ad434 100644
--- a/MdePkg/Library/BaseLib/X64/EnableInterrupts.nasm
+++ b/MdePkg/Library/BaseLib/X64/EnableInterrupts.nasm
@@ -1,6 +1,6 @@
;------------------------------------------------------------------------------
;
-; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
+; Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
; SPDX-License-Identifier: BSD-2-Clause-Patent
;
; Module Name:
@@ -30,3 +30,16 @@ ASM_PFX(EnableInterrupts):
sti
ret
+;------------------------------------------------------------------------------
+; VOID
+; EFIAPI
+; EnableInterruptsAndSleep (
+; VOID
+; );
+;------------------------------------------------------------------------------
+global ASM_PFX(EnableInterruptsAndSleep)
+ASM_PFX(EnableInterruptsAndSleep):
+ sti
+ hlt
+ ret
+
--
2.21.0.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#41305): https://edk2.groups.io/g/devel/message/41305
Mute This Topic: https://groups.io/mt/31741730/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list