mirror of https://github.com/acidanthera/audk.git
Move library class GenericBdsLib and PlatformBdsLib to IntelFrameworkModulePkg
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7655 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
2743172515
commit
87fbccbe40
|
@ -36,6 +36,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
#include <Protocol/ComponentName2.h>
|
#include <Protocol/ComponentName2.h>
|
||||||
#include <Protocol/ComponentName.h>
|
#include <Protocol/ComponentName.h>
|
||||||
#include <Protocol/DriverBinding.h>
|
#include <Protocol/DriverBinding.h>
|
||||||
|
#include <Protocol/DevicePathToText.h>
|
||||||
#include <Guid/GlobalVariable.h>
|
#include <Guid/GlobalVariable.h>
|
||||||
|
|
||||||
#include <Library/BaseLib.h>
|
#include <Library/BaseLib.h>
|
||||||
|
@ -52,7 +53,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
#include <Library/MemoryAllocationLib.h>
|
#include <Library/MemoryAllocationLib.h>
|
||||||
#include <Library/UefiRuntimeServicesTableLib.h>
|
#include <Library/UefiRuntimeServicesTableLib.h>
|
||||||
#include <Library/DevicePathLib.h>
|
#include <Library/DevicePathLib.h>
|
||||||
#include <Library/GenericBdsLib.h>
|
|
||||||
#include "PlatOverMngr.h"
|
#include "PlatOverMngr.h"
|
||||||
|
|
||||||
#define EFI_CALLBACK_INFO_SIGNATURE SIGNATURE_32 ('C', 'l', 'b', 'k')
|
#define EFI_CALLBACK_INFO_SIGNATURE SIGNATURE_32 ('C', 'l', 'b', 'k')
|
||||||
|
@ -94,6 +94,22 @@ UINTN mLastSavedDriverImageNum;
|
||||||
CHAR8 mLanguage[RFC_3066_ENTRY_SIZE];
|
CHAR8 mLanguage[RFC_3066_ENTRY_SIZE];
|
||||||
UINT16 mCurrentPage;
|
UINT16 mCurrentPage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Converting a given device to an unicode string.
|
||||||
|
|
||||||
|
This function will dependent on gEfiDevicePathToTextProtocolGuid, if protocol
|
||||||
|
does not installed, then return unknown device path L"?" directly.
|
||||||
|
|
||||||
|
@param DevPath Given device path instance
|
||||||
|
|
||||||
|
@return Converted string from given device path.
|
||||||
|
@retval L"?" Can not locate gEfiDevicePathToTextProtocolGuid protocol for converting.
|
||||||
|
**/
|
||||||
|
CHAR16 *
|
||||||
|
DevicePathToStr (
|
||||||
|
IN EFI_DEVICE_PATH_PROTOCOL *DevPath
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Do string convertion for the ComponentName supported language. It do
|
Do string convertion for the ComponentName supported language. It do
|
||||||
the convertion just for english language code from RFC 3066 to ISO 639-2.
|
the convertion just for english language code from RFC 3066 to ISO 639-2.
|
||||||
|
@ -1439,3 +1455,46 @@ Finish:
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Converting a given device to an unicode string.
|
||||||
|
|
||||||
|
This function will dependent on gEfiDevicePathToTextProtocolGuid, if protocol
|
||||||
|
does not installed, then return unknown device path L"?" directly.
|
||||||
|
|
||||||
|
@param DevPath Given device path instance
|
||||||
|
|
||||||
|
@return Converted string from given device path.
|
||||||
|
@retval L"?" Can not locate gEfiDevicePathToTextProtocolGuid protocol for converting.
|
||||||
|
**/
|
||||||
|
CHAR16 *
|
||||||
|
DevicePathToStr (
|
||||||
|
IN EFI_DEVICE_PATH_PROTOCOL *DevPath
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
EFI_DEVICE_PATH_TO_TEXT_PROTOCOL *DevPathToText;
|
||||||
|
CHAR16 *ToText;
|
||||||
|
|
||||||
|
if (DevPath == NULL) {
|
||||||
|
return L"";
|
||||||
|
}
|
||||||
|
|
||||||
|
Status = gBS->LocateProtocol (
|
||||||
|
&gEfiDevicePathToTextProtocolGuid,
|
||||||
|
NULL,
|
||||||
|
(VOID **) &DevPathToText
|
||||||
|
);
|
||||||
|
if (!EFI_ERROR (Status)) {
|
||||||
|
ToText = DevPathToText->ConvertDevicePathToText (
|
||||||
|
DevPath,
|
||||||
|
FALSE,
|
||||||
|
TRUE
|
||||||
|
);
|
||||||
|
ASSERT (ToText != NULL);
|
||||||
|
return ToText;
|
||||||
|
}
|
||||||
|
|
||||||
|
return L"?";
|
||||||
|
}
|
||||||
|
|
|
@ -64,7 +64,6 @@
|
||||||
MemoryAllocationLib
|
MemoryAllocationLib
|
||||||
UefiRuntimeServicesTableLib
|
UefiRuntimeServicesTableLib
|
||||||
DevicePathLib
|
DevicePathLib
|
||||||
GenericBdsLib
|
|
||||||
|
|
||||||
[Guids]
|
[Guids]
|
||||||
gEfiGlobalVariableGuid ## CONSUMED ## Variable:L"PlatformLang" this variable specifies the platform supported language string (RFC 3066 format)
|
gEfiGlobalVariableGuid ## CONSUMED ## Variable:L"PlatformLang" this variable specifies the platform supported language string (RFC 3066 format)
|
||||||
|
@ -85,4 +84,4 @@
|
||||||
gEfiFormBrowser2ProtocolGuid ## CONSUMED
|
gEfiFormBrowser2ProtocolGuid ## CONSUMED
|
||||||
gEfiHiiConfigRoutingProtocolGuid ## CONSUMED
|
gEfiHiiConfigRoutingProtocolGuid ## CONSUMED
|
||||||
gEfiHiiConfigAccessProtocolGuid ## PRODUCED
|
gEfiHiiConfigAccessProtocolGuid ## PRODUCED
|
||||||
|
gEfiDevicePathToTextProtocolGuid ## CONSUMED
|
File diff suppressed because it is too large
Load Diff
|
@ -1,126 +0,0 @@
|
||||||
/** @file
|
|
||||||
Platform BDS library definition. Platform package can provide hook library
|
|
||||||
instances to implement platform specific behavior.
|
|
||||||
|
|
||||||
Copyright (c) 2008, Intel Corporation. <BR>
|
|
||||||
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 __PLATFORM_BDS_LIB_H_
|
|
||||||
#define __PLATFORM_BDS_LIB_H_
|
|
||||||
|
|
||||||
#include <Protocol/Bds.h>
|
|
||||||
#include <Protocol/GenericMemoryTest.h>
|
|
||||||
|
|
||||||
//
|
|
||||||
// Bds AP Context data
|
|
||||||
//
|
|
||||||
#define EFI_BDS_ARCH_PROTOCOL_INSTANCE_SIGNATURE SIGNATURE_32 ('B', 'd', 's', 'A')
|
|
||||||
typedef struct _EFI_BDS_ARCH_PROTOCOL_INSTANCE EFI_BDS_ARCH_PROTOCOL_INSTANCE;
|
|
||||||
|
|
||||||
struct _EFI_BDS_ARCH_PROTOCOL_INSTANCE {
|
|
||||||
UINTN Signature;
|
|
||||||
EFI_HANDLE Handle;
|
|
||||||
EFI_BDS_ARCH_PROTOCOL Bds;
|
|
||||||
///
|
|
||||||
/// Save the current boot mode
|
|
||||||
///
|
|
||||||
EFI_BOOT_MODE BootMode;
|
|
||||||
///
|
|
||||||
/// Set true if boot with default settings
|
|
||||||
///
|
|
||||||
BOOLEAN DefaultBoot;
|
|
||||||
///
|
|
||||||
/// The system default timeout for choose the boot option
|
|
||||||
///
|
|
||||||
UINT16 TimeoutDefault;
|
|
||||||
///
|
|
||||||
/// Memory Test Level
|
|
||||||
///
|
|
||||||
EXTENDMEM_COVERAGE_LEVEL MemoryTestLevel;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
Platform Bds init. Include the platform firmware vendor, revision
|
|
||||||
and so crc check.
|
|
||||||
|
|
||||||
@param PrivateData The EFI_BDS_ARCH_PROTOCOL_INSTANCE instance
|
|
||||||
|
|
||||||
**/
|
|
||||||
VOID
|
|
||||||
EFIAPI
|
|
||||||
PlatformBdsInit (
|
|
||||||
IN EFI_BDS_ARCH_PROTOCOL_INSTANCE *PrivateData
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
The function will excute with as the platform policy, current policy
|
|
||||||
is driven by boot mode. IBV/OEM can customize this code for their specific
|
|
||||||
policy action.
|
|
||||||
|
|
||||||
@param PrivateData The EFI_BDS_ARCH_PROTOCOL_INSTANCE instance
|
|
||||||
@param DriverOptionList The header of the driver option link list
|
|
||||||
@param BootOptionList The header of the boot option link list
|
|
||||||
|
|
||||||
**/
|
|
||||||
VOID
|
|
||||||
EFIAPI
|
|
||||||
PlatformBdsPolicyBehavior (
|
|
||||||
IN EFI_BDS_ARCH_PROTOCOL_INSTANCE *PrivateData,
|
|
||||||
IN LIST_ENTRY *DriverOptionList,
|
|
||||||
IN LIST_ENTRY *BootOptionList
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
Hook point after a boot attempt fails.
|
|
||||||
|
|
||||||
@param Option Pointer to Boot Option that failed to boot.
|
|
||||||
@param Status Status returned from failed boot.
|
|
||||||
@param ExitData Exit data returned from failed boot.
|
|
||||||
@param ExitDataSize Exit data size returned from failed boot.
|
|
||||||
|
|
||||||
**/
|
|
||||||
VOID
|
|
||||||
EFIAPI
|
|
||||||
PlatformBdsBootFail (
|
|
||||||
IN BDS_COMMON_OPTION *Option,
|
|
||||||
IN EFI_STATUS Status,
|
|
||||||
IN CHAR16 *ExitData,
|
|
||||||
IN UINTN ExitDataSize
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
Hook point after a boot attempt succeeds. We don't expect a boot option to
|
|
||||||
return, so the UEFI 2.0 specification defines that you will default to an
|
|
||||||
interactive mode and stop processing the BootOrder list in this case. This
|
|
||||||
is alos a platform implementation and can be customized by IBV/OEM.
|
|
||||||
|
|
||||||
@param Option Pointer to Boot Option that succeeded to boot.
|
|
||||||
|
|
||||||
**/
|
|
||||||
VOID
|
|
||||||
EFIAPI
|
|
||||||
PlatformBdsBootSuccess (
|
|
||||||
IN BDS_COMMON_OPTION *Option
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
This function locks platform flash that is not allowed to be updated during normal boot path.
|
|
||||||
The flash layout is platform specific.
|
|
||||||
|
|
||||||
@retval EFI_SUCCESS The non-updatable flash areas.
|
|
||||||
**/
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
PlatformBdsLockNonUpdatableFlash (
|
|
||||||
VOID
|
|
||||||
);
|
|
||||||
#endif
|
|
|
@ -35,7 +35,7 @@
|
||||||
|
|
||||||
[Packages]
|
[Packages]
|
||||||
MdePkg/MdePkg.dec
|
MdePkg/MdePkg.dec
|
||||||
MdeModulePkg/MdeModulePkg.dec
|
IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
|
||||||
|
|
||||||
[LibraryClasses]
|
[LibraryClasses]
|
||||||
BaseLib
|
BaseLib
|
||||||
|
|
|
@ -69,12 +69,6 @@
|
||||||
## @libraryclass Defines a set of interfaces on how to process capusle image update.
|
## @libraryclass Defines a set of interfaces on how to process capusle image update.
|
||||||
CapsuleLib|Include/Library/CapsuleLib.h
|
CapsuleLib|Include/Library/CapsuleLib.h
|
||||||
|
|
||||||
## @libraryclass Platform BDS library definition about platform specific behavior.
|
|
||||||
PlatformBdsLib|Include/Library/PlatformBdsLib.h
|
|
||||||
|
|
||||||
## @libraryclass Generic BDS library definition, include the data structure and function.
|
|
||||||
GenericBdsLib|Include/Library/GenericBdsLib.h
|
|
||||||
|
|
||||||
## @libraryclass Library for Deferred Procedure Calls.
|
## @libraryclass Library for Deferred Procedure Calls.
|
||||||
DpcLib|Include/Library/DpcLib.h
|
DpcLib|Include/Library/DpcLib.h
|
||||||
|
|
||||||
|
|
|
@ -73,13 +73,10 @@
|
||||||
ExtendedIfrSupportLib|MdeModulePkg/Library/ExtendedIfrSupportLib/ExtendedIfrSupportLib.inf
|
ExtendedIfrSupportLib|MdeModulePkg/Library/ExtendedIfrSupportLib/ExtendedIfrSupportLib.inf
|
||||||
CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
|
CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
|
||||||
DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
|
DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
|
||||||
PlatformBdsLib|MdeModulePkg/Library/PlatformBdsLibNull/PlatformBdsLibNull.inf
|
|
||||||
DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
|
DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
|
||||||
PlatformBdsLib|MdeModulePkg/Library/PlatformBdsLibNull/PlatformBdsLibNull.inf
|
|
||||||
PlatformDriverOverrideLib|MdeModulePkg/Library/DxePlatDriOverLib/DxePlatDriOverLib.inf
|
PlatformDriverOverrideLib|MdeModulePkg/Library/DxePlatDriOverLib/DxePlatDriOverLib.inf
|
||||||
OemHookStatusCodeLib|IntelFrameworkModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
|
OemHookStatusCodeLib|IntelFrameworkModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
|
||||||
HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
|
HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
|
||||||
GenericBdsLib|IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf
|
|
||||||
|
|
||||||
[LibraryClasses.IA32]
|
[LibraryClasses.IA32]
|
||||||
IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
|
IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
|
||||||
|
@ -296,7 +293,6 @@
|
||||||
MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
|
MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
|
||||||
MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.inf
|
MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.inf
|
||||||
MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.inf
|
MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.inf
|
||||||
MdeModulePkg/Library/PlatformBdsLibNull/PlatformBdsLibNull.inf
|
|
||||||
MdeModulePkg/Library/EdkFvbServiceLib/EdkFvbServiceLib.inf
|
MdeModulePkg/Library/EdkFvbServiceLib/EdkFvbServiceLib.inf
|
||||||
MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
|
MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
|
||||||
MdeModulePkg/Library/UefiIfrSupportLib/UefiIfrSupportLib.inf
|
MdeModulePkg/Library/UefiIfrSupportLib/UefiIfrSupportLib.inf
|
||||||
|
|
Loading…
Reference in New Issue