]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmVExpressInternal.h
ArmPlatformPkg/ArmVExpressDxe: Load FDT into the EFI Configuration Table
[mirror_edk2.git] / ArmPlatformPkg / ArmVExpressPkg / ArmVExpressDxe / ArmVExpressInternal.h
CommitLineData
dff72027
OM
1/** @file\r
2\r
04f1a709 3 Copyright (c) 2014-2015, ARM Ltd. All rights reserved.\r
dff72027
OM
4\r
5 This program and the accompanying materials are licensed and made available\r
6 under the terms and conditions of the BSD License which accompanies this\r
7 distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT\r
11 WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
15#ifndef __ARM_VEXPRESS_INTERNAL_H__\r
16#define __ARM_VEXPRESS_INTERNAL_H__\r
17\r
18#include <Uefi.h>\r
19\r
20#include <Library/ArmLib.h>\r
21#include <Library/DebugLib.h>\r
22#include <Library/IoLib.h>\r
23#include <Library/PcdLib.h>\r
24#include <Library/UefiBootServicesTableLib.h>\r
25#include <Library/UefiLib.h>\r
26\r
27#include <VExpressMotherBoard.h>\r
28\r
29// This 'enum' is needed as variations based on existing platform exist\r
30typedef enum {\r
31 ARM_FVP_VEXPRESS_UNKNOWN = 0,\r
32 ARM_FVP_VEXPRESS_A9x4,\r
33 ARM_FVP_VEXPRESS_A15x1,\r
34 ARM_FVP_VEXPRESS_A15x2,\r
35 ARM_FVP_VEXPRESS_A15x4,\r
36 ARM_FVP_VEXPRESS_A15x1_A7x1,\r
37 ARM_FVP_VEXPRESS_A15x4_A7x4,\r
38 ARM_FVP_VEXPRESS_AEMv8x4,\r
d0c1d371
OM
39 ARM_FVP_BASE_AEMv8x4_AEMv8x4_GICV2,\r
40 ARM_FVP_BASE_AEMv8x4_AEMv8x4_GICV2_LEGACY,\r
41 ARM_FVP_BASE_AEMv8x4_AEMv8x4_GICV3,\r
42 ARM_FVP_FOUNDATION_GICV2,\r
43 ARM_FVP_FOUNDATION_GICV2_LEGACY,\r
44 ARM_FVP_FOUNDATION_GICV3,\r
dff72027
OM
45 ARM_HW_A9x4,\r
46 ARM_HW_A15x2_A7x3,\r
47 ARM_HW_A15,\r
48 ARM_HW_A5\r
49} ARM_VEXPRESS_PLATFORM_ID;\r
50\r
51typedef struct {\r
52 ARM_VEXPRESS_PLATFORM_ID Id;\r
04f1a709
RC
53\r
54 // Flattened Device Tree (FDT) File\r
55 EFI_GUID FdtGuid; /// Name of the FDT when present into the FV\r
56 CONST CHAR16* FdtName; /// Name of the FDT when present into a File System\r
dff72027
OM
57} ARM_VEXPRESS_PLATFORM;\r
58\r
59// Array that contains the list of the VExpress based platform supported by this DXE driver\r
60extern CONST ARM_VEXPRESS_PLATFORM ArmVExpressPlatforms[];\r
61\r
62/**\r
63 Get information about the VExpress platform the firmware is running on given its Id.\r
64\r
65 @param[in] PlatformId Id of the VExpress platform.\r
66 @param[out] Platform Address where the pointer to the platform information\r
67 (type ARM_VEXPRESS_PLATFORM*) should be stored.\r
68 The returned pointer does not point to an allocated\r
69 memory area.\r
70\r
71 @retval EFI_SUCCESS The platform information was returned.\r
72 @retval EFI_NOT_FOUND The platform was not recognised.\r
73\r
74**/\r
75EFI_STATUS\r
76ArmVExpressGetPlatformFromId (\r
77 IN CONST ARM_VEXPRESS_PLATFORM_ID PlatformId,\r
78 OUT CONST ARM_VEXPRESS_PLATFORM** Platform\r
79 );\r
80\r
81/**\r
82\r
83 Get information about the VExpress platform the firmware is running on.\r
84\r
85 @param[out] Platform Address where the pointer to the platform information\r
86 (type ARM_VEXPRESS_PLATFORM*) should be stored.\r
87 The returned pointer does not point to an allocated\r
88 memory area.\r
89\r
90 @retval EFI_SUCCESS The platform information was returned.\r
91 @retval EFI_NOT_FOUND The platform was not recognised.\r
92\r
93**/\r
94EFI_STATUS\r
95ArmVExpressGetPlatform (\r
96 OUT CONST ARM_VEXPRESS_PLATFORM** Platform\r
97 );\r
98\r
99#endif // __ARM_VEXPRESS_INTERNAL_H__\r