summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>2009-06-11 07:54:59 +0000
committerxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>2009-06-11 07:54:59 +0000
commit6b27e0f05d4a6c350e5cc0d84fc839c5ef22f63c (patch)
treea7a0ac93d0c02b129cefb1ded21b14febdb5a419
parent2cbfa7c7eeb8c9d2d30b99d39c15f73047bec340 (diff)
downloadedk2-6b27e0f05d4a6c350e5cc0d84fc839c5ef22f63c.zip
edk2-6b27e0f05d4a6c350e5cc0d84fc839c5ef22f63c.tar.gz
edk2-6b27e0f05d4a6c350e5cc0d84fc839c5ef22f63c.tar.bz2
Update comments for PeiReportStatusCodeLib.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8529 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c b/IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c
index de1ee10..94a30da 100644
--- a/IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c
+++ b/IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c
@@ -260,10 +260,18 @@ ReportStatusCodeExtractDebugInfo (
*ErrorLevel = DebugInfo->ErrorLevel;
//
+ // Here the address returned in Marker is 64-bit aligned.
+ // It must be noticed that EFI_DEBUG_INFO follows EFI_STATUS_CODE_DATA, whose size is
+ // 20 bytes. The size of EFI_DEBUG_INFO is 4 bytes, so we can ensure that Marker
+ // returned is 64-bit aligned.
+ // 64-bit aligned is a must, otherwise retrieving 64-bit parameter from BASE_LIST will
+ // cause unalignment exception.
+ //
+ *Marker = (BASE_LIST) (DebugInfo + 1);
+ //
// The first 12 * UINTN bytes of the string are really an
// argument stack to support varargs on the Format string.
//
- *Marker = (BASE_LIST) (DebugInfo + 1);
*Format = (CHAR8 *)(((UINT64 *)*Marker) + 12);
return TRUE;