1 /* 2 * SPDX-License-Identifier: BSD-3-Clause 3 * SPDX-FileCopyrightText: Copyright TF-RMM Contributors. 4 */ 5 6 #ifndef APP_HEADER_H 7 #define APP_HEADER_H 8 9 #ifndef __ASSEMBLER__ 10 #include <app_header_structures.h> 11 #include <stddef.h> 12 #include <stdint.h> 13 #endif 14 15 #define APP_COUNT 3U 16 17 #ifndef __ASSEMBLER__ 18 19 /* 20 * Return the RMM image start address. 21 * 22 * Return: 23 * - The physical address of the start of the RMM image. 24 */ 25 uint64_t app_get_rmm_start(void); 26 27 /* 28 * Return a pointer to the app_header structure at an index. 29 * 30 * Arguments: 31 * - app_idx: The index of the app 32 * - app_header: Out parameter, pointer to the app header of the `app_idx`. 33 * 34 * Return: 35 * - 0 on success or a negative POSIX error otherwise. 36 */ 37 int app_get_header_ptr_at_index(unsigned long app_index, struct app_header **app_header); 38 39 /* 40 * Initialise the internal app header structures. 41 * 42 * This function must be called once during cold boot to initialise the internal 43 * app header structures. 44 */ 45 void app_info_setup(void); 46 #endif 47 48 #endif /* APP_HEADER_H */ 49