" *********************************************************** " * * " * Copyright, (C) Honeywell Information Systems Inc., 1982 * " * * " *********************************************************** " FWLOAD - Multics Firmware loader-- " 'Borrowed' from loaddm by B. Greenberg, 8/12/74 " Modified 9/75 by Noel I. Morris & B. S. Greenberg " Modified 5/78 by Sherman D. Sprague " Modified 3/79 by Sherman D. Sprague To print error when cache is hard on. " Modified by Sherman D. Sprague 2/11/81 for DPS8 support. " Modified by J. A. Bush 6/20/81 for bootable tape labels " Modified by Sherman D. Sprague 8/21/81 add new mpc models " Modified by Paul Farley March/April 1984 for IMU and MSP800 (DAU) support. " ****************************************************** " * * " * * " * Copyright (c) 1972 by Massachusetts Institute of * " * Technology and Honeywell Information Systems, Inc. * " * * " * * " ****************************************************** include bosequ use toec include bos_toequ use mainc join /text/mainc,toec " equ sltlen,6 equ tape_header_lth,8 equ seg_header_lth,16 equ begin_program,* equ seg_header,begin_program-seg_header_lth equ tape_header,seg_header-tape_header_lth equ log_header,begin_program-1 equ scu_info,origbf place to store SCU info during boot bool int_vector,0 interrupt vector location bool flt_vector,100 fault vector location bool term,14 terminate interrupt cell # bool drl,6 derail fault # bool lockup,7 lockup fault # bool trouble,37 trouble fault # equ chans,64 # of IOM channels equ ioms,2 # of IOM's bool connect_channel,2 connect channel # equ iom_cow,1 place in mailbox for COW equ bootload_base,int_vector+term*2 equ program_offset,(tape_header-begin_program)-bootload_base " " This is the BOS bootstrapping program. It can be entered by bootloading " a BOS tape with a program written on the tape label which will read in the " the label EOF record to skip it, and then read in this record under control " of a DCW. The label begin will have a starting address of 10000 octal. " If the BOS tape in use does not have a bootable label, this record is entered " by initializing and booting three times and the tape record header will be " written at loc 30 octal (absolute). This will cause an IPR fault, which in " turn will cause a trouble fault (because the IPR fault vector contains 0's) " and the trouble fault vector contains a transfer to the begin label. begin: inhibit on <+><+><+><+><+><+><+><+><+><+><+><+> sti temp-*,ic see if in abs mode lda temp-*,ic cana absi,dl tze ascom if not, we were entered from BOS eax1 7*64 set all controller masks fld 0,dl mask all interrupts sscr 2*8,1 .. eax1 -64,1 SSCR will do nothing for unassigned masks tpl -2,ic .. inhibit off <-><-><-><-><-><-><-><-><-><-><-><-> absa begin-*,ic get abs entry address arl 12 in AL sbla tape_header_lth+seg_header_lth,dl eax2 0,al copy move address to x2 stx2 mv_pgm+1-*,ic store in move descriptor ldq 4,2 load bit lenth of record div 36,dl QU contains data word count anq =-1,du mask it adq tape_header_lth,du include length of record header qrl 18-2 compute character count mv_pgm: mrl (rl),(rl) copy everything into proper place desc9a *,ql .. desc9a origpgm+tape_header,ql tra origpgm+(boot2-begin) enter program at rightful place " "The following code is entered when the BOS tape is booted from the tape "controller, without the bos boot label prgram being present in the bos tape "label (init/boot three times). An instruction of 670314355245(8) will be "executed after the tape record is loaded. This is an ANSA instruction with an "SCR modifier. It causes an IPR fault when the terminate interrupt is set. "This causes a trouble fault which is caught and handled by the following code. equ trouble_org,program_offset+(flt_vector+2*trouble) org trouble_org tra begin-program_offset catch trouble fault here nop 0,du .. " The following code catches spurious lockup faults which sometimes " occur when the BOS tape is booted (without the bos boot label pgm) equ lockup_org,program_offset+(flt_vector+2*lockup) org lockup_org tra begin-program_offset catch lockup fault here nop 0,du " " Read in logical record. boot_tape: lxl3 0,7 get count from next control word eax3 1,3 add 1 to include control word adlx3 lrec_offset-*,ic add to offset in last record boot_loop:ldq tape_header+4-*,ic get data length of record in bits div 36,dl compute number of data words stq record_length-*,ic save record length cmpx3 record_length-*,ic Any more words to read? tmi boot_end-*,ic All done. sblx3 record_length-*,ic Decrement remaining count. adlx4 record_length-*,ic compute address for reading next record stx4 data_dcw+1-*,ic Absolute address for data. aos tape_recno-*,ic Go for next record. boot_retry: " Read current record. eaa data_idcw-*,ic Absolute address of DCW list. sta 0,6 Set tape LPW. stz tape_status-*,ic Clear status word. cioc bootload_info+1-*,ic read next record cams 4 lda tape_status-*,ic tze -2,ic Wait for it to happen. cana stat_mask-*,ic Examine error bits. tnz boot_retry-*,ic Try again. ldq tape_header+3-*,ic Record/file number. qlr 18 swap record and file numbers. cmpq tape_recno-*,ic tze boot_loop-*,ic Got the right one, too. tmi boot_retry-*,ic Too far back, keep reading. tra boot_die-*,ic Cannot backspace tape. boot_end: stx4 lrec_addr-*,ic save address of last record stx3 lrec_offset-*,ic save offset into last record eax7 0,4 address in X7 adlx7 lrec_offset-*,ic plus offset tra 0,2 return with pointer to next logical record " org trouble_org+2 even inhibit on <+><+><+><+><+><+><+><+><+><+><+><+> boot_die: dis * stop the machine tra -1,ic I said stop! die_pair: scu scu_info dis * ignore_pair: scu scu_info+8 rcu scu_info+8 inhibit off <-><-><-><-><-><-><-><-><-><-><-><-> tape_pcw: vfd o6/40,6/0,6/0,3/7,3/2,6/2,6/1 Reset status. vfd o9/0 data_idcw:vfd o6/5,6/0,6/0,3/7,3/0,6/0,6/0 Read tape binary. data_dcw: vfd 18/tape_header,6/1,12/8 IOTP - 8 word header. vfd 18/0,6/0,12/0 IOTD - 1 record. even tape_status: bss ,2 bootload_info: bss ,4 stat_mask: oct 370000770000 tape_recno: bss ,1 record_length: bss ,1 lrec_offset: bss ,1 offset into last record lrec_addr: bss ,1 absolute addr of last record util_addr: bss ,1 address of utility package temp: bss ,1 " boot2: ldaq die_pair-*,ic Initialize faults and interrupts. eax1 0 Die on unexpected fault. rpt 32,2 staq flt_vector,1 mlr (),(ic) Copy data left by bootload channel. desc9a 0,4*4 desc9a bootload_info-*+2,4*4 ldx5 bootload_info+2-*,ic Mailbox loc in X5. ldaq bootload_info-*,ic Last PCW stq tape_pcw+1-*,ic Set up PCW for reading rest of program qrl 9-2 eax6 0,qu Tape channel number * 4 in X6. adlx6 bootload_info+2-*,ic Add in base of mailbox eaa tape_pcw-*,ic get address of tape PCW ora =o040000,dl insert no change bit sta connect_channel*4,5 and set connect channel LPW eaa tape_status-*,ic get address of status word sta 2,6 set SCW for tape channel ldaq ignore_pair-*,ic Ignore lockup faults. staq flt_vector+lockup*2 Ignore lockup faults. ldi ovflm,dl Mask overflow. eax7 tape_header-*,ic stx7 data_dcw-*,ic Set up absolute address in DCW. lda tape_header+3-*,ic Record/file number. alr 18 swap record and file numbers sta tape_recno-*,ic eax4 seg_header-*,ic X4 is physical record pointer eax7 0,4 X7 is logical record pointer tsx2 boot_tape-*,ic read program header tsx2 boot_tape-*,ic and first program " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " NOTE: The above code must reside within the first " " physical record of the tape. " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " tsx2 boot_tape-*,ic read header for utility package stx7 util_addr-*,ic save address of utility package tsx2 boot_tape-*,ic and read in utility package lda util_addr-*,ic get address of utility package ldq 0,au get control word stq util_cwd-*,ic save control word eaq -utilorg,ql compute number of words to move lrl 18-2 get character offset and count mlr (rl,al),(rl,ic) copy into proper place desc9a utilorg+1,ql desc9a begin_program+utilorg-*+2,ql mlr (ic),(),fill(0) move descriptor segment template desc9a dseg-*+1,8*2*4 desc9a origds,lnds*4 absa begin_program-*,ic set up SDW for pgm stca origds+pgm*2,74 load address field of SDW lda util_cwd-*,ic get length for this segment adla 15,dl ana -1,dl arl 4 divide by 16 sbla 1,dl als 21 shift to bound position era origds+pgm*2+1 ana sdw.bound,du ersa origds+pgm*2+1 set bounds field " lpri bos_pr-*,ic ldbr bos_dbr-*,ic tra pgm|*+1 and go to appending mode lda seg6length*4,dl length of common in AL mlr (),(pr,rl),fill(0) clear common area desc9a *,0 desc9a com|0,al lda (econf-conf)*4,dl length of config deck in AL mlr (),(pr,rl),fill(777) clear the config deck desc9a *,0 desc9a com|conf,al mlr (),(pr),fill(0) clear the flagbox desc9a *,0 desc9a fgb|0,lnflagbox*4 ldx7 bootload_info+2 IOM mailbox base stx7 com|iom_mbbase lxl7 bootload_info+2 IOM multiplex base and IOM I.D. stx7 com|iom_mxbase lda tape_pcw+1 extract tape channel number sta mpcw+1 save for booting tape firmware arl 9 from PCW ana -1,du sta com|tapechanno sta tapeno lda =hfwload prompt arg sta com|curtcmd but it where we can get it stz com|inputsw assume reading from console ldx7 com|iom_mbbase X7 -> IOM mailbox lda bootload_info+1 IOM COW ana =o7,dl sta mem|1,7 set COW at base of mailbox stz boscom we were not entered from BOS tra on " ascom: stx2 x2 save X2 stc1 boscom on: eaa 32768 make a buffer segment tsx2 makesdw .. tra bosexit Don't clobber core today. staq ds|tmp*2 cams tsx2 initint init interrupts arg execint inhibit off <-><-><-><-><-><-><-><-><-><-><-><-> tsx2 init_io Setup iom mailbox. szn boscom if entered from bos tze boot_entry tsx2 ttyinit arg ttyrequest ldx2 x2 restore X2 lda mem|0,2 get address of argument list arl 18-2 as character offset mlr (pr,al),(),fill(777) copy the arguments desc9a mem|1,(arglen-1)*4 desc9a arg,arglen*4 lda arg get argument in A tra command enter into the command loop bosexit: ldx2 x2 restore X2 lca 1,dl no command chaining tra mem|1,2 return to BOS command level execint: ttyrequest: szn boscom BOS command? tze 0,2 if not, ignore interrupt tra cycle otherwise, go to main loop " patch: lxl7 arg+1 simple patch procedure lda arg+2 .. sta 0,7 patch this program tra cycle .. adump: lxl7 arg+1 get the location to dump lda mem|0,7 and the word that's there tra dump_common and dump it sdump: lxl7 arg+1 get the location to dump lda 0,7 and the word that's there dump_common: sta dump_word save the data for printing tsx2 erpt acc '^o ^w' arg arg+1 arg dump_word tra cycle dump_word: bss ,1 this is where we store the data word to be dumped " boot_entry: eax0 8 prepare to find operator's console opctest: eaa 0,0 test channel number in AU sta opcchan save it for call to check_status als 9 move to PCW position sta opcpcw+1 and store sta opcidpcw+1 and store tsx2 connect_iom connect this channel zero opcpcw,opcpcw eax1 50 wait for status opcwait: tsx2 check_status see if it's there arg opcchan tra opcnost tra noopc tsx2 connect_iom setup to read zero opcidpcw,opcidpcw ID if LCC eax1 50 opctypwait: tsx2 check_status wait for ID status arg opcchan tra opctypnost tra notlcc tra opcfound success opctypnost: eax1 -1,1 wait for status to arrive tnz opctypwait .. opcnost: eax1 -1,1 wait for status to arrive tnz opcwait .. noopc: eax0 1,0 step to next channel cmpx0 32,du must be one of first 32 tmi opctest try next one dis * could not find operator's console tra -1,ic .. notlcc: lda =h off turn off prompt sta com|ttypmtsw opcfound: lda opcchan get channel number sta com|ttychanno set in BOS common tsx2 ttyinit initialize console software arg ttyrequest lda rsmlc_pcw this test may have clobbered tape MPC sta mpcw so we must reset it before proceding tsx2 connect_iom zap the tape controller zero mpcw,0 " lda lrec_offset get offset into last record sta tbufi save as buffer index ldq lrec_addr get absolute addr of last record eax7 0,qu in X7 adx7 record_length plus length of record lda mem|6,7 get record number from trailer sta recno and save for reading tape lda record_length get length of tape record ana =-1,du mask data length of record sta tbufd save it lrl 18-2 offset in AL, length in AL mlr (pr,rl,ql),(rl) copy last record into tape buffer desc9a mem|0,al desc9a tbuf,al lda tape_status get status from reading program ana =o77,dl MPC put the device address here sta tapdev indicate if cold or warm MPC tze tapdev if cold, boot it now lda com|tapechanno get tape channel number arl 18 in AL sta mpc_chan set channel for loading F/W ldq =h a IOM ID is "A" stq iomid .. cache: stz cache_prog clear work area stz cache_prog+1 lcpr cache_prog,02 load cashe mode with 0 scpr cache_prog,06 read it back lda cache_prog+1 check it ! ana =o760000,dl set mask for cache bits tze ask_again continue on it worked tsx2 erpt tell operator- -. acc 'can not turn off cache check free edge swithes and type GO' tsx2 nextline lda arg cmpa cache_on eng. may want to continue tze ask_again so lets continue on! tra cache tra boot_die quit the boot ?!?!?!? ask_again: tsx2 erpt ask for tape controller ID acc 'enter tape controller type:' tsx2 nextline read in controller type lda arg get firmware ID in A ldx1 0,du rpt (mpctblend-mpctbl)/2,2,tze scan for mpc name cmpa mpctbl,1 ttf search_for_tape_fw help_tapes: tsx2 erpt acc 'the following is a list of acceptable tape controller types.' tsx2 print_fwids zero diskids-mpctbl tra ask_again search_for_tape_fw: lda -1,1 get the real firmware id tsx2 fw_search look for it on tape tra notpfw die if not found tsx2 fw_adjust adjust the length tsx2 send_image send out the firmware ldac tapdev get boot device number als 12 shift to position orsa tapeno and set in tape number " cycle: szn boscom BOS command? tnz bosexit if so, exit tsx2 nextline get next input line lda arg cmpa =-1 see if null line tze cycle yes, retry ldx1 0,du rpt (comtblend-comtbl)/2,2,tze search for command cmpa comtbl,1 ttf -1,1* if found, dispatch to it command: ldx1 0,du rpt (mpctblend-mpctbl)/2,2,tze scan for mpc name cmpa mpctbl,1 ttf loadit if found, go load F/W what_: szn boscom BOS command? tze help_msg nope, let the poor thing use help cmpa help_cmnd has he asked for help? tze help yes, do it. help_msg: tsx2 erpt acc 'unknown request - use help request for a list of valid controller types.' tra cycle and try again " comtbl: bci ' warm' tra go_to_bos bci ' cold' tra go_to_bos bci 'nlabel' tra go_to_bos bci 'format' tra go_to_bos bci 'loaddm' tra go_to_bos bci ' patch' tra patch bci ' iom' tra set_iom help_cmnd: bci ' help' tra help bci ' adump' tra adump bci ' sdump' tra sdump comtblend: mpctbl: bci ' t500 m500' bci ' t501 m500' bci ' t502 m500' bci ' t600 m500' bci ' t601 m601' bci ' t602 m601' bci ' t610 m610' bci ' t611 m610' diskids: bci ' d191 m191' bci ' d190 m190' bci ' d181 m181' bci ' d400 m191' bci ' d450 m191' bci ' d451 m191' bci ' d601 m191' bci ' d603 m191' bci ' d500 d500' bci ' d607 d500' bci ' d609 d500' bci ' d611 d500' bci ' d612 d500' dauid: bci ' d800 msp8' urid: bci ' u002 ucmn' bci ' u600 ucmn' mpctblend: " go_to_bos: lda =hloaddm get name of BOS loader tsx2 fw_search get it into buffer tra nobos lda tapeno get tape channel and device sta com|tapechanno save for loaddm mlr (),(pr) copy small program somewhere else desc9a absprogram,labsprogram*4 desc9a mem|origsetup,labsprogram*4 ldq kind get length of program anq =-1,dl mask length qls 2 compute character length tra mem|origsetup copy loaddm and go to it absprogram: mlr (pr,rl),(pr,rl) move BOS loadder into correct place desc9a tmp|0,ql desc9a pgm|0,ql tra pgm|1 enter BOS loader equ labsprogram,*-absprogram " help: tsx2 erpt print heading acc 'the following is a list of acceptable controller types.' tsx2 print_fwids zero mpctblend-mpctbl tra cycle " " print_fwids: stx2 pfwidsx save the x2 eax1 0 pfwidsl: ldq mpctbl,1 get fw id stq temp_fw_id and stash it for print tsx2 type type the id zero temp_fw_id,1 eax1 2,1 move to next id cmpx1 pfwidsx,* done yet? tnz pfwidsl nope, continue pfwidsx: eax2 *-* tra 1,2 return temp_fw_id: bci ' ' " set_iom: lda =h a check IOM ID ldq =h h .. cwl arg+1 .. tnz illiom .. ldq arg+1 get IOM ID sbq 1,dl minus 1 anq =o7,dl mask out extraneous bits cmpq ioms,dl must be within range tpl illiom qls 18+8 multiply by 256 adlq com|iom_mbbase relocate to mailbox base lda arg+2 get port number sta mem|iom_cow,qu place in proper mailbox tra cycle that's all " " If this program is bootloaded from tape by the IOM bootload program, " the IOM mailbox will get overwritten with the contents of this " tape record. It is imperitive that the previous contents be restored. " It is the purpose of the following code to perform this restoration. equ mbx_org,program_offset+(imbx-128) org mbx_org bss ,128 IMW area bss ,2 for status storage bss ,2 for system fault storage bss ,3 vfd 18/imbx+2,6/,12/2 system fault DCW vfd 18/0,o6/04,12/0 connect LPW bss ,3 bss ,20 dup 56 payload channel mailboxes vfd 18/3,o6/02,12/3 LPW bss ,1 LPWX vfd 18/imbx,6/,12/0 SCW bss ,1 DCW dupend " loadit: cmpx1 urid,du is this a unit record controller? tmoz *+3 no, reset flag stc1 urmpc_flag tra *+2 stz urmpc_flag eaa arg+1 sta the_arg lda =h a check IOM ID ldq =h h .. cwl the_arg,* .. tnz illiom .. ldq the_arg,* consider IOM number stq iomid anq =o7,dl cmpq ioms,dl tpnz illiom lda 1,du asa the_arg point to next arg lda the_arg,* consider channel number sta mpc_chan cmpa 8,dl lower limit tmi illchan cmpa chans,dl tpl illchan lda -1,1 get mpc real name tsx2 fw_search look for file tra fw_nf error exit if not there szn urmpc_flag see if urmpc tze not_urmpc_1 no, skip devname validation lda 1,du asa the_arg point to next arg lxl7 the_arg,* see how many tmoz badur cmpx7 =8,du tpl badur stx7 parmct save for index comparison lda 1,du asa the_arg point to next arg eax7 0 set for scan of carrd urlp1: lda the_arg,*7 consider dev name cmpa =-1 is it there at all? tze badur sta urtmp ldx1 0,du set scan rpt (urtblend-urtbl)/2,2,tze scan dev names cmpa urtbl,1 ttn badurd not there, print error lda -1,1 get translated name sta the_arg,*7 eax7 1,7 move to next cmpx7 parmct tmi urlp1 ok lda the_arg,*7 no more, no less cmpa =-1 tnz badur " " Boot actual MPC. not_urmpc_1: lda 1,du asa the_arg point to next arg lda 0,dl ldq the_arg,* check for POF cycling value in mills tpl *+4 ldaq pause_tm get default cycle value staq pof_cycle_tm tra end_pof_arg cmpq =h wait see if user wants to only wait tnz *+4 no, must be millisecond value stz pof_cycle_tm yes, zero out cell stz pof_cycle_tm+1 tra end_pof_arg mpy 1000,dl convert to micro seconds staq pof_cycle_tm end_pof_arg: tsx2 fw_adjust adjust length of F/W image tsx2 send_image szn urmpc_flag see if urmpc tze cycle no, get more commands eaa arg+4 sta the_arg point to arg number 4 eax0 0 initialize index urlp2: lda the_arg,*0 get type name tze urnext if zero, already processed sta fwid and save stz lawd link adapter wd ldq =o200000,du bits to put in lawd eax7 0 count links urlp3: cmpa the_arg,*7 this fwdim on this log channel? tnz *+3 tra if not orsq lawd render bit unto lawd stz the_arg,*7 and clear argument qrl 1 set up for next eax7 1,7 cmpx7 parmct see if all covered tmi urlp3 next log channel szn lawd do we need this ovly? tze urnext skip if not tsx2 fw_search find F/W module tra fw_ovl_nf tsx2 fw_adjust adjust length tsx2 urboot load it urnext: eax0 1,0 step to next type cmpx0 parmct are we finished? tmi urlp2 if not, continue tra cycle " urtbl: bci ' pr4 u400' bci ' pr3 u303' bci ' pr2 u203' bci ' crp ucrp' bci ' crz ucrp' bci ' cpz ucrp' bci ' none000000' urtblend: " " Set up DCW list. " absa data " eax7 tally " tsx2 bldl bldl: als 6 "convert from absa fmt to au eax6 miot set up starting addr ora =o10000,dl IOTP bit bldll: sta 0,6 set IOTP DCW cmpx7 4096,du can tally fit in 1 DCW? tmoz bldlx if so, tra adla =4096,du bump address eax6 1,6 bump DCW index eax7 -4096,7 decrement tally tra bldll go back and do next DCW bldlx: anx7 =o7777,du mask tally (needed if tally = 4096) sxl7 0,6 place tally in list and make IOTD tra 0,2 " " Routine to send firmware out. send_image: stx2 sim_x2 stx3 sim_x3 tsx2 erpt acc 'booting ^g on IOM ^g chn ^o' arg arg arg iomid arg mpc_chan lda iomid get IOM number ana =o7,dl .. sba 1,dl minus 1 als 6 multiply by channels ada mpc_chan insert channel number als 18 shift to left-half sta mpc_chan_high save als 9 shift to PCW position sta mpcw+1 and set in PCW " Issue reset-and-mask-LC PCW. rscr 32 read the clock staq rsm_time and save lda rsmlc_pcw sta mpcw tsx2 connect_iom zero mpcw,0 rscr 32 sbaq rsm_time cmpq =o047040,dl 20 milliseconds tmi *-3 need to wait longer cs_boot: rscr 32 read the clock staq last_cs_io_tm save for CS time check lda regular_pcw sta mpcw lda btdcw set up CS dcw sta midcw lxl3 wc get adjusted wc of file ldx7 tmp|4,3 get address of R/W mem part absa tmp|0 CS addr tsx2 bldl tsx2 connect_iom zero mpcw,midcw cs_wait_st: tsx2 check_status arg mpc_chan_high tra chk_boot_tm tra cs_boot_err lda =o40000,dl delay as prescribed sbla 1,dl tze *+2 tra *-2 ldx1 tmp|4,3 get rel addr of deck id card absa tmp|0,1 get addr of RWM stuff lxl7 wc get whole wc sblx7 tmp|4,3 get RWM wc tsx2 bldl lda mmdcw get special hokum sta midcw set to use tsx2 connect_iom zero mpcw,midcw tsx2 check_status arg mpc_chan_high tra *-2 tra rw_boot_err tsx2 erpt acc 'booted ^g with ^g ^g firmware.' arg arg arg fwid arg fwrev sim_x3: eax3 *-* sim_x2: tra *-* " " Routine to boot URMPC device overlay. urboot: stx2 urbx save exit ldq wc get word count qls 2 compute character count mrl (pr,rl),(pr,rl) move everything down one word desc9a tmp|0,ql desc9a tmp|1,ql lxl7 wc word count in X7 adlx7 1,du plus one more absa tmp|0 get buffer address tsx2 bldl set up dcw's lda regular_pcw restore good pcw sta mpcw ldq lawd stq tmp|0 put in place lda urdcw get special idcw sta midcw tsx2 connect_iom wham!!! zero mpcw,midcw tsx2 check_status arg mpc_chan_high tra *-2 tra ovly_boot_err tsx2 erpt acc 'booted overlay ^g ^g.' arg fwid arg fwrev urbx: tra *-* " " Routine to search for Firmware Module on tape. fw_search: stx2 fwshx2 save X2 sta fwid save ID of F/W szn boscom BOS entry? tnz fwsbos if so, search in BOS file dir lda asgetab set up descriptor for MVT sta fwsmvt .. lcq 1,dl initialize switch to indicate first time stq srchsw .. fw_search_loop: tsx2 readtape read input tape lda kind look at record type tmi fw_search_again if negative, EOT ana =-1,du look at record type tnz fw_search_loop should be header record eax7 0 name offset is 0 unless "fw." cmpc (pr),() check for "fw." desc9a tmp|sltlen,3 desc9a fw.,3 tnz *+2 eax7 10 if "fw.", use last name component mvt (pr,x7),() get name from header record desc9a tmp|sltlen,6 only 6 chars desc6a srchcmp,6 fwsmvt: arg * lda srchcmp is this correct name? tsx2 rjust (right-justified) cmpa fwid .. tnz fw_search_loop if not, look some more tsx2 readtape read in the module lda kind get record type tmi fw_search_again test for EOT stca wc,07 save word count ana =-1,du mask type code cmpa 1,du must be segment record tnz fw_search_again if not, look some more fwshx2: eax2 * restore X2 tra 1,2 return to caller fw_search_again: aos srchsw first time? tze fw_research if so, rewind and try again fwserr: ldx2 fwshx2 restore X2 tra 0,2 take error return fw_research: szn tapdev cold tape MPC? tnz fwserr if so, cannot rewind tape tsx2 xio_wait rewind the tape zero zero tapeno,56 tra *-3 stz recno reset expected record number ldx2 tbufd reset buffer index stx2 tbufi .. tra fw_search_loop try again fwsbos: tsx2 search search for F/W file tra fwserr ana =o777777770777 Mask out extraneous bits. sta kind save length tsx2 rdsec read in F/W file arg tmp|0 tra fwserr lda kind get length ana =o777,dl .. als 6 in words sta wc and save tra fwshx2 return " " Procedure to adjust word count of Firmware Module. fw_adjust: ldq wc get unadjusted word count eaq -64,ql QU contains address of last 64 words lda =hmpcbot look for "mpcbot" cmpa tmp|0,qu .. tze *+3 until found eaq 1,qu .. tra *-3 .. eaq -9,qu leave off ID card now qrl 18 right-justify stq wc and save adjusted word count lda tmp|1,ql get revision ID sta fwrev save for printing tra 0,2 return " notpfw: tsx2 erpt acc 'cannot find ^g firmware.' arg arg tra help_tapes nobos: tsx2 erpt acc 'cannot find BOS loader.' tra cycle illiom: tsx2 erpt acc 'invalid IOM.' tra cycle illchan: tsx2 erpt acc 'invalid channel.' tra cycle fw_nf: tsx2 erpt acc 'firmware for ^g not found.' arg arg tra cycle fw_ovl_nf: tsx2 erpt acc 'overlay ^g not found.' arg fwid tra urnext chk_boot_tm: rscr 32 read the clock sbaq last_cs_io_tm subtract the last IO time cmpaq max_wait have we waited long enough tmi cs_wait_st no... tsx2 erpt acc 'error booting cs, no status after ^d seconds.' arg max_wait_in_seconds tra cycle cs_boot_err: staq erstat ana =o200000,du mask All, but PWR-OFF tze *+6 Nop, report error rscr 32 read the clock sbaq rsm_time subtract reset/mask time cmpaq max_wait tmi pof_wait OK, to wait somemore lda =h cs tra boot_err_join rw_boot_err: staq erstat lda =h rw tra boot_err_join ovly_boot_err: staq erstat lda fwid boot_err_join: sta fwtype tsx2 erpt acc 'error booting ^g, status = ^w ^w.' arg fwtype arg erstat arg erstat+1 tra cycle pof_wait: ldaq pof_cycle_tm tze *+8 if ZERO then make it ONE LONG wait " else, wait alittle while and try again rscr 32 read the clock adaq pof_cycle_tm staq end_pof_wait rscr 32 cmpaq end_pof_wait tmi *-2 tra cs_boot tsx2 erpt acc 'power off detected on boot, will wait ^d seconds and try again.' arg max_wait_in_seconds pof_wait_loop: rscr 32 sbaq rsm_time cmpaq max_wait tmi pof_wait_loop tra cs_boot badur: tsx2 erpt acc 'inconsistent URMPC request.' tra cycle badurd: tsx2 erpt acc 'invalid device: ^g.' arg urtmp tra cycle " boscom: bss ,1 nonzero if entered as BOS command x2: bss ,1 util_cwd: bss ,1 control word for utility package fw.: aci "fw." opcchan: bss ,1 urmpc_flag: bss ,1 even rsm_time: bss ,2 last_cs_io_tm: bss ,2 pof_cycle_tm: bss ,2 end_pof_wait: bss ,2 pause_tm: oct 0,47040 20 milliseconds (in micros) max_wait: oct 0,46113200 10 seconds (in micros) max_wait_in_seconds: oct 12 10 seconds the_arg: bss ,1 address of current argument even opcpcw: vfd o6/51,6/0,6/0,o3/7,3/0,6/2,6/1 " Write alert command. vfd o9/0 even opcidpcw: vfd o6/57,6/0,6/0,o3/7,3/0,6/2,6/1 " Read ID status of LCC vfd o9/0 even mpcw: oct 400000720201 oct 0 midcw: oct 0 miot: oct 0 bss ,10 btdcw: vfd 6/8,6/0,6/0,3/7,3/0,6/0/,6/0 mmdcw: vfd 6/9,6/0,6/0,3/7,3/0,6/0,6/0 urdcw: vfd 6/30,6/1,6/0,3/7,3/0,3/4,3/0,6/0 regular_pcw: vfd 6/32,12/0,3/7,3/2,6/2,6/1 rsmlc_pcw: vfd 6/32,12/0,3/7,3/7,6/2,6/1 srchsw: bss ,1 counter for tape passes srchcmp: bss ,1 holds name for comparison mpc_chan: bss ,1 MPC bootload channel mpc_chan_high: bss ,1 channel in upper fwid: bss ,1 F/W module ID fwrev: bss ,1 F/W module revision iomid: bss ,1 IOM number fwtype: bss ,1 for error messages even erstat: bss ,2 error status wc: bss ,1 word count lawd: bss ,1 logical assignment for UR device parmct: bss ,1 URMPC parameter count urtmp: bss ,1 even cache_prog: bss ,2 cache_on: oct 202062423147 " include bos_sdw include readtape include bos_tv include bos_common end " " " ----------------------------------------------------------- " " " " Historical Background " " This edition of the Multics software materials and documentation is provided and donated " to Massachusetts Institute of Technology by Group Bull including Bull HN Information Systems Inc. " as a contribution to computer science knowledge. " This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, " Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell Bull Inc., Groupe Bull " and Bull HN Information Systems Inc. to the development of this operating system. " Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), " renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership " of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for " managing computer hardware properly and for executing programs. Many subsequent operating systems " incorporated Multics principles. " Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., " as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . " " ----------------------------------------------------------- " " Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without " fee is hereby granted,provided that the below copyright notice and historical background appear in all copies " and that both the copyright notice and historical background and this permission notice appear in supporting " documentation, and that the names of MIT, HIS, Bull or Bull HN not be used in advertising or publicity pertaining " to distribution of the programs without specific prior written permission. " Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. " Copyright 2006 by Bull HN Information Systems Inc. " Copyright 2006 by Bull SAS " All Rights Reserved " "