1 /* 2 * Copyright (c) 2021 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 (0x0U) 12 #define CORE0_ILM_SIZE_IN_BYTE (0x20000U) 13 #define CORE0_DLM_LOCAL_BASE (0x80000U) 14 #define CORE0_DLM_SIZE_IN_BYTE (0x20000U) 15 #define CORE1_ILM_LOCAL_BASE (0x20000U) 16 #define CORE1_ILM_SIZE_IN_BYTE (0x20000U) 17 #define CORE1_DLM_LOCAL_BASE (0xA0000U) 18 #define CORE1_DLM_SIZE_IN_BYTE (0x20000U) 19 #define CORE0_ILM_SYSTEM_BASE (0x0U) 20 #define CORE0_DLM_SYSTEM_BASE (0x80000U) 21 #define CORE1_ILM_SYSTEM_BASE (0x20000U) 22 #define CORE1_DLM_SYSTEM_BASE (0xA0000U) 23 24 #define HPM_CORE0 (0U) 25 #define HPM_CORE1 (1U) 26 27 /* map core local memory(DLM/ILM) to system address */ core_local_mem_to_sys_address(uint8_t core_id,uint32_t addr)28static inline uint32_t core_local_mem_to_sys_address(uint8_t core_id, uint32_t addr) 29 { 30 (void) core_id; 31 return addr; 32 } 33 34 /* map system address to core local memory(DLM/ILM) */ sys_address_to_core_local_mem(uint8_t core_id,uint32_t addr)35static inline uint32_t sys_address_to_core_local_mem(uint8_t core_id, uint32_t addr) 36 { 37 (void) core_id; 38 return addr; 39 } 40 #endif /* HPM_MISC_H */ 41