3 Copyright (c) 2014, ARM Ltd. All rights reserved.
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
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.
15 #include "ArmVExpressInternal.h"
18 Get information about the VExpress platform the firmware is running on given its Id.
20 @param[in] PlatformId Id of the VExpress platform.
21 @param[out] Platform Address where the pointer to the platform information
22 (type ARM_VEXPRESS_PLATFORM*) should be stored.
23 The returned pointer does not point to an allocated
26 @retval EFI_SUCCESS The platform information was returned.
27 @retval EFI_NOT_FOUND The platform was not recognised.
31 ArmVExpressGetPlatformFromId (
32 IN CONST ARM_VEXPRESS_PLATFORM_ID PlatformId
,
33 OUT CONST ARM_VEXPRESS_PLATFORM
** Platform
38 ASSERT (Platform
!= NULL
);
40 for (Index
= 0; ArmVExpressPlatforms
[Index
].Id
!= ARM_FVP_VEXPRESS_UNKNOWN
; Index
++) {
41 if (ArmVExpressPlatforms
[Index
].Id
== PlatformId
) {
42 *Platform
= &ArmVExpressPlatforms
[Index
];