/* upboot.c 6.1 83/07/29 */
* UP 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 UPBPSECT
,512 /* bytes per sector */
.set SID
,62 /* system ID register */
.set UBA_CNFGR
,0 /* UBA configuration register */
.set UBA_CR
,4 /* UBA control register offset */
.set UBA_MAP
,0x800 /* UBA offset to map reg's */
.set UBAinit
,1 /* UBA init bit in UBA control reg */
.set pUBIC
,16 /* Unibus init complete */
/* UP registers and bits */
.set UP
,0176700-0160000 /* address of UP controller */
.set UP_cs1
,UP
+0 /* control and status */
.set UP_wc
,UP
+2 /* word count */
.set UP_ba
,UP
+4 /* bus address */
.set UP_da
,UP
+6 /* disk address */
.set UP_cs2
,UP
+010 /* cs2 register */
.set UP_of
,UP
+032 /* offset register */
.set UP_dc
,UP
+034 /* desired cylinder */
.set UP_hr
,UP
+036 /* holding register */
.set UP_GO
,1 /* go bit */
.set UP_PACK
,022 /* pack acknowledge */
.set UP_DCLR
,010 /* drive clear */
.set UP_PRESET
,020 /* read-in-preset */
.set UP_RCOM
,070 /* read command */
.set UP_pRDY
,7 /* position of ready bit */
.set UP_pERR
,15 /* position of error bit */
.word
0 /* entry mask for dec monitor */
nop
;nop
;nop
;nop
;nop
;nop
;nop
;nop
/* some no-ops for 750 boot to skip */
/* get cpu type and find the first uba */
extzv $
24,$
8,r0
,r0
/* get cpu type */
movab physUBA
,r2
/* get physUBA[cpu] */
movab physUMEM
,r2
/* get physUMEM[cpu] */
bbc $pUBIC
,UBA_CNFGR(r9
),1b
/* init up, set vv in drive 0; if any errors, give up */
movw $UPCS2_CLR
,UP_cs2(r10
)
movw $UP_DCLR
+UP_GO
,UP_cs1(r10
)
movw $UP_PRESET
+UP_GO
,UP_cs1(r10
)
movw $UP_FMT22
,UP_of(r10
)
/* relocate to high core */
movl r5
,r11
/* boot flags */
/* now running relocated */
.set PROGSIZE
,(BOOTSIZE
*UPBPSECT
)
movw $
-PROGSIZE
/2,UP_wc(r10
)
bisl3 $
0x80000000,r0
,UBA_MAP(r9
)
movw $UP_RCOM
+UP_GO
,UP_cs1(r10
)
movl $
2,r10
/* major("/dev/up0a") */
.long 0x20006000 /* 11/780 */
.long 0xf30000 /* 11/750 */
.long 0xf26000 /* 11/730 */
.long 0x2013e000 /* 11/780 */
.long 0xffe000 /* 11/750 */
.long 0xffe000 /* 11/730 */