mirror of https://github.com/acidanthera/audk.git
ArmPlatformPkg/Bds: Remove any use of the "Fdt" UEFI variable
Remove the option to update the "Fdt" UEFI variable in the ARM BDS as the "setfdt" EFI Shell command provides this service from now. Remove the use of this variable in the legacy kernel boot loader and use the FDT installed in the configuration table instead. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ronald Cron <Ronald.Cron@arm.com> Reviewed-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16940 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
7aec2926b9
commit
6332ffb0af
|
@ -39,7 +39,6 @@ UefiMain (
|
||||||
EFI_LOADED_IMAGE_PROTOCOL *LoadedImage;
|
EFI_LOADED_IMAGE_PROTOCOL *LoadedImage;
|
||||||
LINUX_LOADER_OPTIONAL_DATA* LinuxOptionalData;
|
LINUX_LOADER_OPTIONAL_DATA* LinuxOptionalData;
|
||||||
EFI_DEVICE_PATH* DevicePathKernel;
|
EFI_DEVICE_PATH* DevicePathKernel;
|
||||||
EFI_DEVICE_PATH* DevicePathFdt;
|
|
||||||
EFI_DEVICE_PATH* InitrdDevicePath;
|
EFI_DEVICE_PATH* InitrdDevicePath;
|
||||||
CHAR16* OptionalDataInitrd;
|
CHAR16* OptionalDataInitrd;
|
||||||
CHAR8* OptionalDataArguments;
|
CHAR8* OptionalDataArguments;
|
||||||
|
@ -57,9 +56,8 @@ UefiMain (
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate the File Path Node for the Linux Kernel & Device Tree blob
|
// Generate the File Path Node for the Linux Kernel
|
||||||
DevicePathKernel = FileDevicePath (LoadedImage->DeviceHandle, LINUX_KERNEL_NAME);
|
DevicePathKernel = FileDevicePath (LoadedImage->DeviceHandle, LINUX_KERNEL_NAME);
|
||||||
DevicePathFdt = FileDevicePath (LoadedImage->DeviceHandle, FDT_NAME);
|
|
||||||
|
|
||||||
if (LinuxOptionalData->CmdLineLength > 0) {
|
if (LinuxOptionalData->CmdLineLength > 0) {
|
||||||
OptionalDataArguments = (CHAR8*)LinuxOptionalData + sizeof(LINUX_LOADER_OPTIONAL_DATA);
|
OptionalDataArguments = (CHAR8*)LinuxOptionalData + sizeof(LINUX_LOADER_OPTIONAL_DATA);
|
||||||
|
@ -89,7 +87,7 @@ UefiMain (
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load and Start the Linux Kernel (we should never return)
|
// Load and Start the Linux Kernel (we should never return)
|
||||||
Status = BdsBootLinuxFdt (DevicePathKernel, InitrdDevicePath, OptionalDataArguments, DevicePathFdt);
|
Status = BdsBootLinuxFdt (DevicePathKernel, InitrdDevicePath, OptionalDataArguments);
|
||||||
|
|
||||||
if ((UINTN)OptionalDataInitrd & 0x1) {
|
if ((UINTN)OptionalDataInitrd & 0x1) {
|
||||||
FreePool (Initrd);
|
FreePool (Initrd);
|
||||||
|
|
|
@ -160,9 +160,9 @@ BdsBootLinuxAtag (
|
||||||
/**
|
/**
|
||||||
Start a Linux kernel from a Device Path
|
Start a Linux kernel from a Device Path
|
||||||
|
|
||||||
@param LinuxKernel Device Path to the Linux Kernel
|
@param[in] LinuxKernelDevicePath Device Path to the Linux Kernel
|
||||||
@param Parameters Linux kernel arguments
|
@param[in] InitrdDevicePath Device Path to the Initrd
|
||||||
@param Fdt Device Path to the Flat Device Tree
|
@param[in] Arguments Linux kernel arguments
|
||||||
|
|
||||||
@retval EFI_SUCCESS All drivers have been connected
|
@retval EFI_SUCCESS All drivers have been connected
|
||||||
@retval EFI_NOT_FOUND The Linux kernel Device Path has not been found
|
@retval EFI_NOT_FOUND The Linux kernel Device Path has not been found
|
||||||
|
@ -173,8 +173,7 @@ EFI_STATUS
|
||||||
BdsBootLinuxFdt (
|
BdsBootLinuxFdt (
|
||||||
IN EFI_DEVICE_PATH_PROTOCOL* LinuxKernelDevicePath,
|
IN EFI_DEVICE_PATH_PROTOCOL* LinuxKernelDevicePath,
|
||||||
IN EFI_DEVICE_PATH_PROTOCOL* InitrdDevicePath,
|
IN EFI_DEVICE_PATH_PROTOCOL* InitrdDevicePath,
|
||||||
IN CONST CHAR8* Arguments,
|
IN CONST CHAR8* Arguments
|
||||||
IN EFI_DEVICE_PATH_PROTOCOL* FdtDevicePath
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
#include <Library/ArmGicLib.h>
|
#include <Library/ArmGicLib.h>
|
||||||
#include <Ppi/ArmMpCoreInfo.h>
|
#include <Ppi/ArmMpCoreInfo.h>
|
||||||
#include <Library/IoLib.h>
|
#include <Library/IoLib.h>
|
||||||
|
#include <Guid/Fdt.h>
|
||||||
|
#include <libfdt.h>
|
||||||
|
|
||||||
#include "BdsInternal.h"
|
#include "BdsInternal.h"
|
||||||
#include "BdsLinuxLoader.h"
|
#include "BdsLinuxLoader.h"
|
||||||
|
@ -171,9 +173,9 @@ BdsBootLinuxAtag (
|
||||||
/**
|
/**
|
||||||
Start a Linux kernel from a Device Path
|
Start a Linux kernel from a Device Path
|
||||||
|
|
||||||
@param LinuxKernel Device Path to the Linux Kernel
|
@param[in] LinuxKernelDevicePath Device Path to the Linux Kernel
|
||||||
@param Parameters Linux kernel agruments
|
@param[in] InitrdDevicePath Device Path to the Initrd
|
||||||
@param Fdt Device Path to the Flat Device Tree
|
@param[in] Arguments Linux kernel arguments
|
||||||
|
|
||||||
@retval EFI_SUCCESS All drivers have been connected
|
@retval EFI_SUCCESS All drivers have been connected
|
||||||
@retval EFI_NOT_FOUND The Linux kernel Device Path has not been found
|
@retval EFI_NOT_FOUND The Linux kernel Device Path has not been found
|
||||||
|
@ -184,26 +186,26 @@ EFI_STATUS
|
||||||
BdsBootLinuxFdt (
|
BdsBootLinuxFdt (
|
||||||
IN EFI_DEVICE_PATH_PROTOCOL* LinuxKernelDevicePath,
|
IN EFI_DEVICE_PATH_PROTOCOL* LinuxKernelDevicePath,
|
||||||
IN EFI_DEVICE_PATH_PROTOCOL* InitrdDevicePath,
|
IN EFI_DEVICE_PATH_PROTOCOL* InitrdDevicePath,
|
||||||
IN CONST CHAR8* Arguments,
|
IN CONST CHAR8* Arguments
|
||||||
IN EFI_DEVICE_PATH_PROTOCOL* FdtDevicePath
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_STATUS PenBaseStatus;
|
EFI_STATUS PenBaseStatus;
|
||||||
UINTN LinuxImageSize;
|
UINTN LinuxImageSize;
|
||||||
UINTN InitrdImageSize;
|
UINTN InitrdImageSize;
|
||||||
UINTN InitrdImageBaseSize;
|
UINTN InitrdImageBaseSize;
|
||||||
UINTN FdtBlobSize;
|
VOID *InstalledFdtBase;
|
||||||
EFI_PHYSICAL_ADDRESS FdtBlobBase;
|
UINTN FdtBlobSize;
|
||||||
EFI_PHYSICAL_ADDRESS LinuxImage;
|
EFI_PHYSICAL_ADDRESS FdtBlobBase;
|
||||||
EFI_PHYSICAL_ADDRESS InitrdImage;
|
EFI_PHYSICAL_ADDRESS LinuxImage;
|
||||||
EFI_PHYSICAL_ADDRESS InitrdImageBase;
|
EFI_PHYSICAL_ADDRESS InitrdImage;
|
||||||
ARM_PROCESSOR_TABLE *ArmProcessorTable;
|
EFI_PHYSICAL_ADDRESS InitrdImageBase;
|
||||||
ARM_CORE_INFO *ArmCoreInfoTable;
|
ARM_PROCESSOR_TABLE *ArmProcessorTable;
|
||||||
UINTN Index;
|
ARM_CORE_INFO *ArmCoreInfoTable;
|
||||||
EFI_PHYSICAL_ADDRESS PenBase;
|
UINTN Index;
|
||||||
UINTN PenSize;
|
EFI_PHYSICAL_ADDRESS PenBase;
|
||||||
UINTN MailBoxBase;
|
UINTN PenSize;
|
||||||
|
UINTN MailBoxBase;
|
||||||
|
|
||||||
PenBaseStatus = EFI_UNSUPPORTED;
|
PenBaseStatus = EFI_UNSUPPORTED;
|
||||||
PenSize = 0;
|
PenSize = 0;
|
||||||
|
@ -259,14 +261,18 @@ BdsBootLinuxFdt (
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load the FDT binary from a device path.
|
//
|
||||||
// The FDT will be reloaded later to a more appropriate location for the Linux kernel.
|
// Get the FDT from the Configuration Table.
|
||||||
FdtBlobBase = LINUX_KERNEL_MAX_OFFSET;
|
// The FDT will be reloaded in PrepareFdt() to a more appropriate
|
||||||
Status = BdsLoadImage (FdtDevicePath, AllocateMaxAddress, &FdtBlobBase, &FdtBlobSize);
|
// location for the Linux Kernel.
|
||||||
if (EFI_ERROR(Status)) {
|
//
|
||||||
Print (L"ERROR: Did not find Device Tree blob (%r).\n", Status);
|
Status = EfiGetSystemConfigurationTable (&gFdtTableGuid, &InstalledFdtBase);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
Print (L"ERROR: Did not get the Device Tree blob (%r).\n", Status);
|
||||||
goto EXIT_FREE_INITRD;
|
goto EXIT_FREE_INITRD;
|
||||||
}
|
}
|
||||||
|
FdtBlobBase = (EFI_PHYSICAL_ADDRESS)InstalledFdtBase;
|
||||||
|
FdtBlobSize = fdt_totalsize (InstalledFdtBase);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Install secondary core pens if the Power State Coordination Interface is not supported
|
// Install secondary core pens if the Power State Coordination Interface is not supported
|
||||||
|
|
|
@ -12,6 +12,9 @@
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
#include <Guid/Fdt.h>
|
||||||
|
#include <libfdt.h>
|
||||||
|
|
||||||
#include "BdsInternal.h"
|
#include "BdsInternal.h"
|
||||||
#include "BdsLinuxLoader.h"
|
#include "BdsLinuxLoader.h"
|
||||||
|
|
||||||
|
@ -222,9 +225,9 @@ EXIT_FREE_LINUX:
|
||||||
/**
|
/**
|
||||||
Start a Linux kernel from a Device Path
|
Start a Linux kernel from a Device Path
|
||||||
|
|
||||||
@param LinuxKernel Device Path to the Linux Kernel
|
@param LinuxKernelDevicePath Device Path to the Linux Kernel
|
||||||
@param Parameters Linux kernel arguments
|
@param InitrdDevicePath Device Path to the Initrd
|
||||||
@param Fdt Device Path to the Flat Device Tree
|
@param CommandLineArguments Linux command line
|
||||||
|
|
||||||
@retval EFI_SUCCESS All drivers have been connected
|
@retval EFI_SUCCESS All drivers have been connected
|
||||||
@retval EFI_NOT_FOUND The Linux kernel Device Path has not been found
|
@retval EFI_NOT_FOUND The Linux kernel Device Path has not been found
|
||||||
|
@ -235,19 +238,19 @@ EFI_STATUS
|
||||||
BdsBootLinuxFdt (
|
BdsBootLinuxFdt (
|
||||||
IN EFI_DEVICE_PATH_PROTOCOL* LinuxKernelDevicePath,
|
IN EFI_DEVICE_PATH_PROTOCOL* LinuxKernelDevicePath,
|
||||||
IN EFI_DEVICE_PATH_PROTOCOL* InitrdDevicePath,
|
IN EFI_DEVICE_PATH_PROTOCOL* InitrdDevicePath,
|
||||||
IN CONST CHAR8* CommandLineArguments,
|
IN CONST CHAR8* CommandLineArguments
|
||||||
IN EFI_DEVICE_PATH_PROTOCOL* FdtDevicePath
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
UINT32 LinuxImageSize;
|
UINT32 LinuxImageSize;
|
||||||
UINT32 InitrdImageBaseSize = 0;
|
UINT32 InitrdImageBaseSize = 0;
|
||||||
UINT32 InitrdImageSize = 0;
|
UINT32 InitrdImageSize = 0;
|
||||||
UINT32 FdtBlobSize;
|
VOID *InstalledFdtBase;
|
||||||
EFI_PHYSICAL_ADDRESS FdtBlobBase;
|
UINT32 FdtBlobSize;
|
||||||
EFI_PHYSICAL_ADDRESS LinuxImage;
|
EFI_PHYSICAL_ADDRESS FdtBlobBase;
|
||||||
EFI_PHYSICAL_ADDRESS InitrdImageBase = 0;
|
EFI_PHYSICAL_ADDRESS LinuxImage;
|
||||||
EFI_PHYSICAL_ADDRESS InitrdImage = 0;
|
EFI_PHYSICAL_ADDRESS InitrdImageBase = 0;
|
||||||
|
EFI_PHYSICAL_ADDRESS InitrdImage = 0;
|
||||||
|
|
||||||
PERF_START (NULL, "BDS", NULL, 0);
|
PERF_START (NULL, "BDS", NULL, 0);
|
||||||
|
|
||||||
|
@ -281,13 +284,18 @@ BdsBootLinuxFdt (
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load the FDT binary from a device path. The FDT will be reloaded later to a more appropriate location for the Linux kernel.
|
//
|
||||||
FdtBlobBase = 0;
|
// Get the FDT from the Configuration Table.
|
||||||
Status = BdsLoadImage (FdtDevicePath, AllocateAnyPages, &FdtBlobBase, &FdtBlobSize);
|
// The FDT will be reloaded in PrepareFdt() to a more appropriate
|
||||||
if (EFI_ERROR(Status)) {
|
// location for the Linux Kernel.
|
||||||
Print (L"ERROR: Did not find Device Tree blob.\n");
|
//
|
||||||
|
Status = EfiGetSystemConfigurationTable (&gFdtTableGuid, &InstalledFdtBase);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
Print (L"ERROR: Did not get the Device Tree blob (%r).\n", Status);
|
||||||
goto EXIT_FREE_INITRD;
|
goto EXIT_FREE_INITRD;
|
||||||
}
|
}
|
||||||
|
FdtBlobBase = (EFI_PHYSICAL_ADDRESS)(UINTN)InstalledFdtBase;
|
||||||
|
FdtBlobSize = fdt_totalsize (InstalledFdtBase);
|
||||||
|
|
||||||
// Update the Fdt with the Initrd information. The FDT will increase in size.
|
// Update the Fdt with the Initrd information. The FDT will increase in size.
|
||||||
// By setting address=0 we leave the memory allocation to the function
|
// By setting address=0 we leave the memory allocation to the function
|
||||||
|
|
|
@ -36,10 +36,10 @@
|
||||||
AArch64/BdsLinuxLoaderHelper.S
|
AArch64/BdsLinuxLoaderHelper.S
|
||||||
|
|
||||||
[Packages]
|
[Packages]
|
||||||
MdePkg/MdePkg.dec
|
|
||||||
MdeModulePkg/MdeModulePkg.dec
|
|
||||||
EmbeddedPkg/EmbeddedPkg.dec
|
EmbeddedPkg/EmbeddedPkg.dec
|
||||||
ArmPkg/ArmPkg.dec
|
ArmPkg/ArmPkg.dec
|
||||||
|
MdePkg/MdePkg.dec
|
||||||
|
MdeModulePkg/MdeModulePkg.dec
|
||||||
ArmPlatformPkg/ArmPlatformPkg.dec
|
ArmPlatformPkg/ArmPlatformPkg.dec
|
||||||
|
|
||||||
[LibraryClasses]
|
[LibraryClasses]
|
||||||
|
@ -63,6 +63,7 @@
|
||||||
gEfiFileInfoGuid
|
gEfiFileInfoGuid
|
||||||
gArmMpCoreInfoGuid
|
gArmMpCoreInfoGuid
|
||||||
gArmGlobalVariableGuid
|
gArmGlobalVariableGuid
|
||||||
|
gFdtTableGuid
|
||||||
|
|
||||||
[Protocols]
|
[Protocols]
|
||||||
gEfiBdsArchProtocolGuid
|
gEfiBdsArchProtocolGuid
|
||||||
|
|
|
@ -140,7 +140,6 @@
|
||||||
#
|
#
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultBootDescription|L"Linux from NOR Flash"
|
gArmPlatformTokenSpaceGuid.PcdDefaultBootDescription|L"Linux from NOR Flash"
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath|L"VenHw(E7223039-5836-41E1-B542-D7EC736C5E59)/Image"
|
gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath|L"VenHw(E7223039-5836-41E1-B542-D7EC736C5E59)/Image"
|
||||||
gArmPlatformTokenSpaceGuid.PcdFdtDevicePath|L"VenHw(E7223039-5836-41E1-B542-D7EC736C5E59)/juno.dtb"
|
|
||||||
|
|
||||||
# Support the Linux EFI stub by default
|
# Support the Linux EFI stub by default
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument|L"console=ttyAMA0,115200 earlycon=pl011,0x7ff80000 root=/dev/sda1 rootwait verbose debug"
|
gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument|L"console=ttyAMA0,115200 earlycon=pl011,0x7ff80000 root=/dev/sda1 rootwait verbose debug"
|
||||||
|
|
|
@ -135,7 +135,6 @@
|
||||||
# - 1 = a Linux kernel with ATAG support
|
# - 1 = a Linux kernel with ATAG support
|
||||||
# - 2 = a Linux kernel with FDT support
|
# - 2 = a Linux kernel with FDT support
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultBootType|0|UINT32|0x00000010
|
gArmPlatformTokenSpaceGuid.PcdDefaultBootType|0|UINT32|0x00000010
|
||||||
gArmPlatformTokenSpaceGuid.PcdFdtDevicePath|L""|VOID*|0x00000011
|
|
||||||
|
|
||||||
## Timeout value for displaying progressing bar in before boot OS.
|
## Timeout value for displaying progressing bar in before boot OS.
|
||||||
# According to UEFI 2.0 spec, the default TimeOut should be 0xffff.
|
# According to UEFI 2.0 spec, the default TimeOut should be 0xffff.
|
||||||
|
|
|
@ -190,7 +190,6 @@
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath|L"VenHw(1F15DA3C-37FF-4070-B471-BB4AF12A724A)/MemoryMapped(0x0,0xE000000,0xE800000)"
|
gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath|L"VenHw(1F15DA3C-37FF-4070-B471-BB4AF12A724A)/MemoryMapped(0x0,0xE000000,0xE800000)"
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument|"console=ttyAMA0,38400 earlyprintk debug verbose"
|
gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument|"console=ttyAMA0,38400 earlyprintk debug verbose"
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultBootType|2
|
gArmPlatformTokenSpaceGuid.PcdDefaultBootType|2
|
||||||
gArmPlatformTokenSpaceGuid.PcdFdtDevicePath|L"VenHw(1F15DA3C-37FF-4070-B471-BB4AF12A724A)/MemoryMapped(0x0,0x0E800000,0x0E803000)"
|
|
||||||
|
|
||||||
# Use the serial console (ConIn & ConOut) and the Graphic driver (ConOut)
|
# Use the serial console (ConIn & ConOut) and the Graphic driver (ConOut)
|
||||||
# PL111 - CLCD
|
# PL111 - CLCD
|
||||||
|
|
|
@ -183,7 +183,6 @@
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument|L"console=ttyAMA0 earlycon=pl011,0x1c090000 debug user_debug=31 loglevel=9"
|
gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument|L"console=ttyAMA0 earlycon=pl011,0x1c090000 debug user_debug=31 loglevel=9"
|
||||||
# Use EFI Stub
|
# Use EFI Stub
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultBootType|0
|
gArmPlatformTokenSpaceGuid.PcdDefaultBootType|0
|
||||||
gArmPlatformTokenSpaceGuid.PcdFdtDevicePath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/fdt.dtb"
|
|
||||||
|
|
||||||
# Use the serial console (ConIn & ConOut) and the Graphic driver (ConOut)
|
# Use the serial console (ConIn & ConOut) and the Graphic driver (ConOut)
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(38400,8,N,1)/VenPcAnsi();VenHw(407B4008-BF5B-11DF-9547-CF16E0D72085)"
|
gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(38400,8,N,1)/VenPcAnsi();VenHw(407B4008-BF5B-11DF-9547-CF16E0D72085)"
|
||||||
|
|
|
@ -167,7 +167,6 @@
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultBootDescription|L"SemiHosting"
|
gArmPlatformTokenSpaceGuid.PcdDefaultBootDescription|L"SemiHosting"
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/zImage"
|
gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/zImage"
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultBootType|2
|
gArmPlatformTokenSpaceGuid.PcdDefaultBootType|2
|
||||||
gArmPlatformTokenSpaceGuid.PcdFdtDevicePath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/rtsm_ve-cortex_a15x1.dtb"
|
|
||||||
|
|
||||||
# Use the serial console (ConIn & ConOut) and the Graphic driver (ConOut)
|
# Use the serial console (ConIn & ConOut) and the Graphic driver (ConOut)
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(38400,8,N,1)/VenPcAnsi();VenHw(407B4008-BF5B-11DF-9547-CF16E0D72085)"
|
gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(38400,8,N,1)/VenPcAnsi();VenHw(407B4008-BF5B-11DF-9547-CF16E0D72085)"
|
||||||
|
|
|
@ -169,7 +169,6 @@
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultBootDescription|L"SemiHosting"
|
gArmPlatformTokenSpaceGuid.PcdDefaultBootDescription|L"SemiHosting"
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/zImage"
|
gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/zImage"
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultBootType|2
|
gArmPlatformTokenSpaceGuid.PcdDefaultBootType|2
|
||||||
gArmPlatformTokenSpaceGuid.PcdFdtDevicePath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/rtsm_ve-cortex_a15x4.dtb"
|
|
||||||
|
|
||||||
# Use the serial console (ConIn & ConOut) and the Graphic driver (ConOut)
|
# Use the serial console (ConIn & ConOut) and the Graphic driver (ConOut)
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(38400,8,N,1)/VenPcAnsi();VenHw(407B4008-BF5B-11DF-9547-CF16E0D72085)"
|
gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(38400,8,N,1)/VenPcAnsi();VenHw(407B4008-BF5B-11DF-9547-CF16E0D72085)"
|
||||||
|
|
|
@ -170,7 +170,6 @@
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultBootDescription|L"SemiHosting"
|
gArmPlatformTokenSpaceGuid.PcdDefaultBootDescription|L"SemiHosting"
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/zImage"
|
gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/zImage"
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultBootType|2
|
gArmPlatformTokenSpaceGuid.PcdDefaultBootType|2
|
||||||
gArmPlatformTokenSpaceGuid.PcdFdtDevicePath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/rtsm_ve-cortex_a9x4.dtb"
|
|
||||||
|
|
||||||
# Use the serial console (ConIn & ConOut) and the Graphic driver (ConOut)
|
# Use the serial console (ConIn & ConOut) and the Graphic driver (ConOut)
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(38400,8,N,1)/VenPcAnsi();VenHw(407B4008-BF5B-11DF-9547-CF16E0D72085)"
|
gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(38400,8,N,1)/VenPcAnsi();VenHw(407B4008-BF5B-11DF-9547-CF16E0D72085)"
|
||||||
|
|
|
@ -132,7 +132,6 @@
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/Image"
|
gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/Image"
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument|"root=/dev/vda2 rw console=ttyAMA0 earlyprintk=pl011,0x1c090000 maxcpus=4 debug user_debug=31 loglevel=9"
|
gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument|"root=/dev/vda2 rw console=ttyAMA0 earlyprintk=pl011,0x1c090000 maxcpus=4 debug user_debug=31 loglevel=9"
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultBootType|2
|
gArmPlatformTokenSpaceGuid.PcdDefaultBootType|2
|
||||||
gArmPlatformTokenSpaceGuid.PcdFdtDevicePath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/foundation-v8.dtb"
|
|
||||||
|
|
||||||
# Use the serial console (ConIn & ConOut) and the Graphic driver (ConOut)
|
# Use the serial console (ConIn & ConOut) and the Graphic driver (ConOut)
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(38400,8,N,1)/VenPcAnsi();"
|
gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(38400,8,N,1)/VenPcAnsi();"
|
||||||
|
@ -141,7 +140,7 @@
|
||||||
#
|
#
|
||||||
# ARM Architectural Timer Frequency
|
# ARM Architectural Timer Frequency
|
||||||
#
|
#
|
||||||
# Set model tick to 100Mhz. This depends a lot on workstation performance.
|
# Set model tick to 100MHz. This depends a lot on workstation performance.
|
||||||
gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|100000000
|
gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|100000000
|
||||||
|
|
||||||
[PcdsDynamicDefault.common]
|
[PcdsDynamicDefault.common]
|
||||||
|
|
|
@ -161,7 +161,6 @@
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/Image"
|
gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/Image"
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument|"root=/dev/mmcblk0p2 console=ttyAMA0 earlyprintk=pl011,0x1c090000 debug user_debug=31 loglevel=9"
|
gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument|"root=/dev/mmcblk0p2 console=ttyAMA0 earlyprintk=pl011,0x1c090000 debug user_debug=31 loglevel=9"
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultBootType|2
|
gArmPlatformTokenSpaceGuid.PcdDefaultBootType|2
|
||||||
gArmPlatformTokenSpaceGuid.PcdFdtDevicePath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/rtsm_ve-aemv8a.dtb"
|
|
||||||
|
|
||||||
# Use the serial console (ConIn & ConOut) and the Graphic driver (ConOut)
|
# Use the serial console (ConIn & ConOut) and the Graphic driver (ConOut)
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(38400,8,N,1)/VenPcAnsi();VenHw(407B4008-BF5B-11DF-9547-CF16E0D72085)"
|
gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(38400,8,N,1)/VenPcAnsi();VenHw(407B4008-BF5B-11DF-9547-CF16E0D72085)"
|
||||||
|
@ -170,7 +169,7 @@
|
||||||
#
|
#
|
||||||
# ARM Architectural Timer Frequency
|
# ARM Architectural Timer Frequency
|
||||||
#
|
#
|
||||||
# Set model tick to 100Mhz. This depends a lot on workstation performance.
|
# Set model tick to 100MHz. This depends a lot on workstation performance.
|
||||||
gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|100000000
|
gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|100000000
|
||||||
|
|
||||||
[PcdsDynamicDefault.common]
|
[PcdsDynamicDefault.common]
|
||||||
|
|
|
@ -73,7 +73,6 @@
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultBootInitrdPath
|
gArmPlatformTokenSpaceGuid.PcdDefaultBootInitrdPath
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument
|
gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultBootType
|
gArmPlatformTokenSpaceGuid.PcdDefaultBootType
|
||||||
gArmPlatformTokenSpaceGuid.PcdFdtDevicePath
|
|
||||||
gArmPlatformTokenSpaceGuid.PcdPlatformBootTimeOut
|
gArmPlatformTokenSpaceGuid.PcdPlatformBootTimeOut
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultConInPaths
|
gArmPlatformTokenSpaceGuid.PcdDefaultConInPaths
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths
|
gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths
|
||||||
|
|
|
@ -824,63 +824,6 @@ ErrorExit:
|
||||||
return Status ;
|
return Status ;
|
||||||
}
|
}
|
||||||
|
|
||||||
EFI_STATUS
|
|
||||||
UpdateFdtPath (
|
|
||||||
IN LIST_ENTRY *BootOptionsList
|
|
||||||
)
|
|
||||||
{
|
|
||||||
EFI_STATUS Status;
|
|
||||||
UINTN FdtDevicePathSize;
|
|
||||||
BDS_SUPPORTED_DEVICE *SupportedBootDevice;
|
|
||||||
EFI_DEVICE_PATH_PROTOCOL *FdtDevicePathNodes;
|
|
||||||
EFI_DEVICE_PATH_PROTOCOL *FdtDevicePath;
|
|
||||||
|
|
||||||
Status = SelectBootDevice (&SupportedBootDevice);
|
|
||||||
if (EFI_ERROR(Status)) {
|
|
||||||
Status = EFI_ABORTED;
|
|
||||||
goto EXIT;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create the specific device path node
|
|
||||||
Status = SupportedBootDevice->Support->CreateDevicePathNode (L"FDT blob", &FdtDevicePathNodes);
|
|
||||||
if (EFI_ERROR(Status)) {
|
|
||||||
Status = EFI_ABORTED;
|
|
||||||
goto EXIT;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (FdtDevicePathNodes != NULL) {
|
|
||||||
// Append the Device Path node to the select device path
|
|
||||||
FdtDevicePath = AppendDevicePath (SupportedBootDevice->DevicePathProtocol, FdtDevicePathNodes);
|
|
||||||
// Free the FdtDevicePathNodes created by Support->CreateDevicePathNode()
|
|
||||||
FreePool (FdtDevicePathNodes);
|
|
||||||
FdtDevicePathSize = GetDevicePathSize (FdtDevicePath);
|
|
||||||
Status = gRT->SetVariable (
|
|
||||||
(CHAR16*)L"Fdt",
|
|
||||||
&gArmGlobalVariableGuid,
|
|
||||||
EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS,
|
|
||||||
FdtDevicePathSize,
|
|
||||||
FdtDevicePath
|
|
||||||
);
|
|
||||||
ASSERT_EFI_ERROR(Status);
|
|
||||||
} else {
|
|
||||||
Status = gRT->SetVariable (
|
|
||||||
(CHAR16*)L"Fdt",
|
|
||||||
&gArmGlobalVariableGuid,
|
|
||||||
EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS,
|
|
||||||
0,
|
|
||||||
NULL
|
|
||||||
);
|
|
||||||
ASSERT_EFI_ERROR(Status);
|
|
||||||
}
|
|
||||||
|
|
||||||
EXIT:
|
|
||||||
if (Status == EFI_ABORTED) {
|
|
||||||
Print(L"\n");
|
|
||||||
}
|
|
||||||
FreePool(SupportedBootDevice);
|
|
||||||
return Status;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Set boot timeout
|
Set boot timeout
|
||||||
|
|
||||||
|
@ -937,7 +880,6 @@ struct BOOT_MANAGER_ENTRY {
|
||||||
{ L"Update Boot Device Entry", BootMenuUpdateBootOption },
|
{ L"Update Boot Device Entry", BootMenuUpdateBootOption },
|
||||||
{ L"Remove Boot Device Entry", BootMenuRemoveBootOption },
|
{ L"Remove Boot Device Entry", BootMenuRemoveBootOption },
|
||||||
{ L"Reorder Boot Device Entries", BootMenuReorderBootOptions },
|
{ L"Reorder Boot Device Entries", BootMenuReorderBootOptions },
|
||||||
{ L"Update FDT path", UpdateFdtPath },
|
|
||||||
{ L"Set Boot Timeout", BootMenuSetBootTimeout },
|
{ L"Set Boot Timeout", BootMenuSetBootTimeout },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -21,13 +21,9 @@ BootOptionStart (
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL* EfiDevicePathFromTextProtocol;
|
|
||||||
UINT32 LoaderType;
|
UINT32 LoaderType;
|
||||||
ARM_BDS_LOADER_OPTIONAL_DATA* OptionalData;
|
ARM_BDS_LOADER_OPTIONAL_DATA* OptionalData;
|
||||||
ARM_BDS_LINUX_ARGUMENTS* LinuxArguments;
|
ARM_BDS_LINUX_ARGUMENTS* LinuxArguments;
|
||||||
EFI_DEVICE_PATH_PROTOCOL* FdtDevicePath;
|
|
||||||
EFI_DEVICE_PATH_PROTOCOL* DefaultFdtDevicePath;
|
|
||||||
UINTN FdtDevicePathSize;
|
|
||||||
UINTN CmdLineSize;
|
UINTN CmdLineSize;
|
||||||
UINTN InitrdSize;
|
UINTN InitrdSize;
|
||||||
EFI_DEVICE_PATH* Initrd;
|
EFI_DEVICE_PATH* Initrd;
|
||||||
|
@ -69,25 +65,11 @@ BootOptionStart (
|
||||||
} else {
|
} else {
|
||||||
Initrd = NULL;
|
Initrd = NULL;
|
||||||
}
|
}
|
||||||
|
Status = BdsBootLinuxFdt (
|
||||||
// Get the default FDT device path
|
BootOption->FilePathList,
|
||||||
Status = gBS->LocateProtocol (&gEfiDevicePathFromTextProtocolGuid, NULL, (VOID **)&EfiDevicePathFromTextProtocol);
|
Initrd,
|
||||||
ASSERT_EFI_ERROR(Status);
|
(CHAR8*)(LinuxArguments + 1)
|
||||||
DefaultFdtDevicePath = EfiDevicePathFromTextProtocol->ConvertTextToDevicePath ((CHAR16*)PcdGetPtr(PcdFdtDevicePath));
|
);
|
||||||
|
|
||||||
// Get the FDT device path
|
|
||||||
FdtDevicePathSize = GetDevicePathSize (DefaultFdtDevicePath);
|
|
||||||
Status = GetEnvironmentVariable ((CHAR16 *)L"Fdt", &gArmGlobalVariableGuid,
|
|
||||||
DefaultFdtDevicePath, &FdtDevicePathSize, (VOID **)&FdtDevicePath);
|
|
||||||
ASSERT_EFI_ERROR(Status);
|
|
||||||
|
|
||||||
Status = BdsBootLinuxFdt (BootOption->FilePathList,
|
|
||||||
Initrd, // Initrd
|
|
||||||
(CHAR8*)(LinuxArguments + 1),
|
|
||||||
FdtDevicePath);
|
|
||||||
|
|
||||||
FreePool (DefaultFdtDevicePath);
|
|
||||||
FreePool (FdtDevicePath);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Connect all the drivers if the EFI Application is not a EFI OS Loader
|
// Connect all the drivers if the EFI Application is not a EFI OS Loader
|
||||||
|
|
|
@ -46,7 +46,6 @@ gArmPlatformTokenSpaceGuid.PcdDefaultBootDescription : Description of the D
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath : DevicePath of the Default Boot Entry
|
gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath : DevicePath of the Default Boot Entry
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument : Argument for the Default Boot Entry
|
gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument : Argument for the Default Boot Entry
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultBootType : Define the binary type of the Default Boot Entry (0=EFI application, 1=Linux kernel with ATAG support, 2=Linux Kernel with FDT support)
|
gArmPlatformTokenSpaceGuid.PcdDefaultBootType : Define the binary type of the Default Boot Entry (0=EFI application, 1=Linux kernel with ATAG support, 2=Linux Kernel with FDT support)
|
||||||
gArmPlatformTokenSpaceGuid.PcdFdtDevicePath : DevicePath of the Platform Device Tree
|
|
||||||
gArmPlatformTokenSpaceGuid.PcdPlatformBootTimeOut : Timeout before booting on the Device Boot entry (by default the auto boot is skipped)
|
gArmPlatformTokenSpaceGuid.PcdPlatformBootTimeOut : Timeout before booting on the Device Boot entry (by default the auto boot is skipped)
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultConInPaths : List of Device Path use for the Console Input
|
gArmPlatformTokenSpaceGuid.PcdDefaultConInPaths : List of Device Path use for the Console Input
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths : List of Device Path use for the Console Output
|
gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths : List of Device Path use for the Console Output
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
#include <Protocol/DevicePathFromText.h>
|
#include <Protocol/DevicePathFromText.h>
|
||||||
|
|
||||||
#include <Guid/ArmGlobalVariableHob.h>
|
#include <Guid/ArmGlobalVariableHob.h>
|
||||||
|
#include <Guid/Fdt.h>
|
||||||
|
|
||||||
#include <libfdt.h>
|
#include <libfdt.h>
|
||||||
|
|
||||||
|
@ -178,41 +179,28 @@ EblDumpFdt (
|
||||||
IN CHAR8 **Argv
|
IN CHAR8 **Argv
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_DEVICE_PATH* FdtDevicePath;
|
VOID *FdtBlob;
|
||||||
EFI_PHYSICAL_ADDRESS FdtBlob;
|
UINTN Ret;
|
||||||
UINTN FdtBlobSize;
|
|
||||||
UINTN Ret;
|
|
||||||
EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL *EfiDevicePathFromTextProtocol;
|
|
||||||
|
|
||||||
// If no FDT file is passed to the argument then get the one from the platform
|
// If no FDT file is passed to the argument then get the one from the platform
|
||||||
if (Argc < 2) {
|
if (Argc < 2) {
|
||||||
Status = GetEnvironmentVariable (L"Fdt", &gArmGlobalVariableGuid, NULL, NULL, (VOID**)&FdtDevicePath);
|
Status = EfiGetSystemConfigurationTable (&gFdtTableGuid, &FdtBlob);
|
||||||
if (Status == EFI_NOT_FOUND) {
|
if (EFI_ERROR (Status)) {
|
||||||
// No set yet, get the Default Device Path
|
Print (L"ERROR: Did not find the Fdt Blob.\n");
|
||||||
Status = gBS->LocateProtocol (&gEfiDevicePathFromTextProtocolGuid, NULL, (VOID **)&EfiDevicePathFromTextProtocol);
|
return Status;
|
||||||
ASSERT_EFI_ERROR(Status);
|
|
||||||
FdtDevicePath = EfiDevicePathFromTextProtocol->ConvertTextToDevicePath ((CHAR16*)PcdGetPtr(PcdFdtDevicePath));
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return EFI_NOT_FOUND;
|
return EFI_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = BdsLoadImage (FdtDevicePath, AllocateAnyPages, &FdtBlob, &FdtBlobSize);
|
Ret = fdt_check_header (FdtBlob);
|
||||||
if (EFI_ERROR(Status)) {
|
|
||||||
Print (L"ERROR: Did not find the Fdt Blob.\n");
|
|
||||||
return Status;
|
|
||||||
}
|
|
||||||
|
|
||||||
Ret = fdt_check_header((CONST VOID*)(UINTN)FdtBlob);
|
|
||||||
if (Ret != 0) {
|
if (Ret != 0) {
|
||||||
Print (L"ERROR: Device Tree header not valid (err:%d)\n",Ret);
|
Print (L"ERROR: Device Tree header not valid (err:%d)\n", Ret);
|
||||||
return Status;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
DumpFdt ((VOID*)(UINTN)FdtBlob);
|
DumpFdt (FdtBlob);
|
||||||
|
|
||||||
FreePool (FdtDevicePath);
|
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,6 +61,4 @@
|
||||||
|
|
||||||
[Guids]
|
[Guids]
|
||||||
gEfiDebugImageInfoTableGuid
|
gEfiDebugImageInfoTableGuid
|
||||||
|
gFdtTableGuid
|
||||||
[Pcd]
|
|
||||||
gArmPlatformTokenSpaceGuid.PcdFdtDevicePath
|
|
||||||
|
|
|
@ -355,7 +355,6 @@
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument|"console=tty0 console=ttyS2,115200n8 root=UUID=a4af765b-c2b5-48f4-9564-7a4e9104c4f6 rootwait ro earlyprintk"
|
gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument|"console=tty0 console=ttyS2,115200n8 root=UUID=a4af765b-c2b5-48f4-9564-7a4e9104c4f6 rootwait ro earlyprintk"
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultBootType|1
|
gArmPlatformTokenSpaceGuid.PcdDefaultBootType|1
|
||||||
gArmPlatformTokenSpaceGuid.PcdPlatformBootTimeOut|10
|
gArmPlatformTokenSpaceGuid.PcdPlatformBootTimeOut|10
|
||||||
gArmPlatformTokenSpaceGuid.PcdFdtDevicePath|L"VenHw(B615F1F5-5088-43CD-809C-A16E52487D00)/HD(1,MBR,0x00000000,0x3F,0x19FC0)/omap3-beagle.dtb"
|
|
||||||
|
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(115200,8,N,1)/VenPcAnsi();VenHw(E68088EF-D1A4-4336-C1DB-4D3A204730A6)"
|
gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(115200,8,N,1)/VenPcAnsi();VenHw(E68088EF-D1A4-4336-C1DB-4D3A204730A6)"
|
||||||
gArmPlatformTokenSpaceGuid.PcdDefaultConInPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(115200,8,N,1)/VenPcAnsi()"
|
gArmPlatformTokenSpaceGuid.PcdDefaultConInPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(115200,8,N,1)/VenPcAnsi()"
|
||||||
|
|
|
@ -56,7 +56,6 @@ BootAndroidBootImg (
|
||||||
IN VOID *Buffer
|
IN VOID *Buffer
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_DEVICE_PATH_PROTOCOL *FdtDevicePath;
|
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
CHAR8 KernelArgs[BOOTIMG_KERNEL_ARGS_SIZE];
|
CHAR8 KernelArgs[BOOTIMG_KERNEL_ARGS_SIZE];
|
||||||
VOID *Kernel;
|
VOID *Kernel;
|
||||||
|
@ -93,20 +92,10 @@ BootAndroidBootImg (
|
||||||
RamdiskDevicePath->Node1.EndingAddress = ((EFI_PHYSICAL_ADDRESS)(UINTN) Ramdisk) + RamdiskSize;
|
RamdiskDevicePath->Node1.EndingAddress = ((EFI_PHYSICAL_ADDRESS)(UINTN) Ramdisk) + RamdiskSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the default FDT device path
|
|
||||||
Status = GetEnvironmentVariable ((CHAR16 *)L"Fdt", &gArmGlobalVariableGuid,
|
|
||||||
NULL, 0, (VOID **)&FdtDevicePath);
|
|
||||||
if (Status == EFI_NOT_FOUND) {
|
|
||||||
DEBUG ((EFI_D_ERROR, "Error: Please update FDT path in boot manager\n"));
|
|
||||||
return EFI_DEVICE_ERROR;
|
|
||||||
}
|
|
||||||
ASSERT_EFI_ERROR (Status);
|
|
||||||
|
|
||||||
Status = BdsBootLinuxFdt (
|
Status = BdsBootLinuxFdt (
|
||||||
(EFI_DEVICE_PATH_PROTOCOL *) &KernelDevicePath,
|
(EFI_DEVICE_PATH_PROTOCOL *) &KernelDevicePath,
|
||||||
(EFI_DEVICE_PATH_PROTOCOL *) RamdiskDevicePath,
|
(EFI_DEVICE_PATH_PROTOCOL *) RamdiskDevicePath,
|
||||||
KernelArgs,
|
KernelArgs
|
||||||
FdtDevicePath
|
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
DEBUG ((EFI_D_ERROR, "Couldn't Boot Linux: %d\n", Status));
|
DEBUG ((EFI_D_ERROR, "Couldn't Boot Linux: %d\n", Status));
|
||||||
|
@ -117,8 +106,6 @@ BootAndroidBootImg (
|
||||||
FreePool (RamdiskDevicePath);
|
FreePool (RamdiskDevicePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
FreePool (FdtDevicePath);
|
|
||||||
|
|
||||||
// If we got here we do a confused face because BootLinuxFdt returned,
|
// If we got here we do a confused face because BootLinuxFdt returned,
|
||||||
// reporting success.
|
// reporting success.
|
||||||
DEBUG ((EFI_D_ERROR, "WARNING: BdsBootLinuxFdt returned EFI_SUCCESS.\n"));
|
DEBUG ((EFI_D_ERROR, "WARNING: BdsBootLinuxFdt returned EFI_SUCCESS.\n"));
|
||||||
|
|
Loading…
Reference in New Issue