mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-19 11:04:20 +00:00

The platform io policies array is now always accessed through a fconf getter. This gives us an ideal spot to check for out-of-bound accesses. Remove the assertion in plat_get_image_source(), which is now redundant. Change-Id: Iefe808d530229073b68cbd164d927b8b6662a217 Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
29 lines
593 B
C
29 lines
593 B
C
/*
|
|
* Copyright (c) 2019-2020, ARM Limited. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef ARM_FCONF_GETTER
|
|
#define ARM_FCONF_GETTER
|
|
|
|
#include <assert.h>
|
|
|
|
#include <lib/fconf/fconf.h>
|
|
|
|
/* ARM io policies */
|
|
#define arm__io_policies_getter(id) __extension__ ({ \
|
|
assert((id) < MAX_NUMBER_IDS); \
|
|
&policies[id]; \
|
|
})
|
|
|
|
struct plat_io_policy {
|
|
uintptr_t *dev_handle;
|
|
uintptr_t image_spec;
|
|
int (*check)(const uintptr_t spec);
|
|
};
|
|
|
|
extern struct plat_io_policy policies[];
|
|
int fconf_populate_arm_io_policies(uintptr_t config);
|
|
|
|
#endif /* ARM_FCONF_GETTER */
|