Annotation of sys/arch/vax/boot/common/romread.S, Revision 1.1
1.1 ! nbrk 1: /* $OpenBSD: romread.S,v 1.1 2002/06/11 09:36:23 hugh Exp $ */
! 2: /* $NetBSD: romread.S,v 1.1 2002/02/24 01:04:25 matt Exp $ */
! 3: /*
! 4: * Copyright (c) 1995 Ludd, University of Lule}, Sweden.
! 5: * All rights reserved.
! 6: *
! 7: * This code is derived from software contributed to Ludd by
! 8: * Bertram Barth.
! 9: *
! 10: * Redistribution and use in source and binary forms, with or without
! 11: * modification, are permitted provided that the following conditions
! 12: * are met:
! 13: * 1. Redistributions of source code must retain the above copyright
! 14: * notice, this list of conditions and the following disclaimer.
! 15: * 2. Redistributions in binary form must reproduce the above copyright
! 16: * notice, this list of conditions and the following disclaimer in the
! 17: * documentation and/or other materials provided with the distribution.
! 18: * 3. All advertising materials mentioning features or use of this software
! 19: * must display the following acknowledgement:
! 20: * This product includes software developed at Ludd, University of
! 21: * Lule}, Sweden and its contributors.
! 22: * 4. The name of the author may not be used to endorse or promote products
! 23: * derived from this software without specific prior written permission
! 24: *
! 25: * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
! 26: * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
! 27: * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
! 28: * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
! 29: * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
! 30: * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
! 31: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
! 32: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
! 33: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
! 34: * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
! 35: */
! 36:
! 37: /* All bugs are subject to removal without further notice */
! 38:
! 39:
! 40:
! 41: #include "../include/asm.h"
! 42:
! 43: /*
! 44: * read750 (int block, int *regs)
! 45: */
! 46: ENTRY(read750, 0xFFE)
! 47: movl 8(ap), r8
! 48: movl 4(r8), r1
! 49: movl 8(r8), r2
! 50: movl 12(r8), r3
! 51: movl 24(r8), r6
! 52: clrl r5
! 53: movl 4(ap), r8
! 54: pushl $0
! 55: movl $0, 4(sp)
! 56: movl fp, 0xf0000 # ragge ???
! 57: jsb (r6)
! 58: movl 0xf0000, fp
! 59: ret
! 60:
! 61: /*
! 62: * romread_uvax (int lbn, int size, void *buf, struct rpb *rpb)
! 63: */
! 64: ENTRY(romread_uvax, 0xFFE)
! 65: movl 16(ap),r11 # restore boot-contents of %r11 (rpb)
! 66: movl 52(r11), r7 # load iovec/bqo into %r7
! 67: addl3 (r7), r7, r6 # load qio into %r6
! 68: pushl r11 # base of rpb
! 69: pushl $0 # virtual-flag
! 70: pushl $33 # read-logical-block
! 71: pushl 4(ap) # lbn to start reading
! 72: pushl 8(ap) # number of bytes to read
! 73: pushl 12(ap) # buffer-address
! 74: calls $6, (r6) # call the qio-routine
! 75: ret # %r0 holds the result
! 76:
! 77: /*
! 78: * romwrite_uvax (int lbn, int size, void *buf, struct rpb *rpb)
! 79: */
! 80: ENTRY(romwrite_uvax, 0xFFE)
! 81: movl 16(ap), r11 # restore boot-contents of %r11 (rpb)
! 82: movl 52(r11), r7 # load iovec/bqo into %r7
! 83: addl3 (r7), r7, r6 # load qio into %r6
! 84: pushl r11 # base of rpb
! 85: pushl $0 # virtual-flag
! 86: pushl $32 # write-logical-block
! 87: pushl 4(ap) # lbn to start reading
! 88: pushl 8(ap) # number of bytes to read
! 89: pushl 12(ap) # buffer-address
! 90: calls $6, (r6) # call the qio-routine
! 91: ret # %r0 holds the result
! 92:
CVSweb