1 /*
2  * Copyright (c) 2024 HPMicro
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  *
6  */
7 
8 #ifndef HPM_MISC_H
9 #define HPM_MISC_H
10 
11 #define CORE0_ILM_LOCAL_BASE   (0x00000000U)
12 #define CORE0_ILM_SIZE_IN_BYTE (0x00040000U)
13 #define CORE0_DLM_LOCAL_BASE   (0x00200000U)
14 #define CORE0_DLM_SIZE_IN_BYTE (0x00040000U)
15 #define CORE1_ILM_LOCAL_BASE   (0x00040000U)
16 #define CORE1_ILM_SIZE_IN_BYTE (0x00040000U)
17 #define CORE1_DLM_LOCAL_BASE   (0x00240000U)
18 #define CORE1_DLM_SIZE_IN_BYTE (0x00040000U)
19 
20 #define CORE0_ILM_SYSTEM_BASE  (0x00000000U)
21 #define CORE0_DLM_SYSTEM_BASE  (0x00200000U)
22 #define CORE1_ILM_SYSTEM_BASE  (0x00040000U)
23 #define CORE1_DLM_SYSTEM_BASE  (0x00240000U)
24 
25 #define HPM_CORE0 (0U)
26 #define HPM_CORE1 (1U)
27 
28 /* map core local memory(DLM/ILM) to system address */
core_local_mem_to_sys_address(uint8_t core_id,uint32_t addr)29 static inline uint32_t core_local_mem_to_sys_address(uint8_t core_id, uint32_t addr)
30 {
31     (void) core_id;
32     return addr;
33 }
34 
35 /* map system address to core local memory(DLM/ILM) */
sys_address_to_core_local_mem(uint8_t core_id,uint32_t addr)36 static inline uint32_t sys_address_to_core_local_mem(uint8_t core_id, uint32_t addr)
37 {
38     (void) core_id;
39     return addr;
40 }
41 #endif /* HPM_MISC_H */
42