In the OS glue code for the 060SP, replace the copyin()/copyout() glue by
movs. XXX As our CPP seems to hate the 060SP, I couldn't use assym.h for the PCB_ONFAULT definition, but had to hardwire 64 in the code. This needs to be fixed ASAP, and will be done in the upcoming reorganization of the 060sp Makefiles.
This commit is contained in:
parent
4de13c78d3
commit
8e9fc838dc
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# $NetBSD: netbsd.S,v 1.3 1997/06/27 23:32:09 is Exp $
|
# $NetBSD: netbsd.S,v 1.4 1997/09/28 12:57:57 is Exp $
|
||||||
#
|
#
|
||||||
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
# MOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY GROUP
|
# MOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY GROUP
|
||||||
@ -158,20 +158,17 @@ user_read:
|
|||||||
#
|
#
|
||||||
.global _060_dmem_read_byte
|
.global _060_dmem_read_byte
|
||||||
_060_dmem_read_byte:
|
_060_dmem_read_byte:
|
||||||
|
clrl d1 |# return success
|
||||||
|
clrl d0 |# clear whole longword
|
||||||
btst #0x5,a6@(0x4) |# check for supervisor state
|
btst #0x5,a6@(0x4) |# check for supervisor state
|
||||||
bnes dmrbs |# supervisor
|
bnes dmrbs |# supervisor
|
||||||
dmrbu:
|
dmrbu:
|
||||||
clrl sp@- |# clear space on stack for result
|
movl _curpcb,a1 | fault handler
|
||||||
movel #0x1,sp@- |# pass: # bytes to copy
|
movl #Lferr,a1@(64) | set it
|
||||||
pea sp@(0x7) |# pass: dst addr (stack)
|
movsb a0@,d0
|
||||||
movel a0,sp@- |# pass: src addr (user mem)
|
bra Lfdone
|
||||||
bsrl _copyin |# "copy in" the data
|
|
||||||
movel d0,d1 |# return success
|
|
||||||
addl #0xc,sp |# delete params
|
|
||||||
movel sp@+,d0 |# put answer in d0
|
|
||||||
rts
|
|
||||||
dmrbs:
|
dmrbs:
|
||||||
clrl d0 |# clear whole longword
|
|
||||||
moveb a0@,d0 |# fetch super byte
|
moveb a0@,d0 |# fetch super byte
|
||||||
clrl d1 |# return success
|
clrl d1 |# return success
|
||||||
rts
|
rts
|
||||||
@ -195,22 +192,17 @@ dmrbs:
|
|||||||
|
|
||||||
_060_imem_read_word:
|
_060_imem_read_word:
|
||||||
_060_dmem_read_word:
|
_060_dmem_read_word:
|
||||||
|
clrl d1 |# return success
|
||||||
|
clrl d0 |# clear whole longword
|
||||||
btst #0x5,a6@(0x4) |# check for supervisor state
|
btst #0x5,a6@(0x4) |# check for supervisor state
|
||||||
bnes dmrws |# supervisor
|
bnes dmrws |# supervisor
|
||||||
dmrwu:
|
dmrwu:
|
||||||
clrl sp@- |# clear result space on stack
|
movl _curpcb,a1 | fault handler
|
||||||
movel #0x2,sp@- |# pass: # bytes to copy
|
movl #Lferr,a1@(64) | set it
|
||||||
pea sp@(0x6) |# pass: dst addr (stack)
|
movsw a0@,d0
|
||||||
movel a0,sp@- |# pass: src addr (user mem)
|
bra Lfdone
|
||||||
bsrl _copyin |# "copy in" the data
|
|
||||||
movel d0,d1 |# return success
|
|
||||||
addl #0xc,sp |# delete params
|
|
||||||
movel sp@+,d0 |# put answer in d0
|
|
||||||
rts
|
|
||||||
dmrws:
|
dmrws:
|
||||||
clrl d0 |# clear whole longword
|
|
||||||
movew a0@,d0 |# fetch super word
|
movew a0@,d0 |# fetch super word
|
||||||
clrl d1 |# return success
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -235,18 +227,14 @@ dmrws:
|
|||||||
|
|
||||||
_060_imem_read_long:
|
_060_imem_read_long:
|
||||||
_060_dmem_read_long:
|
_060_dmem_read_long:
|
||||||
|
clrl d1 |# return success
|
||||||
btst #0x5,a6@(0x4) |# check for supervisor state
|
btst #0x5,a6@(0x4) |# check for supervisor state
|
||||||
bnes dmrls |# supervisor
|
bnes dmrls |# supervisor
|
||||||
dmrlu:
|
dmrlu:
|
||||||
subql #0x4,sp |# clear result space on stack
|
movl _curpcb,a1 | fault handler
|
||||||
movel #0x4,sp@- |# pass: # bytes to copy
|
movl #Lferr,a1@(64) | set it
|
||||||
pea sp@(0x4) |# pass: dst addr (stack)
|
movsl a0@,d0
|
||||||
movel a0,sp@- |# pass: src addr (user mem)
|
bra Lfdone
|
||||||
bsrl _copyin |# "copy in" the data
|
|
||||||
movel d0,d1 |# return success
|
|
||||||
addl #0xc,sp |# delete params
|
|
||||||
movel sp@+,d0 |# put answer in d0
|
|
||||||
rts
|
|
||||||
dmrls:
|
dmrls:
|
||||||
movel a0@,d0 |# fetch super longword
|
movel a0@,d0 |# fetch super longword
|
||||||
clrl d1 |# return success
|
clrl d1 |# return success
|
||||||
@ -266,20 +254,16 @@ dmrls:
|
|||||||
#
|
#
|
||||||
.global _060_dmem_write_byte
|
.global _060_dmem_write_byte
|
||||||
_060_dmem_write_byte:
|
_060_dmem_write_byte:
|
||||||
|
clrl d1 |# return success
|
||||||
btst #0x5,a6@(0x4) |# check for supervisor state
|
btst #0x5,a6@(0x4) |# check for supervisor state
|
||||||
bnes dmwbs |# supervisor
|
bnes dmwbs |# supervisor
|
||||||
dmwbu:
|
dmwbu:
|
||||||
movel d0,sp@- |# put src on stack
|
movl _curpcb,a1 | fault handler
|
||||||
movel #0x1,sp@- |# pass: # bytes to copy
|
movl #Lferr,a1@(64) | set it
|
||||||
movel a0,sp@- |# pass: dst addr (user mem)
|
movsb d0,a0@
|
||||||
pea sp@(0xb) |# pass: src addr (stack)
|
bra Lfdone
|
||||||
bsrl _copyout |# "copy out" the data
|
|
||||||
movel d0,d1 |# return success
|
|
||||||
addl #0x10,sp |# delete params + src
|
|
||||||
rts
|
|
||||||
dmwbs:
|
dmwbs:
|
||||||
moveb d0,a0@ |# store super byte
|
moveb d0,a0@ |# store super byte
|
||||||
clrl d1 |# return success
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -296,20 +280,16 @@ dmwbs:
|
|||||||
#
|
#
|
||||||
.global _060_dmem_write_word
|
.global _060_dmem_write_word
|
||||||
_060_dmem_write_word:
|
_060_dmem_write_word:
|
||||||
|
clrl d1 |# return success
|
||||||
btst #0x5,a6@(0x4) |# check for supervisor state
|
btst #0x5,a6@(0x4) |# check for supervisor state
|
||||||
bnes dmwws |# supervisor
|
bnes dmwws |# supervisor
|
||||||
dmwwu:
|
dmwwu:
|
||||||
movel d0,sp@- |# put src on stack
|
movl _curpcb,a1 | fault handler
|
||||||
movel #0x2,sp@- |# pass: # bytes to copy
|
movl #Lferr,a1@(64) | set it
|
||||||
movel a0,sp@- |# pass: dst addr (user mem)
|
movsw d0,a0@
|
||||||
pea sp@(0xa) |# pass: src addr (stack)
|
bra Lfdone
|
||||||
bsrl _copyout |# "copy out" the data
|
|
||||||
movel d0,d1 |# return success
|
|
||||||
addl #0x10,sp |# delete params + src
|
|
||||||
rts
|
|
||||||
dmwws:
|
dmwws:
|
||||||
movew d0,a0@ |# store super word
|
movew d0,a0@ |# store super word
|
||||||
clrl d1 |# return success
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -326,20 +306,23 @@ dmwws:
|
|||||||
#
|
#
|
||||||
.global _060_dmem_write_long
|
.global _060_dmem_write_long
|
||||||
_060_dmem_write_long:
|
_060_dmem_write_long:
|
||||||
|
clrl d1 |# return success
|
||||||
btst #0x5,a6@(0x4) |# check for supervisor state
|
btst #0x5,a6@(0x4) |# check for supervisor state
|
||||||
bnes dmwls |# supervisor
|
bnes dmwls |# supervisor
|
||||||
dmwlu:
|
dmwlu:
|
||||||
movel d0,sp@- |# put src on stack
|
movl _curpcb,a1 | fault handler
|
||||||
movel #0x4,sp@- |# pass: # bytes to copy
|
movl #Lferr,a1@(64) | set it
|
||||||
movel a0,sp@- |# pass: dst addr (user mem)
|
movsl d0,a0@
|
||||||
pea sp@(0x8) |# pass: src addr (stack)
|
bra Lfdone
|
||||||
bsrl _copyout |# "copy out" the data
|
|
||||||
movel d0,d1 |# return success
|
|
||||||
addl #0x10,sp |# delete params + src
|
|
||||||
rts
|
|
||||||
dmwls:
|
dmwls:
|
||||||
movel d0,a0@ |# store super longword
|
movel d0,a0@ |# store super longword
|
||||||
clrl d1 |# return success
|
rts
|
||||||
|
|
||||||
|
############################################################################
|
||||||
|
Lferr:
|
||||||
|
moveq #-1,d1
|
||||||
|
Lfdone:
|
||||||
|
clrl a1@(64) | clear fault handler
|
||||||
rts
|
rts
|
||||||
|
|
||||||
############################################################################
|
############################################################################
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# $NetBSD: netbsd060sp.S,v 1.3 1997/06/27 23:32:09 is Exp $
|
# $NetBSD: netbsd060sp.S,v 1.4 1997/09/28 12:57:57 is Exp $
|
||||||
#
|
#
|
||||||
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
# MOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY GROUP
|
# MOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY GROUP
|
||||||
@ -158,20 +158,17 @@ user_read:
|
|||||||
#
|
#
|
||||||
.global _060_dmem_read_byte
|
.global _060_dmem_read_byte
|
||||||
_060_dmem_read_byte:
|
_060_dmem_read_byte:
|
||||||
|
clrl d1 |# return success
|
||||||
|
clrl d0 |# clear whole longword
|
||||||
btst #0x5,a6@(0x4) |# check for supervisor state
|
btst #0x5,a6@(0x4) |# check for supervisor state
|
||||||
bnes dmrbs |# supervisor
|
bnes dmrbs |# supervisor
|
||||||
dmrbu:
|
dmrbu:
|
||||||
clrl sp@- |# clear space on stack for result
|
movl _curpcb,a1 | fault handler
|
||||||
movel #0x1,sp@- |# pass: # bytes to copy
|
movl #Lferr,a1@(64) | set it
|
||||||
pea sp@(0x7) |# pass: dst addr (stack)
|
movsb a0@,d0
|
||||||
movel a0,sp@- |# pass: src addr (user mem)
|
bra Lfdone
|
||||||
bsrl _copyin |# "copy in" the data
|
|
||||||
movel d0,d1 |# return success
|
|
||||||
addl #0xc,sp |# delete params
|
|
||||||
movel sp@+,d0 |# put answer in d0
|
|
||||||
rts
|
|
||||||
dmrbs:
|
dmrbs:
|
||||||
clrl d0 |# clear whole longword
|
|
||||||
moveb a0@,d0 |# fetch super byte
|
moveb a0@,d0 |# fetch super byte
|
||||||
clrl d1 |# return success
|
clrl d1 |# return success
|
||||||
rts
|
rts
|
||||||
@ -195,22 +192,17 @@ dmrbs:
|
|||||||
|
|
||||||
_060_imem_read_word:
|
_060_imem_read_word:
|
||||||
_060_dmem_read_word:
|
_060_dmem_read_word:
|
||||||
|
clrl d1 |# return success
|
||||||
|
clrl d0 |# clear whole longword
|
||||||
btst #0x5,a6@(0x4) |# check for supervisor state
|
btst #0x5,a6@(0x4) |# check for supervisor state
|
||||||
bnes dmrws |# supervisor
|
bnes dmrws |# supervisor
|
||||||
dmrwu:
|
dmrwu:
|
||||||
clrl sp@- |# clear result space on stack
|
movl _curpcb,a1 | fault handler
|
||||||
movel #0x2,sp@- |# pass: # bytes to copy
|
movl #Lferr,a1@(64) | set it
|
||||||
pea sp@(0x6) |# pass: dst addr (stack)
|
movsw a0@,d0
|
||||||
movel a0,sp@- |# pass: src addr (user mem)
|
bra Lfdone
|
||||||
bsrl _copyin |# "copy in" the data
|
|
||||||
movel d0,d1 |# return success
|
|
||||||
addl #0xc,sp |# delete params
|
|
||||||
movel sp@+,d0 |# put answer in d0
|
|
||||||
rts
|
|
||||||
dmrws:
|
dmrws:
|
||||||
clrl d0 |# clear whole longword
|
|
||||||
movew a0@,d0 |# fetch super word
|
movew a0@,d0 |# fetch super word
|
||||||
clrl d1 |# return success
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -235,18 +227,14 @@ dmrws:
|
|||||||
|
|
||||||
_060_imem_read_long:
|
_060_imem_read_long:
|
||||||
_060_dmem_read_long:
|
_060_dmem_read_long:
|
||||||
|
clrl d1 |# return success
|
||||||
btst #0x5,a6@(0x4) |# check for supervisor state
|
btst #0x5,a6@(0x4) |# check for supervisor state
|
||||||
bnes dmrls |# supervisor
|
bnes dmrls |# supervisor
|
||||||
dmrlu:
|
dmrlu:
|
||||||
subql #0x4,sp |# clear result space on stack
|
movl _curpcb,a1 | fault handler
|
||||||
movel #0x4,sp@- |# pass: # bytes to copy
|
movl #Lferr,a1@(64) | set it
|
||||||
pea sp@(0x4) |# pass: dst addr (stack)
|
movsl a0@,d0
|
||||||
movel a0,sp@- |# pass: src addr (user mem)
|
bra Lfdone
|
||||||
bsrl _copyin |# "copy in" the data
|
|
||||||
movel d0,d1 |# return success
|
|
||||||
addl #0xc,sp |# delete params
|
|
||||||
movel sp@+,d0 |# put answer in d0
|
|
||||||
rts
|
|
||||||
dmrls:
|
dmrls:
|
||||||
movel a0@,d0 |# fetch super longword
|
movel a0@,d0 |# fetch super longword
|
||||||
clrl d1 |# return success
|
clrl d1 |# return success
|
||||||
@ -266,20 +254,16 @@ dmrls:
|
|||||||
#
|
#
|
||||||
.global _060_dmem_write_byte
|
.global _060_dmem_write_byte
|
||||||
_060_dmem_write_byte:
|
_060_dmem_write_byte:
|
||||||
|
clrl d1 |# return success
|
||||||
btst #0x5,a6@(0x4) |# check for supervisor state
|
btst #0x5,a6@(0x4) |# check for supervisor state
|
||||||
bnes dmwbs |# supervisor
|
bnes dmwbs |# supervisor
|
||||||
dmwbu:
|
dmwbu:
|
||||||
movel d0,sp@- |# put src on stack
|
movl _curpcb,a1 | fault handler
|
||||||
movel #0x1,sp@- |# pass: # bytes to copy
|
movl #Lferr,a1@(64) | set it
|
||||||
movel a0,sp@- |# pass: dst addr (user mem)
|
movsb d0,a0@
|
||||||
pea sp@(0xb) |# pass: src addr (stack)
|
bra Lfdone
|
||||||
bsrl _copyout |# "copy out" the data
|
|
||||||
movel d0,d1 |# return success
|
|
||||||
addl #0x10,sp |# delete params + src
|
|
||||||
rts
|
|
||||||
dmwbs:
|
dmwbs:
|
||||||
moveb d0,a0@ |# store super byte
|
moveb d0,a0@ |# store super byte
|
||||||
clrl d1 |# return success
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -296,20 +280,16 @@ dmwbs:
|
|||||||
#
|
#
|
||||||
.global _060_dmem_write_word
|
.global _060_dmem_write_word
|
||||||
_060_dmem_write_word:
|
_060_dmem_write_word:
|
||||||
|
clrl d1 |# return success
|
||||||
btst #0x5,a6@(0x4) |# check for supervisor state
|
btst #0x5,a6@(0x4) |# check for supervisor state
|
||||||
bnes dmwws |# supervisor
|
bnes dmwws |# supervisor
|
||||||
dmwwu:
|
dmwwu:
|
||||||
movel d0,sp@- |# put src on stack
|
movl _curpcb,a1 | fault handler
|
||||||
movel #0x2,sp@- |# pass: # bytes to copy
|
movl #Lferr,a1@(64) | set it
|
||||||
movel a0,sp@- |# pass: dst addr (user mem)
|
movsw d0,a0@
|
||||||
pea sp@(0xa) |# pass: src addr (stack)
|
bra Lfdone
|
||||||
bsrl _copyout |# "copy out" the data
|
|
||||||
movel d0,d1 |# return success
|
|
||||||
addl #0x10,sp |# delete params + src
|
|
||||||
rts
|
|
||||||
dmwws:
|
dmwws:
|
||||||
movew d0,a0@ |# store super word
|
movew d0,a0@ |# store super word
|
||||||
clrl d1 |# return success
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -326,20 +306,23 @@ dmwws:
|
|||||||
#
|
#
|
||||||
.global _060_dmem_write_long
|
.global _060_dmem_write_long
|
||||||
_060_dmem_write_long:
|
_060_dmem_write_long:
|
||||||
|
clrl d1 |# return success
|
||||||
btst #0x5,a6@(0x4) |# check for supervisor state
|
btst #0x5,a6@(0x4) |# check for supervisor state
|
||||||
bnes dmwls |# supervisor
|
bnes dmwls |# supervisor
|
||||||
dmwlu:
|
dmwlu:
|
||||||
movel d0,sp@- |# put src on stack
|
movl _curpcb,a1 | fault handler
|
||||||
movel #0x4,sp@- |# pass: # bytes to copy
|
movl #Lferr,a1@(64) | set it
|
||||||
movel a0,sp@- |# pass: dst addr (user mem)
|
movsl d0,a0@
|
||||||
pea sp@(0x8) |# pass: src addr (stack)
|
bra Lfdone
|
||||||
bsrl _copyout |# "copy out" the data
|
|
||||||
movel d0,d1 |# return success
|
|
||||||
addl #0x10,sp |# delete params + src
|
|
||||||
rts
|
|
||||||
dmwls:
|
dmwls:
|
||||||
movel d0,a0@ |# store super longword
|
movel d0,a0@ |# store super longword
|
||||||
clrl d1 |# return success
|
rts
|
||||||
|
|
||||||
|
############################################################################
|
||||||
|
Lferr:
|
||||||
|
moveq #-1,d1
|
||||||
|
Lfdone:
|
||||||
|
clrl a1@(64) | clear fault handler
|
||||||
rts
|
rts
|
||||||
|
|
||||||
############################################################################
|
############################################################################
|
||||||
|
Loading…
Reference in New Issue
Block a user