From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (NAM12-DM6-obe.outbound.protection.outlook.com [40.107.243.51]) by mx.groups.io with SMTP id smtpd.web12.14471.1591943142425082787 for ; Thu, 11 Jun 2020 23:25:42 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@vmware.com header.s=selector2 header.b=L9Ck/DzL; spf=pass (domain: vmware.com, ip: 40.107.243.51, mailfrom: awarkentin@vmware.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hIuHStMYoZn1b4RuxTejV6XvnFD+cBbRW2eXEZa6e3Ihn63c/q/LMLg9QpcP3HemIhoetpLrWyE0qkacplwN2w+m4IQXFOso+jqaYDs3s0oMh/OnOifZ4BXxESrydUqUlewjqC6vJNlxeEYzWrgKXKFkRr0DDzaAmqsHLBHk8OcpAyNlSZJCq0NfRRna/pxk6pN98KeGVY83lFmhK/XLs4q4js87cJTFlVzrsNAUqLxAo49Wguw+kb0PT+kPZbKyyDmS8QvCf1Ayojqebuj0ONdznL2s5eRE9eFvAdUBrb2c9mIaeYvdvrMDFRMqtW24IGwze725XLCUn4dLOTagLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9yPeocYgZCe5rPFDGtcL+q3WDCJoTo07hOvikrFl2Iw=; b=nOXDW7A3g5mMKJ/R6g23Xn9L76RxKyRWi3XIrSsWqKN4xzhgkjcSImNuV8Fz1ag6993CAZGAsEJPaRHJ2xRV5XXQCcuCFOXcuwpegSKn3nV7AfJu3Mm6+pkPVGfFRxfHSDVB1MW0dHyoJosjhs2gMIYYGHaKjQhhJ38uQuZI1c5ulHdJ7Bw30lKDOAP/Pzgn9VpEMFLp93228LzPHslPHkkfR02/FDbruwrAx6wpV9PglBsCjk6y/JiPL0SHb73N5Oh2LZ6Tyq0Ow2yWCcmnuL0D8H/akPZ+T3D/8T74T1nuWRW5PUcwsicLnZxTTx+nDEt/bzJ8MwxlG18PnNwhvg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vmware.com; dmarc=pass action=none header.from=vmware.com; dkim=pass header.d=vmware.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vmware.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9yPeocYgZCe5rPFDGtcL+q3WDCJoTo07hOvikrFl2Iw=; b=L9Ck/DzLo2RuidP8QwwhWftDlzAHFgF8XWD+5LNHv4an++1QUel23mX3LXtSyapbiexcbZ8df2saIpT1gkdk9fvRhvypiRIaGfg26hbDSShXDvOV5nA9apULTkdF5jUJPLiVdrKt4rzJwgTDWcO/DCsMyCezg9RDqb4HcbiFZZk= Received: from BN6PR05MB3411.namprd05.prod.outlook.com (2603:10b6:405:43::23) by BN6PR05MB3252.namprd05.prod.outlook.com (2603:10b6:404:be::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.7; Fri, 12 Jun 2020 06:25:40 +0000 Received: from BN6PR05MB3411.namprd05.prod.outlook.com ([fe80::e1ef:31eb:c802:aef0]) by BN6PR05MB3411.namprd05.prod.outlook.com ([fe80::e1ef:31eb:c802:aef0%3]) with mapi id 15.20.3088.021; Fri, 12 Jun 2020 06:25:40 +0000 From: "Andrei Warkentin" To: Samer El-Haj-Mahmoud , "devel@edk2.groups.io" CC: Leif Lindholm , Ard Biesheuvel , Pete Batard Subject: Re: [edk2-platform][PATCH v1 1/1] Platforms/RaspberryPi: Remove DebugShowUEFIExit Thread-Topic: [edk2-platform][PATCH v1 1/1] Platforms/RaspberryPi: Remove DebugShowUEFIExit Thread-Index: AQHWQHHSgFf7XNlQdUS4hWt/sR1h26jUgx7z Date: Fri, 12 Jun 2020 06:25:40 +0000 Message-ID: References: <20200612042741.26641-1-Samer.El-Haj-Mahmoud@arm.com> In-Reply-To: <20200612042741.26641-1-Samer.El-Haj-Mahmoud@arm.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=vmware.com; x-originating-ip: [98.214.99.181] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 448a1543-d5bc-4d51-c71f-08d80e996d87 x-ms-traffictypediagnostic: BN6PR05MB3252: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 0432A04947 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ZkbmSNBpPF15APz5z3TT3gElF/RpKM/r58vjvLO5pxZvcwX84OBGkiERG8wfZ6PsmZRPupLMTFp/qiSPY3RqdEHd7cUlJBjM9ryB4RR0PHqSU2zVZ1dLSZy3E1rU4MTffoMVgp7Kc7JsPb1dpDhl1DKoaCOLZQLkEWM0oeUHKB6bX9BqM4qgRV7uKup1ee4lr79ER1ziLPAYmnBfUEY4oqg8g+nOOQNt2ww2TQfKnbQuzJdiBmexS8V5sJ3mbmYkvKkcGdIdO9PstMTkY2Lb7aA1lpB2NPk7Nuv27x05M00973clIdLATceG0nCvNOeFXxqKq1SZuycy+FQnaZznStyRjKzUzjuKxO+/u7CJLC4Q8ASuUzCBGOdho32iEIR5 x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN6PR05MB3411.namprd05.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(366004)(346002)(376002)(136003)(39860400002)(396003)(26005)(19627235002)(7696005)(186003)(83380400001)(8676002)(55016002)(53546011)(33656002)(9686003)(2906002)(71200400001)(76116006)(316002)(4326008)(66946007)(66476007)(66556008)(64756008)(66446008)(54906003)(110136005)(8936002)(478600001)(19627405001)(86362001)(30864003)(6506007)(5660300002)(52536014)(145603002);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata: QREeNvyI2NInvyYxV0rIYa6YTP/reFbHf6zfMgvqN5derMekj2b/vg8kX1SGS3U9uJYDcxyqGycVzvyG5tvdzuq+o6YoyVLTdZbMbWPucNyzw6AGwyVPWxGwdjdm6xjEQkExZuxw2VflgMkKUDQmhmgfWbGgfm/bn0oZUQ8IxpzyCPzFpznO3PlLaPngNdN/GMLMsIEJSvI19DOmbR7pH6chMkelUerYNOVm2OhRw0gI5lCCv38q2oim8PIqHI36iJnwLuCexdpFUExBbHpIQTlp4V/rt/0cTF22sJ8dCQAQTOfWlllJdyHB0oTxAAbydFhctYM2YhGvhS+yWdks0M1pwQrxqnGE68+gLpt0npaS9N1J7nQscJHS/7TRYP+WzHb/AcGbK625iWWwNUFu9Nggb52M2kehZW6OhI4yMcANyL5+FPSOmFRObeLlvaazYTiZ83TVziTr+xPzBM4rS9Bn8GCD7G/WAsQMw3mvSG8= x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-Network-Message-Id: 448a1543-d5bc-4d51-c71f-08d80e996d87 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Jun 2020 06:25:40.1746 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: yOxjajtxdaIIsy3nuzy6AlDaSCl+lMN5Ar6wU21Rt1mMbBR7erM5rzjqqGTK1ndXQm40bETVYJnulVNwbaaxMw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR05MB3252 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_BN6PR05MB341156522CF5477C7E74C8D2B9810BN6PR05MB3411namp_" --_000_BN6PR05MB341156522CF5477C7E74C8D2B9810BN6PR05MB3411namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Andrei Warkentin 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. A ________________________________ From: Samer El-Haj-Mahmoud Sent: Thursday, June 11, 2020 11:27 PM To: devel@edk2.groups.io Cc: Leif Lindholm ; Ard Biesheuvel ; Pete Batard ; Andrei Warkentin Subject: [edk2-platform][PATCH v1 1/1] Platforms/RaspberryPi: Remove DebugS= howUEFIExit 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 Cc: Ard Biesheuvel Cc: Pete Batard Cc: Andrei Warkentin Signed-off-by: Samer El-Haj-Mahmoud --- 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/Ra= spberryPi.dec index 5b4021232cba..c71177a2f762 100644 --- a/Platform/RaspberryPi/RaspberryPi.dec +++ b/Platform/RaspberryPi/RaspberryPi.dec @@ -60,7 +60,6 @@ [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, Pc= dsDynamicEx] 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|0x000= 00017 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"|gConfig= DxeFormSetGuid|0x0|0 - gRaspberryPiTokenSpaceGuid.PcdDebugShowUEFIExit|L"DebugShowUEFIExit"|gCo= nfigDxeFormSetGuid|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"|gConfig= DxeFormSetGuid|0x0|0 - gRaspberryPiTokenSpaceGuid.PcdDebugShowUEFIExit|L"DebugShowUEFIExit"|gCo= nfigDxeFormSetGuid|0x0|0 # # Display-related. diff --git a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.inf b/Platfor= m/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/PlatformBo= otManagerLib.inf b/Platform/RaspberryPi/Library/PlatformBootManagerLib/Plat= formBootManagerLib.inf index eb44daa4b7b7..88f6f8fe09ba 100644 --- a/Platform/RaspberryPi/Library/PlatformBootManagerLib/PlatformBootManag= erLib.inf +++ b/Platform/RaspberryPi/Library/PlatformBootManagerLib/PlatformBootManag= erLib.inf @@ -62,7 +62,6 @@ [FixedPcd] [Pcd] gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut - gRaspberryPiTokenSpaceGuid.PcdDebugShowUEFIExit gRaspberryPiTokenSpaceGuid.PcdSdIsArasan [Guids] diff --git a/Platform/RaspberryPi/Include/ConfigVars.h b/Platform/Raspberry= Pi/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/Plat= form/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 =3D DebugEnableJTAG, guid =3D CONFIGDXE_FORM_SET_GUID; - efivarstore DEBUG_SHOW_UEFI_EXIT_VARSTORE_DATA, - attribute =3D EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME= _ACCESS | EFI_VARIABLE_NON_VOLATILE, - name =3D DebugShowUEFIExit, - guid =3D CONFIGDXE_FORM_SET_GUID; - efivarstore DISPLAY_ENABLE_SCALED_VMODES_VARSTORE_DATA, attribute =3D EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME= _ACCESS | EFI_VARIABLE_NON_VOLATILE, name =3D DisplayEnableScaledVModes, @@ -294,13 +289,5 @@ formset option text =3D STRING_TOKEN(STR_DEBUG_JTAG_ENABLE), value =3D= 1, flags =3D 0; option text =3D STRING_TOKEN(STR_DEBUG_JTAG_DISABLE), value = =3D 0, flags =3D DEFAULT; endoneof; - - oneof varid =3D DebugShowUEFIExit.Show, - prompt =3D STRING_TOKEN(STR_DEBUG_EXIT_SHOW_PROMPT), - help =3D STRING_TOKEN(STR_DEBUG_EXIT_SHOW_HELP), - flags =3D NUMERIC_SIZE_4 | INTERACTIVE, - option text =3D STRING_TOKEN(STR_DEBUG_EXIT_SHOW_NO), value = =3D 0, flags =3D DEFAULT; - option text =3D STRING_TOKEN(STR_DEBUG_EXIT_SHOW_YES), value = =3D 1, flags =3D 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 =3D sizeof (UINT32); - Status =3D gRT->GetVariable (L"DebugShowUEFIExit", - &gConfigDxeFormSetGuid, - NULL, &Size, &Var32); - if (EFI_ERROR (Status)) { - PcdSet32 (PcdDebugShowUEFIExit, PcdGet32 (PcdDebugShowUEFIExit)); - } - Size =3D sizeof (UINT8); Status =3D 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 =3D 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 =3D 0x00007F00; - Black.Raw =3D 0x00000000; - Yellow.Raw =3D 0x00FFFF00; - - Status =3D BootLogoUpdateProgress (Yellow.Pixel, - Black.Pixel, - OsBootStr, - Green.Pixel, - 100, 0); - if (Status =3D=3D 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 =3D 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 () =3D=3D BOOT_ON_FLASH_UPDATE) { DEBUG ((DEBUG_INFO, "ProcessCapsules Before EndOfDxe ......\n")); Status =3D ProcessCapsules (); diff --git a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.uni b/Plat= form/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 ExitBootServi= ces" -#string STR_DEBUG_EXIT_SHOW_HELP #language en-US "Show message when UEF= I 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 --_000_BN6PR05MB341156522CF5477C7E74C8D2B9810BN6PR05MB3411namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
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.

A

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 w= as 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     &nb= sp;            =             &nb= sp;            |&nbs= p; 1 -
 Platform/RaspberryPi/RPi3/RPi3.dsc      = ;            &n= bsp;            = ;            &n= bsp; |  1 -
 Platform/RaspberryPi/RPi4/RPi4.dsc      = ;            &n= bsp;            = ;            &n= bsp; |  1 -
 Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.inf   = ;            &n= bsp;           |  1 = -
 Platform/RaspberryPi/Library/PlatformBootManagerLib/PlatformBootManag= erLib.inf |  1 -
 Platform/RaspberryPi/Include/ConfigVars.h    &nbs= p;            &= nbsp;           &nbs= p;        |  8 ---
 Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.vfr  &n= bsp;            = ;         | 13 -----
 Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c   &= nbsp;           &nbs= p;             = |  8 ---
 Platform/RaspberryPi/Library/PlatformBootManagerLib/PlatformBm.c = ;            &n= bsp; | 53 --------------------
 Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.uni  &n= bsp;            = ;         |  5 --
 10 files changed, 92 deletions(-)

diff --git a/Platform/RaspberryPi/RaspberryPi.dec b/Platform/RaspberryPi/Ra= spberryPi.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|0x000= 00012
   gRaspberryPiTokenSpaceGuid.PcdMmcDisableMulti|0|UINT32|0x00000= 013
   gRaspberryPiTokenSpaceGuid.PcdDebugEnableJTAG|0|UINT32|0x00000= 014
-  gRaspberryPiTokenSpaceGuid.PcdDebugShowUEFIExit|0|UINT32|0x00000015=
   gRaspberryPiTokenSpaceGuid.PcdCustomCpuClock|0|UINT32|0x000000= 16
   gRaspberryPiTokenSpaceGuid.PcdDisplayEnableScaledVModes|0x3F|U= INT8|0x00000017
   gRaspberryPiTokenSpaceGuid.PcdDisplayEnableSShot|0|UINT32|0x00= 000018
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"DebugEnab= leJTAG"|gConfigDxeFormSetGuid|0x0|0
-  gRaspberryPiTokenSpaceGuid.PcdDebugShowUEFIExit|L"DebugShowUEF= IExit"|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"DebugEnab= leJTAG"|gConfigDxeFormSetGuid|0x0|0
-  gRaspberryPiTokenSpaceGuid.PcdDebugShowUEFIExit|L"DebugShowUEF= IExit"|gConfigDxeFormSetGuid|0x0|0
 
   #
   # Display-related.
diff --git a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.inf b/Platfor= m/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/PlatformBo= otManagerLib.inf b/Platform/RaspberryPi/Library/PlatformBootManagerLib/Plat= formBootManagerLib.inf
index eb44daa4b7b7..88f6f8fe09ba 100644
--- a/Platform/RaspberryPi/Library/PlatformBootManagerLib/PlatformBootManag= erLib.inf
+++ b/Platform/RaspberryPi/Library/PlatformBootManagerLib/Platf= ormBootManagerLib.inf
@@ -62,7 +62,6 @@ [FixedPcd]
 
 [Pcd]
   gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut
-  gRaspberryPiTokenSpaceGuid.PcdDebugShowUEFIExit
   gRaspberryPiTokenSpaceGuid.PcdSdIsArasan
 
 [Guids]
diff --git a/Platform/RaspberryPi/Include/ConfigVars.h b/Platform/Raspberry= Pi/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/Plat= form/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  =3D DebugEnableJTAG,
       guid  =3D CONFIGDXE_FORM_SET_GUID= ;
 
-    efivarstore DEBUG_SHOW_UEFI_EXIT_VARSTORE_DATA,
-      attribute =3D EFI_VARIABLE_BOOTSERVICE_ACCE= SS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE,
-      name  =3D DebugShowUEFIExit,
-      guid  =3D CONFIGDXE_FORM_SET_GUID;
-
     efivarstore DISPLAY_ENABLE_SCALED_VMODES_VARSTORE_= DATA,
       attribute =3D EFI_VARIABLE_BOOTSERVICE= _ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE,
       name  =3D DisplayEnableScaledVMod= es,
@@ -294,13 +289,5 @@ formset
             op= tion text =3D STRING_TOKEN(STR_DEBUG_JTAG_ENABLE), value =3D 1, flags =3D 0= ;
             op= tion text =3D STRING_TOKEN(STR_DEBUG_JTAG_DISABLE), value =3D 0, flags =3D = DEFAULT;
         endoneof;
-
-        oneof varid =3D DebugShowUEFIEx= it.Show,
-            prompt&= nbsp;     =3D STRING_TOKEN(STR_DEBUG_EXIT_SHOW_PROMPT),=
-            help&nb= sp;       =3D STRING_TOKEN(STR_DEBUG_EXIT_SHO= W_HELP),
-            flags&n= bsp;      =3D NUMERIC_SIZE_4 | INTERACTIVE,
-            option = text =3D STRING_TOKEN(STR_DEBUG_EXIT_SHOW_NO), value =3D 0, flags =3D DEFAU= LT;
-            option = text =3D STRING_TOKEN(STR_DEBUG_EXIT_SHOW_YES), value =3D 1, flags =3D 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 (PcdDebugEn= ableJTAG));
   }
 
-  Size =3D sizeof (UINT32);
-  Status =3D gRT->GetVariable (L"DebugShowUEFIExit",
-            &n= bsp;     &gConfigDxeFormSetGuid,
-            &n= bsp;     NULL, &Size, &Var32);
-  if (EFI_ERROR (Status)) {
-    PcdSet32 (PcdDebugShowUEFIExit, PcdGet32 (PcdDebugShowU= EFIExit));
-  }
-
   Size =3D sizeof (UINT8);
   Status =3D gRT->GetVariable (L"DisplayEnableScaledVMod= es",
            &nb= sp;      &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/Platf= ormBm.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 =3D 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 =3D 0x00007F00;
-  Black.Raw =3D 0x00000000;
-  Yellow.Raw =3D 0x00FFFF00;
-
-  Status =3D BootLogoUpdateProgress (Yellow.Pixel,
-             B= lack.Pixel,
-             O= sBootStr,
-             G= reen.Pixel,
-             1= 00, 0);
-  if (Status =3D=3D 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 =3D gBS->CreateEventEx (
-            &n= bsp;     EVT_NOTIFY_SIGNAL,
-            &n= bsp;     TPL_NOTIFY,
-            &n= bsp;     ExitBootServicesHandler,
-            &n= bsp;     NULL,
-            &n= bsp;     &gEfiEventExitBootServicesGuid,
-            &n= bsp;     &ExitBSEvent
-            &n= bsp;   );
-  if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "%a: failed to register ExitB= ootServices handler\n", __FUNCTION__));
-  }
-
   if (GetBootModeHob () =3D=3D BOOT_ON_FLASH_UPDATE) {
     DEBUG ((DEBUG_INFO, "ProcessCapsules Before E= ndOfDxe ......\n"));
     Status =3D ProcessCapsules ();
diff --git a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.uni b/Plat= form/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       #la= nguage en-US "Enable JTAG via GPIO"
 #string STR_DEBUG_JTAG_DISABLE      #languag= e en-US "Disable JTAG"
-
-#string STR_DEBUG_EXIT_SHOW_PROMPT  #language en-US "Verbose Exi= tBootServices"
-#string STR_DEBUG_EXIT_SHOW_HELP    #language en-US "S= how 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 &q= uot;Show farewell message"
--
2.17.1

--_000_BN6PR05MB341156522CF5477C7E74C8D2B9810BN6PR05MB3411namp_--