Skip to content
Snippets Groups Projects
Commit 061ae4c0 authored by Masahiro Yamada's avatar Masahiro Yamada
Browse files

ARM: UniPhier: describe init_page_table shorter


The assembly directive ".rept ... .endr" allows us to write the
init_page_table much shorter.  To make things further simpler,
set the text and stack area as Normal Memory, and the other sections
as Device attribute.

Signed-off-by: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
parent 89a7c773
No related branches found
No related tags found
No related merge requests found
#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)
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment