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