]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/DebugSupportDxe/Ia32/PlDebugSupport.c
Update the copyright notice format
[mirror_edk2.git] / MdeModulePkg / Universal / DebugSupportDxe / Ia32 / PlDebugSupport.c
index 3c96f9b518436089c075e3348426ae5492236258..f0c529a41beb5d395ca5832e9cee0df2e171f9af 100644 (file)
@@ -1,8 +1,8 @@
 /** @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
+Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
@@ -78,7 +78,7 @@ WriteIdtGateDescriptor (
 VOID\r
 HookEntry (\r
   IN EFI_EXCEPTION_TYPE            ExceptionType,\r
-  IN VOID                         (*NewCallback) ()\r
+  IN CALLBACK_FUNC                 NewCallback\r
   )\r
 {\r
   BOOLEAN     OldIntFlagState;\r
@@ -90,11 +90,27 @@ HookEntry (
   //\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
@@ -214,6 +230,7 @@ RegisterExceptionCallback (
   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
@@ -244,6 +261,7 @@ InvalidateInstructionCache (
   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