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
e76f1c88
Commit
e76f1c88
authored
Jul 23, 2002
by
Geert Uytterhoeven
Committed by
Linus Torvalds
Jul 23, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] M68k update (part 20)
Merge remaining bits of core HP300 support
parent
a2b705cd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
104 additions
and
5 deletions
+104
-5
arch/m68k/kernel/head.S
arch/m68k/kernel/head.S
+90
-3
arch/m68k/kernel/setup.c
arch/m68k/kernel/setup.c
+14
-2
No files found.
arch/m68k/kernel/head.S
View file @
e76f1c88
...
...
@@ -312,6 +312,9 @@
#ifdef CONFIG_Q40
.
globl
q40_mem_cptr
#endif
#ifdef CONFIG_HP300
.
globl
hp300_phys_ram_base
#endif
CPUTYPE_040
=
1
/*
indicates
an
040
*/
CPUTYPE_060
=
2
/*
indicates
an
060
*/
...
...
@@ -596,6 +599,64 @@ ENTRY(_start)
__INIT
ENTRY
(
__start
)
#ifdef CONFIG_HP300
/*
This
is
a
hack
.
The
HP
NetBSD
bootloader
loads
us
at
an
arbitrary
address
(
apparently
0xff002000
in
practice
)
which
is
not
good
if
we
need
to
be
able
to
map
this
to
VA
0x1000
.
We
could
do
it
with
pagetables
but
a
better
solution
seems
to
be
to
relocate
the
kernel
in
physical
memory
before
we
start
.
So
,
we
copy
the
entire
kernel
image
(
code
+
data
+
bss
)
down
to
the
16
MB
boundary
that
marks
the
start
of
RAM
.
This
is
slightly
tricky
because
we
must
not
overwrite
the
copying
code
itself
.
:
-)
*/
/*
15/5/98.
The
start
address
of
physical
RAM
changes
depending
on
how
much
RAM
is
present
.
This
is
actually
a
blessing
in
disguise
as
it
provides
a
way
for
us
to
work
out
the
RAM
size
rather
than
hardwiring
it
.
*/
lea
%
pc
@
(
_start
),
%a0
movel
%a0
,%
d6
and
#
0xffff0000
,
%
d6
lea
%
pc
@
(
hp300_phys_ram_base
),
%a0
movel
%
d6
,
%a0
@
movel
%
pc
@
(
L
(
custom
)),
%a3
moveb
#
0xfe
,%
d7
moveb
%
d7
,
%a3
@
(
0x1ffff
)
lea
%
pc
@
(
Lcopystart
),
%a0
lea
%
pc
@
(
Lcopyend
),
%a1
movel
%
d6
,
%a2
/*
Start
of
physical
RAM
*/
1
:
moveb
%a0
@
+,%
d0
moveb
%
d0
,
%a2
@
+
cmpl
%a0
,
%a1
jbne
1
b
movel
%
d6
,
%a2
moveb
#
0xfd
,%
d7
moveb
%
d7
,
%a3
@
(
0x1ffff
)
lea
%
pc
@
(
_stext
),
%a0
lea
%
pc
@
(
_end
),
%a1
jmp
%a2
@
Lcopystart
:
moveb
#
0xf7
,%
d7
moveb
%
d7
,
%a3
@
(
0x1ffff
)
movel
%
d6
,
%a2
/*
Start
of
kernel
*/
add
#
0x1000
,
%a2
1
:
moveb
%a0
@
+,%
d0
moveb
%
d0
,
%a2
@
+
cmpl
%a0
,
%a1
jbne
1
b
moveb
#
0
,%
d7
moveb
%
d7
,
%a3
@
(
0x1ffff
)
movel
%
d6
,
%a0
addl
#
Lstart1
,
%a0
jmp
%a0
@
Lcopyend
:
Lstart1
:
moveb
#
0x3f
,%
d7
moveb
%
d7
,
%a3
@
(
0x1ffff
)
#endif /* CONFIG_HP300 */
/*
*
Setup
initial
stack
pointer
*/
...
...
@@ -605,6 +666,7 @@ ENTRY(__start)
*
Record
the
CPU
and
machine
type
.
*/
#ifndef CONFIG_HP300
get_bi_record
BI_MACHTYPE
lea
%
pc
@
(
m68k_machtype
),
%a1
movel
%a0
@
,
%a1
@
...
...
@@ -620,6 +682,23 @@ ENTRY(__start)
get_bi_record
BI_CPUTYPE
lea
%
pc
@
(
m68k_cputype
),
%a1
movel
%a0
@
,
%a1
@
#else /* CONFIG_HP300 */
/
*
FIXME
HP300
doesn
't use bootinfo yet */
movel
#
MACH_HP300
,%
d4
lea
%
pc
@
(
m68k_machtype
),
%a0
movel
%
d4
,
%a0
@
movel
#
FPU_68881
,%
d0
lea
%
pc
@
(
m68k_fputype
),
%a0
movel
%
d0
,
%a0
@
movel
#
MMU_68030
,%
d0
lea
%
pc
@
(
m68k_mmutype
),
%a0
movel
%
d0
,
%a0
@
movel
#
CPU_68030
,%
d0
lea
%
pc
@
(
m68k_cputype
),
%a0
movel
%
d0
,
%a0
@
leds
(0
x1
)
#endif /* CONFIG_HP300 */
#ifdef CONFIG_MAC
/*
...
...
@@ -893,6 +972,9 @@ L(nocon):
putc
'\n'
putc
'A'
#ifdef CONFIG_HP300
leds
(0
x2
)
#endif /* CONFIG_HP300 */
dputn
%
pc
@
(
L
(
cputype
))
dputn
%
pc
@
(
m68k_supervisor_cachemode
)
dputn
%
pc
@
(
m68k_pgtable_cachemode
)
...
...
@@ -1490,6 +1572,7 @@ func_start get_bi_record,%d1
movel
ARG1
,%
d0
lea
%
pc
@
(
_end
),
%a0
#ifndef CONFIG_HP300
1
:
tstw
%a0
@
(
BIR_TAG
)
jeq
3
f
cmpw
%a0
@
(
BIR_TAG
),%
d0
...
...
@@ -1503,6 +1586,7 @@ func_start get_bi_record,%d1
3
:
moveq
#-
1
,%
d0
lea
%a0
@
(
BIR_SIZE
),
%a0
4
:
#endif /* CONFIG_HP300 */
func_return
get_bi_record
...
...
@@ -3739,7 +3823,12 @@ L(showtest):
__INITDATA
.
align
4
#if defined(CONFIG_ATARI) || defined(CONFIG_AMIGA) || defined(CONFIG_HP300)
#ifdef CONFIG_HP300
hp300_phys_ram_base
:
#endif
#if defined(CONFIG_ATARI) || defined(CONFIG_AMIGA) || \
defined
(
CONFIG_HP300
)
||
defined
(
CONFIG_APOLLO
)
L
(
custom
):
L
(
iobase
):
.
long
0
...
...
@@ -3830,8 +3919,6 @@ L(mac_sccbase):
LSRB0
=
0x10412
LTHRB0
=
0x10416
LCPUCTRL
=
0x10100
L
(
iobase
):
.
long
0
#endif
__FINIT
...
...
arch/m68k/kernel/setup.c
View file @
e76f1c88
...
...
@@ -217,8 +217,20 @@ void __init setup_arch(char **cmdline_p)
int
i
;
char
*
p
,
*
q
;
/* The bootinfo is located right after the kernel bss */
m68k_parse_bootinfo
((
const
struct
bi_record
*
)
&
_end
);
if
(
!
MACH_IS_HP300
)
{
/* The bootinfo is located right after the kernel bss */
m68k_parse_bootinfo
((
const
struct
bi_record
*
)
&
_end
);
}
else
{
/* FIXME HP300 doesn't use bootinfo yet */
extern
unsigned
long
hp300_phys_ram_base
;
unsigned
long
hp300_mem_size
=
0xffffffff
-
hp300_phys_ram_base
;
m68k_cputype
=
CPU_68030
;
m68k_fputype
=
FPU_68882
;
m68k_memory
[
0
].
addr
=
hp300_phys_ram_base
;
/* 0.5M fudge factor */
m68k_memory
[
0
].
size
=
hp300_mem_size
-
512
*
1024
;
m68k_num_memory
++
;
}
if
(
CPU_IS_040
)
m68k_is040or060
=
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