summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Universal/DebugSupportDxe
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Universal/DebugSupportDxe')
-rw-r--r--MdeModulePkg/Universal/DebugSupportDxe/DebugSupport.c10
-rw-r--r--MdeModulePkg/Universal/DebugSupportDxe/Ia32/DebugSupport.h70
-rw-r--r--MdeModulePkg/Universal/DebugSupportDxe/Ia32/PlDebugSupport.c79
-rw-r--r--MdeModulePkg/Universal/DebugSupportDxe/Ia32/PlDebugSupport.h2
-rw-r--r--MdeModulePkg/Universal/DebugSupportDxe/Ia32/PlDebugSupportIa32.c26
-rw-r--r--MdeModulePkg/Universal/DebugSupportDxe/X64/PlDebugSupport.h2
-rw-r--r--MdeModulePkg/Universal/DebugSupportDxe/X64/PlDebugSupportX64.c26
7 files changed, 111 insertions, 104 deletions
diff --git a/MdeModulePkg/Universal/DebugSupportDxe/DebugSupport.c b/MdeModulePkg/Universal/DebugSupportDxe/DebugSupport.c
index 1a03ba4657..349a932b06 100644
--- a/MdeModulePkg/Universal/DebugSupportDxe/DebugSupport.c
+++ b/MdeModulePkg/Universal/DebugSupportDxe/DebugSupport.c
@@ -16,7 +16,6 @@ EFI_DEBUG_SUPPORT_PROTOCOL mDebugSupportProtocolInterface = {
InvalidateInstructionCache
};
-
/**
Debug Support Driver entry point.
@@ -34,8 +33,8 @@ EFI_DEBUG_SUPPORT_PROTOCOL mDebugSupportProtocolInterface = {
EFI_STATUS
EFIAPI
InitializeDebugSupportDriver (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
)
{
EFI_LOADED_IMAGE_PROTOCOL *LoadedImageProtocolPtr;
@@ -63,7 +62,7 @@ InitializeDebugSupportDriver (
Status = gBS->OpenProtocol (
HandlePtr[NumHandles],
&gEfiDebugSupportProtocolGuid,
- (VOID **) &DebugSupportProtocolPtr,
+ (VOID **)&DebugSupportProtocolPtr,
ImageHandle,
NULL,
EFI_OPEN_PROTOCOL_GET_PROTOCOL
@@ -77,6 +76,7 @@ InitializeDebugSupportDriver (
goto ErrExit;
}
} while (NumHandles > 0);
+
FreePool (HandlePtr);
}
@@ -86,7 +86,7 @@ InitializeDebugSupportDriver (
Status = gBS->OpenProtocol (
ImageHandle,
&gEfiLoadedImageProtocolGuid,
- (VOID **) &LoadedImageProtocolPtr,
+ (VOID **)&LoadedImageProtocolPtr,
ImageHandle,
NULL,
EFI_OPEN_PROTOCOL_GET_PROTOCOL
diff --git a/MdeModulePkg/Universal/DebugSupportDxe/Ia32/DebugSupport.h b/MdeModulePkg/Universal/DebugSupportDxe/Ia32/DebugSupport.h
index 9f88fab71f..cf12a2a6e8 100644
--- a/MdeModulePkg/Universal/DebugSupportDxe/Ia32/DebugSupport.h
+++ b/MdeModulePkg/Universal/DebugSupportDxe/Ia32/DebugSupport.h
@@ -21,8 +21,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include <Library/UefiBootServicesTableLib.h>
#include <Library/BaseLib.h>
-#define NUM_IDT_ENTRIES 0x78
-#define SYSTEM_TIMER_VECTOR 0x68
+#define NUM_IDT_ENTRIES 0x78
+#define SYSTEM_TIMER_VECTOR 0x68
typedef
VOID
@@ -32,20 +32,22 @@ VOID
typedef
VOID
-(EFIAPI *CALLBACK_FUNC) (
+(EFIAPI *CALLBACK_FUNC)(
);
typedef struct {
- IA32_IDT_GATE_DESCRIPTOR OrigDesc;
- DEBUG_PROC OrigVector;
- IA32_IDT_GATE_DESCRIPTOR NewDesc;
- DEBUG_PROC StubEntry;
- CALLBACK_FUNC RegisteredCallback;
+ IA32_IDT_GATE_DESCRIPTOR OrigDesc;
+ DEBUG_PROC OrigVector;
+ IA32_IDT_GATE_DESCRIPTOR NewDesc;
+ DEBUG_PROC StubEntry;
+ CALLBACK_FUNC RegisteredCallback;
} IDT_ENTRY;
-extern UINT8 InterruptEntryStub[];
-extern UINT32 StubSize;
-extern VOID (*OrigVector) (VOID);
+extern UINT8 InterruptEntryStub[];
+extern UINT32 StubSize;
+extern VOID (*OrigVector) (
+ VOID
+ );
extern IDT_ENTRY *IdtEntryTable;
extern IA32_IDT_GATE_DESCRIPTOR NullDesc;
@@ -79,8 +81,8 @@ FxStorSupport (
**/
VOID
Vect2Desc (
- IA32_IDT_GATE_DESCRIPTOR * DestDesc,
- VOID (*Vector) (VOID)
+ IA32_IDT_GATE_DESCRIPTOR *DestDesc,
+ VOID ( *Vector )(VOID)
);
/**
@@ -113,7 +115,7 @@ PlInitializeDebugSupportDriver (
EFI_STATUS
EFIAPI
PlUnloadDebugSupportDriver (
- IN EFI_HANDLE ImageHandle
+ IN EFI_HANDLE ImageHandle
);
/**
@@ -132,8 +134,8 @@ PlUnloadDebugSupportDriver (
EFI_STATUS
EFIAPI
GetMaximumProcessorIndex (
- IN EFI_DEBUG_SUPPORT_PROTOCOL *This,
- OUT UINTN *MaxProcessorIndex
+ IN EFI_DEBUG_SUPPORT_PROTOCOL *This,
+ OUT UINTN *MaxProcessorIndex
);
/**
@@ -153,9 +155,9 @@ GetMaximumProcessorIndex (
EFI_STATUS
EFIAPI
RegisterPeriodicCallback (
- IN EFI_DEBUG_SUPPORT_PROTOCOL *This,
- IN UINTN ProcessorIndex,
- IN EFI_PERIODIC_CALLBACK PeriodicCallback
+ IN EFI_DEBUG_SUPPORT_PROTOCOL *This,
+ IN UINTN ProcessorIndex,
+ IN EFI_PERIODIC_CALLBACK PeriodicCallback
);
/**
@@ -178,10 +180,10 @@ RegisterPeriodicCallback (
EFI_STATUS
EFIAPI
RegisterExceptionCallback (
- IN EFI_DEBUG_SUPPORT_PROTOCOL *This,
- IN UINTN ProcessorIndex,
- IN EFI_EXCEPTION_CALLBACK ExceptionCallback,
- IN EFI_EXCEPTION_TYPE ExceptionType
+ IN EFI_DEBUG_SUPPORT_PROTOCOL *This,
+ IN UINTN ProcessorIndex,
+ IN EFI_EXCEPTION_CALLBACK ExceptionCallback,
+ IN EFI_EXCEPTION_TYPE ExceptionType
);
/**
@@ -200,10 +202,10 @@ RegisterExceptionCallback (
EFI_STATUS
EFIAPI
InvalidateInstructionCache (
- IN EFI_DEBUG_SUPPORT_PROTOCOL *This,
- IN UINTN ProcessorIndex,
- IN VOID *Start,
- IN UINT64 Length
+ IN EFI_DEBUG_SUPPORT_PROTOCOL *This,
+ IN UINTN ProcessorIndex,
+ IN VOID *Start,
+ IN UINT64 Length
);
/**
@@ -219,8 +221,8 @@ InvalidateInstructionCache (
**/
VOID
CreateEntryStub (
- IN EFI_EXCEPTION_TYPE ExceptionType,
- OUT VOID **Stub
+ IN EFI_EXCEPTION_TYPE ExceptionType,
+ OUT VOID **Stub
);
/**
@@ -256,8 +258,8 @@ GetInterruptHandleFromIdt (
**/
EFI_STATUS
ManageIdtEntryTable (
- CALLBACK_FUNC NewCallback,
- EFI_EXCEPTION_TYPE ExceptionType
+ CALLBACK_FUNC NewCallback,
+ EFI_EXCEPTION_TYPE ExceptionType
);
/**
@@ -274,8 +276,8 @@ ManageIdtEntryTable (
**/
VOID
HookEntry (
- IN EFI_EXCEPTION_TYPE ExceptionType,
- IN CALLBACK_FUNC NewCallback
+ IN EFI_EXCEPTION_TYPE ExceptionType,
+ IN CALLBACK_FUNC NewCallback
);
/**
@@ -286,7 +288,7 @@ HookEntry (
**/
VOID
UnhookEntry (
- IN EFI_EXCEPTION_TYPE ExceptionType
+ IN EFI_EXCEPTION_TYPE ExceptionType
);
#endif
diff --git a/MdeModulePkg/Universal/DebugSupportDxe/Ia32/PlDebugSupport.c b/MdeModulePkg/Universal/DebugSupportDxe/Ia32/PlDebugSupport.c
index afea3a218c..40fe74d8c2 100644
--- a/MdeModulePkg/Universal/DebugSupportDxe/Ia32/PlDebugSupport.c
+++ b/MdeModulePkg/Universal/DebugSupportDxe/Ia32/PlDebugSupport.c
@@ -11,7 +11,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
//
// This the global main table to keep track of the interrupts
//
-IDT_ENTRY *IdtEntryTable = NULL;
+IDT_ENTRY *IdtEntryTable = NULL;
/**
Read IDT Gate Descriptor from IDT Table.
@@ -26,13 +26,13 @@ ReadIdtGateDescriptor (
OUT IA32_IDT_GATE_DESCRIPTOR *IdtGateDescriptor
)
{
- IA32_DESCRIPTOR IdtrValue;
- IA32_IDT_GATE_DESCRIPTOR *IdtTable;
+ IA32_DESCRIPTOR IdtrValue;
+ IA32_IDT_GATE_DESCRIPTOR *IdtTable;
- AsmReadIdtr (&IdtrValue);
- IdtTable = (IA32_IDT_GATE_DESCRIPTOR *) IdtrValue.Base;
+ AsmReadIdtr (&IdtrValue);
+ IdtTable = (IA32_IDT_GATE_DESCRIPTOR *)IdtrValue.Base;
- CopyMem ((VOID *) IdtGateDescriptor, (VOID *) &(IdtTable)[Vector], sizeof (IA32_IDT_GATE_DESCRIPTOR));
+ CopyMem ((VOID *)IdtGateDescriptor, (VOID *)&(IdtTable)[Vector], sizeof (IA32_IDT_GATE_DESCRIPTOR));
}
/**
@@ -48,13 +48,13 @@ WriteIdtGateDescriptor (
IA32_IDT_GATE_DESCRIPTOR *IdtGateDescriptor
)
{
- IA32_DESCRIPTOR IdtrValue;
- IA32_IDT_GATE_DESCRIPTOR *IdtTable;
+ IA32_DESCRIPTOR IdtrValue;
+ IA32_IDT_GATE_DESCRIPTOR *IdtTable;
- AsmReadIdtr (&IdtrValue);
- IdtTable = (IA32_IDT_GATE_DESCRIPTOR *) IdtrValue.Base;
+ AsmReadIdtr (&IdtrValue);
+ IdtTable = (IA32_IDT_GATE_DESCRIPTOR *)IdtrValue.Base;
- CopyMem ((VOID *) &(IdtTable)[Vector], (VOID *) IdtGateDescriptor, sizeof (IA32_IDT_GATE_DESCRIPTOR));
+ CopyMem ((VOID *)&(IdtTable)[Vector], (VOID *)IdtGateDescriptor, sizeof (IA32_IDT_GATE_DESCRIPTOR));
}
/**
@@ -71,13 +71,13 @@ WriteIdtGateDescriptor (
**/
VOID
HookEntry (
- IN EFI_EXCEPTION_TYPE ExceptionType,
- IN CALLBACK_FUNC NewCallback
+ IN EFI_EXCEPTION_TYPE ExceptionType,
+ IN CALLBACK_FUNC NewCallback
)
{
- BOOLEAN OldIntFlagState;
+ BOOLEAN OldIntFlagState;
- CreateEntryStub (ExceptionType, (VOID **) &IdtEntryTable[ExceptionType].StubEntry);
+ CreateEntryStub (ExceptionType, (VOID **)&IdtEntryTable[ExceptionType].StubEntry);
//
// Disables CPU interrupts and returns the previous interrupt state
@@ -91,7 +91,7 @@ HookEntry (
//
// stores orignal interrupt handle
//
- IdtEntryTable[ExceptionType].OrigVector = (DEBUG_PROC) GetInterruptHandleFromIdt (&(IdtEntryTable[ExceptionType].OrigDesc));
+ IdtEntryTable[ExceptionType].OrigVector = (DEBUG_PROC)GetInterruptHandleFromIdt (&(IdtEntryTable[ExceptionType].OrigDesc));
//
// encodes new IDT Gate descriptor by stub entry
@@ -112,7 +112,7 @@ HookEntry (
//
SetInterruptState (OldIntFlagState);
- return ;
+ return;
}
/**
@@ -123,10 +123,10 @@ HookEntry (
**/
VOID
UnhookEntry (
- IN EFI_EXCEPTION_TYPE ExceptionType
+ IN EFI_EXCEPTION_TYPE ExceptionType
)
{
- BOOLEAN OldIntFlagState;
+ BOOLEAN OldIntFlagState;
//
// Disables CPU interrupts and returns the previous interrupt state
@@ -143,7 +143,7 @@ UnhookEntry (
//
SetInterruptState (OldIntFlagState);
- return ;
+ return;
}
/**
@@ -162,8 +162,8 @@ UnhookEntry (
EFI_STATUS
EFIAPI
GetMaximumProcessorIndex (
- IN EFI_DEBUG_SUPPORT_PROTOCOL *This,
- OUT UINTN *MaxProcessorIndex
+ IN EFI_DEBUG_SUPPORT_PROTOCOL *This,
+ OUT UINTN *MaxProcessorIndex
)
{
*MaxProcessorIndex = 0;
@@ -187,9 +187,9 @@ GetMaximumProcessorIndex (
EFI_STATUS
EFIAPI
RegisterPeriodicCallback (
- IN EFI_DEBUG_SUPPORT_PROTOCOL *This,
- IN UINTN ProcessorIndex,
- IN EFI_PERIODIC_CALLBACK PeriodicCallback
+ IN EFI_DEBUG_SUPPORT_PROTOCOL *This,
+ IN UINTN ProcessorIndex,
+ IN EFI_PERIODIC_CALLBACK PeriodicCallback
)
{
return ManageIdtEntryTable (PeriodicCallback, SYSTEM_TIMER_VECTOR);
@@ -215,16 +215,15 @@ RegisterPeriodicCallback (
EFI_STATUS
EFIAPI
RegisterExceptionCallback (
- IN EFI_DEBUG_SUPPORT_PROTOCOL *This,
- IN UINTN ProcessorIndex,
- IN EFI_EXCEPTION_CALLBACK ExceptionCallback,
- IN EFI_EXCEPTION_TYPE ExceptionType
+ IN EFI_DEBUG_SUPPORT_PROTOCOL *This,
+ IN UINTN ProcessorIndex,
+ IN EFI_EXCEPTION_CALLBACK ExceptionCallback,
+ IN EFI_EXCEPTION_TYPE ExceptionType
)
{
return ManageIdtEntryTable (ExceptionCallback, ExceptionType);
}
-
/**
Invalidates processor instruction cache for a memory range. Subsequent execution in this range
causes a fresh memory fetch to retrieve code to be executed.
@@ -241,10 +240,10 @@ RegisterExceptionCallback (
EFI_STATUS
EFIAPI
InvalidateInstructionCache (
- IN EFI_DEBUG_SUPPORT_PROTOCOL *This,
- IN UINTN ProcessorIndex,
- IN VOID *Start,
- IN UINT64 Length
+ IN EFI_DEBUG_SUPPORT_PROTOCOL *This,
+ IN UINTN ProcessorIndex,
+ IN VOID *Start,
+ IN UINT64 Length
)
{
AsmWbinvd ();
@@ -263,8 +262,8 @@ InvalidateInstructionCache (
**/
VOID
InterruptDistrubutionHub (
- EFI_EXCEPTION_TYPE ExceptionType,
- EFI_SYSTEM_CONTEXT_IA32 *ContextRecord
+ EFI_EXCEPTION_TYPE ExceptionType,
+ EFI_SYSTEM_CONTEXT_IA32 *ContextRecord
)
{
if (IdtEntryTable[ExceptionType].RegisteredCallback != NULL) {
@@ -290,7 +289,7 @@ InterruptDistrubutionHub (
EFI_STATUS
EFIAPI
PlUnloadDebugSupportDriver (
- IN EFI_HANDLE ImageHandle
+ IN EFI_HANDLE ImageHandle
)
{
EFI_EXCEPTION_TYPE ExceptionType;
@@ -341,8 +340,8 @@ PlInitializeDebugSupportDriver (
return EFI_OUT_OF_RESOURCES;
}
- for (ExceptionType = 0; ExceptionType < NUM_IDT_ENTRIES; ExceptionType ++) {
- IdtEntryTable[ExceptionType].StubEntry = (DEBUG_PROC) (UINTN) AllocatePool (StubSize);
+ for (ExceptionType = 0; ExceptionType < NUM_IDT_ENTRIES; ExceptionType++) {
+ IdtEntryTable[ExceptionType].StubEntry = (DEBUG_PROC)(UINTN)AllocatePool (StubSize);
if (IdtEntryTable[ExceptionType].StubEntry == NULL) {
goto ErrorCleanup;
}
@@ -352,6 +351,7 @@ PlInitializeDebugSupportDriver (
//
CopyMem ((VOID *)(UINTN)IdtEntryTable[ExceptionType].StubEntry, InterruptEntryStub, StubSize);
}
+
return EFI_SUCCESS;
ErrorCleanup:
@@ -361,6 +361,7 @@ ErrorCleanup:
FreePool ((VOID *)(UINTN)IdtEntryTable[ExceptionType].StubEntry);
}
}
+
FreePool (IdtEntryTable);
return EFI_OUT_OF_RESOURCES;
diff --git a/MdeModulePkg/Universal/DebugSupportDxe/Ia32/PlDebugSupport.h b/MdeModulePkg/Universal/DebugSupportDxe/Ia32/PlDebugSupport.h
index ed7d98ce26..c3f0d96d28 100644
--- a/MdeModulePkg/Universal/DebugSupportDxe/Ia32/PlDebugSupport.h
+++ b/MdeModulePkg/Universal/DebugSupportDxe/Ia32/PlDebugSupport.h
@@ -11,6 +11,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include "Ia32/DebugSupport.h"
-#define EFI_ISA IsaIa32
+#define EFI_ISA IsaIa32
#endif
diff --git a/MdeModulePkg/Universal/DebugSupportDxe/Ia32/PlDebugSupportIa32.c b/MdeModulePkg/Universal/DebugSupportDxe/Ia32/PlDebugSupportIa32.c
index 37c330626f..0201427ade 100644
--- a/MdeModulePkg/Universal/DebugSupportDxe/Ia32/PlDebugSupportIa32.c
+++ b/MdeModulePkg/Universal/DebugSupportDxe/Ia32/PlDebugSupportIa32.c
@@ -8,7 +8,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include "PlDebugSupport.h"
-IA32_IDT_GATE_DESCRIPTOR NullDesc = {{0}};
+IA32_IDT_GATE_DESCRIPTOR NullDesc = {
+ { 0 }
+};
/**
Get Interrupt Handle from IDT Gate Descriptor.
@@ -23,14 +25,14 @@ GetInterruptHandleFromIdt (
IN IA32_IDT_GATE_DESCRIPTOR *IdtGateDescriptor
)
{
- UINTN InterruptHandle;
+ UINTN InterruptHandle;
//
// InterruptHandle 0-15 : OffsetLow
// InterruptHandle 16-31 : OffsetHigh
//
- ((UINT16 *) &InterruptHandle)[0] = (UINT16) IdtGateDescriptor->Bits.OffsetLow;
- ((UINT16 *) &InterruptHandle)[1] = (UINT16) IdtGateDescriptor->Bits.OffsetHigh;
+ ((UINT16 *)&InterruptHandle)[0] = (UINT16)IdtGateDescriptor->Bits.OffsetLow;
+ ((UINT16 *)&InterruptHandle)[1] = (UINT16)IdtGateDescriptor->Bits.OffsetHigh;
return InterruptHandle;
}
@@ -48,11 +50,11 @@ GetInterruptHandleFromIdt (
**/
VOID
CreateEntryStub (
- IN EFI_EXCEPTION_TYPE ExceptionType,
- OUT VOID **Stub
+ IN EFI_EXCEPTION_TYPE ExceptionType,
+ OUT VOID **Stub
)
{
- UINT8 *StubCopy;
+ UINT8 *StubCopy;
StubCopy = *Stub;
@@ -72,14 +74,14 @@ CreateEntryStub (
//
// poke in the exception type so the second push pushes the exception type
//
- StubCopy[0x0c] = (UINT8) ExceptionType;
+ StubCopy[0x0c] = (UINT8)ExceptionType;
//
// fixup the jump target to point to the common entry
//
- *(UINT32 *) &StubCopy[0x0e] = (UINT32) CommonIdtEntry - (UINT32) &StubCopy[StubSize];
+ *(UINT32 *)&StubCopy[0x0e] = (UINT32)CommonIdtEntry - (UINT32)&StubCopy[StubSize];
- return ;
+ return;
}
/**
@@ -101,8 +103,8 @@ CreateEntryStub (
**/
EFI_STATUS
ManageIdtEntryTable (
- CALLBACK_FUNC NewCallback,
- EFI_EXCEPTION_TYPE ExceptionType
+ CALLBACK_FUNC NewCallback,
+ EFI_EXCEPTION_TYPE ExceptionType
)
{
EFI_STATUS Status;
diff --git a/MdeModulePkg/Universal/DebugSupportDxe/X64/PlDebugSupport.h b/MdeModulePkg/Universal/DebugSupportDxe/X64/PlDebugSupport.h
index b3743fcdb8..5ea09daaf6 100644
--- a/MdeModulePkg/Universal/DebugSupportDxe/X64/PlDebugSupport.h
+++ b/MdeModulePkg/Universal/DebugSupportDxe/X64/PlDebugSupport.h
@@ -11,6 +11,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include "Ia32/DebugSupport.h"
-#define EFI_ISA IsaX64
+#define EFI_ISA IsaX64
#endif
diff --git a/MdeModulePkg/Universal/DebugSupportDxe/X64/PlDebugSupportX64.c b/MdeModulePkg/Universal/DebugSupportDxe/X64/PlDebugSupportX64.c
index 1e40873bc2..8d7b63ac02 100644
--- a/MdeModulePkg/Universal/DebugSupportDxe/X64/PlDebugSupportX64.c
+++ b/MdeModulePkg/Universal/DebugSupportDxe/X64/PlDebugSupportX64.c
@@ -8,7 +8,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include "PlDebugSupport.h"
-IA32_IDT_GATE_DESCRIPTOR NullDesc = {{0,0}};
+IA32_IDT_GATE_DESCRIPTOR NullDesc = {
+ { 0, 0 }
+};
/**
Get Interrupt Handle from IDT Gate Descriptor.
@@ -23,16 +25,16 @@ GetInterruptHandleFromIdt (
IN IA32_IDT_GATE_DESCRIPTOR *IdtGateDecriptor
)
{
- UINTN InterruptHandle;
+ UINTN InterruptHandle;
//
// InterruptHandle 0-15 : OffsetLow
// InterruptHandle 16-31 : OffsetHigh
// InterruptHandle 32-63 : OffsetUpper
//
- InterruptHandle = ((UINTN) IdtGateDecriptor->Bits.OffsetLow) |
- (((UINTN) IdtGateDecriptor->Bits.OffsetHigh) << 16) |
- (((UINTN) IdtGateDecriptor->Bits.OffsetUpper) << 32) ;
+ InterruptHandle = ((UINTN)IdtGateDecriptor->Bits.OffsetLow) |
+ (((UINTN)IdtGateDecriptor->Bits.OffsetHigh) << 16) |
+ (((UINTN)IdtGateDecriptor->Bits.OffsetUpper) << 32);
return InterruptHandle;
}
@@ -50,11 +52,11 @@ GetInterruptHandleFromIdt (
**/
VOID
CreateEntryStub (
- IN EFI_EXCEPTION_TYPE ExceptionType,
- OUT VOID **Stub
+ IN EFI_EXCEPTION_TYPE ExceptionType,
+ OUT VOID **Stub
)
{
- UINT8 *StubCopy;
+ UINT8 *StubCopy;
StubCopy = *Stub;
@@ -72,12 +74,12 @@ CreateEntryStub (
//
// poke in the exception type so the second push pushes the exception type
//
- StubCopy[0x1] = (UINT8) ExceptionType;
+ StubCopy[0x1] = (UINT8)ExceptionType;
//
// fixup the jump target to point to the common entry
//
- *(UINT32 *) &StubCopy[0x3] = (UINT32)((UINTN) CommonIdtEntry - (UINTN) &StubCopy[StubSize]);
+ *(UINT32 *)&StubCopy[0x3] = (UINT32)((UINTN)CommonIdtEntry - (UINTN)&StubCopy[StubSize]);
return;
}
@@ -102,8 +104,8 @@ CreateEntryStub (
**/
EFI_STATUS
ManageIdtEntryTable (
- CALLBACK_FUNC NewCallback,
- EFI_EXCEPTION_TYPE ExceptionType
+ CALLBACK_FUNC NewCallback,
+ EFI_EXCEPTION_TYPE ExceptionType
)
{
EFI_STATUS Status;