From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id B99381A1E4D for ; Mon, 3 Oct 2016 14:37:47 -0700 (PDT) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP; 03 Oct 2016 14:37:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,291,1473145200"; d="scan'208";a="15826461" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga005.fm.intel.com with ESMTP; 03 Oct 2016 14:37:47 -0700 Received: from fmsmsx103.amr.corp.intel.com ([169.254.2.167]) by FMSMSX105.amr.corp.intel.com ([169.254.4.150]) with mapi id 14.03.0248.002; Mon, 3 Oct 2016 14:37:47 -0700 From: "Carsey, Jaben" To: "Shah, Tapan" , "Shia, Cinnamon" , "edk2-devel@lists.01.org" CC: "Ni, Ruiyu" , "Carsey, Jaben" Thread-Topic: [edk2] [PATCH v2] ShellPkg/Shell: Update CRC32 in the EFI System Table header Thread-Index: AQHSHZRzvZOGq5OBt0eeCNKgOOtFN6CXY4GA///d8MA= Date: Mon, 3 Oct 2016 21:37:46 +0000 Message-ID: References: <20161003163717.12348-1-cinnamon.shia@hpe.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMjcwYjJkYzMtNjA4YS00MDBjLWFmNTAtZmE2YTgwYTExMjk5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6ImdLUENqSXFTUXRJbkZUY2FBcXBKeERBSVprOFJIZERaaFlvQnhkQlVIXC9FPSJ9 x-ctpclassification: CTP_IC x-originating-ip: [10.1.200.108] MIME-Version: 1.0 Subject: Re: [PATCH v2] ShellPkg/Shell: Update CRC32 in the EFI System Table header X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2016 21:37:47 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Jaben Carsey And pushed. > -----Original Message----- > From: Shah, Tapan [mailto:tapandshah@hpe.com] > Sent: Monday, October 03, 2016 9:39 AM > To: Shia, Cinnamon ; edk2-devel@lists.01.org > Cc: Carsey, Jaben ; Ni, Ruiyu > Subject: RE: [edk2] [PATCH v2] ShellPkg/Shell: Update CRC32 in the EFI > System Table header > Importance: High >=20 > Reviewed-By: Tapan Shah >=20 > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Shia, Cinnamon > Sent: Monday, October 03, 2016 11:37 AM > To: edk2-devel@lists.01.org > Cc: jaben.carsey@intel.com; ruiyu.ni@intel.com > Subject: [edk2] [PATCH v2] ShellPkg/Shell: Update CRC32 in the EFI System > Table header >=20 > Update CRC32 in the EFI System Table header after shell changes the value= of > gST->ConsoleOutHandle and gST->ConOut >=20 > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Cinnamon Shia > --- > ShellPkg/Application/Shell/ConsoleLogger.c | 20 ++++++++++++++++++++ > 1 file changed, 20 insertions(+) >=20 > diff --git a/ShellPkg/Application/Shell/ConsoleLogger.c > b/ShellPkg/Application/Shell/ConsoleLogger.c > index 9b64303..563e5e6 100644 > --- a/ShellPkg/Application/Shell/ConsoleLogger.c > +++ b/ShellPkg/Application/Shell/ConsoleLogger.c > @@ -3,6 +3,7 @@ >=20 > (C) Copyright 2013 Hewlett-Packard Development Company, L.P.
> Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.
> + (C) Copyright 2016 Hewlett-Packard Development Company, L.P.
> This program and the accompanying materials > are licensed and made available under the terms and conditions of the = BSD > License > which accompanies this distribution. The full text of the license may= be > found at @@ -91,6 +92,15 @@ ConsoleLoggerInstall( > gST->ConsoleOutHandle =3D gImageHandle; > gST->ConOut =3D &(*ConsoleInfo)->OurConOut; >=20 > + // > + // Update the CRC32 in the EFI System Table header // > + gST->Hdr.CRC32 =3D 0; > + gBS->CalculateCrc32 ( > + (UINT8 *)&gST->Hdr, > + gST->Hdr.HeaderSize, > + &gST->Hdr.CRC32 > + ); > return (Status); > } >=20 > @@ -126,6 +136,16 @@ ConsoleLoggerUninstall( > gST->ConsoleOutHandle =3D ConsoleInfo->OldConHandle; > gST->ConOut =3D ConsoleInfo->OldConOut; >=20 > + // > + // Update the CRC32 in the EFI System Table header // > + gST->Hdr.CRC32 =3D 0; > + gBS->CalculateCrc32 ( > + (UINT8 *)&gST->Hdr, > + gST->Hdr.HeaderSize, > + &gST->Hdr.CRC32 > + ); > + > return (gBS->UninstallProtocolInterface(gImageHandle, > &gEfiSimpleTextOutProtocolGuid, (VOID*)&ConsoleInfo->OurConOut)); } >=20 > -- > 2.10.0.windows.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel