[edk2-devel] [PATCH v1 1/1] MdeModulePkg/ReportStatusCodeRouter: Take HeaderSize into Consideration
Dandan Bi
dandan.bi at intel.com
Sun Apr 12 06:17:05 UTC 2020
Reviewed-by: Dandan Bi <dandan.bi at intel.com>
Thanks,
Dandan
> -----Original Message-----
> From: devel at edk2.groups.io [mailto:devel at edk2.groups.io] On Behalf Of
> Michael Kubacki
> Sent: Thursday, April 9, 2020 5:45 AM
> To: devel at edk2.groups.io
> Cc: Bi, Dandan <dandan.bi at intel.com>; Wu, Hao A <hao.a.wu at intel.com>;
> Wang, Jian J <jian.j.wang at intel.com>; Kun Qin <Kun.Qin at microsoft.com>;
> Gao, Liming <liming.gao at intel.com>
> Subject: [edk2-devel] [PATCH v1 1/1]
> MdeModulePkg/ReportStatusCodeRouter: Take HeaderSize into
> Consideration
>
> From: Michael Kubacki <michael.kubacki at microsoft.com>
>
> 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: Dandan Bi <dandan.bi at intel.com>
> Cc: Hao A Wu <hao.a.wu at intel.com>
> Cc: Jian J Wang <jian.j.wang at intel.com>
> Cc: Kun Qin <Kun.Qin at microsoft.com>
> Cc: Liming Gao <liming.gao at intel.com>
> Signed-off-by: Michael Kubacki <michael.kubacki at microsoft.com>
> ---
>
> MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportSt
> atusCodeRouterRuntimeDxe.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git
> a/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/Report
> StatusCodeRouterRuntimeDxe.c
> b/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/Report
> StatusCodeRouterRuntimeDxe.c
> index 6ca7e180ebb3..920191cb3a8c 100644
> ---
> a/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/Report
> StatusCodeRouterRuntimeDxe.c
> +++
> b/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/Report
> Sta
> +++ tusCodeRouterRuntimeDxe.c
> @@ -3,6 +3,7 @@
> and Status Code Runtime Protocol.
>
> Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
> + Copyright (c) Microsoft Corporation.<BR>
> SPDX-License-Identifier: BSD-2-Clause-Patent
>
> **/
> @@ -64,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);
> }
>
> @@ -271,7 +272,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));
> }
>
> //
> --
> 2.16.3.windows.1
>
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#57266): https://edk2.groups.io/g/devel/message/57266
Mute This Topic: https://groups.io/mt/72884670/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list