📄 usrconfig.c
字号:
sprintf (tyName, "%s%d", "/tyCo/", ix); (void) tyCoDevCreate (tyName, ix, 512, 512); if (ix == CONSOLE_TTY) strcpy (consoleName, tyName); /* store console name */ } consoleFd = open (consoleName, O_RDWR, 0); /* set baud rate */ (void) ioctl (consoleFd, FIOBAUDRATE, CONSOLE_BAUD_RATE); (void) ioctl (consoleFd, FIOSETOPTIONS, OPT_TERMINAL); }#endif /* INCLUDE_TTY_DEV */#else /* !INCLUDE_TYCODRV_5_2 */#ifdef INCLUDE_TTY_DEV if (NUM_TTY > 0) { ttyDrv(); /* install console driver */ for (ix = 0; ix < NUM_TTY; ix++) /* create serial devices */ {#if (defined(INCLUDE_WDB) && (WDB_COMM_TYPE == WDB_COMM_SERIAL)) if (ix == WDB_TTY_CHANNEL) /* don't use WDBs channel */ continue;#endif sprintf (tyName, "%s%d", "/tyCo/", ix); (void) ttyDevCreate (tyName, sysSerialChanGet(ix), 512, 512); if (ix == CONSOLE_TTY) /* init the tty console */ { strcpy (consoleName, tyName); consoleFd = open (consoleName, O_RDWR, 0); (void) ioctl (consoleFd, FIOBAUDRATE, CONSOLE_BAUD_RATE); (void) ioctl (consoleFd, FIOSETOPTIONS, OPT_TERMINAL); } } }#endif /* INCLUDE_TTY_DEV */#ifdef INCLUDE_PC_CONSOLE pcConDrv (); for (ix = 0; ix < N_VIRTUAL_CONSOLES; ix++) { sprintf (tyName, "%s%d", "/pcConsole/", ix); (void) pcConDevCreate (tyName,ix, 512, 512); if (ix == PC_CONSOLE) /* init the console device */ { strcpy (consoleName, tyName); consoleFd = open (consoleName, O_RDWR, 0); (void) ioctl (consoleFd, FIOBAUDRATE, CONSOLE_BAUD_RATE); (void) ioctl (consoleFd, FIOSETOPTIONS, OPT_TERMINAL); } }#endif /* INCLUDE_PC_CONSOLE */#endif /* !INCLUDE_TYCODRV_5_2 */#endif ioGlobalStdSet (STD_IN, consoleFd); ioGlobalStdSet (STD_OUT, consoleFd); ioGlobalStdSet (STD_ERR, consoleFd);#endif /* INCLUDE_IO_SYSTEM */ /* initialize symbol table facilities */#ifdef INCLUDE_SYM_TBL hashLibInit (); /* initialize hash table package */ symLibInit (); /* initialize symbol table package */#ifdef INCLUDE_SHOW_ROUTINES symShowInit (); /* initialize symbol table show */#endif /* INCLUDE_SHOW_ROUTINES */#endif /* INCLUDE_SYM_TBL */ /* initialize exception handling */#if defined(INCLUDE_EXC_HANDLING) && defined(INCLUDE_EXC_TASK) excInit (); /* initialize exception handling */#endif /* defined(INCLUDE_EXC_HANDLING) && defined(INCLUDE_EXC_TASK) */#ifdef INCLUDE_LOGGING logInit (consoleFd, MAX_LOG_MSGS); /* initialize logging */#endif /* INCLUDE_LOGGING */#ifdef INCLUDE_SIGNALS sigInit (); /* initialize signals */#endif /* INCLUDE_SIGNALS */ /* initialize debugging */#ifdef INCLUDE_DEBUG dbgInit (); /* initialize debugging */#endif /* INCLUDE_DEBUG */ /* initialize pipe driver */#ifdef INCLUDE_PIPES pipeDrv (); /* install pipe driver */#endif /* INCLUDE_PIPES */ /* initialize standard I/O package */#ifdef INCLUDE_STDIO stdioInit (); /* initialize standard I/O library */#ifdef INCLUDE_SHOW_ROUTINES stdioShowInit ();#endif /* INCLUDE_SHOW_ROUTINES */#endif /* INCLUDE_STDIO */ /* initialize POSIX queued signals */#if defined(INCLUDE_POSIX_SIGNALS) && defined(INCLUDE_SIGNALS) sigqueueInit (NUM_SIGNAL_QUEUES); /* initialize queued signals */#endif /* initialize POSIX semaphores */#ifdef INCLUDE_POSIX_SEM semPxLibInit (); #ifdef INCLUDE_SHOW_ROUTINES semPxShowInit ();#endif /* INCLUDE_SHOW_POUTINES */#endif /* INCLUDE_POSIX_SEM */ /* initialize POSIX message queues */#ifdef INCLUDE_POSIX_MQ mqPxLibInit (MQ_HASH_SIZE); #ifdef INCLUDE_SHOW_ROUTINES mqPxShowInit ();#endif /* INCLUDE_SHOW_ROUTINES */#endif /* INCLUDE_POSIX_MQ */ /* initialize POSIX async I/O support */#ifdef INCLUDE_POSIX_AIO aioPxLibInit (MAX_LIO_CALLS);#ifdef INCLUDE_POSIX_AIO_SYSDRV aioSysInit (MAX_AIO_SYS_TASKS, AIO_TASK_PRIORITY, AIO_TASK_STACK_SIZE);#endif /* INCLUDE_POSIX_AIO_SYSDRV */#endif /* INCLUDE_POSIX_AIO */ /* initialize filesystems and disk drivers */#ifdef INCLUDE_DOSFS hashLibInit (); /* initialize hash table package */ dosFsInit (NUM_DOSFS_FILES); /* init dosFs filesystem */#endif /* INCLUDE_DOSFS */#ifdef INCLUDE_RAWFS rawFsInit (NUM_RAWFS_FILES); /* init rawFs filesystem */#endif /* INCLUDE_RAWFS */#ifdef INCLUDE_RT11FS rt11FsInit (NUM_RT11FS_FILES); /* init rt11Fs filesystem */#endif /* INCLUDE_RT11FS */#ifdef INCLUDE_RAMDRV ramDrv (); /* initialize ram disk driver */#endif /* INCLUDE_RAMDRV */#ifdef INCLUDE_SCSI /* * initialize either the SCSI1 or SCSI2 interface; initialize SCSI2 when * the SCSI2 interface is available. */#ifndef INCLUDE_SCSI2 scsi1IfInit ();#else scsi2IfInit ();#endif /* initialize SCSI controller */ if (sysScsiInit () == OK) { usrScsiConfig (); /* configure SCSI peripherals */ } else { printf ("sysScsiInit() Failed, SCSI system not initialized\n"); }#endif /* INCLUDE_SCSI */#ifdef INCLUDE_FD fdDrv (FD_INT_VEC, FD_INT_LVL); /* initialize floppy disk driver */#endif /* INCLUDE_FD */#ifdef INCLUDE_IDE ideDrv (IDE_INT_VEC, IDE_INT_LVL, IDE_CONFIG); /* init IDE disk driver */#endif /* INCLUDE_IDE */#ifdef INCLUDE_ATA { /* initialize hard disk driver */ IMPORT ATA_RESOURCE ataResources[]; ATA_RESOURCE *pAtaResource; for (ix = 0; ix < ATA_MAX_CTRLS; ix++) { pAtaResource = &ataResources[ix]; if (pAtaResource->ctrlType == IDE_LOCAL) ataDrv (ix, pAtaResource->drives, pAtaResource->intVector, pAtaResource->intLevel, pAtaResource->configType, pAtaResource->semTimeout, pAtaResource->wdgTimeout); } }#ifdef INCLUDE_SHOW_ROUTINES ataShowInit (); /* install ATA/IDE show routine */#endif /* INCLUDE_SHOW_ROUTINES */#endif /* INCLUDE_ATA */#ifdef INCLUDE_LPT { IMPORT LPT_RESOURCE lptResources[]; lptDrv (LPT_CHANNELS, &lptResources[0]); /* init LPT parallel driver */ }#endif /* INCLUDE_LPT */#ifdef INCLUDE_PCMCIA#ifdef INCLUDE_SHOW_ROUTINES pcmciaShowInit (); /* install PCMCIA show routines */#endif /* INCLUDE_SHOW_ROUTINES */ pcmciaInit (); /* init PCMCIA Lib */#endif /* INCLUDE_PCMCIA */#ifdef INCLUDE_TFFS tffsDrv (); /* it should be after pcmciaInit() */#endif /* INCLUDE_TFFS */#ifdef INCLUDE_FORMATTED_IO fioLibInit (); /* initialize formatted I/O */#endif /* INCLUDE_FORMATTED_IO */ /* initialize floating point facilities */#ifdef INCLUDE_FLOATING_POINT floatInit (); /* initialize floating point I/O */#endif /* INCLUDE_FLOATING_POINT */ /* install software floating point emulation (if applicable) */#ifdef INCLUDE_SW_FP mathSoftInit (); /* use software emulation for fp math */#endif /* INCLUDE_SW_FP */ /* install hardware floating point support (if applicable) */#ifdef INCLUDE_HW_FP mathHardInit (); /* do fppInit() & install hw fp math */#ifdef INCLUDE_SHOW_ROUTINES fppShowInit (); /* install hardware fp show routine */#endif /* INCLUDE_SHOW_ROUTINES */#endif /* INCLUDE_HW_FP */ /* initialize performance monitoring tools */#ifdef INCLUDE_SPY spyLibInit (); /* install task cpu utilization tool */#endif /* INCLUDE_SPY */#ifdef INCLUDE_TIMEX timexInit (); /* install function timing tool */#endif /* INCLUDE_TIMEX */#ifdef INCLUDE_ENV_VARS envLibInit (ENV_VAR_USE_HOOKS); /* initialize environment variable */#endif /* INCLUDE_ENV_VARS */#ifdef INCLUDE_NTPASSFS { extern int ntPassFsInit(); extern int ntPassFsDevInit(); ntPassFsInit(1); ntPassFsDevInit("host:"); }#endif /* INCLUDE_NTPASSFS */ /* initialize object module loader */#ifdef INCLUDE_LOADER moduleLibInit (); /* initialize module manager */#if defined(INCLUDE_AOUT) loadAoutInit (); /* use a.out format */#else /* coff or ecoff */#if defined(INCLUDE_ECOFF) loadEcoffInit (); /* use ecoff format */#else /* ecoff */#if defined(INCLUDE_COFF) loadCoffInit (); /* use coff format */#else /* coff */#if defined(INCLUDE_ELF) loadElfInit (); /* use elf format */#else#if defined(INCLUDE_SOM_COFF) loadSomCoffInit ();#else#if defined(INCLUDE_PECOFF) { extern int loadPecoffInit(); loadPecoffInit (); }#endif#endif#endif#endif#endif#endif#endif /* INCLUDE_LOADER */ /* initialize wtx client to synchronize host and target symbol tables */#ifdef INCLUDE_SYM_TBL_SYNC symSyncLibInit ();#endif /* INCLUDE_SYM_TBL_SYNC */ /* initialize network */#ifdef INCLUDE_NET_INIT usrBootLineInit (sysStartType); /* crack the bootline */ usrNetInit (BOOT_LINE_ADRS); /* initialize network support */#if CPU==SIMNT { extern int simProcnum; char ulipIP[] = "90.0.0.1";
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -