blob: 4ed2656ee97c51e53c6efce7e4a4f8e83c16d7dd [file] [log] [blame]
Masahiro Yamada5b01ec42015-03-23 00:07:26 +09001/*
Masahiro Yamadaa8a46722015-09-22 00:27:42 +09002 * Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com>
Masahiro Yamada5b01ec42015-03-23 00:07:26 +09003 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
Masahiro Yamada23aae502015-01-19 22:30:23 +09007#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
Masahiro Yamada23aae502015-01-19 22:30:23 +090016 .section ".rodata"
17 .align 14
18ENTRY(init_page_table)
19 section = 0
20 .rept NR_SECTIONS
Masahiro Yamada4a162892016-02-02 21:11:28 +090021 .if section == 0 || section == 1
Masahiro Yamada23aae502015-01-19 22:30:23 +090022 attr = NORMAL
23 .else
24 attr = DEVICE
25 .endif
26 .word (section << SECTION_SHIFT) | attr
27 section = section + 1
28 .endr
29END(init_page_table)