Revert "ArmPlatformPkg/ArmVExpressDxe: Change FDT default file names."
This reverts commit SVN rev17862. The former commit was breaking the build when DTB_DIR is defined. It has been the patch would be reverted for the time being. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <Olivier.Martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17889 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
committed by
oliviermartin
parent
41a55ffe79
commit
51dc120608
@@ -24,7 +24,6 @@
|
||||
#include <Protocol/FirmwareVolume2.h>
|
||||
|
||||
#define ARM_FVP_BASE_VIRTIO_BLOCK_BASE 0x1c130000
|
||||
STATIC CONST CHAR16 *mFdtFallbackName = L"fdt.dtb";
|
||||
|
||||
#pragma pack(1)
|
||||
typedef struct {
|
||||
@@ -156,20 +155,16 @@ ArmFvpInitialise (
|
||||
IN EFI_SYSTEM_TABLE *SystemTable
|
||||
)
|
||||
{
|
||||
CONST ARM_VEXPRESS_PLATFORM* Platform;
|
||||
EFI_STATUS Status;
|
||||
CONST ARM_VEXPRESS_PLATFORM *Platform;
|
||||
BOOLEAN NeedFallback;
|
||||
UINTN TextDevicePathBaseSize;
|
||||
UINTN TextDevicePathSize;
|
||||
CHAR16 *TextDevicePath;
|
||||
UINTN TextDevicePathSize;
|
||||
VOID *Buffer;
|
||||
EFI_DEVICE_PATH *FdtDevicePath;
|
||||
|
||||
Status = gBS->InstallProtocolInterface (
|
||||
&ImageHandle,
|
||||
&gEfiDevicePathProtocolGuid, EFI_NATIVE_INTERFACE,
|
||||
&mVirtioBlockDevicePath
|
||||
);
|
||||
Status = gBS->InstallProtocolInterface (&ImageHandle,
|
||||
&gEfiDevicePathProtocolGuid, EFI_NATIVE_INTERFACE,
|
||||
&mVirtioBlockDevicePath);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
@@ -185,32 +180,13 @@ ArmFvpInitialise (
|
||||
}
|
||||
FreePool (FdtDevicePath);
|
||||
} else {
|
||||
//
|
||||
// In the case of the FVP base and foundation platforms, two default
|
||||
// text device paths for the FDT are defined. The first one, like every
|
||||
// other platform, ends with a file name that identifies the platform. The
|
||||
// second one ends with the fallback file name "fdt.dtb" for historical
|
||||
// backward compatibility reasons.
|
||||
//
|
||||
NeedFallback = (Platform->Id == ARM_FVP_BASE) ||
|
||||
(Platform->Id == ARM_FVP_FOUNDATION);
|
||||
|
||||
TextDevicePathBaseSize = StrSize ((CHAR16*)PcdGetPtr (PcdFvpFdtDevicePathsBase)) - sizeof (CHAR16);
|
||||
TextDevicePathSize = TextDevicePathBaseSize + StrSize (Platform->FdtName);
|
||||
if (NeedFallback) {
|
||||
TextDevicePathSize += TextDevicePathBaseSize + StrSize (mFdtFallbackName);
|
||||
}
|
||||
TextDevicePathSize = StrSize ((CHAR16*)PcdGetPtr (PcdFvpFdtDevicePathsBase)) - sizeof (CHAR16);
|
||||
TextDevicePathSize += StrSize (Platform->FdtName);
|
||||
|
||||
TextDevicePath = AllocatePool (TextDevicePathSize);
|
||||
if (TextDevicePath != NULL) {
|
||||
StrCpy (TextDevicePath, ((CHAR16*)PcdGetPtr (PcdFvpFdtDevicePathsBase)));
|
||||
StrCat (TextDevicePath, Platform->FdtName);
|
||||
|
||||
if (NeedFallback) {
|
||||
StrCat (TextDevicePath, L";");
|
||||
StrCat (TextDevicePath, ((CHAR16*)PcdGetPtr (PcdFvpFdtDevicePathsBase)));
|
||||
StrCat (TextDevicePath, mFdtFallbackName);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (TextDevicePath != NULL) {
|
||||
@@ -222,11 +198,6 @@ ArmFvpInitialise (
|
||||
));
|
||||
}
|
||||
FreePool (TextDevicePath);
|
||||
} else {
|
||||
DEBUG ((
|
||||
EFI_D_ERROR,
|
||||
"ArmFvpDxe: Setting of FDT device path in PcdFdtDevicePaths failed - %r\n", EFI_OUT_OF_RESOURCES
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user