public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Shia, Cinnamon" <cinnamon.shia@hpe.com>
To: "Carsey, Jaben" <jaben.carsey@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Ni, Ruiyu" <ruiyu.ni@intel.com>,
	"Shia, Cinnamon" <cinnamon.shia@hpe.com>
Subject: Re: [PATCH] ShellPkg/Shell: Update CRC32 in the EFI System Table header
Date: Mon, 3 Oct 2016 16:29:23 +0000	[thread overview]
Message-ID: <CS1PR84MB011909A3D22371683A7862FFF2C20@CS1PR84MB0119.NAMPRD84.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <CB6E33457884FA40993F35157061515C54A81D2C@FMSMSX103.amr.corp.intel.com>

Oops. Will fix it in diff v2.

Thanks,
Cinnamon Shia

-----Original Message-----
From: Carsey, Jaben [mailto:jaben.carsey@intel.com] 
Sent: Tuesday, October 4, 2016 12:27 AM
To: Shia, Cinnamon <cinnamon.shia@hpe.com>; edk2-devel@lists.01.org
Cc: Ni, Ruiyu <ruiyu.ni@intel.com>; Carsey, Jaben <jaben.carsey@intel.com>
Subject: RE: [PATCH] ShellPkg/Shell: Update CRC32 in the EFI System Table header

Why add a CpuBreakPoint()?

> -----Original Message-----
> From: Cinnamon Shia [mailto:cinnamon.shia@hpe.com]
> Sent: Monday, October 03, 2016 9:14 AM
> To: edk2-devel@lists.01.org
> Cc: Carsey, Jaben <jaben.carsey@intel.com>; Ni, Ruiyu 
> <ruiyu.ni@intel.com>; Cinnamon Shia <cinnamon.shia@hpe.com>
> Subject: [PATCH] ShellPkg/Shell: Update CRC32 in the EFI System Table 
> header
> Importance: High
> 
> Update CRC32 in the EFI System Table header after shell changes the 
> value of gST->ConsoleOutHandle and gST->ConOut
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Cinnamon Shia <cinnamon.shia@hpe.com>
> ---
>  ShellPkg/Application/Shell/ConsoleLogger.c | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
> 
> diff --git a/ShellPkg/Application/Shell/ConsoleLogger.c
> b/ShellPkg/Application/Shell/ConsoleLogger.c
> index 9b64303..07b3f81 100644
> --- a/ShellPkg/Application/Shell/ConsoleLogger.c
> +++ b/ShellPkg/Application/Shell/ConsoleLogger.c
> @@ -3,6 +3,7 @@
> 
>    (C) Copyright 2013 Hewlett-Packard Development Company, L.P.<BR>
>    Copyright (c) 2009 - 2015, Intel Corporation. All rights 
> reserved.<BR>
> +  (C) Copyright 2016 Hewlett-Packard Development Company, L.P.<BR>
>    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,16 @@ ConsoleLoggerInstall(
>    gST->ConsoleOutHandle = gImageHandle;
>    gST->ConOut           = &(*ConsoleInfo)->OurConOut;
> 
> +  //
> +  // Update the CRC32 in the EFI System Table header  //  
> + CpuBreakpoint();
> +  gST->Hdr.CRC32 = 0;
> +  gBS->CalculateCrc32 (
> +        (UINT8 *)&gST->Hdr,
> +        gST->Hdr.HeaderSize,
> +        &gST->Hdr.CRC32
> +        );
>    return (Status);
>  }
> 
> @@ -126,6 +137,16 @@ ConsoleLoggerUninstall(
>    gST->ConsoleOutHandle = ConsoleInfo->OldConHandle;
>    gST->ConOut = ConsoleInfo->OldConOut;
> 
> +  //
> +  // Update the CRC32 in the EFI System Table header  //
> +  gST->Hdr.CRC32 = 0;
> +  gBS->CalculateCrc32 (
> +        (UINT8 *)&gST->Hdr,
> +        gST->Hdr.HeaderSize,
> +        &gST->Hdr.CRC32
> +        );
> +
>    return (gBS->UninstallProtocolInterface(gImageHandle,
> &gEfiSimpleTextOutProtocolGuid, (VOID*)&ConsoleInfo->OurConOut));  }
> 
> --
> 2.10.0.windows.1



      reply	other threads:[~2016-10-03 16:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-03 16:14 [PATCH] ShellPkg/Shell: Update CRC32 in the EFI System Table header Cinnamon Shia
2016-10-03 16:27 ` Carsey, Jaben
2016-10-03 16:29   ` Shia, Cinnamon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CS1PR84MB011909A3D22371683A7862FFF2C20@CS1PR84MB0119.NAMPRD84.PROD.OUTLOOK.COM \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox