OvmfPkg: remove LegacyBootMaintUiLib

LegacyBootMaintUiLib is not used by any platform at this point, remove it.

This patch removes mentions of the following CSM resources from the source
code:

- GUIDs (protocols or otherwise):
  - gEfiLegacyBiosProtocolGuid
  - gEfiLegacyDevOrderVariableGuid

- headers:
  - Guid/LegacyDevOrder.h
  - Protocol/LegacyBios.h

which extends the list of resources scheduled for removal to:

- GUIDs (protocols or otherwise):
  - gEfiLegacyBiosProtocolGuid
  - gEfiLegacyDevOrderVariableGuid

- headers:
  - Guid/LegacyDevOrder.h
  - Protocol/LegacyBios.h

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4588
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20231110235820.644381-7-lersek@redhat.com>
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Corvin Köhne <corvink@FreeBSD.org>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Laszlo Ersek 2023-11-11 00:57:49 +01:00 committed by mergify[bot]
parent 237a0564d4
commit 545a5f6b68
7 changed files with 0 additions and 2007 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,242 +0,0 @@
/** @file
Legacy boot maintenance Ui definition.
Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef _EFI_LEGACY_BOOT_OPTION_H_
#define _EFI_LEGACY_BOOT_OPTION_H_
#include <PiDxe.h>
#include <Guid/GlobalVariable.h>
#include <Guid/LegacyDevOrder.h>
#include <Guid/MdeModuleHii.h>
#include <Protocol/HiiConfigAccess.h>
#include <Protocol/HiiConfigRouting.h>
#include <Protocol/HiiDatabase.h>
#include <Protocol/LegacyBios.h>
#include <Library/UefiDriverEntryPoint.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
#include <Library/BaseLib.h>
#include <Library/DevicePathLib.h>
#include <Library/DebugLib.h>
#include <Library/HiiLib.h>
#include <Library/UefiBootManagerLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiLib.h>
#include <Library/PrintLib.h>
#include <Library/BaseMemoryLib.h>
#include "LegacyBootMaintUiVfr.h"
#define CONFIG_OPTION_OFFSET 0x1200
//
// VarOffset that will be used to create question
// all these values are computed from the structure
// defined below
//
#define VAR_OFFSET(Field) ((UINT16) ((UINTN) &(((LEGACY_BOOT_NV_DATA *) 0)->Field)))
//
// Question Id of Zero is invalid, so add an offset to it
//
#define QUESTION_ID(Field) (VAR_OFFSET (Field) + CONFIG_OPTION_OFFSET)
#define LEGACY_FD_QUESTION_ID QUESTION_ID (LegacyFD)
#define LEGACY_HD_QUESTION_ID QUESTION_ID (LegacyHD)
#define LEGACY_CD_QUESTION_ID QUESTION_ID (LegacyCD)
#define LEGACY_NET_QUESTION_ID QUESTION_ID (LegacyNET)
#define LEGACY_BEV_QUESTION_ID QUESTION_ID (LegacyBEV)
//
// String Constant
//
#define STR_FLOPPY L"Floppy Drive #%02x"
#define STR_HARDDISK L"HardDisk Drive #%02x"
#define STR_CDROM L"ATAPI CDROM Drive #%02x"
#define STR_NET L"NET Drive #%02x"
#define STR_BEV L"BEV Drive #%02x"
#define STR_FLOPPY_HELP L"Select Floppy Drive #%02x"
#define STR_HARDDISK_HELP L"Select HardDisk Drive #%02x"
#define STR_CDROM_HELP L"Select ATAPI CDROM Drive #%02x"
#define STR_NET_HELP L"NET Drive #%02x"
#define STR_BEV_HELP L"BEV Drive #%02x"
#define STR_FLOPPY_TITLE L"Set Legacy Floppy Drive Order"
#define STR_HARDDISK_TITLE L"Set Legacy HardDisk Drive Order"
#define STR_CDROM_TITLE L"Set Legacy CDROM Drive Order"
#define STR_NET_TITLE L"Set Legacy NET Drive Order"
#define STR_BEV_TITLE L"Set Legacy BEV Drive Order"
//
// These are the VFR compiler generated data representing our VFR data.
//
extern UINT8 LegacyBootMaintUiVfrBin[];
#pragma pack(1)
///
/// HII specific Vendor Device Path definition.
///
typedef struct {
VENDOR_DEVICE_PATH VendorDevicePath;
EFI_DEVICE_PATH_PROTOCOL End;
} HII_VENDOR_DEVICE_PATH;
//
// Variable created with this flag will be "Efi:...."
//
#define VAR_FLAG EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE
#define LEGACY_BOOT_OPTION_CALLBACK_DATA_SIGNATURE SIGNATURE_32 ('L', 'G', 'C', 'B')
typedef struct {
UINTN Signature;
//
// HII relative handles
//
EFI_HII_HANDLE HiiHandle;
EFI_HANDLE DriverHandle;
//
// Produced protocols
//
EFI_HII_CONFIG_ACCESS_PROTOCOL ConfigAccess;
//
// Maintain the data.
//
LEGACY_BOOT_MAINTAIN_DATA *MaintainMapData;
} LEGACY_BOOT_OPTION_CALLBACK_DATA;
//
// All of the signatures that will be used in list structure
//
#define LEGACY_MENU_OPTION_SIGNATURE SIGNATURE_32 ('m', 'e', 'n', 'u')
#define LEGACY_MENU_ENTRY_SIGNATURE SIGNATURE_32 ('e', 'n', 't', 'r')
#define LEGACY_LEGACY_DEV_CONTEXT_SELECT 0x9
typedef struct {
UINTN Signature;
LIST_ENTRY Head;
UINTN MenuNumber;
} LEGACY_MENU_OPTION;
typedef struct {
UINT16 BbsIndex;
CHAR16 *Description;
} LEGACY_DEVICE_CONTEXT;
typedef struct {
UINTN Signature;
LIST_ENTRY Link;
UINTN OptionNumber;
UINT16 *DisplayString;
UINT16 *HelpString;
EFI_STRING_ID DisplayStringToken;
EFI_STRING_ID HelpStringToken;
VOID *VariableContext;
} LEGACY_MENU_ENTRY;
typedef struct {
UINT16 BbsIndex;
} LEGACY_BOOT_OPTION_BBS_DATA;
#pragma pack()
/**
This call back function is registered with Boot Manager formset.
When user selects a boot option, this call back function will
be triggered. The boot option is saved for later processing.
@param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
@param Action Specifies the type of action taken by the browser.
@param QuestionId A unique value which is sent to the original exporting driver
so that it can identify the type of data to expect.
@param Type The type of value for the question.
@param Value A pointer to the data being sent to the original exporting driver.
@param ActionRequest On return, points to the action requested by the callback function.
@retval EFI_SUCCESS The callback successfully handled the action.
@retval EFI_INVALID_PARAMETER The setup browser call this function with invalid parameters.
**/
EFI_STATUS
EFIAPI
LegacyBootOptionCallback (
IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,
IN EFI_BROWSER_ACTION Action,
IN EFI_QUESTION_ID QuestionId,
IN UINT8 Type,
IN EFI_IFR_TYPE_VALUE *Value,
OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest
);
/**
This function allows a caller to extract the current configuration for one
or more named elements from the target driver.
@param This - Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
@param Request - A null-terminated Unicode string in <ConfigRequest> format.
@param Progress - On return, points to a character in the Request string.
Points to the string's null terminator if request was successful.
Points to the most recent '&' before the first failing name/value
pair (or the beginning of the string if the failure is in the
first name/value pair) if the request was not successful.
@param Results - A null-terminated Unicode string in <ConfigAltResp> format which
has all values filled in for the names in the Request string.
String to be allocated by the called function.
@retval EFI_SUCCESS The Results is filled with the requested values.
@retval EFI_OUT_OF_RESOURCES Not enough memory to store the results.
@retval EFI_INVALID_PARAMETER Request is NULL, illegal syntax, or unknown name.
@retval EFI_NOT_FOUND Routing data doesn't match any storage in this driver.
**/
EFI_STATUS
EFIAPI
LegacyBootOptionExtractConfig (
IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,
IN CONST EFI_STRING Request,
OUT EFI_STRING *Progress,
OUT EFI_STRING *Results
);
/**
This function processes the results of changes in configuration.
@param This - Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
@param Configuration - A null-terminated Unicode string in <ConfigResp> format.
@param Progress - A pointer to a string filled in with the offset of the most
recent '&' before the first failing name/value pair (or the
beginning of the string if the failure is in the first
name/value pair) or the terminating NULL if all was successful.
@retval EFI_SUCCESS The Results is processed successfully.
@retval EFI_INVALID_PARAMETER Configuration is NULL.
@retval EFI_NOT_FOUND Routing data doesn't match any storage in this driver.
**/
EFI_STATUS
EFIAPI
LegacyBootOptionRouteConfig (
IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,
IN CONST EFI_STRING Configuration,
OUT EFI_STRING *Progress
);
#endif

View File

@ -1,62 +0,0 @@
## @file
# Legacy Boot Maintenance UI module is library for BDS phase.
#
# Copyright (c) 2015 - 2019, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
[Defines]
INF_VERSION = 0x00010005
BASE_NAME = LegacyBootMaintUiLib
MODULE_UNI_FILE = LegacyBootMaintUiLib.uni
FILE_GUID = 259A90B1-C151-43E5-8A71-82B4E3201F4E
MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0
LIBRARY_CLASS = NULL|DXE_DRIVER UEFI_APPLICATION
CONSTRUCTOR = LegacyBootMaintUiLibConstructor
DESTRUCTOR = LegacyBootMaintUiLibDestructor
#
# The following information is for reference only and not required by the build tools.
#
# VALID_ARCHITECTURES = IA32 X64 EBC
#
[Sources]
LegacyBootMaintUiVfr.h
LegacyBootMaintUi.h
LegacyBootMaintUiVfr.Vfr
LegacyBootMaintUiStrings.uni
LegacyBootMaintUi.c
[Packages]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
OvmfPkg/OvmfPkg.dec
[LibraryClasses]
DevicePathLib
BaseLib
UefiRuntimeServicesTableLib
UefiBootServicesTableLib
DebugLib
HiiLib
MemoryAllocationLib
UefiBootManagerLib
UefiLib
PrintLib
BaseMemoryLib
[Guids]
gEfiIfrTianoGuid ## SOMETIMES_PRODUCES ## UNDEFINED # Extended IFR Guid Opcode
gEfiIfrBootMaintenanceGuid ## CONSUMES ## HII # BootMaint HII Package
gEfiLegacyDevOrderVariableGuid ## PRODUCES ## Variable:L"LegacyDevOrder"
[Protocols]
gEfiHiiConfigAccessProtocolGuid ## PRODUCES
gEfiLegacyBiosProtocolGuid ## CONSUMES
gEfiHiiConfigRoutingProtocolGuid ## CONSUMES
[Depex]
gEfiHiiDatabaseProtocolGuid

View File

@ -1,20 +0,0 @@
// /** @file
// Legacy Boot Maintenance UI module is library for BDS phase.
//
// Legacy Boot Maintenance UI module is library for BDS phase.
//
// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
//
// SPDX-License-Identifier: BSD-2-Clause-Patent
//
// **/
#string STR_MODULE_ABSTRACT
#language en-US
"Legacy Boot Maintenance UI module is library for BDS phase."
#string STR_MODULE_DESCRIPTION
#language en-US
"Legacy Boot Maintenance UI module is library for BDS phase."

View File

@ -1,43 +0,0 @@
///** @file
//
// String definitions for Legacy Boot Maintainece Ui.
//
// Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
// SPDX-License-Identifier: BSD-2-Clause-Patent
//
//**/
/=#
#langdef en-US "English"
#langdef fr-FR "Français"
#string STR_LEGACY_BOOT_PROMPT #language en-US "Legacy Boot Options Menu"
#language fr-FR "Legacy Boot Options Menu"
#string STR_LEGACY_BOOT_HELP #language en-US "Manager legacy boot options in this driver."
#language fr-FR "Manager legacy boot options in this driver."
#string STR_FORM_FLOPPY_BOOT_TITLE #language en-US "Set Legacy Floppy Driver Order"
#language fr-FR "Set Legacy Floppy Driver Order"
#string STR_FORM_FLOPPY_BOOT_HELP #language en-US "Set Legacy Floppy Driver Order."
#language fr-FR "Set Legacy Floppy Driver Order."
#string STR_FORM_HARDDISK_BOOT_TITLE #language en-US "Set Legacy HARDDISK Driver Order"
#language fr-FR "Set Legacy HARDDISK Driver Order"
#string STR_FORM_HARDDISK_BOOT_HELP #language en-US "Set Legacy HARDDISK Driver Order."
#language fr-FR "Set Legacy HARDDISK Driver Order."
#string STR_FORM_CDROM_BOOT_TITLE #language en-US "Set Legacy CDROM Driver Order"
#language fr-FR "Set Legacy CDROM Driver Order"
#string STR_FORM_CDROM_BOOT_HELP #language en-US "Set Legacy CDROM Driver Order."
#language fr-FR "Set Legacy CDROM Driver Order."
#string STR_FORM_NET_BOOT_TITLE #language en-US "Set Legacy NET Driver Order"
#language fr-FR "Set Legacy NET Driver Order"
#string STR_FORM_NET_BOOT_HELP #language en-US "Set Legacy NET Driver Order."
#language fr-FR "Set Legacy NET Driver Order."
#string STR_FORM_BEV_BOOT_TITLE #language en-US "Set Legacy BEV Driver Order"
#language fr-FR "Set Legacy BEV Driver Order"
#string STR_FORM_BEV_BOOT_HELP #language en-US "Set Legacy BEV Driver Order."
#language fr-FR "Set Legacy BEV Driver Order."
#string STR_ORDER_CHANGE_PROMPT #language en-US "Change Driver Boot Order."
#language fr-FR "Change Driver Boot Order."
#string STR_DISABLE_LEGACY_DEVICE #language en-US "Disabled"
#language fr-FR "Disabled"

View File

@ -1,67 +0,0 @@
///** @file
//
// Browser formset.
//
// Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
// SPDX-License-Identifier: BSD-2-Clause-Patent
//
//**/
#include "LegacyBootMaintUiVfr.h"
formset
guid = LEGACY_BOOT_OPTION_FORMSET_GUID,
title = STRING_TOKEN(STR_LEGACY_BOOT_PROMPT),
help = STRING_TOKEN(STR_LEGACY_BOOT_HELP),
classguid = EFI_IFR_BOOT_MAINTENANCE_GUID,
varstore LEGACY_BOOT_NV_DATA,
varid = VARSTORE_ID_LEGACY_BOOT,
name = LegacyBootData,
guid = LEGACY_BOOT_OPTION_FORMSET_GUID;
form formid = LEGACY_BOOT_FORM_ID,
title = STRING_TOKEN(STR_LEGACY_BOOT_PROMPT);
goto LEGACY_ORDER_CHANGE_FORM_ID,
prompt = STRING_TOKEN(STR_FORM_FLOPPY_BOOT_TITLE),
help = STRING_TOKEN(STR_FORM_FLOPPY_BOOT_HELP),
flags = INTERACTIVE,
key = FORM_FLOPPY_BOOT_ID;
goto LEGACY_ORDER_CHANGE_FORM_ID,
prompt = STRING_TOKEN(STR_FORM_HARDDISK_BOOT_TITLE),
help = STRING_TOKEN(STR_FORM_HARDDISK_BOOT_HELP),
flags = INTERACTIVE,
key = FORM_HARDDISK_BOOT_ID;
goto LEGACY_ORDER_CHANGE_FORM_ID,
prompt = STRING_TOKEN(STR_FORM_CDROM_BOOT_TITLE),
help = STRING_TOKEN(STR_FORM_CDROM_BOOT_HELP),
flags = INTERACTIVE,
key = FORM_CDROM_BOOT_ID;
goto LEGACY_ORDER_CHANGE_FORM_ID,
prompt = STRING_TOKEN(STR_FORM_NET_BOOT_TITLE),
help = STRING_TOKEN(STR_FORM_NET_BOOT_HELP),
flags = INTERACTIVE,
key = FORM_NET_BOOT_ID;
goto LEGACY_ORDER_CHANGE_FORM_ID,
prompt = STRING_TOKEN(STR_FORM_BEV_BOOT_TITLE),
help = STRING_TOKEN(STR_FORM_BEV_BOOT_HELP),
flags = INTERACTIVE,
key = FORM_BEV_BOOT_ID;
endform;
form formid = LEGACY_ORDER_CHANGE_FORM_ID,
title = STRING_TOKEN(STR_ORDER_CHANGE_PROMPT);
label FORM_BOOT_LEGACY_DEVICE_ID;
label FORM_BOOT_LEGACY_LABEL_END;
endform;
endformset;

View File

@ -1,73 +0,0 @@
/** @file
Legacy Boot Maintenance UI definition.
Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef _EFI_LEGACY_BOOT_OPTION_VFR_H_
#define _EFI_LEGACY_BOOT_OPTION_VFR_H_
#include <Guid/HiiBootMaintenanceFormset.h>
#define MAX_MENU_NUMBER 100
#define LEGACY_BOOT_OPTION_FORMSET_GUID { 0x6bc75598, 0x89b4, 0x483d, { 0x91, 0x60, 0x7f, 0x46, 0x9a, 0x96, 0x35, 0x31 } }
#define VARSTORE_ID_LEGACY_BOOT 0x0001
#define LEGACY_BOOT_FORM_ID 0x1000
#define LEGACY_ORDER_CHANGE_FORM_ID 0x1001
#define FORM_FLOPPY_BOOT_ID 0x2000
#define FORM_HARDDISK_BOOT_ID 0x2001
#define FORM_CDROM_BOOT_ID 0x2002
#define FORM_NET_BOOT_ID 0x2003
#define FORM_BEV_BOOT_ID 0x2004
#define FORM_BOOT_LEGACY_DEVICE_ID 0x9000
#define FORM_BOOT_LEGACY_LABEL_END 0x9001
#pragma pack(1)
///
/// This is the structure that will be used to store the
/// question's current value. Use it at initialize time to
/// set default value for each question. When using at run
/// time, this map is returned by the callback function,
/// so dynamically changing the question's value will be
/// possible through this mechanism
///
typedef struct {
//
// Legacy Device Order Selection Storage
//
UINT16 LegacyFD[MAX_MENU_NUMBER];
UINT16 LegacyHD[MAX_MENU_NUMBER];
UINT16 LegacyCD[MAX_MENU_NUMBER];
UINT16 LegacyNET[MAX_MENU_NUMBER];
UINT16 LegacyBEV[MAX_MENU_NUMBER];
} LEGACY_BOOT_NV_DATA;
///
/// This is the structure that will be used to store the
/// question's current value. Use it at initialize time to
/// set default value for each question. When using at run
/// time, this map is returned by the callback function,
/// so dynamically changing the question's value will be
/// possible through this mechanism
///
typedef struct {
//
// Legacy Device Order Selection Storage
//
LEGACY_BOOT_NV_DATA InitialNvData;
LEGACY_BOOT_NV_DATA CurrentNvData;
LEGACY_BOOT_NV_DATA LastTimeNvData;
UINT8 DisableMap[32];
} LEGACY_BOOT_MAINTAIN_DATA;
#pragma pack()
#endif