]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Update comments for PeiReportStatusCodeLib.
authorxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 11 Jun 2009 07:54:59 +0000 (07:54 +0000)
committerxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 11 Jun 2009 07:54:59 +0000 (07:54 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8529 6f19259b-4bc3-4df7-8a09-765794883524

IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c

index de1ee1093670b12393e48f68ab7c6006f7fae73c..94a30dadacca2e9b89eb7c092bb4493b31357981 100644 (file)
@@ -259,11 +259,19 @@ ReportStatusCodeExtractDebugInfo (
 \r
   *ErrorLevel = DebugInfo->ErrorLevel;\r
 \r
+  //\r
+  // Here the address returned in Marker is 64-bit aligned.\r
+  // It must be noticed that EFI_DEBUG_INFO follows EFI_STATUS_CODE_DATA, whose size is\r
+  // 20 bytes. The size of EFI_DEBUG_INFO is 4 bytes, so we can ensure that Marker\r
+  // returned is 64-bit aligned.\r
+  // 64-bit aligned is a must, otherwise retrieving 64-bit parameter from BASE_LIST will\r
+  // cause unalignment exception.\r
+  //\r
+  *Marker = (BASE_LIST) (DebugInfo + 1);\r
   //\r
   // The first 12 * UINTN bytes of the string are really an\r
   // argument stack to support varargs on the Format string.\r
   //\r
-  *Marker = (BASE_LIST) (DebugInfo + 1);\r
   *Format = (CHAR8 *)(((UINT64 *)*Marker) + 12);\r
 \r
   return TRUE;\r