Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/atari/stand/xxboot Make the bootblocks build with E...



details:   https://anonhg.NetBSD.org/src/rev/ead96450f7b8
branches:  trunk
changeset: 514579:ead96450f7b8
user:      thomas <thomas%NetBSD.org@localhost>
date:      Wed Sep 05 19:48:12 2001 +0000

description:
Make the bootblocks build with ELF assembler.

diffstat:

 sys/arch/atari/stand/xxboot/Makefile.inc              |    6 +-
 sys/arch/atari/stand/xxboot/ahdi-sdb00t/sdb00t.ahdi.s |  184 ++++++++-------
 sys/arch/atari/stand/xxboot/ahdi-wdb00t/wdb00t.ahdi.s |  184 ++++++++-------
 sys/arch/atari/stand/xxboot/ahdi-xxboot/xxboot.ahdi.s |  160 +++++++------
 sys/arch/atari/stand/xxboot/fdboot/fdboot.s           |  200 +++++++++--------
 sys/arch/atari/stand/xxboot/sdboot/sdboot.s           |  205 +++++++++--------
 sys/arch/atari/stand/xxboot/wdboot/wdboot.s           |  207 +++++++++--------
 7 files changed, 596 insertions(+), 550 deletions(-)

diffs (truncated from 1584 to 300 lines):

diff -r b8f7fa4ce6d2 -r ead96450f7b8 sys/arch/atari/stand/xxboot/Makefile.inc
--- a/sys/arch/atari/stand/xxboot/Makefile.inc  Wed Sep 05 17:08:41 2001 +0000
+++ b/sys/arch/atari/stand/xxboot/Makefile.inc  Wed Sep 05 19:48:12 2001 +0000
@@ -1,14 +1,14 @@
-#      $NetBSD: Makefile.inc,v 1.3 1997/05/09 07:50:29 mycroft Exp $
+#      $NetBSD: Makefile.inc,v 1.4 2001/09/05 19:48:12 thomas Exp $
 
 BINDIR=                /usr/mdec
 BINMODE=       ${NONBINMODE}
 
 STRIPFLAG=
-LDFLAGS=       -nostdlib -static -Wl,-T0,-N
+LDFLAGS=       -nostdlib -static -Wl,-x,-Ttext,0,-N
 CPPFLAGS+=     -I- -I. -I..
 
 beforeinstall:
-       dd if=${PROG} of=${PROG}X bs=32 skip=1 count=16  2>/dev/null
+       objcopy -O binary ${PROG} ${PROG}X
        @mv -f ${PROG} ${PROG}XX
        @mv -f ${PROG}X ${PROG}
 
diff -r b8f7fa4ce6d2 -r ead96450f7b8 sys/arch/atari/stand/xxboot/ahdi-sdb00t/sdb00t.ahdi.s
--- a/sys/arch/atari/stand/xxboot/ahdi-sdb00t/sdb00t.ahdi.s     Wed Sep 05 17:08:41 2001 +0000
+++ b/sys/arch/atari/stand/xxboot/ahdi-sdb00t/sdb00t.ahdi.s     Wed Sep 05 19:48:12 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sdb00t.ahdi.s,v 1.2 1996/12/28 23:38:00 leo Exp $      */
+/*     $NetBSD: sdb00t.ahdi.s,v 1.3 2001/09/05 19:48:12 thomas Exp $   */
 
 /*
  * Copyright (c) 1995 Waldi Ravens
@@ -32,143 +32,151 @@
 
 #include "xxboot.h"
 
+#ifdef __ELF__
+       .globl  _start, main, fill, end
+
+       .text
+
+_start:        bras    main
+#else
        .globl  start, main, fill, end
 
        .text
 
 start: bras    main
+#endif
        bra     rds0
 
 main:  bclr    #2,(_drvbits+3):w
        clrl    pun_ptr:w
-       movml   d3/d5,sp@-
-       movw    #-1,sp@-
-       movw    #Kbshift,sp@-
+       movml   %d3/%d5,%sp@-
+       movw    #-1,%sp@-
+       movw    #Kbshift,%sp@-
        trap    #BIOS
-       addql   #4,sp
-       btst    #3,d0                   | Alternate?
+       addql   #4,%sp
+       btst    #3,%d0                  | Alternate?
        bnes    exit
-       movq    #3,d0
-       lea     pc@(p0_dsc),a0
-       cmpl    #0x444d4172,d3          | SCSI bootdev?
+       movq    #3,%d0
+       lea     %pc@(p0_dsc),%a0
+       cmpl    #0x444d4172,%d3         | SCSI bootdev?
        beqs    0f
-       movq    #-1,d4                  | no, ACSI
-       movq    #0,d5
-0:     movb    d5,d1                   | NVRAM bootpref
+       movq    #-1,%d4                 | no, ACSI
+       movq    #0,%d5
+0:     movb    %d5,%d1                 | NVRAM bootpref
        bnes    1f
 
        | The Hades bios does not provide a bootprev. In case
        | of doubt, we fetch it ourselves.
        movb    #BOOTPREF,rtcrnr:w
-       movb    rtcdat:w,d1
+       movb    rtcdat:w,%d1
        bnes    1f
-       movq    #-8,d1                  | bootpref = any
+       movq    #-8,%d1                 | bootpref = any
 
-1:     movb    a0@,d2                  | bootflags
-       btst    #0,d2
+1:     movb    %a0@,%d2                        | bootflags
+       btst    #0,%d2
        beqs    2f
-       andb    d1,d2
+       andb    %d1,%d2
        bnes    boot
-2:     lea     a0@(12),a0
-       dbra    d0,1b
+2:     lea     %a0@(12),%a0
+       dbra    %d0,1b
 
-exit:  movml   sp@+,d3/d5
+exit:  movml   %sp@+,%d3/%d5
 tostst:        clrw    _bootdev:w
-       movl    _sysbase:w,a0
-       movl    a0@(24),d0
-       swap    d0
-       cmpl    #0x19870422,d0          | old TOS?
+       movl    _sysbase:w,%a0
+       movl    %a0@(24),%d0
+       swap    %d0
+       cmpl    #0x19870422,%d0         | old TOS?
        bccs    0f                      | no
-       movw    #0xe0,d7
+       movw    #0xe0,%d7
 0:     rts
 
-boot:  movl    a0@(4),d6
-       movq    #1,d5
-       lea     pc@(end),a4
+boot:  movl    %a0@(4),%d6
+       movq    #1,%d5
+       lea     %pc@(end),%a4
        bsrs    rds0
-       tstw    d0
+       tstw    %d0
        bnes    exit
-       movl    a4,a0
-       movw    #0xff,d0
-       movq    #0,d1
-0:     addw    a0@+,d1
-       dbra    d0,0b
-       cmpw    #0x1234,d1
+       movl    %a4,%a0
+       movw    #0xff,%d0
+       movq    #0,%d1
+0:     addw    %a0@+,%d1
+       dbra    %d0,0b
+       cmpw    #0x1234,%d1
        bnes    exit
-       lea     pc@(rds0),a3
-       lea     pc@(tostst),a5
-       movml   sp@+,d3/d5
-       jmp     a4@                     | start bootsector code
+       lea     %pc@(rds0),%a3
+       lea     %pc@(tostst),%a5
+       movml   %sp@+,%d3/%d5
+       jmp     %a4@                    | start bootsector code
 /*
  * in:  d4/d7 (target) d5 (count), d6 (offset), a4 (buffer)
  * out: d0 (<= 0)
  * mod: d0, d1, d2, a0, a1, a5, a6
  */
-rds0:  tstl    d4
+rds0:  tstl    %d4
        bmis    0f
-       movw    d4,sp@-                 | device
-       pea     a4@                     | buffer
-       movw    d5,sp@-                 | count
-       movl    d6,sp@-                 | offset
-       movw    #DMAread,sp@-
+       movw    %d4,%sp@-                       | device
+       pea     %a4@                    | buffer
+       movw    %d5,%sp@-                       | count
+       movl    %d6,%sp@-                       | offset
+       movw    #DMAread,%sp@-
        trap    #XBIOS
-       lea     sp@(14),sp
+       lea     %sp@(14),%sp
        rts
 
 0:     st      flock:w
-       movl    _hz_200:w,d0
-       addql   #2,d0
-1:     cmpl    _hz_200:w,d0
+       movl    _hz_200:w,%d0
+       addql   #2,%d0
+1:     cmpl    _hz_200:w,%d0
        bccs    1b
-       movml   d6/a4,sp@-
-       lea     dmahi:w,a6
-       movb    sp@(7),a6@(4)
-       movb    sp@(6),a6@(2)
-       movb    sp@(5),a6@
-       lea     pc@(r0com),a6
-       movb    sp@(1),a6@(1)
-       movb    sp@(2),a6@(5)
-       movb    sp@(3),a6@(9)
-       movb    d5,a6@(13)
-       addql   #8,sp
-       lea     dmodus:w,a6
-       lea     daccess:w,a5
-       movw    #0x198,a6@
-       movw    #0x098,a6@
-       movw    d5,a5@
-       movw    #0x88,a6@
-       movq    #0,d0
-       movb    d7,d0
-       orb     #0x08,d0
-       swap    d0
-       movw    #0x8a,d0
+       movml   %d6/%a4,%sp@-
+       lea     dmahi:w,%a6
+       movb    %sp@(7),%a6@(4)
+       movb    %sp@(6),%a6@(2)
+       movb    %sp@(5),%a6@
+       lea     %pc@(r0com),%a6
+       movb    %sp@(1),%a6@(1)
+       movb    %sp@(2),%a6@(5)
+       movb    %sp@(3),%a6@(9)
+       movb    %d5,%a6@(13)
+       addql   #8,%sp
+       lea     dmodus:w,%a6
+       lea     daccess:w,%a5
+       movw    #0x198,%a6@
+       movw    #0x098,%a6@
+       movw    %d5,%a5@
+       movw    #0x88,%a6@
+       movq    #0,%d0
+       movb    %d7,%d0
+       orb     #0x08,%d0
+       swap    %d0
+       movw    #0x8a,%d0
        bsrs    shake
-       lea     pc@(r0com),a0
-       movq    #3,d2
-2:     movl    a0@+,d0
+       lea     %pc@(r0com),%a0
+       movq    #3,%d2
+2:     movl    %a0@+,%d0
        bsrs    shake
-       dbra    d2,2b
-       movq    #0x0a,d0
-       movl    d0,a5@
-       movl    #0x190,d1
+       dbra    %d2,2b
+       movq    #0x0a,%d0
+       movl    %d0,%a5@
+       movl    #0x190,%d1
        bsrs    wait
-       movw    #0x8a,a6@
-       movw    a5@,d0
-       andw    #0xff,d0
+       movw    #0x8a,%a6@
+       movw    %a5@,%d0
+       andw    #0xff,%d0
        beqs    0f
-r0err: movq    #-1,d0
-0:     movw    #0x80,a6@
+r0err: movq    #-1,%d0
+0:     movw    #0x80,%a6@
        clrb    flock:w
 r0ret: rts
 
-shake: movl    d0,a5@
-       movq    #0x0a,d1
-wait:  addl    _hz_200:w,d1
+shake: movl    %d0,%a5@
+       movq    #0x0a,%d1
+wait:  addl    _hz_200:w,%d1
 0:     btst    #5,gpip:w
        beqs    r0ret
-       cmpl    _hz_200:w,d1
+       cmpl    _hz_200:w,%d1
        bccs    0b
-       addql   #4,sp
+       addql   #4,%sp
        bras    r0err
 
 r0com: .long   0x0000008a
diff -r b8f7fa4ce6d2 -r ead96450f7b8 sys/arch/atari/stand/xxboot/ahdi-wdb00t/wdb00t.ahdi.s
--- a/sys/arch/atari/stand/xxboot/ahdi-wdb00t/wdb00t.ahdi.s     Wed Sep 05 17:08:41 2001 +0000
+++ b/sys/arch/atari/stand/xxboot/ahdi-wdb00t/wdb00t.ahdi.s     Wed Sep 05 19:48:12 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wdb00t.ahdi.s,v 1.3 1996/12/28 23:38:01 leo Exp $      */
+/*     $NetBSD: wdb00t.ahdi.s,v 1.4 2001/09/05 19:48:12 thomas Exp $   */
 
 /*
  * Copyright (c) 1995 Waldi Ravens
@@ -32,139 +32,147 @@
 
 #include "xxboot.h"
 
+#ifdef __ELF__
+       .globl  _start, main, fill, end
+
+       .text
+
+_start:        bras    main
+#else
        .globl  start, main, fill, end
 
        .text
 
 start: bras    main
+#endif
        bra     rds0
 
 main:  bclr    #2,(_drvbits+3):w
        clrl    pun_ptr:w
-       movml   d3/d5,sp@-



Home | Main Index | Thread Index | Old Index