void usrIosCoreInit (void) { selectInit (NUM_FILES); /* select */ iosInit (NUM_DRIVERS, NUM_FILES, "/null"); /* Basic IO system component */ iosPathLibInit (); /* File System IO component */ iosRmvLibInit (); /* Removable IO component */ iosPxLibInit (IOS_POSIX_PSE52_MODE); /* POSIX IO component */ iosRtpLibInit (); /* RTP IO component */ /* Miscellaneous IO component */ tyLibInit (TYLIB_XOFF_PCNT, TYLIB_XON_PCNT, TYLIB_WRT_THRESHLD); /* Allows communication between processes */ ttyDrv (); /* terminal driver */ usrSerialInit (); /* SIO component */ coprocLibInit(); /* generalized coprocessor support */ }
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; }