⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ci_init.c

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻 C
📖 第 1 页 / 共 5 页
字号:
#ifndef	lintstatic char *sccsid = "@(#)ci_init.c	4.4	(ULTRIX)	12/20/90";#endif	lint/************************************************************************ *                                                                      * *                      Copyright (c) 1988 - 1989 by                    * *              Digital Equipment Corporation, Maynard, MA              * *                      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.     * *                                                                      * ************************************************************************ * * *   Facility:	Systems Communication Architecture *		Computer Interconnect Port Driver * *   Abstract:	This module contains Computer Interconnect Port Driver( CI ) *		initialization routines and functions. * *   Creator:	Todd M. Katz	Creation Date:	February 3, 1986 * *   Function/Routines: * *   ci_init_port		Initialize a Local CI Port *   ci_probe			Probe a Local CI Port *   ci_setup_port		Prepare Local CI Port for Initialization *   ci_test_port		Test Operational Status of Local CI Port *   ci7b_load			Load CI7B Family Functional Microcode *   ci7b_start			Start a Local CI7B Family Port *   cibca_aa_load		Load CIBCA-AA Functional Microcode *   cibx_start			Start a Local CIBX Family Port *   cishc_start		Start a Local CISHC Family Port * *   Modification History: * *   19-Dec-1990	Pete Keilty *	1. Disable transaction timeouts for VAX_9000 systems *	   because on cpu errors the scan logic code can delay *	   XMI transactions. *	2. Changed pccb->Burst = cippd_max_port, poll all the nodes first *	   on start of ci polling. This allows us to find all systems *	   as soon as possible. After the first pass Burst is set to *	   ci_cippdburst. * *   16-Oct-1990	Pete Keilty *	Changed the smp_lock cidevice locking to use the new macros *	define in ciscs.h. Also added DELAY( 1000 ) around register *	writes because of the CIXCD XMOV bug, this for the 9000/6000 *	systems. * *   16-Jul-1990	Pete Keilty * 	Add smp_lock lk_cidevice in the cibx_start routine for CIXCD, *	software workaround for XMOV hardware bug of back to back register *	accesses the first one a read the second a write to a software *	register. * *   06-Jun-1990	Pete Keilty *	1. Cleanup CIXCD code. *	2. Kmalloc CIADAP structure now and passed into ci_probe(). *	   Added new structure CIISR define in ciadapter.h. *	3. Add preliminary support for CIKMF and SHAC. * *   08-Dec-1989	Pete Keilty *	1. TEMP -  do not check or set rev level for XCD. *	2. Use new macros Cibx_wait_unin() & Cibx_wait_pic_clear() in  *	   cibx_start() needed for CIXCD support. *	3. Set pidr & pvr in cibx_start() routine. * *   09-Nov-1989	David E. Eiche		DEE0080 *	1. Rename all references to interconnects from IC_xxx to *	   ICT_xxx to match the new definitions in sysap.h. *	2. Add code to fill in the new software port type and *	   interconnect type fields in the LPIB. * *   19-Sep-1989	Pete Keilty *	1. Add XCD support, remove XCB. *	2. Add support for Explicit command addressing. CI/CIPORT ECO. * *   25-May-1989	Pete Keilty *	Add new macro WBFLUSH for mips cpu's. * *   24-May-89		darrell *	Changed the #include for cpuconf.h to find it in it's new home -- *	sys/machine/common/cpuconf.h * *   20-May-1989	Pete Keilty *	Added support for mips risc cpu's  *	Add include file ../io/scs/scamachmac.h, this file has machine *	depend items. * *   06-Apr-1989	Pete Keilty *	Added include file smp_lock.h adn external lock_t struct *	lk_scadb * *   17-Jan-1989	Todd M. Katz		TMK0006 *	1. The macro Scaaddr_lol() has been renamed to Scaaddr_low().  It now *	   accesses only the low order word( instead of low order longword ) of *	   a SCA system address. *	2. Modify ci_probe() to longer initialize the formative path PB queue *	   listhead.  It is now initialized by the CI PPD. *	3. Include header file ../vaxmsi/msisysap.h. *	4. Use the ../machine link to refer to machine specific header files. * *   22-Aug-1988	Todd M. Katz		TMK0005 *	1. Modify ci_probe() to switch the local CI port interrupt service *	   routine to ci_unmapped_isr() whenever it aborts local port probing *	   due to a fatal error.  All subsequent interrupts on the inoperative *	   local port are discarded. *	2. Modify ci_init_port() to mark the local port broken whenever its *	   initialization is permanently aborted due to exhaustion of all *	   consecutive port initialization attempts. * *   19-Aug-1988	Todd M. Katz		TMK0004 *	 1. Cast all control blocks to ( char * ) before deallocating. *	 2. Initialize the new PCCB cell( pd.gvp.rrspq_remerr ) containing the *	    event code( SE_RRSPQ ) passed to ci_crash_lport() on failure to *	    obtain a local CI port response queue interlock. *	 3. The following Informational Events( ES_I ) have been defined as *	    Warning Events( ES_WE ): UCODE_WARN. *	 4. The following Informational Events( ES_I ) have been defined as *	    Error Events( ES_E ): UCODE_LOAD, UCODE_START. *	 5. The following Informational Events( ES_I ) have been defined as *	    Fatal Error Events( ES_FE ): INIT_NOMEM, INIT_ZEROID, INIT_MISMTCH, *	    INIT_NOUCODE, INIT_UNKHPT, NOCI, INIT_CPU. *	 6. The following CI local port crash codes are now defined as Severe *	    Error Events( ES_SE ): ICMDQ0, ICMDQ1, ICMDQ2, ICMDQ3, IDFREEQ, *	    IMFREEQ, RDFREEQ, RMFREEQ, RRSPQ; and Fatal Error Events( ES_FE ): *	    BADMAXPORT, BADUCODE.  The local port crash severity modifier( *	    ESM_LPC ) is applied by ci_crash_lport() but only when the crashed *	    local port is not in the process of being cleaned up from a *	    previous crash. *	 7. Modify ci_setup_port() to log an error( NOMEM ) instead of a fatal *	    error( INIT_NOMEM ) event whenever the functions fails to fully *	    allocate an initial number of free datagrams and messages. *	 8. Modify ci7b_load() and cibca_aa_load() to log a fatal error( *	    FE_UCODE_LOAD ) instead of an error( E_UCODE_LOAD ) event when the *	    current attempt to load functional microcode fails and the number *	    of consecutive re-initialization attempts left has been exhausted. *	 9. Modify ci7b_start() and cibx_start() to log a fatal error( *	    FE_UCODE_START ) instead of an error( E_UCODE_START ) event when *	    the current attempt to start the local CI port fails and the number *	    of consecutive re-initialization attempts left has been exhausted. *	10. Modify ci_setup_lport() to log additional information on CPU *	    microcode verification failures. *	11. Refer to error logging as event logging. *	12. Change the format of the permanent shutdown/offline messages. *	13. Rename FE_INIT_CPU -> FE_CPU. *	14. Modify ci_probe() to initialize the following CI PPD specific PCCB *	    fields using CI configuration variables ci_cippdburst and *	    ci_cippdcontact: burst( port polling burst size ), contact( port *	    polling contact frequency ).  Modify ci_init_port() to reset the *	    values of these fields following each successful re-initialization *	    of a local CI port. *	15. Modify ci_init_port() to event log ALL local CI port *	    initializations.  Also, change this routine so that all local port *	    permanent shutdown notifications are printed only on the console, *	    they are no longer also event logged. * *   03-Jun-1988	Todd M. Katz		TMK0003 *	 1. Create a single unified hierarchical set of naming conventions for *	    use within the CI port driver and describe them within ciport.h. *	    Apply these conventions to all names( routine, macro, constant, and *	    data structure ) used within the driver.  Restructure the driver to *	    segregate most CI family and port type specific code into separate *	    routines.  Such restructuring requires: *		1) Renaming ci_load_ucode() -> ci7b_load(), ci_start_port() -> *		   ci7b_start(), cibca_load() -> cibca_aa_load(), and *		   cibca_start() -> cibx_start(). *		2) Initializing the new PCCB fields dg_cache, msg_cache, *		   start_port, disable_port, load_ucode, max_fn_level, mrltab, *		   and max_rom_level within ci_probe() according to the CI *		   family and hardware port type. *		3) Modifying ci_setup_port() to utilize dg_cache and msg_cache *		   when allocating free datagrams and messages to fill internal *		   local port free queue caches. *		4) Modifying ci_init_port() to utilize max_fn_level, *		   max_rom_level, and mrltab when verifying port microcode *		   revision levels. *		5) Modifying ci_init_port() to indirectly invoke appropriate CI *		   family/port specific functions for loading of functional *		   microcode and starting of local ports through the PCCB *		   instead of through a local variable as was previously done. *		6) Modifying ci_probe(), ci7b_load(), ci7b_start(), *		   cibca_aa_load(), and cibx_start() to indirectly invoke *		   appropriate CI family specific local CI port disablement *		   routines instead of directly invoking ci_disable_port() as *		   was previously done. *	 2. Add support for the CIXCB hardware port type by: *		1) Modifying ci_check_port() to check for the presence of *		   operational XMI based CI local ports. *		2) Modifying ci_init_port() to print out an appropriate local *		   port start up console message for this hardware port type. *		3) Modifying cibx_start() to retrieve functional and self-test *		   microcode revision levels for this hardware port type. *		4) Modifying ci_probe() to initialize the PCCBs of XMI based CI *		   ports and more specifically, CIXCB PCCBs. *		5) Adding include file ../vaxxmi/xmireg.h. *	 3. Modify the circumstances under which local ports are unmapped. *	    Unmapping is now done only when the local port adapter itself loses *	    power( CI750/CI780/CIBCI only ) or the port is marked broken and is *	    permanently shutdown.  Formerly, unmapping was done whenever a *	    local port was crashed, but before its re-initialization commenced; *	    and just immediately prior to its initial initialization.  This *	    change requires: *		1) Rename ci_check_port() -> ci_test_port(). *		2) Appropriate modifications to the comments of routines *		   ci_init_port(), ci_setup_port(), ci_test_port(), *		   ci7b_load(), ci7b_start(), cibca_aa_load(), and *		   cibx_start(). *		3) Validating the hardware port type within ci_test_port(). *		4) Marking the local port broken within ci_init_port() and *		   explicitly unmapping it to permanently shut it down when *		   retries are exhausted. *		5) Unmapping the local port within ci_setup_port() when it is *		   marked broken and is to be permanently shutdown. *	 4. Add use of macros Cibx_onboard(), Ci7b_allram(), Ci7b_wait_mif(), *	    and Cibx_wait_mif(). *	 5. Add hardware port type as an argument to ci_probe() and remove code *	    for determining it from the routine. *	 6. Modify all calls to ci_log_initerr() to reflect all changes to the *	    routine interface. *	 7. Move the 11/750 microcode revision level verification check from *	    ci_probe() to ci_setup_port().  This check is now executed each and *	    every time a local CI750 port is initialized instead of just once *	    when the port is originally probed. *	 8. Modify ci_setup_port() to flush all local port free queues prior *	    to returning a failure status.  Also, modify this routine to *	    deallocate all buffers it is unable to insert into appropriate *	    local port free queues because it finds the queues to be locked. *	 9. Resolve all problems associated with the retrieval of CI7B family *	    microcode revision levels.  Previously, this retrieval was not *	    being correctly done. *	10. Always verify both functional/ram and self-test/prom microcode *	    revision levels, regardless of the hardware port type.  Previously, *	    only functional/ram revision levels were being verified for CIBX *	    family ports. *	11. Eliminate the initialization of the BIIC error interrupt control *	    register within ci_probe().  The CI port driver never needs to make *	    use of this register because it never requests to be notified of *	    soft errors; therefore, there is no longer a need to initialize it. *	12. Streamline PCCB interconnect and hardware port type specific *	    initialization by ci_probe(). *	13. Add include file ../vax/nexus.h. *	14. Eliminate the unnecessary use of the macro Get_reg() by ci7b_load() *	    and cibca_aa_load().  The accessibility of local CI port registers *	    has already been verified by the time these functions attempt to *	    load CI functional microcode. *	15. CI device attention event packets used to reserve space for fields *	    initialized only in the case of certain events.  This has changed. *	    All CI event packets are now tailered exactly to the event being *	    logged.  Therefore, there is no longer any need to initialize the *	    PCCB optional device attention information structure using the *	    macro Init_dattnopt()) since this structure is no longer blindly *	    copied into each and every device attention event log packet. *	    ci_setup_port(), ci7b_load(), ci7b_start(), cibca_aa_load(), and *	    cibx_start() have been changed appropriately. * *   02-Jun-1988	Ricky S. Palmer *	Removed inclusion of header file ../vaxmsi/msisysap.h * *   09-Apr-1988	Todd M. Katz		TMK0002 *	1. Add support for the CIBCA-BA hardware port type and for onboard *	   CIBCA-BA port microcode.  Differentiate CIBCA-BA from CIBCA-AA *	   hardware ports when necessary; otherwise, refer to both types as *	   just CIBCA ports. *	2. Currently, the maximum( future ) supportable port station address is *	   223( CI_CSZ_224 - 1 ).  This is incorrect.  The correct maximum( *	   future ) supportable port station is actually 127( CI_CSZ_128 - 1 ). *	   Make the appropriate changes so as to treat 223 as an invalid port *	   station address. *	3. Compartmentalize the portion of ci_probe() which has more to do with *	   CI port driver initialization than probing of a specific CI port. *	   Execute this portion of ci_probe() only when the routine is invoked *	   for the very first time. *	4. Add use of Ctrl_from_num(), Pccb_fork(), and Pccb_fork_done() macros *	   in place of straight-line code. *	5. Move the portions of ci_start_port() and cibca_start() responsible *	   for loading port microcode into the new functions ci_load_ucode() *	   and cibca_load() respectively. * *   08-Jan-1988	Todd M. Katz		TMK0001 *	Formated module, revised comments, increased generality and *	robustness, made CI PPD and GVP completely independent from underlying *	port drivers, restructured code paths, and added SMP support. *//* Libraries and Include Files. */#include		"../h/types.h"#include		"../h/dyntypes.h"#include		"../h/param.h"#include		"../h/systm.h"#include		"../h/time.h"#include		"../h/kmalloc.h"#include		"../h/vmmac.h"#include		"../h/ksched.h"#include		"../h/errlog.h"#include		"../h/smp_lock.h"#include		"../machine/pte.h"#include		"../../machine/common/cpuconf.h"#include		"../machine/cpu.h"#ifdef vax#include		"../machine/mtpr.h"#endif vax#include		"../machine/nexus.h"#include		"../io/xmi/xmireg.h"#include		"../io/scs/sca.h"#include		"../io/scs/scaparam.h"#include		"../io/scs/scamachmac.h"#include		"../io/ci/cippdsysap.h"#include		"../io/ci/cisysap.h"#include		"../io/msi/msisysap.h"#include		"../io/bi/bvpsysap.h"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -