diff options
author | Olivier Martin <Olivier.Martin@arm.com> | 2015-07-14 14:36:49 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@Edk2> | 2015-07-14 14:36:49 +0000 |
commit | 8b129b7b390107d258bd004eda8514976534408a (patch) | |
tree | b159f5e50303feb398fff7b7ee15f899423217ec /ArmPlatformPkg/Bds/BootOptionSupport.c | |
parent | c75d3eb6be41867cc3bfea9f567bf20cdead8966 (diff) | |
download | edk2-platforms-8b129b7b390107d258bd004eda8514976534408a.tar.xz |
ArmPlatformPkg/Bds: Remove Linux specific boot path
Since the embedded Linux Loader has been removed from BdsLib
there is no more Linux specific boot option.
All the boot options are now expected to be arguments for
EFI applications.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <Olivier.Martin@arm.com>
Reviewed-by: Ronald Cron <Ronald.Cron@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17970 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg/Bds/BootOptionSupport.c')
-rw-r--r-- | ArmPlatformPkg/Bds/BootOptionSupport.c | 111 |
1 files changed, 0 insertions, 111 deletions
diff --git a/ArmPlatformPkg/Bds/BootOptionSupport.c b/ArmPlatformPkg/Bds/BootOptionSupport.c index 974f220553..f50f13f71d 100644 --- a/ArmPlatformPkg/Bds/BootOptionSupport.c +++ b/ArmPlatformPkg/Bds/BootOptionSupport.c @@ -214,117 +214,6 @@ BootDeviceGetDeviceSupport ( }
EFI_STATUS
-BootDeviceGetType (
- IN EFI_DEVICE_PATH* DevicePath,
- OUT ARM_BDS_LOADER_TYPE *BootType,
- OUT UINT32 *Attributes
- )
-{
- EFI_STATUS Status;
- BOOLEAN IsEfiApp;
- BOOLEAN IsBootLoader;
- BOOLEAN HasFDTSupport;
- CHAR16* FileName;
- EFI_DEVICE_PATH* PrevDevicePathNode;
- EFI_DEVICE_PATH* DevicePathNode;
- EFI_PHYSICAL_ADDRESS Image;
- UINTN FileSize;
- EFI_IMAGE_DOS_HEADER* DosHeader;
- UINTN PeCoffHeaderOffset;
- EFI_IMAGE_NT_HEADERS32* NtHeader;
-
- //
- // Check if the last node of the device path is a FilePath node
- //
- PrevDevicePathNode = NULL;
- DevicePathNode = DevicePath;
- while ((DevicePathNode != NULL) && !IsDevicePathEnd (DevicePathNode)) {
- PrevDevicePathNode = DevicePathNode;
- DevicePathNode = NextDevicePathNode (DevicePathNode);
- }
-
- if ((PrevDevicePathNode != NULL) &&
- (PrevDevicePathNode->Type == MEDIA_DEVICE_PATH) &&
- (PrevDevicePathNode->SubType == MEDIA_FILEPATH_DP))
- {
- FileName = ((FILEPATH_DEVICE_PATH*)PrevDevicePathNode)->PathName;
- } else {
- FileName = NULL;
- }
-
- if (FileName == NULL) {
- Print(L"Is an EFI Application? ");
- Status = GetHIInputBoolean (&IsEfiApp);
- if (EFI_ERROR(Status)) {
- return EFI_ABORTED;
- }
- } else if (HasFilePathEfiExtension(FileName)) {
- IsEfiApp = TRUE;
- } else {
- // Check if the file exist
- Status = BdsLoadImage (DevicePath, AllocateAnyPages, &Image, &FileSize);
- if (!EFI_ERROR (Status)) {
-
- DosHeader = (EFI_IMAGE_DOS_HEADER *)(UINTN) Image;
- if (DosHeader->e_magic == EFI_IMAGE_DOS_SIGNATURE) {
- //
- // DOS image header is present,
- // so read the PE header after the DOS image header.
- //
- PeCoffHeaderOffset = DosHeader->e_lfanew;
- } else {
- PeCoffHeaderOffset = 0;
- }
-
- //
- // Check PE/COFF image.
- //
- NtHeader = (EFI_IMAGE_NT_HEADERS32 *)(UINTN) (Image + PeCoffHeaderOffset);
- if (NtHeader->Signature != EFI_IMAGE_NT_SIGNATURE) {
- IsEfiApp = FALSE;
- } else {
- IsEfiApp = TRUE;
- }
-
- // Free memory
- gBS->FreePages (Image, EFI_SIZE_TO_PAGES(FileSize));
- } else {
- // If we did not manage to open it then ask for the type
- Print(L"Is an EFI Application? ");
- Status = GetHIInputBoolean (&IsEfiApp);
- if (EFI_ERROR(Status)) {
- return EFI_ABORTED;
- }
- }
- }
-
- if (IsEfiApp) {
- Print(L"Is your application an OS loader? ");
- Status = GetHIInputBoolean (&IsBootLoader);
- if (EFI_ERROR(Status)) {
- return EFI_ABORTED;
- }
- if (!IsBootLoader) {
- *Attributes |= LOAD_OPTION_CATEGORY_APP;
- }
- *BootType = BDS_LOADER_EFI_APPLICATION;
- } else {
- Print(L"Has FDT support? ");
- Status = GetHIInputBoolean (&HasFDTSupport);
- if (EFI_ERROR(Status)) {
- return EFI_ABORTED;
- }
- if (HasFDTSupport) {
- *BootType = BDS_LOADER_KERNEL_LINUX_FDT;
- } else {
- *BootType = BDS_LOADER_KERNEL_LINUX_ATAG;
- }
- }
-
- return EFI_SUCCESS;
-}
-
-EFI_STATUS
BdsLoadOptionFileSystemList (
IN OUT LIST_ENTRY* BdsLoadOptionList
)
|