From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web11.7524.1586672448118233003 for ; Sat, 11 Apr 2020 23:20:48 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: dandan.bi@intel.com) IronPort-SDR: l1r9z9U9w8W3EeUk+LmYIMQsVplucRnQSJRNsAakIwJIiIBpcdE9eN7eps8uOjsjqpVYoBoQUU G476R5KHNchA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Apr 2020 23:20:47 -0700 IronPort-SDR: nOn8tvxS9swKArhQT8jn8kRWFmvkqV6UecbvjacL4EmkFHzAqy6VMtBxCvw+5S40rnjvWxPiw8 poGXCZA3NEoA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,373,1580803200"; d="scan'208";a="453901251" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga006.fm.intel.com with ESMTP; 11 Apr 2020 23:20:47 -0700 Received: from fmsmsx120.amr.corp.intel.com (10.18.124.208) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sat, 11 Apr 2020 23:20:48 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx120.amr.corp.intel.com (10.18.124.208) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sat, 11 Apr 2020 23:20:47 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.225]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.209]) with mapi id 14.03.0439.000; Sun, 12 Apr 2020 14:20:44 +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: Update RSC Data on reallocation Thread-Topic: [edk2-devel] [PATCH v1 1/1] MdeModulePkg/ReportStatusCodeRouter: Update RSC Data on reallocation Thread-Index: AQHWDgKYM+AjqgSd90Wt+s40NpLKG6h1CO2g Date: Sun, 12 Apr 2020 06:20:44 +0000 Message-ID: <3C0D5C461C9E904E8F62152F6274C0BB40DB0A19@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 8:05 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: Update RSC Data on reallocation >=20 > From: Michael Kubacki >=20 > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D2670 >=20 > The RSC router data buffer may be reallocated when the buffer is nearing > exhaustion (7/8 portion of the buffer used). >=20 > While several pointers are updated to point to the newly allocated buffe= r, > the RscData is not updated. This commit updates the RSC data pointer to = the > same offset in the reallocated data buffer. >=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 | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git > a/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/Report > StatusCodeRouterRuntimeDxe.c > b/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/Report > StatusCodeRouterRuntimeDxe.c > index 6ca7e180ebb3..82fa2e025466 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 > **/ > @@ -286,6 +287,7 @@ ReportDispatcher ( > ); > if (NewBuffer !=3D NULL) { > CallbackEntry->EndPointer =3D (EFI_PHYSICAL_ADDRESS) (UINTN) > NewBuffer + (CallbackEntry->EndPointer - CallbackEntry- > >StatusCodeDataBuffer); > + RscData =3D (RSC_DATA_ENTRY *) (UINTN) ((UINTN) NewBuffer + > + ((UINTN) RscData - CallbackEntry->StatusCodeDataBuffer)); > CallbackEntry->StatusCodeDataBuffer =3D (EFI_PHYSICAL_ADDRESS= ) > (UINTN) NewBuffer; > CallbackEntry->BufferSize *=3D 2; > } > -- > 2.16.3.windows.1 >=20 >=20 >=20