* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
_sccsid
:.asciz
"@(#)hpboot.c 6.2 (Berkeley) %G%"
* RP??/RM?? 1st level boot program: loads next 7.5Kbytes from
* boot sector of file system and sets it up to run.
* Always reads from drive 0.
.set BOOTSIZE
,15 /* size of boot in sectors */
.set M_cr
,4 /* MBA control reg */
.set M_var
,12 /* MBA virt addr reg */
.set M_bc
,16 /* MBA byte count reg */
.set M_map
,0x800 /* start of MBA map reg's */
.set MBAinit
,1 /* MBA init bit in MBA control reg */
.set RP
,0x400 /* start of drive registers */
.set RP_cr
,RP
+0 /* control status register */
.set RP_sr
,RP
+4 /* drive status reg */
.set RP_stk
,RP
+0x14 /* desired track/sector reg */
.set RP_dt
,RP
+0x18 /* drive type reg */
.set RP_off
,RP
+0x24 /* RP offset reg */
.set RP_cyl
,RP
+0x28 /* desired cyl reg */
.set RPBPSECT
,512 /* bytes per sector */
/* RP?? function codes, status bits */
.set RP_RED
,070 /* read */
.set RP_DC
,010 /* drive clear */
.set RP_RIP
,020 /* read in preset */
.set RP_FMT
,0x1000 /* format 22 */
.set RP_MOL
,0x1000 /* medium on line */
.set RP_DRY
,0200 /* drive ready */
.set RP_ERR
,040000 /* composite error */
.set RP_pDRY
,7 /* bit position of RP_DRY */
.set RP_pERR
,14 /* bit position of RP_ERR */
.word
0 /* entry mask for DEC monitor */
nop
;nop
;nop
;nop
;nop
;nop
;nop
;nop
/* some no-ops for 750 boot to skip */
/* get mba location and init it */
/* read-in-preset the drive and set format */
movl $RP_RIP
+RP_GO
,RP_cr(r9
)
.set PROGSIZE
,(BOOTSIZE
*RPBPSECT
)
/* set up MASSBUS map for DMA */
bisl3 $
0x80000000,r0
,M_map(r9
)[r0
]
movl $RP_RED
+RP_GO
,RP_cr(r9
)
/* Eagle's are too fast for the controller. Slow the thing down. */
buzz
: acbl $
2000,$
1,r3
,buzz
/* clear core and execute program */
clrl r10
/* major("/dev/hp0a") */