1 /*
2  * Copyright (c) 2021-2022, Arm Limited. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  *
6  */
7 
8 #ifndef __MMIO_DEFS_H__
9 #define __MMIO_DEFS_H__
10 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 #include <stdint.h>
16 #include "tfm_peripherals_def.h"
17 
18 /* Boundary handle binding macros. */
19 #define HANDLE_ATTR_PRIV_POS            1U
20 #define HANDLE_ATTR_PRIV_MASK           (0x1UL << HANDLE_ATTR_PRIV_POS)
21 #define HANDLE_ATTR_NS_POS              0U
22 #define HANDLE_ATTR_NS_MASK             (0x1UL << HANDLE_ATTR_NS_POS)
23 
24 /* Allowed named MMIO of this platform */
25 const uintptr_t partition_named_mmio_list[] = {
26     (uintptr_t)TFM_PERIPHERAL_TIMER0,
27     (uintptr_t)TFM_PERIPHERAL_STD_UART,
28 #ifdef PSA_API_TEST_IPC
29     (uintptr_t)FF_TEST_UART_REGION,
30     (uintptr_t)FF_TEST_WATCHDOG_REGION,
31     (uintptr_t)FF_TEST_NVMEM_REGION,
32     (uintptr_t)FF_TEST_SERVER_PARTITION_MMIO,
33     (uintptr_t)FF_TEST_DRIVER_PARTITION_MMIO,
34 #endif
35 };
36 
37 /*
38  * Platform MUSCA_S1 only has named MMIO.
39  * If the platform has numbered MMIO, define them in another list.
40  */
41 
42 #ifdef __cplusplus
43 }
44 #endif
45 
46 #endif /* __MMIO_DEFS_H__ */
47