hpm_misc.h 1003 B

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