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
c81b26be
Commit
c81b26be
authored
14 years ago
by
Graeme Russ
Browse files
Options
Downloads
Patches
Plain Diff
x86: Set cold/warm boot flag
parent
161b3589
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/i386/cpu/start.S
+6
-13
6 additions, 13 deletions
arch/i386/cpu/start.S
arch/i386/cpu/start16.S
+4
-3
4 additions, 3 deletions
arch/i386/cpu/start16.S
arch/i386/include/asm/global_data.h
+3
-0
3 additions, 0 deletions
arch/i386/include/asm/global_data.h
with
13 additions
and
16 deletions
arch/i386/cpu/start.S
+
6
−
13
View file @
c81b26be
...
@@ -51,7 +51,7 @@ _i386boot_start:
...
@@ -51,7 +51,7 @@ _i386boot_start:
wbinvd
wbinvd
/
*
Tell
32
-
bit
code
it
is
being
entered
from
an
in
-
RAM
copy
*/
/
*
Tell
32
-
bit
code
it
is
being
entered
from
an
in
-
RAM
copy
*/
movw
$
0x0000
,
%
bx
movw
$
GD_FLG_WARM_BOOT
,
%
bx
_start
:
_start
:
/
*
This
is
the
32
-
bit
cold
-
reset
entry
point
*/
/
*
This
is
the
32
-
bit
cold
-
reset
entry
point
*/
...
@@ -66,18 +66,10 @@ _start:
...
@@ -66,18 +66,10 @@ _start:
/
*
Clear
the
interupt
vectors
*/
/
*
Clear
the
interupt
vectors
*/
lidt
blank_idt_ptr
lidt
blank_idt_ptr
/
*
/
*
Skip
low
-
level
initialization
if
not
starting
from
cold
-
reset
*/
*
Skip
low
-
level
board
and
memory
initialization
if
not
starting
movl
%
ebx
,
%
ecx
*
from
cold
-
reset
.
This
allows
us
to
do
a
fail
safe
boot
-
strap
andl
$GD_FLG_COLD_BOOT
,
%
ecx
*
into
a
new
build
of
U
-
Boot
from
a
known
-
good
boot
flash
jz
skip_mem_init
*/
movw
$
0x0001
,
%
ax
cmpw
%
ax
,
%
bx
jne
mem_init_ret
/
*
We
call
a
few
functions
in
the
board
support
package
*
since
we
have
no
stack
yet
we
'll have to use %ebp
*
to
store
the
return
address
*/
/
*
Early
platform
init
(
setup
gpio
,
etc
)
*/
/
*
Early
platform
init
(
setup
gpio
,
etc
)
*/
jmp
early_board_init
jmp
early_board_init
...
@@ -89,6 +81,7 @@ early_board_init_ret:
...
@@ -89,6 +81,7 @@ early_board_init_ret:
.
globl
mem_init_ret
.
globl
mem_init_ret
mem_init_ret
:
mem_init_ret
:
skip_mem_init
:
/
*
fetch
memory
size
(
into
%
eax
)
*/
/
*
fetch
memory
size
(
into
%
eax
)
*/
jmp
get_mem_size
jmp
get_mem_size
.
globl
get_mem_size_ret
.
globl
get_mem_size_ret
...
...
This diff is collapsed.
Click to expand it.
arch/i386/cpu/start16.S
+
4
−
3
View file @
c81b26be
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
*
MA
02111
-
1307
USA
*
MA
02111
-
1307
USA
*/
*/
#include <asm/global_data.h>
#define BOOT_SEG 0xffff0000 /* linear segment of boot code */
#define BOOT_SEG 0xffff0000 /* linear segment of boot code */
#define a32 .byte 0x67;
#define a32 .byte 0x67;
...
@@ -31,6 +32,9 @@
...
@@ -31,6 +32,9 @@
.
code16
.
code16
.
globl
start16
.
globl
start16
start16
:
start16
:
/
*
Set
the
Cold
Boot
/
Hard
Reset
flag
*/
movl
$GD_FLG_COLD_BOOT
,
%
ebx
/
*
/
*
*
First
we
let
the
BSP
do
some
early
initialization
*
First
we
let
the
BSP
do
some
early
initialization
*
this
code
have
to
map
the
flash
to
its
final
position
*
this
code
have
to
map
the
flash
to
its
final
position
...
@@ -57,9 +61,6 @@ o32 cs lgdt gdt_ptr
...
@@ -57,9 +61,6 @@ o32 cs lgdt gdt_ptr
/
*
Flush
the
prefetch
queue
*/
/
*
Flush
the
prefetch
queue
*/
jmp
ff
jmp
ff
ff
:
ff
:
/
*
Tell
32
-
bit
code
it
is
being
entered
from
hard
-
reset
*/
movw
$
0x0001
,
%
bx
/
*
Finally
jump
to
the
32
bit
initialization
code
*/
/
*
Finally
jump
to
the
32
bit
initialization
code
*/
movw
$code32start
,
%
ax
movw
$code32start
,
%
ax
movw
%
ax
,
%
bp
movw
%
ax
,
%
bp
...
...
This diff is collapsed.
Click to expand it.
arch/i386/include/asm/global_data.h
+
3
−
0
View file @
c81b26be
...
@@ -82,6 +82,9 @@ extern gd_t *gd;
...
@@ -82,6 +82,9 @@ extern gd_t *gd;
#define GD_FLG_LOGINIT 0x00020
/* Log Buffer has been initialized */
#define GD_FLG_LOGINIT 0x00020
/* Log Buffer has been initialized */
#define GD_FLG_DISABLE_CONSOLE 0x00040
/* Disable console (in & out) */
#define GD_FLG_DISABLE_CONSOLE 0x00040
/* Disable console (in & out) */
#define GD_FLG_ENV_READY 0x00080
/* Environment imported into hash table */
#define GD_FLG_ENV_READY 0x00080
/* Environment imported into hash table */
#define GD_FLG_COLD_BOOT 0x00100
/* Cold Boot */
#define GD_FLG_WARM_BOOT 0x00200
/* Warm Boot */
#define DECLARE_GLOBAL_DATA_PTR
#define DECLARE_GLOBAL_DATA_PTR
...
...
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