public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ard Biesheuvel" <ard.biesheuvel@arm.com>
To: devel@edk2.groups.io, awarkentin@vmware.com,
	Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
Cc: Leif Lindholm <leif@nuviainc.com>, Pete Batard <pete@akeo.ie>
Subject: Re: [edk2-devel] [edk2-platform][PATCH v1 1/1] Platforms/RaspberryPi: Remove DebugShowUEFIExit
Date: Fri, 12 Jun 2020 10:39:56 +0200	[thread overview]
Message-ID: <6ebf49c5-f3e0-c932-a82e-5b23373bb3f7@arm.com> (raw)
In-Reply-To: <BN6PR05MB341156522CF5477C7E74C8D2B9810@BN6PR05MB3411.namprd05.prod.outlook.com>

On 6/12/20 8:25 AM, Andrei Warkentin via groups.io wrote:
> Reviewed-by: Andrei Warkentin <awarkentin@vmware.com>
> 
> Thanks for the cleanup, Samer. This debug feature was a gross hack that 
> was additionally incompatible with boot loaders changing GOP settings. 
> It was definitely time to see it go.
> 

Thanks

Pushed as 2d07a49e4532..4c8c8868bbdb


> ------------------------------------------------------------------------
> *From:* Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
> *Sent:* Thursday, June 11, 2020 11:27 PM
> *To:* devel@edk2.groups.io <devel@edk2.groups.io>
> *Cc:* Leif Lindholm <leif@nuviainc.com>; Ard Biesheuvel 
> <ard.biesheuvel@arm.com>; Pete Batard <pete@akeo.ie>; Andrei Warkentin 
> <awarkentin@vmware.com>
> *Subject:* [edk2-platform][PATCH v1 1/1] Platforms/RaspberryPi: Remove 
> DebugShowUEFIExit
> The "Verbose ExitBootServices" feature was originally added to the RPi
> as part of early OS enablement to show that the OS boot loader did
> actually call ExitBootServices (back when OS boot used to crash shortly
> after that). This is no longer needed, and should be removed as part of
> cleaning the RPi PlatformBootManager to be more in-line with the ArmPkg
> version.
> 
> Cc: Leif Lindholm <leif@nuviainc.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> Cc: Pete Batard <pete@akeo.ie>
> Cc: Andrei Warkentin <awarkentin@vmware.com>
> Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@arm.com>
> ---
>   Platform/RaspberryPi/RaspberryPi.dec                                           |  1 -
>   Platform/RaspberryPi/RPi3/RPi3.dsc                                             |  1 -
>   Platform/RaspberryPi/RPi4/RPi4.dsc                                             |  1 -
>   Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.inf                           |  1 -
>   Platform/RaspberryPi/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf |  1 -
>   Platform/RaspberryPi/Include/ConfigVars.h                                      |  8 ---
>   Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.vfr                        | 13 -----
>   Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c                             |  8 ---
>   Platform/RaspberryPi/Library/PlatformBootManagerLib/PlatformBm.c               | 53 --------------------
>   Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.uni                        |  5 --
>   10 files changed, 92 deletions(-)
> 
> diff --git a/Platform/RaspberryPi/RaspberryPi.dec 
> b/Platform/RaspberryPi/RaspberryPi.dec
> index 5b4021232cba..c71177a2f762 100644
> --- a/Platform/RaspberryPi/RaspberryPi.dec
> +++ b/Platform/RaspberryPi/RaspberryPi.dec
> @@ -60,7 +60,6 @@ [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, 
> PcdsDynamicEx]
>     gRaspberryPiTokenSpaceGuid.PcdMmcSdHighSpeedMHz|0|UINT32|0x00000012
>     gRaspberryPiTokenSpaceGuid.PcdMmcDisableMulti|0|UINT32|0x00000013
>     gRaspberryPiTokenSpaceGuid.PcdDebugEnableJTAG|0|UINT32|0x00000014
> -  gRaspberryPiTokenSpaceGuid.PcdDebugShowUEFIExit|0|UINT32|0x00000015
>     gRaspberryPiTokenSpaceGuid.PcdCustomCpuClock|0|UINT32|0x00000016
>     
> gRaspberryPiTokenSpaceGuid.PcdDisplayEnableScaledVModes|0x3F|UINT8|0x00000017
>     gRaspberryPiTokenSpaceGuid.PcdDisplayEnableSShot|0|UINT32|0x00000018
> diff --git a/Platform/RaspberryPi/RPi3/RPi3.dsc 
> b/Platform/RaspberryPi/RPi3/RPi3.dsc
> index 059d16a912ab..4b1a1e763fa9 100644
> --- a/Platform/RaspberryPi/RPi3/RPi3.dsc
> +++ b/Platform/RaspberryPi/RPi3/RPi3.dsc
> @@ -469,7 +469,6 @@ [PcdsDynamicHii.common.DEFAULT]
>     #
> 
>     
> gRaspberryPiTokenSpaceGuid.PcdDebugEnableJTAG|L"DebugEnableJTAG"|gConfigDxeFormSetGuid|0x0|0
> -
> gRaspberryPiTokenSpaceGuid.PcdDebugShowUEFIExit|L"DebugShowUEFIExit"|gConfigDxeFormSetGuid|0x0|0
> 
>     #
>     # Display-related.
> diff --git a/Platform/RaspberryPi/RPi4/RPi4.dsc 
> b/Platform/RaspberryPi/RPi4/RPi4.dsc
> index e055f13cdb47..c481c3534263 100644
> --- a/Platform/RaspberryPi/RPi4/RPi4.dsc
> +++ b/Platform/RaspberryPi/RPi4/RPi4.dsc
> @@ -480,7 +480,6 @@ [PcdsDynamicHii.common.DEFAULT]
>     #
> 
>     
> gRaspberryPiTokenSpaceGuid.PcdDebugEnableJTAG|L"DebugEnableJTAG"|gConfigDxeFormSetGuid|0x0|0
> -
> gRaspberryPiTokenSpaceGuid.PcdDebugShowUEFIExit|L"DebugShowUEFIExit"|gConfigDxeFormSetGuid|0x0|0
> 
>     #
>     # Display-related.
> diff --git a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.inf 
> b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.inf
> index 5a9819b54df2..cdce35bc74c8 100644
> --- a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.inf
> +++ b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.inf
> @@ -84,7 +84,6 @@ [Pcd]
>     gRaspberryPiTokenSpaceGuid.PcdMmcSdHighSpeedMHz
>     gRaspberryPiTokenSpaceGuid.PcdMmcDisableMulti
>     gRaspberryPiTokenSpaceGuid.PcdDebugEnableJTAG
> -  gRaspberryPiTokenSpaceGuid.PcdDebugShowUEFIExit
>     gRaspberryPiTokenSpaceGuid.PcdDisplayEnableScaledVModes
>     gRaspberryPiTokenSpaceGuid.PcdDisplayEnableSShot
>     gRaspberryPiTokenSpaceGuid.PcdSystemTableMode
> diff --git 
> a/Platform/RaspberryPi/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf 
> b/Platform/RaspberryPi/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
> index eb44daa4b7b7..88f6f8fe09ba 100644
> --- 
> a/Platform/RaspberryPi/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
> +++ 
> b/Platform/RaspberryPi/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
> @@ -62,7 +62,6 @@ [FixedPcd]
> 
>   [Pcd]
>     gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut
> -  gRaspberryPiTokenSpaceGuid.PcdDebugShowUEFIExit
>     gRaspberryPiTokenSpaceGuid.PcdSdIsArasan
> 
>   [Guids]
> diff --git a/Platform/RaspberryPi/Include/ConfigVars.h 
> b/Platform/RaspberryPi/Include/ConfigVars.h
> index cefddbafcd8f..fde24cab84af 100644
> --- a/Platform/RaspberryPi/Include/ConfigVars.h
> +++ b/Platform/RaspberryPi/Include/ConfigVars.h
> @@ -43,14 +43,6 @@ typedef struct {
>      UINT32 Enable;
>   } DEBUG_ENABLE_JTAG_VARSTORE_DATA;
> 
> -typedef struct {
> -  /*
> -   * 0 - Don't show UEFI exit message.
> -   * 1 - Show UEFI exit message.
> -   */
> -   UINT32 Show;
> -} DEBUG_SHOW_UEFI_EXIT_VARSTORE_DATA;
> -
>   typedef struct {
>   #define CHIPSET_CPU_CLOCK_LOW     0
>   #define CHIPSET_CPU_CLOCK_DEFAULT 1
> diff --git a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.vfr 
> b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.vfr
> index 72cc90ae0bec..b0b20fd6fb37 100644
> --- a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.vfr
> +++ b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.vfr
> @@ -84,11 +84,6 @@ formset
>         name  = DebugEnableJTAG,
>         guid  = CONFIGDXE_FORM_SET_GUID;
> 
> -    efivarstore DEBUG_SHOW_UEFI_EXIT_VARSTORE_DATA,
> -      attribute = EFI_VARIABLE_BOOTSERVICE_ACCESS | 
> EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE,
> -      name  = DebugShowUEFIExit,
> -      guid  = CONFIGDXE_FORM_SET_GUID;
> -
>       efivarstore DISPLAY_ENABLE_SCALED_VMODES_VARSTORE_DATA,
>         attribute = EFI_VARIABLE_BOOTSERVICE_ACCESS | 
> EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE,
>         name  = DisplayEnableScaledVModes,
> @@ -294,13 +289,5 @@ formset
>               option text = STRING_TOKEN(STR_DEBUG_JTAG_ENABLE), value = 
> 1, flags = 0;
>               option text = STRING_TOKEN(STR_DEBUG_JTAG_DISABLE), value 
> = 0, flags = DEFAULT;
>           endoneof;
> -
> -        oneof varid = DebugShowUEFIExit.Show,
> -            prompt      = STRING_TOKEN(STR_DEBUG_EXIT_SHOW_PROMPT),
> -            help        = STRING_TOKEN(STR_DEBUG_EXIT_SHOW_HELP),
> -            flags       = NUMERIC_SIZE_4 | INTERACTIVE,
> -            option text = STRING_TOKEN(STR_DEBUG_EXIT_SHOW_NO), value = 
> 0, flags = DEFAULT;
> -            option text = STRING_TOKEN(STR_DEBUG_EXIT_SHOW_YES), value 
> = 1, flags = 0;
> -        endoneof;
>       endform;
>   endformset;
> diff --git a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c 
> b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c
> index 52e37ba68ffd..81586fd90571 100644
> --- a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c
> +++ b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c
> @@ -294,14 +294,6 @@ SetupVariables (
>       PcdSet32 (PcdDebugEnableJTAG, PcdGet32 (PcdDebugEnableJTAG));
>     }
> 
> -  Size = sizeof (UINT32);
> -  Status = gRT->GetVariable (L"DebugShowUEFIExit",
> -                  &gConfigDxeFormSetGuid,
> -                  NULL, &Size, &Var32);
> -  if (EFI_ERROR (Status)) {
> -    PcdSet32 (PcdDebugShowUEFIExit, PcdGet32 (PcdDebugShowUEFIExit));
> -  }
> -
>     Size = sizeof (UINT8);
>     Status = gRT->GetVariable (L"DisplayEnableScaledVModes",
>                     &gConfigDxeFormSetGuid,
> diff --git 
> a/Platform/RaspberryPi/Library/PlatformBootManagerLib/PlatformBm.c 
> b/Platform/RaspberryPi/Library/PlatformBootManagerLib/PlatformBm.c
> index d347c733855d..cb74d65b7f91 100644
> --- a/Platform/RaspberryPi/Library/PlatformBootManagerLib/PlatformBm.c
> +++ b/Platform/RaspberryPi/Library/PlatformBootManagerLib/PlatformBm.c
> @@ -524,46 +524,6 @@ SerialConPrint (
>     }
>   }
> 
> -STATIC
> -VOID
> -EFIAPI
> -ExitBootServicesHandler (
> -  IN EFI_EVENT  Event,
> -  IN VOID       *Context
> -  )
> -{
> -  EFI_STATUS Status;
> -  //
> -  // Long enough to occlude the string printed
> -  // in PlatformBootManagerWaitCallback.
> -  //
> -  STATIC CHAR16 *OsBootStr = L"Exiting UEFI and booting EL2 OS 
> kernel!\r\n";
> -  EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION Green;
> -  EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION Black;
> -  EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION Yellow;
> -
> -  if (!PcdGet32 (PcdDebugShowUEFIExit)) {
> -    return;
> -  }
> -
> -  Green.Raw = 0x00007F00;
> -  Black.Raw = 0x00000000;
> -  Yellow.Raw = 0x00FFFF00;
> -
> -  Status = BootLogoUpdateProgress (Yellow.Pixel,
> -             Black.Pixel,
> -             OsBootStr,
> -             Green.Pixel,
> -             100, 0);
> -  if (Status == EFI_SUCCESS) {
> -    SerialConPrint (OsBootStr);
> -  } else {
> -    Print (L"\n");
> -    Print (OsBootStr);
> -    Print (L"\n");
> -  }
> -}
> -
>   //
>   // BDS Platform Functions
>   //
> @@ -585,21 +545,8 @@ PlatformBootManagerBeforeConsole (
>     )
>   {
>     EFI_STATUS Status;
> -  EFI_EVENT ExitBSEvent;
>     ESRT_MANAGEMENT_PROTOCOL *EsrtManagement;
> 
> -  Status = gBS->CreateEventEx (
> -                  EVT_NOTIFY_SIGNAL,
> -                  TPL_NOTIFY,
> -                  ExitBootServicesHandler,
> -                  NULL,
> -                  &gEfiEventExitBootServicesGuid,
> -                  &ExitBSEvent
> -                );
> -  if (EFI_ERROR (Status)) {
> -    DEBUG ((DEBUG_ERROR, "%a: failed to register ExitBootServices 
> handler\n", __FUNCTION__));
> -  }
> -
>     if (GetBootModeHob () == BOOT_ON_FLASH_UPDATE) {
>       DEBUG ((DEBUG_INFO, "ProcessCapsules Before EndOfDxe ......\n"));
>       Status = ProcessCapsules ();
> diff --git a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.uni 
> b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.uni
> index 7195e497f986..636de2184f09 100644
> --- a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.uni
> +++ b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.uni
> @@ -118,8 +118,3 @@
>   #string STR_DEBUG_JTAG_HELP         #language en-US "Signals (nTRST, 
> TDI, TMS, TCK, RTCK, TDO) -> Header pins (15, 7, 13, 22, 16, 18)"
>   #string STR_DEBUG_JTAG_ENABLE       #language en-US "Enable JTAG via GPIO"
>   #string STR_DEBUG_JTAG_DISABLE      #language en-US "Disable JTAG"
> -
> -#string STR_DEBUG_EXIT_SHOW_PROMPT  #language en-US "Verbose 
> ExitBootServices"
> -#string STR_DEBUG_EXIT_SHOW_HELP    #language en-US "Show message when 
> UEFI hands off to OS"
> -#string STR_DEBUG_EXIT_SHOW_NO      #language en-US "Do nothing"
> -#string STR_DEBUG_EXIT_SHOW_YES     #language en-US "Show farewell message"
> -- 
> 2.17.1
> 
> 


      reply	other threads:[~2020-06-12  8:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-12  4:27 [edk2-platform][PATCH v1 1/1] Platforms/RaspberryPi: Remove DebugShowUEFIExit Samer El-Haj-Mahmoud
2020-06-12  6:25 ` Andrei Warkentin
2020-06-12  8:39   ` Ard Biesheuvel [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=6ebf49c5-f3e0-c932-a82e-5b23373bb3f7@arm.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