Files
system76-edk2/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfig.vfr
Tim Crawford c1a7127e01 SecureBootConfig: Clear PK and reset
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-03-07 10:10:35 -07:00

135 lines
4.3 KiB
Plaintext

// SPDX-License-Identifier: BSD-2-Clause-Patent
// SPDX-FileCopyrightText: Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
// SPDX-FileCopyrightText: 2023 System76 <info@system76.com>
#include "SecureBootConfigNvData.h"
formset
guid = SECUREBOOT_CONFIG_FORM_SET_GUID,
title = STRING_TOKEN(STR_SECUREBOOT_TITLE),
help = STRING_TOKEN(STR_SECUREBOOT_HELP),
classguid = EFI_HII_PLATFORM_SETUP_FORMSET_GUID,
varstore SECUREBOOT_CONFIGURATION,
varid = SECUREBOOT_CONFIGURATION_VARSTORE_ID,
name = SECUREBOOT_CONFIGURATION,
guid = SECUREBOOT_CONFIG_FORM_SET_GUID;
form formid = SECUREBOOT_CONFIGURATION_FORM_ID,
title = STRING_TOKEN(STR_SECUREBOOT_TITLE);
// FIXME: firmware-setup doesn't handle EFI_IFR_TEXT.
//text
// help = STRING_TOKEN(STR_SECURE_BOOT_STATE_HELP),
// text = STRING_TOKEN(STR_SECURE_BOOT_STATE_PROMPT),
// text = STRING_TOKEN(STR_SECURE_BOOT_STATE_CONTENT);
subtitle text = STRING_TOKEN(STR_SECURE_BOOT_STATE_PROMPT);
// XXX: Needed for "Secure Boot status" string to update.
suppressif TRUE;
oneof name = SecureBootMode,
questionid = KEY_SECURE_BOOT_MODE,
prompt = STRING_TOKEN(STR_SECURE_BOOT_MODE_PROMPT),
help = STRING_TOKEN(STR_SECURE_BOOT_MODE_HELP),
flags = INTERACTIVE | NUMERIC_SIZE_1,
option text = STRING_TOKEN(STR_STANDARD_MODE), value = SECURE_BOOT_MODE_STANDARD, flags = DEFAULT;
option text = STRING_TOKEN(STR_CUSTOM_MODE), value = SECURE_BOOT_MODE_CUSTOM, flags = 0;
endoneof;
endif;
suppressif ideqval SECUREBOOT_CONFIGURATION.AttemptSecureBoot == 0;
goto FORMID_SECURE_BOOT_DISABLE,
prompt = STRING_TOKEN(STR_SECURE_BOOT_DISABLE_PROMPT),
help = STRING_TOKEN(STR_NULL);
endif;
suppressif ideqval SECUREBOOT_CONFIGURATION.AttemptSecureBoot == 1;
goto FORMID_SECURE_BOOT_ENABLE,
prompt = STRING_TOKEN(STR_SECURE_BOOT_ENABLE_PROMPT),
help = STRING_TOKEN(STR_NULL);
endif;
subtitle text = STRING_TOKEN(STR_NULL);
goto FORMID_DELETE_KEYS,
prompt = STRING_TOKEN(STR_DELETE_KEYS_PROMPT),
help = STRING_TOKEN(STR_NULL);
subtitle text = STRING_TOKEN(STR_NULL);
goto FORMID_RESTORE_KEYS,
prompt = STRING_TOKEN(STR_RESTORE_KEYS_PROMPT),
help = STRING_TOKEN(STR_NULL);
endform;
form formid = FORMID_SECURE_BOOT_ENABLE,
title = STRING_TOKEN(STR_SECUREBOOT_TITLE);
subtitle text = STRING_TOKEN(STR_ENABLE_NOTICE);
subtitle text = STRING_TOKEN(STR_NULL);
text
help = STRING_TOKEN(STR_NULL),
text = STRING_TOKEN(STR_ENABLE_SELECTION),
flags = INTERACTIVE,
key = KEY_SECURE_BOOT_STATE_ENABLE;
goto SECUREBOOT_CONFIGURATION_FORM_ID,
prompt = STRING_TOKEN(STR_CANCEL),
help = STRING_TOKEN(STR_NULL);
endform;
form formid = FORMID_SECURE_BOOT_DISABLE,
title = STRING_TOKEN(STR_SECUREBOOT_TITLE);
subtitle text = STRING_TOKEN(STR_DISABLE_NOTICE);
subtitle text = STRING_TOKEN(STR_NULL);
text
help = STRING_TOKEN(STR_NULL),
text = STRING_TOKEN(STR_DISABLE_SELECTION),
flags = INTERACTIVE,
key = KEY_SECURE_BOOT_STATE_DISABLE;
goto SECUREBOOT_CONFIGURATION_FORM_ID,
prompt = STRING_TOKEN(STR_CANCEL),
help = STRING_TOKEN(STR_NULL);
endform;
form formid = FORMID_DELETE_KEYS,
title = STRING_TOKEN(STR_SECUREBOOT_TITLE);
subtitle text = STRING_TOKEN(STR_DELETE_KEYS_NOTICE);
subtitle text = STRING_TOKEN(STR_NULL);
text
help = STRING_TOKEN(STR_NULL),
text = STRING_TOKEN(STR_DELETE_KEYS_SELECTION),
flags = INTERACTIVE,
key = KEY_SECURE_BOOT_DELETE_PK;
goto SECUREBOOT_CONFIGURATION_FORM_ID,
prompt = STRING_TOKEN(STR_CANCEL),
help = STRING_TOKEN(STR_NULL);
endform;
form formid = FORMID_RESTORE_KEYS,
title = STRING_TOKEN(STR_SECUREBOOT_TITLE);
subtitle text = STRING_TOKEN(STR_RESTORE_KEYS_NOTICE);
subtitle text = STRING_TOKEN(STR_NULL);
text
help = STRING_TOKEN(STR_NULL),
text = STRING_TOKEN(STR_RESTORE_KEYS_SELECTION),
flags = INTERACTIVE,
key = KEY_RESTORE_KEYS;
goto SECUREBOOT_CONFIGURATION_FORM_ID,
prompt = STRING_TOKEN(STR_CANCEL),
help = STRING_TOKEN(STR_NULL);
endform;
endformset;