1 /* srt0.c 4.10 82/11/13 */ 2 3 #include "../vax/mtpr.h" 4 #define LOCORE 5 #include "../vax/cpu.h" 6 7 /* 8 * Startup code for standalone system 9 * Non-relocating version -- for programs which are loaded by boot 10 */ 11 12 .globl _end 13 .globl _edata 14 .globl _main 15 .globl __rtt 16 .globl _configure 17 .globl _cpu 18 .globl _openfirst 19 20 .set HIGH,31 # mask for total disable 21 22 entry: .globl entry 23 .word 0x0 24 mtpr $HIGH,$IPL # just in case 25 #ifdef REL 26 movl $RELOC,sp 27 #else 28 movl $RELOC-0x2400,sp 29 #endif 30 start: 31 movl aedata,r0 32 clr: 33 clrl (r0)+ 34 cmpl r0,sp 35 jlss clr 36 #ifdef REL 37 movc3 aend,*$0,(sp) 38 jmp *abegin 39 begin: 40 #endif 41 mtpr $0,$SCBB 42 calls $0,_configure 43 movl $1,_openfirst 44 calls $0,_main 45 #ifndef TP 46 jmp start 47 #else 48 ret 49 #endif 50 51 .data 52 #ifdef REL 53 abegin: .long begin 54 aend: .long _end-RELOC 55 aedata: .long _edata-RELOC 56 #else 57 aedata: .long _edata 58 #endif 59 60 __rtt: 61 .word 0x0 62 jmp start 63 64 .globl _badloc 65 _badloc: 66 .word 0 67 movl $1,r0 68 movl 4(ap),r3 69 movl $4,r2 70 movab 9f,(r2) 71 tstl (r3) 72 1: clrl r0 # made it w/o machine checks 73 2: movl $4,r2 74 clrl (r2) 75 ret 76 .align 2 77 9: 78 casel _cpu,$1,$VAX_MAX 79 0: 80 .word 8f-0b # 1 is 780 81 .word 5f-0b # 2 is 750 82 .word 5f-0b # 3 is 730 83 5: 84 mtpr $0xf,$MCESR 85 brb 1f 86 8: 87 mtpr $0,$SBIFS 88 1: 89 addl2 (sp)+,sp # discard mchchk trash 90 movab 2b,(sp) 91 rei 92