1 /* 2 * SPDX-License-Identifier: BSD-3-Clause 3 * SPDX-FileCopyrightText: Copyright TF-RMM Contributors. 4 */ 5 #ifndef PLATFORM_API_H 6 #define PLATFORM_API_H 7 8 #include <stdint.h> 9 10 void plat_warmboot_setup(uint64_t x0, uint64_t x1, uint64_t x2, uint64_t x3); 11 void plat_setup(uint64_t x0, uint64_t x1, uint64_t x2, uint64_t x3); 12 13 /* 14 * Takes an aligned granule address, validates it and if valid returns the 15 * index in the struct granules array or UINT64_MAX in case of an error. 16 * 17 * This function also validates that the granule address is a valid 18 * page address. 19 */ 20 unsigned long plat_granule_addr_to_idx(unsigned long addr); 21 22 /* 23 * Takes an index in the struct granules array and returns the aligned granule 24 * address. The index must be within the number of granules expected by the 25 * platform. 26 */ 27 unsigned long plat_granule_idx_to_addr(unsigned long idx); 28 29 #endif /* PLATFORM_API_H */ 30