Change library class PlatDriOverLib to PlatformDriOverrideLib
Move Application Platform Override Manager into Application directory. Add comments in Network library class to say they are only intended to be used by UEFI network stack modules. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7641 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
1441
MdeModulePkg/Application/PlatOverMngr/PlatOverMngr.c
Normal file
1441
MdeModulePkg/Application/PlatOverMngr/PlatOverMngr.c
Normal file
File diff suppressed because it is too large
Load Diff
71
MdeModulePkg/Application/PlatOverMngr/PlatOverMngr.h
Normal file
71
MdeModulePkg/Application/PlatOverMngr/PlatOverMngr.h
Normal file
@@ -0,0 +1,71 @@
|
||||
/** @file
|
||||
|
||||
The defintions are required both by Source code and Vfr file.
|
||||
The PLAT_OVER_MNGR_DATA structure, form guid and Ifr question ID are defined.
|
||||
|
||||
Copyright (c) 2007 - 2008, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
#ifndef _PLAT_OVER_MNGR_H_
|
||||
#define _PLAT_OVER_MNGR_H_
|
||||
|
||||
#define PLAT_OVER_MNGR_GUID \
|
||||
{ \
|
||||
0x8614567d, 0x35be, 0x4415, {0x8d, 0x88, 0xbd, 0x7d, 0xc, 0x9c, 0x70, 0xc0} \
|
||||
}
|
||||
|
||||
//
|
||||
// The max number of the supported driver list.
|
||||
//
|
||||
#define MAX_CHOICE_NUM 0x00ff
|
||||
#define UPDATE_DATA_SIZE 0x1000
|
||||
|
||||
#define FORM_ID_DEVICE 0x1100
|
||||
#define FORM_ID_DRIVER 0x1200
|
||||
#define FORM_ID_ORDER 0x1500
|
||||
|
||||
#define KEY_VALUE_DEVICE_OFFSET 0x0100
|
||||
#define KEY_VALUE_DEVICE_MAX (KEY_VALUE_DEVICE_OFFSET + MAX_CHOICE_NUM)
|
||||
|
||||
#define KEY_VALUE_DEVICE_REFRESH 0x1234
|
||||
#define KEY_VALUE_DEVICE_FILTER 0x1235
|
||||
#define KEY_VALUE_DEVICE_CLEAR 0x1236
|
||||
|
||||
#define KEY_VALUE_DRIVER_GOTO_PREVIOUS 0x1300
|
||||
#define KEY_VALUE_DRIVER_GOTO_ORDER 0x1301
|
||||
|
||||
#define KEY_VALUE_ORDER_GOTO_PREVIOUS 0x2000
|
||||
#define KEY_VALUE_ORDER_SAVE_AND_EXIT 0x1800
|
||||
|
||||
#define VARSTORE_ID_PLAT_OVER_MNGR 0x1000
|
||||
|
||||
typedef struct {
|
||||
UINT8 DriSelection[MAX_CHOICE_NUM];
|
||||
UINT8 DriOrder[MAX_CHOICE_NUM];
|
||||
UINT8 PciDeviceFilter;
|
||||
} PLAT_OVER_MNGR_DATA;
|
||||
|
||||
//
|
||||
// Field offset of structure PLAT_OVER_MNGR_DATA
|
||||
//
|
||||
#define VAR_OFFSET(Field) ((UINTN) &(((PLAT_OVER_MNGR_DATA *) 0)->Field))
|
||||
#define DRIVER_SELECTION_VAR_OFFSET (VAR_OFFSET (DriSelection))
|
||||
#define DRIVER_ORDER_VAR_OFFSET (VAR_OFFSET (DriOrder))
|
||||
|
||||
//
|
||||
// Tool automatic generated Question Id start from 1
|
||||
// In order to avoid to conflict them, the Driver Selection and Order QuestionID offset is defined from 0x0500.
|
||||
//
|
||||
#define QUESTION_ID_OFFSET 0x0500
|
||||
#define DRIVER_SELECTION_QUESTION_ID (VAR_OFFSET (DriSelection) + QUESTION_ID_OFFSET)
|
||||
#define DRIVER_ORDER_QUESTION_ID (VAR_OFFSET (DriOrder) + QUESTION_ID_OFFSET)
|
||||
|
||||
#endif
|
88
MdeModulePkg/Application/PlatOverMngr/PlatOverMngr.inf
Normal file
88
MdeModulePkg/Application/PlatOverMngr/PlatOverMngr.inf
Normal file
@@ -0,0 +1,88 @@
|
||||
#/** @file
|
||||
#
|
||||
# A UI application to offer a UI interface in device manager to let user configue
|
||||
# platform override protocol to override the default algorithm for matching
|
||||
# drivers to controllers.
|
||||
#
|
||||
# The main flow:
|
||||
# 1. The UI application dynamicly locate all controller device path.
|
||||
# 2. The UI application dynamicly locate all drivers which support binding protocol.
|
||||
# 3. The UI application export and dynamicly update two menu to let user select the
|
||||
# mapping between drivers to controllers.
|
||||
# 4. The UI application save all the mapping info in NV variables for the following boot,
|
||||
# which will be consumed by platform override protocol driver to publish the platform override protocol.
|
||||
#
|
||||
# Copyright (c) 2007 - 2009, Intel Corporation. All rights reserved.
|
||||
#
|
||||
# All rights reserved. This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
#
|
||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
#
|
||||
#**/
|
||||
|
||||
[Defines]
|
||||
INF_VERSION = 0x00010005
|
||||
BASE_NAME = PlatOverMngr
|
||||
FILE_GUID = 56D95BFE-F991-4898-B3BE-B8F37C927F48
|
||||
MODULE_TYPE = UEFI_APPLICATION
|
||||
VERSION_STRING = 1.0
|
||||
ENTRY_POINT = PlatOverMngrInit
|
||||
|
||||
#
|
||||
# The following information is for reference only and not required by the build tools.
|
||||
#
|
||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
||||
#
|
||||
|
||||
[Sources.common]
|
||||
VfrStrings.uni
|
||||
Vfr.vfr
|
||||
PlatOverMngr.c
|
||||
PlatOverMngr.h
|
||||
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
MdeModulePkg/MdeModulePkg.dec
|
||||
|
||||
[LibraryClasses]
|
||||
BaseLib
|
||||
DebugLib
|
||||
UefiLib
|
||||
UefiApplicationEntryPoint
|
||||
UefiBootServicesTableLib
|
||||
PlatformDriverOverrideLib
|
||||
HiiLib
|
||||
IfrSupportLib
|
||||
ExtendedHiiLib
|
||||
ExtendedIfrSupportLib
|
||||
BaseMemoryLib
|
||||
MemoryAllocationLib
|
||||
UefiRuntimeServicesTableLib
|
||||
DevicePathLib
|
||||
GenericBdsLib
|
||||
|
||||
[Guids]
|
||||
gEfiGlobalVariableGuid ## CONSUMED ## Variable:L"PlatformLang" this variable specifies the platform supported language string (RFC 3066 format)
|
||||
|
||||
[Protocols]
|
||||
gEfiComponentName2ProtocolGuid ## SOMETIMES_CONSUMED (Get Driver Name if ComponentName2Protocol exists)
|
||||
gEfiComponentNameProtocolGuid ## SOMETIMES_CONSUMED (Get Driver Name if ComponentNameProtocol exists and ComponentName2Protocol doesn't exist)
|
||||
gEfiFirmwareVolume2ProtocolGuid ## SOMETIMES_CONSUMED (Get Driver Name from EFI UI section if ComponentName2Protocol and ComponentNameProtocol don't exist)
|
||||
gEfiPciIoProtocolGuid ## SOMETIMES_CONSUMED (Find the PCI device if PciIo protocol is installed)
|
||||
gEfiBusSpecificDriverOverrideProtocolGuid ## SOMETIMES_CONSUMED (Check whether the PCI device contains one or more efi drivers in its option rom by this protocol)
|
||||
|
||||
gEfiDriverBindingProtocolGuid ## SOMETIMES_CONSUMED
|
||||
gEfiLoadedImageProtocolGuid ## SOMETIMES_CONSUMED
|
||||
gEfiLoadedImageDevicePathProtocolGuid ## SOMETIMES_CONSUMED (Show the drivers in the second page that support DriverBindingProtocol, LoadedImageProtocol and LoadedImageDevicePathProtocol)
|
||||
gEfiDevicePathProtocolGuid ## SOMETIMES_CONSUMED (Show the controller device in the first page that support DevicePathProtocol)
|
||||
|
||||
gEfiHiiDatabaseProtocolGuid ## CONSUMED
|
||||
gEfiFormBrowser2ProtocolGuid ## CONSUMED
|
||||
gEfiHiiConfigRoutingProtocolGuid ## CONSUMED
|
||||
gEfiHiiConfigAccessProtocolGuid ## PRODUCED
|
||||
|
110
MdeModulePkg/Application/PlatOverMngr/Vfr.vfr
Normal file
110
MdeModulePkg/Application/PlatOverMngr/Vfr.vfr
Normal file
@@ -0,0 +1,110 @@
|
||||
// *++
|
||||
//
|
||||
// Copyright (c) 2007 - 2008, Intel Corporation
|
||||
// All rights reserved. This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
// Module Name:
|
||||
//
|
||||
// Vfr.vfr
|
||||
//
|
||||
// Abstract:
|
||||
//
|
||||
// Platform driver Override manager formset
|
||||
//
|
||||
//
|
||||
// --*/
|
||||
|
||||
#include "PlatOverMngr.h"
|
||||
|
||||
#define EFI_DISK_DEVICE_CLASS 0x01
|
||||
#define LABEL_END 0xffff
|
||||
|
||||
formset
|
||||
guid = PLAT_OVER_MNGR_GUID,
|
||||
title = STRING_TOKEN(STR_ENTRY_TITLE),
|
||||
help = STRING_TOKEN(STR_TITLE_HELP),
|
||||
class = EFI_DISK_DEVICE_CLASS,
|
||||
subclass = 0xff,
|
||||
|
||||
varstore PLAT_OVER_MNGR_DATA,
|
||||
varid = VARSTORE_ID_PLAT_OVER_MNGR,
|
||||
name = Data,
|
||||
guid = PLAT_OVER_MNGR_GUID;
|
||||
|
||||
form formid = FORM_ID_DEVICE,
|
||||
title = STRING_TOKEN(STR_TITLE);
|
||||
|
||||
text
|
||||
help = STRING_TOKEN(STR_FIRST_REFRESH_HELP),
|
||||
text = STRING_TOKEN(STR_FIRST_REFRESH),
|
||||
text = STRING_TOKEN(STR_NULL_STRING),
|
||||
flags = INTERACTIVE,
|
||||
key = KEY_VALUE_DEVICE_REFRESH;
|
||||
|
||||
checkbox varid = Data.PciDeviceFilter,
|
||||
prompt = STRING_TOKEN(STR_PCI_DEVICE_FILTER_PROMPT),
|
||||
help = STRING_TOKEN(STR_PCI_DEVICE_FILTER_HELP),
|
||||
flags = INTERACTIVE,
|
||||
key = KEY_VALUE_DEVICE_FILTER,
|
||||
endcheckbox;
|
||||
|
||||
label FORM_ID_DEVICE;
|
||||
label LABEL_END;
|
||||
|
||||
subtitle text = STRING_TOKEN(STR_NULL_STRING);
|
||||
|
||||
goto FORM_ID_DEVICE,
|
||||
prompt = STRING_TOKEN(STR_CLEAR_ALL),
|
||||
help = STRING_TOKEN(STR_CLEAR_ALL_HELP),
|
||||
flags = INTERACTIVE | RESET_REQUIRED,
|
||||
key = KEY_VALUE_DEVICE_CLEAR;
|
||||
endform;
|
||||
|
||||
form formid = FORM_ID_DRIVER,
|
||||
title = STRING_TOKEN(STR_TITLE);
|
||||
|
||||
goto FORM_ID_DEVICE,
|
||||
prompt = STRING_TOKEN(STR_GOTO_PREVIOUS),
|
||||
help = STRING_TOKEN(STR_NULL_STRING),
|
||||
flags = INTERACTIVE,
|
||||
key = KEY_VALUE_DRIVER_GOTO_PREVIOUS;
|
||||
|
||||
goto FORM_ID_ORDER,
|
||||
prompt = STRING_TOKEN(STR_TITLE_ORDER),
|
||||
help = STRING_TOKEN(STR_TITLE_ORDER_HELP),
|
||||
flags = INTERACTIVE,
|
||||
key = KEY_VALUE_DRIVER_GOTO_ORDER;
|
||||
|
||||
label FORM_ID_DRIVER;
|
||||
label LABEL_END;
|
||||
|
||||
endform;
|
||||
|
||||
form formid = FORM_ID_ORDER,
|
||||
title = STRING_TOKEN(STR_TITLE);
|
||||
|
||||
goto FORM_ID_DRIVER,
|
||||
prompt = STRING_TOKEN(STR_GOTO_PREVIOUS),
|
||||
help = STRING_TOKEN(STR_NULL_STRING),
|
||||
flags = INTERACTIVE,
|
||||
key = KEY_VALUE_ORDER_GOTO_PREVIOUS;
|
||||
|
||||
label FORM_ID_ORDER;
|
||||
label LABEL_END;
|
||||
|
||||
subtitle text = STRING_TOKEN(STR_NULL_STRING);
|
||||
|
||||
goto FORM_ID_ORDER,
|
||||
prompt = STRING_TOKEN(STR_SAVE_AND_EXIT),
|
||||
help = STRING_TOKEN(STR_NULL_STRING),
|
||||
flags = INTERACTIVE | RESET_REQUIRED,
|
||||
key = KEY_VALUE_ORDER_SAVE_AND_EXIT;
|
||||
endform;
|
||||
|
||||
endformset;
|
BIN
MdeModulePkg/Application/PlatOverMngr/VfrStrings.uni
Normal file
BIN
MdeModulePkg/Application/PlatOverMngr/VfrStrings.uni
Normal file
Binary file not shown.
Reference in New Issue
Block a user