summaryrefslogtreecommitdiff
path: root/arch/arm/mach-uniphier/init_page_table.S
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2015-03-01 21:07:53 -0500
committerTom Rini <trini@konsulko.com>2015-03-01 21:07:53 -0500
commit1da7ce4155d0839d9d56525379493bb0f80b5330 (patch)
treea29a93170e68b30d1a5b73a8210ddb92b5aaa3c7 /arch/arm/mach-uniphier/init_page_table.S
parentfc834100950ab630f442aece500d8c9ccfa2b992 (diff)
parent105a9e705efaeeac63e795e2a184b0a18db0ac5a (diff)
Merge branch 'master' of git://git.denx.de/u-boot-uniphier
Diffstat (limited to 'arch/arm/mach-uniphier/init_page_table.S')
-rw-r--r--arch/arm/mach-uniphier/init_page_table.S26
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/arm/mach-uniphier/init_page_table.S b/arch/arm/mach-uniphier/init_page_table.S
new file mode 100644
index 0000000000..2638bcd779
--- /dev/null
+++ b/arch/arm/mach-uniphier/init_page_table.S
@@ -0,0 +1,26 @@
+#include <config.h>
+#include <linux/linkage.h>
+
+/* page table */
+#define NR_SECTIONS 4096
+#define SECTION_SHIFT 20
+#define DEVICE 0x00002002 /* Non-shareable Device */
+#define NORMAL 0x0000000e /* Normal Memory Write-Back, No Write-Allocate */
+
+#define TEXT_SECTION ((CONFIG_SPL_TEXT_BASE) >> (SECTION_SHIFT))
+#define STACK_SECTION ((CONFIG_SYS_INIT_SP_ADDR) >> (SECTION_SHIFT))
+
+ .section ".rodata"
+ .align 14
+ENTRY(init_page_table)
+ section = 0
+ .rept NR_SECTIONS
+ .if section == TEXT_SECTION || section == STACK_SECTION
+ attr = NORMAL
+ .else
+ attr = DEVICE
+ .endif
+ .word (section << SECTION_SHIFT) | attr
+ section = section + 1
+ .endr
+END(init_page_table)