Skip to content

Commit 646bbcb

Browse files
authored
Removal of SecureBoot options from ConfApp (#432)
## Description ConfApp's secure boot menu allows the user the illusion of being able to configure the setup boot options. The reality is that secure boot is configured by the system prior to ConfApp, and that changes made in ConfApp are not honored on the next boot. Removing the Secure Boot menu, associated tests and reduce the libraries needed. - [ ] Impacts functionality? - [ ] Impacts security? - [x] Breaking change? - [ ] Includes tests? - [ ] Includes documentation? ## How This Was Tested CI Build. Boot on Qemu to verify functionality. ## Integration Instructions No Changes required.
1 parent 2add84a commit 646bbcb

7 files changed

Lines changed: 8 additions & 1275 deletions

File tree

SetupDataPkg/ConfApp/ConfApp.c

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
**/
88

99
#include <Uefi.h>
10-
#include <UefiSecureBoot.h>
1110
#include <Guid/MuVarPolicyFoundationDxe.h>
1211

1312
#include <Library/DebugLib.h>
@@ -19,13 +18,12 @@
1918
#include <Library/ResetSystemLib.h>
2019
#include <Library/UefiLib.h>
2120
#include <Library/UefiBootManagerLib.h>
22-
#include <Library/SecureBootKeyStoreLib.h>
2321
#include <Library/PerformanceLib.h>
2422
#include <Library/ConfigSystemModeLib.h>
2523

2624
#include "ConfApp.h"
2725

28-
#define MAIN_STATE_OPTIONS 6
26+
#define MAIN_STATE_OPTIONS 5
2927

3028
CONST ConfAppKeyOptions MainStateOptions[MAIN_STATE_OPTIONS] = {
3129
{
@@ -40,27 +38,18 @@ CONST ConfAppKeyOptions MainStateOptions[MAIN_STATE_OPTIONS] = {
4038
{
4139
.KeyName = L"2",
4240
.KeyNameTextAttr = EFI_TEXT_ATTR (EFI_YELLOW, EFI_BLACK),
43-
.Description = L"Configure Secure Boot.",
44-
.DescriptionTextAttr = EFI_TEXT_ATTR (EFI_WHITE, EFI_BLACK),
45-
.UnicodeChar = '2',
46-
.ScanCode = SCAN_NULL,
47-
.EndState = SecureBoot
48-
},
49-
{
50-
.KeyName = L"3",
51-
.KeyNameTextAttr = EFI_TEXT_ATTR (EFI_YELLOW, EFI_BLACK),
5241
.Description = L"Boot Options.",
5342
.DescriptionTextAttr = EFI_TEXT_ATTR (EFI_WHITE, EFI_BLACK),
54-
.UnicodeChar = '3',
43+
.UnicodeChar = '2',
5544
.ScanCode = SCAN_NULL,
5645
.EndState = BootOption
5746
},
5847
{
59-
.KeyName = L"4",
48+
.KeyName = L"3",
6049
.KeyNameTextAttr = EFI_TEXT_ATTR (EFI_YELLOW, EFI_BLACK),
6150
.Description = L"Update Setup Configuration.\n",
6251
.DescriptionTextAttr = EFI_TEXT_ATTR (EFI_WHITE, EFI_BLACK),
63-
.UnicodeChar = '4',
52+
.UnicodeChar = '3',
6453
.ScanCode = SCAN_NULL,
6554
.EndState = SetupConf
6655
},
@@ -86,8 +75,6 @@ CONST ConfAppKeyOptions MainStateOptions[MAIN_STATE_OPTIONS] = {
8675

8776
ConfState_t mConfState = MainInit;
8877
EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *mSimpleTextInEx = NULL;
89-
SECURE_BOOT_PAYLOAD_INFO *mSecureBootKeys;
90-
UINT8 mSecureBootKeysCount;
9178

9279
/**
9380
Quick helper function to see if ReadyToBoot has already been signalled.
@@ -363,12 +350,6 @@ ConfAppEntry (
363350
DEBUG ((DEBUG_ERROR, "Unable to reset SimpleTextIn on ConIn. Code = %r.\n", Status));
364351
}
365352

366-
Status = GetPlatformKeyStore (&mSecureBootKeys, &mSecureBootKeysCount);
367-
if (EFI_ERROR (Status)) {
368-
DEBUG ((DEBUG_ERROR, "Failed to get platform secure boot keys. Code = %r.\n", Status));
369-
goto Exit;
370-
}
371-
372353
// Force-connect all controllers.
373354
//
374355
EfiBootManagerConnectAll ();
@@ -413,9 +394,6 @@ ConfAppEntry (
413394
case SystemInfo:
414395
Status = SysInfoMgr ();
415396
break;
416-
case SecureBoot:
417-
Status = SecureBootMgr ();
418-
break;
419397
case BootOption:
420398
Status = BootOptionMgr ();
421399
break;

SetupDataPkg/ConfApp/ConfApp.inf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
BootOptions.c
2020
ConfApp.c
2121
ConfApp.h
22-
SecureBoot.c
2322
SetupConf.c
2423
SystemInfo.c
2524
SvdUsb/SvdUsb.c
@@ -44,8 +43,6 @@
4443
UefiLib
4544
ResetSystemLib
4645
UefiBootManagerLib
47-
MuSecureBootKeySelectorLib
48-
SecureBootKeyStoreLib
4946
JsonLiteParserLib
5047
FileHandleLib
5148
XmlTreeLib

SetupDataPkg/ConfApp/SecureBoot.c

Lines changed: 0 additions & 285 deletions
This file was deleted.

0 commit comments

Comments
 (0)