]> git.sur5r.net Git - u-boot/blob - arch/arm/mach-uniphier/init_page_table.S
Merge git://git.denx.de/u-boot-socfpga
[u-boot] / arch / arm / mach-uniphier / init_page_table.S
1 /*
2  * Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com>
3  *
4  * SPDX-License-Identifier:     GPL-2.0+
5  */
6
7 #include <config.h>
8 #include <linux/linkage.h>
9
10 /* page table */
11 #define NR_SECTIONS     4096
12 #define SECTION_SHIFT   20
13 #define DEVICE  0x00002002 /* Non-shareable Device */
14 #define NORMAL  0x0000000e /* Normal Memory Write-Back, No Write-Allocate */
15
16 #define TEXT_SECTION    ((CONFIG_SPL_TEXT_BASE) >> (SECTION_SHIFT))
17 #define STACK_SECTION   ((CONFIG_SPL_STACK) >> (SECTION_SHIFT))
18
19         .section ".rodata"
20         .align 14
21 ENTRY(init_page_table)
22         section = 0
23         .rept NR_SECTIONS
24         .if section == 0 || section == 1 || section == STACK_SECTION
25         attr = NORMAL
26         .else
27         attr = DEVICE
28         .endif
29         .word (section << SECTION_SHIFT) | attr
30         section = section + 1
31         .endr
32 END(init_page_table)