VOID\r
)\r
{\r
- IA32_IDT_GATE_DESCRIPTOR *IdtEntry;\r
- UINTN InterruptHandler;\r
- IA32_DESCRIPTOR IdtDescriptor;\r
- UINTN Index;\r
- UINT16 CodeSegment;\r
- UINT32 RegEdx;\r
+ IA32_IDT_GATE_DESCRIPTOR *IdtEntry;\r
+ UINTN InterruptHandler;\r
+ IA32_DESCRIPTOR IdtDescriptor;\r
+ UINTN Index;\r
+ UINT16 CodeSegment;\r
+ UINT32 RegEdx;\r
\r
AsmReadIdtr (&IdtDescriptor);\r
\r
//\r
CodeSegment = AsmReadCs ();\r
\r
- IdtEntry = (IA32_IDT_GATE_DESCRIPTOR *) IdtDescriptor.Base;\r
+ IdtEntry = (IA32_IDT_GATE_DESCRIPTOR *)IdtDescriptor.Base;\r
\r
- for (Index = 0; Index < 20; Index ++) {\r
+ for (Index = 0; Index < 20; Index++) {\r
if (((PcdGet32 (PcdExceptionsIgnoredByDebugger) & ~(BIT1 | BIT3)) & (1 << Index)) != 0) {\r
//\r
// If the exception is masked to be reserved except for INT1 and INT3, skip it\r
//\r
continue;\r
}\r
- InterruptHandler = (UINTN)&Exception0Handle + Index * ExceptionStubHeaderSize;\r
+\r
+ InterruptHandler = (UINTN)&Exception0Handle + Index * ExceptionStubHeaderSize;\r
IdtEntry[Index].Bits.OffsetLow = (UINT16)(UINTN)InterruptHandler;\r
IdtEntry[Index].Bits.OffsetHigh = (UINT16)((UINTN)InterruptHandler >> 16);\r
IdtEntry[Index].Bits.Selector = CodeSegment;\r
IdtEntry[Index].Bits.GateType = IA32_IDT_GATE_TYPE_INTERRUPT_32;\r
}\r
\r
- InterruptHandler = (UINTN) &TimerInterruptHandle;\r
+ InterruptHandler = (UINTN)&TimerInterruptHandle;\r
IdtEntry[DEBUG_TIMER_VECTOR].Bits.OffsetLow = (UINT16)(UINTN)InterruptHandler;\r
IdtEntry[DEBUG_TIMER_VECTOR].Bits.OffsetHigh = (UINT16)((UINTN)InterruptHandler >> 16);\r
IdtEntry[DEBUG_TIMER_VECTOR].Bits.Selector = CodeSegment;\r
**/\r
VOID *\r
GetExceptionHandlerInIdtEntry (\r
- IN UINTN ExceptionNum\r
+ IN UINTN ExceptionNum\r
)\r
{\r
- IA32_IDT_GATE_DESCRIPTOR *IdtEntry;\r
- IA32_DESCRIPTOR IdtDescriptor;\r
+ IA32_IDT_GATE_DESCRIPTOR *IdtEntry;\r
+ IA32_DESCRIPTOR IdtDescriptor;\r
\r
AsmReadIdtr (&IdtDescriptor);\r
- IdtEntry = (IA32_IDT_GATE_DESCRIPTOR *) IdtDescriptor.Base;\r
+ IdtEntry = (IA32_IDT_GATE_DESCRIPTOR *)IdtDescriptor.Base;\r
\r
- return (VOID *) (((UINTN)IdtEntry[ExceptionNum].Bits.OffsetLow) |\r
+ return (VOID *)(((UINTN)IdtEntry[ExceptionNum].Bits.OffsetLow) |\r
(((UINTN)IdtEntry[ExceptionNum].Bits.OffsetHigh) << 16));\r
}\r
\r
**/\r
VOID\r
SetExceptionHandlerInIdtEntry (\r
- IN UINTN ExceptionNum,\r
- IN VOID *ExceptionHandler\r
+ IN UINTN ExceptionNum,\r
+ IN VOID *ExceptionHandler\r
)\r
{\r
- IA32_IDT_GATE_DESCRIPTOR *IdtEntry;\r
- IA32_DESCRIPTOR IdtDescriptor;\r
+ IA32_IDT_GATE_DESCRIPTOR *IdtEntry;\r
+ IA32_DESCRIPTOR IdtDescriptor;\r
\r
AsmReadIdtr (&IdtDescriptor);\r
- IdtEntry = (IA32_IDT_GATE_DESCRIPTOR *) IdtDescriptor.Base;\r
+ IdtEntry = (IA32_IDT_GATE_DESCRIPTOR *)IdtDescriptor.Base;\r
\r
- IdtEntry[ExceptionNum].Bits.OffsetLow = (UINT16)(UINTN)ExceptionHandler;\r
- IdtEntry[ExceptionNum].Bits.OffsetHigh = (UINT16)((UINTN)ExceptionHandler >> 16);\r
+ IdtEntry[ExceptionNum].Bits.OffsetLow = (UINT16)(UINTN)ExceptionHandler;\r
+ IdtEntry[ExceptionNum].Bits.OffsetHigh = (UINT16)((UINTN)ExceptionHandler >> 16);\r
}\r