diff options
author | Jason Downs <downsj@cvs.openbsd.org> | 1997-07-06 07:46:32 +0000 |
---|---|---|
committer | Jason Downs <downsj@cvs.openbsd.org> | 1997-07-06 07:46:32 +0000 |
commit | 4ab9be160e47d8a43e9972f72dcf8ed0ef8c9490 (patch) | |
tree | 4c425303269fe2d3436f0969b452f4ec607e9376 /sys/arch/m68k/060sp | |
parent | aa19b57f6091518fcdf3122551561a7a80f613e7 (diff) |
Sync with NetBSD changes, 970415 - 970705.
This includes a new asm.h, as well as even more code abstracted from hp300.
These changes are likely to break ports that don't know about them; hp300
runs at the moment.
Diffstat (limited to 'sys/arch/m68k/060sp')
-rw-r--r-- | sys/arch/m68k/060sp/Makefile.inc | 6 | ||||
-rw-r--r-- | sys/arch/m68k/060sp/netbsd.S | 80 |
2 files changed, 42 insertions, 44 deletions
diff --git a/sys/arch/m68k/060sp/Makefile.inc b/sys/arch/m68k/060sp/Makefile.inc index 3134896ea45..2c764e653c8 100644 --- a/sys/arch/m68k/060sp/Makefile.inc +++ b/sys/arch/m68k/060sp/Makefile.inc @@ -1,13 +1,13 @@ # -# $OpenBSD: Makefile.inc,v 1.2 1996/05/30 22:13:56 niklas Exp $ -# $NetBSD: Makefile.inc,v 1.1 1996/05/15 21:06:19 is Exp $ +# $OpenBSD: Makefile.inc,v 1.3 1997/07/06 07:46:18 downsj Exp $ +# $NetBSD: Makefile.inc,v 1.2 1997/05/07 07:15:43 mycroft Exp $ # # NOTE: $S must correspond to the top of the `sys' tree 060SPSRCDIR= $S/arch/m68k/060sp 060SPOBJDIR!= cd $(060SPSRCDIR); \ - printf "xxx:\n\techo \$${.OBJDIR}\n" | $(MAKE) -r -s -f - xxx + printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}\n" | $(MAKE) -s -f- 060SPOBJ= $(060SPOBJDIR)/060sp.o diff --git a/sys/arch/m68k/060sp/netbsd.S b/sys/arch/m68k/060sp/netbsd.S index dec9149c86a..fe9e15449f1 100644 --- a/sys/arch/m68k/060sp/netbsd.S +++ b/sys/arch/m68k/060sp/netbsd.S @@ -1,6 +1,6 @@ # -# $OpenBSD: netbsd.S,v 1.2 1996/05/30 22:15:02 niklas Exp $ -# $NetBSD: netbsd.S,v 1.1 1996/05/15 21:06:24 is Exp $ +# $OpenBSD: netbsd.S,v 1.3 1997/07/06 07:46:19 downsj Exp $ +# $NetBSD: netbsd.S,v 1.3 1997/06/27 23:32:09 is Exp $ # #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # MOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY GROUP @@ -94,19 +94,19 @@ # .global _060_dmem_write _060_dmem_write: - btst #0x5,a6@(0x4) |# check for supervisor state + btst #0x5,a6@(0x4) |# check for supervisor state beqs user_write super_write: - moveb a0@+,a1@+ |# copy 1 byte + moveb a0@+,a1@+ |# copy 1 byte subql #0x1,d0 |# decr byte counter - bnes super_write |# quit if ctr = 0 + bnes super_write |# quit if ctr = 0 clrl d1 |# return success rts user_write: movel d0,sp@- |# pass: counter movel a1,sp@- |# pass: user dst movel a0,sp@- |# pass: supervisor src - bsrl _copyout |# write byte to user mem + bsrl _copyout |# write byte to user mem movel d0,d1 |# return success addl #0xc,sp |# clear 3 lw params rts @@ -128,12 +128,12 @@ user_write: .global _060_dmem_read _060_imem_read: _060_dmem_read: - btst #0x5,a6@(0x4) |# check for supervisor state + btst #0x5,a6@(0x4) |# check for supervisor state beqs user_read super_read: - moveb a0@+,a1@+ |# copy 1 byte + moveb a0@+,a1@+ |# copy 1 byte subql #0x1,d0 |# decr byte counter - bnes super_read |# quit if ctr = 0 + bnes super_read |# quit if ctr = 0 clrl d1 |# return success rts user_read: @@ -159,12 +159,12 @@ user_read: # .global _060_dmem_read_byte _060_dmem_read_byte: - btst #0x5,a6@(0x4) |# check for supervisor state + btst #0x5,a6@(0x4) |# check for supervisor state bnes dmrbs |# supervisor dmrbu: clrl sp@- |# clear space on stack for result - movel #0x1,sp@- |# pass: # bytes to copy - pea sp@(0x7) |# pass: dst addr (stack) + movel #0x1,sp@- |# pass: # bytes to copy + pea sp@(0x7) |# pass: dst addr (stack) movel a0,sp@- |# pass: src addr (user mem) bsrl _copyin |# "copy in" the data movel d0,d1 |# return success @@ -196,12 +196,12 @@ dmrbs: _060_imem_read_word: _060_dmem_read_word: - btst #0x5,a6@(0x4) |# check for supervisor state + btst #0x5,a6@(0x4) |# check for supervisor state bnes dmrws |# supervisor dmrwu: clrl sp@- |# clear result space on stack - movel #0x2,sp@- |# pass: # bytes to copy - pea sp@(0x6) |# pass: dst addr (stack) + movel #0x2,sp@- |# pass: # bytes to copy + pea sp@(0x6) |# pass: dst addr (stack) movel a0,sp@- |# pass: src addr (user mem) bsrl _copyin |# "copy in" the data movel d0,d1 |# return success @@ -236,12 +236,12 @@ dmrws: _060_imem_read_long: _060_dmem_read_long: - btst #0x5,a6@(0x4) |# check for supervisor state + btst #0x5,a6@(0x4) |# check for supervisor state bnes dmrls |# supervisor dmrlu: subql #0x4,sp |# clear result space on stack - movel #0x4,sp@- |# pass: # bytes to copy - pea sp@(0x4) |# pass: dst addr (stack) + movel #0x4,sp@- |# pass: # bytes to copy + pea sp@(0x4) |# pass: dst addr (stack) movel a0,sp@- |# pass: src addr (user mem) bsrl _copyin |# "copy in" the data movel d0,d1 |# return success @@ -267,16 +267,16 @@ dmrls: # .global _060_dmem_write_byte _060_dmem_write_byte: - btst #0x5,a6@(0x4) |# check for supervisor state + btst #0x5,a6@(0x4) |# check for supervisor state bnes dmwbs |# supervisor dmwbu: movel d0,sp@- |# put src on stack - movel #0x1,sp@- |# pass: # bytes to copy + movel #0x1,sp@- |# pass: # bytes to copy movel a0,sp@- |# pass: dst addr (user mem) - pea sp@(0xb) |# pass: src addr (stack) - bsrl _copyout |# "copy out" the data + pea sp@(0xb) |# pass: src addr (stack) + bsrl _copyout |# "copy out" the data movel d0,d1 |# return success - addl #0x10,sp |# delete params + src + addl #0x10,sp |# delete params + src rts dmwbs: moveb d0,a0@ |# store super byte @@ -297,16 +297,16 @@ dmwbs: # .global _060_dmem_write_word _060_dmem_write_word: - btst #0x5,a6@(0x4) |# check for supervisor state + btst #0x5,a6@(0x4) |# check for supervisor state bnes dmwws |# supervisor dmwwu: movel d0,sp@- |# put src on stack - movel #0x2,sp@- |# pass: # bytes to copy + movel #0x2,sp@- |# pass: # bytes to copy movel a0,sp@- |# pass: dst addr (user mem) - pea sp@(0xa) |# pass: src addr (stack) - bsrl _copyout |# "copy out" the data + pea sp@(0xa) |# pass: src addr (stack) + bsrl _copyout |# "copy out" the data movel d0,d1 |# return success - addl #0x10,sp |# delete params + src + addl #0x10,sp |# delete params + src rts dmwws: movew d0,a0@ |# store super word @@ -327,16 +327,16 @@ dmwws: # .global _060_dmem_write_long _060_dmem_write_long: - btst #0x5,a6@(0x4) |# check for supervisor state + btst #0x5,a6@(0x4) |# check for supervisor state bnes dmwls |# supervisor dmwlu: movel d0,sp@- |# put src on stack - movel #0x4,sp@- |# pass: # bytes to copy + movel #0x4,sp@- |# pass: # bytes to copy movel a0,sp@- |# pass: dst addr (user mem) - pea sp@(0x8) |# pass: src addr (stack) - bsrl _copyout |# "copy out" the data + pea sp@(0x8) |# pass: src addr (stack) + bsrl _copyout |# "copy out" the data movel d0,d1 |# return success - addl #0x10,sp |# delete params + src + addl #0x10,sp |# delete params + src rts dmwls: movel d0,a0@ |# store super longword @@ -354,9 +354,9 @@ dmwls: # # The sample code below simply executes an "rte". # - .global _060_real_trace + .global _060_real_trace,_trace _060_real_trace: - rte + jra _trace # # _060_real_access(): @@ -366,14 +366,12 @@ _060_real_trace: # handler for access error exceptions. The exception stack frame is an # 8-word access error frame. # -# The sample routine below simply executes an "rte" instruction which -# is most likely the incorrect thing to do and could put the system -# into an infinite loop. +# We jump directly to the 68060 buserr handler. +# If we had a sane ld, we could use use that entry point directly... # - .global _060_real_access + .globl _060_real_access,_buserr60 _060_real_access: - .globl _buserr - jmp _buserr + jra _buserr60 .include "inetbsd.S" .include "fnetbsd.S" |