/** @file\r
- Generic debug support functions for IA32/x64.\r
+ IA32/x64 generic functions to support Debug Support protocol.\r
\r
Copyright (c) 2006 - 2008, Intel Corporation\r
All rights reserved. This program and the accompanying materials\r
//\r
OldIntFlagState = SaveAndDisableInterrupts ();\r
\r
+ //\r
+ // gets IDT Gate descriptor by index\r
+ //\r
ReadIdtGateDescriptor (ExceptionType, &(IdtEntryTable[ExceptionType].OrigDesc));\r
+ //\r
+ // stores orignal interrupt handle \r
+ //\r
IdtEntryTable[ExceptionType].OrigVector = (DEBUG_PROC) GetInterruptHandleFromIdt (&(IdtEntryTable[ExceptionType].OrigDesc));\r
\r
+ // \r
+ // encodes new IDT Gate descriptor by stub entry \r
+ //\r
Vect2Desc (&IdtEntryTable[ExceptionType].NewDesc, IdtEntryTable[ExceptionType].StubEntry);\r
+ //\r
+ // stores NewCallback\r
+ //\r
IdtEntryTable[ExceptionType].RegisteredCallback = NewCallback;\r
+\r
+ //\r
+ // writes back new IDT Gate descriptor\r
+ //\r
WriteIdtGateDescriptor (ExceptionType, &(IdtEntryTable[ExceptionType].NewDesc));\r
\r
//\r
return ManageIdtEntryTable (ExceptionCallback, ExceptionType);\r
}\r
\r
+\r
/**\r
Invalidates processor instruction cache for a memory range. Subsequent execution in this range\r
causes a fresh memory fetch to retrieve code to be executed. \r
Common piece of code that invokes the registered handlers.\r
\r
This code executes in exception context so no efi calls are allowed.\r
+ This code is called from assembly file.\r
\r
@param ExceptionType Exception type\r
@param ContextRecord System context\r