[BACK]Return to XBUG.S CVS log [TXT][DIR] Up to [local] / sys / arch / mvme88k / stand / sboot

Annotation of sys/arch/mvme88k/stand/sboot/XBUG.S, Revision 1.1

1.1     ! nbrk        1: /*     $OpenBSD: XBUG.S,v 1.5 2006/05/16 22:52:26 miod Exp $   */
        !             2:
        !             3: /*
        !             4:  * Copyright (c) 1995 Theo de Raadt
        !             5:  *
        !             6:  * Redistribution and use in source and binary forms, with or without
        !             7:  * modification, are permitted provided that the following conditions
        !             8:  * are met:
        !             9:  * 1. Redistributions of source code must retain the above copyright
        !            10:  *    notice, this list of conditions and the following disclaimer.
        !            11:  * 2. Redistributions in binary form must reproduce the above copyright
        !            12:  *    notice, this list of conditions and the following disclaimer in the
        !            13:  *    documentation and/or other materials provided with the distribution.
        !            14:  *
        !            15:  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
        !            16:  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
        !            17:  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
        !            18:  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
        !            19:  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        !            20:  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
        !            21:  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
        !            22:  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
        !            23:  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
        !            24:  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
        !            25:  * SUCH DAMAGE.
        !            26:  */
        !            27:
        !            28: /*
        !            29:  * Theo says: I wrote a bootrom for the MVME147 *years* ago. To write
        !            30:  * this ROM I copied a few chunks from the old bootrom, like this piece:
        !            31:  *
        !            32:  * "watch this, the moto bastard struck here, shouldn't have hired people
        !            33:  * from intel I tried to tell them...
        !            34:  *       "BOOT"
        !            35:  *       offset from baseaddr to entry point.
        !            36:  *       offset from baseaddr to first word after checksum
        !            37:  *       garbage
        !            38:  *       checksum made with CS command
        !            39:  * No need to change any of this unless you try to take our names out
        !            40:  * of there. Ie. don't touch."
        !            41:  */
        !            42:
        !            43:                .text
        !            44: bootlabel:     .ascii  "BOOT"
        !            45:                .long   bootstart-0xffa00000    | for rom install
        !            46:                .long   bootlabelend - bootlabel
        !            47:                .asciz  "VME147 rboot Copyright (c) 1995 Theo de Raadt"
        !            48:                .align  2
        !            49: bootstart:     jmp     bssclr
        !            50:                .word   0x229c                  | XXX bitching cksum!
        !            51: bootlabelend:
        !            52:                .word   0
        !            53:
        !            54:                | clear bss and the kernel location
        !            55: bssclr:                movl    #_edata,a0
        !            56:                movl    #_end - _edata,d0
        !            57: 1:             clrb    a0@+
        !            58:                subql   #1,d0
        !            59:                bpl     1b
        !            60:
        !            61:                | rip the data segment from ROM into ram..
        !            62:                movl    #_etext,a2              | start of data
        !            63:                movl    #0x4000,a1              | shovel address
        !            64:                movl    #_edata - _etext,d0
        !            65: 1:             movb    a2@+,a1@+
        !            66:                subql   #1,d0
        !            67:                bpl     1b
        !            68:
        !            69:                bra     start

CVSweb