summaryrefslogtreecommitdiff
path: root/ArmPlatformPkg
diff options
context:
space:
mode:
authorRonald Cron <Ronald.Cron@arm.com>2015-02-26 11:02:39 +0000
committeroliviermartin <oliviermartin@Edk2>2015-02-26 11:02:39 +0000
commit6332ffb0affadde53e45325d81b084bc9936ef02 (patch)
tree553fcbe92b3d80b31e11b68c41e864feeb3bbc47 /ArmPlatformPkg
parent7aec2926b926ad90d09fb026af0ee04c4c831237 (diff)
downloadedk2-6332ffb0affadde53e45325d81b084bc9936ef02.zip
edk2-6332ffb0affadde53e45325d81b084bc9936ef02.tar.gz
edk2-6332ffb0affadde53e45325d81b084bc9936ef02.tar.bz2
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
Diffstat (limited to 'ArmPlatformPkg')
-rw-r--r--ArmPlatformPkg/ArmJunoPkg/ArmJuno.dsc1
-rw-r--r--ArmPlatformPkg/ArmPlatformPkg.dec1
-rw-r--r--ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-CTA15-A7.dsc1
-rw-r--r--ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.dsc1
-rw-r--r--ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A15.dsc1
-rw-r--r--ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A15_MPCore.dsc1
-rw-r--r--ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A9x4.dsc1
-rw-r--r--ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-AEMv8Ax4-foundation.dsc3
-rw-r--r--ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-AEMv8Ax4.dsc3
-rw-r--r--ArmPlatformPkg/Bds/Bds.inf1
-rw-r--r--ArmPlatformPkg/Bds/BootMenu.c58
-rw-r--r--ArmPlatformPkg/Bds/BootOption.c28
-rw-r--r--ArmPlatformPkg/Documentation/ArmPlatformPkg.txt1
-rw-r--r--ArmPlatformPkg/Library/EblCmdLib/EblCmdFdt.c36
-rw-r--r--ArmPlatformPkg/Library/EblCmdLib/EblCmdLib.inf4
15 files changed, 20 insertions, 121 deletions
diff --git a/ArmPlatformPkg/ArmJunoPkg/ArmJuno.dsc b/ArmPlatformPkg/ArmJunoPkg/ArmJuno.dsc
index 9b12528..a260286 100644
--- a/ArmPlatformPkg/ArmJunoPkg/ArmJuno.dsc
+++ b/ArmPlatformPkg/ArmJunoPkg/ArmJuno.dsc
@@ -140,7 +140,6 @@
#
gArmPlatformTokenSpaceGuid.PcdDefaultBootDescription|L"Linux from NOR Flash"
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
gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument|L"console=ttyAMA0,115200 earlycon=pl011,0x7ff80000 root=/dev/sda1 rootwait verbose debug"
diff --git a/ArmPlatformPkg/ArmPlatformPkg.dec b/ArmPlatformPkg/ArmPlatformPkg.dec
index 44597ce..9364bb9 100644
--- a/ArmPlatformPkg/ArmPlatformPkg.dec
+++ b/ArmPlatformPkg/ArmPlatformPkg.dec
@@ -135,7 +135,6 @@
# - 1 = a Linux kernel with ATAG support
# - 2 = a Linux kernel with FDT support
gArmPlatformTokenSpaceGuid.PcdDefaultBootType|0|UINT32|0x00000010
- gArmPlatformTokenSpaceGuid.PcdFdtDevicePath|L""|VOID*|0x00000011
## Timeout value for displaying progressing bar in before boot OS.
# According to UEFI 2.0 spec, the default TimeOut should be 0xffff.
diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-CTA15-A7.dsc b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-CTA15-A7.dsc
index e765617..c4bc514 100644
--- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-CTA15-A7.dsc
+++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-CTA15-A7.dsc
@@ -190,7 +190,6 @@
gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath|L"VenHw(1F15DA3C-37FF-4070-B471-BB4AF12A724A)/MemoryMapped(0x0,0xE000000,0xE800000)"
gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument|"console=ttyAMA0,38400 earlyprintk debug verbose"
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)
# PL111 - CLCD
diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.dsc b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.dsc
index f0c99da..d5d1946 100644
--- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.dsc
+++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.dsc
@@ -183,7 +183,6 @@
gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument|L"console=ttyAMA0 earlycon=pl011,0x1c090000 debug user_debug=31 loglevel=9"
# Use EFI Stub
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)
gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(38400,8,N,1)/VenPcAnsi();VenHw(407B4008-BF5B-11DF-9547-CF16E0D72085)"
diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A15.dsc b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A15.dsc
index 6c84980..1a7ff24 100644
--- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A15.dsc
+++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A15.dsc
@@ -167,7 +167,6 @@
gArmPlatformTokenSpaceGuid.PcdDefaultBootDescription|L"SemiHosting"
gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/zImage"
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)
gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(38400,8,N,1)/VenPcAnsi();VenHw(407B4008-BF5B-11DF-9547-CF16E0D72085)"
diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A15_MPCore.dsc b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A15_MPCore.dsc
index 0021a0a..e91cbb2 100644
--- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A15_MPCore.dsc
+++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A15_MPCore.dsc
@@ -169,7 +169,6 @@
gArmPlatformTokenSpaceGuid.PcdDefaultBootDescription|L"SemiHosting"
gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/zImage"
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)
gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(38400,8,N,1)/VenPcAnsi();VenHw(407B4008-BF5B-11DF-9547-CF16E0D72085)"
diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A9x4.dsc b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A9x4.dsc
index a13f443..df82e59 100644
--- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A9x4.dsc
+++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A9x4.dsc
@@ -170,7 +170,6 @@
gArmPlatformTokenSpaceGuid.PcdDefaultBootDescription|L"SemiHosting"
gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath|L"VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)/zImage"
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)
gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(38400,8,N,1)/VenPcAnsi();VenHw(407B4008-BF5B-11DF-9547-CF16E0D72085)"
diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-AEMv8Ax4-foundation.dsc b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-AEMv8Ax4-foundation.dsc
index c050435..c1cd679 100644
--- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-AEMv8Ax4-foundation.dsc
+++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-AEMv8Ax4-foundation.dsc
@@ -132,7 +132,6 @@
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.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)
gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(38400,8,N,1)/VenPcAnsi();"
@@ -141,7 +140,7 @@
#
# 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
[PcdsDynamicDefault.common]
diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-AEMv8Ax4.dsc b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-AEMv8Ax4.dsc
index 4d4c625..eae58f6 100644
--- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-AEMv8Ax4.dsc
+++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-AEMv8Ax4.dsc
@@ -161,7 +161,6 @@
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.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)
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
#
- # 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
[PcdsDynamicDefault.common]
diff --git a/ArmPlatformPkg/Bds/Bds.inf b/ArmPlatformPkg/Bds/Bds.inf
index 190bbc9..d49b0ef 100644
--- a/ArmPlatformPkg/Bds/Bds.inf
+++ b/ArmPlatformPkg/Bds/Bds.inf
@@ -73,7 +73,6 @@
gArmPlatformTokenSpaceGuid.PcdDefaultBootInitrdPath
gArmPlatformTokenSpaceGuid.PcdDefaultBootArgument
gArmPlatformTokenSpaceGuid.PcdDefaultBootType
- gArmPlatformTokenSpaceGuid.PcdFdtDevicePath
gArmPlatformTokenSpaceGuid.PcdPlatformBootTimeOut
gArmPlatformTokenSpaceGuid.PcdDefaultConInPaths
gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths
diff --git a/ArmPlatformPkg/Bds/BootMenu.c b/ArmPlatformPkg/Bds/BootMenu.c
index 04a2eee..76c66fd 100644
--- a/ArmPlatformPkg/Bds/BootMenu.c
+++ b/ArmPlatformPkg/Bds/BootMenu.c
@@ -824,63 +824,6 @@ ErrorExit:
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
@@ -937,7 +880,6 @@ struct BOOT_MANAGER_ENTRY {
{ L"Update Boot Device Entry", BootMenuUpdateBootOption },
{ L"Remove Boot Device Entry", BootMenuRemoveBootOption },
{ L"Reorder Boot Device Entries", BootMenuReorderBootOptions },
- { L"Update FDT path", UpdateFdtPath },
{ L"Set Boot Timeout", BootMenuSetBootTimeout },
};
diff --git a/ArmPlatformPkg/Bds/BootOption.c b/ArmPlatformPkg/Bds/BootOption.c
index 8098222..889040e 100644
--- a/ArmPlatformPkg/Bds/BootOption.c
+++ b/ArmPlatformPkg/Bds/BootOption.c
@@ -21,13 +21,9 @@ BootOptionStart (
)
{
EFI_STATUS Status;
- EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL* EfiDevicePathFromTextProtocol;
UINT32 LoaderType;
ARM_BDS_LOADER_OPTIONAL_DATA* OptionalData;
ARM_BDS_LINUX_ARGUMENTS* LinuxArguments;
- EFI_DEVICE_PATH_PROTOCOL* FdtDevicePath;
- EFI_DEVICE_PATH_PROTOCOL* DefaultFdtDevicePath;
- UINTN FdtDevicePathSize;
UINTN CmdLineSize;
UINTN InitrdSize;
EFI_DEVICE_PATH* Initrd;
@@ -69,25 +65,11 @@ BootOptionStart (
} else {
Initrd = NULL;
}
-
- // Get the default FDT device path
- Status = gBS->LocateProtocol (&gEfiDevicePathFromTextProtocolGuid, NULL, (VOID **)&EfiDevicePathFromTextProtocol);
- ASSERT_EFI_ERROR(Status);
- 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);
+ Status = BdsBootLinuxFdt (
+ BootOption->FilePathList,
+ Initrd,
+ (CHAR8*)(LinuxArguments + 1)
+ );
}
} else {
// Connect all the drivers if the EFI Application is not a EFI OS Loader
diff --git a/ArmPlatformPkg/Documentation/ArmPlatformPkg.txt b/ArmPlatformPkg/Documentation/ArmPlatformPkg.txt
index e591767..7a400cc 100644
--- a/ArmPlatformPkg/Documentation/ArmPlatformPkg.txt
+++ b/ArmPlatformPkg/Documentation/ArmPlatformPkg.txt
@@ -46,7 +46,6 @@ gArmPlatformTokenSpaceGuid.PcdDefaultBootDescription : Description of the D
gArmPlatformTokenSpaceGuid.PcdDefaultBootDevicePath : DevicePath of 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.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.PcdDefaultConInPaths : List of Device Path use for the Console Input
gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths : List of Device Path use for the Console Output
diff --git a/ArmPlatformPkg/Library/EblCmdLib/EblCmdFdt.c b/ArmPlatformPkg/Library/EblCmdLib/EblCmdFdt.c
index dcd7c41..8aae7b2 100644
--- a/ArmPlatformPkg/Library/EblCmdLib/EblCmdFdt.c
+++ b/ArmPlatformPkg/Library/EblCmdLib/EblCmdFdt.c
@@ -27,6 +27,7 @@
#include <Protocol/DevicePathFromText.h>
#include <Guid/ArmGlobalVariableHob.h>
+#include <Guid/Fdt.h>
#include <libfdt.h>
@@ -178,41 +179,28 @@ EblDumpFdt (
IN CHAR8 **Argv
)
{
- EFI_STATUS Status;
- EFI_DEVICE_PATH* FdtDevicePath;
- EFI_PHYSICAL_ADDRESS FdtBlob;
- UINTN FdtBlobSize;
- UINTN Ret;
- EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL *EfiDevicePathFromTextProtocol;
+ EFI_STATUS Status;
+ VOID *FdtBlob;
+ UINTN Ret;
// If no FDT file is passed to the argument then get the one from the platform
if (Argc < 2) {
- Status = GetEnvironmentVariable (L"Fdt", &gArmGlobalVariableGuid, NULL, NULL, (VOID**)&FdtDevicePath);
- if (Status == EFI_NOT_FOUND) {
- // No set yet, get the Default Device Path
- Status = gBS->LocateProtocol (&gEfiDevicePathFromTextProtocolGuid, NULL, (VOID **)&EfiDevicePathFromTextProtocol);
- ASSERT_EFI_ERROR(Status);
- FdtDevicePath = EfiDevicePathFromTextProtocol->ConvertTextToDevicePath ((CHAR16*)PcdGetPtr(PcdFdtDevicePath));
+ Status = EfiGetSystemConfigurationTable (&gFdtTableGuid, &FdtBlob);
+ if (EFI_ERROR (Status)) {
+ Print (L"ERROR: Did not find the Fdt Blob.\n");
+ return Status;
}
} else {
return EFI_NOT_FOUND;
}
- Status = BdsLoadImage (FdtDevicePath, AllocateAnyPages, &FdtBlob, &FdtBlobSize);
- if (EFI_ERROR(Status)) {
- Print (L"ERROR: Did not find the Fdt Blob.\n");
- return Status;
- }
-
- Ret = fdt_check_header((CONST VOID*)(UINTN)FdtBlob);
+ Ret = fdt_check_header (FdtBlob);
if (Ret != 0) {
- Print (L"ERROR: Device Tree header not valid (err:%d)\n",Ret);
- return Status;
+ Print (L"ERROR: Device Tree header not valid (err:%d)\n", Ret);
+ return EFI_INVALID_PARAMETER;
}
- DumpFdt ((VOID*)(UINTN)FdtBlob);
-
- FreePool (FdtDevicePath);
+ DumpFdt (FdtBlob);
return EFI_SUCCESS;
}
diff --git a/ArmPlatformPkg/Library/EblCmdLib/EblCmdLib.inf b/ArmPlatformPkg/Library/EblCmdLib/EblCmdLib.inf
index 5506c77..c4b2ae1 100644
--- a/ArmPlatformPkg/Library/EblCmdLib/EblCmdLib.inf
+++ b/ArmPlatformPkg/Library/EblCmdLib/EblCmdLib.inf
@@ -61,6 +61,4 @@
[Guids]
gEfiDebugImageInfoTableGuid
-
-[Pcd]
- gArmPlatformTokenSpaceGuid.PcdFdtDevicePath
+ gFdtTableGuid