summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/DebugSupportDxe/X64
diff options
context:
space:
mode:
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2008-12-11 08:38:20 +0000
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2008-12-11 08:38:20 +0000
commitc84507ab5229c462806187b090ba6249540c9070 (patch)
tree7667d4af2c9b069362001fefebb5750f39b0a0f0 /MdeModulePkg/Universal/DebugSupportDxe/X64
parent89df7f9df7551a7f32566aaf9aeaf22d0eae0864 (diff)
downloadedk2-platforms-c84507ab5229c462806187b090ba6249540c9070.tar.xz
code scrub for DebugSpport Module.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6997 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/DebugSupportDxe/X64')
-rw-r--r--MdeModulePkg/Universal/DebugSupportDxe/X64/AsmFuncs.S8
-rw-r--r--MdeModulePkg/Universal/DebugSupportDxe/X64/AsmFuncs.asm30
-rw-r--r--MdeModulePkg/Universal/DebugSupportDxe/X64/PlDebugSupportX64.c30
3 files changed, 13 insertions, 55 deletions
diff --git a/MdeModulePkg/Universal/DebugSupportDxe/X64/AsmFuncs.S b/MdeModulePkg/Universal/DebugSupportDxe/X64/AsmFuncs.S
index 087e5490bb..693d26e6e4 100644
--- a/MdeModulePkg/Universal/DebugSupportDxe/X64/AsmFuncs.S
+++ b/MdeModulePkg/Universal/DebugSupportDxe/X64/AsmFuncs.S
@@ -30,14 +30,6 @@ _StubSize: .long _InterruptEntryStubEnd - _InterruptEntryStub
_FxStorSupport:
ret
-.globl _GetIdtr
-_GetIdtr:
- ret
-
-.globl _WriteInterruptFlag
-_WriteInterruptFlag:
- ret
-
.globl _Vect2Desc
_Vect2Desc:
ret
diff --git a/MdeModulePkg/Universal/DebugSupportDxe/X64/AsmFuncs.asm b/MdeModulePkg/Universal/DebugSupportDxe/X64/AsmFuncs.asm
index f486bd32b5..d9ba0be191 100644
--- a/MdeModulePkg/Universal/DebugSupportDxe/X64/AsmFuncs.asm
+++ b/MdeModulePkg/Universal/DebugSupportDxe/X64/AsmFuncs.asm
@@ -131,36 +131,6 @@ FxStorSupport PROC PUBLIC
ret
FxStorSupport ENDP
-
-
-
-;------------------------------------------------------------------------------
-; BOOLEAN
-; WriteInterruptFlag (
-; BOOLEAN NewState // rcx
-; )
-;
-; Abstract: Programs interrupt flag to the requested state and returns previous
-; state.
-;
-WriteInterruptFlag PROC PUBLIC
-
- pushfq
- pop rax
- and rax, 200h
- shr rax, 9
- cmp rcx, 0
- jnz EnableIF
- cli
- ret
-EnableIF:
- sti
- ret
-
-WriteInterruptFlag ENDP
-
-
-
;------------------------------------------------------------------------------
; void
; Vect2Desc (
diff --git a/MdeModulePkg/Universal/DebugSupportDxe/X64/PlDebugSupportX64.c b/MdeModulePkg/Universal/DebugSupportDxe/X64/PlDebugSupportX64.c
index 943d2c6911..e898d82271 100644
--- a/MdeModulePkg/Universal/DebugSupportDxe/X64/PlDebugSupportX64.c
+++ b/MdeModulePkg/Universal/DebugSupportDxe/X64/PlDebugSupportX64.c
@@ -12,30 +12,28 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
-//
-// private header files
-//
#include "DebugSupport.h"
/**
- Get Procedure Entry Point from IDT Gate Descriptor.
+ Get Interrupt Handle from IDT Gate Descriptor.
@param IdtGateDecriptor IDT Gate Descriptor.
- @return Procedure Entry Point located in IDT Gate Descriptor.
+ @return Interrupt Handle stored in IDT Gate Descriptor.
**/
-UINTN GetProcedureEntryPoint (
+UINTN
+GetInterruptHandleFromIdt (
IN IA32_IDT_GATE_DESCRIPTOR *IdtGateDecriptor
)
{
- UINTN ProcedureEntryPoint;
+ UINTN InterruptHandle;
- ((UINT16 *) &ProcedureEntryPoint)[0] = (UINT16) IdtGateDecriptor->Bits.OffsetLow;
- ((UINT16 *) &ProcedureEntryPoint)[1] = (UINT16) IdtGateDecriptor->Bits.OffsetHigh;
- ((UINT32 *) &ProcedureEntryPoint)[1] = (UINT32) IdtGateDecriptor->Bits.OffsetUpper;
+ ((UINT16 *) &InterruptHandle)[0] = (UINT16) IdtGateDecriptor->Bits.OffsetLow;
+ ((UINT16 *) &InterruptHandle)[1] = (UINT16) IdtGateDecriptor->Bits.OffsetHigh;
+ ((UINT32 *) &InterruptHandle)[1] = (UINT32) IdtGateDecriptor->Bits.OffsetUpper;
- return ProcedureEntryPoint;
+ return InterruptHandle;
}
/**
@@ -48,10 +46,8 @@ UINTN GetProcedureEntryPoint (
for.
@param Stub On successful exit, *Stub contains the newly allocated entry stub.
- @retval EFI_SUCCESS Always.
-
**/
-EFI_STATUS
+VOID
CreateEntryStub (
IN EFI_EXCEPTION_TYPE ExceptionType,
OUT VOID **Stub
@@ -82,7 +78,7 @@ CreateEntryStub (
//
*(UINT32 *) &StubCopy[0x3] = (UINT32)((UINTN) CommonIdtEntry - (UINTN) &StubCopy[StubSize]);
- return EFI_SUCCESS;
+ return;
}
/**
@@ -123,7 +119,7 @@ ManageIdtEntryTable (
//
Status = EFI_ALREADY_STARTED;
} else {
- Status = UnhookEntry (ExceptionType);
+ UnhookEntry (ExceptionType);
}
} else {
//
@@ -135,7 +131,7 @@ ManageIdtEntryTable (
//
Status = EFI_INVALID_PARAMETER;
} else {
- Status = HookEntry (ExceptionType, NewCallback);
+ HookEntry (ExceptionType, NewCallback);
}
}