Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
reform-boundary-uboot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jack Humbert
reform-boundary-uboot
Commits
ecf5b98c
Commit
ecf5b98c
authored
16 years ago
by
Kumar Gala
Committed by
Andrew Fleming-AFLEMING
16 years ago
Browse files
Options
Downloads
Patches
Plain Diff
85xx: Add support to populate addr map based on TLB settings
Signed-off-by:
Kumar Gala
<
galak@kernel.crashing.org
>
parent
78bbc5ce
Loading
Loading
Loading
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
cpu/mpc85xx/tlb.c
+34
-0
34 additions, 0 deletions
cpu/mpc85xx/tlb.c
include/asm-ppc/mmu.h
+3
-0
3 additions, 0 deletions
include/asm-ppc/mmu.h
lib_ppc/board.c
+8
-0
8 additions, 0 deletions
lib_ppc/board.c
with
45 additions
and
0 deletions
cpu/mpc85xx/tlb.c
+
34
−
0
View file @
ecf5b98c
...
...
@@ -26,6 +26,11 @@
#include
<common.h>
#include
<asm/processor.h>
#include
<asm/mmu.h>
#ifdef CONFIG_ADDR_MAP
#include
<addr_map.h>
#endif
DECLARE_GLOBAL_DATA_PTR
;
void
set_tlb
(
u8
tlb
,
u32
epn
,
u64
rpn
,
u8
perms
,
u8
wimge
,
...
...
@@ -47,6 +52,11 @@ void set_tlb(u8 tlb, u32 epn, u64 rpn,
mtspr
(
MAS7
,
_mas7
);
#endif
asm
volatile
(
"isync;msync;tlbwe;isync"
);
#ifdef CONFIG_ADDR_MAP
if
((
tlb
==
1
)
&&
(
gd
->
flags
&
GD_FLG_RELOC
))
addrmap_set_entry
(
epn
,
rpn
,
(
1UL
<<
((
tsize
*
2
)
+
10
)),
esel
);
#endif
}
void
disable_tlb
(
u8
esel
)
...
...
@@ -67,6 +77,11 @@ void disable_tlb(u8 esel)
mtspr
(
MAS7
,
_mas7
);
#endif
asm
volatile
(
"isync;msync;tlbwe;isync"
);
#ifdef CONFIG_ADDR_MAP
if
(
gd
->
flags
&
GD_FLG_RELOC
)
addrmap_set_entry
(
0
,
0
,
0
,
esel
);
#endif
}
void
invalidate_tlb
(
u8
tlb
)
...
...
@@ -91,6 +106,25 @@ void init_tlbs(void)
return
;
}
#ifdef CONFIG_ADDR_MAP
void
init_addr_map
(
void
)
{
int
i
;
for
(
i
=
0
;
i
<
num_tlb_entries
;
i
++
)
{
if
(
tlb_table
[
i
].
tlb
==
0
)
continue
;
addrmap_set_entry
(
tlb_table
[
i
].
epn
,
tlb_table
[
i
].
rpn
,
(
1UL
<<
((
tlb_table
[
i
].
tsize
*
2
)
+
10
)),
tlb_table
[
i
].
esel
);
}
return
;
}
#endif
unsigned
int
setup_ddr_tlbs
(
unsigned
int
memsize_in_meg
)
{
unsigned
int
tlb_size
;
...
...
This diff is collapsed.
Click to expand it.
include/asm-ppc/mmu.h
+
3
−
0
View file @
ecf5b98c
...
...
@@ -431,6 +431,9 @@ extern void set_tlb(u8 tlb, u32 epn, u64 rpn,
extern
void
disable_tlb
(
u8
esel
);
extern
void
invalidate_tlb
(
u8
tlb
);
extern
void
init_tlbs
(
void
);
#ifdef CONFIG_ADDR_MAP
extern
void
init_addr_map
(
void
);
#endif
extern
unsigned
int
setup_ddr_tlbs
(
unsigned
int
memsize_in_meg
);
#define SET_TLB_ENTRY(_tlb, _epn, _rpn, _perms, _wimge, _ts, _esel, _sz, _iprot) \
...
...
This diff is collapsed.
Click to expand it.
lib_ppc/board.c
+
8
−
0
View file @
ecf5b98c
...
...
@@ -75,6 +75,10 @@
#include
<keyboard.h>
#endif
#ifdef CONFIG_ADDR_MAP
#include
<asm/mmu.h>
#endif
#ifdef CONFIG_SYS_UPDATE_FLASH_SIZE
extern
int
update_flash_size
(
int
flash_size
);
#endif
...
...
@@ -694,6 +698,10 @@ void board_init_r (gd_t *id, ulong dest_addr)
*/
trap_init
(
dest_addr
);
#if defined(CONFIG_ADDR_MAP) && defined(CONFIG_E500)
init_addr_map
();
#endif
#if defined(CONFIG_BOARD_EARLY_INIT_R)
board_early_init_r
();
#endif
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment