void usrIosExtraInit (void) { excShowInit (); /* exception show routines */ jobLibInit (JOB_TASK_STACK_SIZE); /* miscellaneous support task */ excInit (MAX_ISR_JOBS); /* interrupt-level job facility */ logInit (consoleFd, MAX_LOG_MSGS); /* message logging */ nbioLogInit (consoleFd, INIT_NBIO_MSGS); /* non-blocking message logging */ pipeDrv (); /* pipes */ aioPxLibInit (MAX_LIO_CALLS); /* POSIX asynchronous IO */ aioSysInit (MAX_AIO_SYS_TASKS, AIO_TASK_PRIORITY, AIO_TASK_STACK_SIZE); /* provides AIO functionality to non-AIO drivers */ stdioInit (); /* buffered IO library */ fioLibInit (); /* formatting for printf, scanf, etc. */ floatInit (); /* allow printf and others to format floats correctly */ erfLibInit (ERF_MAX_USR_CATEGORIES, ERF_MAX_USR_TYPES); /* Event Reporting Framework */ devInit (DEVICE_MANAGER_MAX_NUM_DEVICES); /* Device Manager */ xbdInit (); /* Extended Block Device */ fsMonitorInit (); /* File System Monitor */ fsEventUtilLibInit (); /* File System Event Utilities */ rawFsInit (NUM_RAWFS_FILES); /* Raw block device file system interface */ ptyDrv (); /* Allows communication between processes */ usrRomfsConfig (); /* Read-only memory based file system */ xbdRamDiskDevCreate (RAM_DISK_BLK_SIZE, RAM_DISK_SIZE, FALSE, RAM_DISK_DEV_NAME); /* Create an XBD based RAM disk */ usrBootLineParse (BOOT_LINE_ADRS); /* parse some boot device configuration info */ usrPassFsInit (PASSFS_CACHE); /* direct access to host filesystem */ virtualDiskInit (); /* VxSim virtual disk to emulate a VxWorks disk driver. */ }
int my_usrRoot(char* pMemPoolStart, unsigned int memPoolSize) { eventLibInit(); semBLibInit(); semMLibInit(); semCLibInit(); semQLibInit(); wdLibInit(); taskHookInit(); memInit(pMemPoolStart, memPoolSize); memPartLibInit(pMemPoolStart, memPoolSize); if (proc_sysMmuLibInit == 0) goto usrRoot_failed; int (*_sysMmuLibInit)() = (void*) proc_sysMmuLibInit; if (_sysMmuLibInit(0x1000) != 0) goto usrRoot_failed; if (vmMpuLibInit(0x1000) != 0) goto usrRoot_failed; if (vmBaseGlobalMapInit(&MemDescArray, MemDescArrayCount, 1) == 0) goto usrRoot_failed; sysClockConnect(usrClock, 0); sysClockRateSet(60); sysClockEnable(); selectInit(50); usrBootLineParse(0x1000); iosInit(20, 50, "/null"); ttyDrv(); usrSerialInit(); hashLibInit(); envLibInit(1); sigInit(); excInit(); logInit(fdConsole, 50); stdioInit(); fioLibInit(); selTaskDeleteHookAdd(); sub_FFB5F728(); my_taskcreate_Startup(); return 0; usrRoot_failed: printExc("usrRoot: MMU configuration failed, errno = %#x", *(long*) (GetErrorNumAddr()), 0, 0, 0, 0); reboot(1); return 0; }