Beispiel #1
0
void usrKernelCoreInit (void)
    {
    eventLibInit ();                    /* VxWorks events */
    semDeleteLibInit ();                /* semaphore deletion routines */
                                        /* binary semaphores */
                                        /* counting semaphores */
                                        /* reader/writer semaphores */
    semOpenInit ();                     /* open/close/unlink semaphore modules */
    msgQLibInit ();                     /* message queues */
    msgQOpenInit ();                    /* open/close/unlink message queue modules */
    wdLibInit ();                       /* watchdog timers */
    taskOpenInit ();                    /* open/close/unlink task modules */
    taskHookInit ();                    /* user callouts on task creation/deletion/context switch */
                                        /* binary semaphore creation routine */
                                        /* counting semaphore creation routine */
                                        /* reader/writer semaphore creation routine */
    taskCreateLibInit ();               /* Capability to dynamically instantiate and delete tasks */
    msgQCreateLibInit ();               /* message queue creation and deletion library */
    wdCreateLibInit ();                 /* watchdog timers creation and deletion library */
    wdbTaskHookInit ();                 /* task hooks debug support */
    }
Beispiel #2
0
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;
}