ArmPlatformPkg/ArmVExpressDxe: Load FDT into the EFI Configuration Table
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@16937 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
committed by
oliviermartin
parent
d550b88184
commit
04f1a7096a
@@ -23,14 +23,14 @@
|
||||
// model or hardware platforms).
|
||||
//
|
||||
CONST ARM_VEXPRESS_PLATFORM ArmVExpressPlatforms[] = {
|
||||
{ ARM_FVP_VEXPRESS_AEMv8x4 },
|
||||
{ ARM_FVP_BASE_AEMv8x4_AEMv8x4_GICV2 },
|
||||
{ ARM_FVP_BASE_AEMv8x4_AEMv8x4_GICV2_LEGACY },
|
||||
{ ARM_FVP_BASE_AEMv8x4_AEMv8x4_GICV3 },
|
||||
{ ARM_FVP_FOUNDATION_GICV2 },
|
||||
{ ARM_FVP_FOUNDATION_GICV2_LEGACY },
|
||||
{ ARM_FVP_FOUNDATION_GICV3 },
|
||||
{ ARM_FVP_VEXPRESS_UNKNOWN }
|
||||
{ ARM_FVP_VEXPRESS_AEMv8x4, { 0x240d627e, 0xeb4d, 0x447d, { 0x86, 0x30, 0xf2, 0x12, 0x3b, 0xc3, 0x89, 0x3f } }, L"rtsm_ve-aemv8a.dtb" },
|
||||
{ ARM_FVP_BASE_AEMv8x4_AEMv8x4_GICV2, { 0xfbed0b94, 0x3c81, 0x49e4, { 0xbd, 0xec, 0xd4, 0xf4, 0xa8, 0x47, 0xeb, 0x51 } }, L"fvp-base-gicv2-psci.dtb" },
|
||||
{ ARM_FVP_BASE_AEMv8x4_AEMv8x4_GICV2_LEGACY, { 0x6d8dfd91, 0x431a, 0x4e6c, { 0x84, 0x5a, 0x15, 0xf1, 0xfc, 0x8d, 0x9b, 0xe2 } }, L"fvp-base-gicv2legacy-psci.dtb" },
|
||||
{ ARM_FVP_BASE_AEMv8x4_AEMv8x4_GICV3, { 0xa8ac2953, 0xc4bb, 0x4914, { 0x87, 0xf5, 0xc5, 0x97, 0x5d, 0x7b, 0x32, 0xd1 } }, L"fvp-base-gicv3-psci.dtb" },
|
||||
{ ARM_FVP_FOUNDATION_GICV2, { 0x4328cb83, 0x6e50, 0x4cb8, { 0xaa, 0x8c, 0xfb, 0x7a, 0xba, 0xba, 0x37, 0xd8 } }, L"fvp-foundation-gicv2-psci.dtb" },
|
||||
{ ARM_FVP_FOUNDATION_GICV2_LEGACY, { 0x6af00d18, 0x6dfe, 0x45ed, { 0xa6, 0xc4, 0xb4, 0x4d, 0x57, 0xfd, 0xd8, 0xf5 } }, L"fvp-foundation-gicv2legacy-psci.dtb" },
|
||||
{ ARM_FVP_FOUNDATION_GICV3, { 0x4a17b7fa, 0xf052, 0x4dc1, { 0x92, 0x79, 0x43, 0x80, 0x92, 0x41, 0xf9, 0x98 } }, L"fvp-foundation-gicv3-psci.dtb" },
|
||||
{ ARM_FVP_VEXPRESS_UNKNOWN, { 0x0, 0x0, 0x0, { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } } }
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -23,11 +23,11 @@
|
||||
// model or hardware platforms).
|
||||
//
|
||||
CONST ARM_VEXPRESS_PLATFORM ArmVExpressPlatforms[] = {
|
||||
{ ARM_FVP_VEXPRESS_A9x4 },
|
||||
{ ARM_FVP_VEXPRESS_A15x1 },
|
||||
{ ARM_FVP_VEXPRESS_A15x2 },
|
||||
{ ARM_FVP_VEXPRESS_A15x4 },
|
||||
{ ARM_FVP_VEXPRESS_UNKNOWN }
|
||||
{ ARM_FVP_VEXPRESS_A9x4, { 0x943f2ae9, 0x51b2, 0x48b2, { 0x82, 0xc4, 0x9a, 0xeb, 0x2c, 0x21, 0xd8, 0xe1 } }, L"rtsm_ve-cortex_a9x4.dtb" },
|
||||
{ ARM_FVP_VEXPRESS_A15x1, { 0x581930c3, 0x9f53, 0x4c53, { 0x91, 0x23, 0x43, 0xb8, 0x65, 0xdf, 0x3f, 0x23} }, L"rtsm_ve-cortex_a15x1.dtb" },
|
||||
{ ARM_FVP_VEXPRESS_A15x2, { 0x3f10b34a, 0xa310, 0x472c, { 0xac, 0xb9, 0x36, 0x0b, 0x1d, 0xb5, 0x7a, 0x8b} }, L"rtsm_ve-cortex_a15x2.dtb" },
|
||||
{ ARM_FVP_VEXPRESS_A15x4, { 0x9a783838, 0x8a77, 0x4cdb, { 0x82, 0xa4, 0x35, 0x91, 0x2c, 0x08, 0x8a, 0x2e} }, L"rtsm_ve-cortex_a15x4.dtb" },
|
||||
{ ARM_FVP_VEXPRESS_UNKNOWN, { 0x0, 0x0, 0x0, { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } } }
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/** @file
|
||||
|
||||
Copyright (c) 2013-2014, ARM Ltd. All rights reserved.<BR>
|
||||
Copyright (c) 2013-2015, ARM Ltd. All rights reserved.<BR>
|
||||
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
#include <Library/VirtioMmioDeviceLib.h>
|
||||
#include <Library/ArmShellCmdLib.h>
|
||||
#include <Library/MemoryAllocationLib.h>
|
||||
|
||||
#define ARM_FVP_BASE_VIRTIO_BLOCK_BASE 0x1c130000
|
||||
|
||||
@@ -49,6 +50,10 @@ VIRTIO_BLK_DEVICE_PATH mVirtioBlockDevicePath =
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Generic UEFI Entrypoint for 'ArmFvpDxe' driver
|
||||
* See UEFI specification for the details of the parameters
|
||||
*/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ArmFvpInitialise (
|
||||
@@ -56,7 +61,11 @@ ArmFvpInitialise (
|
||||
IN EFI_SYSTEM_TABLE *SystemTable
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
CONST ARM_VEXPRESS_PLATFORM* Platform;
|
||||
EFI_STATUS Status;
|
||||
CHAR16 *TextDevicePath;
|
||||
UINTN TextDevicePathSize;
|
||||
VOID *Buffer;
|
||||
|
||||
Status = gBS->InstallProtocolInterface (&ImageHandle,
|
||||
&gEfiDevicePathProtocolGuid, EFI_NATIVE_INTERFACE,
|
||||
@@ -65,6 +74,26 @@ ArmFvpInitialise (
|
||||
return Status;
|
||||
}
|
||||
|
||||
Status = ArmVExpressGetPlatform (&Platform);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
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);
|
||||
Buffer = PcdSetPtr (PcdFdtDevicePaths, &TextDevicePathSize, TextDevicePath);
|
||||
if (Buffer == NULL) {
|
||||
DEBUG ((
|
||||
EFI_D_ERROR,
|
||||
"ArmFvpDxe: Setting of FDT device path in PcdFdtDevicePaths failed - %r\n", EFI_BUFFER_TOO_SMALL
|
||||
));
|
||||
}
|
||||
FreePool (TextDevicePath);
|
||||
}
|
||||
}
|
||||
|
||||
// Declare the Virtio BlockIo device
|
||||
Status = VirtioMmioInstallDevice (ARM_FVP_BASE_VIRTIO_BLOCK_BASE, ImageHandle);
|
||||
if (EFI_ERROR (Status)) {
|
||||
|
@@ -35,16 +35,25 @@
|
||||
ArmPkg/ArmPkg.dec
|
||||
ArmPlatformPkg/ArmPlatformPkg.dec
|
||||
ArmPlatformPkg/ArmVExpressPkg/ArmVExpressPkg.dec
|
||||
EmbeddedPkg/EmbeddedPkg.dec
|
||||
OvmfPkg/OvmfPkg.dec
|
||||
|
||||
[LibraryClasses]
|
||||
PcdLib
|
||||
ArmShellCmdRunAxfLib
|
||||
ArmLib
|
||||
ArmPlatformLib
|
||||
BaseMemoryLib
|
||||
MemoryAllocationLib
|
||||
UefiDriverEntryPoint
|
||||
UefiBootServicesTableLib
|
||||
VirtioMmioDeviceLib
|
||||
|
||||
[LibraryClasses.AARCH64]
|
||||
ArmGicLib
|
||||
|
||||
[FixedPcd]
|
||||
gArmVExpressTokenSpaceGuid.PcdFvpFdtDevicePathsBase
|
||||
|
||||
[Pcd]
|
||||
gEmbeddedTokenSpaceGuid.PcdFdtDevicePaths
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/** @file
|
||||
|
||||
Copyright (c) 2013-2014, ARM Ltd. All rights reserved.<BR>
|
||||
Copyright (c) 2013-2015, ARM Ltd. All rights reserved.<BR>
|
||||
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -23,11 +23,11 @@
|
||||
// model or hardware platforms).
|
||||
//
|
||||
CONST ARM_VEXPRESS_PLATFORM ArmVExpressPlatforms[] = {
|
||||
{ ARM_HW_A9x4 },
|
||||
{ ARM_HW_A15x2_A7x3 },
|
||||
{ ARM_HW_A15 },
|
||||
{ ARM_HW_A5 },
|
||||
{ ARM_FVP_VEXPRESS_UNKNOWN }
|
||||
{ ARM_HW_A9x4, { 0x2fd21cf6, 0xe6e8, 0x4ff2, { 0xa9, 0xca, 0x3b, 0x9f, 0x00, 0xe9, 0x28, 0x89 } }, L"vexpress-v2p-ca9.dtb" },
|
||||
{ ARM_HW_A15x2_A7x3, { 0xd5e606eb, 0x83df, 0x4e90, { 0x81, 0xe8, 0xc3, 0xdb, 0x2f, 0x77, 0x17, 0x9a } }, L"vexpress-v2p-ca15_a7.dtb" },
|
||||
{ ARM_HW_A15, { 0x6b8947c2, 0x4287, 0x4d91, { 0x8f, 0xe0, 0xa3, 0x81, 0xea, 0x5b, 0x56, 0x8f } }, L"vexpress-v2p-ca15-tc1.dtb" },
|
||||
{ ARM_HW_A5, { 0xa2cc7663, 0x4d7c, 0x448a, { 0xaa, 0xb5, 0x4c, 0x03, 0x4b, 0x6f, 0xda, 0xb7 } }, L"vexpress-v2p-ca5s.dtb" },
|
||||
{ ARM_FVP_VEXPRESS_UNKNOWN, { 0x0, 0x0, 0x0, { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } } }
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -49,6 +49,10 @@ ArmVExpressGetPlatform (
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generic UEFI Entrypoint for 'ArmHwDxe' driver
|
||||
* See UEFI specification for the details of the parameters
|
||||
*/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
ArmHwInitialise (
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#/** @file
|
||||
#
|
||||
# Copyright (c) 2013-2014, ARM Ltd. All rights reserved.<BR>
|
||||
# Copyright (c) 2013-2015, ARM Ltd. All rights reserved.<BR>
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
[Defines]
|
||||
INF_VERSION = 0x00010006
|
||||
BASE_NAME = ArmFvpDxe
|
||||
BASE_NAME = ArmHwDxe
|
||||
FILE_GUID = fe61bb5f-1b67-4c24-b346-73db42e873e5
|
||||
MODULE_TYPE = UEFI_DRIVER
|
||||
VERSION_STRING = 1.0
|
||||
@@ -27,8 +27,13 @@
|
||||
[Packages]
|
||||
ArmPkg/ArmPkg.dec
|
||||
ArmPlatformPkg/ArmPlatformPkg.dec
|
||||
EmbeddedPkg/EmbeddedPkg.dec
|
||||
MdePkg/MdePkg.dec
|
||||
|
||||
[LibraryClasses]
|
||||
ArmShellCmdRunAxfLib
|
||||
MemoryAllocationLib
|
||||
UefiDriverEntryPoint
|
||||
|
||||
[Protocols]
|
||||
gEfiDevicePathProtocolGuid
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/** @file
|
||||
|
||||
Copyright (c) 2014, ARM Ltd. All rights reserved.
|
||||
Copyright (c) 2014-2015, ARM Ltd. All rights reserved.
|
||||
|
||||
This program and the accompanying materials are licensed and made available
|
||||
under the terms and conditions of the BSD License which accompanies this
|
||||
@@ -50,7 +50,10 @@ typedef enum {
|
||||
|
||||
typedef struct {
|
||||
ARM_VEXPRESS_PLATFORM_ID Id;
|
||||
// Will be extended with platform specific information
|
||||
|
||||
// Flattened Device Tree (FDT) File
|
||||
EFI_GUID FdtGuid; /// Name of the FDT when present into the FV
|
||||
CONST CHAR16* FdtName; /// Name of the FDT when present into a File System
|
||||
} ARM_VEXPRESS_PLATFORM;
|
||||
|
||||
// Array that contains the list of the VExpress based platform supported by this DXE driver
|
||||
|
Reference in New Issue
Block a user