MdeModulePkg/ReportStatusCodeRouter: Take HeaderSize into Consideration

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2669

Updates ReportDispatcher() to take the size in the HeaderSize field in
a EFI_STATUS_CODE_DATA element into account when walking the data buffer.
This size will cause the header size to differ from the compiled sizeof
header.

Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Kun Qin <Kun.Qin@microsoft.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Dandan Bi <dandan.bi@intel.com>
This commit is contained in:
Michael Kubacki 2020-04-09 05:45:28 +08:00 committed by mergify[bot]
parent 1a258c7703
commit 05db94018b
1 changed files with 2 additions and 2 deletions

View File

@ -65,7 +65,7 @@ RscHandlerNotification (
&RscData->Data
);
Address += (sizeof (RSC_DATA_ENTRY) + RscData->Data.Size);
Address += (OFFSET_OF (RSC_DATA_ENTRY, Data) + RscData->Data.HeaderSize + RscData->Data.Size);
Address = ALIGN_VARIABLE (Address);
}
@ -274,7 +274,7 @@ ReportDispatcher (
RscData = (RSC_DATA_ENTRY *) (UINTN) CallbackEntry->EndPointer;
CallbackEntry->EndPointer += sizeof (RSC_DATA_ENTRY);
if (Data != NULL) {
CallbackEntry->EndPointer += Data->Size;
CallbackEntry->EndPointer += (Data->Size + Data->HeaderSize - sizeof (EFI_STATUS_CODE_DATA));
}
//