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
d653244b
Commit
d653244b
authored
13 years ago
by
Graeme Russ
Browse files
Options
Downloads
Patches
Plain Diff
x86: Create weak init_cache() and default enable_caches() functions
-- Changes for v2: - Tweaked commit title
parent
3766bb33
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
arch/x86/cpu/cpu.c
+15
-3
15 additions, 3 deletions
arch/x86/cpu/cpu.c
arch/x86/include/asm/u-boot-x86.h
+1
-0
1 addition, 0 deletions
arch/x86/include/asm/u-boot-x86.h
arch/x86/lib/board.c
+1
-0
1 addition, 0 deletions
arch/x86/lib/board.c
with
17 additions
and
3 deletions
arch/x86/cpu/cpu.c
+
15
−
3
View file @
d653244b
...
@@ -139,6 +139,14 @@ int x86_cpu_init_f(void)
...
@@ -139,6 +139,14 @@ int x86_cpu_init_f(void)
int
cpu_init_f
(
void
)
__attribute__
((
weak
,
alias
(
"x86_cpu_init_f"
)));
int
cpu_init_f
(
void
)
__attribute__
((
weak
,
alias
(
"x86_cpu_init_f"
)));
int
x86_cpu_init_r
(
void
)
int
x86_cpu_init_r
(
void
)
{
/* Initialize core interrupt and exception functionality of CPU */
cpu_init_interrupts
();
return
0
;
}
int
cpu_init_r
(
void
)
__attribute__
((
weak
,
alias
(
"x86_cpu_init_r"
)));
void
x86_enable_caches
(
void
)
{
{
const
u32
nw_cd_rst
=
~
(
X86_CR0_NW
|
X86_CR0_CD
);
const
u32
nw_cd_rst
=
~
(
X86_CR0_NW
|
X86_CR0_CD
);
...
@@ -147,12 +155,16 @@ int x86_cpu_init_r(void)
...
@@ -147,12 +155,16 @@ int x86_cpu_init_r(void)
"andl %0, %%eax
\n
"
"andl %0, %%eax
\n
"
"movl %%eax, %%cr0
\n
"
"movl %%eax, %%cr0
\n
"
"wbinvd
\n
"
:
:
"i"
(
nw_cd_rst
)
:
"eax"
);
"wbinvd
\n
"
:
:
"i"
(
nw_cd_rst
)
:
"eax"
);
}
void
enable_caches
(
void
)
__attribute__
((
weak
,
alias
(
"x86_enable_caches"
)));
int
x86_init_cache
(
void
)
{
enable_caches
();
/* Initialize core interrupt and exception functionality of CPU */
cpu_init_interrupts
();
return
0
;
return
0
;
}
}
int
cpu_
init_
r
(
void
)
__attribute__
((
weak
,
alias
(
"x86_
cpu_
init_
r
"
)));
int
init_
cache
(
void
)
__attribute__
((
weak
,
alias
(
"x86_init_
cache
"
)));
int
do_reset
(
cmd_tbl_t
*
cmdtp
,
int
flag
,
int
argc
,
char
*
const
argv
[])
int
do_reset
(
cmd_tbl_t
*
cmdtp
,
int
flag
,
int
argc
,
char
*
const
argv
[])
{
{
...
...
This diff is collapsed.
Click to expand it.
arch/x86/include/asm/u-boot-x86.h
+
1
−
0
View file @
d653244b
...
@@ -39,6 +39,7 @@ int x86_cpu_init_f(void);
...
@@ -39,6 +39,7 @@ int x86_cpu_init_f(void);
int
cpu_init_f
(
void
);
int
cpu_init_f
(
void
);
void
init_gd
(
gd_t
*
id
,
u64
*
gdt_addr
);
void
init_gd
(
gd_t
*
id
,
u64
*
gdt_addr
);
void
setup_gdt
(
gd_t
*
id
,
u64
*
gdt_addr
);
void
setup_gdt
(
gd_t
*
id
,
u64
*
gdt_addr
);
int
init_cache
(
void
);
/* cpu/.../timer.c */
/* cpu/.../timer.c */
void
timer_isr
(
void
*
);
void
timer_isr
(
void
*
);
...
...
This diff is collapsed.
Click to expand it.
arch/x86/lib/board.c
+
1
−
0
View file @
d653244b
...
@@ -140,6 +140,7 @@ init_fnc_t *init_sequence_f[] = {
...
@@ -140,6 +140,7 @@ init_fnc_t *init_sequence_f[] = {
init_fnc_t
*
init_sequence_r
[]
=
{
init_fnc_t
*
init_sequence_r
[]
=
{
copy_gd_to_ram
,
copy_gd_to_ram
,
init_cache
,
cpu_init_r
,
/* basic cpu dependent setup */
cpu_init_r
,
/* basic cpu dependent setup */
board_early_init_r
,
/* basic board dependent setup */
board_early_init_r
,
/* basic board dependent setup */
dram_init
,
/* configure available RAM banks */
dram_init
,
/* configure available RAM banks */
...
...
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