.TITLE INIT_IO_DB - INIT I/O DATABASE & LOAD PRIMARY RUN-TIME DRIVERS .IDENT 'X-48' .SBTTL Copyright Notice ;**************************************************************************** ;* * ;* COPYRIGHT © 1990, 1995, 1996 BY * ;* DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS. * ;* ALL RIGHTS RESERVED. * ;* * ;* THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED * ;* ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE * ;* INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER * ;* COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY * ;* OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY * ;* TRANSFERRED. * ;* * ;* THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE * ;* AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT * ;* CORPORATION. * ;* * ;* DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS * ;* SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL. * ;* * ;* * ;**************************************************************************** .PAGE .SBTTL Module Revision History ;++ ; ; FACILITY: ; ; INITIALIZATION AND RUN_TIME DRIVER LOADING ROUTINES ; ; ABSTRACT: ; ; THIS ROUTINE INITIALIZES THE I/O DATABASE AND LOADS ESSENTIAL RUN-TIME ; DRIVERS. ; ; As of the GRYPHON release, this module uses FBC - File Based Configuration ; to configure the devices. For information on FBC, please refer to the design ; documents for 3PB (Third Party Boot) and FBC. They can be found in ; the documentation area: ; ; STAR::DOCD$:[EVMS.PROJECT_DOCUMENTS]PP_3PB.PS ; DS_3PB.PS ; ICBM.PS ; ; ; ; ENVIRONMENT: ; ; ALPHA/VMS EXEC ; MODE = KERNEL ; ; ; AUTHOR: WALTER D. BLASCHUK, JR. ; ; CREATION DATE: 31-OCT-1990 ; ; ; MODIFIED BY: ; ; X-48 CMF413 C M Fariz 10-May-1996 ; Fix some minor problems with the request for the foreign ; media and the mounting of the secondary media. ; ; CMF417 C M FARIZ 10-MAY-1996 ; Remove the TEMP code to work-around the cloned BTADP problem. ; Use the NO_HARDWARE bit and the PSEUDO_DEVNAM field in the ; BTADP in place. This is THE fix. ; ; X-47 JCH710d John C. Hallyburton, Jr. 15-May-1996 ; The check in X-46 missed the fact that the NO_HARDWARE bit ; is not yet set; it's part of the next CMF edit. Also defend ; against SYS$AR_BOOTDDB/ 0 which would happen for the port, ; in which case we don't need to set the allocls yet. We'll get ; another chance next time thru the loop for the class driver. ; ; X-46 JCH710c John C. Hallyburton, Jr. 7-May-1996 ; Really, really check the BTADP to ensure it's for the booted ; device, not the comm line, before storing the allocation class. ; ; X-45 CMF409 C M Fariz 30-Apr-1996 ; Need to make sure that PE and DU run-time support is ; not loaded when the SCD is in use. We really want to use ; the LAN bootdriver. This means a simple test of the ; REM_DEBUG flag in the SWRPB. ; ; CMF410 C M Fariz 30-Apr-1996 ; Renumber labels in LOAD_RUNTIME_DRIVERS. We are getting ; too tight again! ; ; X-44 JCH710b John C. Hallyburton, Jr. 30-Apr-1996 ; Get the system device allocation class from the BTADP ; MSCP_SLUN field instead of the device name. The allocation ; class could be 0, which hoses name parsing. ; ; In LOAD_RUNTIME_DRIVERS handle allocation class 0 specially; ; it does not fold controller letter to "A" as others do. ; ; X-43 CMF408 C M Fariz 29-Apr-1996 ; When performing a LAN boot, DUDRIVER should not be ; configured with CTRL_LTR_A. This causes a problem with ; served scsi disks. ; ; X-42 EMB0430 Ellen M. Batbouta 26-Apr-1996 ; Don't load the run-time drivers for the dump devices. ; Not enough information is available for MSCP devices ; to be able to do this. ; ; X-41 CMF408 C M Fariz 19-Apr-1996 ; Correct for the wrong version accidently being checked-in. ; ; x-40 CMF407 C M Fariz 19-Apr-1996 ; Add a test after we determine that the device is REMOTE to ; see if it is of protocol type "MOP ". MOP devices are ; REMOTE but the associated BTADP already contains the necessary ; information. Calling IOC$GET_MSCP_INFO for them trashes ; the info. ; ; X-39 EMB Ellen M. Batbouta 19-April-1996 ; The last edit was not entirely correct. The BTADP$T_ ; CONTROLLER_PREFIX field should be initialized when the ; class driver for the device is loaded (if there is one). ; A missing check to determine if the device has an associated ; class driver was added. ; ; X-38 EMB0428 Ellen M. Batbouta 16-April-1996 ; In the routine, Load_ runtime_drivers, update the fields, ; BTADP$IL_ALLOCLASS and BTADP$T_CONTROLLER_PREFIX with the ; port allocation class for SCSI devices and the counted device ; prefix respectively. ; ; X-37 CMF405 C M FARIZ 12-April-1996 ; Account for the fact that LAS and DAD devices have 3 character ; device names and not two character device names when fabricating ; the actual device name. ; ; Also, change the test to determine if something is the ; system device based on the contents of NEW_UCB_PTER. This ; is more genric. ; ; X-36 CMF404 C M Fariz 11-April-1996 ; Test the booted dev flag in the BTADP before the ; NEW_UCB_PTER is updated. Only the booted device should ; be the system device, not any of the dump device or foreign ; devices. ; ; X-35 CMF403 C M Fariz 04-April-1996 ; Replace the temp hac removed by entry 376. This really ; needs to be fixed in APB in the future. WE SHOULD NOT ; BE CLONING BTADPS!!!!!!! (LAN drivers do this!!!) ; ; X-34 CMF397 C M Fariz 01-Apr-1996 ; Move the cod that fills the BTADP with information required ; for a remote device to later in LOAD_RUNTIME_DRIVERS. This ; action should be associated with the CLASS driver and not ; the PORT driver. ; ; CMF401 C M Fariz 02-April-1996 ; In LOAD_RUNTIME_DRIVERS, replace the test of the ; BDTAP$Q_DEVICE_CLASS being equal to SCOM with a test ; of the BTADP$IL_PROTOCOL_L being equal to 'MOP '. This ; will allow this module to completely eliminate the use ; of the BDTAB and the name table. ; ; CMF402 C M Fariz 02-April-1996 ; Eliminate the routine LOAD_FOREIGN_DRIVERS. The new ; 3PB code will replace it. ; ; X-33 CMF393 C M Fariz 28-Mar-1996 ; Add code to check the RAID (DRDRIVER specific) sysgen ; parameter. While the use of the parameter is a hack, ; for now, we must still check it and fill the appropriate ; BTADP field. ; ; This code once lived in CNBTDRIVER but will live here ; now because we do not want to have adapter specific ; support in CNBTDRIVER. ; ; X-32 CMF384 C M Fariz 16-Feb-1996 ; Add routines for 3PB that will obtain the secondary media, ; and mount the secondary boot device when it is the ; CD. ; ; CMF388 C M Fariz 10-MAR-1996 ; Replace the use of the name table flags, devname and ; driver name with those found in the configuration file(s). ; This is the boot portion of file based configuration (FBC). ; ; 3PB already requird the use of the FBC code in order to ; properly configure foreign devices as if they were inherent. ; This just allows us to take things to the logical next ; step. ; ; NOTE: The boot path requirs that the .EXE be provided ; for all driver names and that the appropriate ; boot flags be set for each driver. If they are ; not - the system will NOT boot. ; ; CMF376 C M Fariz 14-Feb-1996 ; Remove the TEMP code to work-around the BTADP problem for ; class and port adapter specific boot drivers. This can ; go away now because Cobra, Laser and TurboLaser have ; been made to work with CNBTDRIVER. ; ; CMF375 C M Fariz 14-Feb-1996 ; Update LOAD_RUNTIME_DRIVERS to obtain as much configuration ; information as possible from the configuration tables. ; For inherent devices, some information must still be obtained ; from the NAMTBL. ; ; CMF377 C M Fariz 14-Feb-1996 ; Add code to handle a foreign installation when the ; secondary boot device is the same as the primary boot ; device and to query the user. ; ; ; x-31 CMF364 C M Fariz 29-Jan-1996 ; Call IOC$BUILD_CONFIG_TABLE from the MAIN routine. This ; will allow the in-memory configuration tables to be built. ; The address of these tables will be passed to ; IOC$ASSIGN_BOOT_CTRLR. ; ; CMF365 C M Fariz 29-Jan-1996 ; Change the MAIN routine to only do one pass through the ; IOVEC list. This will require that IOC$FIND_BOOT_ADP be ; prior to assigning controller letters. The configuration ; informaiton acquired as a result of this call will need to ; be passed in to LOAD_RUNTIME_DRIVERS. ; ; This work is necessary to provide parity between foreign ; and inherent devices. This is part of 3PB. ; ; CMF356 C M Fariz 29-Jan-1996 ; Delete two lines of code in LOAD_RUNTIME_DRIVERS that obtain ; the system type. This information is not used. This requires ; changing one branch above to go from 160$ tp 200$ and deleting ; the test code which cleared R4 and R5. ; ; CMF367 C M Fariz 02-Feb-1996 ; In the MAIN loop, add code that will copy the controller ; letter from the bus array entry to the BTADP if the ; BTADP is listed as one of the possible dump devices. ; ; This will allow the dump device to be properly identified ; during a crash. This is part of the Dumping off system ; disk project. ; ; ; X-30 JCH710a John C. Hallyburton, Jr. 15-Jan-1996 ; Happy birthday Lloyd Bridges. Figure out the allocation class ; of the boot device from the BTADP in the case of a LAN boot. ; This is no longer automatically the same as the server node. ; ; X-29 CMF360 C M Fariz 27-Dec-1995 ; Renumber the labels used in LOAD_RUNTIME_DRIVER ; and LOAD_FOREIGN DRIVERS. This is part of a clean up ; effort to make the new code to be added for 3PB fit in ; more easily. This change is being made prior to the 3PB ; changes to help isolate any problems that may be caused by myilabeling. ; ; CMF346 C M Fariz 27-Dec-1995 ; Remove all references to KYDRIVER. It does not exist now ; nor will it ever. ; ; X-28 JCH710 John C. Hallyburton, Jr. 25-Oct-1995 ; STAR:: DOCD$:[EVMS.PROJECT_DOCUMENTS]FS-SCSI-NAMING.PS ; Device naming: Call IOC$GOPAC to obtain list of ; devices with port allocation classes. ; ; If boot device has a port allocation class, pass that ; info to LOAD_DRIVER for proper configuration. ; ; A few clean-up measures. Let's all do our part to reduce ; unnecessary code in this module. ; ; X-26A1 CMF345 C M Fariz 8-Aug-1995 ; Remove all code related to the ADU and MANNEQUIN. This ; is being done to ensure that these "platforms" cannot be ; booted. In addition, the removal of this obsolete code ; will make this module easier to maintain. ; ; CMF338 C M Fariz 8-Aug-1995 ; Updated the copyright statement to use the symbol © ; rather than the symbol (c). Added the current year ; to the copy right dates. ; ; X-26 JPJ James P. Janetos 01-Nov-1994 ; Add call to IOC$FIND_RUNTIME_DRIVER to get the correct ; driver name just before loading the system device ; driver. The driver name could be incorrect ; due to the broken algorithm in CNBTDRIVER for ; selecting the system device driver name. CNBTDRIVER ; mistakenly assumes it knows the runtime driver name ; based on the boot protocol (scsi, dssi, mop, etc) and ; the platform type. The CNBTDRIVER assumptions break ; for PCI, where we have more than one type of SCSI port. ; Also add a call to IOC$FIX_DRIVER_DESCRIPTOR, which ; adds the .EXE suffix to the driver file name returned ; by IOC$FIND_RUNTIME_DRIVER. The .EXE suffix is ; required by sys$load_driver when called in exec_init ; context. ; ; Remove unused PDRVR descriptor. ; ; X-25 JPJ James P. Janetos 16-Jun-1994 ; Add call to IOC$INIT_IO_BRIDGE after the boot driver ; is disconnected. This routine does any hardware setup ; that must be postponed until after the boot driver ; has been disconnected. ; ; X-24 BJH Brett J. Hull 10-Feb-1994 ; Fix INCONSTATE bugcheck called due to incorrect setting ; of SYSGEN parameter SHADOWING in LOAD_SHDRIVER. Place ; SH_BAD_PARAM_ERR in LOAD_SHDRIVER. ; ; X-23 RWC140 Richard W. Critz, Jr. 14-Jan-1994 ; Initial testing of 3PB yields the following fixes: ; ; 1) Fix a loop in searching for the end of the returned IOGEN ; item list in LOAD_FOREIGN_DRIVERS. ; ; 2) Add some logging of status and operations in ; LOAD_FOREIGN_DRIVERS to improve understanding of what is ; happening from the console. ; ; X-22 RWC136 Richard W. Critz, Jr. 30-Dec-1993 ; Integrate 3PB support. Also, reset generation number to match ; CMS. ; ; X-20 KDM0236 Kathleen D. Morse 02-Aug-1993 ; Set EXE$GL_SHADOWING to 2, if EXE$GL_SHADOW_SYS_DISK is 1, ; (i.e., indicate shadowing is active if specified for system ; disk, but not in global SYSGEN parameter for shadowing type). ; ; X-19 KDM0226 Kathleen D. Morse 19-Feb-1993 ; Add host-based shadowing system disk support. Add ; check to report error if EXE$GL_SHADOWING is 1 or 3 to ; request controller-based shadowing, which is not supported ; on OpenVMS AXP systems. ; ; X-18 JFD0157 James F. Dunham 4-MAR-1993 ; Change the processing of LOAD_RUNTIME_DRIVERS, so that device ; types which are not of class DC$_SCOM, only have their runtime ; driver loaded if the specified BTADP contains is a boot_device. ; ; A port device may be shared amoung several class of devices. If ; this is attemped, the second time the port device is "loaded", ; SYS$LOAD_DRIVER will return an SS$_DEVEXISTS error. If the ; create device bit (NAME_FLAGS$V_CREATE_DEV) was not set, convert ; this fatal error into a success. ; ; X-17 LPL0005 Lee Leahy 17 Dec 1992 ; 1.) Increased the size of the device number conversion ; buffer to allow INT_TO_A to properly return the ; converted value. The previous length caused the ; value to be corrupted. ; ; X-16 JPJ James P. Janetos 07 Oct 1992 ; Change interface to ioc$find_boot_adp. We now pass the ; address of the vector list, and ioc$find_boot_adp writes ; the boot device vector(s) directly to the vector list. ; Remove subroutine set_up_vectors, as ioc$find_boot_adp ; will always return the vectors for the boot device. ; ; X-15 LPL0004 Lee Leahy 22 Sep 1992 ; 1.) Remove leading zero from device unit number. ; ; X-14 Paul Jacobi 2 Sep 1992 ; Use MOVZBL to access string length of SB$T_NODE_NAME. ; ; X-13 RWC092 Richard W. Critz, Jr. 8-Jul-1992 ; Be sure that all port devices have their CRB addresses stored in ; their corresponding bus array entries. Pass the bus array node ; number to $LOAD_DRIVER for insertion in the CRB (this is the ; Flamingo TC IMR support fix). ; ; X-12 LPL0003 Lee Leahy 6 Jul 1992 ; 1.) Remove trailing blanks in the node name. ; ; X-11 LPL0002 Lee Leahy 26 Jun 1992 ; 1.) Add NAME_FLAG$V_NO_CTRL_LTR for ISL. ; ; X-10 LPL0001 Lee Leahy 12 Jun 1992 ; 1.) Modify the driver loading to use the new BDTAB, ; BTADP, and NAMTBL structures. ; 2.) Removed edit X-9. ; ; X-9 SFS0546 Stephen F. Shirron 22-May-1992 ; Add support for booting disks from a remote server. This ; involves building a system block (SB) for the remote server, ; and including the remote server's node name in the call to ; SYS$LOAD_DRIVER which connects the system disk. Reset ; .IDENT to match CMS generation. ; ; X-33 WDB:A691 Walter D. Blaschuk, Jr. 03-Mar-1992 ; Remove the loading of PEDRIVER for ADUs and do not ; access the cluster authorization file for ADUs. ; Essentially remove footnote X-22. ; ; X-32 WDB:A690 Walter D. Blaschuk, Jr. 31-Jan-1992 ; Remove the Ethernet driver loading mechanism because ; the new '92 STACONFIGs have just rolled off the line ; and are at a dealer new you. (See X-26 21-Jan-1992) ; ; X-31 JJM0001 Jeff McLeman 17-Jan-1992 ; - Change the way we walk through the IOVEC now, because ; the IOVEC is now a linked list. ; - Also, walk all BTADPS associated with each IOVEC entry. ; - Reset ident to match CMS. ; ; X-30 RWC064 Richard W. Critz, Jr. 28-Jan-1992 ; Fix ident to match CMS history. It got off way back there. ; ; Integrate boot controller letter assignment and remove all ; associated hacks. ; ; X-27 WDB:A690 Walter D. Blaschuk, Jr. 27-Jan-1992 ; Fix authorization code password init. ; ; X-26 WDB:A689 Walter D. Blaschuk, Jr. 21-Jan-1992 ; Maybelline, why can't you be true? ; Oh Maybelline, why can't you be true? ; You done started back doin' the things you used to do. ; Let's add some more anti-pollution devices to this V8- ; Ford to really slow her down. Yup! yet 'nutha kludge. ; Since STACONFIG is limping along in manufacturing and ; not out of the factory yet, we'll just load the damn ; ethernet drivers here. Hell! why not? the Japs do it! ; AND - Removed quadword references to the authorization ; file. ; - Fixed QAR #1666 Concerning info messages on the ; Mannequinn Simulator. ; ; X-25 WDB:A688 Walter D. Blaschuk, Jr. 13-Dec-1991 ; Added code review changes and verbose debug messages ; when loading drivers. Also when drivers fail to load ; a bugcheck will be taken instead of continuing the ; boot sequence. ; ; X-24 JTK Jim Klumpp 05-Dec-1991 ; Change ADP$W_ADPTYPE and _TR to longwords. ; ; X-23 DMB David M. Bernardo 26-Nov-1991 ; Remove BOO$GA_DISPATCH_VECTOR. ; ; X-22 MKP Kathy Perko 21-Nov-1991 ; Before loading PEDRIVER, read CLUSTER_AUTHORIZE.DAT ; and put the cluster group number and password into ; the appropriate CLU$G locations. ; ; X-21 WDB:A687 Walter D. Blaschuk, Jr. 20-Nov-1991 ; Changes from Laser and Flamingo debug. ; ; X-20 WDB:A686 Walter D. Blaschuk, Jr. 14-Nov-1991 ; Changed the interface to IOC$FIND_BOOT_ADP. It will ; no longer accept as a parameter the CRB. ; ; X-19 WDB:A685 Walter D. Blaschuk, Jr. 11-Oct-1991 ; General purpose code for all platforms. Mannequinn ; and ADU code are separated from the general code and ; will be removed at a later date. Changes needed for ; this included data structures BTADP, IOVEC, BDTAB... ; and routines in APB and IOSUBNPAG. ; ; X-18 LSS0223 Leonard S. Szubowicz 30-Aug-1991 ; Expand UCB$W_REFC to a longword to avoid word granularity ; problems within the same quadword. ; ; X-16U10 WDB010 Walter D. Blaschuk, Jr. 23-Oct-1991 ; Quick fix for LASER. Last Laser hack, second IOVEC ; entry does not have a pointer to a valid BTADP so ; grab the first IOVEC BTADP pointer. ; ; X-16U9 WDB009 Walter D. Blaschuk, Jr. 16-Oct-1991 ; Laser Hacks to enable LASER to boot for BL4. This is ; done to expedite the booting process. These hacks ; will be removed with the completion of the general ; case INIT_IO_DB. ; ; X-16U8 RFH008 Robert F. Hoffman 8-oct-1991 ; make refc a longword ; ; X-16U7 RFH007 Robert F. Hoffman 8-oct-1991 ; remove some hacks for 151c integration ; ; X-16U6 RFH006 Robert F. Hoffman 2-Oct-1991 ; Fix Hack of port driver to not clobber class driver ; information. ; ; X-16U5 RFH005 Robert F. Hoffman 17-Sep-1991 ; New HACK - make a pointer to vector list. ; ; X-16U4 RFH004 Robert F. Hoffman 17-Sep-1991 ; Fix HACK of X-16U2 to do port driver before class ; driver. ; ; X-16U3 RFH003 Robert F. Hoffman 16-Sep-1991 ; Make BOOT_ADP a quadword ; ; X-16U2 RFH002 Robert F. Hoffman 16-Sep-1991 ; HACK! Hard code DKA100 and parameters to load ; X-16U6 RFH006 Robert F. Hoffman 2-Oct-1991 ; Fix Hack of port driver to not clobber class driver ; information. ; ; X-16U5 RFH005 Robert F. Hoffman 17-Sep-1991 ; New HACK - make a pointer to vector list. ; ; X-16U4 RFH004 Robert F. Hoffman 17-Sep-1991 ; Fix HACK of X-16U2 to do port driver before class ; driver. ; ; X-16U3 RFH003 Robert F. Hoffman 16-Sep-1991 ; Make BOOT_ADP a quadword ; ; X-16U2 RFH002 Robert F. Hoffman 16-Sep-1991 ; HACK! Hard code DKA100 and parameters to load ; SYS$PKZDRIVER.EXE. ; ; X-16U1 RFH001 Robert F. Hoffman 16-Sep-1991 ; Remove extra level of indirection from P1 to ; IOC$FIND_BOOT_ADP. ; ; X-16 WDB:A684 Walter D. Blaschuk, Jr. 27-Aug-1991 ; Changed a BNEQ to a BEQL in some temporary code and ; preserved R8 over the call to INT_TO_A. ; ; X-15 WDB:A683 Walter D. Blaschuk, Jr. 22-Aug-1991 ; Support for LASER was added: ; 1) Call the new IOC$FIND_BOOT_ADP to acquire the boot ; ADP, because the former way of finding it, using the ; TR_NUMBER is insufficient. Now use info in the BTADP. ; 2) Get, then convert the boot device unit number from ; an int to ASCII in a generic manner using INT-TO-A. ; 3) Avoid connecting or loading any ADU test drivers ; on LASER. ; 4) Some minor clean up and comment updates. ; ; X-14 WDB:A682 Walter D. Blaschuk, Jr. 20-June-1991 ; Now, it was decided not to fake out the authorization ; code here and temporarily do it in PEDRIVER until the ; completion of STACONFIG. ; ; X-13 WDB:A681 Walter D. Blaschuk, Jr. 17-June-1991 ; Load SYS$PEDRIVER.EXE /NOADAPTER after the Ethernet ; driver. Test SYSGEN field before loading. Fake the ; authorization code until STACONFIG is completed. ; ; X-12 WDB:A680 Walter D. Blaschuk, Jr. 30-Apr-1991 ; Removed the loading messages from normal IPL. ; ; X-11 RAP0001 Rod A. Payne 24-Apr-1991 ; Get CTRLLTR and UNIT from BTADP rather than SWRPB. ; ; X-10 RWC035 Richard W. Critz, Jr. 24-Apr-1991 ; Update to use new $LOAD_DRIVER interface. ; ; X-9 WDB:A679 Walter D. Blaschuk, Jr. 16-Apr-1991 ; Remove hard coded 'N' from controller letter. Use the ; SWRPB controller letter instead. Correct the output ; message for DKDRIVER. Need the IOGEN$_SYSLOA_CRB for ; SYS$EUDRIVER.EXE. ; ; X-8 PAJ0480 Paul A. Jacobi 15-Apr-1991 ; Remove VAX-specific $RPBDEF. Update CMS ident. ; ; X-1K20 WDB:A678 Walter D. Blaschuk, Jr. 8-Apr-1991 ; Added a CONNECT for the SYS$EUDRIVER.EXE. ; ; X-1K19 WDB:A677 Walter D. Blaschuk, Jr. 21-Mar-1991 ; Added a CONNECT/NOADAPTER for the SYS$ELDRIVER.EXE so ; debugging can continue smoothly. ; ; X-1K18 WDB:A676 Walter D. Blaschuk, Jr. 13-Mar-1991 ; The terminal is to be defined by the parmanent device ; database. Remove the 'not scope' for terminal. ; ; X-1K17 WDB:A675 Walter D. Blaschuk, Jr. 1-Mar-1991 ; A new version of Mannequin Simulator requires the SCB ; vector offset to be changed from 'C20' to 'A20'. ; ; X-1K16 WDB:A674 Walter D. Blaschuk, Jr. 23-Feb-1991 ; With the recent delivery of ADU to our lab, changes ; were made to accommodate the new drivers and new data ; structure layout of the BDTAB. ; ; X-1K15 MSH1098 Michael S. Harvey 5-Feb-1991 ; Eliminate obsolete reference to $PRTDEF. ; ; X-1K14 LSS0195 Leonard S. Szubowicz 1-Feb-1991 ; Don't copy the TTDRIVER DDT vector pointers into the OPA DDB ; and OPA0 UCB. OPDRIVER now has its own DDT which is initialized ; in PERMANENT_DEVICE_DATABASE to point to CON$INITIAL and ; CON$INITLINE. The rest of the DDT must be filled in from the ; TTDRIVER class DDT by one of the port driver's initialization ; routines. ; ; X-1K13 WDB:A673 Walter D. Blaschuk, Jr. 29-Jan-1991 ; Added the call to EXE$INIT_DEVICE_PWRUP. This routine ; will call the controller init and unit init routines ; in the loaded drivers. It will not call init routines ; in MBDRIVER or TTDRIVER. In fact the only driver that ; is loaded and has init routines is OPDRIVER at the ; time of this call. ; ; X-1K12 WDB:A672 Walter D. Blaschuk, Jr. 28-Jan-1991 ; Need to fill in gobal system cell TTY$GL_DPT. ; ; X-1K11 WDB:A671 Walter D. Blaschuk, Jr. 21-Jan-1991 ; Removed diagnostic messages. ; ; X-1K10 RWC026 Richard W. Critz, Jr. 7-Jan-1991 ; Change interrupt vector for Mannequin disk to 'C20'. ; ; X-1K8 WDB:A671 Walter D. Blaschuk, Jr. 04-Jan-1991 ; Fixed undefined sysmbol. And X-1K9. ; ; X-1K7 WDB:A670 Walter D. Blaschuk, Jr. 02-Jan-1991 ; It is no longer necessary to connect the system cells ; for the UCB and the DDB which are created as result ; of connecting the sys device via the SYS$LOAD_DRIVER. ; Instead of filling in these newly created control ; block addresses here in INIT_IO_DB it is done it ; SYS$LOAD_DRIVER where there are created. ; The modifier LOAD$M_SYSDEVICE is added to the connect ; of the system dev in order to indicate that the above ; system cells be filled in by SYS$LOAD_DRIVER. ; The CSR Physical Address is 34 bits long not 32 bits. ; The actual Mannequinn disk interrupt vector is 'C10', ; so the old HWSCB$Q_IO_INTERRUPT_BASE is not used now. ; ; ; X-1K6 WDB:A669 Walter D. Blaschuk, Jr. 28-Dec-1990 ; Removed the BUGCHECKS if an error is encountered when ; attempting to load the TTDRIVER or the DQDRIVER. The ; return code is printed with a message indicating that ; this driver failed to load properly. The susequent ; related code is skipped. ; ; X-1K5 WDB:A668 Walter D. Blaschuk, Jr. 19-Dec-1990 ; A change in the method for disconnecting the primary boot ; device driver was made. My changes here, reflect the those ; earlier boot driver changes. ; ; ; X-2 WDB:A667 Walter D. Blaschuk, Jr. 12-Dec-1990 ; Hard code data for calls to SYS$LOAD_DRIVER to facilitate ; progress. Fixed serval bugs and commented out generalized ; code. ; ; ; X-1 WDB:A666 Walter D. Blaschuk,Jr. 31-Oct-1990 ; The wind began to twist, the house to pitch, ; And suddenly the windows started to unhitch, ; Then, the witch, to satisfy an itch, ; Came riding on her broomstick thumbing for a hitch. ; ; From the great dust bowl of silicon ; After the universe has been turned on ; Where random bits spray high and low ; To be soon ruled and directed by I/O ; ; ;** ; .PAGE .SBTTL External Definitions .DISABLE GLOBAL $ADPDEF ; DEFINE ADP OFFSETS $$BDTABDEF ; DEFINE BOOT DEVICE TABLE OFFSETS $BDTDEF ; Define the boot device types $BOOSTATEDEF ; DEFINE BOOT STATE FLAGS $BTADPDEF ; DEFINE BTADP $BUSARRAYDEF ; DEFINE BUSARRAY $CONFIG_TABLEDEF ; DEFINE CONFIGURAITON TABLE FIELDS $CRBDEF ; DEFINE CRB OFFSETS $DCDEF ; DEFINE DC OFFSETS $DDBDEF ; DEFINE DDB OFFSETS $DDTDEF ; DEFINE DDT OFFSETS $DPTDEF ; DEFINE DRIVER PROLOGUE $DSCDEF ; Define the descriptor offsets. $DYNDEF ; DEFINE DATA STRUCTURE TYPE CODES $HWRPBDEF ; Define Hardware Restart Parm Block. $HWSCBDEF ; Define the HW System Control Block. $IDBDEF ; DEFINE IDB OFFSETS $IOGENDEF ; Define the driver loading functions. $IOVECDEF ; IOVEC data structure definitions $IPLDEF ; IPL DEFINITIONS $IRPDEF ; DEFINE IRP OFFSETS $LDRIMGDEF ; DEFINE LOADED IMAGE DATA STRUCTURES $LKBDEF ; DEFINE LOCK BLOCK OFFSETS $LNMDEF ; DEFINE LNM OFFSETS $NDTDEF ; DEFINE NEXUS DEVICE TYPES $ORBDEF ; DEFINE ORB OFFSETS $PRDEF ; DEFINE IPR NUMBERS $SBDEF ; Define system block offsets $SPLDEF ; DEFINE SPINLOCK STRUCTURES $SSDEF ; Define status return codes $SWRPBDEF ; Define Software Restart Parm Block $SYSPARDEF $UCBDEF ; DEFINE UCB OFFSETS $TTYDEFS ; DEFINE TERMINAL DRIVER OFFSETS $TTDEF ; TERMINAL ATTRIBUTES $TT2DEF ; MORE TERMINAL-SPECIFIC ATTRIBUTES $VADEF ; DEFINE VIRTUAL ADDRESS FIELDS $VECDEF ; DEFINE VEC OFFSETS $WCBDEF ; DEFINE WINDOW CONTROL BLOCK OFFSETS ; ; External data references. ; .EXTERNAL BUG$_INCONSTATE .EXTERNAL CON$GETCHAR .EXTERNAL CON$OWNCTY .EXTERNAL CON$PUTCHAR .EXTERNAL CON$RELEASECTY .EXTERNAL CLU$GL_NISCS_GROUP .EXTERNAL CLU$GQ_NISCS_AUTH .EXTERNAL EXE$AB_HEXTAB .EXTERNAL EXE$GL_SHADOW_SYS_DISK .EXTERNAL EXE$GL_SHADOWING .EXTERNAL EXE$GPL_HWRPB_L .EXTERNAL EXE$GPQ_SWRPB .EXTERNAL F11FR$CACHE_REINIT .EXTERNAL F11FR$MOUNT_VOLUME .EXTERNAL INI$BRK .EXTERNAL IOC$GL_ADPLIST .EXTERNAL IOC$GL_DPTLIST .EXTERNAL IOC$GL_DEVLIST .EXTERNAL IOC$GL_NAMING .EXTERNAL LDR$GQ_IMAGE_LIST .EXTERNAL OP$AR_DPT .EXTERNAL OPA$AR_UCB0 .EXTERNAL SCS$GQ_CONFIG .EXTERNAL SGN$GL_DR_UNIT_BASE .EXTERNAL SYS$AR_BOOTDDB .EXTERNAL SCS$AR_LOCALSB .EXTERNAL TTY$GL_DPT .EXTERNAL TTY$GW_CLASSNAM ; ; External system routines. ; .EXTERNAL BOO$DISC .EXTERNAL EXE$ALONONPAGED .EXTERNAL EXE$DEANONPAGED .EXTERNAL EXE$INIT_DEVICE_PWRUP .EXTERNAL EXE$OUTCHAR .EXTERNAL EXE$OUTCRLF .EXTERNAL EXE$OUTHEX .EXTERNAL EXE$OUTZSTRING .EXTERNAL IOC$ASSIGN_BOOT_CTRLR .EXTERNAL IOC$BUILD_CONFIG_TABLE .EXTERNAL IOC$DELETE_CONFIG_TABLE .EXTERNAL IOC$FIND_BOOT_ADP .EXTERNAL IOC$GET_MSCP_INFO .EXTERNAL IOC$INITDRV .EXTERNAL IOC$INIT_AND_RETURN_ALL .EXTERNAL IOC$INIT_IO_BRIDGE .EXTERNAL IOC$LOOKUP_CLASS .EXTERNAL IOC$LOOKUP_ID .EXTERNAL IOC$MOUNT_SBD .EXTERNAL SYS$LOAD_DRIVER ; ; External routines defined in module FIND_RUNTIME_DRIVER ; .EXTERNAL IOC$FIND_RUNTIME_DRIVER .EXTERNAL IOC$FIX_DRIVER_DESCRIPTOR ; ; External routines defined in IOGEN boot-time .OLB ; .EXTERNAL IOGEN$CLASS_MATCH ; ; External routines defined in module PACUTIL ; .EXTERNAL IOC$GOPAC .PAGE .SBTTL LOCAL MACROS ; ; LOCAL MACROS. ; .MACRO DBG_MESSAGE MSG,?L1 TSTL DEBUG_MSG_FLAG ; Verbose INIT requested? BEQL L1 ; NO - Print no message. ; YES - Print message. MOVAB MSG,R1 ; Set up desired message. JSB G^EXE$OUTZSTRING ; Print it to the screen. JSB G^EXE$OUTCRLF L1: .ENDM .MACRO DBG_LOAD_SUCCESSFUL DRIVER_DESCRIPTOR,?L2,?L3,?L4 TSTL DEBUG_MSG_FLAG ; Verbose INIT requested? BEQL L4 ; NO - Print no message. MOVAB INFO_HEADING,R1 ; Get message = "%INITIODB-I- ". JSB G^EXE$OUTZSTRING ; Output the given message. ; Output the driver name to the console using the descriptor located in the ; BDTAB. First get length of ASCII string, then address the ASCII string, ; finally loop until each char is put to the screen. MOVL DRIVER_DESCRIPTOR,R0 MOVZWL DSC$W_LENGTH(R0),R2 ; Length of ASCII string. MOVL DSC$A_POINTER(R0),R1 ; Pointer Addr to string. L2: ; R1 = ASCII addr, R2 = length. MOVZBL (R1)+,R0 ; Get first/next char of string. BEQL L3 ; End of string? YES - leave. JSB G^EXE$OUTCHAR ; NO - Output character SOBGTR R2,L2 ; Any more characters in input? L3: ; YES - Go back and output it, ; NO - Done with driver name. MOVAB SUCC_LOAD,R1 ; Get mess = "successfully loaded:crlf" JSB G^EXE$OUTZSTRING ; Output the given message. L4: .ENDM .PAGE ; ; ; LINE CONTROL CONSTANTS. ; CR=13 ; Carriage return LF=10 ; Line feed. .PAGE DECLARE_PSECT EXEC$NONPAGED_DATA,QUAD ; ; ; BUILD SOME DRIVER NAME DESCRIPTORS. ; ; Build the TTDRIVER descriptor. ; TTDRIVER_NAME: .ASCII /SYS$/ TT_CLASS_NAME: .ASCII /TTDRIVER.EXE/ TT_LENGTH = .-TTDRIVER_NAME .ALIGN LONG TT_DSCRPTR: .LONG TT_LENGTH .ADDRESS TTDRIVER_NAME TT_DESC_ADDRESS: .ADDRESS TT_DSCRPTR ; ; Build the SHDRIVER descriptor (host-based shadowing). ; SHDRIVER_NAME: .ASCII /SYS$/ SH_CLASS_NAME: .ASCII /SHDRIVER.EXE/ SH_LENGTH = .-SHDRIVER_NAME .ALIGN LONG SH_DSCRPTR: .LONG SH_LENGTH .ADDRESS SHDRIVER_NAME SH_DESC_ADDRESS: .ADDRESS SH_DSCRPTR ; ; Constants used for 3PB ; FOREIGN_DRIVER_BUF: .BLKB 256 FOREIGN_DRIVER_LEN = .-FOREIGN_DRIVER_BUF FOREIGN_DRIVER: .LONG FOREIGN_DRIVER_LEN .ADDRESS FOREIGN_DRIVER_BUF MAX_TRIES = 5 ; Maximum number of attempts to provide the 3PB media ; ; Parameters for IOC$BUILD_CONFIG_TABLE ; ; Two entries for each parameter are created. This is ; to account for the case where a foreign installation ; is being performed. The fields with the 'TPB' will only ; be used if a configuration file must be read from a foreign ; device support installation kit. ; .ALIGN LONG DEV_CODE: .QUAD 0 ; Contains the two-character device code ; obtained from the look-up in the config tables ; It must be a QUAD because of ISL booting - an ; ASCIIZ string needs to be fabricated and ; the ISL pseudo driver DEVNAM is LAS. PORT_INDEX: .LONG 0 ; The index in the table for the port driver entry CLASS_INDEX: .LONG 0 ; The index in the table for the class driver entry CFG_TBL_STRUC: .LONG 0 ; The address of the structure returned from call ; to IOC$BULD_CONFIG_TABLE CFG_TBL: .LONG 0 ; Return address of the in-memory configuration ; table. At boot time - is is for All buses. TPB_CFG_STRUC: .LONG 0 ; The address of the structure returned from call ; to IOC$BUILD_CONFIG_TABLE TPB_CFG_TBL: .LONG 0 ; Return address of the in-memory configuration ; table for a 3PB foreign device. FOREIGN_MEDIA: .LONG 0 ; Set if foreign media is being accessed. This ; is necessary to tell us if we need to access ; the OpenVMS media to find a class driver. MEDIA_ATTEMPTS: .LONG 0 ; The count for # of times we try to obtian the ; foreign device installtion media. COUNTED_DEVNAM: .LONG 0 ; The fabricated counted string for the DEVNAM ; ; The following file specification is that for the configuratio file ; to be searched for on the foreign device installation media. This ; will be used to build the in-memory configuration table for the ; foreign device. ; .ALIGN LONG TPB_FILE_NAME: .ASCIZ /SYS$SYSROOT:[SYSEXE]CONFIG.DAT/ ; ; Build the Device Name Descriptor. ; .ALIGN LONG ; 123456789012345678 DEV_NAME: .ASCII /DQA0 / DEV_NAME_LEN = .-DEV_NAME .ALIGN LONG ; Align the device name descriptor. DEV_DSCRPTR: .LONG 4 ; Insert the correct length at run-time. .ADDRESS DEV_NAME ; Point back to ASCII driver name. .ALIGN LONG ; 123456789012345678 SH_DEV_NAME: .ASCII /SHA0 / .ALIGN LONG ; Align the device name descriptor. SH_DEV_DSCRPTR: .LONG 4 ; Length of device name. .ADDRESS SH_DEV_NAME ; Point back to ASCII driver name. .PAGE ; ; ; SYMBOLS FOR IOSB and ITMLST USED TO CALL SYS$LOAD_DRIVER. ; NEW_CRB_PTER: .BLKL 1 ; Pointer for the newly created CRB. NEW_UCB_PTER: .LONG 0 ; Pointer for the newly created UCB. SH_UCB_PTER: .BLKL 1 ; Pointer for host-based shadowing driver UCB. SH_DDB_PTER: .BLKL 1 ; Pointer for host-based shadowing driver DDB. P_ALLOCLS: .BLKL 1 ; Value of port allocation class PORTNAME: .BLKL 1 ; Holds (guessed) port name for boot device ; ; Parameters for IOC$FIND_BOOT_ADP. ; .ALIGN QUAD Boot_ADP: .LONG 0 ; Field to store boot ADP address. Boot_BUS_ARRAY: .LONG 0 ; Field to store boot BUS_ARRAY address. VECTOR_COUNT: .LONG 0 ; Field to store vector count address. VECTOR_LIST: .BLKL 64 ; Buffer to store the vector(s). If an adapter ; requires more than 64 vectors, we are in ; trouble. ; ; Parameters for INT_TO_A. ; CONV_LEN: .LONG 0 ; Length of unit number converted. .ALIGN QUAD DEVBUF_LEN = 16 DEVBUF: .BLKB DEVBUF_LEN ; For device conversions. ; ; ; .ALIGN LONG R0_STATUS: .LONG 0 ; R0 status from $LOAD_DRIVER for output IOVEC_LIST_HEAD: .LONG 0 ; IOVEC list head pointer BTADP_LIST_HEAD: .LONG 0 ; BTADP list head per IOVEC HW_SYSTYPE: .LONG 0 ; Storage for HWRPB_SYSTYPE... ; (Laser,Flamingo...) DEBUG_MSG_FLAG: .LONG 0 ; Debug message flag for verbose boot mode. ; (ie. Output all messages to console.) NAMTBL_SIZE = 12 ; Get next descr table entry. ; ; Create IOSB frame. ; .ALIGN QUAD IOSB: IOSB_STATUS: .WORD 0 ; Status of $LOAD_DRIVER in IOSB. IOSB_FLAGS: .WORD 0 ; Flags of $LOAD_DRIVER in IOSB. IOSB_DPT: .LONG 0 ; Addr of created DPT after LOAD$_DRIVER ; ; Allocate space for a descriptor based on the descriptor ; in the ADP config table. We cannot use the ADP config table ; descriptor directly because it does not have the .EXE suffix. ; Note we have made the string buffer 32 bytes -- should be ; plenty long enough for a port driver name. .ALIGN LONG ; 12345678901234567890123456789012 ADP_CFG_DRVR_NAME: .ASCII / / ADP_CFG_DRVR_NAME_END: ; End of the port device name. .ALIGN LONG ; Align the driver name descriptor. ADP_CFG_DRVR_DESC: .LONG 4 ; Insert the correct length at run time .ADDRESS ADP_CFG_DRVR_NAME ; Point back to ASCII device name. ; ; Allocate space for the descriptor for the class device name. ; .ALIGN LONG ; 1234567890123456 CDEV_NAME: .ASCII / / CDEV_NAME_END: ; End of the class device name. .ALIGN LONG ; Align the device name descriptor. CDEV_DESC_ADDRESS: .LONG 4 ; Insert the correct length at run-time. .ADDRESS CDEV_NAME ; Point back to ASCII device name. ; ; Allocate space for the address of the descriptor for ; the class driver name. ; .ALIGN LONG CDRVR_DESC_ADDRESS: .BLKL 1 ; Pointer to port driver descriptor. ; ; Create a generic ITEMLIST with 8 entries for Port and Class drivers. ; .ALIGN QUAD ITEMLIST: .WORD 0 ; Size of the buffer which holds datum. .WORD 0 ; Code to be sent to SYS$LOAD_DRIVER. .LONG 0 ; Addr of the itemlist input buffer. .LONG 0 ; Return len of new buffer. .WORD 0 ; Size of the buffer which holds datum. .WORD 0 ; Code to be sent to SYS$LOAD_DRIVER. .LONG 0 ; Addr of the itemlist input buffer. .LONG 0 ; Return len of new buffer. .WORD 0 ; Size of the buffer which holds datum. .WORD 0 ; Code to be sent to SYS$LOAD_DRIVER. .LONG 0 ; Addr of the itemlist input buffer. .LONG 0 ; Return len of new buffer. .WORD 0 ; Size of the buffer which holds datum. .WORD 0 ; Code to be sent to SYS$LOAD_DRIVER. .LONG 0 ; Addr of the itemlist input buffer. .LONG 0 ; Return len of new buffer. .WORD 0 ; Size of the buffer which holds datum. .WORD 0 ; Code to be sent to SYS$LOAD_DRIVER. .LONG 0 ; Addr of the itemlist input buffer. .LONG 0 ; Return len of new buffer. .WORD 0 ; Size of the buffer which holds datum. .WORD 0 ; Code to be sent to SYS$LOAD_DRIVER. .LONG 0 ; Addr of the itemlist input buffer. .LONG 0 ; Return len of new buffer. .WORD 0 ; Size of the buffer which holds datum. .WORD 0 ; Code to be sent to SYS$LOAD_DRIVER. .LONG 0 ; Addr of the itemlist input buffer. .LONG 0 ; Return len of new buffer. .WORD 0 ; Size of the buffer which holds datum. .WORD 0 ; Code to be sent to SYS$LOAD_DRIVER. .LONG 0 ; Addr of the itemlist input buffer. .LONG 0 ; Return len of new buffer. .LONG 0 ; list terminator .PAGE ; ; Create SH_ITMLST frame and intialize 'NOADAPTER' value. ; This is for the host-based shadowing driver (SYS$SHDRIVER). ; .ALIGN QUAD SH_ITEMLIST: .WORD 0 ; Size of the buffer which holds datum. .WORD IOGEN$_NOADAPTER ; Noadapter code. .LONG 0 ; This device is not associated with... ; any particular hardware bus. .LONG 0 ; Return len of new buffer (not used). .WORD 4 ; Size of the buffer which holds datum. .WORD IOGEN$_UCB ; UCB address code. (Output) .ADDRESS SH_UCB_PTER ; Addr of the buffer for new UCB addr. .LONG 0 ; Return len of new buffer (not used). .WORD 4 ; Size of the buffer which holds datum. .WORD IOGEN$_DDB ; DDB address code. (Output) .ADDRESS SH_DDB_PTER ; Addr of the buffer for new DDB addr. .LONG 0 ; Return len of new buffer (not used). SH_ZERO_TERMINATOR: .LONG 0 ; Zero terminated SH_ITEMLIST. .PAGE ; ; ; ERROR MESSAGES and INQUIRIES. ; GOPAC_MSG: .ASCIZ /%INITIODB-I-Calling IOC$GOPAC./ BAD_NAME_MSG: .ASCIZ /%INITIODB-F-Booted device name has illegal format./ BEGIN_MSG: .ASCIZ /%INITIODB-I-Begin executing INIT_IO_DB./ DISC_APBT_OK: .ASCIZ /%INITIODB-I-Primary boot driver disconnected. / END_MSG: .ASCIZ /%INITIODB-I-Returning to EXEC_INIT./ BADTTYDRV: .ASCIZ /%INITIODB-F-Illegally formatted terminal service./ BAD_SYS_CONNECT: .ASCIZ /%INITIODB-F-System driver BAD connect!/ BADSCBVEC: .ASCIZ /%INITIODB-F-Error in SCB IO vector reservations./ BAD_ADP_LIST: .ASCIZ /%INITIODB-F-There is no ADP for Boot device./ SB_ALLOC_FAIL: .ASCIZ /%INITIODB-F-System Block allocation failure./ INFO_HEADING: .ASCIZ /%INITIODB-I-/ ERR_HEADING: .ASCIZ /%INITIODB-F-/ ERR_LOAD: .ASCIZ / load failed:/ SUCC_LOAD: .ASCIZ / load successful./ LOAD_STATUS: .ASCIZ / IOSB STATUS-> / REG_ZERO_STATUS: .ASCIZ / R0 STATUS-> / SH_BAD_PARAM: .ASCIZ /%INITIODB-W-Invalid SHADOWING system parameter; should have been 0 or 2 instead of: / GET_3PB_ERROR: .ASCIZ /%INITIODB-F-Error determining third-party configuration status: / NOTFORINSTALL: .ASCIZ /%INITIODB-F-Foreign device cannot be configured - a foreign installaiton was not requested./ NO_CFG_TBL: .ASCIZ /%INITIODB-F-System device configuration table could not be built./ NO_TPB_TBL: .ASCIZ /%INITIODB-F-Foreign device configuration table could not be built./ UNSUP_DEV: .ASCIZ /%INITIODB-F-An unsupported device was specified on the boot command line./ REQ_3PB_MEDIA: .ASCIZ %Is the Foreign Device installation media available for mounting? (Y/N) [Y] % REQ_VMS_MEDIA: .ASCIZ %Is the OpenVMS ALPHA operating system CD-ROM available for mounting? (Y/N) [Y] % VMS_MEDIA_NAVAIL: .ASCIz /%INITIODB-F-OpenVMS ALPHA operating system CD-ROM not available./ MEDIA_NOT_AVAIL: .ASCIZ /%INITIODB-F-Foreign device installation kit not available./ CACHE_CLR_3PB: .ASCIZ /%INITIODB-I-Clearing the cache./ MOUNTING_MEDIA_3PB: .ASCIZ /%INITIODB-I-Mounting the foreign installation media./ MOUNTING_MEDIA_VMS: .ASCIZ /%INITIODB-I-Mounting the OpenVMS Alpha operating system installation media./ MEDIA_MOUNTED_3PB: .ASCIZ /%INITIODB-I-Foreign installation media successfully mounted./ MEDIA_MOUNTED_VMS: .ASCIZ /%INITIODB-I-OpenVMS Alpha operating system media successfully mounted./ MOUNT_ERROR_3PB: .ASCIZ /%INITIODB-F-Foreign installation media could not be mounted./ MOUNT_ERROR_VMS: .ASCIZ /%INITIODB-F-OpenVMS ALPHA installation media could not be mounted./ GOT_CONFIG: .ASCIZ /%INITIODB-I-Found CONFIG.DAT on the foreign device installation media./ EXC_3PB_TRIES: .ASCIZ /%INITIODB-F-Number of attempts to mount foreign device installation media exceeded./ EXC_VMS_TRIES: .ASCIZ /%INITIODB-F-Number of attempts to mount OpenVMS Alpha installation media exceeded./ ADP_INIT_FAILED: .ASCIZ /%INITIODB-F-Initialization of the ADPs' configuration tables failed./ NO_MSCP_INFO: .ASCIZ /%INITIODB-F-MSCP required information not available for the boot device./ CL_PD_FAILED: .ASCIZ /%INITIODB-F-Desired class or pseudo driver look-up failed./ .PAGE DECLARE_PSECT EXEC$NONPAGED_CODE ;++ ;************************************************************************* ; FUNCTIONAL DESCRIPTION: * ; * ; INIT_IO_DB constructs the I/O database links for OPDRIVER, which * ; has been previously loaded as an execlet by SYSBOOT. It then * ; loads the TTDRIVER using SYS$LOAD_DRIVER code and links OPDRIVER * ; to TTDRIVER via the I/O database. The run-time drivers that * ; have been listed by SYSBOOT as necessary for the system to boot * ; are located. These are loaded and initialized by calling the * ; SYS$LOAD_DRIVER code. Next, the address of the system device UCB * ; is moved to all the WCBs for the system images. The primary boot * ; driver is then disconnected. Finally, INIT_IO_DB RETurns to * ; EXEC_INIT. * ; * ; INPUT: * ; * ; DRVRLIST(AP) = Pointer to argument list. (Currently it is zero.) * ; * ; OUTPUT: * ; Information messages: (When #SWRPB_BOOT_FLAG$V_DBG_INIT is set) * ; - Successful loads of drivers * ; - Primary boot disconnects * ; * ; * ; Error Messages: * ; - Failure to load a run-time driver * ; - No boot ADP found * ; - Bad SCB vectors * ; BUGCHECK: * ; - Inconsistant I/O data base * ; * ; CALLING SEQUENCE: * ; * ; Called near the conclusion of EXEC_INIT code. * ; * ; PUSHL DRVRLIST(Rx) ; Currently DRVRLIST(Rx) = 0. * ; CALLS #1,G^INIT_IO_DB ; Call init I/O database and load... * ; ; essential run-time I/O drivers. * ; * ;************************************************************************* .PAGE .SBTTL - Initialize I/O device drivers linked with system image. INIT_IO_DB:: .CALL_ENTRY MAX_ARGS=1,- HOME_ARGS=FALSE ; ; First things first, check, then set up for verbose messaging depending ; on boot flags. ; MOVL G^EXE$GPL_HWRPB_L,R6 ; Pick up the HWRPB address to ... MOVL HWRPB$PL_SWRPB_L(R6),R6 ; get to the SWRPB. Check if BBC #SWRPB_BOOT_FLAGS$V_DBG_INIT,- ; a verbose INIT was requested. SWRPB$IQ_BOOT_FLAGS(R6),10$ ; NO - Don't set verbose mode. MOVL #1,DEBUG_MSG_FLAG ; Set verbose debug message flag. 10$: DBG_MESSAGE BEGIN_MSG ; Tell alpha folks we've arrived safely. MOVL G^OP$AR_DPT,R4 ; Get address of OPDRIVER DPT from PDD. INSQUE (R4),G^IOC$GL_DPTLIST ; Put it on system DPT list. MOVL G^OPA$AR_UCB0,R5 ; Get address of console UCB. JSB G^IOC$INITDRV ; Init fields that can't be done ; statically in the perm_dev_database. BICL2 #TT2$M_AUTOBAUD,W^UCB$L_TT_DECHA1(R5) ; Ensure not autobaud. .PAGE .SBTTL - Set up parameters to load the TTDRIVER. ; ; Load and initialize the Terminal Driver. Hook TTDRIVER to OPDRIVER. The ; prefab SYS$TTDRIVER.EXE driver name descriptor is filled in with type, ; class, length and pointer to ASCII text. ; ; Update the prefab TTDRIVER driver name descriptor ASCII text with proper ; prefix stored in a SYSGEN parameter. ; MOVW W^TTY$GW_CLASSNAM,TT_CLASS_NAME ; Update terminal driver name. ; ; Load into memory SYS$TTDRIVER.EXE. ; PUSHAB IOSB ; Push address of IOSB. PUSHL #0 ; Push unused parameter: ITMLST. PUSHAB TT_DSCRPTR ; Push address of driver name dscrptr. PUSHL #0 ; Push unused parm: Dev_name dscrptr. PUSHL #IOGEN$_LOAD ; Push the LOAD function. CALLS #5,SYS$LOAD_DRIVER ; Load the TTDRIVER. BLBC R0,TTY_LOAD_ERR ; If it failed go tell the world. DBG_LOAD_SUCCESSFUL TT_DESC_ADDRESS ; Load successfull. MOVL IOSB_DPT,R2 ; Address of TTDRIVER DPT from IOSB. MOVL R2,G^TTY$GL_DPT ; Store loaded TTDRIVER DPT globally. CMPB #DYN$C_DPT,DPT$B_TYPE(R2) ; Was a real DPT created for TTDRIVER? BNEQ BAD_TTY_DPT ; No - Go tell it on the mountain. ; Yes- Hook up the data structures. .PAGE .SBTTL - Initialize TTDRIVER and OPDRIVER common control blocks. ; ; Since the port driver OPDRIVER is loaded before the class TTDRIVER the ; controller init and unit init routines within OPDRIVER can not be called ; to hook up the UCB and DPTs. INIT_IO_DB must do that here due to this ; special case. Don't call TTDRIVER controller init or unit init routines. ; HOOK_TT_TO_OP: MOVL DPT$PS_VECTOR(R2),R3 ; Get class vector dispatch table addr. MOVL R3,UCB$L_TT_CLASS(R5) ; Store class vector address in UCB. MOVL CLASS_GETNXT(R3),- ; Store GET NEXT address in the... UCB$L_TT_GETNXT(R5) ; console UCB. MOVL CLASS_PUTNXT(R3),- ; Store PUT NEXT address in the... UCB$L_TT_PUTNXT(R5) ; console UCB. MOVL DPT$PS_VECTOR(R4),- ; Store port vector address in UCB. UCB$L_TT_PORT(R5) .PAGE .SBTTL GOPAC - Get Our Port Allocation Classes ; ; Call external C routine to read SYS$DEVICES.DAT and set up ; IOC$GL_PACLIST_F appropriately, for later use by IOGEN$CLASS_MATCH ; BLBC IOC$GL_NAMING,10$ ; Skip call if DEVICE_NAMING is off MOVAB IOC$GOPAC,R10 ; Get destination BEQL 10$ ; Don't call if not there DBG_MESSAGE GOPAC_MSG ; Say we're calling CALLS #0,(R10) ; Go there 10$: ; Done .PAGE .SBTTL MAIN LOOP - GENERAL GENERIC NON-PLATFORM SPEIFIC CODE ; ; Start the Main loop to load Generic Port then Class drivers. ; ; ; First get and store sysdevice BTADP. MOVL SWRPB$PL_IOVEC_FLINK_L(R6),- R10 ; get the IOVEC List head MOVAL SWRPB$PL_IOVEC_FLINK_L(R6),- IOVEC_LIST_HEAD ; get the IOVEC List head for later ; ; Need to create the in-memory configuration table that will be used to assign ; controller letters and select the proper run-time driver to load. Also, ; as we are the first consumer of the informaiton, we will cause the ADP ; config tables to be populated. ; ; The table will be created from the SYS$USER_CONFIG.DAT and SYS$CONFIG.DAT. ; These data files contain the platform independent information necessary ; for device configuration for foreign devices for which the run-time support ; has been installed on the system device and inherently supported devices ; respectively. ; ; These file must be found in SYS$COMMON:[SYSEXE] OR SYS$SPECIFIC[SYSn.SYSEXE]. ; ; NOTE: ; ; SYS$MANAGER cannot be used during boot time. The primitive file system is ; in use and the logicals have not yet been created. ; ; ; The address returned points to the beginning of the first entry ; in the table. ; PUSHAB CFG_TBL_STRUC ; Return address of config table. CALLS #1, G^IOC$INIT_AND_RETURN_ALL ; Initialize the config tables in the ADPs BLBS R0,30$ ; and return all entries. Branch if ok! MOVAB ADP_INIT_FAILED,R1 ; Other wise it is a fatal error. JSB G^ EXE$OUTCRLF ; Make it look nice. JSB G^ EXE$OUTZSTRING ; Print out an error message. HALT ; Don't bugcheck in EXEC_INIT. ; ; Skip over the structure header containing a bogus mask. This ; is not needed in the boot path because we use the table built ; for all buses. ; 30$: ADDL3 #8,CFG_TBL_STRUC,CFG_TBL ; Get us to the first entry MOVL CFG_TBL,R8 ; Set up R8 for use with MOP WALK_IOVEC: ; ; Get the first BTADP that needs to be handled for the ; new IOVEC. ; MOVAL IOVEC$PQ_BTADP_FLINK(R10), R9 MOVL (R9), R6 ; ; Scan all the BTADPs in the list. ; 80$: CMPL BTADP$IL_PROTOCOL_L(R6),- ; Is this BTADP for a LAN #^A/MOP / ; device? BNEQ 120$ ; Continue as normal BBC # BTADP$V_NO_HARDWARE,- ; Associated with hardware BTADP$IQ_FLAGS(R6),120$ ; - so assign a controller letter MOVL BTADP$T_PSEUDO_DEVNAM(R6),- ; Get the prefix to be used with DEV_CODE ; the pseudo driver ; ; Call code to lookup the class info - because we are dealing ; with a pseudo port driver - we will use the PORT_INDEX so that ; LOAD_RUNTIME_DRIVERS works correctly ; PUSHAL DEV_CODE+1 ; Address to get the two-character devname PUSHAL PORT_INDEX ; Address to contain the index in the tabel PUSHL R8 ; Addresss of the configuration table CALLS # 3, G^ IOC$LOOKUP_CLASS ; Find the entry for the class driver BLBS R0, 460$ ; The class or pseudo driver found - branch MOVAB CL_PD_FAILED,R1 ; Other wise obtain the error message, JSB G^ EXE$OUTCRLF ; make it look nice, JSB G^ EXE$OUTZSTRING ; print it out. HALT ; Don't bugcheck in EXEC_INIT. ; ; Determine the two-character device name associated with the current ; BTADP. In the past, the DEVNAM was obtained for all devices from the ; NAMTBL, however, as there are no entries in the NAMTBL for foreign ; devices, another way of obtaining the information had to be found. ; ; Each adapter has a hardware ID associated with it. This ID and ; the DEVNAM for the device are stored in one of the configuration ; tables. IOC$FIND_BOOT_ADP will be called to obtain the hardware ; associated with the current BTADP. That ID will be used to ; search the configuration tables looking for the DEVNAM to ; provide to IOC$ASSIGN_BOOT_CTRLR so that ordinal controller letter ; assignment can be made. ; ; NOTE: ; ; Platform specific configuration information obtained by calling ; IOC$FIND_BOOT_CONTROLLER is required for loading the driver. ; It must be available for LOAD_RUNTIME_DRIVERS. This is ; accomplished by cells global to this module. ; ; ; Locate the run-time ADP structure for this boot device. If this ; boot driver is associated with a real piece of hardware, then ; we must get the controller letter (in the bus array), the number ; of vectors associated with this device and their values. ; ; In the event that an error is returned, it is assumed that there ; is no hardware associated with this BTADP or that the hardware ; is on an internal bus. ( For example, a floppy on the X-bus would ; result in an error being returned.) ; 120$: PUSHAB VECTOR_COUNT ; P5 - Returned cnt of needed vectors. PUSHAB VECTOR_LIST ; P4 - Returned vector(s) list. PUSHAB Boot_BUS_ARRAY ; P2 - Returned Bus Array address. PUSHAB Boot_ADP ; P1 - Returned ADP address. PUSHL R6 ; P0 - Current BTADP address. CALLS #5,G^IOC$FIND_BOOT_ADP ; Find the ADP and device parameters. BLBS R0,140$ ; If success, then branch CMPL #SS$_DEVFOREIGN,R0 ; Does the device live on a system bus? BEQL 540$ ; Yes, so get the next BTADP MOVAB UNSUP_DEV,R1 ; Other wise, there was a fatal error JSB G^ EXE$OUTCRLF ; Make it look nice JSB G^ EXE$OUTZSTRING ; Print out an error message HALT ; And halt the system ; ; Search the configuration table until the hardware ID for the adapter ; identified by the newly acquired bus array entry is found. Once found, ; the index of the table and the DEVNAM will be save. The DEVNAM ; address will be passed to IOC$ASSIGN_BOOT_CTRLR. The index ; and the config table address will be saved and used to configure ; the device. ; 140$: PUSHAL DEV_CODE ; Address to get the two-character devname PUSHAL PORT_INDEX ; Address to contain the index in the tabel PUSHL BOOT_ADP ; The ADP address PUSHL BOOT_BUS_ARRAY ; The bus array address for this adapter PUSHL CFG_TBL ; Addresss of the configuration table CALLS # 5, G^ IOC$LOOKUP_ID ; Find the ID in the table MOVL CFG_TBL,R8 ; Store the table address in R8 BLBS R0,420$ ; ; ; If the ID was not found, we assume that SS$_ITEMNOTFOUND was returned. ; ; The ID for the adapter was not found in the table. This means that the user ; is attempting to perform a foreign installation, there is an error on the boot ; command line, or there is an error in one of the configuraiton files. ; ; Check the foreign installation bit in the SWRPB to determine which is true. ; If this is not a foreign installation, assume an error has occured, print ; an error message and halt the system. ; 300$: MOVL G^ EXE$GPQ_SWRPB,R2 ; Get the SWRPB BBS #SWRPB_BOOT_FLAGS$V_FOREIGN,- ; Is this a foreign installation? SWRPB$IQ_BOOT_FLAGS(R2), 340$ ; Yes so do some more work MOVAB NOTFORINSTALL,R1 ; Other wise, get the error message JSB G^ EXE$OUTCRLF ; Make it look nice JSB G^ EXE$OUTZSTRING ; Print it out HALT ; And halt 340$: ; ; This is a foreign installation, this means that the foreign installation ; media must be accessed to contain the configuration file for this adapter. ; ; Before we can do that, make sure the BTADP for the device/adapter properly ; identifies itself as being foreign. If the foreign bit is set, then ; there is nothing more to do. If it is not set, then we need to set the ; foreing_port flag. (This indicates that the port driver is foreign but ; the class driver is not. More explicitly, it indicates that the ; protocol type was known to APB.) ; ; ; NOTE: In the context of the boot path, foreign class means that the ; BTADP$IL_PROTOCOL_L field contains a protocol type that is ; not known to us. ; BBS #BTADP$V_FOREIGN,- ; Is it a foreign class? BTADP$IQ_FLAGS(R6),380$ ; Yes - get the run-time support BISL #BTADP$M_FOREIGN_PORT,- ; Other wise set the foreign_port bit BTADP$IQ_FLAGS(R6) ; before the run-time support ; is obtained. 380$: ; ; At this time, we know that we are dealing with a foreign installation. ; Either the device we are attempting to boot is foreign and requires ; a special class driver (possible SCSI case) or the adapter being used with ; the deivce is not inherently supported in the base OS (the more likely ; case). ; ; The foreign device installation media has to be accessed to ; allow the configuration informaiton and the driver for this device ; to be accessed. The media is available in the "secondary boot device". ; ; The secondary boot device can be identified using the BTADP list. The ; current BTADP is that for the foreign device/adapter. If the ; BOOTED_DEVICE flag is set, then we are performing the first reboot after ; VMS was installed, the secondary boot device cannot be the primary boot ; device, the BTADP back link will be used. ; ; If the BOOTED_DEVICE is not set, we know that this is an installation ; of VMS to a foreign target. By following the BTADP back link, the ; secondary boot device can be identified. ; ; If the previous BTADP has the BOOTED_DEVICE flag set, then it is ; also the current system disk (the device containing the ; OpenVMS Alpha installation CD). If it does not have the BOOTED_DEVICE ; bit set, the extra work will need to be performed in order to ; access the device. ; BBC #BTADP$V_BOOTED_DEVICE,- ; If foreign dev not booted device BTADP$IQ_FLAGS(R4),385$ ; the follow the back link! MOVL BTADP$PL_FLINK_L(R6),R4 ; Otherwise, follow the front link BRW 390$ ; Branch and get the media! 385$: MOVL BTADP$PL_BLINK_L(R6),R4 ; Get the previous BTADP in the list 390$: INCL MEDIA_ATTEMPTS ; Increment the number of tries CMPL MEDIA_ATTEMPTS,#MAX_TRIES ; Is this this sixth attempt? BLEQ 395$ ; If not - try again. MOVL EXC_3PB_TRIES,R1 ; Get the error message 395$: CALLS #0,GET_3PB_MEDIA ; Have the user provide the media BBC #BTADP$V_BOOTED_DEVICE,- ; If is not the system device, then BTADP$IQ_FLAGS(R4),410$ ; then extra steps needed to mount it CALLS #0,MOUNT_SAME_DEVICE ; Mount the device INCL FOREIGN_MEDIA ; Tells us we are accessing foreign media BRW 400$ ; Continue processing 410$: ; ; Extra steps are needed because a hardware channel has to be opend ; to the secondary boot device. This shouldn't be a problem because ; the SRM console requrires that a minimum of two channels can be ; open at any time. ; PUSHL R2 ; The SWRPB PUSHL R4 ; The BTADP for the SBD CALLS #2,IOC$MOUNT_SBD ; Mount the SBD INCL FOREIGN_MEDIA ; Tells us we are accessing foreign media ; ; Create the in-memory configuration table specific to the foreign ; device. If it isn't found, request the media agian! ; 400$: PUSHAB TPB_FILE_NAME ; The desired file specification PUSHAB TPB_CFG_STRUC ; Addres of the config table to use PUSHL #-1 ; All buses desired CALLS #3, G^IOC$BUILD_CONFIG_TABLE ; Build the in-memory table BLBS R0,415$ ; A table successfully built - branch. MOVAB NO_TPB_TBL,R1 ; Other wise print out an error message, JSB G^ EXE$OUTCRLF ; make it look nice, and try to JSB G^ EXE$OUTZSTRING ; obtain the correct media. INCL MEDIA_ATTEMPTS ; Increment the attempts BRW 390$ ; ; ; Look-up the hardware ID in the table ; 415$: ADDL3 #8,TPB_CFG_STRUC,TPB_CFG_TBL ; Skip over the bogus mask. PUSHAL DEV_CODE ; Address to get the two-character devname PUSHAL PORT_INDEX ; Address to contain the index in the table PUSHL BOOT_ADP ; The ADP address PUSHL BOOT_BUS_ARRAY ; The bus array address for this adapter PUSHL TPB_CFG_TBL ; Addresss of the configuration table CALLS # 5, G^ IOC$LOOKUP_ID ; Find the ID in the table MOVL TPB_CFG_TBL,R8 ; Store the table address in R8 CMPL #SS$_NOMOREITEMS,R0 ; Was the ID found in this table BNEQ 390$ ; No, so Try to obtain the correct media 420$: PUSHL R8 ; The first entry in SYS$USER_CONFIG.DAT PUSHL DEV_CODE ; The address of the DEVNAM CALLS # 2, G^ IOC$ASSIGN_BOOT_CTRLR ; Get the assignment done BLBC R0, OUTZBUGCHK ; If it failed, things are very rotten ; ; Need to determine if the protocol type is RAID - if it is, ; then we need to check the DRDRIVER sysgen parameter ; This is necessary to correctly set unit nubmers for DR ; devices that are served. ; CMPL BTADP$IL_PROTOCOL_L(R6),- ; Is the protocol type RAID? #^A/RAID/ ; If it is not, then BNEQ 460$ ; branch. TSTL SGN$GL_DR_UNIT_BASE ; Check if the unit base is 0. BEQL 460$ ; If it is, then just load the driver. ADDL2 SGN$GL_DR_UNIT_BASE,- ; Other wise add the value to the BTADP$IQ_UNIT(R6) ; contents of the UNIT field in BTADP. ; ; Go configure the device ; 460$: BSBW LOAD_RUNTIME_DRIVERS ; Load the drivers. BLBC R0, BAD_DRVR_CONNECT ; Error, tell the world - branch. ; ; Walk the entire BTADP list. ; 540$: MOVL BTADP$PQ_FLINK(R6), R6 ; Get the next BTADP structure. CMPL R6, R9 ; End of BTADP list. BNEQ 80$ ; No, another adapter - branch. ; ; Get the next entry in the IOVEC list ; 580$: MOVL IOVEC$PQ_FLINK(R10), R10 ; Get the next IOVEC entry. CMPL R10, IOVEC_LIST_HEAD ; End of IOVEC? BNEQ WALK_IOVEC ; No, another entry - branch. ; ; If we have arrived here, then we no longer require the configuration ; tables to be in memory. The memory can be freed. ; TSTL CFG_TBL_STRUC ; Does the common table exist BEQL 600$ ; Branch if not PUSHL CFG_TBL_STRUC ; The table to be freed CALLS #1, G^IOC$DELETE_CONFIG_TABLE ; Delete the table 600$: TSTL TPB_CFG_STRUC ; Does the foreign table exist BEQL LOAD_SHDRIVER ; Branch if not PUSHL TPB_CFG_STRUC ; The table to be freed CALLS #1, G^IOC$DELETE_CONFIG_TABLE ; Delete the table .PAGE .SBTTL - Set up parameters to load SHDRIVER. ; ; Load and initialize the host-based shadowing driver, if requested via ; SYSGEN parameters. The prefab SYS$SHDRIVER.EXE driver name descriptor ; is filled in with type, class, length and pointer to ASCII text. ; ; The prefab SHDRIVER driver name descriptor ASCII is already initialized. ; ; Note: This logic for VAX systems, lives in SYSBOOT.MAR. ; ; ; Decide if SYS$SHDRIVER.EXE should be loaded into memory, by testing ; the setting of the SYSGEN parameters: EXE$GL_SHADOW_SYS_DISK (system ; disk is shadowed) and EXE$GL_SHADOWING (load shadowing for other disks). ; LOAD_SHDRIVER: ; Label defines new local symbol bock. TSTL G^EXE$GL_SHADOWING ; Check if SHADOWING system parameter BEQL 10$ ; specified hbs or ctlr-based or 0. CMPL #2,EXE$GL_SHADOWING ; 0 = none, 1=ctlr-based (illegal) BEQL 20$ ; 2 = hbs, 3=both (illegal) ; ERROR - bad SHADOWING system parameter MOVAB SH_BAD_PARAM,R1 ; Get message = "%INITIODB-W- ". JSB G^EXE$OUTZSTRING ; Output the given message. MOVL G^EXE$GL_SHADOWING,R1 ; Get the bad system parameter value. JSB G^EXE$OUTHEX ; Display error as long hex. BICL2 #^XFD,G^EXE$GL_SHADOWING ; Since parameter is wrong, ; force to legal value. BRW LOAD_SHDRIVER ; Re-join code path with legal parameter 10$: BLBC G^EXE$GL_SHADOW_SYS_DISK,NO_SHAD_SYS_DEV; Br if sys disk is ; not shadowed, skip loading SHDRIVER. MOVL #2,EXE$GL_SHADOWING ; Indicate host-based shadowing IS being ; used, whether or not SYSGEN param was ; set correctly. ; ; Load SYS$SHDRIVER.EXE into memory. ; 20$: PUSHAB IOSB ; Push address of IOSB. PUSHAB SH_ITEMLIST ; Push address of item list. PUSHAB SH_DSCRPTR ; Push address of driver name dscrptr. PUSHAB SH_DEV_DSCRPTR ; Push address of device name dscrptr. PUSHL # IOGEN$_CONNECT !- ; Push the CONNECT function code. IOGEN$M_NOINIT CALLS #5,SYS$LOAD_DRIVER ; Load the SHDRIVER. BLBC R0,SH_LOAD_ERR ; If it failed, go report problem. DBG_LOAD_SUCCESSFUL SH_DESC_ADDRESS ; Load successful. MOVL SH_UCB_PTER,R5 ; Get addr of newly created system UCB. BLBC G^EXE$GL_SHADOW_SYS_DISK,NO_SHAD_SYS_DEV ; Br if sys disk is ; not shadowed BISW #UCB$M_VALID,- ; Force valid bit to indicate system UCB$L_STS(R5) ; disk init--indicator used by SHDRIVER ; controller init routine. ; ; This code was ported from the VAX SYSBOOT logic. Folklore has been lost ; as to the orginal purpose of this code. It may not be needed on Alpha AXP ; systems due to the new BT_ORDER cell, that is used to determine the order in ; which to call driver initialization routines -- allowing port drivers to ; be called first, class drivers send, and "container" drivers such as SHDRIVER ; to be called last. ; MOVL SH_DDB_PTER,R5 ; Get addr of newly created system DDB. ; Put our DDB in front. MOVL DDB$L_SB(R5),R6 ; Get local SB address. MOVAL SB$L_DDB(R6),R6 ; Get DDB list header. 40$: CMPL DDB$L_LINK(R6),R5 ; Is the next DDB our DDB? BEQL 50$ ; EQL means yes. MOVL DDB$L_LINK(R6),R6 ; Get next DDB address. BRB 40$ ; Repeat. 50$: MOVL DDB$L_LINK(R5),- ; Point this DDB to the DDB behind us. DDB$L_LINK(R6) ; MOVL DDB$L_SB(R5),R6 ; Reload SB address. MOVL SB$L_DDB(R6),- ; Point our pointer to the beginning DDB$L_LINK(R5) ; of the list. MOVL R5,SB$L_DDB(R6) ; Put our DDB in the front row. MOVL R5,G^IOC$GL_DEVLIST ; Fix the local dev list head. ; ; The following code comes from the VAX SYSBOOT logic to load SHDRIVER. ; It is probably not needed, but placed here during development for information. ; ; BSBW FIX_DSKDRV2_DB2 ; R10 points to UCB. ; ; Use port routine to allocate and ; ; link CRB/IDB. ; ; PUSHR #^M ; Save registers. ; MOVZBL #IPL$_SCS,R0 ; Get IPL for spinlock. ; MOVB R0,UCB$B_DIPL(R10) ; Copy into our vu ucb. ; MOVL UCB$L_DLCK(R10),R2 ; GET SPINLOCK ADDRESS ; JSB G^SMP$INIT_SPL ; Initialize spin lock. ; POPR #^M ; Restore registers. ; ; MOVL R10,R5 ; R5 has to point to UCB. ; JSB G^IOC$INITDRV ; Connect driver to data base. ; ; POPR #^M ; Restore registers. ; RSB NO_SHAD_SYS_DEV: ; Continue with other work... .PAGE .SBTTL - Disconnect the primary boot driver. ; ; Disconnect the primary boot driver. ; DISC_BOOT_DRVR: MOVL G^EXE$GPL_HWRPB_L,R6 ; Pick up the HWRPB address... MOVL HWRPB$PL_SWRPB_L(R6),R6 ; to get to the SWRPB, from SWRPB... MOVL SWRPB$PQ_IOCHAN(R6),R0 ; get the channel number. ; Set up parameters for the Disconnect call. PUSHL R0 ; Push the channel number. CALLS #1,BOO$DISC ; Disconnect the primary boot driver. DBG_MESSAGE DISC_APBT_OK ; About to disconnect boot driver. ; Now call a platform specific routine to do any I/O bridge setup ; that needed to wait until the boot driver was disconnected. ; This routine, if it exists for a particular platform, can be ; found in [cpuxxyy.lis]io_support_xxyy.lis CALLS #0,IOC$INIT_IO_BRIDGE .PAGE .SBTTL INIT_DRIVERS - Call Controller and Unit Initialization Routines INIT_DRIVERS: ;*************************************************************************** ; ; Make the call to EXE$INIT_DEVICE_PWRUP which will call controller init ; and unit init routines in all the loaded drivers. The logic skips over ; MBDRIVER and TTDRIVER. The first parameter controls the setting of the ; UCB$M_POWER bit which indicates whether a powerfail has occurred or not. ; Since this is not a powerfail recovery call the parameter should be 0. ; The second parameter selects devices by TR number, where -1 indicates ; all devices. If this is the case the driver initialization routines will ; be called in the order dsignated by each driver in its DPT. ; MNEGL #1,-(SP) ; P1 - Set up to init all controllers. CLRL -(SP) ; P0 - Indicate not to set UCB$M_POWER. CALLS #2,G^EXE$INIT_DEVICE_PWRUP ; Init controllers and units. .PAGE .SBTTL STORE_UCB_IN_WCB - Save address of system device UCB in all WCB ; ; Store 1 in UCB ref count. Store the owner information in the ORB then ; store the system disk UCB address in all WCBs for all system images. ; ; Inputs: ; NEW_UCB_PTER - Address of system UCB ; ; Implicit inputs: ; LDR$GQ_IMAGE_LIST - list header for image blocks ; ; Outputs: ; The owner info in in the ORB refc in UCB is 1.. ; System device UCB stored in WCB$L_ORGUCB field of all WCBs. ; All registers unmodified. ;-- STORE_UCB_IN_WCB: MOVL NEW_UCB_PTER,R5 ; Get addr of newly created system UCB. MOVL #1,UCB$L_REFC(R5) ; Fix reference count to 1. MOVL UCB$L_ORB(R5),R9 ; Get address of the ORB. MOVL #^X<010001>,ORB$L_OWNER(R9) ; Set owner field to (1,1). STORE_UCB_ADDR: MOVAB G^LDR$GQ_IMAGE_LIST,R3 ; Get address of queue header. MOVL R3,R2 ; Copy queue header. 10$: MOVL (R2),R2 ; Get next element. CMPL R2,R3 ; Back at the head of the queue? BEQL 20$ ; YES- Continue system initialization - branch. MOVL LDRIMG$L_WCB(R2),R1 ; NO - Get addr of WCB for this image. BEQL 10$ ; Branch if no pagable code. MOVL R5,WCB$L_ORGUCB(R1) ; Store UCB address in WCB. BRB 10$ ; Go to next loaded image. 20$: DBG_MESSAGE END_MSG ; Tell all we are leaving. RET ; Return to EXE$INIT. .PAGE .SBTTL INT_TO_A -- Integer to ASCII conversion routine ; ; Local subroutine where a hex to decimal conversion is done from P0 and ; placed into a DEVBUF then moved to caller's buffer in P1. The digits ; are generated from one's digit towards higher powers of ten and stored ; in a character buffer DEVBUF. The ASCII string is then moved to the ; caller's output buffer which is the unit number for the device name ; descriptor. ; ; Inputs: ; P0 (R2) - Hex value to be converted. ; P1 (R11)- Address of destination field for ASCII value. ; P2 (R10)- Address for the size of the ASCII field created. ; ; Implicit inputs: ; DEVBUF - Temporary buffer into which the hex value is converted ; to ASCII one decimal digit at a time. ; ; Outputs: ; P2 - Size of the ASCII field created. ; ; Implicit outputs: ; The field at address pointed to by P1 will be filled in with the ; new ASCII values. ; ;-- HEX_VALUE = 4 DESTINATION = 8 LEN_OF_CONV = 12 INT_TO_A:: .CALL_ENTRY MAX_ARGS=3,- HOME_ARGS=FALSE ; Pop... MOVL HEX_VALUE(AP),R2 ; P0 - Value to be converted. MOVL DESTINATION(AP),R11 ; P1 - Address of destination. MOVL LEN_OF_CONV(AP),R10 ; P2 - Address for Len of conversion. MOVL #DEVBUF_LEN, R8 ; Initialize string index. MOVAB DEVBUF[R8],R8 ; Calculate one past end of buffer. MOVB #0,-(R8) ; Zero terminate string. MOVL #10,R4 ; R4 is radix of conversion. MOVL R4,R3 ; Start at (radix)^1. MOVL #1,R0 ; Count of places... ; in number starts at 1. 20$: CMPL R2,R3 ; Is number less than (radix)^n. BLSSU 30$ ; YES- We now know # of places. MULL R4,R3 ; NO - R3 = (radix)^(R0+1). AOBLSS R4,R0,20$ ; Bump R0 to count places. 30$: CLRL R1 ; Used to count places printed. 40$: MOVL R2,R3 ; Move dividend to work register. CLRL R2 ; Clear quotient (counter). 45$: CMPL R3,R4 ; R3 still .GE. than the radix? BLSS 50$ ; NO - So R3 holds remainder. SUBL R4,R3 ; YES- Subtract radix from R3. INCL R2 ; Increment quotient. BRB 45$ ; Repeat. ; ; Now -- R3 has remainder, R2 has been div'd by radix ; 50$: MOVB G^EXE$AB_HEXTAB[R3],-(R8) ; Next decimal character. AOBLSS R0,R1,40$ ; Loop for all digits in number. MOVL R0,(R10) ; Save count of digits. MOVC3 R0,(R8),(R11) ; Address of dev_name string. RET ; Return. .PAGE .SBTTL - Errors come hither. BAD_TTY_DPT: ; ERROR! TTDRIVER DPT. MOVAB BADTTYDRV,R1 ; No - Set illegal format error. JSB G^EXE$OUTZSTRING ; Output the given message. BRW OUTZBUGCHK ; Output the fatal message and die TTY_LOAD_ERR: ; ERROR! TTDRIVER LOAD. MOVZWL R0,R0_STATUS ; Save R0 status for output. MOVAB ERR_HEADING,R1 ; Get message = "%INITIODB-F- ". JSB G^EXE$OUTZSTRING ; Output the given message. MOVZWL #TT_LENGTH,R2 ; Length of TT driver name. MOVAB TTDRIVER_NAME,R1 ; Pointer Addr to ASCII name. BRW OUTNSTRING SH_LOAD_ERR: ; ERROR! SHDRIVER LOAD. MOVZWL R0,R0_STATUS ; Save R0 status for output. MOVAB ERR_HEADING,R1 ; Get message = "%INITIODB-F- ". JSB G^EXE$OUTZSTRING ; Output the given message. MOVZWL #SH_LENGTH,R2 ; Length of SH driver name. MOVAB SHDRIVER_NAME,R1 ; Pointer Addr to ASCII name. BRW OUTNSTRING BAD_DRVR_CONNECT: ; ERROR! SYSTEM DEVICE DRIVER. MOVZWL R0,R0_STATUS ; Save R0 status for output. MOVAB ERR_HEADING,R1 ; Get message = "%INITIODB-F- ". JSB G^EXE$OUTZSTRING ; Output the given message. ; Output the driver name to the console using the descriptor located in the ; BDTAB. First get length of ASCII string, then address the ASCII string, ; finally loop until each char is put to the screen. TSTL R8 ; Is there a NAMTBL? BEQL STRING_DONE ; Nope, keep going MOVZWL NAMTBL$IQ_DRIVER_NAME_DESC+DSC$W_LENGTH(R8),R2 ; Length. MOVL NAMTBL$IQ_DRIVER_NAME_DESC+DSC$A_POINTER(R8),R1 ; Pointer Addr. OUTNSTRING: ; R1 = ASCII addr, R2 = length. MOVZBL (R1)+,R0 ; Get first/next char of string. BEQL STRING_DONE ; End of string? YES - leave. JSB G^EXE$OUTCHAR ; NO - Output character SOBGTR R2,OUTNSTRING ; Any more characters in input? STRING_DONE: ; YES - Go back and output it, ; NO - Done with driver name. MOVAB ERR_LOAD,R1 ; Get message = "load failed:crlf" JSB G^EXE$OUTZSTRING ; Output the given message. BAD_CONNECT: MOVAB LOAD_STATUS,R1 ; Get the correct error message. JSB G^EXE$OUTZSTRING ; Output the given message. MOVZWL IOSB_STATUS,R1 ; Get the returned error code. JSB G^EXE$OUTHEX ; Display error as long hex. MOVAB REG_ZERO_STATUS,R1 ; Get the correct error message. JSB G^EXE$OUTZSTRING ; Output the given message. MOVZWL R0_STATUS,R1 ; Get the returned R0 error status. JSB G^EXE$OUTHEX ; Display error as long hex. OUTZBUGCHK: ; ERROR! JSB G^EXE$OUTCRLF ; Carriage return, line feed. BUG_CHECK INCONSTATE,FATAL ; H A L T ! In the name of the law. .PAGE .SBTTL LOCATE_SYSTEM_BLOCK - Subroutine to Local a System Block. ;+ ; LOCATE_SYSTEM_BLOCK ; This subroutine searches the queue of system blocks to locate a ; system block that matches the SCSSYSTEMID passed in the BTADP. ; ; Inputs: ; R6 = BTADP Address. ; ; Outputs: ; R0 = System block located status. ;- LOCATE_SYSTEM_BLOCK: .JSB_ENTRY INPUT=, - PRESERVE=, - OUTPUT= ; ; Loop through the system blocks. ; CLRL R0 ; Assume system block was not found. MOVAB SCS$GQ_CONFIG, R1 ; Get the queue header address. MOVL R1, R2 ; Copy it. ASSUME SB$L_FLINK EQ 0 10$: MOVL SB$L_FLINK(R2), R2 ; Get the next system block address. CMPL R2, R1 ; End of system block list? BEQL 20$ ; End of system block list - branch. ; ; Attempt to locate the requested system block. ; CMPL BTADP$IQ_SCSSYSTEMID(R6), - ; Is this the requested SB? SB$B_SYSTEMID(R2) BNEQ 10$ ; SB does not match - branch. CMPW 4+BTADP$IQ_SCSSYSTEMID(R6), - 4+SB$B_SYSTEMID(R2) BNEQ 10$ ; SB does not match - branch. MOVL # SS$_NORMAL, R0 ; We found the system block. 20$: RSB .PAGE .SBTTL LOAD_RUNTIME_DRIVERS - Subroutine to Load the Runtime Drivers. ;++ ; LOAD_RUNTIME_DRIVERS ; ; This subroutine is called to load the runtime drivers associated ; with each of the boot drivers required for a specific boot adapter ; (BTADP). Prior to calling this routine the I/O vector (IOVEC) is ; traversed. For each boot driver located in the I/O vector (i.e. ; each I/O vector entry), the queue of boot adapters (BTADP) is ; walked to locate each of the I/O adapters. ; ; This routine is called for each of the boot adapters and is ; responsible for determining the configuration data required ; to load the required drivers and connect the units. ; ; Inputs: ; R6 = BTADP address. ; R8 = In-memory configuration table address. This ; will contain the address of the foreign config ; table or the one built from system files. ; ; Outputs: ; R0 = Status. ; R8 = Driver name descriptor address. ;-- LOAD_RUNTIME_DRIVERS: .JSB_ENTRY INPUT=, - PRESERVE=, - OUTPUT= ; ; Load each driver listed in the driver name descriptor table. ; MOVL # SS$_NORMAL, R0 ; Assume success. MOVL Boot_BUS_ARRAY, R4 ; Get the BUS ARRAY address. ; ; Make the configuration table entry for this BTADP useful ; MOVL R8, R7 ; Save the base of the config table MULL3 #IOGEN_CFG_TBL$K_ENTRY_SIZE,- ; Get the offset of the desired entry PORT_INDEX,R3 ; within the table ADDL2 R3,R8 ; Calculate the entry address ; ; Determine the protocol type for this BTADP. ; If the protocol type of 'MOP ', then always load ; the run-time drivers associated with the device ; represented by the BTADP...EXCEPT when... ; ; If the protocol type is 'MOP ' and the REM_DEBUG ; flag is set, do not load the runtime support for ; the LAN device. We need to use the LAN boot driver ; with the SC debugger. ; 10$: MOVL G^ EXE$GPQ_SWRPB,R9 ; Get SWRPB CMPL BTADP$IL_PROTOCOL_L(R6),- ; If the device has a protocol #^A/MOP / ; type of 'MOP ' then BNEQ 15$ ; check to see if the SCD debug BBC #SWRPB_BOOT_FLAGS$V_REM_DEBUG,- ; flag is set. If it is not, SWRPB$IQ_BOOT_FLAGS(R9), 15$ ; then process as normal BRW 800$ ; other wise, return normal ; and get the next BTADP to process. 15$: TSTL BTADP$IL_DUMPDEV_ORDER(R6) ; Is there an dump order assigned? BEQL 90$ ; EQL, no so load run-time support ; ; The controller letter has been assigned for this particular boot device ; Copy the controller letter from the bus array entry to the BTADP. ; MOVB BUSARRAY$L_CTRLLTR(R4), - ; Update the controller letter. BTADP$B_CONTROLLER_LETTER(R6) ; do the dump disk can be identified ; ; Place the specified device prefix in the BTADP. ; ; We have to jump though hoops here because LAS and DAD ; device break the two character device name rules! ; MOVAB BTADP$T_CONTROLLER_PREFIX(R6), R2 ; Get the alternate prefix address. TSTL (R2) ; Is this field non-empty? BNEQ 70$ ; NEQ, yes, so use it. CMPL BTADP$IL_PROTOCOL_L(R6),#^A/MSCP/ ; Is this a MSCP device BNEQ 30$ ; NEQ, no CMPL BTADP$IL_BOOTNDT_L(R6),#NDT$_CIPCA ; CI-PCA controller BEQL 20$ CMPL BTADP$IL_BOOTNDT_L(R6),#NDT$_CIMNA ; XMI-CI controller BEQL 20$ CMPL BTADP$IL_BOOTNDT_L(R6),#NDT$_CIXCD ; BNEQ 30$ 20$: MOVL #2,BTADP$T_CONTROLLER_PREFIX(R6) ; Store as a counted string .DSABL FLAGGING ; % AMAC-I-FIEINALI, Field in aligned structure MOVL #^A/DU/,BTADP$T_CONTROLLER_PREFIX+1(R6) ; .ENABL FLAGGING BRB 70$ 30$: MOVL IOGEN_CFG_TBL$PS_BOOT_CLASS(R8),R1 ; Is there a class driver? BEQL 40$ ; No, so write to the BTADP$T_ ; CONTROLLER_PREFIX field now MOVL (R1),R1 ; Get the class driver prefix BRB 50$ 40$: MOVL @IOGEN_CFG_TBL$PS_DEVNAM(R8), R1 ; Get the default prefix 50$: ASHL #8, R1, R1 ; and fabricate a BISL #2, R1 ; a counted string BITL #^xFF000000, R1 ; Is it a two character string? BEQL 60$ ; Yes, so branch INCL R1 ; Otherwise it is a 3 char string 60$: MOVL R1, BTADP$T_CONTROLLER_PREFIX(R6) ; ; Write the port allocation class (if one exists) for the ; device into the BTADP. ; 70$: MOVL #-1,P_ALLOCLS ; No port allocation class yet MOVL #-1,BTADP$IL_ALLOCLASS(R6) ; Assume no allocation class for device ASHL #-8,R1,R1 ; Eliminate count CMPB R1,#^A/D/ ; First character "D"? BNEQ 100$ ; If no, has no port allocls MOVB #^A/P/,R1 ; Else go for port prefix CLRL R2 ; ASHL #16,BTADP$B_CONTROLLER_LETTER(R6),R2 ; Shift controller letter to 3rd byte BISL3 R2,R1,PORTNAME ; Store it in memory PUSHAL P_ALLOCLS ; P1: address to return allocls PUSHAB PORTNAME ; P0: address of port name CALLS #2,IOGEN$CLASS_MATCH ; Look it up ; No value returned -- allocls is set up for itemlist call ; If a positive port allocation class was returned, then set the ; controller letter in the BTADP to "A" and save the allocation ; class in the BTADP as well. If zero, just save the allocation class ; without changing the controller letter. ; MOVL #SS$_NORMAL,R0 TSTL P_ALLOCLS ; Port allocation class ("PAC")? BLSS 100$ ; No "PAC", skip this work BEQL 80$ ; PAC 0, just save allocation class MOVB #^A/A/,BTADP$B_CONTROLLER_LETTER(R6) ; Fold controller letter 80$: MOVL P_ALLOCLS,BTADP$IL_ALLOCLASS(R6) ; Save allocation class BRB 100$ ; Join common code 90$: .BRANCH_LIKELY BBC #SWRPB_BOOT_FLAGS$V_FOREIGN,- ; If not a foreign boot, normal SWRPB$IQ_BOOT_FLAGS(R9),100$ ; rules apply BBS #BTADP$V_FOREIGN,- ; Otherwise, see if this device BTADP$IQ_FLAGS(R6),120$ ; is actually foreign ASSUME BTADP$V_BOOTED_DEVICE EQ 0 ; Don't load runtime driver 100$: BLBS BTADP$IQ_FLAGS(R6),120$ ;... if not boot device BICL #BUSARRAY$M_NO_RECONNECT,- ; Clear the N0_RECONNECT bit so BUSARRAY$L_FLAGS(R4) ; the run-time support for this ; device can be loaded by AUTOCONFIGURE. RSB ; Now return for another BTADP ; ; Assume the driver is not associated with any hardware. ; Build an item list entry for NO_ADAPTER. ; 120$: MOVAB ITEMLIST, R9 ; Get the item list address. MOVL # IOGEN$_NOADAPTER @ 16, (R9)+ ; Specify NO_ADAPTER. .DSABL FLAGGING ; AMAC-I Quadword memory references may be unaligned CLRQ (R9)+ ; No return length required. .ENABL FLAGGING ; ; If this driver is associated with the physical hardware ; then we must locate the hardware configuration information. ; BBC # IOGEN_CFG_TBL$V_HW_CTRL_LTR,- ; Driver is not associated with IOGEN_CFG_TBL$L_BOOT_FLAGS(R8), 180$ ; hardware - branch ; ; Update the controller letter associated with this adapter. ; This letter may be used for other drivers associated ; with this device. ; MOVB BUSARRAY$L_CTRLLTR(R4), - ; Update the controller letter. BTADP$B_CONTROLLER_LETTER(R6) ; ; Is the driver is associated with physical hardware? ; 180$: BBS # IOGEN_CFG_TBL$V_CLASS,- ; Is this table entry for IOGEN_CFG_TBL$L_FLAGS(R8), 320$ ; a class driver - branch if yes. BBS # IOGEN_CFG_TBL$V_PSEUDO,- ; Is this table entry for IOGEN_CFG_TBL$L_FLAGS(R8), 320$ ; a pseudo driver - branch if yes. MOVL Boot_ADP, R5 ; Get the ADP of the boot device. ; R4 = BUSARRAY address if dealing with a port driver. ; R5 = ADP address. ; R6 = BTADP address. ; R7 = Config table address. ; R8 = Configuration table entry. ; R9 = End of item list address. ; ; All other registers are SCRATCH registers ; ; ; Build the item list entries related to the hardware. ; 250$: MOVL #< IOGEN$_ADAPTER @ 16 > ! - ; Specify the TR number. 4, -12(R9) ; Item size. MOVAL ADP$L_TR(R5), -8(R9) ; Address of TR number. MOVL #< IOGEN$_CSR @ 16 > ! 8, (R9)+ ; Specify the CSR address. MOVAQ BUSARRAY$Q_CSR(R4), (R9)+ ; Address of CSR address. CLRL (R9)+ ; No return length required. MOVAL VECTOR_LIST, R3 ; Get vector list adress. MULL3 VECTOR_COUNT, # 4, R0 ; Get length of vector list. BISL3 # IOGEN$_VECTOR @ 16, R0, (R9)+ ; Specify vector list for the device MOVL R3, (R9)+ ; Address of the vector values. CLRL (R9)+ ; No return length required. ; ; Use the CRB created by SYSLOA if one exists. Otherwise, have ; $LOAD_DRIVER write the address of the newly created CRB into the ; bus array. ; MOVL # ! 4,(R9)+ ; Assume no SYSLOA created CRB TSTL BUSARRAY$PS_CRB(R4) ; Has SYSLOA created a CRB? BEQL 280$ ; No - branch. MOVL #< IOGEN$_SYSLOA_CRB @ 16 > - ; Use the CRB created by SYSLOA. ! 4, -4(R9) 280$: MOVAL BUSARRAY$PS_CRB(R4), (R9)+ ; Address of CRB to use. CLRL (R9)+ ; No return length required. ; ; Pass the slot number from the BTADP through to be inserted in ; the CRB$L_NODE field. This allows drivers to find more ; information about the geographical location of their devices in ; a system. ; MOVL # ! 4,(R9)+ ; Set the CRB NODE field MOVAL BTADP$IL_SLOT_L(R6),(R9)+ ; Address of node number to use CLRL (R9)+ ; No return length required 320$: ; R6 = BTADP address. ; R7 = Config table address. ; R8 = Configuration table entry. ; R9 = End of item list address. ; ; All other registers are SCRATCH. ; ; ; If this is the system device then we must get the UCB address ; and change the function code. ; ; There can be only one system device. To determine this, we ; first need to check if the booted_device flag in the BTADP ; is set. If it is, then we can check the sys_dev boot flag ; in the config table. These steps prevent us from accidently ; making one of the dump or foreign devices the system device. ; MOVL # IOGEN$_CONNECT - ; Set the default ! IOGEN$M_NOINIT, R10 ; function code. BBC # IOGEN_CFG_TBL$V_SYS_DEV,- ; Not the system device- IOGEN_CFG_TBL$L_BOOT_FLAGS(R8), 350$ ; so branch. ; ; If we are dealing with something that can be the system device, then ; we need to be sure that we already don't have one assigned. ; TSTL NEW_UCB_PTER ; Is the SYSTEM UCB assigned BNEQ 350$ ; Yup - so branch. BISL # IOGEN$M_SYSDEVICE, R10 ; Update the function code. MOVL #< IOGEN$_UCB @ 16 > ! 4, (R9)+ ; Yes, get UCB address. MOVAL NEW_UCB_PTER, (R9)+ ; Set address for UCB address. CLRL (R9)+ ; Return length not required. 350$: ; R6 = BTADP address. ; R7 = Config table address. ; R8 = Configuration table entry. ; R9 = End of item list address. ; R10 = Function code value. ; ; All other registers are SCRATCH. ; ; ; If a remote device is being added to the I/O database, then a ; remote system block must be created. Also, the node$ prefix ; must be added to the device name buffer. ; MOVAB CDEV_NAME, R12 ; Get the device name address. MOVL R3, R4 ; Save the name address. BBC # IOGEN_CFG_TBL$V_REMOTE,- ; Not a remote device - branch. IOGEN_CFG_TBL$L_BOOT_FLAGS(R8), 520$ ; ; Determine if the device that we are configuring is of protocol type ; "MOP ". If it is, then the BTADP already contains the necessary ; remote information. Just go and locate the system block. ; CMPL BTADP$IL_PROTOCOL_L(R6),- ; Is this BTADP for a LAN #^A/MOP / ; device? BEQL 370$ ; Locate the system block ; ; Need to make sure that all the proper fields specific to SCSNODE, SCSSYSTEMID ; and alternalte prefix are properly filled-in within the BTADP for a REMOTE ; device. ; ; This information is available from the console. ; ; NOTE: The KDM70 is an MSCP device that does not require this information ; because it is not a REMOTE device. The information specific ; the a device name off the KDM70 is provided in the BTADP by ; KDMBTBOOTDRIVER. This is why we cannot eliminate this ; driver at this time. ; PUSHL R6 ; Pass in the BTADP. CALLS #1, IOC$GET_MSCP_INFO ; Get the MSCP specific info. CMPL #SS$_NORMAL,R0 ; Is the device truely remote? BEQL 520$ ; No, so continue processing 370$: BSBW LOCATE_SYSTEM_BLOCK ; Try to find the system block. MOVL R1, R11 ; Assume system block was found. BLBS R0, 400$ ; System block found - branch. ; ; Create the system block for the remote system. ; MOVL # SB$C_LENGTH, R1 ; Size of system block. JSB G^ EXE$ALONONPAGED ; Allocate the new system block. MOVL R1, R12 ; Save the allocated length. MOVAB SB_ALLOC_FAIL, R1 ; Assume an allocation failure. BLBC R0, 900$ ; Allocation error - branch. MOVL R2, R11 ; Save the system block address. ; ; Initialize the system block. ; MOVC5 # 0, (SP), # 0, R12, (R2) ; Zero fill the system block. BISL3 # < DYN$C_SCS_SB @ 24 > ! - ; SYSTEM BLOCK structure. < DYN$C_SCS @ 16 >, R12, - ; SCS class of structures. SB$W_SIZE(R11) ; Set the system blk length/type MOVAB SB$L_PBFL(R11), SB$L_PBFL(R11) ; No path blocks yet. MOVAB SB$L_PBFL(R11), SB$L_PBBL(R11) CLRL SB$L_DDB(R11) ; No device list yet. ; ; Fill in the remote system's SCSSYSTEMID and SCSNODE. ; ASSUME SB$S_SYSTEMID EQ 6 MOVL BTADP$IQ_SCSSYSTEMID(R6), - ; Copy the SCS system ID value. SB$B_SYSTEMID(R11) MOVW 4+BTADP$IQ_SCSSYSTEMID(R6), - 4+SB$B_SYSTEMID(R11) ASSUME SB$S_NODENAME EQ BTADP$S_NODE_NAME MOVC3 # SB$S_NODENAME, - ; Copy the SCS node name. BTADP$T_NODE_NAME(R6), - ; This is counted ASCII string. SB$T_NODENAME(R11) ; ; Add this system block to the cluster configuration. ; MOVAB G^ SCS$GQ_CONFIG, R3 ; List head of system blocks. INSQUE SB$L_FLINK(R11), @4(R3) ; Queue to end of system block list. ; ; At the end of EXEC_INIT, control will be turned over to the ; runtime drivers to finish the system initialization. For ; satellite booting, SYS$PEDRIVER will be used to access the ; remote system disk via the MSCP server. However, SYS$PEDRIVER ; requires the cluster group code and authorization value for ; proper initialization. Since the STACONFIG process has not ; run, these values have not been initialized. However, the ; values that the boot driver has been using are available in ; the SWRPB. Update these values to allow the system to ; finish its initialization. ; MOVL G^ EXE$GPQ_SWRPB, R2 ; Get the SWRPB address. MOVL SWRPB$IL_LAVC_GROUP(R2), - ; Continue to use same group code. G^ CLU$GL_NISCS_GROUP .DSABL FLAGGING ; AMAC-I Quadword memory references may be unaligned MOVQ SWRPB$IQ_LAVC_AUTH(R2), - ; Use the same authorization code. G^ CLU$GQ_NISCS_AUTH .ENABL FLAGGING 400$: MOVAB CDEV_NAME, R12 ; Get the device name address. MOVL R12, DSC$A_POINTER+CDEV_DESC_ADDRESS ; Set the buffer addr. ; R6 = BTADP address. ; R7 = Config Table address. ; R8 = Configuration Table entry. ; R9 = End of item list address. ; R10 = Function code value. ; R11 = System block address. ; R12 = Device name buffer address. ; ; All other registers are SCRATCH. ; ; ; Start building the device name by adding the node$ prefix. ; MOVZBL SB$T_NODENAME(R11), R0 ; Get the node name length. MOVC3 R0, 1+SB$T_NODENAME(R11), (R12) ; Prefix with the node name. 440$: CMPB -1(R3), # ^A' ' ; Check for a trailing blank. BNEQ 480$ ; No trailing blanks - branch. DECL R3 ; Remove the trailing blank. BRB 440$ ; Do it again. 480$: MOVL R3, R12 ; Set the buffer address. MOVB # ^A'$', (R12)+ ; Separate with a dollar sign. BRB 530$ ; And skip over local work ; Set up for possible port allocation class found/not-found .IIF NDF,IOGEN$_ALLOCLS, IOGEN$_ALLOCLS=32 ; Until we get build class "F" 520$: MOVL #-1,P_ALLOCLS ; No port allocation class yet MOVL #-1,BTADP$IL_ALLOCLASS(R6) ; Assume no allocation class for device MOVL #< IOGEN$_ALLOCLS@16 > ! 4,(R9)+; Itemcode MOVAL P_ALLOCLS, (R9)+ ; Source address CLRL (R9)+ ; Return length not required. 530$: CLRL (R9)+ ; END of itemlist ; ; R5 = Unchanged copy of device name buffer address. ; R6 = BTADP address. ; R7 = Config Table address. ; R8 = Configuration Table entry. ; R9 = End of item list address. ; R10 = Function code value. ; R11 = System block address. ; R12 = Device name buffer address. ; ; All other registers are SCRATCH. ; ; ; ; Append the specified device prefix to the device name. ; ; We have to jump though hoops here because LAS and DAD ; device break the two character device name rules! ; MOVL @IOGEN_CFG_TBL$PS_DEVNAM(R8), R1 ; Get the default prefix ASHL #8, R1, R1 ; and fabricate a BISL #2, R1 ; a counted string BITL #^xFF000000, R1 ; Is it a two character string? BEQL 540$ ; Yes, so branch INCL R1 ; Otherwise it is a 3 char string 540$: MOVL R1, COUNTED_DEVNAM MOVAL COUNTED_DEVNAM, R0 TSTL IOGEN_CFG_TBL$PS_BOOT_CLASS(R8) ; Is there a class driver? BEQL 545$ ; No, so write to the BTADP$T_ ; CONTROLLER_PREFIX field now BBC # IOGEN_CFG_TBL$V_CLASS,- ; Is this table entry for IOGEN_CFG_TBL$L_FLAGS(R8), 560$ ; a class driver - branch if no. 545$: BBS # IOGEN_CFG_TBL$V_ALT_PREFIX,- ; Branch if the alternate device IOGEN_CFG_TBL$L_BOOT_FLAGS(R8), 550$ ; name prefix should be used. PUSHL R0 ; Preserve address of device prefix MOVAB BTADP$T_CONTROLLER_PREFIX(R6), R3 ; Get the alternate prefix address. MOVZBL (R0), R1 ; Get the device prefix length. INCL R1 ; Update count field to include count MOVC3 R1, (R0), (R3) ; Copy the device prefix. POPL R0 ; Restore address of device prefix BRB 560$ ; Join common code ; ; Even though the ALT_PREFIX flag is set, the controller prefix field may be empty ; An example of this is for an MSCP device which is identified as remote but is ; not really remote. ; 550$: MOVAB BTADP$T_CONTROLLER_PREFIX(R6), R0 ; Get the alternate prefix address. TSTL (R0) ; Is this field non-empty? BNEQ 560$ ; NEQ, yes, so use it. MOVAL COUNTED_DEVNAM, R3 ; MOVZBL (R3), R1 ; Get the device prefix length. INCL R1 ; Update count field to include count MOVC3 R1, (R3), (R0) ; Copy the device prefix. MOVAL COUNTED_DEVNAM, R0 ; Pass on device prefix ; in R0. 560$: PUSHL R12 ; Save for comparing MOVZBL (R0)+, R1 ; Get the device prefix length. MOVC3 R1, (R0), (R12) ; Copy the device prefix. MOVL R3, R12 ; Update the buffer pointer. POPL R5 ; Save original R12 ; ; Append the controller letter to the device name buffer. The ; controller letter can either be "A", or can be specified either ; by the configuration information, or the boot driver. ; BBS # IOGEN_CFG_TBL$V_NO_CTRL_LTR, - ; Ignore the controller letter IOGEN_CFG_TBL$L_BOOT_FLAGS(R8), 600$ ; as requested - branch. MOVB # ^A'A', (R12)+ ; Assume "A" was requested. ; ; If a LAN boot is being performed and served SCSI disks are involved, ; then DUDRIVER will be configured. In this case, the controller letter ; 'A' is not necessarily desired. Ignore the boot flag CTRL_LTR_A in the ; configuration file for DU/DI and use the controller letter provided ; in the BTADP. ; ; BTW - the BTADP we are using is one that does not represent any ; hardware. It is for PE and DU. The way we know we are configuring ; DUDRIVER is to check the BOOT_CLASS flag in the current config talbe ; entry. If there is no allociated class driver - we are deling with ; DUDRIVEr. ; CMPL BTADP$IL_PROTOCOL_L(R6),- ; Is this BTADP for a LAN #^A/MOP / ; device? BNEQ 670$ ; No, so check the CTRL_LTR_A flag MOVL IOGEN_CFG_TBL$PS_BOOT_CLASS(R8),R1 ; Is there a class driver? BEQL 680$ ; No, so use ctrl_ltr in the BTADP 670$: BBS # IOGEN_CFG_TBL$V_CTRL_LTR_A, - ; Use letter "A" - branch. IOGEN_CFG_TBL$L_BOOT_FLAGS(R8), 600$ 680$: MOVB BTADP$B_CONTROLLER_LETTER(R6),- ; Use controller letter specified by -1(R12) ; boot driver or configuration. ; ; See if this device has a port allocation class. In case of a remote boot ; this work is irrelevant since the IOGEN$_ALLOCLS entry will not be in the ; itemlist, so go ahead and name your boot server nodes DKA0; we don't care. ; 600$: MOVL (R5),R0 ; DDcu (approximately) CMPB R0,#^A/D/ ; First character "D"? BNEQ 620$ ; If no, has no port allocls MOVB #^A/P/,R0 ; Else go for port prefix MOVL R0,PORTNAME ; Store it in memory PUSHAL P_ALLOCLS ; P1: address to return allocls PUSHAB PORTNAME ; P0: address of port name CALLS #2,IOGEN$CLASS_MATCH ; Look it up ; No value returned -- allocls is set up for itemlist call ; If a port allocation class was returned (not -1), then set the ; controller letter in the BTADP to "A" and save the allocation ; class in the BTADP as well. ; CMPL P_ALLOCLS,#-1 ; If eql -1, no port allocation class BEQL 620$ MOVB #^A/A/,BTADP$B_CONTROLLER_LETTER(R6) MOVL P_ALLOCLS,BTADP$IL_ALLOCLASS(R6) ; Save allocation class ; ; Append the unit number to the device name. The unit number can ; either be specified as zero, or be taken from the BTADP field. ; 620$: MOVB # ^A'0', (R12)+ ; Assume "0" was specified. BBS # IOGEN_CFG_TBL$V_UNIT_0, - ; Unit 0 was specified - branch. IOGEN_CFG_TBL$L_BOOT_FLAGS(R8), 640$ 635$: DECL R12 ; Remove the default unit number. ; ; Convert unit number to ASCII and append it to the device name. ; PUSHAL CONV_LEN ; P2 - Length of value converted. PUSHL R12 ; P1 - Buffer address. PUSHL BTADP$IL_UNIT_L(R6) ; P0 - Value to be converted. CALLS # 3, INT_TO_A ; Convert that unit number to ASCII. ADDL CONV_LEN, R12 ; Set buffer end address. 640$: ; ; Update the device name descriptor. ; MOVAB CDEV_DESC_ADDRESS, R5 ; Get the device name descriptor address. SUBL3 DSC$A_POINTER(R5), - ; Compute the device name length. R12, DSC$W_LENGTH(R5) ; ; R5 = Device name descriptor address. ; R6 = BTADP address. ; R7 = Config Table address. ; R8 = Configuration table entry. ; R9 = End of item list address. ; R10 = Function code value. ; R11 = System block address. ; R12 = Scratch. ; ; ; All other registers are SCRATCH. ; ; ; Load the specified driver. ; 650$: MOVL IOGEN_CFG_TBL$PS_DRIVER_NAME(R8), - ; Get driver name descriptor CDRVR_DESC_ADDRESS PUSHAB IOSB ; P3 - Address of I/O Status Block. PUSHAB ITEMLIST ; P2 - Address of the ITEMLIST. PUSHL CDRVR_DESC_ADDRESS ; P1 - Drvr name desc addr PUSHL R5 ; P0 - Addr of device name descriptor. PUSHL R10 ; Push the CONNECT function code... CALLS # 5, SYS$LOAD_DRIVER ; Load driver and CONNECT unit. BLBC R0, 700$ ; Load error - branch. MOVZWL IOSB, R0 ; Get the final load status. 700$: .PAGE ; Special code for the case where we're booting over a LAN, in which case we ; have the wrong allocation class in the DDB. In the old days DUDRIVER would ; just plop down the allocation class from the CDDB, but now that's wrong. ; We have to get the allocation class from the the BTADP, if this is ; a remote boot. Lots of work to get the right BTADP. ; DUDRIVER correctly handles allocation classes from non-boot devices via ; MSCP protocols. CMPL BTADP$IL_PROTOCOL_L(R6),- ; Is this BTADP for a LAN #^A/MOP / ; device? BNEQ 720$ ; No, never mind TSTL BTADP$T_DEVICE_NAME(R6) ; Boot device (not wire) BTADP? BEQL 720$ ; Branch if wire ASSUME BTADP$V_BOOTED_DEVICE EQ 0 BLBC BTADP$IL_FLAGS_L(R6),720$ ; And make sure we're the ; booted device BBC #BTADP$V_NO_HARDWARE,- ; And make sure no hw BTADP$IL_FLAGS_L(R6),720$ ; 'cause we only want ; the class driver ; LAN boot and class driver BTADP. Allocation class is in BTADP$IQ_MSCP_SLUN ; first longword; move it into the system DDB. MOVL SYS$AR_BOOTDDB,R1 ; Get boot DDB BEQL 720$ ; Not yet (could be port) MOVL BTADP$IQ_MSCP_SLUN(R6), - ; First longword is alloclass DDB$L_ALLOCLS(R1) ; Store allocation class .PAGE 720$: ; ; Sometimes a port device will be shared amoung several class ; devices. In this case, the second time the port device is ; "loaded" it will fail because it is already in the configuration. ; In this case, the status can be converted to a success status. ; BBS # IOGEN_CFG_TBL$V_CREATE_DEV, - ; Always create a device - branch. IOGEN_CFG_TBL$L_BOOT_FLAGS(R8), 760$ CMPL R0, #SS$_DEVEXISTS ; Was the device already configured? BNEQ 760$ ; No, return load status - branch. INSV #1, #0, #3, R0 ; Convert to success status. 760$: ; ; If the load failed then return the load failure status. Otherwise, ; attempt to load the next driver in the list. ; BLBC R0, 800$ ; Load error - branch. PUSHL R0 DBG_LOAD_SUCCESSFUL CDRVR_DESC_ADDRESS POPL R0 ; ; See if there is a class driver or associated driver to load ; TSTL IOGEN_CFG_TBL$PS_BOOT_CLASS(R8) ; Is there a class driver? BEQL 800$ ; No so return ; ; Look up the Class driver in the configuration tabel and then ; Load the required class driver. ; MOVL IOGEN_CFG_TBL$PS_BOOT_CLASS(R8),- ; Get the class driver prefix DEV_CODE PUSHL DEV_CODE ; Address to get the two-character devname PUSHAL CLASS_INDEX ; Address to contain the index in the tabel PUSHL R7 ; Addresss of the configuration table CALLS # 3, G^ IOC$LOOKUP_CLASS ; Find the entry for the class driver in the table BLBC R0, 800$ ; The class driver was not found - so branch ; ; Before the driver can be loaded, the entry for the class driver in ; the config table needs to be calculated. Remember, R7 contains ; the base of the config table. ; MULL3 #IOGEN_CFG_TBL$K_ENTRY_SIZE,- ; Get the offset of the desired entry CLASS_INDEX,R8 ; within the table ADDL2 R7,R8 ; Calculate the address of the entry BRW 120$ ; Other wise, load the class driver - branch. 800$: ; ; Return the final driver load status. ; ; R0 = Status. ; RSB ; ; Log the error. ; 900$: JSB G^ EXE$OUTZSTRING ; Output the given message. .DSABL FLAGGING ; AMAC-I Branch into CALL_ENTRY routine from JSB_ENTRY BRW OUTZBUGCHK ; Output the fatal message and die. .ENABL FLAGGING .SBTTL GET_3PB_MEDIA -- Prompts user for the Foreign Device Installation Media ; ; This routine prompts the user to provide the foreign device installation kit ; using the secondary boot device. The routine will wait for a response ; and then parse the response and take the appropriate action. ; ; All control characters execpt CR and DEL will be ingored. If the user's ; response is not valid, he will be reprompted. A maximum of 5 attempts will ; be allowed. If the media is not provided on the 5 try, an inconstate ; bugcheck will be issued. ; ; Inputs: ; ; None ; ; Outputs: ; ; None ; ;-- GET_3PB_MEDIA:: .CALL_ENTRY MAX_ARGS=0,- HOME_ARGS=FALSE JSB CON$OWNCTY ; Guarentee we are in the right mode CLRL R8 ; Use R8 as a counter 10$: CMPB R8,#5 ; Have we exceed our attempts? BEQL 50$ ; Branch if we have!!! JSB EXE$OUTCRLF ; Make it pretty MOVAB REQ_3PB_MEDIA,R1 ; Request the foreign installation media JSB EXE$OUTZSTRING ; ; We will loop obtaining characters to account for any control characters ; that my be in the buffer that we are not interested in. We also ; want clear the buffer out so we will continue reading until a ; carriage return is encountered. ; 20$: JSB CON$GETCHAR ; Get user's response MOVL R0,R2 ; Preserve the char PUSHL R0 CALLS #1,G^CON$PUTCHAR ; Echo it CMPB R2,#^X20 ; Is is a control char? BLEQ 20$ ; If it is try again CMPB R2,#^x59 ; Is it upper case Y? BEQL 40$ ; It is so go clear buffer CMPB R2,#^x79 ; Is it a lower case y? BEQL 40$ 30$: JSB CON$GETCHAR ; If not - echi it, MOVL R0,R2 PUSHL R0 CALLS #1,G^CON$PUTCHAR ; keep going until CMPB R2,#^x0D ; the buffer is clear BNEQ 30$ INCL R8 ; Increment attempt count and BRW 10$ ; try toobtain the media again 40$: JSB CON$GETCHAR ; MOVL R0,R2 PUSHL R0 CALLS #1,G^CON$PUTCHAR ; Echo it CMPB R2,#^X0D ; Carriage Return? BNEQ 40$ JSB EXE$OUTCRLF ; Make it easy to print next message JSB CON$RELEASECTY MOVZWL #SS$_NORMAL,R0 RET 50$: MOVAB MEDIA_NOT_AVAIL,R1 ; Get the message JSB EXE$OUTCRLF ; Make it pretty JSB EXE$OUTZSTRING ; Print message JSB EXE$OUTCRLF ; Make it pretty MOVAB EXC_3PB_TRIES,R1 ; Get the next mesage JSB EXE$OUTCRLF ; Make it pretty JSB EXE$OUTZSTRING ; Print message JSB EXE$OUTCRLF ; Make it pretty HALT ; Don't bugcheck in EXEC_INIT .SBTTL GET_OPENVMS_ALPHA_MEDIA -- Prompts user for the VMS Installation Media ; ; This routine prompts the user to provide the OpenVMS Alpha Installation ; media. This is necessary for the case where the primary and secondary ; boot device are one in the same - ie - both the CD-ROM. The routine will ; wait for a response and then parse the response and take the appropriate ; action. ; ; All control characters execpt CR and DEL will be ingored. If the user's ; response is not valid, he will be reprompted. A maximum of 5 attempts will ; be allowed. If the media is not provided on the 5 try, an inconstate ; bugcheck will be issued. ; ; Inputs: ; ; None ; ; Outputs: ; ; None ; ;-- GET_VMS_MEDIA:: .CALL_ENTRY MAX_ARGS=0,- HOME_ARGS=FALSE JSB G^INI$BRK JSB CON$OWNCTY ; Guarentee we are in the right mode CLRL R8 ; Use R8 as a counter 10$: CMPB R8,#5 ; Have we exceed our attempts? BEQL 50$ ; Branch if we have!!! JSB EXE$OUTCRLF ; Make it pretty MOVAB REQ_VMS_MEDIA,R1 ; Request the VMS installation media JSB EXE$OUTZSTRING ; ; We will loop obtaining characters to account for any control characters ; that my be in the buffer that we are not interested in. We also ; want clear the buffer out so we will continue reading until a ; carriage return is encountered. ; 20$: JSB CON$GETCHAR ; Get user's response MOVL R0,R2 ; Preserve the char PUSHL R0 CALLS #1,G^CON$PUTCHAR ; Echo it CMPB R2,#^X20 ; Is is a control char? BLEQ 20$ ; If it is try again CMPB R2,#^x59 ; Is it upper case Y? BEQL 40$ ; It is so go clear buffer CMPB R2,#^x79 ; Is it a lower case y? BEQL 40$ 30$: JSB CON$GETCHAR ; If not - echi it, MOVL R0,R2 PUSHL R0 CALLS #1,G^CON$PUTCHAR ; keep going until CMPB R2,#^x0D ; the buffer is clear BNEQ 30$ INCL R8 ; Increment attempt count and BRW 10$ ; try toobtain the media again 40$: JSB CON$GETCHAR ; MOVL R0,R2 PUSHL R0 CALLS #1,G^CON$PUTCHAR ; Echo it CMPB R2,#^X0D ; Carriage Return? BNEQ 40$ JSB EXE$OUTCRLF ; Make it easy to print next message JSB CON$RELEASECTY MOVZWL #SS$_NORMAL,R0 RET 50$: MOVAB VMS_MEDIA_NAVAIL,R1 ; Get the message JSB EXE$OUTCRLF ; Make it pretty JSB EXE$OUTZSTRING ; Print message JSB EXE$OUTCRLF ; Make it pretty MOVAB EXC_VMS_TRIES,R1 ; Get the next message JSB EXE$OUTCRLF ; Make it pretty JSB EXE$OUTZSTRING ; Print message JSB EXE$OUTCRLF ; Make it pretty HALT ; Don't bugcheck in EXEC_INIT .SBTTL MOUNT_SAME_DEVICE -- Performs a pseudo 'PACKACK' on the system device ; ; ; This routine is responsible for causing a 'PACKACK' on the system device. ; This is necessary when the primary and secondary boot devices are one ; in the same. This means that the CD or a Disk is being used to perform ; the installaiton. ; ; Inputs: ; ; None ; ; Outputs: ; ; None ; ;-- MOUNT_SAME_DEVICE:: .CALL_ENTRY MAX_ARGS=0,- HOME_ARGS=FALSE ; ; Clear the cache and mount the device so that we can read the config file. ; ; The cache must be cleared to ensure that we have known good context. ; If the cache is not cleared - we could end up with things like ; "wrong volume" errors. ; DBG_MESSAGE CACHE_CLR_3PB ; Prepare the message CALLS #0,F11FR$CACHE_REINIT ; Clear the cache DBG_MESSAGE MOUNTING_MEDIA_3PB ; Prepare the message MOVL G^ EXE$GPQ_SWRPB,R7 ; Get the SWRPB PUSHL SWRPB$PL_IOCHAN_L(R7) ; Pass the channel for the device CALLS #1,F11FR$MOUNT_VOLUME ; Mount the foreign installation media BLBC R0,100$ ; Branch if there was a problem DBG_MESSAGE MEDIA_MOUNTED_3PB ; Prepare the message MOVL #SS$_NORMAL,R0 ; Set the return status RET 100$: MOVAB MOUNT_ERROR_3PB,R1 ; Prepare the message JSB EXE$OUTCRLF ; Make it pretty JSB EXE$OUTZSTRING ; Print message JSB EXE$OUTCRLF ; Make it pretty HALT ; Don't bugcheck in EXEC_INIT .END