hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/arch/xtensa/include/asm/kmem_layout.h
....@@ -11,6 +11,7 @@
1111 #ifndef _XTENSA_KMEM_LAYOUT_H
1212 #define _XTENSA_KMEM_LAYOUT_H
1313
14
+#include <asm/core.h>
1415 #include <asm/types.h>
1516
1617 #ifdef CONFIG_MMU
....@@ -65,6 +66,34 @@
6566
6667 #endif
6768
69
+/* KIO definition */
70
+
71
+#if XCHAL_HAVE_PTP_MMU
72
+#define XCHAL_KIO_CACHED_VADDR 0xe0000000
73
+#define XCHAL_KIO_BYPASS_VADDR 0xf0000000
74
+#define XCHAL_KIO_DEFAULT_PADDR 0xf0000000
75
+#else
76
+#define XCHAL_KIO_BYPASS_VADDR XCHAL_KIO_PADDR
77
+#define XCHAL_KIO_DEFAULT_PADDR 0x90000000
78
+#endif
79
+#define XCHAL_KIO_SIZE 0x10000000
80
+
81
+#if (!XCHAL_HAVE_PTP_MMU || XCHAL_HAVE_SPANNING_WAY) && defined(CONFIG_USE_OF)
82
+#define XCHAL_KIO_PADDR xtensa_get_kio_paddr()
83
+#ifndef __ASSEMBLY__
84
+extern unsigned long xtensa_kio_paddr;
85
+
86
+static inline unsigned long xtensa_get_kio_paddr(void)
87
+{
88
+ return xtensa_kio_paddr;
89
+}
90
+#endif
91
+#else
92
+#define XCHAL_KIO_PADDR XCHAL_KIO_DEFAULT_PADDR
93
+#endif
94
+
95
+/* KERNEL_STACK definition */
96
+
6897 #ifndef CONFIG_KASAN
6998 #define KERNEL_STACK_SHIFT 13
7099 #else