Move Decstation-specific locore code (sii DMA copy, vmstat -i counters)
from arch/mips/mips/locore.S to arch/pmax/pmax/locore_machdep.S.
This commit is contained in:
parent
e82e5facd0
commit
1fc59008c3
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: locore.S,v 1.22 1996/05/21 00:20:40 jonathan Exp $ */
|
||||
/* $NetBSD: locore.S,v 1.23 1996/09/30 01:30:21 jonathan Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -1928,112 +1928,5 @@ END(cpu_getregs)
|
||||
|
||||
|
||||
/*
|
||||
* Port-specific locore code
|
||||
* Port-specific locore code moved to sys/arch/<port>/<port>/locore_machdep.S
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copy data to the DMA buffer.
|
||||
* The DMA bufffer can only be written one short at a time
|
||||
* (and takes ~14 cycles).
|
||||
*
|
||||
* CopyToBuffer(src, dst, length)
|
||||
* u_short *src; NOTE: must be short aligned
|
||||
* u_short *dst;
|
||||
* int length;
|
||||
*/
|
||||
LEAF(CopyToBuffer)
|
||||
blez a2, 2f
|
||||
nop
|
||||
1:
|
||||
lhu t0, 0(a0) # read 2 bytes of data
|
||||
subu a2, a2, 2
|
||||
addu a0, a0, 2
|
||||
addu a1, a1, 4
|
||||
bgtz a2, 1b
|
||||
sh t0, -4(a1) # write 2 bytes of data to buffer
|
||||
2:
|
||||
j ra
|
||||
nop
|
||||
END(CopyToBuffer)
|
||||
|
||||
/*
|
||||
* Copy data from the DMA buffer.
|
||||
* The DMA bufffer can only be read one short at a time
|
||||
* (and takes ~12 cycles).
|
||||
*
|
||||
* CopyFromBuffer(src, dst, length)
|
||||
* u_short *src;
|
||||
* char *dst;
|
||||
* int length;
|
||||
*/
|
||||
LEAF(CopyFromBuffer)
|
||||
and t0, a1, 1 # test for aligned dst
|
||||
beq t0, zero, 3f
|
||||
nop
|
||||
blt a2, 2, 7f # at least 2 bytes to copy?
|
||||
nop
|
||||
1:
|
||||
lhu t0, 0(a0) # read 2 bytes of data from buffer
|
||||
addu a0, a0, 4 # keep buffer pointer word aligned
|
||||
addu a1, a1, 2
|
||||
subu a2, a2, 2
|
||||
sb t0, -2(a1)
|
||||
srl t0, t0, 8
|
||||
bge a2, 2, 1b
|
||||
sb t0, -1(a1)
|
||||
3:
|
||||
blt a2, 2, 7f # at least 2 bytes to copy?
|
||||
nop
|
||||
6:
|
||||
lhu t0, 0(a0) # read 2 bytes of data from buffer
|
||||
addu a0, a0, 4 # keep buffer pointer word aligned
|
||||
addu a1, a1, 2
|
||||
subu a2, a2, 2
|
||||
bge a2, 2, 6b
|
||||
sh t0, -2(a1)
|
||||
7:
|
||||
ble a2, zero, 9f # done?
|
||||
nop
|
||||
lhu t0, 0(a0) # copy one more byte
|
||||
nop
|
||||
sb t0, 0(a1)
|
||||
9:
|
||||
j ra
|
||||
nop
|
||||
END(CopyFromBuffer)
|
||||
|
||||
/*
|
||||
* Interrupt counters for vmstat.
|
||||
*/
|
||||
.data
|
||||
.globl _C_LABEL(intrcnt)
|
||||
.globl _C_LABEL(eintrcnt)
|
||||
.globl _C_LABEL(intrnames)
|
||||
.globl _C_LABEL(eintrnames)
|
||||
_C_LABEL(intrnames):
|
||||
.asciiz "softclock"
|
||||
.asciiz "softnet"
|
||||
.asciiz "serial0"
|
||||
.asciiz "serial1"
|
||||
.asciiz "serial2"
|
||||
.asciiz "ether"
|
||||
.asciiz "scsi"
|
||||
.asciiz "memory"
|
||||
.asciiz "clock"
|
||||
.asciiz "fpu"
|
||||
.asciiz "tcslot0"
|
||||
.asciiz "tcslot1"
|
||||
.asciiz "tcslot2"
|
||||
.asciiz "dtop"
|
||||
.asciiz "isdn"
|
||||
.asciiz "floppy"
|
||||
.asciiz "stray"
|
||||
.asciiz "nmi"
|
||||
.asciiz "lostclock"
|
||||
_C_LABEL(eintrnames):
|
||||
.align 2
|
||||
_C_LABEL(intrcnt):
|
||||
.word 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0
|
||||
_C_LABEL(eintrcnt):
|
||||
.word 0 # This shouldn't be needed but with 4.4bsd's as, the eintrcnt
|
||||
# label ends end up in a different section otherwise.
|
||||
|
Loading…
Reference in New Issue
Block a user