diff --git a/src/sys/include/ubixos/idletask.h b/src/sys/include/ubixos/idletask.h deleted file mode 100644 index ace2cf0..0000000 --- a/src/sys/include/ubixos/idletask.h +++ /dev/null @@ -1,43 +0,0 @@ -/***************************************************************************************** - Copyright (c) 2002-2004 The UbixOS Project - All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, are - permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright notice, this list of - conditions, the following disclaimer and the list of authors. Redistributions in binary - form must reproduce the above copyright notice, this list of conditions, the following - disclaimer and the list of authors in the documentation and/or other materials provided - with the distribution. Neither the name of the UbixOS Project nor the names of its - contributors may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - $Id$ - -*****************************************************************************************/ - -#ifndef _IDLETASK_H -#define _IDLETASK_H - -#include - -void idleTask(); - -#endif - -/*** - $Log$ - - END - ***/ diff --git a/src/sys/include/ubixos/systemtask.h b/src/sys/include/ubixos/systemtask.h new file mode 100644 index 0000000..18f4282 --- /dev/null +++ b/src/sys/include/ubixos/systemtask.h @@ -0,0 +1,46 @@ +/***************************************************************************************** + Copyright (c) 2002-2004 The UbixOS Project + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are + permitted provided that the following conditions are met: + + Redistributions of source code must retain the above copyright notice, this list of + conditions, the following disclaimer and the list of authors. Redistributions in binary + form must reproduce the above copyright notice, this list of conditions, the following + disclaimer and the list of authors in the documentation and/or other materials provided + with the distribution. Neither the name of the UbixOS Project nor the names of its + contributors may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + $Id$ + +*****************************************************************************************/ + +#ifndef _IDLETASK_H +#define _IDLETASK_H + +#include + +void idleTask(); + +#endif + +/*** + $Log$ + Revision 1.2 2004/05/21 15:20:00 reddawg + Cleaned up + + + END + ***/ diff --git a/src/sys/init/main.c b/src/sys/init/main.c index c6bf915..25ae891 100644 --- a/src/sys/init/main.c +++ b/src/sys/init/main.c @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include #include @@ -167,7 +167,7 @@ kprintf("Problem Mounting HD Mount Point\n"); } */ - execThread(idleTask,(uInt32)(kmalloc(0x2000)+0x2000),0x0); + execThread(systemTask,(uInt32)(kmalloc(0x2000)+0x2000),0x0); execFile("init",0x0,0x0,0x0); //execFile("shell",0x0,0x0,0x0); kprintf("Free Pages: [%i]\n",freePages); @@ -228,6 +228,9 @@ /*** $Log$ + Revision 1.31 2004/06/04 10:19:42 reddawg + notes: we compile again, thank g-d anyways i was about to cry + Revision 1.30 2004/05/25 18:38:55 reddawg Removed sample code diff --git a/src/sys/kernel/idletask.c b/src/sys/kernel/idletask.c deleted file mode 100644 index 44db85c..0000000 --- a/src/sys/kernel/idletask.c +++ /dev/null @@ -1,108 +0,0 @@ -/***************************************************************************************** - Copyright (c) 2002-2004 The UbixOS Project - All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, are - permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright notice, this list of - conditions, the following disclaimer and the list of authors. Redistributions in binary - form must reproduce the above copyright notice, this list of conditions, the following - disclaimer and the list of authors in the documentation and/or other materials provided - with the distribution. Neither the name of the UbixOS Project nor the names of its - contributors may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - $Id$ - -*****************************************************************************************/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -void idleTask() { - mpiMessage_t myMsg; - uInt32 counter = 0x0; - - if (mpiCreateMbox("system") != 0x0) { - kpanic("Error: Error creating mailbox: system\n"); - } - - while(1) { - if (mpiFetchMessage("system",&myMsg) == 0x0) { - switch(myMsg.type) { - case 1000: - kprintf("Restarting the system in 5 seconds\n"); - counter = systemVitals->sysUptime + 5; - while (systemVitals->sysUptime < counter) { - //asm("hlt"); - schedYield(); - } - kprintf("Rebooting NOW!!!\n"); - while(inportByte(0x64) & 0x02); - outportByte(0x64, 0xFE); - break; - case 31337: - kprintf("system: backdoor opened\n"); - break; - case 0x80: - if (!kstrcmp(myMsg.data,"sdeStart")) { - kprintf("Starting SDE\n"); - execThread(sdeThread,(uInt32)(kmalloc(0x2000)+0x2000),0x0); - } - break; - default: - kprintf("system: Received message %i:%s\n",myMsg.type,myMsg.data); - break; - } - } - asm("hlt"); - } - return; - } - -/*** - $Log$ - Revision 1.8 2004/05/26 23:48:33 reddawg - idletask: tweaked reboot for performance - - Revision 1.7 2004/05/26 23:28:29 reddawg - idletask: This task now also receives all of the systems message - We also gained reboot suport that is msg send type 1000 - - Revision 1.6 2004/05/25 18:42:28 reddawg - Idle task now just does what it is suposed to - - Revision 1.5 2004/05/25 17:30:16 reddawg - IDLE task will be our toy task to test things with - - Revision 1.4 2004/05/25 15:49:03 reddawg - Added Syscall Interface For MPI - - Revision 1.3 2004/05/21 12:36:53 reddawg - Cleaned Up - - Revision 1.2 2004/05/15 02:30:28 reddawg - Lots of changes - - END - ***/ - diff --git a/src/sys/kernel/systemtask.c b/src/sys/kernel/systemtask.c new file mode 100644 index 0000000..96252ef --- /dev/null +++ b/src/sys/kernel/systemtask.c @@ -0,0 +1,114 @@ +/***************************************************************************************** + Copyright (c) 2002-2004 The UbixOS Project + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are + permitted provided that the following conditions are met: + + Redistributions of source code must retain the above copyright notice, this list of + conditions, the following disclaimer and the list of authors. Redistributions in binary + form must reproduce the above copyright notice, this list of conditions, the following + disclaimer and the list of authors in the documentation and/or other materials provided + with the distribution. Neither the name of the UbixOS Project nor the names of its + contributors may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT + OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + $Id$ + +*****************************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +void systemTask() { + mpiMessage_t myMsg; + uInt32 counter = 0x0; + + if (mpiCreateMbox("system") != 0x0) { + kpanic("Error: Error creating mailbox: system\n"); + } + + while(1) { + if (mpiFetchMessage("system",&myMsg) == 0x0) { + switch(myMsg.type) { + case 1000: + kprintf("Restarting the system in 5 seconds\n"); + counter = systemVitals->sysUptime + 5; + while (systemVitals->sysUptime < counter) { + //asm("hlt"); + schedYield(); + } + kprintf("Rebooting NOW!!!\n"); + while(inportByte(0x64) & 0x02); + outportByte(0x64, 0xFE); + break; + case 31337: + kprintf("system: backdoor opened\n"); + break; + case 0x80: + if (!kstrcmp(myMsg.data,"sdeStart")) { + kprintf("Starting SDE\n"); + execThread(sdeThread,(uInt32)(kmalloc(0x2000)+0x2000),0x0); + } + break; + default: + kprintf("system: Received message %i:%s\n",myMsg.type,myMsg.data); + break; + } + } + asm("hlt"); + } + return; + } + +/*** + $Log$ + Revision 1.9 2004/06/04 13:29:56 reddawg + libc: modified mkdir(); interface + kpanic: kPanic(); now says kPanic: %s + system: now reboots when receives message for reboot + also when command start sde is received by system the STD is started + + Revision 1.8 2004/05/26 23:48:33 reddawg + idletask: tweaked reboot for performance + + Revision 1.7 2004/05/26 23:28:29 reddawg + idletask: This task now also receives all of the systems message + We also gained reboot suport that is msg send type 1000 + + Revision 1.6 2004/05/25 18:42:28 reddawg + Idle task now just does what it is suposed to + + Revision 1.5 2004/05/25 17:30:16 reddawg + IDLE task will be our toy task to test things with + + Revision 1.4 2004/05/25 15:49:03 reddawg + Added Syscall Interface For MPI + + Revision 1.3 2004/05/21 12:36:53 reddawg + Cleaned Up + + Revision 1.2 2004/05/15 02:30:28 reddawg + Lots of changes + + END + ***/ +