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
Kirill Smelkov
linux
Commits
37ff5b87
Commit
37ff5b87
authored
Mar 01, 2004
by
Tom Rini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PPC32: Kill off arch/ppc/boot/prep and rearrange some files.
parent
bddd7645
Changes
18
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
303 additions
and
329 deletions
+303
-329
arch/ppc/boot/Makefile
arch/ppc/boot/Makefile
+2
-3
arch/ppc/boot/common/Makefile
arch/ppc/boot/common/Makefile
+1
-4
arch/ppc/boot/common/util.S
arch/ppc/boot/common/util.S
+10
-1
arch/ppc/boot/include/iso_font.h
arch/ppc/boot/include/iso_font.h
+0
-0
arch/ppc/boot/lib/Makefile
arch/ppc/boot/lib/Makefile
+3
-0
arch/ppc/boot/lib/kbd.c
arch/ppc/boot/lib/kbd.c
+0
-0
arch/ppc/boot/lib/vreset.c
arch/ppc/boot/lib/vreset.c
+0
-0
arch/ppc/boot/prep/Makefile
arch/ppc/boot/prep/Makefile
+0
-109
arch/ppc/boot/prep/dummy.c
arch/ppc/boot/prep/dummy.c
+0
-4
arch/ppc/boot/prep/head.S
arch/ppc/boot/prep/head.S
+0
-192
arch/ppc/boot/simple/Makefile
arch/ppc/boot/simple/Makefile
+16
-5
arch/ppc/boot/simple/cpc700_memory.c
arch/ppc/boot/simple/cpc700_memory.c
+0
-0
arch/ppc/boot/simple/head.S
arch/ppc/boot/simple/head.S
+35
-5
arch/ppc/boot/simple/misc-prep.c
arch/ppc/boot/simple/misc-prep.c
+211
-0
arch/ppc/boot/simple/misc-spruce.c
arch/ppc/boot/simple/misc-spruce.c
+2
-1
arch/ppc/boot/simple/misc.c
arch/ppc/boot/simple/misc.c
+4
-1
arch/ppc/boot/simple/mpc10x_memory.c
arch/ppc/boot/simple/mpc10x_memory.c
+5
-1
arch/ppc/boot/simple/relocate.S
arch/ppc/boot/simple/relocate.S
+14
-3
No files found.
arch/ppc/boot/Makefile
View file @
37ff5b87
...
...
@@ -16,13 +16,12 @@ HOSTCFLAGS += -Iarch/$(ARCH)/boot/include
BOOT_TARGETS
=
zImage zImage.initrd znetboot znetboot.initrd
bootdir-y
:=
simple
bootdir-$(CONFIG_PPC_OF)
:=
openfirmware
bootdir-$(CONFIG_PPC_PREP)
+=
prep
bootdir-$(CONFIG_PPC_OF)
+=
openfirmware
subdir-y
:=
lib/ common/ images/
subdir-$(CONFIG_PPC_OF)
+=
of1275/
# for cleaning
subdir-
+=
simple/ openfirmware/
prep/
subdir-
+=
simple/ openfirmware/
host-progs
:=
$(
addprefix
utils/, addnote mknote hack-coff mkprep mkbugboot mktree
)
...
...
arch/ppc/boot/common/Makefile
View file @
37ff5b87
...
...
@@ -9,8 +9,5 @@
#
lib-y
:=
string.o util.o misc-common.o
\
serial_stub.o
lib-$(CONFIG_PPC_PREP)
+=
mpc10x_memory.o
lib-$(CONFIG_LOPEC)
+=
mpc10x_memory.o
lib-$(CONFIG_PAL4)
+=
cpc700_memory.o
serial_stub.o bootinfo.o
lib-$(CONFIG_SERIAL_8250_CONSOLE)
+=
ns16550.o
arch/ppc/boot/common/util.S
View file @
37ff5b87
...
...
@@ -14,7 +14,7 @@
*
trini
@
mvista
.
com
*
Derived
from
arch
/
ppc
/
boot
/
prep
/
head
.
S
(
Cort
Dougan
,
many
others
)
.
*
*
2001
-
200
3
(
c
)
MontaVista
,
Software
,
Inc
.
This
file
is
licensed
under
*
2001
-
200
4
(
c
)
MontaVista
,
Software
,
Inc
.
This
file
is
licensed
under
*
the
terms
of
the
GNU
General
Public
License
version
2
.
This
program
*
is
licensed
"as is"
without
any
warranty
of
any
kind
,
whether
express
*
or
implied
.
...
...
@@ -36,6 +36,13 @@ disable_6xx_mmu:
*/
li
r8
,
MSR_IP
|
MSR_FP
mtmsr
r8
isync
/
*
Test
for
a
601
*/
mfpvr
r10
srwi
r10
,
r10
,
16
cmpi
0
,
r10
,
1
/*
601
?
*/
beq
.
clearbats_601
/
*
Clear
BATs
*/
li
r8
,
0
...
...
@@ -47,6 +54,7 @@ disable_6xx_mmu:
mtspr
DBAT2L
,
r8
mtspr
DBAT3U
,
r8
mtspr
DBAT3L
,
r8
.
clearbats_601
:
mtspr
IBAT0U
,
r8
mtspr
IBAT0L
,
r8
mtspr
IBAT1U
,
r8
...
...
@@ -68,6 +76,7 @@ disable_6xx_mmu:
addi
r8
,
r8
,
0x111
/*
increment
VSID
*/
addis
r10
,
r10
,
0x1000
/*
address
of
next
segment
*/
bdnz
3
b
blr
.
globl
disable_6xx_l1cache
disable_6xx_l1cache
:
...
...
arch/ppc/boot/
prep
/iso_font.h
→
arch/ppc/boot/
include
/iso_font.h
View file @
37ff5b87
File moved
arch/ppc/boot/lib/Makefile
View file @
37ff5b87
...
...
@@ -2,4 +2,7 @@
# Makefile for some libs needed by zImage.
#
CFLAGS_kbd.o
+=
-Idrivers
/char
lib-y
:=
zlib.o div64.o
lib-$(CONFIG_VGA_CONSOLE)
+=
vreset.o kbd.o
arch/ppc/boot/
prep
/kbd.c
→
arch/ppc/boot/
lib
/kbd.c
View file @
37ff5b87
File moved
arch/ppc/boot/
prep
/vreset.c
→
arch/ppc/boot/
lib
/vreset.c
View file @
37ff5b87
File moved
arch/ppc/boot/prep/Makefile
deleted
100644 → 0
View file @
bddd7645
# arch/ppc/boot/Makefile
#
# This file is subject to the terms and conditions of the GNU General Public
# License. See the file "COPYING" in the main directory of this archive
# for more details.
#
# Tom Rini January 2001
#
# Originally:
# arch/ppc/boot/Makefile
# Copyright (C) 1994 by Linus Torvalds
# Adapted for PowerPC by Gary Thomas
# modified by Cort (cort@cs.nmt.edu)
#
TFTPIMAGE
:=
/tftpboot/zImage.prep
ifeq
($(CONFIG_SMP),y)
TFTPIMAGE
:=
$(TFTPIMAGE)
.smp
endif
boot-y
:=
head.o misc.o
boot-$(CONFIG_VGA_CONSOLE)
+=
vreset.o kbd.o
boot
:=
arch
/ppc/boot
common
:=
$(boot)
/common
utils
:=
$(boot)
/utils
bootlib
:=
$(boot)
/lib
images
:=
$(boot)
/images
simple
:=
$(boot)
/simple
of1275
:=
$(boot)
/of1275
OBJCOPYFLAGS
:=
-O
elf32-powerpc
LIBS
:=
$(common)
/lib.a
$(bootlib)
/lib.a
$(of1275)
/lib.a
targets
:=
$
(
boot-y
)
dummy.o ../simple/legacy.o
OBJS
:=
$(
addprefix
$(obj)
/,
$
(
boot-y
))
$(simple)
/legacy.o
# Extra include search dirs
CFLAGS_kbd.o
+=
-Idrivers
/char
zImage
:
initrd :=
zImage
:
$(images)/zImage.prep
@
echo
' kernel: $@ is ready ($<)'
zImage.initrd
:
initrd := .initrd
zImage.initrd
:
$(images)/zImage.initrd.prep
@
echo
' kernel: $@ is ready ($<)'
$(images)/ramdisk.image.gz
:
@
echo
' MISSING $@'
@
echo
' RAM disk image must be provided separately'
@
/bin/false
OBJCOPYFLAGS_image.o
:=
\
--add-section
=
.image
=
$(images)
/vmlinux.gz
\
--set-section-flags
=
.image
=
contents,alloc,load,readonly,data
targets
+=
image.o
$(obj)/image.o
:
$(obj)/dummy.o $(images)/vmlinux.gz
$(
call
if_changed,objcopy
)
OBJCOPYFLAGS_image.initrd.o
:=
\
--add-section
=
.ramdisk
=
$(images)
/ramdisk.image.gz
\
--set-section-flags
=
.ramdisk
=
contents,alloc,load,readonly,data
\
--add-section
=
.image
=
$(images)
/vmlinux.gz
\
--set-section-flags
=
.image
=
contents,alloc,load,readonly,data
targets
+=
image.initrd.o
$(obj)/image.initrd.o
:
$(obj)/dummy.o $(images)/vmlinux.gz $(images)/ramdisk.image.gz
$(
call
if_changed,objcopy
)
LDFLAGS_zImage.bin
:=
-Ttext
0x00800000
-Bstatic
-T
LDFLAGS_zImage.initrd.bin
:=
-Ttext
0x00800000
-Bstatic
-T
targets
+=
zImage.bin
$(obj)/zImage.bin
:
$(boot)/ld.script $(OBJS) $(obj)/image.o $(LIBS)
$(
call
if_changed,ld
)
targets
+=
zImage.initrd.bin
$(obj)/zImage.initrd.bin
:
$(boot)/ld.script $(OBJS) $(obj)/image.initrd.o $(LIBS)
$(
call
if_changed,ld
)
OBJCOPYFLAGS_zImage
:=
-R
.comment
-R
.stab
-R
.stabstr
OBJCOPYFLAGS_zImage.initrd
:=
-R
.comment
-R
.stab
-R
.stabstr
targets
+=
zImage
$(obj)/zImage
:
%: %.bin FORCE
$(
call
if_changed,objcopy
)
targets
+=
zImage.initrd
$(obj)/zImage.initrd
:
%: %.bin FORCE
$(
call
if_changed,objcopy
)
quiet_cmd_mkprep
=
MKPREP
$@
cmd_mkprep
=
$(utils)
/mkprep
-pbp
$<
$@
$(images)/zImage.prep
:
$(obj)/zImage $(utils)/mkprep
$(
call
cmd,mkprep
)
$(images)/zImage.initrd.prep
:
$(obj)/zImage.initrd $(utils)/mkprep
$(
call
cmd,mkprep
)
#
# Convinient shorthands for various targets
#
floppy
:
zImage
dd
if
=
$(images)
/zImage.prep
of
=
/dev/fd0H1440
bs
=
64b
znetboot
:
zImage
cp
$(images)
/zImage.prep
$(TFTPIMAGE)
@
echo
' kernel: $@ is ready ($<)'
znetboot.initrd
:
zImage.initrd
cp
$(images)
/zImage.initrd.prep
$(TFTPIMAGE)
@
echo
' kernel: $@ is ready ($<)'
arch/ppc/boot/prep/dummy.c
deleted
100644 → 0
View file @
bddd7645
int
main
(
void
)
{
return
0
;
}
arch/ppc/boot/prep/head.S
deleted
100644 → 0
View file @
bddd7645
#include <asm/ppc_asm.h>
#include <asm/reg.h>
#include <asm/cache.h>
.
text
/*
*
Boot
loader
philosophy
:
*
ROM
loads
us
to
some
arbitrary
location
*
Move
the
boot
code
to
the
link
address
(
8
M
)
*
Call
decompress_kernel
()
*
Relocate
the
initrd
,
zimage
and
residual
data
to
8
M
*
Decompress
the
kernel
to
0
*
Jump
to
the
kernel
entry
*
--
Cort
*/
.
globl
start
start
:
bl
start_
start_
:
/
*
Enable
,
invalidate
,
Disable
L1
icache
/
dcache
*/
li
r8
,
0
ori
r8
,
r8
,
(
HID0_ICE|HID0_DCE|HID0_ICFI
|
HID0_DCI
)
mfspr
r11
,
HID0
or
r11
,
r11
,
r8
andc
r10
,
r11
,
r8
isync
mtspr
HID0
,
r8
sync
isync
mtspr
HID0
,
r10
sync
isync
mr
r11
,
r3
/*
Save
pointer
to
residual
/
board
data
*/
/*
*
Save
the
OF
pointer
to
r25
,
but
only
if
the
entry
point
is
in
a
sane
*
location
; if not we store 0. If there is no entry point, or it is
*
invalid
,
we
establish
the
default
MSR
value
immediately
.
Otherwise
,
*
we
defer
doing
that
,
to
allow
OF
functions
to
be
called
,
until
we
*
begin
uncompressing
the
kernel
.
*/
lis
r3
,
0x0fff
/*
r3
=
0x0fffffff
*/
ori
r3
,
r3
,
0xffff
subc
r3
,
r3
,
r5
/*
r3
=
(
r5
<=
r3
)
?
~
0
:
0
*/
subfe
r3
,
r3
,
r3
nand
r3
,
r3
,
r3
and
.
r5
,
r5
,
r3
/*
r5
will
be
cleared
if
(
r5
>
r3
)
*/
bne
+
haveOF
li
r3
,
MSR_IP
|
MSR_FP
/*
Not
OF
:
set
MSR
immediately
*/
mtmsr
r3
isync
haveOF
:
mr
r25
,
r5
/
*
compute
the
size
of
the
whole
image
in
words
.
*/
lis
r4
,
start
@
h
ori
r4
,
r4
,
start
@
l
lis
r5
,
end
@
h
ori
r5
,
r5
,
end
@
l
addi
r5
,
r5
,
3
/*
round
up
*/
sub
r5
,
r5
,
r4
/*
end
-
start
*/
srwi
r5
,
r5
,
2
mr
r7
,
r5
/*
Save
for
later
use
.
*/
/
*
check
if
we
need
to
relocate
ourselves
to
the
link
addr
or
were
*
we
loaded
there
to
begin
with
--
Cort
*/
mflr
r3
subi
r3
,
r3
,
4
/*
we
get
the
nip
,
not
the
ip
of
the
branch
*/
mr
r8
,
r3
cmp
0
,
r3
,
r4
beq
start_ldr
/*
If
0
,
we
don
't need to relocate */
/*
*
no
matter
where
we
're loaded, move ourselves to -Ttext address
*/
relocate
:
mflr
r3
/*
Compute
code
bias
*/
subi
r3
,
r3
,
4
mr
r8
,
r3
lis
r4
,
start
@
h
ori
r4
,
r4
,
start
@
l
mr
r5
,
r7
/*
Get
the
#
of
longwords
again
*/
mtctr
r5
/*
Setup
for
loop
*/
li
r6
,
0
subi
r3
,
r3
,
4
subi
r4
,
r4
,
4
00
:
lwzu
r5
,
4
(
r3
)
stwu
r5
,
4
(
r4
)
xor
r6
,
r6
,
r5
bdnz
00
b
lis
r3
,
start_ldr
@
h
ori
r3
,
r3
,
start_ldr
@
l
mtlr
r3
/*
Easiest
way
to
do
an
absolute
jump
*/
blr
start_ldr
:
/*
Some
boards
don
't boot up with the I-cache enabled. Do that
*
now
because
the
decompress
runs
much
faster
that
way
.
*
As
a
side
effect
,
we
have
to
ensure
the
data
cache
is
not
enabled
*
so
we
can
access
the
serial
I
/
O
without
trouble
.
*/
bl
flush_instruction_cache
/*
Clear
all
of
BSS
*/
lis
r3
,
edata
@
h
ori
r3
,
r3
,
edata
@
l
lis
r4
,
end
@
h
ori
r4
,
r4
,
end
@
l
subi
r3
,
r3
,
4
subi
r4
,
r4
,
4
li
r0
,
0
50
:
stwu
r0
,
4
(
r3
)
cmp
0
,
r3
,
r4
bne
50
b
90
:
mr
r9
,
r1
/*
Save
old
stack
pointer
(
in
case
it
matters
)
*/
lis
r1
,
.
stack
@
h
ori
r1
,
r1
,
.
stack
@
l
addi
r1
,
r1
,
4096
*
2
subi
r1
,
r1
,
256
li
r2
,
0x000F
/*
Mask
pointer
to
16
-
byte
boundary
*/
andc
r1
,
r1
,
r2
/*
Run
loader
*/
mr
r3
,
r8
/*
Load
point
*/
mr
r4
,
r7
/*
Program
length
*/
mr
r5
,
r6
/*
Checksum
*/
mr
r6
,
r11
/*
Residual
data
*/
mr
r7
,
r25
/*
Validated
OFW
interface
*/
bl
decompress_kernel
/
*
*
We
have
to
do
this
after
decompress_kernel
,
just
to
make
*
sure
we
don
't wipe out things mapped in BATs which we need.
*
--
Tom
*/
li
r6
,
0
/
*
Test
for
a
601
*/
mfspr
r9
,
PVR
srwi
r9
,
r9
,
16
cmpi
0
,
r9
,
1
/*
601
?
*/
beq
.
clearbats_601
/
*
Clear
BATS
*/
mtspr
DBAT0U
,
r6
mtspr
DBAT0L
,
r6
mtspr
DBAT1U
,
r6
mtspr
DBAT1L
,
r6
mtspr
DBAT2U
,
r6
mtspr
DBAT2L
,
r6
mtspr
DBAT3U
,
r6
mtspr
DBAT3L
,
r6
.
clearbats_601
:
mtspr
IBAT0U
,
r6
mtspr
IBAT0L
,
r6
mtspr
IBAT1U
,
r6
mtspr
IBAT1L
,
r6
mtspr
IBAT2U
,
r6
mtspr
IBAT2L
,
r6
mtspr
IBAT3U
,
r6
mtspr
IBAT3L
,
r6
isync
sync
sync
/
*
Set
segment
registers
*/
li
r6
,
16
/*
load
up
segment
register
values
*/
mtctr
r6
/*
for
context
0
*/
lis
r6
,
0x2000
/*
Ku
=
1
,
VSID
=
0
*/
li
r10
,
0
3
:
mtsrin
r6
,
r10
addi
r6
,
r6
,
0x111
/*
increment
VSID
*/
addis
r10
,
r10
,
0x1000
/*
address
of
next
segment
*/
bdnz
3
b
/
*
tell
kernel
we
're prep, by putting 0xdeadc0de at KERNELLOAD,
*
and
tell
the
kernel
to
start
on
the
4
th
instruction
since
we
*
overwrite
the
first
3
sometimes
(
which
are
'nop'
)
.
*/
li
r9
,
0xc
mtlr
r9
lis
r10
,
0xdeadc0de
@
h
ori
r10
,
r10
,
0xdeadc0de
@
l
li
r9
,
0
stw
r10
,
0
(
r9
)
blr
.
comm
.
stack
,
4096
*
2
,
4
arch/ppc/boot/simple/Makefile
View file @
37ff5b87
...
...
@@ -26,11 +26,12 @@ common := $(boot)/common
utils
:=
$(boot)
/utils
bootlib
:=
$(boot)
/lib
images
:=
$(boot)
/images
of1275
:=
$(boot)
/of1275
tftpboot
:=
/tftpboot
# Normally, we use the 'misc.c' file for decompress_kernel and
# whatnot. Sometimes we need to override this however.
misc-y
:=
misc.o
../common/bootinfo.o
misc-y
:=
misc.o
# Normally, we have our images end in .elf, but something we want to
# change this.
...
...
@@ -89,6 +90,7 @@ zimageinitrd-$(motorola) := zImage.initrd-PPLUS
# Overrides previous assingment
extra.o-$(CONFIG_PPLUS)
:=
legacy.o
extra.o-$(CONFIG_LOPEC)
:=
mpc10x_memory.o
zimage-$(pcore)
:=
zImage-STRIPELF
zimageinitrd-$(pcore)
:=
zImage.initrd-STRIPELF
...
...
@@ -96,6 +98,12 @@ zimageinitrd-$(pcore) := zImage.initrd-STRIPELF
end-$(pcore)
:=
pcore
cacheflag-$(pcore)
:=
-include
$(clear_L2_L3)
zimage-$(CONFIG_PPC_PREP)
:=
zImage-PPLUS
zimageinitrd-$(CONFIG_PPC_PREP)
:=
zImage.initrd-PPLUS
extra.o-$(CONFIG_PPC_PREP)
:=
legacy.o
misc-$(CONFIG_PPC_PREP)
+=
misc-prep.o mpc10x_memory.o
end-$(CONFIG_PPC_PREP)
:=
prep
end-$(CONFIG_SANDPOINT)
:=
sandpoint
cacheflag-$(CONFIG_SANDPOINT)
:=
-include
$(clear_L2_L3)
...
...
@@ -138,6 +146,9 @@ boot-$(CONFIG_GT64260_CONSOLE) += gt64260_tty.o
endif
LIBS
:=
$(common)
/lib.a
$(bootlib)
/lib.a
ifeq
($(CONFIG_PPC_PREP),y)
LIBS
+=
$(of1275)
/lib.a
endif
OBJS
:=
$(
addprefix
$(obj)
/,
$
(
boot-y
))
...
...
@@ -199,10 +210,10 @@ $(images)/zImage.initrd-TREE: $(obj)/zvmlinux.initrd $(MKTREE)
$(MKTREE)
$(obj)
/zvmlinux.initrd
$(images)
/zImage.initrd.
$
(
end-y
)
\
$(ENTRYPOINT)
$(images)/zImage-PPLUS
:
$(obj)/zvmlinux $(
MKPREP)
$(MKBUGBOOT)
$(MKPREP)
-pbp
$(obj)
/zvmlinux
$(images)
/zImage.
pplus
$(images)/zImage-PPLUS
:
$(obj)/zvmlinux $(
utils)/mkprep
$(MKBUGBOOT)
$(MKPREP)
-pbp
$(obj)
/zvmlinux
$(images)
/zImage.
$
(
end-y
)
$(MKBUGBOOT)
$(obj)
/zvmlinux
$(images)
/zImage.bugboot
$(images)/zImage.initrd-PPLUS
:
$(obj)/zvmlinux.initrd $(
MKPREP)
$(MKBUGBOOT)
$(MKPREP)
-pbp
$(obj)
/zvmlinux.initrd
$(images)
/zImage.initrd.
pplus
$(images)/zImage.initrd-PPLUS
:
$(obj)/zvmlinux.initrd $(
utils)/mkprep
$(MKBUGBOOT)
$(MKPREP)
-pbp
$(obj)
/zvmlinux.initrd
$(images)
/zImage.initrd.
$
(
end-y
)
$(MKBUGBOOT)
$(obj)
/zvmlinux.initrd
$(images)
/zImage.initrd.bugboot
arch/ppc/boot/
common
/cpc700_memory.c
→
arch/ppc/boot/
simple
/cpc700_memory.c
View file @
37ff5b87
File moved
arch/ppc/boot/simple/head.S
View file @
37ff5b87
...
...
@@ -7,7 +7,7 @@
*
trini
@
mvista
.
com
*
Derived
from
arch
/
ppc
/
boot
/
prep
/
head
.
S
(
Cort
Dougan
,
many
others
)
.
*
*
2001
-
200
3
(
c
)
MontaVista
,
Software
,
Inc
.
This
file
is
licensed
under
*
2001
-
200
4
(
c
)
MontaVista
,
Software
,
Inc
.
This
file
is
licensed
under
*
the
terms
of
the
GNU
General
Public
License
version
2
.
This
program
*
is
licensed
"as is"
without
any
warranty
of
any
kind
,
whether
express
*
or
implied
.
...
...
@@ -57,10 +57,11 @@ start_:
isync
#endif
#if defined(CONFIG_MBX) || defined(CONFIG_RPX6)
#if defined(CONFIG_MBX) || defined(CONFIG_RPX6)
|| defined(CONFIG_PPC_PREP)
mr
r29
,
r3
/*
On
the
MBX860
,
r3
is
the
board
info
pointer
.
*
On
the
RPXSUPER
,
r3
points
to
the
*
NVRAM
configuration
keys
.
*
On
the
RPXSUPER
,
r3
points
to
the
NVRAM
*
configuration
keys
.
*
On
PReP
,
r3
is
the
pointer
to
the
residual
data
.
*/
#endif
...
...
@@ -69,7 +70,36 @@ start_:
/
*
The
following
functions
we
call
must
not
modify
r3
or
r4
.....
*/
#ifdef CONFIG_6xx
/
*
On
PReP
we
must
look
at
the
OpenFirmware
pointer
and
sanity
*
test
it
.
On
other
platforms
,
we
disable
the
MMU
right
now
*
and
other
bits
.
*/
#ifdef CONFIG_PPC_PREP
/*
*
Save
the
OF
pointer
to
r25
,
but
only
if
the
entry
point
is
in
a
sane
*
location
; if not we store 0. If there is no entry point, or it is
*
invalid
,
we
establish
the
default
MSR
value
immediately
.
Otherwise
,
*
we
defer
doing
that
,
to
allow
OF
functions
to
be
called
,
until
we
*
begin
uncompressing
the
kernel
.
*/
lis
r8
,
0x0fff
/*
r8
=
0x0fffffff
*/
ori
r8
,
r8
,
0xffff
subc
r8
,
r8
,
r5
/*
r8
=
(
r5
<=
r8
)
?
~
0
:
0
*/
subfe
r8
,
r8
,
r8
nand
r8
,
r8
,
r8
and
.
r5
,
r5
,
r8
/*
r5
will
be
cleared
if
(
r5
>
r8
)
*/
bne
+
haveOF
li
r8
,
MSR_IP
|
MSR_FP
/*
Not
OF
:
set
MSR
immediately
*/
mtmsr
r8
isync
haveOF
:
mr
r25
,
r5
#else
bl
disable_6xx_mmu
#endif
bl
disable_6xx_l1cache
CLEAR_CACHES
...
...
@@ -99,7 +129,7 @@ start_:
mr
r3
,
r29
#endif
#if defined(CONFIG_MBX) || defined(CONFIG_RPX6)
#if defined(CONFIG_MBX) || defined(CONFIG_RPX6)
|| defined(CONFIG_PPC_PREP)
mr
r4
,
r29
/*
put
the
board
info
pointer
where
the
relocate
*
routine
will
find
it
*/
...
...
arch/ppc/boot/
prep/misc
.c
→
arch/ppc/boot/
simple/misc-prep
.c
View file @
37ff5b87
This diff is collapsed.
Click to expand it.
arch/ppc/boot/simple/misc-spruce.c
View file @
37ff5b87
...
...
@@ -174,7 +174,8 @@ get_mem_size(void)
}
unsigned
long
load_kernel
(
unsigned
long
load_addr
,
int
num_words
,
unsigned
long
cksum
)
load_kernel
(
unsigned
long
load_addr
,
int
num_words
,
unsigned
long
cksum
,
void
*
ign1
,
void
*
ign2
)
{
int
csr0
;
int
csr_id
;
...
...
arch/ppc/boot/simple/misc.c
View file @
37ff5b87
...
...
@@ -99,7 +99,9 @@ decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum)
unsigned
long
initrd_loc
,
TotalMemory
=
0
;
serial_fixups
();
#ifdef CONFIG_SERIAL_8250_CONSOLE
com_port
=
serial_init
(
0
,
NULL
);
#endif
#ifdef CONFIG_44x
/* Reset MAL */
...
...
@@ -269,7 +271,8 @@ decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum)
/* Allow decompress_kernel to be hooked into. This is the default. */
void
*
__attribute__
((
weak
))
load_kernel
(
unsigned
long
load_addr
,
int
num_words
,
unsigned
long
cksum
)
load_kernel
(
unsigned
long
load_addr
,
int
num_words
,
unsigned
long
cksum
,
void
*
ign1
,
void
*
ign2
)
{
return
decompress_kernel
(
load_addr
,
num_words
,
cksum
);
}
arch/ppc/boot/
common
/mpc10x_memory.c
→
arch/ppc/boot/
simple
/mpc10x_memory.c
View file @
37ff5b87
...
...
@@ -52,8 +52,12 @@ MPC10X_PCI_OP(read, dword, u32 *, in_le32, 0)
* the system. This assumes that the firmware has correctly set up the memory
* controller registers. On CONFIG_PPC_PREP, we know we are being called
* under a PReP memory map. On all other machines, we assume we are under
* a CHRP memory map.
* a CHRP memory map. Further, on CONFIG_PPC_MULTIPLATFORM we must rename
* this function.
*/
#ifdef CONFIG_PPC_MULTIPLATFORM
#define get_mem_size mpc10x_get_mem_size
#endif
unsigned
long
get_mem_size
(
void
)
{
...
...
arch/ppc/boot/simple/relocate.S
View file @
37ff5b87
...
...
@@ -9,7 +9,7 @@
*
trini
@
mvista
.
com
*
Derived
from
arch
/
ppc
/
boot
/
prep
/
head
.
S
(
Cort
Dougan
,
many
others
)
.
*
*
2001
-
200
2
(
c
)
MontaVista
,
Software
,
Inc
.
This
file
is
licensed
under
*
2001
-
200
4
(
c
)
MontaVista
,
Software
,
Inc
.
This
file
is
licensed
under
*
the
terms
of
the
GNU
General
Public
License
version
2
.
This
program
*
is
licensed
"as is"
without
any
warranty
of
any
kind
,
whether
express
*
or
implied
.
...
...
@@ -182,6 +182,7 @@ start_ldr:
mr
r4
,
r7
/*
Program
length
*/
mr
r5
,
r6
/*
Checksum
*/
mr
r6
,
r11
/*
Residual
data
*/
mr
r7
,
r25
/*
Validated
OFW
interface
*/
bl
load_kernel
/
*
...
...
@@ -195,8 +196,18 @@ start_ldr:
/
*
*
Start
at
the
begining
.
*/
li
r9
,
0x
0000
li
r9
,
0x
c
mtlr
r9
#ifdef CONFIG_PPC_MULTIPLATFORM
/
*
tell
kernel
we
're prep, by putting 0xdeadc0de at KERNELLOAD,
*
and
tell
the
kernel
to
start
on
the
4
th
instruction
since
we
*
overwrite
the
first
3
sometimes
(
which
are
'nop'
)
.
*/
lis
r10
,
0xdeadc0de
@
h
ori
r10
,
r10
,
0xdeadc0de
@
l
li
r9
,
0
stw
r10
,
0
(
r9
)
#endif
blr
.
comm
.
stack
,
4096
*
2
,
4
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