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

📄 bootconfig.c

📁 Vxworks下BSP源码
💻 C
📖 第 1 页 / 共 5 页
字号:
#ifndef MUX_MAX_BINDS#define MUX_MAX_BINDS 8#endifvoid*   pCookie;M2_INTERFACETBL endM2Tbl;#endif 	/* INCLUDE_END */#ifndef IP_MAX_UNITS #define IP_MAX_UNITS 1#endifIP_DRV_CTRL ipDrvCtrl [IP_MAX_UNITS];int ipMaxUnits = IP_MAX_UNITS;/* Wind kernel configuration facility */#undef	INCLUDE_SHOW_ROUTINES		/* keep out kernel show routines */#undef	INCLUDE_SM_NET_SHOW#include "usrKernel.c"			/* kernel configuration facility *//* imports */IMPORT char	edata [];		/* defined by the loader */IMPORT char	end [];			/* defined by the loader */#define FREE_MEM_START_ADRS FREE_RAM_ADRS#ifdef  INCLUDE_INITIAL_MEM_ALLOCATION#define MEM_POOL_START_ADRS \	    (ROUND_UP(FREE_MEM_START_ADRS, (INITIAL_MEM_ALIGNMENT)) + \	    (INITIAL_MEM_SIZE))#else   /* INCLUDE_INITIAL_MEM_ALLOCATION */#define MEM_POOL_START_ADRS FREE_MEM_START_ADRS#endif  /* INCLUDE_INITIAL_MEM_ALLOCATION */#ifdef  INCLUDE_TSFS_BOOT		/* boot via Target Server File System */#if ((WDB_COMM_TYPE == WDB_COMM_SERIAL) && \	(CONSOLE_TTY == NONE || CONSOLE_TTY == WDB_TTY_CHANNEL))#define INCLUDE_TSFS_BOOT_VIO_CONSOLE	/* needed for Target Server Console */#endif#define INCLUDE_WDB			/* WDB agent needed for TSFS Boot */#define INCLUDE_WDB_TSFS		/* target-server file system */#undef  INCLUDE_WDB_BANNER		/* print banner after agent starts */#undef 	INCLUDE_WDB_TTY_TEST		/* test serial line communcation */#undef  INCLUDE_WDB_START_NOTIFY	/* notify the host of task creation */#undef  INCLUDE_WDB_USER_EVENT		/* user events handling */#undef  INCLUDE_WDB_CTXT		/* context control */#undef  INCLUDE_WDB_FUNC_CALL		/* spawn function as separate task */#undef  INCLUDE_WDB_GOPHER		/* gopher info gathering */#undef  INCLUDE_WDB_EXIT_NOTIFY		/* notify the host of task exit */#undef  INCLUDE_WDB_REG			/* get/set hardware registers */#undef  INCLUDE_WDB_EVENTPOINTS		/* eventpoints handling */#undef  INCLUDE_WDB_MEM			/* optional memory services */#undef  INCLUDE_WDB_BP			/* breakpoint support */#include "wdb/wdbEvtLib.h"#include "../../src/config/usrWdb.c"    /* WDB agent configuration */#else	/* INCLUDE_TSFS_BOOT not defined */#undef INCLUDE_WDB#endif  /* INCLUDE_TSFS_BOOT */#ifdef  INCLUDE_NETWORK/* forward declarations */LOCAL STATUS usrNetProtoInit (void);IMPORT int	lnEbsaattach ();IMPORT int	oliattach ();IMPORT int	dcattach ();IMPORT int	eglattach ();IMPORT int	eiattach ();IMPORT int	feiattach ();IMPORT int	exattach ();IMPORT int	enpattach ();IMPORT int	ieattach ();IMPORT int	ilacattach ();IMPORT int	lnattach ();IMPORT int	lnsgiattach ();IMPORT int	nicattach ();IMPORT int	nicEvbattach ();IMPORT int	medattach ();IMPORT int      elcattach ();IMPORT int      ultraattach ();IMPORT int      eexattach ();IMPORT int      eltattach ();IMPORT int      eneattach ();IMPORT int      esmcattach ();IMPORT int	quattach ();IMPORT int	loattach ();IMPORT int	snattach ();IMPORT int	fnattach ();IMPORT STATUS	slipInit ();IMPORT int	ifreset ();IMPORT void	if_dettach ();IMPORT u_long	in_netof ();IMPORT struct ifnet *	ifunit ();IMPORT int	pcmciaattach ();#ifdef  NETIF_USR_DECL    NETIF_USR_DECL 		/* additional declarations, from BSP */#endif#ifdef	INCLUDE_IF_USRIMPORT int IF_USR_ATTACH ();#endif	/* INCLUDE_IF_USR */LOCAL NETIF netIf [] =    {#ifdef  NETIF_USR_ENTRIES    NETIF_USR_ENTRIES		/* additional entries, from BSP */#endif#ifdef	INCLUDE_IF_USR        { IF_USR_NAME, IF_USR_ATTACH, IF_USR_ARG1, IF_USR_ARG2, IF_USR_ARG3,          IF_USR_ARG4, IF_USR_ARG5, IF_USR_ARG6, IF_USR_ARG7, IF_USR_ARG8 },#endif	/* INCLUDE_IF_USR */#ifdef  INCLUDE_LNEBSA	{ "lnEbsa", lnEbsaattach, (char*)IO_ADRS_LNEBSA, INT_VEC_LNEBSA,	  INT_LVL_LNEBSA, LNEBSA_POOL_ADRS, LNEBSA_POOL_SIZE,	  LNEBSA_DATA_WIDTH, LNEBSA_MODE, LNEBSA_DMA_CHAN },#endif  /* INCLUDE_LNEBSA */#ifdef  INCLUDE_OLI	{ "oli", oliattach, (char*)IO_ADRS_NISA_BASE,	  IO_ADRS_NISA_PCMCIA, IO_ADRS_NISA_PCMEM,	  INT_VEC_PCMCIA_A, INT_LVL_PCMCIA_A,	  INT_VEC_PCMCIA_B, INT_LVL_PCMCIA_B },#endif#ifdef	INCLUDE_DC	{ "dc", dcattach, (char*)IO_ADRS_DC, INT_VEC_DC, INT_LVL_DC,	  DC_POOL_ADRS, DC_POOL_SIZE, DC_DATA_WIDTH, DC_RAM_PCI_ADRS,	  DC_MODE },#endif	/* INCLUDE_DC */#ifdef	INCLUDE_EGL	{ "egl", eglattach, (char*)IO_ADRS_EGL, INT_VEC_EGL, INT_LVL_EGL },#endif	/* INCLUDE_EGL */#ifdef	INCLUDE_EI        { "ei", eiattach, (char*)INT_VEC_EI, EI_SYSBUS, EI_POOL_ADRS, 0, 0},#endif	/* INCLUDE_EI */#ifdef	INCLUDE_FEI        { "fei", feiattach, (char*)FEI_POOL_ADRS, 0, 0, 0, 0},#endif	/* INCLUDE_FEI */#ifdef  INCLUDE_EX        { "ex", exattach, (char*)IO_ADRS_EX, INT_VEC_EX, INT_LVL_EX,	  IO_AM_EX_MASTER, IO_AM_EX },#endif	/* INCLUDE_EX */#ifdef  INCLUDE_ENP        { "enp", enpattach, (char*)IO_ADRS_ENP, INT_VEC_ENP, INT_LVL_ENP,	  IO_AM_ENP },#endif	/* INCLUDE_ENP */#ifdef  INCLUDE_IE        { "ie", ieattach, (char*)IO_ADRS_IE, INT_VEC_IE, INT_LVL_IE },#endif	/* INCLUDE_IE */#ifdef	INCLUDE_ILAC	{ "ilac", ilacattach, (char*)IO_ADRS_ILAC, INT_VEC_ILAC},#endif	/* INCLUDE_ILAC */#ifdef  INCLUDE_LN        { "ln", lnattach, (char*)IO_ADRS_LN, INT_VEC_LN, INT_LVL_LN,          LN_POOL_ADRS, LN_POOL_SIZE, LN_DATA_WIDTH, LN_PADDING,	  LN_RING_BUF_SIZE },#endif	/* INCLUDE_LN */#ifdef  INCLUDE_LNSGI        { "lnsgi", lnsgiattach, (char*)IO_ADRS_LNSGI, INT_VEC_LNSGI,          INT_LVL_LNSGI, LNSGI_POOL_ADRS, LNSGI_POOL_SIZE, LNSGI_DATA_WIDTH,          LNSGI_PADDING, LNSGI_RING_BUF_SIZE },#endif  /* INCLUDE_LNSGI */#ifdef  INCLUDE_NIC        { "nic", nicattach, (char*)IO_ADRS_NIC, INT_VEC_NIC, INT_LVL_NIC },#endif	/* INCLUDE_NIC */#ifdef  INCLUDE_NIC_EVB        { "nicEvb", nicEvbattach, (char*)IO_ADRS_NIC,INT_VEC_NIC,INT_LVL_NIC },#endif	/* INCLUDE_NIC_EVB */#ifdef  INCLUDE_MED        { "med", medattach, (char*)IO_ADRS_DBETH, INT_VEC_DBETH, INT_LVL_DBETH},#endif	/* INCLUDE_MED */#ifdef  INCLUDE_ELC	{ "elc", elcattach, (char*)IO_ADRS_ELC, INT_VEC_ELC, INT_LVL_ELC,	  MEM_ADRS_ELC, MEM_SIZE_ELC, CONFIG_ELC},#endif  /* INCLUDE_ELC */#ifdef  INCLUDE_ULTRA	{ "ultra", ultraattach, (char*)IO_ADRS_ULTRA, INT_VEC_ULTRA,	  INT_LVL_ULTRA, MEM_ADRS_ULTRA, MEM_SIZE_ULTRA, CONFIG_ULTRA},#endif  /* INCLUDE_ULTRA */#ifdef  INCLUDE_EEX	{ "eex", eexattach, (char*)IO_ADRS_EEX, INT_VEC_EEX, INT_LVL_EEX,	  NTFDS_EEX, CONFIG_EEX},#endif  /* INCLUDE_EEX */#ifdef  INCLUDE_ELT	{ "elt", eltattach, (char*)IO_ADRS_ELT, INT_VEC_ELT, INT_LVL_ELT,	  NRF_ELT, CONFIG_ELT},#endif  /* INCLUDE_ELT */#ifdef  INCLUDE_ENE	{ "ene", eneattach, (char*)IO_ADRS_ENE, INT_VEC_ENE, INT_LVL_ENE},#endif  /* INCLUDE_ELT */#ifdef  INCLUDE_ESMC	{ "esmc", esmcattach, (char*)IO_ADRS_ESMC, INT_VEC_ESMC, INT_LVL_ESMC,	  CONFIG_ESMC, RX_MODE_ESMC},#endif  /* INCLUDE_ESMC */#ifdef  INCLUDE_QU	{ "qu", quattach, (char*)IO_ADRS_QU_EN, INT_VEC_QU_EN, QU_EN_SCC,          QU_EN_TX_BD, QU_EN_RX_BD, QU_EN_TX_OFF, QU_EN_RX_OFF, QU_EN_MEM},#endif  /* INCLUDE_QU */#ifdef  INCLUDE_SN        { "sn", snattach, (char*)IO_ADRS_SN, INT_VEC_SN },#endif	/* INCLUDE_SN */#ifdef  INCLUDE_FN        { "fn", fnattach },#endif  /* INCLUDE_FN */#ifdef  INCLUDE_SM_NET        { "sm", smNetAttach2, 0, 0, 0, 0, 0, 0, 0, 0 },#endif  /* INCLUDE_SM_NET */#ifdef	INCLUDE_PCMCIA	{ "pcmcia", pcmciaattach, 0, 0, 0, 0, 0, 0 },#endif	/* INCLUDE_PCMCIA */#ifdef  INCLUDE_PPP	{"ppp", 0, 0, 0, 0, 0},#endif  /* INCLUDE_PPP */#ifdef  INCLUDE_SLIP	{ "sl", 0, 0, 0, 0, 0 },#endif	/* INCLUDE_SLIP */	{ "lo", loattach, 0, 0, 0, 0 },        { 0, 0, 0, 0, 0, 0 },    };#endif  /* INCLUDE_NETWORK *//* global variables */SYMTAB_ID	sysSymTbl;int		consoleFd;		/* fd of initial console device */char		consoleName [20];	/* console device name, eg. "/tyCo/0" */int		sysStartType;		/* BOOT_CLEAR, BOOT_NO_AUTOBOOT, ... */BOOL		scsiInitialized      = FALSE;int		bootCmdTaskPriority  = 1;int		bootCmdTaskOptions   = VX_SUPERVISOR_MODE;int		bootCmdTaskStackSize = BOOT_CMD_STACK_SIZE;/* Two magic cookies used to detect data section misalignment */#define TRAP_VALUE_1	0x12348765#define TRAP_VALUE_2	0x5a5ac3c3LOCAL volatile UINT32	trapValue1	= TRAP_VALUE_1;LOCAL volatile UINT32	trapValue2	= TRAP_VALUE_2;#ifdef  INCLUDE_NETWORK/* network protocol configuration parameters */#ifdef INCLUDE_TCPTCP_CFG_PARAMS tcpCfgParams =   /* tcp configuration parameters */    {    TCP_FLAGS_DFLT,             /* include rfc1323 support */    TCP_SND_SIZE_DFLT,          /* default send buffer size */    TCP_RCV_SIZE_DFLT,          /* default recv buffer size */    TCP_CON_TIMEO_DFLT,         /* initial connection time out */    TCP_REXMT_THLD_DFLT,        /* retransmit threshold */    TCP_MSS_DFLT,               /* default maximum segment size */    TCP_RND_TRIP_DFLT,          /* default round trip time */    TCP_IDLE_TIMEO_DFLT,        /* idle timeouts before first probe */    TCP_MAX_PROBE_DFLT          /* max no. probes before dropping */    };#endif /* INCLUDE_TCP */#ifdef INCLUDE_UDPUDP_CFG_PARAMS udpCfgParams =   /* udp configuration parameters */    {    UDP_FLAGS_DFLT,    UDP_SND_SIZE_DFLT,          /* send buffer size */    UDP_RCV_SIZE_DFLT           /* recv buffer size */    };#endif /* INCLUDE_UDP */#ifdef INCLUDE_ICMPICMP_CFG_PARAMS icmpCfgParams = /* icmp configuration parameters */    {    ICMP_FLAGS_DFLT             /* no icmp mask replies by default */    };#endif  /* INCLUDE_ICMP */IP_CFG_PARAMS ipCfgParams =     /* ip configuration parameters */    {    IP_FLAGS_DFLT,              /* default ip flags */    IP_TTL_DFLT,                /* ip default time to live */    IP_QLEN_DFLT,               /* default ip intr queue len */    IP_FRAG_TTL_DFLT            /* default ip fragment time to live */    };/* network buffers configuration *//* * mBlk, clBlk configuration table for network stack data pool. * Only used for data transfer in the network stack. */M_CL_CONFIG mClBlkConfig =    {    /*     no. mBlks		no. clBlks		memArea		memSize    -----------		----------		-------		-------    */    NUM_NET_MBLKS_MIN, 	NUM_CL_BLKS_MIN,	NULL, 		0    };/* * network stack data cluster pool configuration table * Only used for data transfer in the network stack. */CL_DESC clDescTbl [] =    {    /*    clusterSize     num             	memArea         memSize    -----------     ----            	-------         -------    */    {64,            NUM_64_MIN,		NULL,           0},    {128,           NUM_128_MIN,        NULL,           0},    {256,           NUM_256_MIN,        NULL,           0},    {512,           NUM_512_MIN,        NULL,           0},    {1024,          NUM_1024_MIN,       NULL,           0},    };int clDescTblNumEnt = (NELEMENTS(clDescTbl));/* * mBlk, clBlk configuration table for network stack system pool. * Used for network stack system structures such as routes, sockets, * protocol control blocks, interface addresses, mulitcast addresses, * and multicast routing entries. */M_CL_CONFIG sysMclBlkConfig =     {    /*     no. mBlks		no. clBlks		memArea		memSize    -----------		----------		-------		-------    */    NUM_SYS_MBLKS_MIN, 	NUM_SYS_CL_BLKS_MIN,	NULL, 		0    };/* * network stack system cluster pool configuration table * Used for network stack system structures such as routes, sockets, * protocol control blocks, interface addresses, mulitcast addresses, * and multicast routing entries. */CL_DESC sysClDescTbl [] = 		    {    /*     clusterSize		num			memArea		memSize    -----------		----			-------		-------    */    {64,		NUM_SYS_64_MIN,		NULL,		0},    {128,		NUM_SYS_128_MIN,	NULL,		0},    {256,		NUM_SYS_256_MIN,	NULL,		0},    {512,		NUM_SYS_512_MIN,	NULL,		0},    }; int sysClDescTblNumEnt = (NELEMENTS(sysClDescTbl));#ifdef  INCLUDE_PPP#ifndef PPP_OPTIONS_FLAGS#define PPP_OPTIONS_FLAGS ((PPP_OPT_NO_ALL << PPP_S_NO_ALL)  | \    (PPP_OPT_PASSIVE_MODE << PPP_S_PASSIVE_MODE)             | \    (PPP_OPT_SILENT_MODE << PPP_S_SILENT_MODE)               | \    (PPP_OPT_DEFAULTROUTE << PPP_S_DEFAULTROUTE)             | \    (PPP_OPT_PROXYARP << PPP_S_PROXYARP)                     | \    (PPP_OPT_IPCP_ACCEPT_LOCAL << PPP_S_IPCP_ACCEPT_LOCAL)   | \    (PPP_OPT_IPCP_ACCEPT_REMOTE << PPP_S_IPCP_ACCEPT_REMOTE) | \    (PPP_OPT_NO_IP << PPP_S_NO_IP)                           | \    (PPP_OPT_NO_ACC << PPP_S_NO_ACC)                         | \    (PPP_OPT_NO_PC << PPP_S_NO_PC)                           | \    (PPP_OPT_NO_VJ << PPP_S_NO_VJ)                           | \    (PPP_OPT_NO_VJCCOMP << PPP_S_NO_VJCCOMP)                 | \    (PPP_OPT_NO_ASYNCMAP << PPP_S_NO_ASYNCMAP)               | \    (PPP_OPT_NO_MN << PPP_S_NO_MN)                           | \    (PPP_OPT_NO_MRU << PPP_S_NO_MRU)                         | \    (PPP_OPT_NO_PAP << PPP_S_NO_PAP)                         | \    (PPP_OPT_NO_CHAP << PPP_S_NO_CHAP)                       | \    (PPP_OPT_REQUIRE_PAP << PPP_S_REQUIRE_PAP)               | \    (PPP_OPT_REQUIRE_CHAP << PPP_S_REQUIRE_CHAP)             | \    (PPP_OPT_LOGIN << PPP_S_LOGIN)                           | \    (PPP_OPT_DEBUG << PPP_S_DEBUG)                           | \    (PPP_OPT_DRIVER_DEBUG << PPP_S_DRIVER_DEBUG))#endif  /* PPP_OPTIONS_FLAGS */ PPP_OPTIONS pppOptions =    {    PPP_OPTIONS_FLAGS,		/* flags field */    PPP_STR_ASYNCMAP,		/* Set the desired async map */    PPP_STR_ESCAPE_CHARS,	/* Set chars to escape on transmission */    PPP_STR_VJ_MAX_SLOTS,	/* Set maximum VJ compression header slots */    PPP_STR_NETMASK,		/* Set netmask value for negotiation */    PPP_STR_MRU,		/* Set MRU value for negotiation */    PPP_STR_MTU,		/* Set MTU value for negotiation */    PPP_STR_LCP_ECHO_FAILURE,	/* Set max # consecutive LCP echo failures */    PPP_STR_LCP_ECHO_INTERVAL,	/* Set time for LCP echo requests */    PPP_STR_LCP_RESTART,	/* Set timeout for LCP */    PPP_STR_LCP_MAX_TERMINATE,	/* Set max # xmits for LCP term-reqs */    PPP_STR_LCP_MAX_CONFIGURE,	/* Set max # xmits for LCP conf-reqs */    PPP_STR_LCP_MAX_FAILURE,	/* Set max # conf-naks for LCP */    PPP_STR_IPCP_RESTART,	/* Set timeout for IPCP */    PPP_STR_IPCP_MAX_TERMINATE,	/* Set max # xmits for IPCP term-reqs */    PPP_STR_IPCP_MAX_CONFIGURE,	/* Set max # xmits for IPCP conf-reqs */    PPP_STR_IPCP_MAX_FAILURE,	/* Set max # conf-naks for IPCP */    PPP_STR_LOCAL_AUTH_NAME,	/* Set local name for authentication */    PPP_STR_REMOTE_AUTH_NAME,	/* Set remote name for authentication */    PPP_STR_PAP_FILE,		/* Set the PAP secrets file */

⌨️ 快捷键说明

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