From c75d3eb6be41867cc3bfea9f567bf20cdead8966 Mon Sep 17 00:00:00 2001 From: Olivier Martin Date: Tue, 14 Jul 2015 14:35:20 +0000 Subject: ArmPkg/BdsLib: Remove Linux loader from BdsLib This change removes the embedded Linux Loder from BdsLib. BdsLib becomes OS agnostic. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin Reviewed-by: Ronald Cron git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17969 6f19259b-4bc3-4df7-8a09-765794883524 --- ArmPlatformPkg/Bds/Bds.inf | 4 ++++ ArmPlatformPkg/Bds/BootOption.c | 35 +++-------------------------------- 2 files changed, 7 insertions(+), 32 deletions(-) (limited to 'ArmPlatformPkg/Bds') diff --git a/ArmPlatformPkg/Bds/Bds.inf b/ArmPlatformPkg/Bds/Bds.inf index 76a45e03e5..9639f1424e 100644 --- a/ArmPlatformPkg/Bds/Bds.inf +++ b/ArmPlatformPkg/Bds/Bds.inf @@ -39,6 +39,9 @@ EmbeddedPkg/EmbeddedPkg.dec IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec +[Guids] + gFdtTableGuid + [LibraryClasses] BdsLib TimerLib @@ -49,6 +52,7 @@ DebugLib PrintLib BaseLib + FdtLib NetLib [Guids] diff --git a/ArmPlatformPkg/Bds/BootOption.c b/ArmPlatformPkg/Bds/BootOption.c index bb218f82aa..342d441f05 100644 --- a/ArmPlatformPkg/Bds/BootOption.c +++ b/ArmPlatformPkg/Bds/BootOption.c @@ -1,6 +1,6 @@ /** @file * -* Copyright (c) 2011-2014, ARM Limited. All rights reserved. +* Copyright (c) 2011-2015, ARM Limited. All rights reserved. * * This program and the accompanying materials * are licensed and made available under the terms and conditions of the BSD License @@ -23,10 +23,6 @@ BootOptionStart ( EFI_STATUS Status; UINT32 LoaderType; ARM_BDS_LOADER_OPTIONAL_DATA* OptionalData; - ARM_BDS_LINUX_ARGUMENTS* LinuxArguments; - UINTN CmdLineSize; - UINTN InitrdSize; - EFI_DEVICE_PATH* Initrd; UINT16 LoadOptionIndexSize; if (IS_ARM_BDS_BOOTENTRY (BootOption)) { @@ -42,34 +38,9 @@ BootOptionStart ( Status = BdsStartEfiApplication (gImageHandle, BootOption->FilePathList, 0, NULL); } else if (LoaderType == BDS_LOADER_KERNEL_LINUX_ATAG) { - LinuxArguments = &(OptionalData->Arguments.LinuxArguments); - CmdLineSize = ReadUnaligned16 ((CONST UINT16*)&LinuxArguments->CmdLineSize); - InitrdSize = ReadUnaligned16 ((CONST UINT16*)&LinuxArguments->InitrdSize); - - if (InitrdSize > 0) { - Initrd = GetAlignedDevicePath ((EFI_DEVICE_PATH*)((UINTN)(LinuxArguments + 1) + CmdLineSize)); - } else { - Initrd = NULL; - } - - Status = BdsBootLinuxAtag (BootOption->FilePathList, - Initrd, // Initrd - (CHAR8*)(LinuxArguments + 1)); // CmdLine + ASSERT_EFI_ERROR (EFI_UNSUPPORTED); } else if (LoaderType == BDS_LOADER_KERNEL_LINUX_FDT) { - LinuxArguments = &(OptionalData->Arguments.LinuxArguments); - CmdLineSize = ReadUnaligned16 ((CONST UINT16*)&LinuxArguments->CmdLineSize); - InitrdSize = ReadUnaligned16 ((CONST UINT16*)&LinuxArguments->InitrdSize); - - if (InitrdSize > 0) { - Initrd = GetAlignedDevicePath ((EFI_DEVICE_PATH*)((UINTN)(LinuxArguments + 1) + CmdLineSize)); - } else { - Initrd = NULL; - } - Status = BdsBootLinuxFdt ( - BootOption->FilePathList, - Initrd, - (CHAR8*)(LinuxArguments + 1) - ); + ASSERT_EFI_ERROR (EFI_UNSUPPORTED); } } else { // Connect all the drivers if the EFI Application is not a EFI OS Loader -- cgit v1.2.3