diff options
author | Olivier Martin <olivier.martin@arm.com> | 2015-05-11 17:39:56 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@Edk2> | 2015-05-11 17:39:56 +0000 |
commit | f66eab9b9c9ef78e74658e087fe9f711a62fd401 (patch) | |
tree | 0f8738f4280af14f73d7ca4341746fb04f9c3f73 /ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe | |
parent | 459823d9b24cd27e91d264dbd23c9ab699c34307 (diff) | |
download | edk2-platforms-f66eab9b9c9ef78e74658e087fe9f711a62fd401.tar.xz |
ArmPlatformPkg/ArmVExpressPkg: Fixed line endings to be CRLF
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Ronald Cron <Ronald.Cron@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17411 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe')
5 files changed, 148 insertions, 148 deletions
diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/AArch64/ArmFvpDxeAArch64.c b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/AArch64/ArmFvpDxeAArch64.c index f8f5a5ac24..c368957dcd 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/AArch64/ArmFvpDxeAArch64.c +++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/AArch64/ArmFvpDxeAArch64.c @@ -22,14 +22,14 @@ // model or hardware platforms).
//
CONST ARM_VEXPRESS_PLATFORM ArmVExpressPlatforms[] = {
- { ARM_FVP_VEXPRESS_AEMv8x4, FixedPcdGetPtr(PcdFdtFvpVExpressAEMv8x4), L"rtsm_ve-aemv8a.dtb" }, - { ARM_FVP_BASE_AEMv8x4_AEMv8x4_GICV2, FixedPcdGetPtr(PcdFdtFvpBaseAEMv8x4GicV2), L"fvp-base-gicv2-psci.dtb" }, - { ARM_FVP_BASE_AEMv8x4_AEMv8x4_GICV2_LEGACY, FixedPcdGetPtr(PcdFdtFvpBaseAEMv8x4GicV2Legacy), L"fvp-base-gicv2legacy-psci.dtb" }, - { ARM_FVP_BASE_AEMv8x4_AEMv8x4_GICV3, FixedPcdGetPtr(PcdFdtFvpBaseAEMv8x4GicV3), L"fvp-base-gicv3-psci.dtb" }, - { ARM_FVP_FOUNDATION_GICV2, FixedPcdGetPtr(PcdFdtFvpFoundationGicV2), L"fvp-foundation-gicv2-psci.dtb" }, - { ARM_FVP_FOUNDATION_GICV2_LEGACY, FixedPcdGetPtr(PcdFdtFvpFoundationGicV2Legacy), L"fvp-foundation-gicv2legacy-psci.dtb" }, - { ARM_FVP_FOUNDATION_GICV3, FixedPcdGetPtr(PcdFdtFvpFoundationGicV3), L"fvp-foundation-gicv3-psci.dtb" }, - { ARM_FVP_VEXPRESS_UNKNOWN } + { ARM_FVP_VEXPRESS_AEMv8x4, FixedPcdGetPtr (PcdFdtFvpVExpressAEMv8x4), L"rtsm_ve-aemv8a.dtb" },
+ { ARM_FVP_BASE_AEMv8x4_AEMv8x4_GICV2, FixedPcdGetPtr (PcdFdtFvpBaseAEMv8x4GicV2), L"fvp-base-gicv2-psci.dtb" },
+ { ARM_FVP_BASE_AEMv8x4_AEMv8x4_GICV2_LEGACY, FixedPcdGetPtr (PcdFdtFvpBaseAEMv8x4GicV2Legacy), L"fvp-base-gicv2legacy-psci.dtb" },
+ { ARM_FVP_BASE_AEMv8x4_AEMv8x4_GICV3, FixedPcdGetPtr (PcdFdtFvpBaseAEMv8x4GicV3), L"fvp-base-gicv3-psci.dtb" },
+ { ARM_FVP_FOUNDATION_GICV2, FixedPcdGetPtr (PcdFdtFvpFoundationGicV2), L"fvp-foundation-gicv2-psci.dtb" },
+ { ARM_FVP_FOUNDATION_GICV2_LEGACY, FixedPcdGetPtr (PcdFdtFvpFoundationGicV2Legacy), L"fvp-foundation-gicv2legacy-psci.dtb" },
+ { ARM_FVP_FOUNDATION_GICV3, FixedPcdGetPtr (PcdFdtFvpFoundationGicV3), L"fvp-foundation-gicv3-psci.dtb" },
+ { ARM_FVP_VEXPRESS_UNKNOWN }
};
/**
diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/Arm/ArmFvpDxeArm.c b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/Arm/ArmFvpDxeArm.c index 5c7f0326d0..2057c6e215 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/Arm/ArmFvpDxeArm.c +++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/Arm/ArmFvpDxeArm.c @@ -22,11 +22,11 @@ // model or hardware platforms).
//
CONST ARM_VEXPRESS_PLATFORM ArmVExpressPlatforms[] = {
- { ARM_FVP_VEXPRESS_A9x4, FixedPcdGetPtr(PcdFdtVExpressFvpA9x4), L"rtsm_ve-cortex_a9x4.dtb" }, - { ARM_FVP_VEXPRESS_A15x1, FixedPcdGetPtr(PcdFdtVExpressFvpA15x1), L"rtsm_ve-cortex_a15x1.dtb" }, - { ARM_FVP_VEXPRESS_A15x2, FixedPcdGetPtr(PcdFdtVExpressFvpA15x2), L"rtsm_ve-cortex_a15x2.dtb" }, - { ARM_FVP_VEXPRESS_A15x4, FixedPcdGetPtr(PcdFdtVExpressFvpA15x4), L"rtsm_ve-cortex_a15x4.dtb" }, - { ARM_FVP_VEXPRESS_UNKNOWN, } + { ARM_FVP_VEXPRESS_A9x4, FixedPcdGetPtr (PcdFdtVExpressFvpA9x4), L"rtsm_ve-cortex_a9x4.dtb" },
+ { ARM_FVP_VEXPRESS_A15x1, FixedPcdGetPtr (PcdFdtVExpressFvpA15x1), L"rtsm_ve-cortex_a15x1.dtb" },
+ { ARM_FVP_VEXPRESS_A15x2, FixedPcdGetPtr (PcdFdtVExpressFvpA15x2), L"rtsm_ve-cortex_a15x2.dtb" },
+ { ARM_FVP_VEXPRESS_A15x4, FixedPcdGetPtr (PcdFdtVExpressFvpA15x4), L"rtsm_ve-cortex_a15x4.dtb" },
+ { ARM_FVP_VEXPRESS_UNKNOWN, }
};
/**
diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.c b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.c index 79c87bd5ec..8c42814a04 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.c +++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.c @@ -14,14 +14,14 @@ #include "ArmVExpressInternal.h"
-#include <PiDxe.h> -#include <Library/BaseMemoryLib.h> +#include <PiDxe.h>
+#include <Library/BaseMemoryLib.h>
#include <Library/VirtioMmioDeviceLib.h>
#include <Library/ArmShellCmdLib.h>
#include <Library/MemoryAllocationLib.h>
-#include <Library/DevicePathLib.h> - -#include <Protocol/FirmwareVolume2.h> +#include <Library/DevicePathLib.h>
+
+#include <Protocol/FirmwareVolume2.h>
#define ARM_FVP_BASE_VIRTIO_BLOCK_BASE 0x1c130000
@@ -55,95 +55,95 @@ VIRTIO_BLK_DEVICE_PATH mVirtioBlockDevicePath = }
};
-STATIC -EFI_STATUS -InternalFindFdtByGuid ( - IN OUT EFI_DEVICE_PATH **FdtDevicePath, - IN CONST EFI_GUID *FdtGuid - ) -{ - MEDIA_FW_VOL_FILEPATH_DEVICE_PATH FileDevicePath; - EFI_HANDLE *HandleBuffer; - UINTN HandleCount; - UINTN Index; - EFI_FIRMWARE_VOLUME2_PROTOCOL *FvProtocol; - EFI_GUID NameGuid; - UINTN Size; - VOID *Key; - EFI_FV_FILETYPE FileType; - EFI_FV_FILE_ATTRIBUTES Attributes; - EFI_DEVICE_PATH *FvDevicePath; - EFI_STATUS Status; - - if (FdtGuid == NULL) { - return EFI_NOT_FOUND; - } - - EfiInitializeFwVolDevicepathNode (&FileDevicePath, FdtGuid); - - HandleBuffer = NULL; - Status = gBS->LocateHandleBuffer ( - ByProtocol, - &gEfiFirmwareVolume2ProtocolGuid, - NULL, - &HandleCount, - &HandleBuffer - ); - if (EFI_ERROR (Status)) { - return Status; - } - - for (Index = 0; Index < HandleCount; Index++) { - Status = gBS->HandleProtocol ( - HandleBuffer[Index], - &gEfiFirmwareVolume2ProtocolGuid, - (VOID **) &FvProtocol - ); - if (EFI_ERROR (Status)) { - return Status; - } - - // Allocate Key - Key = AllocatePool (FvProtocol->KeySize); - ASSERT (Key != NULL); - ZeroMem (Key, FvProtocol->KeySize); - - do { - FileType = EFI_FV_FILETYPE_RAW; - Status = FvProtocol->GetNextFile (FvProtocol, Key, &FileType, &NameGuid, &Attributes, &Size); - if (Status == EFI_NOT_FOUND) { - break; - } - if (EFI_ERROR (Status)) { - return Status; - } - - // - // Check whether this file is the one we are looking for. If so, - // create a device path for it and return it to the caller. - // - if (CompareGuid (&NameGuid, FdtGuid)) { - Status = gBS->HandleProtocol (HandleBuffer[Index], &gEfiDevicePathProtocolGuid, (VOID **)&FvDevicePath); - if (!EFI_ERROR (Status)) { - *FdtDevicePath = AppendDevicePathNode (FvDevicePath, - (EFI_DEVICE_PATH_PROTOCOL *)&FileDevicePath); - } - goto Done; - } - } while (TRUE); - FreePool (Key); - } - - if (Index == HandleCount) { - Status = EFI_NOT_FOUND; - } - return Status; - -Done: - FreePool (Key); - return Status; -} - +STATIC
+EFI_STATUS
+InternalFindFdtByGuid (
+ IN OUT EFI_DEVICE_PATH **FdtDevicePath,
+ IN CONST EFI_GUID *FdtGuid
+ )
+{
+ MEDIA_FW_VOL_FILEPATH_DEVICE_PATH FileDevicePath;
+ EFI_HANDLE *HandleBuffer;
+ UINTN HandleCount;
+ UINTN Index;
+ EFI_FIRMWARE_VOLUME2_PROTOCOL *FvProtocol;
+ EFI_GUID NameGuid;
+ UINTN Size;
+ VOID *Key;
+ EFI_FV_FILETYPE FileType;
+ EFI_FV_FILE_ATTRIBUTES Attributes;
+ EFI_DEVICE_PATH *FvDevicePath;
+ EFI_STATUS Status;
+
+ if (FdtGuid == NULL) {
+ return EFI_NOT_FOUND;
+ }
+
+ EfiInitializeFwVolDevicepathNode (&FileDevicePath, FdtGuid);
+
+ HandleBuffer = NULL;
+ Status = gBS->LocateHandleBuffer (
+ ByProtocol,
+ &gEfiFirmwareVolume2ProtocolGuid,
+ NULL,
+ &HandleCount,
+ &HandleBuffer
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
+ for (Index = 0; Index < HandleCount; Index++) {
+ Status = gBS->HandleProtocol (
+ HandleBuffer[Index],
+ &gEfiFirmwareVolume2ProtocolGuid,
+ (VOID **) &FvProtocol
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
+ // Allocate Key
+ Key = AllocatePool (FvProtocol->KeySize);
+ ASSERT (Key != NULL);
+ ZeroMem (Key, FvProtocol->KeySize);
+
+ do {
+ FileType = EFI_FV_FILETYPE_RAW;
+ Status = FvProtocol->GetNextFile (FvProtocol, Key, &FileType, &NameGuid, &Attributes, &Size);
+ if (Status == EFI_NOT_FOUND) {
+ break;
+ }
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
+ //
+ // Check whether this file is the one we are looking for. If so,
+ // create a device path for it and return it to the caller.
+ //
+ if (CompareGuid (&NameGuid, FdtGuid)) {
+ Status = gBS->HandleProtocol (HandleBuffer[Index], &gEfiDevicePathProtocolGuid, (VOID **)&FvDevicePath);
+ if (!EFI_ERROR (Status)) {
+ *FdtDevicePath = AppendDevicePathNode (FvDevicePath,
+ (EFI_DEVICE_PATH_PROTOCOL *)&FileDevicePath);
+ }
+ goto Done;
+ }
+ } while (TRUE);
+ FreePool (Key);
+ }
+
+ if (Index == HandleCount) {
+ Status = EFI_NOT_FOUND;
+ }
+ return Status;
+
+Done:
+ FreePool (Key);
+ return Status;
+}
+
/**
* Generic UEFI Entrypoint for 'ArmFvpDxe' driver
* See UEFI specification for the details of the parameters
@@ -160,7 +160,7 @@ ArmFvpInitialise ( CHAR16 *TextDevicePath;
UINTN TextDevicePathSize;
VOID *Buffer;
- EFI_DEVICE_PATH *FdtDevicePath; + EFI_DEVICE_PATH *FdtDevicePath;
Status = gBS->InstallProtocolInterface (&ImageHandle,
&gEfiDevicePathProtocolGuid, EFI_NATIVE_INTERFACE,
@@ -171,24 +171,24 @@ ArmFvpInitialise ( Status = ArmVExpressGetPlatform (&Platform);
if (!EFI_ERROR (Status)) {
- FdtDevicePath = NULL; - Status = InternalFindFdtByGuid (&FdtDevicePath, Platform->FdtGuid); - if (!EFI_ERROR (Status)) { - TextDevicePath = ConvertDevicePathToText (FdtDevicePath, FALSE, FALSE); - if (TextDevicePath != NULL) { - TextDevicePathSize = StrSize (TextDevicePath); - } - FreePool (FdtDevicePath); - } else { - 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); - } - } + FdtDevicePath = NULL;
+ Status = InternalFindFdtByGuid (&FdtDevicePath, Platform->FdtGuid);
+ if (!EFI_ERROR (Status)) {
+ TextDevicePath = ConvertDevicePathToText (FdtDevicePath, FALSE, FALSE);
+ if (TextDevicePath != NULL) {
+ TextDevicePathSize = StrSize (TextDevicePath);
+ }
+ FreePool (FdtDevicePath);
+ } else {
+ 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 (TextDevicePath != NULL) {
Buffer = PcdSetPtr (PcdFdtDevicePaths, &TextDevicePathSize, TextDevicePath);
if (Buffer == NULL) {
diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.inf b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.inf index 07328340f3..327c5101dd 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.inf +++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.inf @@ -49,32 +49,32 @@ UefiDriverEntryPoint
UefiBootServicesTableLib
VirtioMmioDeviceLib
- DevicePathLib + DevicePathLib
[LibraryClasses.AARCH64]
ArmGicLib
-[Protocols] - gEfiFirmwareVolume2ProtocolGuid - gEfiDevicePathProtocolGuid - +[Protocols]
+ gEfiFirmwareVolume2ProtocolGuid
+ gEfiDevicePathProtocolGuid
+
[FixedPcd]
gArmVExpressTokenSpaceGuid.PcdFvpFdtDevicePathsBase
-[FixedPcd.ARM] - gArmVExpressTokenSpaceGuid.PcdFdtVExpressFvpA9x4 - gArmVExpressTokenSpaceGuid.PcdFdtVExpressFvpA15x1 - gArmVExpressTokenSpaceGuid.PcdFdtVExpressFvpA15x2 - gArmVExpressTokenSpaceGuid.PcdFdtVExpressFvpA15x4 - -[FixedPcd.AARCH64] - gArmVExpressTokenSpaceGuid.PcdFdtFvpVExpressAEMv8x4 - gArmVExpressTokenSpaceGuid.PcdFdtFvpBaseAEMv8x4GicV2 - gArmVExpressTokenSpaceGuid.PcdFdtFvpBaseAEMv8x4GicV2Legacy - gArmVExpressTokenSpaceGuid.PcdFdtFvpBaseAEMv8x4GicV3 - gArmVExpressTokenSpaceGuid.PcdFdtFvpFoundationGicV2 - gArmVExpressTokenSpaceGuid.PcdFdtFvpFoundationGicV2Legacy - gArmVExpressTokenSpaceGuid.PcdFdtFvpFoundationGicV3 - +[FixedPcd.ARM]
+ gArmVExpressTokenSpaceGuid.PcdFdtVExpressFvpA9x4
+ gArmVExpressTokenSpaceGuid.PcdFdtVExpressFvpA15x1
+ gArmVExpressTokenSpaceGuid.PcdFdtVExpressFvpA15x2
+ gArmVExpressTokenSpaceGuid.PcdFdtVExpressFvpA15x4
+
+[FixedPcd.AARCH64]
+ gArmVExpressTokenSpaceGuid.PcdFdtFvpVExpressAEMv8x4
+ gArmVExpressTokenSpaceGuid.PcdFdtFvpBaseAEMv8x4GicV2
+ gArmVExpressTokenSpaceGuid.PcdFdtFvpBaseAEMv8x4GicV2Legacy
+ gArmVExpressTokenSpaceGuid.PcdFdtFvpBaseAEMv8x4GicV3
+ gArmVExpressTokenSpaceGuid.PcdFdtFvpFoundationGicV2
+ gArmVExpressTokenSpaceGuid.PcdFdtFvpFoundationGicV2Legacy
+ gArmVExpressTokenSpaceGuid.PcdFdtFvpFoundationGicV3
+
[Pcd]
gEmbeddedTokenSpaceGuid.PcdFdtDevicePaths
diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmVExpressInternal.h b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmVExpressInternal.h index 57b9b9eb05..e123eea2d2 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmVExpressInternal.h +++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmVExpressInternal.h @@ -52,8 +52,8 @@ typedef struct { ARM_VEXPRESS_PLATFORM_ID Id;
// Flattened Device Tree (FDT) File
- CONST 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 + CONST 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
|