SyterKit 0.4.0.x
SyterKit is a bare-metal framework
Loading...
Searching...
No Matches
sysmap.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: GPL-2.0+ */
2
3#ifndef __SYSMAP_H__
4#define __SYSMAP_H__
5
6#include <reg-ncat.h>
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12#define PLAT_SYSMAP_BASE_ADDR (SUNXI_PLAT_TCIP_BASE_ADDR + 0xFFFF000)
13
14#define SYSMAP_REGION_NUM 8
15
16#define SYSMAP_MEM_ATTR_SO 0x10
17#define SYSMAP_MEM_ATTR_CACHEABLE 0x8
18#define SYSMAP_MEM_ATTR_BUFFERABLE 0x4
19
20#define SYSMAP_MEM_ATTR_MASK (SYSMAP_MEM_ATTR_SO | SYSMAP_MEM_ATTR_CACHEABLE | SYSMAP_MEM_ATTR_BUFFERABLE)
21
22#define SYSMAP_MEM_ATTR_SO_NC_NB (SYSMAP_MEM_ATTR_SO)
23#define SYSMAP_MEM_ATTR_SO_NC_B (SYSMAP_MEM_ATTR_SO | SYSMAP_MEM_ATTR_BUFFERABLE)
24
25#define SYSMAP_MEM_ATTR_WO_NC_NB (0)
26#define SYSMAP_MEM_ATTR_WO_NC_B (SYSMAP_MEM_ATTR_BUFFERABLE)
27#define SYSMAP_MEM_ATTR_WO_C_NB (SYSMAP_MEM_ATTR_CACHEABLE)
28#define SYSMAP_MEM_ATTR_WO_C_B (SYSMAP_MEM_ATTR_CACHEABLE | SYSMAP_MEM_ATTR_BUFFERABLE)
29
30#define SYSMAP_MEM_ATTR_DEVICE (SYSMAP_MEM_ATTR_SO_NC_NB)
31#define SYSMAP_MEM_ATTR_RAM (SYSMAP_MEM_ATTR_WO_C_B)
32
33#define SYSMAP_ADDR_SHIFT 12
34#define SYSMAP_ADDR_ALIGN_SIZE (1 << SYSMAP_ADDR_SHIFT)
35#define IS_MEM_ADDR_ALIGNED(addr) (!(addr & (SYSMAP_ADDR_ALIGN_SIZE - 1)))
36
38
39#ifdef __cplusplus
40}
41#endif
42
43#endif /* __SYSMAP_H__ */
void sysmap_dump_region_info(void)
Definition cache.c:136