In this patch we remove all dependencies on ARM BDS libraries. We also remove empty and/or unneeded functions, includes, etc. PlatformIntelBdsLib "goes back to basics" temporarily -- there are no consoles configured, and it's practically not possible to interact with the user interface. Bisection remains available in the sense that "ArmVirtualizationQemu.dsc" continues to build and should boot preexistent boot options, but user interaction does regress temporarily. The reason for this is that it's preferable to keep this patch and the next one separate for readability's sake -- they amount to a rewrite from scratch. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16923 6f19259b-4bc3-4df7-8a09-765794883524
128 lines
3.5 KiB
C
128 lines
3.5 KiB
C
/** @file
|
|
Implementation for PlatformBdsLib library class interfaces.
|
|
|
|
Copyright (c) 2014, ARM Ltd. All rights reserved.<BR>
|
|
Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>
|
|
|
|
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.
|
|
|
|
**/
|
|
|
|
#include <Library/PlatformBdsLib.h>
|
|
#include <Library/QemuBootOrderLib.h>
|
|
|
|
#include "IntelBdsPlatform.h"
|
|
|
|
//
|
|
// BDS Platform Functions
|
|
//
|
|
/**
|
|
Platform Bds init. Include the platform firmware vendor, revision
|
|
and so crc check.
|
|
|
|
**/
|
|
VOID
|
|
EFIAPI
|
|
PlatformBdsInit (
|
|
VOID
|
|
)
|
|
{
|
|
}
|
|
|
|
/**
|
|
The function will execute with as the platform policy, current policy
|
|
is driven by boot mode. IBV/OEM can customize this code for their specific
|
|
policy action.
|
|
|
|
@param DriverOptionList The header of the driver option link list
|
|
@param BootOptionList The header of the boot option link list
|
|
@param ProcessCapsules A pointer to ProcessCapsules()
|
|
@param BaseMemoryTest A pointer to BaseMemoryTest()
|
|
|
|
**/
|
|
VOID
|
|
EFIAPI
|
|
PlatformBdsPolicyBehavior (
|
|
IN LIST_ENTRY *DriverOptionList,
|
|
IN LIST_ENTRY *BootOptionList,
|
|
IN PROCESS_CAPSULES ProcessCapsules,
|
|
IN BASEM_MEMORY_TEST BaseMemoryTest
|
|
)
|
|
{
|
|
BdsLibConnectAll ();
|
|
|
|
//
|
|
// Process QEMU's -kernel command line option. Note that the kernel booted
|
|
// this way should receive ACPI tables, which is why we connect all devices
|
|
// first (see above) -- PCI enumeration blocks ACPI table installation, if
|
|
// there is a PCI host.
|
|
//
|
|
TryRunningQemuKernel ();
|
|
|
|
BdsLibEnumerateAllBootOption (BootOptionList);
|
|
SetBootOrderFromQemu (BootOptionList);
|
|
//
|
|
// The BootOrder variable may have changed, reload the in-memory list with
|
|
// it.
|
|
//
|
|
BdsLibBuildOptionFromVar (BootOptionList, L"BootOrder");
|
|
|
|
PlatformBdsEnterFrontPage (GetFrontPageTimeoutFromQemu(), TRUE);
|
|
}
|
|
|
|
/**
|
|
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 also 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
|
|
)
|
|
{
|
|
}
|
|
|
|
/**
|
|
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
|
|
)
|
|
{
|
|
}
|
|
|
|
/**
|
|
This function locks platform flash that is not allowed to be updated during normal boot path.
|
|
The flash layout is platform specific.
|
|
**/
|
|
VOID
|
|
EFIAPI
|
|
PlatformBdsLockNonUpdatableFlash (
|
|
VOID
|
|
)
|
|
{
|
|
return;
|
|
}
|