summaryrefslogtreecommitdiff
path: root/ArmPlatformPkg/Bds/Bds.c
diff options
context:
space:
mode:
Diffstat (limited to 'ArmPlatformPkg/Bds/Bds.c')
-rw-r--r--ArmPlatformPkg/Bds/Bds.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/ArmPlatformPkg/Bds/Bds.c b/ArmPlatformPkg/Bds/Bds.c
index fe463774e..129c7b1d9 100644
--- a/ArmPlatformPkg/Bds/Bds.c
+++ b/ArmPlatformPkg/Bds/Bds.c
@@ -268,8 +268,13 @@ DefineDefaultBootEntries (
CmdLineSize = AsciiStrSize ((CHAR8*)PcdGetPtr(PcdDefaultBootArgument));
InitrdPath = EfiDevicePathFromTextProtocol->ConvertTextToDevicePath ((CHAR16*)PcdGetPtr(PcdDefaultBootInitrdPath));
InitrdSize = GetDevicePathSize (InitrdPath);
- FdtLocalPath = EfiDevicePathFromTextProtocol->ConvertTextToDevicePath ((CHAR16*)PcdGetPtr(PcdFdtLocalDevicePath));
- FdtLocalSize = GetDevicePathSize (FdtLocalPath);
+ if (BootType == BDS_LOADER_KERNEL_LINUX_LOCAL_FDT) {
+ FdtLocalPath = EfiDevicePathFromTextProtocol->ConvertTextToDevicePath ((CHAR16*)PcdGetPtr(PcdDefaultFdtLocalDevicePath));
+ FdtLocalSize = GetDevicePathSize (FdtLocalPath);
+ } else {
+ FdtLocalPath = NULL;
+ FdtLocalSize = 0;
+ }
BootArguments = (ARM_BDS_LOADER_ARGUMENTS*)AllocatePool (sizeof(ARM_BDS_LOADER_ARGUMENTS) + CmdLineSize + InitrdSize + FdtLocalSize);
BootArguments->LinuxArguments.CmdLineSize = CmdLineSize;