Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
2927e486
Commit
2927e486
authored
Aug 14, 2003
by
Russell King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ARM] Add ARMv6 memory type table initialisation tweaks.
parent
526c0a1a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
arch/arm/mm/mm-armv.c
arch/arm/mm/mm-armv.c
+26
-0
No files found.
arch/arm/mm/mm-armv.c
View file @
2927e486
...
@@ -305,9 +305,35 @@ static struct mem_types mem_types[] __initdata = {
...
@@ -305,9 +305,35 @@ static struct mem_types mem_types[] __initdata = {
*/
*/
static
void
__init
build_mem_type_table
(
void
)
static
void
__init
build_mem_type_table
(
void
)
{
{
unsigned
int
cr
=
get_cr
();
int
cpu_arch
=
cpu_architecture
();
int
cpu_arch
=
cpu_architecture
();
const
char
*
policy
;
const
char
*
policy
;
/*
* ARMv6 and above have extended page tables.
*/
if
(
cpu_arch
>=
CPU_ARCH_ARMv6
&&
(
cr
&
CR_XP
))
{
/*
* bit 4 becomes XN which we must clear for the
* kernel memory mapping.
*/
mem_types
[
MT_MEMORY
].
prot_sect
&=
~
PMD_BIT4
;
/*
* Mark cache clean areas read only from SVC mode
* and no access from userspace.
*/
mem_types
[
MT_MINICLEAN
].
prot_sect
|=
PMD_SECT_APX
|
PMD_SECT_AP_WRITE
;
mem_types
[
MT_CACHECLEAN
].
prot_sect
|=
PMD_SECT_APX
|
PMD_SECT_AP_WRITE
;
}
/*
* ARMv6 can map the vectors as write-through.
*/
if
(
cpu_arch
>=
CPU_ARCH_ARMv6
)
mem_types
[
MT_VECTORS
].
prot_pte
|=
PTE_CACHEABLE
;
else
mem_types
[
MT_VECTORS
].
prot_pte
|=
PTE_BUFFERABLE
|
PTE_CACHEABLE
;
/*
/*
* ARMv5 and higher can use ECC memory.
* ARMv5 and higher can use ECC memory.
*/
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment