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
nexedi
linux
Commits
157c9052
Commit
157c9052
authored
Feb 15, 2005
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge nuts.davemloft.net:/disk1/BK/sparcwork-2.6
into nuts.davemloft.net:/disk1/BK/sparc-2.6
parents
9a7a579e
6c955a7f
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
232 additions
and
224 deletions
+232
-224
arch/sparc64/kernel/auxio.c
arch/sparc64/kernel/auxio.c
+1
-1
arch/sparc64/prom/Makefile
arch/sparc64/prom/Makefile
+1
-1
arch/sparc64/prom/cif.S
arch/sparc64/prom/cif.S
+225
-0
arch/sparc64/prom/p1275.c
arch/sparc64/prom/p1275.c
+2
-219
include/asm-sparc64/uaccess.h
include/asm-sparc64/uaccess.h
+3
-3
No files found.
arch/sparc64/kernel/auxio.c
View file @
157c9052
...
...
@@ -17,7 +17,7 @@
#include <asm/auxio.h>
/* This cannot be static, as it is referenced in entry.S */
void
__iomem
*
auxio_register
=
0U
L
;
void
__iomem
*
auxio_register
=
NUL
L
;
enum
auxio_type
{
AUXIO_TYPE_NODEV
,
...
...
arch/sparc64/prom/Makefile
View file @
157c9052
...
...
@@ -7,4 +7,4 @@ EXTRA_AFLAGS := -ansi
EXTRA_CFLAGS
:=
-Werror
lib-y
:=
bootstr.o devops.o init.o memory.o misc.o
\
tree.o console.o printf.o p1275.o map.o
tree.o console.o printf.o p1275.o map.o
cif.o
arch/sparc64/prom/cif.S
0 → 100644
View file @
157c9052
/*
cif.S
:
PROM
entry
/
exit
assembler
trampolines
.
*
*
Copyright
(
C
)
1996
,
1997
Jakub
Jelinek
(
jj
@
sunsite
.
mff
.
cuni
.
cz
)
*
Copyright
(
C
)
2005
David
S
.
Miller
<
davem
@
davemloft
.
net
>
*/
#include <asm/pstate.h>
.
text
.
globl
prom_cif_interface
prom_cif_interface
:
sethi
%
hi
(
p1275buf
),
%
o0
or
%
o0
,
%
lo
(
p1275buf
),
%
o0
ldx
[%
o0
+
0x010
],
%
o1
!
prom_cif_stack
save
%
o1
,
-
0x190
,
%
sp
ldx
[%
i0
+
0x008
],
%
l2
!
prom_cif_handler
rdpr
%
pstate
,
%
l4
wrpr
%
g0
,
0x15
,
%
pstate
!
save
alternate
globals
stx
%
g1
,
[%
sp
+
2047
+
0x0b0
]
stx
%
g2
,
[%
sp
+
2047
+
0x0b8
]
stx
%
g3
,
[%
sp
+
2047
+
0x0c0
]
stx
%
g4
,
[%
sp
+
2047
+
0x0c8
]
stx
%
g5
,
[%
sp
+
2047
+
0x0d0
]
stx
%
g6
,
[%
sp
+
2047
+
0x0d8
]
stx
%
g7
,
[%
sp
+
2047
+
0x0e0
]
wrpr
%
g0
,
0x814
,
%
pstate
!
save
interrupt
globals
stx
%
g1
,
[%
sp
+
2047
+
0x0e8
]
stx
%
g2
,
[%
sp
+
2047
+
0x0f0
]
stx
%
g3
,
[%
sp
+
2047
+
0x0f8
]
stx
%
g4
,
[%
sp
+
2047
+
0x100
]
stx
%
g5
,
[%
sp
+
2047
+
0x108
]
stx
%
g6
,
[%
sp
+
2047
+
0x110
]
stx
%
g7
,
[%
sp
+
2047
+
0x118
]
wrpr
%
g0
,
0x14
,
%
pstate
!
save
normal
globals
stx
%
g1
,
[%
sp
+
2047
+
0x120
]
stx
%
g2
,
[%
sp
+
2047
+
0x128
]
stx
%
g3
,
[%
sp
+
2047
+
0x130
]
stx
%
g4
,
[%
sp
+
2047
+
0x138
]
stx
%
g5
,
[%
sp
+
2047
+
0x140
]
stx
%
g6
,
[%
sp
+
2047
+
0x148
]
stx
%
g7
,
[%
sp
+
2047
+
0x150
]
wrpr
%
g0
,
0x414
,
%
pstate
!
save
mmu
globals
stx
%
g1
,
[%
sp
+
2047
+
0x158
]
stx
%
g2
,
[%
sp
+
2047
+
0x160
]
stx
%
g3
,
[%
sp
+
2047
+
0x168
]
stx
%
g4
,
[%
sp
+
2047
+
0x170
]
stx
%
g5
,
[%
sp
+
2047
+
0x178
]
stx
%
g6
,
[%
sp
+
2047
+
0x180
]
stx
%
g7
,
[%
sp
+
2047
+
0x188
]
mov
%
g1
,
%
l0
!
also
save
to
locals
,
so
we
can
handle
mov
%
g2
,
%
l1
!
tlb
faults
later
on
,
when
accessing
mov
%
g3
,
%
l3
!
the
stack
.
mov
%
g7
,
%
l5
wrpr
%
l4
,
PSTATE_IE
,
%
pstate
!
turn
off
interrupts
call
%
l2
add
%
i0
,
0x018
,
%
o0
!
prom_args
wrpr
%
g0
,
0x414
,
%
pstate
!
restore
mmu
globals
mov
%
l0
,
%
g1
mov
%
l1
,
%
g2
mov
%
l3
,
%
g3
mov
%
l5
,
%
g7
wrpr
%
g0
,
0x14
,
%
pstate
!
restore
normal
globals
ldx
[%
sp
+
2047
+
0x120
],
%
g1
ldx
[%
sp
+
2047
+
0x128
],
%
g2
ldx
[%
sp
+
2047
+
0x130
],
%
g3
ldx
[%
sp
+
2047
+
0x138
],
%
g4
ldx
[%
sp
+
2047
+
0x140
],
%
g5
ldx
[%
sp
+
2047
+
0x148
],
%
g6
ldx
[%
sp
+
2047
+
0x150
],
%
g7
wrpr
%
g0
,
0x814
,
%
pstate
!
restore
interrupt
globals
ldx
[%
sp
+
2047
+
0x0e8
],
%
g1
ldx
[%
sp
+
2047
+
0x0f0
],
%
g2
ldx
[%
sp
+
2047
+
0x0f8
],
%
g3
ldx
[%
sp
+
2047
+
0x100
],
%
g4
ldx
[%
sp
+
2047
+
0x108
],
%
g5
ldx
[%
sp
+
2047
+
0x110
],
%
g6
ldx
[%
sp
+
2047
+
0x118
],
%
g7
wrpr
%
g0
,
0x15
,
%
pstate
!
restore
alternate
globals
ldx
[%
sp
+
2047
+
0x0b0
],
%
g1
ldx
[%
sp
+
2047
+
0x0b8
],
%
g2
ldx
[%
sp
+
2047
+
0x0c0
],
%
g3
ldx
[%
sp
+
2047
+
0x0c8
],
%
g4
ldx
[%
sp
+
2047
+
0x0d0
],
%
g5
ldx
[%
sp
+
2047
+
0x0d8
],
%
g6
ldx
[%
sp
+
2047
+
0x0e0
],
%
g7
wrpr
%
l4
,
0
,
%
pstate
!
restore
original
pstate
ret
restore
.
globl
prom_cif_callback
prom_cif_callback
:
sethi
%
hi
(
p1275buf
),
%
o1
or
%
o1
,
%
lo
(
p1275buf
),
%
o1
save
%
sp
,
-
0x270
,
%
sp
rdpr
%
pstate
,
%
l4
wrpr
%
g0
,
0x15
,
%
pstate
!
save
PROM
alternate
globals
stx
%
g1
,
[%
sp
+
2047
+
0x0b0
]
stx
%
g2
,
[%
sp
+
2047
+
0x0b8
]
stx
%
g3
,
[%
sp
+
2047
+
0x0c0
]
stx
%
g4
,
[%
sp
+
2047
+
0x0c8
]
stx
%
g5
,
[%
sp
+
2047
+
0x0d0
]
stx
%
g6
,
[%
sp
+
2047
+
0x0d8
]
stx
%
g7
,
[%
sp
+
2047
+
0x0e0
]
!
restore
Linux
alternate
globals
ldx
[%
sp
+
2047
+
0x190
],
%
g1
ldx
[%
sp
+
2047
+
0x198
],
%
g2
ldx
[%
sp
+
2047
+
0x1a0
],
%
g3
ldx
[%
sp
+
2047
+
0x1a8
],
%
g4
ldx
[%
sp
+
2047
+
0x1b0
],
%
g5
ldx
[%
sp
+
2047
+
0x1b8
],
%
g6
ldx
[%
sp
+
2047
+
0x1c0
],
%
g7
wrpr
%
g0
,
0x814
,
%
pstate
!
save
PROM
interrupt
globals
stx
%
g1
,
[%
sp
+
2047
+
0x0e8
]
stx
%
g2
,
[%
sp
+
2047
+
0x0f0
]
stx
%
g3
,
[%
sp
+
2047
+
0x0f8
]
stx
%
g4
,
[%
sp
+
2047
+
0x100
]
stx
%
g5
,
[%
sp
+
2047
+
0x108
]
stx
%
g6
,
[%
sp
+
2047
+
0x110
]
stx
%
g7
,
[%
sp
+
2047
+
0x118
]
!
restore
Linux
interrupt
globals
ldx
[%
sp
+
2047
+
0x1c8
],
%
g1
ldx
[%
sp
+
2047
+
0x1d0
],
%
g2
ldx
[%
sp
+
2047
+
0x1d8
],
%
g3
ldx
[%
sp
+
2047
+
0x1e0
],
%
g4
ldx
[%
sp
+
2047
+
0x1e8
],
%
g5
ldx
[%
sp
+
2047
+
0x1f0
],
%
g6
ldx
[%
sp
+
2047
+
0x1f8
],
%
g7
wrpr
%
g0
,
0x14
,
%
pstate
!
save
PROM
normal
globals
stx
%
g1
,
[%
sp
+
2047
+
0x120
]
stx
%
g2
,
[%
sp
+
2047
+
0x128
]
stx
%
g3
,
[%
sp
+
2047
+
0x130
]
stx
%
g4
,
[%
sp
+
2047
+
0x138
]
stx
%
g5
,
[%
sp
+
2047
+
0x140
]
stx
%
g6
,
[%
sp
+
2047
+
0x148
]
stx
%
g7
,
[%
sp
+
2047
+
0x150
]
!
restore
Linux
normal
globals
ldx
[%
sp
+
2047
+
0x200
],
%
g1
ldx
[%
sp
+
2047
+
0x208
],
%
g2
ldx
[%
sp
+
2047
+
0x210
],
%
g3
ldx
[%
sp
+
2047
+
0x218
],
%
g4
ldx
[%
sp
+
2047
+
0x220
],
%
g5
ldx
[%
sp
+
2047
+
0x228
],
%
g6
ldx
[%
sp
+
2047
+
0x230
],
%
g7
wrpr
%
g0
,
0x414
,
%
pstate
!
save
PROM
mmu
globals
stx
%
g1
,
[%
sp
+
2047
+
0x158
]
stx
%
g2
,
[%
sp
+
2047
+
0x160
]
stx
%
g3
,
[%
sp
+
2047
+
0x168
]
stx
%
g4
,
[%
sp
+
2047
+
0x170
]
stx
%
g5
,
[%
sp
+
2047
+
0x178
]
stx
%
g6
,
[%
sp
+
2047
+
0x180
]
stx
%
g7
,
[%
sp
+
2047
+
0x188
]
!
restore
Linux
mmu
globals
ldx
[%
sp
+
2047
+
0x238
],
%
o0
ldx
[%
sp
+
2047
+
0x240
],
%
o1
ldx
[%
sp
+
2047
+
0x248
],
%
l2
ldx
[%
sp
+
2047
+
0x250
],
%
l3
ldx
[%
sp
+
2047
+
0x258
],
%
l5
ldx
[%
sp
+
2047
+
0x260
],
%
l6
ldx
[%
sp
+
2047
+
0x268
],
%
l7
!
switch
to
Linux
tba
sethi
%
hi
(
sparc64_ttable_tl0
),
%
l1
rdpr
%
tba
,
%
l0
!
save
PROM
tba
mov
%
o0
,
%
g1
mov
%
o1
,
%
g2
mov
%
l2
,
%
g3
mov
%
l3
,
%
g4
mov
%
l5
,
%
g5
mov
%
l6
,
%
g6
mov
%
l7
,
%
g7
wrpr
%
l1
,
%
tba
!
install
Linux
tba
wrpr
%
l4
,
0
,
%
pstate
!
restore
PSTATE
call
prom_world
mov
%
g0
,
%
o0
ldx
[%
i1
+
0x000
],
%
l2
call
%
l2
mov
%
i0
,
%
o0
mov
%
o0
,
%
l1
call
prom_world
or
%
g0
,
1
,
%
o0
wrpr
%
g0
,
0x14
,
%
pstate
!
interrupts
off
!
restore
PROM
mmu
globals
ldx
[%
sp
+
2047
+
0x158
],
%
o0
ldx
[%
sp
+
2047
+
0x160
],
%
o1
ldx
[%
sp
+
2047
+
0x168
],
%
l2
ldx
[%
sp
+
2047
+
0x170
],
%
l3
ldx
[%
sp
+
2047
+
0x178
],
%
l5
ldx
[%
sp
+
2047
+
0x180
],
%
l6
ldx
[%
sp
+
2047
+
0x188
],
%
l7
wrpr
%
g0
,
0x414
,
%
pstate
!
restore
PROM
mmu
globals
mov
%
o0
,
%
g1
mov
%
o1
,
%
g2
mov
%
l2
,
%
g3
mov
%
l3
,
%
g4
mov
%
l5
,
%
g5
mov
%
l6
,
%
g6
mov
%
l7
,
%
g7
wrpr
%
l0
,
%
tba
!
restore
PROM
tba
wrpr
%
g0
,
0x14
,
%
pstate
!
restore
PROM
normal
globals
ldx
[%
sp
+
2047
+
0x120
],
%
g1
ldx
[%
sp
+
2047
+
0x128
],
%
g2
ldx
[%
sp
+
2047
+
0x130
],
%
g3
ldx
[%
sp
+
2047
+
0x138
],
%
g4
ldx
[%
sp
+
2047
+
0x140
],
%
g5
ldx
[%
sp
+
2047
+
0x148
],
%
g6
ldx
[%
sp
+
2047
+
0x150
],
%
g7
wrpr
%
g0
,
0x814
,
%
pstate
!
restore
PROM
interrupt
globals
ldx
[%
sp
+
2047
+
0x0e8
],
%
g1
ldx
[%
sp
+
2047
+
0x0f0
],
%
g2
ldx
[%
sp
+
2047
+
0x0f8
],
%
g3
ldx
[%
sp
+
2047
+
0x100
],
%
g4
ldx
[%
sp
+
2047
+
0x108
],
%
g5
ldx
[%
sp
+
2047
+
0x110
],
%
g6
ldx
[%
sp
+
2047
+
0x118
],
%
g7
wrpr
%
g0
,
0x15
,
%
pstate
!
restore
PROM
alternate
globals
ldx
[%
sp
+
2047
+
0x0b0
],
%
g1
ldx
[%
sp
+
2047
+
0x0b8
],
%
g2
ldx
[%
sp
+
2047
+
0x0c0
],
%
g3
ldx
[%
sp
+
2047
+
0x0c8
],
%
g4
ldx
[%
sp
+
2047
+
0x0d0
],
%
g5
ldx
[%
sp
+
2047
+
0x0d8
],
%
g6
ldx
[%
sp
+
2047
+
0x0e0
],
%
g7
wrpr
%
l4
,
0
,
%
pstate
ret
restore
%
l1
,
0
,
%
o0
arch/sparc64/prom/p1275.c
View file @
157c9052
...
...
@@ -27,225 +27,8 @@ struct {
extern
void
prom_world
(
int
);
void
prom_cif_interface
(
void
)
{
__asm__
__volatile__
(
" mov %0, %%o0
\n
"
" ldx [%%o0 + 0x010], %%o1 ! prom_cif_stack
\n
"
" save %%o1, -0x190, %%sp
\n
"
" ldx [%%i0 + 0x008], %%l2 ! prom_cif_handler
\n
"
" rdpr %%pstate, %%l4
\n
"
" wrpr %%g0, 0x15, %%pstate ! save alternate globals
\n
"
" stx %%g1, [%%sp + 2047 + 0x0b0]
\n
"
" stx %%g2, [%%sp + 2047 + 0x0b8]
\n
"
" stx %%g3, [%%sp + 2047 + 0x0c0]
\n
"
" stx %%g4, [%%sp + 2047 + 0x0c8]
\n
"
" stx %%g5, [%%sp + 2047 + 0x0d0]
\n
"
" stx %%g6, [%%sp + 2047 + 0x0d8]
\n
"
" stx %%g7, [%%sp + 2047 + 0x0e0]
\n
"
" wrpr %%g0, 0x814, %%pstate ! save interrupt globals
\n
"
" stx %%g1, [%%sp + 2047 + 0x0e8]
\n
"
" stx %%g2, [%%sp + 2047 + 0x0f0]
\n
"
" stx %%g3, [%%sp + 2047 + 0x0f8]
\n
"
" stx %%g4, [%%sp + 2047 + 0x100]
\n
"
" stx %%g5, [%%sp + 2047 + 0x108]
\n
"
" stx %%g6, [%%sp + 2047 + 0x110]
\n
"
" stx %%g7, [%%sp + 2047 + 0x118]
\n
"
" wrpr %%g0, 0x14, %%pstate ! save normal globals
\n
"
" stx %%g1, [%%sp + 2047 + 0x120]
\n
"
" stx %%g2, [%%sp + 2047 + 0x128]
\n
"
" stx %%g3, [%%sp + 2047 + 0x130]
\n
"
" stx %%g4, [%%sp + 2047 + 0x138]
\n
"
" stx %%g5, [%%sp + 2047 + 0x140]
\n
"
" stx %%g6, [%%sp + 2047 + 0x148]
\n
"
" stx %%g7, [%%sp + 2047 + 0x150]
\n
"
" wrpr %%g0, 0x414, %%pstate ! save mmu globals
\n
"
" stx %%g1, [%%sp + 2047 + 0x158]
\n
"
" stx %%g2, [%%sp + 2047 + 0x160]
\n
"
" stx %%g3, [%%sp + 2047 + 0x168]
\n
"
" stx %%g4, [%%sp + 2047 + 0x170]
\n
"
" stx %%g5, [%%sp + 2047 + 0x178]
\n
"
" stx %%g6, [%%sp + 2047 + 0x180]
\n
"
" stx %%g7, [%%sp + 2047 + 0x188]
\n
"
" mov %%g1, %%l0 ! also save to locals, so we can handle
\n
"
" mov %%g2, %%l1 ! tlb faults later on, when accessing
\n
"
" mov %%g3, %%l3 ! the stack.
\n
"
" mov %%g7, %%l5
\n
"
" wrpr %%l4, %1, %%pstate ! turn off interrupts
\n
"
" call %%l2
\n
"
" add %%i0, 0x018, %%o0 ! prom_args
\n
"
" wrpr %%g0, 0x414, %%pstate ! restore mmu globals
\n
"
" mov %%l0, %%g1
\n
"
" mov %%l1, %%g2
\n
"
" mov %%l3, %%g3
\n
"
" mov %%l5, %%g7
\n
"
" wrpr %%g0, 0x14, %%pstate ! restore normal globals
\n
"
" ldx [%%sp + 2047 + 0x120], %%g1
\n
"
" ldx [%%sp + 2047 + 0x128], %%g2
\n
"
" ldx [%%sp + 2047 + 0x130], %%g3
\n
"
" ldx [%%sp + 2047 + 0x138], %%g4
\n
"
" ldx [%%sp + 2047 + 0x140], %%g5
\n
"
" ldx [%%sp + 2047 + 0x148], %%g6
\n
"
" ldx [%%sp + 2047 + 0x150], %%g7
\n
"
" wrpr %%g0, 0x814, %%pstate ! restore interrupt globals
\n
"
" ldx [%%sp + 2047 + 0x0e8], %%g1
\n
"
" ldx [%%sp + 2047 + 0x0f0], %%g2
\n
"
" ldx [%%sp + 2047 + 0x0f8], %%g3
\n
"
" ldx [%%sp + 2047 + 0x100], %%g4
\n
"
" ldx [%%sp + 2047 + 0x108], %%g5
\n
"
" ldx [%%sp + 2047 + 0x110], %%g6
\n
"
" ldx [%%sp + 2047 + 0x118], %%g7
\n
"
" wrpr %%g0, 0x15, %%pstate ! restore alternate globals
\n
"
" ldx [%%sp + 2047 + 0x0b0], %%g1
\n
"
" ldx [%%sp + 2047 + 0x0b8], %%g2
\n
"
" ldx [%%sp + 2047 + 0x0c0], %%g3
\n
"
" ldx [%%sp + 2047 + 0x0c8], %%g4
\n
"
" ldx [%%sp + 2047 + 0x0d0], %%g5
\n
"
" ldx [%%sp + 2047 + 0x0d8], %%g6
\n
"
" ldx [%%sp + 2047 + 0x0e0], %%g7
\n
"
" wrpr %%l4, 0, %%pstate ! restore original pstate
\n
"
" ret
\n
"
" restore
\n
"
" "
:
:
"r"
(
&
p1275buf
),
"i"
(
PSTATE_IE
));
}
void
prom_cif_callback
(
void
)
{
__asm__
__volatile__
(
" mov %0, %%o1
\n
"
" save %%sp, -0x270, %%sp
\n
"
" rdpr %%pstate, %%l4
\n
"
" wrpr %%g0, 0x15, %%pstate ! save PROM alternate globals
\n
"
" stx %%g1, [%%sp + 2047 + 0x0b0]
\n
"
" stx %%g2, [%%sp + 2047 + 0x0b8]
\n
"
" stx %%g3, [%%sp + 2047 + 0x0c0]
\n
"
" stx %%g4, [%%sp + 2047 + 0x0c8]
\n
"
" stx %%g5, [%%sp + 2047 + 0x0d0]
\n
"
" stx %%g6, [%%sp + 2047 + 0x0d8]
\n
"
" stx %%g7, [%%sp + 2047 + 0x0e0]
\n
"
" ! restore Linux alternate globals
\n
"
" ldx [%%sp + 2047 + 0x190], %%g1
\n
"
" ldx [%%sp + 2047 + 0x198], %%g2
\n
"
" ldx [%%sp + 2047 + 0x1a0], %%g3
\n
"
" ldx [%%sp + 2047 + 0x1a8], %%g4
\n
"
" ldx [%%sp + 2047 + 0x1b0], %%g5
\n
"
" ldx [%%sp + 2047 + 0x1b8], %%g6
\n
"
" ldx [%%sp + 2047 + 0x1c0], %%g7
\n
"
" wrpr %%g0, 0x814, %%pstate ! save PROM interrupt globals
\n
"
" stx %%g1, [%%sp + 2047 + 0x0e8]
\n
"
" stx %%g2, [%%sp + 2047 + 0x0f0]
\n
"
" stx %%g3, [%%sp + 2047 + 0x0f8]
\n
"
" stx %%g4, [%%sp + 2047 + 0x100]
\n
"
" stx %%g5, [%%sp + 2047 + 0x108]
\n
"
" stx %%g6, [%%sp + 2047 + 0x110]
\n
"
" stx %%g7, [%%sp + 2047 + 0x118]
\n
"
" ! restore Linux interrupt globals
\n
"
" ldx [%%sp + 2047 + 0x1c8], %%g1
\n
"
" ldx [%%sp + 2047 + 0x1d0], %%g2
\n
"
" ldx [%%sp + 2047 + 0x1d8], %%g3
\n
"
" ldx [%%sp + 2047 + 0x1e0], %%g4
\n
"
" ldx [%%sp + 2047 + 0x1e8], %%g5
\n
"
" ldx [%%sp + 2047 + 0x1f0], %%g6
\n
"
" ldx [%%sp + 2047 + 0x1f8], %%g7
\n
"
" wrpr %%g0, 0x14, %%pstate ! save PROM normal globals
\n
"
" stx %%g1, [%%sp + 2047 + 0x120]
\n
"
" stx %%g2, [%%sp + 2047 + 0x128]
\n
"
" stx %%g3, [%%sp + 2047 + 0x130]
\n
"
" stx %%g4, [%%sp + 2047 + 0x138]
\n
"
" stx %%g5, [%%sp + 2047 + 0x140]
\n
"
" stx %%g6, [%%sp + 2047 + 0x148]
\n
"
" stx %%g7, [%%sp + 2047 + 0x150]
\n
"
" ! restore Linux normal globals
\n
"
" ldx [%%sp + 2047 + 0x200], %%g1
\n
"
" ldx [%%sp + 2047 + 0x208], %%g2
\n
"
" ldx [%%sp + 2047 + 0x210], %%g3
\n
"
" ldx [%%sp + 2047 + 0x218], %%g4
\n
"
" ldx [%%sp + 2047 + 0x220], %%g5
\n
"
" ldx [%%sp + 2047 + 0x228], %%g6
\n
"
" ldx [%%sp + 2047 + 0x230], %%g7
\n
"
" wrpr %%g0, 0x414, %%pstate ! save PROM mmu globals
\n
"
" stx %%g1, [%%sp + 2047 + 0x158]
\n
"
" stx %%g2, [%%sp + 2047 + 0x160]
\n
"
" stx %%g3, [%%sp + 2047 + 0x168]
\n
"
" stx %%g4, [%%sp + 2047 + 0x170]
\n
"
" stx %%g5, [%%sp + 2047 + 0x178]
\n
"
" stx %%g6, [%%sp + 2047 + 0x180]
\n
"
" stx %%g7, [%%sp + 2047 + 0x188]
\n
"
" ! restore Linux mmu globals
\n
"
" ldx [%%sp + 2047 + 0x238], %%o0
\n
"
" ldx [%%sp + 2047 + 0x240], %%o1
\n
"
" ldx [%%sp + 2047 + 0x248], %%l2
\n
"
" ldx [%%sp + 2047 + 0x250], %%l3
\n
"
" ldx [%%sp + 2047 + 0x258], %%l5
\n
"
" ldx [%%sp + 2047 + 0x260], %%l6
\n
"
" ldx [%%sp + 2047 + 0x268], %%l7
\n
"
" ! switch to Linux tba
\n
"
" sethi %%hi(sparc64_ttable_tl0), %%l1
\n
"
" rdpr %%tba, %%l0 ! save PROM tba
\n
"
" mov %%o0, %%g1
\n
"
" mov %%o1, %%g2
\n
"
" mov %%l2, %%g3
\n
"
" mov %%l3, %%g4
\n
"
" mov %%l5, %%g5
\n
"
" mov %%l6, %%g6
\n
"
" mov %%l7, %%g7
\n
"
" wrpr %%l1, %%tba ! install Linux tba
\n
"
" wrpr %%l4, 0, %%pstate ! restore PSTATE
\n
"
" call prom_world
\n
"
" mov %%g0, %%o0
\n
"
" ldx [%%i1 + 0x000], %%l2
\n
"
" call %%l2
\n
"
" mov %%i0, %%o0
\n
"
" mov %%o0, %%l1
\n
"
" call prom_world
\n
"
" or %%g0, 1, %%o0
\n
"
" wrpr %%g0, 0x14, %%pstate ! interrupts off
\n
"
" ! restore PROM mmu globals
\n
"
" ldx [%%sp + 2047 + 0x158], %%o0
\n
"
" ldx [%%sp + 2047 + 0x160], %%o1
\n
"
" ldx [%%sp + 2047 + 0x168], %%l2
\n
"
" ldx [%%sp + 2047 + 0x170], %%l3
\n
"
" ldx [%%sp + 2047 + 0x178], %%l5
\n
"
" ldx [%%sp + 2047 + 0x180], %%l6
\n
"
" ldx [%%sp + 2047 + 0x188], %%l7
\n
"
" wrpr %%g0, 0x414, %%pstate ! restore PROM mmu globals
\n
"
" mov %%o0, %%g1
\n
"
" mov %%o1, %%g2
\n
"
" mov %%l2, %%g3
\n
"
" mov %%l3, %%g4
\n
"
" mov %%l5, %%g5
\n
"
" mov %%l6, %%g6
\n
"
" mov %%l7, %%g7
\n
"
" wrpr %%l0, %%tba ! restore PROM tba
\n
"
" wrpr %%g0, 0x14, %%pstate ! restore PROM normal globals
\n
"
" ldx [%%sp + 2047 + 0x120], %%g1
\n
"
" ldx [%%sp + 2047 + 0x128], %%g2
\n
"
" ldx [%%sp + 2047 + 0x130], %%g3
\n
"
" ldx [%%sp + 2047 + 0x138], %%g4
\n
"
" ldx [%%sp + 2047 + 0x140], %%g5
\n
"
" ldx [%%sp + 2047 + 0x148], %%g6
\n
"
" ldx [%%sp + 2047 + 0x150], %%g7
\n
"
" wrpr %%g0, 0x814, %%pstate ! restore PROM interrupt globals
\n
"
" ldx [%%sp + 2047 + 0x0e8], %%g1
\n
"
" ldx [%%sp + 2047 + 0x0f0], %%g2
\n
"
" ldx [%%sp + 2047 + 0x0f8], %%g3
\n
"
" ldx [%%sp + 2047 + 0x100], %%g4
\n
"
" ldx [%%sp + 2047 + 0x108], %%g5
\n
"
" ldx [%%sp + 2047 + 0x110], %%g6
\n
"
" ldx [%%sp + 2047 + 0x118], %%g7
\n
"
" wrpr %%g0, 0x15, %%pstate ! restore PROM alternate globals
\n
"
" ldx [%%sp + 2047 + 0x0b0], %%g1
\n
"
" ldx [%%sp + 2047 + 0x0b8], %%g2
\n
"
" ldx [%%sp + 2047 + 0x0c0], %%g3
\n
"
" ldx [%%sp + 2047 + 0x0c8], %%g4
\n
"
" ldx [%%sp + 2047 + 0x0d0], %%g5
\n
"
" ldx [%%sp + 2047 + 0x0d8], %%g6
\n
"
" ldx [%%sp + 2047 + 0x0e0], %%g7
\n
"
" wrpr %%l4, 0, %%pstate
\n
"
" ret
\n
"
" restore %%l1, 0, %%o0
\n
"
" "
:
:
"r"
(
&
p1275buf
),
"i"
(
PSTATE_PRIV
));
}
extern
void
prom_cif_interface
(
void
);
extern
void
prom_cif_callback
(
void
);
/*
* This provides SMP safety on the p1275buf. prom_callback() drops this lock
...
...
include/asm-sparc64/uaccess.h
View file @
157c9052
...
...
@@ -49,10 +49,10 @@ do { \
__asm__ __volatile__ ("wr %%g0, %0, %%asi" : : "r" ((val).seg)); \
} while(0)
#define __user_ok(addr,size)
1
#define __user_ok(addr,size)
((void)(addr), (void)(size), 1)
#define __kernel_ok (segment_eq(get_fs(), KERNEL_DS))
#define __access_ok(addr,size)
1
#define access_ok(type,addr,size)
1
#define __access_ok(addr,size)
((void)(addr), (void)(size), 1)
#define access_ok(type,addr,size)
((void)(type), (void)(addr), (void)(size), 1)
static
inline
int
verify_area
(
int
type
,
const
void
__user
*
addr
,
unsigned
long
size
)
{
...
...
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