From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web10.7262.1586672231331726711 for ; Sat, 11 Apr 2020 23:17:12 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: dandan.bi@intel.com) IronPort-SDR: IUpKNEQm9G1UeYTZKqAT9taEFTklCLRqJX/v72ACUV3Z+rb2l2zW4B1Q5M3GTbb9CbOWiqdza2 wTaIxPuLueiA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Apr 2020 23:17:10 -0700 IronPort-SDR: ZkDKLb1QmLx0Q7FVklii8CnIFOJraGH43xK6uEiEcMmhSNh9LD+Aty59eG0qXyXCeTmBonw40Z RudbG4C70Izg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,373,1580803200"; d="scan'208";a="243273164" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga007.fm.intel.com with ESMTP; 11 Apr 2020 23:17:10 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sat, 11 Apr 2020 23:17:09 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.225]) by shsmsx102.ccr.corp.intel.com ([169.254.2.138]) with mapi id 14.03.0439.000; Sun, 12 Apr 2020 14:17:05 +0800 From: "Dandan Bi" To: "devel@edk2.groups.io" , "michael.kubacki@outlook.com" CC: "Wu, Hao A" , "Wang, Jian J" , Kun Qin , "Gao, Liming" Subject: Re: [edk2-devel] [PATCH v1 1/1] MdeModulePkg/ReportStatusCodeRouter: Take HeaderSize into Consideration Thread-Topic: [edk2-devel] [PATCH v1 1/1] MdeModulePkg/ReportStatusCodeRouter: Take HeaderSize into Consideration Thread-Index: AQHWDe80JrIls/QmhUKWMT0qXNmApKh1B6Pw Date: Sun, 12 Apr 2020 06:17:05 +0000 Message-ID: <3C0D5C461C9E904E8F62152F6274C0BB40DB09F7@SHSMSX104.ccr.corp.intel.com> References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: dandan.bi@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Dandan Bi Thanks, Dandan > -----Original Message----- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of > Michael Kubacki > Sent: Thursday, April 9, 2020 5:45 AM > To: devel@edk2.groups.io > Cc: Bi, Dandan ; Wu, Hao A ; > Wang, Jian J ; Kun Qin ; > Gao, Liming > Subject: [edk2-devel] [PATCH v1 1/1] > MdeModulePkg/ReportStatusCodeRouter: Take HeaderSize into > Consideration >=20 > From: Michael Kubacki >=20 > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D2669 >=20 > 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. >=20 > Cc: Dandan Bi > Cc: Hao A Wu > Cc: Jian J Wang > Cc: Kun Qin > Cc: Liming Gao > Signed-off-by: Michael Kubacki > --- >=20 > MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportSt > atusCodeRouterRuntimeDxe.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) >=20 > 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. >=20 > Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved. > + Copyright (c) Microsoft Corporation.
> SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > **/ > @@ -64,7 +65,7 @@ RscHandlerNotification ( > &RscData->Data > ); >=20 > - Address +=3D (sizeof (RSC_DATA_ENTRY) + RscData->Data.Size); > + Address +=3D (OFFSET_OF (RSC_DATA_ENTRY, Data) + > + RscData->Data.HeaderSize + RscData->Data.Size); > Address =3D ALIGN_VARIABLE (Address); > } >=20 > @@ -271,7 +272,7 @@ ReportDispatcher ( > RscData =3D (RSC_DATA_ENTRY *) (UINTN) CallbackEntry->EndPointer; > CallbackEntry->EndPointer +=3D sizeof (RSC_DATA_ENTRY); > if (Data !=3D NULL) { > - CallbackEntry->EndPointer +=3D Data->Size; > + CallbackEntry->EndPointer +=3D (Data->Size + Data->HeaderSize - > + sizeof (EFI_STATUS_CODE_DATA)); > } >=20 > // > -- > 2.16.3.windows.1 >=20 >=20 >=20