blob: 2638bcd7793d283357640e538a1fdc2b11734ec5 [file] [log] [blame]
Masahiro Yamada23aae502015-01-19 22:30:23 +09001#include <config.h>
2#include <linux/linkage.h>
3
4/* page table */
5#define NR_SECTIONS 4096
6#define SECTION_SHIFT 20
7#define DEVICE 0x00002002 /* Non-shareable Device */
8#define NORMAL 0x0000000e /* Normal Memory Write-Back, No Write-Allocate */
9
10#define TEXT_SECTION ((CONFIG_SPL_TEXT_BASE) >> (SECTION_SHIFT))
11#define STACK_SECTION ((CONFIG_SYS_INIT_SP_ADDR) >> (SECTION_SHIFT))
12
13 .section ".rodata"
14 .align 14
15ENTRY(init_page_table)
16 section = 0
17 .rept NR_SECTIONS
18 .if section == TEXT_SECTION || section == STACK_SECTION
19 attr = NORMAL
20 .else
21 attr = DEVICE
22 .endif
23 .word (section << SECTION_SHIFT) | attr
24 section = section + 1
25 .endr
26END(init_page_table)