diff --git a/doc/ChangeLog b/doc/ChangeLog new file mode 100644 index 0000000..e2a03fc --- /dev/null +++ b/doc/ChangeLog @@ -0,0 +1,3 @@ +2006-12-01 Christopher Olsen + Cleaned up exec.c things to do are extract how it loads files. + diff --git a/doc/html/8259_8c-source.html b/doc/html/8259_8c-source.html new file mode 100644 index 0000000..d84b628 --- /dev/null +++ b/doc/html/8259_8c-source.html @@ -0,0 +1,165 @@ + + +UbixOS V2: src/sys/isa/8259.c Source File + + + + +
+
+
+
+ +

8259.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <sys/io.h>
+00031 #include <isa/8259.h>
+00032 #include <ubixos/types.h>
+00033 #include <lib/kprintf.h>
+00034 
+00035 static unsigned int irqMask = 0xFFFF;
+00036 
+00037 /************************************************************************
+00038 
+00039  Function: int 8259_init()
+00040 
+00041  Description: This function will initialize both PICs for all of our IRQs
+00042 
+00043  Notes:
+00044 
+00045 ************************************************************************/
+00046 int i8259_init() {
+00047   outportByte(mPic,   icw1); /* Initialize Master PIC           */
+00048   outportByte(sPic,   icw1); /* Initialize Seconary PIC         */
+00049   outportByte(mPic+1, mVec); /* Master Interrup Vector          */
+00050   outportByte(sPic+1, sVec); /* Secondary Interrupt Vector      */
+00051   outportByte(mPic+1, 1<<2); /* Bitmask for cascade on IRQ 2    */
+00052   outportByte(sPic+1, 2);    /* Cascade on IRQ 2                */
+00053   outportByte(mPic+1, icw4); /* Finish Primary Initialization   */
+00054   outportByte(sPic+1, icw4); /* Finish Seconary Initialization  */
+00055   outportByte(mImr,   0xff); /* Mask All Primary Interrupts     */
+00056   outportByte(sImr,   0xff); /* Mask All Seconary Interrupts    */
+00057 
+00058   /* Print out the system info for this */
+00059   kprintf("pic0 - Port: [0x%X]\n",mPic);
+00060   kprintf("pic1 - Port: [0x%X]\n",sPic);
+00061 
+00062   /* Return so the system knows it went well */
+00063   return(0x0);
+00064   }
+00065 
+00066 /************************************************************************
+00067 
+00068  Function: int irqEnable()
+00069 
+00070  Description: This function is used to turn on an IRQ
+00071 
+00072  Notes:
+00073 
+00074 ************************************************************************/
+00075 void irqEnable(uInt16 irqNo) {
+00076   irqMask &= ~(1 << irqNo);
+00077   if (irqNo >= 8) {
+00078     irqMask &= ~(1 << 2);
+00079     }
+00080   outportByte(mPic+1, irqMask & 0xFF);
+00081   outportByte(sPic+1, (irqMask >> 8) & 0xFF);
+00082   }
+00083 
+00084 /************************************************************************
+00085 
+00086  Function: int irqDisable()
+00087 
+00088  Description: This function is used to turn off an IRQ
+00089 
+00090  Notes:
+00091 
+00092 ************************************************************************/
+00093 void irqDisable(uInt16 irqNo) {
+00094   irqMask |= (1 << irqNo);
+00095   if ((irqMask & 0xFF00)==0xFF00) {
+00096     irqMask |= (1 << 2);
+00097     }
+00098   outportByte(mPic+1, irqMask & 0xFF);
+00099   outportByte(sPic+1, (irqMask >> 8) & 0xFF);
+00100   }
+00101 
+00102 /***
+00103  $Log$
+00104  Revision 1.1.1.1  2006/06/01 12:46:12  reddawg
+00105  ubix2
+00106 
+00107  Revision 1.2  2005/10/12 00:13:37  reddawg
+00108  Removed
+00109 
+00110  Revision 1.1.1.1  2005/09/26 17:23:59  reddawg
+00111  no message
+00112 
+00113  Revision 1.5  2004/07/09 13:20:08  reddawg
+00114  Oh yeah duh you can not name functions with numbers
+00115 
+00116  Revision 1.4  2004/07/09 13:14:29  reddawg
+00117  8259: changed init8259 to 8259_init
+00118  Adjusted Startup Routines
+00119 
+00120  Revision 1.3  2004/05/20 22:51:09  reddawg
+00121  Cleaned Up Warnings
+00122 
+00123  Revision 1.2  2004/05/10 02:23:24  reddawg
+00124  Minor Changes To Source Code To Prepare It For Open Source Release
+00125 
+00126  END
+00127  ***/
+00128 
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/8259_8c.html b/doc/html/8259_8c.html new file mode 100644 index 0000000..fab29b1 --- /dev/null +++ b/doc/html/8259_8c.html @@ -0,0 +1,154 @@ + + +UbixOS V2: src/sys/isa/8259.c File Reference + + + + +
+
+
+
+ +

8259.c File Reference

+

+#include <sys/io.h>
+#include <isa/8259.h>
+#include <ubixos/types.h>
+#include <lib/kprintf.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + +

Functions

int i8259_init ()
void irqDisable (uInt16 irqNo)
void irqEnable (uInt16 irqNo)

Variables

static unsigned int irqMask = 0xFFFF
+


Function Documentation

+ +
+
+ + + + + + + + +
int i8259_init (  ) 
+
+
+ +

+ +

+Definition at line 46 of file 8259.c. +

+References icw1, icw4, kprintf(), mImr, mPic, mVec, outportByte(), sImr, sPic, and sVec. +

+

+ +

+
+ + + + + + + + + +
void irqDisable (uInt16  irqNo  ) 
+
+
+ +

+ +

+Definition at line 93 of file 8259.c. +

+References irqMask, mPic, outportByte(), and sPic. +

+Referenced by _int13(), kpanic(), and ne2kHandler(). +

+

+ +

+
+ + + + + + + + + +
void irqEnable (uInt16  irqNo  ) 
+
+
+ +

+ +

+Definition at line 75 of file 8259.c. +

+References irqMask, mPic, outportByte(), and sPic. +

+Referenced by _int13(), atkbd_init(), fdc_init(), kmain(), mouseInit(), ne2k_init(), and ne2kHandler(). +

+

+


Variable Documentation

+ +
+
+ + + + +
unsigned int irqMask = 0xFFFF [static]
+
+
+ +

+ +

+Definition at line 35 of file 8259.c. +

+Referenced by irqDisable(), and irqEnable(). +

+

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/8259_8h-source.html b/doc/html/8259_8h-source.html new file mode 100644 index 0000000..653e821 --- /dev/null +++ b/doc/html/8259_8h-source.html @@ -0,0 +1,112 @@ + + +UbixOS V2: src/sys/include/isa/8259.h Source File + + + + +
+
+
+
+ +

8259.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _8259_H
+00031 #define _8259_H
+00032 
+00033 #include <ubixos/types.h>
+00034 
+00035 #define mPic    0x20 // I/O for master PIC      
+00036 #define mImr    0x21 // I/O for master IMR      
+00037 #define sPic    0xA0 // I/O for slave PIC       
+00038 #define sImr    0xA1 // I/O for slace IMR       
+00039 #define eoi     0x20 // EOI command             
+00040 #define icw1    0x11 // Cascade, Edge triggered 
+00041 #define icw4    0x01 // 8088 mode               
+00042 #define mVec    0x68 // Vector for master       
+00043 #define sVec    0x70 // Vector for slave        
+00044 #define ocw3Irr 0x0A // Read IRR                
+00045 #define ocw3Isr 0x0B // Read ISR                
+00046 
+00047 int i8259_init();
+00048 void irqEnable(uInt16 irqNo);
+00049 void irqDisable(uInt16 irqNo);
+00050 
+00051 #endif
+00052 
+00053 /***
+00054  $Log$
+00055  Revision 1.1.1.1  2006/06/01 12:46:14  reddawg
+00056  ubix2
+00057 
+00058  Revision 1.2  2005/10/12 00:13:36  reddawg
+00059  Removed
+00060 
+00061  Revision 1.1.1.1  2005/09/26 17:23:39  reddawg
+00062  no message
+00063 
+00064  Revision 1.4  2004/07/09 13:20:08  reddawg
+00065  Oh yeah duh you can not name functions with numbers
+00066 
+00067  Revision 1.3  2004/07/09 13:14:29  reddawg
+00068  8259: changed init8259 to 8259_init
+00069  Adjusted Startup Routines
+00070 
+00071  Revision 1.2  2004/05/21 14:57:16  reddawg
+00072  Cleaned up
+00073 
+00074  END
+00075  ***/
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/8259_8h.html b/doc/html/8259_8h.html new file mode 100644 index 0000000..0b940bc --- /dev/null +++ b/doc/html/8259_8h.html @@ -0,0 +1,357 @@ + + +UbixOS V2: src/sys/include/isa/8259.h File Reference + + + + +
+
+
+
+ +

8259.h File Reference

+

+#include <ubixos/types.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Defines

#define eoi   0x20
#define icw1   0x11
#define icw4   0x01
#define mImr   0x21
#define mPic   0x20
#define mVec   0x68
#define ocw3Irr   0x0A
#define ocw3Isr   0x0B
#define sImr   0xA1
#define sPic   0xA0
#define sVec   0x70

Functions

int i8259_init ()
void irqDisable (uInt16 irqNo)
void irqEnable (uInt16 irqNo)
+


Define Documentation

+ +
+
+ + + + +
#define eoi   0x20
+
+
+ +

+ +

+Definition at line 39 of file 8259.h. +

+Referenced by mouseHandler(), mouseInit(), and ne2kHandler(). +

+

+ +

+
+ + + + +
#define icw1   0x11
+
+
+ +

+ +

+Definition at line 40 of file 8259.h. +

+Referenced by i8259_init(). +

+

+ +

+
+ + + + +
#define icw4   0x01
+
+
+ +

+ +

+Definition at line 41 of file 8259.h. +

+Referenced by i8259_init(). +

+

+ +

+
+ + + + +
#define mImr   0x21
+
+
+ +

+ +

+Definition at line 36 of file 8259.h. +

+Referenced by i8259_init(). +

+

+ +

+
+ + + + +
#define mPic   0x20
+
+
+ +

+ +

+Definition at line 35 of file 8259.h. +

+Referenced by i8259_init(), irqDisable(), irqEnable(), mouseHandler(), mouseInit(), and ne2kHandler(). +

+

+ +

+
+ + + + +
#define mVec   0x68
+
+
+ +

+ +

+Definition at line 42 of file 8259.h. +

+Referenced by atkbd_init(), fdc_init(), i8259_init(), initLNC(), mouseInit(), and ne2k_init(). +

+

+ +

+
+ + + + +
#define ocw3Irr   0x0A
+
+
+ +

+ +

+Definition at line 44 of file 8259.h. +

+

+ +

+
+ + + + +
#define ocw3Isr   0x0B
+
+
+ +

+ +

+Definition at line 45 of file 8259.h. +

+

+ +

+
+ + + + +
#define sImr   0xA1
+
+
+ +

+ +

+Definition at line 38 of file 8259.h. +

+Referenced by i8259_init(). +

+

+ +

+
+ + + + +
#define sPic   0xA0
+
+
+ +

+ +

+Definition at line 37 of file 8259.h. +

+Referenced by i8259_init(), irqDisable(), irqEnable(), mouseHandler(), mouseInit(), and ne2kHandler(). +

+

+ +

+
+ + + + +
#define sVec   0x70
+
+
+ +

+ +

+Definition at line 43 of file 8259.h. +

+Referenced by i8259_init(). +

+

+


Function Documentation

+ +
+
+ + + + + + + + +
int i8259_init (  ) 
+
+
+ +

+ +

+Definition at line 46 of file 8259.c. +

+References icw1, icw4, kprintf(), mImr, mPic, mVec, outportByte(), sImr, sPic, and sVec. +

+

+ +

+
+ + + + + + + + + +
void irqDisable (uInt16  irqNo  ) 
+
+
+ +

+ +

+Definition at line 93 of file 8259.c. +

+References irqMask, mPic, outportByte(), and sPic. +

+Referenced by _int13(), kpanic(), and ne2kHandler(). +

+

+ +

+
+ + + + + + + + + +
void irqEnable (uInt16  irqNo  ) 
+
+
+ +

+ +

+Definition at line 75 of file 8259.c. +

+References irqMask, mPic, outportByte(), and sPic. +

+Referenced by _int13(), atkbd_init(), fdc_init(), kmain(), mouseInit(), ne2k_init(), and ne2kHandler(). +

+

+


Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/Makefile_8inc-source.html b/doc/html/Makefile_8inc-source.html new file mode 100644 index 0000000..4302398 --- /dev/null +++ b/doc/html/Makefile_8inc-source.html @@ -0,0 +1,43 @@ + + +UbixOS V2: src/sys/Makefile.inc Source File + + + + +
+
+
+
+ +

Makefile.inc

Go to the documentation of this file.
00001 # $Id:
+00002 # global 'sys' options
+00003 
+00004 INCLUDES = -I../include
+00005 CFLAGS = -Wall -nostdlib -nostdinc -fno-builtin -fno-exceptions -O
+00006 KERNEL = ubix.elf
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/Makefile_8inc.html b/doc/html/Makefile_8inc.html new file mode 100644 index 0000000..55542d3 --- /dev/null +++ b/doc/html/Makefile_8inc.html @@ -0,0 +1,44 @@ + + +UbixOS V2: src/sys/Makefile.inc File Reference + + + + +
+
+
+
+ +

Makefile.inc File Reference

+

+ +

+Go to the source code of this file. + +
+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/__types_8h-source.html b/doc/html/__types_8h-source.html new file mode 100644 index 0000000..ae891b8 --- /dev/null +++ b/doc/html/__types_8h-source.html @@ -0,0 +1,103 @@ + + +UbixOS V2: src/sys/include/sys/_types.h Source File + + + + +
+
+
+
+ +

_types.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef __TYPES_H
+00031 #define __TYPES_H
+00032 
+00033 //#include <ubixos/types.h>
+00034 
+00035 typedef __signed char           __int8_t;
+00036 typedef unsigned char           __uint8_t;
+00037 typedef short                   __int16_t;
+00038 typedef unsigned short          __uint16_t;
+00039 typedef int                     __int32_t;
+00040 typedef unsigned int            __uint32_t;
+00041 typedef long long               __int64_t;
+00042 typedef unsigned long long      __uint64_t;
+00043 
+00044 
+00045 typedef      unsigned long   __clock_t;
+00046 //typedef      long            __time_t;
+00047 typedef      __uint32_t      __ino_t;
+00048 typedef      __int32_t       __ssize_t;
+00049 
+00050 /* stat types */
+00051 typedef        __uint32_t      __dev_t;        /* device number */
+00052 typedef        __uint16_t      __mode_t;
+00053 typedef        __uint16_t      __nlink_t;      /* link count */
+00054 typedef        __uint32_t      __uid_t;
+00055 typedef        __uint32_t      __gid_t;
+00056 typedef        __int32_t       __time_t;
+00057 typedef        __int64_t       __blkcnt_t;     /* file block count */
+00058 typedef        __uint32_t      __blksize_t;    /* file block size */
+00059 typedef        __uint32_t      __fflags_t;     /* file flags */
+00060 
+00061 #endif
+00062 
+00063 /***
+00064  END
+00065  ***/
+00066 
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/__types_8h.html b/doc/html/__types_8h.html new file mode 100644 index 0000000..f3c71a9 --- /dev/null +++ b/doc/html/__types_8h.html @@ -0,0 +1,426 @@ + + +UbixOS V2: src/sys/include/sys/_types.h File Reference + + + + +
+
+
+
+ +

_types.h File Reference

+

+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Typedefs

typedef __int64_t __blkcnt_t
typedef __uint32_t __blksize_t
typedef unsigned long __clock_t
typedef __uint32_t __dev_t
typedef __uint32_t __fflags_t
typedef __uint32_t __gid_t
typedef __uint32_t __ino_t
typedef short __int16_t
typedef int __int32_t
typedef long long __int64_t
typedef __signed char __int8_t
typedef __uint16_t __mode_t
typedef __uint16_t __nlink_t
typedef __int32_t __ssize_t
typedef __int32_t __time_t
typedef __uint32_t __uid_t
typedef unsigned short __uint16_t
typedef unsigned int __uint32_t
typedef unsigned long long __uint64_t
typedef unsigned char __uint8_t
+


Typedef Documentation

+ +
+
+ + + + +
typedef __int64_t __blkcnt_t
+
+
+ +

+ +

+Definition at line 57 of file _types.h. +

+

+ +

+
+ + + + +
typedef __uint32_t __blksize_t
+
+
+ +

+ +

+Definition at line 58 of file _types.h. +

+

+ +

+
+ + + + +
typedef unsigned long __clock_t
+
+
+ +

+ +

+Definition at line 45 of file _types.h. +

+

+ +

+
+ + + + +
typedef __uint32_t __dev_t
+
+
+ +

+ +

+Definition at line 51 of file _types.h. +

+

+ +

+
+ + + + +
typedef __uint32_t __fflags_t
+
+
+ +

+ +

+Definition at line 59 of file _types.h. +

+

+ +

+
+ + + + +
typedef __uint32_t __gid_t
+
+
+ +

+ +

+Definition at line 55 of file _types.h. +

+

+ +

+
+ + + + +
typedef __uint32_t __ino_t
+
+
+ +

+ +

+Definition at line 47 of file _types.h. +

+

+ +

+
+ + + + +
typedef short __int16_t
+
+
+ +

+ +

+Definition at line 37 of file _types.h. +

+

+ +

+
+ + + + +
typedef int __int32_t
+
+
+ +

+ +

+Definition at line 39 of file _types.h. +

+

+ +

+
+ + + + +
typedef long long __int64_t
+
+
+ +

+ +

+Definition at line 41 of file _types.h. +

+

+ +

+
+ + + + +
typedef __signed char __int8_t
+
+
+ +

+ +

+Definition at line 35 of file _types.h. +

+

+ +

+
+ + + + +
typedef __uint16_t __mode_t
+
+
+ +

+ +

+Definition at line 52 of file _types.h. +

+

+ +

+
+ + + + +
typedef __uint16_t __nlink_t
+
+
+ +

+ +

+Definition at line 53 of file _types.h. +

+

+ +

+
+ + + + +
typedef __int32_t __ssize_t
+
+
+ +

+ +

+Definition at line 48 of file _types.h. +

+

+ +

+
+ + + + +
typedef __int32_t __time_t
+
+
+ +

+ +

+Definition at line 56 of file _types.h. +

+

+ +

+
+ + + + +
typedef __uint32_t __uid_t
+
+
+ +

+ +

+Definition at line 54 of file _types.h. +

+

+ +

+
+ + + + +
typedef unsigned short __uint16_t
+
+
+ +

+ +

+Definition at line 38 of file _types.h. +

+

+ +

+
+ + + + +
typedef unsigned int __uint32_t
+
+
+ +

+ +

+Definition at line 40 of file _types.h. +

+

+ +

+
+ + + + +
typedef unsigned long long __uint64_t
+
+
+ +

+ +

+Definition at line 42 of file _types.h. +

+

+ +

+
+ + + + +
typedef unsigned char __uint8_t
+
+
+ +

+ +

+Definition at line 36 of file _types.h. +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/annotated.html b/doc/html/annotated.html new file mode 100644 index 0000000..b816c44 --- /dev/null +++ b/doc/html/annotated.html @@ -0,0 +1,204 @@ + + +UbixOS V2: Data Structures + + + + +
+
+
+
+

UbixOS V2 Data Structures

Here are the data structures with brief descriptions: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
__sigset
__timespec
_item_t
_list_t
_UbixUser
api_msg
api_msg_msg
arp_entry
arp_hdr
arpcom
blockAllocationTableEntry
blockRun
bNode
bootSect
bsd_disklabel
bsd_disklabel::partition
bTree
bTreeHeader
buf
cacheNode
close_args
confadd
cpuinfo_t
csum
csum_total
dataStream
descriptorTableUnion
devfs_devices
devfs_info
device
device_interface
device_node
device_resource
device_t
devMethodType
directoryEntry
directoryList
dirent
DiskFS
diskSuperBlock
dmadat
dos_partition
dp_rcvhdr
driveInfo
driverType
DrvGeom
ei_device
elfDynamic
elfDynSym
elfHeader
elfPltInfo
elfProgramHeader
elfSectionHeader
eth_addr
eth_hdr
etheraddr
ethernetif
ethip_hdr
fcntl_args
file
fileDescriptor
fileDescriptorStruct
fileSystem
FileSystemAbstract
fs
fstat_args
gdt_descr
gdtDescriptor
gdtGate
getdtablesize_args
getgid_args
getpid_args
gettimeofday_args
getuid_args
hostRingEntry
i386_frame
i387Struct
icmp_dur_hdr
icmp_echo_hdr
icmp_te_hdr
in_addr
initBlock
ioctl_args
ip_addr
ip_hdr
issetugid_args
kmod_struct
lncInfo
lwip_socket
mds
memDescriptor
mMap
mmap_args
mpi_mbox
mpi_message
munmap_args
net
netbuf
netconn
netif
nicBuffer
nicInfo
obreak_args
ogDisplay_UbixOS
ogDisplay_VESA
ogModeInfo
ogVESAInfo
osInfo
partitionInformation
pbuf
pciConfig
pipe_args
readlink_args
sdeWindows
sigaction_args
sigprocmask_args
sockaddr
sockaddr_in
stat
sys_mbox
sys_mbox_msg
sys_sem
sys_thread
sys_timeout
sys_timeouts
sysctl_args
sysctl_entry
taskStruct
tcp_hdr
tcp_pcb
tcp_pcb_listen
tcp_seg
tcpip_msg
thread
thread_start_param
timespec
timeStruct
timeval
timezone
TMode_Rec
tms
trapframe
tssStruct
tty_termNode
TVESA_Rec
ubixDiskLabel
ubixDiskLabel::ubixPartitions
UbixFS
ubixFSInfo
ubixfsInode
ubthread
ubthread_cond
ubthread_cond_list
ubthread_list
ubthread_mutex
ubthread_mutex_list
udp_hdr
udp_pcb
ufs1_dinode
ufs2_dinode
uPtr
userFileDescriptorStruct
vfs_abstract
vfs_mountPoint
write_args
+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ap-boot_8S-source.html b/doc/html/ap-boot_8S-source.html new file mode 100644 index 0000000..05807b8 --- /dev/null +++ b/doc/html/ap-boot_8S-source.html @@ -0,0 +1,142 @@ + + +UbixOS V2: src/sys/kernel/ap-boot.S Source File + + + + +
+
+
+
+ +

ap-boot.S

Go to the documentation of this file.
00001 /*
+00002  * Okay, this file contains the code that's going to bootstrap the AP cpus
+00003  */
+00004 
+00005 
+00006         .globl  ap_trampoline_start,ap_trampoline_end
+00007         .text
+00008         .code16
+00009 ap_trampoline_start:
+00010         cli
+00011         cld
+00012 
+00013         movw    %cs,%ax         // The CPU knows its CS already, so lets use it for the other segments
+00014         movw    %ax,%ds
+00015         movw    %ax,%es
+00016         movw    %ax,%ss
+00017 
+00018         // Do some bochs-specific bullshit
+00019         mov     $0x31,%al // '1'
+00020         mov     $0xe9,%dx
+00021         outb    %al,%dx
+00022         //lgdt    ap_gdt;       
+00023         lgdt    ap_trampoline_gdt_limit - ap_trampoline_start
+00024         movl    %cr0,%eax
+00025         orl     $0x1,%eax
+00026         movl    %eax,%cr0       // PMODE!
+00027 
+00028 .code32
+00029         .byte 0x66
+00030         ljmp    $0x08,$(ap_trampoline_32 - ap_trampoline_start)         // 0x08 == KERNEL_CS
+00031 
+00032 ap_trampoline_32:
+00033         mov     $0x32,%al // '2'
+00034         mov     $0xe9,%dx
+00035         outb    %al,%dx
+00036 
+00037         mov     $0x10,%ax
+00038         mov     %ax,%ds
+00039         mov     %ax,%es
+00040         mov     %ax,%fs
+00041         mov     %ax,%gs
+00042         mov     %ax,%ss
+00043 
+00044         // Spinlock
+00045         mov     ap_trampoline_spl - ap_trampoline_start,%edi
+00046 ap_spl:
+00047         //cmp   $1,(%edi)
+00048         //je    ap_spl
+00049 
+00050         mov     $1,%eax      // Value to be set
+00051         xchgl   (%edi),%eax
+00052         cmp     $0,%eax
+00053         je      ap_spl
+00054         // /Spinlock
+00055 
+00056         mov     $0x30,%al // '0'
+00057         mov     $0xe9,%dx
+00058         outb    %al,%dx
+00059                 
+00060         mov     ap_trampoline_stackptr - ap_trampoline_start,%ebx
+00061         mov     %ebx,%esp
+00062         add     $0x1000,%ebx
+00063         mov     %ebx,ap_trampoline_stackptr - ap_trampoline_start
+00064 
+00065         mov     $0x31,%al // '1'
+00066         mov     $0xe9,%dx
+00067         outb    %al,%dx
+00068 
+00069         // spinunlock
+00070         mov     $0,%eax
+00071         mov     ap_trampoline_spl - ap_trampoline_start,%edi
+00072         xchgl   (%edi),%eax
+00073         // /spinunlock
+00074 
+00075         mov     $0x33,%al // '3'
+00076         mov     $0xe9,%dx
+00077         outb    %al,%dx
+00078 
+00079         mov     ap_trampoline_epoint,%eax
+00080         call    *%eax
+00081 1:
+00082         hlt
+00083         jmp     1b              // Halt if we ever get here somehow
+00084 
+00085         // Stack.. This sucks, since CPU initialization isn't serialized
+00086 ap_trampoline_stackptr:
+00087         .long   0x10000         // 256KB
+00088 ap_trampoline_epoint:
+00089         .long   c_ap_boot
+00090 
+00091 ap_trampoline_spl:
+00092         .long   0
+00093 ap_gdt:
+00094         .long ubixGDT
+00095         
+00096         // GDT
+00097 ap_trampoline_gdt:
+00098         .word   0
+00099 ap_trampoline_gdt_limit:
+00100         .word   128     // Room for 32 descriptors
+00101 ap_trampoline_gdt_base:
+00102         .long   0x20000         // 128KB (move this later)
+00103 
+00104 
+00105 ap_trampoline_end:
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ap-boot_8S.html b/doc/html/ap-boot_8S.html new file mode 100644 index 0000000..aef1577 --- /dev/null +++ b/doc/html/ap-boot_8S.html @@ -0,0 +1,1213 @@ + + +UbixOS V2: src/sys/kernel/ap-boot.S File Reference + + + + +
+
+
+
+ +

ap-boot.S File Reference

+

+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Functions

globl ap_trampoline_end text
+code16 ax movw ds movw es
+movw ss mov al mov dx outb
+dx lgdt ap_trampoline_gdt_limit
+ap_trampoline_start movl eax
+orl eax movl cr0 code32 byte
+x66 ljmp ap_trampoline_32
+ap_trampoline_start al mov
+dx outb dx mov ax mov ds mov
+es mov fs mov gs mov ss mov
+ap_trampoline_spl edi eax 
xchgl (%edi)

Variables

globl ap_trampoline_end text
+code16 ax movw ds movw es
+movw ss mov al mov dx outb
+dx lgdt ap_trampoline_gdt_limit
+ap_trampoline_start movl eax
+orl eax movl cr0 code32 byte
+x66 ljmp ap_trampoline_32
+ap_trampoline_start al mov
+dx outb dx mov ax mov ds mov
+es mov fs mov gs mov ss mov
+ap_trampoline_spl edi eax
+eax eax je ap_spl mov al mov
+dx outb dx mov ap_trampoline_stackptr
+ebx mov esp add ebx mov ap_trampoline_stackptr
+ap_trampoline_start mov al
+mov dx outb dx eax mov ap_trampoline_spl
+edi eax mov al mov dx outb 
al
globl ap_trampoline_end text
+code16 ax movw ds movw es
+movw ss mov al mov dx outb
+dx lgdt ap_trampoline_gdt_limit
+ap_trampoline_start movl eax
+orl eax movl cr0 code32 byte
+x66 ljmp ap_trampoline_32
+ap_trampoline_start al mov
+dx outb dx mov ax mov ds mov
+es mov fs mov gs mov ss mov
+ap_trampoline_spl edi eax
+eax eax je ap_spl mov al mov
+dx outb dx mov ap_trampoline_stackptr
+ebx mov esp add ebx mov ap_trampoline_stackptr
+ap_trampoline_start mov al
+mov dx outb 
al
globl ap_trampoline_end text
+code16 ax movw ds movw es
+movw ss mov al mov dx outb
+dx lgdt ap_trampoline_gdt_limit
+ap_trampoline_start movl eax
+orl eax movl cr0 code32 byte
+x66 ljmp ap_trampoline_32
+ap_trampoline_start al mov
+dx outb dx mov ax mov ds mov
+es mov fs mov gs mov ss mov
+ap_trampoline_spl edi eax
+eax eax je ap_spl mov al mov
+dx outb 
al
globl ap_trampoline_end text
+code16 ax movw ds movw es
+movw ss mov al mov dx outb
+dx lgdt ap_trampoline_gdt_limit
+ap_trampoline_start movl eax
+orl eax movl cr0 code32 byte
+x66 ljmp ap_trampoline_32
+ap_trampoline_start al mov
+dx outb 
al
globl ap_trampoline_end text
+code16 ax movw ds movw es
+movw ss mov al mov dx outb 
al
globl ap_trampoline_end text
+code16 ax movw ds movw es
+movw ss mov al mov dx outb
+dx lgdt ap_trampoline_gdt_limit
+ap_trampoline_start movl eax
+orl eax movl cr0 code32 byte
+x66 ljmp ap_trampoline_32
+ap_trampoline_start al mov
+dx outb dx mov ax mov ds mov
+es mov fs mov gs mov ss mov
+ap_trampoline_spl edi 
ap_spl
globl ap_trampoline_end text
+code16 ax movw ds movw es
+movw ss mov al mov dx outb
+dx lgdt ap_trampoline_gdt_limit
+ap_trampoline_start movl eax
+orl eax movl cr0 code32 byte
+x66 ljmp ap_trampoline_32
+ap_trampoline_start 
ap_trampoline_32
globl ap_trampoline_end text
+code16 ax movw ds movw es
+movw ss mov al mov dx outb
+dx lgdt ap_trampoline_gdt_limit
+ap_trampoline_start movl eax
+orl eax movl cr0 code32 byte
+x66 ljmp ap_trampoline_32
+ap_trampoline_start al mov
+dx outb dx mov ax mov ds mov
+es mov fs mov gs mov ss mov
+ap_trampoline_spl edi eax
+eax eax je ap_spl mov al mov
+dx outb dx mov ap_trampoline_stackptr
+ebx mov esp add ebx mov ap_trampoline_stackptr
+ap_trampoline_start mov al
+mov dx outb dx eax mov ap_trampoline_spl
+edi eax mov al mov dx outb
+dx mov 
ap_trampoline_epoint
globl ap_trampoline_end text
+code16 ax movw ds movw es
+movw ss mov al mov dx outb
+dx lgdt ap_trampoline_gdt_limit
+ap_trampoline_start movl eax
+orl eax movl cr0 code32 byte
+x66 ljmp ap_trampoline_32
+ap_trampoline_start al mov
+dx outb dx mov ax mov ds mov
+es mov fs mov gs mov ss mov
+ap_trampoline_spl edi eax
+eax eax je ap_spl mov al mov
+dx outb dx mov ap_trampoline_stackptr
+ebx mov esp add ebx mov ap_trampoline_stackptr
+ap_trampoline_start mov al
+mov dx outb dx eax mov ap_trampoline_spl 
ap_trampoline_start
globl ap_trampoline_end text
+code16 ax movw ds movw es
+movw ss mov al mov dx outb
+dx lgdt ap_trampoline_gdt_limit
+ap_trampoline_start movl eax
+orl eax movl cr0 code32 byte
+x66 ljmp ap_trampoline_32
+ap_trampoline_start al mov
+dx outb dx mov ax mov ds mov
+es mov fs mov gs mov ss mov
+ap_trampoline_spl edi eax
+eax eax je ap_spl mov al mov
+dx outb dx mov ap_trampoline_stackptr 
ap_trampoline_start
globl ap_trampoline_end text
+code16 ax movw ds movw es
+movw ss mov al mov dx outb
+dx lgdt ap_trampoline_gdt_limit
+ap_trampoline_start movl eax
+orl eax movl cr0 code32 byte
+x66 ljmp ap_trampoline_32
+ap_trampoline_start al mov
+dx outb dx mov ax mov ds mov
+es mov fs mov gs mov ss mov
+ap_trampoline_spl 
ap_trampoline_start
globl ap_trampoline_end text
+code16 
ap_trampoline_start
globl ap_trampoline_start
globl ap_trampoline_end text
+code16 ax movw ds movw es
+movw ss mov al mov dx outb
+dx lgdt ap_trampoline_gdt_limit
+ap_trampoline_start movl eax
+orl eax movl cr0 code32 byte
+x66 ljmp ap_trampoline_32
+ap_trampoline_start al mov
+dx outb dx mov ax mov ds mov
+es mov fs mov gs mov 
ax
globl ap_trampoline_end text
+code16 ax movw ds movw es
+movw ss mov al mov dx outb
+dx lgdt ap_trampoline_gdt_limit
+ap_trampoline_start movl eax
+orl eax movl cr0 code32 byte
+x66 ljmp ap_trampoline_32
+ap_trampoline_start al mov
+dx outb dx mov ax mov ds mov
+es mov fs mov 
ax
globl ap_trampoline_end text
+code16 ax movw ds movw es
+movw ss mov al mov dx outb
+dx lgdt ap_trampoline_gdt_limit
+ap_trampoline_start movl eax
+orl eax movl cr0 code32 byte
+x66 ljmp ap_trampoline_32
+ap_trampoline_start al mov
+dx outb dx mov ax mov ds mov
+es mov 
ax
globl ap_trampoline_end text
+code16 ax movw ds movw es
+movw ss mov al mov dx outb
+dx lgdt ap_trampoline_gdt_limit
+ap_trampoline_start movl eax
+orl eax movl cr0 code32 byte
+x66 ljmp ap_trampoline_32
+ap_trampoline_start al mov
+dx outb dx mov ax mov ds mov 
ax
globl ap_trampoline_end text
+code16 ax movw ds movw es
+movw ss mov al mov dx outb
+dx lgdt ap_trampoline_gdt_limit
+ap_trampoline_start movl eax
+orl eax movl cr0 code32 byte
+x66 ljmp ap_trampoline_32
+ap_trampoline_start al mov
+dx outb dx mov ax mov 
ax
globl ap_trampoline_end text
+code16 ax movw ds movw es
+movw 
ax
globl ap_trampoline_end text
+code16 ax movw ds movw 
ax
globl ap_trampoline_end text
+code16 ax movw 
ax
globl ap_trampoline_end text
+code16 ax movw ds movw es
+movw ss mov al mov dx outb
+dx lgdt ap_trampoline_gdt_limit
+ap_trampoline_start movl eax
+orl eax movl cr0 code32 byte
+x66 ljmp ap_trampoline_32
+ap_trampoline_start al mov
+dx outb dx mov ax mov ds mov
+es mov fs mov gs mov ss mov
+ap_trampoline_spl edi eax
+eax 
cmp
globl ap_trampoline_end text
+code16 ax movw ds movw es
+movw ss mov al mov dx outb
+dx lgdt ap_trampoline_gdt_limit
+ap_trampoline_start movl 
cr0
globl ap_trampoline_end text
+code16 ax movw ds movw es
+movw ss mov al mov dx outb
+dx lgdt ap_trampoline_gdt_limit
+ap_trampoline_start movl eax
+orl eax movl 
eax
globl ap_trampoline_end text
+code16 ax movw ds movw es
+movw ss mov al mov dx outb
+dx lgdt ap_trampoline_gdt_limit
+ap_trampoline_start movl eax
+orl eax movl cr0 code32 byte
+x66 ljmp ap_trampoline_32
+ap_trampoline_start al mov
+dx outb dx mov ax mov ds mov
+es mov fs mov gs mov ss mov
+ap_trampoline_spl edi eax
+eax eax je ap_spl mov al mov
+dx outb dx mov ap_trampoline_stackptr
+ebx mov esp add ebx mov 
ebx
globl ap_trampoline_end text
+code16 ax movw ds movw es
+movw ss mov al mov dx outb
+dx lgdt ap_trampoline_gdt_limit
+ap_trampoline_start movl eax
+orl eax movl cr0 code32 byte
+x66 ljmp ap_trampoline_32
+ap_trampoline_start al mov
+dx outb dx mov ax mov ds mov
+es mov fs mov gs mov ss mov
+ap_trampoline_spl edi eax
+eax eax je ap_spl mov al mov
+dx outb dx mov ap_trampoline_stackptr
+ebx mov 
ebx
globl ap_trampoline_end text
+code16 ax movw ds movw es
+movw ss mov al mov dx outb
+dx lgdt ap_trampoline_gdt_limit
+ap_trampoline_start movl eax
+orl eax movl cr0 code32 byte
+x66 ljmp ap_trampoline_32
+ap_trampoline_start al mov
+dx outb dx mov ax mov ds mov
+es mov fs mov gs mov ss mov
+ap_trampoline_spl edi eax
+eax eax je ap_spl mov al mov
+dx outb dx mov ap_trampoline_stackptr
+ebx mov esp add ebx mov ap_trampoline_stackptr
+ap_trampoline_start mov al
+mov dx outb dx 
mov
globl ap_trampoline_end text
+code16 ax movw ds movw es
+movw ss mov al mov dx outb
+dx lgdt ap_trampoline_gdt_limit
+ap_trampoline_start movl eax
+orl eax movl cr0 code32 byte
+x66 ljmp 
x08
globl ap_trampoline_end text
+code16 ax movw ds movw es
+movw ss mov al mov dx outb
+dx lgdt ap_trampoline_gdt_limit
+ap_trampoline_start movl eax
+orl 
x1
globl ap_trampoline_end text
+code16 ax movw ds movw es
+movw ss mov al mov dx outb
+dx lgdt ap_trampoline_gdt_limit
+ap_trampoline_start movl eax
+orl eax movl cr0 code32 byte
+x66 ljmp ap_trampoline_32
+ap_trampoline_start al mov
+dx outb dx mov 
x10
globl ap_trampoline_end text
+code16 ax movw ds movw es
+movw ss mov al mov dx outb
+dx lgdt ap_trampoline_gdt_limit
+ap_trampoline_start movl eax
+orl eax movl cr0 code32 byte
+x66 ljmp ap_trampoline_32
+ap_trampoline_start al mov
+dx outb dx mov ax mov ds mov
+es mov fs mov gs mov ss mov
+ap_trampoline_spl edi eax
+eax eax je ap_spl mov al mov
+dx outb dx mov ap_trampoline_stackptr
+ebx mov esp add 
x1000
globl ap_trampoline_end text
+code16 ax movw ds movw es
+movw ss mov al mov dx outb
+dx lgdt ap_trampoline_gdt_limit
+ap_trampoline_start movl eax
+orl eax movl cr0 code32 byte
+x66 ljmp ap_trampoline_32
+ap_trampoline_start al mov
+dx outb dx mov ax mov ds mov
+es mov fs mov gs mov ss mov
+ap_trampoline_spl edi eax
+eax eax je ap_spl mov 
x30
globl ap_trampoline_end text
+code16 ax movw ds movw es
+movw ss mov al mov dx outb
+dx lgdt ap_trampoline_gdt_limit
+ap_trampoline_start movl eax
+orl eax movl cr0 code32 byte
+x66 ljmp ap_trampoline_32
+ap_trampoline_start al mov
+dx outb dx mov ax mov ds mov
+es mov fs mov gs mov ss mov
+ap_trampoline_spl edi eax
+eax eax je ap_spl mov al mov
+dx outb dx mov ap_trampoline_stackptr
+ebx mov esp add ebx mov ap_trampoline_stackptr
+ap_trampoline_start mov 
x31
globl ap_trampoline_end text
+code16 ax movw ds movw es
+movw ss mov 
x31
globl ap_trampoline_end text
+code16 ax movw ds movw es
+movw ss mov al mov dx outb
+dx lgdt ap_trampoline_gdt_limit
+ap_trampoline_start movl eax
+orl eax movl cr0 code32 byte
+x66 ljmp ap_trampoline_32
+ap_trampoline_start al mov
+dx outb dx mov ax mov ds mov
+es mov fs mov gs mov ss mov
+ap_trampoline_spl edi eax
+eax eax je ap_spl mov al mov
+dx outb dx mov ap_trampoline_stackptr
+ebx mov esp add ebx mov ap_trampoline_stackptr
+ap_trampoline_start mov al
+mov dx outb dx eax mov ap_trampoline_spl
+edi eax mov 
x33
globl ap_trampoline_end text
+code16 ax movw ds movw es
+movw ss mov al mov dx outb
+dx lgdt ap_trampoline_gdt_limit
+ap_trampoline_start movl eax
+orl eax movl cr0 code32 byte
+x66 ljmp ap_trampoline_32
+ap_trampoline_start al mov
+dx outb dx mov ax mov ds mov
+es mov fs mov gs mov ss mov
+ap_trampoline_spl edi eax
+eax eax je ap_spl mov al mov
+dx outb dx mov ap_trampoline_stackptr
+ebx mov esp add ebx mov ap_trampoline_stackptr
+ap_trampoline_start mov al
+mov dx outb dx eax mov ap_trampoline_spl
+edi eax mov al mov 
xe9
globl ap_trampoline_end text
+code16 ax movw ds movw es
+movw ss mov al mov dx outb
+dx lgdt ap_trampoline_gdt_limit
+ap_trampoline_start movl eax
+orl eax movl cr0 code32 byte
+x66 ljmp ap_trampoline_32
+ap_trampoline_start al mov
+dx outb dx mov ax mov ds mov
+es mov fs mov gs mov ss mov
+ap_trampoline_spl edi eax
+eax eax je ap_spl mov al mov
+dx outb dx mov ap_trampoline_stackptr
+ebx mov esp add ebx mov ap_trampoline_stackptr
+ap_trampoline_start mov al
+mov 
xe9
globl ap_trampoline_end text
+code16 ax movw ds movw es
+movw ss mov al mov dx outb
+dx lgdt ap_trampoline_gdt_limit
+ap_trampoline_start movl eax
+orl eax movl cr0 code32 byte
+x66 ljmp ap_trampoline_32
+ap_trampoline_start al mov
+dx outb dx mov ax mov ds mov
+es mov fs mov gs mov ss mov
+ap_trampoline_spl edi eax
+eax eax je ap_spl mov al mov 
xe9
globl ap_trampoline_end text
+code16 ax movw ds movw es
+movw ss mov al mov dx outb
+dx lgdt ap_trampoline_gdt_limit
+ap_trampoline_start movl eax
+orl eax movl cr0 code32 byte
+x66 ljmp ap_trampoline_32
+ap_trampoline_start al mov 
xe9
globl ap_trampoline_end text
+code16 ax movw ds movw es
+movw ss mov al mov 
xe9
+


Function Documentation

+ +
+
+ + + + + + + + + +
globl ap_trampoline_end text code16 ax movw ds movw es movw ss mov al mov dx outb dx lgdt ap_trampoline_gdt_limit ap_trampoline_start movl eax orl eax movl cr0 code32 byte x66 ljmp ap_trampoline_32 ap_trampoline_start al mov dx outb dx mov ax mov ds mov es mov fs mov gs mov ss mov ap_trampoline_spl edi eax eax eax je ap_spl mov al mov dx outb dx mov ap_trampoline_stackptr ebx mov esp add ebx mov ap_trampoline_stackptr ap_trampoline_start mov al mov dx outb dx eax mov ap_trampoline_spl edi xchgl ( edi  ) 
+
+
+ +

+ +

+

+


Variable Documentation

+ +
+
+ + + + +
globl ap_trampoline_end text code16 ax movw ds movw es movw ss mov al mov dx outb dx lgdt ap_trampoline_gdt_limit ap_trampoline_start movl eax orl eax movl cr0 code32 byte x66 ljmp ap_trampoline_32 ap_trampoline_start al mov dx outb dx mov ax mov ds mov es mov fs mov gs mov ss mov ap_trampoline_spl edi eax eax eax je ap_spl mov al mov dx outb dx mov ap_trampoline_stackptr ebx mov esp add ebx mov ap_trampoline_stackptr ap_trampoline_start mov al mov dx outb dx eax mov ap_trampoline_spl edi eax mov al mov dx outb al
+
+
+ +

+ +

+Definition at line 75 of file ap-boot.S. +

+

+ +

+
+ + + + +
globl ap_trampoline_end text code16 ax movw ds movw es movw ss mov al mov dx outb dx lgdt ap_trampoline_gdt_limit ap_trampoline_start movl eax orl eax movl cr0 code32 byte x66 ljmp ap_trampoline_32 ap_trampoline_start al mov dx outb dx mov ax mov ds mov es mov fs mov gs mov ss mov ap_trampoline_spl edi eax eax eax je ap_spl mov al mov dx outb dx mov ap_trampoline_stackptr ebx mov esp add ebx mov ap_trampoline_stackptr ap_trampoline_start mov al mov dx outb al
+
+
+ +

+ +

+Definition at line 52 of file ap-boot.S. +

+

+ +

+
+ + + + +
globl ap_trampoline_end text code16 ax movw ds movw es movw ss mov al mov dx outb dx lgdt ap_trampoline_gdt_limit ap_trampoline_start movl eax orl eax movl cr0 code32 byte x66 ljmp ap_trampoline_32 ap_trampoline_start al mov dx outb dx mov ax mov ds mov es mov fs mov gs mov ss mov ap_trampoline_spl edi eax eax eax je ap_spl mov al mov dx outb al
+
+
+ +

+ +

+Definition at line 52 of file ap-boot.S. +

+

+ +

+
+ + + + +
globl ap_trampoline_end text code16 ax movw ds movw es movw ss mov al mov dx outb dx lgdt ap_trampoline_gdt_limit ap_trampoline_start movl eax orl eax movl cr0 code32 byte x66 ljmp ap_trampoline_32 ap_trampoline_start al mov dx outb al
+
+
+ +

+ +

+Definition at line 6 of file ap-boot.S. +

+

+ +

+
+ + + + +
globl ap_trampoline_end text code16 ax movw ds movw es movw ss mov al mov dx outb al
+
+
+ +

+ +

+Definition at line 6 of file ap-boot.S. +

+

+ +

+
+ + + + +
globl ap_trampoline_end text code16 ax movw ds movw es movw ss mov al mov dx outb dx lgdt ap_trampoline_gdt_limit ap_trampoline_start movl eax orl eax movl cr0 code32 byte x66 ljmp ap_trampoline_32 ap_trampoline_start al mov dx outb dx mov ax mov ds mov es mov fs mov gs mov ss mov ap_trampoline_spl edi ap_spl
+
+
+ +

+ +

+Definition at line 6 of file ap-boot.S. +

+

+ +

+
+ + + + +
globl ap_trampoline_end text code16 ax movw ds movw es movw ss mov al mov dx outb dx lgdt ap_trampoline_gdt_limit ap_trampoline_start movl eax orl eax movl cr0 code32 byte x66 ljmp ap_trampoline_32 ap_trampoline_start ap_trampoline_32
+
+
+ +

+ +

+Definition at line 6 of file ap-boot.S. +

+

+ +

+
+ + + + +
globl ap_trampoline_end text code16 ax movw ds movw es movw ss mov al mov dx outb dx lgdt ap_trampoline_gdt_limit ap_trampoline_start movl eax orl eax movl cr0 code32 byte x66 ljmp ap_trampoline_32 ap_trampoline_start al mov dx outb dx mov ax mov ds mov es mov fs mov gs mov ss mov ap_trampoline_spl edi eax eax eax je ap_spl mov al mov dx outb dx mov ap_trampoline_stackptr ebx mov esp add ebx mov ap_trampoline_stackptr ap_trampoline_start mov al mov dx outb dx eax mov ap_trampoline_spl edi eax mov al mov dx outb dx mov ap_trampoline_epoint
+
+
+ +

+ +

+Definition at line 75 of file ap-boot.S. +

+

+ +

+
+ + + + +
globl ap_trampoline_end text code16 ax movw ds movw es movw ss mov al mov dx outb dx lgdt ap_trampoline_gdt_limit ap_trampoline_start movl eax orl eax movl cr0 code32 byte x66 ljmp ap_trampoline_32 ap_trampoline_start al mov dx outb dx mov ax mov ds mov es mov fs mov gs mov ss mov ap_trampoline_spl edi eax eax eax je ap_spl mov al mov dx outb dx mov ap_trampoline_stackptr ebx mov esp add ebx mov ap_trampoline_stackptr ap_trampoline_start mov al mov dx outb dx eax mov ap_trampoline_spl ap_trampoline_start
+
+
+ +

+ +

+Definition at line 52 of file ap-boot.S. +

+

+ +

+
+ + + + +
globl ap_trampoline_end text code16 ax movw ds movw es movw ss mov al mov dx outb dx lgdt ap_trampoline_gdt_limit ap_trampoline_start movl eax orl eax movl cr0 code32 byte x66 ljmp ap_trampoline_32 ap_trampoline_start al mov dx outb dx mov ax mov ds mov es mov fs mov gs mov ss mov ap_trampoline_spl edi eax eax eax je ap_spl mov al mov dx outb dx mov ap_trampoline_stackptr ap_trampoline_start
+
+
+ +

+ +

+Definition at line 52 of file ap-boot.S. +

+

+ +

+
+ + + + +
globl ap_trampoline_end text code16 ax movw ds movw es movw ss mov al mov dx outb dx lgdt ap_trampoline_gdt_limit ap_trampoline_start movl eax orl eax movl cr0 code32 byte x66 ljmp ap_trampoline_32 ap_trampoline_start al mov dx outb dx mov ax mov ds mov es mov fs mov gs mov ss mov ap_trampoline_spl ap_trampoline_start
+
+
+ +

+ +

+Definition at line 6 of file ap-boot.S. +

+

+ +

+
+ + + + +
globl ap_trampoline_end text code16 ap_trampoline_start
+
+
+ +

+ +

+Definition at line 6 of file ap-boot.S. +

+

+ +

+
+ + + + +
globl ap_trampoline_start
+
+
+ +

+ +

+Definition at line 6 of file ap-boot.S. +

+Referenced by apicMagic(). +

+

+ +

+
+ + + + +
globl ap_trampoline_end text code16 ax movw ds movw es movw ss mov al mov dx outb dx lgdt ap_trampoline_gdt_limit ap_trampoline_start movl eax orl eax movl cr0 code32 byte x66 ljmp ap_trampoline_32 ap_trampoline_start al mov dx outb dx mov ax mov ds mov es mov fs mov gs mov ax
+
+
+ +

+ +

+Definition at line 6 of file ap-boot.S. +

+

+ +

+
+ + + + +
globl ap_trampoline_end text code16 ax movw ds movw es movw ss mov al mov dx outb dx lgdt ap_trampoline_gdt_limit ap_trampoline_start movl eax orl eax movl cr0 code32 byte x66 ljmp ap_trampoline_32 ap_trampoline_start al mov dx outb dx mov ax mov ds mov es mov fs mov ax
+
+
+ +

+ +

+Definition at line 6 of file ap-boot.S. +

+

+ +

+
+ + + + +
globl ap_trampoline_end text code16 ax movw ds movw es movw ss mov al mov dx outb dx lgdt ap_trampoline_gdt_limit ap_trampoline_start movl eax orl eax movl cr0 code32 byte x66 ljmp ap_trampoline_32 ap_trampoline_start al mov dx outb dx mov ax mov ds mov es mov ax
+
+
+ +

+ +

+Definition at line 6 of file ap-boot.S. +

+

+ +

+
+ + + + +
globl ap_trampoline_end text code16 ax movw ds movw es movw ss mov al mov dx outb dx lgdt ap_trampoline_gdt_limit ap_trampoline_start movl eax orl eax movl cr0 code32 byte x66 ljmp ap_trampoline_32 ap_trampoline_start al mov dx outb dx mov ax mov ds mov ax
+
+
+ +

+ +

+Definition at line 6 of file ap-boot.S. +

+

+ +

+
+ + + + +
globl ap_trampoline_end text code16 ax movw ds movw es movw ss mov al mov dx outb dx lgdt ap_trampoline_gdt_limit ap_trampoline_start movl eax orl eax movl cr0 code32 byte x66 ljmp ap_trampoline_32 ap_trampoline_start al mov dx outb dx mov ax mov ax
+
+
+ +

+ +

+Definition at line 6 of file ap-boot.S. +

+

+ +

+
+ + + + +
globl ap_trampoline_end text code16 ax movw ds movw es movw ax
+
+
+ +

+ +

+Definition at line 6 of file ap-boot.S. +

+

+ +

+
+ + + + +
globl ap_trampoline_end text code16 ax movw ds movw ax
+
+
+ +

+ +

+Definition at line 6 of file ap-boot.S. +

+

+ +

+
+ + + + +
globl ap_trampoline_end text code16 ax movw ax
+
+
+ +

+ +

+Definition at line 6 of file ap-boot.S. +

+

+ +

+
+ + + + +
globl ap_trampoline_end text code16 ax movw ds movw es movw ss mov al mov dx outb dx lgdt ap_trampoline_gdt_limit ap_trampoline_start movl eax orl eax movl cr0 code32 byte x66 ljmp ap_trampoline_32 ap_trampoline_start al mov dx outb dx mov ax mov ds mov es mov fs mov gs mov ss mov ap_trampoline_spl edi eax eax cmp
+
+
+ +

+ +

+Definition at line 52 of file ap-boot.S. +

+

+ +

+
+ + + + +
globl ap_trampoline_end text code16 ax movw ds movw es movw ss mov al mov dx outb dx lgdt ap_trampoline_gdt_limit ap_trampoline_start movl cr0
+
+
+ +

+ +

+Definition at line 6 of file ap-boot.S. +

+Referenced by countMemory(). +

+

+ +

+
+ + + + +
globl ap_trampoline_end text code16 ax movw ds movw es movw ss mov al mov dx outb dx lgdt ap_trampoline_gdt_limit ap_trampoline_start movl eax orl eax movl eax
+
+
+ +

+ +

+Definition at line 6 of file ap-boot.S. +

+

+ +

+
+ + + + +
globl ap_trampoline_end text code16 ax movw ds movw es movw ss mov al mov dx outb dx lgdt ap_trampoline_gdt_limit ap_trampoline_start movl eax orl eax movl cr0 code32 byte x66 ljmp ap_trampoline_32 ap_trampoline_start al mov dx outb dx mov ax mov ds mov es mov fs mov gs mov ss mov ap_trampoline_spl edi eax eax eax je ap_spl mov al mov dx outb dx mov ap_trampoline_stackptr ebx mov esp add ebx mov ebx
+
+
+ +

+ +

+Definition at line 52 of file ap-boot.S. +

+

+ +

+
+ + + + +
globl ap_trampoline_end text code16 ax movw ds movw es movw ss mov al mov dx outb dx lgdt ap_trampoline_gdt_limit ap_trampoline_start movl eax orl eax movl cr0 code32 byte x66 ljmp ap_trampoline_32 ap_trampoline_start al mov dx outb dx mov ax mov ds mov es mov fs mov gs mov ss mov ap_trampoline_spl edi eax eax eax je ap_spl mov al mov dx outb dx mov ap_trampoline_stackptr ebx mov ebx
+
+
+ +

+ +

+Definition at line 52 of file ap-boot.S. +

+

+ +

+
+ + + + +
globl ap_trampoline_end text code16 ax movw ds movw es movw ss mov al mov dx outb dx lgdt ap_trampoline_gdt_limit ap_trampoline_start movl eax orl eax movl cr0 code32 byte x66 ljmp ap_trampoline_32 ap_trampoline_start al mov dx outb dx mov ax mov ds mov es mov fs mov gs mov ss mov ap_trampoline_spl edi eax eax eax je ap_spl mov al mov dx outb dx mov ap_trampoline_stackptr ebx mov esp add ebx mov ap_trampoline_stackptr ap_trampoline_start mov al mov dx outb dx mov
+
+
+ +

+ +

+Definition at line 52 of file ap-boot.S. +

+

+ +

+
+ + + + +
globl ap_trampoline_end text code16 ax movw ds movw es movw ss mov al mov dx outb dx lgdt ap_trampoline_gdt_limit ap_trampoline_start movl eax orl eax movl cr0 code32 byte x66 ljmp x08
+
+
+ +

+ +

+Definition at line 6 of file ap-boot.S. +

+

+ +

+
+ + + + +
globl ap_trampoline_end text code16 ax movw ds movw es movw ss mov al mov dx outb dx lgdt ap_trampoline_gdt_limit ap_trampoline_start movl eax orl x1
+
+ +

+ +

+
+ + + + +
globl ap_trampoline_end text code16 ax movw ds movw es movw ss mov al mov dx outb dx lgdt ap_trampoline_gdt_limit ap_trampoline_start movl eax orl eax movl cr0 code32 byte x66 ljmp ap_trampoline_32 ap_trampoline_start al mov dx outb dx mov x10
+
+
+ +

+ +

+Definition at line 6 of file ap-boot.S. +

+Referenced by pciProbe(), and systemTask(). +

+

+ +

+
+ + + + +
globl ap_trampoline_end text code16 ax movw ds movw es movw ss mov al mov dx outb dx lgdt ap_trampoline_gdt_limit ap_trampoline_start movl eax orl eax movl cr0 code32 byte x66 ljmp ap_trampoline_32 ap_trampoline_start al mov dx outb dx mov ax mov ds mov es mov fs mov gs mov ss mov ap_trampoline_spl edi eax eax eax je ap_spl mov al mov dx outb dx mov ap_trampoline_stackptr ebx mov esp add x1000
+
+ +

+ +

+
+ + + + +
globl ap_trampoline_end text code16 ax movw ds movw es movw ss mov al mov dx outb dx lgdt ap_trampoline_gdt_limit ap_trampoline_start movl eax orl eax movl cr0 code32 byte x66 ljmp ap_trampoline_32 ap_trampoline_start al mov dx outb dx mov ax mov ds mov es mov fs mov gs mov ss mov ap_trampoline_spl edi eax eax eax je ap_spl mov x30
+
+
+ +

+ +

+Definition at line 52 of file ap-boot.S. +

+Referenced by cpuInfo(), execFile(), and hdWrite(). +

+

+ +

+
+ + + + +
globl ap_trampoline_end text code16 ax movw ds movw es movw ss mov al mov dx outb dx lgdt ap_trampoline_gdt_limit ap_trampoline_start movl eax orl eax movl cr0 code32 byte x66 ljmp ap_trampoline_32 ap_trampoline_start al mov dx outb dx mov ax mov ds mov es mov fs mov gs mov ss mov ap_trampoline_spl edi eax eax eax je ap_spl mov al mov dx outb dx mov ap_trampoline_stackptr ebx mov esp add ebx mov ap_trampoline_stackptr ap_trampoline_start mov x31
+
+
+ +

+ +

+Definition at line 52 of file ap-boot.S. +

+

+ +

+
+ + + + +
globl ap_trampoline_end text code16 ax movw ds movw es movw ss mov x31
+
+
+ +

+ +

+Definition at line 6 of file ap-boot.S. +

+

+ +

+
+ + + + +
globl ap_trampoline_end text code16 ax movw ds movw es movw ss mov al mov dx outb dx lgdt ap_trampoline_gdt_limit ap_trampoline_start movl eax orl eax movl cr0 code32 byte x66 ljmp ap_trampoline_32 ap_trampoline_start al mov dx outb dx mov ax mov ds mov es mov fs mov gs mov ss mov ap_trampoline_spl edi eax eax eax je ap_spl mov al mov dx outb dx mov ap_trampoline_stackptr ebx mov esp add ebx mov ap_trampoline_stackptr ap_trampoline_start mov al mov dx outb dx eax mov ap_trampoline_spl edi eax mov x33
+
+
+ +

+ +

+Definition at line 75 of file ap-boot.S. +

+

+ +

+
+ + + + +
globl ap_trampoline_end text code16 ax movw ds movw es movw ss mov al mov dx outb dx lgdt ap_trampoline_gdt_limit ap_trampoline_start movl eax orl eax movl cr0 code32 byte x66 ljmp ap_trampoline_32 ap_trampoline_start al mov dx outb dx mov ax mov ds mov es mov fs mov gs mov ss mov ap_trampoline_spl edi eax eax eax je ap_spl mov al mov dx outb dx mov ap_trampoline_stackptr ebx mov esp add ebx mov ap_trampoline_stackptr ap_trampoline_start mov al mov dx outb dx eax mov ap_trampoline_spl edi eax mov al mov xe9
+
+
+ +

+ +

+Definition at line 75 of file ap-boot.S. +

+

+ +

+
+ + + + +
globl ap_trampoline_end text code16 ax movw ds movw es movw ss mov al mov dx outb dx lgdt ap_trampoline_gdt_limit ap_trampoline_start movl eax orl eax movl cr0 code32 byte x66 ljmp ap_trampoline_32 ap_trampoline_start al mov dx outb dx mov ax mov ds mov es mov fs mov gs mov ss mov ap_trampoline_spl edi eax eax eax je ap_spl mov al mov dx outb dx mov ap_trampoline_stackptr ebx mov esp add ebx mov ap_trampoline_stackptr ap_trampoline_start mov al mov xe9
+
+
+ +

+ +

+Definition at line 52 of file ap-boot.S. +

+

+ +

+
+ + + + +
globl ap_trampoline_end text code16 ax movw ds movw es movw ss mov al mov dx outb dx lgdt ap_trampoline_gdt_limit ap_trampoline_start movl eax orl eax movl cr0 code32 byte x66 ljmp ap_trampoline_32 ap_trampoline_start al mov dx outb dx mov ax mov ds mov es mov fs mov gs mov ss mov ap_trampoline_spl edi eax eax eax je ap_spl mov al mov xe9
+
+
+ +

+ +

+Definition at line 52 of file ap-boot.S. +

+

+ +

+
+ + + + +
globl ap_trampoline_end text code16 ax movw ds movw es movw ss mov al mov dx outb dx lgdt ap_trampoline_gdt_limit ap_trampoline_start movl eax orl eax movl cr0 code32 byte x66 ljmp ap_trampoline_32 ap_trampoline_start al mov xe9
+
+
+ +

+ +

+Definition at line 6 of file ap-boot.S. +

+

+ +

+
+ + + + +
globl ap_trampoline_end text code16 ax movw ds movw es movw ss mov al mov xe9
+
+
+ +

+ +

+Definition at line 6 of file ap-boot.S. +

+Referenced by c_ap_boot(). +

+

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/api_8h-source.html b/doc/html/api_8h-source.html new file mode 100644 index 0000000..0244027 --- /dev/null +++ b/doc/html/api_8h-source.html @@ -0,0 +1,179 @@ + + +UbixOS V2: src/sys/include/net/api.h Source File + + + + +
+
+
+
+ +

api.h

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 #ifndef __LWIP_API_H__
+00036 #define __LWIP_API_H__
+00037 
+00038 #include "net/opt.h"
+00039 #include "net/pbuf.h"
+00040 #include "net/sys.h"
+00041 
+00042 #include "net/ipv4/ip.h"
+00043 
+00044 #include "net/udp.h"
+00045 #include "net/tcp.h"
+00046 
+00047 #include "net/err.h"
+00048 
+00049 #define NETCONN_NOCOPY 0x00
+00050 #define NETCONN_COPY   0x01
+00051 
+00052 enum netconn_type {
+00053   NETCONN_TCP,
+00054   NETCONN_UDP,
+00055   NETCONN_UDPLITE,
+00056   NETCONN_UDPNOCHKSUM
+00057 };
+00058 
+00059 enum netconn_state {
+00060   NETCONN_NONE,
+00061   NETCONN_WRITE,
+00062   NETCONN_ACCEPT,
+00063   NETCONN_RECV,
+00064   NETCONN_CONNECT,
+00065   NETCONN_CLOSE
+00066 };
+00067 
+00068 struct netbuf {
+00069   struct pbuf *p, *ptr;
+00070   struct ip_addr *fromaddr;
+00071   uInt16 fromport;
+00072   err_t err;
+00073 };
+00074 
+00075 struct netconn {
+00076   enum netconn_type type;
+00077   enum netconn_state state;
+00078   union {
+00079     struct tcp_pcb *tcp;
+00080     struct udp_pcb *udp;
+00081   } pcb;
+00082   err_t err;
+00083   sys_mbox_t mbox;
+00084   sys_mbox_t recvmbox;
+00085   sys_mbox_t acceptmbox;
+00086   sys_sem_t sem;
+00087 };
+00088 
+00089 /* Network buffer functions: */
+00090 struct netbuf *   netbuf_new      (void);
+00091 void              netbuf_delete   (struct netbuf *buf);
+00092 void *            netbuf_alloc    (struct netbuf *buf, uInt16 size);
+00093 void              netbuf_free     (struct netbuf *buf);
+00094 void              netbuf_ref      (struct netbuf *buf,
+00095                                    void *dataptr, uInt16 size);
+00096 void              netbuf_chain    (struct netbuf *head,
+00097                                    struct netbuf *tail);
+00098 
+00099 uInt16             netbuf_len      (struct netbuf *buf);
+00100 err_t             netbuf_data     (struct netbuf *buf,
+00101                                    void **dataptr, uInt16 *len);
+00102 Int8              netbuf_next     (struct netbuf *buf);
+00103 void              netbuf_first    (struct netbuf *buf);
+00104 
+00105 void              netbuf_copy     (struct netbuf *buf,
+00106                                    void *dataptr, uInt16 len);
+00107 struct ip_addr *  netbuf_fromaddr (struct netbuf *buf);
+00108 uInt16             netbuf_fromport (struct netbuf *buf);
+00109 
+00110 /* Network connection functions: */
+00111 struct netconn *  netconn_new     (enum netconn_type type);
+00112 err_t             netconn_delete  (struct netconn *conn);
+00113 enum netconn_type netconn_type    (struct netconn *conn);
+00114 err_t             netconn_peer    (struct netconn *conn,
+00115                                    struct ip_addr **addr,
+00116                                    uInt16 *port);
+00117 err_t             netconn_addr    (struct netconn *conn,
+00118                                    struct ip_addr **addr,
+00119                                    uInt16 *port);
+00120 err_t             netconn_bind    (struct netconn *conn,
+00121                                    struct ip_addr *addr,
+00122                                    uInt16 port);
+00123 err_t             netconn_connect (struct netconn *conn,
+00124                                    struct ip_addr *addr,
+00125                                    uInt16 port);
+00126 err_t             netconn_listen  (struct netconn *conn);
+00127 struct netconn *  netconn_accept  (struct netconn *conn);
+00128 struct netbuf *   netconn_recv    (struct netconn *conn);
+00129 err_t             netconn_send    (struct netconn *conn,
+00130                                    struct netbuf *buf);
+00131 err_t             netconn_write   (struct netconn *conn,
+00132                                    void *dataptr, uInt16 size,
+00133                                    uInt8 copy);
+00134 err_t             netconn_close   (struct netconn *conn);
+00135 
+00136 err_t             netconn_err     (struct netconn *conn);
+00137 
+00138 void netbuf_copy_partial(struct netbuf *buf, void *dataptr, uInt16 len, uInt16 offset);
+00139 
+00140 #endif /* __LWIP_API_H__ */
+00141 
+00142 
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/api_8h.html b/doc/html/api_8h.html new file mode 100644 index 0000000..4b99dd8 --- /dev/null +++ b/doc/html/api_8h.html @@ -0,0 +1,1125 @@ + + +UbixOS V2: src/sys/include/net/api.h File Reference + + + + +
+
+
+
+ +

api.h File Reference

+

+#include "net/opt.h"
+#include "net/pbuf.h"
+#include "net/sys.h"
+#include "net/ipv4/ip.h"
+#include "net/udp.h"
+#include "net/tcp.h"
+#include "net/err.h"
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  netbuf
struct  netconn

Defines

#define NETCONN_COPY   0x01
#define NETCONN_NOCOPY   0x00

Enumerations

enum  netconn_state {
+  NETCONN_NONE, +NETCONN_WRITE, +NETCONN_ACCEPT, +NETCONN_RECV, +
+  NETCONN_CONNECT, +NETCONN_CLOSE +
+ }
enum  netconn_type { NETCONN_TCP, +NETCONN_UDP, +NETCONN_UDPLITE, +NETCONN_UDPNOCHKSUM + }

Functions

void * netbuf_alloc (struct netbuf *buf, uInt16 size)
void netbuf_chain (struct netbuf *head, struct netbuf *tail)
void netbuf_copy (struct netbuf *buf, void *dataptr, uInt16 len)
void netbuf_copy_partial (struct netbuf *buf, void *dataptr, uInt16 len, uInt16 offset)
err_t netbuf_data (struct netbuf *buf, void **dataptr, uInt16 *len)
void netbuf_delete (struct netbuf *buf)
void netbuf_first (struct netbuf *buf)
void netbuf_free (struct netbuf *buf)
ip_addrnetbuf_fromaddr (struct netbuf *buf)
uInt16 netbuf_fromport (struct netbuf *buf)
uInt16 netbuf_len (struct netbuf *buf)
netbufnetbuf_new (void)
Int8 netbuf_next (struct netbuf *buf)
void netbuf_ref (struct netbuf *buf, void *dataptr, uInt16 size)
netconnnetconn_accept (struct netconn *conn)
err_t netconn_addr (struct netconn *conn, struct ip_addr **addr, uInt16 *port)
err_t netconn_bind (struct netconn *conn, struct ip_addr *addr, uInt16 port)
err_t netconn_close (struct netconn *conn)
err_t netconn_connect (struct netconn *conn, struct ip_addr *addr, uInt16 port)
err_t netconn_delete (struct netconn *conn)
err_t netconn_err (struct netconn *conn)
err_t netconn_listen (struct netconn *conn)
netconnnetconn_new (enum netconn_type type)
err_t netconn_peer (struct netconn *conn, struct ip_addr **addr, uInt16 *port)
netbufnetconn_recv (struct netconn *conn)
err_t netconn_send (struct netconn *conn, struct netbuf *buf)
enum netconn_type netconn_type (struct netconn *conn)
err_t netconn_write (struct netconn *conn, void *dataptr, uInt16 size, uInt8 copy)
+


Define Documentation

+ +
+
+ + + + +
#define NETCONN_COPY   0x01
+
+
+ +

+ +

+Definition at line 50 of file api.h. +

+Referenced by lwip_send(), and lwip_write(). +

+

+ +

+
+ + + + +
#define NETCONN_NOCOPY   0x00
+
+
+ +

+ +

+Definition at line 49 of file api.h. +

+Referenced by sendstr(). +

+

+


Enumeration Type Documentation

+ +
+
+ + + + +
enum netconn_state
+
+
+ +

+

Enumerator:
+ + + + + + + +
NETCONN_NONE  +
NETCONN_WRITE  +
NETCONN_ACCEPT  +
NETCONN_RECV  +
NETCONN_CONNECT  +
NETCONN_CLOSE  +
+
+ +

+Definition at line 59 of file api.h. +

+

+ +

+
+ + + + +
enum netconn_type
+
+
+ +

+

Enumerator:
+ + + + + +
NETCONN_TCP  +
NETCONN_UDP  +
NETCONN_UDPLITE  +
NETCONN_UDPNOCHKSUM  +
+
+ +

+Definition at line 52 of file api.h. +

+

+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
void* netbuf_alloc (struct netbuf buf,
uInt16  size 
)
+
+
+ +

+ +

+Definition at line 78 of file api_lib.c. +

+References NULL, netbuf::p, pbuf::payload, pbuf_alloc(), pbuf_free(), PBUF_RAM, PBUF_TRANSPORT, and netbuf::ptr. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void netbuf_chain (struct netbuf head,
struct netbuf tail 
)
+
+
+ +

+ +

+Definition at line 114 of file api_lib.c. +

+References memp_freep(), MEMP_NETBUF, netbuf::p, pbuf_chain(), and netbuf::ptr. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void netbuf_copy (struct netbuf buf,
void *  dataptr,
uInt16  len 
)
+
+
+ +

+ +

+Definition at line 186 of file api_lib.c. +

+References netbuf_copy_partial(). +

+Referenced by bot_thread(), shell_main(), and udpecho_thread(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void netbuf_copy_partial (struct netbuf buf,
void *  dataptr,
uInt16  len,
uInt16  offset 
)
+
+
+ +

+ +

+Definition at line 158 of file api_lib.c. +

+References pbuf::len, pbuf::next, NULL, netbuf::p, and pbuf::payload. +

+Referenced by lwip_recvfrom(), and netbuf_copy(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
err_t netbuf_data (struct netbuf buf,
void **  dataptr,
uInt16 len 
)
+
+
+ +

+ +

+Definition at line 128 of file api_lib.c. +

+References ERR_BUF, ERR_OK, pbuf::len, NULL, pbuf::payload, and netbuf::ptr. +

+

+ +

+
+ + + + + + + + + +
void netbuf_delete (struct netbuf buf  ) 
+
+ +

+ +

+
+ + + + + + + + + +
void netbuf_first (struct netbuf buf  ) 
+
+
+ +

+ +

+Definition at line 152 of file api_lib.c. +

+References netbuf::p, and netbuf::ptr. +

+

+ +

+
+ + + + + + + + + +
void netbuf_free (struct netbuf buf  ) 
+
+
+ +

+ +

+Definition at line 93 of file api_lib.c. +

+References NULL, netbuf::p, pbuf_free(), and netbuf::ptr. +

+

+ +

+
+ + + + + + + + + +
struct ip_addr* netbuf_fromaddr (struct netbuf buf  ) 
+
+
+ +

+ +

+Definition at line 192 of file api_lib.c. +

+References netbuf::fromaddr. +

+Referenced by lwip_recvfrom(), and udpecho_thread(). +

+

+ +

+
+ + + + + + + + + +
uInt16 netbuf_fromport (struct netbuf buf  ) 
+
+
+ +

+ +

+Definition at line 198 of file api_lib.c. +

+References netbuf::fromport. +

+Referenced by lwip_recvfrom(), and udpecho_thread(). +

+

+ +

+
+ + + + + + + + + +
uInt16 netbuf_len (struct netbuf buf  ) 
+
+
+ +

+ +

+Definition at line 122 of file api_lib.c. +

+References netbuf::p, and pbuf::tot_len. +

+Referenced by bot_thread(), lwip_recvfrom(), and shell_main(). +

+

+ +

+
+ + + + + + + + + +
struct netbuf* netbuf_new (void   ) 
+
+
+ +

+ +

+Definition at line 51 of file api_lib.c. +

+References memp_mallocp(), MEMP_NETBUF, NULL, netbuf::p, and netbuf::ptr. +

+Referenced by lwip_send(). +

+

+ +

+
+ + + + + + + + + +
Int8 netbuf_next (struct netbuf buf  ) 
+
+
+ +

+ +

+Definition at line 139 of file api_lib.c. +

+References pbuf::next, NULL, and netbuf::ptr. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void netbuf_ref (struct netbuf buf,
void *  dataptr,
uInt16  size 
)
+
+
+ +

+ +

+Definition at line 102 of file api_lib.c. +

+References pbuf::len, NULL, netbuf::p, pbuf::payload, pbuf_alloc(), pbuf_free(), PBUF_ROM, PBUF_TRANSPORT, netbuf::ptr, and pbuf::tot_len. +

+Referenced by lwip_send(). +

+

+ +

+
+ + + + + + + + + +
struct netconn* netconn_accept (struct netconn conn  ) 
+
+
+ +

+ +

+Definition at line 416 of file api_lib.c. +

+References netconn::acceptmbox, NULL, and sys_mbox_fetch(). +

+Referenced by lwip_accept(), and shell_thread(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
err_t netconn_addr (struct netconn conn,
struct ip_addr **  addr,
uInt16 port 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
err_t netconn_bind (struct netconn conn,
struct ip_addr addr,
uInt16  port 
)
+
+ +

+ +

+
+ + + + + + + + + +
err_t netconn_close (struct netconn conn  ) 
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
err_t netconn_connect (struct netconn conn,
struct ip_addr addr,
uInt16  port 
)
+
+ +

+ +

+
+ + + + + + + + + +
err_t netconn_delete (struct netconn conn  ) 
+
+ +

+ +

+
+ + + + + + + + + +
err_t netconn_err (struct netconn conn  ) 
+
+
+ +

+ +

+Definition at line 640 of file api_lib.c. +

+References netconn::err. +

+

+ +

+
+ + + + + + + + + +
err_t netconn_listen (struct netconn conn  ) 
+
+ +

+ +

+
+ + + + + + + + + +
struct netconn* netconn_new (enum netconn_type  type  ) 
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
err_t netconn_peer (struct netconn conn,
struct ip_addr **  addr,
uInt16 port 
)
+
+ +

+ +

+
+ + + + + + + + + +
struct netbuf* netconn_recv (struct netconn conn  ) 
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
err_t netconn_send (struct netconn conn,
struct netbuf buf 
)
+
+ +

+ +

+
+ + + + + + + + + +
enum netconn_type netconn_type (struct netconn conn  ) 
+
+
+ +

+ +

+Definition at line 281 of file api_lib.c. +

+References netconn::type. +

+Referenced by lwip_recvfrom(), lwip_send(), and lwip_write(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
err_t netconn_write (struct netconn conn,
void *  dataptr,
uInt16  size,
uInt8  copy 
)
+
+ +

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/api__lib_8c-source.html b/doc/html/api__lib_8c-source.html new file mode 100644 index 0000000..7a5d77d --- /dev/null +++ b/doc/html/api__lib_8c-source.html @@ -0,0 +1,685 @@ + + +UbixOS V2: src/sys/net/api/api_lib.c Source File + + + + +
+
+
+
+ +

api_lib.c

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 
+00036 /* This is the part of the API that is linked with
+00037    the application */
+00038 
+00039 #include <ubixos/types.h>
+00040 
+00041 #include "net/debug.h"
+00042 #include "net/api.h"
+00043 #include "net/api_msg.h"
+00044 #include "net/memp.h"
+00045 
+00046 #include "net/debug.h"
+00047 
+00048 #include "lib/kprintf.h"
+00049 /*-----------------------------------------------------------------------------------*/
+00050 struct
+00051 netbuf *netbuf_new(void)
+00052 {
+00053   struct netbuf *buf;
+00054 
+00055   buf = memp_mallocp(MEMP_NETBUF);
+00056   if(buf != NULL) {
+00057     buf->p = NULL;
+00058     buf->ptr = NULL;
+00059     return buf;
+00060   } else {
+00061     return NULL;
+00062   }
+00063 }
+00064 /*-----------------------------------------------------------------------------------*/
+00065 void
+00066 netbuf_delete(struct netbuf *buf)
+00067 {
+00068   if(buf != NULL) {
+00069     if(buf->p != NULL) {
+00070       pbuf_free(buf->p);
+00071       buf->p = buf->ptr = NULL;
+00072     }
+00073     memp_freep(MEMP_NETBUF, buf);
+00074   }
+00075 }
+00076 /*-----------------------------------------------------------------------------------*/
+00077 void *
+00078 netbuf_alloc(struct netbuf *buf, uInt16 size)
+00079 {
+00080   /* Deallocate any previously allocated memory. */
+00081   if(buf->p != NULL) {
+00082     pbuf_free(buf->p);
+00083   }
+00084   buf->p = pbuf_alloc(PBUF_TRANSPORT, size, PBUF_RAM);
+00085   if(buf->p == NULL) {
+00086      return NULL;
+00087   }
+00088   buf->ptr = buf->p;
+00089   return buf->p->payload;
+00090 }
+00091 /*-----------------------------------------------------------------------------------*/
+00092 void
+00093 netbuf_free(struct netbuf *buf)
+00094 {
+00095   if(buf->p != NULL) {
+00096     pbuf_free(buf->p);
+00097   }
+00098   buf->p = buf->ptr = NULL;
+00099 }
+00100 /*-----------------------------------------------------------------------------------*/
+00101 void
+00102 netbuf_ref(struct netbuf *buf, void *dataptr, uInt16 size)
+00103 {
+00104   if(buf->p != NULL) {
+00105     pbuf_free(buf->p);
+00106   }
+00107   buf->p = pbuf_alloc(PBUF_TRANSPORT, 0, PBUF_ROM);
+00108   buf->p->payload = dataptr;
+00109   buf->p->len = buf->p->tot_len = size;
+00110   buf->ptr = buf->p;
+00111 }
+00112 /*-----------------------------------------------------------------------------------*/
+00113 void
+00114 netbuf_chain(struct netbuf *head, struct netbuf *tail)
+00115 {
+00116   pbuf_chain(head->p, tail->p);
+00117   head->ptr = head->p;
+00118   memp_freep(MEMP_NETBUF, tail);
+00119 }
+00120 /*-----------------------------------------------------------------------------------*/
+00121 uInt16
+00122 netbuf_len(struct netbuf *buf)
+00123 {
+00124   return buf->p->tot_len;
+00125 }
+00126 /*-----------------------------------------------------------------------------------*/
+00127 err_t
+00128 netbuf_data(struct netbuf *buf, void **dataptr, uInt16 *len)
+00129 {
+00130   if(buf->ptr == NULL) {
+00131     return ERR_BUF;
+00132   }
+00133   *dataptr = buf->ptr->payload;
+00134   *len = buf->ptr->len;
+00135   return ERR_OK;
+00136 }
+00137 /*-----------------------------------------------------------------------------------*/
+00138 Int8
+00139 netbuf_next(struct netbuf *buf)
+00140 {
+00141   if(buf->ptr->next == NULL) {
+00142     return -1;
+00143   }
+00144   buf->ptr = buf->ptr->next;
+00145   if(buf->ptr->next == NULL) {
+00146     return 1;
+00147   }
+00148   return 0;
+00149 }
+00150 /*-----------------------------------------------------------------------------------*/
+00151 void
+00152 netbuf_first(struct netbuf *buf)
+00153 {
+00154   buf->ptr = buf->p;
+00155 }
+00156 /*-----------------------------------------------------------------------------------*/
+00157 void
+00158 netbuf_copy_partial(struct netbuf *buf, void *dataptr, uInt16 len, uInt16 offset)
+00159 {
+00160   struct pbuf *p;
+00161   uInt16 i, left;
+00162 
+00163   left = 0;
+00164 
+00165   if(buf == NULL) {
+00166     return;
+00167   }
+00168   
+00169   /* This implementation is bad. It should use bcopy
+00170      instead. */
+00171   for(p = buf->p; left < len && p != NULL; p = p->next) {
+00172     if(offset != 0 && offset >= p->len) {
+00173       offset -= p->len;
+00174     } else {    
+00175       for(i = offset; i < p->len; ++i) {
+00176         ((char *)dataptr)[left] = ((char *)p->payload)[i];
+00177         if(++left >= len) {
+00178           return;
+00179         }
+00180       }
+00181     }
+00182   }
+00183 }
+00184 /*-----------------------------------------------------------------------------------*/
+00185 void
+00186 netbuf_copy(struct netbuf *buf, void *dataptr, uInt16 len)
+00187 {
+00188   netbuf_copy_partial(buf, dataptr, len, 0);
+00189 }
+00190 /*-----------------------------------------------------------------------------------*/
+00191 struct ip_addr *
+00192 netbuf_fromaddr(struct netbuf *buf)
+00193 {
+00194   return buf->fromaddr;
+00195 }
+00196 /*-----------------------------------------------------------------------------------*/
+00197 uInt16
+00198 netbuf_fromport(struct netbuf *buf)
+00199 {
+00200   return buf->fromport;
+00201 }
+00202 /*-----------------------------------------------------------------------------------*/
+00203 struct
+00204 netconn *netconn_new(enum netconn_type t)
+00205 {
+00206   struct netconn *conn;
+00207 
+00208   conn = memp_mallocp(MEMP_NETCONN);
+00209   if(conn == NULL) {
+00210     return NULL;
+00211   }
+00212   conn->type = t;
+00213   conn->pcb.tcp = NULL;
+00214 
+00215   if((conn->mbox = sys_mbox_new()) == SYS_MBOX_NULL) {
+00216     memp_freep(MEMP_NETCONN, conn);
+00217     return NULL;
+00218   }
+00219   conn->recvmbox = SYS_MBOX_NULL;
+00220   conn->acceptmbox = SYS_MBOX_NULL;
+00221   conn->sem = SYS_SEM_NULL;
+00222   conn->state = NETCONN_NONE;
+00223   return conn;
+00224 }
+00225 /*-----------------------------------------------------------------------------------*/
+00226 err_t
+00227 netconn_delete(struct netconn *conn)
+00228 {
+00229   struct api_msg *msg;
+00230   void *mem;
+00231   
+00232   if(conn == NULL) {
+00233     return ERR_OK;
+00234   }
+00235   
+00236   if((msg = memp_mallocp(MEMP_API_MSG)) == NULL) {
+00237     return ERR_MEM;
+00238   }
+00239   
+00240   msg->type = API_MSG_DELCONN;
+00241   msg->msg.conn = conn;
+00242   api_msg_post(msg);  
+00243   sys_mbox_fetch(conn->mbox, NULL);
+00244   memp_freep(MEMP_API_MSG, msg);
+00245 
+00246   /* Drain the recvmbox. */
+00247   if(conn->recvmbox != SYS_MBOX_NULL) {
+00248     while(sys_arch_mbox_fetch(conn->recvmbox, &mem, 1) != 0) {
+00249       if(conn->type == NETCONN_TCP) {
+00250         pbuf_free((struct pbuf *)mem);
+00251       } else {
+00252         netbuf_delete((struct netbuf *)mem);
+00253       }
+00254     }
+00255     sys_mbox_free(conn->recvmbox);
+00256     conn->recvmbox = SYS_MBOX_NULL;
+00257   }
+00258  
+00259 
+00260   /* Drain the acceptmbox. */
+00261   if(conn->acceptmbox != SYS_MBOX_NULL) {
+00262     while(sys_arch_mbox_fetch(conn->acceptmbox, &mem, 1) != 0) {
+00263       netconn_delete((struct netconn *)mem);
+00264     }
+00265     
+00266     sys_mbox_free(conn->acceptmbox);
+00267     conn->acceptmbox = SYS_MBOX_NULL;
+00268   }
+00269 
+00270   sys_mbox_free(conn->mbox);
+00271   conn->mbox = SYS_MBOX_NULL;
+00272   if(conn->sem != SYS_SEM_NULL) {
+00273     sys_sem_free(conn->sem);
+00274   }
+00275   /*  conn->sem = SYS_SEM_NULL;*/
+00276   memp_free(MEMP_NETCONN, conn);
+00277   return ERR_OK;
+00278 }
+00279 /*-----------------------------------------------------------------------------------*/
+00280 enum netconn_type
+00281 netconn_type(struct netconn *conn)
+00282 {
+00283   return conn->type;
+00284 }
+00285 /*-----------------------------------------------------------------------------------*/
+00286 err_t
+00287 netconn_peer(struct netconn *conn, struct ip_addr **addr,
+00288              uInt16 *port)
+00289 {
+00290   switch(conn->type) {
+00291   case NETCONN_UDPLITE:
+00292   case NETCONN_UDPNOCHKSUM:
+00293   case NETCONN_UDP:
+00294     *addr = &(conn->pcb.udp->remote_ip);
+00295     *port = conn->pcb.udp->remote_port;
+00296     break;
+00297   case NETCONN_TCP:
+00298     *addr = &(conn->pcb.tcp->remote_ip);
+00299     *port = conn->pcb.tcp->remote_port;
+00300     break;
+00301   }
+00302   return (conn->err = ERR_OK);
+00303 }
+00304 /*-----------------------------------------------------------------------------------*/
+00305 err_t
+00306 netconn_addr(struct netconn *conn, struct ip_addr **addr,
+00307              uInt16 *port)
+00308 {
+00309   switch(conn->type) {
+00310   case NETCONN_UDPLITE:
+00311   case NETCONN_UDPNOCHKSUM:
+00312   case NETCONN_UDP:
+00313     *addr = &(conn->pcb.udp->local_ip);
+00314     *port = conn->pcb.udp->local_port;
+00315     break;
+00316   case NETCONN_TCP:
+00317     *addr = &(conn->pcb.tcp->local_ip);
+00318     *port = conn->pcb.tcp->local_port;
+00319     break;
+00320   }
+00321   return (conn->err = ERR_OK);
+00322 }
+00323 /*-----------------------------------------------------------------------------------*/
+00324 err_t
+00325 netconn_bind(struct netconn *conn, struct ip_addr *addr,
+00326             uInt16 port)
+00327 {
+00328   struct api_msg *msg;
+00329 
+00330   if(conn == NULL) {
+00331     return ERR_VAL;
+00332   }
+00333 
+00334   if(conn->type != NETCONN_TCP &&
+00335      conn->recvmbox == SYS_MBOX_NULL) {
+00336     if((conn->recvmbox = sys_mbox_new()) == SYS_MBOX_NULL) {
+00337       return ERR_MEM;
+00338     }
+00339   }
+00340   
+00341   if((msg = memp_mallocp(MEMP_API_MSG)) == NULL) {
+00342     return (conn->err = ERR_MEM);
+00343   }
+00344   msg->type = API_MSG_BIND;
+00345   msg->msg.conn = conn;
+00346   msg->msg.msg.bc.ipaddr = addr;
+00347   msg->msg.msg.bc.port = port;
+00348   api_msg_post(msg);
+00349   sys_mbox_fetch(conn->mbox, NULL);
+00350   memp_freep(MEMP_API_MSG, msg);
+00351   return conn->err;
+00352 }
+00353 /*-----------------------------------------------------------------------------------*/
+00354 err_t
+00355 netconn_connect(struct netconn *conn, struct ip_addr *addr,
+00356                    uInt16 port)
+00357 {
+00358   struct api_msg *msg;
+00359   
+00360   if(conn == NULL) {
+00361     return ERR_VAL;
+00362   }
+00363 
+00364 
+00365   if(conn->recvmbox == SYS_MBOX_NULL) {
+00366     if((conn->recvmbox = sys_mbox_new()) == SYS_MBOX_NULL) {
+00367       return ERR_MEM;
+00368     }
+00369   }
+00370   
+00371   if((msg = memp_mallocp(MEMP_API_MSG)) == NULL) {
+00372     return ERR_MEM;
+00373   }
+00374   msg->type = API_MSG_CONNECT;
+00375   msg->msg.conn = conn;  
+00376   msg->msg.msg.bc.ipaddr = addr;
+00377   msg->msg.msg.bc.port = port;
+00378   kprintf("1");
+00379   api_msg_post(msg);
+00380   kprintf("2: [0x%X]",conn->mbox);
+00381   sys_mbox_fetch(conn->mbox, NULL);
+00382   kprintf("3");
+00383   memp_freep(MEMP_API_MSG, msg);
+00384   kprintf("4");
+00385   return conn->err;
+00386 }
+00387 /*-----------------------------------------------------------------------------------*/
+00388 err_t
+00389 netconn_listen(struct netconn *conn)
+00390 {
+00391   struct api_msg *msg;
+00392 
+00393   if(conn == NULL) {
+00394     return ERR_VAL;
+00395   }
+00396 
+00397   if(conn->acceptmbox == SYS_MBOX_NULL) {
+00398     conn->acceptmbox = sys_mbox_new();
+00399     if(conn->acceptmbox == SYS_MBOX_NULL) {
+00400       return ERR_MEM;
+00401     }
+00402   }
+00403   
+00404   if((msg = memp_mallocp(MEMP_API_MSG)) == NULL) {
+00405     return (conn->err = ERR_MEM);
+00406   }
+00407   msg->type = API_MSG_LISTEN;
+00408   msg->msg.conn = conn;
+00409   api_msg_post(msg);
+00410   sys_mbox_fetch(conn->mbox, NULL);
+00411   memp_freep(MEMP_API_MSG, msg);
+00412   return conn->err;
+00413 }
+00414 /*-----------------------------------------------------------------------------------*/
+00415 struct netconn *
+00416 netconn_accept(struct netconn *conn)
+00417 {
+00418   struct netconn *newconn;
+00419   
+00420   if(conn == NULL) {
+00421     return NULL;
+00422   }
+00423   
+00424   sys_mbox_fetch(conn->acceptmbox, (void **)&newconn);
+00425 
+00426   return newconn;
+00427 }
+00428 /*-----------------------------------------------------------------------------------*/
+00429 struct netbuf *
+00430 netconn_recv(struct netconn *conn)
+00431 {
+00432   struct api_msg *msg;
+00433   struct netbuf *buf;
+00434   struct pbuf *p;
+00435     
+00436   if(conn == NULL) {
+00437     return NULL;
+00438   }
+00439   
+00440   if(conn->recvmbox == SYS_MBOX_NULL) {
+00441     conn->err = ERR_CONN;
+00442     return NULL;
+00443   }
+00444 
+00445   if(conn->err != ERR_OK) {
+00446     return NULL;
+00447   }
+00448 
+00449   if(conn->type == NETCONN_TCP) {
+00450     if(conn->pcb.tcp->state == LISTEN) {
+00451       conn->err = ERR_CONN;
+00452       return NULL;
+00453     }
+00454 
+00455 
+00456     buf = memp_mallocp(MEMP_NETBUF);
+00457 
+00458     if(buf == NULL) {
+00459       conn->err = ERR_MEM;
+00460       return NULL;
+00461     }
+00462     
+00463     sys_mbox_fetch(conn->recvmbox, (void **)&p);
+00464     
+00465     /* If we are closed, we indicate that we no longer wish to recieve
+00466        data by setting conn->recvmbox to SYS_MBOX_NULL. */
+00467     if(p == NULL) {
+00468       memp_freep(MEMP_NETBUF, buf);
+00469       sys_mbox_free(conn->recvmbox);
+00470       conn->recvmbox = SYS_MBOX_NULL;
+00471       return NULL;
+00472     }
+00473 
+00474     buf->p = p;
+00475     buf->ptr = p;
+00476     buf->fromport = 0;
+00477     buf->fromaddr = NULL;
+00478 
+00479     /* Let the stack know that we have taken the data. */
+00480     if((msg = memp_mallocp(MEMP_API_MSG)) == NULL) {
+00481       conn->err = ERR_MEM;
+00482       return buf;
+00483     }
+00484     msg->type = API_MSG_RECV;
+00485     msg->msg.conn = conn;
+00486     if(buf != NULL) {
+00487       msg->msg.msg.len = buf->p->tot_len;
+00488     } else {
+00489       msg->msg.msg.len = 1;
+00490     }
+00491     api_msg_post(msg);
+00492 
+00493     sys_mbox_fetch(conn->mbox, NULL);
+00494     memp_freep(MEMP_API_MSG, msg);
+00495   } else {
+00496     sys_mbox_fetch(conn->recvmbox, (void **)&buf);
+00497   }
+00498 
+00499   
+00500 
+00501     
+00502   DEBUGF(API_LIB_DEBUG, ("netconn_recv: received %p (err %d)\n", buf, conn->err));
+00503 
+00504 
+00505   return buf;
+00506 }
+00507 /*-----------------------------------------------------------------------------------*/
+00508 err_t
+00509 netconn_send(struct netconn *conn, struct netbuf *buf)
+00510 {
+00511   struct api_msg *msg;
+00512 
+00513   if(conn == NULL) {
+00514     return ERR_VAL;
+00515   }
+00516 
+00517   if(conn->err != ERR_OK) {
+00518     return conn->err;
+00519   }
+00520 
+00521   if((msg = memp_mallocp(MEMP_API_MSG)) == NULL) {
+00522     return (conn->err = ERR_MEM);
+00523   }
+00524 
+00525   DEBUGF(API_LIB_DEBUG, ("netconn_send: sending %d bytes\n", buf->p->tot_len));
+00526   msg->type = API_MSG_SEND;
+00527   msg->msg.conn = conn;
+00528   msg->msg.msg.p = buf->p;
+00529   api_msg_post(msg);
+00530 
+00531   sys_mbox_fetch(conn->mbox, NULL);
+00532   memp_freep(MEMP_API_MSG, msg);
+00533   return conn->err;
+00534 }
+00535 /*-----------------------------------------------------------------------------------*/
+00536 err_t
+00537 netconn_write(struct netconn *conn, void *dataptr, uInt16 size, uInt8 copy)
+00538 {
+00539   struct api_msg *msg;
+00540   uInt16 len;
+00541   
+00542   if(conn == NULL) {
+00543     return ERR_VAL;
+00544   }
+00545 
+00546   if(conn->err != ERR_OK) {
+00547     return conn->err;
+00548   }
+00549   
+00550   if(conn->sem == SYS_SEM_NULL) {
+00551     conn->sem = sys_sem_new(0);
+00552     if(conn->sem == SYS_SEM_NULL) {
+00553       return ERR_MEM;
+00554     }
+00555   }
+00556 
+00557   if((msg = memp_mallocp(MEMP_API_MSG)) == NULL) {
+00558     return (conn->err = ERR_MEM);
+00559   }
+00560   msg->type = API_MSG_WRITE;
+00561   msg->msg.conn = conn;
+00562         
+00563 
+00564   conn->state = NETCONN_WRITE;
+00565   while(conn->err == ERR_OK && size > 0) {
+00566     msg->msg.msg.w.dataptr = dataptr;
+00567     msg->msg.msg.w.copy = copy;
+00568     
+00569     if(conn->type == NETCONN_TCP) {
+00570       if(tcp_sndbuf(conn->pcb.tcp) == 0) {
+00571         sys_sem_wait(conn->sem);
+00572         if(conn->err != ERR_OK) {
+00573           goto ret;
+00574         }
+00575       }
+00576       if(size > tcp_sndbuf(conn->pcb.tcp)) {
+00577         /* We cannot send more than one send buffer's worth of data at a
+00578            time. */
+00579         len = tcp_sndbuf(conn->pcb.tcp);
+00580       } else {
+00581         len = size;
+00582       }
+00583     } else {
+00584       len = size;
+00585     }
+00586     
+00587     DEBUGF(API_LIB_DEBUG, ("netconn_write: writing %d bytes (%d)\n", len, copy));
+00588     msg->msg.msg.w.len = len;
+00589     api_msg_post(msg);
+00590     sys_mbox_fetch(conn->mbox, NULL);    
+00591     if(conn->err == ERR_OK) {
+00592       dataptr = (void *)((char *)dataptr + len);
+00593       size -= len;
+00594     } else if(conn->err == ERR_MEM) {
+00595       conn->err = ERR_OK;
+00596       sys_sem_wait(conn->sem);
+00597     } else {
+00598       goto ret;
+00599     }
+00600   }
+00601  ret:
+00602   memp_freep(MEMP_API_MSG, msg);
+00603   conn->state = NETCONN_NONE;
+00604   if(conn->sem != SYS_SEM_NULL) {
+00605     sys_sem_free(conn->sem);
+00606     conn->sem = SYS_SEM_NULL;
+00607   }
+00608   return conn->err;
+00609 }
+00610 /*-----------------------------------------------------------------------------------*/
+00611 err_t
+00612 netconn_close(struct netconn *conn)
+00613 {
+00614   struct api_msg *msg;
+00615 
+00616   if(conn == NULL) {
+00617     return ERR_VAL;
+00618   }
+00619   if((msg = memp_mallocp(MEMP_API_MSG)) == NULL) {
+00620     return (conn->err = ERR_MEM);
+00621   }
+00622 
+00623   conn->state = NETCONN_CLOSE;
+00624  again:
+00625   msg->type = API_MSG_CLOSE;
+00626   msg->msg.conn = conn;
+00627   api_msg_post(msg);
+00628   sys_mbox_fetch(conn->mbox, NULL);
+00629   if(conn->err == ERR_MEM &&
+00630      conn->sem != SYS_SEM_NULL) {
+00631     sys_sem_wait(conn->sem);
+00632     goto again;
+00633   }
+00634   conn->state = NETCONN_NONE;
+00635   memp_freep(MEMP_API_MSG, msg);
+00636   return conn->err;
+00637 }
+00638 /*-----------------------------------------------------------------------------------*/
+00639 err_t
+00640 netconn_err(struct netconn *conn)
+00641 {
+00642   return conn->err;
+00643 }
+00644 /*-----------------------------------------------------------------------------------*/
+00645 
+00646 
+00647 
+00648 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/api__lib_8c.html b/doc/html/api__lib_8c.html new file mode 100644 index 0000000..f3dacb2 --- /dev/null +++ b/doc/html/api__lib_8c.html @@ -0,0 +1,994 @@ + + +UbixOS V2: src/sys/net/api/api_lib.c File Reference + + + + +
+
+
+
+ +

api_lib.c File Reference

+

+#include <ubixos/types.h>
+#include "net/debug.h"
+#include "net/api.h"
+#include "net/api_msg.h"
+#include "net/memp.h"
+#include "lib/kprintf.h"
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Functions

void * netbuf_alloc (struct netbuf *buf, uInt16 size)
void netbuf_chain (struct netbuf *head, struct netbuf *tail)
void netbuf_copy (struct netbuf *buf, void *dataptr, uInt16 len)
void netbuf_copy_partial (struct netbuf *buf, void *dataptr, uInt16 len, uInt16 offset)
err_t netbuf_data (struct netbuf *buf, void **dataptr, uInt16 *len)
void netbuf_delete (struct netbuf *buf)
void netbuf_first (struct netbuf *buf)
void netbuf_free (struct netbuf *buf)
ip_addrnetbuf_fromaddr (struct netbuf *buf)
uInt16 netbuf_fromport (struct netbuf *buf)
uInt16 netbuf_len (struct netbuf *buf)
netbufnetbuf_new (void)
Int8 netbuf_next (struct netbuf *buf)
void netbuf_ref (struct netbuf *buf, void *dataptr, uInt16 size)
netconnnetconn_accept (struct netconn *conn)
err_t netconn_addr (struct netconn *conn, struct ip_addr **addr, uInt16 *port)
err_t netconn_bind (struct netconn *conn, struct ip_addr *addr, uInt16 port)
err_t netconn_close (struct netconn *conn)
err_t netconn_connect (struct netconn *conn, struct ip_addr *addr, uInt16 port)
err_t netconn_delete (struct netconn *conn)
err_t netconn_err (struct netconn *conn)
err_t netconn_listen (struct netconn *conn)
netconnnetconn_new (enum netconn_type t)
err_t netconn_peer (struct netconn *conn, struct ip_addr **addr, uInt16 *port)
netbufnetconn_recv (struct netconn *conn)
err_t netconn_send (struct netconn *conn, struct netbuf *buf)
enum netconn_type netconn_type (struct netconn *conn)
err_t netconn_write (struct netconn *conn, void *dataptr, uInt16 size, uInt8 copy)
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
void* netbuf_alloc (struct netbuf buf,
uInt16  size 
)
+
+
+ +

+ +

+Definition at line 78 of file api_lib.c. +

+References NULL, netbuf::p, pbuf::payload, pbuf_alloc(), pbuf_free(), PBUF_RAM, PBUF_TRANSPORT, and netbuf::ptr. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void netbuf_chain (struct netbuf head,
struct netbuf tail 
)
+
+
+ +

+ +

+Definition at line 114 of file api_lib.c. +

+References memp_freep(), MEMP_NETBUF, netbuf::p, pbuf_chain(), and netbuf::ptr. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void netbuf_copy (struct netbuf buf,
void *  dataptr,
uInt16  len 
)
+
+
+ +

+ +

+Definition at line 186 of file api_lib.c. +

+References netbuf_copy_partial(). +

+Referenced by bot_thread(), shell_main(), and udpecho_thread(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void netbuf_copy_partial (struct netbuf buf,
void *  dataptr,
uInt16  len,
uInt16  offset 
)
+
+
+ +

+ +

+Definition at line 158 of file api_lib.c. +

+References pbuf::len, pbuf::next, NULL, netbuf::p, and pbuf::payload. +

+Referenced by lwip_recvfrom(), and netbuf_copy(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
err_t netbuf_data (struct netbuf buf,
void **  dataptr,
uInt16 len 
)
+
+
+ +

+ +

+Definition at line 128 of file api_lib.c. +

+References ERR_BUF, ERR_OK, pbuf::len, NULL, pbuf::payload, and netbuf::ptr. +

+

+ +

+
+ + + + + + + + + +
void netbuf_delete (struct netbuf buf  ) 
+
+ +

+ +

+
+ + + + + + + + + +
void netbuf_first (struct netbuf buf  ) 
+
+
+ +

+ +

+Definition at line 152 of file api_lib.c. +

+References netbuf::p, and netbuf::ptr. +

+

+ +

+
+ + + + + + + + + +
void netbuf_free (struct netbuf buf  ) 
+
+
+ +

+ +

+Definition at line 93 of file api_lib.c. +

+References NULL, netbuf::p, pbuf_free(), and netbuf::ptr. +

+

+ +

+
+ + + + + + + + + +
struct ip_addr* netbuf_fromaddr (struct netbuf buf  ) 
+
+
+ +

+ +

+Definition at line 192 of file api_lib.c. +

+References netbuf::fromaddr. +

+Referenced by lwip_recvfrom(), and udpecho_thread(). +

+

+ +

+
+ + + + + + + + + +
uInt16 netbuf_fromport (struct netbuf buf  ) 
+
+
+ +

+ +

+Definition at line 198 of file api_lib.c. +

+References netbuf::fromport. +

+Referenced by lwip_recvfrom(), and udpecho_thread(). +

+

+ +

+
+ + + + + + + + + +
uInt16 netbuf_len (struct netbuf buf  ) 
+
+
+ +

+ +

+Definition at line 122 of file api_lib.c. +

+References netbuf::p, and pbuf::tot_len. +

+Referenced by bot_thread(), lwip_recvfrom(), and shell_main(). +

+

+ +

+
+ + + + + + + + + +
struct netbuf* netbuf_new (void   ) 
+
+
+ +

+ +

+Definition at line 51 of file api_lib.c. +

+References memp_mallocp(), MEMP_NETBUF, NULL, netbuf::p, and netbuf::ptr. +

+Referenced by lwip_send(). +

+

+ +

+
+ + + + + + + + + +
Int8 netbuf_next (struct netbuf buf  ) 
+
+
+ +

+ +

+Definition at line 139 of file api_lib.c. +

+References pbuf::next, NULL, and netbuf::ptr. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void netbuf_ref (struct netbuf buf,
void *  dataptr,
uInt16  size 
)
+
+
+ +

+ +

+Definition at line 102 of file api_lib.c. +

+References pbuf::len, NULL, netbuf::p, pbuf::payload, pbuf_alloc(), pbuf_free(), PBUF_ROM, PBUF_TRANSPORT, netbuf::ptr, and pbuf::tot_len. +

+Referenced by lwip_send(). +

+

+ +

+
+ + + + + + + + + +
struct netconn* netconn_accept (struct netconn conn  ) 
+
+
+ +

+ +

+Definition at line 416 of file api_lib.c. +

+References netconn::acceptmbox, NULL, and sys_mbox_fetch(). +

+Referenced by lwip_accept(), and shell_thread(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
err_t netconn_addr (struct netconn conn,
struct ip_addr **  addr,
uInt16 port 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
err_t netconn_bind (struct netconn conn,
struct ip_addr addr,
uInt16  port 
)
+
+ +

+ +

+
+ + + + + + + + + +
err_t netconn_close (struct netconn conn  ) 
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
err_t netconn_connect (struct netconn conn,
struct ip_addr addr,
uInt16  port 
)
+
+ +

+ +

+
+ + + + + + + + + +
err_t netconn_delete (struct netconn conn  ) 
+
+ +

+ +

+
+ + + + + + + + + +
err_t netconn_err (struct netconn conn  ) 
+
+
+ +

+ +

+Definition at line 640 of file api_lib.c. +

+References netconn::err. +

+

+ +

+
+ + + + + + + + + +
err_t netconn_listen (struct netconn conn  ) 
+
+ +

+ +

+
+ + + + + + + + + +
struct netconn* netconn_new (enum netconn_type  t  ) 
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
err_t netconn_peer (struct netconn conn,
struct ip_addr **  addr,
uInt16 port 
)
+
+ +

+ +

+
+ + + + + + + + + +
struct netbuf* netconn_recv (struct netconn conn  ) 
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
err_t netconn_send (struct netconn conn,
struct netbuf buf 
)
+
+ +

+ +

+
+ + + + + + + + + +
enum netconn_type netconn_type (struct netconn conn  ) 
+
+
+ +

+ +

+Definition at line 281 of file api_lib.c. +

+References netconn::type. +

+Referenced by lwip_recvfrom(), lwip_send(), and lwip_write(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
err_t netconn_write (struct netconn conn,
void *  dataptr,
uInt16  size,
uInt8  copy 
)
+
+ +

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/api__msg_8c-source.html b/doc/html/api__msg_8c-source.html new file mode 100644 index 0000000..ad09433 --- /dev/null +++ b/doc/html/api__msg_8c-source.html @@ -0,0 +1,566 @@ + + +UbixOS V2: src/sys/net/api/api_msg.c Source File + + + + +
+
+
+
+ +

api_msg.c

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 
+00036 #include <ubixos/types.h>
+00037 
+00038 #include "net/debug.h"
+00039 #include "net/arch.h"
+00040 #include "net/api_msg.h"
+00041 #include "net/memp.h"
+00042 #include "net/sys.h"
+00043 #include "net/tcpip.h"
+00044 
+00045 /*-----------------------------------------------------------------------------------*/
+00046 static err_t
+00047 recv_tcp(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err)
+00048 {
+00049   struct netconn *conn;
+00050 
+00051   conn = arg;
+00052 
+00053   if(conn == NULL) {
+00054     pbuf_free(p);
+00055     return ERR_VAL;
+00056   }
+00057   
+00058   if(conn->recvmbox != SYS_MBOX_NULL) {
+00059     conn->err = err;
+00060     sys_mbox_post(conn->recvmbox, p);
+00061   }  
+00062   return ERR_OK;
+00063 }
+00064 /*-----------------------------------------------------------------------------------*/
+00065 static void
+00066 recv_udp(void *arg, struct udp_pcb *pcb, struct pbuf *p,
+00067          struct ip_addr *addr, uInt16 port)
+00068 {
+00069   struct netbuf *buf;
+00070   struct netconn *conn;
+00071 
+00072   conn = arg;
+00073   
+00074   if(conn == NULL) {
+00075     pbuf_free(p);
+00076     return;
+00077   }
+00078 
+00079   if(conn->recvmbox != SYS_MBOX_NULL) {
+00080     buf = memp_mallocp(MEMP_NETBUF);
+00081     if(buf == NULL) {
+00082       pbuf_free(p);
+00083       return;
+00084     } else {
+00085       buf->p = p;
+00086       buf->ptr = p;
+00087       buf->fromaddr = addr;
+00088       buf->fromport = port;
+00089     }
+00090     
+00091     sys_mbox_post(conn->recvmbox, buf);
+00092   }
+00093 }
+00094 /*-----------------------------------------------------------------------------------*/
+00095 static err_t
+00096 poll_tcp(void *arg, struct tcp_pcb *pcb)
+00097 {
+00098   struct netconn *conn;
+00099 
+00100   conn = arg;
+00101   if(conn != NULL &&
+00102      (conn->state == NETCONN_WRITE || conn->state == NETCONN_CLOSE) &&
+00103      conn->sem != SYS_SEM_NULL) {
+00104     sys_sem_signal(conn->sem);
+00105   }
+00106   return ERR_OK;
+00107 }
+00108 /*-----------------------------------------------------------------------------------*/
+00109 static err_t
+00110 sent_tcp(void *arg, struct tcp_pcb *pcb, uInt16 len)
+00111 {
+00112   struct netconn *conn;
+00113 
+00114   conn = arg;
+00115   if(conn != NULL && conn->sem != SYS_SEM_NULL) {
+00116     sys_sem_signal(conn->sem);
+00117   }
+00118   return ERR_OK;
+00119 }
+00120 /*-----------------------------------------------------------------------------------*/
+00121 static void
+00122 err_tcp(void *arg, err_t err)
+00123 {
+00124   struct netconn *conn;
+00125 
+00126   conn = arg;
+00127 
+00128   conn->pcb.tcp = NULL;
+00129 
+00130   
+00131   conn->err = err;
+00132   if(conn->recvmbox != SYS_MBOX_NULL) {
+00133     sys_mbox_post(conn->recvmbox, NULL);
+00134   }
+00135   if(conn->mbox != SYS_MBOX_NULL) {
+00136     sys_mbox_post(conn->mbox, NULL);
+00137   }
+00138   if(conn->acceptmbox != SYS_MBOX_NULL) {
+00139     sys_mbox_post(conn->acceptmbox, NULL);
+00140   }
+00141   if(conn->sem != SYS_SEM_NULL) {
+00142     sys_sem_signal(conn->sem);
+00143   }
+00144 }
+00145 /*-----------------------------------------------------------------------------------*/
+00146 static void
+00147 setup_tcp(struct netconn *conn)
+00148 {
+00149   struct tcp_pcb *pcb;
+00150   
+00151   pcb = conn->pcb.tcp;
+00152   tcp_arg(pcb, conn);
+00153   tcp_recv(pcb, recv_tcp);
+00154   tcp_sent(pcb, sent_tcp);
+00155   tcp_poll(pcb, poll_tcp, 4);
+00156   tcp_err(pcb, err_tcp);
+00157 }
+00158 /*-----------------------------------------------------------------------------------*/
+00159 static err_t
+00160 accept_function(void *arg, struct tcp_pcb *newpcb, err_t err)
+00161 {
+00162   sys_mbox_t *mbox;
+00163   struct netconn *newconn;
+00164   
+00165 #if API_MSG_DEBUG
+00166 #if TCP_DEBUG
+00167   tcp_debug_print_state(newpcb->state);
+00168 #endif /* TCP_DEBUG */
+00169 #endif /* API_MSG_DEBUG */
+00170   mbox = (sys_mbox_t *)arg;
+00171   newconn = memp_mallocp(MEMP_NETCONN);
+00172   if(newconn == NULL) {
+00173     return ERR_MEM;
+00174   }
+00175   newconn->type = NETCONN_TCP;
+00176   newconn->pcb.tcp = newpcb;
+00177   setup_tcp(newconn);
+00178   newconn->recvmbox = sys_mbox_new();
+00179   if(newconn->recvmbox == SYS_MBOX_NULL) {
+00180     memp_free(MEMP_NETCONN, newconn);
+00181     return ERR_MEM;
+00182   }
+00183   newconn->mbox = sys_mbox_new();
+00184   if(newconn->mbox == SYS_MBOX_NULL) {
+00185     sys_mbox_free(newconn->recvmbox);
+00186     memp_free(MEMP_NETCONN, newconn);
+00187     return ERR_MEM;
+00188   }
+00189   newconn->sem = sys_sem_new(0);
+00190   if(newconn->sem == SYS_SEM_NULL) {
+00191     sys_mbox_free(newconn->recvmbox);
+00192     sys_mbox_free(newconn->mbox);
+00193     memp_free(MEMP_NETCONN, newconn);
+00194     return ERR_MEM;
+00195   }
+00196   newconn->acceptmbox = SYS_MBOX_NULL;
+00197   newconn->err = err;
+00198   sys_mbox_post(*mbox, newconn);
+00199   return ERR_OK;
+00200 }
+00201 /*-----------------------------------------------------------------------------------*/
+00202 static void
+00203 do_newconn(struct api_msg_msg *msg)
+00204 {
+00205 }
+00206 /*-----------------------------------------------------------------------------------*/
+00207 static void
+00208 do_delconn(struct api_msg_msg *msg)
+00209 {
+00210   if(msg->conn->pcb.tcp != NULL) {
+00211     switch(msg->conn->type) {
+00212     case NETCONN_UDPLITE:
+00213       /* FALLTHROUGH */
+00214     case NETCONN_UDPNOCHKSUM:
+00215       /* FALLTHROUGH */
+00216     case NETCONN_UDP:
+00217       msg->conn->pcb.udp->recv_arg = NULL;
+00218       udp_remove(msg->conn->pcb.udp);
+00219       break;
+00220     case NETCONN_TCP:
+00221       tcp_arg(msg->conn->pcb.tcp, NULL);
+00222       tcp_sent(msg->conn->pcb.tcp, NULL);
+00223       tcp_recv(msg->conn->pcb.tcp, NULL);
+00224       tcp_accept(msg->conn->pcb.tcp, NULL);
+00225       tcp_poll(msg->conn->pcb.tcp, NULL, 0);
+00226       tcp_err(msg->conn->pcb.tcp, NULL);
+00227       if(msg->conn->pcb.tcp->state == LISTEN) {
+00228         tcp_close(msg->conn->pcb.tcp);
+00229       } else {
+00230         if(tcp_close(msg->conn->pcb.tcp) != ERR_OK) {
+00231           tcp_abort(msg->conn->pcb.tcp);
+00232         }
+00233       }
+00234     break;
+00235     }
+00236   }
+00237   if(msg->conn->mbox != SYS_MBOX_NULL) {
+00238     sys_mbox_post(msg->conn->mbox, NULL);
+00239   }
+00240 }
+00241 /*-----------------------------------------------------------------------------------*/
+00242 static void
+00243 do_bind(struct api_msg_msg *msg)
+00244 {
+00245   if(msg->conn->pcb.tcp == NULL) {
+00246     switch(msg->conn->type) {
+00247     case NETCONN_UDPLITE:
+00248       msg->conn->pcb.udp = udp_new();
+00249       udp_setflags(msg->conn->pcb.udp, UDP_FLAGS_UDPLITE);
+00250       udp_recv(msg->conn->pcb.udp, recv_udp, msg->conn);
+00251       break;
+00252     case NETCONN_UDPNOCHKSUM:
+00253       msg->conn->pcb.udp = udp_new();
+00254       udp_setflags(msg->conn->pcb.udp, UDP_FLAGS_NOCHKSUM);
+00255       udp_recv(msg->conn->pcb.udp, recv_udp, msg->conn);
+00256       break;
+00257     case NETCONN_UDP:
+00258       msg->conn->pcb.udp = udp_new();
+00259       udp_recv(msg->conn->pcb.udp, recv_udp, msg->conn);
+00260       break;
+00261     case NETCONN_TCP:
+00262       msg->conn->pcb.tcp = tcp_new();
+00263       setup_tcp(msg->conn);
+00264       break;
+00265     }
+00266   }
+00267   switch(msg->conn->type) {
+00268   case NETCONN_UDPLITE:
+00269     /* FALLTHROUGH */
+00270   case NETCONN_UDPNOCHKSUM:
+00271     /* FALLTHROUGH */
+00272   case NETCONN_UDP:
+00273     udp_bind(msg->conn->pcb.udp, msg->msg.bc.ipaddr, msg->msg.bc.port);
+00274     break;
+00275   case NETCONN_TCP:
+00276     msg->conn->err = tcp_bind(msg->conn->pcb.tcp,
+00277                               msg->msg.bc.ipaddr, msg->msg.bc.port);
+00278     break;
+00279   }
+00280   sys_mbox_post(msg->conn->mbox, NULL);
+00281 }
+00282 /*-----------------------------------------------------------------------------------*/
+00283 static err_t
+00284 do_connected(void *arg, struct tcp_pcb *pcb, err_t err)
+00285 {
+00286   struct netconn *conn;
+00287 
+00288   conn = arg;
+00289 
+00290   if(conn == NULL) {
+00291     return ERR_VAL;
+00292   }
+00293   
+00294   conn->err = err;
+00295 
+00296   if(conn->type == NETCONN_TCP && err == ERR_OK) {
+00297     setup_tcp(conn);
+00298   }    
+00299   
+00300   sys_mbox_post(conn->mbox, NULL);
+00301   return ERR_OK;
+00302 }
+00303 /*-----------------------------------------------------------------------------------*/
+00304 static void
+00305 do_connect(struct api_msg_msg *msg)
+00306 {
+00307   if(msg->conn->pcb.tcp == NULL) {
+00308     switch(msg->conn->type) {
+00309     case NETCONN_UDPLITE:
+00310       msg->conn->pcb.udp = udp_new();
+00311       if(msg->conn->pcb.udp == NULL) {
+00312         msg->conn->err = ERR_MEM;
+00313         sys_mbox_post(msg->conn->mbox, NULL);
+00314         return;
+00315       }
+00316       udp_setflags(msg->conn->pcb.udp, UDP_FLAGS_UDPLITE);
+00317       udp_recv(msg->conn->pcb.udp, recv_udp, msg->conn);
+00318       break;
+00319     case NETCONN_UDPNOCHKSUM:
+00320       msg->conn->pcb.udp = udp_new();
+00321       if(msg->conn->pcb.udp == NULL) {
+00322         msg->conn->err = ERR_MEM;
+00323         sys_mbox_post(msg->conn->mbox, NULL);
+00324         return;
+00325       }
+00326       udp_setflags(msg->conn->pcb.udp, UDP_FLAGS_NOCHKSUM);
+00327       udp_recv(msg->conn->pcb.udp, recv_udp, msg->conn);
+00328       break;
+00329     case NETCONN_UDP:
+00330       msg->conn->pcb.udp = udp_new();
+00331       if(msg->conn->pcb.udp == NULL) {
+00332         msg->conn->err = ERR_MEM;
+00333         sys_mbox_post(msg->conn->mbox, NULL);
+00334         return;
+00335       }
+00336       udp_recv(msg->conn->pcb.udp, recv_udp, msg->conn);
+00337       break;
+00338     case NETCONN_TCP:
+00339       msg->conn->pcb.tcp = tcp_new();      
+00340       if(msg->conn->pcb.tcp == NULL) {
+00341         msg->conn->err = ERR_MEM;
+00342         sys_mbox_post(msg->conn->mbox, NULL);
+00343         return;
+00344       }
+00345       break;
+00346     }
+00347   }
+00348   switch(msg->conn->type) {
+00349   case NETCONN_UDPLITE:
+00350     /* FALLTHROUGH */
+00351   case NETCONN_UDPNOCHKSUM:
+00352     /* FALLTHROUGH */
+00353   case NETCONN_UDP:
+00354     udp_connect(msg->conn->pcb.udp, msg->msg.bc.ipaddr, msg->msg.bc.port);
+00355     sys_mbox_post(msg->conn->mbox, NULL);
+00356     break;
+00357   case NETCONN_TCP:
+00358     /*    tcp_arg(msg->conn->pcb.tcp, msg->conn);*/
+00359     setup_tcp(msg->conn);
+00360     tcp_connect(msg->conn->pcb.tcp, msg->msg.bc.ipaddr, msg->msg.bc.port,
+00361                 do_connected);
+00362     /*tcp_output(msg->conn->pcb.tcp);*/
+00363     break;
+00364   }
+00365 }
+00366 /*-----------------------------------------------------------------------------------*/
+00367 static void
+00368 do_listen(struct api_msg_msg *msg)
+00369 {
+00370   if(msg->conn->pcb.tcp != NULL) {
+00371     switch(msg->conn->type) {
+00372     case NETCONN_UDPLITE:
+00373       /* FALLTHROUGH */
+00374     case NETCONN_UDPNOCHKSUM:
+00375       /* FALLTHROUGH */
+00376     case NETCONN_UDP:
+00377       DEBUGF(API_MSG_DEBUG, ("api_msg: listen UDP: cannot listen for UDP.\n"));
+00378       break;
+00379     case NETCONN_TCP:
+00380       msg->conn->pcb.tcp = tcp_listen(msg->conn->pcb.tcp);
+00381       if(msg->conn->pcb.tcp == NULL) {
+00382         msg->conn->err = ERR_MEM;
+00383       } else {
+00384         if(msg->conn->acceptmbox == SYS_MBOX_NULL) {
+00385           msg->conn->acceptmbox = sys_mbox_new();
+00386           if(msg->conn->acceptmbox == SYS_MBOX_NULL) {
+00387             msg->conn->err = ERR_MEM;
+00388             break;
+00389           }
+00390         }
+00391         tcp_arg(msg->conn->pcb.tcp, (void *)&(msg->conn->acceptmbox));
+00392         tcp_accept(msg->conn->pcb.tcp, accept_function);
+00393       }
+00394       break;
+00395     }
+00396   }
+00397   sys_mbox_post(msg->conn->mbox, NULL);
+00398 }
+00399 /*-----------------------------------------------------------------------------------*/
+00400 static void
+00401 do_accept(struct api_msg_msg *msg)
+00402 {
+00403   if(msg->conn->pcb.tcp != NULL) {
+00404     switch(msg->conn->type) {
+00405     case NETCONN_UDPLITE:
+00406       /* FALLTHROUGH */
+00407     case NETCONN_UDPNOCHKSUM:
+00408       /* FALLTHROUGH */
+00409     case NETCONN_UDP:    
+00410       DEBUGF(API_MSG_DEBUG, ("api_msg: accept UDP: cannot accept for UDP.\n"));
+00411       break;
+00412     case NETCONN_TCP:
+00413       break;
+00414     }
+00415   }
+00416 }
+00417 /*-----------------------------------------------------------------------------------*/
+00418 static void
+00419 do_send(struct api_msg_msg *msg)
+00420 {
+00421   if(msg->conn->pcb.tcp != NULL) {
+00422     switch(msg->conn->type) {
+00423     case NETCONN_UDPLITE:
+00424       /* FALLTHROUGH */
+00425     case NETCONN_UDPNOCHKSUM:
+00426       /* FALLTHROUGH */
+00427     case NETCONN_UDP:
+00428       udp_send(msg->conn->pcb.udp, msg->msg.p);
+00429       break;
+00430     case NETCONN_TCP:
+00431       break;
+00432     }
+00433   }
+00434   sys_mbox_post(msg->conn->mbox, NULL);
+00435 }
+00436 /*-----------------------------------------------------------------------------------*/
+00437 static void
+00438 do_recv(struct api_msg_msg *msg)
+00439 {
+00440   if(msg->conn->pcb.tcp != NULL) {
+00441     if(msg->conn->type == NETCONN_TCP) {
+00442       tcp_recved(msg->conn->pcb.tcp, msg->msg.len);
+00443     }
+00444   }
+00445   sys_mbox_post(msg->conn->mbox, NULL);
+00446 }
+00447 /*-----------------------------------------------------------------------------------*/
+00448 static void
+00449 do_write(struct api_msg_msg *msg)
+00450 {
+00451   err_t err;
+00452   if(msg->conn->pcb.tcp != NULL) {
+00453     switch(msg->conn->type) {
+00454     case NETCONN_UDPLITE:
+00455       /* FALLTHROUGH */
+00456     case NETCONN_UDPNOCHKSUM:
+00457       /* FALLTHROUGH */
+00458     case NETCONN_UDP:
+00459       msg->conn->err = ERR_VAL;
+00460       break;
+00461     case NETCONN_TCP:      
+00462       err = tcp_write(msg->conn->pcb.tcp, msg->msg.w.dataptr,
+00463                       msg->msg.w.len, msg->msg.w.copy);
+00464       /* This is the Nagle algorithm: inhibit the sending of new TCP
+00465          segments when new outgoing data arrives from the user if any
+00466          previously transmitted data on the connection remains
+00467          unacknowledged. */
+00468       if(err == ERR_OK && msg->conn->pcb.tcp->unacked == NULL) {
+00469         tcp_output(msg->conn->pcb.tcp);
+00470       }
+00471       msg->conn->err = err;
+00472       break;
+00473     }
+00474   }
+00475   sys_mbox_post(msg->conn->mbox, NULL);
+00476 }
+00477 /*-----------------------------------------------------------------------------------*/
+00478 static void
+00479 do_close(struct api_msg_msg *msg)
+00480 {
+00481   err_t err;
+00482   if(msg->conn->pcb.tcp != NULL) {
+00483     switch(msg->conn->type) {
+00484     case NETCONN_UDPLITE:
+00485       /* FALLTHROUGH */
+00486     case NETCONN_UDPNOCHKSUM:
+00487       /* FALLTHROUGH */
+00488     case NETCONN_UDP:
+00489       break;
+00490     case NETCONN_TCP:
+00491       if(msg->conn->pcb.tcp->state == LISTEN) {
+00492         err = tcp_close(msg->conn->pcb.tcp);
+00493       } else {
+00494         err = tcp_close(msg->conn->pcb.tcp);
+00495       }
+00496       msg->conn->err = err;      
+00497       break;
+00498     }
+00499   }
+00500   sys_mbox_post(msg->conn->mbox, NULL);
+00501 }
+00502 /*-----------------------------------------------------------------------------------*/
+00503 typedef void (* api_msg_decode)(struct api_msg_msg *msg);
+00504 static api_msg_decode decode[API_MSG_MAX] = {
+00505   do_newconn,
+00506   do_delconn,
+00507   do_bind,
+00508   do_connect,
+00509   do_listen,
+00510   do_accept,
+00511   do_send,
+00512   do_recv,
+00513   do_write,
+00514   do_close
+00515   };
+00516 void
+00517 api_msg_input(struct api_msg *msg)
+00518 {  
+00519   decode[msg->type](&(msg->msg));
+00520 }
+00521 /*-----------------------------------------------------------------------------------*/
+00522 void
+00523 api_msg_post(struct api_msg *msg)
+00524 {
+00525   tcpip_apimsg(msg);
+00526 }
+00527 /*-----------------------------------------------------------------------------------*/
+00528 
+00529 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/api__msg_8c.html b/doc/html/api__msg_8c.html new file mode 100644 index 0000000..75baa05 --- /dev/null +++ b/doc/html/api__msg_8c.html @@ -0,0 +1,758 @@ + + +UbixOS V2: src/sys/net/api/api_msg.c File Reference + + + + +
+
+
+
+ +

api_msg.c File Reference

+

+#include <ubixos/types.h>
+#include "net/debug.h"
+#include "net/arch.h"
+#include "net/api_msg.h"
+#include "net/memp.h"
+#include "net/sys.h"
+#include "net/tcpip.h"
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Typedefs

typedef void(*) api_msg_decode (struct api_msg_msg *msg)

Functions

static err_t accept_function (void *arg, struct tcp_pcb *newpcb, err_t err)
void api_msg_input (struct api_msg *msg)
void api_msg_post (struct api_msg *msg)
static void do_accept (struct api_msg_msg *msg)
static void do_bind (struct api_msg_msg *msg)
static void do_close (struct api_msg_msg *msg)
static void do_connect (struct api_msg_msg *msg)
static err_t do_connected (void *arg, struct tcp_pcb *pcb, err_t err)
static void do_delconn (struct api_msg_msg *msg)
static void do_listen (struct api_msg_msg *msg)
static void do_newconn (struct api_msg_msg *msg)
static void do_recv (struct api_msg_msg *msg)
static void do_send (struct api_msg_msg *msg)
static void do_write (struct api_msg_msg *msg)
static void err_tcp (void *arg, err_t err)
static err_t poll_tcp (void *arg, struct tcp_pcb *pcb)
static err_t recv_tcp (void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err)
static void recv_udp (void *arg, struct udp_pcb *pcb, struct pbuf *p, struct ip_addr *addr, uInt16 port)
static err_t sent_tcp (void *arg, struct tcp_pcb *pcb, uInt16 len)
static void setup_tcp (struct netconn *conn)

Variables

static api_msg_decode decode [API_MSG_MAX]
+


Typedef Documentation

+ +
+
+ + + + +
typedef void(* ) api_msg_decode(struct api_msg_msg *msg)
+
+
+ +

+ +

+Definition at line 503 of file api_msg.c. +

+

+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
static err_t accept_function (void *  arg,
struct tcp_pcb newpcb,
err_t  err 
) [static]
+
+ +

+ +

+
+ + + + + + + + + +
void api_msg_input (struct api_msg msg  ) 
+
+
+ +

+ +

+Definition at line 517 of file api_msg.c. +

+References decode, and api_msg_msg::msg. +

+Referenced by tcpip_thread(). +

+

+ +

+
+ + + + + + + + + +
void api_msg_post (struct api_msg msg  ) 
+
+ +

+ +

+
+ + + + + + + + + +
static void do_accept (struct api_msg_msg msg  )  [static]
+
+ +

+ +

+
+ + + + + + + + + +
static void do_bind (struct api_msg_msg msg  )  [static]
+
+ +

+ +

+
+ + + + + + + + + +
static void do_close (struct api_msg_msg msg  )  [static]
+
+ +

+ +

+
+ + + + + + + + + +
static void do_connect (struct api_msg_msg msg  )  [static]
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
static err_t do_connected (void *  arg,
struct tcp_pcb pcb,
err_t  err 
) [static]
+
+
+ +

+ +

+Definition at line 284 of file api_msg.c. +

+References netconn::err, ERR_OK, ERR_VAL, netconn::mbox, NETCONN_TCP, NULL, setup_tcp(), sys_mbox_post(), and netconn::type. +

+Referenced by do_connect(). +

+

+ +

+
+ + + + + + + + + +
static void do_delconn (struct api_msg_msg msg  )  [static]
+
+ +

+ +

+
+ + + + + + + + + +
static void do_listen (struct api_msg_msg msg  )  [static]
+
+ +

+ +

+
+ + + + + + + + + +
static void do_newconn (struct api_msg_msg msg  )  [static]
+
+
+ +

+ +

+Definition at line 203 of file api_msg.c. +

+

+ +

+
+ + + + + + + + + +
static void do_recv (struct api_msg_msg msg  )  [static]
+
+ +

+ +

+
+ + + + + + + + + +
static void do_send (struct api_msg_msg msg  )  [static]
+
+ +

+ +

+
+ + + + + + + + + +
static void do_write (struct api_msg_msg msg  )  [static]
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
static void err_tcp (void *  arg,
err_t  err 
) [static]
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
static err_t poll_tcp (void *  arg,
struct tcp_pcb pcb 
) [static]
+
+
+ +

+ +

+Definition at line 96 of file api_msg.c. +

+References ERR_OK, NETCONN_CLOSE, NETCONN_WRITE, NULL, netconn::sem, netconn::state, SYS_SEM_NULL, and sys_sem_signal(). +

+Referenced by setup_tcp(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static err_t recv_tcp (void *  arg,
struct tcp_pcb pcb,
struct pbuf p,
err_t  err 
) [static]
+
+
+ +

+ +

+Definition at line 47 of file api_msg.c. +

+References netconn::err, ERR_OK, ERR_VAL, NULL, pbuf_free(), netconn::recvmbox, SYS_MBOX_NULL, and sys_mbox_post(). +

+Referenced by setup_tcp(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static void recv_udp (void *  arg,
struct udp_pcb pcb,
struct pbuf p,
struct ip_addr addr,
uInt16  port 
) [static]
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
static err_t sent_tcp (void *  arg,
struct tcp_pcb pcb,
uInt16  len 
) [static]
+
+
+ +

+ +

+Definition at line 110 of file api_msg.c. +

+References ERR_OK, NULL, netconn::sem, SYS_SEM_NULL, and sys_sem_signal(). +

+Referenced by setup_tcp(). +

+

+ +

+
+ + + + + + + + + +
static void setup_tcp (struct netconn conn  )  [static]
+
+ +

+


Variable Documentation

+ +
+
+ + + + +
api_msg_decode decode[API_MSG_MAX] [static]
+
+
+ +

+Initial value:

+

+Definition at line 504 of file api_msg.c. +

+Referenced by api_msg_input(). +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/api__msg_8h-source.html b/doc/html/api__msg_8h-source.html new file mode 100644 index 0000000..f6e2e70 --- /dev/null +++ b/doc/html/api__msg_8h-source.html @@ -0,0 +1,133 @@ + + +UbixOS V2: src/sys/include/net/api_msg.h Source File + + + + +
+
+
+
+ +

api_msg.h

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 #ifndef __LWIP_API_MSG_H__
+00036 #define __LWIP_API_MSG_H__
+00037 
+00038 #include "net/opt.h"
+00039 #include "net/pbuf.h"
+00040 #include "net/sys.h"
+00041 
+00042 #include "net/ipv4/ip.h"
+00043 
+00044 #include "net/udp.h"
+00045 #include "net/tcp.h"
+00046 
+00047 #include "net/api.h"
+00048 
+00049 enum api_msg_type {
+00050   API_MSG_NEWCONN,
+00051   API_MSG_DELCONN,
+00052   
+00053   API_MSG_BIND,
+00054   API_MSG_CONNECT,
+00055 
+00056   API_MSG_LISTEN,
+00057   API_MSG_ACCEPT,
+00058 
+00059   API_MSG_SEND,
+00060   API_MSG_RECV,
+00061   API_MSG_WRITE,
+00062 
+00063   API_MSG_CLOSE,
+00064   
+00065   API_MSG_MAX
+00066 };
+00067 
+00068 struct api_msg_msg {
+00069   struct netconn *conn;
+00070   enum netconn_type conntype;
+00071   union {
+00072     struct pbuf *p;   
+00073     struct  {
+00074       struct ip_addr *ipaddr;
+00075       uInt16 port;
+00076     } bc;
+00077     struct {
+00078       void *dataptr;
+00079       uInt16 len;
+00080       unsigned char copy;
+00081     } w;    
+00082     sys_mbox_t mbox;
+00083     uInt16 len;
+00084   } msg;
+00085 };
+00086 
+00087 struct api_msg {
+00088   enum api_msg_type type;
+00089   struct api_msg_msg msg;
+00090 };
+00091 
+00092 void api_msg_input(struct api_msg *msg);
+00093 void api_msg_post(struct api_msg *msg);
+00094 
+00095 #endif /* __LWIP_API_MSG_H__ */
+00096 
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/api__msg_8h.html b/doc/html/api__msg_8h.html new file mode 100644 index 0000000..8ed4042 --- /dev/null +++ b/doc/html/api__msg_8h.html @@ -0,0 +1,176 @@ + + +UbixOS V2: src/sys/include/net/api_msg.h File Reference + + + + +
+
+
+
+ +

api_msg.h File Reference

+

+#include "net/opt.h"
+#include "net/pbuf.h"
+#include "net/sys.h"
+#include "net/ipv4/ip.h"
+#include "net/udp.h"
+#include "net/tcp.h"
+#include "net/api.h"
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + +

Data Structures

struct  api_msg
struct  api_msg_msg

Enumerations

enum  api_msg_type {
+  API_MSG_NEWCONN, +API_MSG_DELCONN, +API_MSG_BIND, +API_MSG_CONNECT, +
+  API_MSG_LISTEN, +API_MSG_ACCEPT, +API_MSG_SEND, +API_MSG_RECV, +
+  API_MSG_WRITE, +API_MSG_CLOSE, +API_MSG_MAX +
+ }

Functions

void api_msg_input (struct api_msg *msg)
void api_msg_post (struct api_msg *msg)
+


Enumeration Type Documentation

+ +
+
+ + + + +
enum api_msg_type
+
+
+ +

+

Enumerator:
+ + + + + + + + + + + + +
API_MSG_NEWCONN  +
API_MSG_DELCONN  +
API_MSG_BIND  +
API_MSG_CONNECT  +
API_MSG_LISTEN  +
API_MSG_ACCEPT  +
API_MSG_SEND  +
API_MSG_RECV  +
API_MSG_WRITE  +
API_MSG_CLOSE  +
API_MSG_MAX  +
+
+ +

+Definition at line 49 of file api_msg.h. +

+

+


Function Documentation

+ +
+
+ + + + + + + + + +
void api_msg_input (struct api_msg msg  ) 
+
+
+ +

+ +

+Definition at line 517 of file api_msg.c. +

+References decode, and api_msg_msg::msg. +

+Referenced by tcpip_thread(). +

+

+ +

+
+ + + + + + + + + +
void api_msg_post (struct api_msg msg  ) 
+
+ +

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/arch_8h-source.html b/doc/html/arch_8h-source.html new file mode 100644 index 0000000..4b7e345 --- /dev/null +++ b/doc/html/arch_8h-source.html @@ -0,0 +1,98 @@ + + +UbixOS V2: src/sys/include/net/arch.h Source File + + + + +
+
+
+
+ +

arch.h

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 #ifndef __LWIP_ARCH_H__
+00036 #define __LWIP_ARCH_H__
+00037 
+00038 #ifndef LITTLE_ENDIAN
+00039 #define LITTLE_ENDIAN 1234
+00040 #endif
+00041 
+00042 #ifndef BIG_ENDIAN
+00043 #define BIG_ENDIAN 4321
+00044 #endif
+00045 
+00046 #include "arch/cpu.h"
+00047 #include "arch/cc.h"
+00048 
+00049 #ifndef PACK_STRUCT_BEGIN
+00050 #define PACK_STRUCT_BEGIN
+00051 #endif /* PACK_STRUCT_BEGIN */
+00052 
+00053 #ifndef PACK_STRUCT_END
+00054 #define PACK_STRUCT_END
+00055 #endif /* PACK_STRUCT_END */
+00056 
+00057 #ifndef PACK_STRUCT_FIELD
+00058 #define PACK_STRUCT_FIELD(x) x
+00059 #endif /* PACK_STRUCT_FIELD */
+00060 
+00061 #endif /* __LWIP_ARCH_H__ */
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/arch_8h.html b/doc/html/arch_8h.html new file mode 100644 index 0000000..5419eea --- /dev/null +++ b/doc/html/arch_8h.html @@ -0,0 +1,86 @@ + + +UbixOS V2: src/sys/include/net/arch.h File Reference + + + + +
+
+
+
+ +

arch.h File Reference

+

+#include "arch/cpu.h"
+#include "arch/cc.h"
+ +

+Go to the source code of this file. + + + + + + +

Defines

#define BIG_ENDIAN   4321
#define LITTLE_ENDIAN   1234
+


Define Documentation

+ +
+
+ + + + +
#define BIG_ENDIAN   4321
+
+
+ +

+ +

+Definition at line 43 of file arch.h. +

+

+ +

+
+ + + + +
#define LITTLE_ENDIAN   1234
+
+
+ +

+ +

+Definition at line 39 of file arch.h. +

+

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/arp_8c-source.html b/doc/html/arp_8c-source.html new file mode 100644 index 0000000..dcd36f9 --- /dev/null +++ b/doc/html/arp_8c-source.html @@ -0,0 +1,344 @@ + + +UbixOS V2: src/sys/net/netif/arp.c Source File + + + + +
+
+
+
+ +

arp.c

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  *
+00035  */
+00036 
+00037 #include <ubixos/types.h>
+00038 #include <lib/kprintf.h>
+00039 
+00040 #include "net/debug.h"
+00041 #include "net/ipv4/inet.h"
+00042 #include "netif/arp.h"
+00043 #include "net/ipv4/ip.h"
+00044 
+00045 
+00046 #define ARP_MAXAGE 2  /* 120 * 10 seconds = 20 minutes. */
+00047 
+00048 #define HWTYPE_ETHERNET 1
+00049 
+00050 #define ARP_REQUEST 1
+00051 #define ARP_REPLY 2
+00052 
+00053 /* MUST be compiled with "pack structs" or equivalent! */
+00054 PACK_STRUCT_BEGIN
+00055 struct arp_hdr {
+00056   PACK_STRUCT_FIELD(struct eth_hdr ethhdr);
+00057   PACK_STRUCT_FIELD(uInt16 hwtype);
+00058   PACK_STRUCT_FIELD(uInt16 proto);
+00059   PACK_STRUCT_FIELD(uInt16 _hwlen_protolen);
+00060   PACK_STRUCT_FIELD(uInt16 opcode);
+00061   PACK_STRUCT_FIELD(struct eth_addr shwaddr);
+00062   PACK_STRUCT_FIELD(struct ip_addr sipaddr);
+00063   PACK_STRUCT_FIELD(struct eth_addr dhwaddr);
+00064   PACK_STRUCT_FIELD(struct ip_addr dipaddr);
+00065 } PACK_STRUCT_STRUCT;
+00066 PACK_STRUCT_END
+00067 
+00068 #define ARPH_HWLEN(hdr) (NTOHS((hdr)->_hwlen_protolen) >> 8)
+00069 #define ARPH_PROTOLEN(hdr) (NTOHS((hdr)->_hwlen_protolen) & 0xff)
+00070 
+00071 
+00072 #define ARPH_HWLEN_SET(hdr, len) (hdr)->_hwlen_protolen = HTONS(ARPH_PROTOLEN(hdr) | ((len) << 8))
+00073 #define ARPH_PROTOLEN_SET(hdr, len) (hdr)->_hwlen_protolen = HTONS((len) | (ARPH_HWLEN(hdr) << 8))
+00074 
+00075 PACK_STRUCT_BEGIN
+00076 struct ethip_hdr {
+00077   PACK_STRUCT_FIELD(struct eth_hdr eth);
+00078   PACK_STRUCT_FIELD(struct ip_hdr ip);
+00079 };
+00080 PACK_STRUCT_END
+00081 
+00082 struct arp_entry {
+00083   struct ip_addr ipaddr;
+00084   struct eth_addr ethaddr;
+00085   uInt8 ctime;
+00086 };
+00087 
+00088 static struct arp_entry arp_table[ARP_TABLE_SIZE];
+00089 static uInt8 ctime;
+00090 
+00091 /*-----------------------------------------------------------------------------------*/
+00092 void
+00093 arp_init(void)
+00094 {
+00095   uInt8 i;
+00096   
+00097   for(i = 0; i < ARP_TABLE_SIZE; ++i) {
+00098     ip_addr_set(&(arp_table[i].ipaddr),
+00099                 IP_ADDR_ANY);
+00100   }
+00101 }
+00102 /*-----------------------------------------------------------------------------------*/
+00103 void
+00104 arp_tmr(void)
+00105 {
+00106   uInt8 i;
+00107   
+00108   ++ctime;
+00109   for(i = 0; i < ARP_TABLE_SIZE; ++i) {
+00110     if(!ip_addr_isany(&arp_table[i].ipaddr) &&       
+00111        ctime - arp_table[i].ctime >= ARP_MAXAGE) {
+00112       DEBUGF(ARP_DEBUG, ("arp_timer: expired entry %d.\n", i));
+00113       ip_addr_set(&(arp_table[i].ipaddr),
+00114                   IP_ADDR_ANY);
+00115     }
+00116   }  
+00117 }
+00118 /*-----------------------------------------------------------------------------------*/
+00119 static void
+00120 add_arp_entry(struct ip_addr *ipaddr, struct eth_addr *ethaddr)
+00121 {
+00122   uInt8 i, j, k;
+00123   uInt8 maxtime;
+00124   
+00125   /* Walk through the ARP mapping table and try to find an entry to
+00126      update. If none is found, the IP -> MAC address mapping is
+00127      inserted in the ARP table. */
+00128   for(i = 0; i < ARP_TABLE_SIZE; ++i) {
+00129     
+00130     /* Only check those entries that are actually in use. */
+00131     if(!ip_addr_isany(&arp_table[i].ipaddr)) {
+00132       /* Check if the source IP address of the incoming packet matches
+00133          the IP address in this ARP table entry. */
+00134       if(ip_addr_cmp(ipaddr, &arp_table[i].ipaddr)) {
+00135         /* An old entry found, update this and return. */
+00136         for(k = 0; k < 6; ++k) {
+00137           arp_table[i].ethaddr.addr[k] = ethaddr->addr[k];
+00138         }
+00139         arp_table[i].ctime = ctime;
+00140         return;
+00141       }
+00142     }
+00143   }
+00144 
+00145   /* If we get here, no existing ARP table entry was found, so we
+00146      create one. */
+00147 
+00148   /* First, we try to find an unused entry in the ARP table. */
+00149   for(i = 0; i < ARP_TABLE_SIZE; ++i) {
+00150     if(ip_addr_isany(&arp_table[i].ipaddr)) {
+00151       break;
+00152     }
+00153   }
+00154 
+00155   /* If no unused entry is found, we try to find the oldest entry and
+00156      throw it away. */
+00157   if(i == ARP_TABLE_SIZE) {
+00158     maxtime = 0;
+00159     j = 0;
+00160     for(i = 0; i < ARP_TABLE_SIZE; ++i) {
+00161       if(ctime - arp_table[i].ctime > maxtime) {
+00162         maxtime = ctime - arp_table[i].ctime;
+00163         j = i;
+00164       }
+00165     }
+00166     i = j;
+00167   }
+00168 
+00169   /* Now, i is the ARP table entry which we will fill with the new
+00170      information. */
+00171   ip_addr_set(&arp_table[i].ipaddr, ipaddr);
+00172   for(k = 0; k < 6; ++k) {
+00173     arp_table[i].ethaddr.addr[k] = ethaddr->addr[k];
+00174   }
+00175   arp_table[i].ctime = ctime;
+00176   return;
+00177 
+00178 }
+00179 /*-----------------------------------------------------------------------------------*/
+00180 void
+00181 arp_ip_input(struct netif *netif, struct pbuf *p)
+00182 {
+00183   struct ethip_hdr *hdr;
+00184   
+00185   hdr = p->payload;
+00186   
+00187   /* Only insert/update an entry if the source IP address of the
+00188      incoming IP packet comes from a host on the local network. */
+00189   if(!ip_addr_maskcmp(&(hdr->ip.src), &(netif->ip_addr), &(netif->netmask))) {
+00190     return;
+00191   }
+00192   DEBUGF(ARP_DEBUG, ("arp_ip_input: updating ARP table.\n"));
+00193   add_arp_entry(&(hdr->ip.src), &(hdr->eth.src));
+00194 }
+00195 /*-----------------------------------------------------------------------------------*/
+00196 struct pbuf *
+00197 arp_arp_input(struct netif *netif, struct eth_addr *ethaddr, struct pbuf *p)
+00198 {
+00199   struct arp_hdr *hdr;
+00200   uInt8 i;
+00201   
+00202   if(p->tot_len < sizeof(struct arp_hdr)) {
+00203     kprintf("arp_arp_input: packet too short (%d/%d)\n", p->tot_len, sizeof(struct arp_hdr));
+00204     pbuf_free(p);
+00205     return NULL;
+00206   }
+00207 
+00208   hdr = p->payload;
+00209   
+00210   switch(htons(hdr->opcode)) {
+00211   case ARP_REQUEST:
+00212     /* ARP request. If it asked for our address, we send out a
+00213        reply. */
+00214     if(ip_addr_cmp(&(hdr->dipaddr), &(netif->ip_addr))) {
+00215       hdr->opcode = htons(ARP_REPLY);
+00216 
+00217       ip_addr_set(&(hdr->dipaddr), &(hdr->sipaddr));
+00218       ip_addr_set(&(hdr->sipaddr), &(netif->ip_addr));
+00219 
+00220       for(i = 0; i < 6; ++i) {
+00221         hdr->dhwaddr.addr[i] = hdr->shwaddr.addr[i];
+00222         hdr->shwaddr.addr[i] = ethaddr->addr[i];
+00223         hdr->ethhdr.dest.addr[i] = hdr->dhwaddr.addr[i];
+00224         hdr->ethhdr.src.addr[i] = ethaddr->addr[i];
+00225       }
+00226 
+00227       hdr->hwtype = htons(HWTYPE_ETHERNET);
+00228       ARPH_HWLEN_SET(hdr, 6);
+00229       
+00230       hdr->proto = htons(ETHTYPE_IP);
+00231       ARPH_PROTOLEN_SET(hdr, sizeof(struct ip_addr));      
+00232       
+00233       hdr->ethhdr.type = htons(ETHTYPE_ARP);      
+00234       return p;
+00235     }
+00236     break;
+00237   case ARP_REPLY:    
+00238     /* ARP reply. We insert or update the ARP table. */
+00239     if(ip_addr_cmp(&(hdr->dipaddr), &(netif->ip_addr))) {
+00240       add_arp_entry(&(hdr->sipaddr), &(hdr->shwaddr));
+00241     }
+00242     break;
+00243   default:
+00244     kprintf("arp_arp_input: unknown type %d\n", htons(hdr->opcode));
+00245     break;
+00246   }
+00247 
+00248   pbuf_free(p);
+00249   return NULL;
+00250 }
+00251 /*-----------------------------------------------------------------------------------*/
+00252 struct eth_addr *
+00253 arp_lookup(struct ip_addr *ipaddr)
+00254 {
+00255   uInt8 i;
+00256   
+00257   for(i = 0; i < ARP_TABLE_SIZE; ++i) {
+00258     if(ip_addr_cmp(ipaddr, &arp_table[i].ipaddr)) {
+00259       return &arp_table[i].ethaddr;
+00260     }
+00261   }
+00262   return NULL;  
+00263 }
+00264 /*-----------------------------------------------------------------------------------*/
+00265 struct pbuf *
+00266 arp_query(struct netif *netif, struct eth_addr *ethaddr, struct ip_addr *ipaddr)
+00267 {
+00268   struct arp_hdr *hdr;
+00269   struct pbuf *p;
+00270   uInt8 i;
+00271 
+00272   p = pbuf_alloc(PBUF_LINK, sizeof(struct arp_hdr), PBUF_RAM);
+00273   if(p == NULL) {
+00274     return NULL;
+00275   }
+00276 
+00277   hdr = p->payload;
+00278   
+00279   hdr->opcode = htons(ARP_REQUEST);
+00280 
+00281   for(i = 0; i < 6; ++i) {
+00282     hdr->dhwaddr.addr[i] = 0x00;
+00283     hdr->shwaddr.addr[i] = ethaddr->addr[i];
+00284   }
+00285   
+00286   ip_addr_set(&(hdr->dipaddr), ipaddr);
+00287   ip_addr_set(&(hdr->sipaddr), &(netif->ip_addr));
+00288 
+00289   hdr->hwtype = htons(HWTYPE_ETHERNET);
+00290   ARPH_HWLEN_SET(hdr, 6);
+00291 
+00292   hdr->proto = htons(ETHTYPE_IP);
+00293   ARPH_PROTOLEN_SET(hdr, sizeof(struct ip_addr));
+00294 
+00295   for(i = 0; i < 6; ++i) {
+00296     hdr->ethhdr.dest.addr[i] = 0xff;
+00297     hdr->ethhdr.src.addr[i] = ethaddr->addr[i];
+00298   }
+00299   
+00300   hdr->ethhdr.type = htons(ETHTYPE_ARP);      
+00301   return p;
+00302 }
+00303 /*-----------------------------------------------------------------------------------*/
+00304 
+00305 
+00306 
+00307 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/arp_8c.html b/doc/html/arp_8c.html new file mode 100644 index 0000000..ed8977f --- /dev/null +++ b/doc/html/arp_8c.html @@ -0,0 +1,556 @@ + + +UbixOS V2: src/sys/net/netif/arp.c File Reference + + + + +
+
+
+
+ +

arp.c File Reference

+

+#include <ubixos/types.h>
+#include <lib/kprintf.h>
+#include "net/debug.h"
+#include "net/ipv4/inet.h"
+#include "netif/arp.h"
+#include "net/ipv4/ip.h"
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  arp_entry
struct  arp_hdr
struct  ethip_hdr

Defines

#define ARP_MAXAGE   2
#define ARP_REPLY   2
#define ARP_REQUEST   1
#define ARPH_HWLEN(hdr)   (NTOHS((hdr)->_hwlen_protolen) >> 8)
#define ARPH_HWLEN_SET(hdr, len)   (hdr)->_hwlen_protolen = HTONS(ARPH_PROTOLEN(hdr) | ((len) << 8))
#define ARPH_PROTOLEN(hdr)   (NTOHS((hdr)->_hwlen_protolen) & 0xff)
#define ARPH_PROTOLEN_SET(hdr, len)   (hdr)->_hwlen_protolen = HTONS((len) | (ARPH_HWLEN(hdr) << 8))
#define HWTYPE_ETHERNET   1

Functions

static void add_arp_entry (struct ip_addr *ipaddr, struct eth_addr *ethaddr)
pbufarp_arp_input (struct netif *netif, struct eth_addr *ethaddr, struct pbuf *p)
void arp_init (void)
void arp_ip_input (struct netif *netif, struct pbuf *p)
eth_addrarp_lookup (struct ip_addr *ipaddr)
pbufarp_query (struct netif *netif, struct eth_addr *ethaddr, struct ip_addr *ipaddr)
void arp_tmr (void)

Variables

static struct arp_entry arp_table [ARP_TABLE_SIZE]
static uInt8 ctime
PACK_STRUCT_BEGIN struct arp_hdr PACK_STRUCT_STRUCT
+


Define Documentation

+ +
+
+ + + + +
#define ARP_MAXAGE   2
+
+
+ +

+ +

+Definition at line 46 of file arp.c. +

+Referenced by arp_tmr(). +

+

+ +

+
+ + + + +
#define ARP_REPLY   2
+
+
+ +

+ +

+Definition at line 51 of file arp.c. +

+Referenced by arp_arp_input(). +

+

+ +

+
+ + + + +
#define ARP_REQUEST   1
+
+
+ +

+ +

+Definition at line 50 of file arp.c. +

+Referenced by arp_arp_input(), and arp_query(). +

+

+ +

+
+ + + + + + + + + +
#define ARPH_HWLEN (hdr   )    (NTOHS((hdr)->_hwlen_protolen) >> 8)
+
+
+ +

+ +

+Definition at line 68 of file arp.c. +

+

+ +

+
+ + + + + + + + + + + + +
#define ARPH_HWLEN_SET (hdr,
len   )    (hdr)->_hwlen_protolen = HTONS(ARPH_PROTOLEN(hdr) | ((len) << 8))
+
+
+ +

+ +

+Definition at line 72 of file arp.c. +

+Referenced by arp_arp_input(), and arp_query(). +

+

+ +

+
+ + + + + + + + + +
#define ARPH_PROTOLEN (hdr   )    (NTOHS((hdr)->_hwlen_protolen) & 0xff)
+
+
+ +

+ +

+Definition at line 69 of file arp.c. +

+

+ +

+
+ + + + + + + + + + + + +
#define ARPH_PROTOLEN_SET (hdr,
len   )    (hdr)->_hwlen_protolen = HTONS((len) | (ARPH_HWLEN(hdr) << 8))
+
+
+ +

+ +

+Definition at line 73 of file arp.c. +

+Referenced by arp_arp_input(), and arp_query(). +

+

+ +

+
+ + + + +
#define HWTYPE_ETHERNET   1
+
+
+ +

+ +

+Definition at line 48 of file arp.c. +

+Referenced by arp_arp_input(), and arp_query(). +

+

+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
static void add_arp_entry (struct ip_addr ipaddr,
struct eth_addr ethaddr 
) [static]
+
+
+ +

+ +

+Definition at line 120 of file arp.c. +

+References arp_table, ARP_TABLE_SIZE, ctime, arp_entry::ctime, arp_entry::ethaddr, ip_addr_cmp, ip_addr_isany, ip_addr_set, and arp_entry::ipaddr. +

+Referenced by arp_arp_input(), and arp_ip_input(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
struct pbuf* arp_arp_input (struct netif netif,
struct eth_addr ethaddr,
struct pbuf p 
)
+
+ +

+ +

+
+ + + + + + + + + +
void arp_init (void   ) 
+
+
+ +

+ +

+Definition at line 93 of file arp.c. +

+References arp_table, ARP_TABLE_SIZE, IP_ADDR_ANY, ip_addr_set, and arp_entry::ipaddr. +

+Referenced by ethernetif_init(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void arp_ip_input (struct netif netif,
struct pbuf p 
)
+
+
+ +

+ +

+Definition at line 181 of file arp.c. +

+References add_arp_entry(), ARP_DEBUG, DEBUGF, netif::ip_addr, ip_addr_maskcmp, netif::netmask, and pbuf::payload. +

+Referenced by ethernetif_input(). +

+

+ +

+
+ + + + + + + + + +
struct eth_addr* arp_lookup (struct ip_addr ipaddr  ) 
+
+
+ +

+ +

+Definition at line 253 of file arp.c. +

+References arp_table, ARP_TABLE_SIZE, ip_addr_cmp, and NULL. +

+Referenced by ethernetif_output(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
struct pbuf* arp_query (struct netif netif,
struct eth_addr ethaddr,
struct ip_addr ipaddr 
)
+
+ +

+ +

+
+ + + + + + + + + +
void arp_tmr (void   ) 
+
+
+ +

+ +

+Definition at line 104 of file arp.c. +

+References ARP_DEBUG, ARP_MAXAGE, arp_table, ARP_TABLE_SIZE, ctime, DEBUGF, IP_ADDR_ANY, ip_addr_isany, ip_addr_set, and arp_entry::ipaddr. +

+Referenced by arp_timer(). +

+

+


Variable Documentation

+ +
+
+ + + + +
struct arp_entry arp_table[ARP_TABLE_SIZE] [static]
+
+
+ +

+ +

+Definition at line 88 of file arp.c. +

+Referenced by add_arp_entry(), arp_init(), arp_lookup(), and arp_tmr(). +

+

+ +

+
+ + + + +
uInt8 ctime [static]
+
+
+ +

+ +

+Definition at line 89 of file arp.c. +

+Referenced by add_arp_entry(), and arp_tmr(). +

+

+ +

+
+ + + + +
PACK_STRUCT_BEGIN struct arp_hdr PACK_STRUCT_STRUCT
+
+
+ +

+ +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/arp_8h-source.html b/doc/html/arp_8h-source.html new file mode 100644 index 0000000..53c04c1 --- /dev/null +++ b/doc/html/arp_8h-source.html @@ -0,0 +1,132 @@ + + +UbixOS V2: src/sys/include/netif/arp.h Source File + + + + +
+
+
+
+ +

arp.h

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. All advertising materials mentioning features or use of this software
+00014  *    must display the following acknowledgement:
+00015  *      This product includes software developed by the Swedish Institute
+00016  *      of Computer Science and its contributors.
+00017  * 4. Neither the name of the Institute nor the names of its contributors 
+00018  *    may be used to endorse or promote products derived from this software 
+00019  *    without specific prior written permission. 
+00020  *
+00021  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00022  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00023  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00024  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00025  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00026  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00027  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00028  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00029  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00030  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00031  * SUCH DAMAGE. 
+00032  *
+00033  * This file is part of the lwIP TCP/IP stack.
+00034  * 
+00035  * Author: Adam Dunkels <adam@sics.se>
+00036  *
+00037  * $Id$
+00038  *
+00039  */
+00040 
+00041 #ifndef __NETIF_ARP_H__
+00042 #define __NETIF_ARP_H__
+00043 
+00044 #include "net/pbuf.h"
+00045 #include "net/ipv4/ip_addr.h"
+00046 #include "net/netif.h"
+00047 
+00048 struct eth_addr {
+00049   PACK_STRUCT_FIELD(uInt8 addr[6]);
+00050 } PACK_STRUCT_STRUCT;
+00051   
+00052 struct eth_hdr {
+00053   PACK_STRUCT_FIELD(struct eth_addr dest);
+00054   PACK_STRUCT_FIELD(struct eth_addr src);
+00055   PACK_STRUCT_FIELD(uInt16 type);
+00056 } PACK_STRUCT_STRUCT;
+00057 
+00058 #define ARP_TMR_INTERVAL 10000
+00059 
+00060 #define ETHTYPE_ARP 0x0806
+00061 #define ETHTYPE_IP  0x0800
+00062 
+00063 /* Initializes ARP. */
+00064 void arp_init(void);
+00065 
+00066 /* The arp_tmr() function should be called every ARP_TMR_INTERVAL
+00067    microseconds (10 seconds). This function is responsible for
+00068    expiring old entries in the ARP table. */
+00069 void arp_tmr(void);
+00070 
+00071 /* Should be called for all incoming packets of IP kind. The function
+00072    does not alter the packet in any way, it just updates the ARP
+00073    table. After this function has been called, the normal TCP/IP stack
+00074    input function should be called. */
+00075 void arp_ip_input(struct netif *netif, struct pbuf *p);
+00076 
+00077 /* Should be called for incoming ARP packets. The pbuf in the argument
+00078    is freed by this function. If the function returns a pbuf (i.e.,
+00079    returns non-NULL), that pbuf constitutes an ARP reply and should be
+00080    sent out on the Ethernet. */
+00081 struct pbuf *arp_arp_input(struct netif *netif, struct eth_addr *ethaddr,
+00082                            struct pbuf *p);
+00083 
+00084 /* arp_loopup() is called to do an IP address -> Ethernet address
+00085    translation. If the function returns NULL, there is no mapping and
+00086    the arp_query() function should be called. */
+00087 struct eth_addr *arp_lookup(struct ip_addr *ipaddr);
+00088 
+00089 /* Constructs an ARP query packet for the given IP address. The
+00090    function returns a pbuf that contains the reply and that should be
+00091    sent out on the Ethernet. */
+00092 struct pbuf *arp_query(struct netif *netif, struct eth_addr *ethaddr,
+00093                        struct ip_addr *ipaddr);
+00094 
+00095 #endif /* __NETIF_ARP_H__ */
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/arp_8h.html b/doc/html/arp_8h.html new file mode 100644 index 0000000..b0e4388 --- /dev/null +++ b/doc/html/arp_8h.html @@ -0,0 +1,362 @@ + + +UbixOS V2: src/sys/include/netif/arp.h File Reference + + + + +
+
+
+
+ +

arp.h File Reference

+

+#include "net/pbuf.h"
+#include "net/ipv4/ip_addr.h"
+#include "net/netif.h"
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  eth_addr
struct  eth_hdr

Defines

#define ARP_TMR_INTERVAL   10000
#define ETHTYPE_ARP   0x0806
#define ETHTYPE_IP   0x0800

Functions

pbufarp_arp_input (struct netif *netif, struct eth_addr *ethaddr, struct pbuf *p)
void arp_init (void)
void arp_ip_input (struct netif *netif, struct pbuf *p)
eth_addrarp_lookup (struct ip_addr *ipaddr)
pbufarp_query (struct netif *netif, struct eth_addr *ethaddr, struct ip_addr *ipaddr)
void arp_tmr (void)

Variables

eth_hdr PACK_STRUCT_STRUCT
eth_addr PACK_STRUCT_STRUCT
+


Define Documentation

+ +
+
+ + + + +
#define ARP_TMR_INTERVAL   10000
+
+
+ +

+ +

+Definition at line 58 of file arp.h. +

+Referenced by arp_timer(), and ethernetif_init(). +

+

+ +

+
+ + + + +
#define ETHTYPE_ARP   0x0806
+
+
+ +

+ +

+Definition at line 60 of file arp.h. +

+Referenced by arp_arp_input(), arp_query(), and ethernetif_input(). +

+

+ +

+
+ + + + +
#define ETHTYPE_IP   0x0800
+
+
+ +

+ +

+Definition at line 61 of file arp.h. +

+Referenced by arp_arp_input(), arp_query(), ethernetif_input(), and ethernetif_output(). +

+

+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
struct pbuf* arp_arp_input (struct netif netif,
struct eth_addr ethaddr,
struct pbuf p 
)
+
+ +

+ +

+
+ + + + + + + + + +
void arp_init (void   ) 
+
+
+ +

+ +

+Definition at line 93 of file arp.c. +

+References arp_table, ARP_TABLE_SIZE, IP_ADDR_ANY, ip_addr_set, and arp_entry::ipaddr. +

+Referenced by ethernetif_init(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void arp_ip_input (struct netif netif,
struct pbuf p 
)
+
+
+ +

+ +

+Definition at line 181 of file arp.c. +

+References add_arp_entry(), ARP_DEBUG, DEBUGF, netif::ip_addr, ip_addr_maskcmp, netif::netmask, and pbuf::payload. +

+Referenced by ethernetif_input(). +

+

+ +

+
+ + + + + + + + + +
struct eth_addr* arp_lookup (struct ip_addr ipaddr  ) 
+
+
+ +

+ +

+Definition at line 253 of file arp.c. +

+References arp_table, ARP_TABLE_SIZE, ip_addr_cmp, and NULL. +

+Referenced by ethernetif_output(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
struct pbuf* arp_query (struct netif netif,
struct eth_addr ethaddr,
struct ip_addr ipaddr 
)
+
+ +

+ +

+
+ + + + + + + + + +
void arp_tmr (void   ) 
+
+
+ +

+ +

+Definition at line 104 of file arp.c. +

+References ARP_DEBUG, ARP_MAXAGE, arp_table, ARP_TABLE_SIZE, ctime, DEBUGF, IP_ADDR_ANY, ip_addr_isany, ip_addr_set, and arp_entry::ipaddr. +

+Referenced by arp_timer(). +

+

+


Variable Documentation

+ +
+
+ + + + +
struct eth_hdr PACK_STRUCT_STRUCT
+
+
+ +

+ +

+

+ +

+
+ + + + +
struct eth_addr PACK_STRUCT_STRUCT
+
+
+ +

+ +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/assert_8c-source.html b/doc/html/assert_8c-source.html new file mode 100644 index 0000000..9e926d6 --- /dev/null +++ b/doc/html/assert_8c-source.html @@ -0,0 +1,105 @@ + + +UbixOS V2: src/sys/lib/assert.c Source File + + + + +
+
+
+
+ +

assert.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005 Redistribution and use in source and binary forms, with or without modification, are
+00006 permitted provided that the following conditions are met:
+00007 
+00008 Redistributions of source code must retain the above copyright notice, this list of
+00009 conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010 form must reproduce the above copyright notice, this list of conditions, the following
+00011 disclaimer and the list of authors in the documentation and/or other materials provided
+00012 with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013 contributors may be used to endorse or promote products derived from this software
+00014 without specific prior written permission.
+00015 
+00016 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019 THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021 OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023 TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <assert.h>
+00031 #include <lib/kprintf.h>
+00032 #include <ubixos/kpanic.h>
+00033 
+00034 void __assert(const char *func,const char *file,int line,const char *failedexpr) {
+00035         if (func == NULL)
+00036                 kprintf(
+00037                      "Assertion failed: (%s), file %s, line %d.\n", failedexpr,
+00038                      file, line);
+00039         else
+00040                 kprintf(
+00041                      "Assertion failed: (%s), function %s, file %s, line %d.\n",
+00042                      failedexpr, func, file, line);
+00043   kpanic("Asserted\n");
+00044   }
+00045 
+00046 /***
+00047  $Log$
+00048  Revision 1.1.1.1  2006/06/01 12:46:16  reddawg
+00049  ubix2
+00050 
+00051  Revision 1.2  2005/10/12 00:13:37  reddawg
+00052  Removed
+00053 
+00054  Revision 1.1.1.1  2005/09/26 17:24:10  reddawg
+00055  no message
+00056 
+00057  Revision 1.2  2005/08/04 17:11:11  fsdfs
+00058 
+00059  ----------------------------------------
+00060 
+00061  -------------------
+00062 
+00063  Revision 1.1  2004/07/20 22:29:55  reddawg
+00064  assert: remade assert
+00065 
+00066  END
+00067  ***/
+00068 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/assert_8c.html b/doc/html/assert_8c.html new file mode 100644 index 0000000..394f50e --- /dev/null +++ b/doc/html/assert_8c.html @@ -0,0 +1,96 @@ + + +UbixOS V2: src/sys/lib/assert.c File Reference + + + + +
+
+
+
+ +

assert.c File Reference

+

+#include <assert.h>
+#include <lib/kprintf.h>
+#include <ubixos/kpanic.h>
+ +

+Go to the source code of this file. + + + + +

Functions

void __assert (const char *func, const char *file, int line, const char *failedexpr)
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void __assert (const char *  func,
const char *  file,
int  line,
const char *  failedexpr 
)
+
+
+ +

+ +

+Definition at line 34 of file assert.c. +

+References kpanic(), kprintf(), and NULL. +

+

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/assert_8h-source.html b/doc/html/assert_8h-source.html new file mode 100644 index 0000000..fe438fe --- /dev/null +++ b/doc/html/assert_8h-source.html @@ -0,0 +1,107 @@ + + +UbixOS V2: src/sys/include/assert.h Source File + + + + +
+
+
+
+ +

assert.h

Go to the documentation of this file.
00001 /*-
+00002  * Copyright (c) 1992, 1993
+00003  *      The Regents of the University of California.  All rights reserved.
+00004  * (c) UNIX System Laboratories, Inc.
+00005  * All or some portions of this file are derived from material licensed
+00006  * to the University of California by American Telephone and Telegraph
+00007  * Co. or Unix System Laboratories, Inc. and are reproduced herein with
+00008  * the permission of UNIX System Laboratories, Inc.
+00009  *
+00010  * Redistribution and use in source and binary forms, with or without
+00011  * modification, are permitted provided that the following conditions
+00012  * are met:
+00013  * 1. Redistributions of source code must retain the above copyright
+00014  *    notice, this list of conditions and the following disclaimer.
+00015  * 2. Redistributions in binary form must reproduce the above copyright
+00016  *    notice, this list of conditions and the following disclaimer in the
+00017  *    documentation and/or other materials provided with the distribution.
+00018  * 3. All advertising materials mentioning features or use of this software
+00019  *    must display the following acknowledgement:
+00020  *      This product includes software developed by the University of
+00021  *      California, Berkeley and its contributors.
+00022  * 4. Neither the name of the University nor the names of its contributors
+00023  *    may be used to endorse or promote products derived from this software
+00024  *    without specific prior written permission.
+00025  *
+00026  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+00027  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+00028  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+00029  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+00030  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+00031  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+00032  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00033  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+00034  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+00035  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+00036  * SUCH DAMAGE.
+00037  *
+00038  *      @(#)assert.h    8.2 (Berkeley) 1/21/94
+00039  * $FreeBSD: src/include/assert.h,v 1.4 2002/03/23 17:24:53 imp Exp $
+00040  */
+00041 
+00042 #if defined(__cplusplus)
+00043 #define __BEGIN_DECLS   extern "C" {
+00044 #define __END_DECLS     }
+00045 #else
+00046 #define __BEGIN_DECLS
+00047 #define __END_DECLS
+00048 #endif
+00049 
+00050 /*
+00051  * Unlike other ANSI header files, <assert.h> may usefully be included
+00052  * multiple times, with and without NDEBUG defined.
+00053  */
+00054 
+00055 #undef assert
+00056 #undef _assert
+00057 
+00058 #ifdef NDEBUG
+00059 #define assert(e)       ((void)0)
+00060 #define _assert(e)      ((void)0)
+00061 #else
+00062 #define _assert(e)      assert(e)
+00063 
+00064 #define assert(e)       ((e) ? (void)0 : __assert(__func__, __FILE__, \
+00065                             __LINE__, #e))
+00066 #endif /* NDEBUG */
+00067 
+00068 __BEGIN_DECLS
+00069 void __assert(const char *, const char *, int, const char *);
+00070 __END_DECLS
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/assert_8h.html b/doc/html/assert_8h.html new file mode 100644 index 0000000..1bd021a --- /dev/null +++ b/doc/html/assert_8h.html @@ -0,0 +1,185 @@ + + +UbixOS V2: src/sys/include/assert.h File Reference + + + + +
+
+
+
+ +

assert.h File Reference

+

+ +

+Go to the source code of this file. + + + + + + + + + + + + + +

Defines

#define __BEGIN_DECLS
#define __END_DECLS
#define _assert(e)   assert(e)
#define assert(e)

Functions

__BEGIN_DECLS void __assert (const char *, const char *, int, const char *)
+


Define Documentation

+ +
+
+ + + + +
#define __BEGIN_DECLS
+
+
+ +

+ +

+Definition at line 46 of file assert.h. +

+

+ +

+
+ + + + +
#define __END_DECLS
+
+
+ +

+ +

+Definition at line 47 of file assert.h. +

+

+ +

+
+ + + + + + + + + +
#define _assert (  )    assert(e)
+
+
+ +

+ +

+Definition at line 62 of file assert.h. +

+

+ +

+
+ + + + + + + + + +
#define assert (  ) 
+
+ +

+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
__BEGIN_DECLS void __assert (const char * ,
const char * ,
int ,
const char *  
)
+
+
+ +

+ +

+Definition at line 34 of file assert.c. +

+References kpanic(), kprintf(), and NULL. +

+

+


Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/atan_8c-source.html b/doc/html/atan_8c-source.html new file mode 100644 index 0000000..b8f410b --- /dev/null +++ b/doc/html/atan_8c-source.html @@ -0,0 +1,98 @@ + + +UbixOS V2: src/sys/lib/atan.c Source File + + + + +
+
+
+
+ +

atan.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005 Redistribution and use in source and binary forms, with or without modification, are
+00006 permitted provided that the following conditions are met:
+00007 
+00008 Redistributions of source code must retain the above copyright notice, this list of
+00009 conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010 form must reproduce the above copyright notice, this list of conditions, the following
+00011 disclaimer and the list of authors in the documentation and/or other materials provided
+00012 with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013 contributors may be used to endorse or promote products derived from this software
+00014 without specific prior written permission.
+00015 
+00016 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019 THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021 OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023 TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <math.h>
+00031 
+00032 double atan(double x) {
+00033   return(x); /* Quick Hack To Make This Work */
+00034   }
+00035 
+00036 /***
+00037  $Log$
+00038  Revision 1.1.1.1  2006/06/01 12:46:16  reddawg
+00039  ubix2
+00040 
+00041  Revision 1.2  2005/10/12 00:13:37  reddawg
+00042  Removed
+00043 
+00044  Revision 1.1.1.1  2005/09/26 17:24:10  reddawg
+00045  no message
+00046 
+00047  Revision 1.3  2004/05/19 04:07:43  reddawg
+00048  kmalloc(size,pid) no more it is no kmalloc(size); the way it should of been
+00049 
+00050  Revision 1.2  2004/05/19 03:46:32  reddawg
+00051  A Few Quick Hacks To Make Things Work
+00052 
+00053  Revision 1.1.1.1  2004/04/15 12:07:10  reddawg
+00054  UbixOS v1.0
+00055 
+00056  Revision 1.2  2004/04/13 16:36:33  reddawg
+00057  Changed our copyright, it is all now under a BSD-Style license
+00058 
+00059  END
+00060  ***/
+00061 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/atan_8c.html b/doc/html/atan_8c.html new file mode 100644 index 0000000..fea2331 --- /dev/null +++ b/doc/html/atan_8c.html @@ -0,0 +1,71 @@ + + +UbixOS V2: src/sys/lib/atan.c File Reference + + + + +
+
+
+
+ +

atan.c File Reference

+

+#include <math.h>
+ +

+Go to the source code of this file. + + + + +

Functions

double atan (double x)
+


Function Documentation

+ +
+
+ + + + + + + + + +
double atan (double  x  ) 
+
+
+ +

+ +

+Definition at line 32 of file atan.c. +

+

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/atkbd_8c-source.html b/doc/html/atkbd_8c-source.html new file mode 100644 index 0000000..d16806a --- /dev/null +++ b/doc/html/atkbd_8c-source.html @@ -0,0 +1,523 @@ + + +UbixOS V2: src/sys/isa/atkbd.c Source File + + + + +
+
+
+
+ +

atkbd.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <isa/atkbd.h>
+00031 #include <isa/8259.h>
+00032 #include <sys/video.h>
+00033 #include <sys/idt.h>
+00034 #include <sys/gdt.h>
+00035 #include <sys/io.h>
+00036 #include <lib/kmalloc.h>
+00037 #include <lib/kprintf.h>
+00038 #include <ubixos/types.h>
+00039 #include <ubixos/sched.h>
+00040 #include <ubixos/vitals.h>
+00041 #include <ubixos/endtask.h>
+00042 #include <ubixos/tty.h>
+00043 #include <ubixos/spinlock.h>
+00044 
+00045 static int atkbd_scan();
+00046 
+00047 static unsigned int keyMap = 0x0;
+00048 static unsigned int ledStatus = 0x0;
+00049 static char   stdinBuffer[512];
+00050 static uInt16 stdinSize;
+00051 static uInt32 controlKeys = 0x0;
+00052 
+00053 static spinLock_t atkbdSpinLock = SPIN_LOCK_INITIALIZER;
+00054 
+00055 static unsigned int keyboardMap[255][8] = {
+00056 /*           Ascii,  Shift,   Ctrl,    Alt,    Num,   Caps, Shift Caps, Shift Num */
+00057           {      0,      0,      0,      0,      0,      0,          0,         0},
+00058 /* ESC */ {   0x1B,   0x1B,   0x1B,   0x1B,   0x1B,   0x1B,       0x1B,      0x1B},
+00059 /* 1,! */ {   0x31,   0x21,      0,      0,   0x31,   0x31,       0x21,      0x21},
+00060 /* 2,@ */ {   0x32,   0x40,      0,      0,   0x32,   0x32,       0x40,      0x40},
+00061 /* 3,# */ {   0x33,   0x23,      0,      0,   0x33,   0x33,       0x23,      0x23},
+00062 /* 4,$ */ {   0x34,   0x24,      0,      0,   0x34,   0x34,       0x24,      0x24},
+00063 /* 5,% */ {   0x35,   0x25,      0,      0,   0x35,   0x35,       0x25,      0x25},
+00064 /* 6,^ */ {   0x36,   0x5E,      0,      0,   0x36,   0x36,       0x5E,      0x5E},
+00065 /* 7,& */ {   0x37,   0x26,      0,      0,   0x37,   0x37,       0x26,      0x26},
+00066 /* 8,* */ {   0x38,   0x2A,      0,      0,   0x38,   0x38,       0x2A,      0x2A},
+00067 /* 9.( */ {   0x39,   0x28,      0,      0,   0x39,   0x39,       0x28,      0x28},
+00068 /* 0,) */ {   0x30,   0x29,      0,      0,   0x30,   0x30,       0x29,      0x29},
+00069 /* -,_ */ {   0x2D,   0x5F,      0,      0,   0x2D,   0x2D,       0x5F,      0x5F},
+00070 /* =,+ */ {   0x3D,   0x2B,      0,      0,   0x3D,   0x3D,       0x2B,      0x2B},
+00071 /*  14 */ {   0x08,   0x08,    0x8,    0x8,   0x08,   0x08,       0x08,      0x08},
+00072 /*  15 */ {   0x09,      0,      0,      0,      0,      0,          0,         0},
+00073 /*     */ {   0x71,   0x51,      0,      0,      0,      0,          0,         0},
+00074 /*     */ {   0x77,   0x57,      0,      0,      0,      0,          0,         0},
+00075 /*     */ {   0x65,   0x45,      0,      0,      0,      0,          0,         0},
+00076 /*     */ {   0x72,   0x52,      0,      0,      0,      0,          0,         0},
+00077 /*     */ {   0x74,   0x54,      0,      0,      0,      0,          0,         0},
+00078 /*     */ {   0x79,   0x59,      0,      0,      0,      0,          0,         0},
+00079 /*     */ {   0x75,   0x55,      0,      0,      0,      0,          0,         0},
+00080 /*     */ {   0x69,   0x49,      0,      0,      0,      0,          0,         0},
+00081 /*     */ {   0x6F,   0x4F,      0,      0,      0,      0,          0,         0},
+00082 /*     */ {   0x70,   0x50,      0,      0,      0,      0,          0,         0},
+00083 /*     */ {   0x5B,   0x7B,      0,      0,      0,      0,          0,         0},
+00084 /*     */ {   0x5D,   0x7D,      0,      0,      0,      0,          0,         0},
+00085 /*     */ {   0x0A,      0,      0,      0,      0,      0,          0,         0},
+00086 /*     */ {      0,      0,      0,      0,      0,      0,          0,         0},
+00087 /* a,A */ {   0x61,   0x41,   0x41,      0,      0,      0,          0,         0},
+00088 /*     */ {   0x73,   0x53,      0,      0,      0,      0,          0,         0},
+00089 /*     */ {   0x64,   0x44,      0,      0,      0,      0,          0,         0},
+00090 /*     */ {   0x66,   0x46,      0,      0,      0,      0,          0,         0},
+00091 /*     */ {   0x67,   0x47,      0,      0,      0,      0,          0,         0},
+00092 /*     */ {   0x68,   0x48,      0,      0,      0,      0,          0,         0},
+00093 /*     */ {   0x6A,   0x4A,      0,      0,      0,      0,          0,         0},
+00094 /*     */ {   0x6B,   0x4B,      0,      0,      0,      0,          0,         0},
+00095 /*     */ {   0x6C,   0x4C,      0,      0,      0,      0,          0,         0},
+00096 /*     */ {   0x3B,   0x3A,      0,      0,      0,      0,          0,         0},
+00097 /*     */ {   0x27,   0x22,      0,      0,      0,      0,          0,         0},
+00098 /*     */ {   0x60,   0x7E,      0,      0,      0,      0,          0,         0},
+00099 /*     */ {   0x2A,    0x0,      0,      0,      0,      0,          0,         0},
+00100 /*     */ {   0x5C,   0x3C,      0,      0,      0,      0,          0,         0},
+00101 /*     */ {   0x7A,   0x5A,      0,      0,      0,      0,          0,         0},
+00102 /*     */ {   0x78,   0x58,      0,      0,      0,      0,          0,         0},
+00103 /* c,C */ {   0x63,   0x43,    0x3,    0x9,      0,      0,          0,         0},
+00104 /*     */ {   0x76,   0x56,      0,      0,      0,      0,          0,         0},
+00105 /*     */ {   0x62,   0x42,      0,      0,      0,      0,          0,         0},
+00106 /*     */ {   0x6E,   0x4E,      0,      0,      0,      0,          0,         0},
+00107 /*     */ {   0x6D,   0x4D,      0,      0,      0,      0,          0,         0},
+00108 /*     */ {   0x2C,   0x3C,      0,      0,      0,      0,          0,         0},
+00109 /*     */ {   0x2E,   0x3E,      0,      0,      0,      0,          0,         0},
+00110 /*     */ {   0x2F,   0x3F,      0,      0,      0,      0,          0,         0},
+00111 /*     */ {      0,      0,      0,      0,      0,      0,          0,         0},
+00112 /*     */ {      0,      0,      0,      0,      0,      0,          0,         0},
+00113 /*     */ {      0,      0,      0,      0,      0,      0,          0,         0},
+00114 /*     */ {   0x20,      0,      0,      0,      0,      0,          0,         0},
+00115 /*     */ {      0,      0,      0,      0,      0,      0,          0,         0},
+00116 /* F1  */ { 0x3000,      0,      0, 0x3000,      0,      0,          0,         0},
+00117 /*     */ { 0x3001,      0,      0, 0x3001,      0,      0,          0,         0},
+00118 /*     */ { 0x3002,      0,      0, 0x3002,      0,      0,          0,         0},
+00119 /*     */ { 0x3003,      0,      0, 0x3003,      0,      0,          0,         0},
+00120 /*     */ { 0x3004,      0,      0, 0x3004,      0,      0,          0,         0},
+00121 /*     */ { 0x4000,      0,      0,      0,      0,      0,          0,         0},
+00122 /*     */ { 0x4100,      0,      0,      0,      0,      0,          0,         0},
+00123 /*     */ { 0x4200,      0,      0,      0,      0,      0,          0,         0},
+00124 /*     */ { 0x4300,      0,      0,      0,      0,      0,          0,         0},
+00125 /*     */ { 0x4400,      0,      0,      0,      0,      0,          0,         0},
+00126 /*     */ {      0,      0,      0,      0,      0,      0,          0,         0},
+00127 /*     */ {      0,      0,      0,      0,      0,      0,          0,         0},
+00128 /*     */ { 0x4700,      0,      0,      0,      0,      0,          0,         0},
+00129 /*     */ { 0x4800,      0,      0,      0,      0,      0,          0,         0},
+00130 /*     */ { 0x4900,      0,      0,      0,      0,      0,          0,         0},
+00131 /*     */ {   0x2D,      0,      0,      0,      0,      0,          0,         0},
+00132 /*     */ { 0x4B00,      0,      0,      0,      0,      0,          0,         0},
+00133 /*     */ { 0x4C00,      0,      0,      0,      0,      0,          0,         0},
+00134 /*     */ { 0x4D00,      0,      0,      0,      0,      0,          0,         0},
+00135 /*     */ {   0x2B,      0,      0,      0,      0,      0,          0,         0},
+00136 /*     */ { 0x4F00,      0,      0,      0,      0,      0,          0,         0},
+00137 /*     */ { 0x5000,      0,      0,      0,      0,      0,          0,         0},
+00138 /*     */ { 0x5100,      0,      0,      0,      0,      0,          0,         0},
+00139 /*     */ { 0x5200,      0,      0,      0,      0,      0,          0,         0},
+00140 /*     */ { 0x5300,      0,      0,      0,      0,      0,          0,         0},
+00141 /*     */ {      0,      0,      0,      0,      0,      0,          0,         0},
+00142 /*     */ {      0,      0,      0,      0,      0,      0,          0,         0}
+00143   };
+00144 
+00145 /************************************************************************
+00146 
+00147 Function: int atkbd_init
+00148 
+00149 Description: This function is used to turn on the keyboard
+00150 
+00151 Notes:
+00152 
+00153 02/20/2004 - Approved for quality
+00154 
+00155 ************************************************************************/
+00156 int atkbd_init() {
+00157   /* Insert the IDT vector for the keyboard handler */
+00158   setVector(&atkbd_isr, mVec+0x1, dPresent + dInt + dDpl0);
+00159 
+00160   /* Set the LEDS to their defaults */
+00161   setLED();
+00162 
+00163   /* Clear Keyboard */
+00164   atkbd_scan();
+00165 
+00166   /* Turn on the keyboard vector */
+00167   irqEnable(0x1);
+00168 
+00169   /* Print out information on keyboard */
+00170   kprintf("atkbd0 - Address: [0x%X], Keyboard Buffer: [0x%X], Buffer Size [%i]\n",&atkbd_isr,&stdinBuffer,512);
+00171 
+00172   /* Return so we know everything went well */
+00173   return(0x0);
+00174   }
+00175 
+00176 /*
+00177  * 2-23-2004 mji  I think the pusha/popa should be pushal/popal
+00178  */
+00179 
+00180 asm(
+00181   ".globl atkbd_isr       \n"
+00182   "atkbd_isr:             \n"
+00183   "  pusha                \n" /* Save all registers           */
+00184   "  push %ss             \n"
+00185   "  push %ds             \n"
+00186   "  push %es             \n"
+00187   "  push %fs             \n"
+00188   "  push %gs             \n"  
+00189   "  call keyboardHandler \n"
+00190   "  mov $0x20,%dx        \n"
+00191   "  mov $0x20,%ax        \n"
+00192   "  outb %al,%dx         \n"
+00193   "  pop %gs              \n"
+00194   "  pop %fs              \n" 
+00195   "  pop %es              \n"
+00196   "  pop %ds              \n"
+00197   "  pop %ss              \n"
+00198   "  popa                 \n"
+00199   "  iret                 \n" /* Exit interrupt                           */
+00200   );
+00201 
+00202 static int atkbd_scan() {
+00203   int code = 0x0;
+00204   int val  = 0x0;
+00205   
+00206   code = inportByte(0x60);
+00207   val  = inportByte(0x61);
+00208   
+00209   outportByte(0x61,val | 0x80);
+00210   outportByte(0x61,val);
+00211   
+00212   return(code);
+00213   }
+00214 
+00215 void keyboardHandler() {
+00216   int key = 0x0;
+00217 
+00218   if (!spinTryLock(&atkbdSpinLock))
+00219         return;
+00220 
+00221   key = atkbd_scan();
+00222   
+00223   if (key > 255) 
+00224     return;
+00225 
+00226   /* Control Key */
+00227   if (key == 0x1D && !(controlKeys & controlKey)) {
+00228     controlKeys |= controlKey;
+00229     }
+00230   if (key == 0x80 + 0x1D) {
+00231     controlKeys &= (0xFF - controlKey);
+00232     }
+00233   /* ALT Key */
+00234   if (key == 0x38 && !(controlKeys & altKey)) {
+00235     controlKeys |= altKey;
+00236     }
+00237   if (key == 0x80 + 0x38) {
+00238     controlKeys &= (0xFF - altKey);
+00239     }
+00240   /* Shift Key */
+00241   if ((key == 0x2A || key == 0x36) && !(controlKeys & shiftKey)) {
+00242     controlKeys |= shiftKey;
+00243     }
+00244   if ((key == 0x80 + 0x2A) || (key == 0x80 + 0x36)) {
+00245     controlKeys &= (0xFF - shiftKey);
+00246     }
+00247   /* Caps Lock */
+00248   if (key == 0x3A) {
+00249     ledStatus ^= ledCapslock;
+00250     setLED();
+00251     }
+00252   /* Num Lock */
+00253   if (key == 0x45) {
+00254     ledStatus ^= ledNumlock;
+00255     setLED();
+00256     }
+00257   /* Scroll Lock */
+00258   if (key == 0x46) {
+00259     ledStatus ^= ledScrolllock;
+00260     setLED();
+00261     }
+00262   /* Pick Which Key Map */
+00263   if (controlKeys == 0) { keyMap = 0; }
+00264   else if (controlKeys == 1) { keyMap = 1; }
+00265   else if (controlKeys == 2) { keyMap = 2; }
+00266   else if (controlKeys == 4) { keyMap = 3; }
+00267   /* If Key Is Not Null Add It To Handler */
+00268   if (((uInt)(keyboardMap[key][keyMap]) > 0) && ((uInt32)(keyboardMap[key][keyMap]) < 0xFF)) {
+00269     switch ((uInt32)keyboardMap[key][keyMap]) {
+00270       case 8:
+00271         backSpace();
+00272         if (tty_foreground == 0x0) {
+00273           stdinBuffer[stdinSize] = keyboardMap[key][keyMap];
+00274           stdinSize++;
+00275           }
+00276         else {
+00277           tty_foreground->stdin[tty_foreground->stdinSize] = keyboardMap[key][keyMap];
+00278           tty_foreground->stdinSize++;
+00279           }
+00280         break;
+00281       case 0x3:
+00282         //if (tty_foreground != 0x0)
+00283         //  endTask(tty_foreground->owner);
+00284         //kprintf("CTRL-C pressed\n");
+00285         kprintf("FreePages: [0x%X]\n",systemVitals->freePages);
+00286         break;
+00287       case 0x9:
+00288         kprintf("REBOOTING");
+00289         while(inportByte(0x64) & 0x02);
+00290         outportByte(0x64, 0xFE);
+00291         break;
+00292       default:
+00293         if (tty_foreground == 0x0) {
+00294           stdinBuffer[stdinSize] = keyboardMap[key][keyMap];
+00295           stdinSize++;
+00296           }
+00297         else {
+00298           tty_foreground->stdin[tty_foreground->stdinSize] = keyboardMap[key][keyMap];
+00299           tty_foreground->stdinSize++;
+00300           }
+00301         break;
+00302       }
+00303     }
+00304   else {
+00305     switch ((keyboardMap[key][keyMap] >> 8)) {
+00306       case 0x30:
+00307         tty_change(keyboardMap[key][keyMap] & 0xFF);
+00308         //kprintf("Changing Consoles[0x%X:0x%X]\n",_current->id,_current);
+00309         break;
+00310       default:
+00311         break;
+00312       }
+00313     }
+00314 
+00315   /* Return */
+00316   spinUnlock(&atkbdSpinLock);
+00317   return;
+00318   }
+00319 
+00320 void setLED() {
+00321   outportByte(0x60, 0xED);
+00322   while(inportByte(0x64) & 2);
+00323   outportByte(0x60, ledStatus);
+00324   while(inportByte(0x64) & 2);
+00325   }
+00326 
+00327 /* Temp */
+00328 unsigned char getch() {
+00329   uInt8   retKey   = 0x0;
+00330   uInt32  i        = 0x0;
+00331 
+00332   /*
+00333   if ((stdinSize <= 0) && (tty_foreground == 0x0)) {
+00334     sched_yield();
+00335     }
+00336   if ((tty_foreground != 0x0) && (tty_foreground->stdinSize <= 0x0)) {
+00337     sched_yield();
+00338     }
+00339   */
+00340 
+00341   /*
+00342   if (!spinTryLock(&atkbdSpinLock))
+00343         return(0x0);
+00344 */
+00345 
+00346   if (tty_foreground == 0x0) {
+00347     if (stdinSize == 0x0) {
+00348     //  spinUnlock(&atkbdSpinLock);
+00349       return(0x0);
+00350       }
+00351   
+00352     retKey = stdinBuffer[0];
+00353     stdinSize--;
+00354 
+00355     for (i=0x0;i<stdinSize;i++) {
+00356       stdinBuffer[i] = stdinBuffer[i+0x1];
+00357       }
+00358     }
+00359   else {
+00360     if (tty_foreground->stdinSize == 0x0) {
+00361    //   spinUnlock(&atkbdSpinLock);
+00362       return(0x0);
+00363       }
+00364   
+00365     retKey = tty_foreground->stdin[0];
+00366     tty_foreground->stdinSize--;
+00367 
+00368     for (i=0x0;i<tty_foreground->stdinSize;i++) {
+00369       tty_foreground->stdin[i] = tty_foreground->stdin[i+0x1];
+00370       }
+00371     }
+00372   //spinUnlock(&atkbdSpinLock);
+00373   return(retKey);
+00374   }
+00375 
+00376 /***
+00377 
+00378  $Log$
+00379  Revision 1.3  2006/12/01 05:12:35  reddawg
+00380  We're almost there... :)
+00381 
+00382  Revision 1.2  2006/10/19 17:52:17  reddawg
+00383  Working On Userland
+00384 
+00385  Revision 1.1.1.1  2006/06/01 12:46:12  reddawg
+00386  ubix2
+00387 
+00388  Revision 1.2  2005/10/12 00:13:37  reddawg
+00389  Removed
+00390 
+00391  Revision 1.1.1.1  2005/09/26 17:24:01  reddawg
+00392  no message
+00393 
+00394  Revision 1.29  2004/09/11 21:38:00  reddawg
+00395  Fixed a few problems
+00396 
+00397  Revision 1.28  2004/09/08 23:19:58  reddawg
+00398  hmm
+00399 
+00400  Revision 1.27  2004/09/07 21:54:38  reddawg
+00401  ok reverted back to old scheduling for now....
+00402 
+00403  Revision 1.26  2004/09/06 22:18:52  reddawg
+00404  ok bed time
+00405 
+00406  Revision 1.25  2004/09/06 22:11:29  reddawg
+00407  tty: now each tty has a stdin....
+00408 
+00409  Revision 1.24  2004/09/06 15:13:25  reddawg
+00410  Last commit before FreeBSD 6.0
+00411 
+00412  Revision 1.23  2004/08/21 23:47:50  reddawg
+00413  *** empty log message ***
+00414 
+00415  Revision 1.22  2004/08/09 12:58:05  reddawg
+00416  let me know when you got the surce
+00417 
+00418  Revision 1.21  2004/08/06 22:32:16  reddawg
+00419  Ubix Works Again
+00420 
+00421  Revision 1.19  2004/08/03 18:31:19  reddawg
+00422  virtual terms
+00423 
+00424  Revision 1.18  2004/07/29 21:32:16  reddawg
+00425  My quick lunchs breaks worth of updates....
+00426 
+00427  Revision 1.17  2004/07/28 18:45:39  reddawg
+00428  movement of files
+00429 
+00430  Revision 1.16  2004/07/28 17:07:25  reddawg
+00431  MPI: moved the syscalls
+00432 
+00433  Revision 1.15  2004/07/26 19:15:49  reddawg
+00434  test code, fixes and the like
+00435 
+00436  Revision 1.14  2004/07/25 05:32:58  reddawg
+00437  fixed
+00438 
+00439  Revision 1.13  2004/07/25 05:24:39  reddawg
+00440  atkbd: removed sti... does it still miss keys
+00441 
+00442  Revision 1.12  2004/07/24 20:00:51  reddawg
+00443  Lots of changes to the vmm subsystem.... Page faults have been adjust to now be blocking on a per thread basis not system wide. This has resulted in no more deadlocks.. also the addition of per thread locking has removed segfaults as a result of COW in which two tasks fault the same COW page and try to modify it.
+00444 
+00445  Revision 1.11  2004/07/24 15:12:56  reddawg
+00446  Now I'm current
+00447 
+00448  Revision 1.10  2004/07/23 17:49:58  reddawg
+00449  atkbd: adjust the timing issue on the driver hopefully it will work fine now
+00450 
+00451  Revision 1.9  2004/07/23 17:37:35  reddawg
+00452  Fix
+00453 
+00454  Revision 1.8  2004/07/23 09:10:06  reddawg
+00455  ubixfs: cleaned up some functions played with the caching a bit
+00456  vfs:    renamed a bunch of functions
+00457  cleaned up a few misc bugs
+00458 
+00459  Revision 1.7  2004/07/22 20:53:07  reddawg
+00460  atkbd: fixed problem
+00461 
+00462  Revision 1.6  2004/07/09 13:34:51  reddawg
+00463  keyboard: keyboardInit to atkbd_init
+00464  Adjusted initialization routines
+00465 
+00466  Revision 1.5  2004/06/17 14:49:14  reddawg
+00467  atkbd: converted some variables to static
+00468 
+00469  Revision 1.4  2004/06/04 10:19:42  reddawg
+00470  notes: we compile again, thank g-d anyways i was about to cry
+00471 
+00472  Revision 1.3  2004/05/19 04:07:42  reddawg
+00473  kmalloc(size,pid) no more it is no kmalloc(size); the way it should of been
+00474 
+00475  Revision 1.2  2004/05/10 02:23:24  reddawg
+00476  Minor Changes To Source Code To Prepare It For Open Source Release
+00477 
+00478  Revision 1.1.1.1  2004/04/15 12:07:09  reddawg
+00479  UbixOS v1.0
+00480 
+00481  Revision 1.19  2004/04/13 16:36:33  reddawg
+00482  Changed our copyright, it is all now under a BSD-Style license
+00483 
+00484  END
+00485  ***/
+00486 
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/atkbd_8c.html b/doc/html/atkbd_8c.html new file mode 100644 index 0000000..a760a46 --- /dev/null +++ b/doc/html/atkbd_8c.html @@ -0,0 +1,383 @@ + + +UbixOS V2: src/sys/isa/atkbd.c File Reference + + + + +
+
+
+
+ +

atkbd.c File Reference

+

+#include <isa/atkbd.h>
+#include <isa/8259.h>
+#include <sys/video.h>
+#include <sys/idt.h>
+#include <sys/gdt.h>
+#include <sys/io.h>
+#include <lib/kmalloc.h>
+#include <lib/kprintf.h>
+#include <ubixos/types.h>
+#include <ubixos/sched.h>
+#include <ubixos/vitals.h>
+#include <ubixos/endtask.h>
+#include <ubixos/tty.h>
+#include <ubixos/spinlock.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Functions

 asm (".globl atkbd_isr \n""atkbd_isr: \n"" pusha \n"" push %ss \n"" push %ds \n"" push %es \n"" push %fs \n"" push %gs \n"" call keyboardHandler \n"" mov $0x20,%dx \n"" mov $0x20,%ax \n"" outb %al,%dx \n"" pop %gs \n"" pop %fs \n"" pop %es \n"" pop %ds \n"" pop %ss \n"" popa \n"" iret \n")
int atkbd_init ()
static int atkbd_scan ()
unsigned char getch ()
void keyboardHandler ()
void setLED ()

Variables

static spinLock_t atkbdSpinLock = SPIN_LOCK_INITIALIZER
static uInt32 controlKeys = 0x0
static unsigned int keyboardMap [255][8]
static unsigned int keyMap = 0x0
static unsigned int ledStatus = 0x0
static char stdinBuffer [512]
static uInt16 stdinSize
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
asm (".globl atkbd_isr \n""atkbd_isr: \n"" pusha \n"" push %ss \n"" push %ds \n"" push %es \n"" push %fs \n"" push %gs \n"" call keyboardHandler \n"" mov 0x20,
%dx\n""mov 0x20,
%ax\n""outb%  al,
%dx\n""pop%gs\n""pop%fs\n""pop%es\n""pop%ds\n""pop%ss\n""popa\n""iret\n"  
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
int atkbd_init (  ) 
+
+
+ +

+ +

+Definition at line 156 of file atkbd.c. +

+References atkbd_isr(), atkbd_scan(), dDpl0, dInt, dPresent, irqEnable(), kprintf(), mVec, setLED(), setVector(), stdinBuffer, and x1. +

+

+ +

+
+ + + + + + + + +
static int atkbd_scan (  )  [static]
+
+
+ +

+ +

+Definition at line 202 of file atkbd.c. +

+References inportByte(), and outportByte(). +

+Referenced by atkbd_init(), and keyboardHandler(). +

+

+ +

+
+ + + + + + + + +
unsigned char getch (  ) 
+
+
+ +

+ +

+Definition at line 328 of file atkbd.c. +

+References tty_termNode::stdin, stdinBuffer, tty_termNode::stdinSize, stdinSize, tty_foreground, and x1. +

+Referenced by sysFgetc(). +

+

+ +

+
+ + + + + + + + +
void keyboardHandler (  ) 
+
+ +

+ +

+
+ + + + + + + + +
void setLED (  ) 
+
+
+ +

+ +

+Definition at line 320 of file atkbd.c. +

+References inportByte(), ledStatus, and outportByte(). +

+Referenced by atkbd_init(), and keyboardHandler(). +

+

+


Variable Documentation

+ +
+
+ + + + +
spinLock_t atkbdSpinLock = SPIN_LOCK_INITIALIZER [static]
+
+
+ +

+ +

+Definition at line 53 of file atkbd.c. +

+Referenced by keyboardHandler(). +

+

+ +

+
+ + + + +
uInt32 controlKeys = 0x0 [static]
+
+
+ +

+ +

+Definition at line 51 of file atkbd.c. +

+Referenced by keyboardHandler(). +

+

+ +

+
+ + + + +
unsigned int keyboardMap[255][8] [static]
+
+
+ +

+ +

+Definition at line 55 of file atkbd.c. +

+Referenced by keyboardHandler(). +

+

+ +

+
+ + + + +
unsigned int keyMap = 0x0 [static]
+
+
+ +

+ +

+Definition at line 47 of file atkbd.c. +

+Referenced by keyboardHandler(). +

+

+ +

+
+ + + + +
unsigned int ledStatus = 0x0 [static]
+
+
+ +

+ +

+Definition at line 48 of file atkbd.c. +

+Referenced by keyboardHandler(), and setLED(). +

+

+ +

+
+ + + + +
char stdinBuffer[512] [static]
+
+
+ +

+ +

+Definition at line 49 of file atkbd.c. +

+Referenced by atkbd_init(), getch(), and keyboardHandler(). +

+

+ +

+
+ + + + +
uInt16 stdinSize [static]
+
+
+ +

+ +

+Definition at line 50 of file atkbd.c. +

+Referenced by getch(), and keyboardHandler(). +

+

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/atkbd_8h-source.html b/doc/html/atkbd_8h-source.html new file mode 100644 index 0000000..91f75b9 --- /dev/null +++ b/doc/html/atkbd_8h-source.html @@ -0,0 +1,107 @@ + + +UbixOS V2: src/sys/include/isa/atkbd.h Source File + + + + +
+
+
+
+ +

atkbd.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _ATKBD_H
+00031 #define _ATKBD_H
+00032 
+00033 #define shiftKey      1
+00034 #define controlKey    2
+00035 #define altKey        4
+00036 #define ledNumlock    2
+00037 #define ledScrolllock 1
+00038 #define ledCapslock   4
+00039 
+00040 int  atkbd_init();
+00041 void atkbd_isr();
+00042 
+00043 void keyboardHandler();
+00044 void setLED();
+00045 
+00046 #endif
+00047 
+00048 /***
+00049  $Log$
+00050  Revision 1.1.1.1  2006/06/01 12:46:14  reddawg
+00051  ubix2
+00052 
+00053  Revision 1.2  2005/10/12 00:13:36  reddawg
+00054  Removed
+00055 
+00056  Revision 1.1.1.1  2005/09/26 17:23:39  reddawg
+00057  no message
+00058 
+00059  Revision 1.4  2004/07/29 21:32:16  reddawg
+00060  My quick lunchs breaks worth of updates....
+00061 
+00062  Revision 1.3  2004/07/09 13:34:51  reddawg
+00063  keyboard: keyboardInit to atkbd_init
+00064  Adjusted initialization routines
+00065 
+00066  Revision 1.2  2004/05/21 14:57:16  reddawg
+00067  Cleaned up
+00068 
+00069  END
+00070  ***/
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/atkbd_8h.html b/doc/html/atkbd_8h.html new file mode 100644 index 0000000..e226336 --- /dev/null +++ b/doc/html/atkbd_8h.html @@ -0,0 +1,274 @@ + + +UbixOS V2: src/sys/include/isa/atkbd.h File Reference + + + + +
+
+
+
+ +

atkbd.h File Reference

+

+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + +

Defines

#define altKey   4
#define controlKey   2
#define ledCapslock   4
#define ledNumlock   2
#define ledScrolllock   1
#define shiftKey   1

Functions

int atkbd_init ()
void atkbd_isr ()
void keyboardHandler ()
void setLED ()
+


Define Documentation

+ +
+
+ + + + +
#define altKey   4
+
+
+ +

+ +

+Definition at line 35 of file atkbd.h. +

+Referenced by keyboardHandler(). +

+

+ +

+
+ + + + +
#define controlKey   2
+
+
+ +

+ +

+Definition at line 34 of file atkbd.h. +

+Referenced by keyboardHandler(). +

+

+ +

+
+ + + + +
#define ledCapslock   4
+
+
+ +

+ +

+Definition at line 38 of file atkbd.h. +

+Referenced by keyboardHandler(). +

+

+ +

+
+ + + + +
#define ledNumlock   2
+
+
+ +

+ +

+Definition at line 36 of file atkbd.h. +

+Referenced by keyboardHandler(). +

+

+ +

+
+ + + + +
#define ledScrolllock   1
+
+
+ +

+ +

+Definition at line 37 of file atkbd.h. +

+Referenced by keyboardHandler(). +

+

+ +

+
+ + + + +
#define shiftKey   1
+
+
+ +

+ +

+Definition at line 33 of file atkbd.h. +

+Referenced by keyboardHandler(). +

+

+


Function Documentation

+ +
+
+ + + + + + + + +
int atkbd_init (  ) 
+
+
+ +

+ +

+Definition at line 156 of file atkbd.c. +

+References atkbd_isr(), atkbd_scan(), dDpl0, dInt, dPresent, irqEnable(), kprintf(), mVec, setLED(), setVector(), stdinBuffer, and x1. +

+

+ +

+
+ + + + + + + + +
void atkbd_isr (  ) 
+
+
+ +

+ +

+Referenced by atkbd_init(). +

+

+ +

+
+ + + + + + + + +
void keyboardHandler (  ) 
+
+ +

+ +

+
+ + + + + + + + +
void setLED (  ) 
+
+
+ +

+ +

+Definition at line 320 of file atkbd.c. +

+References inportByte(), ledStatus, and outportByte(). +

+Referenced by atkbd_init(), and keyboardHandler(). +

+

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/bioscall_8c-source.html b/doc/html/bioscall_8c-source.html new file mode 100644 index 0000000..d450ac8 --- /dev/null +++ b/doc/html/bioscall_8c-source.html @@ -0,0 +1,139 @@ + + +UbixOS V2: src/sys/kernel/bioscall.c Source File + + + + +
+
+
+
+ +

bioscall.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <sys/tss.h>
+00031 #include <ubixos/sched.h>
+00032 #include <vmm/vmm.h>
+00033 #include <lib/kmalloc.h>
+00034 #include <lib/bioscall.h>
+00035 #include <lib/string.h>
+00036 #include <sys/video.h>
+00037 #include <assert.h>
+00038 
+00039 
+00040 asm(
+00041   ".globl bios16Code\n"
+00042   ".code16          \n"
+00043   "bios16Code:      \n"
+00044   "int $0x10        \n"
+00045   "int $0x69        \n"
+00046   ".code32          \n"
+00047   );
+00048 
+00049   
+00050 void biosCall(int biosInt,int eax,int ebx,int ecx,int edx,int esi,int edi,int es,int ds) {
+00051   short segment = 0x0,offset = 0x0;
+00052   uInt32 tmpAddr = (uInt32)&bios16Code;
+00053   kTask_t *newProcess = 0x0;
+00054 
+00055   offset = tmpAddr & 0xF;  // lower 4 bits
+00056   segment = tmpAddr >> 4;
+00057   
+00058   newProcess = schedNewTask();
+00059   assert(newProcess);
+00060 
+00061 
+00062   newProcess->tss.back_link    = 0x0;
+00063   newProcess->tss.esp0         = (uInt32)kmalloc(0x2000)+0x2000;
+00064   newProcess->tss.ss0          = 0x10;
+00065   newProcess->tss.esp1         = 0x0;
+00066   newProcess->tss.ss1          = 0x0;
+00067   newProcess->tss.esp2         = 0x0;
+00068   newProcess->tss.ss2          = 0x0;
+00069   newProcess->tss.cr3          = (uInt32)_current->tss.cr3;//(uInt32)vmmCreateVirtualSpace(newProcess->id);
+00070   newProcess->tss.eip          =  offset & 0xFFFF;
+00071   newProcess->tss.eflags       = 2 | EFLAG_IF | EFLAG_VM;
+00072   newProcess->tss.eax          =     eax & 0xFFFF;
+00073   newProcess->tss.ebx          =     ebx & 0xFFFF;
+00074   newProcess->tss.ecx          =     ecx & 0xFFFF;
+00075   newProcess->tss.edx          =     edx & 0xFFFF;
+00076   newProcess->tss.esp          =  0x1000 & 0xFFFF;
+00077   newProcess->tss.ebp          =  0x1000 & 0xFFFF;
+00078   newProcess->tss.esi          =     esi & 0xFFFF;
+00079   newProcess->tss.edi          =     edi & 0xFFFF;
+00080   newProcess->tss.es           =      es & 0xFFFF;
+00081   newProcess->tss.cs           = segment & 0xFFFF;
+00082   newProcess->tss.ss           =  0x1000 & 0xFFFF;
+00083   newProcess->tss.ds           =      ds & 0xFFFF;
+00084   newProcess->tss.fs           =     0x0 & 0xFFFF;
+00085   newProcess->tss.gs           =     0x0 & 0xFFFF;
+00086   newProcess->tss.ldt          =     0x0 & 0xFFFF;
+00087   newProcess->tss.trace_bitmap =     0x0 & 0xFFFF;
+00088   newProcess->tss.io_map       =     0x0 & 0xFFFF;
+00089   newProcess->tss.io_map       = sizeof(struct tssStruct)-8192;
+00090   newProcess->oInfo.v86Task    = 0x1;
+00091 
+00092   newProcess->state = READY;
+00093 
+00094   while (newProcess->state > 0);
+00095 
+00096   return;
+00097   }    
+00098 
+00099 /***
+00100  END
+00101  ***/
+00102 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/bioscall_8c.html b/doc/html/bioscall_8c.html new file mode 100644 index 0000000..a321fd4 --- /dev/null +++ b/doc/html/bioscall_8c.html @@ -0,0 +1,155 @@ + + +UbixOS V2: src/sys/kernel/bioscall.c File Reference + + + + +
+
+
+
+ +

bioscall.c File Reference

+

+#include <sys/tss.h>
+#include <ubixos/sched.h>
+#include <vmm/vmm.h>
+#include <lib/kmalloc.h>
+#include <lib/bioscall.h>
+#include <lib/string.h>
+#include <sys/video.h>
+#include <assert.h>
+ +

+Go to the source code of this file. + + + + + + +

Functions

 asm (".globl bios16Code\n"".code16 \n""bios16Code: \n""int $0x10 \n""int $0x69 \n"".code32 \n")
void biosCall (int biosInt, int eax, int ebx, int ecx, int edx, int esi, int edi, int es, int ds)
+


Function Documentation

+ +
+
+ + + + + + + + + +
asm (".globl bios16Code\n"".code16 \n""bios16Code: \n""int $0x10 \n""int $0x69 \n"".code32 \n"   ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void biosCall (int  biosInt,
int  eax,
int  ebx,
int  ecx,
int  edx,
int  esi,
int  edi,
int  es,
int  ds 
)
+
+ +

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/bioscall_8h-source.html b/doc/html/bioscall_8h-source.html new file mode 100644 index 0000000..d078587 --- /dev/null +++ b/doc/html/bioscall_8h-source.html @@ -0,0 +1,98 @@ + + +UbixOS V2: src/sys/include/lib/bioscall.h Source File + + + + +
+
+
+
+ +

bioscall.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _BIOSCALL_H
+00031 #define _BIOSCALL_H
+00032 
+00033 #include <ubixos/types.h>
+00034 
+00035 #define EFLAG_TF         0x100
+00036 #define EFLAG_IF         0x200
+00037 #define EFLAG_IOPL3      0x3000
+00038 #define EFLAG_VM         0x20000
+00039 
+00040 void biosCall(int biosInt,int eax,int ebx,int ecx,int edx,int esi,int edi,int es,int ds);
+00041 void bios16Code();
+00042 
+00043 #endif
+00044 
+00045 /***
+00046  $Log$
+00047  Revision 1.1.1.1  2006/06/01 12:46:13  reddawg
+00048  ubix2
+00049 
+00050  Revision 1.2  2005/10/12 00:13:36  reddawg
+00051  Removed
+00052 
+00053  Revision 1.1.1.1  2005/09/26 17:23:40  reddawg
+00054  no message
+00055 
+00056  Revision 1.2  2004/05/21 15:00:27  reddawg
+00057  Cleaned up
+00058 
+00059 
+00060  END
+00061  ***/
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/bioscall_8h.html b/doc/html/bioscall_8h.html new file mode 100644 index 0000000..f9c4117 --- /dev/null +++ b/doc/html/bioscall_8h.html @@ -0,0 +1,231 @@ + + +UbixOS V2: src/sys/include/lib/bioscall.h File Reference + + + + +
+
+
+
+ +

bioscall.h File Reference

+

+#include <ubixos/types.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + +

Defines

#define EFLAG_IF   0x200
#define EFLAG_IOPL3   0x3000
#define EFLAG_TF   0x100
#define EFLAG_VM   0x20000

Functions

void bios16Code ()
void biosCall (int biosInt, int eax, int ebx, int ecx, int edx, int esi, int edi, int es, int ds)
+


Define Documentation

+ +
+
+ + + + +
#define EFLAG_IF   0x200
+
+
+ +

+ +

+Definition at line 36 of file bioscall.h. +

+Referenced by _int13(), and biosCall(). +

+

+ +

+
+ + + + +
#define EFLAG_IOPL3   0x3000
+
+
+ +

+ +

+Definition at line 37 of file bioscall.h. +

+

+ +

+
+ + + + +
#define EFLAG_TF   0x100
+
+
+ +

+ +

+Definition at line 35 of file bioscall.h. +

+

+ +

+
+ + + + +
#define EFLAG_VM   0x20000
+
+
+ +

+ +

+Definition at line 38 of file bioscall.h. +

+Referenced by _int13(), and biosCall(). +

+

+


Function Documentation

+ +
+
+ + + + + + + + +
void bios16Code (  ) 
+
+
+ +

+ +

+Referenced by biosCall(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void biosCall (int  biosInt,
int  eax,
int  ebx,
int  ecx,
int  edx,
int  esi,
int  edi,
int  es,
int  ds 
)
+
+ +

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/block_8c-source.html b/doc/html/block_8c-source.html new file mode 100644 index 0000000..4ce1bb1 --- /dev/null +++ b/doc/html/block_8c-source.html @@ -0,0 +1,163 @@ + + +UbixOS V2: src/sys/ubixfs/block.c Source File + + + + +
+
+
+
+ +

block.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005 Redistribution and use in source and binary forms, with or without modification, are
+00006 permitted provided that the following conditions are met:
+00007 
+00008 Redistributions of source code must retain the above copyright notice, this list of
+00009 conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010 form must reproduce the above copyright notice, this list of conditions, the following
+00011 disclaimer and the list of authors in the documentation and/or other materials provided
+00012 with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013 contributors may be used to endorse or promote products derived from this software
+00014 without specific prior written permission.
+00015 
+00016 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019 THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021 OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023 TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Log$
+00027  Revision 1.1.1.1  2006/06/01 12:46:17  reddawg
+00028  ubix2
+00029 
+00030  Revision 1.2  2005/10/12 00:13:37  reddawg
+00031  Removed
+00032 
+00033  Revision 1.1.1.1  2005/09/26 17:24:39  reddawg
+00034  no message
+00035 
+00036  Revision 1.6  2004/08/14 11:23:02  reddawg
+00037  Changes
+00038 
+00039  Revision 1.5  2004/07/23 09:10:06  reddawg
+00040  ubixfs: cleaned up some functions played with the caching a bit
+00041  vfs:    renamed a bunch of functions
+00042  cleaned up a few misc bugs
+00043 
+00044  Revision 1.4  2004/06/04 10:19:42  reddawg
+00045  notes: we compile again, thank g-d anyways i was about to cry
+00046 
+00047  Revision 1.3  2004/05/19 15:20:06  reddawg
+00048  Fixed reference problems due to changes in drive subsystem
+00049 
+00050  Revision 1.2  2004/04/28 02:22:55  reddawg
+00051  This is a fiarly large commit but we are starting to use new driver model
+00052  all around
+00053 
+00054  Revision 1.1.1.1  2004/04/15 12:07:07  reddawg
+00055  UbixOS v1.0
+00056 
+00057  Revision 1.3  2004/04/13 16:36:34  reddawg
+00058  Changed our copyright, it is all now under a BSD-Style license
+00059 
+00060 
+00061 
+00062  $Id$
+00063 
+00064 *****************************************************************************************/
+00065 
+00066 #include <ubixfs/ubixfs.h>
+00067 #include <vfs/file.h>
+00068 #include <vfs/mount.h>
+00069 
+00070 
+00071 void syncBat(vfs_mountPoint_t *mp) {
+00072   struct ubixFSInfo *fsInfo = mp->fsInfo;
+00073   mp->device->devInfo->write(mp->device->devInfo->info,fsInfo->blockAllocationTable,mp->diskLabel->partitions[mp->partition].pOffset,mp->diskLabel->partitions[mp->partition].pBatSize);
+00074   }
+00075 
+00076 int freeBlocks(int block,fileDescriptor *fd) {
+00077   int i = block;
+00078   
+00079   struct ubixFSInfo *fsInfo = fd->mp->fsInfo;
+00080 
+00081   while (i != 0x0) {
+00082     block = fsInfo->blockAllocationTable[i].nextBlock;
+00083         
+00084     fsInfo->blockAllocationTable[i].attributes = 0x0;
+00085     fsInfo->blockAllocationTable[i].nextBlock  = 0x0;
+00086     
+00087     i = block;
+00088     }
+00089   syncBat(fd->mp);
+00090   return(i);
+00091   }
+00092   
+00093 int getFreeBlocks(int count,fileDescriptor *fd) {
+00094   uInt32 i = 0x0;
+00095   uInt32 x = 0x0;
+00096   
+00097   struct ubixFSInfo *fsInfo = fd->mp->fsInfo;
+00098 
+00099   getBlocks:
+00100   for (i=1;i < fsInfo->batEntries;i++) {
+00101     if (fsInfo->blockAllocationTable[i].attributes == 0x0) {
+00102       for (x = 1; x < (uInt32)count; x++) {
+00103         if (fsInfo->blockAllocationTable[i + x].attributes != 0x0) {
+00104           goto getBlocks;
+00105           }
+00106         }
+00107       for (x = i; x < i+count;x++) {
+00108         fsInfo->blockAllocationTable[x].attributes = 0x1;
+00109         if ((x+1) == (i+count)) {
+00110           fsInfo->blockAllocationTable[x].nextBlock = -1;
+00111           }
+00112         else {
+00113           fsInfo->blockAllocationTable[x].nextBlock  = x+1;
+00114           }
+00115         }
+00116       syncBat(fd->mp);
+00117       return(i);
+00118       }
+00119     }
+00120   return(0x0);
+00121   }
+00122 
+00123 /***
+00124  END
+00125  ***/
+00126 
+

Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/block_8c.html b/doc/html/block_8c.html new file mode 100644 index 0000000..04e2114 --- /dev/null +++ b/doc/html/block_8c.html @@ -0,0 +1,149 @@ + + +UbixOS V2: src/sys/ubixfs/block.c File Reference + + + + +
+
+
+
+ +

block.c File Reference

+

+#include <ubixfs/ubixfs.h>
+#include <vfs/file.h>
+#include <vfs/mount.h>
+ +

+Go to the source code of this file. + + + + + + + + +

Functions

int freeBlocks (int block, fileDescriptor *fd)
int getFreeBlocks (int count, fileDescriptor *fd)
void syncBat (vfs_mountPoint_t *mp)
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
int freeBlocks (int  block,
fileDescriptor fd 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
int getFreeBlocks (int  count,
fileDescriptor fd 
)
+
+ +

+ +

+
+ + + + + + + + + +
void syncBat (vfs_mountPoint_t mp  ) 
+
+ +

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/bot_8c-source.html b/doc/html/bot_8c-source.html new file mode 100644 index 0000000..0f98ddf --- /dev/null +++ b/doc/html/bot_8c-source.html @@ -0,0 +1,127 @@ + + +UbixOS V2: src/sys/net/net/bot.c Source File + + + + +
+
+
+
+ +

bot.c

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 
+00036 #include <lib/kmalloc.h>
+00037 #include <lib/kprintf.h>
+00038 #include <string.h>
+00039 
+00040 #include "net/mem.h"
+00041 #include "net/debug.h"
+00042 #include "net/def.h"
+00043 #include "net/api.h"
+00044 #include "net/stats.h"
+00045 
+00046 /* UBU
+00047 static void sendstr(const char *str, struct netconn *conn) {
+00048   netconn_write(conn, (void *)str, strlen(str), NETCONN_NOCOPY);
+00049   }
+00050 
+00051 static void botErr() {
+00052   kprintf("ERRROR\n");
+00053   }
+00054 */
+00055 
+00056 static void bot_thread(void *arg) {
+00057   struct netconn *conn;
+00058   int len;
+00059   char bufr[1500];
+00060   struct ip_addr ipaddr;
+00061   struct netbuf *buf = 0x0;
+00062   
+00063   IP4_ADDR(&ipaddr,216,152,77,10);
+00064   conn = netconn_new(NETCONN_TCP);
+00065   kprintf("Starting UbixOS Bot\n");
+00066   while(1) {
+00067     kprintf("[A");
+00068     kprintf("\n\nCONNECT: [%i]\n",netconn_connect(conn,&ipaddr,6667));
+00069     kprintf("B]");
+00070     while (1);
+00071     if (buf != NULL) {
+00072       buf = netconn_recv(conn);
+00073       netbuf_copy(buf, bufr, 1024);
+00074       len = netbuf_len(buf);
+00075       netbuf_delete(buf);
+00076       bufr[len-2] = '\0';
+00077       kprintf("Bufr: [%s:%i]",bufr,len);
+00078       //sendstr("BLah\n",conn);
+00079       }
+00080     }
+00081   }
+00082 
+00083 void bot_init(void)     {
+00084   sys_thread_new(bot_thread, NULL);
+00085   }
+00086 
+00087 /***
+00088  END
+00089  ***/
+00090 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/bot_8c.html b/doc/html/bot_8c.html new file mode 100644 index 0000000..421e86a --- /dev/null +++ b/doc/html/bot_8c.html @@ -0,0 +1,108 @@ + + +UbixOS V2: src/sys/net/net/bot.c File Reference + + + + +
+
+
+
+ +

bot.c File Reference

+

+#include <lib/kmalloc.h>
+#include <lib/kprintf.h>
+#include <string.h>
+#include "net/mem.h"
+#include "net/debug.h"
+#include "net/def.h"
+#include "net/api.h"
+#include "net/stats.h"
+ +

+Go to the source code of this file. + + + + + + +

Functions

void bot_init (void)
static void bot_thread (void *arg)
+


Function Documentation

+ +
+
+ + + + + + + + + +
void bot_init (void   ) 
+
+
+ +

+ +

+Definition at line 83 of file bot.c. +

+References bot_thread(), NULL, and sys_thread_new(). +

+

+ +

+
+ + + + + + + + + +
static void bot_thread (void *  arg  )  [static]
+
+
+ +

+ +

+Definition at line 56 of file bot.c. +

+References IP4_ADDR, kprintf(), netbuf_copy(), netbuf_delete(), netbuf_len(), netconn_connect(), netconn_new(), netconn_recv(), NETCONN_TCP, and NULL. +

+Referenced by bot_init(). +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/btree_8cpp-source.html b/doc/html/btree_8cpp-source.html new file mode 100644 index 0000000..ba830f6 --- /dev/null +++ b/doc/html/btree_8cpp-source.html @@ -0,0 +1,804 @@ + + +UbixOS V2: src/sys/ubixfsv2/btree.cpp Source File + + + + +
+
+
+
+ +

btree.cpp

Go to the documentation of this file.
00001 // http://www.cs.msstate.edu/~cs2314/global/BTreeAnimation/algorithm.html
+00002 #include <stdlib.h>
+00003 #include <string.h>
+00004 #include <stdio.h>
+00005 #include <unistd.h>
+00006 #include <iostream>
+00007 #include <assert.h>
+00008 #include "btree.h"
+00009 #include "ubixfs.h"
+00010 
+00011 using namespace std;
+00012 #define VERIFY(x, y, z, n) if ((x) != (y)) { cout << "verify " << z << " failed" << endl; PrintWholeTree(); }
+00013 
+00014 bTree::bTree(UbixFS * filesystem, fileDescriptor * myfd) {
+00015   size_t result = 0;
+00016 
+00017   root = NULL;
+00018   tag = 0;
+00019   fs = filesystem;
+00020   fd = myfd;
+00021   header = new bTreeHeader;
+00022   assert(header);
+00023   memset(header, 0, sizeof(bTreeHeader));
+00024   assert(fs);
+00025   result = fs->vfs_read(fd, header, 0, sizeof(bTreeHeader));
+00026   assert(result == sizeof(bTreeHeader));
+00027 
+00028   // If there are any files in this dir, load the first node of the b+tree
+00029   if (header->treeLeafCount != 0) {
+00030     assert(header->firstNodeOffset != 0);
+00031     root = new bNode;
+00032     assert(root);
+00033     result = fs->vfs_read(fd, root, header->firstNodeOffset, sizeof(bNode));
+00034     assert(result == sizeof(bNode));
+00035   } // if 
+00036 
+00037 } // bTree::bTree
+00038 
+00039 bTree::bTree(const char * key, ubixfsInode * inode) {
+00040 /* once the FS and the bTree are interfaced, this should go away */
+00041   root = NULL;
+00042   tag = 0;
+00043   header = new bTreeHeader;
+00044   assert(header);
+00045   memset(header, 0, sizeof(bTreeHeader));
+00046   header->treeDepth = 1;
+00047   header->treeWidth = 0;
+00048   header->treeLeafCount = 0;
+00049   header->firstDeleted = -1;
+00050   header->firstNodeOffset = sizeof(bTreeHeader);
+00051 
+00052   if (inode == NULL) return;
+00053   root = allocEmptyNode();
+00054   if (root == NULL) return;
+00055   root->used = 1;
+00056   root->parent.bPtr = NULL;
+00057   root->leaf = true;
+00058   root->childCount[1] = 1;
+00059 
+00060 // cout << "---Creating " << inode->name << "@" << inode << endl;
+00061   strncpy(root->keys[0], key, B_MAX_NAME_LENGTH);
+00062   // insert pointer to data page to the right of the data
+00063   root->head[1].iPtr = inode;
+00064   root->tail[1].iPtr = inode;
+00065 
+00066   root->present[1] = true;
+00067   if (inode != NULL) {
+00068     inode->next.bPtr = inode->prev.bPtr = NULL;
+00069   } // if
+00070   return;
+00071 } // bTree:bTree
+00072 
+00073 bool
+00074 bTree::Insert(const char * key, ubixfsInode * inode) {
+00075   bNode * bnode = root;
+00076   ubixfsInode * tmpInode = NULL;
+00077   unsigned int curSlot = 0;
+00078 
+00079   if (inode == NULL) return false;
+00080  
+00081   // note: this code is right out of the constructor
+00082   if (root == NULL) {
+00083     if (header == NULL) header = new bTreeHeader;
+00084     assert(header);
+00085     memset(header, 0, sizeof(bTreeHeader));
+00086     header->treeDepth = 1;
+00087     header->treeWidth = 0;
+00088     header->treeLeafCount = 0;
+00089     header->firstDeleted = -1;
+00090     header->firstNodeOffset = sizeof(bTreeHeader);
+00091 
+00092     root = allocEmptyNode();
+00093     assert(root);
+00094     if (root == NULL) return false;
+00095     
+00096     root->used = 1;
+00097     root->parent.bPtr = NULL;
+00098     root->leaf = true;
+00099     root->childCount[1] = 1;
+00100 
+00101     strncpy(root->keys[0], key, B_MAX_NAME_LENGTH);
+00102     // insert pointer to data page to the right of the data
+00103     root->head[1].iPtr = inode;
+00104     root->tail[1].iPtr = inode;
+00105 
+00106     root->present[1] = true;
+00107     inode->next.iPtr = inode->prev.iPtr = NULL;
+00108     return true;
+00109   } // if
+00110     
+00111   tmpInode = Find(key);
+00112   if (tmpInode != NULL) return false;
+00113 //  PrintWholeTree();
+00114 // cout << "Insert(" << key << ")" << endl;
+00115 //Info(bnode);
+00116   ++header->treeLeafCount;
+00117   /*
+00118    * Find the leaf node the inode goes into
+00119    */
+00120   assert(bnode->used);
+00121 // cout << "---Inserting " << inode->name << " @ " << inode << endl; 
+00122   while (bnode != NULL && !bnode->leaf) {
+00123     if (strcmp(key, bnode->keys[0]) < 0) {
+00124       bnode = bnode->head[0].bPtr;
+00125     } else {
+00126       if (strcmp(key, bnode->keys[bnode->used-1]) >= 0) {
+00127         bnode = bnode->head[bnode->used].bPtr;
+00128       } else {
+00129         for (unsigned int i = 1; i < bnode->used; i++) {
+00130           if (strcmp(key, bnode->keys[i]) < 0) {
+00131             bnode = bnode->head[i].bPtr;
+00132             break;
+00133           } // if
+00134         } // for i
+00135       } // else
+00136     }
+00137   } // while
+00138 
+00139   /*
+00140    *
+00141    */
+00142 
+00143 assert(bnode);
+00144 if (bnode->leaf != true) cout << "leafnode!=true" << endl;
+00145 assert(inode);
+00146 
+00147   if (strcmp(key, bnode->keys[curSlot = 0]) < 0)
+00148     tmpInode = bnode->head[curSlot].iPtr;
+00149   else
+00150     if (strcmp(key, bnode->keys[(curSlot = bnode->used)-1]) >= 0)
+00151       tmpInode = bnode->head[bnode->used].iPtr;
+00152     else {
+00153       for (curSlot = 1; curSlot < bnode->used; curSlot++) {
+00154         if (strcmp(key, bnode->keys[curSlot]) < 0) {
+00155           tmpInode = bnode->head[curSlot].iPtr;
+00156           break;
+00157         } // if
+00158       } // for curSlot
+00159       tmpInode = bnode->head[curSlot].iPtr;
+00160     } // else
+00161 
+00162 
+00163   if (tmpInode == NULL) {
+00164     /*
+00165      * This is the first node in this leaf
+00166      */
+00167     bnode->head[curSlot].iPtr = bnode->tail[curSlot].iPtr = inode;
+00168     bnode->present[curSlot] = true;
+00169 
+00170     if (curSlot == 0) {
+00171 
+00172       if (bnode->head[1].iPtr != NULL)  {
+00173         ubixfsInode * iptr = bnode->head[1].iPtr;
+00174         inode->prev.iPtr = iptr->prev.iPtr;
+00175         inode->next.iPtr = iptr;
+00176         iptr->prev.iPtr = inode;
+00177         if (inode->prev.iPtr != NULL) 
+00178           inode->prev.iPtr->next.iPtr = inode;
+00179       } else {
+00180         inode->next.iPtr = inode->prev.iPtr = NULL;
+00181       } // else
+00182 
+00183     } else {
+00184       ++bnode->used; 
+00185     } // else
+00186 
+00187   } else {
+00188     /*
+00189      * Add node to leaf page. Scan through to find where it goes.
+00190      */
+00191     if (strcmp(key, bnode->head[curSlot].iPtr->name) < 0)
+00192     {
+00193 
+00194       inode->next.iPtr = bnode->head[curSlot].iPtr;
+00195       inode->prev.iPtr = inode->next.iPtr->prev.iPtr;
+00196       inode->next.iPtr->prev.iPtr = inode;
+00197       if (inode->prev.iPtr != NULL) inode->prev.iPtr->next.iPtr = inode;
+00198       bnode->head[curSlot].iPtr = inode;
+00199 
+00200     } else {
+00201 
+00202       if (strcmp(key, bnode->tail[curSlot].iPtr->name) > 0) {
+00203 
+00204         inode->prev.iPtr = bnode->tail[curSlot].iPtr;
+00205         inode->next.iPtr = inode->prev.iPtr->next.iPtr;
+00206         inode->prev.iPtr->next.iPtr = inode;
+00207 
+00208         if (inode->next.iPtr != NULL) inode->next.iPtr->prev.iPtr = inode;
+00209         bnode->tail[curSlot].iPtr = inode;
+00210 
+00211       } else {
+00212 
+00213 
+00214         ubixfsInode * tmpInode = bnode->head[curSlot].iPtr;
+00215         for (unsigned int i = 0; i < bnode->childCount[curSlot]; i++) {
+00216           if (strcmp(key, tmpInode->name) < 0) {
+00217             inode->next.iPtr = tmpInode;
+00218             inode->prev.iPtr = tmpInode->prev.iPtr;
+00219             inode->next.iPtr->prev.iPtr = inode;
+00220             inode->prev.iPtr->next.iPtr = inode;
+00221             break;
+00222           } // if
+00223           tmpInode = tmpInode->next.iPtr; 
+00224         } // for i
+00225 
+00226       } // else
+00227 
+00228     } // else
+00229 
+00230   } // else
+00231 
+00232 
+00233 
+00234   if (++bnode->childCount[curSlot] == B_MAX_CHILD_COUNT) {
+00235 
+00236 // cout << "---- before split ----" << endl;
+00237 // Info(bnode);
+00238 
+00239     if (curSlot != bnode->used) {
+00240       int shift = bnode->used - curSlot +1;
+00241 
+00242       memmove(&bnode->head[curSlot+1],
+00243               &bnode->head[curSlot],
+00244               sizeof(bnode->head[0]) * shift);
+00245       memmove(&bnode->tail[curSlot+1],
+00246               &bnode->tail[curSlot],
+00247               sizeof(bnode->tail[0]) * shift);
+00248       memmove(&bnode->present[curSlot+1],
+00249               &bnode->present[curSlot],
+00250               sizeof(bnode->present[0]) * shift);
+00251       memmove(&bnode->childCount[curSlot+1],
+00252               &bnode->childCount[curSlot],
+00253               sizeof(bnode->childCount[0]) * shift);
+00254 
+00255       memmove(&bnode->keys[curSlot+1],
+00256               &bnode->keys[curSlot],
+00257               sizeof(bnode->keys[0]) * (shift-1));
+00258       memset(bnode->keys[curSlot], 0, B_MAX_NAME_LENGTH);
+00259     } else {
+00260       bnode->head[curSlot+1] = bnode->head[curSlot];
+00261       bnode->tail[curSlot+1] = bnode->tail[curSlot];
+00262       bnode->childCount[curSlot+1] = bnode->childCount[curSlot];
+00263       bnode->present[curSlot+1] = bnode->present[curSlot];
+00264     } // else
+00265 
+00266     ubixfsInode * tmpInode = bnode->head[curSlot].iPtr;
+00267 
+00268     for (unsigned int i = 0; i < (B_MAX_CHILD_COUNT+1) >> 1; i++) {
+00269       assert(tmpInode);
+00270       tmpInode = tmpInode->next.iPtr;
+00271     } // for i
+00272 
+00273     strncpy(bnode->keys[curSlot], tmpInode->name, B_MAX_NAME_LENGTH);
+00274     bnode->head[curSlot+1].iPtr = tmpInode;
+00275     bnode->tail[curSlot].iPtr = tmpInode->prev.iPtr;
+00276     bnode->childCount[curSlot] = (B_MAX_CHILD_COUNT+1) >> 1;
+00277     bnode->childCount[curSlot+1] -= bnode->childCount[curSlot];
+00278     bnode->present[curSlot] = true;
+00279     ++header->treeWidth;
+00280     if (++bnode->used == B_MAX_KEYS) splitNode(bnode);
+00281 
+00282   } // if leaf is full
+00283 // Info(bnode);
+00284   return true;
+00285 } // bTree::Insert
+00286 
+00287 void 
+00288 bTree::splitNode(bNode * oldNode) {
+00289   ubixfsInode * tmpInode = NULL;
+00290   assert(oldNode);
+00291   if (oldNode == NULL) return;
+00292   if (oldNode->used != B_MAX_KEYS) return;
+00293 
+00294   bNode * newNode = allocEmptyNode();
+00295   if (newNode == NULL) return;
+00296 
+00297   unsigned int shift = B_MAX_KEYS >> 1;
+00298   unsigned int splitLoc = B_MAX_KEYS - shift;
+00299   ++ shift;
+00300 // cout << "oldNode before split: " << endl;
+00301 // Info(oldNode);
+00302 // cout << "splitLoc: " << splitLoc << endl;
+00303 // cout << "shift: " << shift << endl;
+00304 
+00305   newNode->used = oldNode->used = B_MAX_KEYS >> 1;
+00306   newNode->parent.bPtr = oldNode->parent.bPtr;
+00307   newNode->leaf = oldNode->leaf;
+00308 
+00309 // cout << "newNode->used: " << newNode->used << endl;
+00310 // cout << "oldNode->used: " << oldNode->used << endl;
+00311 
+00312   memcpy(&newNode->keys[0],
+00313          &oldNode->keys[splitLoc],
+00314          sizeof(newNode->keys[0]) * (shift-1));
+00315   
+00316   memset(&oldNode->keys[splitLoc], 0, sizeof(newNode->keys[0]) * (shift-1));
+00317 
+00318   memcpy(&newNode->present[0],
+00319          &oldNode->present[splitLoc],
+00320          sizeof(newNode->present[0]) * shift);
+00321 
+00322   memset(&oldNode->present[splitLoc], 0, sizeof(newNode->present[0]) * shift);
+00323 
+00324   memcpy(&newNode->head[0],
+00325          &oldNode->head[splitLoc],
+00326          sizeof(newNode->head[0]) * shift);
+00327 
+00328   memset(&oldNode->head[splitLoc], 0, 
+00329          sizeof(newNode->head[0]) * shift);
+00330 
+00331   memcpy(&newNode->tail[0],
+00332          &oldNode->tail[splitLoc],
+00333          sizeof(newNode->tail[0]) * shift);
+00334 
+00335   memset(&oldNode->tail[splitLoc], 0, 
+00336          sizeof(newNode->tail[0]) * shift);
+00337 
+00338   memcpy(&newNode->childCount[0],
+00339          &oldNode->childCount[splitLoc],
+00340          sizeof(newNode->childCount[0]) * shift);
+00341 
+00342   memset(&oldNode->childCount[splitLoc], 0, 
+00343          sizeof(newNode->childCount[0]) * shift);
+00344 
+00345   if (!newNode->leaf) {
+00346     for (unsigned int i = 0; i <= newNode->used; i++) {
+00347       newNode->head[i].bPtr->parent.bPtr = newNode;
+00348     } // for i
+00349   } // if newNode isn't a leaf
+00350 
+00351   tmpInode = GetFirstNode(newNode);
+00352   assert(tmpInode);
+00353 
+00354   if (oldNode == root) {
+00355     // allocate a new root node
+00356     ++header->treeDepth;
+00357     root = allocEmptyNode();
+00358     oldNode->parent.bPtr = root;
+00359     newNode->parent.bPtr = root;
+00360  //   strncpy(root->keys[0], newNode->keys[0], B_MAX_NAME_LENGTH);
+00361     strncpy(root->keys[0], tmpInode->name, B_MAX_NAME_LENGTH);
+00362     root->head[0].bPtr = oldNode;
+00363     root->tail[0].bPtr = root->tail[1].bPtr = NULL;
+00364     root->head[1].bPtr = newNode;
+00365     root->used = 1;
+00366     root->leaf = false;
+00367     root->present[0] = root->present[1] = true;
+00368     root->childCount[0] = root->childCount[1] = 0;
+00369 //    root->childCount[0] = oldNode->used;
+00370 //    root->childCount[1] = newNode->used;
+00371 
+00372 // cout << "parent" << endl;
+00373 // Info(newNode->parent);
+00374 // cout << "oldNode" << endl;
+00375 // Info(oldNode);
+00376 // cout << "-----" << endl;
+00377 // cout << "newNode" << endl;
+00378 // Info(newNode);
+00379 // cout << "-----" << endl;
+00380 
+00381   } else {
+00382     insertNode(newNode->parent.bPtr, tmpInode->name, newNode);
+00383    // if (oldNode->parent->used == B_MAX_KEYS) splitNode(oldNode->parent);
+00384   } // else
+00385   return;
+00386 } // bTree::splitNode
+00387 
+00388 void
+00389 bTree::insertNode(bNode * node, const char * key, bNode * headPtr) {
+00390   unsigned int curSlot = 0;
+00391   if (node == NULL || key == NULL) return;
+00392 
+00393   if (strcmp(key, node->keys[node->used-1]) >= 0){
+00394     curSlot = node->used;
+00395     memset(node->keys[curSlot], 0, B_MAX_NAME_LENGTH);
+00396     strncpy(node->keys[curSlot], key, B_MAX_NAME_LENGTH);
+00397     node->head[curSlot+1].bPtr = headPtr;
+00398     node->tail[curSlot+1].bPtr = NULL;
+00399     node->present[curSlot+1] = true;
+00400     node->childCount[node->used] = 0; // maybe?
+00401 
+00402   } else {
+00403 
+00404     for (curSlot = 0; curSlot < node->used; curSlot++) {
+00405       if (strcmp(key, node->keys[curSlot]) < 0) break;
+00406     } // for 
+00407 
+00408     /*
+00409      * note that there is one more item for everything but keys
+00410      * So, make the shift count +1 and just subtract it from the key shift
+00411      * later
+00412      */
+00413     int shift = node->used - curSlot +1;
+00414 
+00415     memmove(&node->head[curSlot+1],
+00416             &node->head[curSlot],
+00417             sizeof(node->head[0]) * shift);
+00418     memmove(&node->tail[curSlot+1],
+00419             &node->tail[curSlot],
+00420             sizeof(node->tail[0]) * shift);
+00421     memmove(&node->present[curSlot+1],
+00422             &node->present[curSlot],
+00423             sizeof(node->present[0]) * shift);
+00424     memmove(&node->childCount[curSlot+1],
+00425             &node->childCount[curSlot],
+00426             sizeof(node->childCount[0]) * shift);
+00427 
+00428     memmove(&node->keys[curSlot+1],
+00429             &node->keys[curSlot],
+00430             sizeof(node->keys[0]) * (shift-1));
+00431     
+00432     memset(node->keys[curSlot], 0, B_MAX_NAME_LENGTH);
+00433     strncpy(node->keys[curSlot], key, B_MAX_NAME_LENGTH);
+00434     node->head[curSlot+1].bPtr = headPtr;
+00435     node->tail[curSlot+1].bPtr = NULL;
+00436     node->present[curSlot+1] = true;
+00437 //    node->childCount[node->used] = ?;
+00438   } // else 
+00439   if (++node->used == B_MAX_KEYS) splitNode(node); 
+00440   return;
+00441 } // bTree::insertNode
+00442 
+00443 bNode *
+00444 bTree::allocEmptyNode(void) {
+00445   bNode * newNode = new bNode;
+00446 
+00447   memset(newNode, 0, sizeof(bNode));
+00448   newNode->magic1 = B_NODE_MAGIC_1;
+00449   newNode->magic2 = B_NODE_MAGIC_2;
+00450   newNode->parent.bPtr = NULL;
+00451   newNode->tag = ++tag; // this will start at 1 (0 is the header node)
+00452   return newNode;
+00453 } // bTree::allocEmptyNode
+00454 
+00455 void
+00456 bTree::Info(const bNode * node) {
+00457   ubixfsInode * inode = NULL;
+00458   if (node == NULL || root == NULL) return;
+00459   cout <<  node << " | " << node->parent.bPtr << endl;
+00460   for (unsigned int i = 0; i <= node->used; i++) {
+00461     inode = node->head[i].iPtr;
+00462 //    cout << "(" << node->childCount[i] << ")";
+00463     for (unsigned int k = 0; k < node->childCount[i]; k++) {
+00464       cout << "[" << inode->name << "]";
+00465       inode = inode->next.iPtr;
+00466     } // for k
+00467     if (i != node->used) cout << " {" << node->keys[i] << "} ";
+00468   } // for i
+00469   cout << endl;
+00470   return;
+00471 #if 0
+00472   for (unsigned int i = 0; i < node->used; i++) {
+00473     cout << "keys[" << i << "]: " << node->keys[i] << "  ";
+00474   } // for i
+00475   cout << endl;
+00476   cout << "node->used: " << node->used << endl;
+00477   cout << "leaf: " << node->leaf << endl;
+00478   for (unsigned int i = 0; i <= node->used; i++) {
+00479     inode = (ubixfsInode *)node->head[i];
+00480 cout << "node->childCount["<<i<<"]: " << node->childCount[i] << endl;
+00481     for (unsigned int j = 0; j < node->childCount[i]; j++) {
+00482       assert(inode);
+00483       cout << "[" << i << "].[" << j << "]->" << inode->name << endl;
+00484       inode = inode->next;
+00485     } // for j
+00486   } // for i
+00487 #endif
+00488 } // bTree::Info
+00489 
+00490 void
+00491 bTree::Info(void) {
+00492   ubixfsInode * inode = NULL;
+00493 
+00494   cout << "tree depth: " << header->treeDepth << endl;
+00495   cout << "tree width: " << header->treeWidth << endl;
+00496   cout << "tree leaf count: " << header->treeLeafCount << endl;
+00497   cout << "tag: " << tag << endl;
+00498 
+00499   if (root == NULL) return;
+00500 
+00501   for (unsigned int i = 0; i <= root->used; i++) {
+00502     cout << "CC[" << i << "]: " << root->childCount[i] << "  ";
+00503   } // for i
+00504 
+00505   cout << endl;
+00506   for (unsigned int i = 0; i <= root->used; i++) {
+00507     cout << "CH[" << i << "]: " << root->head[i].bPtr << "  ";
+00508   } // for i
+00509 
+00510   cout << endl;
+00511   for (unsigned int i = 0; i <=root->used; i++) {
+00512     cout << "CT[" << i << "]: " << root->tail[i].bPtr << "  ";
+00513   } // for i
+00514   cout << endl;
+00515   for (unsigned int i = 0; i < root->used; i++) {
+00516     cout << "keys[" << i << "]: " << root->keys[i] << "  ";
+00517   } // for i
+00518   cout << endl;
+00519 
+00520 cout << "root->used: " << root->used << endl;
+00521     for (unsigned int i = 0; i <= root->used; i++) {
+00522       inode = root->head[i].iPtr;
+00523 cout << "root->childCount["<<i<<"]: " << root->childCount[i] << endl;
+00524     if (root->leaf) {
+00525 cout << "root contains leaf node" << endl;
+00526       for (unsigned int j = 0; j < root->childCount[i]; j++) {
+00527         assert(inode);
+00528         cout << "[" << i << "].[" << j << "]->" << inode->name << endl;
+00529         inode = inode->next.iPtr;
+00530       } // for j
+00531     } // if root->leaf
+00532   } // for i
+00533 } // bTree::Info
+00534 
+00535 void
+00536 bTree::Print(void) {
+00537   ubixfsInode * node = GetFirstNode();
+00538   while (node != NULL) {
+00539     cout << node->name << endl;
+00540     node = node->next.iPtr;
+00541   }
+00542 } // bTree::Print
+00543 
+00544 ubixfsInode *
+00545 bTree::Find(const char * key) {
+00546 /*
+00547   ubixfsInode * tmp = GetFirstNode();
+00548   while (tmp!=NULL) {
+00549     if (strcmp(tmp->name, key) == 0) return tmp;
+00550     tmp = tmp->next.iPtr;
+00551   }
+00552   return NULL;
+00553 */
+00554   return treeSearch(root, key);
+00555 } // bTree::Find
+00556 
+00557 ubixfsInode *
+00558 bTree::inodeSearch(ubixfsInode * inode, const char * key) {
+00559   if (inode == NULL || key == NULL) return NULL;
+00560   int result = strcmp(inode->name, key);
+00561   if (result == 0) return inode;
+00562 
+00563   if (result < 0) {
+00564     inode = inode->next.iPtr;
+00565     while (inode != NULL && ((result = strcmp(inode->name, key)) < 0)) {
+00566       inode = inode->next.iPtr;
+00567     } // while
+00568   } else {
+00569     inode = inode->prev.iPtr;
+00570     while (inode != NULL && ((result = strcmp(inode->name, key)) > 0)) {
+00571       inode = inode->prev.iPtr;
+00572     } // while
+00573   } // else
+00574   return (result == 0 ? inode : NULL);
+00575 } // bTree::inodeSearch
+00576 
+00577 ubixfsInode *
+00578 bTree::treeSearch(bNode * bnode, const char * key) {
+00579 
+00580   if (bnode == NULL || key == NULL || bnode->used == 0) return NULL;
+00581  
+00582   if (bnode->leaf) 
+00583     return inodeSearch(GetFirstNode(bnode), key);
+00584 
+00585   if (strcmp(key, bnode->keys[0]) < 0) {
+00586     return treeSearch(bnode->head[0].bPtr, key);
+00587   } // if
+00588 
+00589   if (strcmp(key, bnode->keys[bnode->used-1]) >= 0) {
+00590     return treeSearch(bnode->head[bnode->used].bPtr, key);
+00591   } // if
+00592 
+00593   for (unsigned int i = 1; i < bnode->used; i++) {
+00594     if (strcmp(key, bnode->keys[i]) < 0) {
+00595       return treeSearch(bnode->head[i].bPtr, key);
+00596     } // if
+00597   } // for i
+00598 
+00599   return NULL;
+00600 } // bTree::treeSearch
+00601 
+00602 ubixfsInode * 
+00603 bTree::GetFirstNode(void) {
+00604   return GetFirstNode(root);
+00605 } // bTree::GetFirstNode
+00606 
+00607 ubixfsInode *
+00608 bTree::GetFirstNode(bNode * node) {
+00609   bNode * tmpNode = node;
+00610 
+00611   if (tmpNode == NULL) return NULL;
+00612 
+00613   while (!tmpNode->leaf) {
+00614     for (unsigned int i = 0; i < tmpNode->used; i++) {
+00615       if (tmpNode->head[i].bPtr != NULL) {
+00616         tmpNode = tmpNode->head[i].bPtr;
+00617         break;
+00618       }  // if
+00619     } // for i
+00620   } // while
+00621 
+00622   for (unsigned int i = 0; i < tmpNode->used; i++) {
+00623     if (tmpNode->head[i].iPtr != NULL) return tmpNode->head[i].iPtr;
+00624   } // for i
+00625   return NULL;
+00626 } // bTree::GetFirstNode
+00627 
+00628 bNode *
+00629 bTree::findLeafNode(bNode * node, const char * key) {
+00630   assert(node);
+00631   assert(key);
+00632   if (node == NULL || key == NULL) return NULL;
+00633   assert(node->used);
+00634   if (node->leaf) return node;
+00635 
+00636   if (strcmp(key, node->keys[0]) < 0) 
+00637     return findLeafNode(node->head[0].bPtr, key);
+00638 
+00639   if (strcmp(key, node->keys[node->used-1]) >= 0) 
+00640     return findLeafNode(node->head[node->used].bPtr, key);
+00641   
+00642   for (unsigned int i = 1; i < node->used; i++) {
+00643     if (strcmp(key, node->keys[i]) < 0) 
+00644       return findLeafNode(node->head[i].bPtr, key);
+00645   } // for i
+00646   
+00647   return NULL;
+00648 } // bTree::findLeafNode
+00649 
+00650 void
+00651 bTree::saveNode(FILE * fd, bNode * node, void * tmpPtr) {
+00652  
+00653   bNode * ptr = (bNode *)tmpPtr;
+00654   assert(tmpPtr);
+00655   assert(fd);
+00656   assert(node);
+00657   cout << "writing tag: " << node->tag << endl;
+00658 
+00659   memcpy(tmpPtr, node, sizeof(bNode));  
+00660 
+00661   if (node->parent.bPtr != NULL)
+00662     ptr->parent.offset = node->parent.bPtr->tag * sizeof(bNode);
+00663   else
+00664     ptr->parent.offset = 0;
+00665 
+00666   for (unsigned int i = 0; i <= node->used; i++) {
+00667     bNode * bPtr = node->head[i].bPtr;
+00668 
+00669     if (bPtr != NULL)
+00670       ptr->head[i].offset = bPtr->tag * sizeof(bNode);
+00671     else
+00672       ptr->head[i].offset = ~0;
+00673     ptr->present[i] = false;
+00674   } // for i
+00675   
+00676   if (node->leaf) {
+00677 
+00678     for (unsigned int i = 0; i <= node->used; i++) {
+00679   //    ubixfsInode * inode = node->head[i].iPtr;
+00680   // mji    if (inode != NULL) tmp->head[i] = inode->
+00681     } // for i
+00682   } else {
+00683 
+00684     for (unsigned int i = 0; i <= node->used; i++) {
+00685 
+00686       if (node->head[i].bPtr != NULL) saveNode(fd, node->head[i].bPtr, tmpPtr);
+00687 
+00688     } // for i
+00689 
+00690   } // else
+00691 
+00692   return;
+00693 } // bTree::saveNode 
+00694 
+00695 bool 
+00696 bTree::Save(const char * filename) {
+00697   ubixfsInode * uPtr = NULL;
+00698   if (filename == NULL) return false;
+00699   FILE * fd = NULL;
+00700   if ((fd = fopen(filename, "wb+")) == NULL) return false;
+00701 
+00702 cout << "tags: " << tag << endl;
+00703   lseek(fileno(fd), tag * sizeof(bNode), SEEK_END);
+00704 
+00705   header->firstNodeOffset = sizeof(bNode);
+00706   header->firstDeleted = -1;
+00707   void * tmpPtr = malloc(sizeof(bNode));
+00708   assert(tmpPtr);
+00709   uPtr = (ubixfsInode *)tmpPtr;
+00710   memset(tmpPtr, 0, sizeof(bNode));
+00711   fwrite(header, sizeof(bTreeHeader), 1, fd); 
+00712   saveNode(fd, root, tmpPtr);
+00713   
+00714   fclose(fd);
+00715   free(tmpPtr);
+00716   return true;
+00717 } // bTree::Save
+00718 
+00719 bool
+00720 bTree::Load(const char * filename) {
+00721   if (filename == NULL) return false;
+00722   return true;
+00723 } // bTree::Load
+00724 
+00725 bool
+00726 bTree::Delete(const char * key) {
+00727 
+00728   if (key == NULL) return false;
+00729   return true;
+00730 } // bTree::Delete
+00731 
+00732 bool
+00733 bTree::Verify(void) {
+00734   ubixfsInode * node = GetFirstNode();
+00735   if (node == NULL) return true;
+00736  
+00737   while (node != NULL) {
+00738     ubixfsInode * next = node->next.iPtr;
+00739     if (next != NULL) {
+00740   //  cout << node->name << "::" << node->next->name << ":::" << strcmp(node->name, node->next->name) << endl;
+00741       if (strcmp(node->name, next->name) > 0) return false;
+00742     }
+00743     node = next;
+00744   } // while
+00745   return true;
+00746 } // bTree::Verify
+00747 
+00748 void 
+00749 bTree::Print(bNode * node) {
+00750   if (node == NULL) return;
+00751   Info(node);
+00752   if (!node->leaf)
+00753     for (unsigned int i = 0; i <= node->used; i++) {
+00754       Print(node->head[i].bPtr);
+00755     } // for i
+00756 } // bTree::Print
+00757 
+00758 void
+00759 bTree::PrintWholeTree(void) {
+00760   Print(root);
+00761 } // bTree::PrintWholeTree;
+00762 
+00763 bTree::~bTree(void) {
+00764   cout << "tree depth: " << header->treeDepth << endl;
+00765   cout << "tree width: " << header->treeWidth << endl;
+00766   cout << "tree leaf count: " << header->treeLeafCount << endl;
+00767 } // bTree::~bTree
+

Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/btree_8cpp.html b/doc/html/btree_8cpp.html new file mode 100644 index 0000000..97f6490 --- /dev/null +++ b/doc/html/btree_8cpp.html @@ -0,0 +1,90 @@ + + +UbixOS V2: src/sys/ubixfsv2/btree.cpp File Reference + + + + +
+
+
+
+ +

btree.cpp File Reference

+

+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <iostream>
+#include <assert.h>
+#include "btree.h"
+#include "ubixfs.h"
+ +

+Go to the source code of this file. + + + + + + + +

Namespaces

namespace  std

Defines

#define VERIFY(x, y, z, n)   if ((x) != (y)) { cout << "verify " << z << " failed" << endl; PrintWholeTree(); }
+


Define Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
#define VERIFY (x,
y,
z,
 )    if ((x) != (y)) { cout << "verify " << z << " failed" << endl; PrintWholeTree(); }
+
+
+ +

+ +

+Definition at line 12 of file btree.cpp. +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/btree_8h-source.html b/doc/html/btree_8h-source.html new file mode 100644 index 0000000..5075d77 --- /dev/null +++ b/doc/html/btree_8h-source.html @@ -0,0 +1,107 @@ + + +UbixOS V2: src/sys/ubixfsv2/btree.h Source File + + + + +
+
+
+
+ +

btree.h

Go to the documentation of this file.
00001 #ifndef BTREE_H
+00002 #define BTREE_H
+00003 
+00004 #include <stdio.h>
+00005 
+00006 #include "ubixfs.h"
+00007 #include "btreeheader.h"
+00008 #include "file.h"
+00009 
+00010 #define B_NODE_MAGIC_1 0xDEADBEEF
+00011 #define B_NODE_MAGIC_2 0x1900BABE
+00012 
+00013 #define B_MAX_KEYS 15
+00014 #define B_MAX_NAME_LENGTH 240
+00015 #define B_MAX_CHILD_COUNT 4
+00016 
+00017 // if any of these structs change they have to be updated in the format
+00018 // utility too
+00019 
+00020 typedef struct bNode { 
+00021   uInt32  magic1                          __attribute__ ((packed));
+00022   uInt32  used                            __attribute__ ((packed));
+00023   uPtr    parent                          __attribute__ ((packed));
+00024   uInt64  tag                             __attribute__ ((packed));
+00025   char    keys[B_MAX_KEYS][B_MAX_NAME_LENGTH]      __attribute__ ((packed));
+00026   bool    present[B_MAX_KEYS+1]           __attribute__ ((packed));
+00027   uPtr    head[B_MAX_KEYS+1]              __attribute__ ((packed));
+00028   uPtr    tail[B_MAX_KEYS+1]              __attribute__ ((packed));
+00029   uInt32   childCount[B_MAX_KEYS+1]        __attribute__ ((packed));
+00030   uInt32  magic2                          __attribute__ ((packed));
+00031   bool    leaf                            __attribute__ ((packed));
+00032   char reserved[131] __attribute__ ((packed));
+00033 } bNode; // bNode
+00034 
+00035 struct ubixfsInode;
+00036 
+00037 class bTree {
+00038  protected:
+00039   bNode          * root;
+00040   UbixFS         * fs;
+00041   bTreeHeader    * header;
+00042   fileDescriptor * fd;
+00043   uInt32           tag;
+00044   ubixfsInode    * treeSearch(bNode *, const char *);
+00045   ubixfsInode    * inodeSearch(ubixfsInode *, const char *);
+00046   void             splitNode(bNode *);
+00047   bNode          * allocEmptyNode(void);
+00048   void             insertNode(bNode *, const char *, bNode *);
+00049   bNode          * findLeafNode(bNode *, const char *);
+00050   void             Print(bNode *);
+00051   void             saveNode(FILE *, bNode *, void *);
+00052  public:
+00053                    bTree(const char *, ubixfsInode *);
+00054                    bTree(UbixFS *, fileDescriptor *);
+00055   ubixfsInode    * Find(const char *);
+00056   ubixfsInode    * GetFirstNode(void);
+00057   ubixfsInode    * GetFirstNode(bNode *);
+00058   bool             Delete(const char *);
+00059   void             Info(void);
+00060   void             Info(const bNode *);
+00061   bool             Insert(const char *, ubixfsInode *);
+00062   bool             Save(const char *);
+00063   bool             Load(const char *);
+00064   void             Print(void);
+00065   void             PrintWholeTree(void);
+00066   bool             Verify(void);
+00067                   ~bTree(void);
+00068   friend class UbixFS;
+00069 }; // bTree
+00070 #endif // !BTREE_H
+

Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/btree_8h.html b/doc/html/btree_8h.html new file mode 100644 index 0000000..d6c4d34 --- /dev/null +++ b/doc/html/btree_8h.html @@ -0,0 +1,158 @@ + + +UbixOS V2: src/sys/ubixfsv2/btree.h File Reference + + + + +
+
+
+
+ +

btree.h File Reference

+

+#include <stdio.h>
+#include "ubixfs.h"
+#include "btreeheader.h"
+#include "file.h"
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + +

Data Structures

struct  bNode
class  bTree

Defines

#define B_MAX_CHILD_COUNT   4
#define B_MAX_KEYS   15
#define B_MAX_NAME_LENGTH   240
#define B_NODE_MAGIC_1   0xDEADBEEF
#define B_NODE_MAGIC_2   0x1900BABE
+


Define Documentation

+ +
+
+ + + + +
#define B_MAX_CHILD_COUNT   4
+
+
+ +

+ +

+Definition at line 15 of file btree.h. +

+

+ +

+
+ + + + +
#define B_MAX_KEYS   15
+
+
+ +

+ +

+Definition at line 13 of file btree.h. +

+Referenced by bTree::insertNode(), and bTree::splitNode(). +

+

+ +

+
+ + + + +
#define B_MAX_NAME_LENGTH   240
+
+
+ +

+ +

+Definition at line 14 of file btree.h. +

+Referenced by bTree::bTree(), bTree::Insert(), bTree::insertNode(), and bTree::splitNode(). +

+

+ +

+
+ + + + +
#define B_NODE_MAGIC_1   0xDEADBEEF
+
+
+ +

+ +

+Definition at line 10 of file btree.h. +

+Referenced by bTree::allocEmptyNode(). +

+

+ +

+
+ + + + +
#define B_NODE_MAGIC_2   0x1900BABE
+
+
+ +

+ +

+Definition at line 11 of file btree.h. +

+Referenced by bTree::allocEmptyNode(). +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/btreeheader_8h-source.html b/doc/html/btreeheader_8h-source.html new file mode 100644 index 0000000..8a3bc1a --- /dev/null +++ b/doc/html/btreeheader_8h-source.html @@ -0,0 +1,50 @@ + + +UbixOS V2: src/sys/ubixfsv2/btreeheader.h Source File + + + + +
+
+
+
+ +

btreeheader.h

Go to the documentation of this file.
00001 #ifndef BTREEHEADER_H
+00002 #define BTREEHEADER_H
+00003 
+00004 typedef struct bTreeHeader {
+00005   uInt32 treeDepth;
+00006   uInt32 treeWidth;
+00007   uInt32 treeLeafCount;
+00008   off_t  firstNodeOffset; // used when tree is on disk
+00009   off_t  firstDeleted;    // used to point to an empty node
+00010   char paddington[4068];
+00011 } bTreeHeader; // bTreeHeader
+00012 
+00013 #endif /* !BTREEHEADER_H */
+

Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/btreeheader_8h.html b/doc/html/btreeheader_8h.html new file mode 100644 index 0000000..8cd4bbd --- /dev/null +++ b/doc/html/btreeheader_8h.html @@ -0,0 +1,47 @@ + + +UbixOS V2: src/sys/ubixfsv2/btreeheader.h File Reference + + + + +
+
+
+
+ +

btreeheader.h File Reference

+

+ +

+Go to the source code of this file. + + + + +

Data Structures

struct  bTreeHeader
+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/buf_8h-source.html b/doc/html/buf_8h-source.html new file mode 100644 index 0000000..7a7438e --- /dev/null +++ b/doc/html/buf_8h-source.html @@ -0,0 +1,83 @@ + + +UbixOS V2: src/sys/include/sys/buf.h Source File + + + + +
+
+
+
+ +

buf.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _BUF_H
+00031 #define _BUF_H
+00032 
+00033 #include <ubixos/types.h>
+00034 #include <vfs/vfs.h>
+00035 #include <sys/device.h>
+00036 
+00037 struct buf {
+00038   };
+00039 
+00040 
+00041 #endif
+00042 
+00043 /***
+00044  END
+00045  ***/
+00046 
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/buf_8h.html b/doc/html/buf_8h.html new file mode 100644 index 0000000..e013ab1 --- /dev/null +++ b/doc/html/buf_8h.html @@ -0,0 +1,50 @@ + + +UbixOS V2: src/sys/include/sys/buf.h File Reference + + + + +
+
+
+
+ +

buf.h File Reference

+

+#include <ubixos/types.h>
+#include <vfs/vfs.h>
+#include <sys/device.h>
+ +

+Go to the source code of this file. + + + + +

Data Structures

struct  buf
+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/cc_8h-source.html b/doc/html/cc_8h-source.html new file mode 100644 index 0000000..e97c2bd --- /dev/null +++ b/doc/html/cc_8h-source.html @@ -0,0 +1,80 @@ + + +UbixOS V2: src/sys/include/net/arch/cc.h Source File + + + + +
+
+
+
+ +

cc.h

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 #ifndef __ARCH_CC_H__
+00036 #define __ARCH_CC_H__
+00037 
+00038 #define PACK_STRUCT_FIELD(x) x __attribute__((packed))
+00039 #define PACK_STRUCT_STRUCT __attribute__((packed))
+00040 #define PACK_STRUCT_BEGIN
+00041 #define PACK_STRUCT_END
+00042 
+00043 #endif /* __ARCH_CC_H__ */
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/cc_8h.html b/doc/html/cc_8h.html new file mode 100644 index 0000000..5c8bfd7 --- /dev/null +++ b/doc/html/cc_8h.html @@ -0,0 +1,127 @@ + + +UbixOS V2: src/sys/include/net/arch/cc.h File Reference + + + + +
+
+
+
+ +

cc.h File Reference

+

+ +

+Go to the source code of this file. + + + + + + + + + + +

Defines

#define PACK_STRUCT_BEGIN
#define PACK_STRUCT_END
#define PACK_STRUCT_FIELD(x)   x __attribute__((packed))
#define PACK_STRUCT_STRUCT   __attribute__((packed))
+


Define Documentation

+ +
+
+ + + + +
#define PACK_STRUCT_BEGIN
+
+
+ +

+ +

+Definition at line 40 of file cc.h. +

+

+ +

+
+ + + + +
#define PACK_STRUCT_END
+
+
+ +

+ +

+Definition at line 41 of file cc.h. +

+

+ +

+
+ + + + + + + + + +
#define PACK_STRUCT_FIELD (  )    x __attribute__((packed))
+
+
+ +

+ +

+Definition at line 38 of file cc.h. +

+

+ +

+
+ + + + +
#define PACK_STRUCT_STRUCT   __attribute__((packed))
+
+
+ +

+ +

+Definition at line 39 of file cc.h. +

+

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/cdefs_8h-source.html b/doc/html/cdefs_8h-source.html new file mode 100644 index 0000000..d35221f --- /dev/null +++ b/doc/html/cdefs_8h-source.html @@ -0,0 +1,93 @@ + + +UbixOS V2: src/sys/include/sys/cdefs.h Source File + + + + +
+
+
+
+ +

cdefs.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _CDEFS_H
+00031 #define _CDRES_H
+00032 
+00033 #include <ubixos/types.h>
+00034 
+00035 #define __dead2         __attribute__((__noreturn__))
+00036 
+00037 
+00038 #endif
+00039 
+00040 /***
+00041  $Log$
+00042  Revision 1.1.1.1  2006/06/01 12:46:15  reddawg
+00043  ubix2
+00044 
+00045  Revision 1.2  2005/10/12 00:13:37  reddawg
+00046  Removed
+00047 
+00048  Revision 1.1.1.1  2005/09/26 17:23:51  reddawg
+00049  no message
+00050 
+00051  Revision 1.2  2004/05/21 15:12:17  reddawg
+00052  Cleaned up
+00053 
+00054 
+00055  END
+00056  ***/
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/cdefs_8h.html b/doc/html/cdefs_8h.html new file mode 100644 index 0000000..3237995 --- /dev/null +++ b/doc/html/cdefs_8h.html @@ -0,0 +1,85 @@ + + +UbixOS V2: src/sys/include/sys/cdefs.h File Reference + + + + +
+
+
+
+ +

cdefs.h File Reference

+

+#include <ubixos/types.h>
+ +

+Go to the source code of this file. + + + + + + +

Defines

#define __dead2   __attribute__((__noreturn__))
#define _CDRES_H
+


Define Documentation

+ +
+
+ + + + +
#define __dead2   __attribute__((__noreturn__))
+
+
+ +

+ +

+Definition at line 35 of file cdefs.h. +

+

+ +

+
+ + + + +
#define _CDRES_H
+
+
+ +

+ +

+Definition at line 31 of file cdefs.h. +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/classDiskFS.html b/doc/html/classDiskFS.html new file mode 100644 index 0000000..e72e01f --- /dev/null +++ b/doc/html/classDiskFS.html @@ -0,0 +1,212 @@ + + +UbixOS V2: DiskFS Class Reference + + + + +
+
+
+
+

DiskFS Class Reference

#include <vfs.h> +

+

Inheritance diagram for DiskFS: +

+ +FileSystemAbstract + +

Detailed Description

+ +

+ +

+Definition at line 15 of file vfs.h. + + + + + + + + + + + + + +

Public Member Functions

 DiskFS (const char *)
virtual int read (void *, long, long)
virtual int write (const void *, long, long)
virtual ~DiskFS (void)

Protected Attributes

FILE * diskFile
+


Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + +
DiskFS::DiskFS (const char *   ) 
+
+
+ +

+ +

+Definition at line 4 of file vfs.cpp. +

+References diskFile, and fopen(). +

+

+ +

+
+ + + + + + + + + +
virtual DiskFS::~DiskFS (void   )  [inline, virtual]
+
+
+ +

+ +

+Definition at line 22 of file vfs.h. +

+

+


Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int DiskFS::read (void * ,
long ,
long  
) [virtual]
+
+
+ +

+ +

+Definition at line 17 of file vfs.cpp. +

+References diskFile, fread(), fseek(), NULL, and SEEK_SET. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int DiskFS::write (const void * ,
long ,
long  
) [virtual]
+
+
+ +

+ +

+Definition at line 9 of file vfs.cpp. +

+References diskFile, fseek(), fwrite(), NULL, and SEEK_SET. +

+

+


Field Documentation

+ +
+
+ + + + +
FILE* DiskFS::diskFile [protected]
+
+
+ +

+ +

+Definition at line 17 of file vfs.h. +

+Referenced by DiskFS(), read(), and write(). +

+

+


The documentation for this class was generated from the following files: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/classFileSystemAbstract.html b/doc/html/classFileSystemAbstract.html new file mode 100644 index 0000000..b7ab245 --- /dev/null +++ b/doc/html/classFileSystemAbstract.html @@ -0,0 +1,155 @@ + + +UbixOS V2: FileSystemAbstract Class Reference + + + + +
+
+
+
+

FileSystemAbstract Class Reference

#include <vfs.h> +

+

Inheritance diagram for FileSystemAbstract: +

+ +DiskFS + +

Detailed Description

+ +

+ +

+Definition at line 7 of file vfs.h. + + + + + + + + +

Public Member Functions

virtual int read (char *, long, long)=0
virtual int write (char *, long, long)=0
virtual ~FileSystemAbstract (void)
+


Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + +
virtual FileSystemAbstract::~FileSystemAbstract (void   )  [inline, virtual]
+
+
+ +

+ +

+Definition at line 12 of file vfs.h. +

+

+


Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual int FileSystemAbstract::read (char * ,
long ,
long  
) [pure virtual]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual int FileSystemAbstract::write (char * ,
long ,
long  
) [pure virtual]
+
+
+ +

+ +

+

+


The documentation for this class was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/classUbixFS.html b/doc/html/classUbixFS.html new file mode 100644 index 0000000..5a560e6 --- /dev/null +++ b/doc/html/classUbixFS.html @@ -0,0 +1,824 @@ + + +UbixOS V2: UbixFS Class Reference + + + + +
+
+
+
+

UbixFS Class Reference

#include <ubixfs.h> +

+

Inheritance diagram for UbixFS: +

+ +vfs_abstract + +

Detailed Description

+ +

+ +

+Definition at line 132 of file ubixfs.h. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

 UbixFS (device_t *)
 UbixFS (void)
virtual int vfs_format (device_t *)
virtual int vfs_init (void)
virtual int vfs_mkdir (const char *, mode_t)
virtual void * vfs_mknod (const char *, mode_t)
virtual int vfs_open (const char *, fileDescriptor *, int,...)
virtual size_t vfs_read (fileDescriptor *, void *, off_t, size_t)
virtual int vfs_stop (void)
virtual int vfs_sync (void)
virtual size_t vfs_write (fileDescriptor *, void *, off_t, size_t)
virtual ~UbixFS (void)

Protected Member Functions

blockRun get8FreeBlocks (uInt32)
blockRun getFreeBlock (void)
blockRun getFreeBlock (uInt32)
blockRun getFreeBlock (blockRun)
uInt32 getNextAG (void)
void * mknod (const char *, ubixfsInode *, mode_t)
void printFreeBlockList (uInt32)
void printSuperBlock (void)
void setFreeBlock (blockRun)

Protected Attributes

signed char * freeBlockList
fileDescriptorroot
diskSuperBlocksuperBlock

Friends

class bTree
+


Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + +
UbixFS::UbixFS (void   ) 
+
+
+ +

+ +

+Definition at line 13 of file ubixfs.cpp. +

+References freeBlockList, NULL, root, and superBlock. +

+

+ +

+
+ + + + + + + + + +
UbixFS::UbixFS (device_t  ) 
+
+
+ +

+ +

+Definition at line 21 of file ubixfs.cpp. +

+References dev, freeBlockList, NULL, root, and superBlock. +

+

+ +

+
+ + + + + + + + + +
UbixFS::~UbixFS (void   )  [virtual]
+
+
+ +

+ +

+Definition at line 986 of file ubixfs.cpp. +

+References freeBlockList. +

+

+


Member Function Documentation

+ +
+
+ + + + + + + + + +
blockRun UbixFS::get8FreeBlocks (uInt32   )  [protected]
+
+
+ +

+ +

+Definition at line 782 of file ubixfs.cpp. +

+References freeBlockList, NULL, and superBlock. +

+

+ +

+
+ + + + + + + + + +
blockRun UbixFS::getFreeBlock (void   )  [protected]
+
+
+ +

+ +

+Definition at line 777 of file ubixfs.cpp. +

+References getNextAG(). +

+Referenced by getFreeBlock(), mknod(), and vfs_write(). +

+

+ +

+
+ + + + + + + + + +
blockRun UbixFS::getFreeBlock (uInt32   )  [protected]
+
+
+ +

+ +

+Definition at line 693 of file ubixfs.cpp. +

+References freeBlockList, NULL, and superBlock. +

+

+ +

+
+ + + + + + + + + +
blockRun UbixFS::getFreeBlock (blockRun   )  [protected]
+
+
+ +

+ +

+Definition at line 616 of file ubixfs.cpp. +

+References freeBlockList, getFreeBlock(), NULL, and superBlock. +

+

+ +

+
+ + + + + + + + + +
uInt32 UbixFS::getNextAG (void   )  [protected]
+
+
+ +

+ +

+Definition at line 760 of file ubixfs.cpp. +

+References superBlock. +

+Referenced by getFreeBlock(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void * UbixFS::mknod (const char * ,
ubixfsInode,
mode_t  
) [protected]
+
+
+ +

+ +

+Definition at line 835 of file ubixfs.cpp. +

+References assert, getFreeBlock(), getgid(), getuid(), MAX_FILENAME_LENGTH, memset(), NULL, strncpy(), superBlock, and UBIXFS_INODE_MAGIC. +

+Referenced by vfs_mkdir(), and vfs_mknod(). +

+

+ +

+
+ + + + + + + + + +
void UbixFS::printFreeBlockList (uInt32   )  [protected]
+
+
+ +

+ +

+Definition at line 966 of file ubixfs.cpp. +

+References freeBlockList, NULL, and superBlock. +

+

+ +

+
+ + + + + + + + + +
void UbixFS::printSuperBlock (void   )  [protected]
+
+
+ +

+ +

+Definition at line 29 of file ubixfs.cpp. +

+References superBlock. +

+Referenced by vfs_init(). +

+

+ +

+
+ + + + + + + + + +
void UbixFS::setFreeBlock (blockRun   )  [protected]
+
+
+ +

+ +

+Definition at line 600 of file ubixfs.cpp. +

+References freeBlockList, NULL, and superBlock. +

+

+ +

+
+ + + + + + + + + +
int UbixFS::vfs_format (device_t  )  [virtual]
+
+ +

+ +

+
+ + + + + + + + + +
int UbixFS::vfs_init (void   )  [virtual]
+
+
+ +

+ +

+Reimplemented from vfs_abstract. +

+Definition at line 50 of file ubixfs.cpp. +

+References assert, bTree, freeBlockList, fileDescriptor::inode, memset(), NULL, printSuperBlock(), root, strcmp(), superBlock, UBIXFS_CLEAN, UBIXFS_MAGIC1, UBIXFS_MAGIC2, and UBIXFS_MAGIC3. +

+Referenced by main(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int UbixFS::vfs_mkdir (const char * ,
mode_t  
) [virtual]
+
+
+ +

+ +

+Reimplemented from vfs_abstract. +

+Definition at line 891 of file ubixfs.cpp. +

+References assert, fileDescriptor::inode, INODE_DIRECTORY, MAX_FILENAME_LENGTH, memset(), mknod(), name, NULL, root, strlen(), and strncpy(). +

+Referenced by main(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void * UbixFS::vfs_mknod (const char * ,
mode_t  
) [virtual]
+
+
+ +

+ +

+Reimplemented from vfs_abstract. +

+Definition at line 305 of file ubixfs.cpp. +

+References mknod(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int UbixFS::vfs_open (const char * ,
fileDescriptor,
int ,
  ... 
) [virtual]
+
+
+ +

+ +

+Reimplemented from vfs_abstract. +

+Definition at line 310 of file ubixfs.cpp. +

+References fileDescriptor::inode, NULL, fileDescriptor::offset, and fileDescriptor::size. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
size_t UbixFS::vfs_read (fileDescriptor,
void * ,
off_t ,
size_t  
) [virtual]
+
+
+ +

+ +

+Reimplemented from vfs_abstract. +

+Definition at line 321 of file ubixfs.cpp. +

+References assert, fileDescriptor::inode, NULL, NUM_DIRECT_BLOCKS, and superBlock. +

+

+ +

+
+ + + + + + + + + +
int UbixFS::vfs_stop (void   )  [virtual]
+
+
+ +

+ +

+Reimplemented from vfs_abstract. +

+Definition at line 557 of file ubixfs.cpp. +

+References freeBlockList, fileDescriptor::inode, NULL, root, superBlock, and vfs_sync(). +

+Referenced by main(). +

+

+ +

+
+ + + + + + + + + +
int UbixFS::vfs_sync (void   )  [virtual]
+
+
+ +

+ +

+Reimplemented from vfs_abstract. +

+Definition at line 588 of file ubixfs.cpp. +

+References freeBlockList, NULL, and superBlock. +

+Referenced by vfs_stop(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
size_t UbixFS::vfs_write (fileDescriptor,
void * ,
off_t ,
size_t  
) [virtual]
+
+
+ +

+ +

+Reimplemented from vfs_abstract. +

+Definition at line 387 of file ubixfs.cpp. +

+References assert, getFreeBlock(), fileDescriptor::inode, NULL, NUM_DIRECT_BLOCKS, and superBlock. +

+

+


Friends And Related Function Documentation

+ +
+
+ + + + +
friend class bTree [friend]
+
+
+ +

+ +

+Definition at line 160 of file ubixfs.h. +

+Referenced by vfs_init(). +

+

+


Field Documentation

+ +
+
+ + + + +
signed char* UbixFS::freeBlockList [protected]
+
+ +

+ +

+
+ + + + +
fileDescriptor* UbixFS::root [protected]
+
+
+ +

+ +

+Definition at line 136 of file ubixfs.h. +

+Referenced by UbixFS(), vfs_init(), vfs_mkdir(), and vfs_stop(). +

+

+ +

+
+ + + + +
diskSuperBlock* UbixFS::superBlock [protected]
+
+ +

+


The documentation for this class was generated from the following files: +
Generated on Sun Dec 3 02:38:15 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/classbTree.html b/doc/html/classbTree.html new file mode 100644 index 0000000..42bfb43 --- /dev/null +++ b/doc/html/classbTree.html @@ -0,0 +1,885 @@ + + +UbixOS V2: bTree Class Reference + + + + +
+
+
+
+

bTree Class Reference

#include <btree.h> +

+


Detailed Description

+ +

+ +

+Definition at line 37 of file btree.h. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

 bTree (UbixFS *, fileDescriptor *)
 bTree (const char *, ubixfsInode *)
bool Delete (const char *)
ubixfsInodeFind (const char *)
ubixfsInodeGetFirstNode (bNode *)
ubixfsInodeGetFirstNode (void)
void Info (const bNode *)
void Info (void)
bool Insert (const char *, ubixfsInode *)
bool Load (const char *)
void Print (void)
void PrintWholeTree (void)
bool Save (const char *)
bool Verify (void)
 ~bTree (void)

Protected Member Functions

bNodeallocEmptyNode (void)
bNodefindLeafNode (bNode *, const char *)
ubixfsInodeinodeSearch (ubixfsInode *, const char *)
void insertNode (bNode *, const char *, bNode *)
void Print (bNode *)
void saveNode (FILE *, bNode *, void *)
void splitNode (bNode *)
ubixfsInodetreeSearch (bNode *, const char *)

Protected Attributes

fileDescriptorfd
UbixFSfs
bTreeHeaderheader
bNoderoot
uInt32 tag

Friends

class UbixFS
+


Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
bTree::bTree (const char * ,
ubixfsInode 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
bTree::bTree (UbixFS,
fileDescriptor 
)
+
+
+ +

+ +

+Definition at line 14 of file btree.cpp. +

+References assert, fd, bTreeHeader::firstNodeOffset, header, memset(), NULL, root, tag, and bTreeHeader::treeLeafCount. +

+

+ +

+
+ + + + + + + + + +
bTree::~bTree (void   ) 
+
+
+ +

+ +

+Definition at line 763 of file btree.cpp. +

+References header, bTreeHeader::treeDepth, bTreeHeader::treeLeafCount, and bTreeHeader::treeWidth. +

+

+


Member Function Documentation

+ +
+
+ + + + + + + + + +
bNode * bTree::allocEmptyNode (void   )  [protected]
+
+
+ +

+ +

+Definition at line 444 of file btree.cpp. +

+References B_NODE_MAGIC_1, B_NODE_MAGIC_2, memset(), NULL, and tag. +

+Referenced by bTree(), Insert(), and splitNode(). +

+

+ +

+
+ + + + + + + + + +
bool bTree::Delete (const char *   ) 
+
+
+ +

+ +

+Definition at line 726 of file btree.cpp. +

+References NULL. +

+

+ +

+
+ + + + + + + + + +
ubixfsInode * bTree::Find (const char *   ) 
+
+
+ +

+ +

+Definition at line 545 of file btree.cpp. +

+References root, and treeSearch(). +

+Referenced by Insert(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
bNode * bTree::findLeafNode (bNode,
const char *  
) [protected]
+
+
+ +

+ +

+Definition at line 629 of file btree.cpp. +

+References assert, NULL, and strcmp(). +

+

+ +

+
+ + + + + + + + + +
ubixfsInode * bTree::GetFirstNode (bNode  ) 
+
+
+ +

+ +

+Definition at line 608 of file btree.cpp. +

+References NULL. +

+

+ +

+
+ + + + + + + + + +
ubixfsInode * bTree::GetFirstNode (void   ) 
+
+
+ +

+ +

+Definition at line 603 of file btree.cpp. +

+References root. +

+Referenced by main(), Print(), splitNode(), treeSearch(), and Verify(). +

+

+ +

+
+ + + + + + + + + +
void bTree::Info (const bNode  ) 
+
+
+ +

+ +

+Definition at line 456 of file btree.cpp. +

+References assert, NULL, and root. +

+

+ +

+
+ + + + + + + + + +
void bTree::Info (void   ) 
+
+
+ +

+ +

+Definition at line 491 of file btree.cpp. +

+References assert, header, NULL, root, tag, bTreeHeader::treeDepth, bTreeHeader::treeLeafCount, and bTreeHeader::treeWidth. +

+Referenced by Print(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
ubixfsInode * bTree::inodeSearch (ubixfsInode,
const char *  
) [protected]
+
+
+ +

+ +

+Definition at line 558 of file btree.cpp. +

+References NULL, and strcmp(). +

+Referenced by treeSearch(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
bool bTree::Insert (const char * ,
ubixfsInode 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void bTree::insertNode (bNode,
const char * ,
bNode 
) [protected]
+
+
+ +

+ +

+Definition at line 389 of file btree.cpp. +

+References B_MAX_KEYS, B_MAX_NAME_LENGTH, memset(), NULL, splitNode(), strcmp(), and strncpy(). +

+Referenced by splitNode(). +

+

+ +

+
+ + + + + + + + + +
bool bTree::Load (const char *   ) 
+
+
+ +

+ +

+Definition at line 720 of file btree.cpp. +

+References NULL. +

+

+ +

+
+ + + + + + + + + +
void bTree::Print (void   ) 
+
+
+ +

+ +

+Definition at line 536 of file btree.cpp. +

+References GetFirstNode(), and NULL. +

+Referenced by Print(), and PrintWholeTree(). +

+

+ +

+
+ + + + + + + + + +
void bTree::Print (bNode  )  [protected]
+
+
+ +

+ +

+Definition at line 749 of file btree.cpp. +

+References Info(), NULL, and Print(). +

+

+ +

+
+ + + + + + + + + +
void bTree::PrintWholeTree (void   ) 
+
+
+ +

+ +

+Definition at line 759 of file btree.cpp. +

+References Print(), and root. +

+

+ +

+
+ + + + + + + + + +
bool bTree::Save (const char *   ) 
+
+
+ +

+ +

+Definition at line 696 of file btree.cpp. +

+References assert, fclose(), bTreeHeader::firstDeleted, bTreeHeader::firstNodeOffset, fopen(), fwrite(), header, memset(), NULL, root, saveNode(), and tag. +

+Referenced by main(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void bTree::saveNode (FILE * ,
bNode,
void *  
) [protected]
+
+
+ +

+ +

+Definition at line 651 of file btree.cpp. +

+References assert, memcpy(), and NULL. +

+Referenced by Save(). +

+

+ +

+
+ + + + + + + + + +
void bTree::splitNode (bNode  )  [protected]
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
ubixfsInode * bTree::treeSearch (bNode,
const char *  
) [protected]
+
+
+ +

+ +

+Definition at line 578 of file btree.cpp. +

+References GetFirstNode(), inodeSearch(), NULL, and strcmp(). +

+Referenced by Find(). +

+

+ +

+
+ + + + + + + + + +
bool bTree::Verify (void   ) 
+
+
+ +

+ +

+Definition at line 733 of file btree.cpp. +

+References GetFirstNode(), fileSystem::next, NULL, and strcmp(). +

+

+


Friends And Related Function Documentation

+ +
+
+ + + + +
friend class UbixFS [friend]
+
+
+ +

+ +

+Definition at line 68 of file btree.h. +

+

+


Field Documentation

+ +
+
+ + + + +
fileDescriptor* bTree::fd [protected]
+
+
+ +

+ +

+Definition at line 42 of file btree.h. +

+Referenced by bTree(). +

+

+ +

+
+ + + + +
UbixFS* bTree::fs [protected]
+
+
+ +

+ +

+Definition at line 40 of file btree.h. +

+

+ +

+
+ + + + +
bTreeHeader* bTree::header [protected]
+
+
+ +

+ +

+Definition at line 41 of file btree.h. +

+Referenced by bTree(), Info(), Insert(), Save(), splitNode(), and ~bTree(). +

+

+ +

+
+ + + + +
bNode* bTree::root [protected]
+
+
+ +

+ +

+Definition at line 39 of file btree.h. +

+Referenced by bTree(), Find(), GetFirstNode(), Info(), Insert(), PrintWholeTree(), Save(), and splitNode(). +

+

+ +

+
+ + + + +
uInt32 bTree::tag [protected]
+
+
+ +

+ +

+Definition at line 43 of file btree.h. +

+Referenced by allocEmptyNode(), bTree(), Info(), and Save(). +

+

+


The documentation for this class was generated from the following files: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/classes.html b/doc/html/classes.html new file mode 100644 index 0000000..b61dacd --- /dev/null +++ b/doc/html/classes.html @@ -0,0 +1,62 @@ + + +UbixOS V2: Alphabetical List + + + + +
+
+
+
+

UbixOS V2 Data Structure Index

A | B | C | D | E | F | G | H | I | K | L | M | N | O | P | R | S | T | U | V | W | _

+ +
  A  
+
diskSuperBlock   
  H  
+
ogDisplay_VESA   timeval   
api_msg   dmadat   hostRingEntry   ogModeInfo   timezone   
api_msg_msg   dos_partition   
  I  
+
ogVESAInfo   TMode_Rec   
arp_entry   dp_rcvhdr   i386_frame   osInfo   tms   
arp_hdr   driveInfo   i387Struct   
  P  
+
trapframe   
arpcom   driverType   icmp_dur_hdr   partitionInformation   tssStruct   
  B  
+
DrvGeom   icmp_echo_hdr   pbuf   tty_termNode   
blockAllocationTableEntry   
  E  
+
icmp_te_hdr   pciConfig   TVESA_Rec   
blockRun   ei_device   in_addr   pipe_args   
  U  
+
bNode   elfDynamic   initBlock   
  R  
+
ubixDiskLabel   
bootSect   elfDynSym   ioctl_args   readlink_args   ubixDiskLabel::ubixPartitions   
bsd_disklabel   elfHeader   ip_addr   
  S  
+
UbixFS   
bsd_disklabel::partition   elfPltInfo   ip_hdr   sdeWindows   ubixFSInfo   
bTree   elfProgramHeader   issetugid_args   sigaction_args   ubixfsInode   
bTreeHeader   elfSectionHeader   
  K  
+
sigprocmask_args   ubthread   
buf   eth_addr   kmod_struct   sockaddr   ubthread_cond   
  C  
+
eth_hdr   
  L  
+
sockaddr_in   ubthread_cond_list   
cacheNode   etheraddr   lncInfo   stat   ubthread_list   
close_args   ethernetif   lwip_socket   sys_mbox   ubthread_mutex   
confadd   ethip_hdr   
  M  
+
sys_mbox_msg   ubthread_mutex_list   
cpuinfo_t   
  F  
+
mds   sys_sem   udp_hdr   
csum   fcntl_args   memDescriptor   sys_thread   udp_pcb   
csum_total   file   mMap   sys_timeout   ufs1_dinode   
  D  
+
fileDescriptor   mmap_args   sys_timeouts   ufs2_dinode   
dataStream   fileDescriptorStruct   mpi_mbox   sysctl_args   uPtr   
descriptorTableUnion   fileSystem   mpi_message   sysctl_entry   userFileDescriptorStruct   
devfs_devices   FileSystemAbstract   munmap_args   
  T  
+
  V  
+
devfs_info   fs   
  N  
+
taskStruct   vfs_abstract   
device   fstat_args   net   tcp_hdr   vfs_mountPoint   
device_interface   
  G  
+
netbuf   tcp_pcb   
  W  
+
device_node   gdt_descr   netconn   tcp_pcb_listen   write_args   
device_resource   gdtDescriptor   netif   tcp_seg   
  _  
+
device_t   gdtGate   nicBuffer   tcpip_msg   __sigset   
devMethodType   getdtablesize_args   nicInfo   thread   __timespec   
directoryEntry   getgid_args   
  O  
+
thread_start_param   _item_t   
directoryList   getpid_args   obreak_args   timespec   _list_t   
dirent   gettimeofday_args   ogDisplay_UbixOS   timeStruct   _UbixUser   
DiskFS   getuid_args   

A | B | C | D | E | F | G | H | I | K | L | M | N | O | P | R | S | T | U | V | W | _

+


Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/classogDisplay__UbixOS.html b/doc/html/classogDisplay__UbixOS.html new file mode 100644 index 0000000..2b60607 --- /dev/null +++ b/doc/html/classogDisplay__UbixOS.html @@ -0,0 +1,585 @@ + + +UbixOS V2: ogDisplay_UbixOS Class Reference + + + + +
+
+
+
+

ogDisplay_UbixOS Class Reference

#include <ogDisplay_UbixOS.h> +

+


Detailed Description

+ +

+ +

+Definition at line 61 of file ogDisplay_UbixOS.h. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

virtual bool ogAlias (ogSurface &, uInt32, uInt32, uInt32, uInt32)
virtual bool ogClone (ogSurface &)
virtual void ogCopyPalette (ogSurface &)
virtual bool ogCreate (uInt32, uInt32, ogPixelFmt)
 ogDisplay_UbixOS (void)
virtual bool ogLoadPalette (const char *)
virtual void ogSetPalette (uInt8, uInt8, uInt8, uInt8, uInt8)
virtual void ogSetPalette (uInt8, uInt8, uInt8, uInt8)
virtual void ogSetPalette (const ogRGBA8[])
virtual ~ogDisplay_UbixOS (void)

Protected Member Functions

uInt16 FindMode (uInt32, uInt32, uInt32)
void GetModeInfo (uInt16)
void GetVESAInfo (void)
void SetMode (uInt16)
void SetPal (void)

Protected Attributes

uInt32 activePage
ogModeInfomodeInfo
void * pages [2]
ogVESAInfoVESAInfo
uInt32 visualPage
+


Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + +
ogDisplay_UbixOS::ogDisplay_UbixOS (void   ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
virtual ogDisplay_UbixOS::~ogDisplay_UbixOS (void   )  [virtual]
+
+
+ +

+ +

+

+


Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
uInt16 ogDisplay_UbixOS::FindMode (uInt32 ,
uInt32 ,
uInt32  
) [protected]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
void ogDisplay_UbixOS::GetModeInfo (uInt16   )  [protected]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
void ogDisplay_UbixOS::GetVESAInfo (void   )  [protected]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual bool ogDisplay_UbixOS::ogAlias (ogSurface & ,
uInt32 ,
uInt32 ,
uInt32 ,
uInt32  
) [virtual]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
virtual bool ogDisplay_UbixOS::ogClone (ogSurface &   )  [virtual]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
virtual void ogDisplay_UbixOS::ogCopyPalette (ogSurface &   )  [virtual]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual bool ogDisplay_UbixOS::ogCreate (uInt32 ,
uInt32 ,
ogPixelFmt  
) [virtual]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
virtual bool ogDisplay_UbixOS::ogLoadPalette (const char *   )  [virtual]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void ogDisplay_UbixOS::ogSetPalette (uInt8 ,
uInt8 ,
uInt8 ,
uInt8 ,
uInt8  
) [virtual]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void ogDisplay_UbixOS::ogSetPalette (uInt8 ,
uInt8 ,
uInt8 ,
uInt8  
) [virtual]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
virtual void ogDisplay_UbixOS::ogSetPalette (const   ogRGBA8[]  )  [virtual]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
void ogDisplay_UbixOS::SetMode (uInt16   )  [protected]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
void ogDisplay_UbixOS::SetPal (void   )  [protected]
+
+
+ +

+ +

+

+


Field Documentation

+ +
+
+ + + + +
uInt32 ogDisplay_UbixOS::activePage [protected]
+
+
+ +

+ +

+Definition at line 64 of file ogDisplay_UbixOS.h. +

+

+ +

+
+ + + + +
ogModeInfo* ogDisplay_UbixOS::modeInfo [protected]
+
+
+ +

+ +

+Definition at line 67 of file ogDisplay_UbixOS.h. +

+

+ +

+
+ + + + +
void* ogDisplay_UbixOS::pages[2] [protected]
+
+
+ +

+ +

+Definition at line 63 of file ogDisplay_UbixOS.h. +

+

+ +

+
+ + + + +
ogVESAInfo* ogDisplay_UbixOS::VESAInfo [protected]
+
+
+ +

+ +

+Definition at line 66 of file ogDisplay_UbixOS.h. +

+

+ +

+
+ + + + +
uInt32 ogDisplay_UbixOS::visualPage [protected]
+
+
+ +

+ +

+Definition at line 65 of file ogDisplay_UbixOS.h. +

+

+


The documentation for this class was generated from the following file: +
Generated on Sun Dec 3 02:38:13 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/classogDisplay__VESA.html b/doc/html/classogDisplay__VESA.html new file mode 100644 index 0000000..ca4f0ba --- /dev/null +++ b/doc/html/classogDisplay__VESA.html @@ -0,0 +1,949 @@ + + +UbixOS V2: ogDisplay_VESA Class Reference + + + + +
+
+
+
+

ogDisplay_VESA Class Reference

#include <ogDisplay_VESA.h> +

+


Detailed Description

+ +

+ +

+Definition at line 60 of file ogDisplay_VESA.h. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

virtual bool ogAlias (ogSurface &, uInt32, uInt32, uInt32, uInt32)
virtual bool ogAvail (void)
virtual void ogClear (uInt32)
virtual bool ogClone (ogSurface &)
virtual void ogCopyLineFrom (uInt32, uInt32, void *, uInt32)
virtual void ogCopyLineTo (uInt32, uInt32, const void *, uInt32)
virtual void ogCopyPal (ogSurface &)
virtual bool ogCreate (uInt32, uInt32, ogPixelFmt)
 ogDisplay_VESA (void)
virtual uInt32 ogGetPixel (int32, int32)
virtual void * ogGetPtr (uInt32, uInt32)
virtual void ogHLine (int32, int32, int32, uInt32)
virtual bool ogLoadPal (const char *)
virtual void ogSetPixel (int32, int32, uInt32)
virtual void ogSetRGBPalette (uInt8, uInt8, uInt8, uInt8)
virtual void ogVFlip (void)
virtual void ogVLine (int32, int32, int32, uInt32)
virtual ~ogDisplay_VESA (void)

Protected Member Functions

uInt16 findMode (uInt32, uInt32, uInt32)
void getModeInfo (uInt16)
void getVESAInfo (void)
virtual uInt32 rawGetPixel (uInt32, uInt32)
virtual void rawLine (uInt32, uInt32, uInt32, uInt32, uInt32)
virtual void rawSetPixel (uInt32, uInt32, uInt32)
void setMode (uInt16)
void setPal (void)

Protected Attributes

bool InGraphics
TMode_RecModeRec
uInt16 ScreenSelector
TVESA_RecVESARec
+


Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + +
ogDisplay_VESA::ogDisplay_VESA (void   ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
virtual ogDisplay_VESA::~ogDisplay_VESA (void   )  [virtual]
+
+
+ +

+ +

+

+


Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
uInt16 ogDisplay_VESA::findMode (uInt32 ,
uInt32 ,
uInt32  
) [protected]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
void ogDisplay_VESA::getModeInfo (uInt16   )  [protected]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
void ogDisplay_VESA::getVESAInfo (void   )  [protected]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual bool ogDisplay_VESA::ogAlias (ogSurface & ,
uInt32 ,
uInt32 ,
uInt32 ,
uInt32  
) [virtual]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
virtual bool ogDisplay_VESA::ogAvail (void   )  [virtual]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
virtual void ogDisplay_VESA::ogClear (uInt32   )  [virtual]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
virtual bool ogDisplay_VESA::ogClone (ogSurface &   )  [virtual]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void ogDisplay_VESA::ogCopyLineFrom (uInt32 ,
uInt32 ,
void * ,
uInt32  
) [virtual]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void ogDisplay_VESA::ogCopyLineTo (uInt32 ,
uInt32 ,
const void * ,
uInt32  
) [virtual]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
virtual void ogDisplay_VESA::ogCopyPal (ogSurface &   )  [virtual]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual bool ogDisplay_VESA::ogCreate (uInt32 ,
uInt32 ,
ogPixelFmt  
) [virtual]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
virtual uInt32 ogDisplay_VESA::ogGetPixel (int32 ,
int32  
) [virtual]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
virtual void* ogDisplay_VESA::ogGetPtr (uInt32 ,
uInt32  
) [virtual]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void ogDisplay_VESA::ogHLine (int32 ,
int32 ,
int32 ,
uInt32  
) [virtual]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
virtual bool ogDisplay_VESA::ogLoadPal (const char *   )  [virtual]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void ogDisplay_VESA::ogSetPixel (int32 ,
int32 ,
uInt32  
) [virtual]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void ogDisplay_VESA::ogSetRGBPalette (uInt8 ,
uInt8 ,
uInt8 ,
uInt8  
) [virtual]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
virtual void ogDisplay_VESA::ogVFlip (void   )  [virtual]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void ogDisplay_VESA::ogVLine (int32 ,
int32 ,
int32 ,
uInt32  
) [virtual]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
virtual uInt32 ogDisplay_VESA::rawGetPixel (uInt32 ,
uInt32  
) [protected, virtual]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void ogDisplay_VESA::rawLine (uInt32 ,
uInt32 ,
uInt32 ,
uInt32 ,
uInt32  
) [protected, virtual]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
virtual void ogDisplay_VESA::rawSetPixel (uInt32 ,
uInt32 ,
uInt32  
) [protected, virtual]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
void ogDisplay_VESA::setMode (uInt16   )  [protected]
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
void ogDisplay_VESA::setPal (void   )  [protected]
+
+
+ +

+ +

+

+


Field Documentation

+ +
+
+ + + + +
bool ogDisplay_VESA::InGraphics [protected]
+
+
+ +

+ +

+Definition at line 65 of file ogDisplay_VESA.h. +

+

+ +

+
+ + + + +
TMode_Rec* ogDisplay_VESA::ModeRec [protected]
+
+
+ +

+ +

+Definition at line 64 of file ogDisplay_VESA.h. +

+

+ +

+
+ + + + +
uInt16 ogDisplay_VESA::ScreenSelector [protected]
+
+
+ +

+ +

+Definition at line 62 of file ogDisplay_VESA.h. +

+

+ +

+
+ + + + +
TVESA_Rec* ogDisplay_VESA::VESARec [protected]
+
+
+ +

+ +

+Definition at line 63 of file ogDisplay_VESA.h. +

+

+


The documentation for this class was generated from the following file: +
Generated on Sun Dec 3 02:38:13 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/classvfs__abstract.html b/doc/html/classvfs__abstract.html new file mode 100644 index 0000000..84f5af8 --- /dev/null +++ b/doc/html/classvfs__abstract.html @@ -0,0 +1,676 @@ + + +UbixOS V2: vfs_abstract Class Reference + + + + +
+
+
+
+

vfs_abstract Class Reference

#include <fsAbstract.h> +

+

Inheritance diagram for vfs_abstract: +

+ +UbixFS + +

Detailed Description

+ +

+ +

+Definition at line 10 of file fsAbstract.h. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

virtual int vfs_close (fileDescriptor *)
virtual int vfs_closedir (DIR *)
virtual int vfs_format (device_t *)
virtual int vfs_init (void)
virtual int vfs_mkdir (const char *, mode_t)
virtual void * vfs_mknod (const char *, mode_t)
virtual int vfs_open (const char *, fileDescriptor *, int,...)
virtual int vfs_opendir (DIR *, const char *)
virtual int vfs_purge (void)
virtual size_t vfs_read (fileDescriptor *, void *, off_t, size_t)
virtual int vfs_readdir (DIR *, struct dirent *)
virtual int vfs_rename (const char *, const char *)
virtual int vfs_rmdir (const char *)
virtual int vfs_stop (void)
virtual int vfs_sync (void)
virtual int vfs_unlink (const char *)
virtual size_t vfs_write (fileDescriptor *, void *, off_t, size_t)
virtual ~vfs_abstract (void)

Protected Attributes

device_tdevice
vfs_abstractnext
vfs_abstractprev
+


Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + +
virtual vfs_abstract::~vfs_abstract (void   )  [inline, virtual]
+
+
+ +

+ +

+Definition at line 43 of file fsAbstract.h. +

+

+


Member Function Documentation

+ +
+
+ + + + + + + + + +
virtual int vfs_abstract::vfs_close (fileDescriptor  )  [inline, virtual]
+
+
+ +

+ +

+Definition at line 18 of file fsAbstract.h. +

+

+ +

+
+ + + + + + + + + +
virtual int vfs_abstract::vfs_closedir (DIR *   )  [inline, virtual]
+
+
+ +

+ +

+Definition at line 26 of file fsAbstract.h. +

+

+ +

+
+ + + + + + + + + +
virtual int vfs_abstract::vfs_format (device_t  )  [inline, virtual]
+
+
+ +

+ +

+Reimplemented in UbixFS. +

+Definition at line 33 of file fsAbstract.h. +

+

+ +

+
+ + + + + + + + + +
virtual int vfs_abstract::vfs_init (void   )  [inline, virtual]
+
+
+ +

+ +

+Reimplemented in UbixFS. +

+Definition at line 32 of file fsAbstract.h. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
virtual int vfs_abstract::vfs_mkdir (const char * ,
mode_t  
) [inline, virtual]
+
+
+ +

+ +

+Reimplemented in UbixFS. +

+Definition at line 27 of file fsAbstract.h. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
virtual void* vfs_abstract::vfs_mknod (const char * ,
mode_t  
) [inline, virtual]
+
+
+ +

+ +

+Reimplemented in UbixFS. +

+Definition at line 34 of file fsAbstract.h. +

+References NULL. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual int vfs_abstract::vfs_open (const char * ,
fileDescriptor,
int ,
  ... 
) [inline, virtual]
+
+
+ +

+ +

+Reimplemented in UbixFS. +

+Definition at line 17 of file fsAbstract.h. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
virtual int vfs_abstract::vfs_opendir (DIR * ,
const char *  
) [inline, virtual]
+
+
+ +

+ +

+Definition at line 25 of file fsAbstract.h. +

+

+ +

+
+ + + + + + + + + +
virtual int vfs_abstract::vfs_purge (void   )  [inline, virtual]
+
+
+ +

+ +

+Definition at line 35 of file fsAbstract.h. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual size_t vfs_abstract::vfs_read (fileDescriptor,
void * ,
off_t ,
size_t  
) [inline, virtual]
+
+
+ +

+ +

+Reimplemented in UbixFS. +

+Definition at line 19 of file fsAbstract.h. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
virtual int vfs_abstract::vfs_readdir (DIR * ,
struct dirent 
) [inline, virtual]
+
+
+ +

+ +

+Definition at line 29 of file fsAbstract.h. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
virtual int vfs_abstract::vfs_rename (const char * ,
const char *  
) [inline, virtual]
+
+
+ +

+ +

+Definition at line 41 of file fsAbstract.h. +

+

+ +

+
+ + + + + + + + + +
virtual int vfs_abstract::vfs_rmdir (const char *   )  [inline, virtual]
+
+
+ +

+ +

+Definition at line 28 of file fsAbstract.h. +

+

+ +

+
+ + + + + + + + + +
virtual int vfs_abstract::vfs_stop (void   )  [inline, virtual]
+
+
+ +

+ +

+Reimplemented in UbixFS. +

+Definition at line 36 of file fsAbstract.h. +

+

+ +

+
+ + + + + + + + + +
virtual int vfs_abstract::vfs_sync (void   )  [inline, virtual]
+
+
+ +

+ +

+Reimplemented in UbixFS. +

+Definition at line 37 of file fsAbstract.h. +

+

+ +

+
+ + + + + + + + + +
virtual int vfs_abstract::vfs_unlink (const char *   )  [inline, virtual]
+
+
+ +

+ +

+Definition at line 40 of file fsAbstract.h. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual size_t vfs_abstract::vfs_write (fileDescriptor,
void * ,
off_t ,
size_t  
) [inline, virtual]
+
+
+ +

+ +

+Reimplemented in UbixFS. +

+Definition at line 21 of file fsAbstract.h. +

+

+


Field Documentation

+ +
+
+ + + + +
device_t* vfs_abstract::device [protected]
+
+
+ +

+ +

+Definition at line 14 of file fsAbstract.h. +

+

+ +

+
+ + + + +
vfs_abstract* vfs_abstract::next [protected]
+
+
+ +

+ +

+Definition at line 13 of file fsAbstract.h. +

+

+ +

+
+ + + + +
vfs_abstract* vfs_abstract::prev [protected]
+
+
+ +

+ +

+Definition at line 12 of file fsAbstract.h. +

+

+


The documentation for this class was generated from the following file: +
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/copyvirtualspace_8c-source.html b/doc/html/copyvirtualspace_8c-source.html new file mode 100644 index 0000000..9a931b3 --- /dev/null +++ b/doc/html/copyvirtualspace_8c-source.html @@ -0,0 +1,290 @@ + + +UbixOS V2: src/sys/vmm/copyvirtualspace.c Source File + + + + +
+
+
+
+ +

copyvirtualspace.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <vmm/vmm.h>
+00031 #include <sys/kern_sysctl.h>
+00032 #include <ubixos/spinlock.h>
+00033 #include <ubixos/kpanic.h>
+00034 #include <string.h>
+00035 
+00036 static spinLock_t cvsSpinLock = SPIN_LOCK_INITIALIZER;
+00037 
+00038 /************************************************************************
+00039 
+00040 Function: void *vmmCopyVirtualSpace(pidType pid);
+00041 
+00042 Description: Creates A Copy Of A Virtual Space And Set All NON Kernel
+00043              Space To COW For A Fork This Will Also Alter The Parents
+00044              VM Space To Make That COW As Well
+00045 
+00046 Notes:
+00047 
+00048 08/02/02 - Added Passing Of pidType pid So We Can Better Keep Track Of
+00049            Which Task Has Which Physical Pages
+00050 
+00051 ************************************************************************/
+00052 void           *
+00053 vmmCopyVirtualSpace(pidType pid)
+00054 {
+00055   void           *newPageDirectoryAddress = 0x0;
+00056   uInt32         *parentPageDirectory = 0x0, *newPageDirectory = 0x0;
+00057   uInt32         *parentPageTable = 0x0, *newPageTable = 0x0;
+00058   uInt32         *parentStackPage = 0x0, *newStackPage = 0x0;
+00059   uInt16          x = 0, i = 0, s = 0;
+00060 
+00061   spinLock(&cvsSpinLock);
+00062   
+00063   /* Set Address Of Parent Page Directory */
+00064   parentPageDirectory = (uInt32 *) parentPageDirAddr;
+00065   /* Allocate A New Page For The New Page Directory */
+00066   if ((newPageDirectory = (uInt32 *) vmmGetFreeKernelPage(pid,1)) == 0x0)
+00067     kpanic("Error: newPageDirectory == NULL, File: %s, Line: %i\n",__FILE__,__LINE__);
+00068     
+00069   /* Set newPageDirectoryAddress To The Newly Created Page Directories Page */
+00070   newPageDirectoryAddress = (void *)vmm_getPhysicalAddr((uInt32) newPageDirectory);
+00071   
+00072   /* First Set Up A Flushed Page Directory */
+00073   memset(newPageDirectory,0x0,0x1000);
+00074 
+00075   /* Map The Top 1GB Region Of The VM Space */
+00076   for (x = 768; x < pageEntries; x++) {
+00077     newPageDirectory[x] = parentPageDirectory[x];
+00078     }
+00079     
+00080   /*
+00081    * Now For The Fun Stuff For Page Tables 1-766 We Must Map These And Set
+00082    * The Permissions On Every Mapped Pages To COW This Will Conserve Memory
+00083    * Because The Two VM Spaces Will Be Sharing Some Pages
+00084    */
+00085   for (x = 0x1; x <= 766; x++) {
+00086     /* If Page Table Exists Map It */
+00087     if (parentPageDirectory[x] != 0) {
+00088       /* Set Parent  To Propper Page Table */
+00089       parentPageTable = (uInt32 *) (tablesBaseAddress + (0x1000 * x));
+00090       /* Allocate A New Page Table */
+00091       if ((newPageTable = (uInt32 *) vmmGetFreeKernelPage(pid,1)) == 0x0)
+00092         kpanic("Error: newPageTable == NULL, File: %s, Line: %i\n",__FILE__,__LINE__);
+00093 
+00094       /* Set Parent And New Pages To COW */
+00095       for (i = 0; i < pageEntries; i++) {
+00096       
+00097         /* If Page Is Mapped */
+00098         if ((parentPageTable[i] & 0xFFFFF000) != 0x0) {
+00099           /* Check To See If Its A Stack Page */
+00100           if (((uInt32) parentPageTable[i] & PAGE_STACK) == PAGE_STACK) {
+00101             /* Alloc A New Page For This Stack Page */
+00102             if ((newStackPage = (uInt32 *) vmmGetFreeKernelPage(pid,1)) == 0x0)
+00103               kpanic("Error: newStackPage == NULL, File: %s, Line: %i\n",__FILE__,__LINE__);
+00104               
+00105             /* Set Pointer To Parents Stack Page */
+00106             parentStackPage = (uInt32 *) (((1024 * 4096) * x) + (4096 * i));
+00107             
+00108             /* Copy The Tack Byte For Byte (I Should Find A Faster Way) */
+00109             for (s = 0x0; s < pageEntries; s++) {
+00110               newStackPage[s] = parentStackPage[s];
+00111               }
+00112             /* Insert New Stack Into Page Table */
+00113             newPageTable[i] = (vmm_getPhysicalAddr((uInt32) newStackPage) | PAGE_DEFAULT | PAGE_STACK);
+00114             /* Unmap From Kernel Space */
+00115             vmmUnmapPage((uInt32) newStackPage, 1);
+00116             }
+00117           else {
+00118             /* Set Page To COW In Parent And Child Space */
+00119             newPageTable[i] = (((uInt32) parentPageTable[i] & 0xFFFFF000) | (PAGE_DEFAULT | PAGE_COW));
+00120             /* Increment The COW Counter For This Page */
+00121             if (((uInt32) parentPageTable[i] & PAGE_COW) == PAGE_COW) {
+00122               adjustCowCounter(((uInt32) parentPageTable[i] & 0xFFFFF000), 1);
+00123               }
+00124             else {
+00125               adjustCowCounter(((uInt32) parentPageTable[i] & 0xFFFFF000), 2);
+00126               parentPageTable[i] = newPageTable[i];
+00127               }
+00128             }
+00129           }
+00130         else {
+00131           newPageTable[i] = (uInt32) 0x0;
+00132           }
+00133         }
+00134 
+00135       /* Put New Page Table Into New Page Directory */
+00136       newPageDirectory[x] = (vmm_getPhysicalAddr((uInt32) newPageTable) | PAGE_DEFAULT);
+00137       /* Unmap Page From Kernel Space But Keep It Marked As Not Avail */
+00138       vmmUnmapPage((uInt32) newPageTable, 1);
+00139     } else {
+00140       newPageDirectory[x] = (uInt32) 0x0;
+00141     }
+00142   }
+00143   /*
+00144    * Allocate A New Page For The The First Page Table Where We Will Map The
+00145    * Lower Region
+00146    */
+00147   if ((newPageTable = (uInt32 *) vmmGetFreeKernelPage(pid,1)) == 0x0)
+00148     kpanic("Error: newPageTable == NULL, File: %s, Line: %i\n",__FILE__,__LINE__);
+00149     
+00150   /* Flush The Page From Garbage In Memory */
+00151   memset(newPageTable,0x0,0x1000);
+00152 
+00153   /* Map This Into The Page Directory */
+00154   newPageDirectory[0] = (vmm_getPhysicalAddr((uInt32) newPageTable) | PAGE_DEFAULT);
+00155   /* Set Address Of Parents Page Table */
+00156   parentPageTable = (uInt32 *) tablesBaseAddress;
+00157   /* Map The First 1MB Worth Of Pages */
+00158   for (x = 0; x < (pageEntries / 4); x++) {
+00159     newPageTable[x] = parentPageTable[x];
+00160   }
+00161   /* Map The Next 3MB Worth Of Pages But Make Them COW */
+00162   for (x = (pageEntries / 4) + 1; x < pageEntries; x++) {
+00163     /* If Page Is Avaiable Map It */
+00164     if ((parentPageTable[x] & 0xFFFFF000) != 0x0) {
+00165       /* Set Pages To COW */
+00166       newPageTable[x] = (((uInt32) parentPageTable[x] & 0xFFFFF000) | (PAGE_DEFAULT | PAGE_COW));
+00167       /* Increment The COW Counter For This Page */
+00168       if (((uInt32) parentPageTable[x] & PAGE_COW) == PAGE_COW) {
+00169         adjustCowCounter(((uInt32) parentPageTable[x] & 0xFFFFF000), 1);
+00170       } else {
+00171         adjustCowCounter(((uInt32) parentPageTable[x] & 0xFFFFF000), 2);
+00172         parentPageTable[x] = newPageTable[x];
+00173       }
+00174     } else {
+00175       newPageTable[x] = (uInt32) 0x0;
+00176     }
+00177   }
+00178   /* Set Virtual Mapping For Page Directory */
+00179   newPageTable[256] = (vmm_getPhysicalAddr((uInt32) newPageDirectory) | PAGE_DEFAULT);
+00180 
+00181   /*
+00182    * Now The Fun Stuff Build The Initial Virtual Page Space So We Don't Have
+00183    * To Worry About Mapping Them In Later How Ever I'm Concerned This May
+00184    * Become A Security Issue
+00185    */
+00186   /* First Lets Unmap The Previously Allocated Page Table */
+00187   vmmUnmapPage((uInt32) newPageTable, 1);
+00188   /* Allocate A New Page Table */
+00189   if ((newPageTable = (uInt32 *) vmmGetFreeKernelPage(pid,1)) == 0x0)
+00190     kpanic("Error: newPageTable == NULL, File: %s, Line: %i\n",__FILE__,__LINE__);
+00191   /* First Set Our Page Directory To Contain This */
+00192   newPageDirectory[767] = vmm_getPhysicalAddr((uInt32) newPageTable) | PAGE_DEFAULT;
+00193   /* Now Lets Build The Page Table */
+00194   for (x = 0; x < pageEntries; x++) {
+00195     newPageTable[x] = newPageDirectory[x];
+00196   }
+00197   /* Now We Are Done So Lets Unmap This Page */
+00198   vmmUnmapPage((uInt32) newPageTable, 1);
+00199   /* Now We Are Done With The Page Directory So Lets Unmap That Too */
+00200   vmmUnmapPage((uInt32) newPageDirectory, 1);
+00201   
+00202   spinUnlock(&cvsSpinLock);
+00203   
+00204   /* Return Physical Address Of Page Directory */
+00205   return (newPageDirectoryAddress);
+00206 }
+00207 
+00208 /***
+00209  $Log$
+00210  Revision 1.3  2006/12/01 05:12:35  reddawg
+00211  We're almost there... :)
+00212 
+00213  Revision 1.2  2006/11/06 19:10:12  reddawg
+00214  Lots Of Updates... Still having issues with brk();
+00215 
+00216  Revision 1.1.1.1  2006/06/01 12:46:13  reddawg
+00217  ubix2
+00218 
+00219  Revision 1.2  2005/10/12 00:13:38  reddawg
+00220  Removed
+00221 
+00222  Revision 1.1.1.1  2005/09/26 17:24:49  reddawg
+00223  no message
+00224 
+00225  Revision 1.7  2004/07/28 15:05:43  reddawg
+00226  Major:
+00227    Pages now have strict security enforcement.
+00228    Many null dereferences have been resolved.
+00229    When apps loaded permissions set for pages rw and ro
+00230 
+00231  Revision 1.6  2004/07/26 19:15:49  reddawg
+00232  test code, fixes and the like
+00233 
+00234  Revision 1.5  2004/07/25 06:04:00  reddawg
+00235  Last of my fixes for the morning
+00236 
+00237  Revision 1.4  2004/07/20 22:29:55  reddawg
+00238  assert: remade assert
+00239 
+00240  Revision 1.3  2004/07/19 01:58:12  reddawg
+00241  vmmCopyVirtualSpace: cleaned up one full page memory leak we were still using old sysID over pid
+00242 
+00243  Revision 1.2  2004/06/15 12:35:05  reddawg
+00244  Cleaned Up
+00245 
+00246  Revision 1.1.1.1  2004/04/15 12:06:51  reddawg
+00247  UbixOS v1.0
+00248 
+00249  Revision 1.14  2004/04/13 16:36:34  reddawg
+00250  Changed our copyright, it is all now under a BSD-Style license
+00251 
+00252  END
+00253  ***/
+

Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/copyvirtualspace_8c.html b/doc/html/copyvirtualspace_8c.html new file mode 100644 index 0000000..556c432 --- /dev/null +++ b/doc/html/copyvirtualspace_8c.html @@ -0,0 +1,102 @@ + + +UbixOS V2: src/sys/vmm/copyvirtualspace.c File Reference + + + + +
+
+
+
+ +

copyvirtualspace.c File Reference

+

+#include <vmm/vmm.h>
+#include <sys/kern_sysctl.h>
+#include <ubixos/spinlock.h>
+#include <ubixos/kpanic.h>
+#include <string.h>
+ +

+Go to the source code of this file. + + + + + + + +

Functions

void * vmmCopyVirtualSpace (pidType pid)

Variables

static spinLock_t cvsSpinLock = SPIN_LOCK_INITIALIZER
+


Function Documentation

+ +
+
+ + + + + + + + + +
void* vmmCopyVirtualSpace (pidType  pid  ) 
+
+ +

+


Variable Documentation

+ +
+
+ + + + +
spinLock_t cvsSpinLock = SPIN_LOCK_INITIALIZER [static]
+
+
+ +

+ +

+Definition at line 36 of file copyvirtualspace.c. +

+Referenced by vmmCopyVirtualSpace(). +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/cpu_8h-source.html b/doc/html/cpu_8h-source.html new file mode 100644 index 0000000..f2377fe --- /dev/null +++ b/doc/html/cpu_8h-source.html @@ -0,0 +1,79 @@ + + +UbixOS V2: src/sys/include/net/arch/cpu.h Source File + + + + +
+
+
+
+ +

cpu.h

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 #ifndef __ARCH_CPU_H__
+00036 #define __ARCH_CPU_H__
+00037 
+00038 #ifndef BYTE_ORDER
+00039 #define BYTE_ORDER LITTLE_ENDIAN
+00040 #endif /* BYTE_ORDER */
+00041 
+00042 #endif /* __ARCH_CPU_H__ */
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/cpu_8h.html b/doc/html/cpu_8h.html new file mode 100644 index 0000000..ffd251b --- /dev/null +++ b/doc/html/cpu_8h.html @@ -0,0 +1,65 @@ + + +UbixOS V2: src/sys/include/net/arch/cpu.h File Reference + + + + +
+
+
+
+ +

cpu.h File Reference

+

+ +

+Go to the source code of this file. + + + + +

Defines

#define BYTE_ORDER   LITTLE_ENDIAN
+


Define Documentation

+ +
+
+ + + + +
#define BYTE_ORDER   LITTLE_ENDIAN
+
+
+ +

+ +

+Definition at line 39 of file cpu.h. +

+

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/createvirtualspace_8c-source.html b/doc/html/createvirtualspace_8c-source.html new file mode 100644 index 0000000..b019601 --- /dev/null +++ b/doc/html/createvirtualspace_8c-source.html @@ -0,0 +1,185 @@ + + +UbixOS V2: src/sys/vmm/createvirtualspace.c Source File + + + + +
+
+
+
+ +

createvirtualspace.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005 Redistribution and use in source and binary forms, with or without modification, are
+00006 permitted provided that the following conditions are met:
+00007 
+00008 Redistributions of source code must retain the above copyright notice, this list of
+00009 conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010 form must reproduce the above copyright notice, this list of conditions, the following
+00011 disclaimer and the list of authors in the documentation and/or other materials provided
+00012 with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013 contributors may be used to endorse or promote products derived from this software
+00014 without specific prior written permission.
+00015 
+00016 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019 THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021 OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023 TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Log$
+00027  Revision 1.1.1.1  2006/06/01 12:46:13  reddawg
+00028  ubix2
+00029 
+00030  Revision 1.2  2005/10/12 00:13:38  reddawg
+00031  Removed
+00032 
+00033  Revision 1.1.1.1  2005/09/26 17:24:50  reddawg
+00034  no message
+00035 
+00036  Revision 1.2  2004/07/28 15:05:43  reddawg
+00037  Major:
+00038    Pages now have strict security enforcement.
+00039    Many null dereferences have been resolved.
+00040    When apps loaded permissions set for pages rw and ro
+00041 
+00042  Revision 1.1.1.1  2004/04/15 12:06:51  reddawg
+00043  UbixOS v1.0
+00044 
+00045  Revision 1.8  2004/04/13 16:36:34  reddawg
+00046  Changed our copyright, it is all now under a BSD-Style license
+00047 
+00048 
+00049 
+00050  $Id$
+00051 
+00052 *****************************************************************************************/
+00053 
+00054 #include <vmm/vmm.h>
+00055 
+00056 
+00057 /************************************************************************
+00058 
+00059 Function: void *vmmCreateVirtualSpace(pid_t);
+00060 Description: Creates A Virtual Space For A New Task
+00061 Notes:
+00062 
+00063 07/30/02 - This Is Going To Create A New VM Space However Its Going To
+00064            Share The Same Top 1GB Space With The Kernels VM And Lower
+00065            1MB Of VM Space With The Kernel
+00066 
+00067 07/30/02 - Note This Is Going To Get The Top 1Gig And Lower 1MB Region
+00068            From The Currently Loaded Page Directory This Is Safe Because
+00069            All VM Spaces Will Share These Regions
+00070 
+00071 07/30/02 - Note I Realized A Mistake The First Page Table Will Need To Be
+00072            A Copy But The Page Tables For The Top 1GB Will Not Reason For
+00073            This Is That We Just Share The First 1MB In The First Page Table
+00074            So We Will Just Share Physical Pages.
+00075 
+00076 08/02/02 - Added Passing Of pid_t pid For Better Tracking Of Who Has Which
+00077            Set Of Pages
+00078 
+00079 ************************************************************************/
+00080 void           *
+00081 vmmCreateVirtualSpace(pid_t pid)
+00082 {
+00083   void           *newPageDirectoryAddress = 0x0;
+00084   uInt32         *parentPageDirectory = 0x0, *newPageDirectory = 0x0;
+00085   uInt32         *parentPageTable = 0x0, *newPageTable = 0x0;
+00086   int             x = 0;
+00087 
+00088   /* Set Address Of Parent Page Directory */
+00089   parentPageDirectory = (uInt32 *) parentPageDirAddr;
+00090   /* Allocate A New Page For The New Page Directory */
+00091   newPageDirectory = (uInt32 *) vmmGetFreePage(pid);
+00092   /* Set newPageDirectoryAddress To The Newly Created Page Directories Page */
+00093   newPageDirectoryAddress = (void *)vmm_getPhysicalAddr((uInt32) newPageDirectory);
+00094   /* First Set Up A Flushed Page Directory */
+00095   for (x = 0; x < pageEntries; x++) {
+00096     (uInt32) newPageDirectory[x] = (uInt32) 0x0;
+00097   }
+00098   /* Map The Top 1GB Region Of The VM Space */
+00099   for (x = 768; x < pageEntries; x++) {
+00100     newPageDirectory[x] = parentPageDirectory[x];
+00101   }
+00102   /*
+00103    * Allocate A New Page For The The First Page Table Where We Will Map The
+00104    * Lower Region
+00105    */
+00106   newPageTable = (uInt32 *) vmmGetFreePage(pid);
+00107   /* Flush The Page From Garbage In Memory */
+00108   for (x = 0; x < pageEntries; x++) {
+00109     (uInt32) newPageTable[x] = (uInt32) 0x0;
+00110   }
+00111   /* Map This Into The Page Directory */
+00112   newPageDirectory[0] = (vmm_getPhysicalAddr((uInt32) newPageTable) | PAGE_DEFAULT);
+00113   /* Set Address Of Parents Page Table */
+00114   parentPageTable = (uInt32 *) tablesBaseAddress;
+00115   /* Map The First 1MB Worth Of Pages */
+00116   for (x = 0; x < (pageEntries / 4); x++) {
+00117     newPageTable[x] = parentPageTable[x];
+00118   }
+00119   /* Set Virtual Mapping For Page Directory */
+00120   newPageTable[256] = (vmm_getPhysicalAddr((uInt32) newPageDirectory) | PAGE_DEFAULT);
+00121 
+00122   /*
+00123    * Now The Fun Stuff Build The Initial Virtual Page Space So We Don't Have
+00124    * To Worry About Mapping Them In Later How Ever I'm Concerned This May
+00125    * Become A Security Issue
+00126    */
+00127   /* First Lets Unmap The Previously Allocated Page Table */
+00128   vmmUnmapPage((uInt32) newPageTable, 1);
+00129   /* Allocate A New Page Table */
+00130   newPageTable = (uInt32 *) vmmGetFreePage(pid);
+00131   /* First Set Our Page Directory To Contain This */
+00132   newPageDirectory[767] = vmm_getPhysicalAddr((uInt32) newPageTable) | PAGE_DEFAULT;
+00133   /* Now Lets Build The Page Table */
+00134   for (x = 0; x < pageEntries; x++) {
+00135     newPageTable[x] = newPageDirectory[x];
+00136   }
+00137   /* Now We Are Done So Lets Unmap This Page */
+00138   vmmUnmapPage((uInt32) newPageTable, 1);
+00139   /* Now We Are Done With The Page Directory So Lets Unmap That Too */
+00140   vmmUnmapPage((uInt32) newPageDirectory, 1);
+00141   /* Return Physical Address Of Page Directory */
+00142   return (newPageDirectoryAddress);
+00143 }
+00144 
+00145 /***
+00146  END
+00147  ***/
+00148 
+

Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/createvirtualspace_8c.html b/doc/html/createvirtualspace_8c.html new file mode 100644 index 0000000..3a014fc --- /dev/null +++ b/doc/html/createvirtualspace_8c.html @@ -0,0 +1,75 @@ + + +UbixOS V2: src/sys/vmm/createvirtualspace.c File Reference + + + + +
+
+
+
+ +

createvirtualspace.c File Reference

+

+#include <vmm/vmm.h>
+ +

+Go to the source code of this file. + + + + +

Functions

void * vmmCreateVirtualSpace (pid_t pid)
+


Function Documentation

+ +
+
+ + + + + + + + + +
void* vmmCreateVirtualSpace (pid_t  pid  ) 
+
+ +

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/debug_8h-source.html b/doc/html/debug_8h-source.html new file mode 100644 index 0000000..5aa051c --- /dev/null +++ b/doc/html/debug_8h-source.html @@ -0,0 +1,176 @@ + + +UbixOS V2: src/sys/include/net/debug.h Source File + + + + +
+
+
+
+ +

debug.h

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 #ifndef __LWIP_DEBUG_H__
+00036 #define __LWIP_DEBUG_H__
+00037 
+00038 #ifdef LWIP_DEBUG
+00039 
+00040 #define ASSERT(x,y) if(!(y)) {printf("Assertion \"%s\" failed at line %d in %s\n", \
+00041                                      x, __LINE__, __FILE__); fflush(NULL); abort();}
+00042 
+00043 /* These defines control the amount of debugging output: */
+00044 #define MEM_TRACKING
+00045 
+00046 #define DEMO_DEBUG       1
+00047 
+00048 #define ARP_DEBUG        0
+00049 
+00050 #define NETIF_DEBUG      1
+00051 #define PBUF_DEBUG       0
+00052 #define DELIF_DEBUG      0
+00053 #define DROPIF_DEBUG     0
+00054 #define TUNIF_DEBUG      0
+00055 #define UNIXIF_DEBUG     0
+00056 #define TAPIF_DEBUG      0
+00057 
+00058 #define API_LIB_DEBUG    0
+00059 #define API_MSG_DEBUG    0
+00060 #define SOCKETS_DEBUG    1
+00061 #define ICMP_DEBUG       0
+00062 #define INET_DEBUG       0
+00063 #define IP_DEBUG         0
+00064 #define IP_REASS_DEBUG   1
+00065 #define MEM_DEBUG        0
+00066 #define MEMP_DEBUG       0
+00067 #define SYS_DEBUG        0
+00068 #define TCP_DEBUG        0
+00069 #define TCP_INPUT_DEBUG  0
+00070 #define TCP_FR_DEBUG     0
+00071 #define TCP_RTO_DEBUG    0
+00072 #define TCP_REXMIT_DEBUG 0
+00073 #define TCP_CWND_DEBUG   0
+00074 #define TCP_WND_DEBUG    0
+00075 #define TCP_OUTPUT_DEBUG 0
+00076 #define TCP_RST_DEBUG    0
+00077 #define TCP_QLEN_DEBUG   0
+00078 #define UDP_DEBUG        0
+00079 #define TCPIP_DEBUG      0
+00080 #define TCPDUMP_DEBUG    0
+00081 #define DHCP_DEBUG       1
+00082 
+00083 #include <stdio.h>
+00084 #define DEBUGF(debug, x) do { if(debug){ printf x; } } while(0)
+00085 
+00086 
+00087 #else /* LWIP_DEBUG */
+00088 
+00089 /* DEBUG is not defined, so we define null macros for ASSERT and DEBUGF */
+00090 
+00091 #define ASSERT(x,y)
+00092 #define DEBUGF(debug, x)
+00093 
+00094 /* And we define those to be zero: */
+00095 
+00096 #define DEMO_DEBUG       0
+00097 #define ARP_DEBUG        0
+00098 #define NETIF_DEBUG      0
+00099 #define PBUF_DEBUG       0
+00100 #define DELIF_DEBUG      0
+00101 #define DROPIF_DEBUG     0
+00102 #define TUNIF_DEBUG      0
+00103 #define UNIXIF_DEBUG     0
+00104 #define TAPIF_DEBUG      0
+00105 #define API_LIB_DEBUG    0
+00106 #define API_MSG_DEBUG    0
+00107 #define SOCKETS_DEBUG    0
+00108 #define ICMP_DEBUG       0
+00109 #define INET_DEBUG       0
+00110 #define IP_DEBUG         0
+00111 #define IP_REASS_DEBUG   0
+00112 #define MEM_DEBUG        0
+00113 #define MEMP_DEBUG       0
+00114 #define SYS_DEBUG        0
+00115 #define TCP_DEBUG        0
+00116 #define TCP_INPUT_DEBUG  0
+00117 #define TCP_FR_DEBUG     0
+00118 #define TCP_RTO_DEBUG    0
+00119 #define TCP_REXMIT_DEBUG 0
+00120 #define TCP_CWND_DEBUG   0
+00121 #define TCP_WND_DEBUG    0
+00122 #define TCP_OUTPUT_DEBUG 0
+00123 #define TCP_RST_DEBUG    0
+00124 #define TCP_QLEN_DEBUG   0
+00125 #define UDP_DEBUG        0
+00126 #define TCPIP_DEBUG      0
+00127 #define TCPDUMP_DEBUG    0
+00128 #define DHCP_DEBUG       0
+00129 
+00130 #endif /* LWIP_DEBUG */
+00131 
+00132 
+00133 #endif /* __LWIP_DEBUG_H__ */
+00134 
+00135 
+00136 
+00137 
+00138 
+00139 
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/debug_8h.html b/doc/html/debug_8h.html new file mode 100644 index 0000000..e8c927b --- /dev/null +++ b/doc/html/debug_8h.html @@ -0,0 +1,737 @@ + + +UbixOS V2: src/sys/include/net/debug.h File Reference + + + + +
+
+
+
+ +

debug.h File Reference

+

+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Defines

#define API_LIB_DEBUG   0
#define API_MSG_DEBUG   0
#define ARP_DEBUG   0
#define ASSERT(x, y)
#define DEBUGF(debug, x)
#define DELIF_DEBUG   0
#define DEMO_DEBUG   0
#define DHCP_DEBUG   0
#define DROPIF_DEBUG   0
#define ICMP_DEBUG   0
#define INET_DEBUG   0
#define IP_DEBUG   0
#define IP_REASS_DEBUG   0
#define MEM_DEBUG   0
#define MEMP_DEBUG   0
#define NETIF_DEBUG   0
#define PBUF_DEBUG   0
#define SOCKETS_DEBUG   0
#define SYS_DEBUG   0
#define TAPIF_DEBUG   0
#define TCP_CWND_DEBUG   0
#define TCP_DEBUG   0
#define TCP_FR_DEBUG   0
#define TCP_INPUT_DEBUG   0
#define TCP_OUTPUT_DEBUG   0
#define TCP_QLEN_DEBUG   0
#define TCP_REXMIT_DEBUG   0
#define TCP_RST_DEBUG   0
#define TCP_RTO_DEBUG   0
#define TCP_WND_DEBUG   0
#define TCPDUMP_DEBUG   0
#define TCPIP_DEBUG   0
#define TUNIF_DEBUG   0
#define UDP_DEBUG   0
#define UNIXIF_DEBUG   0
+


Define Documentation

+ +
+
+ + + + +
#define API_LIB_DEBUG   0
+
+
+ +

+ +

+Definition at line 105 of file debug.h. +

+Referenced by netconn_recv(), netconn_send(), and netconn_write(). +

+

+ +

+
+ + + + +
#define API_MSG_DEBUG   0
+
+
+ +

+ +

+Definition at line 106 of file debug.h. +

+Referenced by do_accept(), and do_listen(). +

+

+ +

+
+ + + + +
#define ARP_DEBUG   0
+
+
+ +

+ +

+Definition at line 97 of file debug.h. +

+Referenced by arp_ip_input(), and arp_tmr(). +

+

+ +

+
+ + + + + + + + + + + + +
#define ASSERT (x,
 ) 
+
+
+ +

+ +

+Definition at line 91 of file debug.h. +

+

+ +

+
+ + + + + + + + + + + + +
#define DEBUGF (debug,
 ) 
+
+ +

+ +

+
+ + + + +
#define DELIF_DEBUG   0
+
+
+ +

+ +

+Definition at line 100 of file debug.h. +

+

+ +

+
+ + + + +
#define DEMO_DEBUG   0
+
+
+ +

+ +

+Definition at line 96 of file debug.h. +

+

+ +

+
+ + + + +
#define DHCP_DEBUG   0
+
+
+ +

+ +

+Definition at line 128 of file debug.h. +

+

+ +

+
+ + + + +
#define DROPIF_DEBUG   0
+
+
+ +

+ +

+Definition at line 101 of file debug.h. +

+

+ +

+
+ + + + +
#define ICMP_DEBUG   0
+
+
+ +

+ +

+Definition at line 108 of file debug.h. +

+

+ +

+
+ + + + +
#define INET_DEBUG   0
+
+
+ +

+ +

+Definition at line 109 of file debug.h. +

+

+ +

+
+ + + + +
#define IP_DEBUG   0
+
+
+ +

+ +

+Definition at line 110 of file debug.h. +

+

+ +

+
+ + + + +
#define IP_REASS_DEBUG   0
+
+
+ +

+ +

+Definition at line 111 of file debug.h. +

+

+ +

+
+ + + + +
#define MEM_DEBUG   0
+
+
+ +

+ +

+Definition at line 112 of file debug.h. +

+

+ +

+
+ + + + +
#define MEMP_DEBUG   0
+
+
+ +

+ +

+Definition at line 113 of file debug.h. +

+

+ +

+
+ + + + +
#define NETIF_DEBUG   0
+
+
+ +

+ +

+Definition at line 98 of file debug.h. +

+

+ +

+
+ + + + +
#define PBUF_DEBUG   0
+
+
+ +

+ +

+Definition at line 99 of file debug.h. +

+

+ +

+
+ + + + +
#define SOCKETS_DEBUG   0
+
+
+ +

+ +

+Definition at line 107 of file debug.h. +

+Referenced by lwip_close(), lwip_send(), lwip_socket(), and lwip_write(). +

+

+ +

+
+ + + + +
#define SYS_DEBUG   0
+
+
+ +

+ +

+Definition at line 114 of file debug.h. +

+

+ +

+
+ + + + +
#define TAPIF_DEBUG   0
+
+
+ +

+ +

+Definition at line 104 of file debug.h. +

+

+ +

+
+ + + + +
#define TCP_CWND_DEBUG   0
+
+
+ +

+ +

+Definition at line 120 of file debug.h. +

+

+ +

+
+ + + + +
#define TCP_DEBUG   0
+
+
+ +

+ +

+Definition at line 115 of file debug.h. +

+

+ +

+
+ + + + +
#define TCP_FR_DEBUG   0
+
+
+ +

+ +

+Definition at line 117 of file debug.h. +

+

+ +

+
+ + + + +
#define TCP_INPUT_DEBUG   0
+
+
+ +

+ +

+Definition at line 116 of file debug.h. +

+

+ +

+
+ + + + +
#define TCP_OUTPUT_DEBUG   0
+
+
+ +

+ +

+Definition at line 122 of file debug.h. +

+

+ +

+
+ + + + +
#define TCP_QLEN_DEBUG   0
+
+
+ +

+ +

+Definition at line 124 of file debug.h. +

+

+ +

+
+ + + + +
#define TCP_REXMIT_DEBUG   0
+
+
+ +

+ +

+Definition at line 119 of file debug.h. +

+

+ +

+
+ + + + +
#define TCP_RST_DEBUG   0
+
+
+ +

+ +

+Definition at line 123 of file debug.h. +

+

+ +

+
+ + + + +
#define TCP_RTO_DEBUG   0
+
+
+ +

+ +

+Definition at line 118 of file debug.h. +

+

+ +

+
+ + + + +
#define TCP_WND_DEBUG   0
+
+
+ +

+ +

+Definition at line 121 of file debug.h. +

+

+ +

+
+ + + + +
#define TCPDUMP_DEBUG   0
+
+
+ +

+ +

+Definition at line 127 of file debug.h. +

+

+ +

+
+ + + + +
#define TCPIP_DEBUG   0
+
+
+ +

+ +

+Definition at line 126 of file debug.h. +

+

+ +

+
+ + + + +
#define TUNIF_DEBUG   0
+
+
+ +

+ +

+Definition at line 102 of file debug.h. +

+

+ +

+
+ + + + +
#define UDP_DEBUG   0
+
+
+ +

+ +

+Definition at line 125 of file debug.h. +

+

+ +

+
+ + + + +
#define UNIXIF_DEBUG   0
+
+
+ +

+ +

+Definition at line 103 of file debug.h. +

+

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/def_8h-source.html b/doc/html/def_8h-source.html new file mode 100644 index 0000000..8e868d4 --- /dev/null +++ b/doc/html/def_8h-source.html @@ -0,0 +1,84 @@ + + +UbixOS V2: src/sys/include/net/def.h Source File + + + + +
+
+
+
+ +

def.h

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 #ifndef __LWIP_DEF_H__
+00036 #define __LWIP_DEF_H__
+00037 
+00038 #define UMAX(a, b)      ((a) > (b) ? (a) : (b))
+00039 
+00040 #ifndef NULL
+00041 #define NULL ((void *)0)
+00042 #endif
+00043 
+00044 #include "arch/lib.h"
+00045 
+00046 #endif /* __LWIP_DEF_H__ */
+00047 
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/def_8h.html b/doc/html/def_8h.html new file mode 100644 index 0000000..f751b98 --- /dev/null +++ b/doc/html/def_8h.html @@ -0,0 +1,95 @@ + + +UbixOS V2: src/sys/include/net/def.h File Reference + + + + +
+
+
+
+ +

def.h File Reference

+

+#include "arch/lib.h"
+ +

+Go to the source code of this file. + + + + + + +

Defines

#define NULL   ((void *)0)
#define UMAX(a, b)   ((a) > (b) ? (a) : (b))
+


Define Documentation

+ +
+
+ + + + +
#define NULL   ((void *)0)
+
+
+ +

+ +

+Definition at line 41 of file def.h. +

+Referenced by __assert(), accept_function(), alloc_socket(), bTree::allocEmptyNode(), arp_arp_input(), arp_lookup(), arp_query(), arp_timer(), bot_init(), bot_thread(), bTree::bTree(), current_thread(), bTree::Delete(), devfs_init(), device_add(), device_remove(), do_accept(), do_bind(), do_close(), do_connect(), do_connected(), do_delconn(), do_listen(), do_recv(), do_send(), do_write(), err_tcp(), ethernetif_init(), ethernetif_input(), ethernetif_output(), fclose(), bTree::findLeafNode(), fopen(), UbixFS::get8FreeBlocks(), get_socket(), bTree::GetFirstNode(), UbixFS::getFreeBlock(), inet_aton(), bTree::Info(), bTree::inodeSearch(), bTree::Insert(), bTree::insertNode(), kmain(), kmod_add(), kpanic(), kprint(), bTree::Load(), loopif_output(), low_level_input(), low_level_output(), lwip_accept(), lwip_bind(), lwip_close(), lwip_connect(), lwip_listen(), lwip_recv(), lwip_recvfrom(), lwip_send(), lwip_sendto(), lwip_socket(), lwip_write(), main(), UbixFS::mknod(), netbuf_alloc(), netbuf_copy_partial(), netbuf_data(), netbuf_delete(), netbuf_free(), netbuf_new(), netbuf_next(), netbuf_ref(), netconn_accept(), netconn_bind(), netconn_close(), netconn_connect(), netconn_delete(), netconn_listen(), netconn_new(), netconn_recv(), netconn_send(), netconn_write(), openFileUbixFS(), poll_tcp(), bTree::Print(), UbixFS::printFreeBlockList(), DiskFS::read(), readUbixFS(), recv_tcp(), recv_udp(), bTree::Save(), bTree::saveNode(), sent_tcp(), UbixFS::setFreeBlock(), shell_init(), shell_thread(), bTree::splitNode(), strstr(), strtok_r(), strtol(), sys_arch_mbox_fetch(), sys_mbox_free(), sys_sem_new_(), sys_thread_new(), sysFclose(), sysFopen(), sysFread(), sysFseek(), sysMkDir(), tcpdump(), tcpdump_init(), tcpip_apimsg(), tcpip_init(), tcpip_input(), tcpip_tcp_timer(), tcpip_thread(), bTree::treeSearch(), UbixFS::UbixFS(), ubixfs_cacheAdd(), ubixfs_cacheDelete(), ubixfs_cacheFind(), ubixfs_cacheNew(), ubixfs_findName(), ubixfs_init(), ubixfs_loadData(), udpecho_init(), udpecho_thread(), ufs_init(), unlink(), bTree::Verify(), vfs_findMount(), UbixFS::vfs_format(), UbixFS::vfs_init(), UbixFS::vfs_mkdir(), vfs_abstract::vfs_mknod(), vfs_mount(), UbixFS::vfs_open(), UbixFS::vfs_read(), UbixFS::vfs_stop(), UbixFS::vfs_sync(), UbixFS::vfs_write(), vfsRegisterFS(), DiskFS::write(), writeFileByte(), and writeUbixFS(). +

+

+ +

+
+ + + + + + + + + + + + +
#define UMAX (a,
 )    ((a) > (b) ? (a) : (b))
+
+
+ +

+ +

+Definition at line 38 of file def.h. +

+

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/devfs_8c-source.html b/doc/html/devfs_8c-source.html new file mode 100644 index 0000000..4683176 --- /dev/null +++ b/doc/html/devfs_8c-source.html @@ -0,0 +1,272 @@ + + +UbixOS V2: src/sys/devfs/devfs.c Source File + + + + +
+
+
+
+ +

devfs.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <devfs/devfs.h>
+00031 #include <vfs/vfs.h>
+00032 #include <sys/device.h>
+00033 #include <ubixos/types.h>
+00034 #include <ubixos/spinlock.h>
+00035 #include <ubixos/kpanic.h>
+00036 #include <lib/kmalloc.h>
+00037 #include <lib/string.h>
+00038 #include <lib/kprintf.h>
+00039 
+00040 /* Spinlock for devfs we should start converting to sem/mutex */
+00041 static spinLock_t devfsSpinLock = SPIN_LOCK_INITIALIZER;
+00042 
+00043 /* Length of dev list */
+00044 static int devfs_len = 0x0;
+00045 
+00046 static void devfs_initialize(vfs_mountPoint_t *mp) {
+00047   struct devfs_info *fsInfo = 0x0;
+00048   
+00049   /* Allocate memory for the fsInfo */
+00050   if ((mp->fsInfo = (struct devfs_info *)kmalloc(sizeof(struct devfs_info))) == 0x0)
+00051     kpanic("devfs: failed to allocate memor\n");
+00052   
+00053   fsInfo = mp->fsInfo;
+00054   fsInfo->deviceList = 0x0;
+00055 
+00056   //Return
+00057   return;
+00058   }
+00059 
+00060 static int devfs_open(char *file,fileDescriptor *fd) {
+00061   struct devfs_info    *fsInfo  = fd->mp->fsInfo;
+00062   struct devfs_devices *tmpDev = 0x0;
+00063   struct device_node   *device = 0x0;
+00064 
+00065   spinLock(&devfsSpinLock);
+00066 
+00067   if (strcmp(file,"/") == 0x0) {
+00068     fd->start = -1;
+00069     fd->size  = devfs_len;
+00070     spinUnlock(&devfsSpinLock);
+00071     return(0x1);
+00072     }
+00073   if (file[0] == '/')
+00074     file++;  
+00075   for (tmpDev = fsInfo->deviceList;tmpDev != 0x0;tmpDev = tmpDev->next) {
+00076     if (strcmp(tmpDev->devName,file) == 0x0) {
+00077       switch ((fd->mode & 0x3)) {
+00078         case 0:
+00079         case 1:
+00080           device = device_find(tmpDev->devMajor,tmpDev->devMinor);
+00081           (void *)fd->start = tmpDev;
+00082           fd->size  = device->devInfo->size;
+00083           break;
+00084         default:
+00085           kprintf("Invalid File Mode\n");
+00086           spinUnlock(&devfsSpinLock);
+00087           return(-1);
+00088           break;
+00089           }
+00090         spinUnlock(&devfsSpinLock);
+00091         return(0x1);
+00092       }
+00093     }
+00094   spinUnlock(&devfsSpinLock);
+00095   return(0x0);
+00096   }
+00097 
+00098 /************************************************************************
+00099 
+00100 Function: int readDevFS(fileDescriptor *fd,char *data,long offset,long size)
+00101 Description: Read File Into Data
+00102 Notes:
+00103 
+00104 ************************************************************************/
+00105 static int devfs_read(fileDescriptor *fd,char *data,long offset,long size) {
+00106   int i = 0x0,x = 0x0;
+00107   uInt32 sectors = 0x0;
+00108   uInt16 diff    = 0x0;
+00109   struct device_node   *device = 0x0;
+00110   struct devfs_devices *tmpDev = (void *)fd->start;
+00111 
+00112   if (tmpDev == -1) {
+00113     kprintf("Hi Ubie [%i]!!!\n", size);
+00114     for (i = 0;i < size;i++) {
+00115       data[i] = 'a';
+00116       fd->buffer[i] = 'a';
+00117       }
+00118     data[size - 1] = '\n';
+00119     return(size);
+00120     }
+00121   
+00122   device = device_find(tmpDev->devMajor,tmpDev->devMinor);
+00123 
+00124   sectors = ((size+511)/512);
+00125   diff    = (offset - ((offset/512)*512));
+00126 
+00127   for (i=0x0;i<sectors;i++) {
+00128     device->devInfo->read(device->devInfo->info,fd->buffer,i + (offset/512),1);
+00129     for (x=0x0;x<(size - (i*512));x++) {
+00130       if (diff > 0) {
+00131         data[x] = fd->buffer[x + diff];
+00132         }
+00133       else {
+00134         data[x] = fd->buffer[x];
+00135         }
+00136       }
+00137     diff  = 0x0;
+00138     data += 512;
+00139     }
+00140   
+00141   return(size);
+00142   }
+00143 
+00144 /************************************************************************
+00145 
+00146 Function: int writeDevFS(fileDescriptor *fd,char *data,long offset,long size)
+00147 Description: Write Data Into File
+00148 Notes:
+00149 
+00150 ************************************************************************/
+00151 static int devfs_write(fileDescriptor *fd,char *data,long offset,long size) {
+00152   int i = 0x0,x = 0x0;
+00153   struct device_node   *device = 0x0;
+00154   struct devfs_devices *tmpDev = (void *)fd->start;
+00155 
+00156   device = device_find(tmpDev->devMajor,tmpDev->devMinor);
+00157   for (i=0x0;i<((size+511)/512);i++) {
+00158     device->devInfo->read(device->devInfo->info,fd->buffer,i + (offset/512),1);
+00159     for (x=0x0;((x < 512) && ((x + (i * 512))  < size));x++) {
+00160       fd->buffer[x] = data[x];
+00161       }
+00162     device->devInfo->write(device->devInfo->info,fd->buffer,i + (offset/512),1);
+00163     data += 512;
+00164     }
+00165   return(size);
+00166   }
+00167 
+00168   
+00169 int devfs_makeNode(char *name,uInt8 type,uInt16 major,uInt16 minor) {
+00170   vfs_mountPoint_t  *mp     = 0x0;
+00171   struct devfs_info    *fsInfo = 0x0;
+00172   struct devfs_devices *tmpDev = 0x0;
+00173 
+00174   spinLock(&devfsSpinLock);
+00175   
+00176   mp = vfs_findMount("devfs");
+00177   
+00178   if (mp == 0x0) {
+00179     kprintf("Error: Can't Find Mount Point\n");
+00180     spinUnlock(&devfsSpinLock);
+00181     return(-1);
+00182     }
+00183     
+00184   fsInfo = mp->fsInfo;
+00185 
+00186   tmpDev = (struct devfs_devices *)kmalloc(sizeof(struct devfs_devices));
+00187 
+00188   tmpDev->devType  = type;
+00189   tmpDev->devMajor = major;
+00190   tmpDev->devMinor = minor;
+00191   sprintf(tmpDev->devName,name);
+00192   devfs_len += strlen(name) + 1;
+00193 
+00194   tmpDev->next = fsInfo->deviceList;
+00195   tmpDev->prev = 0x0;
+00196   if (fsInfo->deviceList != 0x0) {
+00197     fsInfo->deviceList->prev = tmpDev;
+00198     }
+00199     
+00200   fsInfo->deviceList       = tmpDev;
+00201   
+00202   spinUnlock(&devfsSpinLock);
+00203   return(0x0);
+00204   }  
+00205   
+00206 int devfs_init() {
+00207   /* Build our devfs struct */
+00208   struct fileSystem devFS =
+00209    {NULL,                         /* prev        */
+00210     NULL,                         /* next        */
+00211     (void *)devfs_initialize,     /* vfsInitFS   */
+00212     (void *)devfs_read,           /* vfsRead     */
+00213     (void *)devfs_write,          /* vfsWrite    */
+00214     (void *)devfs_open,           /* vfsOpenFile */
+00215     NULL,                         /* vfsUnlink   */
+00216     NULL,                         /* vfsMakeDir  */
+00217     NULL,                         /* vfsRemDir   */
+00218     NULL,                         /* vfsSync     */
+00219     1                             /* vfsType     */
+00220    }; /* devFS */
+00221 
+00222     if (vfsRegisterFS(devFS) != 0x0) {
+00223     //sysErr(systemErr,"Unable To Enable DevFS");
+00224     return(0x1);
+00225     }
+00226   /* Mount our devfs this will build the devfs container node */
+00227   vfs_mount(0x0,0x0,0x0,0x1,"devfs","rw"); // Mount Device File System
+00228   
+00229   /* Return */
+00230   return(0x0);
+00231   }
+00232 
+00233 /***
+00234  END
+00235  ***/
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/devfs_8c.html b/doc/html/devfs_8c.html new file mode 100644 index 0000000..ca7dbb7 --- /dev/null +++ b/doc/html/devfs_8c.html @@ -0,0 +1,336 @@ + + +UbixOS V2: src/sys/devfs/devfs.c File Reference + + + + +
+
+
+
+ +

devfs.c File Reference

+

+#include <devfs/devfs.h>
+#include <vfs/vfs.h>
+#include <sys/device.h>
+#include <ubixos/types.h>
+#include <ubixos/spinlock.h>
+#include <ubixos/kpanic.h>
+#include <lib/kmalloc.h>
+#include <lib/string.h>
+#include <lib/kprintf.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + +

Functions

int devfs_init ()
static void devfs_initialize (vfs_mountPoint_t *mp)
int devfs_makeNode (char *name, uInt8 type, uInt16 major, uInt16 minor)
static int devfs_open (char *file, fileDescriptor *fd)
static int devfs_read (fileDescriptor *fd, char *data, long offset, long size)
static int devfs_write (fileDescriptor *fd, char *data, long offset, long size)

Variables

static int devfs_len = 0x0
static spinLock_t devfsSpinLock = SPIN_LOCK_INITIALIZER
+


Function Documentation

+ +
+
+ + + + + + + + +
int devfs_init (  ) 
+
+
+ +

+ +

+Definition at line 206 of file devfs.c. +

+References devfs_initialize(), devfs_open(), devfs_read(), devfs_write(), NULL, vfs_mount(), vfsRegisterFS(), and x1. +

+

+ +

+
+ + + + + + + + + +
static void devfs_initialize (vfs_mountPoint_t mp  )  [static]
+
+
+ +

+ +

+Definition at line 46 of file devfs.c. +

+References devfs_info::deviceList, vfs_mountPoint::fsInfo, kmalloc(), and kpanic(). +

+Referenced by devfs_init(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int devfs_makeNode (char *  name,
uInt8  type,
uInt16  major,
uInt16  minor 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
static int devfs_open (char *  file,
fileDescriptor fd 
) [static]
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static int devfs_read (fileDescriptor fd,
char *  data,
long  offset,
long  size 
) [static]
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static int devfs_write (fileDescriptor fd,
char *  data,
long  offset,
long  size 
) [static]
+
+ +

+


Variable Documentation

+ +
+
+ + + + +
int devfs_len = 0x0 [static]
+
+
+ +

+ +

+Definition at line 44 of file devfs.c. +

+Referenced by devfs_makeNode(), and devfs_open(). +

+

+ +

+
+ + + + +
spinLock_t devfsSpinLock = SPIN_LOCK_INITIALIZER [static]
+
+
+ +

+ +

+Definition at line 41 of file devfs.c. +

+Referenced by devfs_makeNode(), and devfs_open(). +

+

+


Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/devfs_8h-source.html b/doc/html/devfs_8h-source.html new file mode 100644 index 0000000..2bb982f --- /dev/null +++ b/doc/html/devfs_8h-source.html @@ -0,0 +1,129 @@ + + +UbixOS V2: src/sys/include/devfs/devfs.h Source File + + + + +
+
+
+
+ +

devfs.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _DEVFS_H
+00031 #define _DEVFS_H
+00032 
+00033 #include <ubixos/types.h>
+00034 #include <vfs/file.h>
+00035 
+00036 struct devfs_devices {
+00037   struct devfs_devices *next;
+00038   struct devfs_devices *prev;
+00039   uInt8  devType;
+00040   uInt16 devMajor;
+00041   uInt16 devMinor;
+00042   char   devName[32];
+00043   };
+00044 
+00045 struct devfs_info {
+00046   struct devfs_devices *deviceList;
+00047   };
+00048 
+00049 int devfs_init();
+00050 int devfs_makeNode(char *name,uInt8 type,uInt16 major,uInt16 minor);
+00051 /*
+00052 int devfs_open(char *file,fileDescriptor *fd);
+00053 void devFSInit(struct mountPoints *mp);
+00054 int devfs_read(fileDescriptor *fd,char *data,long offset,long size);
+00055 int devfs_write(fileDescriptor *fd,char *data,long offset,long size);
+00056 */
+00057 
+00058 #endif
+00059 
+00060 /***
+00061  $Log$
+00062  Revision 1.1.1.1  2006/06/01 12:46:13  reddawg
+00063  ubix2
+00064 
+00065  Revision 1.2  2005/10/12 00:13:36  reddawg
+00066  Removed
+00067 
+00068  Revision 1.1.1.1  2005/09/26 17:23:38  reddawg
+00069  no message
+00070 
+00071  Revision 1.5  2004/07/21 10:02:09  reddawg
+00072  devfs: renamed functions
+00073  device system: renamed functions
+00074  fdc: fixed a few potential bugs and cleaned up some unused variables
+00075  strol: fixed definition
+00076  endtask: made it print out freepage debug info
+00077  kmalloc: fixed a huge memory leak we had some unhandled descriptor insertion so some descriptors were lost
+00078  ld: fixed a pointer conversion
+00079  file: cleaned up a few unused variables
+00080  sched: broke task deletion
+00081  kprintf: fixed ogPrintf definition
+00082 
+00083  Revision 1.4  2004/07/14 12:17:52  reddawg
+00084  devfs: devFSEnable to devfs_init
+00085  Changed Startup Routines
+00086 
+00087  Revision 1.3  2004/05/21 14:54:41  reddawg
+00088  Cleaned up
+00089 
+00090 
+00091  END
+00092  ***/
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/devfs_8h.html b/doc/html/devfs_8h.html new file mode 100644 index 0000000..9b08bf9 --- /dev/null +++ b/doc/html/devfs_8h.html @@ -0,0 +1,127 @@ + + +UbixOS V2: src/sys/include/devfs/devfs.h File Reference + + + + +
+
+
+
+ +

devfs.h File Reference

+

+#include <ubixos/types.h>
+#include <vfs/file.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + +

Data Structures

struct  devfs_devices
struct  devfs_info

Functions

int devfs_init ()
int devfs_makeNode (char *name, uInt8 type, uInt16 major, uInt16 minor)
+


Function Documentation

+ +
+
+ + + + + + + + +
int devfs_init (  ) 
+
+
+ +

+ +

+Definition at line 206 of file devfs.c. +

+References devfs_initialize(), devfs_open(), devfs_read(), devfs_write(), NULL, vfs_mount(), vfsRegisterFS(), and x1. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int devfs_makeNode (char *  name,
uInt8  type,
uInt16  major,
uInt16  minor 
)
+
+ +

+


Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/device_8c-source.html b/doc/html/device_8c-source.html new file mode 100644 index 0000000..f832433 --- /dev/null +++ b/doc/html/device_8c-source.html @@ -0,0 +1,187 @@ + + +UbixOS V2: src/sys/sys/device.c Source File + + + + +
+
+
+
+ +

device.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2005 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <sys/device.h>
+00031 #include <ubixos/spinlock.h>
+00032 #include <lib/kmalloc.h>
+00033 #include <lib/kprintf.h>
+00034 #include <assert.h>
+00035 
+00036 /* Linked list of drivers loaded in the system accessable by the subsystem only */
+00037 static struct device_node *devices = 0x0;
+00038 static spinLock_t deviceSpinLock = SPIN_LOCK_INITIALIZER;
+00039 
+00040 /*****************************************************************************************
+00041 
+00042  Function: int deviceAdd(int minor,char type,struct device_interface *devInfo);
+00043 
+00044  Description: This will add a device to the system
+00045 
+00046  Notes: 
+00047 
+00048  05/19/2004 - Improving Upon the spec
+00049 
+00050 *****************************************************************************************/
+00051 int device_add(int minor,char type,struct device_interface *devInfo) {
+00052   struct device_node *tmpDev = 0x0;
+00053   
+00054   
+00055   tmpDev = (struct device_node *)kmalloc(sizeof(struct device_node));
+00056   if(tmpDev == NULL)
+00057         kprintf("Error Adding Device: memory failure\n");
+00058 
+00059   tmpDev->prev    = 0x0;
+00060   tmpDev->minor   = minor;
+00061   tmpDev->type    = type;
+00062   tmpDev->devInfo = devInfo;
+00063 
+00064   spinLock(&deviceSpinLock);
+00065   tmpDev->next    = devices;
+00066   devices         = tmpDev;
+00067   spinUnlock(&deviceSpinLock);
+00068 
+00069   if (tmpDev->devInfo->initialized == 0x0)
+00070     return(tmpDev->devInfo->init(tmpDev));
+00071   else
+00072     return(0x0);
+00073   }
+00074 
+00075 /*****************************************************************************************
+00076 
+00077  Function: struct device_node *deviceFind(int major,int minor);
+00078 
+00079  Description: This will find a device based on major minor
+00080 
+00081  Notes: 
+00082 
+00083  05/19/2004 - Improving Upon the spec
+00084 
+00085 *****************************************************************************************/
+00086 struct device_node *device_find(int major,int minor) {
+00087   struct device_node *tmpDev = 0x0;
+00088  
+00089   spinLock(&deviceSpinLock);
+00090 
+00091   for (tmpDev = devices;tmpDev;tmpDev=tmpDev->next) {
+00092     if ((tmpDev->devInfo->major == major) && (tmpDev->minor == minor)) {
+00093       spinUnlock(&deviceSpinLock);
+00094       return(tmpDev);
+00095       }
+00096     }
+00097 
+00098   spinUnlock(&deviceSpinLock);
+00099   return(0x0);
+00100   }  
+00101 
+00102 
+00103 /********************************************************************************************
+00104 
+00105 Function: int deviceRemove(struct *device_node);
+00106 
+00107 Description: This will remove a device based on it's pointer
+00108 
+00109 *********************************************************************************************/
+00110 int device_remove(struct device_node *deviceToDelete)
+00111 {
+00112 struct device_node *current, *previous;
+00113 
+00114 
+00115 current = devices;
+00116 previous=NULL;
+00117 spinLock(&deviceSpinLock);
+00118                while(current != NULL)
+00119                {
+00120                   if(current==deviceToDelete) break;
+00121                   else
+00122                   {
+00123                      previous = current;
+00124                      current = current->next;
+00125                   }
+00126                }
+00127                if(current == NULL) 
+00128                 {
+00129                   spinUnlock(&deviceSpinLock);
+00130                   return 1;
+00131                 }
+00132                else
+00133                {
+00134                   if(current == devices) 
+00135                         devices = devices->next;
+00136                   else 
+00137                         previous->next = current->next;
+00138                   kfree(current);
+00139                   spinUnlock(&deviceSpinLock);
+00140                   return 1;
+00141                }
+00142 
+00143   spinUnlock(&deviceSpinLock);
+00144 return 0x0;
+00145 }
+00146 
+00147 
+00148 /***
+00149  END
+00150  ***/
+

Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/device_8c.html b/doc/html/device_8c.html new file mode 100644 index 0000000..a8b8417 --- /dev/null +++ b/doc/html/device_8c.html @@ -0,0 +1,201 @@ + + +UbixOS V2: src/sys/sys/device.c File Reference + + + + +
+
+
+
+ +

device.c File Reference

+

+#include <sys/device.h>
+#include <ubixos/spinlock.h>
+#include <lib/kmalloc.h>
+#include <lib/kprintf.h>
+#include <assert.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + +

Functions

int device_add (int minor, char type, struct device_interface *devInfo)
device_nodedevice_find (int major, int minor)
int device_remove (struct device_node *deviceToDelete)

Variables

static struct device_nodedevices = 0x0
static spinLock_t deviceSpinLock = SPIN_LOCK_INITIALIZER
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int device_add (int  minor,
char  type,
struct device_interface devInfo 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
struct device_node* device_find (int  major,
int  minor 
)
+
+ +

+ +

+
+ + + + + + + + + +
int device_remove (struct device_node deviceToDelete  ) 
+
+
+ +

+ +

+Definition at line 110 of file device.c. +

+References devices, deviceSpinLock, kfree(), device_node::next, NULL, spinLock(), and spinUnlock(). +

+

+


Variable Documentation

+ +
+
+ + + + +
struct device_node* devices = 0x0 [static]
+
+
+ +

+ +

+Definition at line 37 of file device.c. +

+Referenced by device_add(), device_find(), and device_remove(). +

+

+ +

+
+ + + + +
spinLock_t deviceSpinLock = SPIN_LOCK_INITIALIZER [static]
+
+
+ +

+ +

+Definition at line 38 of file device.c. +

+Referenced by device_add(), device_find(), and device_remove(). +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/device_8old_8h-source.html b/doc/html/device_8old_8h-source.html new file mode 100644 index 0000000..18cff15 --- /dev/null +++ b/doc/html/device_8old_8h-source.html @@ -0,0 +1,95 @@ + + +UbixOS V2: src/sys/include/sys/device.old.h Source File + + + + +
+
+
+
+ +

device.old.h

Go to the documentation of this file.
00001 /**************************************************************************************
+00002  Copyright (c) 2002 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+00006 
+00007 Redistributions of source code must retain the above copyright notice, this list of conditions, the following disclaimer and the list of authors.
+00008 Redistributions in binary form must reproduce the above copyright notice, this list of conditions, the following disclaimer and the list of authors
+00009 in the documentation and/or other materials provided with the distribution. Neither the name of the UbixOS Project nor the names of its
+00010 contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+00011 
+00012 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
+00013 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+00014 PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+00015 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+00016 GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+00017 OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+00018 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00019 
+00020  $Id$
+00021 
+00022 **************************************************************************************/
+00023 
+00024 #ifndef _DEVICE_H
+00025 #define _DEVICE_H
+00026 
+00027 #include <ubixos/types.h>
+00028 
+00029 struct device {
+00030   struct net *net;
+00031   uInt16 ioAddr;
+00032   uInt32 irq;
+00033   struct ei_device *priv;
+00034   uInt32 mtu;
+00035   };
+00036 
+00037 struct net {
+00038   char mac[6];
+00039   char broadcast[6];
+00040   };
+00041 
+00042 struct ei_device {
+00043   int txStartPage;
+00044   int rxStartPage;
+00045   int stopPage;
+00046   int currentPage;
+00047   uInt16 word16;
+00048   uInt32 pingPong;
+00049   int tx1;
+00050   int tx2;
+00051   };
+00052 
+00053 #endif
+00054 
+00055 /***
+00056  END
+00057  ***/
+00058 
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/device_8old_8h.html b/doc/html/device_8old_8h.html new file mode 100644 index 0000000..a6854c5 --- /dev/null +++ b/doc/html/device_8old_8h.html @@ -0,0 +1,52 @@ + + +UbixOS V2: src/sys/include/sys/device.old.h File Reference + + + + +
+
+
+
+ +

device.old.h File Reference

+

+#include <ubixos/types.h>
+ +

+Go to the source code of this file. + + + + + + + + +

Data Structures

struct  device
struct  ei_device
struct  net
+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dirCache_8c-source.html b/doc/html/dirCache_8c-source.html new file mode 100644 index 0000000..4a2412e --- /dev/null +++ b/doc/html/dirCache_8c-source.html @@ -0,0 +1,470 @@ + + +UbixOS V2: src/sys/ubixfs/dirCache.c Source File + + + + +
+
+
+
+ +

dirCache.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005 Redistribution and use in source and binary forms, with or without modification, are
+00006 permitted provided that the following conditions are met:
+00007 
+00008 Redistributions of source code must retain the above copyright notice, this list of
+00009 conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010 form must reproduce the above copyright notice, this list of conditions, the following
+00011 disclaimer and the list of authors in the documentation and/or other materials provided
+00012 with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013 contributors may be used to endorse or promote products derived from this software
+00014 without specific prior written permission.
+00015 
+00016 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019 THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021 OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023 TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026 $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <assert.h>
+00031 #include <ubixfs/dirCache.h>
+00032 #include <ubixfs/ubixfs.h>
+00033 #include <lib/kmalloc.h>
+00034 #include <lib/kprintf.h>
+00035 #include <lib/string.h>
+00036 
+00037 #include <ubixos/spinlock.h>
+00038 
+00039 static spinLock_t dca_spinLock = SPIN_LOCK_INITIALIZER;
+00040 
+00041 static
+00042 struct directoryEntry *
+00043 ubixfs_findName(struct directoryEntry * dirList, uInt32 size, char * name) {
+00044   unsigned int i;
+00045 
+00046   if (dirList == NULL || name == NULL) return NULL;
+00047   //UBU kprintf("dirList: [0x%X],name: [0x%X]\n",dirList,name);
+00048   for (i = 0; i < (size / sizeof(struct directoryEntry)) ; i++) {
+00049     if (strcmp(dirList[i].fileName, name) == 0) return &dirList[i];
+00050   } /* for */
+00051   return NULL;
+00052 } /* ubixfs_findName */
+00053 
+00054 struct cacheNode *
+00055 ubixfs_cacheFind(struct cacheNode * head, char * name) {
+00056   struct cacheNode * tmp = head;
+00057   struct directoryEntry * dirList = NULL;
+00058   unsigned int i = 0x0;
+00059   char dirName[256];
+00060   char * nextDir = NULL;
+00061 /* kprintf("looking for %s\n", name);  */
+00062 assert(name);
+00063 assert(head);
+00064 assert(*name);
+00065   spinLock(&dca_spinLock);
+00066   spinUnlock(&dca_spinLock);
+00067   if (name == NULL || head == NULL) return NULL;
+00068   if (*name == '\0') return NULL;
+00069 
+00070   /* 
+00071    * walk down the tree recursively until we find the node we're looking
+00072    * for
+00073    */
+00074   i = 0;
+00075   while (name[i] != '\0' && name[i] != '/' && i < sizeof(dirName)) {
+00076     dirName[i] = name[i];
+00077     i++;
+00078   } /* while */
+00079   assert(i < sizeof(dirName));
+00080   if (i == sizeof(dirName)) return NULL;
+00081 
+00082   if (i == 0) dirName[i++] = '/';
+00083 
+00084   dirName[i] = '\0';
+00085   
+00086   nextDir = &name[i];
+00087   if (*nextDir == '/') nextDir++;
+00088 
+00089   /* 
+00090    * nextDir points to the next dir
+00091    * name points to a null terminated directory name
+00092    * if nextDir isn't null, then make sure that this dir is present
+00093    */
+00094 /* kprintf("nextdir: %s  -- dirName: %s\n", nextDir, dirName); */
+00095   if (*nextDir != '\0') {
+00096     while (tmp != NULL) {
+00097       //UBU kprintf("tmp->name: [0x%X],dirName: [0x%X]\n",tmp->name,dirName);
+00098       if (strcmp(tmp->name, dirName) == 0) {
+00099 
+00100         if ((*tmp->attributes & typeFile) == typeFile 
+00101             || tmp->fileListHead == NULL) {
+00102 
+00103           /* if we're here, then there are no subdirs cached to look through */
+00104           dirList = ubixfs_findName((struct directoryEntry *)head->info,
+00105                                     *head->size, nextDir);
+00106           if (dirList == NULL) return NULL;
+00107 /* kprintf("creating new node %s", dirList->fileName); */
+00108           tmp = ubixfs_cacheAdd(tmp, ubixfs_cacheNew(dirList->fileName));
+00109           tmp->attributes = &dirList->attributes;
+00110           tmp->permissions = &dirList->permissions;
+00111           tmp->size = &dirList->size;
+00112 /* kprintf("   size: %d\n", *tmp->size); */
+00113           tmp->startCluster = &dirList->startCluster;
+00114           tmp->present = 0;
+00115           return tmp;
+00116         } else {
+00117           return ubixfs_cacheFind(tmp->fileListHead, nextDir);
+00118         }
+00119       } /* if */
+00120       tmp = tmp->next;
+00121     } /* while */
+00122     /* it wasn't present, return NULL */
+00123     return NULL;
+00124   } /* if */ 
+00125 
+00126   /*
+00127    * if nextDir was null, then we're at the bottom level. Look for the
+00128    * dir listing here 
+00129    */
+00130   while (tmp != NULL) {
+00131 
+00132     assert(tmp->name);
+00133     assert(name);
+00134 /* don't forget to check to see if it's a directory */
+00135     //UBU kprintf("tmpName: [0x%X], name: [0x%X]\n",tmp->name,name);
+00136     if (strcmp(tmp->name, name) == 0) {
+00137 
+00138       /* 
+00139        * we found the node. Move it to the front of the list 
+00140        * (if it isn't already)
+00141        */
+00142 #if 0
+00143       assert(tmp->parent);
+00144       if (tmp != tmp->parent->fileListHead) {
+00145 
+00146         /* if we're the tail, point the tail to our prev */
+00147         if (tmp == tmp->parent->fileListTail) {
+00148           tmp->parent->fileListTail = tmp->prev;
+00149         } /* if */
+00150 
+00151         if (tmp->next != NULL) tmp->next->prev = tmp->prev;
+00152         if (tmp->prev != NULL) tmp->prev->next = tmp->next;
+00153         tmp->next = tmp->parent->fileListHead;
+00154         tmp->prev = NULL;
+00155         tmp->parent->fileListHead = tmp;
+00156       } /* if */
+00157 #endif
+00158       return tmp;
+00159     } /* if */
+00160     tmp = tmp->next;
+00161   } /* while */
+00162     /* if we're here, then one level of the dir isn't cached */
+00163 
+00164   tmp = head->parent;
+00165   assert(tmp);
+00166   assert(tmp->info);
+00167   dirList = ubixfs_findName((struct directoryEntry *)tmp->info, 
+00168                             *tmp->size, name);
+00169   if (dirList == NULL) return NULL;
+00170 /* kprintf("creating new node/size %s/%d", dirList->fileName, dirList->size);*/
+00171   tmp = ubixfs_cacheAdd(tmp, ubixfs_cacheNew(dirList->fileName));
+00172   tmp->attributes = &dirList->attributes;
+00173   tmp->permissions = &dirList->permissions;
+00174   tmp->size = &dirList->size;
+00175 /* kprintf("   size: %d\n", *tmp->size); */
+00176   tmp->startCluster = &dirList->startCluster;
+00177   tmp->present = 0;
+00178   return tmp;
+00179 #if 0
+00180   return NULL;  /* couldn't find it */
+00181 #endif
+00182 } /* ubixfs_cacheFind */
+00183 
+00184 struct cacheNode * 
+00185 ubixfs_cacheNew(const char * name) {
+00186   struct cacheNode * tmp = kmalloc(sizeof(struct cacheNode));
+00187   assert(tmp);
+00188   tmp->parent = tmp;
+00189   tmp->prev = tmp->next = tmp->fileListHead = tmp->fileListTail = NULL;
+00190   tmp->info = NULL;
+00191   tmp->size = NULL;
+00192   tmp->present = tmp->dirty = 0;
+00193   tmp->startCluster = NULL;
+00194   tmp->attributes = NULL;
+00195   tmp->permissions = NULL;
+00196   tmp->name = (char *)kmalloc(strlen(name)+1);
+00197   strcpy(tmp->name, name);
+00198   return tmp;
+00199 } /* ubixfs_cacheNew */
+00200 
+00201 void
+00202 ubixfs_cacheDelete(struct cacheNode ** head) {
+00203   struct cacheNode * tmp = NULL;
+00204   struct cacheNode * del = NULL;
+00205   
+00206   if (head == NULL) return;
+00207   if (*head == NULL) return;
+00208 
+00209   tmp = *head;
+00210   while (tmp != NULL) {
+00211     /* if there are any child nodes, delete them first */
+00212 
+00213     /* 
+00214      * the following commented out ``if'' statement is redundant, since it 
+00215      * will be caught with the above checks
+00216      */
+00217     /* if (tmp->fileListHead != NULL) */
+00218     ubixfs_cacheDelete(&tmp->fileListHead);
+00219 
+00220     kfree(tmp->info);
+00221     kfree(tmp->name);
+00222     del = tmp;
+00223     tmp = tmp->next;
+00224     kfree(del);
+00225   } /* while */
+00226   *head = NULL;
+00227   return;
+00228 } /* deleteNode */
+00229 #if 0
+00230 void
+00231 addNode(struct cacheNode ** node, struct cacheNode * newNode) {
+00232   if (node == NULL) return;
+00233   newNode->next = *node;
+00234   if (*node != NULL) (*node)->prev = newNode;
+00235   newNode->prev = NULL;
+00236   *node = newNode;
+00237   return;
+00238 } /* addNode */
+00239 #endif
+00240 
+00241 struct cacheNode *
+00242 ubixfs_cacheAdd(struct cacheNode *node, struct cacheNode * newNode) {
+00243   struct cacheNode * tmp;
+00244  
+00245   assert(node);
+00246   spinLock(&dca_spinLock);
+00247   newNode->parent = node;
+00248   newNode->next = node->fileListHead;
+00249   newNode->prev = NULL;
+00250   if (node->fileListHead == NULL) 
+00251     node->fileListTail = newNode;
+00252   else
+00253     node->fileListHead->prev = newNode;
+00254 
+00255   node->fileListHead = newNode;
+00256   tmp = node->fileListHead;
+00257   spinUnlock(&dca_spinLock);
+00258   return tmp;
+00259 } /* ubixfs_cacheAdd */
+00260 
+00261 /***
+00262  $Log$
+00263  Revision 1.1.1.1  2006/06/01 12:46:17  reddawg
+00264  ubix2
+00265 
+00266  Revision 1.2  2005/10/12 00:13:37  reddawg
+00267  Removed
+00268 
+00269  Revision 1.1.1.1  2005/09/26 17:24:40  reddawg
+00270  no message
+00271 
+00272  Revision 1.30  2004/08/14 11:23:02  reddawg
+00273  Changes
+00274 
+00275  Revision 1.29  2004/08/09 12:58:05  reddawg
+00276  let me know when you got the surce
+00277 
+00278  Revision 1.28  2004/08/01 17:58:39  flameshadow
+00279  chg: fixed string allocation bug in ubixfs_cacheNew()
+00280 
+00281  Revision 1.27  2004/07/28 17:24:13  flameshadow
+00282  chg: no comment
+00283 
+00284  Revision 1.26  2004/07/28 17:07:29  flameshadow
+00285  chg: re-added moving cached nodes to the front of the list when found
+00286  add: added an assert() in ubixfs.c
+00287 
+00288  Revision 1.25  2004/07/27 19:24:31  flameshadow
+00289  chg: reduced the number of debugging statements in the kernel.
+00290 
+00291  Revision 1.24  2004/07/27 12:02:01  reddawg
+00292  chg: fixed marks bug readFile did a lookup which is why it looked like it was loopping so much
+00293 
+00294  Revision 1.23  2004/07/27 09:05:43  flameshadow
+00295  chg: fixed file not found bug. Still can't find looping issue
+00296 
+00297  Revision 1.22  2004/07/27 04:05:20  flameshadow
+00298  chg: kinda fixed it. Added bunches of debug info
+00299 
+00300  Revision 1.21  2004/07/25 22:21:52  flameshadow
+00301  chg: re-enabled kprintf() in ubixfs_cacheFind()
+00302 
+00303  Revision 1.20  2004/07/24 17:19:24  flameshadow
+00304  chg: Temporarily disabled the moving of the found cache node to the front
+00305       of the list. It seems to cause problems later (race condition, possibly)
+00306 
+00307  Revision 1.19  2004/07/22 23:01:51  reddawg
+00308  Ok checking in before I sleep
+00309 
+00310  Revision 1.18  2004/07/22 19:54:50  flameshadow
+00311  chg: works now. Thanx ubu
+00312 
+00313  Revision 1.17  2004/07/22 19:01:59  flameshadow
+00314  chg: more directory and file caching
+00315 
+00316  Revision 1.16  2004/07/22 16:34:32  flameshadow
+00317  add: file and dir caching kinda work
+00318 
+00319  Revision 1.15  2004/07/21 22:43:18  flameshadow
+00320  one more try
+00321 
+00322  Revision 1.14  2004/07/21 22:42:25  flameshadow
+00323  try it now
+00324 
+00325  Revision 1.13  2004/07/21 22:40:27  flameshadow
+00326  weird
+00327 
+00328  Revision 1.12  2004/07/21 22:18:37  flameshadow
+00329  chg: renamed subDirsHead/Tail members of cacheNode to fileListHead/Tail
+00330 
+00331  Revision 1.11  2004/07/21 22:12:22  flameshadow
+00332  add: attributes tag in cacheNode
+00333  add: setting of attributes in ubixfx_cacheNew() and ubixfs_cacheFind()
+00334 
+00335  Revision 1.10  2004/07/21 22:07:18  flameshadow
+00336  chg: renamed caching functions (again)
+00337 
+00338  Revision 1.9  2004/07/21 22:00:04  flameshadow
+00339  chg: ubixfws_dirCacheAdd now returns a pointer to the node it added
+00340  chg: minor fix in ubixfs_dirCacheFind()
+00341 
+00342  Revision 1.6  2004/07/21 14:43:14  flameshadow
+00343  add: added cwc (current working container) to the osInfo strut
+00344 
+00345  Revision 1.5  2004/07/20 19:21:30  reddawg
+00346  You like leaving out $Log$
+00347  You like leaving out Revision 1.1.1.1  2006/06/01 12:46:17  reddawg
+00348  You like leaving out ubix2
+00349  You like leaving out
+00350  You like leaving out Revision 1.2  2005/10/12 00:13:37  reddawg
+00351  You like leaving out Removed
+00352  You like leaving out
+00353  You like leaving out Revision 1.1.1.1  2005/09/26 17:24:40  reddawg
+00354  You like leaving out no message
+00355  You like leaving out
+00356  You like leaving out Revision 1.30  2004/08/14 11:23:02  reddawg
+00357  You like leaving out Changes
+00358  You like leaving out
+00359  You like leaving out Revision 1.29  2004/08/09 12:58:05  reddawg
+00360  You like leaving out let me know when you got the surce
+00361  You like leaving out
+00362  You like leaving out Revision 1.28  2004/08/01 17:58:39  flameshadow
+00363  You like leaving out chg: fixed string allocation bug in ubixfs_cacheNew()
+00364  You like leaving out
+00365  You like leaving out Revision 1.27  2004/07/28 17:24:13  flameshadow
+00366  You like leaving out chg: no comment
+00367  You like leaving out
+00368  You like leaving out Revision 1.26  2004/07/28 17:07:29  flameshadow
+00369  You like leaving out chg: re-added moving cached nodes to the front of the list when found
+00370  You like leaving out add: added an assert() in ubixfs.c
+00371  You like leaving out
+00372  You like leaving out Revision 1.25  2004/07/27 19:24:31  flameshadow
+00373  You like leaving out chg: reduced the number of debugging statements in the kernel.
+00374  You like leaving out
+00375  You like leaving out Revision 1.24  2004/07/27 12:02:01  reddawg
+00376  You like leaving out chg: fixed marks bug readFile did a lookup which is why it looked like it was loopping so much
+00377  You like leaving out
+00378  You like leaving out Revision 1.23  2004/07/27 09:05:43  flameshadow
+00379  You like leaving out chg: fixed file not found bug. Still can't find looping issue
+00380  You like leaving out
+00381  You like leaving out Revision 1.22  2004/07/27 04:05:20  flameshadow
+00382  You like leaving out chg: kinda fixed it. Added bunches of debug info
+00383  You like leaving out
+00384  You like leaving out Revision 1.21  2004/07/25 22:21:52  flameshadow
+00385  You like leaving out chg: re-enabled kprintf() in ubixfs_cacheFind()
+00386  You like leaving out
+00387  You like leaving out Revision 1.20  2004/07/24 17:19:24  flameshadow
+00388  You like leaving out chg: Temporarily disabled the moving of the found cache node to the front
+00389  You like leaving out      of the list. It seems to cause problems later (race condition, possibly)
+00390  You like leaving out
+00391  You like leaving out Revision 1.19  2004/07/22 23:01:51  reddawg
+00392  You like leaving out Ok checking in before I sleep
+00393  You like leaving out
+00394  You like leaving out Revision 1.18  2004/07/22 19:54:50  flameshadow
+00395  You like leaving out chg: works now. Thanx ubu
+00396  You like leaving out
+00397  You like leaving out Revision 1.17  2004/07/22 19:01:59  flameshadow
+00398  You like leaving out chg: more directory and file caching
+00399  You like leaving out
+00400  You like leaving out Revision 1.16  2004/07/22 16:34:32  flameshadow
+00401  You like leaving out add: file and dir caching kinda work
+00402  You like leaving out
+00403  You like leaving out Revision 1.15  2004/07/21 22:43:18  flameshadow
+00404  You like leaving out one more try
+00405  You like leaving out
+00406  You like leaving out Revision 1.14  2004/07/21 22:42:25  flameshadow
+00407  You like leaving out try it now
+00408  You like leaving out
+00409  You like leaving out Revision 1.13  2004/07/21 22:40:27  flameshadow
+00410  You like leaving out weird
+00411  You like leaving out
+00412  You like leaving out Revision 1.12  2004/07/21 22:18:37  flameshadow
+00413  You like leaving out chg: renamed subDirsHead/Tail members of cacheNode to fileListHead/Tail
+00414  You like leaving out
+00415  You like leaving out Revision 1.11  2004/07/21 22:12:22  flameshadow
+00416  You like leaving out add: attributes tag in cacheNode
+00417  You like leaving out add: setting of attributes in ubixfx_cacheNew() and ubixfs_cacheFind()
+00418  You like leaving out
+00419  You like leaving out Revision 1.10  2004/07/21 22:07:18  flameshadow
+00420  You like leaving out chg: renamed caching functions (again)
+00421  You like leaving out
+00422  You like leaving out Revision 1.9  2004/07/21 22:00:04  flameshadow
+00423  You like leaving out chg: ubixfws_dirCacheAdd now returns a pointer to the node it added
+00424  You like leaving out chg: minor fix in ubixfs_dirCacheFind()
+00425  You like leaving out
+00426  You like leaving out Revision 1.6  2004/07/21 14:43:14  flameshadow
+00427  You like leaving out add: added cwc (current working container) to the osInfo strut
+00428  You like leaving out so i don't know what is going on eh?
+00429 
+00430  END
+00431  ***/
+00432  
+00433 
+

Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dirCache_8c.html b/doc/html/dirCache_8c.html new file mode 100644 index 0000000..407d374 --- /dev/null +++ b/doc/html/dirCache_8c.html @@ -0,0 +1,249 @@ + + +UbixOS V2: src/sys/ubixfs/dirCache.c File Reference + + + + +
+
+
+
+ +

dirCache.c File Reference

+

+#include <assert.h>
+#include <ubixfs/dirCache.h>
+#include <ubixfs/ubixfs.h>
+#include <lib/kmalloc.h>
+#include <lib/kprintf.h>
+#include <lib/string.h>
+#include <ubixos/spinlock.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + +

Functions

cacheNodeubixfs_cacheAdd (struct cacheNode *node, struct cacheNode *newNode)
void ubixfs_cacheDelete (struct cacheNode **head)
cacheNodeubixfs_cacheFind (struct cacheNode *head, char *name)
cacheNodeubixfs_cacheNew (const char *name)
static struct directoryEntryubixfs_findName (struct directoryEntry *dirList, uInt32 size, char *name)

Variables

static spinLock_t dca_spinLock = SPIN_LOCK_INITIALIZER
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
struct cacheNode* ubixfs_cacheAdd (struct cacheNode node,
struct cacheNode newNode 
)
+
+ +

+ +

+
+ + + + + + + + + +
void ubixfs_cacheDelete (struct cacheNode **  head  ) 
+
+
+ +

+ +

+Definition at line 202 of file dirCache.c. +

+References cacheNode::fileListHead, cacheNode::info, kfree(), cacheNode::name, cacheNode::next, NULL, and ubixfs_cacheDelete(). +

+Referenced by ubixfs_cacheDelete(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
struct cacheNode* ubixfs_cacheFind (struct cacheNode head,
char *  name 
)
+
+ +

+ +

+
+ + + + + + + + + +
struct cacheNode* ubixfs_cacheNew (const char *  name  ) 
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
static struct directoryEntry* ubixfs_findName (struct directoryEntry dirList,
uInt32  size,
char *  name 
) [static]
+
+
+ +

+ +

+Definition at line 43 of file dirCache.c. +

+References dirList, directoryEntry::fileName, NULL, and strcmp(). +

+Referenced by ubixfs_cacheFind(). +

+

+


Variable Documentation

+ +
+
+ + + + +
spinLock_t dca_spinLock = SPIN_LOCK_INITIALIZER [static]
+
+
+ +

+ +

+Definition at line 39 of file dirCache.c. +

+Referenced by ubixfs_cacheAdd(), and ubixfs_cacheFind(). +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dirCache_8h-source.html b/doc/html/dirCache_8h-source.html new file mode 100644 index 0000000..8594044 --- /dev/null +++ b/doc/html/dirCache_8h-source.html @@ -0,0 +1,65 @@ + + +UbixOS V2: src/sys/include/ubixfs/dirCache.h Source File + + + + +
+
+
+
+ +

dirCache.h

Go to the documentation of this file.
00001 #ifndef DIRCACHE_H
+00002 #define DIRCACHE_H
+00003 
+00004 /* #include "ubixfs.h" */
+00005 #include <ubixos/types.h>
+00006 
+00007 struct cacheNode {
+00008   char * name;
+00009   struct cacheNode * prev;
+00010   struct cacheNode * next;
+00011   struct cacheNode * parent;
+00012   struct cacheNode * fileListHead;
+00013   struct cacheNode * fileListTail;
+00014   void             * info; 
+00015   int              * size;
+00016   int                present;
+00017   int                dirty;
+00018   uInt32           * startCluster;
+00019   uInt16           * attributes;
+00020   uInt16           * permissions;
+00021 }; /* cacheNode */
+00022 
+00023 struct cacheNode * ubixfs_cacheFind(struct cacheNode *, char *);
+00024 struct cacheNode * ubixfs_cacheNew(const char *);
+00025 void ubixfs_cacheDelete(struct cacheNode **);
+00026 struct cacheNode * ubixfs_cacheAdd(struct cacheNode *, struct cacheNode *);
+00027 
+00028 #endif /* !DIRCACHE_H */
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dirCache_8h.html b/doc/html/dirCache_8h.html new file mode 100644 index 0000000..760495a --- /dev/null +++ b/doc/html/dirCache_8h.html @@ -0,0 +1,180 @@ + + +UbixOS V2: src/sys/include/ubixfs/dirCache.h File Reference + + + + +
+
+
+
+ +

dirCache.h File Reference

+

+#include <ubixos/types.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + +

Data Structures

struct  cacheNode

Functions

cacheNodeubixfs_cacheAdd (struct cacheNode *, struct cacheNode *)
void ubixfs_cacheDelete (struct cacheNode **)
cacheNodeubixfs_cacheFind (struct cacheNode *, char *)
cacheNodeubixfs_cacheNew (const char *)
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
struct cacheNode* ubixfs_cacheAdd (struct cacheNode,
struct cacheNode 
)
+
+ +

+ +

+
+ + + + + + + + + +
void ubixfs_cacheDelete (struct cacheNode **   ) 
+
+
+ +

+ +

+Definition at line 202 of file dirCache.c. +

+References cacheNode::fileListHead, cacheNode::info, kfree(), cacheNode::name, cacheNode::next, NULL, and ubixfs_cacheDelete(). +

+Referenced by ubixfs_cacheDelete(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
struct cacheNode* ubixfs_cacheFind (struct cacheNode,
char *  
)
+
+ +

+ +

+
+ + + + + + + + + +
struct cacheNode* ubixfs_cacheNew (const char *   ) 
+
+ +

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dir_0af38c139db535004c17f658eecde1eb.html b/doc/html/dir_0af38c139db535004c17f658eecde1eb.html new file mode 100644 index 0000000..616821b --- /dev/null +++ b/doc/html/dir_0af38c139db535004c17f658eecde1eb.html @@ -0,0 +1,40 @@ + + +UbixOS V2: src/sys/devfs/ Directory Reference + + + + +
+
+ +

devfs Directory Reference

+

+ + + + + +

Files

file  devfs.c [code]
+


Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dir_0da430bc12a622a01803598a1e7c0e05.html b/doc/html/dir_0da430bc12a622a01803598a1e7c0e05.html new file mode 100644 index 0000000..3d1520e --- /dev/null +++ b/doc/html/dir_0da430bc12a622a01803598a1e7c0e05.html @@ -0,0 +1,42 @@ + + +UbixOS V2: src/sys/include/ubixfs/ Directory Reference + + + + +
+
+ +

ubixfs Directory Reference

+

+ + + + + + + +

Files

file  dirCache.h [code]
file  ubixfs.h [code]
+


Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dir_21e0927e9dd41d8ff1206ca4f0555726.html b/doc/html/dir_21e0927e9dd41d8ff1206ca4f0555726.html new file mode 100644 index 0000000..c2c6fea --- /dev/null +++ b/doc/html/dir_21e0927e9dd41d8ff1206ca4f0555726.html @@ -0,0 +1,66 @@ + + +UbixOS V2: src/sys/ubixfsv2/ Directory Reference + + + + +
+
+ +

ubixfsv2 Directory Reference

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Files

file  btree.cpp [code]
file  btree.h [code]
file  btreeheader.h [code]
file  device.h [code]
file  file.h [code]
file  fsAbstract.h [code]
file  main.cpp [code]
file  ramdrive.cpp [code]
file  ramdrive.h [code]
file  types.h [code]
file  ubixfs.cpp [code]
file  ubixfs.h [code]
file  vfs.cpp [code]
file  vfs.h [code]
+


Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dir_248b3debdbff35864f3bdabccbc86e68.html b/doc/html/dir_248b3debdbff35864f3bdabccbc86e68.html new file mode 100644 index 0000000..e4a1f0d --- /dev/null +++ b/doc/html/dir_248b3debdbff35864f3bdabccbc86e68.html @@ -0,0 +1,40 @@ + + +UbixOS V2: src/sys/include/devfs/ Directory Reference + + + + +
+
+ +

devfs Directory Reference

+

+ + + + + +

Files

file  devfs.h [code]
+


Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dir_2f8fc94d4f17c865dd63167e45dee9cf.html b/doc/html/dir_2f8fc94d4f17c865dd63167e45dee9cf.html new file mode 100644 index 0000000..e8bb098 --- /dev/null +++ b/doc/html/dir_2f8fc94d4f17c865dd63167e45dee9cf.html @@ -0,0 +1,52 @@ + + +UbixOS V2: src/sys/isa/ Directory Reference + + + + +
+
+ +

isa Directory Reference

+

+ + + + + + + + + + + + + + + + + +

Files

file  8259.c [code]
file  atkbd.c [code]
file  fdc.c [code]
file  mouse.c [code]
file  ne2k.c [code]
file  pit.c [code]
file  rs232.c [code]
+


Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dir_2fce887bf7cb6c890cb427c03dad3e86.html b/doc/html/dir_2fce887bf7cb6c890cb427c03dad3e86.html new file mode 100644 index 0000000..9d624c3 --- /dev/null +++ b/doc/html/dir_2fce887bf7cb6c890cb427c03dad3e86.html @@ -0,0 +1,40 @@ + + +UbixOS V2: src/sys/include/objgfx/ Directory Reference + + + + +
+
+ +

objgfx Directory Reference

+

+ + + + + +

Files

file  ogDisplay_VESA.h [code]
+


Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dir_366cae809cefebd9796e1be555536f38.html b/doc/html/dir_366cae809cefebd9796e1be555536f38.html new file mode 100644 index 0000000..3f6c1e2 --- /dev/null +++ b/doc/html/dir_366cae809cefebd9796e1be555536f38.html @@ -0,0 +1,44 @@ + + +UbixOS V2: src/sys/vfs/ Directory Reference + + + + +
+
+ +

vfs Directory Reference

+

+ + + + + + + + + +

Files

file  file.c [code]
file  mount.c [code]
file  vfs.c [code]
+


Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dir_4d4c8e7174efe8ad5ca8ab494abe072d.html b/doc/html/dir_4d4c8e7174efe8ad5ca8ab494abe072d.html new file mode 100644 index 0000000..c66a32b --- /dev/null +++ b/doc/html/dir_4d4c8e7174efe8ad5ca8ab494abe072d.html @@ -0,0 +1,42 @@ + + +UbixOS V2: src/sys/include/ufs/ Directory Reference + + + + +
+
+ +

ufs Directory Reference

+

+ + + + + + + +

Files

file  ffs.h [code]
file  ufs.h [code]
+


Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dir_531e61b8e9b8982548f8f8f296b3206c.html b/doc/html/dir_531e61b8e9b8982548f8f8f296b3206c.html new file mode 100644 index 0000000..76131c4 --- /dev/null +++ b/doc/html/dir_531e61b8e9b8982548f8f8f296b3206c.html @@ -0,0 +1,50 @@ + + +UbixOS V2: src/sys/include/isa/ Directory Reference + + + + +
+
+ +

isa Directory Reference

+

+ + + + + + + + + + + + + + + +

Files

file  8259.h [code]
file  atkbd.h [code]
file  fdc.h [code]
file  mouse.h [code]
file  ne2k.h [code]
file  pit.h [code]
+


Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dir_5377d826f41208e35c1e6ec985f139cd.html b/doc/html/dir_5377d826f41208e35c1e6ec985f139cd.html new file mode 100644 index 0000000..1402b2f --- /dev/null +++ b/doc/html/dir_5377d826f41208e35c1e6ec985f139cd.html @@ -0,0 +1,48 @@ + + +UbixOS V2: src/sys/net/api/ Directory Reference + + + + +
+
+ +

api Directory Reference

+

+ + + + + + + + + + + + + +

Files

file  api_lib.c [code]
file  api_msg.c [code]
file  err.c [code]
file  sockets.c [code]
file  tcpip.c [code]
+


Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dir_538938396c33f4585b2c9d510e98cbd2.html b/doc/html/dir_538938396c33f4585b2c9d510e98cbd2.html new file mode 100644 index 0000000..00329a5 --- /dev/null +++ b/doc/html/dir_538938396c33f4585b2c9d510e98cbd2.html @@ -0,0 +1,50 @@ + + +UbixOS V2: src/sys/include/lib/ Directory Reference + + + + +
+
+ +

lib Directory Reference

+

+ + + + + + + + + + + + + + + +

Files

file  bioscall.h [code]
file  kmalloc.h [code]
file  kprint.h [code]
file  kprintf.h [code]
file  libcpp.h [code]
file  string.h [code]
+


Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dir_5ea7b6688944441098902d7716f0cb6a.html b/doc/html/dir_5ea7b6688944441098902d7716f0cb6a.html new file mode 100644 index 0000000..20feafe --- /dev/null +++ b/doc/html/dir_5ea7b6688944441098902d7716f0cb6a.html @@ -0,0 +1,40 @@ + + +UbixOS V2: src/sys/compile/ Directory Reference + + + + +
+
+ +

compile Directory Reference

+

+ + + + + +

Files

file  null.c [code]
+


Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dir_626404c379d6b1b237f0a541878d72c0.html b/doc/html/dir_626404c379d6b1b237f0a541878d72c0.html new file mode 100644 index 0000000..032b92a --- /dev/null +++ b/doc/html/dir_626404c379d6b1b237f0a541878d72c0.html @@ -0,0 +1,42 @@ + + +UbixOS V2: src/sys/include/sde/ Directory Reference + + + + +
+
+ +

sde Directory Reference

+

+ + + + + + + +

Files

file  ogDisplay_UbixOS.h [code]
file  sde.h [code]
+


Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dir_74196872fc832845f1a07f1162e5c554.html b/doc/html/dir_74196872fc832845f1a07f1162e5c554.html new file mode 100644 index 0000000..d1a5305 --- /dev/null +++ b/doc/html/dir_74196872fc832845f1a07f1162e5c554.html @@ -0,0 +1,48 @@ + + +UbixOS V2: src/sys/ubixfs/ Directory Reference + + + + +
+
+ +

ubixfs Directory Reference

+

+ + + + + + + + + + + + + +

Files

file  block.c [code]
file  dirCache.c [code]
file  directory.c [code]
file  thread.c [code]
file  ubixfs.c [code]
+


Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dir_76136493e73439838033f413ae0f827f.html b/doc/html/dir_76136493e73439838033f413ae0f827f.html new file mode 100644 index 0000000..9d8820c --- /dev/null +++ b/doc/html/dir_76136493e73439838033f413ae0f827f.html @@ -0,0 +1,46 @@ + + +UbixOS V2: src/sys/include/net/ipv6/ Directory Reference + + + + +
+
+ +

ipv6 Directory Reference

+

+ + + + + + + + + + + +

Files

file  icmp.h [code]
file  inet.h [code]
file  ip.h [code]
file  ip_addr.h [code]
+


Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dir_77bb06880a0e48020cb00f59405a6b13.html b/doc/html/dir_77bb06880a0e48020cb00f59405a6b13.html new file mode 100644 index 0000000..8998eba --- /dev/null +++ b/doc/html/dir_77bb06880a0e48020cb00f59405a6b13.html @@ -0,0 +1,44 @@ + + +UbixOS V2: src/sys/include/vfs/ Directory Reference + + + + +
+
+ +

vfs Directory Reference

+

+ + + + + + + + + +

Files

file  file.h [code]
file  mount.h [code]
file  vfs.h [code]
+


Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dir_7b0469299ccbf4a3a403496996173710.html b/doc/html/dir_7b0469299ccbf4a3a403496996173710.html new file mode 100644 index 0000000..e4053c4 --- /dev/null +++ b/doc/html/dir_7b0469299ccbf4a3a403496996173710.html @@ -0,0 +1,48 @@ + + +UbixOS V2: src/sys/sys/ Directory Reference + + + + +
+
+ +

sys Directory Reference

+

+ + + + + + + + + + + + + +

Files

file  device.c [code]
file  dma.c [code]
file  idt.c [code]
file  io.c [code]
file  video.c [code]
+


Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dir_7efffd2b1fae7bb6f2aa85845c863494.html b/doc/html/dir_7efffd2b1fae7bb6f2aa85845c863494.html new file mode 100644 index 0000000..85dbb97 --- /dev/null +++ b/doc/html/dir_7efffd2b1fae7bb6f2aa85845c863494.html @@ -0,0 +1,94 @@ + + +UbixOS V2: src/sys/kernel/ Directory Reference + + + + +
+
+ +

kernel Directory Reference

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Files

file  ap-boot.S [code]
file  bioscall.c [code]
file  elf.c [code]
file  endtask.c [code]
file  exec.c [code]
file  fork.c [code]
file  gen_calls.c [code]
file  kern_descrip.c [code]
file  kern_sig.c [code]
file  kern_sysctl.c [code]
file  kpanic.c [code]
file  ld.c [code]
file  pipe.c [code]
file  sched.c [code]
file  schedyield.S [code]
file  sem.c [code]
file  smp.c [code]
file  spinlock.c [code]
file  sys_call.S [code]
file  sys_call_new.S [code]
file  syscall.c [code]
file  syscall_new.c [code]
file  systemtask.c [code]
file  time.c [code]
file  timer.S [code]
file  tty.c [code]
file  ubthread.c [code]
file  vitals.c [code]
+


Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dir_832905b1f7f5feaf61a306b40c0ac817.html b/doc/html/dir_832905b1f7f5feaf61a306b40c0ac817.html new file mode 100644 index 0000000..1b11398 --- /dev/null +++ b/doc/html/dir_832905b1f7f5feaf61a306b40c0ac817.html @@ -0,0 +1,75 @@ + + +UbixOS V2: src/sys/ Directory Reference + + + + +
+
+ +

sys Directory Reference

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Directories

directory  compile
directory  devfs
directory  include
directory  init
directory  isa
directory  kernel
directory  kmods
directory  lib
directory  mpi
directory  net
directory  pci
directory  sys
directory  ubixfs
directory  ubixfsv2
directory  ufs
directory  vfs
directory  vmm

Files

file  Makefile.inc [code]
+


Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dir_897b6a2d7bab147dd1db58381aad3984.html b/doc/html/dir_897b6a2d7bab147dd1db58381aad3984.html new file mode 100644 index 0000000..df623f1 --- /dev/null +++ b/doc/html/dir_897b6a2d7bab147dd1db58381aad3984.html @@ -0,0 +1,40 @@ + + +UbixOS V2: src/ Directory Reference + + + + +
+
+ +

src Directory Reference

+

+ + + + + +

Directories

directory  sys
+


Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dir_912887cea1b4cb6e273c4527a2250d09.html b/doc/html/dir_912887cea1b4cb6e273c4527a2250d09.html new file mode 100644 index 0000000..95d3085 --- /dev/null +++ b/doc/html/dir_912887cea1b4cb6e273c4527a2250d09.html @@ -0,0 +1,44 @@ + + +UbixOS V2: src/sys/include/pci/ Directory Reference + + + + +
+
+ +

pci Directory Reference

+

+ + + + + + + + + +

Files

file  hd.h [code]
file  lnc.h [code]
file  pci.h [code]
+


Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dir_9854bc9d2b9a2a73f32c73e97d31d0f7.html b/doc/html/dir_9854bc9d2b9a2a73f32c73e97d31d0f7.html new file mode 100644 index 0000000..5428738 --- /dev/null +++ b/doc/html/dir_9854bc9d2b9a2a73f32c73e97d31d0f7.html @@ -0,0 +1,84 @@ + + +UbixOS V2: src/sys/include/ubixos/ Directory Reference + + + + +
+
+ +

ubixos Directory Reference

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Files

file  elf.h [code]
file  endtask.h [code]
file  exec.h [code]
file  fork.h [code]
file  init.h [code]
file  kmod.h [code]
file  kpanic.h [code]
file  ld.h [code]
file  lists.h [code]
file  sched.h [code]
file  sem.h [code]
file  smp.h [code]
file  spinlock.h [code]
file  static.h [code]
file  syscall.h [code]
file  syscalls.h [code]
file  syscalls_new.h [code]
file  systemtask.h [code]
file  time.h [code]
file  times.h [code]
file  tty.h [code]
file  types.h [code]
file  ubthread.h [code]
+


Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dir_a0cadbe588a0f0b62517333d702e3cca.html b/doc/html/dir_a0cadbe588a0f0b62517333d702e3cca.html new file mode 100644 index 0000000..4b443e7 --- /dev/null +++ b/doc/html/dir_a0cadbe588a0f0b62517333d702e3cca.html @@ -0,0 +1,40 @@ + + +UbixOS V2: src/sys/kmods/ Directory Reference + + + + +
+
+ +

kmods Directory Reference

+

+ + + + + +

Files

file  kmod.c [code]
+


Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dir_b2e9f53f507f0bb44cd3f7446945d199.html b/doc/html/dir_b2e9f53f507f0bb44cd3f7446945d199.html new file mode 100644 index 0000000..7a127e0 --- /dev/null +++ b/doc/html/dir_b2e9f53f507f0bb44cd3f7446945d199.html @@ -0,0 +1,52 @@ + + +UbixOS V2: src/sys/net/net/ Directory Reference + + + + +
+
+ +

net Directory Reference

+

+ + + + + + + + + + + + + + + + + +

Files

file  bot.c [code]
file  init.c [code]
file  shell.c [code]
file  shell.h [code]
file  sys_arch.c [code]
file  udpecho.c [code]
file  udpecho.h [code]
+


Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dir_b683da389ddfd9a2385307147d6c30b8.html b/doc/html/dir_b683da389ddfd9a2385307147d6c30b8.html new file mode 100644 index 0000000..160acd1 --- /dev/null +++ b/doc/html/dir_b683da389ddfd9a2385307147d6c30b8.html @@ -0,0 +1,44 @@ + + +UbixOS V2: src/sys/pci/ Directory Reference + + + + +
+
+ +

pci Directory Reference

+

+ + + + + + + + + +

Files

file  hd.c [code]
file  lnc.c [code]
file  pci.c [code]
+


Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dir_b87deefade4e886319aa926bd3ba1491.html b/doc/html/dir_b87deefade4e886319aa926bd3ba1491.html new file mode 100644 index 0000000..fdec3f5 --- /dev/null +++ b/doc/html/dir_b87deefade4e886319aa926bd3ba1491.html @@ -0,0 +1,62 @@ + + +UbixOS V2: src/sys/vmm/ Directory Reference + + + + +
+
+ +

vmm Directory Reference

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +

Files

file  copyvirtualspace.c [code]
file  createvirtualspace.c [code]
file  getfreepage.c [code]
file  getfreevirtualpage.c [code]
file  getphysicaladdr.c [code]
file  page_fault.S [code]
file  pagefault.c [code]
file  paging.c [code]
file  setpageattributes.c [code]
file  unmappage.c [code]
file  vmm_init.c [code]
file  vmm_memory.c [code]
+


Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dir_bcb67723b759fa7c88f0f248d2c080de.html b/doc/html/dir_bcb67723b759fa7c88f0f248d2c080de.html new file mode 100644 index 0000000..d8a55f4 --- /dev/null +++ b/doc/html/dir_bcb67723b759fa7c88f0f248d2c080de.html @@ -0,0 +1,42 @@ + + +UbixOS V2: src/sys/mpi/ Directory Reference + + + + +
+
+ +

mpi Directory Reference

+

+ + + + + + + +

Files

file  message.c [code]
file  system.c [code]
+


Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dir_bdca170688007a80a8e983b8739e5b43.html b/doc/html/dir_bdca170688007a80a8e983b8739e5b43.html new file mode 100644 index 0000000..cc9b5c8 --- /dev/null +++ b/doc/html/dir_bdca170688007a80a8e983b8739e5b43.html @@ -0,0 +1,50 @@ + + +UbixOS V2: src/sys/include/net/arch/ Directory Reference + + + + +
+
+ +

arch Directory Reference

+

+ + + + + + + + + + + + + + + +

Files

file  cc.h [code]
file  cpu.h [code]
file  init.h [code]
file  lib.h [code]
file  perf.h [code]
file  sys_arch.h [code]
+


Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dir_becc64c1c5cdfab2e137aa1ca4b91e6b.html b/doc/html/dir_becc64c1c5cdfab2e137aa1ca4b91e6b.html new file mode 100644 index 0000000..163ad2a --- /dev/null +++ b/doc/html/dir_becc64c1c5cdfab2e137aa1ca4b91e6b.html @@ -0,0 +1,46 @@ + + +UbixOS V2: src/sys/net/netif/ Directory Reference + + + + +
+
+ +

netif Directory Reference

+

+ + + + + + + + + + + +

Files

file  arp.c [code]
file  ethernetif.c [code]
file  loopif.c [code]
file  tcpdump.c [code]
+


Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dir_c0f81d69cde38683f3447d3343de50f4.html b/doc/html/dir_c0f81d69cde38683f3447d3343de50f4.html new file mode 100644 index 0000000..148d09d --- /dev/null +++ b/doc/html/dir_c0f81d69cde38683f3447d3343de50f4.html @@ -0,0 +1,46 @@ + + +UbixOS V2: src/sys/include/netif/ Directory Reference + + + + +
+
+ +

netif Directory Reference

+

+ + + + + + + + + + + +

Files

file  arp.h [code]
file  ethernetif.h [code]
file  loopif.h [code]
file  tcpdump.h [code]
+


Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dir_c1d11d251a83b2498f44d410b793c5eb.html b/doc/html/dir_c1d11d251a83b2498f44d410b793c5eb.html new file mode 100644 index 0000000..1889fb1 --- /dev/null +++ b/doc/html/dir_c1d11d251a83b2498f44d410b793c5eb.html @@ -0,0 +1,85 @@ + + +UbixOS V2: src/sys/include/net/ Directory Reference + + + + +
+
+ +

net Directory Reference

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Directories

directory  arch
directory  ipv4
directory  ipv6

Files

file  api.h [code]
file  api_msg.h [code]
file  arch.h [code]
file  debug.h [code]
file  def.h [code]
file  err.h [code]
file  list.h [code]
file  lwipopts.h [code]
file  mem.h [code]
file  memp.h [code]
file  net.h [code]
file  netif.h [code]
file  opt.h [code]
file  pbuf.h [code]
file  sockets.h [code]
file  stats.h [code]
file  sys.h [code]
file  tcp.h [code]
file  tcpip.h [code]
file  udp.h [code]
+


Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dir_c3e84400a32e4fc888777536359ca22b.html b/doc/html/dir_c3e84400a32e4fc888777536359ca22b.html new file mode 100644 index 0000000..6f514cb --- /dev/null +++ b/doc/html/dir_c3e84400a32e4fc888777536359ca22b.html @@ -0,0 +1,46 @@ + + +UbixOS V2: src/sys/include/net/ipv4/ Directory Reference + + + + +
+
+ +

ipv4 Directory Reference

+

+ + + + + + + + + + + +

Files

file  icmp.h [code]
file  inet.h [code]
file  ip.h [code]
file  ip_addr.h [code]
+


Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dir_caf4200c438ae9601464168e21e8e4d8.html b/doc/html/dir_caf4200c438ae9601464168e21e8e4d8.html new file mode 100644 index 0000000..3cce4a2 --- /dev/null +++ b/doc/html/dir_caf4200c438ae9601464168e21e8e4d8.html @@ -0,0 +1,77 @@ + + +UbixOS V2: src/sys/include/ Directory Reference + + + + +
+
+ +

include Directory Reference

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Directories

directory  devfs
directory  isa
directory  lib
directory  mpi
directory  net
directory  netif
directory  objgfx
directory  pci
directory  sde
directory  sys
directory  ubixfs
directory  ubixos
directory  ufs
directory  vfs
directory  vmm

Files

file  assert.h [code]
file  math.h [code]
file  stdarg.h [code]
file  string.h [code]
+


Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dir_cbd3b6f8ac372a007cdc756f615c76fe.html b/doc/html/dir_cbd3b6f8ac372a007cdc756f615c76fe.html new file mode 100644 index 0000000..21dc1a9 --- /dev/null +++ b/doc/html/dir_cbd3b6f8ac372a007cdc756f615c76fe.html @@ -0,0 +1,42 @@ + + +UbixOS V2: src/sys/ufs/ Directory Reference + + + + +
+
+ +

ufs Directory Reference

+

+ + + + + + + +

Files

file  ffs.c [code]
file  ufs.c [code]
+


Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dir_d26f37d6397a53073c964316867e8d67.html b/doc/html/dir_d26f37d6397a53073c964316867e8d67.html new file mode 100644 index 0000000..1ca6780 --- /dev/null +++ b/doc/html/dir_d26f37d6397a53073c964316867e8d67.html @@ -0,0 +1,80 @@ + + +UbixOS V2: src/sys/include/sys/ Directory Reference + + + + +
+
+ +

sys Directory Reference

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Files

file  _types.h [code]
file  buf.h [code]
file  cdefs.h [code]
file  device.h [code]
file  device.old.h [code]
file  dma.h [code]
file  driver.h [code]
file  gdt.h [code]
file  gen_calls.h [code]
file  idt.h [code]
file  io.h [code]
file  kern_descrip.h [code]
file  kern_sig.h [code]
file  kern_sysctl.h [code]
file  pipe.h [code]
file  signal.h [code]
file  sysproto.h [code]
file  thread.h [code]
file  trap.h [code]
file  tss.h [code]
file  video.h [code]
+


Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dir_d5a59026f863a7643db80a2edf430514.html b/doc/html/dir_d5a59026f863a7643db80a2edf430514.html new file mode 100644 index 0000000..b3f73a5 --- /dev/null +++ b/doc/html/dir_d5a59026f863a7643db80a2edf430514.html @@ -0,0 +1,42 @@ + + +UbixOS V2: src/sys/include/vmm/ Directory Reference + + + + +
+
+ +

vmm Directory Reference

+

+ + + + + + + +

Files

file  paging.h [code]
file  vmm.h [code]
+


Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dir_d6c0de4141c0ef78b51cf518480fe588.html b/doc/html/dir_d6c0de4141c0ef78b51cf518480fe588.html new file mode 100644 index 0000000..82b2b66 --- /dev/null +++ b/doc/html/dir_d6c0de4141c0ef78b51cf518480fe588.html @@ -0,0 +1,40 @@ + + +UbixOS V2: src/sys/include/mpi/ Directory Reference + + + + +
+
+ +

mpi Directory Reference

+

+ + + + + +

Files

file  mpi.h [code]
+


Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dir_d9dcf62a8e8b4cc91cbf2445d76a799b.html b/doc/html/dir_d9dcf62a8e8b4cc91cbf2445d76a799b.html new file mode 100644 index 0000000..c7d72e6 --- /dev/null +++ b/doc/html/dir_d9dcf62a8e8b4cc91cbf2445d76a799b.html @@ -0,0 +1,66 @@ + + +UbixOS V2: src/sys/lib/ Directory Reference + + + + +
+
+ +

lib Directory Reference

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Files

file  assert.c [code]
file  atan.c [code]
file  divdi3.c [code]
file  kmalloc.c [code]
file  kprintf.c [code]
file  libcpp.cc [code]
file  memset.c [code]
file  net.c [code]
file  ogprintf.cc [code]
file  sqrt.c [code]
file  string.c [code]
file  strtok.c [code]
file  strtol.c [code]
file  vsprintf.c [code]
+


Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dir_da977d215fccd664f66e7711fda26f76.html b/doc/html/dir_da977d215fccd664f66e7711fda26f76.html new file mode 100644 index 0000000..ea1b52a --- /dev/null +++ b/doc/html/dir_da977d215fccd664f66e7711fda26f76.html @@ -0,0 +1,44 @@ + + +UbixOS V2: src/sys/net/ Directory Reference + + + + +
+
+ +

net Directory Reference

+

+ + + + + + + + + +

Directories

directory  api
directory  net
directory  netif
+


Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dir_dffcdd1ad37a0b2305f9cf289deb8f95.html b/doc/html/dir_dffcdd1ad37a0b2305f9cf289deb8f95.html new file mode 100644 index 0000000..bae39a5 --- /dev/null +++ b/doc/html/dir_dffcdd1ad37a0b2305f9cf289deb8f95.html @@ -0,0 +1,44 @@ + + +UbixOS V2: src/sys/init/ Directory Reference + + + + +
+
+ +

init Directory Reference

+

+ + + + + + + + + +

Files

file  main.c [code]
file  start.S [code]
file  static.c [code]
+


Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/directory_8c-source.html b/doc/html/directory_8c-source.html new file mode 100644 index 0000000..b86d0a2 --- /dev/null +++ b/doc/html/directory_8c-source.html @@ -0,0 +1,222 @@ + + +UbixOS V2: src/sys/ubixfs/directory.c Source File + + + + +
+
+
+
+ +

directory.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <ubixfs/ubixfs.h>
+00031 #include <vfs/file.h>
+00032 #include <vfs/mount.h>
+00033 #include <ubixos/types.h>
+00034 #include <lib/kmalloc.h>
+00035 #include <lib/kprintf.h>
+00036 #include <lib/string.h>
+00037 
+00038 static dirList_t dirList = 0x0;
+00039 
+00040 dirList_t 
+00041 ubixFSLoadDir(char *data) {
+00042   dirList_t tmpDir = 0x0;
+00043 
+00044   tmpDir = (dirList_t)kmalloc(sizeof(struct directoryList));
+00045 
+00046   sprintf(tmpDir->dirName,"%s",data);
+00047 
+00048   if (0x0 == dirList) {
+00049     dirList = tmpDir;
+00050     }
+00051   else {
+00052     tmpDir->next = dirList;
+00053     tmpDir->prev = 0x0;
+00054     dirList->prev = tmpDir;
+00055     dirList       = tmpDir;
+00056     }
+00057 
+00058   if (!strcmp(":",data)) {
+00059     tmpDir->dirCache = (char *)kmalloc(0x4000);
+00060     }
+00061 
+00062   return(tmpDir);
+00063   }
+00064 
+00065 int 
+00066 addDirEntry(struct directoryEntry *dir,fileDescriptor *fd) {
+00067   uInt32 i = 0x0;
+00068   uInt32 entries = 0x0;
+00069   struct directoryEntry *tmp = 0x0;
+00070 
+00071   tmp = (struct directoryEntry *)kmalloc(fd->size);
+00072 
+00073   readUbixFS(fd,(char *)tmp,fd->offset,fd->size);
+00074   entries = fd->size/sizeof(struct directoryEntry);
+00075   for (i=0;(tmp[i].attributes != 0x0) && (i < entries);i++);
+00076 
+00077   if (i == entries) {
+00078     tmp = (struct directoryEntry *)kmalloc(0x1000);
+00079     i = 0x0;
+00080     }
+00081   else {
+00082     fd->offset = 0x0;
+00083     }
+00084   memcpy(&tmp[i],dir,sizeof(struct directoryEntry));
+00085   
+00086   if (writeUbixFS(fd,(char *)tmp,fd->offset,fd->size) == 0x0) {
+00087     kprintf("Error Creating Directory\n");
+00088     }
+00089   
+00090   return(0x0);
+00091   }
+00092 
+00093 int 
+00094 ubixFSmkDir(char *directory,fileDescriptor *fd) {
+00095   int block = 0x0;
+00096 
+00097   struct directoryEntry *dir   = 0x0;
+00098   struct directoryEntry *entry = 0x0;
+00099   struct ubixFSInfo *fsInfo    = fd->mp->fsInfo;
+00100 
+00101   //kprintf("Creating Directory: %s",directory);
+00102   
+00103   block = getFreeBlocks(1,fd);
+00104   if (block != 0x0) {
+00105     dir   = (struct directoryEntry *)kmalloc(UBIXFS_BLOCKSIZE_BYTES);
+00106     entry = (struct directoryEntry *)kmalloc(sizeof(struct directoryEntry));
+00107 
+00108     entry->startCluster = block;
+00109     entry->size         = UBIXFS_BLOCKSIZE_BYTES;
+00110     entry->attributes   = typeDirectory;
+00111     entry->permissions  = 0xEAA;
+00112     sprintf(entry->fileName, directory);
+00113 
+00114     //dir->attributes = typeDirectory;
+00115     //sprintf(dir->fileName,"Test Entry");
+00116     
+00117     fd->mp->device->devInfo->write(fd->mp->device->devInfo->info,
+00118                        dir,
+00119                        fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[block].realSector,
+00120                        blockSize);
+00121     addDirEntry(entry,fd);
+00122     kfree(dir);
+00123     kfree(entry);
+00124     }
+00125 
+00126   return(0x0);
+00127   }
+00128 
+00129 /***
+00130  $Log$
+00131  Revision 1.1.1.1  2006/06/01 12:46:17  reddawg
+00132  ubix2
+00133 
+00134  Revision 1.2  2005/10/12 00:13:37  reddawg
+00135  Removed
+00136 
+00137  Revision 1.1.1.1  2005/09/26 17:24:41  reddawg
+00138  no message
+00139 
+00140  Revision 1.12  2004/08/14 11:23:02  reddawg
+00141  Changes
+00142 
+00143  Revision 1.11  2004/08/01 17:58:39  flameshadow
+00144  chg: fixed string allocation bug in ubixfs_cacheNew()
+00145 
+00146  Revision 1.10  2004/07/23 09:10:06  reddawg
+00147  ubixfs: cleaned up some functions played with the caching a bit
+00148  vfs:    renamed a bunch of functions
+00149  cleaned up a few misc bugs
+00150 
+00151  Revision 1.9  2004/07/16 20:17:29  flameshadow
+00152  chg: broke the ufs stuff
+00153  chg: changed vfsRegisterFS() to accept a fileSystem struct
+00154  chg: modified calls to vfsRegisterFS() to pass fileSystem struct
+00155 
+00156  Revision 1.8  2004/06/29 03:59:47  reddawg
+00157  Fixed a few issues with subdirectories they are working much better now
+00158 
+00159  Revision 1.7  2004/06/28 23:12:58  reddawg
+00160  file format now container:/path/to/file
+00161 
+00162  Revision 1.6  2004/06/04 13:20:22  reddawg
+00163  ubixFSmkDir(): played with it a bit to see if it still worked
+00164 
+00165  Revision 1.5  2004/06/04 10:19:42  reddawg
+00166  notes: we compile again, thank g-d anyways i was about to cry
+00167 
+00168  Revision 1.4  2004/05/19 15:20:06  reddawg
+00169  Fixed reference problems due to changes in drive subsystem
+00170 
+00171  Revision 1.3  2004/05/19 04:07:43  reddawg
+00172  kmalloc(size,pid) no more it is no kmalloc(size); the way it should of been
+00173 
+00174  Revision 1.2  2004/04/28 02:22:55  reddawg
+00175  This is a fiarly large commit but we are starting to use new driver model
+00176  all around
+00177 
+00178  Revision 1.1.1.1  2004/04/15 12:07:07  reddawg
+00179  UbixOS v1.0
+00180 
+00181  Revision 1.6  2004/04/13 16:36:34  reddawg
+00182  Changed our copyright, it is all now under a BSD-Style license
+00183 
+00184  END
+00185  ***/
+

Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/directory_8c.html b/doc/html/directory_8c.html new file mode 100644 index 0000000..f23cb08 --- /dev/null +++ b/doc/html/directory_8c.html @@ -0,0 +1,176 @@ + + +UbixOS V2: src/sys/ubixfs/directory.c File Reference + + + + +
+
+
+
+ +

directory.c File Reference

+

+#include <ubixfs/ubixfs.h>
+#include <vfs/file.h>
+#include <vfs/mount.h>
+#include <ubixos/types.h>
+#include <lib/kmalloc.h>
+#include <lib/kprintf.h>
+#include <lib/string.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + +

Functions

int addDirEntry (struct directoryEntry *dir, fileDescriptor *fd)
dirList_t ubixFSLoadDir (char *data)
int ubixFSmkDir (char *directory, fileDescriptor *fd)

Variables

static dirList_t dirList = 0x0
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
int addDirEntry (struct directoryEntry dir,
fileDescriptor fd 
)
+
+
+ +

+ +

+Definition at line 66 of file directory.c. +

+References kmalloc(), kprintf(), memcpy(), fileDescriptor::offset, readUbixFS(), fileDescriptor::size, writeUbixFS(), and x1000. +

+Referenced by ubixFSmkDir(). +

+

+ +

+
+ + + + + + + + + +
dirList_t ubixFSLoadDir (char *  data  ) 
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
int ubixFSmkDir (char *  directory,
fileDescriptor fd 
)
+
+ +

+


Variable Documentation

+ +
+
+ + + + +
dirList_t dirList = 0x0 [static]
+
+
+ +

+ +

+Definition at line 38 of file directory.c. +

+Referenced by ubixfs_cacheFind(), ubixfs_findName(), and ubixFSLoadDir(). +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dirs.html b/doc/html/dirs.html new file mode 100644 index 0000000..c6f4d02 --- /dev/null +++ b/doc/html/dirs.html @@ -0,0 +1,82 @@ + + +UbixOS V2: Directory Hierarchy + + + + +
+
+

UbixOS V2 Directories

This directory hierarchy is sorted roughly, but not completely, alphabetically: +
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/divdi3_8c-source.html b/doc/html/divdi3_8c-source.html new file mode 100644 index 0000000..d7d3673 --- /dev/null +++ b/doc/html/divdi3_8c-source.html @@ -0,0 +1,99 @@ + + +UbixOS V2: src/sys/lib/divdi3.c Source File + + + + +
+
+
+
+ +

divdi3.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005 Redistribution and use in source and binary forms, with or without modification, are
+00006 permitted provided that the following conditions are met:
+00007 
+00008 Redistributions of source code must retain the above copyright notice, this list of
+00009 conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010 form must reproduce the above copyright notice, this list of conditions, the following
+00011 disclaimer and the list of authors in the documentation and/or other materials provided
+00012 with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013 contributors may be used to endorse or promote products derived from this software
+00014 without specific prior written permission.
+00015 
+00016 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019 THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021 OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023 TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <math.h>
+00031 
+00032 u_quad_t __udivdi3(u_quad_t a,u_quad_t b) {
+00033   return(0); /* Quick Hack */
+00034   }
+00035 
+00036 quad_t __divdi3(quad_t a,quad_t b) {
+00037   return(0); /* Quick Hack */
+00038   }
+00039 
+00040 /***
+00041  $Log$
+00042  Revision 1.1.1.1  2006/06/01 12:46:16  reddawg
+00043  ubix2
+00044 
+00045  Revision 1.2  2005/10/12 00:13:37  reddawg
+00046  Removed
+00047 
+00048  Revision 1.1.1.1  2005/09/26 17:24:10  reddawg
+00049  no message
+00050 
+00051  Revision 1.2  2004/05/19 03:46:32  reddawg
+00052  A Few Quick Hacks To Make Things Work
+00053 
+00054  Revision 1.1.1.1  2004/04/15 12:07:10  reddawg
+00055  UbixOS v1.0
+00056 
+00057  Revision 1.2  2004/04/13 16:36:33  reddawg
+00058  Changed our copyright, it is all now under a BSD-Style license
+00059 
+00060  END
+00061  ***/
+00062 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/divdi3_8c.html b/doc/html/divdi3_8c.html new file mode 100644 index 0000000..23cbbe1 --- /dev/null +++ b/doc/html/divdi3_8c.html @@ -0,0 +1,113 @@ + + +UbixOS V2: src/sys/lib/divdi3.c File Reference + + + + +
+
+
+
+ +

divdi3.c File Reference

+

+#include <math.h>
+ +

+Go to the source code of this file. + + + + + + +

Functions

quad_t __divdi3 (quad_t a, quad_t b)
u_quad_t __udivdi3 (u_quad_t a, u_quad_t b)
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
quad_t __divdi3 (quad_t  a,
quad_t  b 
)
+
+
+ +

+ +

+Definition at line 36 of file divdi3.c. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
u_quad_t __udivdi3 (u_quad_t  a,
u_quad_t  b 
)
+
+
+ +

+ +

+Definition at line 32 of file divdi3.c. +

+

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dma_8c-source.html b/doc/html/dma_8c-source.html new file mode 100644 index 0000000..e3bf5ae --- /dev/null +++ b/doc/html/dma_8c-source.html @@ -0,0 +1,112 @@ + + +UbixOS V2: src/sys/sys/dma.c Source File + + + + +
+
+
+
+ +

dma.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2005 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <sys/dma.h>
+00031 #include <sys/io.h>
+00032 #include <ubixos/types.h>
+00033 
+00034 #define lowByte(x)  (x & 0x00FF)
+00035 #define highByte(x) ((x & 0xFF00) >> 8)
+00036    
+00037 static uInt8 maskReg[8]   = { 0x0A, 0x0A, 0x0A, 0x0A, 0xD4, 0xD4, 0xD4, 0xD4 };
+00038 static uInt8 clearReg[8]  = { 0x0C, 0x0C, 0x0C, 0x0C, 0xD8, 0xD8, 0xD8, 0xD8 };
+00039 static uInt8 modeReg[8]   = { 0x0B, 0x0B, 0x0B, 0x0B, 0xD6, 0xD6, 0xD6, 0xD6 };
+00040 static uInt8 addrPort[8]  = { 0x00, 0x02, 0x04, 0x06, 0xC0, 0xC4, 0xC8, 0xCC };
+00041 static uInt8 pagePort[8]  = { 0x87, 0x83, 0x81, 0x82, 0x8F, 0x8B, 0x89, 0x8A };
+00042 static uInt8 countPort[8] = { 0x01, 0x03, 0x05, 0x07, 0xC2, 0xC6, 0xCA, 0xCE };
+00043 
+00044 void dmaXfer(uInt8 channel,uInt32 address,uInt length,uInt8 read) {
+00045   unsigned char page=0, mode=0;
+00046   unsigned int offset = 0;
+00047   if (read) {
+00048     mode = 0x48 + channel;
+00049     }
+00050   else {
+00051     mode = 0x44 + channel;
+00052     }
+00053   page = address >> 16;
+00054   offset = address & 0xFFFF;
+00055   length--;
+00056   _dmaXfer(channel, page, offset, length, mode);
+00057   }
+00058 
+00059 void _dmaXfer(uInt8 dmaChannel,uInt8 page,uInt offset,uInt length,uInt8 mode) {
+00060   //asm("cli");
+00061   outportByte(maskReg[dmaChannel], 0x04 | dmaChannel);
+00062   outportByte(clearReg[dmaChannel], 0x00);
+00063   outportByte(modeReg[dmaChannel], mode);
+00064   outportByte(addrPort[dmaChannel], lowByte(offset));
+00065   outportByte(addrPort[dmaChannel], highByte(offset));
+00066   outportByte(pagePort[dmaChannel], page);
+00067   outportByte(countPort[dmaChannel], lowByte(length));
+00068   outportByte(countPort[dmaChannel], highByte(length));
+00069   outportByte(maskReg[dmaChannel], dmaChannel);
+00070   //asm("sti");
+00071   }
+00072 
+00073 /***
+00074  END
+00075  ***/
+

Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dma_8c.html b/doc/html/dma_8c.html new file mode 100644 index 0000000..6e758ec --- /dev/null +++ b/doc/html/dma_8c.html @@ -0,0 +1,335 @@ + + +UbixOS V2: src/sys/sys/dma.c File Reference + + + + +
+
+
+
+ +

dma.c File Reference

+

+#include <sys/dma.h>
+#include <sys/io.h>
+#include <ubixos/types.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + +

Defines

#define highByte(x)   ((x & 0xFF00) >> 8)
#define lowByte(x)   (x & 0x00FF)

Functions

void _dmaXfer (uInt8 dmaChannel, uInt8 page, uInt offset, uInt length, uInt8 mode)
void dmaXfer (uInt8 channel, uInt32 address, uInt length, uInt8 read)

Variables

static uInt8 addrPort [8] = { 0x00, 0x02, 0x04, 0x06, 0xC0, 0xC4, 0xC8, 0xCC }
static uInt8 clearReg [8] = { 0x0C, 0x0C, 0x0C, 0x0C, 0xD8, 0xD8, 0xD8, 0xD8 }
static uInt8 countPort [8] = { 0x01, 0x03, 0x05, 0x07, 0xC2, 0xC6, 0xCA, 0xCE }
static uInt8 maskReg [8] = { 0x0A, 0x0A, 0x0A, 0x0A, 0xD4, 0xD4, 0xD4, 0xD4 }
static uInt8 modeReg [8] = { 0x0B, 0x0B, 0x0B, 0x0B, 0xD6, 0xD6, 0xD6, 0xD6 }
static uInt8 pagePort [8] = { 0x87, 0x83, 0x81, 0x82, 0x8F, 0x8B, 0x89, 0x8A }
+


Define Documentation

+ +
+
+ + + + + + + + + +
#define highByte (  )    ((x & 0xFF00) >> 8)
+
+
+ +

+ +

+Definition at line 35 of file dma.c. +

+Referenced by _dmaXfer(). +

+

+ +

+
+ + + + + + + + + +
#define lowByte (  )    (x & 0x00FF)
+
+
+ +

+ +

+Definition at line 34 of file dma.c. +

+Referenced by _dmaXfer(). +

+

+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void _dmaXfer (uInt8  dmaChannel,
uInt8  page,
uInt  offset,
uInt  length,
uInt8  mode 
)
+
+
+ +

+ +

+Definition at line 59 of file dma.c. +

+References addrPort, clearReg, countPort, highByte, lowByte, maskReg, modeReg, outportByte(), and pagePort. +

+Referenced by dmaXfer(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void dmaXfer (uInt8  channel,
uInt32  address,
uInt  length,
uInt8  read 
)
+
+
+ +

+ +

+Definition at line 44 of file dma.c. +

+References _dmaXfer(). +

+Referenced by fdcRw(). +

+

+


Variable Documentation

+ +
+
+ + + + +
uInt8 addrPort[8] = { 0x00, 0x02, 0x04, 0x06, 0xC0, 0xC4, 0xC8, 0xCC } [static]
+
+
+ +

+ +

+Definition at line 40 of file dma.c. +

+Referenced by _dmaXfer(). +

+

+ +

+
+ + + + +
uInt8 clearReg[8] = { 0x0C, 0x0C, 0x0C, 0x0C, 0xD8, 0xD8, 0xD8, 0xD8 } [static]
+
+
+ +

+ +

+Definition at line 38 of file dma.c. +

+Referenced by _dmaXfer(). +

+

+ +

+
+ + + + +
uInt8 countPort[8] = { 0x01, 0x03, 0x05, 0x07, 0xC2, 0xC6, 0xCA, 0xCE } [static]
+
+
+ +

+ +

+Definition at line 42 of file dma.c. +

+Referenced by _dmaXfer(). +

+

+ +

+
+ + + + +
uInt8 maskReg[8] = { 0x0A, 0x0A, 0x0A, 0x0A, 0xD4, 0xD4, 0xD4, 0xD4 } [static]
+
+
+ +

+ +

+Definition at line 37 of file dma.c. +

+Referenced by _dmaXfer(). +

+

+ +

+
+ + + + +
uInt8 modeReg[8] = { 0x0B, 0x0B, 0x0B, 0x0B, 0xD6, 0xD6, 0xD6, 0xD6 } [static]
+
+
+ +

+ +

+Definition at line 39 of file dma.c. +

+Referenced by _dmaXfer(). +

+

+ +

+
+ + + + +
uInt8 pagePort[8] = { 0x87, 0x83, 0x81, 0x82, 0x8F, 0x8B, 0x89, 0x8A } [static]
+
+
+ +

+ +

+Definition at line 41 of file dma.c. +

+Referenced by _dmaXfer(). +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dma_8h-source.html b/doc/html/dma_8h-source.html new file mode 100644 index 0000000..ad1f17a --- /dev/null +++ b/doc/html/dma_8h-source.html @@ -0,0 +1,93 @@ + + +UbixOS V2: src/sys/include/sys/dma.h Source File + + + + +
+
+
+
+ +

dma.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _DMA_H
+00031 #define _DMA_H
+00032 
+00033 #include <ubixos/types.h>
+00034 
+00035 void dmaXfer(uInt8 channel,uInt32 address,uInt length,uInt8 read);
+00036 void _dmaXfer(uInt8 dmaChannel,uInt8 page,uInt offset,uInt length,uInt8 mode);
+00037 
+00038 #endif
+00039 
+00040 /***
+00041  $Log$
+00042  Revision 1.1.1.1  2006/06/01 12:46:15  reddawg
+00043  ubix2
+00044 
+00045  Revision 1.2  2005/10/12 00:13:37  reddawg
+00046  Removed
+00047 
+00048  Revision 1.1.1.1  2005/09/26 17:23:52  reddawg
+00049  no message
+00050 
+00051  Revision 1.3  2004/05/21 15:12:17  reddawg
+00052  Cleaned up
+00053 
+00054 
+00055  END
+00056  ***/
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/dma_8h.html b/doc/html/dma_8h.html new file mode 100644 index 0000000..3f2477f --- /dev/null +++ b/doc/html/dma_8h.html @@ -0,0 +1,151 @@ + + +UbixOS V2: src/sys/include/sys/dma.h File Reference + + + + +
+
+
+
+ +

dma.h File Reference

+

+#include <ubixos/types.h>
+ +

+Go to the source code of this file. + + + + + + +

Functions

void _dmaXfer (uInt8 dmaChannel, uInt8 page, uInt offset, uInt length, uInt8 mode)
void dmaXfer (uInt8 channel, uInt32 address, uInt length, uInt8 read)
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void _dmaXfer (uInt8  dmaChannel,
uInt8  page,
uInt  offset,
uInt  length,
uInt8  mode 
)
+
+
+ +

+ +

+Definition at line 59 of file dma.c. +

+References addrPort, clearReg, countPort, highByte, lowByte, maskReg, modeReg, outportByte(), and pagePort. +

+Referenced by dmaXfer(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void dmaXfer (uInt8  channel,
uInt32  address,
uInt  length,
uInt8  read 
)
+
+
+ +

+ +

+Definition at line 44 of file dma.c. +

+References _dmaXfer(). +

+Referenced by fdcRw(). +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/driver_8h-source.html b/doc/html/driver_8h-source.html new file mode 100644 index 0000000..5cd472e --- /dev/null +++ b/doc/html/driver_8h-source.html @@ -0,0 +1,104 @@ + + +UbixOS V2: src/sys/include/sys/driver.h Source File + + + + +
+
+
+
+ +

driver.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _DRIVER_H
+00031 #define _DRIVER_H
+00032 
+00033 #include <ubixos/types.h>
+00034 
+00035 
+00036 typedef struct devMethodType devMethod;
+00037 
+00038 struct devMethodType {
+00039   };
+00040 
+00041 struct driverType {
+00042   const char *devName;
+00043   devMethod *methods;
+00044   }
+00045 
+00046 
+00047 
+00048 
+00049 #endif
+00050 
+00051 /***
+00052  $Log$
+00053  Revision 1.1.1.1  2006/06/01 12:46:15  reddawg
+00054  ubix2
+00055 
+00056  Revision 1.2  2005/10/12 00:13:37  reddawg
+00057  Removed
+00058 
+00059  Revision 1.1.1.1  2005/09/26 17:23:52  reddawg
+00060  no message
+00061 
+00062  Revision 1.2  2004/05/21 15:12:17  reddawg
+00063  Cleaned up
+00064 
+00065 
+00066  END
+00067  ***/
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/driver_8h.html b/doc/html/driver_8h.html new file mode 100644 index 0000000..5f99676 --- /dev/null +++ b/doc/html/driver_8h.html @@ -0,0 +1,71 @@ + + +UbixOS V2: src/sys/include/sys/driver.h File Reference + + + + +
+
+
+
+ +

driver.h File Reference

+

+#include <ubixos/types.h>
+ +

+Go to the source code of this file. + + + + + + + + + +

Data Structures

struct  devMethodType
struct  driverType

Typedefs

typedef devMethodType devMethod
+


Typedef Documentation

+ +
+
+ + + + +
typedef struct devMethodType devMethod
+
+
+ +

+ +

+Definition at line 36 of file driver.h. +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/elf_8c-source.html b/doc/html/elf_8c-source.html new file mode 100644 index 0000000..e31cbd2 --- /dev/null +++ b/doc/html/elf_8c-source.html @@ -0,0 +1,148 @@ + + +UbixOS V2: src/sys/kernel/elf.c Source File + + + + +
+
+
+
+ +

elf.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <ubixos/elf.h>
+00031 
+00032 const struct {
+00033   char  *elfTypeName;
+00034   uInt32 id;
+00035   } elfType[] = {
+00036     { "ET_NONE",         0 },
+00037     { "ET_REL",          1 },
+00038     { "ET_EXEC",         2 },
+00039     { "ET_DYN",          3 },
+00040     { "ET_CORE",         4 },
+00041     { "ET_LOPROC",  0xff00 },
+00042     { "ET_HIPROC",  0xffff },
+00043     };
+00044     
+00045 const struct {
+00046   char   *phTypeName;
+00047   uInt32 id;
+00048   } elfPhType[] = {
+00049     { "PT_NULL",              0 },
+00050     { "PT_LOAD",              1 },
+00051     { "PT_DYNAMIC",           2 },
+00052     { "PT_INTERP",            3 },
+00053     { "PT_NOTE",              4 },
+00054     { "PT_SHLIB",             5 },
+00055     { "PT_PHDR",              6 },
+00056     { "PT_LOPROC",   0x70000000 },
+00057     { "PT_HIPROC",   0x7fffffff },
+00058     };
+00059 
+00060 const struct {
+00061   char   *shTypeName;
+00062   uInt32 id;
+00063   } elfShType[] = {
+00064     {"SHT_NULL",     0 },
+00065     {"SHT_PROGBITS", 1 },
+00066     {"SHT_SYMTAB",   2 },
+00067     {"SHT_STRTAB",   3 },
+00068     {"SHT_RELA",     4 },
+00069     {"SHT_HASH",     5 },
+00070     {"SHT_DYNAMIC",  6 },
+00071     {"SHT_NOTE",     7 },
+00072     {"SHT_NOBITS",   8 },
+00073     {"SHT_REL",      9 },
+00074     {"SHT_SHLIB",   10 },
+00075     {"SHT_DYNSYM",  11 },
+00076     };
+00077 
+00078 const struct {
+00079   char *relTypeName;
+00080   uInt32 id;
+00081   } elfRelType[] = {
+00082     {"R_386_NONE",        0 },
+00083     {"R_386_32",          1 },
+00084     {"R_386_PC32",        2 },
+00085     {"R_386_GOT32",       3 },
+00086     {"R_386_PLT32",       4 },
+00087     {"R_386_COPY",        5 },
+00088     {"R_386_GLOB_DAT",    6 },
+00089     {"R_386_JMP_SLOT",    7 },
+00090     {"R_386_RELATIVE",    8 },
+00091     {"R_386_GOTOFF",      9 },
+00092     {"R_386_GOTPC",      10 },
+00093     };
+00094 
+00095 
+00096 char *elfGetShType(int shType) {
+00097   return((char *)elfShType[shType].shTypeName);
+00098   }
+00099 
+00100 char *elfGetPhType(int phType) {
+00101   return((char *)elfPhType[phType].phTypeName);
+00102   }
+00103 
+00104 char *elfGetRelType(int relType) {
+00105   return((char *)elfRelType[relType].relTypeName);
+00106   }
+00107  
+00108 /***
+00109  END
+00110  ***/
+00111 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/elf_8c.html b/doc/html/elf_8c.html new file mode 100644 index 0000000..847e078 --- /dev/null +++ b/doc/html/elf_8c.html @@ -0,0 +1,369 @@ + + +UbixOS V2: src/sys/kernel/elf.c File Reference + + + + +
+
+
+
+ +

elf.c File Reference

+

+#include <ubixos/elf.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Functions

char * elfGetPhType (int phType)
char * elfGetRelType (int relType)
char * elfGetShType (int shType)

Variables

struct {
   uInt32   id
   char *   phTypeName
elfPhType []
struct {
   uInt32   id
   char *   relTypeName
elfRelType []
struct {
   uInt32   id
   char *   shTypeName
elfShType []
struct {
   char *   elfTypeName
   uInt32   id
elfType []
+


Function Documentation

+ +
+
+ + + + + + + + + +
char* elfGetPhType (int  phType  ) 
+
+
+ +

+ +

+Definition at line 100 of file elf.c. +

+References elfPhType, and phTypeName. +

+

+ +

+
+ + + + + + + + + +
char* elfGetRelType (int  relType  ) 
+
+
+ +

+ +

+Definition at line 104 of file elf.c. +

+References elfRelType, and relTypeName. +

+Referenced by kmod_load(), and ldEnable(). +

+

+ +

+
+ + + + + + + + + +
char* elfGetShType (int  shType  ) 
+
+
+ +

+ +

+Definition at line 96 of file elf.c. +

+References elfShType, and shTypeName. +

+

+


Variable Documentation

+ +
+
+ + + + +
struct { ... } elfPhType[]
+
+
+ +

+ +

+Referenced by elfGetPhType(). +

+

+ +

+
+ + + + +
struct { ... } elfRelType[]
+
+
+ +

+ +

+Referenced by elfGetRelType(). +

+

+ +

+
+ + + + +
struct { ... } elfShType[]
+
+
+ +

+ +

+Referenced by elfGetShType(). +

+

+ +

+
+ + + + +
struct { ... } elfType[]
+
+
+ +

+ +

+

+ +

+
+ + + + +
char* elfTypeName
+
+
+ +

+ +

+Definition at line 33 of file elf.c. +

+

+ +

+
+ + + + +
uInt32 id
+
+
+ +

+ +

+Definition at line 80 of file elf.c. +

+

+ +

+
+ + + + +
uInt32 id
+
+
+ +

+ +

+Definition at line 62 of file elf.c. +

+

+ +

+
+ + + + +
uInt32 id
+
+
+ +

+ +

+Definition at line 47 of file elf.c. +

+

+ +

+
+ + + + +
uInt32 id
+
+
+ +

+ +

+Definition at line 34 of file elf.c. +

+

+ +

+
+ + + + +
char* phTypeName
+
+
+ +

+ +

+Definition at line 46 of file elf.c. +

+Referenced by elfGetPhType(). +

+

+ +

+
+ + + + +
char* relTypeName
+
+
+ +

+ +

+Definition at line 79 of file elf.c. +

+Referenced by elfGetRelType(). +

+

+ +

+
+ + + + +
char* shTypeName
+
+
+ +

+ +

+Definition at line 61 of file elf.c. +

+Referenced by elfGetShType(). +

+

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/elf_8h-source.html b/doc/html/elf_8h-source.html new file mode 100644 index 0000000..b89ebc9 --- /dev/null +++ b/doc/html/elf_8h-source.html @@ -0,0 +1,229 @@ + + +UbixOS V2: src/sys/include/ubixos/elf.h Source File + + + + +
+
+
+
+ +

elf.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _ELF_H
+00031 #define _ELF_H
+00032 
+00033 #include <ubixos/types.h>
+00034 
+00035 #define elfExecutable 0x002
+00036 #define elfLibrary    0x003
+00037 
+00038 #define R_386_NONE      0 /* none    none        */
+00039 #define R_386_32        1 /* word32  S + A       */
+00040 #define R_386_PC32      2 /* word32  S + A - P   */
+00041 #define R_386_GOT32     3 /* word32  G + A - P   */
+00042 #define R_386_PLT32     4 /* word32  L + A - P   */
+00043 #define R_386_COPY      5 /* none    none        */
+00044 #define R_386_GLOB_DAT  6 /* word32  S           */
+00045 #define R_386_JMP_SLOT  7 /* word32  S           */
+00046 #define R_386_RELATIVE  8 /* word32  B + A       */
+00047 #define R_386_GOTOFF    9 /* word32  S + A - GOT */
+00048 #define R_386_GOTPC    10 /* word32  GOT + A - P */
+00049 
+00050 
+00051 /* Elf Types */
+00052 #define ET_NONE         0  // No file type
+00053 #define ET_REL          1  // Relocatable file
+00054 #define ET_EXEC         2  // Executable file
+00055 #define ET_DYN          3  // Shared object file
+00056 #define ET_CORE         4  // Core file
+00057 #define ET_LOPROC  0xff00  // Processor-specific
+00058 #define ET_HIPROC  0xffff
+00059 /* End Elf Types */
+00060 
+00061 /* Elf Machine Types */
+00062 #define EM_NONE       0  // No machine
+00063 #define EM_M32        1  // AT&T WE 32100
+00064 #define EM_SPARC      2  // SPARC
+00065 #define EM_386        3  // Intel 80386
+00066 #define EM_68K        4  // Motorola 68000
+00067 #define EM_88K        5  // Motorola 88000
+00068 #define EM_860        7  // Intel 80860
+00069 #define EM_MIPS       8  // MIPS RS3000
+00070 /* End Elf Machines Types */
+00071 
+00072 /* Elf Version */
+00073 #define EV_NONE          0  // Invalid version
+00074 #define EV_CURRENT       1  // Current version
+00075 /* End Elf Version */
+00076 
+00077 /* Elf Program Header Types */
+00078 #define PT_NULL          0
+00079 #define PT_LOAD          1
+00080 #define PT_DYNAMIC       2
+00081 #define PT_INTERP        3
+00082 #define PT_NOTE          4
+00083 #define PT_SHLIB         5
+00084 #define PT_PHDR          6
+00085 #define PT_LOOS          0x60000000
+00086 #define PT_HIOS          0x6fffffff
+00087 #define PT_LOPROC        0x70000000
+00088 #define PT_HIPROC        0x7fffffff
+00089 #define PT_GNU_EH_FRAME  0x6474e550
+00090 #define PT_GNU_STACK     (PT_LOOS + 0x474e551)
+00091 #define PT_GNU_RELRO     (PT_LOOS + 0x474e552) 
+00092 #define PT_PAX_FLAGS     (PT_LOOS + 0x5041580) 
+00093 
+00094 /* End Elf Program Header Types */
+00095 
+00096 typedef struct {
+00097   uInt8  eIdent[16]; /* File identification. */
+00098   uInt16 eType;      /* File type. */
+00099   uInt16 eMachine;   /* Machine architecture. */
+00100   uInt32  eVersion;   /* ELF format version. */
+00101   uInt32  eEntry;     /* Entry point. */
+00102   uInt32  ePhoff;     /* Program header file offset. */
+00103   uInt32  eShoff;     /* Section header file offset. */
+00104   uInt32  eFlags;     /* Architecture-specific flags. */
+00105   uInt16 eEhsize;    /* Size of ELF header in bytes. */
+00106   uInt16 ePhentsize; /* Size of program header entry. */
+00107   uInt16 ePhnum;     /* Number of program header entries. */
+00108   uInt16 eShentsize; /* Size of section header entry. */
+00109   uInt16 eShnum;     /* Number of section header entries. */
+00110   uInt16 eShstrndx;  /* Section name strings section. */
+00111   } elfHeader;
+00112 
+00113 typedef struct {
+00114   uInt32 phType;         /* Entry type. */
+00115   uInt32 phOffset;       /* File offset of contents. */
+00116   uInt32 phVaddr;        /* Virtual address in memory image. */
+00117   uInt32 phPaddr;        /* Physical address (not used). */
+00118   uInt32 phFilesz;       /* Size of contents in file. */
+00119   uInt32 phMemsz;        /* Size of contents in memory. */
+00120   uInt32 phFlags;        /* Access permission flags. */
+00121   uInt32 phAlign;        /* Alignment in memory and file. */
+00122   } elfProgramHeader;
+00123 
+00124 typedef struct {
+00125   uInt32 shName;        /* Section name (index into the section header string table). */
+00126   uInt32 shType;        /* Section type. */
+00127   uInt32 shFlags;       /* Section flags. */
+00128   uInt32 shAddr;        /* Address in memory image. */
+00129   uInt32 shOffset;      /* Offset in file. */
+00130   uInt32 shSize;        /* Size in bytes. */
+00131   uInt32 shLink;        /* Index of a related section. */
+00132   uInt32 shInfo;        /* Depends on section type. */
+00133   uInt32 shAddralign;   /* Alignment in bytes. */
+00134   uInt32 shEntsize;     /* Size of each entry in section. */
+00135   } elfSectionHeader;
+00136 
+00137 typedef struct {
+00138   uInt32 pltOffset;
+00139   uInt32 pltInfo;
+00140   } elfPltInfo;
+00141 
+00142 typedef struct {
+00143   uInt32 dynName;
+00144   uInt32 dynValue;
+00145   uInt32 dynSize;
+00146   uInt32 dynInfo;
+00147   } elfDynSym;
+00148 
+00149 typedef struct {
+00150   uInt32 dynVal;
+00151   uInt32 dynPtr;
+00152   } elfDynamic;
+00153 
+00154 char *elfGetShType(int);
+00155 char *elfGetPhType(int);
+00156 char *elfGetRelType(int);
+00157 
+00158 #define ELF32_R_SYM(i)      ((i)>>8)
+00159 #define ELF32_R_TYPE(i)     ((unsigned char)(i))
+00160 #define ELF32_R_INFO(s, t)  ((s)<<8+(unsigned char)(t))
+00161 
+00162 #endif
+00163 
+00164 /***
+00165  $Log$
+00166  Revision 1.1.1.1  2006/06/01 12:46:13  reddawg
+00167  ubix2
+00168 
+00169  Revision 1.2  2005/10/12 00:13:37  reddawg
+00170  Removed
+00171 
+00172  Revision 1.1.1.1  2005/09/26 17:23:54  reddawg
+00173  no message
+00174 
+00175  Revision 1.7  2004/09/11 01:20:08  apwillia
+00176  Clean up 'Unhandled Header' printfs when compiled in linux
+00177 
+00178  Revision 1.6  2004/06/16 14:04:51  reddawg
+00179  Renamed a typedef
+00180 
+00181  Revision 1.5  2004/06/14 12:20:54  reddawg
+00182  notes: many bugs repaired and ld works 100% now.
+00183 
+00184  Revision 1.4  2004/06/12 01:27:26  reddawg
+00185  shared objects: yes we almost fully support shared objects
+00186 
+00187  Revision 1.3  2004/05/21 15:20:00  reddawg
+00188  Cleaned up
+00189 
+00190 
+00191  END
+00192  ***/
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/elf_8h.html b/doc/html/elf_8h.html new file mode 100644 index 0000000..5d58584 --- /dev/null +++ b/doc/html/elf_8h.html @@ -0,0 +1,1092 @@ + + +UbixOS V2: src/sys/include/ubixos/elf.h File Reference + + + + +
+
+
+
+ +

elf.h File Reference

+

+#include <ubixos/types.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  elfDynamic
struct  elfDynSym
struct  elfHeader
struct  elfPltInfo
struct  elfProgramHeader
struct  elfSectionHeader

Defines

#define ELF32_R_INFO(s, t)   ((s)<<8+(unsigned char)(t))
#define ELF32_R_SYM(i)   ((i)>>8)
#define ELF32_R_TYPE(i)   ((unsigned char)(i))
#define elfExecutable   0x002
#define elfLibrary   0x003
#define EM_386   3
#define EM_68K   4
#define EM_860   7
#define EM_88K   5
#define EM_M32   1
#define EM_MIPS   8
#define EM_NONE   0
#define EM_SPARC   2
#define ET_CORE   4
#define ET_DYN   3
#define ET_EXEC   2
#define ET_HIPROC   0xffff
#define ET_LOPROC   0xff00
#define ET_NONE   0
#define ET_REL   1
#define EV_CURRENT   1
#define EV_NONE   0
#define PT_DYNAMIC   2
#define PT_GNU_EH_FRAME   0x6474e550
#define PT_GNU_RELRO   (PT_LOOS + 0x474e552)
#define PT_GNU_STACK   (PT_LOOS + 0x474e551)
#define PT_HIOS   0x6fffffff
#define PT_HIPROC   0x7fffffff
#define PT_INTERP   3
#define PT_LOAD   1
#define PT_LOOS   0x60000000
#define PT_LOPROC   0x70000000
#define PT_NOTE   4
#define PT_NULL   0
#define PT_PAX_FLAGS   (PT_LOOS + 0x5041580)
#define PT_PHDR   6
#define PT_SHLIB   5
#define R_386_32   1
#define R_386_COPY   5
#define R_386_GLOB_DAT   6
#define R_386_GOT32   3
#define R_386_GOTOFF   9
#define R_386_GOTPC   10
#define R_386_JMP_SLOT   7
#define R_386_NONE   0
#define R_386_PC32   2
#define R_386_PLT32   4
#define R_386_RELATIVE   8

Functions

char * elfGetPhType (int)
char * elfGetRelType (int)
char * elfGetShType (int)
+


Define Documentation

+ +
+
+ + + + + + + + + + + + +
#define ELF32_R_INFO (s,
 )    ((s)<<8+(unsigned char)(t))
+
+
+ +

+ +

+Definition at line 160 of file elf.h. +

+

+ +

+
+ + + + + + + + + +
#define ELF32_R_SYM (  )    ((i)>>8)
+
+
+ +

+ +

+Definition at line 158 of file elf.h. +

+Referenced by kmod_load(), and ldEnable(). +

+

+ +

+
+ + + + + + + + + +
#define ELF32_R_TYPE (  )    ((unsigned char)(i))
+
+
+ +

+ +

+Definition at line 159 of file elf.h. +

+Referenced by kmod_load(), and ldEnable(). +

+

+ +

+
+ + + + +
#define elfExecutable   0x002
+
+
+ +

+ +

+Definition at line 35 of file elf.h. +

+

+ +

+
+ + + + +
#define elfLibrary   0x003
+
+
+ +

+ +

+Definition at line 36 of file elf.h. +

+

+ +

+
+ + + + +
#define EM_386   3
+
+
+ +

+ +

+Definition at line 65 of file elf.h. +

+

+ +

+
+ + + + +
#define EM_68K   4
+
+
+ +

+ +

+Definition at line 66 of file elf.h. +

+

+ +

+
+ + + + +
#define EM_860   7
+
+
+ +

+ +

+Definition at line 68 of file elf.h. +

+

+ +

+
+ + + + +
#define EM_88K   5
+
+
+ +

+ +

+Definition at line 67 of file elf.h. +

+

+ +

+
+ + + + +
#define EM_M32   1
+
+
+ +

+ +

+Definition at line 63 of file elf.h. +

+

+ +

+
+ + + + +
#define EM_MIPS   8
+
+
+ +

+ +

+Definition at line 69 of file elf.h. +

+

+ +

+
+ + + + +
#define EM_NONE   0
+
+
+ +

+ +

+Definition at line 62 of file elf.h. +

+

+ +

+
+ + + + +
#define EM_SPARC   2
+
+
+ +

+ +

+Definition at line 64 of file elf.h. +

+

+ +

+
+ + + + +
#define ET_CORE   4
+
+
+ +

+ +

+Definition at line 56 of file elf.h. +

+

+ +

+
+ + + + +
#define ET_DYN   3
+
+
+ +

+ +

+Definition at line 55 of file elf.h. +

+

+ +

+
+ + + + +
#define ET_EXEC   2
+
+
+ +

+ +

+Definition at line 54 of file elf.h. +

+

+ +

+
+ + + + +
#define ET_HIPROC   0xffff
+
+
+ +

+ +

+Definition at line 58 of file elf.h. +

+

+ +

+
+ + + + +
#define ET_LOPROC   0xff00
+
+
+ +

+ +

+Definition at line 57 of file elf.h. +

+

+ +

+
+ + + + +
#define ET_NONE   0
+
+
+ +

+ +

+Definition at line 52 of file elf.h. +

+

+ +

+
+ + + + +
#define ET_REL   1
+
+
+ +

+ +

+Definition at line 53 of file elf.h. +

+

+ +

+
+ + + + +
#define EV_CURRENT   1
+
+
+ +

+ +

+Definition at line 74 of file elf.h. +

+

+ +

+
+ + + + +
#define EV_NONE   0
+
+
+ +

+ +

+Definition at line 73 of file elf.h. +

+

+ +

+
+ + + + +
#define PT_DYNAMIC   2
+
+
+ +

+ +

+Definition at line 80 of file elf.h. +

+Referenced by kmod_load(), ldEnable(), and sysExec(). +

+

+ +

+
+ + + + +
#define PT_GNU_EH_FRAME   0x6474e550
+
+
+ +

+ +

+Definition at line 89 of file elf.h. +

+

+ +

+
+ + + + +
#define PT_GNU_RELRO   (PT_LOOS + 0x474e552)
+
+
+ +

+ +

+Definition at line 91 of file elf.h. +

+

+ +

+
+ + + + +
#define PT_GNU_STACK   (PT_LOOS + 0x474e551)
+
+
+ +

+ +

+Definition at line 90 of file elf.h. +

+Referenced by kmod_load(), and ldEnable(). +

+

+ +

+
+ + + + +
#define PT_HIOS   0x6fffffff
+
+
+ +

+ +

+Definition at line 86 of file elf.h. +

+

+ +

+
+ + + + +
#define PT_HIPROC   0x7fffffff
+
+
+ +

+ +

+Definition at line 88 of file elf.h. +

+

+ +

+
+ + + + +
#define PT_INTERP   3
+
+
+ +

+ +

+Definition at line 81 of file elf.h. +

+Referenced by sysExec(). +

+

+ +

+
+ + + + +
#define PT_LOAD   1
+
+
+ +

+ +

+Definition at line 79 of file elf.h. +

+Referenced by kmod_load(), ldEnable(), and sysExec(). +

+

+ +

+
+ + + + +
#define PT_LOOS   0x60000000
+
+
+ +

+ +

+Definition at line 85 of file elf.h. +

+

+ +

+
+ + + + +
#define PT_LOPROC   0x70000000
+
+
+ +

+ +

+Definition at line 87 of file elf.h. +

+

+ +

+
+ + + + +
#define PT_NOTE   4
+
+
+ +

+ +

+Definition at line 82 of file elf.h. +

+

+ +

+
+ + + + +
#define PT_NULL   0
+
+
+ +

+ +

+Definition at line 78 of file elf.h. +

+

+ +

+
+ + + + +
#define PT_PAX_FLAGS   (PT_LOOS + 0x5041580)
+
+
+ +

+ +

+Definition at line 92 of file elf.h. +

+Referenced by kmod_load(), and ldEnable(). +

+

+ +

+
+ + + + +
#define PT_PHDR   6
+
+
+ +

+ +

+Definition at line 84 of file elf.h. +

+

+ +

+
+ + + + +
#define PT_SHLIB   5
+
+
+ +

+ +

+Definition at line 83 of file elf.h. +

+

+ +

+
+ + + + +
#define R_386_32   1
+
+
+ +

+ +

+Definition at line 39 of file elf.h. +

+Referenced by kmod_load(), and ldEnable(). +

+

+ +

+
+ + + + +
#define R_386_COPY   5
+
+
+ +

+ +

+Definition at line 43 of file elf.h. +

+

+ +

+
+ + + + +
#define R_386_GLOB_DAT   6
+
+
+ +

+ +

+Definition at line 44 of file elf.h. +

+

+ +

+
+ + + + +
#define R_386_GOT32   3
+
+
+ +

+ +

+Definition at line 41 of file elf.h. +

+

+ +

+
+ + + + +
#define R_386_GOTOFF   9
+
+
+ +

+ +

+Definition at line 47 of file elf.h. +

+

+ +

+
+ + + + +
#define R_386_GOTPC   10
+
+
+ +

+ +

+Definition at line 48 of file elf.h. +

+

+ +

+
+ + + + +
#define R_386_JMP_SLOT   7
+
+
+ +

+ +

+Definition at line 45 of file elf.h. +

+

+ +

+
+ + + + +
#define R_386_NONE   0
+
+
+ +

+ +

+Definition at line 38 of file elf.h. +

+

+ +

+
+ + + + +
#define R_386_PC32   2
+
+
+ +

+ +

+Definition at line 40 of file elf.h. +

+Referenced by kmod_load(), and ldEnable(). +

+

+ +

+
+ + + + +
#define R_386_PLT32   4
+
+
+ +

+ +

+Definition at line 42 of file elf.h. +

+

+ +

+
+ + + + +
#define R_386_RELATIVE   8
+
+
+ +

+ +

+Definition at line 46 of file elf.h. +

+Referenced by kmod_load(), and ldEnable(). +

+

+


Function Documentation

+ +
+
+ + + + + + + + + +
char* elfGetPhType (int   ) 
+
+
+ +

+ +

+Definition at line 100 of file elf.c. +

+References elfPhType, and phTypeName. +

+

+ +

+
+ + + + + + + + + +
char* elfGetRelType (int   ) 
+
+
+ +

+ +

+Definition at line 104 of file elf.c. +

+References elfRelType, and relTypeName. +

+Referenced by kmod_load(), and ldEnable(). +

+

+ +

+
+ + + + + + + + + +
char* elfGetShType (int   ) 
+
+
+ +

+ +

+Definition at line 96 of file elf.c. +

+References elfShType, and shTypeName. +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/endtask_8c-source.html b/doc/html/endtask_8c-source.html new file mode 100644 index 0000000..6708205 --- /dev/null +++ b/doc/html/endtask_8c-source.html @@ -0,0 +1,108 @@ + + +UbixOS V2: src/sys/kernel/endtask.c Source File + + + + +
+
+
+
+ +

endtask.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <ubixos/types.h>
+00031 #include <ubixos/sched.h>
+00032 #include <ubixos/vitals.h>
+00033 #include <vmm/vmm.h>
+00034 #include <lib/kprintf.h>
+00035 #include <isa/8259.h>
+00036 
+00037 /************************************************************************
+00038 
+00039 Function: endTask(pidType pid)
+00040 
+00041 Description: This will do cleanup for an ending task
+00042 
+00043 Notes:
+00044 
+00045 ************************************************************************/ 
+00046 void endTask(pidType pid) {
+00047   //kTask_t *tmpTask = 0x0;
+00048   
+00049   /* Don't mess with scheduler structures from outside the scheduler! */
+00050   /* Just set status to dead, and let the scheduler clean up itself */
+00051   sched_setStatus(pid,DEAD);
+00052   //tmpTask = schedFindTask(pid);
+00053   //if (sched_deleteTask(pid) != 0x0)
+00054   //  kpanic("sched_deleteTask: Failed\n");
+00055   //kprintf("Ending Task: (%i:0x%X)\n",tmpTask->id,tmpTask);
+00056   //sched_addDelTask(tmpTask);
+00057   //tmpTask->state = DEAD;
+00058   
+00059   //tmpTask->term->owner = tmpTask->parentPid;
+00060   
+00061   if (pid == _current->id)
+00062         while(1) sched_yield();
+00063   sched_yield();
+00064   
+00065   return;
+00066   }
+00067 
+00068 /***
+00069  END
+00070  ***/
+00071 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/endtask_8c.html b/doc/html/endtask_8c.html new file mode 100644 index 0000000..bf5ab1a --- /dev/null +++ b/doc/html/endtask_8c.html @@ -0,0 +1,80 @@ + + +UbixOS V2: src/sys/kernel/endtask.c File Reference + + + + +
+
+
+
+ +

endtask.c File Reference

+

+#include <ubixos/types.h>
+#include <ubixos/sched.h>
+#include <ubixos/vitals.h>
+#include <vmm/vmm.h>
+#include <lib/kprintf.h>
+#include <isa/8259.h>
+ +

+Go to the source code of this file. + + + + +

Functions

void endTask (pidType pid)
+


Function Documentation

+ +
+
+ + + + + + + + + +
void endTask (pidType  pid  ) 
+
+ +

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/endtask_8h-source.html b/doc/html/endtask_8h-source.html new file mode 100644 index 0000000..a7ebbcb --- /dev/null +++ b/doc/html/endtask_8h-source.html @@ -0,0 +1,96 @@ + + +UbixOS V2: src/sys/include/ubixos/endtask.h Source File + + + + +
+
+
+
+ +

endtask.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _ENDTASK_H
+00031 #define _ENDTASK_H
+00032 
+00033 #include <ubixos/types.h>
+00034 #include <ubixos/sched.h>
+00035 
+00036 void endTask(pidType);
+00037 
+00038 #endif
+00039 
+00040 /***
+00041  $Log$
+00042  Revision 1.2  2006/10/31 20:41:16  reddawg
+00043  Includes
+00044 
+00045  Revision 1.1.1.1  2006/06/01 12:46:13  reddawg
+00046  ubix2
+00047 
+00048  Revision 1.2  2005/10/12 00:13:37  reddawg
+00049  Removed
+00050 
+00051  Revision 1.1.1.1  2005/09/26 17:23:54  reddawg
+00052  no message
+00053 
+00054  Revision 1.2  2004/05/21 15:20:00  reddawg
+00055  Cleaned up
+00056 
+00057 
+00058  END
+00059  ***/
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/endtask_8h.html b/doc/html/endtask_8h.html new file mode 100644 index 0000000..5b4f537 --- /dev/null +++ b/doc/html/endtask_8h.html @@ -0,0 +1,76 @@ + + +UbixOS V2: src/sys/include/ubixos/endtask.h File Reference + + + + +
+
+
+
+ +

endtask.h File Reference

+

+#include <ubixos/types.h>
+#include <ubixos/sched.h>
+ +

+Go to the source code of this file. + + + + +

Functions

void endTask (pidType)
+


Function Documentation

+ +
+
+ + + + + + + + + +
void endTask (pidType   ) 
+
+ +

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/err_8c-source.html b/doc/html/err_8c-source.html new file mode 100644 index 0000000..6a28c31 --- /dev/null +++ b/doc/html/err_8c-source.html @@ -0,0 +1,99 @@ + + +UbixOS V2: src/sys/net/api/err.c Source File + + + + +
+
+
+
+ +

err.c

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 
+00036 #include "net/err.h"
+00037 
+00038 #ifdef LWIP_DEBUG
+00039 
+00040 static char *err_strerr[] = {"Ok.",
+00041                              "Out of memory error.",
+00042                              "Buffer error.",
+00043                              "Connection aborted.",
+00044                              "Connection reset.",
+00045                              "Connection closed.",
+00046                              "Not connected.",
+00047                              "Illegal value.",
+00048                              "Illegal argument.",
+00049                              "Routing problem.",
+00050                              "Address in use."
+00051 };
+00052 
+00053 /*-----------------------------------------------------------------------------------*/
+00054 char *
+00055 lwip_strerr(err_t err)
+00056 {
+00057   return err_strerr[-err];
+00058 
+00059 }
+00060 /*-----------------------------------------------------------------------------------*/
+00061 
+00062 #endif /* LWIP_DEBUG */
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/err_8c.html b/doc/html/err_8c.html new file mode 100644 index 0000000..d80738d --- /dev/null +++ b/doc/html/err_8c.html @@ -0,0 +1,45 @@ + + +UbixOS V2: src/sys/net/api/err.c File Reference + + + + +
+
+
+
+ +

err.c File Reference

+

+#include "net/err.h"
+ +

+Go to the source code of this file. + +
+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/err_8h-source.html b/doc/html/err_8h-source.html new file mode 100644 index 0000000..7cfcce9 --- /dev/null +++ b/doc/html/err_8h-source.html @@ -0,0 +1,110 @@ + + +UbixOS V2: src/sys/include/net/err.h Source File + + + + +
+
+
+
+ +

err.h

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 #ifndef __LWIP_ERR_H__
+00036 #define __LWIP_ERR_H__
+00037 
+00038 #include <ubixos/types.h>
+00039 
+00040 #include "net/debug.h"
+00041 
+00042 #include "net/arch/cc.h"
+00043 
+00044 typedef Int8 err_t;
+00045 
+00046 /* Definitions for error constants. */
+00047 
+00048 #define ERR_OK    0      /* No error, everything OK. */
+00049 #define ERR_MEM  -1      /* Out of memory error.     */
+00050 #define ERR_BUF  -2      /* Buffer error.            */
+00051 
+00052 
+00053 #define ERR_ABRT -3      /* Connection aborted.      */
+00054 #define ERR_RST  -4      /* Connection reset.        */
+00055 #define ERR_CLSD -5      /* Connection closed.       */
+00056 #define ERR_CONN -6      /* Not connected.           */
+00057 
+00058 #define ERR_VAL  -7      /* Illegal value.           */
+00059 
+00060 #define ERR_ARG  -8      /* Illegal argument.        */
+00061 
+00062 #define ERR_RTE  -9      /* Routing problem.         */
+00063 
+00064 #define ERR_USE  -10     /* Address in use.          */
+00065 
+00066 
+00067 
+00068 #ifdef LWIP_DEBUG
+00069 extern char *lwip_strerr(err_t err);
+00070 #else
+00071 #define lwip_strerr(x) ""
+00072 #endif /* LWIP_DEBUG */
+00073 #endif /* __LWIP_ERR_H__ */
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/err_8h.html b/doc/html/err_8h.html new file mode 100644 index 0000000..cc2056f --- /dev/null +++ b/doc/html/err_8h.html @@ -0,0 +1,315 @@ + + +UbixOS V2: src/sys/include/net/err.h File Reference + + + + +
+
+
+
+ +

err.h File Reference

+

+#include <ubixos/types.h>
+#include "net/debug.h"
+#include "net/arch/cc.h"
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Defines

#define ERR_ABRT   -3
#define ERR_ARG   -8
#define ERR_BUF   -2
#define ERR_CLSD   -5
#define ERR_CONN   -6
#define ERR_MEM   -1
#define ERR_OK   0
#define ERR_RST   -4
#define ERR_RTE   -9
#define ERR_USE   -10
#define ERR_VAL   -7
#define lwip_strerr(x)   ""

Typedefs

typedef Int8 err_t
+


Define Documentation

+ +
+
+ + + + +
#define ERR_ABRT   -3
+
+
+ +

+ +

+Definition at line 53 of file err.h. +

+

+ +

+
+ + + + +
#define ERR_ARG   -8
+
+
+ +

+ +

+Definition at line 60 of file err.h. +

+Referenced by lwip_send(), and lwip_write(). +

+

+ +

+
+ + + + +
#define ERR_BUF   -2
+
+
+ +

+ +

+Definition at line 50 of file err.h. +

+Referenced by netbuf_data(). +

+

+ +

+
+ + + + +
#define ERR_CLSD   -5
+
+
+ +

+ +

+Definition at line 55 of file err.h. +

+

+ +

+
+ + + + +
#define ERR_CONN   -6
+
+
+ +

+ +

+Definition at line 56 of file err.h. +

+Referenced by netconn_recv(). +

+

+ +

+
+ + + + +
#define ERR_MEM   -1
+
+ +

+ +

+
+ + + + +
#define ERR_OK   0
+
+ +

+ +

+
+ + + + +
#define ERR_RST   -4
+
+
+ +

+ +

+Definition at line 54 of file err.h. +

+

+ +

+
+ + + + +
#define ERR_RTE   -9
+
+
+ +

+ +

+Definition at line 62 of file err.h. +

+

+ +

+
+ + + + +
#define ERR_USE   -10
+
+
+ +

+ +

+Definition at line 64 of file err.h. +

+

+ +

+
+ + + + +
#define ERR_VAL   -7
+
+ +

+ +

+
+ + + + + + + + + +
#define lwip_strerr (  )    ""
+
+
+ +

+ +

+Definition at line 71 of file err.h. +

+

+


Typedef Documentation

+ +
+
+ + + + +
typedef Int8 err_t
+
+
+ +

+ +

+Definition at line 44 of file err.h. +

+

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ethernetif_8c-source.html b/doc/html/ethernetif_8c-source.html new file mode 100644 index 0000000..561c145 --- /dev/null +++ b/doc/html/ethernetif_8c-source.html @@ -0,0 +1,394 @@ + + +UbixOS V2: src/sys/net/netif/ethernetif.c Source File + + + + +
+
+
+
+ +

ethernetif.c

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 
+00036 /*
+00037  * This file is a skeleton for developing Ethernet network interface
+00038  * drivers for lwIP. Add code to the low_level functions and do a
+00039  * search-and-replace for the word "ethernetif" to replace it with
+00040  * something that better describes your network interface.
+00041  */
+00042 
+00043 #include <ubixos/types.h>
+00044 #include <ubixos/sched.h>
+00045 #include <lib/kmalloc.h>
+00046 #include <lib/kprintf.h>
+00047 #include <sys/device.old.h>
+00048 #include <isa/ne2k.h>
+00049 
+00050 
+00051 #include "net/debug.h"
+00052 
+00053 #include "net/opt.h"
+00054 #include "net/def.h"
+00055 #include "net/mem.h"
+00056 #include "net/pbuf.h"
+00057 #include "net/sys.h"
+00058 
+00059 #include "netif/arp.h"
+00060 
+00061 /* Define those to better describe your network interface. */
+00062 #define IFNAME0 'e'
+00063 #define IFNAME1 'd'
+00064 
+00065 struct nicBuffer *tmpBuf = 0x0;
+00066 
+00067 struct ethernetif {
+00068   struct eth_addr *ethaddr;
+00069   /* Add whatever per-interface state that is needed here. */
+00070 };
+00071 
+00072 static const struct eth_addr ethbroadcast = {{0xff,0xff,0xff,0xff,0xff,0xff}};
+00073 
+00074 /* Forward declarations. */
+00075 static void  ethernetif_input(struct netif *netif);
+00076 static err_t ethernetif_output(struct netif *netif, struct pbuf *p, struct ip_addr *ipaddr);
+00077 static void ethernetif_thread();
+00078 struct device *dev = 0x0;
+00079 
+00080 /*-----------------------------------------------------------------------------------*/
+00081 static void low_level_init(struct netif *netif) {
+00082   struct ethernetif *ethernetif;
+00083 
+00084   ethernetif = netif->state;
+00085   dev = (struct device *)kmalloc(sizeof(struct device));
+00086   dev->ioAddr = 0x280;
+00087   dev->irq    = 0x10;
+00088   
+00089   /* Obtain MAC address from network interface. */
+00090   ethernetif->ethaddr->addr[0] = 0x00;
+00091   ethernetif->ethaddr->addr[1] = 0x00;
+00092   ethernetif->ethaddr->addr[2] = 0xC0;
+00093   ethernetif->ethaddr->addr[3] = 0x97;
+00094   ethernetif->ethaddr->addr[4] = 0xC6;
+00095   ethernetif->ethaddr->addr[5] = 0x93;
+00096 
+00097   /* Do whatever else is needed to initialize interface. */  
+00098   kprintf("NETIF: [0x%X:0x%X]\n",netif,ethernetif_thread);
+00099   sys_thread_new(ethernetif_thread, netif);
+00100  
+00101   }
+00102 /*-----------------------------------------------------------------------------------*/
+00103 /*
+00104  * low_level_output():
+00105  *
+00106  * Should do the actual transmission of the packet. The packet is
+00107  * contained in the pbuf that is passed to the function. This pbuf
+00108  * might be chained.
+00109  *
+00110  */
+00111 /*-----------------------------------------------------------------------------------*/
+00112 
+00113 static err_t low_level_output(struct ethernetif *ethernetif, struct pbuf *p) {
+00114   struct pbuf *q;
+00115   char buf[1500];
+00116   char *bufptr = 0x0;
+00117 
+00118   dev->ioAddr = 0x280;
+00119   dev->irq    = 10;
+00120 
+00121   bufptr = &buf[0];
+00122 
+00123   for(q = p; q != NULL; q = q->next) {
+00124     bcopy(q->payload, bufptr, q->len);
+00125     bufptr += q->len;
+00126     }
+00127   PCtoNIC(dev,buf,p->tot_len);
+00128   //kprintf("Sending Data[%i]\n",p->tot_len); 
+00129   return ERR_OK;
+00130   }
+00131 
+00132 
+00133 /*-----------------------------------------------------------------------------------*/
+00134 /*
+00135  * low_level_input():
+00136  *
+00137  * Should allocate a pbuf and transfer the bytes of the incoming
+00138  * packet from the interface into the pbuf.
+00139  *
+00140  */
+00141 /*-----------------------------------------------------------------------------------*/
+00142 static struct pbuf *low_level_input(struct ethernetif *ethernetif) {
+00143   struct pbuf *p, *q;
+00144   uInt16 len;
+00145   char *bufptr;
+00146   char *buf;
+00147 
+00148   len = tmpBuf->length;
+00149   bufptr = tmpBuf->buffer;
+00150 
+00151 
+00152   /* We allocate a pbuf chain of pbufs from the pool. */
+00153   p = pbuf_alloc(PBUF_LINK, len, PBUF_POOL);
+00154 
+00155   if(p != NULL) {
+00156     /* We iterate over the pbuf chain until we have read the entire
+00157        packet into the pbuf. */
+00158     //bufptr = &buf[0];
+00159     for(q = p; q != NULL; q = q->next) {
+00160       /* Read enough bytes to fill this pbuf in the chain. The
+00161          avaliable data in the pbuf is given by the q->len
+00162          variable. */
+00163       /* read data into(q->payload, q->len); */
+00164       bcopy(bufptr, q->payload, q->len);
+00165       buf = q->payload;
+00166       bufptr += q->len;
+00167     }
+00168     /* acknowledge that packet has been read(); */
+00169   } else {
+00170     /* drop packet(); */
+00171   }
+00172   return p;
+00173 }
+00174 
+00175 
+00176 /*-----------------------------------------------------------------------------------*/
+00177 /*
+00178  * ethernetif_output():
+00179  *
+00180  * This function is called by the TCP/IP stack when an IP packet
+00181  * should be sent. It calls the function called low_level_output() to
+00182  * do the actuall transmission of the packet.
+00183  *
+00184  */
+00185 /*-----------------------------------------------------------------------------------*/
+00186 static err_t ethernetif_output(struct netif *netif, struct pbuf *p, struct ip_addr *ipaddr) {
+00187   struct ethernetif *ethernetif;
+00188   struct pbuf *q;
+00189   struct eth_hdr *ethhdr;
+00190   struct eth_addr *dest, mcastaddr;
+00191   struct ip_addr *queryaddr;
+00192   err_t err;
+00193   uInt8 i;
+00194   
+00195   ethernetif = netif->state;
+00196 
+00197 
+00198   /* Make room for Ethernet header. */
+00199   if(pbuf_header(p, sizeof(struct eth_hdr)) != 0) {
+00200     /* The pbuf_header() call shouldn't fail, but we allocate an extra
+00201        pbuf just in case. */
+00202     q = pbuf_alloc(PBUF_LINK, sizeof(struct eth_hdr), PBUF_RAM);
+00203     if(q == NULL) {
+00204       return ERR_MEM;
+00205     }
+00206     pbuf_chain(q, p);
+00207     p = q;
+00208   }
+00209 
+00210   /* Construct Ethernet header. Start with looking up deciding which
+00211      MAC address to use as a destination address. Broadcasts and
+00212      multicasts are special, all other addresses are looked up in the
+00213      ARP table. */
+00214   queryaddr = ipaddr;
+00215   if(ip_addr_isany(ipaddr) ||
+00216      ip_addr_isbroadcast(ipaddr, &(netif->netmask))) {
+00217     dest = (struct eth_addr *)&ethbroadcast;
+00218   } else if(ip_addr_ismulticast(ipaddr)) {
+00219     /* Hash IP multicast address to MAC address. */
+00220     mcastaddr.addr[0] = 0x01;
+00221     mcastaddr.addr[1] = 0x0;
+00222     mcastaddr.addr[2] = 0x5e;
+00223     mcastaddr.addr[3] = ip4_addr2(ipaddr) & 0x7f;
+00224     mcastaddr.addr[4] = ip4_addr3(ipaddr);
+00225     mcastaddr.addr[5] = ip4_addr4(ipaddr);
+00226     dest = &mcastaddr;
+00227   } else {
+00228     if(ip_addr_maskcmp(ipaddr, &(netif->ip_addr), &(netif->netmask))) {
+00229       /* Use destination IP address if the destination is on the same
+00230          subnet as we are. */
+00231       queryaddr = ipaddr;
+00232     } else {
+00233       /* Otherwise we use the default router as the address to send
+00234          the Ethernet frame to. */
+00235       queryaddr = &(netif->gw);
+00236     }
+00237     dest = arp_lookup(queryaddr);
+00238   }
+00239 
+00240 
+00241   /* If the arp_lookup() didn't find an address, we send out an ARP
+00242      query for the IP address. */
+00243   if(dest == NULL) {
+00244     q = arp_query(netif, ethernetif->ethaddr, queryaddr);
+00245     if(q != NULL) {
+00246       err = low_level_output(ethernetif, q);
+00247       pbuf_free(q);
+00248       return err;
+00249     }
+00250     return ERR_MEM;
+00251   }
+00252   ethhdr = p->payload;
+00253 
+00254   for(i = 0; i < 6; i++) {
+00255     ethhdr->dest.addr[i] = dest->addr[i];
+00256     ethhdr->src.addr[i] = ethernetif->ethaddr->addr[i];
+00257   }
+00258   
+00259   ethhdr->type = htons(ETHTYPE_IP);
+00260   
+00261   return low_level_output(ethernetif, p);
+00262 
+00263 }
+00264 /*-----------------------------------------------------------------------------------*/
+00265 /*
+00266  * ethernetif_input():
+00267  *
+00268  * This function should be called when a packet is ready to be read
+00269  * from the interface. It uses the function low_level_input() that
+00270  * should handle the actual reception of bytes from the network
+00271  * interface.
+00272  *
+00273  */
+00274 /*-----------------------------------------------------------------------------------*/
+00275 static void ethernetif_input(struct netif *netif) {
+00276   struct ethernetif *ethernetif = 0x0;
+00277   struct eth_hdr *ethhdr = 0x0;
+00278   struct pbuf *p = 0x0;
+00279 
+00280   ethernetif = netif->state;
+00281  
+00282   p = low_level_input(ethernetif);
+00283 
+00284   if(p != NULL) {
+00285 
+00286     ethhdr = p->payload;
+00287     
+00288     switch(htons(ethhdr->type)) {
+00289     case ETHTYPE_IP:
+00290       arp_ip_input(netif, p);
+00291       pbuf_header(p, -14);
+00292       netif->input(p, netif);
+00293       break;
+00294     case ETHTYPE_ARP:
+00295       p = arp_arp_input(netif, ethernetif->ethaddr, p);
+00296       if(p != NULL) {
+00297         low_level_output(ethernetif, p);
+00298         pbuf_free(p);
+00299       }
+00300       break;
+00301     default:
+00302       pbuf_free(p);
+00303       break;
+00304     }
+00305   }
+00306 }
+00307 /*-----------------------------------------------------------------------------------*/
+00308 static void
+00309 arp_timer(void *arg)
+00310 {
+00311   arp_tmr();
+00312   sys_timeout(ARP_TMR_INTERVAL, (sys_timeout_handler)arp_timer, NULL);
+00313 }
+00314 
+00315 /*-----------------------------------------------------------------------------------*/
+00316 /*
+00317  * ethernetif_init():
+00318  *
+00319  * Should be called at the beginning of the program to set up the
+00320  * network interface. It calls the function low_level_init() to do the
+00321  * actual setup of the hardware.
+00322  *
+00323  */
+00324 /*-----------------------------------------------------------------------------------*/
+00325 void ethernetif_init(struct netif *netif) {
+00326   struct ethernetif *ethernetif;
+00327     
+00328   ethernetif = mem_malloc(sizeof(struct ethernetif));
+00329   netif->state = ethernetif;
+00330   netif->name[0] = IFNAME0;
+00331   netif->name[1] = IFNAME1;
+00332   netif->output = ethernetif_output;
+00333   netif->linkoutput = (void *)low_level_output;
+00334   
+00335   ethernetif->ethaddr = (struct eth_addr *)&(netif->hwaddr[0]);
+00336   
+00337   low_level_init(netif);
+00338   arp_init();
+00339 
+00340   sys_timeout(ARP_TMR_INTERVAL, (sys_timeout_handler)arp_timer, NULL);
+00341   }
+00342 
+00343 /*-----------------------------------------------------------------------------------*/
+00344 
+00345 void ethernetif_thread(void *arg) {
+00346   struct netif *netif = 0x0;
+00347  
+00348   netif = arg;
+00349   
+00350   while (1) {
+00351     tmpBuf = ne2kGetBuffer();
+00352     if (tmpBuf && tmpBuf->length > 0x0) {
+00353       ethernetif_input(netif);  
+00354       }
+00355     }
+00356   ne2kFreeBuffer(tmpBuf);
+00357   }
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ethernetif_8c.html b/doc/html/ethernetif_8c.html new file mode 100644 index 0000000..1331975 --- /dev/null +++ b/doc/html/ethernetif_8c.html @@ -0,0 +1,440 @@ + + +UbixOS V2: src/sys/net/netif/ethernetif.c File Reference + + + + +
+
+
+
+ +

ethernetif.c File Reference

+

+#include <ubixos/types.h>
+#include <ubixos/sched.h>
+#include <lib/kmalloc.h>
+#include <lib/kprintf.h>
+#include <sys/device.old.h>
+#include <isa/ne2k.h>
+#include "net/debug.h"
+#include "net/opt.h"
+#include "net/def.h"
+#include "net/mem.h"
+#include "net/pbuf.h"
+#include "net/sys.h"
+#include "netif/arp.h"
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  ethernetif

Defines

#define IFNAME0   'e'
#define IFNAME1   'd'

Functions

static void arp_timer (void *arg)
void ethernetif_init (struct netif *netif)
static void ethernetif_input (struct netif *netif)
static err_t ethernetif_output (struct netif *netif, struct pbuf *p, struct ip_addr *ipaddr)
void ethernetif_thread (void *arg)
static void ethernetif_thread ()
static void low_level_init (struct netif *netif)
static struct pbuflow_level_input (struct ethernetif *ethernetif)
static err_t low_level_output (struct ethernetif *ethernetif, struct pbuf *p)

Variables

devicedev = 0x0
static struct eth_addr ethbroadcast = {{0xff,0xff,0xff,0xff,0xff,0xff}}
nicBuffertmpBuf = 0x0
+


Define Documentation

+ +
+
+ + + + +
#define IFNAME0   'e'
+
+
+ +

+ +

+Definition at line 62 of file ethernetif.c. +

+Referenced by ethernetif_init(). +

+

+ +

+
+ + + + +
#define IFNAME1   'd'
+
+
+ +

+ +

+Definition at line 63 of file ethernetif.c. +

+Referenced by ethernetif_init(). +

+

+


Function Documentation

+ +
+
+ + + + + + + + + +
static void arp_timer (void *  arg  )  [static]
+
+
+ +

+ +

+Definition at line 309 of file ethernetif.c. +

+References arp_tmr(), ARP_TMR_INTERVAL, NULL, and sys_timeout(). +

+Referenced by ethernetif_init(). +

+

+ +

+
+ + + + + + + + + +
void ethernetif_init (struct netif netif  ) 
+
+ +

+ +

+
+ + + + + + + + + +
static void ethernetif_input (struct netif netif  )  [static]
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
static err_t ethernetif_output (struct netif netif,
struct pbuf p,
struct ip_addr ipaddr 
) [static]
+
+ +

+ +

+
+ + + + + + + + + +
void ethernetif_thread (void *  arg  ) 
+
+
+ +

+ +

+Definition at line 345 of file ethernetif.c. +

+References ethernetif_input(), nicBuffer::length, ne2kFreeBuffer(), ne2kGetBuffer(), and tmpBuf. +

+

+ +

+
+ + + + + + + + +
static void ethernetif_thread (  )  [static]
+
+
+ +

+ +

+Referenced by low_level_init(). +

+

+ +

+
+ + + + + + + + + +
static void low_level_init (struct netif netif  )  [static]
+
+
+ +

+ +

+Definition at line 81 of file ethernetif.c. +

+References dev, ethernetif::ethaddr, ethernetif_thread(), device::ioAddr, device::irq, kmalloc(), kprintf(), netif::state, and sys_thread_new(). +

+Referenced by ethernetif_init(). +

+

+ +

+
+ + + + + + + + + +
static struct pbuf* low_level_input (struct ethernetif ethernetif  )  [static]
+
+
+ +

+ +

+Definition at line 142 of file ethernetif.c. +

+References bcopy(), nicBuffer::buffer, pbuf::len, nicBuffer::length, pbuf::next, NULL, pbuf::payload, pbuf_alloc(), PBUF_LINK, PBUF_POOL, and tmpBuf. +

+Referenced by ethernetif_input(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
static err_t low_level_output (struct ethernetif ethernetif,
struct pbuf p 
) [static]
+
+ +

+


Variable Documentation

+ +
+
+ + + + +
struct device* dev = 0x0
+
+ +

+ +

+
+ + + + +
struct eth_addr ethbroadcast = {{0xff,0xff,0xff,0xff,0xff,0xff}} [static]
+
+
+ +

+ +

+Definition at line 72 of file ethernetif.c. +

+Referenced by ethernetif_output(). +

+

+ +

+
+ + + + +
struct nicBuffer* tmpBuf = 0x0
+
+
+ +

+ +

+Definition at line 65 of file ethernetif.c. +

+Referenced by dp_pkt2user(), ethernetif_thread(), low_level_input(), ne2kAllocBuffer(), and ne2kGetBuffer(). +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ethernetif_8h-source.html b/doc/html/ethernetif_8h-source.html new file mode 100644 index 0000000..f6ff66f --- /dev/null +++ b/doc/html/ethernetif_8h-source.html @@ -0,0 +1,79 @@ + + +UbixOS V2: src/sys/include/netif/ethernetif.h Source File + + + + +
+
+
+
+ +

ethernetif.h

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 #ifndef __NETIF_ETHERNETIF_H__
+00036 #define __NETIF_ETHERNETIF_H__
+00037 
+00038 #include "net/netif.h"
+00039 
+00040 void ethernetif_init(struct netif *netif);
+00041 
+00042 #endif /* __NETIF_ETHERNETIF_H__ */
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ethernetif_8h.html b/doc/html/ethernetif_8h.html new file mode 100644 index 0000000..cd19b6a --- /dev/null +++ b/doc/html/ethernetif_8h.html @@ -0,0 +1,75 @@ + + +UbixOS V2: src/sys/include/netif/ethernetif.h File Reference + + + + +
+
+
+
+ +

ethernetif.h File Reference

+

+#include "net/netif.h"
+ +

+Go to the source code of this file. + + + + +

Functions

void ethernetif_init (struct netif *netif)
+


Function Documentation

+ +
+
+ + + + + + + + + +
void ethernetif_init (struct netif netif  ) 
+
+ +

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/exec_8c-source.html b/doc/html/exec_8c-source.html new file mode 100644 index 0000000..32df207 --- /dev/null +++ b/doc/html/exec_8c-source.html @@ -0,0 +1,533 @@ + + +UbixOS V2: src/sys/kernel/exec.c Source File + + + + +
+
+
+
+ +

exec.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <ubixos/exec.h>
+00031 #include <ubixos/sched.h>
+00032 #include <ubixos/ld.h>
+00033 #include <ubixos/kpanic.h>
+00034 #include <ubixos/endtask.h>
+00035 #include <vmm/vmm.h>
+00036 #include <lib/kmalloc.h>
+00037 #include <lib/kprintf.h>
+00038 #include <lib/string.h>
+00039 #include <assert.h>
+00040 
+00041 #define STACK_ADDR 0xC800000
+00042 
+00043 /*****************************************************************************************
+00044 
+00045  Function:   execThread(void (*)(void),int,char *);
+00046  Description: This function will create a thread from code in the current memory space
+00047 
+00048  Notes:
+00049  
+00050  05/19/04 - This does not work the way I want it to it still makes a copy of kernel space
+00051             so do not use out side of kernel space
+00052 
+00053 *****************************************************************************************/
+00054 uInt32 execThread(void (* tproc)(void),uInt32 stack,char *arg) {
+00055   kTask_t * newProcess = 0x0;
+00056   /* Find A New Thread */
+00057   newProcess = schedNewTask();
+00058   assert(newProcess); 
+00059   if (stack < 0x100000)
+00060     kpanic("exec: stack not in valid area: [0x%X]\n",stack);
+00061 
+00062   /* Set All The Correct Thread Attributes */
+00063   newProcess->tss.back_link    = 0x0;
+00064   newProcess->tss.esp0         = 0x0;
+00065   newProcess->tss.ss0          = 0x0;
+00066   newProcess->tss.esp1         = 0x0;
+00067   newProcess->tss.ss1          = 0x0;
+00068   newProcess->tss.esp2         = 0x0;
+00069   newProcess->tss.ss2          = 0x0;
+00070   newProcess->tss.cr3          = (unsigned int)kernelPageDirectory;
+00071   newProcess->tss.eip          = (unsigned int)tproc;
+00072   newProcess->tss.eflags       = 0x206;
+00073   newProcess->tss.esp          = stack;
+00074   newProcess->tss.ebp          = stack;
+00075   newProcess->tss.esi          = 0x0;
+00076   newProcess->tss.edi          = 0x0;
+00077 
+00078   /* Set these up to be ring 3 tasks */
+00079   /*
+00080   newProcess->tss.es           = 0x30+3;
+00081   newProcess->tss.cs           = 0x28+3;
+00082   newProcess->tss.ss           = 0x30+3;
+00083   newProcess->tss.ds           = 0x30+3;
+00084   newProcess->tss.fs           = 0x30+3;
+00085   newProcess->tss.gs           = 0x30+3;
+00086   */
+00087 
+00088   newProcess->tss.es           = 0x10;
+00089   newProcess->tss.cs           = 0x08;
+00090   newProcess->tss.ss           = 0x10;
+00091   newProcess->tss.ds           = 0x10;
+00092   newProcess->tss.fs           = 0x10;
+00093   newProcess->tss.gs           = 0x10;
+00094 
+00095   newProcess->tss.ldt          = 0x18;
+00096   newProcess->tss.trace_bitmap = 0x0000;
+00097   newProcess->tss.io_map       = 0x8000;
+00098   newProcess->oInfo.vmStart    = 0x6400000;
+00099   
+00100   newProcess->imageFd          = 0x0;
+00101 
+00102   /* Set up default stack for thread here filled with arg list 3 times */
+00103   asm volatile(
+00104     "pusha               \n"
+00105     "movl   %%esp,%%ecx  \n"
+00106     "movl   %1,%%eax     \n"
+00107     "movl   %%eax,%%esp  \n"
+00108     "pushl  %%ebx        \n"
+00109     "pushl  %%ebx        \n"
+00110     "pushl  %%ebx        \n"
+00111     "movl   %%esp,%%eax  \n"
+00112     "movl   %%eax,%1     \n"
+00113     "movl   %%ecx,%%esp  \n"
+00114     "popa                \n"
+00115     :
+00116     : "b" (arg),"m" (newProcess->tss.esp)
+00117     );
+00118 
+00119   /* Put new thread into the READY state */
+00120   sched_setStatus(newProcess->id,READY);
+00121 
+00122   /* Return with the new process ID */
+00123   return((uInt32)newProcess);
+00124   }
+00125 
+00126 /*****************************************************************************************
+00127 
+00128  Function: void execFile(char *file);
+00129  Description: This Function Executes A Kile Into A New VM Space With Out
+00130               Having To Fork
+00131  Notes:
+00132 
+00133  07/30/02 - I Have Made Some Heavy Changes To This As Well As Fixed A Few
+00134             Memory Leaks The Memory Allocated To Load The Binary Into Is
+00135             Now Unmapped So It Can Be Used Again And Not Held Onto Until
+00136             The Program Exits
+00137 
+00138  07/30/02 - Now I Have To Make A Better Memory Allocator So We Can Set Up
+00139             The Freshly Allocated Pages With The Correct Permissions
+00140 
+00141 *****************************************************************************************/
+00142 void execFile(char *file,int argc,char **argv,int console) {
+00143 
+00144   int        i         = 0x0;
+00145   int        x         = 0x0;
+00146   u_int32_t *tmp       = 0x0;
+00147 
+00148   fileDescriptor   *tmpFd         = 0x0;
+00149   elfHeader        *binaryHeader  = 0x0;
+00150   elfProgramHeader *programHeader = 0x0;
+00151 
+00152   /* Get A New Task For This Proccess */
+00153   _current = schedNewTask();
+00154   assert(_current);
+00155   _current->gid  = 0x0;
+00156   _current->uid  = 0x0;
+00157   _current->term = tty_find(console);
+00158   if (_current->term == 0x0)
+00159     kprintf("Error: invalid console\n");
+00160 
+00161   /* Set tty ownership */
+00162   _current->term->owner = _current->id;
+00163 
+00164   /* Now We Must Create A Virtual Space For This Proccess To Run In */
+00165   _current->tss.cr3 = (uInt32)vmmCreateVirtualSpace(_current->id);
+00166 
+00167   /* To Better Load This Application We Will Switch Over To Its VM Space */
+00168   asm volatile(
+00169     "movl %0,%%eax          \n"
+00170     "movl %%eax,%%cr3       \n"
+00171     : : "d" ((uInt32 *)(_current->tss.cr3))
+00172     );
+00173 
+00174   /* Lets Find The File */
+00175   tmpFd = fopen(file,"r");
+00176 
+00177   /* If We Dont Find the File Return */
+00178   if (tmpFd == 0x0) {
+00179     kprintf("Exec Format Error: Binary File Not Executable.\n");
+00180     fclose(tmpFd);
+00181     return;
+00182     }
+00183   if (tmpFd->perms == 0x0) {
+00184     kprintf("Exec Format Error: Binary File Not Executable.\n");
+00185     fclose(tmpFd);
+00186     return;
+00187     }
+00188 
+00189   /* Load ELF Header */
+00190   binaryHeader = (elfHeader *)kmalloc(sizeof(elfHeader));
+00191 
+00192 
+00193   //kprintf(">a:%i:0x%X:0x%X<",sizeof(elfHeader),binaryHeader,tmpFd);
+00194   fread(binaryHeader,sizeof(elfHeader),1,tmpFd);
+00195 
+00196 
+00197   /* Check If App Is A Real Application */
+00198   if ((binaryHeader->eIdent[1] != 'E') && (binaryHeader->eIdent[2] != 'L') && (binaryHeader->eIdent[3] != 'F')) {
+00199     kprintf("Exec Format Error: Binary File Not Executable.\n");
+00200     kfree(binaryHeader);
+00201     fclose(tmpFd);
+00202     return;
+00203     }
+00204   else if (binaryHeader->eType != 2) {
+00205     kprintf("Exec Format Error: Binary File Not Executable.\n");
+00206     kfree(binaryHeader);
+00207     fclose(tmpFd);
+00208     return;
+00209     }
+00210   else if (binaryHeader->eEntry == 0x300000) {
+00211     kprintf("Exec Format Error: Binary File Not Executable.\n");
+00212     kfree(binaryHeader);
+00213     fclose(tmpFd);
+00214     return;
+00215     }
+00216 
+00217   /* Load The Program Header(s) */
+00218   programHeader = (elfProgramHeader *)kmalloc(sizeof(elfProgramHeader)*binaryHeader->ePhnum);
+00219   fseek(tmpFd,binaryHeader->ePhoff,0);
+00220 
+00221   //kprintf(">c:%i:0x%X:0x%X<",sizeof(elfProgramHeader)*binaryHeader->ePhnum,programHeader,tmpFd);
+00222   fread(programHeader,(sizeof(elfProgramHeader)*binaryHeader->ePhnum),1,tmpFd);
+00223   //kprintf(">d<");
+00224 
+00225   /* Loop Through The Header And Load Sections Which Need To Be Loaded */
+00226   for (i=0;i<binaryHeader->ePhnum;i++) {
+00227     if (programHeader[i].phType == 1) {
+00228       /*
+00229       Allocate Memory Im Going To Have To Make This Load Memory With Correct
+00230       Settings so it helps us in the future
+00231       */
+00232       for (x = 0x0;x < (programHeader[i].phMemsz);x += 0x1000) {
+00233         /* Make readonly and read/write !!! */
+00234         if (vmm_remapPage(vmmFindFreePage(_current->id),((programHeader[i].phVaddr & 0xFFFFF000) + x),PAGE_DEFAULT) == 0x0)
+00235           K_PANIC("Remap Page Failed");
+00236 
+00237         memset((void *)((programHeader[i].phVaddr & 0xFFFFF000) + x),0x0,0x1000);
+00238         }
+00239       _current->oInfo.vmStart = 0x80000000;
+00240       _current->td.vm_daddr = (char *)(programHeader[i].phVaddr & 0xFFFFF000);
+00241       /* Now Load Section To Memory */
+00242       fseek(tmpFd,programHeader[i].phOffset,0);
+00243       fread((void *)programHeader[i].phVaddr,programHeader[i].phFilesz,1,tmpFd);
+00244       if ((programHeader[i].phFlags & 0x2) != 0x2) {
+00245         kprintf("pH: [0x%X]\n",programHeader[i].phMemsz);
+00246         for (x = 0x0;x < (programHeader[i].phMemsz);x += 0x1000) {
+00247           if ((vmm_setPageAttributes((programHeader[i].phVaddr & 0xFFFFF000) + x,PAGE_PRESENT | PAGE_USER)) != 0x0)
+00248             kpanic("Error: vmm_setPageAttributes failed, File: %s, Line: %i\n",__FILE__,__LINE__);
+00249           }
+00250         }
+00251       }
+00252     }
+00253 
+00254   /* Set Virtual Memory Start */
+00255   _current->oInfo.vmStart = 0x80000000;
+00256   _current->td.vm_daddr = (char *)(programHeader[i].phVaddr & 0xFFFFF000);
+00257 
+00258   /* Set Up Stack Space */
+00259   for (x = 1;x < 100;x++) {
+00260     vmm_remapPage(vmmFindFreePage(_current->id),STACK_ADDR - (x * 0x1000),PAGE_DEFAULT | PAGE_STACK);
+00261     }
+00262 
+00263   /* Kernel Stack 0x2000 bytes long */
+00264   vmm_remapPage(vmmFindFreePage(_current->id),0x5BC000,KERNEL_PAGE_DEFAULT | PAGE_STACK);
+00265   vmm_remapPage(vmmFindFreePage(_current->id),0x5BB000,KERNEL_PAGE_DEFAULT | PAGE_STACK);
+00266 
+00267   /* Set All The Proper Information For The Task */
+00268   _current->tss.back_link    = 0x0;
+00269   _current->tss.esp0         = 0x5BC000;
+00270   _current->tss.ss0          = 0x10;
+00271   _current->tss.esp1         = 0x0;
+00272   _current->tss.ss1          = 0x0;
+00273   _current->tss.esp2         = 0x0;
+00274   _current->tss.ss2          = 0x0;
+00275   _current->tss.eip          = (long)binaryHeader->eEntry;
+00276   _current->tss.eflags       = 0x206;
+00277   _current->tss.esp          = STACK_ADDR - 12;
+00278   _current->tss.ebp          = STACK_ADDR;
+00279   _current->tss.esi          = 0x0;
+00280   _current->tss.edi          = 0x0;
+00281 
+00282   /* Set these up to be ring 3 tasks */
+00283   _current->tss.es           = 0x30+3;
+00284   _current->tss.cs           = 0x28+3;
+00285   _current->tss.ss           = 0x30+3;
+00286   _current->tss.ds           = 0x30+3;
+00287   _current->tss.fs           = 0x30+3;
+00288   _current->tss.gs           = 0x30+3;
+00289 
+00290   _current->tss.ldt          = 0x18;
+00291   _current->tss.trace_bitmap = 0x0000;
+00292   _current->tss.io_map       = 0x8000;
+00293 
+00294   sched_setStatus(_current->id,READY);
+00295 
+00296   kfree(binaryHeader);
+00297   kfree(programHeader);
+00298   fclose(tmpFd);
+00299 
+00300   tmp = (uInt32 *)_current->tss.esp0 - 5;
+00301   tmp[0] = binaryHeader->eEntry;
+00302   tmp[3] = STACK_ADDR - 12;
+00303 
+00304   tmp = (uInt32 *)STACK_ADDR - 2;
+00305 
+00306   if (_current->id > 4)
+00307   kprintf("argv[0]: [%s]\n",argv[0]);
+00308   kprintf("argv: [0x%X]\n",argv);
+00309   tmp[0] = (u_int32_t)argv;
+00310   tmp[1] = (u_int32_t)argv;
+00311 
+00312 
+00313   /* Switch Back To The Kernels VM Space */
+00314   asm volatile(
+00315     "movl %0,%%eax          \n"
+00316     "movl %%eax,%%cr3       \n"
+00317     : : "d" ((uInt32 *)(kernelPageDirectory))
+00318     );
+00319 
+00320   /* Finally Return */
+00321   return;
+00322   }
+00323 
+00324 /*****************************************************************************************
+00325 
+00326  Function: void sysExec();
+00327  Description: This Is The System Call To Execute A New Task
+00328 
+00329  Notes:
+00330  04-22-03 - It Now Loads Sections Not The Full File
+00331 
+00332 *****************************************************************************************/
+00333 void sysExec(char *file,int argc,char **argv) {
+00334   int     i           = 0x0;
+00335   int     x           = 0x0;
+00336   uInt32 *tmp         = 0x0;
+00337   uInt32  ldAddr      = 0x0;
+00338   uInt32  seg_size    = 0x0;
+00339   uInt32  seg_addr    = 0x0;
+00340   char   *interp      = 0x0;
+00341 
+00342   fileDescriptor   *tmpFd         = 0x0;
+00343   elfHeader        *binaryHeader  = 0x0;
+00344   elfProgramHeader *programHeader = 0x0;
+00345   elfSectionHeader *sectionHeader = 0x0;
+00346   elfDynamic       *elfDynamicS   = 0x0;
+00347 
+00348   tmpFd = fopen(file,"r");
+00349   _current->imageFd = tmpFd;
+00350   /* If We Dont Find the File Return */
+00351   if (tmpFd == 0x0) {
+00352     return;
+00353     }
+00354   if (tmpFd->perms == 0) {
+00355     kprintf("Exec Format Error: Binary File Not Executable.\n");
+00356     fclose(tmpFd);
+00357     return;
+00358     }
+00359 
+00360   /* Load ELF Header */
+00361 
+00362   if ((binaryHeader = (elfHeader *)kmalloc(sizeof(elfHeader))) == 0x0) 
+00363     endTask(_current->id);
+00364     fread(binaryHeader,sizeof(elfHeader),1,tmpFd);
+00365     /* Set sectionHeader To Point To Loaded Binary To We Can Gather Info */
+00366 
+00367   /* Check If App Is A Real Application */
+00368   if ((binaryHeader->eIdent[1] != 'E') && (binaryHeader->eIdent[2] != 'L') && (binaryHeader->eIdent[3] != 'F')) {
+00369     kprintf("Exec Format Error: Binary File Not Executable.\n");
+00370     kfree(binaryHeader);
+00371     fclose(tmpFd);
+00372 
+00373     return;
+00374     }
+00375   else if (binaryHeader->eType != 2) {
+00376     kprintf("Exec Format Error: Binary File Not Executable.\n");
+00377     kfree(binaryHeader);
+00378     fclose(tmpFd);
+00379     return;
+00380     }
+00381   else if (binaryHeader->eEntry == 0x300000) {
+00382     kprintf("Exec Format Error: Binary File Not Executable.\n");
+00383     kfree(binaryHeader);
+00384     fclose(tmpFd);
+00385     return;
+00386     }
+00387 
+00388   /* Load The Program Header(s) */
+00389   if ((programHeader = (elfProgramHeader *)kmalloc(sizeof(elfProgramHeader)*binaryHeader->ePhnum)) == 0x0)
+00390     endTask(_current->id);
+00391 
+00392   assert(programHeader);
+00393   fseek(tmpFd,binaryHeader->ePhoff,0);
+00394   fread(programHeader,(sizeof(elfProgramHeader)*binaryHeader->ePhnum),1,tmpFd);
+00395 
+00396   if ((sectionHeader = (elfSectionHeader *)kmalloc(sizeof(elfSectionHeader)*binaryHeader->eShnum)) == 0x0)
+00397     endTask(_current->id);
+00398 
+00399   assert(sectionHeader);
+00400   fseek(tmpFd,binaryHeader->eShoff,0);
+00401   fread(sectionHeader,sizeof(elfSectionHeader)*binaryHeader->eShnum,1,tmpFd);
+00402 
+00403   /* Loop Through The Header And Load Sections Which Need To Be Loaded */
+00404   for (i=0;i<binaryHeader->ePhnum;i++) {
+00405     switch (programHeader[i].phType) {
+00406       case PT_LOAD:
+00407         seg_addr = trunc_page(programHeader[i].phVaddr);
+00408         seg_size = round_page(programHeader[i].phMemsz + programHeader[i].phVaddr - seg_addr);
+00409 
+00410         /*
+00411         Allocate Memory Im Going To Have To Make This Load Memory With Correct
+00412         Settings so it helps us in the future
+00413         */
+00414         for (x = 0x0;x < (programHeader[i].phMemsz);x += 0x1000) {
+00415           /* Make readonly and read/write !!! */
+00416           if (vmm_remapPage(vmmFindFreePage(_current->id),((programHeader[i].phVaddr & 0xFFFFF000) + x),PAGE_DEFAULT) == 0x0)
+00417             K_PANIC("Error: Remap Page Failed");
+00418           memset((void *)((programHeader[i].phVaddr & 0xFFFFF000) + x),0x0,0x1000);
+00419           }
+00420 
+00421         /* Now Load Section To Memory */
+00422         fseek(tmpFd,programHeader[i].phOffset,0);
+00423         fread((void *)programHeader[i].phVaddr,programHeader[i].phFilesz,1,tmpFd);
+00424         if ((programHeader[i].phFlags & 0x2) != 0x2) {
+00425           for (x = 0x0;x < (programHeader[i].phMemsz);x += 0x1000) {
+00426             if ((vmm_setPageAttributes((programHeader[i].phVaddr & 0xFFFFF000) + x,PAGE_PRESENT | PAGE_USER)) != 0x0)
+00427               kpanic("Error: vmm_setPageAttributes failed, File: %s,Line: %i\n",__FILE__,__LINE__);
+00428             }
+00429           }
+00430         kprintf("setting daddr\n");
+00431         if (binaryHeader->eEntry >= programHeader[i].phVaddr && binaryHeader->eEntry < (programHeader[i].phVaddr + programHeader[i].phMemsz)) {
+00432           /* We're suposed to do something here? */
+00433           }
+00434         else {
+00435           _current->td.vm_dsize = seg_size >> PAGE_SHIFT;
+00436           _current->td.vm_daddr = (char *)seg_addr;
+00437           }
+00438 
+00439         _current->oInfo.vmStart = ((programHeader[i].phVaddr & 0xFFFFF000) + 0xA900000);
+00440         break;
+00441       case PT_DYNAMIC:
+00442         //newLoc = (char *)programHeader[i].phVaddr;
+00443         elfDynamicS = (elfDynamic *)programHeader[i].phVaddr;
+00444         fseek(tmpFd,programHeader[i].phOffset,0);
+00445         fread((void *)programHeader[i].phVaddr,programHeader[i].phFilesz,1,tmpFd);
+00446         break;
+00447       case PT_INTERP:
+00448         interp = (char *)kmalloc(programHeader[i].phFilesz);
+00449         fseek(tmpFd,programHeader[i].phOffset,0);
+00450         fread((void *)interp,programHeader[i].phFilesz,1,tmpFd);
+00451         kprintf("Interp: [%s]\n",interp);
+00452         ldAddr = ldEnable();
+00453         break;
+00454       default:
+00455         break;
+00456       }
+00457     }
+00458 
+00459   /* What is this doing? 11/23/06 */
+00460   if (elfDynamicS != 0x0) {
+00461     for (i=0;i<12;i++) {
+00462       if (elfDynamicS[i].dynVal == 0x3) {
+00463         tmp = (uInt32 *)elfDynamicS[i].dynPtr;
+00464         if (tmp == 0x0)
+00465           kpanic("tmp: NULL\n");
+00466         tmp[2] = (uInt32)ldAddr;
+00467         tmp[1] = (uInt32)tmpFd;
+00468         break;
+00469         }
+00470       }
+00471     }
+00472           _current->td.vm_dsize = seg_size >> PAGE_SHIFT;
+00473           _current->td.vm_daddr = (char *)seg_addr;
+00474 
+00475   vmm_cleanVirtualSpace(_current->td.vm_daddr + (_current->td.vm_dsize << PAGE_SIZE));
+00476 
+00477   /* Adjust iframe */
+00478   tmp = (uInt32 *)_current->tss.esp0 - 5;
+00479   tmp[0] = binaryHeader->eEntry;
+00480   tmp[3] = STACK_ADDR - 12;
+00481 
+00482   tmp = (uInt32 *)STACK_ADDR - 2;
+00483   kprintf("argv: [0x%X]\n",argv);
+00484   tmp[0] = (u_int32_t)argv;
+00485   tmp[1] = (u_int32_t)argv;
+00486 
+00487  /* Now That We Relocated The Binary We Can Unmap And Free Header Info */
+00488   kfree(binaryHeader);
+00489   kfree(programHeader);
+00490 
+00491   return;
+00492   }
+00493 
+00494 /***
+00495  END
+00496  ***/
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/exec_8c.html b/doc/html/exec_8c.html new file mode 100644 index 0000000..aa28fde --- /dev/null +++ b/doc/html/exec_8c.html @@ -0,0 +1,212 @@ + + +UbixOS V2: src/sys/kernel/exec.c File Reference + + + + +
+
+
+
+ +

exec.c File Reference

+

+#include <ubixos/exec.h>
+#include <ubixos/sched.h>
+#include <ubixos/ld.h>
+#include <ubixos/kpanic.h>
+#include <ubixos/endtask.h>
+#include <vmm/vmm.h>
+#include <lib/kmalloc.h>
+#include <lib/kprintf.h>
+#include <lib/string.h>
+#include <assert.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + +

Defines

#define STACK_ADDR   0xC800000

Functions

void execFile (char *file, int argc, char **argv, int console)
uInt32 execThread (void(*tproc)(void), uInt32 stack, char *arg)
void sysExec (char *file, int argc, char **argv)
+


Define Documentation

+ +
+
+ + + + +
#define STACK_ADDR   0xC800000
+
+
+ +

+ +

+Definition at line 41 of file exec.c. +

+Referenced by execFile(), and sysExec(). +

+

+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void execFile (char *  file,
int  argc,
char **  argv,
int  console 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
uInt32 execThread (void(*)(void)  tproc,
uInt32  stack,
char *  arg 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void sysExec (char *  file,
int  argc,
char **  argv 
)
+
+ +

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/exec_8h-source.html b/doc/html/exec_8h-source.html new file mode 100644 index 0000000..eddaf4f --- /dev/null +++ b/doc/html/exec_8h-source.html @@ -0,0 +1,97 @@ + + +UbixOS V2: src/sys/include/ubixos/exec.h Source File + + + + +
+
+
+
+ +

exec.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _EXEC_H
+00031 #define _EXEC_H
+00032 
+00033 #include <ubixos/types.h>
+00034 #include <ubixos/sched.h>
+00035 
+00036 uInt32 execThread(void (* tproc)(void),uInt32,char *);
+00037 void execFile(char *file,int argc,char **argv,int console);
+00038 
+00039 #endif
+00040 
+00041 /***
+00042  $Log$
+00043  Revision 1.1.1.1  2006/06/01 12:46:13  reddawg
+00044  ubix2
+00045 
+00046  Revision 1.2  2005/10/12 00:13:37  reddawg
+00047  Removed
+00048 
+00049  Revision 1.1.1.1  2005/09/26 17:23:54  reddawg
+00050  no message
+00051 
+00052  Revision 1.5  2004/07/27 07:27:50  reddawg
+00053  chg: I was fooled thought we failed but it was a casting issue
+00054 
+00055  Revision 1.4  2004/05/21 15:20:00  reddawg
+00056  Cleaned up
+00057 
+00058 
+00059  END
+00060  ***/
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/exec_8h.html b/doc/html/exec_8h.html new file mode 100644 index 0000000..5c674ee --- /dev/null +++ b/doc/html/exec_8h.html @@ -0,0 +1,140 @@ + + +UbixOS V2: src/sys/include/ubixos/exec.h File Reference + + + + +
+
+
+
+ +

exec.h File Reference

+

+#include <ubixos/types.h>
+#include <ubixos/sched.h>
+ +

+Go to the source code of this file. + + + + + + +

Functions

void execFile (char *file, int argc, char **argv, int console)
uInt32 execThread (void(*tproc)(void), uInt32, char *)
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void execFile (char *  file,
int  argc,
char **  argv,
int  console 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
uInt32 execThread (void(*)(void)  tproc,
uInt32 ,
char *  
)
+
+ +

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/fdc_8c-source.html b/doc/html/fdc_8c-source.html new file mode 100644 index 0000000..240fc4d --- /dev/null +++ b/doc/html/fdc_8c-source.html @@ -0,0 +1,451 @@ + + +UbixOS V2: src/sys/isa/fdc.c Source File + + + + +
+
+
+
+ +

fdc.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <isa/fdc.h>
+00031 #include <isa/8259.h>
+00032 #include <sys/video.h>
+00033 #include <sys/gdt.h>
+00034 #include <sys/idt.h>
+00035 #include <ubixos/types.h>
+00036 #include <ubixos/spinlock.h>
+00037 #include <sys/io.h>
+00038 #include <sys/dma.h>
+00039 #include <sys/device.h>
+00040 #include <lib/kprintf.h>
+00041 #include <lib/kmalloc.h>
+00042 #include <devfs/devfs.h>
+00043 
+00044 static spinLock_t fdcSpinLock = SPIN_LOCK_INITIALIZER;
+00045 
+00046 static volatile bool done = FALSE;
+00047 static drvGeom geometry = { dg144Heads,dg144Tracks,dg144Spt };
+00048 static bool diskChange = FALSE;
+00049 static bool motor = FALSE;
+00050 static volatile Int8 fdcTrack = 0xff;
+00051 static Int8 sr0 = 0;
+00052 static volatile int timeOut = 0;
+00053 static Int8 statSize = 0;
+00054 static Int8 status[7] = { 0 };
+00055 
+00056 unsigned long tbaddr = 0x80000L;
+00057 
+00058 int fdcInit2(struct device_node *dev) {
+00059   dev->devInfo->size = (1024 * 1450);
+00060   return(0x0);
+00061   }
+00062 
+00063 int fdc_init() {
+00064   struct device_interface *devInfo = (struct device_interface *)kmalloc(sizeof(struct device_interface));
+00065   setVector(floppyIsr, mVec+6, (dInt+dPresent));
+00066   irqEnable(6);
+00067   reset();
+00068   devInfo->major = 0x0;
+00069   devInfo->init  = (void *)&fdcInit2;
+00070   devInfo->read  = fdcRead;
+00071   devInfo->write = fdcWrite;
+00072   devInfo->reset = (void *)reset;
+00073   
+00074   device_add(0,'c',devInfo);
+00075   devfs_makeNode("fd0",'b',0x0,0x0);
+00076   return(0x0);
+00077   }
+00078 
+00079 asm(
+00080   ".globl floppyIsr      \n"
+00081   "floppyIsr:            \n"
+00082   "  pusha               \n"
+00083   "  push %ss            \n"
+00084   "  push %ds            \n"
+00085   "  push %es            \n"
+00086   "  push %fs            \n"
+00087   "  push %gs            \n"
+00088   "  call floppyIsrhndlr \n"
+00089   "  pop %gs             \n"
+00090   "  pop %fs             \n" 
+00091   "  pop %es             \n"
+00092   "  pop %ds             \n"
+00093   "  pop %ss             \n"
+00094   "  popa                \n"
+00095   "  iret                \n"
+00096   );
+00097 
+00098 void floppyIsrhndlr() {
+00099   done = TRUE;
+00100   outportByte(0x20,0x20);
+00101   }
+00102 
+00103 void sendByte(int Int8) {
+00104   volatile int msr;
+00105   int tmo;
+00106   for (tmo=0;tmo<128;tmo++) {
+00107     msr = inportByte(fdcMsr);
+00108     if ((msr & 0xc0) == 0x80) {
+00109       outportByte(fdcData,Int8);
+00110       return;
+00111       }
+00112     inportByte(0x80);
+00113     }
+00114   }
+00115 
+00116 int getByte() {
+00117   volatile int msr;
+00118   int tmo;
+00119   for (tmo=0;tmo<128;tmo++) {
+00120     msr = inportByte(fdcMsr);
+00121     if ((msr & 0xd0) == 0xd0) {
+00122       return inportByte(fdcData);
+00123       }
+00124     inportByte(0x80);
+00125     }
+00126   return(-1);
+00127   }
+00128 
+00129 bool fdcRw(int block,Int8 *blockBuffer,bool read,unsigned long numSectors) {
+00130   int head = 0x0,track = 0x0,sector = 0x0,tries= 0x0, copyCount = 0x0;
+00131   unsigned char *p_tbaddr = (char *)0x80000;
+00132   unsigned char *p_blockbuff = blockBuffer;
+00133   //kprintf("Block: [%i]\n",block);
+00134   block2Hts(block,&head,&track,&sector);
+00135   motorOn();
+00136   if (!read && blockBuffer) {
+00137     /* copy data from data buffer into track buffer */
+00138     for (copyCount=0; copyCount<(numSectors*512); copyCount++) {
+00139       *p_tbaddr = *p_blockbuff;
+00140       p_blockbuff++;
+00141       p_tbaddr++;
+00142       }
+00143     }
+00144   for (tries = 0;tries < 3;tries++) {
+00145     if (inportByte(fdcDir) & 0x80) {
+00146       diskChange = TRUE;
+00147       seek(1);  /* clear "disk change" status */
+00148       recalibrate();
+00149       motorOff();
+00150       kprint("FDC: Disk change detected. Trying again.\n");
+00151       return fdcRw(block, blockBuffer, read, numSectors);
+00152       }
+00153     if (!seek(track)) {
+00154       motorOff();
+00155       kprintf("FDC: Error seeking to track [%i]\n",block);
+00156       return FALSE;
+00157       }
+00158     outportByte(fdcCcr,0);
+00159     if (read) {
+00160       dmaXfer(2,tbaddr,numSectors*512,FALSE);
+00161       sendByte(cmdRead);
+00162       }
+00163     else {
+00164       dmaXfer(2,tbaddr,numSectors*512,TRUE);
+00165       sendByte(cmdWrite);
+00166       }
+00167     sendByte(head << 2);
+00168     sendByte(track);
+00169     sendByte(head);
+00170     sendByte(sector);
+00171     sendByte(2);               /* 512 Int8s/sector */
+00172     sendByte(geometry.spt);
+00173     if (geometry.spt == dg144Spt) {
+00174       sendByte(dg144Gap3rw);  /* gap 3 size for 1.44M read/write */
+00175       }
+00176     else {
+00177       sendByte(dg168Gap3rw);  /* gap 3 size for 1.68M read/write */
+00178       }
+00179     sendByte(0xff);            /* DTL = unused */
+00180     if (!waitFdc(TRUE)) {
+00181       kprint("Timed out, trying operation again after reset()\n");
+00182       reset();
+00183       return fdcRw(block, blockBuffer, read, numSectors);
+00184       }
+00185     if ((status[0] & 0xc0) == 0) break;   /* worked! outta here! */
+00186     recalibrate();  /* oops, try again... */
+00187     }
+00188   motorOff();
+00189   if (read && blockBuffer) {
+00190     p_blockbuff = blockBuffer;
+00191     p_tbaddr = (char *) 0x80000;
+00192     for (copyCount=0x0; copyCount<(numSectors*512); copyCount++) {
+00193       *p_blockbuff = *p_tbaddr;
+00194       p_blockbuff++;
+00195       p_tbaddr++;
+00196       }
+00197     }
+00198   return (tries != 3);
+00199   }
+00200 
+00201 void block2Hts(int block,int *head,int *track,int *sector) {
+00202   *head = (block % (geometry.spt * geometry.heads)) / (geometry.spt);
+00203   *track = block / (geometry.spt * geometry.heads);
+00204   *sector = block % geometry.spt + 1;
+00205   }
+00206 
+00207 void motorOn(void) {
+00208   if (motor == FALSE) {
+00209     outportByte(fdcDor,0x1c);
+00210     motor = TRUE;
+00211     }
+00212   }
+00213 
+00214 void motorOff(void) {
+00215   if (motor == TRUE) {
+00216     //outportByte(fdcDor,0x0);
+00217     //outportByte(fdcDor,0x0C);
+00218     motor = FALSE;
+00219     }
+00220   }
+00221 
+00222 bool seek(int track) {
+00223   if (fdcTrack == track) {
+00224     return(TRUE);
+00225     }
+00226   sendByte(cmdSeek);
+00227   sendByte(0);
+00228   sendByte(track);
+00229   if (!waitFdc(TRUE)) {
+00230     kprintf("wait fdc failed\n");
+00231     return(FALSE);
+00232     }
+00233   if ((sr0 != 0x20) || (fdcTrack != track)) {
+00234     return(FALSE);
+00235     }
+00236   else {
+00237     return(TRUE);
+00238     }
+00239   }
+00240 
+00241 bool readBlock(int block,Int8 *blockBuffer, unsigned long numSectors) {
+00242   int result = 0x0,loop = 0x0;
+00243   if (numSectors > 1) {
+00244     for (loop=0; loop<numSectors; loop++) {
+00245       result = fdcRw(block+loop, blockBuffer+(loop*512), TRUE, 1);
+00246       }
+00247     return result;
+00248     }
+00249   return fdcRw(block,blockBuffer,TRUE,numSectors);
+00250   }
+00251 
+00252 bool writeBlock(int block,Int8 *blockBuffer, unsigned long numSectors) {
+00253   return fdcRw(block,blockBuffer,FALSE, numSectors);
+00254   }
+00255 
+00256 bool waitFdc(bool sensei) {
+00257   timeOut = 50000;
+00258   while (!done && timeOut);
+00259   statSize = 0;
+00260   while ((statSize < 7) && (inportByte(fdcMsr) & (1<<4))) {
+00261     status[(int)statSize++] = getByte();
+00262     }
+00263   if (sensei) {
+00264     sendByte(cmdSensei);
+00265     sr0 = getByte();
+00266     fdcTrack = getByte();
+00267     }
+00268   done = FALSE;
+00269   if (!timeOut) {
+00270     if (inportByte(fdcDir) & 0x80) {
+00271       diskChange = TRUE;
+00272       }
+00273     return(FALSE);
+00274     }
+00275   else {
+00276     return(TRUE);
+00277     }
+00278   }
+00279 
+00280 void recalibrate(void) {
+00281   motorOn();
+00282   sendByte(cmdRecal);
+00283   sendByte(0);
+00284   waitFdc(TRUE);
+00285   motorOff();
+00286   }
+00287 
+00288 void reset(void) {
+00289   outportByte(fdcDor,0);
+00290   motor = FALSE;
+00291   outportByte(fdcDor,0x0c);
+00292   done = TRUE;
+00293   waitFdc(TRUE);
+00294   sendByte(cmdSpecify);
+00295   sendByte(0xdf);
+00296   sendByte(0x02);
+00297   seek(1);
+00298   recalibrate();
+00299   diskChange = FALSE;
+00300   return;
+00301   }
+00302 
+00303 void fdcRead(void *info,void *baseAddr,uInt32 startSector,uInt32 sectorCount) {
+00304   spinLock(&fdcSpinLock);
+00305   readBlock(startSector,baseAddr,sectorCount);
+00306   spinUnlock(&fdcSpinLock);
+00307   return;
+00308   }
+00309 void fdcWrite(void *info,void *baseAddr,uInt32 startSector,uInt32 sectorCount){
+00310   writeBlock(startSector,baseAddr,sectorCount);
+00311   return;
+00312   }
+00313 
+00314 /***
+00315 
+00316  $Log$
+00317  Revision 1.1.1.1  2006/06/01 12:46:12  reddawg
+00318  ubix2
+00319 
+00320  Revision 1.2  2005/10/12 00:13:37  reddawg
+00321  Removed
+00322 
+00323  Revision 1.1.1.1  2005/09/26 17:24:01  reddawg
+00324  no message
+00325 
+00326  Revision 1.24  2004/09/07 21:54:38  reddawg
+00327  ok reverted back to old scheduling for now....
+00328 
+00329  Revision 1.23  2004/09/06 15:13:25  reddawg
+00330  Last commit before FreeBSD 6.0
+00331 
+00332  Revision 1.22  2004/08/21 20:06:28  reddawg
+00333  ok check out exec.c
+00334 
+00335  Revision 1.21  2004/08/15 16:47:49  reddawg
+00336  Fixed
+00337 
+00338  Revision 1.20  2004/08/15 00:33:02  reddawg
+00339  Wow the ide driver works again
+00340 
+00341  Revision 1.19  2004/08/01 20:40:45  reddawg
+00342  Net related fixes
+00343 
+00344  Revision 1.18  2004/07/29 21:32:16  reddawg
+00345  My quick lunchs breaks worth of updates....
+00346 
+00347  Revision 1.17  2004/07/27 08:03:36  reddawg
+00348  chg: stopped push all these extra registers I can't find a good reason as to why I was doing it
+00349 
+00350  Revision 1.16  2004/07/22 17:32:25  reddawg
+00351  I broke it hopefully
+00352 
+00353  Revision 1.15  2004/07/21 10:02:09  reddawg
+00354  devfs: renamed functions
+00355  device system: renamed functions
+00356  fdc: fixed a few potential bugs and cleaned up some unused variables
+00357  strol: fixed definition
+00358  endtask: made it print out freepage debug info
+00359  kmalloc: fixed a huge memory leak we had some unhandled descriptor insertion so some descriptors were lost
+00360  ld: fixed a pointer conversion
+00361  file: cleaned up a few unused variables
+00362  sched: broke task deletion
+00363  kprintf: fixed ogPrintf definition
+00364 
+00365  Revision 1.14  2004/07/17 02:38:31  reddawg
+00366  Fixed a few problems
+00367 
+00368  Revision 1.13  2004/07/14 12:42:46  reddawg
+00369  fdc: fdcInit to fdc_init
+00370  Changed Startup Routines
+00371 
+00372  Revision 1.12  2004/06/04 10:19:42  reddawg
+00373  notes: we compile again, thank g-d anyways i was about to cry
+00374 
+00375  Revision 1.11  2004/05/20 22:51:09  reddawg
+00376  Cleaned Up Warnings
+00377 
+00378  Revision 1.10  2004/05/19 23:36:52  reddawg
+00379  Bug Fixes
+00380 
+00381  Revision 1.9  2004/05/19 15:31:27  reddawg
+00382  Fixed up the rest of the references
+00383 
+00384  Revision 1.8  2004/05/19 15:26:33  reddawg
+00385  Fixed reference issues due to changes in driver subsystem
+00386 
+00387  Revision 1.7  2004/05/10 02:23:24  reddawg
+00388  Minor Changes To Source Code To Prepare It For Open Source Release
+00389 
+00390  Revision 1.6  2004/04/30 14:16:04  reddawg
+00391  Fixed all the datatypes to be consistant uInt8,uInt16,uInt32,Int8,Int16,Int32
+00392 
+00393  Revision 1.5  2004/04/29 15:29:20  reddawg
+00394  Fixed All Running Issues
+00395 
+00396  Revision 1.4  2004/04/28 02:22:54  reddawg
+00397  This is a fiarly large commit but we are starting to use new driver model
+00398  all around
+00399 
+00400  Revision 1.3  2004/04/26 22:22:33  reddawg
+00401  DevFS now uses correct size of device
+00402 
+00403  Revision 1.2  2004/04/22 21:20:05  reddawg
+00404  FDC now adds drives to the devfs
+00405 
+00406  Revision 1.1.1.1  2004/04/15 12:07:09  reddawg
+00407  UbixOS v1.0
+00408 
+00409  Revision 1.6  2004/04/13 16:36:33  reddawg
+00410  Changed our copyright, it is all now under a BSD-Style license
+00411 
+00412  END
+00413  ***/
+00414 
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/fdc_8c.html b/doc/html/fdc_8c.html new file mode 100644 index 0000000..8cfa131 --- /dev/null +++ b/doc/html/fdc_8c.html @@ -0,0 +1,897 @@ + + +UbixOS V2: src/sys/isa/fdc.c File Reference + + + + +
+
+
+
+ +

fdc.c File Reference

+

+#include <isa/fdc.h>
+#include <isa/8259.h>
+#include <sys/video.h>
+#include <sys/gdt.h>
+#include <sys/idt.h>
+#include <ubixos/types.h>
+#include <ubixos/spinlock.h>
+#include <sys/io.h>
+#include <sys/dma.h>
+#include <sys/device.h>
+#include <lib/kprintf.h>
+#include <lib/kmalloc.h>
+#include <devfs/devfs.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Functions

 asm (".globl floppyIsr \n""floppyIsr: \n"" pusha \n"" push %ss \n"" push %ds \n"" push %es \n"" push %fs \n"" push %gs \n"" call floppyIsrhndlr \n"" pop %gs \n"" pop %fs \n"" pop %es \n"" pop %ds \n"" pop %ss \n"" popa \n"" iret \n")
void block2Hts (int block, int *head, int *track, int *sector)
int fdc_init ()
int fdcInit2 (struct device_node *dev)
void fdcRead (void *info, void *baseAddr, uInt32 startSector, uInt32 sectorCount)
bool fdcRw (int block, Int8 *blockBuffer, bool read, unsigned long numSectors)
void fdcWrite (void *info, void *baseAddr, uInt32 startSector, uInt32 sectorCount)
void floppyIsrhndlr ()
int getByte ()
void motorOff (void)
void motorOn (void)
bool readBlock (int block, Int8 *blockBuffer, unsigned long numSectors)
void recalibrate (void)
void reset (void)
bool seek (int track)
void sendByte (int Int8)
bool waitFdc (bool sensei)
bool writeBlock (int block, Int8 *blockBuffer, unsigned long numSectors)

Variables

static bool diskChange = FALSE
static volatile bool done = FALSE
static spinLock_t fdcSpinLock = SPIN_LOCK_INITIALIZER
static volatile Int8 fdcTrack = 0xff
static drvGeom geometry = { dg144Heads,dg144Tracks,dg144Spt }
static bool motor = FALSE
static Int8 sr0 = 0
static Int8 statSize = 0
static Int8 status [7] = { 0 }
unsigned long tbaddr = 0x80000L
static volatile int timeOut = 0
+


Function Documentation

+ +
+
+ + + + + + + + + +
asm (".globl floppyIsr \n""floppyIsr: \n"" pusha \n"" push %ss \n"" push %ds \n"" push %es \n"" push %fs \n"" push %gs \n"" call floppyIsrhndlr \n"" pop %gs \n"" pop %fs \n"" pop %es \n"" pop %ds \n"" pop %ss \n"" popa \n"" iret \n"   ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void block2Hts (int  block,
int *  head,
int *  track,
int *  sector 
)
+
+
+ +

+ +

+Definition at line 201 of file fdc.c. +

+References geometry, DrvGeom::heads, and DrvGeom::spt. +

+Referenced by fdcRw(). +

+

+ +

+
+ + + + + + + + +
int fdc_init (  ) 
+
+ +

+ +

+
+ + + + + + + + + +
int fdcInit2 (struct device_node dev  ) 
+
+
+ +

+ +

+Definition at line 58 of file fdc.c. +

+References dev. +

+Referenced by fdc_init(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void fdcRead (void *  info,
void *  baseAddr,
uInt32  startSector,
uInt32  sectorCount 
)
+
+
+ +

+ +

+Definition at line 303 of file fdc.c. +

+References fdcSpinLock, readBlock(), spinLock(), and spinUnlock(). +

+Referenced by fdc_init(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool fdcRw (int  block,
Int8 blockBuffer,
bool  read,
unsigned long  numSectors 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void fdcWrite (void *  info,
void *  baseAddr,
uInt32  startSector,
uInt32  sectorCount 
)
+
+
+ +

+ +

+Definition at line 309 of file fdc.c. +

+References writeBlock(). +

+Referenced by fdc_init(). +

+

+ +

+
+ + + + + + + + +
void floppyIsrhndlr (  ) 
+
+
+ +

+ +

+Definition at line 98 of file fdc.c. +

+References done, outportByte(), TRUE, and x20. +

+

+ +

+
+ + + + + + + + +
int getByte (  ) 
+
+
+ +

+ +

+Definition at line 116 of file fdc.c. +

+References fdcData, fdcMsr, and inportByte(). +

+Referenced by waitFdc(). +

+

+ +

+
+ + + + + + + + + +
void motorOff (void   ) 
+
+
+ +

+ +

+Definition at line 214 of file fdc.c. +

+References FALSE, motor, and TRUE. +

+Referenced by fdcRw(), and recalibrate(). +

+

+ +

+
+ + + + + + + + + +
void motorOn (void   ) 
+
+
+ +

+ +

+Definition at line 207 of file fdc.c. +

+References FALSE, fdcDor, motor, outportByte(), and TRUE. +

+Referenced by fdcRw(), and recalibrate(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool readBlock (int  block,
Int8 blockBuffer,
unsigned long  numSectors 
)
+
+
+ +

+ +

+Definition at line 241 of file fdc.c. +

+References fdcRw(), and TRUE. +

+Referenced by fdcRead(). +

+

+ +

+
+ + + + + + + + + +
void recalibrate (void   ) 
+
+
+ +

+ +

+Definition at line 280 of file fdc.c. +

+References cmdRecal, motorOff(), motorOn(), sendByte(), TRUE, and waitFdc(). +

+Referenced by fdcRw(), and reset(). +

+

+ +

+
+ + + + + + + + + +
void reset (void   ) 
+
+
+ +

+ +

+Definition at line 288 of file fdc.c. +

+References cmdSpecify, diskChange, done, FALSE, fdcDor, motor, outportByte(), recalibrate(), seek(), sendByte(), TRUE, and waitFdc(). +

+Referenced by fdc_init(), and fdcRw(). +

+

+ +

+
+ + + + + + + + + +
bool seek (int  track  ) 
+
+
+ +

+ +

+Definition at line 222 of file fdc.c. +

+References cmdSeek, FALSE, fdcTrack, kprintf(), sendByte(), sr0, TRUE, waitFdc(), and x20. +

+Referenced by fdcRw(), and reset(). +

+

+ +

+
+ + + + + + + + + +
void sendByte (int  Int8  ) 
+
+
+ +

+ +

+Definition at line 103 of file fdc.c. +

+References fdcData, fdcMsr, inportByte(), and outportByte(). +

+Referenced by fdcRw(), recalibrate(), reset(), seek(), and waitFdc(). +

+

+ +

+
+ + + + + + + + + +
bool waitFdc (bool  sensei  ) 
+
+
+ +

+ +

+Definition at line 256 of file fdc.c. +

+References cmdSensei, diskChange, done, FALSE, fdcDir, fdcMsr, fdcTrack, getByte(), inportByte(), sendByte(), sr0, statSize, status, timeOut, and TRUE. +

+Referenced by fdcRw(), recalibrate(), reset(), and seek(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool writeBlock (int  block,
Int8 blockBuffer,
unsigned long  numSectors 
)
+
+
+ +

+ +

+Definition at line 252 of file fdc.c. +

+References FALSE, and fdcRw(). +

+Referenced by fdcWrite(). +

+

+


Variable Documentation

+ +
+
+ + + + +
bool diskChange = FALSE [static]
+
+
+ +

+ +

+Definition at line 48 of file fdc.c. +

+Referenced by fdcRw(), reset(), and waitFdc(). +

+

+ +

+
+ + + + +
volatile bool done = FALSE [static]
+
+
+ +

+ +

+Definition at line 46 of file fdc.c. +

+Referenced by floppyIsrhndlr(), reset(), and waitFdc(). +

+

+ +

+
+ + + + +
spinLock_t fdcSpinLock = SPIN_LOCK_INITIALIZER [static]
+
+
+ +

+ +

+Definition at line 44 of file fdc.c. +

+Referenced by fdcRead(). +

+

+ +

+
+ + + + +
volatile Int8 fdcTrack = 0xff [static]
+
+
+ +

+ +

+Definition at line 50 of file fdc.c. +

+Referenced by seek(), and waitFdc(). +

+

+ +

+
+ + + + +
drvGeom geometry = { dg144Heads,dg144Tracks,dg144Spt } [static]
+
+
+ +

+ +

+Definition at line 47 of file fdc.c. +

+Referenced by block2Hts(), and fdcRw(). +

+

+ +

+
+ + + + +
bool motor = FALSE [static]
+
+
+ +

+ +

+Definition at line 49 of file fdc.c. +

+Referenced by motorOff(), motorOn(), and reset(). +

+

+ +

+
+ + + + +
Int8 sr0 = 0 [static]
+
+
+ +

+ +

+Definition at line 51 of file fdc.c. +

+Referenced by seek(), and waitFdc(). +

+

+ +

+
+ + + + +
Int8 statSize = 0 [static]
+
+
+ +

+ +

+Definition at line 53 of file fdc.c. +

+Referenced by waitFdc(). +

+

+ +

+
+ + + + +
Int8 status[7] = { 0 } [static]
+
+
+ +

+ +

+Definition at line 54 of file fdc.c. +

+Referenced by fdcRw(), ne2kHandler(), vmmFindFreePage(), vmmFreeProcessPages(), vmmMemMapInit(), and waitFdc(). +

+

+ +

+
+ + + + +
unsigned long tbaddr = 0x80000L
+
+
+ +

+ +

+Definition at line 56 of file fdc.c. +

+Referenced by fdcRw(). +

+

+ +

+
+ + + + +
volatile int timeOut = 0 [static]
+
+
+ +

+ +

+Definition at line 52 of file fdc.c. +

+Referenced by waitFdc(). +

+

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/fdc_8h-source.html b/doc/html/fdc_8h-source.html new file mode 100644 index 0000000..c3663d6 --- /dev/null +++ b/doc/html/fdc_8h-source.html @@ -0,0 +1,145 @@ + + +UbixOS V2: src/sys/include/isa/fdc.h Source File + + + + +
+
+
+
+ +

fdc.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _FDC_H
+00031 #define _FDC_H
+00032 
+00033 #include <ubixos/types.h>
+00034 
+00035 typedef struct DrvGeom {
+00036    Int8 heads;
+00037    Int8 tracks;
+00038    Int8 spt;
+00039 } drvGeom;
+00040 
+00041 
+00042 #define fdcMsr  (0x3f4)
+00043 #define fdcData (0x3f5)
+00044 #define fdcDir  (0x3f7)
+00045 #define fdcCcr  (0x3f7)
+00046 #define fdcDor  (0x3f2)
+00047 #define fdcDrs  (0x3f4)
+00048 
+00049 #define cmdWrite   (0xc5)
+00050 #define cmdRead    (0xe6)
+00051 #define cmdSeek    (0x0f)
+00052 #define cmdSensei  (0x08)
+00053 #define cmdRecal   (0x07)
+00054 #define cmdSpecify (0x03)
+00055 
+00056 #define dg144Heads  2     /* heads per drive (1.44M) */
+00057 #define dg144Tracks 80
+00058 #define dg144Spt    18
+00059 #define dg144Gap3rw 0x1b
+00060 #define dg168Gap3rw 0x1c
+00061 
+00062 
+00063 
+00064 int fdc_init();
+00065 void floppyIsr();
+00066 void floppyIsrhndlr();
+00067 void sendByte(int Int8);
+00068 int getByte();
+00069 bool fdcRw(int block,Int8 *blockBuffer,bool read,unsigned long numSectors);
+00070 void block2Hts(int block,int *head,int *track,int *sector);
+00071 void motorOn(void);
+00072 void motorOff(void);
+00073 bool seek(int track);
+00074 bool waitFdc(bool sensei);
+00075 int getByte();
+00076 void sendByte(int Int8);
+00077 void recalibrate(void);
+00078 void reset(void);
+00079 bool writeBlock(int block,Int8 *blockBuffer, unsigned long numSectors);
+00080 bool readBlock(int block,Int8 *blockBuffer, unsigned long numSectors);
+00081 void fdcWrite(void *info,void *,uInt32 startSector,uInt32 sectorCount);
+00082 void fdcRead(void *info,void *,uInt32 startSector,uInt32 sectorCount);
+00083 
+00084 #endif
+00085 
+00086 /***
+00087  $Log$
+00088  Revision 1.1.1.1  2006/06/01 12:46:14  reddawg
+00089  ubix2
+00090 
+00091  Revision 1.2  2005/10/12 00:13:36  reddawg
+00092  Removed
+00093 
+00094  Revision 1.1.1.1  2005/09/26 17:23:39  reddawg
+00095  no message
+00096 
+00097  Revision 1.6  2004/07/17 02:38:31  reddawg
+00098  Fixed a few problems
+00099 
+00100  Revision 1.5  2004/07/14 12:42:46  reddawg
+00101  fdc: fdcInit to fdc_init
+00102  Changed Startup Routines
+00103 
+00104  Revision 1.4  2004/05/21 14:57:16  reddawg
+00105  Cleaned up
+00106 
+00107  END
+00108  ***/
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/fdc_8h.html b/doc/html/fdc_8h.html new file mode 100644 index 0000000..cbc747b --- /dev/null +++ b/doc/html/fdc_8h.html @@ -0,0 +1,1000 @@ + + +UbixOS V2: src/sys/include/isa/fdc.h File Reference + + + + +
+
+
+
+ +

fdc.h File Reference

+

+#include <ubixos/types.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  DrvGeom

Defines

#define cmdRead   (0xe6)
#define cmdRecal   (0x07)
#define cmdSeek   (0x0f)
#define cmdSensei   (0x08)
#define cmdSpecify   (0x03)
#define cmdWrite   (0xc5)
#define dg144Gap3rw   0x1b
#define dg144Heads   2
#define dg144Spt   18
#define dg144Tracks   80
#define dg168Gap3rw   0x1c
#define fdcCcr   (0x3f7)
#define fdcData   (0x3f5)
#define fdcDir   (0x3f7)
#define fdcDor   (0x3f2)
#define fdcDrs   (0x3f4)
#define fdcMsr   (0x3f4)

Typedefs

typedef DrvGeom drvGeom

Functions

void block2Hts (int block, int *head, int *track, int *sector)
int fdc_init ()
void fdcRead (void *info, void *, uInt32 startSector, uInt32 sectorCount)
bool fdcRw (int block, Int8 *blockBuffer, bool read, unsigned long numSectors)
void fdcWrite (void *info, void *, uInt32 startSector, uInt32 sectorCount)
void floppyIsr ()
void floppyIsrhndlr ()
int getByte ()
void motorOff (void)
void motorOn (void)
bool readBlock (int block, Int8 *blockBuffer, unsigned long numSectors)
void recalibrate (void)
void reset (void)
bool seek (int track)
void sendByte (int Int8)
bool waitFdc (bool sensei)
bool writeBlock (int block, Int8 *blockBuffer, unsigned long numSectors)
+


Define Documentation

+ +
+
+ + + + +
#define cmdRead   (0xe6)
+
+
+ +

+ +

+Definition at line 50 of file fdc.h. +

+Referenced by fdcRw(). +

+

+ +

+
+ + + + +
#define cmdRecal   (0x07)
+
+
+ +

+ +

+Definition at line 53 of file fdc.h. +

+Referenced by recalibrate(). +

+

+ +

+
+ + + + +
#define cmdSeek   (0x0f)
+
+
+ +

+ +

+Definition at line 51 of file fdc.h. +

+Referenced by seek(). +

+

+ +

+
+ + + + +
#define cmdSensei   (0x08)
+
+
+ +

+ +

+Definition at line 52 of file fdc.h. +

+Referenced by waitFdc(). +

+

+ +

+
+ + + + +
#define cmdSpecify   (0x03)
+
+
+ +

+ +

+Definition at line 54 of file fdc.h. +

+Referenced by reset(). +

+

+ +

+
+ + + + +
#define cmdWrite   (0xc5)
+
+
+ +

+ +

+Definition at line 49 of file fdc.h. +

+Referenced by fdcRw(). +

+

+ +

+
+ + + + +
#define dg144Gap3rw   0x1b
+
+
+ +

+ +

+Definition at line 59 of file fdc.h. +

+Referenced by fdcRw(). +

+

+ +

+
+ + + + +
#define dg144Heads   2
+
+
+ +

+ +

+Definition at line 56 of file fdc.h. +

+

+ +

+
+ + + + +
#define dg144Spt   18
+
+
+ +

+ +

+Definition at line 58 of file fdc.h. +

+Referenced by fdcRw(). +

+

+ +

+
+ + + + +
#define dg144Tracks   80
+
+
+ +

+ +

+Definition at line 57 of file fdc.h. +

+

+ +

+
+ + + + +
#define dg168Gap3rw   0x1c
+
+
+ +

+ +

+Definition at line 60 of file fdc.h. +

+Referenced by fdcRw(). +

+

+ +

+
+ + + + +
#define fdcCcr   (0x3f7)
+
+
+ +

+ +

+Definition at line 45 of file fdc.h. +

+Referenced by fdcRw(). +

+

+ +

+
+ + + + +
#define fdcData   (0x3f5)
+
+
+ +

+ +

+Definition at line 43 of file fdc.h. +

+Referenced by getByte(), and sendByte(). +

+

+ +

+
+ + + + +
#define fdcDir   (0x3f7)
+
+
+ +

+ +

+Definition at line 44 of file fdc.h. +

+Referenced by fdcRw(), and waitFdc(). +

+

+ +

+
+ + + + +
#define fdcDor   (0x3f2)
+
+
+ +

+ +

+Definition at line 46 of file fdc.h. +

+Referenced by motorOn(), and reset(). +

+

+ +

+
+ + + + +
#define fdcDrs   (0x3f4)
+
+
+ +

+ +

+Definition at line 47 of file fdc.h. +

+

+ +

+
+ + + + +
#define fdcMsr   (0x3f4)
+
+
+ +

+ +

+Definition at line 42 of file fdc.h. +

+Referenced by getByte(), sendByte(), and waitFdc(). +

+

+


Typedef Documentation

+ +
+
+ + + + +
typedef struct DrvGeom drvGeom
+
+
+ +

+ +

+

+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void block2Hts (int  block,
int *  head,
int *  track,
int *  sector 
)
+
+
+ +

+ +

+Definition at line 201 of file fdc.c. +

+References geometry, DrvGeom::heads, and DrvGeom::spt. +

+Referenced by fdcRw(). +

+

+ +

+
+ + + + + + + + +
int fdc_init (  ) 
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void fdcRead (void *  info,
void * ,
uInt32  startSector,
uInt32  sectorCount 
)
+
+
+ +

+ +

+Definition at line 303 of file fdc.c. +

+References fdcSpinLock, readBlock(), spinLock(), and spinUnlock(). +

+Referenced by fdc_init(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool fdcRw (int  block,
Int8 blockBuffer,
bool  read,
unsigned long  numSectors 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void fdcWrite (void *  info,
void * ,
uInt32  startSector,
uInt32  sectorCount 
)
+
+
+ +

+ +

+Definition at line 309 of file fdc.c. +

+References writeBlock(). +

+Referenced by fdc_init(). +

+

+ +

+
+ + + + + + + + +
void floppyIsr (  ) 
+
+
+ +

+ +

+Referenced by fdc_init(). +

+

+ +

+
+ + + + + + + + +
void floppyIsrhndlr (  ) 
+
+
+ +

+ +

+Definition at line 98 of file fdc.c. +

+References done, outportByte(), TRUE, and x20. +

+

+ +

+
+ + + + + + + + +
int getByte (  ) 
+
+
+ +

+ +

+Definition at line 116 of file fdc.c. +

+References fdcData, fdcMsr, and inportByte(). +

+Referenced by waitFdc(). +

+

+ +

+
+ + + + + + + + + +
void motorOff (void   ) 
+
+
+ +

+ +

+Definition at line 214 of file fdc.c. +

+References FALSE, motor, and TRUE. +

+Referenced by fdcRw(), and recalibrate(). +

+

+ +

+
+ + + + + + + + + +
void motorOn (void   ) 
+
+
+ +

+ +

+Definition at line 207 of file fdc.c. +

+References FALSE, fdcDor, motor, outportByte(), and TRUE. +

+Referenced by fdcRw(), and recalibrate(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool readBlock (int  block,
Int8 blockBuffer,
unsigned long  numSectors 
)
+
+
+ +

+ +

+Definition at line 241 of file fdc.c. +

+References fdcRw(), and TRUE. +

+Referenced by fdcRead(). +

+

+ +

+
+ + + + + + + + + +
void recalibrate (void   ) 
+
+
+ +

+ +

+Definition at line 280 of file fdc.c. +

+References cmdRecal, motorOff(), motorOn(), sendByte(), TRUE, and waitFdc(). +

+Referenced by fdcRw(), and reset(). +

+

+ +

+
+ + + + + + + + + +
void reset (void   ) 
+
+
+ +

+ +

+Definition at line 288 of file fdc.c. +

+References cmdSpecify, diskChange, done, FALSE, fdcDor, motor, outportByte(), recalibrate(), seek(), sendByte(), TRUE, and waitFdc(). +

+Referenced by fdc_init(), and fdcRw(). +

+

+ +

+
+ + + + + + + + + +
bool seek (int  track  ) 
+
+
+ +

+ +

+Definition at line 222 of file fdc.c. +

+References cmdSeek, FALSE, fdcTrack, kprintf(), sendByte(), sr0, TRUE, waitFdc(), and x20. +

+Referenced by fdcRw(), and reset(). +

+

+ +

+
+ + + + + + + + + +
void sendByte (int  Int8  ) 
+
+
+ +

+ +

+Definition at line 103 of file fdc.c. +

+References fdcData, fdcMsr, inportByte(), and outportByte(). +

+Referenced by fdcRw(), recalibrate(), reset(), seek(), and waitFdc(). +

+

+ +

+
+ + + + + + + + + +
bool waitFdc (bool  sensei  ) 
+
+
+ +

+ +

+Definition at line 256 of file fdc.c. +

+References cmdSensei, diskChange, done, FALSE, fdcDir, fdcMsr, fdcTrack, getByte(), inportByte(), sendByte(), sr0, statSize, status, timeOut, and TRUE. +

+Referenced by fdcRw(), recalibrate(), reset(), and seek(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool writeBlock (int  block,
Int8 blockBuffer,
unsigned long  numSectors 
)
+
+
+ +

+ +

+Definition at line 252 of file fdc.c. +

+References FALSE, and fdcRw(). +

+Referenced by fdcWrite(). +

+

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ffs_8c-source.html b/doc/html/ffs_8c-source.html new file mode 100644 index 0000000..2b97c1e --- /dev/null +++ b/doc/html/ffs_8c-source.html @@ -0,0 +1,61 @@ + + +UbixOS V2: src/sys/ufs/ffs.c Source File + + + + +
+
+
+
+ +

ffs.c

Go to the documentation of this file.
00001 #include <vfs/vfs.h>
+00002 #include <ufs/ufs.h>
+00003 #include <ufs/ffs.h>
+00004 #include <lib/kprintf.h>
+00005 #include <lib/kmalloc.h>
+00006 #include <ubixos/kpanic.h>
+00007 #include <lib/string.h>
+00008 #include <sys/buf.h>
+00009 
+00010 
+00011 int ffs_read(fileDescriptor *fd,char *data,uInt32 offset,long size) {
+00012   struct fs  *fs;
+00013   struct buf *bp;
+00014 
+00015   fs = (struct fs *)fd->dmadat->sbbuf;
+00016 
+00017   if (offset < fd->size && offset >= fs->fs_maxfilesize) {
+00018     //return (EOVERFLOW);
+00019     return(-1);
+00020     }
+00021 
+00022   kprintf("Reading File w/ New Function [0x%X]\n",fs->fs_maxfilesize);
+00023   return(0x0);
+00024   }
+

Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ffs_8c.html b/doc/html/ffs_8c.html new file mode 100644 index 0000000..810aa6e --- /dev/null +++ b/doc/html/ffs_8c.html @@ -0,0 +1,101 @@ + + +UbixOS V2: src/sys/ufs/ffs.c File Reference + + + + +
+
+
+
+ +

ffs.c File Reference

+

+#include <vfs/vfs.h>
+#include <ufs/ufs.h>
+#include <ufs/ffs.h>
+#include <lib/kprintf.h>
+#include <lib/kmalloc.h>
+#include <ubixos/kpanic.h>
+#include <lib/string.h>
+#include <sys/buf.h>
+ +

+Go to the source code of this file. + + + + +

Functions

int ffs_read (fileDescriptor *fd, char *data, uInt32 offset, long size)
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int ffs_read (fileDescriptor fd,
char *  data,
uInt32  offset,
long  size 
)
+
+
+ +

+ +

+Definition at line 11 of file ffs.c. +

+References fs::fs_maxfilesize, and kprintf(). +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ffs_8h-source.html b/doc/html/ffs_8h-source.html new file mode 100644 index 0000000..9e79ee5 --- /dev/null +++ b/doc/html/ffs_8h-source.html @@ -0,0 +1,81 @@ + + +UbixOS V2: src/sys/include/ufs/ffs.h Source File + + + + +
+
+
+
+ +

ffs.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _FFS_H
+00031 #define _FFS_H
+00032 
+00033 #include <ubixos/types.h>
+00034 #include <vfs/vfs.h>
+00035 #include <sys/device.h>
+00036 
+00037 int ffs_read(fileDescriptor *,char *,uInt32,long);
+00038 
+00039 #endif
+00040 
+00041 /***
+00042  END
+00043  ***/
+00044 
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ffs_8h.html b/doc/html/ffs_8h.html new file mode 100644 index 0000000..9ad275a --- /dev/null +++ b/doc/html/ffs_8h.html @@ -0,0 +1,96 @@ + + +UbixOS V2: src/sys/include/ufs/ffs.h File Reference + + + + +
+
+
+
+ +

ffs.h File Reference

+

+#include <ubixos/types.h>
+#include <vfs/vfs.h>
+#include <sys/device.h>
+ +

+Go to the source code of this file. + + + + +

Functions

int ffs_read (fileDescriptor *, char *, uInt32, long)
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int ffs_read (fileDescriptor,
char * ,
uInt32 ,
long  
)
+
+
+ +

+ +

+Definition at line 11 of file ffs.c. +

+References fs::fs_maxfilesize, and kprintf(). +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/file_8c-source.html b/doc/html/file_8c-source.html new file mode 100644 index 0000000..b7a91e1 --- /dev/null +++ b/doc/html/file_8c-source.html @@ -0,0 +1,539 @@ + + +UbixOS V2: src/sys/vfs/file.c Source File + + + + +
+
+
+
+ +

file.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005 Redistribution and use in source and binary forms, with or without modification, are
+00006 permitted provided that the following conditions are met:
+00007 
+00008 Redistributions of source code must retain the above copyright notice, this list of
+00009 conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010 form must reproduce the above copyright notice, this list of conditions, the following
+00011 disclaimer and the list of authors in the documentation and/or other materials provided
+00012 with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013 contributors may be used to endorse or promote products derived from this software
+00014 without specific prior written permission.
+00015 
+00016 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019 THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021 OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023 TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <vfs/vfs.h>
+00031 #include <vfs/file.h>
+00032 #include <ubixos/sched.h>
+00033 #include <ubixos/vitals.h>
+00034 #include <ubixos/kpanic.h>
+00035 #include <ubixos/spinlock.h>
+00036 #include <lib/kmalloc.h>
+00037 #include <lib/string.h>
+00038 #include <vmm/paging.h>
+00039 #include <lib/kprintf.h>
+00040 #include <assert.h>
+00041 
+00042 static spinLock_t fdTable_lock = SPIN_LOCK_INITIALIZER;
+00043 
+00044 
+00045 fileDescriptor *fdTable = 0x0;
+00046 
+00047 /* USER */
+00048 
+00049 void sysFwrite(char *ptr,int size,userFileDescriptor *userFd) {
+00050   if (userFd == 0x0) {
+00051       tty_print(ptr,_current->term);
+00052     }
+00053   else {
+00054     fwrite(ptr,size,1,userFd->fd);
+00055     }
+00056   return;
+00057   }
+00058   
+00059 void sysFgetc(int *ptr,userFileDescriptor *userFd) {
+00060   fileDescriptor *tmpFd = 0x0;
+00061   tmpFd = userFd->fd;
+00062   if (userFd->fd == 0x0) {
+00063     while (1) {
+00064       if (_current->term == tty_foreground) {
+00065         if ((*ptr = getch()) != 0x0)
+00066           return;
+00067         sched_yield();
+00068         }
+00069       else {
+00070         sched_yield();
+00071         }
+00072  /*
+00073        else {
+00074          kprintf("Waking Task: %i\n",tty_foreground->owner);
+00075          sched_setStatus(tty_foreground->owner,READY);
+00076          kprintf("Sleeping Task: %i\n",_current->id);
+00077          sched_setStatus(_current->id,WAIT);
+00078          sched_yield();
+00079          }
+00080 */
+00081       }
+00082     }
+00083   else {
+00084     ptr[0] = (int) fgetc(tmpFd);
+00085     }
+00086   }
+00087 
+00088 void sysRmDir() {
+00089   return;
+00090   }
+00091 
+00092 void sysFseek(userFileDescriptor *userFd,long offset,int whence) {
+00093   // TODO : coredump?
+00094   if (userFd == NULL)
+00095         return;
+00096   if (userFd->fd == NULL)
+00097         return;
+00098 
+00099   userFd->fd->offset = offset+whence;
+00100   }
+00101 
+00102 void sysChDir(const char *path) {
+00103   if (strstr(path,":") == 0x0) {
+00104     sprintf(_current->oInfo.cwd,"%s%s",_current->oInfo.cwd,path);
+00105     }
+00106   else {
+00107     sprintf(_current->oInfo.cwd,path);
+00108     }
+00109   }
+00110 
+00111 void sysUnlink(const char *path,int *retVal) {
+00112   *retVal = unlink(path);
+00113   }
+00114 
+00115 /************************************************************************
+00116 
+00117 Function: void sysFopen();
+00118 Description: Opens A File Descriptor For A User Task
+00119 Notes:
+00120 
+00121 ************************************************************************/
+00122 void sysFopen(const char *file,char *flags,userFileDescriptor *userFd) {
+00123   if (userFd == NULL)
+00124     kprintf("Error: userFd == NULL, File: %s, Line: %i\n",__FILE__,__LINE__);
+00125   userFd->fd = fopen(file,flags);
+00126   if (userFd->fd != 0x0) {
+00127     userFd->fdSize = userFd->fd->size;
+00128     }
+00129   /* Return */
+00130   return;
+00131   }
+00132   
+00133 /************************************************************************
+00134 
+00135 Function: void sysFread();
+00136 Description: Reads SIZE Bytes From The userFd Into DATA
+00137 Notes:
+00138 
+00139 ************************************************************************/  
+00140 void sysFread(void *data,long size,userFileDescriptor *userFd) {
+00141   /* TODO : coredump? */
+00142   if (userFd == NULL)
+00143         return;
+00144   if (userFd->fd == NULL)
+00145         return;
+00146   fread(data,size,1,userFd->fd);
+00147     return;
+00148   }
+00149 
+00150 /************************************************************************
+00151 
+00152 Function: void sysFclse();
+00153 Description: Closes A File Descriptor For A User Task
+00154 Notes:
+00155 
+00156 ************************************************************************/
+00157 void sysFclose(userFileDescriptor *userFd,int *status) {
+00158   if (userFd == NULL )
+00159   {
+00160         *status = -1;
+00161         return;
+00162   }
+00163   if (userFd->fd == NULL)
+00164   {
+00165         *status = -1;
+00166         return;
+00167   }
+00168   *status = fclose(userFd->fd);
+00169   /* Return */
+00170   return;
+00171   }
+00172   
+00173   
+00174 
+00175 /* KERNEL */
+00176 
+00177 
+00178 size_t fread(void *ptr,int size,int nmemb,fileDescriptor *fd) {
+00179  
+00180   if (fd == 0x0)
+00181     return(0x0);
+00182     
+00183  if (nmemb == 0x0) nmemb = 1; //Temp Fix
+00184  assert(fd);
+00185  //kprintf("fd->fileName: %s:%i\n",fd->fileName,_current->id);
+00186  assert(fd->mp);
+00187  assert(fd->mp->fs);
+00188  fd->mp->fs->vfsRead(fd,ptr,fd->offset,size * nmemb);
+00189  fd->offset += size * nmemb;
+00190  return(size * nmemb);
+00191   }
+00192 
+00193 size_t fwrite(void *ptr,int size,int nmemb,fileDescriptor *fd) {
+00194   if (fd != 0x0) {
+00195     fd->mp->fs->vfsWrite(fd,ptr,fd->offset,size * nmemb);
+00196     fd->offset += size * nmemb;
+00197     }
+00198   return(0x0);
+00199   }
+00200 
+00201 int fseek(fileDescriptor *tmpFd,long offset,int whence) {
+00202   tmpFd->offset = offset+whence;
+00203   return(tmpFd->offset);
+00204   }
+00205 
+00206 /************************************************************************
+00207 
+00208 Function: int feof(fileDescriptor *fd)
+00209 Description: Check A File Descriptor For EOF And Return Result
+00210 Notes:
+00211 
+00212 ************************************************************************/  
+00213 int feof(fileDescriptor *fd) {
+00214   if (fd->status == fdEof) {
+00215     return(-1);
+00216     }
+00217   return(0);
+00218   }
+00219   
+00220 /************************************************************************
+00221 
+00222 Function: int fputc(int ch,fileDescriptor *fd)
+00223 Description: This Will Write Character To FD
+00224 Notes:
+00225 
+00226 ************************************************************************/
+00227 int fputc(int ch,fileDescriptor *fd) {
+00228   if (fd != 0x0) {
+00229     ch = fd->mp->fs->vfsWrite(fd,(char *)ch,fd->offset,1);
+00230     fd->offset++;
+00231     return(ch);
+00232     }
+00233   /* Return NULL If FD Is Not Found */
+00234   return(0x0);
+00235   }
+00236   
+00237 /************************************************************************
+00238 
+00239 Function: int fgetc(fileDescriptor *fd)
+00240 Description: This Will Return The Next Character In A FD Stream
+00241 Notes:
+00242 
+00243 ************************************************************************/  
+00244 int fgetc(fileDescriptor *fd) {
+00245   int ch = 0x0;
+00246   /* If Found Return Next Char */
+00247   if (fd != 0x0) {
+00248     fd->mp->fs->vfsRead(fd,(char *)&ch,fd->offset,1);
+00249     fd->offset++;
+00250     return(ch);
+00251     }
+00252 
+00253   /* Return NULL If FD Is Not Found */
+00254   return(0x0);
+00255   }
+00256 
+00257 /************************************************************************
+00258 
+00259 Function: fileDescriptor *fopen(const char *file,cont char *flags)
+00260 Description: This Will Open A File And Return A File Descriptor
+00261 Notes:
+00262 
+00263 08/05/02 - Just Started A Rewrite Of This Function Should Work Out Well
+00264 
+00265 ************************************************************************/
+00266 
+00267 fileDescriptor *fopen(const char *file,const char *flags) {
+00268   int             i          = 0x0;
+00269   char           *path       = 0x0;
+00270   char           *mountPoint = 0x0;
+00271   char            fileName[1024];
+00272   fileDescriptor *tmpFd      = 0x0;
+00273   
+00274   /* Allocate Memory For File Descriptor */
+00275     if((tmpFd = (fileDescriptor *)kmalloc(sizeof(fileDescriptor))) == 0x0) {
+00276       kprintf("Error: tmpFd == NULL, File: %s, Line: %i\n",__FILE__,__LINE__);
+00277       return(NULL);
+00278     }
+00279     
+00280   sprintf(fileName,"%s",file);
+00281   if (strstr(fileName,":")) {
+00282     mountPoint = (char *)strtok((char *)&fileName,":");
+00283     path = strtok(NULL,"\n");
+00284     }
+00285   else {
+00286     path = fileName;
+00287     //path = &fileName;
+00288     }
+00289  
+00290   if (path[0] == '/') {
+00291     sprintf(tmpFd->fileName,"%s", path);
+00292     }
+00293   else { 
+00294     sprintf(tmpFd->fileName,"/%s",path);
+00295     }    
+00296 
+00297   /* Find our mount point or set default to sys */
+00298   if (mountPoint == 0x0) {
+00299     tmpFd->mp = vfs_findMount("sys");
+00300     }
+00301   else {
+00302     tmpFd->mp = vfs_findMount(mountPoint);
+00303     }
+00304   
+00305   if (tmpFd->mp == 0x0) {
+00306     kprintf("Mount Point Bad\n");
+00307     return(0x0);
+00308     }
+00309     
+00310   /* This Will Set Up The Descriptor Modes */
+00311   tmpFd->mode = 0;
+00312   for  (i = 0; '\0' != flags[i] ;i++ ) {
+00313     switch(flags[i]) {
+00314       case 'w':
+00315       case 'W':
+00316         tmpFd->mode |= fileWrite;
+00317         break;
+00318       case 'r':
+00319       case 'R':
+00320         tmpFd->mode |= fileRead;
+00321         break;
+00322       case 'b':
+00323       case 'B':
+00324         tmpFd->mode |= fileBinary;
+00325         break;
+00326       case 'a':
+00327       case 'A':
+00328         tmpFd->mode |= fileAppend;
+00329         break;
+00330       default:
+00331         kprintf("Invalid mode '%c' for fopen\n", flags[i]);
+00332         break;
+00333       }
+00334     }
+00335   /* Search For The File */
+00336   if (tmpFd->mp->fs->vfsOpenFile(tmpFd->fileName,tmpFd) == 0x1) {
+00337     /* If The File Is Found Then Set Up The Descriptor */
+00338 
+00339 
+00340    /* in order to save resources we will allocate the buffer later when it is needed */
+00341 
+00342     tmpFd->buffer = (char *)kmalloc(4096);
+00343     if(tmpFd->buffer == 0x0)
+00344     {
+00345       kfree(tmpFd);
+00346       kprintf("Error: tmpFd->buffer == NULL, File: %s, Line: %i\n",__FILE__,__LINE__);
+00347       spinUnlock(&fdTable_lock);
+00348       return 0x1;
+00349     }
+00350     /* Set Its Status To Open */
+00351     tmpFd->status = fdOpen;
+00352     
+00353     /* Initial File Offset Is Zero */
+00354     tmpFd->offset = 0;
+00355     tmpFd->prev = 0x0;
+00356 
+00357    /* we do not want to be in a spinlock longer than we need to, so
+00358      it has been moved to here. */
+00359       spinLock(&fdTable_lock);
+00360 
+00361     /* Increment Number Of Open Files */
+00362     systemVitals->openFiles++;
+00363     
+00364     tmpFd->next = fdTable;
+00365     
+00366     if (fdTable != 0x0)
+00367       fdTable->prev = tmpFd;
+00368 
+00369      fdTable = tmpFd;
+00370 
+00371       spinUnlock(&fdTable_lock);
+00372       
+00373     
+00374     /* Return The FD */
+00375     return(tmpFd);
+00376     }
+00377   else {
+00378     kfree(tmpFd->buffer);
+00379     kfree(tmpFd);
+00380     spinUnlock(&fdTable_lock);
+00381     kprintf("File Not Found?\n");
+00382     return (NULL);
+00383     }
+00384     
+00385     /* Return NULL */
+00386     return(0x0);
+00387   }
+00388 
+00389 /************************************************************************
+00390 
+00391 Function: int fclose(fileDescriptor *fd);
+00392 Description: This Will Close And Free A File Descriptor
+00393 Notes:
+00394 
+00395 ************************************************************************/
+00396 int fclose(fileDescriptor *fd) {
+00397   fileDescriptor *tmpFd = 0x0;
+00398   assert(fd);
+00399   
+00400   spinLock(&fdTable_lock);
+00401   
+00402   for (tmpFd = fdTable;tmpFd != 0x0;tmpFd = tmpFd->next) {
+00403     if (tmpFd == fd) {
+00404       if (tmpFd->prev)
+00405         tmpFd->prev->next = tmpFd->next;
+00406       if (tmpFd->next)
+00407         tmpFd->next->prev = tmpFd->prev;
+00408 
+00409       if (tmpFd == fdTable)
+00410         fdTable = tmpFd->next;
+00411 
+00412       systemVitals->openFiles--;
+00413       spinUnlock(&fdTable_lock);
+00414         if(tmpFd->buffer != NULL)
+00415                 kfree(tmpFd->buffer);
+00416       kfree(tmpFd);
+00417       return(0x0);      
+00418       }
+00419     }
+00420   
+00421   spinUnlock(&fdTable_lock);
+00422   return(0x1);
+00423   }
+00424 
+00425 /* UBU */
+00426 
+00427 /************************************************************************
+00428 
+00429 Function: void sysMkDir(const char *path)
+00430 Description: This Will Create A New Directory
+00431 Notes:
+00432 
+00433 ************************************************************************/
+00434 void sysMkDir(const char *path) {
+00435   fileDescriptor *tmpFD = 0x0; 
+00436   char tmpDir[1024];
+00437   char rootPath[256];
+00438   char *dir = 0x0;//UBU*mountPoint = 0x0;
+00439   char *tmp = 0x0;
+00440   rootPath[0] = '\0';
+00441   dir = (char *)path; 
+00442 
+00443   if (strstr(path,":") == 0x0) {
+00444     sprintf(tmpDir,"%s%s",_current->oInfo.cwd,path);
+00445     dir = (char *)&tmpDir;
+00446     }
+00447   while (strstr(dir,"/")) {
+00448     if (rootPath[0] == 0x0)
+00449       sprintf(rootPath,"%s/",strtok(dir,"/"));
+00450     else
+00451       sprintf(rootPath,"%s%s/",rootPath,strtok(dir,"/"));
+00452     tmp = strtok(NULL,"\n");
+00453     dir = tmp;
+00454     }
+00455 
+00456   //kprintf("rootPath: [%s]\n",rootPath);
+00457   tmpFD = fopen(rootPath,"rb");
+00458 
+00459   if (tmpFD->mp == 0x0) {
+00460     kprintf("Invalid Mount Point\n");
+00461     }
+00462   tmpFD->mp->fs->vfsMakeDir(dir,tmpFD);
+00463 
+00464   fclose(tmpFD);
+00465 
+00466   return;
+00467   }
+00468 
+00469 
+00470 /************************************************************************
+00471 
+00472 Function: int unlink(const char *node)
+00473 Description: This will unlink a file
+00474 Notes:
+00475 
+00476 ************************************************************************/
+00477 
+00478 int unlink(const char *node) {
+00479   char *path = 0x0,*mountPoint = 0x0;
+00480   vfs_mountPoint_t *mp = 0x0;
+00481 
+00482   path = (char *)strtok((char *)node,"@");
+00483   mountPoint = strtok(NULL,"\n");
+00484   if (mountPoint == 0x0) {
+00485     mp = vfs_findMount("sys"); /* _current->oInfo.container; */
+00486     }
+00487   else {
+00488     mp = vfs_findMount(mountPoint);
+00489     }
+00490   if (mp == 0x0) {
+00491     //kpanic("Mount Point Bad");
+00492     return(0x0);
+00493     }
+00494   mp->fs->vfsUnlink(path,mp);
+00495   return(0x0);
+00496   }
+00497 
+00498 
+00499 /***
+00500  END
+00501  ***/
+00502 
+

Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/file_8c.html b/doc/html/file_8c.html new file mode 100644 index 0000000..1523b5e --- /dev/null +++ b/doc/html/file_8c.html @@ -0,0 +1,766 @@ + + +UbixOS V2: src/sys/vfs/file.c File Reference + + + + +
+
+
+
+ +

file.c File Reference

+

+#include <vfs/vfs.h>
+#include <vfs/file.h>
+#include <ubixos/sched.h>
+#include <ubixos/vitals.h>
+#include <ubixos/kpanic.h>
+#include <ubixos/spinlock.h>
+#include <lib/kmalloc.h>
+#include <lib/string.h>
+#include <vmm/paging.h>
+#include <lib/kprintf.h>
+#include <assert.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Functions

int fclose (fileDescriptor *fd)
int feof (fileDescriptor *fd)
int fgetc (fileDescriptor *fd)
fileDescriptorfopen (const char *file, const char *flags)
int fputc (int ch, fileDescriptor *fd)
size_t fread (void *ptr, int size, int nmemb, fileDescriptor *fd)
int fseek (fileDescriptor *tmpFd, long offset, int whence)
size_t fwrite (void *ptr, int size, int nmemb, fileDescriptor *fd)
void sysChDir (const char *path)
void sysFclose (userFileDescriptor *userFd, int *status)
void sysFgetc (int *ptr, userFileDescriptor *userFd)
void sysFopen (const char *file, char *flags, userFileDescriptor *userFd)
void sysFread (void *data, long size, userFileDescriptor *userFd)
void sysFseek (userFileDescriptor *userFd, long offset, int whence)
void sysFwrite (char *ptr, int size, userFileDescriptor *userFd)
void sysMkDir (const char *path)
void sysRmDir ()
void sysUnlink (const char *path, int *retVal)
int unlink (const char *node)

Variables

fileDescriptorfdTable = 0x0
static spinLock_t fdTable_lock = SPIN_LOCK_INITIALIZER
+


Function Documentation

+ +
+
+ + + + + + + + + +
int fclose (fileDescriptor fd  ) 
+
+ +

+ +

+
+ + + + + + + + + +
int feof (fileDescriptor fd  ) 
+
+
+ +

+ +

+Definition at line 213 of file file.c. +

+References fdEof. +

+

+ +

+
+ + + + + + + + + +
int fgetc (fileDescriptor fd  ) 
+
+
+ +

+ +

+Definition at line 244 of file file.c. +

+References fileDescriptor::offset. +

+Referenced by sysFgetc(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
fileDescriptor* fopen (const char *  file,
const char *  flags 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
int fputc (int  ch,
fileDescriptor fd 
)
+
+
+ +

+ +

+Definition at line 227 of file file.c. +

+References fileDescriptor::offset. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
size_t fread (void *  ptr,
int  size,
int  nmemb,
fileDescriptor fd 
)
+
+
+ +

+ +

+Definition at line 178 of file file.c. +

+References assert, and fileDescriptor::offset. +

+Referenced by dev_ramDrive(), execFile(), kmod_load(), ldEnable(), DiskFS::read(), sysExec(), and sysFread(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int fseek (fileDescriptor tmpFd,
long  offset,
int  whence 
)
+
+
+ +

+ +

+Definition at line 201 of file file.c. +

+References fileDescriptor::offset. +

+Referenced by execFile(), kmod_load(), ldEnable(), DiskFS::read(), sysExec(), and DiskFS::write(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
size_t fwrite (void *  ptr,
int  size,
int  nmemb,
fileDescriptor fd 
)
+
+
+ +

+ +

+Definition at line 193 of file file.c. +

+References fileDescriptor::offset. +

+Referenced by dev_ramDestroy(), bTree::Save(), sysFwrite(), and DiskFS::write(). +

+

+ +

+
+ + + + + + + + + +
void sysChDir (const char *  path  ) 
+
+
+ +

+ +

+Definition at line 102 of file file.c. +

+References _current, osInfo::cwd, taskStruct::oInfo, sprintf(), and strstr(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void sysFclose (userFileDescriptor userFd,
int *  status 
)
+
+
+ +

+ +

+Definition at line 157 of file file.c. +

+References fclose(), userFileDescriptorStruct::fd, and NULL. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void sysFgetc (int *  ptr,
userFileDescriptor userFd 
)
+
+
+ +

+ +

+Definition at line 59 of file file.c. +

+References _current, userFileDescriptorStruct::fd, fgetc(), getch(), sched_yield(), taskStruct::term, and tty_foreground. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void sysFopen (const char *  file,
char *  flags,
userFileDescriptor userFd 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void sysFread (void *  data,
long  size,
userFileDescriptor userFd 
)
+
+
+ +

+ +

+Definition at line 140 of file file.c. +

+References userFileDescriptorStruct::fd, fread(), and NULL. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void sysFseek (userFileDescriptor userFd,
long  offset,
int  whence 
)
+
+
+ +

+ +

+Definition at line 92 of file file.c. +

+References userFileDescriptorStruct::fd, NULL, and fileDescriptorStruct::offset. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void sysFwrite (char *  ptr,
int  size,
userFileDescriptor userFd 
)
+
+
+ +

+ +

+Definition at line 49 of file file.c. +

+References _current, userFileDescriptorStruct::fd, fwrite(), taskStruct::term, and tty_print(). +

+

+ +

+
+ + + + + + + + + +
void sysMkDir (const char *  path  ) 
+
+
+ +

+ +

+Definition at line 434 of file file.c. +

+References _current, osInfo::cwd, fclose(), fopen(), kprintf(), NULL, taskStruct::oInfo, sprintf(), strstr(), and strtok(). +

+

+ +

+
+ + + + + + + + +
void sysRmDir (  ) 
+
+
+ +

+ +

+Definition at line 88 of file file.c. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void sysUnlink (const char *  path,
int *  retVal 
)
+
+
+ +

+ +

+Definition at line 111 of file file.c. +

+References unlink(). +

+

+ +

+
+ + + + + + + + + +
int unlink (const char *  node  ) 
+
+
+ +

+ +

+Definition at line 478 of file file.c. +

+References vfs_mountPoint::fs, NULL, strtok(), vfs_findMount(), and fileSystem::vfsUnlink. +

+Referenced by sysUnlink(). +

+

+


Variable Documentation

+ +
+
+ + + + +
fileDescriptor* fdTable = 0x0
+
+
+ +

+ +

+Definition at line 45 of file file.c. +

+Referenced by fclose(), and fopen(). +

+

+ +

+
+ + + + +
spinLock_t fdTable_lock = SPIN_LOCK_INITIALIZER [static]
+
+
+ +

+ +

+Definition at line 42 of file file.c. +

+Referenced by fclose(), and fopen(). +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/files.html b/doc/html/files.html new file mode 100644 index 0000000..0b48bd1 --- /dev/null +++ b/doc/html/files.html @@ -0,0 +1,270 @@ + + +UbixOS V2: File Index + + + + +
+
+
+
+

UbixOS V2 File List

Here is a list of all files with brief descriptions: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
src/sys/Makefile.inc [code]
src/sys/compile/null.c [code]
src/sys/devfs/devfs.c [code]
src/sys/include/assert.h [code]
src/sys/include/math.h [code]
src/sys/include/stdarg.h [code]
src/sys/include/string.h [code]
src/sys/include/devfs/devfs.h [code]
src/sys/include/isa/8259.h [code]
src/sys/include/isa/atkbd.h [code]
src/sys/include/isa/fdc.h [code]
src/sys/include/isa/mouse.h [code]
src/sys/include/isa/ne2k.h [code]
src/sys/include/isa/pit.h [code]
src/sys/include/lib/bioscall.h [code]
src/sys/include/lib/kmalloc.h [code]
src/sys/include/lib/kprint.h [code]
src/sys/include/lib/kprintf.h [code]
src/sys/include/lib/libcpp.h [code]
src/sys/include/lib/string.h [code]
src/sys/include/mpi/mpi.h [code]
src/sys/include/net/api.h [code]
src/sys/include/net/api_msg.h [code]
src/sys/include/net/arch.h [code]
src/sys/include/net/debug.h [code]
src/sys/include/net/def.h [code]
src/sys/include/net/err.h [code]
src/sys/include/net/list.h [code]
src/sys/include/net/lwipopts.h [code]
src/sys/include/net/mem.h [code]
src/sys/include/net/memp.h [code]
src/sys/include/net/net.h [code]
src/sys/include/net/netif.h [code]
src/sys/include/net/opt.h [code]
src/sys/include/net/pbuf.h [code]
src/sys/include/net/sockets.h [code]
src/sys/include/net/stats.h [code]
src/sys/include/net/sys.h [code]
src/sys/include/net/tcp.h [code]
src/sys/include/net/tcpip.h [code]
src/sys/include/net/udp.h [code]
src/sys/include/net/arch/cc.h [code]
src/sys/include/net/arch/cpu.h [code]
src/sys/include/net/arch/init.h [code]
src/sys/include/net/arch/lib.h [code]
src/sys/include/net/arch/perf.h [code]
src/sys/include/net/arch/sys_arch.h [code]
src/sys/include/net/ipv4/icmp.h [code]
src/sys/include/net/ipv4/inet.h [code]
src/sys/include/net/ipv4/ip.h [code]
src/sys/include/net/ipv4/ip_addr.h [code]
src/sys/include/net/ipv6/icmp.h [code]
src/sys/include/net/ipv6/inet.h [code]
src/sys/include/net/ipv6/ip.h [code]
src/sys/include/net/ipv6/ip_addr.h [code]
src/sys/include/netif/arp.h [code]
src/sys/include/netif/ethernetif.h [code]
src/sys/include/netif/loopif.h [code]
src/sys/include/netif/tcpdump.h [code]
src/sys/include/objgfx/ogDisplay_VESA.h [code]
src/sys/include/pci/hd.h [code]
src/sys/include/pci/lnc.h [code]
src/sys/include/pci/pci.h [code]
src/sys/include/sde/ogDisplay_UbixOS.h [code]
src/sys/include/sde/sde.h [code]
src/sys/include/sys/_types.h [code]
src/sys/include/sys/buf.h [code]
src/sys/include/sys/cdefs.h [code]
src/sys/include/sys/device.h [code]
src/sys/include/sys/device.old.h [code]
src/sys/include/sys/dma.h [code]
src/sys/include/sys/driver.h [code]
src/sys/include/sys/gdt.h [code]
src/sys/include/sys/gen_calls.h [code]
src/sys/include/sys/idt.h [code]
src/sys/include/sys/io.h [code]
src/sys/include/sys/kern_descrip.h [code]
src/sys/include/sys/kern_sig.h [code]
src/sys/include/sys/kern_sysctl.h [code]
src/sys/include/sys/pipe.h [code]
src/sys/include/sys/signal.h [code]
src/sys/include/sys/sysproto.h [code]
src/sys/include/sys/thread.h [code]
src/sys/include/sys/trap.h [code]
src/sys/include/sys/tss.h [code]
src/sys/include/sys/video.h [code]
src/sys/include/ubixfs/dirCache.h [code]
src/sys/include/ubixfs/ubixfs.h [code]
src/sys/include/ubixos/elf.h [code]
src/sys/include/ubixos/endtask.h [code]
src/sys/include/ubixos/exec.h [code]
src/sys/include/ubixos/fork.h [code]
src/sys/include/ubixos/init.h [code]
src/sys/include/ubixos/kmod.h [code]
src/sys/include/ubixos/kpanic.h [code]
src/sys/include/ubixos/ld.h [code]
src/sys/include/ubixos/lists.h [code]
src/sys/include/ubixos/sched.h [code]
src/sys/include/ubixos/sem.h [code]
src/sys/include/ubixos/smp.h [code]
src/sys/include/ubixos/spinlock.h [code]
src/sys/include/ubixos/static.h [code]
src/sys/include/ubixos/syscall.h [code]
src/sys/include/ubixos/syscalls.h [code]
src/sys/include/ubixos/syscalls_new.h [code]
src/sys/include/ubixos/systemtask.h [code]
src/sys/include/ubixos/time.h [code]
src/sys/include/ubixos/times.h [code]
src/sys/include/ubixos/tty.h [code]
src/sys/include/ubixos/types.h [code]
src/sys/include/ubixos/ubthread.h [code]
src/sys/include/ufs/ffs.h [code]
src/sys/include/ufs/ufs.h [code]
src/sys/include/vfs/file.h [code]
src/sys/include/vfs/mount.h [code]
src/sys/include/vfs/vfs.h [code]
src/sys/include/vmm/paging.h [code]
src/sys/include/vmm/vmm.h [code]
src/sys/init/main.c [code]
src/sys/init/start.S [code]
src/sys/init/static.c [code]
src/sys/isa/8259.c [code]
src/sys/isa/atkbd.c [code]
src/sys/isa/fdc.c [code]
src/sys/isa/mouse.c [code]
src/sys/isa/ne2k.c [code]
src/sys/isa/pit.c [code]
src/sys/isa/rs232.c [code]
src/sys/kernel/ap-boot.S [code]
src/sys/kernel/bioscall.c [code]
src/sys/kernel/elf.c [code]
src/sys/kernel/endtask.c [code]
src/sys/kernel/exec.c [code]
src/sys/kernel/fork.c [code]
src/sys/kernel/gen_calls.c [code]
src/sys/kernel/kern_descrip.c [code]
src/sys/kernel/kern_sig.c [code]
src/sys/kernel/kern_sysctl.c [code]
src/sys/kernel/kpanic.c [code]
src/sys/kernel/ld.c [code]
src/sys/kernel/pipe.c [code]
src/sys/kernel/sched.c [code]
src/sys/kernel/schedyield.S [code]
src/sys/kernel/sem.c [code]
src/sys/kernel/smp.c [code]
src/sys/kernel/spinlock.c [code]
src/sys/kernel/sys_call.S [code]
src/sys/kernel/sys_call_new.S [code]
src/sys/kernel/syscall.c [code]
src/sys/kernel/syscall_new.c [code]
src/sys/kernel/systemtask.c [code]
src/sys/kernel/time.c [code]
src/sys/kernel/timer.S [code]
src/sys/kernel/tty.c [code]
src/sys/kernel/ubthread.c [code]
src/sys/kernel/vitals.c [code]
src/sys/kmods/kmod.c [code]
src/sys/lib/assert.c [code]
src/sys/lib/atan.c [code]
src/sys/lib/divdi3.c [code]
src/sys/lib/kmalloc.c [code]
src/sys/lib/kprintf.c [code]
src/sys/lib/libcpp.cc [code]
src/sys/lib/memset.c [code]
src/sys/lib/net.c [code]
src/sys/lib/ogprintf.cc [code]
src/sys/lib/sqrt.c [code]
src/sys/lib/string.c [code]
src/sys/lib/strtok.c [code]
src/sys/lib/strtol.c [code]
src/sys/lib/vsprintf.c [code]
src/sys/mpi/message.c [code]
src/sys/mpi/system.c [code]
src/sys/net/api/api_lib.c [code]
src/sys/net/api/api_msg.c [code]
src/sys/net/api/err.c [code]
src/sys/net/api/sockets.c [code]
src/sys/net/api/tcpip.c [code]
src/sys/net/net/bot.c [code]
src/sys/net/net/init.c [code]
src/sys/net/net/shell.c [code]
src/sys/net/net/shell.h [code]
src/sys/net/net/sys_arch.c [code]
src/sys/net/net/udpecho.c [code]
src/sys/net/net/udpecho.h [code]
src/sys/net/netif/arp.c [code]
src/sys/net/netif/ethernetif.c [code]
src/sys/net/netif/loopif.c [code]
src/sys/net/netif/tcpdump.c [code]
src/sys/pci/hd.c [code]
src/sys/pci/lnc.c [code]
src/sys/pci/pci.c [code]
src/sys/sys/device.c [code]
src/sys/sys/dma.c [code]
src/sys/sys/idt.c [code]
src/sys/sys/io.c [code]
src/sys/sys/video.c [code]
src/sys/ubixfs/block.c [code]
src/sys/ubixfs/dirCache.c [code]
src/sys/ubixfs/directory.c [code]
src/sys/ubixfs/thread.c [code]
src/sys/ubixfs/ubixfs.c [code]
src/sys/ubixfsv2/btree.cpp [code]
src/sys/ubixfsv2/btree.h [code]
src/sys/ubixfsv2/btreeheader.h [code]
src/sys/ubixfsv2/device.h [code]
src/sys/ubixfsv2/file.h [code]
src/sys/ubixfsv2/fsAbstract.h [code]
src/sys/ubixfsv2/main.cpp [code]
src/sys/ubixfsv2/ramdrive.cpp [code]
src/sys/ubixfsv2/ramdrive.h [code]
src/sys/ubixfsv2/types.h [code]
src/sys/ubixfsv2/ubixfs.cpp [code]
src/sys/ubixfsv2/ubixfs.h [code]
src/sys/ubixfsv2/vfs.cpp [code]
src/sys/ubixfsv2/vfs.h [code]
src/sys/ufs/ffs.c [code]
src/sys/ufs/ufs.c [code]
src/sys/vfs/file.c [code]
src/sys/vfs/mount.c [code]
src/sys/vfs/vfs.c [code]
src/sys/vmm/copyvirtualspace.c [code]
src/sys/vmm/createvirtualspace.c [code]
src/sys/vmm/getfreepage.c [code]
src/sys/vmm/getfreevirtualpage.c [code]
src/sys/vmm/getphysicaladdr.c [code]
src/sys/vmm/page_fault.S [code]
src/sys/vmm/pagefault.c [code]
src/sys/vmm/paging.c [code]
src/sys/vmm/setpageattributes.c [code]
src/sys/vmm/unmappage.c [code]
src/sys/vmm/vmm_init.c [code]
src/sys/vmm/vmm_memory.c [code]
+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/fork_8c-source.html b/doc/html/fork_8c-source.html new file mode 100644 index 0000000..f6f8364 --- /dev/null +++ b/doc/html/fork_8c-source.html @@ -0,0 +1,170 @@ + + +UbixOS V2: src/sys/kernel/fork.c Source File + + + + +
+
+
+
+ +

fork.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <ubixos/fork.h>
+00031 #include <ubixos/types.h>
+00032 #include <ubixos/sched.h>
+00033 #include <ubixos/vitals.h>
+00034 #include <ubixos/tty.h>
+00035 #include <vmm/vmm.h>
+00036 #include <string.h>
+00037 #include <assert.h>
+00038 
+00039 /*****************************************************************************************
+00040  Functoin: static int fork_copyProcess(struct taskStruct *newProcess,long ebp,long edi,
+00041              long esi, long none,long ebx,long ecx,long edx,long eip,long cs,long eflags,
+00042              long esp,long ss)
+00043  
+00044  Desc: This function will copy a process
+00045 
+00046  Notes:
+00047 
+00048 *****************************************************************************************/
+00049 /* Had to remove static though tihs function is only used in this file */
+00050 int fork_copyProcess(struct taskStruct *newProcess,long ebp,long edi,long esi,long none,long ebx,long ecx,long edx,long eip,long cs,long eflags,long esp,long ss) {
+00051   volatile struct taskStruct * tmpProcPtr = newProcess;
+00052   assert(newProcess);
+00053   assert(_current);
+00054   
+00055   /* Set Up New Tasks Information */
+00056   memcpy(newProcess->oInfo.cwd,_current->oInfo.cwd,1024);
+00057   
+00058   newProcess->tss.eip          = eip;
+00059   newProcess->oInfo.vmStart    = _current->oInfo.vmStart;
+00060   newProcess->term             = _current->term;
+00061   newProcess->term->owner      = newProcess->id;
+00062   newProcess->uid              = _current->uid;
+00063   newProcess->gid              = _current->gid;
+00064   newProcess->tss.back_link    = 0x0;
+00065   newProcess->tss.esp0         = _current->tss.esp0;
+00066   newProcess->tss.ss0          = 0x10;
+00067   newProcess->tss.esp1         = 0x0;
+00068   newProcess->tss.ss1          = 0x0;
+00069   newProcess->tss.esp2         = 0x0;
+00070   newProcess->tss.ss2          = 0x0;
+00071   newProcess->tss.eflags       = eflags;
+00072   newProcess->tss.eax          = 0x0;
+00073   newProcess->tss.ebx          = ebx;
+00074   newProcess->tss.ecx          = ecx;
+00075   newProcess->tss.edx          = edx;
+00076   newProcess->tss.esi          = esi;
+00077   newProcess->tss.edi          = edi;
+00078   newProcess->tss.ebp          = ebp;
+00079   newProcess->tss.esp          = esp;
+00080   newProcess->tss.cs           = cs & 0xFF;
+00081   newProcess->tss.ss           = ss & 0xFF;
+00082   newProcess->tss.ds           = _current->tss.ds & 0xFF;
+00083   newProcess->tss.fs           = _current->tss.fs & 0xFF;
+00084   newProcess->tss.gs           = _current->tss.gs & 0xFF;
+00085   newProcess->tss.es           = _current->tss.es & 0xFF;
+00086   newProcess->tss.ldt          = 0x18;
+00087   newProcess->tss.trace_bitmap = 0x0000;
+00088   newProcess->tss.io_map       = 0x8000;
+00089   /* Create A Copy Of The VM Space For New Task */
+00090   newProcess->tss.cr3 = (uInt32)vmmCopyVirtualSpace(newProcess->id);
+00091   newProcess->state = FORK;
+00092  
+00093   /* Fix gcc optimization problems */
+00094   while (tmpProcPtr->state == FORK) sched_yield();
+00095 
+00096   /* Return Id of Proccess */
+00097   return(newProcess->id);
+00098   }
+00099   
+00100 /*****************************************************************************************
+00101  Functoin: void sysFork();
+00102  
+00103  Desc: This function will fork a new task
+00104 
+00105  Notes:
+00106  
+00107    08/01/02 - This Seems To Be Working Fine However I'm Not Sure If I
+00108               Chose The Best Path To Impliment It I Guess We Will See
+00109               What The Future May Bring 
+00110 
+00111 *****************************************************************************************/
+00112 asm(
+00113   ".globl sysFork           \n"
+00114   "sysFork:                 \n"
+00115   "  xor   %eax,%eax        \n"
+00116   "  call  schedNewTask     \n"
+00117   "  testl %eax,%eax        \n"
+00118   "  je fork_ret            \n"
+00119   "  pushl %esi             \n"
+00120   "  pushl %edi             \n"
+00121   "  pushl %ebp             \n"
+00122   "  pushl %eax             \n"
+00123   "  call  fork_copyProcess \n"
+00124   "  movl  %eax,(%ebx)      \n"
+00125   "  addl  $16,%esp         \n"
+00126   "fork_ret:                \n"
+00127   "  ret                    \n"
+00128   );
+00129 
+00130 /***
+00131  END
+00132  ***/
+00133 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/fork_8c.html b/doc/html/fork_8c.html new file mode 100644 index 0000000..c8329c0 --- /dev/null +++ b/doc/html/fork_8c.html @@ -0,0 +1,204 @@ + + +UbixOS V2: src/sys/kernel/fork.c File Reference + + + + +
+
+
+
+ +

fork.c File Reference

+

+#include <ubixos/fork.h>
+#include <ubixos/types.h>
+#include <ubixos/sched.h>
+#include <ubixos/vitals.h>
+#include <ubixos/tty.h>
+#include <vmm/vmm.h>
+#include <string.h>
+#include <assert.h>
+ +

+Go to the source code of this file. + + + + + + +

Functions

 asm (".globl sysFork \n""sysFork: \n"" xor %eax,%eax \n"" call schedNewTask \n"" testl %eax,%eax \n"" je fork_ret \n"" pushl %esi \n"" pushl %edi \n"" pushl %ebp \n"" pushl %eax \n"" call fork_copyProcess \n"" movl %eax,(%ebx) \n"" addl $16,%esp \n""fork_ret: \n"" ret \n")
int fork_copyProcess (struct taskStruct *newProcess, long ebp, long edi, long esi, long none, long ebx, long ecx, long edx, long eip, long cs, long eflags, long esp, long ss)
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
asm (".globl sysFork \n""sysFork: \n"" xor %  eax,
%eax\n""call schedNewTask\n""testl%  eax,
%eax\n""je fork_ret\n""pushl%esi\n""pushl%edi\n""pushl%ebp\n""pushl%eax\n""call fork_copyProcess\n""movl%  eax,
(%ebx)\n""addl 16,
%esp\n""fork_ret:\n""ret\n"  
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int fork_copyProcess (struct taskStruct newProcess,
long  ebp,
long  edi,
long  esi,
long  none,
long  ebx,
long  ecx,
long  edx,
long  eip,
long  cs,
long  eflags,
long  esp,
long  ss 
)
+
+ +

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/fork_8h-source.html b/doc/html/fork_8h-source.html new file mode 100644 index 0000000..87ba023 --- /dev/null +++ b/doc/html/fork_8h-source.html @@ -0,0 +1,96 @@ + + +UbixOS V2: src/sys/include/ubixos/fork.h Source File + + + + +
+
+
+
+ +

fork.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _FORK_H
+00031 #define _FORK_H
+00032 
+00033 #include <ubixos/types.h>
+00034 #include <ubixos/sched.h>
+00035 
+00036 void sysFork();
+00037 
+00038 #endif
+00039 
+00040 /***
+00041  $Log$
+00042  Revision 1.1.1.1  2006/06/01 12:46:14  reddawg
+00043  ubix2
+00044 
+00045  Revision 1.2  2005/10/12 00:13:37  reddawg
+00046  Removed
+00047 
+00048  Revision 1.1.1.1  2005/09/26 17:23:54  reddawg
+00049  no message
+00050 
+00051  Revision 1.3  2004/09/11 13:06:39  reddawg
+00052  fork: cleaned up comments in fork and made fork_copyProcess static
+00053 
+00054  Revision 1.2  2004/05/21 15:20:00  reddawg
+00055  Cleaned up
+00056 
+00057 
+00058  END
+00059  ***/
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/fork_8h.html b/doc/html/fork_8h.html new file mode 100644 index 0000000..2e4205e --- /dev/null +++ b/doc/html/fork_8h.html @@ -0,0 +1,69 @@ + + +UbixOS V2: src/sys/include/ubixos/fork.h File Reference + + + + +
+
+
+
+ +

fork.h File Reference

+

+#include <ubixos/types.h>
+#include <ubixos/sched.h>
+ +

+Go to the source code of this file. + + + + +

Functions

void sysFork ()
+


Function Documentation

+ +
+
+ + + + + + + + +
void sysFork (  ) 
+
+
+ +

+ +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/fsAbstract_8h-source.html b/doc/html/fsAbstract_8h-source.html new file mode 100644 index 0000000..ad6e74a --- /dev/null +++ b/doc/html/fsAbstract_8h-source.html @@ -0,0 +1,83 @@ + + +UbixOS V2: src/sys/ubixfsv2/fsAbstract.h Source File + + + + +
+
+
+
+ +

fsAbstract.h

Go to the documentation of this file.
00001 #ifndef FSABSTRACT_H
+00002 #define FSABSTRACT_H
+00003 
+00004 #include <stdio.h>
+00005 #include <dirent.h>
+00006 #include <sys/types.h>
+00007 #include <device.h>
+00008 #include "file.h"
+00009 
+00010 class vfs_abstract {
+00011  protected:
+00012   vfs_abstract * prev;
+00013   vfs_abstract * next;
+00014   device_t * device;
+00015  public: 
+00016   /* File I/O */
+00017   virtual int     vfs_open(const char *, fileDescriptor *,int,...) { return -1; };
+00018   virtual int     vfs_close(fileDescriptor *) { return -1; };
+00019   virtual size_t  vfs_read(fileDescriptor *, void *, off_t, size_t) 
+00020                   { return 0; };
+00021   virtual size_t  vfs_write(fileDescriptor *, void *, off_t, size_t) 
+00022                   { return 0; };
+00023 
+00024   /* Dir I/O */
+00025   virtual int     vfs_opendir(DIR *,const char *) { return -1; };
+00026   virtual int     vfs_closedir(DIR *) { return -1; };
+00027   virtual int     vfs_mkdir(const char *, mode_t) { return -1; };
+00028   virtual int     vfs_rmdir(const char *) { return -1; };
+00029   virtual int     vfs_readdir(DIR *,struct dirent *) { return -1; };
+00030 
+00031   /* FS Functions */
+00032   virtual int     vfs_init(void) { return -1; };
+00033   virtual int     vfs_format(device_t *) { return -1; };
+00034   virtual void *  vfs_mknod(const char *, mode_t) { return NULL; };
+00035   virtual int     vfs_purge(void) { return -1; };
+00036   virtual int     vfs_stop(void) { return -1; };
+00037   virtual int     vfs_sync(void) { return -1; };
+00038 
+00039   /* Misc Functions */
+00040   virtual int     vfs_unlink(const char *) { return -1; };
+00041   virtual int     vfs_rename(const char *,const char *) { return -1; };
+00042 
+00043   virtual     ~vfs_abstract(void) { };
+00044 }; // vfs_FS
+00045 
+00046 #endif // !FSABSTRACT_H
+

Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/fsAbstract_8h.html b/doc/html/fsAbstract_8h.html new file mode 100644 index 0000000..7501922 --- /dev/null +++ b/doc/html/fsAbstract_8h.html @@ -0,0 +1,52 @@ + + +UbixOS V2: src/sys/ubixfsv2/fsAbstract.h File Reference + + + + +
+
+
+
+ +

fsAbstract.h File Reference

+

+#include <stdio.h>
+#include <dirent.h>
+#include <sys/types.h>
+#include <device.h>
+#include "file.h"
+ +

+Go to the source code of this file. + + + + +

Data Structures

class  vfs_abstract
+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions.html b/doc/html/functions.html new file mode 100644 index 0000000..16a0aca --- /dev/null +++ b/doc/html/functions.html @@ -0,0 +1,85 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all struct and union fields with links to the structures/unions they belong to: +

+

- _ -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_0x61.html b/doc/html/functions_0x61.html new file mode 100644 index 0000000..c41e1ef --- /dev/null +++ b/doc/html/functions_0x61.html @@ -0,0 +1,104 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all struct and union fields with links to the structures/unions they belong to: +

+

- a -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_0x62.html b/doc/html/functions_0x62.html new file mode 100644 index 0000000..4f21800 --- /dev/null +++ b/doc/html/functions_0x62.html @@ -0,0 +1,107 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all struct and union fields with links to the structures/unions they belong to: +

+

- b -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_0x63.html b/doc/html/functions_0x63.html new file mode 100644 index 0000000..7038142 --- /dev/null +++ b/doc/html/functions_0x63.html @@ -0,0 +1,119 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all struct and union fields with links to the structures/unions they belong to: +

+

- c -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_0x64.html b/doc/html/functions_0x64.html new file mode 100644 index 0000000..262a754 --- /dev/null +++ b/doc/html/functions_0x64.html @@ -0,0 +1,189 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all struct and union fields with links to the structures/unions they belong to: +

+

- d -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_0x65.html b/doc/html/functions_0x65.html new file mode 100644 index 0000000..3b4b364 --- /dev/null +++ b/doc/html/functions_0x65.html @@ -0,0 +1,113 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all struct and union fields with links to the structures/unions they belong to: +

+

- e -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_0x66.html b/doc/html/functions_0x66.html new file mode 100644 index 0000000..8e2fef5 --- /dev/null +++ b/doc/html/functions_0x66.html @@ -0,0 +1,204 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all struct and union fields with links to the structures/unions they belong to: +

+

- f -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_0x67.html b/doc/html/functions_0x67.html new file mode 100644 index 0000000..c86250c --- /dev/null +++ b/doc/html/functions_0x67.html @@ -0,0 +1,94 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all struct and union fields with links to the structures/unions they belong to: +

+

- g -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_0x68.html b/doc/html/functions_0x68.html new file mode 100644 index 0000000..37308c9 --- /dev/null +++ b/doc/html/functions_0x68.html @@ -0,0 +1,101 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all struct and union fields with links to the structures/unions they belong to: +

+

- h -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_0x69.html b/doc/html/functions_0x69.html new file mode 100644 index 0000000..3579096 --- /dev/null +++ b/doc/html/functions_0x69.html @@ -0,0 +1,112 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all struct and union fields with links to the structures/unions they belong to: +

+

- i -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_0x6a.html b/doc/html/functions_0x6a.html new file mode 100644 index 0000000..50c12f1 --- /dev/null +++ b/doc/html/functions_0x6a.html @@ -0,0 +1,81 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all struct and union fields with links to the structures/unions they belong to: +

+

- j -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_0x6b.html b/doc/html/functions_0x6b.html new file mode 100644 index 0000000..269ee3c --- /dev/null +++ b/doc/html/functions_0x6b.html @@ -0,0 +1,81 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all struct and union fields with links to the structures/unions they belong to: +

+

- k -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_0x6c.html b/doc/html/functions_0x6c.html new file mode 100644 index 0000000..2ee055d --- /dev/null +++ b/doc/html/functions_0x6c.html @@ -0,0 +1,102 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all struct and union fields with links to the structures/unions they belong to: +

+

- l -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_0x6d.html b/doc/html/functions_0x6d.html new file mode 100644 index 0000000..d592021 --- /dev/null +++ b/doc/html/functions_0x6d.html @@ -0,0 +1,109 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all struct and union fields with links to the structures/unions they belong to: +

+

- m -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_0x6e.html b/doc/html/functions_0x6e.html new file mode 100644 index 0000000..1f535d4 --- /dev/null +++ b/doc/html/functions_0x6e.html @@ -0,0 +1,111 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all struct and union fields with links to the structures/unions they belong to: +

+

- n -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_0x6f.html b/doc/html/functions_0x6f.html new file mode 100644 index 0000000..2f34179 --- /dev/null +++ b/doc/html/functions_0x6f.html @@ -0,0 +1,122 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all struct and union fields with links to the structures/unions they belong to: +

+

- o -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_0x70.html b/doc/html/functions_0x70.html new file mode 100644 index 0000000..1e3d4f1 --- /dev/null +++ b/doc/html/functions_0x70.html @@ -0,0 +1,144 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all struct and union fields with links to the structures/unions they belong to: +

+

- p -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_0x71.html b/doc/html/functions_0x71.html new file mode 100644 index 0000000..62603b8 --- /dev/null +++ b/doc/html/functions_0x71.html @@ -0,0 +1,82 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all struct and union fields with links to the structures/unions they belong to: +

+

- q -

+
Generated on Fri Dec 1 14:04:30 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_0x72.html b/doc/html/functions_0x72.html new file mode 100644 index 0000000..c1369b4 --- /dev/null +++ b/doc/html/functions_0x72.html @@ -0,0 +1,114 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all struct and union fields with links to the structures/unions they belong to: +

+

- r -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_0x73.html b/doc/html/functions_0x73.html new file mode 100644 index 0000000..6cba113 --- /dev/null +++ b/doc/html/functions_0x73.html @@ -0,0 +1,184 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all struct and union fields with links to the structures/unions they belong to: +

+

- s -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_0x74.html b/doc/html/functions_0x74.html new file mode 100644 index 0000000..981f581 --- /dev/null +++ b/doc/html/functions_0x74.html @@ -0,0 +1,152 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all struct and union fields with links to the structures/unions they belong to: +

+

- t -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_0x75.html b/doc/html/functions_0x75.html new file mode 100644 index 0000000..c032091 --- /dev/null +++ b/doc/html/functions_0x75.html @@ -0,0 +1,91 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all struct and union fields with links to the structures/unions they belong to: +

+

- u -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_0x76.html b/doc/html/functions_0x76.html new file mode 100644 index 0000000..69db03a --- /dev/null +++ b/doc/html/functions_0x76.html @@ -0,0 +1,121 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all struct and union fields with links to the structures/unions they belong to: +

+

- v -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_0x77.html b/doc/html/functions_0x77.html new file mode 100644 index 0000000..41af4eb --- /dev/null +++ b/doc/html/functions_0x77.html @@ -0,0 +1,83 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all struct and union fields with links to the structures/unions they belong to: +

+

- w -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_0x79.html b/doc/html/functions_0x79.html new file mode 100644 index 0000000..acdea74 --- /dev/null +++ b/doc/html/functions_0x79.html @@ -0,0 +1,81 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all struct and union fields with links to the structures/unions they belong to: +

+

- y -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_0x7e.html b/doc/html/functions_0x7e.html new file mode 100644 index 0000000..4e75034 --- /dev/null +++ b/doc/html/functions_0x7e.html @@ -0,0 +1,87 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all struct and union fields with links to the structures/unions they belong to: +

+

- ~ -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_func.html b/doc/html/functions_func.html new file mode 100644 index 0000000..f88276c --- /dev/null +++ b/doc/html/functions_func.html @@ -0,0 +1,196 @@ + + +UbixOS V2: Data Fields - Functions + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- _ -

+

- a -

+

- b -

+

- d -

+

- f -

+

- g -

+

- i -

+

- l -

+

- m -

+

- o -

+

- p -

+

- r -

+

- s -

+

- t -

+

- u -

+

- v -

+

- w -

+

- ~ -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_rela.html b/doc/html/functions_rela.html new file mode 100644 index 0000000..5e2ee4a --- /dev/null +++ b/doc/html/functions_rela.html @@ -0,0 +1,51 @@ + + +UbixOS V2: Data Fields - Related Functions + + + + +
+
+
+
+
+ +
+  +

+

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_vars.html b/doc/html/functions_vars.html new file mode 100644 index 0000000..62c2f2e --- /dev/null +++ b/doc/html/functions_vars.html @@ -0,0 +1,83 @@ + + +UbixOS V2: Data Fields - Variables + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- _ -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_vars_0x61.html b/doc/html/functions_vars_0x61.html new file mode 100644 index 0000000..141f1a0 --- /dev/null +++ b/doc/html/functions_vars_0x61.html @@ -0,0 +1,102 @@ + + +UbixOS V2: Data Fields - Variables + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- a -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_vars_0x62.html b/doc/html/functions_vars_0x62.html new file mode 100644 index 0000000..c061009 --- /dev/null +++ b/doc/html/functions_vars_0x62.html @@ -0,0 +1,105 @@ + + +UbixOS V2: Data Fields - Variables + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- b -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_vars_0x63.html b/doc/html/functions_vars_0x63.html new file mode 100644 index 0000000..d85061d --- /dev/null +++ b/doc/html/functions_vars_0x63.html @@ -0,0 +1,118 @@ + + +UbixOS V2: Data Fields - Variables + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- c -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_vars_0x64.html b/doc/html/functions_vars_0x64.html new file mode 100644 index 0000000..7363d72 --- /dev/null +++ b/doc/html/functions_vars_0x64.html @@ -0,0 +1,186 @@ + + +UbixOS V2: Data Fields - Variables + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- d -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_vars_0x65.html b/doc/html/functions_vars_0x65.html new file mode 100644 index 0000000..382a114 --- /dev/null +++ b/doc/html/functions_vars_0x65.html @@ -0,0 +1,112 @@ + + +UbixOS V2: Data Fields - Variables + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- e -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_vars_0x66.html b/doc/html/functions_vars_0x66.html new file mode 100644 index 0000000..5b0b077 --- /dev/null +++ b/doc/html/functions_vars_0x66.html @@ -0,0 +1,199 @@ + + +UbixOS V2: Data Fields - Variables + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- f -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_vars_0x67.html b/doc/html/functions_vars_0x67.html new file mode 100644 index 0000000..c0de86b --- /dev/null +++ b/doc/html/functions_vars_0x67.html @@ -0,0 +1,85 @@ + + +UbixOS V2: Data Fields - Variables + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- g -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_vars_0x68.html b/doc/html/functions_vars_0x68.html new file mode 100644 index 0000000..3ea41e5 --- /dev/null +++ b/doc/html/functions_vars_0x68.html @@ -0,0 +1,100 @@ + + +UbixOS V2: Data Fields - Variables + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- h -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_vars_0x69.html b/doc/html/functions_vars_0x69.html new file mode 100644 index 0000000..38d2476 --- /dev/null +++ b/doc/html/functions_vars_0x69.html @@ -0,0 +1,107 @@ + + +UbixOS V2: Data Fields - Variables + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- i -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_vars_0x6a.html b/doc/html/functions_vars_0x6a.html new file mode 100644 index 0000000..fb6a7d0 --- /dev/null +++ b/doc/html/functions_vars_0x6a.html @@ -0,0 +1,80 @@ + + +UbixOS V2: Data Fields - Variables + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- j -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_vars_0x6b.html b/doc/html/functions_vars_0x6b.html new file mode 100644 index 0000000..cee98f7 --- /dev/null +++ b/doc/html/functions_vars_0x6b.html @@ -0,0 +1,80 @@ + + +UbixOS V2: Data Fields - Variables + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- k -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_vars_0x6c.html b/doc/html/functions_vars_0x6c.html new file mode 100644 index 0000000..dba2126 --- /dev/null +++ b/doc/html/functions_vars_0x6c.html @@ -0,0 +1,100 @@ + + +UbixOS V2: Data Fields - Variables + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- l -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_vars_0x6d.html b/doc/html/functions_vars_0x6d.html new file mode 100644 index 0000000..6b9b90e --- /dev/null +++ b/doc/html/functions_vars_0x6d.html @@ -0,0 +1,107 @@ + + +UbixOS V2: Data Fields - Variables + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- m -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_vars_0x6e.html b/doc/html/functions_vars_0x6e.html new file mode 100644 index 0000000..462eb1f --- /dev/null +++ b/doc/html/functions_vars_0x6e.html @@ -0,0 +1,110 @@ + + +UbixOS V2: Data Fields - Variables + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- n -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_vars_0x6f.html b/doc/html/functions_vars_0x6f.html new file mode 100644 index 0000000..0a11aa3 --- /dev/null +++ b/doc/html/functions_vars_0x6f.html @@ -0,0 +1,100 @@ + + +UbixOS V2: Data Fields - Variables + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- o -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_vars_0x70.html b/doc/html/functions_vars_0x70.html new file mode 100644 index 0000000..6ab9e95 --- /dev/null +++ b/doc/html/functions_vars_0x70.html @@ -0,0 +1,138 @@ + + +UbixOS V2: Data Fields - Variables + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- p -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_vars_0x71.html b/doc/html/functions_vars_0x71.html new file mode 100644 index 0000000..4e355d1 --- /dev/null +++ b/doc/html/functions_vars_0x71.html @@ -0,0 +1,81 @@ + + +UbixOS V2: Data Fields - Variables + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- q -

+
Generated on Fri Dec 1 14:04:30 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_vars_0x72.html b/doc/html/functions_vars_0x72.html new file mode 100644 index 0000000..d354b85 --- /dev/null +++ b/doc/html/functions_vars_0x72.html @@ -0,0 +1,110 @@ + + +UbixOS V2: Data Fields - Variables + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- r -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_vars_0x73.html b/doc/html/functions_vars_0x73.html new file mode 100644 index 0000000..86cf655 --- /dev/null +++ b/doc/html/functions_vars_0x73.html @@ -0,0 +1,175 @@ + + +UbixOS V2: Data Fields - Variables + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- s -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_vars_0x74.html b/doc/html/functions_vars_0x74.html new file mode 100644 index 0000000..c987c75 --- /dev/null +++ b/doc/html/functions_vars_0x74.html @@ -0,0 +1,150 @@ + + +UbixOS V2: Data Fields - Variables + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- t -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_vars_0x75.html b/doc/html/functions_vars_0x75.html new file mode 100644 index 0000000..a2461df --- /dev/null +++ b/doc/html/functions_vars_0x75.html @@ -0,0 +1,89 @@ + + +UbixOS V2: Data Fields - Variables + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- u -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_vars_0x76.html b/doc/html/functions_vars_0x76.html new file mode 100644 index 0000000..db0b22c --- /dev/null +++ b/doc/html/functions_vars_0x76.html @@ -0,0 +1,102 @@ + + +UbixOS V2: Data Fields - Variables + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- v -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_vars_0x77.html b/doc/html/functions_vars_0x77.html new file mode 100644 index 0000000..739b081 --- /dev/null +++ b/doc/html/functions_vars_0x77.html @@ -0,0 +1,82 @@ + + +UbixOS V2: Data Fields - Variables + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- w -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/functions_vars_0x79.html b/doc/html/functions_vars_0x79.html new file mode 100644 index 0000000..aa6f283 --- /dev/null +++ b/doc/html/functions_vars_0x79.html @@ -0,0 +1,80 @@ + + +UbixOS V2: Data Fields - Variables + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- y -

+
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/gdt_8h-source.html b/doc/html/gdt_8h-source.html new file mode 100644 index 0000000..1abed5a --- /dev/null +++ b/doc/html/gdt_8h-source.html @@ -0,0 +1,159 @@ + + +UbixOS V2: src/sys/include/sys/gdt.h Source File + + + + +
+
+
+
+ +

gdt.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _GDT_H
+00031 #define _GDT_H
+00032 
+00033 /* Descriptor Definitions */
+00034 #define dCall 0x0C00 /* 386 Call Gate                */
+00035 #define dCode 0x1800 /* Code Segment                 */
+00036 #define dData 0x1000 /* Data Segment                 */
+00037 #define dInt  0x0E00 /* 386 Interrupt Gate           */
+00038 #define dLdt  0x200  /* Local Descriptor Table (LDT) */
+00039 #define dTask 0x500  /* Task gate                    */
+00040 #define dTrap 0x0F00 /* 386 Trap Gate                */
+00041 #define dTss  0x900  /* Task State Segment (TSS)     */
+00042 
+00043 /* Descriptor Options */
+00044 #define dDpl3     0x6000 /* DPL3 or mask for DPL             */
+00045 #define dDpl2     0x4000 /* DPL2 or mask for DPL             */
+00046 #define dDpl1     0x2000 /* DPL1 or mask for DPL             */
+00047 #define dDpl0     0x0000 /* DPL0 or mask for DPL             */
+00048 #define dPresent  0x8000 /* Present                          */
+00049 #define dNpresent 0x8000 /* Not Present                      */
+00050 #define dAcc      0x100  /* Accessed (Data or Code)          */
+00051 #define dWrite    0x200  /* Writable (Data segments only)    */
+00052 #define dRead     0x200  /* Readable (Code segments only)    */
+00053 #define dBusy     0xB00  /* Busy (TSS only)    was 200       */
+00054 #define dEexdown  0x400  /* Expand down (Data segments only) */
+00055 #define dConform  0x400  /* Conforming (Code segments only)  */
+00056 #define dBig      0x40   /* Default to 32 bit mode           */
+00057 #define dBiglim   0x80   /* Limit is in 4K units             */
+00058 
+00059 /* GDT Descriptor */
+00060 struct gdtDescriptor {
+00061   unsigned short limitLow;      /* Limit 0..15    */
+00062   unsigned short baseLow;       /* Base  0..15    */
+00063   unsigned char  baseMed;       /* Base  16..23   */
+00064   unsigned char  access;        /* Access Byte    */
+00065   unsigned int   limitHigh:4;   /* Limit 16..19   */
+00066   unsigned int   granularity:4; /* Granularity    */
+00067   unsigned char  baseHigh;      /* Base 24..31    */
+00068   } __attribute__ ((packed));
+00069 
+00070 struct gdtGate {
+00071   unsigned short offsetLow;  /* Offset 0..15  */
+00072   unsigned short selector;   /* Selector      */
+00073   unsigned short access;     /* Access Flags  */
+00074   unsigned short offsetHigh; /* Offset 16..31 */
+00075   } __attribute__ ((packed));
+00076 
+00077 union descriptorTableUnion {
+00078   struct gdtDescriptor descriptor; /* Normal descriptor */
+00079   struct gdtGate gate;             /* Gate descriptor   */
+00080   unsigned long dummy;             /* Any other info    */
+00081   };
+00082 
+00083 
+00084 #define ubixDescriptorTable(name,length) union descriptorTableUnion name[length] =
+00085 #define ubixStandardDescriptor(base, limit, control) {descriptor: \
+00086                                                {(limit & 0xffff), \
+00087                                                (base & 0xffff), \
+00088                                                ((base >> 16) & 0xff), \
+00089                                                ((control+dPresent) >> 8), \
+00090                                                (limit >> 16), \
+00091                                                ((control & 0xff) >> 4), \
+00092                                                (base >> 24)}}
+00093 #define ubixGateDescriptor(offset, selector, control) {gate: {(offset & 0xffff), selector, \
+00094                                                      (control+dPresent), (offset >> 16) }}
+00095 
+00096 extern union descriptorTableUnion ubixGDT[9];     
+00097 
+00098 #endif
+00099 
+00100 /***
+00101  $Log$
+00102  Revision 1.1.1.1  2006/06/01 12:46:15  reddawg
+00103  ubix2
+00104 
+00105  Revision 1.2  2005/10/12 00:13:37  reddawg
+00106  Removed
+00107 
+00108  Revision 1.1.1.1  2005/09/26 17:23:52  reddawg
+00109  no message
+00110 
+00111  Revision 1.5  2004/08/15 16:47:49  reddawg
+00112  Fixed
+00113 
+00114  Revision 1.4  2004/07/22 20:53:07  reddawg
+00115  atkbd: fixed problem
+00116 
+00117  Revision 1.3  2004/05/21 15:12:17  reddawg
+00118  Cleaned up
+00119 
+00120 
+00121  END
+00122  ***/
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/gdt_8h.html b/doc/html/gdt_8h.html new file mode 100644 index 0000000..114b8f1 --- /dev/null +++ b/doc/html/gdt_8h.html @@ -0,0 +1,651 @@ + + +UbixOS V2: src/sys/include/sys/gdt.h File Reference + + + + +
+
+
+
+ +

gdt.h File Reference

+

+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

union  descriptorTableUnion
struct  gdtDescriptor
struct  gdtGate

Defines

#define dAcc   0x100
#define dBig   0x40
#define dBiglim   0x80
#define dBusy   0xB00
#define dCall   0x0C00
#define dCode   0x1800
#define dConform   0x400
#define dData   0x1000
#define dDpl0   0x0000
#define dDpl1   0x2000
#define dDpl2   0x4000
#define dDpl3   0x6000
#define dEexdown   0x400
#define dInt   0x0E00
#define dLdt   0x200
#define dNpresent   0x8000
#define dPresent   0x8000
#define dRead   0x200
#define dTask   0x500
#define dTrap   0x0F00
#define dTss   0x900
#define dWrite   0x200
#define ubixDescriptorTable(name, length)   union descriptorTableUnion name[length] =
#define ubixGateDescriptor(offset, selector, control)
#define ubixStandardDescriptor(base, limit, control)

Variables

gdtGate packed
gdtDescriptor packed
descriptorTableUnion ubixGDT [9]
+


Define Documentation

+ +
+
+ + + + +
#define dAcc   0x100
+
+
+ +

+ +

+Definition at line 50 of file gdt.h. +

+

+ +

+
+ + + + +
#define dBig   0x40
+
+
+ +

+ +

+Definition at line 56 of file gdt.h. +

+Referenced by ubixDescriptorTable(). +

+

+ +

+
+ + + + +
#define dBiglim   0x80
+
+
+ +

+ +

+Definition at line 57 of file gdt.h. +

+Referenced by ubixDescriptorTable(). +

+

+ +

+
+ + + + +
#define dBusy   0xB00
+
+
+ +

+ +

+Definition at line 53 of file gdt.h. +

+

+ +

+
+ + + + +
#define dCall   0x0C00
+
+
+ +

+ +

+Definition at line 34 of file gdt.h. +

+

+ +

+
+ + + + +
#define dCode   0x1800
+
+
+ +

+ +

+Definition at line 35 of file gdt.h. +

+Referenced by ubixDescriptorTable(). +

+

+ +

+
+ + + + +
#define dConform   0x400
+
+
+ +

+ +

+Definition at line 55 of file gdt.h. +

+

+ +

+
+ + + + +
#define dData   0x1000
+
+
+ +

+ +

+Definition at line 36 of file gdt.h. +

+Referenced by ubixDescriptorTable(). +

+

+ +

+
+ + + + +
#define dDpl0   0x0000
+
+
+ +

+ +

+Definition at line 47 of file gdt.h. +

+Referenced by atkbd_init(), idt_init(), and ne2k_init(). +

+

+ +

+
+ + + + +
#define dDpl1   0x2000
+
+
+ +

+ +

+Definition at line 46 of file gdt.h. +

+

+ +

+
+ + + + +
#define dDpl2   0x4000
+
+
+ +

+ +

+Definition at line 45 of file gdt.h. +

+

+ +

+
+ + + + +
#define dDpl3   0x6000
+
+
+ +

+ +

+Definition at line 44 of file gdt.h. +

+Referenced by idt_init(), initLNC(), mouseInit(), and ubixDescriptorTable(). +

+

+ +

+
+ + + + +
#define dEexdown   0x400
+
+
+ +

+ +

+Definition at line 54 of file gdt.h. +

+

+ +

+
+ + + + +
#define dInt   0x0E00
+
+
+ +

+ +

+Definition at line 37 of file gdt.h. +

+Referenced by atkbd_init(), fdc_init(), idt_init(), initLNC(), mouseInit(), and ne2k_init(). +

+

+ +

+
+ + + + +
#define dLdt   0x200
+
+
+ +

+ +

+Definition at line 38 of file gdt.h. +

+Referenced by ubixDescriptorTable(). +

+

+ +

+
+ + + + +
#define dNpresent   0x8000
+
+
+ +

+ +

+Definition at line 49 of file gdt.h. +

+

+ +

+
+ + + + +
#define dPresent   0x8000
+
+
+ +

+ +

+Definition at line 48 of file gdt.h. +

+Referenced by atkbd_init(), fdc_init(), idt_init(), initLNC(), mouseInit(), and ne2k_init(). +

+

+ +

+
+ + + + +
#define dRead   0x200
+
+
+ +

+ +

+Definition at line 52 of file gdt.h. +

+Referenced by ubixDescriptorTable(). +

+

+ +

+
+ + + + +
#define dTask   0x500
+
+
+ +

+ +

+Definition at line 39 of file gdt.h. +

+Referenced by idt_init(). +

+

+ +

+
+ + + + +
#define dTrap   0x0F00
+
+
+ +

+ +

+Definition at line 40 of file gdt.h. +

+Referenced by idt_init(). +

+

+ +

+
+ + + + +
#define dTss   0x900
+
+
+ +

+ +

+Definition at line 41 of file gdt.h. +

+Referenced by ubixDescriptorTable(). +

+

+ +

+
+ + + + +
#define dWrite   0x200
+
+
+ +

+ +

+Definition at line 51 of file gdt.h. +

+Referenced by ubixDescriptorTable(). +

+

+ +

+
+ + + + + + + + + + + + +
#define ubixDescriptorTable (name,
length   )    union descriptorTableUnion name[length] =
+
+
+ +

+ +

+Definition at line 84 of file gdt.h. +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define ubixGateDescriptor (offset,
selector,
control   ) 
+
+
+ +

+Value:

{gate: {(offset & 0xffff), selector, \
+                                                     (control+dPresent), (offset >> 16) }}
+
+

+Definition at line 93 of file gdt.h. +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define ubixStandardDescriptor (base,
limit,
control   ) 
+
+
+ +

+Value:

{descriptor: \
+                                               {(limit & 0xffff), \
+                                               (base & 0xffff), \
+                                               ((base >> 16) & 0xff), \
+                                               ((control+dPresent) >> 8), \
+                                               (limit >> 16), \
+                                               ((control & 0xff) >> 4), \
+                                               (base >> 24)}}
+
+

+Definition at line 85 of file gdt.h. +

+Referenced by ubixDescriptorTable(). +

+

+


Variable Documentation

+ +
+
+ + + + +
struct gdtGate packed
+
+
+ +

+ +

+

+ +

+
+ + + + +
struct gdtDescriptor packed
+
+
+ +

+ +

+

+ +

+
+ + + + +
union descriptorTableUnion ubixGDT[9]
+
+
+ +

+ +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/gen__calls_8c-source.html b/doc/html/gen__calls_8c-source.html new file mode 100644 index 0000000..ad08b89 --- /dev/null +++ b/doc/html/gen__calls_8c-source.html @@ -0,0 +1,129 @@ + + +UbixOS V2: src/sys/kernel/gen_calls.c Source File + + + + +
+
+
+
+ +

gen_calls.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <ubixos/types.h>
+00031 #include <sys/thread.h>
+00032 #include <sys/gen_calls.h>
+00033 #include <ubixos/sched.h>
+00034 #include <lib/kprintf.h>
+00035 #include <assert.h>
+00036 
+00037 /* return the process id */
+00038 int getpid(struct thread *td, struct getpid_args *uap) {
+00039   td->td_retval[0] = _current->id;
+00040   return (0);
+00041   }
+00042 
+00043 /* return the process user id */
+00044 int getuid(struct thread *td, struct getuid_args *uap) {
+00045   td->td_retval[0] = _current->uid;
+00046   return (0);
+00047   }
+00048 
+00049 /* return the process group id */
+00050 int getgid(struct thread *td, struct getgid_args *uap) {
+00051   td->td_retval[0] = _current->gid;
+00052   return (0);
+00053   }
+00054 
+00055 int  sys_write(struct thread *td, struct write_args *uap) {
+00056   char *buffer = 0x0;
+00057   char *in = 0x0;
+00058   if (uap->fd == 2) {
+00059     kprintf("stderr: %s",uap->buf);
+00060     }
+00061   if (uap->fd == 1) {
+00062     in = uap->buf;
+00063     buffer = kmalloc(1024);
+00064     memcpy(buffer,uap->buf,uap->nbyte);
+00065     kprintf("%s",buffer); 
+00066     kfree(buffer);
+00067     }
+00068   else {
+00069     kprintf("(%i) %s",uap->fd,uap->buf);
+00070     }
+00071   return(0x0);
+00072   }
+00073 
+00074 int issetugid(register struct thread *td, struct issetugid_args *uap) {
+00075   td->td_retval[0] = 0;
+00076   return (0);
+00077   }
+00078 
+00079 int readlink(struct thread *td,struct readlink_args *uap) {
+00080   kprintf("readlink: [%s:%i]\n",uap->path,uap->count);
+00081   td->td_retval[0] = -1;
+00082   td->td_retval[1] = 0x0;
+00083   return(0x0);
+00084   }
+00085 
+00086 int gettimeofday_new(struct thread *td, struct gettimeofday_args *uap) {
+00087   return(0x0);
+00088   }
+00089 
+00090 /***
+00091  END
+00092  ***/
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/gen__calls_8c.html b/doc/html/gen__calls_8c.html new file mode 100644 index 0000000..e042568 --- /dev/null +++ b/doc/html/gen__calls_8c.html @@ -0,0 +1,293 @@ + + +UbixOS V2: src/sys/kernel/gen_calls.c File Reference + + + + +
+
+
+
+ +

gen_calls.c File Reference

+

+#include <ubixos/types.h>
+#include <sys/thread.h>
+#include <sys/gen_calls.h>
+#include <ubixos/sched.h>
+#include <lib/kprintf.h>
+#include <assert.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + +

Functions

int getgid (struct thread *td, struct getgid_args *uap)
int getpid (struct thread *td, struct getpid_args *uap)
int gettimeofday_new (struct thread *td, struct gettimeofday_args *uap)
int getuid (struct thread *td, struct getuid_args *uap)
int issetugid (register struct thread *td, struct issetugid_args *uap)
int readlink (struct thread *td, struct readlink_args *uap)
int sys_write (struct thread *td, struct write_args *uap)
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
int getgid (struct thread td,
struct getgid_args uap 
)
+
+
+ +

+ +

+Definition at line 50 of file gen_calls.c. +

+References _current, taskStruct::gid, taskStruct::td, and thread::td_retval. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int getpid (struct thread td,
struct getpid_args uap 
)
+
+
+ +

+ +

+Definition at line 38 of file gen_calls.c. +

+References _current, taskStruct::id, taskStruct::td, and thread::td_retval. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int gettimeofday_new (struct thread td,
struct gettimeofday_args uap 
)
+
+
+ +

+ +

+Definition at line 86 of file gen_calls.c. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int getuid (struct thread td,
struct getuid_args uap 
)
+
+
+ +

+ +

+Definition at line 44 of file gen_calls.c. +

+References _current, taskStruct::td, thread::td_retval, and taskStruct::uid. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int issetugid (register struct thread td,
struct issetugid_args uap 
)
+
+
+ +

+ +

+Definition at line 74 of file gen_calls.c. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int readlink (struct thread td,
struct readlink_args uap 
)
+
+
+ +

+ +

+Definition at line 79 of file gen_calls.c. +

+References readlink_args::count, kprintf(), readlink_args::path, taskStruct::td, and thread::td_retval. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int sys_write (struct thread td,
struct write_args uap 
)
+
+
+ +

+ +

+Definition at line 55 of file gen_calls.c. +

+References write_args::buf, buffer, write_args::fd, kfree(), kmalloc(), kprintf(), memcpy(), and write_args::nbyte. +

+

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/gen__calls_8h-source.html b/doc/html/gen__calls_8h-source.html new file mode 100644 index 0000000..82f06fe --- /dev/null +++ b/doc/html/gen__calls_8h-source.html @@ -0,0 +1,86 @@ + + +UbixOS V2: src/sys/include/sys/gen_calls.h Source File + + + + +
+
+
+
+ +

gen_calls.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _GEN_CALLS_H
+00031 #define _GEN_CALLS_H
+00032 
+00033 #include <sys/thread.h>
+00034 #include <sys/sysproto.h>
+00035 
+00036 int sys_write(struct thread *, struct write_args *);
+00037 int getpid(struct thread *, struct getpid_args *);
+00038 int issetugid(register struct thread *, struct issetugid_args *);
+00039 int readlink(struct thread *,struct readlink_args *);
+00040 int getuid(struct thread *, struct getuid_args *);
+00041 int getgid(struct thread *, struct getgid_args *);
+00042 int gettimeofday_new(struct thread *, struct gettimeofday_args *);
+00043 
+00044 #endif
+00045 
+00046 /***
+00047  END
+00048  ***/
+00049 
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/gen__calls_8h.html b/doc/html/gen__calls_8h.html new file mode 100644 index 0000000..612a320 --- /dev/null +++ b/doc/html/gen__calls_8h.html @@ -0,0 +1,283 @@ + + +UbixOS V2: src/sys/include/sys/gen_calls.h File Reference + + + + +
+
+
+
+ +

gen_calls.h File Reference

+

+#include <sys/thread.h>
+#include <sys/sysproto.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + +

Functions

int getgid (struct thread *, struct getgid_args *)
int getpid (struct thread *, struct getpid_args *)
int gettimeofday_new (struct thread *, struct gettimeofday_args *)
int getuid (struct thread *, struct getuid_args *)
int issetugid (register struct thread *, struct issetugid_args *)
int readlink (struct thread *, struct readlink_args *)
int sys_write (struct thread *, struct write_args *)
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
int getgid (struct thread,
struct getgid_args 
)
+
+
+ +

+ +

+Definition at line 50 of file gen_calls.c. +

+Referenced by UbixFS::mknod(), and UbixFS::vfs_format(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int getpid (struct thread,
struct getpid_args 
)
+
+
+ +

+ +

+Definition at line 38 of file gen_calls.c. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int gettimeofday_new (struct thread,
struct gettimeofday_args 
)
+
+
+ +

+ +

+Definition at line 86 of file gen_calls.c. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int getuid (struct thread,
struct getuid_args 
)
+
+
+ +

+ +

+Definition at line 44 of file gen_calls.c. +

+Referenced by UbixFS::mknod(), and UbixFS::vfs_format(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int issetugid (register struct thread,
struct issetugid_args 
)
+
+
+ +

+ +

+Definition at line 74 of file gen_calls.c. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int readlink (struct thread,
struct readlink_args 
)
+
+
+ +

+ +

+Definition at line 79 of file gen_calls.c. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int sys_write (struct thread,
struct write_args 
)
+
+
+ +

+ +

+Definition at line 55 of file gen_calls.c. +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/getfreepage_8c-source.html b/doc/html/getfreepage_8c-source.html new file mode 100644 index 0000000..cb48c99 --- /dev/null +++ b/doc/html/getfreepage_8c-source.html @@ -0,0 +1,119 @@ + + +UbixOS V2: src/sys/vmm/getfreepage.c Source File + + + + +
+
+
+
+ +

getfreepage.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005 Redistribution and use in source and binary forms, with or without modification, are
+00006 permitted provided that the following conditions are met:
+00007 
+00008 Redistributions of source code must retain the above copyright notice, this list of
+00009 conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010 form must reproduce the above copyright notice, this list of conditions, the following
+00011 disclaimer and the list of authors in the documentation and/or other materials provided
+00012 with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013 contributors may be used to endorse or promote products derived from this software
+00014 without specific prior written permission.
+00015 
+00016 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019 THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021 OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023 TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <vmm/vmm.h>
+00031 #include <ubixos/kpanic.h>
+00032 #include <ubixos/spinlock.h>
+00033 
+00034 static spinLock_t vmmGFPlock = SPIN_LOCK_INITIALIZER;
+00035 
+00036 /************************************************************************
+00037 
+00038 Function: void *vmmGetFreePage(pidType pid);
+00039 
+00040 Description: Returns A Free Page Mapped To The VM Space
+00041 
+00042 Notes:
+00043 
+00044 07/30/02 - This Returns A Free Page In The Top 1GB For The Kernel
+00045 
+00046 ************************************************************************/
+00047 void           *
+00048 vmmGetFreePage(pidType pid)
+00049 {
+00050   uInt16             x = 0x0, y = 0x0;
+00051   uInt32         *pageTableSrc = 0x0;
+00052   
+00053   spinLock(&vmmGFPlock);
+00054   
+00055   /* Lets Search For A Free Page */
+00056   for (x = 768; x < 1024; x++) {
+00057 
+00058     /* Set Page Table Address */
+00059     pageTableSrc = (uInt32 *) (tablesBaseAddress + (0x1000 * x));
+00060     for (y = 0x0; y < 1024; y++) {
+00061       /* Loop Through The Page Table Find An UnAllocated Page */
+00062       if ((uInt32) pageTableSrc[y] == (uInt32) 0x0) {
+00063         /* Map A Physical Page To The Virtual Page */
+00064         if ((vmm_remapPage(vmmFindFreePage(pid), ((x * 0x400000) + (y * 0x1000)),KERNEL_PAGE_DEFAULT)) == 0x0)
+00065           kpanic("vmmRemapPage: vmmGetFreePage\n");
+00066         /* Clear This Page So No Garbage Is There */
+00067         vmmClearVirtualPage((uInt32) ((x * 0x400000) + (y * 0x1000)));
+00068         /* Return The Address Of The Newly Allocate Page */
+00069         spinUnlock(&vmmGFPlock);
+00070         return ((void *)((x * 0x400000) + (y * 0x1000)));
+00071       }
+00072     }
+00073   }
+00074   /* If No Free Page Was Found Return NULL */
+00075   spinUnlock(&vmmGFPlock);
+00076   return (0x0);
+00077 }
+00078 
+00079 /***
+00080  END
+00081  ***/
+00082 
+

Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/getfreepage_8c.html b/doc/html/getfreepage_8c.html new file mode 100644 index 0000000..1caae82 --- /dev/null +++ b/doc/html/getfreepage_8c.html @@ -0,0 +1,100 @@ + + +UbixOS V2: src/sys/vmm/getfreepage.c File Reference + + + + +
+
+
+
+ +

getfreepage.c File Reference

+

+#include <vmm/vmm.h>
+#include <ubixos/kpanic.h>
+#include <ubixos/spinlock.h>
+ +

+Go to the source code of this file. + + + + + + + +

Functions

void * vmmGetFreePage (pidType pid)

Variables

static spinLock_t vmmGFPlock = SPIN_LOCK_INITIALIZER
+


Function Documentation

+ +
+
+ + + + + + + + + +
void* vmmGetFreePage (pidType  pid  ) 
+
+ +

+


Variable Documentation

+ +
+
+ + + + +
spinLock_t vmmGFPlock = SPIN_LOCK_INITIALIZER [static]
+
+
+ +

+ +

+Definition at line 34 of file getfreepage.c. +

+Referenced by vmmGetFreePage(). +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/getfreevirtualpage_8c-source.html b/doc/html/getfreevirtualpage_8c-source.html new file mode 100644 index 0000000..5f0d502 --- /dev/null +++ b/doc/html/getfreevirtualpage_8c-source.html @@ -0,0 +1,201 @@ + + +UbixOS V2: src/sys/vmm/getfreevirtualpage.c Source File + + + + +
+
+
+
+ +

getfreevirtualpage.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <vmm/vmm.h>
+00031 #include <ubixos/sched.h>
+00032 #include <ubixos/kpanic.h>
+00033 #include <ubixos/spinlock.h>
+00034 #include <lib/kprint.h>
+00035 
+00036 static spinLock_t fvpSpinLock = SPIN_LOCK_INITIALIZER;
+00037 
+00038 /************************************************************************
+00039 
+00040 Function: void *vmmGetFreeVirtualPage(pidType pid,int count);
+00041 Description: Returns A Free Page Mapped To The VM Space
+00042 Notes:
+00043 
+00044 08/11/02 - This Will Return Next Avilable Free Page Of Tasks VM Space
+00045 
+00046 ************************************************************************/
+00047 void *vmmGetFreeVirtualPage(pidType pid, int count,int type) {
+00048   int             x = 0, y = 0, c = 0;
+00049   uInt32         *pageTableSrc = 0x0;
+00050   uInt32         *pageDir = 0x0;
+00051   uInt32          start_page = 0x0;
+00052 
+00053   
+00054   spinLock(&fvpSpinLock);
+00055   
+00056   pageDir = (uInt32 *) parentPageDirAddr;
+00057 
+00058   /* Lets Search For A Free Page */
+00059   if (_current->oInfo.vmStart <= 0x100000)
+00060     kpanic("Invalid vmStart\n");
+00061 
+00062   if (type == VM_THRD) {
+00063     start_page = (u_int32_t)(_current->td.vm_daddr + ctob(_current->td.vm_dsize));
+00064     }
+00065   else if (type == VM_TASK) {
+00066     //kprintf("vmStart");
+00067     start_page = _current->oInfo.vmStart;
+00068     }
+00069   else
+00070     K_PANIC("Invalid Type");
+00071 
+00072   //for (x = ((_current->td.vm_daddr + _current->td.vm_dsize) / (1024 * 4096)); x < 1024; x++) {
+00073   for (x = (start_page / (1024 * 4096)); x < 1024; x++) {
+00074     /* Set Page Table Address */
+00075     if ((pageDir[x] & PAGE_PRESENT) != PAGE_PRESENT) {
+00076       /* If Page Table Is Non Existant Then Set It Up */
+00077       pageDir[x] = (uInt32) vmmFindFreePage(_current->id) | PAGE_DEFAULT;
+00078       /* Also Add It To Virtual Space So We Can Make Changes Later */
+00079       pageTableSrc = (uInt32 *) (tablesBaseAddress + (4096 * 767));
+00080       pageTableSrc[x] = pageDir[x];
+00081       y = 1;
+00082       /* Reload Page Directory */
+00083       asm(
+00084           "movl %cr3,%eax\n"
+00085           "movl %eax,%cr3\n"
+00086         );
+00087     }
+00088     pageTableSrc = (uInt32 *) (tablesBaseAddress + (0x1000 * x));
+00089     if (y != 0x0) {
+00090       for (y = 0x0;y<pageEntries;y++) {
+00091         pageTableSrc[y] = (uInt32)0x0;
+00092         }
+00093       }
+00094     for (y = 0; y < 1024; y++) {
+00095       /* Loop Through The Page Table Find An UnAllocated Page */
+00096       if ((pageTableSrc[y] & PAGE_COW) == PAGE_COW) {
+00097         kprintf("COW");
+00098         //_current->td.vm_dsize += btoc(0x1000);
+00099         /* HACK MEMORY LEAK */
+00100         //pageTableSrc[y] = 0x0;
+00101         }
+00102       if ((uInt32) pageTableSrc[y] == (uInt32) 0x0) {
+00103         if (count > 0x1) {
+00104           for (c = 0; c < count; c++) {
+00105             if (y + c < 1024) {
+00106       if ((pageTableSrc[y + c] & PAGE_COW) == PAGE_COW) {
+00107         kprintf("COW");
+00108         //_current->td.vm_dsize += btoc(0x1000);
+00109         /* HACK MEMORY LEAK */
+00110         //pageTableSrc[y + c] = 0x0;
+00111         }
+00112 
+00113               if ((uInt32) pageTableSrc[y + c] != (uInt32) 0x0) {
+00114                 c = -1;
+00115                 break;
+00116                 }
+00117               }
+00118             }
+00119           if (c != -1) {
+00120             for (c = 0; c < count; c++) {
+00121               if ((vmm_remapPage((uInt32) vmmFindFreePage(pid), ((x * (1024 * 4096)) + ((y + c) * 4096)),PAGE_DEFAULT)) == 0x0)
+00122                 kpanic("vmmRemapPage: getFreeVirtualPage-1: [0x%X]\n",((x * (1024 * 4096)) + ((y + c) * 4096)));
+00123               vmmClearVirtualPage((uInt32) ((x * (1024 * 4096)) + ((y + c) * 4096)));
+00124             }
+00125             if (type == VM_THRD)
+00126               _current->td.vm_dsize += btoc(count * 0x1000);
+00127             spinUnlock(&fvpSpinLock);
+00128             return ((void *)((x * (1024 * 4096)) + (y * 4096)));
+00129           }
+00130         } else {
+00131           /* Map A Physical Page To The Virtual Page */
+00132 
+00133           /*
+00134            * remapPage((uInt32)vmmFindFreePage(pid),((x*(1024*4096))+(y*4096))
+00135            * ,pid);
+00136            */
+00137           if ((vmm_remapPage((uInt32) vmmFindFreePage(pid), ((x * (1024 * 4096)) + (y * 4096)),PAGE_DEFAULT)) == 0x0)
+00138             kpanic("vmmRemapPage: getFreeVirtualPage-2\n");
+00139 
+00140           /* Clear This Page So No Garbage Is There */
+00141           vmmClearVirtualPage((uInt32) ((x * (1024 * 4096)) + (y * 4096)));
+00142 
+00143           /* Return The Address Of The Newly Allocate Page */
+00144           if (type == VM_THRD) {
+00145             _current->td.vm_dsize += btoc(count * 0x1000);
+00146             kprintf("vm_dsize: [0x%X]][0x%X]\n",ctob(_current->td.vm_dsize),_current->td.vm_dsize);
+00147             }
+00148           //kprintf("(0x%X:0x%X)",_current->td.vm_dsize,vmm_getPhysicalAddr(((x * (1024 * 4096)) + (y * 4096))));
+00149 //          kprintf("(0x%X:0x%X)",_current->td.vm_dsize + _current->td.vm_daddr,((x * (1024 * 4096)) + (y * 4096)));
+00150           spinUnlock(&fvpSpinLock);
+00151           return ((void *)((x * (1024 * 4096)) + (y * 4096)));
+00152         }
+00153       }
+00154     }
+00155   }
+00156   /* If No Free Page Was Found Return NULL */
+00157   spinUnlock(&fvpSpinLock);
+00158   return (0x0);
+00159 }
+00160 
+00161 /***
+00162  END
+00163  ***/
+00164 
+

Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/getfreevirtualpage_8c.html b/doc/html/getfreevirtualpage_8c.html new file mode 100644 index 0000000..a945118 --- /dev/null +++ b/doc/html/getfreevirtualpage_8c.html @@ -0,0 +1,117 @@ + + +UbixOS V2: src/sys/vmm/getfreevirtualpage.c File Reference + + + + +
+
+
+
+ +

getfreevirtualpage.c File Reference

+

+#include <vmm/vmm.h>
+#include <ubixos/sched.h>
+#include <ubixos/kpanic.h>
+#include <ubixos/spinlock.h>
+#include <lib/kprint.h>
+ +

+Go to the source code of this file. + + + + + + + +

Functions

void * vmmGetFreeVirtualPage (pidType pid, int count, int type)

Variables

static spinLock_t fvpSpinLock = SPIN_LOCK_INITIALIZER
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void* vmmGetFreeVirtualPage (pidType  pid,
int  count,
int  type 
)
+
+ +

+


Variable Documentation

+ +
+
+ + + + +
spinLock_t fvpSpinLock = SPIN_LOCK_INITIALIZER [static]
+
+
+ +

+ +

+Definition at line 36 of file getfreevirtualpage.c. +

+Referenced by vmmGetFreeVirtualPage(). +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/getphysicaladdr_8c-source.html b/doc/html/getphysicaladdr_8c-source.html new file mode 100644 index 0000000..11c285e --- /dev/null +++ b/doc/html/getphysicaladdr_8c-source.html @@ -0,0 +1,87 @@ + + +UbixOS V2: src/sys/vmm/getphysicaladdr.c Source File + + + + +
+
+
+
+ +

getphysicaladdr.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <vmm/vmm.h>
+00031 
+00040 u_int32_t vmm_getPhysicalAddr(uInt32 pageAddr) {
+00041   int             pageDirectoryIndex = 0x0, pageTableIndex = 0x0;
+00042   uInt32         *pageTable = 0x0;
+00043 
+00044   //Calculate The Page Directory Index
+00045   pageDirectoryIndex = (pageAddr >> 22);
+00046   
+00047   //Calculate The Page Table Index
+00048   pageTableIndex = ((pageAddr >> 12) & 0x3FF);
+00049   
+00050   /* Set pageTable To The Virtual Address Of Table */
+00051   pageTable = (uInt32 *) (tablesBaseAddress + (0x1000 * pageDirectoryIndex));
+00052   /* Return The Physical Address Of The Page */
+00053   return ((uInt32)(pageTable[pageTableIndex] & 0xFFFFF000));
+00054   }
+00055 
+00056 /***
+00057  END
+00058  ***/
+

Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/getphysicaladdr_8c.html b/doc/html/getphysicaladdr_8c.html new file mode 100644 index 0000000..fdcad44 --- /dev/null +++ b/doc/html/getphysicaladdr_8c.html @@ -0,0 +1,75 @@ + + +UbixOS V2: src/sys/vmm/getphysicaladdr.c File Reference + + + + +
+
+
+
+ +

getphysicaladdr.c File Reference

+

+#include <vmm/vmm.h>
+ +

+Go to the source code of this file. + + + + +

Functions

u_int32_t vmm_getPhysicalAddr (uInt32 pageAddr)
+


Function Documentation

+ +
+
+ + + + + + + + + +
u_int32_t vmm_getPhysicalAddr (uInt32  pageAddr  ) 
+
+
+ +

+Function: void *vmmGetPhysicalAddr(); Description: Returns The Physical Address Of The Virtual Page Notes: +

+Definition at line 40 of file getphysicaladdr.c. +

+References tablesBaseAddress, and x1000. +

+Referenced by vmm_pageFault(), vmmCopyVirtualSpace(), and vmmCreateVirtualSpace(). +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals.html b/doc/html/globals.html new file mode 100644 index 0000000..42f3181 --- /dev/null +++ b/doc/html/globals.html @@ -0,0 +1,84 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: +

+

- $ -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_0x5f.html b/doc/html/globals_0x5f.html new file mode 100644 index 0000000..e00a13a --- /dev/null +++ b/doc/html/globals_0x5f.html @@ -0,0 +1,146 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: +

+

- _ -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_0x61.html b/doc/html/globals_0x61.html new file mode 100644 index 0000000..2180ddf --- /dev/null +++ b/doc/html/globals_0x61.html @@ -0,0 +1,157 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: +

+

- a -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_0x62.html b/doc/html/globals_0x62.html new file mode 100644 index 0000000..4ae42d5 --- /dev/null +++ b/doc/html/globals_0x62.html @@ -0,0 +1,127 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: +

+

- b -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_0x63.html b/doc/html/globals_0x63.html new file mode 100644 index 0000000..f65aac3 --- /dev/null +++ b/doc/html/globals_0x63.html @@ -0,0 +1,151 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: +

+

- c -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_0x64.html b/doc/html/globals_0x64.html new file mode 100644 index 0000000..b7fbc09 --- /dev/null +++ b/doc/html/globals_0x64.html @@ -0,0 +1,189 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: +

+

- d -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_0x65.html b/doc/html/globals_0x65.html new file mode 100644 index 0000000..3b1cc29 --- /dev/null +++ b/doc/html/globals_0x65.html @@ -0,0 +1,193 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: +

+

- e -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_0x66.html b/doc/html/globals_0x66.html new file mode 100644 index 0000000..45ef5fb --- /dev/null +++ b/doc/html/globals_0x66.html @@ -0,0 +1,167 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: +

+

- f -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_0x67.html b/doc/html/globals_0x67.html new file mode 100644 index 0000000..0ae39a2 --- /dev/null +++ b/doc/html/globals_0x67.html @@ -0,0 +1,102 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: +

+

- g -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_0x68.html b/doc/html/globals_0x68.html new file mode 100644 index 0000000..a360ea0 --- /dev/null +++ b/doc/html/globals_0x68.html @@ -0,0 +1,107 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: +

+

- h -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_0x69.html b/doc/html/globals_0x69.html new file mode 100644 index 0000000..cdf8eb3 --- /dev/null +++ b/doc/html/globals_0x69.html @@ -0,0 +1,249 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: +

+

- i -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_0x6b.html b/doc/html/globals_0x6b.html new file mode 100644 index 0000000..5be12a3 --- /dev/null +++ b/doc/html/globals_0x6b.html @@ -0,0 +1,105 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: +

+

- k -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_0x6c.html b/doc/html/globals_0x6c.html new file mode 100644 index 0000000..eadbd6d --- /dev/null +++ b/doc/html/globals_0x6c.html @@ -0,0 +1,139 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: +

+

- l -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_0x6d.html b/doc/html/globals_0x6d.html new file mode 100644 index 0000000..ad9a773 --- /dev/null +++ b/doc/html/globals_0x6d.html @@ -0,0 +1,187 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: +

+

- m -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_0x6e.html b/doc/html/globals_0x6e.html new file mode 100644 index 0000000..d5e831e --- /dev/null +++ b/doc/html/globals_0x6e.html @@ -0,0 +1,202 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: +

+

- n -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_0x6f.html b/doc/html/globals_0x6f.html new file mode 100644 index 0000000..4248d9d --- /dev/null +++ b/doc/html/globals_0x6f.html @@ -0,0 +1,117 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: +

+

- o -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_0x70.html b/doc/html/globals_0x70.html new file mode 100644 index 0000000..f60272f --- /dev/null +++ b/doc/html/globals_0x70.html @@ -0,0 +1,193 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: +

+

- p -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_0x71.html b/doc/html/globals_0x71.html new file mode 100644 index 0000000..468413d --- /dev/null +++ b/doc/html/globals_0x71.html @@ -0,0 +1,84 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: +

+

- q -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_0x72.html b/doc/html/globals_0x72.html new file mode 100644 index 0000000..6cea897 --- /dev/null +++ b/doc/html/globals_0x72.html @@ -0,0 +1,124 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: +

+

- r -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_0x73.html b/doc/html/globals_0x73.html new file mode 100644 index 0000000..0ca20ef --- /dev/null +++ b/doc/html/globals_0x73.html @@ -0,0 +1,257 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: +

+

- s -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_0x74.html b/doc/html/globals_0x74.html new file mode 100644 index 0000000..ebdfdf6 --- /dev/null +++ b/doc/html/globals_0x74.html @@ -0,0 +1,228 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: +

+

- t -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_0x75.html b/doc/html/globals_0x75.html new file mode 100644 index 0000000..97a9b53 --- /dev/null +++ b/doc/html/globals_0x75.html @@ -0,0 +1,174 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: +

+

- u -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_0x76.html b/doc/html/globals_0x76.html new file mode 100644 index 0000000..dc3881d --- /dev/null +++ b/doc/html/globals_0x76.html @@ -0,0 +1,133 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: +

+

- v -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_0x77.html b/doc/html/globals_0x77.html new file mode 100644 index 0000000..d2250db --- /dev/null +++ b/doc/html/globals_0x77.html @@ -0,0 +1,95 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: +

+

- w -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_0x78.html b/doc/html/globals_0x78.html new file mode 100644 index 0000000..65d3f00 --- /dev/null +++ b/doc/html/globals_0x78.html @@ -0,0 +1,96 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: +

+

- x -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_0x79.html b/doc/html/globals_0x79.html new file mode 100644 index 0000000..8782da0 --- /dev/null +++ b/doc/html/globals_0x79.html @@ -0,0 +1,84 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: +

+

- y -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_0x7a.html b/doc/html/globals_0x7a.html new file mode 100644 index 0000000..7e18610 --- /dev/null +++ b/doc/html/globals_0x7a.html @@ -0,0 +1,84 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: +

+

- z -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_defs.html b/doc/html/globals_defs.html new file mode 100644 index 0000000..e78f203 --- /dev/null +++ b/doc/html/globals_defs.html @@ -0,0 +1,91 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- _ -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_defs_0x61.html b/doc/html/globals_defs_0x61.html new file mode 100644 index 0000000..e8dc3e2 --- /dev/null +++ b/doc/html/globals_defs_0x61.html @@ -0,0 +1,107 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- a -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_defs_0x62.html b/doc/html/globals_defs_0x62.html new file mode 100644 index 0000000..16cd42c --- /dev/null +++ b/doc/html/globals_defs_0x62.html @@ -0,0 +1,109 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- b -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_defs_0x63.html b/doc/html/globals_defs_0x63.html new file mode 100644 index 0000000..1ad8382 --- /dev/null +++ b/doc/html/globals_defs_0x63.html @@ -0,0 +1,114 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- c -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_defs_0x64.html b/doc/html/globals_defs_0x64.html new file mode 100644 index 0000000..14fa79a --- /dev/null +++ b/doc/html/globals_defs_0x64.html @@ -0,0 +1,139 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- d -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_defs_0x65.html b/doc/html/globals_defs_0x65.html new file mode 100644 index 0000000..030d7e0 --- /dev/null +++ b/doc/html/globals_defs_0x65.html @@ -0,0 +1,163 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- e -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_defs_0x66.html b/doc/html/globals_defs_0x66.html new file mode 100644 index 0000000..9fd8154 --- /dev/null +++ b/doc/html/globals_defs_0x66.html @@ -0,0 +1,121 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- f -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_defs_0x68.html b/doc/html/globals_defs_0x68.html new file mode 100644 index 0000000..eb70a0e --- /dev/null +++ b/doc/html/globals_defs_0x68.html @@ -0,0 +1,95 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- h -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_defs_0x69.html b/doc/html/globals_defs_0x69.html new file mode 100644 index 0000000..79b6608 --- /dev/null +++ b/doc/html/globals_defs_0x69.html @@ -0,0 +1,177 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- i -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_defs_0x6b.html b/doc/html/globals_defs_0x6b.html new file mode 100644 index 0000000..cfa70c8 --- /dev/null +++ b/doc/html/globals_defs_0x6b.html @@ -0,0 +1,82 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- k -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_defs_0x6c.html b/doc/html/globals_defs_0x6c.html new file mode 100644 index 0000000..1bf388c --- /dev/null +++ b/doc/html/globals_defs_0x6c.html @@ -0,0 +1,96 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- l -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_defs_0x6d.html b/doc/html/globals_defs_0x6d.html new file mode 100644 index 0000000..30856b8 --- /dev/null +++ b/doc/html/globals_defs_0x6d.html @@ -0,0 +1,121 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- m -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_defs_0x6e.html b/doc/html/globals_defs_0x6e.html new file mode 100644 index 0000000..d2656cd --- /dev/null +++ b/doc/html/globals_defs_0x6e.html @@ -0,0 +1,127 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- n -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_defs_0x6f.html b/doc/html/globals_defs_0x6f.html new file mode 100644 index 0000000..b019c25 --- /dev/null +++ b/doc/html/globals_defs_0x6f.html @@ -0,0 +1,100 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- o -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_defs_0x70.html b/doc/html/globals_defs_0x70.html new file mode 100644 index 0000000..4b89583 --- /dev/null +++ b/doc/html/globals_defs_0x70.html @@ -0,0 +1,147 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- p -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_defs_0x72.html b/doc/html/globals_defs_0x72.html new file mode 100644 index 0000000..eb64fbf --- /dev/null +++ b/doc/html/globals_defs_0x72.html @@ -0,0 +1,99 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- r -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_defs_0x73.html b/doc/html/globals_defs_0x73.html new file mode 100644 index 0000000..528318b --- /dev/null +++ b/doc/html/globals_defs_0x73.html @@ -0,0 +1,114 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- s -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_defs_0x74.html b/doc/html/globals_defs_0x74.html new file mode 100644 index 0000000..135dc87 --- /dev/null +++ b/doc/html/globals_defs_0x74.html @@ -0,0 +1,152 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- t -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_defs_0x75.html b/doc/html/globals_defs_0x75.html new file mode 100644 index 0000000..cbb2a5a --- /dev/null +++ b/doc/html/globals_defs_0x75.html @@ -0,0 +1,103 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- u -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_defs_0x76.html b/doc/html/globals_defs_0x76.html new file mode 100644 index 0000000..10f602d --- /dev/null +++ b/doc/html/globals_defs_0x76.html @@ -0,0 +1,91 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- v -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_defs_0x77.html b/doc/html/globals_defs_0x77.html new file mode 100644 index 0000000..caf386f --- /dev/null +++ b/doc/html/globals_defs_0x77.html @@ -0,0 +1,83 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- w -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_defs_0x79.html b/doc/html/globals_defs_0x79.html new file mode 100644 index 0000000..56b0067 --- /dev/null +++ b/doc/html/globals_defs_0x79.html @@ -0,0 +1,80 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- y -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_defs_0x7a.html b/doc/html/globals_defs_0x7a.html new file mode 100644 index 0000000..76b0ee8 --- /dev/null +++ b/doc/html/globals_defs_0x7a.html @@ -0,0 +1,80 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- z -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_enum.html b/doc/html/globals_enum.html new file mode 100644 index 0000000..d74a7bd --- /dev/null +++ b/doc/html/globals_enum.html @@ -0,0 +1,62 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+  +

+

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_eval.html b/doc/html/globals_eval.html new file mode 100644 index 0000000..8e31bdc --- /dev/null +++ b/doc/html/globals_eval.html @@ -0,0 +1,166 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- a -

+

- c -

+

- d -

+

- e -

+

- f -

+

- i -

+

- l -

+

- m -

+

- n -

+

- p -

+

- r -

+

- s -

+

- t -

+

- w -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_func.html b/doc/html/globals_func.html new file mode 100644 index 0000000..c430c3f --- /dev/null +++ b/doc/html/globals_func.html @@ -0,0 +1,106 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- _ -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_func_0x61.html b/doc/html/globals_func_0x61.html new file mode 100644 index 0000000..0489dfb --- /dev/null +++ b/doc/html/globals_func_0x61.html @@ -0,0 +1,103 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- a -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_func_0x62.html b/doc/html/globals_func_0x62.html new file mode 100644 index 0000000..8a413c1 --- /dev/null +++ b/doc/html/globals_func_0x62.html @@ -0,0 +1,87 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- b -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_func_0x63.html b/doc/html/globals_func_0x63.html new file mode 100644 index 0000000..dd6ab09 --- /dev/null +++ b/doc/html/globals_func_0x63.html @@ -0,0 +1,94 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- c -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_func_0x64.html b/doc/html/globals_func_0x64.html new file mode 100644 index 0000000..2a40732 --- /dev/null +++ b/doc/html/globals_func_0x64.html @@ -0,0 +1,108 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- d -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_func_0x65.html b/doc/html/globals_func_0x65.html new file mode 100644 index 0000000..907bc82 --- /dev/null +++ b/doc/html/globals_func_0x65.html @@ -0,0 +1,90 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- e -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_func_0x66.html b/doc/html/globals_func_0x66.html new file mode 100644 index 0000000..6ac339b --- /dev/null +++ b/doc/html/globals_func_0x66.html @@ -0,0 +1,104 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- f -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_func_0x67.html b/doc/html/globals_func_0x67.html new file mode 100644 index 0000000..5f50c10 --- /dev/null +++ b/doc/html/globals_func_0x67.html @@ -0,0 +1,96 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- g -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_func_0x68.html b/doc/html/globals_func_0x68.html new file mode 100644 index 0000000..d86e5e0 --- /dev/null +++ b/doc/html/globals_func_0x68.html @@ -0,0 +1,89 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- h -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_func_0x69.html b/doc/html/globals_func_0x69.html new file mode 100644 index 0000000..b3a6c2f --- /dev/null +++ b/doc/html/globals_func_0x69.html @@ -0,0 +1,116 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- i -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_func_0x6b.html b/doc/html/globals_func_0x6b.html new file mode 100644 index 0000000..9100ee1 --- /dev/null +++ b/doc/html/globals_func_0x6b.html @@ -0,0 +1,93 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- k -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_func_0x6c.html b/doc/html/globals_func_0x6c.html new file mode 100644 index 0000000..436de37 --- /dev/null +++ b/doc/html/globals_func_0x6c.html @@ -0,0 +1,110 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- l -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_func_0x6d.html b/doc/html/globals_func_0x6d.html new file mode 100644 index 0000000..9c74998 --- /dev/null +++ b/doc/html/globals_func_0x6d.html @@ -0,0 +1,112 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- m -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_func_0x6e.html b/doc/html/globals_func_0x6e.html new file mode 100644 index 0000000..f501714 --- /dev/null +++ b/doc/html/globals_func_0x6e.html @@ -0,0 +1,129 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- n -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_func_0x6f.html b/doc/html/globals_func_0x6f.html new file mode 100644 index 0000000..fe051ed --- /dev/null +++ b/doc/html/globals_func_0x6f.html @@ -0,0 +1,90 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- o -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_func_0x70.html b/doc/html/globals_func_0x70.html new file mode 100644 index 0000000..a0f7e0e --- /dev/null +++ b/doc/html/globals_func_0x70.html @@ -0,0 +1,101 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- p -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_func_0x72.html b/doc/html/globals_func_0x72.html new file mode 100644 index 0000000..abb60cf --- /dev/null +++ b/doc/html/globals_func_0x72.html @@ -0,0 +1,94 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- r -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_func_0x73.html b/doc/html/globals_func_0x73.html new file mode 100644 index 0000000..d00b6d9 --- /dev/null +++ b/doc/html/globals_func_0x73.html @@ -0,0 +1,188 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- s -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_func_0x74.html b/doc/html/globals_func_0x74.html new file mode 100644 index 0000000..cb25e26 --- /dev/null +++ b/doc/html/globals_func_0x74.html @@ -0,0 +1,126 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- t -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_func_0x75.html b/doc/html/globals_func_0x75.html new file mode 100644 index 0000000..e95d054 --- /dev/null +++ b/doc/html/globals_func_0x75.html @@ -0,0 +1,120 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- u -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_func_0x76.html b/doc/html/globals_func_0x76.html new file mode 100644 index 0000000..cffcefc --- /dev/null +++ b/doc/html/globals_func_0x76.html @@ -0,0 +1,108 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- v -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_func_0x77.html b/doc/html/globals_func_0x77.html new file mode 100644 index 0000000..5b0943f --- /dev/null +++ b/doc/html/globals_func_0x77.html @@ -0,0 +1,85 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- w -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_func_0x78.html b/doc/html/globals_func_0x78.html new file mode 100644 index 0000000..1307568 --- /dev/null +++ b/doc/html/globals_func_0x78.html @@ -0,0 +1,80 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- x -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_type.html b/doc/html/globals_type.html new file mode 100644 index 0000000..6b8444f --- /dev/null +++ b/doc/html/globals_type.html @@ -0,0 +1,220 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- _ -

+

- a -

+

- b -

+

- c -

+

- d -

+

- e -

+

- f -

+

- g -

+

- i -

+

- k -

+

- l -

+

- m -

+

- n -

+

- o -

+

- p -

+

- q -

+

- r -

+

- s -

+

- t -

+

- u -

+

- v -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/globals_vars.html b/doc/html/globals_vars.html new file mode 100644 index 0000000..d6d9b2c --- /dev/null +++ b/doc/html/globals_vars.html @@ -0,0 +1,304 @@ + + +UbixOS V2: Data Fields + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- $ -

+

- _ -

+

- a -

+

- b -

+

- c -

+

- d -

+

- e -

+

- f -

+

- g -

+

- i -

+

- k -

+

- l -

+

- m -

+

- n -

+

- o -

+

- p -

+

- r -

+

- s -

+

- t -

+

- u -

+

- v -

+

- w -

+

- x -

+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/hd_8c-source.html b/doc/html/hd_8c-source.html new file mode 100644 index 0000000..2131609 --- /dev/null +++ b/doc/html/hd_8c-source.html @@ -0,0 +1,482 @@ + + +UbixOS V2: src/sys/pci/hd.c Source File + + + + +
+
+
+
+ +

hd.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <pci/hd.h>
+00031 #include <sys/video.h>
+00032 #include <sys/device.h>
+00033 #include <sys/io.h>
+00034 #include <lib/kmalloc.h>
+00035 #include <lib/kprintf.h>
+00036 #include <devfs/devfs.h>
+00037 #include <string.h>
+00038   
+00039 int initHardDisk() {
+00040   int                      i        = 0x0;
+00041   int                      x        = 0x0;
+00042   int                      minor    = 0x0;
+00043   struct device_interface *devInfo  = 0x0;
+00044   struct device_interface *devInfo2 = 0x0;
+00045   struct dos_partition    *d        = 0x0;
+00046   struct driveInfo        *hdd      = 0x0;
+00047   struct driveInfo        *hdd2     = 0x0;
+00048   char                    *data     = 0x0;
+00049   char                    *data2    = 0x0;
+00050   char                     name[16];
+00051   struct bsd_disklabel     *bsdd     = 0x0;
+00052   
+00053   hdd            = (struct driveInfo *)kmalloc(sizeof(struct driveInfo));  
+00054   hdd->hdPort    = 0x1F0;
+00055   hdd->hdDev     = 0x40;
+00056   hdd->parOffset = 0x0;
+00057 
+00058 
+00059   /* Alloc memory for device structure and set it up correctly */
+00060   devInfo = (struct device_interface *)kmalloc(sizeof(struct device_interface));
+00061   devInfo->read    = (void *)&hdRead;
+00062   devInfo->write   = (void *)&hdWrite;
+00063   devInfo->reset   = (void *)&hdReset;
+00064   devInfo->init    = (void *)&hdInit;
+00065   devInfo->ioctl   = (void *)&hdIoctl;
+00066   devInfo->stop    = (void *)&hdStop;
+00067   devInfo->start   = (void *)&hdStart;
+00068   devInfo->standby = (void *)&hdStandby;
+00069   devInfo->info    = hdd;
+00070   
+00071   devInfo->major   = 0x1;
+00072   
+00073   data = (char *)kmalloc(512);
+00074   d = (struct dos_partition *)(data + 0x1BE);
+00075 
+00076   data2 = (char *)kmalloc(512);
+00077   bsdd = (struct bsd_disklabel *)data2;
+00078 
+00079   if (device_add(0,'c',devInfo) == 0x0) {
+00080     kprintf("ad0 - Start: [0x0], Size: [0x%x/0x%X]\n",hdd->hdSize,hdd->hdSize*512);
+00081     devfs_makeNode("ad0",'b',0x1,0x0);
+00082     hdRead(devInfo->info,data,0x0,0x1);
+00083     for (i = 0x0;i < 0x4;i++) {
+00084       if (d[i].dp_type != 0x0) {  
+00085         devInfo2 = (struct device_interface *)kmalloc(sizeof(struct device_interface));
+00086         hdd2     = (struct driveInfo *)kmalloc(sizeof(struct driveInfo));
+00087         memcpy(devInfo2,devInfo,sizeof(struct device_interface));
+00088         memcpy(hdd2,hdd,sizeof(struct driveInfo));
+00089         hdd2->parOffset = d[i].dp_start;
+00090         devInfo2->info  = hdd2;
+00091         minor++;
+00092         if (device_add(minor,'c',devInfo2) == 0x0) {
+00093           sprintf(name,"ad0s%i",i + 1);
+00094           kprintf("%s - Type: [0x%X], Start: [0x%X], Size: [0x%X]\n",name,d[i].dp_type,d[i].dp_start,d[i].dp_size);
+00095           devfs_makeNode(name,'c',0x1,minor);
+00096           if (d[i].dp_type == 0xA5) {
+00097             //Why do i need to add 1?
+00098             hdRead(devInfo->info,data2,d[i].dp_start + 1,0x1);
+00099             for (x = 0;x < bsdd->d_npartitions;x++) {
+00100               if (bsdd->d_partitions[x].p_size > 0) {
+00101                 sprintf(name,"ad0s%i%c",i + 1,'a' + x);
+00102                 //New Nodes
+00103                 devInfo2 = (struct device_interface *)kmalloc(sizeof(struct device_interface));
+00104                 hdd2     = (struct driveInfo *)kmalloc(sizeof(struct driveInfo));
+00105                 memcpy(devInfo2,devInfo,sizeof(struct device_interface));
+00106                 memcpy(hdd2,hdd,sizeof(struct driveInfo));
+00107                 //hdd2->parOffset = d[i].dp_start + bsdd->d_partitions[x].p_offset;
+00108                 hdd2->parOffset = bsdd->d_partitions[x].p_offset;
+00109                 devInfo2->info   = hdd2;
+00110                 minor++;
+00111                 device_add(minor,'c',devInfo2);
+00112                 devfs_makeNode(name,'c',0x1,minor);
+00113                 kprintf("%s - Type: [%s], Start: [0x%X], Size: [0x%X], MM: [%i:%i]\n",name,fstypenames[bsdd->d_partitions[x].p_fstype],bsdd->d_partitions[x].p_offset,bsdd->d_partitions[x].p_size,devInfo->major,minor);
+00114                 }
+00115               }
+00116             }
+00117           }
+00118         }
+00119       }
+00120     }
+00121   kfree(data);
+00122   return(0x0);
+00123   }
+00124 
+00125 int hdStandby() {
+00126   return(0x0);
+00127   }
+00128 
+00129 int hdStart() {
+00130   return(0x0);
+00131   }
+00132 
+00133 int hdStop() {
+00134   return(0x0);
+00135   }
+00136 
+00137 int hdIoctl() {
+00138   return(0x0);
+00139   }
+00140 
+00141 int hdReset() {
+00142   return(0x0);
+00143   }
+00144   
+00145 int hdInit(struct device_node *dev) {
+00146   char retVal  = 0x0;
+00147   long counter = 0x0;
+00148   short *tmp    = 0x0;
+00149   struct driveInfo *hdd = dev->devInfo->info;
+00150   for (counter = 1000000;counter >= 0;counter--) {
+00151     retVal = inportByte(hdd->hdPort + hdStat) & 0x80;
+00152     if (!retVal) goto ready;
+00153     }
+00154   kprintf("Error Initializing Drive\n");
+00155   return(1);
+00156   ready:
+00157   outportByte(hdd->hdPort + hdHead,hdd->hdDev);
+00158   outportByte(hdd->hdPort + hdCmd,0xEC);
+00159   for (counter = 1000000;counter >= 0;counter--) {
+00160     retVal = inportByte(hdd->hdPort + hdStat);
+00161     if ((retVal & 1) != 0x0) {
+00162       kprintf("Error Drive Not Available\n");
+00163       return(1);
+00164       }
+00165     if ((retVal & 8) != 0x0) {
+00166       goto go;
+00167       }
+00168     }
+00169   kprintf("Time Out Waiting On Drive\n");
+00170   return(1);
+00171   go:
+00172   tmp = (short *)hdd->hdSector;
+00173   for (counter = 0;counter < (512/2);counter++) {
+00174     tmp[counter] = inportWord(hdd->hdPort + hdData);
+00175     }
+00176   retVal = tmp[0x2F] & 0xFF;
+00177   switch (retVal) {
+00178     case 0:
+00179       hdd->hdShift = 0;
+00180       hdd->hdMulti = 1;
+00181       break;
+00182     case 2:
+00183       hdd->hdShift = 1;
+00184       hdd->hdMulti = retVal;
+00185       break;
+00186     case 4:
+00187       hdd->hdShift = 2;
+00188       hdd->hdMulti = retVal;
+00189       break;
+00190     case 8:
+00191       hdd->hdShift = 3;
+00192       hdd->hdMulti = retVal;
+00193       break;
+00194     case 16:
+00195       hdd->hdShift = 4;
+00196       hdd->hdMulti = retVal;
+00197       break;
+00198     case 32:
+00199       hdd->hdShift = 5;
+00200       hdd->hdMulti = retVal;
+00201       break;
+00202     case 64:
+00203       hdd->hdShift = 6;
+00204       hdd->hdMulti = retVal;
+00205       break;
+00206     default:
+00207       kprintf("Error BLOCK Mode Unavailable: [%i]\n",retVal);
+00208       return(1);
+00209     }
+00210   outportByte(hdd->hdPort + hdSecCount,retVal);
+00211   outportByte(hdd->hdPort + hdHead,hdd->hdDev);
+00212   outportByte(hdd->hdPort + hdCmd,0xC6);
+00213   hdd->hdMask = retVal;
+00214   hdd->hdSize = (hdd->hdSector[0x7B] * 256 * 256 * 256) + (hdd->hdSector[0x7A] * 256 * 256) + (hdd->hdSector[0x79] * 256) + hdd->hdSector[0x78];
+00215   hdd->hdEnable = 1;
+00216   kprintf("Drive: [0x%X/0x%X], Size: [%iSectors/%iKBytes]\n",hdd->hdPort,hdd->hdDev,hdd->hdSize,((hdd->hdSize*512)/1024));
+00217   dev->devInfo->size        = hdd->hdSize*512;
+00218   dev->devInfo->initialized = 0x1;
+00219   return(0x0);
+00220   }
+00221 
+00222 void hdWrite(struct driveInfo *hdd,void *baseAddr,uInt32 startSector,uInt32 sectorCount) {
+00223   long counter           = 0x0;
+00224   long retVal            = 0x0;
+00225   short transactionCount = 0x0;
+00226   short *tmp             = (short *)baseAddr;
+00227   startSector += hdd->parOffset;
+00228   if (hdd->hdEnable == 0x0) {
+00229     kprintf("Invalid Drive\n");
+00230     return;
+00231     }
+00232   if ((sectorCount >> hdd->hdShift) == 0x0) {
+00233     hdd->hdCalc = sectorCount; /* hdd->hdMask; */
+00234     transactionCount = 1;
+00235     }
+00236   else {
+00237     hdd->hdCalc = hdd->hdMulti;
+00238     transactionCount = sectorCount >> hdd->hdShift;
+00239     }
+00240   for (;transactionCount > 0;transactionCount--) {
+00241     for (counter = 1000000;counter >= 0;counter--) {
+00242       retVal = inportByte(hdd->hdPort + hdStat) & 0x80;
+00243       if (!retVal) goto ready;
+00244       }
+00245     kprintf("Time Out Waiting On Drive\n");
+00246     return;
+00247     ready:
+00248     outportByte(hdd->hdPort + hdSecCount,hdd->hdCalc);
+00249     outportByte(hdd->hdPort + hdSecNum,(startSector & 0xFF));
+00250     retVal = startSector >> 8;
+00251     outportByte(hdd->hdPort + hdCylLow,(retVal & 0xFF));
+00252     retVal >>= 8;
+00253     outportByte(hdd->hdPort + hdCylHi,(retVal & 0xFF));
+00254     retVal >>= 8;
+00255     retVal &= 0x0F;
+00256     retVal |= (hdd->hdDev | 0xA0); //Test As Per TJ
+00257     outportByte(hdd->hdPort + hdHead,(retVal & 0xFF));
+00258     if (hdd->hdShift > 0)
+00259       outportByte(hdd->hdPort + hdCmd,0xC5);
+00260     else
+00261       outportByte(hdd->hdPort + hdCmd,0x30);
+00262     for (counter = 1000000;counter >= 0;counter--) {
+00263       retVal = inportByte(hdd->hdPort + hdStat);
+00264       if ((retVal & 1) != 0x0) {
+00265         kprintf("HD Write Error\n");
+00266         return;
+00267         }
+00268       if ((retVal & 8) != 0x0) {
+00269         goto go;
+00270         }
+00271       }
+00272     kprintf("Time Out Waiting On Drive\n");
+00273     return;
+00274     go:
+00275     for (counter = 0;counter < (hdd->hdCalc << 8);counter++) {
+00276       outportWord(hdd->hdPort + hdData,(short)tmp[counter]);
+00277       }
+00278     tmp += (counter + 0);
+00279     startSector += hdd->hdCalc;
+00280     }
+00281   return;
+00282   }
+00283 
+00284 void hdRead(struct driveInfo *hdd,void *baseAddr,uInt32 startSector,uInt32 sectorCount) {
+00285   long counter           = 0x0;
+00286   long retVal            = 0x0;
+00287   short transactionCount = 0x0;
+00288   short *tmp             = (short *)baseAddr;
+00289   startSector += hdd->parOffset;
+00290 
+00291   if (hdd->hdEnable == 0x0) {
+00292     kprintf("Invalid Drive\n");
+00293     return;
+00294     }
+00295   if ((sectorCount >> hdd->hdShift) == 0x0) {
+00296     hdd->hdCalc = sectorCount; /* hdd->hdMask); */
+00297     transactionCount = 1;
+00298     }
+00299   else {
+00300     hdd->hdCalc = hdd->hdMulti;
+00301     transactionCount = sectorCount >> hdd->hdShift;
+00302     }
+00303   for (;transactionCount > 0;transactionCount--) {
+00304     for (counter = 1000000;counter >= 0;counter--) {
+00305       retVal = inportByte(hdd->hdPort + hdStat) & 0x80;
+00306       if (!retVal) goto ready;
+00307       }
+00308     kprintf("Time Out Waiting On Drive\n");
+00309     return;
+00310     ready:
+00311     outportByte(hdd->hdPort + hdSecCount,hdd->hdCalc);
+00312     outportByte(hdd->hdPort + hdSecNum,(startSector & 0xFF));
+00313     retVal = startSector >> 8;
+00314     outportByte(hdd->hdPort + hdCylLow,(retVal & 0xFF));
+00315     retVal >>= 8;
+00316     outportByte(hdd->hdPort + hdCylHi,(retVal & 0xFF));
+00317     retVal >>= 8;
+00318     retVal &= 0x0F;
+00319     retVal |= (hdd->hdDev | 0xA0); //Test as per TJ
+00320     //retVal |= hdd->hdDev; //retVal |= (hdd->hdDev | 0xA0); //Test as per TJ
+00321     outportByte(hdd->hdPort + hdHead,(retVal & 0xFF));
+00322     if (hdd->hdShift > 0)
+00323       outportByte(hdd->hdPort + hdCmd,0xC4);
+00324     else 
+00325       outportByte(hdd->hdPort + hdCmd,0x20);
+00326     for (counter = 1000000;counter >= 0;counter--) {
+00327       retVal = inportByte(hdd->hdPort + hdStat);
+00328       if ((retVal & 1) != 0x0) {
+00329         kprintf("HD Read Error: [%i:0x%X:%i]\n",counter,(uInt32)baseAddr,startSector);
+00330         return;
+00331         }
+00332       if ((retVal & 8) != 0x0) {
+00333         goto go;
+00334         }
+00335       }
+00336     kprintf("Error: Time Out Waiting On Drive\n");
+00337     return;
+00338     go:
+00339     for (counter = 0;counter < (hdd->hdCalc << 8);counter++) {
+00340       tmp[counter] = inportWord(hdd->hdPort + hdData);
+00341       }
+00342     tmp += (counter + 0);
+00343     startSector += hdd->hdCalc;
+00344     }
+00345   return;
+00346   }  
+00347 
+00348 /***
+00349  $Log$
+00350  Revision 1.5  2006/10/12 15:00:26  reddawg
+00351  More changes
+00352 
+00353  Revision 1.4  2006/10/10 14:14:01  reddawg
+00354  UFS Reading
+00355 
+00356  Revision 1.3  2006/10/09 02:58:05  reddawg
+00357  Fixing UFS
+00358 
+00359  Revision 1.2  2006/10/06 15:48:01  reddawg
+00360  Starting to make ubixos work with UFS2
+00361 
+00362  Revision 1.1.1.1  2006/06/01 12:46:16  reddawg
+00363  ubix2
+00364 
+00365  Revision 1.2  2005/10/12 00:13:37  reddawg
+00366  Removed
+00367 
+00368  Revision 1.1.1.1  2005/09/26 17:24:34  reddawg
+00369  no message
+00370 
+00371  Revision 1.16  2004/08/26 22:51:19  reddawg
+00372  TCA touched me :( i think he likes men....
+00373 
+00374 
+00375  sched.h:        kTask_t added parentPid
+00376  endtask.c:     fixed term back to parentPid
+00377  exec.c:          cleaned warnings
+00378  fork.c:            fixed term to childPid
+00379  sched.c:         clean up for dead tasks
+00380  systemtask.c: clean up dead tasks
+00381  kmalloc.c:       cleaned up warnings
+00382  udp.c:            cleaned up warnings
+00383  bot.c:             cleaned up warnings
+00384  shell.c:           cleaned up warnings
+00385  tcpdump.c:     took a dump
+00386  hd.c:             cleaned up warnings
+00387  ubixfs.c:        stopped prning debug info
+00388 
+00389  Revision 1.15  2004/08/15 00:33:02  reddawg
+00390  Wow the ide driver works again
+00391 
+00392  Revision 1.14  2004/08/14 21:56:44  reddawg
+00393  Added initialized byte to the device system to make it easy to add child devices which use parent hardware.
+00394 
+00395  Revision 1.13  2004/08/02 11:43:17  reddawg
+00396  Fixens
+00397 
+00398  Revision 1.12  2004/07/21 10:02:09  reddawg
+00399  devfs: renamed functions
+00400  device system: renamed functions
+00401  fdc: fixed a few potential bugs and cleaned up some unused variables
+00402  strol: fixed definition
+00403  endtask: made it print out freepage debug info
+00404  kmalloc: fixed a huge memory leak we had some unhandled descriptor insertion so some descriptors were lost
+00405  ld: fixed a pointer conversion
+00406  file: cleaned up a few unused variables
+00407  sched: broke task deletion
+00408  kprintf: fixed ogPrintf definition
+00409 
+00410  Revision 1.11  2004/05/19 23:36:52  reddawg
+00411  Bug Fixes
+00412 
+00413  Revision 1.10  2004/05/19 15:20:06  reddawg
+00414  Fixed reference problems due to changes in drive subsystem
+00415 
+00416  Revision 1.9  2004/05/19 15:07:59  reddawg
+00417  Typo defInfo should of been devInfo
+00418 
+00419  Revision 1.7  2004/05/19 04:07:43  reddawg
+00420  kmalloc(size,pid) no more it is no kmalloc(size); the way it should of been
+00421 
+00422  Revision 1.6  2004/04/28 21:10:40  reddawg
+00423  Lots Of changes to make it work with existing os
+00424 
+00425  Revision 1.5  2004/04/28 02:37:34  reddawg
+00426  More updates for using the new driver subsystem
+00427 
+00428  Revision 1.4  2004/04/28 02:22:54  reddawg
+00429  This is a fiarly large commit but we are starting to use new driver model
+00430  all around
+00431 
+00432  Revision 1.3  2004/04/27 21:05:19  reddawg
+00433  Updating drivers to use new model
+00434 
+00435  Revision 1.2  2004/04/26 22:22:33  reddawg
+00436  DevFS now uses correct size of device
+00437 
+00438  Revision 1.1.1.1  2004/04/15 12:07:16  reddawg
+00439  UbixOS v1.0
+00440 
+00441  Revision 1.12  2004/04/13 16:36:33  reddawg
+00442  Changed our copyright, it is all now under a BSD-Style license
+00443 
+00444  END
+00445  ***/
+

Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/hd_8c.html b/doc/html/hd_8c.html new file mode 100644 index 0000000..34427d0 --- /dev/null +++ b/doc/html/hd_8c.html @@ -0,0 +1,330 @@ + + +UbixOS V2: src/sys/pci/hd.c File Reference + + + + +
+
+
+
+ +

hd.c File Reference

+

+#include <pci/hd.h>
+#include <sys/video.h>
+#include <sys/device.h>
+#include <sys/io.h>
+#include <lib/kmalloc.h>
+#include <lib/kprintf.h>
+#include <devfs/devfs.h>
+#include <string.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + +

Functions

int hdInit (struct device_node *dev)
int hdIoctl ()
void hdRead (struct driveInfo *hdd, void *baseAddr, uInt32 startSector, uInt32 sectorCount)
int hdReset ()
int hdStandby ()
int hdStart ()
int hdStop ()
void hdWrite (struct driveInfo *hdd, void *baseAddr, uInt32 startSector, uInt32 sectorCount)
int initHardDisk ()
+


Function Documentation

+ +
+
+ + + + + + + + + +
int hdInit (struct device_node dev  ) 
+
+ +

+ +

+
+ + + + + + + + +
int hdIoctl (  ) 
+
+
+ +

+ +

+Definition at line 137 of file hd.c. +

+Referenced by initHardDisk(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void hdRead (struct driveInfo hdd,
void *  baseAddr,
uInt32  startSector,
uInt32  sectorCount 
)
+
+ +

+ +

+
+ + + + + + + + +
int hdReset (  ) 
+
+
+ +

+ +

+Definition at line 141 of file hd.c. +

+Referenced by initHardDisk(). +

+

+ +

+
+ + + + + + + + +
int hdStandby (  ) 
+
+
+ +

+ +

+Definition at line 125 of file hd.c. +

+Referenced by initHardDisk(). +

+

+ +

+
+ + + + + + + + +
int hdStart (  ) 
+
+
+ +

+ +

+Definition at line 129 of file hd.c. +

+Referenced by initHardDisk(). +

+

+ +

+
+ + + + + + + + +
int hdStop (  ) 
+
+
+ +

+ +

+Definition at line 133 of file hd.c. +

+Referenced by initHardDisk(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void hdWrite (struct driveInfo hdd,
void *  baseAddr,
uInt32  startSector,
uInt32  sectorCount 
)
+
+ +

+ +

+
+ + + + + + + + +
int initHardDisk (  ) 
+
+ +

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/hd_8h-source.html b/doc/html/hd_8h-source.html new file mode 100644 index 0000000..b003e07 --- /dev/null +++ b/doc/html/hd_8h-source.html @@ -0,0 +1,259 @@ + + +UbixOS V2: src/sys/include/pci/hd.h Source File + + + + +
+
+
+
+ +

hd.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _HD_H
+00031 #define _HD_H
+00032 
+00033 #include <ubixfs/ubixfs.h>
+00034 
+00035 #define hdData     0x0
+00036 #define hdError    0x1
+00037 #define hdSecCount 0x2
+00038 #define hdSecNum   0x3
+00039 #define hdCylLow   0x4
+00040 #define hdCylHi    0x5
+00041 #define hdHead     0x6
+00042 #define hdStat     0x7
+00043 #define hdCmd      0x7
+00044 
+00045 
+00046 struct driveInfo {
+00047   struct driveDiskLabel *diskLabel;
+00048   char hdSector[512];
+00049   char hdEnable;
+00050   char hdDev;
+00051   char hdFlags;
+00052   char hdShift;
+00053   long hdMask;
+00054   long hdMulti;
+00055   long hdPort;
+00056   long hdSize;
+00057   long hdCalc;
+00058   long parOffset;
+00059   };
+00060 
+00061 int initHardDisk();
+00062 void hdWrite(struct driveInfo *hdd,void *,uInt32,uInt32);
+00063 void hdRead(struct driveInfo *hdd,void *,uInt32,uInt32);
+00064 int hdReset();
+00065 int hdIoctl();
+00066 int hdStart();
+00067 int hdStop();
+00068 int hdStandby();
+00069 int hdInit(struct device_node *dev);
+00070 
+00071 struct dos_partition {
+00072   unsigned char   dp_flag;        /* bootstrap flags */
+00073   unsigned char   dp_shd;         /* starting head */
+00074   unsigned char   dp_ssect;       /* starting sector */
+00075   unsigned char   dp_scyl;        /* starting cylinder */
+00076   unsigned char   dp_type;         /* partition type */
+00077   unsigned char   dp_ehd;         /* end head */
+00078   unsigned char   dp_esect;       /* end sector */
+00079   unsigned char   dp_ecyl;        /* end cylinder */
+00080   uInt32       dp_start;       /* absolute starting sector number */
+00081   uInt32       dp_size;        /* partition size in sectors */
+00082   };
+00083 
+00084 #define MAXPARTITIONS   8
+00085 
+00086 struct bsd_disklabel {
+00087         u_int32_t d_magic;              /* the magic number */
+00088         u_int16_t d_type;               /* drive type */
+00089         u_int16_t d_subtype;            /* controller/d_type specific */
+00090         char      d_typename[16];       /* type name, e.g. "eagle" */
+00091 
+00092         char      d_packname[16];       /* pack identifier */
+00093 
+00094                         /* disk geometry: */
+00095         u_int32_t d_secsize;            /* # of bytes per sector */
+00096         u_int32_t d_nsectors;           /* # of data sectors per track */
+00097         u_int32_t d_ntracks;            /* # of tracks per cylinder */
+00098         u_int32_t d_ncylinders;         /* # of data cylinders per unit */
+00099         u_int32_t d_secpercyl;          /* # of data sectors per cylinder */
+00100         u_int32_t d_secperunit;         /* # of data sectors per unit */
+00101 
+00102         /*
+00103          * Spares (bad sector replacements) below are not counted in
+00104          * d_nsectors or d_secpercyl.  Spare sectors are assumed to
+00105          * be physical sectors which occupy space at the end of each
+00106          * track and/or cylinder.
+00107          */
+00108         u_int16_t d_sparespertrack;     /* # of spare sectors per track */
+00109         u_int16_t d_sparespercyl;       /* # of spare sectors per cylinder */
+00110         /*
+00111          * Alternate cylinders include maintenance, replacement, configuration
+00112          * description areas, etc.
+00113          */
+00114         u_int32_t d_acylinders;         /* # of alt. cylinders per unit */
+00115 
+00116                         /* hardware characteristics: */
+00117         /*
+00118          * d_interleave, d_trackskew and d_cylskew describe perturbations
+00119          * in the media format used to compensate for a slow controller.
+00120          * Interleave is physical sector interleave, set up by the
+00121          * formatter or controller when formatting.  When interleaving is
+00122          * in use, logically adjacent sectors are not physically
+00123          * contiguous, but instead are separated by some number of
+00124          * sectors.  It is specified as the ratio of physical sectors
+00125          * traversed per logical sector.  Thus an interleave of 1:1
+00126          * implies contiguous layout, while 2:1 implies that logical
+00127          * sector 0 is separated by one sector from logical sector 1.
+00128          * d_trackskew is the offset of sector 0 on track N relative to
+00129          * sector 0 on track N-1 on the same cylinder.  Finally, d_cylskew
+00130          * is the offset of sector 0 on cylinder N relative to sector 0
+00131          * on cylinder N-1.
+00132          */
+00133         u_int16_t d_rpm;                /* rotational speed */
+00134         u_int16_t d_interleave;         /* hardware sector interleave */
+00135         u_int16_t d_trackskew;          /* sector 0 skew, per track */
+00136         u_int16_t d_cylskew;            /* sector 0 skew, per cylinder */
+00137         u_int32_t d_headswitch;         /* head switch time, usec */
+00138         u_int32_t d_trkseek;            /* track-to-track seek, usec */
+00139         u_int32_t d_flags;              /* generic flags */
+00140 #define NDDATA 5
+00141         u_int32_t d_drivedata[NDDATA];  /* drive-type specific information */
+00142 #define NSPARE 5
+00143         u_int32_t d_spare[NSPARE];      /* reserved for future use */
+00144         u_int32_t d_magic2;             /* the magic number (again) */
+00145         u_int16_t d_checksum;           /* xor of data incl. partitions */
+00146 
+00147                         /* filesystem and partition information: */
+00148         u_int16_t d_npartitions;        /* number of partitions in following */
+00149         u_int32_t d_bbsize;             /* size of boot area at sn0, bytes */
+00150         u_int32_t d_sbsize;             /* max size of fs superblock, bytes */
+00151         struct partition {              /* the partition table */
+00152                 u_int32_t p_size;       /* number of sectors in partition */
+00153                 u_int32_t p_offset;     /* starting sector */
+00154                 u_int32_t p_fsize;      /* filesystem basic fragment size */
+00155                 u_int8_t p_fstype;      /* filesystem type, see below */
+00156                 u_int8_t p_frag;        /* filesystem fragments per block */
+00157                 u_int16_t p_cpg;        /* filesystem cylinders per group */
+00158         } d_partitions[MAXPARTITIONS];  /* actually may be more */
+00159 };
+00160 
+00161 static const char *fstypenames[] = {
+00162         "unused",
+00163         "swap",
+00164         "Version 6",
+00165         "Version 7",
+00166         "System V",
+00167         "4.1BSD",
+00168         "Eighth Edition",
+00169         "4.2BSD",
+00170         "MSDOS",
+00171         "4.4LFS",
+00172         "unknown",
+00173         "HPFS",
+00174         "ISO9660",
+00175         "boot",
+00176         "vinum",
+00177         "raid",
+00178         "?",
+00179         "?",
+00180         "?",
+00181         "?",
+00182         "jfs",
+00183         NULL
+00184 };
+00185 
+00186 #endif
+00187 
+00188 /***
+00189  $Log$
+00190  Revision 1.2  2006/10/09 02:58:05  reddawg
+00191  Fixing UFS
+00192 
+00193  Revision 1.1.1.1  2006/06/01 12:46:14  reddawg
+00194  ubix2
+00195 
+00196  Revision 1.2  2005/10/12 00:13:37  reddawg
+00197  Removed
+00198 
+00199  Revision 1.1.1.1  2005/09/26 17:23:50  reddawg
+00200  no message
+00201 
+00202  Revision 1.7  2004/08/15 00:33:02  reddawg
+00203  Wow the ide driver works again
+00204 
+00205  Revision 1.6  2004/07/21 10:02:09  reddawg
+00206  devfs: renamed functions
+00207  device system: renamed functions
+00208  fdc: fixed a few potential bugs and cleaned up some unused variables
+00209  strol: fixed definition
+00210  endtask: made it print out freepage debug info
+00211  kmalloc: fixed a huge memory leak we had some unhandled descriptor insertion so some descriptors were lost
+00212  ld: fixed a pointer conversion
+00213  file: cleaned up a few unused variables
+00214  sched: broke task deletion
+00215  kprintf: fixed ogPrintf definition
+00216 
+00217  Revision 1.5  2004/05/21 15:05:07  reddawg
+00218  Cleaned up
+00219 
+00220 
+00221  END
+00222  ***/
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/hd_8h.html b/doc/html/hd_8h.html new file mode 100644 index 0000000..07e287f --- /dev/null +++ b/doc/html/hd_8h.html @@ -0,0 +1,625 @@ + + +UbixOS V2: src/sys/include/pci/hd.h File Reference + + + + +
+
+
+
+ +

hd.h File Reference

+

+#include <ubixfs/ubixfs.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  bsd_disklabel
struct  bsd_disklabel::partition
struct  dos_partition
struct  driveInfo

Defines

#define hdCmd   0x7
#define hdCylHi   0x5
#define hdCylLow   0x4
#define hdData   0x0
#define hdError   0x1
#define hdHead   0x6
#define hdSecCount   0x2
#define hdSecNum   0x3
#define hdStat   0x7
#define MAXPARTITIONS   8
#define NDDATA   5
#define NSPARE   5

Functions

int hdInit (struct device_node *dev)
int hdIoctl ()
void hdRead (struct driveInfo *hdd, void *, uInt32, uInt32)
int hdReset ()
int hdStandby ()
int hdStart ()
int hdStop ()
void hdWrite (struct driveInfo *hdd, void *, uInt32, uInt32)
int initHardDisk ()

Variables

static const char * fstypenames []
+


Define Documentation

+ +
+
+ + + + +
#define hdCmd   0x7
+
+
+ +

+ +

+Definition at line 43 of file hd.h. +

+Referenced by hdInit(), hdRead(), and hdWrite(). +

+

+ +

+
+ + + + +
#define hdCylHi   0x5
+
+
+ +

+ +

+Definition at line 40 of file hd.h. +

+Referenced by hdRead(), and hdWrite(). +

+

+ +

+
+ + + + +
#define hdCylLow   0x4
+
+
+ +

+ +

+Definition at line 39 of file hd.h. +

+Referenced by hdRead(), and hdWrite(). +

+

+ +

+
+ + + + +
#define hdData   0x0
+
+
+ +

+ +

+Definition at line 35 of file hd.h. +

+Referenced by hdInit(), hdRead(), and hdWrite(). +

+

+ +

+
+ + + + +
#define hdError   0x1
+
+
+ +

+ +

+Definition at line 36 of file hd.h. +

+

+ +

+
+ + + + +
#define hdHead   0x6
+
+
+ +

+ +

+Definition at line 41 of file hd.h. +

+Referenced by hdInit(), hdRead(), and hdWrite(). +

+

+ +

+
+ + + + +
#define hdSecCount   0x2
+
+
+ +

+ +

+Definition at line 37 of file hd.h. +

+Referenced by hdInit(), hdRead(), and hdWrite(). +

+

+ +

+
+ + + + +
#define hdSecNum   0x3
+
+
+ +

+ +

+Definition at line 38 of file hd.h. +

+Referenced by hdRead(), and hdWrite(). +

+

+ +

+
+ + + + +
#define hdStat   0x7
+
+
+ +

+ +

+Definition at line 42 of file hd.h. +

+Referenced by hdInit(), hdRead(), and hdWrite(). +

+

+ +

+
+ + + + +
#define MAXPARTITIONS   8
+
+
+ +

+ +

+Definition at line 84 of file hd.h. +

+

+ +

+
+ + + + +
#define NDDATA   5
+
+
+ +

+ +

+Definition at line 140 of file hd.h. +

+

+ +

+
+ + + + +
#define NSPARE   5
+
+
+ +

+ +

+Definition at line 142 of file hd.h. +

+

+


Function Documentation

+ +
+
+ + + + + + + + + +
int hdInit (struct device_node dev  ) 
+
+ +

+ +

+
+ + + + + + + + +
int hdIoctl (  ) 
+
+
+ +

+ +

+Definition at line 137 of file hd.c. +

+Referenced by initHardDisk(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void hdRead (struct driveInfo hdd,
void * ,
uInt32 ,
uInt32  
)
+
+ +

+ +

+
+ + + + + + + + +
int hdReset (  ) 
+
+
+ +

+ +

+Definition at line 141 of file hd.c. +

+Referenced by initHardDisk(). +

+

+ +

+
+ + + + + + + + +
int hdStandby (  ) 
+
+
+ +

+ +

+Definition at line 125 of file hd.c. +

+Referenced by initHardDisk(). +

+

+ +

+
+ + + + + + + + +
int hdStart (  ) 
+
+
+ +

+ +

+Definition at line 129 of file hd.c. +

+Referenced by initHardDisk(). +

+

+ +

+
+ + + + + + + + +
int hdStop (  ) 
+
+
+ +

+ +

+Definition at line 133 of file hd.c. +

+Referenced by initHardDisk(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void hdWrite (struct driveInfo hdd,
void * ,
uInt32 ,
uInt32  
)
+
+ +

+ +

+
+ + + + + + + + +
int initHardDisk (  ) 
+
+ +

+


Variable Documentation

+ +
+
+ + + + +
const char* fstypenames[] [static]
+
+
+ +

+Initial value:

 {
+        "unused",
+        "swap",
+        "Version 6",
+        "Version 7",
+        "System V",
+        "4.1BSD",
+        "Eighth Edition",
+        "4.2BSD",
+        "MSDOS",
+        "4.4LFS",
+        "unknown",
+        "HPFS",
+        "ISO9660",
+        "boot",
+        "vinum",
+        "raid",
+        "?",
+        "?",
+        "?",
+        "?",
+        "jfs",
+        NULL
+}
+
+

+Definition at line 161 of file hd.h. +

+Referenced by initHardDisk(). +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/hierarchy.html b/doc/html/hierarchy.html new file mode 100644 index 0000000..55e136e --- /dev/null +++ b/doc/html/hierarchy.html @@ -0,0 +1,208 @@ + + +UbixOS V2: Hierarchical Index + + + + +
+
+
+
+

UbixOS V2 Class Hierarchy

This inheritance list is sorted roughly, but not completely, alphabetically: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/idt_8c-source.html b/doc/html/idt_8c-source.html new file mode 100644 index 0000000..af083ae --- /dev/null +++ b/doc/html/idt_8c-source.html @@ -0,0 +1,503 @@ + + +UbixOS V2: src/sys/sys/idt.c Source File + + + + +
+
+
+
+ +

idt.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2005 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <sys/idt.h>
+00031 #include <sys/gdt.h>
+00032 #include <sys/io.h>
+00033 #include <ubixos/sched.h>
+00034 #include <isa/8259.h>
+00035 #include <lib/kprintf.h>
+00036 #include <lib/kmalloc.h>
+00037 #include <vmm/vmm.h>
+00038 #include <ubixos/syscall.h>
+00039 #include <ubixos/kpanic.h>
+00040 #include <ubixos/endtask.h>
+00041 #include <string.h>
+00042 
+00043 #define FP_TO_LINEAR(seg, off) ((void*) ((((uInt16) (seg)) << 4) + ((uInt16) (off))))
+00044 
+00045 static ubixDescriptorTable(ubixIDT, 256) { };
+00046 
+00047 static struct {
+00048   unsigned short limit __attribute__((packed));
+00049   union descriptorTableUnion *idt __attribute__((packed));
+00050   } loadidt = {
+00051     (256 * sizeof(union descriptorTableUnion) - 1), ubixIDT
+00052     };
+00053 
+00054 /************************************************************************
+00055 
+00056 Function: int idtInit()
+00057 Description: This function is used to enable our IDT subsystem
+00058 Notes:
+00059 
+00060 02/20/2004 - Approved for quality
+00061 
+00062 ************************************************************************/
+00063 int idt_init() {
+00064   int i = 0x0;
+00065 
+00066   struct tssStruct *sfTSS  = (struct tssStruct *)0x6200;
+00067   struct tssStruct *gpfTSS = (struct tssStruct *)0x4200;
+00068 
+00069   /* Set up default vector table for all possible 256 interrupts */
+00070 
+00071   for (i = 0x0; i < 256; i++) {
+00072     setVector(intNull, i, dPresent + dInt + dDpl3);
+00073     }
+00074 
+00075   /* Load the IDT into the system */
+00076   asm volatile(
+00077     "cli                      \n"
+00078     "lidt (%0)                \n"  /* Load the IDT                */
+00079     "pushfl                   \n"  /* Clear the NT flag           */
+00080     "andl $0xffffbfff,(%%esp)  \n"
+00081     "popfl                    \n"
+00082     "sti                      \n"
+00083     :
+00084     : "r" ((char *)&loadidt)
+00085     );
+00086 
+00087   /* Set up the basic vectors for the reserved ints */
+00088   setVector(_int0, 0, dPresent + dInt + dDpl0);
+00089   setVector(_int1, 1, dPresent + dInt + dDpl0);
+00090   setVector(_int2, 2, dPresent + dInt + dDpl0);
+00091   setVector(_int3, 3, dPresent + dInt + dDpl0);
+00092   setVector(_int4, 4, dPresent + dInt + dDpl0);
+00093   setVector(_int5, 5, dPresent + dInt + dDpl0);
+00094   setVector(_int6, 6, dPresent + dInt + dDpl0);
+00095   setVector(_int7,7,dPresent + dInt + dDpl0);
+00096   setTaskVector(8,dPresent + dTask + dDpl0, 0x40);
+00097   setVector(_int9, 9, dPresent + dInt + dDpl0);
+00098   setVector(_int10, 10, dPresent + dInt + dDpl0);
+00099   setVector(_int11, 11, dPresent + dInt + dDpl0);
+00100   setVector(_int12, 12, dPresent + dInt + dDpl0);
+00101   setTaskVector(13, dPresent + dTask + dDpl0, 0x38);
+00102   setVector(_vmm_pageFault, 14, dPresent + dInt + dDpl0);
+00103   setVector(_sysCall, 128, dPresent + dTrap + dDpl3);
+00104   setVector(_sysCall_new, 0x81, dPresent + dTrap + dDpl3);
+00105   //setVector(_sysCallNew, 0x90, dPresent + dTrap + dDpl3);
+00106   setVector(timerInt, 0x68, (dInt + dPresent + dDpl0));
+00107 
+00108 
+00109   gpfTSS->back_link    = 0x0;
+00110   gpfTSS->esp0         = 0x0;
+00111   gpfTSS->ss0          = 0x0;
+00112   gpfTSS->esp1         = 0x0;
+00113   gpfTSS->ss1          = 0x0;
+00114   gpfTSS->esp2         = 0x0;
+00115   gpfTSS->ss2          = 0x0;
+00116   gpfTSS->cr3          = (unsigned int)kernelPageDirectory;
+00117   gpfTSS->eip          = (unsigned int)&_int13;
+00118   gpfTSS->eflags       = 0x206;
+00119   gpfTSS->esp          = 0x1D000;
+00120   gpfTSS->ebp          = 0x1D000;
+00121   gpfTSS->esi          = 0x0;
+00122   gpfTSS->edi          = 0x0;
+00123   gpfTSS->es           = 0x10;
+00124   gpfTSS->cs           = 0x08;
+00125   gpfTSS->ss           = 0x10;
+00126   gpfTSS->ds           = 0x10;
+00127   gpfTSS->fs           = 0x10;
+00128   gpfTSS->gs           = 0x10;
+00129   gpfTSS->ldt          = 0x0;
+00130   gpfTSS->trace_bitmap = 0x0000;
+00131   gpfTSS->io_map       = 0x8000;
+00132   
+00133   memset(sfTSS,0x0,sizeof(struct tssStruct));
+00134   sfTSS->cr3           = (unsigned int)kernelPageDirectory;
+00135   sfTSS->eip           = (unsigned int)&_int8;
+00136   sfTSS->eflags        = 0x206;
+00137   sfTSS->esp           = 0x1C000;
+00138   sfTSS->ebp           = 0x1C000;
+00139   sfTSS->es            = 0x10;
+00140   sfTSS->cs            = 0x08;
+00141   sfTSS->ss            = 0x10;
+00142   sfTSS->ds            = 0x10;
+00143   sfTSS->fs            = 0x10;
+00144   sfTSS->gs            = 0x10;
+00145   sfTSS->io_map        = 0x8000;
+00146 
+00147   /* Print out information for the IDT */
+00148   kprintf("idt0 - Address: [0x%X]\n", &ubixIDT);
+00149 
+00150   /* Return so we know all went well */
+00151   return (0x0);
+00152   }
+00153 
+00154 
+00155 /* Sets Up IDT Vector */
+00156 void setVector(void *handler, unsigned char interrupt, unsigned short controlMajor) {
+00157   unsigned short  codesegment = 0x08;
+00158   asm             volatile ("movw %%cs,%0":"=g" (codesegment));
+00159 
+00160   ubixIDT[interrupt].gate.offsetLow = (unsigned short)(((unsigned long)handler) & 0xffff);
+00161   ubixIDT[interrupt].gate.selector = codesegment;
+00162   ubixIDT[interrupt].gate.access = controlMajor;
+00163   ubixIDT[interrupt].gate.offsetHigh = (unsigned short)(((unsigned long)handler) >> 16);
+00164 }
+00165 
+00166 /************************************************************************
+00167 
+00168 Function: void setTaskVector(uInt8,uInt16,uInt8);
+00169 Description: This Function Sets Up An IDT Task Vector
+00170 Notes:
+00171 
+00172 ************************************************************************/
+00173 void 
+00174 setTaskVector(uInt8 interrupt, uInt16 controlMajor, uInt8 selector)
+00175 {
+00176   uInt16          codesegment = 0x08;
+00177   asm             volatile ("movw %%cs,%0":"=g" (codesegment));
+00178 
+00179   ubixIDT[interrupt].gate.offsetLow = 0x0;
+00180   ubixIDT[interrupt].gate.selector = selector;
+00181   ubixIDT[interrupt].gate.access = controlMajor;
+00182   ubixIDT[interrupt].gate.offsetHigh = 0x0;
+00183 }
+00184 
+00185 
+00186 /* Null Intterupt Descriptor */
+00187 void intNull() {
+00188   kprintf("Invalid Interrupt[%i]\n",_current->id);
+00189 /*
+00190   kpanic("Invalid Interrupt[%i]\n",_current->id);
+00191   while (1);
+00192   endTask(_current->id);
+00193   sched_yield();
+00194 */
+00195   }
+00196 
+00197 void _int0() {
+00198   kpanic("int0: Divide-by-Zero [%i]\n",_current->id);
+00199   endTask(_current->id);
+00200   sched_yield();
+00201   }
+00202 
+00203 void _int1() {
+00204   kpanic("int1: Debug exception [%i]\n",_current->id);
+00205   endTask(_current->id);
+00206   sched_yield();
+00207   }
+00208 
+00209 void _int2() {
+00210   kpanic("int2: unknown error [%i]\n",_current->id);
+00211   endTask(_current->id);
+00212   sched_yield();
+00213   }
+00214 
+00215 void _int3() {
+00216   kpanic("int3: Breakpoint [%i]\n",_current->id);
+00217   endTask(_current->id);
+00218   sched_yield();
+00219   }
+00220 
+00221 void _int4(){
+00222   kpanic("int4: Overflow [%i]\n",_current->id);
+00223   endTask(_current->id);
+00224   sched_yield();
+00225   }
+00226 
+00227 void  _int5() {
+00228   kpanic("int5: Bounds check [%i]\n",_current->id);
+00229   endTask(_current->id);
+00230   sched_yield();
+00231   }
+00232 
+00233 void _int6() {
+00234   kpanic("int6: Invalid opcode! [%i]\n",_current->id);
+00235   endTask(_current->id);
+00236   sched_yield();
+00237   }
+00238 
+00239 void _int8() {
+00240   struct tssStruct *sfTSS  = (struct tssStruct *)0x6200;
+00241   kpanic("int8: Double Fault! [%i]\n",_current->id);
+00242   sfTSS->cr3           = (unsigned int)kernelPageDirectory;
+00243   sfTSS->eip           = (unsigned int)&_int8;
+00244   sfTSS->eflags        = 0x206;
+00245   sfTSS->esp           = 0x1C000;
+00246   sfTSS->ebp           = 0x1C000;
+00247   sfTSS->es            = 0x10;
+00248   sfTSS->cs            = 0x08;
+00249   sfTSS->ss            = 0x10;
+00250   sfTSS->ds            = 0x10;
+00251   sfTSS->fs            = 0x10;
+00252   sfTSS->gs            = 0x10;
+00253   sfTSS->io_map        = 0x8000;
+00254   while (1);
+00255  }
+00256 
+00257 void _int9() {
+00258   kpanic("int9: Coprocessor Segment Overrun! [%i]\n",_current->id);
+00259   endTask(_current->id);
+00260   sched_yield();
+00261   }
+00262 
+00263 void _int10() {
+00264   kpanic("int10: Invalid TSS! [%i]\n",_current->id);
+00265   endTask(_current->id);
+00266   sched_yield();
+00267   }
+00268 
+00269 void _int11() {
+00270   kpanic("int11: Segment Not Present! [%i]\n",_current->id);
+00271   endTask(_current->id);
+00272   sched_yield();
+00273   }
+00274 
+00275 void _int12() {
+00276   kpanic("int12: Stack-Segment Fault! [%i]\n",_current->id);
+00277   endTask(_current->id);
+00278   sched_yield();
+00279   }
+00280 
+00281 void _int13() {
+00282   uInt8          *ip = 0x0;
+00283   uInt16         *stack = 0x0, *ivt = 0x0;
+00284   uInt32         *stack32 = 0x0;
+00285   bool            isOperand32 = FALSE, isAddress32 = FALSE;
+00286   struct tssStruct *gpfTSS = (struct tssStruct *)0x4200;
+00287 
+00288   irqDisable(0x0);
+00289   
+00290   gpfTSS->eip            = (unsigned int)&_int13;
+00291   gpfTSS->esp            = 0x1D000;
+00292   gpfTSS->ebp            = 0x1D000;
+00293   gpfTSS->eflags         = 0x206;
+00294   
+00295   ip      = FP_TO_LINEAR(_current->tss.cs, _current->tss.eip);
+00296   ivt = (uInt16 *) 0x0;
+00297   stack   = (uInt16 *) FP_TO_LINEAR(_current->tss.ss,_current->tss.esp);
+00298   stack32 = (uInt32 *) stack;
+00299 
+00300 gpfStart:
+00301   switch (ip[0]) {
+00302   case 0xCD:                    /* INT n */
+00303     switch (ip[1]) {
+00304     case 0x69:
+00305       kprintf("Exit Bios [0x%X]\n",_current->id);
+00306       _current->state = DEAD;
+00307       break;
+00308     case 0x20:
+00309     case 0x21:
+00310       kpanic("GPF OP 0x20/0x21\n");
+00311       break;
+00312     default:
+00313       stack -= 3;
+00314       _current->tss.esp = ((_current->tss.esp & 0xffff) - 6) & 0xffff;
+00315       stack[0] = (uInt16) (_current->tss.eip + 2);
+00316       stack[1] = _current->tss.cs; stack[2] = (uInt16) _current->tss.eflags;
+00317       if (_current->oInfo.v86If)
+00318         stack[2] |= EFLAG_IF;
+00319       else
+00320         stack[2] &= ~EFLAG_IF;
+00321       _current->tss.cs  = ivt[ip[1] * 2 + 1] & 0xFFFF;
+00322       _current->tss.eip    = ivt[ip[1] * 2] & 0xFFFF;
+00323       break;
+00324     }
+00325     break;
+00326   case 0x66:
+00327     isOperand32 = TRUE;
+00328     ip++;
+00329     _current->tss.eip = (uInt16) (_current->tss.eip + 1); 
+00330     goto gpfStart;
+00331     break;
+00332   case 0x67:
+00333     isAddress32 = TRUE;
+00334     ip++;
+00335     _current->tss.eip = (uInt16) (_current->tss.eip + 1);
+00336     goto gpfStart;
+00337     break;
+00338   case 0xF0:
+00339     _current->tss.eip = (uInt16) (_current->tss.eip + 1);
+00340     kpanic("GPF OP 0xF0\n");
+00341     break;
+00342   case 0x9C:
+00343     if (isOperand32 == TRUE) {
+00344       _current->tss.esp = ((_current->tss.esp & 0xffff) - 4) & 0xffff;
+00345       stack32--;
+00346      stack32[0] = _current->tss.eflags & 0xDFF;
+00347      if (_current->oInfo.v86If == TRUE) 
+00348        stack32[0] |= EFLAG_IF;
+00349      else stack32[0] &= ~EFLAG_IF;
+00350     } else {
+00351       _current->tss.esp = ((_current->tss.esp & 0xffff) - 2) & 0xffff;
+00352       stack--;
+00353 
+00354        stack[0] = (uInt16) _current->tss.eflags;
+00355        if (_current->oInfo.v86If == TRUE) stack[0] |= EFLAG_IF;
+00356        else stack[0] &= ~EFLAG_IF;
+00357        _current->tss.eip = (uInt16) (_current->tss.eip + 1);
+00358        
+00359     }
+00360     break;
+00361   case 0x9D:
+00362     if (isOperand32 == TRUE) {
+00363       _current->tss.eflags = EFLAG_IF | EFLAG_VM | (stack32[0] & 0xDFF);
+00364       _current->oInfo.v86If = (stack32[0] & EFLAG_IF) != 0;
+00365       _current->tss.esp = ((_current->tss.esp & 0xffff) + 4) & 0xffff;
+00366     } else {
+00367       _current->tss.eflags = EFLAG_IF | EFLAG_VM | stack[0];
+00368       _current->oInfo.v86If = (stack[0] & EFLAG_IF) != 0;
+00369       _current->tss.esp = ((_current->tss.esp & 0xffff) + 2) & 0xffff;
+00370     }
+00371     _current->tss.eip = (uInt16) (_current->tss.eip + 1);
+00372     /* kprintf("popf [0x%X]\n",_current->id); */
+00373     break;
+00374   case 0xFA:
+00375     _current->oInfo.v86If = FALSE;
+00376     _current->tss.eflags &= ~EFLAG_IF;
+00377     _current->tss.eip = (uInt16) (_current->tss.eip + 1);
+00378     _current->oInfo.timer = 0x1;
+00379     break;
+00380   case 0xFB:
+00381     _current->oInfo.v86If = TRUE;
+00382     _current->tss.eflags |= EFLAG_IF;
+00383     _current->tss.eip = (uInt16) (_current->tss.eip + 1);
+00384     _current->oInfo.timer = 0x0;
+00385     /* kprintf("sti [0x%X]\n",_current->id); */
+00386     break;
+00387   case 0xCF:
+00388     _current->tss.eip = stack[0];
+00389     _current->tss.cs = stack[1];
+00390     _current->tss.eflags = EFLAG_IF | EFLAG_VM | stack[2];
+00391     _current->oInfo.v86If = (stack[2] & EFLAG_IF) != 0;
+00392     _current->tss.esp = ((_current->tss.esp & 0xffff) + 6) & 0xffff;
+00393     /* kprintf("iret [0x%X]\n",_current->id); */
+00394     break;
+00395   case 0xEC:                    /* IN AL,DX */
+00396     _current->tss.eax = (_current->tss.eax & ~0xFF) | inportByte(_current->tss.edx);
+00397     _current->tss.eip = (uInt16) (_current->tss.eip + 1);
+00398     break;
+00399   case 0xED:                    /* IN AX,DX */
+00400     _current->tss.eax = (_current->tss.eax & ~0xFFFF) | inportWord(_current->tss.edx);
+00401     _current->tss.eip = (uInt16) (_current->tss.eip + 1);
+00402     break;
+00403   case 0xEE:                    /* OUT DX,AL */
+00404     outportByte(_current->tss.edx, _current->tss.eax & 0xFF);
+00405     _current->tss.eip = (uInt16) (_current->tss.eip + 1);
+00406     break;
+00407   case 0xEF:
+00408     outportWord(_current->tss.edx, _current->tss.eax);
+00409     _current->tss.eip = (uInt16) (_current->tss.eip + 1);
+00410     break;
+00411   case 0xF4:
+00412     _current->tss.eip = (uInt16) (_current->tss.eip + 1);
+00413     break;
+00414   default:                      /* something wrong */
+00415      kprintf("NonHandled OpCode [0x%X:0x%X]\n",_current->id,ip[0]);
+00416      _current->state = DEAD;
+00417     break;
+00418     }
+00419   irqEnable(0);
+00420   while (1);
+00421   }
+00422 
+00423 /* Removed static however this is the only place it's called from */
+00424 void mathStateRestore() {
+00425   if (_usedMath != 0x0) {
+00426     asm(
+00427       "fnsave %0"
+00428       :
+00429       : "m" (_usedMath->i387)
+00430       );
+00431     }
+00432   if (_current->usedMath != 0x0) {
+00433     asm(
+00434       "frstor %0"
+00435       :
+00436       : "m" (_current->i387)
+00437       );
+00438     }
+00439   else {
+00440     asm("fninit");
+00441     _current->usedMath = 0x1;
+00442     }
+00443 
+00444   _usedMath=_current;
+00445 
+00446   //Return
+00447   }
+00448 
+00449 void _int7();
+00450 asm(
+00451   ".globl _int7              \n"
+00452   "_int7:                    \n"
+00453   "  pushl %eax              \n"
+00454   "  clts                    \n"
+00455   "  movl _current,%eax      \n"
+00456   "  cmpl _usedMath,%eax     \n"
+00457   "  je mathDone             \n"
+00458   "  call mathStateRestore   \n"
+00459   "mathDone:                 \n"
+00460   "  popl %eax               \n"
+00461   "  iret                    \n"
+00462   );
+00463 
+00464 /***
+00465  END
+00466  ***/
+

Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/idt_8c.html b/doc/html/idt_8c.html new file mode 100644 index 0000000..042f92f --- /dev/null +++ b/doc/html/idt_8c.html @@ -0,0 +1,721 @@ + + +UbixOS V2: src/sys/sys/idt.c File Reference + + + + +
+
+
+
+ +

idt.c File Reference

+

+#include <sys/idt.h>
+#include <sys/gdt.h>
+#include <sys/io.h>
+#include <ubixos/sched.h>
+#include <isa/8259.h>
+#include <lib/kprintf.h>
+#include <lib/kmalloc.h>
+#include <vmm/vmm.h>
+#include <ubixos/syscall.h>
+#include <ubixos/kpanic.h>
+#include <ubixos/endtask.h>
+#include <string.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Defines

#define FP_TO_LINEAR(seg, off)   ((void*) ((((uInt16) (seg)) << 4) + ((uInt16) (off))))

Functions

void _int0 ()
void _int1 ()
void _int10 ()
void _int11 ()
void _int12 ()
void _int13 ()
void _int2 ()
void _int3 ()
void _int4 ()
void _int5 ()
void _int6 ()
void _int7 ()
void _int8 ()
void _int9 ()
 asm (".globl _int7 \n""_int7: \n"" pushl %eax \n"" clts \n"" movl _current,%eax \n"" cmpl _usedMath,%eax \n"" je mathDone \n"" call mathStateRestore \n""mathDone: \n"" popl %eax \n"" iret \n")
int idt_init ()
void intNull ()
void mathStateRestore ()
void setTaskVector (uInt8 interrupt, uInt16 controlMajor, uInt8 selector)
void setVector (void *handler, unsigned char interrupt, unsigned short controlMajor)
static ubixDescriptorTable (ubixIDT, 256)

Variables

struct {
descriptorTableUnion *idt __attribute__ ((packed))
unsigned short limit __attribute__ ((packed))
loadidt
+


Define Documentation

+ +
+
+ + + + + + + + + + + + +
#define FP_TO_LINEAR (seg,
off   )    ((void*) ((((uInt16) (seg)) << 4) + ((uInt16) (off))))
+
+
+ +

+ +

+Definition at line 43 of file idt.c. +

+Referenced by _int13(). +

+

+


Function Documentation

+ +
+
+ + + + + + + + +
void _int0 (  ) 
+
+
+ +

+ +

+Definition at line 197 of file idt.c. +

+References _current, endTask(), taskStruct::id, kpanic(), and sched_yield(). +

+Referenced by idt_init(). +

+

+ +

+
+ + + + + + + + +
void _int1 (  ) 
+
+
+ +

+ +

+Definition at line 203 of file idt.c. +

+References _current, endTask(), taskStruct::id, kpanic(), and sched_yield(). +

+Referenced by idt_init(). +

+

+ +

+
+ + + + + + + + +
void _int10 (  ) 
+
+
+ +

+ +

+Definition at line 263 of file idt.c. +

+References _current, endTask(), taskStruct::id, kpanic(), and sched_yield(). +

+Referenced by idt_init(). +

+

+ +

+
+ + + + + + + + +
void _int11 (  ) 
+
+
+ +

+ +

+Definition at line 269 of file idt.c. +

+References _current, endTask(), taskStruct::id, kpanic(), and sched_yield(). +

+Referenced by idt_init(). +

+

+ +

+
+ + + + + + + + +
void _int12 (  ) 
+
+
+ +

+ +

+Definition at line 275 of file idt.c. +

+References _current, endTask(), taskStruct::id, kpanic(), and sched_yield(). +

+Referenced by idt_init(). +

+

+ +

+
+ + + + + + + + +
void _int13 (  ) 
+
+ +

+ +

+
+ + + + + + + + +
void _int2 (  ) 
+
+
+ +

+ +

+Definition at line 209 of file idt.c. +

+References _current, endTask(), taskStruct::id, kpanic(), and sched_yield(). +

+Referenced by idt_init(). +

+

+ +

+
+ + + + + + + + +
void _int3 (  ) 
+
+
+ +

+ +

+Definition at line 215 of file idt.c. +

+References _current, endTask(), taskStruct::id, kpanic(), and sched_yield(). +

+Referenced by idt_init(). +

+

+ +

+
+ + + + + + + + +
void _int4 (  ) 
+
+
+ +

+ +

+Definition at line 221 of file idt.c. +

+References _current, endTask(), taskStruct::id, kpanic(), and sched_yield(). +

+Referenced by idt_init(). +

+

+ +

+
+ + + + + + + + +
void _int5 (  ) 
+
+
+ +

+ +

+Definition at line 227 of file idt.c. +

+References _current, endTask(), taskStruct::id, kpanic(), and sched_yield(). +

+Referenced by idt_init(). +

+

+ +

+
+ + + + + + + + +
void _int6 (  ) 
+
+
+ +

+ +

+Definition at line 233 of file idt.c. +

+References _current, endTask(), taskStruct::id, kpanic(), and sched_yield(). +

+Referenced by idt_init(). +

+

+ +

+
+ + + + + + + + +
void _int7 (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
void _int8 (  ) 
+
+ +

+ +

+
+ + + + + + + + +
void _int9 (  ) 
+
+
+ +

+ +

+Definition at line 257 of file idt.c. +

+References _current, endTask(), taskStruct::id, kpanic(), and sched_yield(). +

+Referenced by idt_init(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
asm (".globl _int7 \n""_int7: \n"" pushl %eax \n"" clts \n"" movl   _current,
%eax\n""cmpl  _usedMath,
%eax\n""je mathDone\n""call mathStateRestore\n""mathDone:\n""popl%eax\n""iret\n"  
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
int idt_init (  ) 
+
+ +

+ +

+
+ + + + + + + + +
void intNull (  ) 
+
+
+ +

+ +

+Definition at line 187 of file idt.c. +

+References _current, taskStruct::id, and kprintf(). +

+Referenced by idt_init(). +

+

+ +

+
+ + + + + + + + +
void mathStateRestore (  ) 
+
+
+ +

+ +

+Definition at line 424 of file idt.c. +

+References _current, _usedMath, taskStruct::i387, and taskStruct::usedMath. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void setTaskVector (uInt8  interrupt,
uInt16  controlMajor,
uInt8  selector 
)
+
+
+ +

+ +

+Definition at line 174 of file idt.c. +

+References gdtGate::access, descriptorTableUnion::gate, gdtGate::offsetHigh, gdtGate::offsetLow, and gdtGate::selector. +

+Referenced by idt_init(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void setVector (void *  handler,
unsigned char  interrupt,
unsigned short  controlMajor 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
static ubixDescriptorTable (ubixIDT ,
256  
) [static]
+
+
+ +

+ +

+Definition at line 45 of file idt.c. +

+

+


Variable Documentation

+ +
+
+ + + + +
struct { ... } loadidt [static]
+
+
+ +

+ +

+Referenced by idt_init(). +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/idt_8h-source.html b/doc/html/idt_8h-source.html new file mode 100644 index 0000000..63a4911 --- /dev/null +++ b/doc/html/idt_8h-source.html @@ -0,0 +1,124 @@ + + +UbixOS V2: src/sys/include/sys/idt.h Source File + + + + +
+
+
+
+ +

idt.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _IDT_H
+00031 #define _IDT_H
+00032 
+00033 #include <ubixos/types.h>
+00034 #include <sys/gdt.h>
+00035 
+00036 #define EFLAG_TF         0x100
+00037 #define EFLAG_IF         0x200
+00038 #define EFLAG_IOPL3      0x3000
+00039 #define EFLAG_VM         0x20000
+00040 
+00041 int idt_init();
+00042 void setVector(void *handler, unsigned char interrupt, unsigned short controlMajor);
+00043 void setTaskVector(uInt8 interrupt,uInt16 controlMajor,uInt8 selector);
+00044 void intNull();
+00045 
+00046 void _int0();
+00047 void _int1();
+00048 void _int2();
+00049 void _int3();
+00050 void _int4();
+00051 void _int5();
+00052 void _int6();
+00053 void _int7();
+00054 void _int8();
+00055 void _int9();
+00056 void _int10();
+00057 void _int11();
+00058 void _int12();
+00059 void _int13();
+00060 void timerInt();
+00061 
+00062 #endif
+00063 
+00064 /***
+00065  $Log$
+00066  Revision 1.1.1.1  2006/06/01 12:46:15  reddawg
+00067  ubix2
+00068 
+00069  Revision 1.2  2005/10/12 00:13:37  reddawg
+00070  Removed
+00071 
+00072  Revision 1.1.1.1  2005/09/26 17:23:52  reddawg
+00073  no message
+00074 
+00075  Revision 1.5  2004/09/07 21:54:38  reddawg
+00076  ok reverted back to old scheduling for now....
+00077 
+00078  Revision 1.3  2004/07/09 13:16:41  reddawg
+00079  idt: idtInit to idt_init
+00080  Adjusted Startup Routines
+00081 
+00082  Revision 1.2  2004/05/21 15:12:17  reddawg
+00083  Cleaned up
+00084 
+00085 
+00086  END
+00087  ***/
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/idt_8h.html b/doc/html/idt_8h.html new file mode 100644 index 0000000..4003d2a --- /dev/null +++ b/doc/html/idt_8h.html @@ -0,0 +1,659 @@ + + +UbixOS V2: src/sys/include/sys/idt.h File Reference + + + + +
+
+
+
+ +

idt.h File Reference

+

+#include <ubixos/types.h>
+#include <sys/gdt.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Defines

#define EFLAG_IF   0x200
#define EFLAG_IOPL3   0x3000
#define EFLAG_TF   0x100
#define EFLAG_VM   0x20000

Functions

void _int0 ()
void _int1 ()
void _int10 ()
void _int11 ()
void _int12 ()
void _int13 ()
void _int2 ()
void _int3 ()
void _int4 ()
void _int5 ()
void _int6 ()
void _int7 ()
void _int8 ()
void _int9 ()
int idt_init ()
void intNull ()
void setTaskVector (uInt8 interrupt, uInt16 controlMajor, uInt8 selector)
void setVector (void *handler, unsigned char interrupt, unsigned short controlMajor)
void timerInt ()
+


Define Documentation

+ +
+
+ + + + +
#define EFLAG_IF   0x200
+
+
+ +

+ +

+Definition at line 37 of file idt.h. +

+

+ +

+
+ + + + +
#define EFLAG_IOPL3   0x3000
+
+
+ +

+ +

+Definition at line 38 of file idt.h. +

+

+ +

+
+ + + + +
#define EFLAG_TF   0x100
+
+
+ +

+ +

+Definition at line 36 of file idt.h. +

+

+ +

+
+ + + + +
#define EFLAG_VM   0x20000
+
+
+ +

+ +

+Definition at line 39 of file idt.h. +

+

+


Function Documentation

+ +
+
+ + + + + + + + +
void _int0 (  ) 
+
+
+ +

+ +

+Definition at line 197 of file idt.c. +

+References _current, endTask(), taskStruct::id, kpanic(), and sched_yield(). +

+Referenced by idt_init(). +

+

+ +

+
+ + + + + + + + +
void _int1 (  ) 
+
+
+ +

+ +

+Definition at line 203 of file idt.c. +

+References _current, endTask(), taskStruct::id, kpanic(), and sched_yield(). +

+Referenced by idt_init(). +

+

+ +

+
+ + + + + + + + +
void _int10 (  ) 
+
+
+ +

+ +

+Definition at line 263 of file idt.c. +

+References _current, endTask(), taskStruct::id, kpanic(), and sched_yield(). +

+Referenced by idt_init(). +

+

+ +

+
+ + + + + + + + +
void _int11 (  ) 
+
+
+ +

+ +

+Definition at line 269 of file idt.c. +

+References _current, endTask(), taskStruct::id, kpanic(), and sched_yield(). +

+Referenced by idt_init(). +

+

+ +

+
+ + + + + + + + +
void _int12 (  ) 
+
+
+ +

+ +

+Definition at line 275 of file idt.c. +

+References _current, endTask(), taskStruct::id, kpanic(), and sched_yield(). +

+Referenced by idt_init(). +

+

+ +

+
+ + + + + + + + +
void _int13 (  ) 
+
+ +

+ +

+
+ + + + + + + + +
void _int2 (  ) 
+
+
+ +

+ +

+Definition at line 209 of file idt.c. +

+References _current, endTask(), taskStruct::id, kpanic(), and sched_yield(). +

+Referenced by idt_init(). +

+

+ +

+
+ + + + + + + + +
void _int3 (  ) 
+
+
+ +

+ +

+Definition at line 215 of file idt.c. +

+References _current, endTask(), taskStruct::id, kpanic(), and sched_yield(). +

+Referenced by idt_init(). +

+

+ +

+
+ + + + + + + + +
void _int4 (  ) 
+
+
+ +

+ +

+Definition at line 221 of file idt.c. +

+References _current, endTask(), taskStruct::id, kpanic(), and sched_yield(). +

+Referenced by idt_init(). +

+

+ +

+
+ + + + + + + + +
void _int5 (  ) 
+
+
+ +

+ +

+Definition at line 227 of file idt.c. +

+References _current, endTask(), taskStruct::id, kpanic(), and sched_yield(). +

+Referenced by idt_init(). +

+

+ +

+
+ + + + + + + + +
void _int6 (  ) 
+
+
+ +

+ +

+Definition at line 233 of file idt.c. +

+References _current, endTask(), taskStruct::id, kpanic(), and sched_yield(). +

+Referenced by idt_init(). +

+

+ +

+
+ + + + + + + + +
void _int7 (  ) 
+
+
+ +

+ +

+Referenced by idt_init(). +

+

+ +

+
+ + + + + + + + +
void _int8 (  ) 
+
+ +

+ +

+
+ + + + + + + + +
void _int9 (  ) 
+
+
+ +

+ +

+Definition at line 257 of file idt.c. +

+References _current, endTask(), taskStruct::id, kpanic(), and sched_yield(). +

+Referenced by idt_init(). +

+

+ +

+
+ + + + + + + + +
int idt_init (  ) 
+
+ +

+ +

+
+ + + + + + + + +
void intNull (  ) 
+
+
+ +

+ +

+Definition at line 187 of file idt.c. +

+References _current, taskStruct::id, and kprintf(). +

+Referenced by idt_init(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void setTaskVector (uInt8  interrupt,
uInt16  controlMajor,
uInt8  selector 
)
+
+
+ +

+ +

+Definition at line 174 of file idt.c. +

+References gdtGate::access, descriptorTableUnion::gate, gdtGate::offsetHigh, gdtGate::offsetLow, and gdtGate::selector. +

+Referenced by idt_init(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void setVector (void *  handler,
unsigned char  interrupt,
unsigned short  controlMajor 
)
+
+ +

+ +

+
+ + + + + + + + +
void timerInt (  ) 
+
+
+ +

+ +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/include_2sys_2device_8h-source.html b/doc/html/include_2sys_2device_8h-source.html new file mode 100644 index 0000000..b25a8be --- /dev/null +++ b/doc/html/include_2sys_2device_8h-source.html @@ -0,0 +1,151 @@ + + +UbixOS V2: src/sys/include/sys/device.h Source File + + + + +
+
+
+
+ +

device.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _DEVICE_H
+00031 #define _DEVICE_H
+00032 
+00033 #include <ubixos/types.h>
+00034 
+00035 struct device_node {
+00036   struct device_node      *prev;
+00037   struct device_node      *next;
+00038   struct device_interface *devInfo;
+00039   struct device_resource  *devRec;
+00040   char                      type;
+00041   int                       minor;
+00042   };
+00043   
+00044 struct device_resource {
+00045   uInt8 irq;
+00046   };
+00047 
+00048 struct device_interface {
+00049   uInt8  initialized;
+00050   uInt32 size;
+00051   int    major;
+00052   void  *info;
+00053   void (*read)(void *,void *,uInt32,uInt32);
+00054   void (*write)(void *,void *,uInt32,uInt32);
+00055   void (*reset)(void *);
+00056   int  (*init)(void *);
+00057   void (*ioctl)(void *);
+00058   void (*stop)(void *);
+00059   void (*start)(void *);
+00060   void (*standby)(void *);
+00061   };
+00062 
+00063 
+00064 int device_add(int,char,struct device_interface *);
+00065 struct device_node *device_find(int major,int minor);
+00066 int device_remove(struct device_node *);
+00067 #endif
+00068 
+00069 /***
+00070  $Log$
+00071  Revision 1.1.1.1  2006/06/01 12:46:15  reddawg
+00072  ubix2
+00073 
+00074  Revision 1.2  2005/10/12 00:13:37  reddawg
+00075  Removed
+00076 
+00077  Revision 1.1.1.1  2005/09/26 17:23:51  reddawg
+00078  no message
+00079 
+00080  Revision 1.14  2004/08/15 00:33:02  reddawg
+00081  Wow the ide driver works again
+00082 
+00083  Revision 1.13  2004/08/14 21:56:44  reddawg
+00084  Added initialized byte to the device system to make it easy to add child devices which use parent hardware.
+00085 
+00086  Revision 1.12  2004/07/21 10:02:09  reddawg
+00087  devfs: renamed functions
+00088  device system: renamed functions
+00089  fdc: fixed a few potential bugs and cleaned up some unused variables
+00090  strol: fixed definition
+00091  endtask: made it print out freepage debug info
+00092  kmalloc: fixed a huge memory leak we had some unhandled descriptor insertion so some descriptors were lost
+00093  ld: fixed a pointer conversion
+00094  file: cleaned up a few unused variables
+00095  sched: broke task deletion
+00096  kprintf: fixed ogPrintf definition
+00097 
+00098  Revision 1.11  2004/05/22 02:40:04  ionix
+00099 
+00100 
+00101  fixed typo in device.h and initialized previous in device.c :)
+00102 
+00103  Revision 1.10  2004/05/22 02:34:03  ionix
+00104 
+00105 
+00106  Added proto
+00107 
+00108  Revision 1.9  2004/05/21 15:12:17  reddawg
+00109  Cleaned up
+00110 
+00111 
+00112  END
+00113  ***/
+00114 
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/include_2sys_2device_8h.html b/doc/html/include_2sys_2device_8h.html new file mode 100644 index 0000000..b245a56 --- /dev/null +++ b/doc/html/include_2sys_2device_8h.html @@ -0,0 +1,160 @@ + + +UbixOS V2: src/sys/include/sys/device.h File Reference + + + + +
+
+
+
+ +

device.h File Reference

+

+#include <ubixos/types.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + +

Data Structures

struct  device_interface
struct  device_node
struct  device_resource

Functions

int device_add (int, char, struct device_interface *)
device_nodedevice_find (int major, int minor)
int device_remove (struct device_node *)
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int device_add (int ,
char ,
struct device_interface 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
struct device_node* device_find (int  major,
int  minor 
)
+
+ +

+ +

+
+ + + + + + + + + +
int device_remove (struct device_node  ) 
+
+
+ +

+ +

+Definition at line 110 of file device.c. +

+References devices, deviceSpinLock, kfree(), device_node::next, NULL, spinLock(), and spinUnlock(). +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/include_2ubixfs_2ubixfs_8h-source.html b/doc/html/include_2ubixfs_2ubixfs_8h-source.html new file mode 100644 index 0000000..049ca3b --- /dev/null +++ b/doc/html/include_2ubixfs_2ubixfs_8h-source.html @@ -0,0 +1,237 @@ + + +UbixOS V2: src/sys/include/ubixfs/ubixfs.h Source File + + + + +
+
+
+
+ +

ubixfs.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _UBIXFS_H
+00031 #define _UBIXFS_H
+00032 
+00033 #include <ubixos/types.h>
+00034 #include <vfs/vfs.h>
+00035 #include <sys/device.h>
+00036 #include <mpi/mpi.h>
+00037 #include <ubixfs/dirCache.h>
+00038 
+00039 
+00040 #define UBIXFS_BLOCKSIZE_BYTES     blockSize*512
+00041 #define UBIXFS_ALIGN(size) (size + ((((size) % (UBIXFS_BLOCKSIZE_BYTES)) == 0)? 0 : ((UBIXFS_BLOCKSIZE_BYTES) - ((size) % (UBIXFS_BLOCKSIZE_BYTES)))))
+00042 
+00043 #define UBIXDISKMAGIC     ((uInt32)0x45) /* The disk magic number */
+00044 #define MAXUBIXPARTITIONS 16
+00045 #define blockSize         8
+00046 
+00047 
+00048 #define EOBC              -1
+00049 
+00050 
+00051 #define typeFile      1
+00052 #define typeContainer 2
+00053 #define typeDirectory 4
+00054 #define typeDeleted   8
+00055 
+00056 /* Start */
+00057 struct directoryList {
+00058   char                  dirName[256];
+00059   char                 *dirCache;
+00060   uInt32                dirBlock;
+00061   struct directoryList *next;
+00062   struct directoryList *prev;
+00063   };
+00064 
+00065 typedef struct directoryList * dirList_t;
+00066 
+00067 dirList_t ubixFSLoadDir(char *);
+00068 /* End   */
+00069 
+00070 //Partition Information
+00071 struct ubixDiskLabel {
+00072   uInt32 magicNum;
+00073   uInt32 magicNum2;
+00074   uInt16 driveType;
+00075   uInt16 numPartitions;
+00076   struct  ubixPartitions {  //the partition table
+00077     uInt32 pSize;            //number of sectors in partition
+00078     uInt32 pOffset;          //starting sector
+00079     uInt32 pFsSize;          //filesystem basic fragment size
+00080     uInt32 pBatSize;         //BAT size
+00081     uInt8 pFsType;          //filesystem type, see below
+00082     uInt8 pFrag;            //filesystem fragments per block
+00083     } partitions[MAXUBIXPARTITIONS];
+00084   };
+00085 
+00086 
+00087 struct partitionInformation {
+00088   uInt32 size;                 //Size In Sectors
+00089   uInt32 startSector;          //Base Sector Of Partition
+00090   uInt32 blockAllocationTable; //Base Sector Of BAT
+00091   uInt32 rootDirectory;        //Base Sector Of Root Directory
+00092   };
+00093 
+00094 //Block Allocation Table Entry
+00095 struct blockAllocationTableEntry {
+00096   long attributes; //Block Attributes
+00097   long realSector; //Real Sector  
+00098   long nextBlock;  //Sector Of Next Block
+00099   long reserved;   //Reserved
+00100   };
+00101 
+00102 //UbixFS Directory Entry
+00103 struct directoryEntry {
+00104   uInt32  startCluster;   //Starting Cluster Of File
+00105   uInt32  size;           //Size Of File
+00106   uInt32  creationDate;  //Date Created
+00107   uInt32  lastModified;  //Date Last Modified
+00108   uInt32  uid;           //UID Of Owner
+00109   uInt32  gid;           //GID Of Owner
+00110   uInt16 attributes;    //Files Attributes
+00111   uInt16 permissions;   //Files Permissions
+00112   char   fileName[256]; //File Name
+00113   };
+00114 
+00115 struct bootSect {
+00116   uInt8 jmp[4];
+00117   uInt8 id[6];
+00118   uInt16 version;
+00119   uInt16 tmp;
+00120   uInt16 fsStart;
+00121   uInt16 tmp2;
+00122   uInt32 krnl_start;
+00123   uInt BytesPerSector;
+00124   uInt SectersPerTrack;
+00125   uInt TotalHeads;
+00126   uInt32 TotalSectors;
+00127   uInt8 code[479];
+00128   };  
+00129 
+00130 struct ubixFSInfo {
+00131   struct blockAllocationTableEntry *blockAllocationTable;
+00132   struct cacheNode * dirCache;
+00133   uInt32 batEntries;
+00134   uInt32 rootDir;
+00135 }; /* ubixFSInfo */
+00136 
+00137 int readFile(char *file);
+00138 int writeFileByte(int ch,fileDescriptor *fd,long offset);
+00139 //int openFileUbixFS(char *file,fileDescriptor *fd);
+00140 int getFreeBlocks(int count,fileDescriptor *fd);
+00141 //extern struct ubixDiskLabel *diskLabel;
+00142 
+00143 //Good Functions
+00144 //void initUbixFS(struct mountPoints *mp);
+00145 
+00146 int readUbixFS(fileDescriptor *fd,char *data,uInt32,long size);
+00147 int writeUbixFS(fileDescriptor *fd,char *data,long offset,long size);
+00148 void syncBat(vfs_mountPoint_t *mp);
+00149 int freeBlocks(int block,fileDescriptor *fd);
+00150 int addDirEntry(struct directoryEntry *dir,fileDescriptor *fd);
+00151 void ubixFSUnlink(char *path,vfs_mountPoint_t *mp);
+00152 int ubixFSmkDir(char *dir,fileDescriptor *fd);
+00153 
+00154 int  ubixfs_init();
+00155 int  ubixfs_initialize();
+00156 void ubixfs_thread();
+00157 
+00158 
+00159 #endif
+00160 
+00161 /***
+00162  $Log$
+00163  Revision 1.1.1.1  2006/06/01 12:46:14  reddawg
+00164  ubix2
+00165 
+00166  Revision 1.2  2005/10/12 00:13:37  reddawg
+00167  Removed
+00168 
+00169  Revision 1.1.1.1  2005/09/26 17:23:53  reddawg
+00170  no message
+00171 
+00172  Revision 1.21  2004/09/14 20:57:01  reddawg
+00173  Bug fixes: macro problem over opt a multiply
+00174 
+00175  Revision 1.20  2004/08/01 17:58:39  flameshadow
+00176  chg: fixed string allocation bug in ubixfs_cacheNew()
+00177 
+00178  Revision 1.19  2004/07/27 12:02:01  reddawg
+00179  chg: fixed marks bug readFile did a lookup which is why it looked like it was loopping so much
+00180 
+00181  Revision 1.18  2004/07/23 09:10:06  reddawg
+00182  ubixfs: cleaned up some functions played with the caching a bit
+00183  vfs:    renamed a bunch of functions
+00184  cleaned up a few misc bugs
+00185 
+00186  Revision 1.17  2004/07/22 22:37:03  reddawg
+00187  Caching is working now the FS is extremely fast but needs to be optimized to do 32bit copies over 8bit
+00188 
+00189  Revision 1.16  2004/07/20 21:28:16  flameshadow
+00190  oops
+00191 
+00192  Revision 1.14  2004/07/20 19:36:49  reddawg
+00193  UBU Tags
+00194 
+00195  Revision 1.13  2004/07/14 12:21:49  reddawg
+00196  ubixfs: enableUbixFs to ubixfs_init
+00197  Changed Startup Routines
+00198 
+00199  END
+00200  ***/
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/include_2ubixfs_2ubixfs_8h.html b/doc/html/include_2ubixfs_2ubixfs_8h.html new file mode 100644 index 0000000..423e61d --- /dev/null +++ b/doc/html/include_2ubixfs_2ubixfs_8h.html @@ -0,0 +1,769 @@ + + +UbixOS V2: src/sys/include/ubixfs/ubixfs.h File Reference + + + + +
+
+
+
+ +

ubixfs.h File Reference

+

+#include <ubixos/types.h>
+#include <vfs/vfs.h>
+#include <sys/device.h>
+#include <mpi/mpi.h>
+#include <ubixfs/dirCache.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  blockAllocationTableEntry
struct  bootSect
struct  directoryEntry
struct  directoryList
struct  partitionInformation
struct  ubixDiskLabel
struct  ubixDiskLabel::ubixPartitions
struct  ubixFSInfo

Defines

#define blockSize   8
#define EOBC   -1
#define MAXUBIXPARTITIONS   16
#define typeContainer   2
#define typeDeleted   8
#define typeDirectory   4
#define typeFile   1
#define UBIXDISKMAGIC   ((uInt32)0x45)
#define UBIXFS_ALIGN(size)   (size + ((((size) % (UBIXFS_BLOCKSIZE_BYTES)) == 0)? 0 : ((UBIXFS_BLOCKSIZE_BYTES) - ((size) % (UBIXFS_BLOCKSIZE_BYTES)))))
#define UBIXFS_BLOCKSIZE_BYTES   blockSize*512

Typedefs

typedef directoryListdirList_t

Functions

int addDirEntry (struct directoryEntry *dir, fileDescriptor *fd)
int freeBlocks (int block, fileDescriptor *fd)
int getFreeBlocks (int count, fileDescriptor *fd)
int readFile (char *file)
int readUbixFS (fileDescriptor *fd, char *data, uInt32, long size)
void syncBat (vfs_mountPoint_t *mp)
int ubixfs_init ()
int ubixfs_initialize ()
void ubixfs_thread ()
dirList_t ubixFSLoadDir (char *)
int ubixFSmkDir (char *dir, fileDescriptor *fd)
void ubixFSUnlink (char *path, vfs_mountPoint_t *mp)
int writeFileByte (int ch, fileDescriptor *fd, long offset)
int writeUbixFS (fileDescriptor *fd, char *data, long offset, long size)
+


Define Documentation

+ +
+
+ + + + +
#define blockSize   8
+
+
+ +

+ +

+Definition at line 45 of file ubixfs.h. +

+Referenced by ubixfs_loadData(), ubixFSmkDir(), and writeUbixFS(). +

+

+ +

+
+ + + + +
#define EOBC   -1
+
+
+ +

+ +

+Definition at line 48 of file ubixfs.h. +

+Referenced by writeUbixFS(). +

+

+ +

+
+ + + + +
#define MAXUBIXPARTITIONS   16
+
+
+ +

+ +

+Definition at line 44 of file ubixfs.h. +

+

+ +

+
+ + + + +
#define typeContainer   2
+
+
+ +

+ +

+Definition at line 52 of file ubixfs.h. +

+

+ +

+
+ + + + +
#define typeDeleted   8
+
+
+ +

+ +

+Definition at line 54 of file ubixfs.h. +

+Referenced by ubixFSUnlink(). +

+

+ +

+
+ + + + +
#define typeDirectory   4
+
+
+ +

+ +

+Definition at line 53 of file ubixfs.h. +

+Referenced by ubixFSmkDir(). +

+

+ +

+
+ + + + +
#define typeFile   1
+
+
+ +

+ +

+Definition at line 51 of file ubixfs.h. +

+Referenced by ubixfs_cacheFind(). +

+

+ +

+
+ + + + +
#define UBIXDISKMAGIC   ((uInt32)0x45)
+
+
+ +

+ +

+Definition at line 43 of file ubixfs.h. +

+Referenced by ubixfs_initialize(). +

+

+ +

+
+ + + + + + + + + +
#define UBIXFS_ALIGN (size   )    (size + ((((size) % (UBIXFS_BLOCKSIZE_BYTES)) == 0)? 0 : ((UBIXFS_BLOCKSIZE_BYTES) - ((size) % (UBIXFS_BLOCKSIZE_BYTES)))))
+
+
+ +

+ +

+Definition at line 41 of file ubixfs.h. +

+Referenced by openFileUbixFS(), and ubixfs_loadData(). +

+

+ +

+
+ + + + +
#define UBIXFS_BLOCKSIZE_BYTES   blockSize*512
+
+
+ +

+ +

+Definition at line 40 of file ubixfs.h. +

+Referenced by ubixfs_loadData(), and ubixFSmkDir(). +

+

+


Typedef Documentation

+ +
+
+ + + + +
typedef struct directoryList* dirList_t
+
+
+ +

+ +

+Definition at line 65 of file ubixfs.h. +

+

+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
int addDirEntry (struct directoryEntry dir,
fileDescriptor fd 
)
+
+
+ +

+ +

+Definition at line 66 of file directory.c. +

+References kmalloc(), kprintf(), memcpy(), fileDescriptor::offset, readUbixFS(), fileDescriptor::size, writeUbixFS(), and x1000. +

+Referenced by ubixFSmkDir(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int freeBlocks (int  block,
fileDescriptor fd 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
int getFreeBlocks (int  count,
fileDescriptor fd 
)
+
+ +

+ +

+
+ + + + + + + + + +
int readFile (char *  file  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int readUbixFS (fileDescriptor fd,
char *  data,
uInt32 ,
long  size 
)
+
+
+ +

+ +

+Definition at line 194 of file ubixfs.c. +

+References assert, buffer, fdEof, kpanic(), NULL, and fileDescriptor::size. +

+Referenced by addDirEntry(), and ubixfs_init(). +

+

+ +

+
+ + + + + + + + + +
void syncBat (vfs_mountPoint_t mp  ) 
+
+ +

+ +

+
+ + + + + + + + +
int ubixfs_init (  ) 
+
+ +

+ +

+
+ + + + + + + + +
int ubixfs_initialize (  ) 
+
+
+ +

+ +

+Referenced by ubixfs_init(). +

+

+ +

+
+ + + + + + + + +
void ubixfs_thread (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
dirList_t ubixFSLoadDir (char *   ) 
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
int ubixFSmkDir (char *  dir,
fileDescriptor fd 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
void ubixFSUnlink (char *  path,
vfs_mountPoint_t mp 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int writeFileByte (int  ch,
fileDescriptor fd,
long  offset 
)
+
+
+ +

+ +

+Definition at line 118 of file ubixfs.c. +

+References assert, ubixFSInfo::blockAllocationTable, fdOpen, fdRead, blockAllocationTableEntry::nextBlock, and NULL. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int writeUbixFS (fileDescriptor fd,
char *  data,
long  offset,
long  size 
)
+
+ +

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/include_2ubixos_2types_8h-source.html b/doc/html/include_2ubixos_2types_8h-source.html new file mode 100644 index 0000000..543c3f7 --- /dev/null +++ b/doc/html/include_2ubixos_2types_8h-source.html @@ -0,0 +1,155 @@ + + +UbixOS V2: src/sys/include/ubixos/types.h Source File + + + + +
+
+
+
+ +

types.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _TYPES_H
+00031 #define _TYPES_H
+00032 
+00033 #include <sys/_types.h>
+00034 
+00035 #ifndef NULL
+00036 #define NULL 0x0
+00037 #endif
+00038 
+00039 typedef unsigned char  uInt8;
+00040 typedef unsigned short uInt16;
+00041 typedef unsigned int   uInt32;
+00042 typedef unsigned int   uInt;
+00043 typedef char Int8;
+00044 typedef short Int16;
+00045 typedef long Int32;
+00046 
+00047 typedef __uint8_t       u_int8_t;       /* unsigned integrals (deprecated) */
+00048 typedef __uint16_t      u_int16_t;
+00049 typedef __uint32_t      u_int32_t;
+00050 typedef __uint64_t      u_int64_t;
+00051 //typedef long long int quad_t;
+00052 typedef __uint64_t      quad_t;
+00053 
+00054 typedef unsigned char   u_char;
+00055 typedef unsigned short  u_short;
+00056 typedef unsigned int    u_int;
+00057 typedef unsigned long   u_long;
+00058 
+00059 
+00060 typedef int pidType;
+00061 
+00062 typedef int  pid_t;
+00063 typedef int size_t; /* standart */
+00064 
+00065 #ifndef NOBOOL
+00066 #ifndef __cplusplus
+00067 typedef enum { FALSE=0,TRUE=1 } bool;
+00068 #endif
+00069 #endif
+00070 
+00071 #ifndef _INO_T_DECLARED
+00072 typedef __ino_t         ino_t;          /* inode number */
+00073 #define _INO_T_DECLARED
+00074 #endif
+00075 
+00076 #ifndef _INT8_T_DECLARED
+00077 typedef __int8_t        int8_t;
+00078 #define _INT8_T_DECLARED
+00079 #endif
+00080 
+00081 #ifndef _INT16_T_DECLARED
+00082 typedef __int16_t       int16_t;
+00083 #define _INT16_T_DECLARED
+00084 #endif
+00085 
+00086 #ifndef _INT32_T_DECLARED
+00087 typedef __int32_t       int32_t;
+00088 #define _INT32_T_DECLARED
+00089 #endif
+00090 
+00091 #ifndef _INT64_T_DECLARED
+00092 typedef __int64_t       int64_t;
+00093 #define _INT64_T_DECLARED
+00094 #endif
+00095 
+00096 typedef __ssize_t       ssize_t;
+00097 typedef char *          caddr_t;
+00098 typedef __int64_t       off_t;
+00099 typedef __uint32_t      vm_offset_t;
+00100 
+00101 typedef __uid_t         uid_t;          /* user id */
+00102 typedef __gid_t         gid_t;          /* group id */
+00103 typedef __blkcnt_t      blkcnt_t;
+00104 typedef __blksize_t     blksize_t;
+00105 typedef __fflags_t      fflags_t;
+00106 
+00107 #ifndef _TIME_T_DECLARED
+00108 typedef __time_t        time_t;
+00109 #define _TIME_T_DECLARED
+00110 #endif
+00111 
+00112 
+00113 #endif
+00114 
+00115 /***
+00116  END
+00117  ***/
+00118 
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/include_2ubixos_2types_8h.html b/doc/html/include_2ubixos_2types_8h.html new file mode 100644 index 0000000..81f1b24 --- /dev/null +++ b/doc/html/include_2ubixos_2types_8h.html @@ -0,0 +1,745 @@ + + +UbixOS V2: src/sys/include/ubixos/types.h File Reference + + + + +
+
+
+
+ +

types.h File Reference

+

+#include <sys/_types.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Defines

#define NULL   0x0

Typedefs

typedef __blkcnt_t blkcnt_t
typedef __blksize_t blksize_t
typedef char * caddr_t
typedef __fflags_t fflags_t
typedef __gid_t gid_t
typedef __ino_t ino_t
typedef short Int16
typedef __int16_t int16_t
typedef long Int32
typedef __int32_t int32_t
typedef __int64_t int64_t
typedef char Int8
typedef __int8_t int8_t
typedef __int64_t off_t
typedef int pid_t
typedef int pidType
typedef __uint64_t quad_t
typedef int size_t
typedef __ssize_t ssize_t
typedef __time_t time_t
typedef unsigned char u_char
typedef unsigned int u_int
typedef __uint16_t u_int16_t
typedef __uint32_t u_int32_t
typedef __uint64_t u_int64_t
typedef __uint8_t u_int8_t
typedef unsigned long u_long
typedef unsigned short u_short
typedef __uid_t uid_t
typedef unsigned int uInt
typedef unsigned short uInt16
typedef unsigned int uInt32
typedef unsigned char uInt8
typedef __uint32_t vm_offset_t

Enumerations

enum  bool { FALSE = 0, +TRUE = 1 + }
+


Define Documentation

+ +
+
+ + + + +
#define NULL   0x0
+
+
+ +

+ +

+Definition at line 36 of file types.h. +

+

+


Typedef Documentation

+ +
+
+ + + + +
typedef __blkcnt_t blkcnt_t
+
+
+ +

+ +

+Definition at line 103 of file types.h. +

+

+ +

+
+ + + + +
typedef __blksize_t blksize_t
+
+
+ +

+ +

+Definition at line 104 of file types.h. +

+

+ +

+
+ + + + +
typedef char* caddr_t
+
+
+ +

+ +

+Definition at line 97 of file types.h. +

+

+ +

+
+ + + + +
typedef __fflags_t fflags_t
+
+
+ +

+ +

+Definition at line 105 of file types.h. +

+

+ +

+
+ + + + +
typedef __gid_t gid_t
+
+
+ +

+ +

+Definition at line 102 of file types.h. +

+

+ +

+
+ + + + +
typedef __ino_t ino_t
+
+
+ +

+ +

+Definition at line 72 of file types.h. +

+

+ +

+
+ + + + +
typedef short Int16
+
+
+ +

+ +

+Definition at line 44 of file types.h. +

+

+ +

+
+ + + + +
typedef __int16_t int16_t
+
+
+ +

+ +

+Definition at line 82 of file types.h. +

+

+ +

+
+ + + + +
typedef long Int32
+
+
+ +

+ +

+Definition at line 45 of file types.h. +

+

+ +

+
+ + + + +
typedef __int32_t int32_t
+
+
+ +

+ +

+Definition at line 87 of file types.h. +

+

+ +

+
+ + + + +
typedef __int64_t int64_t
+
+
+ +

+ +

+Definition at line 92 of file types.h. +

+

+ +

+
+ + + + +
typedef char Int8
+
+
+ +

+ +

+Definition at line 43 of file types.h. +

+

+ +

+
+ + + + +
typedef __int8_t int8_t
+
+
+ +

+ +

+Definition at line 77 of file types.h. +

+

+ +

+
+ + + + +
typedef __int64_t off_t
+
+
+ +

+ +

+Definition at line 98 of file types.h. +

+

+ +

+
+ + + + +
typedef int pid_t
+
+
+ +

+ +

+Definition at line 62 of file types.h. +

+

+ +

+
+ + + + +
typedef int pidType
+
+
+ +

+ +

+Definition at line 60 of file types.h. +

+

+ +

+
+ + + + +
typedef __uint64_t quad_t
+
+
+ +

+ +

+Definition at line 52 of file types.h. +

+

+ +

+
+ + + + +
typedef int size_t
+
+
+ +

+ +

+Definition at line 63 of file types.h. +

+

+ +

+
+ + + + +
typedef __ssize_t ssize_t
+
+
+ +

+ +

+Definition at line 96 of file types.h. +

+

+ +

+
+ + + + +
typedef __time_t time_t
+
+
+ +

+ +

+Definition at line 108 of file types.h. +

+

+ +

+
+ + + + +
typedef unsigned char u_char
+
+
+ +

+ +

+Definition at line 54 of file types.h. +

+

+ +

+
+ + + + +
typedef unsigned int u_int
+
+
+ +

+ +

+Definition at line 56 of file types.h. +

+

+ +

+
+ + + + +
typedef __uint16_t u_int16_t
+
+
+ +

+ +

+Definition at line 48 of file types.h. +

+

+ +

+
+ + + + +
typedef __uint32_t u_int32_t
+
+
+ +

+ +

+Definition at line 49 of file types.h. +

+

+ +

+
+ + + + +
typedef __uint64_t u_int64_t
+
+
+ +

+ +

+Definition at line 50 of file types.h. +

+

+ +

+
+ + + + +
typedef __uint8_t u_int8_t
+
+
+ +

+ +

+Definition at line 47 of file types.h. +

+

+ +

+
+ + + + +
typedef unsigned long u_long
+
+
+ +

+ +

+Definition at line 57 of file types.h. +

+

+ +

+
+ + + + +
typedef unsigned short u_short
+
+
+ +

+ +

+Definition at line 55 of file types.h. +

+

+ +

+
+ + + + +
typedef __uid_t uid_t
+
+
+ +

+ +

+Definition at line 101 of file types.h. +

+

+ +

+
+ + + + +
typedef unsigned int uInt
+
+
+ +

+ +

+Definition at line 42 of file types.h. +

+

+ +

+
+ + + + +
typedef unsigned short uInt16
+
+
+ +

+ +

+Definition at line 40 of file types.h. +

+

+ +

+
+ + + + +
typedef unsigned int uInt32
+
+
+ +

+ +

+Definition at line 41 of file types.h. +

+

+ +

+
+ + + + +
typedef unsigned char uInt8
+
+
+ +

+ +

+Definition at line 39 of file types.h. +

+

+ +

+
+ + + + +
typedef __uint32_t vm_offset_t
+
+
+ +

+ +

+Definition at line 99 of file types.h. +

+

+


Enumeration Type Documentation

+ +
+
+ + + + +
enum bool
+
+
+ +

+

Enumerator:
+ + + +
FALSE  +
TRUE  +
+
+ +

+Definition at line 67 of file types.h. +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/include_2vfs_2file_8h-source.html b/doc/html/include_2vfs_2file_8h-source.html new file mode 100644 index 0000000..287fc70 --- /dev/null +++ b/doc/html/include_2vfs_2file_8h-source.html @@ -0,0 +1,131 @@ + + +UbixOS V2: src/sys/include/vfs/file.h Source File + + + + +
+
+
+
+ +

file.h

Go to the documentation of this file.
00001 /**************************************************************************************
+00002  Copyright (c) 2002 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+00006 
+00007 Redistributions of source code must retain the above copyright notice, this list of conditions, the following disclaimer and the list of authors.
+00008 Redistributions in binary form must reproduce the above copyright notice, this list of conditions, the following disclaimer and the list of authors
+00009 in the documentation and/or other materials provided with the distribution. Neither the name of the UbixOS Project nor the names of its
+00010 contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+00011 
+00012 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
+00013 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+00014 PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+00015 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+00016 GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+00017 OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+00018 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00019 
+00020  $Id$
+00021 
+00022 **************************************************************************************/
+00023 
+00024 #ifndef _FILE_H
+00025 #define _FILE_H
+00026 
+00027 #include <ubixos/types.h>
+00028 #include <ubixfs/dirCache.h>
+00029 #include <vfs/mount.h>
+00030 
+00031 #define SEEK_SET 0x0
+00032 
+00033 #define VBLKSHIFT       12
+00034 #define VBLKSIZE        (1 << VBLKSHIFT)
+00035 #define SBLOCKSIZE      8192
+00036 #define      DEV_BSHIFT      9               /* log2(DEV_BSIZE) */
+00037 #define      DEV_BSIZE       (1<<DEV_BSHIFT)
+00038 
+00039 struct dmadat {
+00040   char blkbuf[VBLKSIZE];  /* filesystem blocks */
+00041   char indbuf[VBLKSIZE];  /* indir blocks */
+00042   char sbbuf[SBLOCKSIZE]; /* superblock */
+00043   char secbuf[DEV_BSIZE]; /* for MBR/disklabel */
+00044   };
+00045 
+00046 typedef struct fileDescriptorStruct {
+00047   struct fileDescriptorStruct *prev;
+00048   struct fileDescriptorStruct *next;
+00049   vfs_mountPoint_t            *mp;
+00050   uInt16                       status;
+00051   uInt16                       mode;
+00052   uInt32                       offset;
+00053   uInt32                       size;
+00054   uInt16                       length;
+00055   uInt32                       start;
+00056   char                         fileName[512];
+00057   char                        *buffer;
+00058   uInt32                       ino;
+00059   struct cacheNode            *cacheNode;
+00060   uInt32                       perms;
+00061   struct dmadat               *dmadat;
+00062   int                          dsk_meta;
+00063   uInt32                       resid;
+00064   } fileDescriptor;
+00065 
+00066   
+00067 typedef struct userFileDescriptorStruct {
+00068   struct fileDescriptorStruct *fd;
+00069   uInt32                       fdSize;
+00070   } userFileDescriptor;
+00071 
+00072 extern fileDescriptor *fdTable;
+00073 
+00074 fileDescriptor *fopen(const char *,const char *);
+00075 int             fclose(fileDescriptor *);
+00076 
+00077 /* UBU */
+00078 
+00079 
+00080 int unlink(const char *path);
+00081 int feof(fileDescriptor *fd);
+00082 int fgetc(fileDescriptor *fd);
+00083 size_t fread(void *ptr, size_t size, size_t nmemb,fileDescriptor *fd);
+00084 size_t fwrite(void *ptr,int size,int nmemb,fileDescriptor *fd);
+00085 int fseek(fileDescriptor *,long,int);
+00086 
+00087 void sysFseek(userFileDescriptor *,long,int);
+00088 
+00089 //Good
+00090 void sysChDir(const char *path);
+00091 void chDir(const char *path);
+00092 char *verifyDir(const char *path);
+00093 
+00094 #endif
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/include_2vfs_2file_8h.html b/doc/html/include_2vfs_2file_8h.html new file mode 100644 index 0000000..dec36d7 --- /dev/null +++ b/doc/html/include_2vfs_2file_8h.html @@ -0,0 +1,634 @@ + + +UbixOS V2: src/sys/include/vfs/file.h File Reference + + + + +
+
+
+
+ +

file.h File Reference

+

+#include <ubixos/types.h>
+#include <ubixfs/dirCache.h>
+#include <vfs/mount.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  dmadat
struct  fileDescriptorStruct
struct  userFileDescriptorStruct

Defines

#define DEV_BSHIFT   9
#define DEV_BSIZE   (1<<DEV_BSHIFT)
#define SBLOCKSIZE   8192
#define SEEK_SET   0x0
#define VBLKSHIFT   12
#define VBLKSIZE   (1 << VBLKSHIFT)

Typedefs

typedef fileDescriptorStruct fileDescriptor
typedef userFileDescriptorStruct userFileDescriptor

Functions

void chDir (const char *path)
int fclose (fileDescriptor *)
int feof (fileDescriptor *fd)
int fgetc (fileDescriptor *fd)
fileDescriptorfopen (const char *, const char *)
size_t fread (void *ptr, size_t size, size_t nmemb, fileDescriptor *fd)
int fseek (fileDescriptor *, long, int)
size_t fwrite (void *ptr, int size, int nmemb, fileDescriptor *fd)
void sysChDir (const char *path)
void sysFseek (userFileDescriptor *, long, int)
int unlink (const char *path)
char * verifyDir (const char *path)

Variables

fileDescriptorfdTable
+


Define Documentation

+ +
+
+ + + + +
#define DEV_BSHIFT   9
+
+
+ +

+ +

+Definition at line 36 of file file.h. +

+

+ +

+
+ + + + +
#define DEV_BSIZE   (1<<DEV_BSHIFT)
+
+
+ +

+ +

+Definition at line 37 of file file.h. +

+

+ +

+
+ + + + +
#define SBLOCKSIZE   8192
+
+
+ +

+ +

+Definition at line 35 of file file.h. +

+

+ +

+
+ + + + +
#define SEEK_SET   0x0
+
+
+ +

+ +

+Definition at line 31 of file file.h. +

+Referenced by DiskFS::read(), and DiskFS::write(). +

+

+ +

+
+ + + + +
#define VBLKSHIFT   12
+
+
+ +

+ +

+Definition at line 33 of file file.h. +

+Referenced by fsread(). +

+

+ +

+
+ + + + +
#define VBLKSIZE   (1 << VBLKSHIFT)
+
+
+ +

+ +

+Definition at line 34 of file file.h. +

+Referenced by fsread(). +

+

+


Typedef Documentation

+ +
+
+ + + + +
typedef struct fileDescriptorStruct fileDescriptor
+
+
+ +

+ +

+

+ +

+
+ + + + +
typedef struct userFileDescriptorStruct userFileDescriptor
+
+
+ +

+ +

+

+


Function Documentation

+ +
+
+ + + + + + + + + +
void chDir (const char *  path  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
int fclose (fileDescriptor  ) 
+
+ +

+ +

+
+ + + + + + + + + +
int feof (fileDescriptor fd  ) 
+
+
+ +

+ +

+Definition at line 213 of file file.c. +

+References fdEof. +

+

+ +

+
+ + + + + + + + + +
int fgetc (fileDescriptor fd  ) 
+
+
+ +

+ +

+Definition at line 244 of file file.c. +

+References fileDescriptor::offset. +

+Referenced by sysFgetc(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
fileDescriptor* fopen (const char * ,
const char *  
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
size_t fread (void *  ptr,
size_t  size,
size_t  nmemb,
fileDescriptor fd 
)
+
+
+ +

+ +

+Definition at line 178 of file file.c. +

+References assert, and fileDescriptor::offset. +

+Referenced by dev_ramDrive(), execFile(), kmod_load(), ldEnable(), DiskFS::read(), sysExec(), and sysFread(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int fseek (fileDescriptor,
long ,
int  
)
+
+
+ +

+ +

+Definition at line 201 of file file.c. +

+References fileDescriptor::offset. +

+Referenced by execFile(), kmod_load(), ldEnable(), DiskFS::read(), sysExec(), and DiskFS::write(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
size_t fwrite (void *  ptr,
int  size,
int  nmemb,
fileDescriptor fd 
)
+
+
+ +

+ +

+Definition at line 193 of file file.c. +

+References fileDescriptor::offset. +

+Referenced by dev_ramDestroy(), bTree::Save(), sysFwrite(), and DiskFS::write(). +

+

+ +

+
+ + + + + + + + + +
void sysChDir (const char *  path  ) 
+
+
+ +

+ +

+Definition at line 102 of file file.c. +

+References _current, osInfo::cwd, taskStruct::oInfo, sprintf(), and strstr(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void sysFseek (userFileDescriptor,
long ,
int  
)
+
+
+ +

+ +

+Definition at line 92 of file file.c. +

+References userFileDescriptorStruct::fd, NULL, and fileDescriptorStruct::offset. +

+

+ +

+
+ + + + + + + + + +
int unlink (const char *  path  ) 
+
+
+ +

+ +

+Definition at line 478 of file file.c. +

+References vfs_mountPoint::fs, NULL, strtok(), vfs_findMount(), and fileSystem::vfsUnlink. +

+Referenced by sysUnlink(). +

+

+ +

+
+ + + + + + + + + +
char* verifyDir (const char *  path  ) 
+
+
+ +

+ +

+

+


Variable Documentation

+ +
+
+ + + + +
fileDescriptor* fdTable
+
+
+ +

+ +

+Definition at line 45 of file file.c. +

+Referenced by fclose(), and fopen(). +

+

+


Generated on Sun Dec 3 02:38:08 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/include_2vfs_2vfs_8h-source.html b/doc/html/include_2vfs_2vfs_8h-source.html new file mode 100644 index 0000000..9a5297a --- /dev/null +++ b/doc/html/include_2vfs_2vfs_8h-source.html @@ -0,0 +1,136 @@ + + +UbixOS V2: src/sys/include/vfs/vfs.h Source File + + + + +
+
+
+
+ +

vfs.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _VFS_H
+00031 #define _VFS_H
+00032 
+00033 #include <ubixos/types.h>
+00034 #include <vfs/file.h>
+00035 #include <vfs/mount.h>
+00036 
+00037 #define maxFd   32
+00038 #define fdAvail 1
+00039 #define fdOpen  2
+00040 #define fdRead  3
+00041 #define fdEof   4
+00042 
+00043 
+00044 #define fileRead    0x0001
+00045 #define fileWrite   0x0002
+00046 #define fileBinary  0x0004
+00047 #define fileAppend  0x0008
+00048 
+00049 struct fileSystem {
+00050   struct fileSystem *prev;
+00051   struct fileSystem *next;
+00052   int               (*vfsInitFS)(void *);
+00053   int               (*vfsRead)(void *,char *,long,long);
+00054   int               (*vfsWrite)(void *,char *,long,long);
+00055   int               (*vfsOpenFile)(void *,void *);
+00056   int               (*vfsUnlink)(char *,void *);
+00057   int               (*vfsMakeDir)(char *,void *);
+00058   int               (*vfsRemDir)(char *);
+00059   int               (*vfsSync)(void);
+00060   int               vfsType;
+00061   };
+00062 
+00063 
+00064 /* VFS Functions */
+00065 int vfs_init();
+00066 /*
+00067  *int vfsRegisterFS(int,void *,void *,void *,void *,void *,void *,void *,void *);
+00068 */
+00069 int vfsRegisterFS(struct fileSystem);
+00070 
+00071 struct fileSystem *vfsFindFS(int);
+00072 
+00073 
+00074 
+00075 //File IO
+00076 fileDescriptor *fopen(const char *file,const char *flags);
+00077 
+00078 
+00079 #endif
+00080 
+00081 /***
+00082  $Log$
+00083  Revision 1.1.1.1  2006/06/01 12:46:13  reddawg
+00084  ubix2
+00085 
+00086  Revision 1.2  2005/10/12 00:13:37  reddawg
+00087  Removed
+00088 
+00089  Revision 1.1.1.1  2005/09/26 17:23:58  reddawg
+00090  no message
+00091 
+00092  Revision 1.5  2004/07/23 09:10:06  reddawg
+00093  ubixfs: cleaned up some functions played with the caching a bit
+00094  vfs:    renamed a bunch of functions
+00095  cleaned up a few misc bugs
+00096 
+00097  END
+00098  ***/
+00099  
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/include_2vfs_2vfs_8h.html b/doc/html/include_2vfs_2vfs_8h.html new file mode 100644 index 0000000..9546703 --- /dev/null +++ b/doc/html/include_2vfs_2vfs_8h.html @@ -0,0 +1,355 @@ + + +UbixOS V2: src/sys/include/vfs/vfs.h File Reference + + + + +
+
+
+
+ +

vfs.h File Reference

+

+#include <ubixos/types.h>
+#include <vfs/file.h>
+#include <vfs/mount.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  fileSystem

Defines

#define fdAvail   1
#define fdEof   4
#define fdOpen   2
#define fdRead   3
#define fileAppend   0x0008
#define fileBinary   0x0004
#define fileRead   0x0001
#define fileWrite   0x0002
#define maxFd   32

Functions

fileDescriptorfopen (const char *file, const char *flags)
int vfs_init ()
fileSystemvfsFindFS (int)
int vfsRegisterFS (struct fileSystem)
+


Define Documentation

+ +
+
+ + + + +
#define fdAvail   1
+
+
+ +

+ +

+Definition at line 38 of file vfs.h. +

+

+ +

+
+ + + + +
#define fdEof   4
+
+
+ +

+ +

+Definition at line 41 of file vfs.h. +

+Referenced by feof(), and readUbixFS(). +

+

+ +

+
+ + + + +
#define fdOpen   2
+
+
+ +

+ +

+Definition at line 39 of file vfs.h. +

+Referenced by fopen(), and writeFileByte(). +

+

+ +

+
+ + + + +
#define fdRead   3
+
+
+ +

+ +

+Definition at line 40 of file vfs.h. +

+Referenced by writeFileByte(). +

+

+ +

+
+ + + + +
#define fileAppend   0x0008
+
+
+ +

+ +

+Definition at line 47 of file vfs.h. +

+Referenced by fopen(). +

+

+ +

+
+ + + + +
#define fileBinary   0x0004
+
+
+ +

+ +

+Definition at line 46 of file vfs.h. +

+Referenced by fopen(). +

+

+ +

+
+ + + + +
#define fileRead   0x0001
+
+
+ +

+ +

+Definition at line 44 of file vfs.h. +

+Referenced by fopen(), and openFileUbixFS(). +

+

+ +

+
+ + + + +
#define fileWrite   0x0002
+
+
+ +

+ +

+Definition at line 45 of file vfs.h. +

+Referenced by fopen(), and openFileUbixFS(). +

+

+ +

+
+ + + + +
#define maxFd   32
+
+
+ +

+ +

+Definition at line 37 of file vfs.h. +

+

+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
fileDescriptor* fopen (const char *  file,
const char *  flags 
)
+
+ +

+ +

+
+ + + + + + + + +
int vfs_init (  ) 
+
+
+ +

+ +

+Definition at line 47 of file vfs.c. +

+References kprintf(), and systemVitals. +

+

+ +

+
+ + + + + + + + + +
struct fileSystem* vfsFindFS (int   ) 
+
+
+ +

+ +

+Definition at line 58 of file vfs.c. +

+References fileSystem::next, systemVitals, and fileSystem::vfsType. +

+Referenced by vfs_mount(), and vfsRegisterFS(). +

+

+ +

+
+ + + + + + + + + +
int vfsRegisterFS (struct  fileSystem  ) 
+
+
+ +

+ +

+Definition at line 73 of file vfs.c. +

+References kmalloc(), kprintf(), memcpy(), fileSystem::next, NULL, fileSystem::prev, systemVitals, vfsFindFS(), fileSystem::vfsType, and x1. +

+Referenced by devfs_init(), ubixfs_init(), and ufs_init(). +

+

+


Generated on Sun Dec 3 02:38:08 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/index.html b/doc/html/index.html new file mode 100644 index 0000000..0f8fbe7 --- /dev/null +++ b/doc/html/index.html @@ -0,0 +1,8 @@ + + +UbixOS V2 + + + + + diff --git a/doc/html/init_8c-source.html b/doc/html/init_8c-source.html new file mode 100644 index 0000000..5f764a2 --- /dev/null +++ b/doc/html/init_8c-source.html @@ -0,0 +1,141 @@ + + +UbixOS V2: src/sys/net/net/init.c Source File + + + + +
+
+
+
+ +

init.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005 Redistribution and use in source and binary forms, with or without modification, are
+00006 permitted provided that the following conditions are met:
+00007 
+00008 Redistributions of source code must retain the above copyright notice, this list of
+00009 conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010 form must reproduce the above copyright notice, this list of conditions, the following
+00011 disclaimer and the list of authors in the documentation and/or other materials provided
+00012 with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013 contributors may be used to endorse or promote products derived from this software
+00014 without specific prior written permission.
+00015 
+00016 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019 THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021 OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023 TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <ubixos/types.h>
+00031 #include <ubixos/sched.h>
+00032 #include <ubixos/endtask.h>
+00033 
+00034 #include <net/sys.h>
+00035 #include <net/mem.h>
+00036 #include <net/memp.h>
+00037 #include <net/tcpip.h>
+00038 
+00039 #include <netif/loopif.h>
+00040 #include <netif/tcpdump.h>
+00041 #include <netif/ethernetif.h>
+00042 
+00043 #include <ubixos/exec.h>
+00044 #include <lib/kmalloc.h>
+00045 #include <lib/kprintf.h>
+00046 
+00047 void netMainThread();
+00048 static void tcpip_init_done(void *arg);
+00049 
+00050 int net_init() {
+00051   sys_init();
+00052   mem_init();
+00053   memp_init();
+00054   pbuf_init();
+00055 
+00056   /*
+00057   *thread = (void *)execThread((void *)start_routine,0x0,arg);
+00058   */
+00059   
+00060   sys_thread_new((void *)(netMainThread), 0x0);
+00061 
+00062   return(0x0);
+00063   }
+00064 
+00065 
+00066 void netMainThread() {
+00067   struct ip_addr ipaddr, netmask, gw;
+00068   sys_sem_t sem;
+00069  
+00070   netif_init();
+00071   sem = sys_sem_new(0);
+00072   tcpip_init(tcpip_init_done, &sem);
+00073   sys_sem_wait(sem);
+00074   sys_sem_free(sem);
+00075 
+00076   kprintf("TCP/IP initialized.\n");
+00077 
+00078   IP4_ADDR(&gw, 10,4,0,1);
+00079   IP4_ADDR(&ipaddr, 10,4,0,69);
+00080   IP4_ADDR(&netmask, 255,255,255,0);
+00081   netif_set_default(netif_add(&ipaddr, &netmask, &gw, ethernetif_init, tcpip_input));
+00082 
+00083   IP4_ADDR(&gw, 127,0,0,1);
+00084   IP4_ADDR(&ipaddr, 127,0,0,1);
+00085   IP4_ADDR(&netmask, 255,0,0,0);
+00086   netif_add(&ipaddr, &netmask, &gw, loopif_init, tcpip_input);
+00087 
+00088   //udpecho_init();
+00089   shell_init();
+00090   //bot_init();
+00091   endTask(_current->id);
+00092   }
+00093 
+00094 
+00095 static void tcpip_init_done(void *arg) {
+00096   sys_sem_t *sem = 0x0;
+00097   sem = arg;
+00098   sys_sem_signal(*sem);
+00099   }
+00100 
+00101 /***
+00102  END
+00103  ***/
+00104 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/init_8c.html b/doc/html/init_8c.html new file mode 100644 index 0000000..1cad5fb --- /dev/null +++ b/doc/html/init_8c.html @@ -0,0 +1,137 @@ + + +UbixOS V2: src/sys/net/net/init.c File Reference + + + + +
+
+
+
+ +

init.c File Reference

+

+#include <ubixos/types.h>
+#include <ubixos/sched.h>
+#include <ubixos/endtask.h>
+#include <net/sys.h>
+#include <net/mem.h>
+#include <net/memp.h>
+#include <net/tcpip.h>
+#include <netif/loopif.h>
+#include <netif/tcpdump.h>
+#include <netif/ethernetif.h>
+#include <ubixos/exec.h>
+#include <lib/kmalloc.h>
+#include <lib/kprintf.h>
+ +

+Go to the source code of this file. + + + + + + + + +

Functions

int net_init ()
void netMainThread ()
static void tcpip_init_done (void *arg)
+


Function Documentation

+ +
+
+ + + + + + + + +
int net_init (  ) 
+
+
+ +

+ +

+Definition at line 50 of file init.c. +

+References mem_init(), memp_init(), netMainThread(), pbuf_init(), sys_init(), and sys_thread_new(). +

+

+ +

+
+ + + + + + + + +
void netMainThread (  ) 
+
+ +

+ +

+
+ + + + + + + + + +
static void tcpip_init_done (void *  arg  )  [static]
+
+
+ +

+ +

+Definition at line 95 of file init.c. +

+References sys_sem_signal(). +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/io_8c-source.html b/doc/html/io_8c-source.html new file mode 100644 index 0000000..b2f3118 --- /dev/null +++ b/doc/html/io_8c-source.html @@ -0,0 +1,183 @@ + + +UbixOS V2: src/sys/sys/io.c Source File + + + + +
+
+
+
+ +

io.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2005 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <sys/io.h>
+00031 
+00032 /************************************************************************
+00033 
+00034 Function: inline unsigned char inportByte(unsigned int port);
+00035 Description: This Funciton Will Input One Byte From A Port
+00036 Notes:
+00037 
+00038 ************************************************************************/
+00039 unsigned char inportByte(unsigned int port) {
+00040   unsigned char retVal;
+00041   asm volatile(
+00042     "inb %%dx,%%al"
+00043     : "=a" (retVal)
+00044     : "d" (port)
+00045     );
+00046   return(retVal);
+00047   }
+00048 
+00049 /************************************************************************
+00050 
+00051 Function: inline unsigned char inportWord(unsigned int port);
+00052 Description: This Funciton Will Input One Word From A Port
+00053 Notes:
+00054 
+00055 ************************************************************************/  
+00056 unsigned short inportWord(unsigned int port) {
+00057   unsigned short retVal;
+00058   asm volatile(
+00059     "inw %%dx,%%ax"
+00060     : "=a" (retVal)
+00061     : "d" (port)
+00062     );
+00063   return(retVal);
+00064   }
+00065 
+00066 /************************************************************************
+00067 
+00068 Function: inline void outportByte(unsigned int port,unsigned char value);
+00069 Description: This Funciton Will Outputut One Byte To A Port
+00070 Notes:
+00071 
+00072 ************************************************************************/
+00073 void outportByte(unsigned int port,unsigned char value) {
+00074   asm volatile(
+00075     "outb %%al,%%dx"
+00076     :
+00077     : "d" (port), "a" (value)
+00078     );
+00079   }
+00080 
+00081 /************************************************************************
+00082 
+00083 Function: inline void outportByteP(unsigned int port,unsigned char value);
+00084 Description: This Funciton Will Outputut One Byte To A Port With A Delay
+00085 Notes:
+00086 
+00087 ************************************************************************/
+00088 void outportByteP(unsigned int port,unsigned char value) {
+00089   asm volatile(
+00090     "outb %%al,%%dx\n"
+00091     "outb %%al,$0x80\n"
+00092     :
+00093     : "d" (port), "a" (value)
+00094     );
+00095   }  
+00096 
+00097 /************************************************************************
+00098 
+00099 Function: inline void outportWord(unsigned int port,unsigned char value);
+00100 Description: This Funciton Will Outputut One Word To A Port
+00101 Notes:
+00102 
+00103 ************************************************************************/
+00104 void outportWord(unsigned int port,unsigned short value) {
+00105   asm volatile(
+00106     "outw %%ax,%%dx"
+00107     :
+00108     : "d" (port), "a" (value)
+00109     );
+00110   }
+00111 
+00112 /************************************************************************
+00113 
+00114 Function: inline void outportDWord(unsigned int port,unsigned char value);
+00115 Description: This Funciton Will Outputut One DWord To A Port
+00116 Notes:
+00117 
+00118 ************************************************************************/
+00119 void outportDWord(unsigned int port,unsigned long value) {
+00120   asm volatile(
+00121     "outl %%eax,%%dx"
+00122     :
+00123     : "d" (port), "a" (value)
+00124     );
+00125   }
+00126 
+00127 /************************************************************************
+00128 
+00129 Function: inline unsigned char inportDWord(unsigned int port);
+00130 Description: This Funciton Will Input One DWord From A Port
+00131 Notes:
+00132 
+00133 ************************************************************************/
+00134 unsigned long inportDWord(unsigned int port) {
+00135   unsigned long retVal;
+00136   asm volatile(
+00137     "inl %%dx,%%eax"
+00138     : "=a" (retVal)
+00139     : "d" (port)
+00140     );
+00141   return(retVal);
+00142   }
+00143 
+00144 /***
+00145  END
+00146  ***/
+

Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/io_8c.html b/doc/html/io_8c.html new file mode 100644 index 0000000..dbd190f --- /dev/null +++ b/doc/html/io_8c.html @@ -0,0 +1,265 @@ + + +UbixOS V2: src/sys/sys/io.c File Reference + + + + +
+
+
+
+ +

io.c File Reference

+

+#include <sys/io.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + +

Functions

unsigned char inportByte (unsigned int port)
unsigned long inportDWord (unsigned int port)
unsigned short inportWord (unsigned int port)
void outportByte (unsigned int port, unsigned char value)
void outportByteP (unsigned int port, unsigned char value)
void outportDWord (unsigned int port, unsigned long value)
void outportWord (unsigned int port, unsigned short value)
+


Function Documentation

+ +
+
+ + + + + + + + + +
unsigned char inportByte (unsigned int  port  ) 
+
+ +

+ +

+
+ + + + + + + + + +
unsigned long inportDWord (unsigned int  port  ) 
+
+
+ +

+ +

+Definition at line 134 of file io.c. +

+Referenced by pciRead(). +

+

+ +

+
+ + + + + + + + + +
unsigned short inportWord (unsigned int  port  ) 
+
+
+ +

+ +

+Definition at line 56 of file io.c. +

+Referenced by _int13(), getblock(), hdInit(), hdRead(), lanceProbe(), lncInt(), NICtoPC(), pciRead(), readBcr(), and readCsr(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void outportByte (unsigned int  port,
unsigned char  value 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
void outportByteP (unsigned int  port,
unsigned char  value 
)
+
+
+ +

+ +

+Definition at line 88 of file io.c. +

+Referenced by pit_init(), and timeCmosRead(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void outportDWord (unsigned int  port,
unsigned long  value 
)
+
+
+ +

+ +

+Definition at line 119 of file io.c. +

+Referenced by pciRead(), and pciWrite(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void outportWord (unsigned int  port,
unsigned short  value 
)
+
+
+ +

+ +

+Definition at line 104 of file io.c. +

+Referenced by _int13(), hdWrite(), lncInt(), pciWrite(), PCtoNIC(), readBcr(), readCsr(), writeBcr(), and writeCsr(). +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/io_8h-source.html b/doc/html/io_8h-source.html new file mode 100644 index 0000000..f7a96f7 --- /dev/null +++ b/doc/html/io_8h-source.html @@ -0,0 +1,99 @@ + + +UbixOS V2: src/sys/include/sys/io.h Source File + + + + +
+
+
+
+ +

io.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _IO_H
+00031 #define _IO_H
+00032 
+00033 unsigned char inportByte(unsigned int);
+00034 unsigned short inportWord(unsigned int);
+00035 unsigned long  inportDWord(unsigned int);
+00036 void outportByte(unsigned int,unsigned char);
+00037 void outportByteP(unsigned int port,unsigned char value);
+00038 void outportWord(unsigned int,unsigned short);
+00039 void outportDWord(unsigned int port,unsigned long value);
+00040 
+00041 #endif
+00042 
+00043 /***
+00044  $Log$
+00045  Revision 1.1.1.1  2006/06/01 12:46:15  reddawg
+00046  ubix2
+00047 
+00048  Revision 1.2  2005/10/12 00:13:37  reddawg
+00049  Removed
+00050 
+00051  Revision 1.1.1.1  2005/09/26 17:23:52  reddawg
+00052  no message
+00053 
+00054  Revision 1.3  2004/07/22 20:14:34  reddawg
+00055  still working here
+00056 
+00057  Revision 1.2  2004/05/21 15:12:17  reddawg
+00058  Cleaned up
+00059 
+00060 
+00061  END
+00062  ***/
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/io_8h.html b/doc/html/io_8h.html new file mode 100644 index 0000000..e0b2f29 --- /dev/null +++ b/doc/html/io_8h.html @@ -0,0 +1,264 @@ + + +UbixOS V2: src/sys/include/sys/io.h File Reference + + + + +
+
+
+
+ +

io.h File Reference

+

+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + +

Functions

unsigned char inportByte (unsigned int)
unsigned long inportDWord (unsigned int)
unsigned short inportWord (unsigned int)
void outportByte (unsigned int, unsigned char)
void outportByteP (unsigned int port, unsigned char value)
void outportDWord (unsigned int port, unsigned long value)
void outportWord (unsigned int, unsigned short)
+


Function Documentation

+ +
+
+ + + + + + + + + +
unsigned char inportByte (unsigned  int  ) 
+
+ +

+ +

+
+ + + + + + + + + +
unsigned long inportDWord (unsigned  int  ) 
+
+
+ +

+ +

+Definition at line 134 of file io.c. +

+Referenced by pciRead(). +

+

+ +

+
+ + + + + + + + + +
unsigned short inportWord (unsigned  int  ) 
+
+
+ +

+ +

+Definition at line 56 of file io.c. +

+Referenced by _int13(), getblock(), hdInit(), hdRead(), lanceProbe(), lncInt(), NICtoPC(), pciRead(), readBcr(), and readCsr(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void outportByte (unsigned  int,
unsigned  char 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
void outportByteP (unsigned int  port,
unsigned char  value 
)
+
+
+ +

+ +

+Definition at line 88 of file io.c. +

+Referenced by pit_init(), and timeCmosRead(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void outportDWord (unsigned int  port,
unsigned long  value 
)
+
+
+ +

+ +

+Definition at line 119 of file io.c. +

+Referenced by pciRead(), and pciWrite(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void outportWord (unsigned  int,
unsigned  short 
)
+
+
+ +

+ +

+Definition at line 104 of file io.c. +

+Referenced by _int13(), hdWrite(), lncInt(), pciWrite(), PCtoNIC(), readBcr(), readCsr(), writeBcr(), and writeCsr(). +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ipv4_2icmp_8h-source.html b/doc/html/ipv4_2icmp_8h-source.html new file mode 100644 index 0000000..eb5f14e --- /dev/null +++ b/doc/html/ipv4_2icmp_8h-source.html @@ -0,0 +1,141 @@ + + +UbixOS V2: src/sys/include/net/ipv4/icmp.h Source File + + + + +
+
+
+
+ +

icmp.h

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 #ifndef __LWIP_ICMP_H__
+00036 #define __LWIP_ICMP_H__
+00037 
+00038 #include "net/arch.h"
+00039 
+00040 #include "net/opt.h"
+00041 #include "net/pbuf.h"
+00042 
+00043 #include "net/netif.h"
+00044 
+00045 #define ICMP_ER 0      /* echo reply */
+00046 #define ICMP_DUR 3     /* destination unreachable */
+00047 #define ICMP_SQ 4      /* source quench */
+00048 #define ICMP_RD 5      /* redirect */
+00049 #define ICMP_ECHO 8    /* echo */
+00050 #define ICMP_TE 11     /* time exceeded */
+00051 #define ICMP_PP 12     /* parameter problem */
+00052 #define ICMP_TS 13     /* timestamp */
+00053 #define ICMP_TSR 14    /* timestamp reply */
+00054 #define ICMP_IRQ 15    /* information request */
+00055 #define ICMP_IR 16     /* information reply */
+00056 
+00057 enum icmp_dur_type {
+00058   ICMP_DUR_NET = 0,    /* net unreachable */
+00059   ICMP_DUR_HOST = 1,   /* host unreachable */
+00060   ICMP_DUR_PROTO = 2,  /* protocol unreachable */
+00061   ICMP_DUR_PORT = 3,   /* port unreachable */
+00062   ICMP_DUR_FRAG = 4,   /* fragmentation needed and DF set */
+00063   ICMP_DUR_SR = 5      /* source route failed */
+00064 };
+00065 
+00066 enum icmp_te_type {
+00067   ICMP_TE_TTL = 0,     /* time to live exceeded in transit */
+00068   ICMP_TE_FRAG = 1     /* fragment reassembly time exceeded */
+00069 };
+00070 
+00071 void icmp_input(struct pbuf *p, struct netif *inp);
+00072 
+00073 void icmp_dest_unreach(struct pbuf *p, enum icmp_dur_type t);
+00074 void icmp_time_exceeded(struct pbuf *p, enum icmp_te_type t);
+00075 
+00076 struct icmp_echo_hdr {
+00077   PACK_STRUCT_FIELD(uInt16 _type_code);
+00078   PACK_STRUCT_FIELD(uInt16 chksum);
+00079   PACK_STRUCT_FIELD(uInt16 id);
+00080   PACK_STRUCT_FIELD(uInt16 seqno);
+00081 } PACK_STRUCT_STRUCT;
+00082 
+00083 
+00084 
+00085 struct icmp_dur_hdr {
+00086   PACK_STRUCT_FIELD(uInt16 _type_code);
+00087   PACK_STRUCT_FIELD(uInt16 chksum);
+00088   PACK_STRUCT_FIELD(uInt32 unused);
+00089 } PACK_STRUCT_STRUCT;
+00090 
+00091 struct icmp_te_hdr {
+00092   PACK_STRUCT_FIELD(uInt16 _type_code);
+00093   PACK_STRUCT_FIELD(uInt16 chksum);
+00094   PACK_STRUCT_FIELD(uInt32 unused);
+00095 } PACK_STRUCT_STRUCT;
+00096 
+00097 #define ICMPH_TYPE(hdr) (NTOHS((hdr)->_type_code) >> 8)
+00098 #define ICMPH_CODE(hdr) (NTOHS((hdr)->_type_code) & 0xff)
+00099 
+00100 #define ICMPH_TYPE_SET(hdr, type) ((hdr)->_type_code = HTONS(ICMPH_CODE(hdr) | ((type) << 8)))
+00101 #define ICMPH_CODE_SET(hdr, code) ((hdr)->_type_code = HTONS((code) | (ICMPH_TYPE(hdr) << 8)))
+00102 
+00103 #endif /* __LWIP_ICMP_H__ */
+00104           
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ipv4_2icmp_8h.html b/doc/html/ipv4_2icmp_8h.html new file mode 100644 index 0000000..703975e --- /dev/null +++ b/doc/html/ipv4_2icmp_8h.html @@ -0,0 +1,591 @@ + + +UbixOS V2: src/sys/include/net/ipv4/icmp.h File Reference + + + + +
+
+
+
+ +

icmp.h File Reference

+

+#include "net/arch.h"
+#include "net/opt.h"
+#include "net/pbuf.h"
+#include "net/netif.h"
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  icmp_dur_hdr
struct  icmp_echo_hdr
struct  icmp_te_hdr

Defines

#define ICMP_DUR   3
#define ICMP_ECHO   8
#define ICMP_ER   0
#define ICMP_IR   16
#define ICMP_IRQ   15
#define ICMP_PP   12
#define ICMP_RD   5
#define ICMP_SQ   4
#define ICMP_TE   11
#define ICMP_TS   13
#define ICMP_TSR   14
#define ICMPH_CODE(hdr)   (NTOHS((hdr)->_type_code) & 0xff)
#define ICMPH_CODE_SET(hdr, code)   ((hdr)->_type_code = HTONS((code) | (ICMPH_TYPE(hdr) << 8)))
#define ICMPH_TYPE(hdr)   (NTOHS((hdr)->_type_code) >> 8)
#define ICMPH_TYPE_SET(hdr, type)   ((hdr)->_type_code = HTONS(ICMPH_CODE(hdr) | ((type) << 8)))

Enumerations

enum  icmp_dur_type {
+  ICMP_DUR_NET = 0, +ICMP_DUR_HOST = 1, +ICMP_DUR_PROTO = 2, +ICMP_DUR_PORT = 3, +
+  ICMP_DUR_FRAG = 4, +ICMP_DUR_SR = 5 +
+ }
enum  icmp_te_type { ICMP_TE_TTL = 0, +ICMP_TE_FRAG = 1 + }

Functions

void icmp_dest_unreach (struct pbuf *p, enum icmp_dur_type t)
void icmp_input (struct pbuf *p, struct netif *inp)
void icmp_time_exceeded (struct pbuf *p, enum icmp_te_type t)

Variables

icmp_te_hdr PACK_STRUCT_STRUCT
icmp_dur_hdr PACK_STRUCT_STRUCT
icmp_echo_hdr PACK_STRUCT_STRUCT
+


Define Documentation

+ +
+
+ + + + +
#define ICMP_DUR   3
+
+
+ +

+ +

+Definition at line 46 of file icmp.h. +

+

+ +

+
+ + + + +
#define ICMP_ECHO   8
+
+
+ +

+ +

+Definition at line 49 of file icmp.h. +

+

+ +

+
+ + + + +
#define ICMP_ER   0
+
+
+ +

+ +

+Definition at line 45 of file icmp.h. +

+

+ +

+
+ + + + +
#define ICMP_IR   16
+
+
+ +

+ +

+Definition at line 55 of file icmp.h. +

+

+ +

+
+ + + + +
#define ICMP_IRQ   15
+
+
+ +

+ +

+Definition at line 54 of file icmp.h. +

+

+ +

+
+ + + + +
#define ICMP_PP   12
+
+
+ +

+ +

+Definition at line 51 of file icmp.h. +

+

+ +

+
+ + + + +
#define ICMP_RD   5
+
+
+ +

+ +

+Definition at line 48 of file icmp.h. +

+

+ +

+
+ + + + +
#define ICMP_SQ   4
+
+
+ +

+ +

+Definition at line 47 of file icmp.h. +

+

+ +

+
+ + + + +
#define ICMP_TE   11
+
+
+ +

+ +

+Definition at line 50 of file icmp.h. +

+

+ +

+
+ + + + +
#define ICMP_TS   13
+
+
+ +

+ +

+Definition at line 52 of file icmp.h. +

+

+ +

+
+ + + + +
#define ICMP_TSR   14
+
+
+ +

+ +

+Definition at line 53 of file icmp.h. +

+

+ +

+
+ + + + + + + + + +
#define ICMPH_CODE (hdr   )    (NTOHS((hdr)->_type_code) & 0xff)
+
+
+ +

+ +

+Definition at line 98 of file icmp.h. +

+

+ +

+
+ + + + + + + + + + + + +
#define ICMPH_CODE_SET (hdr,
code   )    ((hdr)->_type_code = HTONS((code) | (ICMPH_TYPE(hdr) << 8)))
+
+
+ +

+ +

+Definition at line 101 of file icmp.h. +

+

+ +

+
+ + + + + + + + + +
#define ICMPH_TYPE (hdr   )    (NTOHS((hdr)->_type_code) >> 8)
+
+
+ +

+ +

+Definition at line 97 of file icmp.h. +

+

+ +

+
+ + + + + + + + + + + + +
#define ICMPH_TYPE_SET (hdr,
type   )    ((hdr)->_type_code = HTONS(ICMPH_CODE(hdr) | ((type) << 8)))
+
+
+ +

+ +

+Definition at line 100 of file icmp.h. +

+

+


Enumeration Type Documentation

+ +
+
+ + + + +
enum icmp_dur_type
+
+
+ +

+

Enumerator:
+ + + + + + + +
ICMP_DUR_NET  +
ICMP_DUR_HOST  +
ICMP_DUR_PROTO  +
ICMP_DUR_PORT  +
ICMP_DUR_FRAG  +
ICMP_DUR_SR  +
+
+ +

+Definition at line 57 of file icmp.h. +

+

+ +

+
+ + + + +
enum icmp_te_type
+
+
+ +

+

Enumerator:
+ + + +
ICMP_TE_TTL  +
ICMP_TE_FRAG  +
+
+ +

+Definition at line 66 of file icmp.h. +

+

+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
void icmp_dest_unreach (struct pbuf p,
enum icmp_dur_type  t 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void icmp_input (struct pbuf p,
struct netif inp 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void icmp_time_exceeded (struct pbuf p,
enum icmp_te_type  t 
)
+
+
+ +

+ +

+

+


Variable Documentation

+ +
+
+ + + + +
struct icmp_te_hdr PACK_STRUCT_STRUCT
+
+
+ +

+ +

+

+ +

+
+ + + + +
struct icmp_dur_hdr PACK_STRUCT_STRUCT
+
+
+ +

+ +

+

+ +

+
+ + + + +
struct icmp_echo_hdr PACK_STRUCT_STRUCT
+
+
+ +

+ +

+

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ipv4_2inet_8h-source.html b/doc/html/ipv4_2inet_8h-source.html new file mode 100644 index 0000000..376693a --- /dev/null +++ b/doc/html/ipv4_2inet_8h-source.html @@ -0,0 +1,159 @@ + + +UbixOS V2: src/sys/include/net/ipv4/inet.h Source File + + + + +
+
+
+
+ +

inet.h

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 #ifndef __LWIP_INET_H__
+00036 #define __LWIP_INET_H__
+00037 
+00038 #include "net/arch.h"
+00039 
+00040 #include "net/opt.h"
+00041 #include "net/pbuf.h"
+00042 #include "net/ipv4/ip_addr.h"
+00043 
+00044 uInt16 inet_chksum(void *dataptr, uInt16 len);
+00045 uInt16 inet_chksum_pbuf(struct pbuf *p);
+00046 uInt16 inet_chksum_pseudo(struct pbuf *p,
+00047                          struct ip_addr *src, struct ip_addr *dest,
+00048                          uInt8 proto, uInt16 proto_len);
+00049 
+00050 #ifdef HTONS
+00051 #undef HTONS
+00052 #endif /* HTONS */
+00053 #ifdef NTOHS
+00054 #undef NTOHS
+00055 #endif /* NTOHS */
+00056 #ifdef HTONL
+00057 #undef HTONL
+00058 #endif /* HTONL */
+00059 #ifdef NTOHL
+00060 #undef NTOHL
+00061 #endif /* NTOHL */
+00062 
+00063 #ifndef HTONS
+00064 #   if BYTE_ORDER == BIG_ENDIAN
+00065 #      define HTONS(n) (n)
+00066 #      define htons(n) HTONS(n)
+00067 #   else /* BYTE_ORDER == BIG_ENDIAN */
+00068 #      define HTONS(n) (((((uInt16)(n) & 0xff)) << 8) | (((uInt16)(n) & 0xff00) >> 8))
+00069 #   endif /* BYTE_ORDER == BIG_ENDIAN */
+00070 #endif /* HTONS */
+00071 
+00072 #ifdef NTOHS
+00073 #undef NTOHS
+00074 #endif /* NTOHS */
+00075 
+00076 #ifdef ntohs
+00077 #undef ntohs
+00078 #endif /* ntohs */
+00079 
+00080 #define NTOHS HTONS
+00081 #define ntohs htons
+00082 
+00083 
+00084 #ifndef HTONL
+00085 #   if BYTE_ORDER == BIG_ENDIAN
+00086 #      define HTONL(n) (n)
+00087 #      define htonl(n) HTONL(n)
+00088 #   else /* BYTE_ORDER == BIG_ENDIAN */
+00089 #      define HTONL(n) (((((uInt32)(n) & 0xff)) << 24) | \
+00090                         ((((uInt32)(n) & 0xff00)) << 8) | \
+00091                         ((((uInt32)(n) & 0xff0000)) >> 8) | \
+00092                         ((((uInt32)(n) & 0xff000000)) >> 24))
+00093 #   endif /* BYTE_ORDER == BIG_ENDIAN */
+00094 #endif /* HTONL */
+00095 
+00096 #ifdef ntohl
+00097 #undef ntohl
+00098 #endif /* ntohl */
+00099 
+00100 #ifdef NTOHL
+00101 #undef NTOHL
+00102 #endif /* NTOHL */
+00103 
+00104 #define NTOHL HTONL
+00105 #define ntohl htonl
+00106 
+00107 #ifndef _MACHINE_ENDIAN_H_
+00108 #ifndef _NETINET_IN_H
+00109 #ifndef _LINUX_BYTEORDER_GENERIC_H
+00110 
+00111 #if BYTE_ORDER == LITTLE_ENDIAN
+00112 uInt16 htons(uInt16 n);
+00113 uInt32 htonl(uInt32 n);
+00114 #else
+00115 #endif /* BYTE_ORDER == LITTLE_ENDIAN */
+00116 
+00117 #endif /* _LINUX_BYTEORDER_GENERIC_H */
+00118 #endif /* _NETINET_IN_H */
+00119 #endif /* _MACHINE_ENDIAN_H_ */
+00120 
+00121 #endif /* __LWIP_INET_H__ */
+00122 
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ipv4_2inet_8h.html b/doc/html/ipv4_2inet_8h.html new file mode 100644 index 0000000..2a01b62 --- /dev/null +++ b/doc/html/ipv4_2inet_8h.html @@ -0,0 +1,378 @@ + + +UbixOS V2: src/sys/include/net/ipv4/inet.h File Reference + + + + +
+
+
+
+ +

inet.h File Reference

+

+#include "net/arch.h"
+#include "net/opt.h"
+#include "net/pbuf.h"
+#include "net/ipv4/ip_addr.h"
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Defines

#define htonl(n)   HTONL(n)
#define HTONL(n)   (n)
#define htons(n)   HTONS(n)
#define HTONS(n)   (n)
#define ntohl   htonl
#define NTOHL   HTONL
#define ntohs   htons
#define NTOHS   HTONS

Functions

uInt32 htonl (uInt32 n)
uInt16 htons (uInt16 n)
uInt16 inet_chksum (void *dataptr, uInt16 len)
uInt16 inet_chksum_pbuf (struct pbuf *p)
uInt16 inet_chksum_pseudo (struct pbuf *p, struct ip_addr *src, struct ip_addr *dest, uInt8 proto, uInt16 proto_len)
+


Define Documentation

+ +
+
+ + + + + + + + + +
#define htonl (  )    HTONL(n)
+
+
+ +

+ +

+Definition at line 87 of file inet.h. +

+Referenced by inet_aton(). +

+

+ +

+
+ + + + + + + + + +
#define HTONL (  )    (n)
+
+
+ +

+ +

+Definition at line 86 of file inet.h. +

+

+ +

+
+ + + + + + + + + +
#define htons (  )    HTONS(n)
+
+
+ +

+ +

+Definition at line 66 of file inet.h. +

+Referenced by arp_arp_input(), arp_query(), ethernetif_input(), ethernetif_output(), and lwip_recvfrom(). +

+

+ +

+
+ + + + + + + + + +
#define HTONS (  )    (n)
+
+
+ +

+ +

+Definition at line 65 of file inet.h. +

+

+ +

+
+ + + + +
#define ntohl   htonl
+
+
+ +

+ +

+Definition at line 105 of file inet.h. +

+

+ +

+
+ + + + +
#define NTOHL   HTONL
+
+
+ +

+ +

+Definition at line 104 of file inet.h. +

+

+ +

+
+ + + + +
#define ntohs   htons
+
+
+ +

+ +

+Definition at line 81 of file inet.h. +

+Referenced by lwip_bind(), and lwip_connect(). +

+

+ +

+
+ + + + +
#define NTOHS   HTONS
+
+
+ +

+ +

+Definition at line 80 of file inet.h. +

+

+


Function Documentation

+ +
+
+ + + + + + + + + +
uInt32 htonl (uInt32  n  ) 
+
+
+ +

+ +

+Definition at line 88 of file net.c. +

+

+ +

+
+ + + + + + + + + +
uInt16 htons (uInt16  n  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
uInt16 inet_chksum (void *  dataptr,
uInt16  len 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt16 inet_chksum_pbuf (struct pbuf p  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
uInt16 inet_chksum_pseudo (struct pbuf p,
struct ip_addr src,
struct ip_addr dest,
uInt8  proto,
uInt16  proto_len 
)
+
+
+ +

+ +

+

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ipv4_2ip_8h-source.html b/doc/html/ipv4_2ip_8h-source.html new file mode 100644 index 0000000..34613b9 --- /dev/null +++ b/doc/html/ipv4_2ip_8h-source.html @@ -0,0 +1,157 @@ + + +UbixOS V2: src/sys/include/net/ipv4/ip.h Source File + + + + +
+
+
+
+ +

ip.h

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 #ifndef __LWIP_IP_H__
+00036 #define __LWIP_IP_H__
+00037 
+00038 #include "net/arch.h"
+00039 
+00040 #include "net/def.h"
+00041 #include "net/pbuf.h"
+00042 #include "net/ipv4/ip_addr.h"
+00043 #include "net/netif.h"
+00044 
+00045 #include "net/err.h"
+00046 
+00047 void ip_init(void);
+00048 uInt8 ip_lookup(void *header, struct netif *inp);
+00049 struct netif *ip_route(struct ip_addr *dest);
+00050 err_t ip_input(struct pbuf *p, struct netif *inp);
+00051 err_t ip_output(struct pbuf *p, struct ip_addr *src, struct ip_addr *dest,
+00052                 uInt8 ttl, uInt8 proto);
+00053 err_t ip_output_if(struct pbuf *p, struct ip_addr *src, struct ip_addr *dest,
+00054                    uInt8 ttl, uInt8 proto,
+00055                    struct netif *netif);
+00056 
+00057 #define IP_HLEN 20
+00058 
+00059 #define IP_PROTO_ICMP 1
+00060 #define IP_PROTO_UDP 17
+00061 #define IP_PROTO_UDPLITE 170
+00062 #define IP_PROTO_TCP 6
+00063 
+00064 /* This is passed as the destination address to ip_output_if (not
+00065    to ip_output), meaning that an IP header already is constructed
+00066    in the pbuf. This is used when TCP retransmits. */
+00067 #ifdef IP_HDRINCL
+00068 #undef IP_HDRINCL
+00069 #endif /* IP_HDRINCL */
+00070 #define IP_HDRINCL  NULL
+00071 
+00072 struct ip_hdr {
+00073   /* version / header length / type of service */
+00074   PACK_STRUCT_FIELD(uInt16 _v_hl_tos);
+00075   /* total length */
+00076   PACK_STRUCT_FIELD(uInt16 _len);
+00077   /* identification */
+00078   PACK_STRUCT_FIELD(uInt16 _id);
+00079   /* fragment offset field */
+00080   PACK_STRUCT_FIELD(uInt16 _offset);
+00081 #define IP_RF 0x8000        /* reserved fragment flag */
+00082 #define IP_DF 0x4000        /* dont fragment flag */
+00083 #define IP_MF 0x2000        /* more fragments flag */
+00084 #define IP_OFFMASK 0x1fff   /* mask for fragmenting bits */
+00085   /* time to live / protocol*/
+00086   PACK_STRUCT_FIELD(uInt16 _ttl_proto);
+00087   /* checksum */
+00088   PACK_STRUCT_FIELD(uInt16 _chksum);
+00089   /* source and destination IP addresses */
+00090   PACK_STRUCT_FIELD(struct ip_addr src);
+00091   PACK_STRUCT_FIELD(struct ip_addr dest); 
+00092 } PACK_STRUCT_STRUCT;
+00093 
+00094 #define IPH_V(hdr)  (NTOHS((hdr)->_v_hl_tos) >> 12)
+00095 #define IPH_HL(hdr) ((NTOHS((hdr)->_v_hl_tos) >> 8) & 0x0f)
+00096 #define IPH_TOS(hdr) HTONS((NTOHS((hdr)->_v_hl_tos) & 0xff))
+00097 #define IPH_LEN(hdr) ((hdr)->_len)
+00098 #define IPH_ID(hdr) ((hdr)->_id)
+00099 #define IPH_OFFSET(hdr) ((hdr)->_offset)
+00100 #define IPH_TTL(hdr) (NTOHS((hdr)->_ttl_proto) >> 8)
+00101 #define IPH_PROTO(hdr) (NTOHS((hdr)->_ttl_proto) & 0xff)
+00102 #define IPH_CHKSUM(hdr) ((hdr)->_chksum)
+00103 
+00104 #define IPH_VHLTOS_SET(hdr, v, hl, tos) (hdr)->_v_hl_tos = HTONS(((v) << 12) | ((hl) << 8) | (tos))
+00105 #define IPH_LEN_SET(hdr, len) (hdr)->_len = (len)
+00106 #define IPH_ID_SET(hdr, id) (hdr)->_id = (id)
+00107 #define IPH_OFFSET_SET(hdr, off) (hdr)->_offset = (off)
+00108 #define IPH_TTL_SET(hdr, ttl) (hdr)->_ttl_proto = HTONS(IPH_PROTO(hdr) | ((ttl) << 8))
+00109 #define IPH_PROTO_SET(hdr, proto) (hdr)->_ttl_proto = HTONS((proto) | (IPH_TTL(hdr) << 8))
+00110 #define IPH_CHKSUM_SET(hdr, chksum) (hdr)->_chksum = (chksum)
+00111 
+00112 
+00113 
+00114 #if IP_DEBUG
+00115 void ip_debug_print(struct pbuf *p);
+00116 #endif /* IP_DEBUG */
+00117 
+00118 #endif /* __LWIP_IP_H__ */
+00119 
+00120 
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ipv4_2ip_8h.html b/doc/html/ipv4_2ip_8h.html new file mode 100644 index 0000000..106bff6 --- /dev/null +++ b/doc/html/ipv4_2ip_8h.html @@ -0,0 +1,891 @@ + + +UbixOS V2: src/sys/include/net/ipv4/ip.h File Reference + + + + +
+
+
+
+ +

ip.h File Reference

+

+#include "net/arch.h"
+#include "net/def.h"
+#include "net/pbuf.h"
+#include "net/ipv4/ip_addr.h"
+#include "net/netif.h"
+#include "net/err.h"
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  ip_hdr

Defines

#define IP_DF   0x4000
#define IP_HDRINCL   NULL
#define IP_HLEN   20
#define IP_MF   0x2000
#define IP_OFFMASK   0x1fff
#define IP_PROTO_ICMP   1
#define IP_PROTO_TCP   6
#define IP_PROTO_UDP   17
#define IP_PROTO_UDPLITE   170
#define IP_RF   0x8000
#define IPH_CHKSUM(hdr)   ((hdr)->_chksum)
#define IPH_CHKSUM_SET(hdr, chksum)   (hdr)->_chksum = (chksum)
#define IPH_HL(hdr)   ((NTOHS((hdr)->_v_hl_tos) >> 8) & 0x0f)
#define IPH_ID(hdr)   ((hdr)->_id)
#define IPH_ID_SET(hdr, id)   (hdr)->_id = (id)
#define IPH_LEN(hdr)   ((hdr)->_len)
#define IPH_LEN_SET(hdr, len)   (hdr)->_len = (len)
#define IPH_OFFSET(hdr)   ((hdr)->_offset)
#define IPH_OFFSET_SET(hdr, off)   (hdr)->_offset = (off)
#define IPH_PROTO(hdr)   (NTOHS((hdr)->_ttl_proto) & 0xff)
#define IPH_PROTO_SET(hdr, proto)   (hdr)->_ttl_proto = HTONS((proto) | (IPH_TTL(hdr) << 8))
#define IPH_TOS(hdr)   HTONS((NTOHS((hdr)->_v_hl_tos) & 0xff))
#define IPH_TTL(hdr)   (NTOHS((hdr)->_ttl_proto) >> 8)
#define IPH_TTL_SET(hdr, ttl)   (hdr)->_ttl_proto = HTONS(IPH_PROTO(hdr) | ((ttl) << 8))
#define IPH_V(hdr)   (NTOHS((hdr)->_v_hl_tos) >> 12)
#define IPH_VHLTOS_SET(hdr, v, hl, tos)   (hdr)->_v_hl_tos = HTONS(((v) << 12) | ((hl) << 8) | (tos))

Functions

void ip_init (void)
err_t ip_input (struct pbuf *p, struct netif *inp)
uInt8 ip_lookup (void *header, struct netif *inp)
err_t ip_output (struct pbuf *p, struct ip_addr *src, struct ip_addr *dest, uInt8 ttl, uInt8 proto)
err_t ip_output_if (struct pbuf *p, struct ip_addr *src, struct ip_addr *dest, uInt8 ttl, uInt8 proto, struct netif *netif)
netifip_route (struct ip_addr *dest)

Variables

ip_hdr PACK_STRUCT_STRUCT
+


Define Documentation

+ +
+
+ + + + +
#define IP_DF   0x4000
+
+
+ +

+ +

+Definition at line 82 of file ip.h. +

+

+ +

+
+ + + + +
#define IP_HDRINCL   NULL
+
+
+ +

+ +

+Definition at line 70 of file ip.h. +

+

+ +

+
+ + + + +
#define IP_HLEN   20
+
+
+ +

+ +

+Definition at line 57 of file ip.h. +

+

+ +

+
+ + + + +
#define IP_MF   0x2000
+
+
+ +

+ +

+Definition at line 83 of file ip.h. +

+

+ +

+
+ + + + +
#define IP_OFFMASK   0x1fff
+
+
+ +

+ +

+Definition at line 84 of file ip.h. +

+

+ +

+
+ + + + +
#define IP_PROTO_ICMP   1
+
+
+ +

+ +

+Definition at line 59 of file ip.h. +

+

+ +

+
+ + + + +
#define IP_PROTO_TCP   6
+
+
+ +

+ +

+Definition at line 62 of file ip.h. +

+

+ +

+
+ + + + +
#define IP_PROTO_UDP   17
+
+
+ +

+ +

+Definition at line 60 of file ip.h. +

+

+ +

+
+ + + + +
#define IP_PROTO_UDPLITE   170
+
+
+ +

+ +

+Definition at line 61 of file ip.h. +

+

+ +

+
+ + + + +
#define IP_RF   0x8000
+
+
+ +

+ +

+Definition at line 81 of file ip.h. +

+

+ +

+
+ + + + + + + + + +
#define IPH_CHKSUM (hdr   )    ((hdr)->_chksum)
+
+
+ +

+ +

+Definition at line 102 of file ip.h. +

+

+ +

+
+ + + + + + + + + + + + +
#define IPH_CHKSUM_SET (hdr,
chksum   )    (hdr)->_chksum = (chksum)
+
+
+ +

+ +

+Definition at line 110 of file ip.h. +

+

+ +

+
+ + + + + + + + + +
#define IPH_HL (hdr   )    ((NTOHS((hdr)->_v_hl_tos) >> 8) & 0x0f)
+
+
+ +

+ +

+Definition at line 95 of file ip.h. +

+

+ +

+
+ + + + + + + + + +
#define IPH_ID (hdr   )    ((hdr)->_id)
+
+
+ +

+ +

+Definition at line 98 of file ip.h. +

+

+ +

+
+ + + + + + + + + + + + +
#define IPH_ID_SET (hdr,
id   )    (hdr)->_id = (id)
+
+
+ +

+ +

+Definition at line 106 of file ip.h. +

+

+ +

+
+ + + + + + + + + +
#define IPH_LEN (hdr   )    ((hdr)->_len)
+
+
+ +

+ +

+Definition at line 97 of file ip.h. +

+

+ +

+
+ + + + + + + + + + + + +
#define IPH_LEN_SET (hdr,
len   )    (hdr)->_len = (len)
+
+
+ +

+ +

+Definition at line 105 of file ip.h. +

+

+ +

+
+ + + + + + + + + +
#define IPH_OFFSET (hdr   )    ((hdr)->_offset)
+
+
+ +

+ +

+Definition at line 99 of file ip.h. +

+

+ +

+
+ + + + + + + + + + + + +
#define IPH_OFFSET_SET (hdr,
off   )    (hdr)->_offset = (off)
+
+
+ +

+ +

+Definition at line 107 of file ip.h. +

+

+ +

+
+ + + + + + + + + +
#define IPH_PROTO (hdr   )    (NTOHS((hdr)->_ttl_proto) & 0xff)
+
+
+ +

+ +

+Definition at line 101 of file ip.h. +

+

+ +

+
+ + + + + + + + + + + + +
#define IPH_PROTO_SET (hdr,
proto   )    (hdr)->_ttl_proto = HTONS((proto) | (IPH_TTL(hdr) << 8))
+
+
+ +

+ +

+Definition at line 109 of file ip.h. +

+

+ +

+
+ + + + + + + + + +
#define IPH_TOS (hdr   )    HTONS((NTOHS((hdr)->_v_hl_tos) & 0xff))
+
+
+ +

+ +

+Definition at line 96 of file ip.h. +

+

+ +

+
+ + + + + + + + + +
#define IPH_TTL (hdr   )    (NTOHS((hdr)->_ttl_proto) >> 8)
+
+
+ +

+ +

+Definition at line 100 of file ip.h. +

+

+ +

+
+ + + + + + + + + + + + +
#define IPH_TTL_SET (hdr,
ttl   )    (hdr)->_ttl_proto = HTONS(IPH_PROTO(hdr) | ((ttl) << 8))
+
+
+ +

+ +

+Definition at line 108 of file ip.h. +

+

+ +

+
+ + + + + + + + + +
#define IPH_V (hdr   )    (NTOHS((hdr)->_v_hl_tos) >> 12)
+
+
+ +

+ +

+Definition at line 94 of file ip.h. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
#define IPH_VHLTOS_SET (hdr,
v,
hl,
tos   )    (hdr)->_v_hl_tos = HTONS(((v) << 12) | ((hl) << 8) | (tos))
+
+
+ +

+ +

+Definition at line 104 of file ip.h. +

+

+


Function Documentation

+ +
+
+ + + + + + + + + +
void ip_init (void   ) 
+
+
+ +

+ +

+Referenced by tcpip_thread(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
err_t ip_input (struct pbuf p,
struct netif inp 
)
+
+
+ +

+ +

+Referenced by tcpip_thread(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
uInt8 ip_lookup (void *  header,
struct netif inp 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
err_t ip_output (struct pbuf p,
struct ip_addr src,
struct ip_addr dest,
uInt8  ttl,
uInt8  proto 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
err_t ip_output_if (struct pbuf p,
struct ip_addr src,
struct ip_addr dest,
uInt8  ttl,
uInt8  proto,
struct netif netif 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
struct netif* ip_route (struct ip_addr dest  ) 
+
+
+ +

+ +

+

+


Variable Documentation

+ +
+
+ + + + +
struct ip_hdr PACK_STRUCT_STRUCT
+
+
+ +

+ +

+

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ipv4_2ip__addr_8h-source.html b/doc/html/ipv4_2ip__addr_8h-source.html new file mode 100644 index 0000000..0897655 --- /dev/null +++ b/doc/html/ipv4_2ip__addr_8h-source.html @@ -0,0 +1,129 @@ + + +UbixOS V2: src/sys/include/net/ipv4/ip_addr.h Source File + + + + +
+
+
+
+ +

ip_addr.h

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 #ifndef __LWIP_IP_ADDR_H__
+00036 #define __LWIP_IP_ADDR_H__
+00037 
+00038 #include "net/arch.h"
+00039 
+00040 #define IP_ADDR_ANY 0
+00041 
+00042 #define IP_ADDR_BROADCAST (&ip_addr_broadcast)
+00043 
+00044 PACK_STRUCT_BEGIN
+00045 struct ip_addr {
+00046   PACK_STRUCT_FIELD(uInt32 addr);
+00047 } PACK_STRUCT_STRUCT;
+00048 PACK_STRUCT_END
+00049 
+00050 extern struct ip_addr ip_addr_broadcast;
+00051 
+00052 #define IP4_ADDR(ipaddr, a,b,c,d) (ipaddr)->addr = htonl(((uInt32)(a & 0xff) << 24) | ((uInt32)(b & 0xff) << 16) | \
+00053                                                          ((uInt32)(c & 0xff) << 8) | (uInt32)(d & 0xff))
+00054 
+00055 #define ip_addr_set(dest, src) (dest)->addr = \
+00056                                ((src) == IP_ADDR_ANY? IP_ADDR_ANY:\
+00057                                 ((struct ip_addr *)src)->addr)
+00058 #define ip_addr_maskcmp(addr1, addr2, mask) (((addr1)->addr & \
+00059                                               (mask)->addr) == \
+00060                                              ((addr2)->addr & \
+00061                                               (mask)->addr))
+00062 #define ip_addr_cmp(addr1, addr2) ((addr1)->addr == (addr2)->addr)
+00063 
+00064 #define ip_addr_isany(addr1) ((addr1) == NULL || (addr1)->addr == 0)
+00065 
+00066 #define ip_addr_isbroadcast(addr1, mask) (((((addr1)->addr) & ~((mask)->addr)) == \
+00067                                          (0xffffffff & ~((mask)->addr))) || \
+00068                                          ((addr1)->addr == 0xffffffff) || \
+00069                                          ((addr1)->addr == 0x00000000))
+00070 
+00071 
+00072 #define ip_addr_ismulticast(addr1) (((addr1)->addr & ntohl(0xf0000000)) == ntohl(0xe0000000))
+00073                                    
+00074 
+00075 #define ip_addr_debug_print(ipaddr) kprintf("%d.%d.%d.%d", \
+00076                     (uInt8)(ntohl((ipaddr)->addr) >> 24) & 0xff, \
+00077                     (uInt8)(ntohl((ipaddr)->addr) >> 16) & 0xff, \
+00078                     (uInt8)(ntohl((ipaddr)->addr) >> 8) & 0xff, \
+00079                     (uInt8)ntohl((ipaddr)->addr) & 0xff)
+00080 
+00081 
+00082 #define ip4_addr1(ipaddr) ((uInt8)(ntohl((ipaddr)->addr) >> 24) & 0xff)
+00083 #define ip4_addr2(ipaddr) ((uInt8)(ntohl((ipaddr)->addr) >> 16) & 0xff)
+00084 #define ip4_addr3(ipaddr) ((uInt8)(ntohl((ipaddr)->addr) >> 8) & 0xff)
+00085 #define ip4_addr4(ipaddr) ((uInt8)(ntohl((ipaddr)->addr)) & 0xff)
+00086 #endif /* __LWIP_IP_ADDR_H__ */
+00087 
+00088 
+00089 
+00090 
+00091 
+00092 
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ipv4_2ip__addr_8h.html b/doc/html/ipv4_2ip__addr_8h.html new file mode 100644 index 0000000..796f32c --- /dev/null +++ b/doc/html/ipv4_2ip__addr_8h.html @@ -0,0 +1,479 @@ + + +UbixOS V2: src/sys/include/net/ipv4/ip_addr.h File Reference + + + + +
+
+
+
+ +

ip_addr.h File Reference

+

+#include "net/arch.h"
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  ip_addr

Defines

#define IP4_ADDR(ipaddr, a, b, c, d)
#define ip4_addr1(ipaddr)   ((uInt8)(ntohl((ipaddr)->addr) >> 24) & 0xff)
#define ip4_addr2(ipaddr)   ((uInt8)(ntohl((ipaddr)->addr) >> 16) & 0xff)
#define ip4_addr3(ipaddr)   ((uInt8)(ntohl((ipaddr)->addr) >> 8) & 0xff)
#define ip4_addr4(ipaddr)   ((uInt8)(ntohl((ipaddr)->addr)) & 0xff)
#define IP_ADDR_ANY   0
#define IP_ADDR_BROADCAST   (&ip_addr_broadcast)
#define ip_addr_cmp(addr1, addr2)   ((addr1)->addr == (addr2)->addr)
#define ip_addr_debug_print(ipaddr)
#define ip_addr_isany(addr1)   ((addr1) == NULL || (addr1)->addr == 0)
#define ip_addr_isbroadcast(addr1, mask)
#define ip_addr_ismulticast(addr1)   (((addr1)->addr & ntohl(0xf0000000)) == ntohl(0xe0000000))
#define ip_addr_maskcmp(addr1, addr2, mask)
#define ip_addr_set(dest, src)

Variables

PACK_STRUCT_END struct ip_addr ip_addr_broadcast
PACK_STRUCT_BEGIN struct ip_addr PACK_STRUCT_STRUCT
+


Define Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
#define IP4_ADDR (ipaddr,
a,
b,
c,
 ) 
+
+
+ +

+Value:

(ipaddr)->addr = htonl(((uInt32)(a & 0xff) << 24) | ((uInt32)(b & 0xff) << 16) | \
+                                                         ((uInt32)(c & 0xff) << 8) | (uInt32)(d & 0xff))
+
+

+Definition at line 52 of file ip_addr.h. +

+Referenced by bot_thread(), and netMainThread(). +

+

+ +

+
+ + + + + + + + + +
#define ip4_addr1 (ipaddr   )    ((uInt8)(ntohl((ipaddr)->addr) >> 24) & 0xff)
+
+
+ +

+ +

+Definition at line 82 of file ip_addr.h. +

+

+ +

+
+ + + + + + + + + +
#define ip4_addr2 (ipaddr   )    ((uInt8)(ntohl((ipaddr)->addr) >> 16) & 0xff)
+
+
+ +

+ +

+Definition at line 83 of file ip_addr.h. +

+Referenced by ethernetif_output(). +

+

+ +

+
+ + + + + + + + + +
#define ip4_addr3 (ipaddr   )    ((uInt8)(ntohl((ipaddr)->addr) >> 8) & 0xff)
+
+
+ +

+ +

+Definition at line 84 of file ip_addr.h. +

+Referenced by ethernetif_output(). +

+

+ +

+
+ + + + + + + + + +
#define ip4_addr4 (ipaddr   )    ((uInt8)(ntohl((ipaddr)->addr)) & 0xff)
+
+
+ +

+ +

+Definition at line 85 of file ip_addr.h. +

+Referenced by ethernetif_output(). +

+

+ +

+
+ + + + +
#define IP_ADDR_ANY   0
+
+
+ +

+ +

+Definition at line 40 of file ip_addr.h. +

+Referenced by arp_init(), and arp_tmr(). +

+

+ +

+
+ + + + +
#define IP_ADDR_BROADCAST   (&ip_addr_broadcast)
+
+
+ +

+ +

+Definition at line 42 of file ip_addr.h. +

+

+ +

+
+ + + + + + + + + + + + +
#define ip_addr_cmp (addr1,
addr2   )    ((addr1)->addr == (addr2)->addr)
+
+
+ +

+ +

+Definition at line 62 of file ip_addr.h. +

+Referenced by add_arp_entry(), arp_arp_input(), and arp_lookup(). +

+

+ +

+
+ + + + + + + + + +
#define ip_addr_debug_print (ipaddr   ) 
+
+
+ +

+Value:

kprintf("%d.%d.%d.%d", \
+                    (uInt8)(ntohl((ipaddr)->addr) >> 24) & 0xff, \
+                    (uInt8)(ntohl((ipaddr)->addr) >> 16) & 0xff, \
+                    (uInt8)(ntohl((ipaddr)->addr) >> 8) & 0xff, \
+                    (uInt8)ntohl((ipaddr)->addr) & 0xff)
+
+

+Definition at line 75 of file ip_addr.h. +

+

+ +

+
+ + + + + + + + + +
#define ip_addr_isany (addr1   )    ((addr1) == NULL || (addr1)->addr == 0)
+
+
+ +

+ +

+Definition at line 64 of file ip_addr.h. +

+Referenced by add_arp_entry(), arp_tmr(), and ethernetif_output(). +

+

+ +

+
+ + + + + + + + + + + + +
#define ip_addr_isbroadcast (addr1,
mask   ) 
+
+
+ +

+Value:

(((((addr1)->addr) & ~((mask)->addr)) == \
+                                         (0xffffffff & ~((mask)->addr))) || \
+                                         ((addr1)->addr == 0xffffffff) || \
+                                         ((addr1)->addr == 0x00000000))
+
+

+Definition at line 66 of file ip_addr.h. +

+Referenced by ethernetif_output(). +

+

+ +

+
+ + + + + + + + + +
#define ip_addr_ismulticast (addr1   )    (((addr1)->addr & ntohl(0xf0000000)) == ntohl(0xe0000000))
+
+
+ +

+ +

+Definition at line 72 of file ip_addr.h. +

+Referenced by ethernetif_output(). +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define ip_addr_maskcmp (addr1,
addr2,
mask   ) 
+
+
+ +

+Value:

(((addr1)->addr & \
+                                              (mask)->addr) == \
+                                             ((addr2)->addr & \
+                                              (mask)->addr))
+
+

+Definition at line 58 of file ip_addr.h. +

+Referenced by arp_ip_input(), and ethernetif_output(). +

+

+ +

+
+ + + + + + + + + + + + +
#define ip_addr_set (dest,
src   ) 
+
+
+ +

+Value:

(dest)->addr = \
+                               ((src) == IP_ADDR_ANY? IP_ADDR_ANY:\
+                                ((struct ip_addr *)src)->addr)
+
+

+Definition at line 55 of file ip_addr.h. +

+Referenced by add_arp_entry(), arp_arp_input(), arp_init(), arp_query(), and arp_tmr(). +

+

+


Variable Documentation

+ +
+
+ + + + +
PACK_STRUCT_END struct ip_addr ip_addr_broadcast
+
+
+ +

+ +

+

+ +

+
+ + + + +
PACK_STRUCT_BEGIN struct ip_addr PACK_STRUCT_STRUCT
+
+
+ +

+ +

+

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ipv6_2icmp_8h-source.html b/doc/html/ipv6_2icmp_8h-source.html new file mode 100644 index 0000000..61139a7 --- /dev/null +++ b/doc/html/ipv6_2icmp_8h-source.html @@ -0,0 +1,130 @@ + + +UbixOS V2: src/sys/include/net/ipv6/icmp.h Source File + + + + +
+
+
+
+ +

icmp.h

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 #ifndef __LWIP_ICMP_H__
+00036 #define __LWIP_ICMP_H__
+00037 
+00038 #include "lwip/arch.h"
+00039 
+00040 #include "lwip/opt.h"
+00041 #include "lwip/pbuf.h"
+00042 
+00043 #include "lwip/netif.h"
+00044 
+00045 #define ICMP6_DUR  1
+00046 #define ICMP6_TE   3
+00047 #define ICMP6_ECHO 128    /* echo */
+00048 #define ICMP6_ER   129      /* echo reply */
+00049 
+00050 
+00051 enum icmp_dur_type {
+00052   ICMP_DUR_NET = 0,    /* net unreachable */
+00053   ICMP_DUR_HOST = 1,   /* host unreachable */
+00054   ICMP_DUR_PROTO = 2,  /* protocol unreachable */
+00055   ICMP_DUR_PORT = 3,   /* port unreachable */
+00056   ICMP_DUR_FRAG = 4,   /* fragmentation needed and DF set */
+00057   ICMP_DUR_SR = 5      /* source route failed */
+00058 };
+00059 
+00060 enum icmp_te_type {
+00061   ICMP_TE_TTL = 0,     /* time to live exceeded in transit */
+00062   ICMP_TE_FRAG = 1     /* fragment reassembly time exceeded */
+00063 };
+00064 
+00065 void icmp_input(struct pbuf *p, struct netif *inp);
+00066 
+00067 void icmp_dest_unreach(struct pbuf *p, enum icmp_dur_type t);
+00068 void icmp_time_exceeded(struct pbuf *p, enum icmp_te_type t);
+00069 
+00070 struct icmp_echo_hdr {
+00071   u8_t type;
+00072   u8_t icode;
+00073   u16_t chksum;
+00074   u16_t id;
+00075   u16_t seqno;
+00076 };
+00077 
+00078 struct icmp_dur_hdr {
+00079   u8_t type;
+00080   u8_t icode;
+00081   u16_t chksum;
+00082   u32_t unused;
+00083 };
+00084 
+00085 struct icmp_te_hdr {
+00086   u8_t type;
+00087   u8_t icode;
+00088   u16_t chksum;
+00089   u32_t unused;
+00090 };
+00091 
+00092 #endif /* __LWIP_ICMP_H__ */
+00093           
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ipv6_2icmp_8h.html b/doc/html/ipv6_2icmp_8h.html new file mode 100644 index 0000000..30f9ca5 --- /dev/null +++ b/doc/html/ipv6_2icmp_8h.html @@ -0,0 +1,303 @@ + + +UbixOS V2: src/sys/include/net/ipv6/icmp.h File Reference + + + + +
+
+
+
+ +

icmp.h File Reference

+

+#include "lwip/arch.h"
+#include "lwip/opt.h"
+#include "lwip/pbuf.h"
+#include "lwip/netif.h"
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  icmp_dur_hdr
struct  icmp_echo_hdr
struct  icmp_te_hdr

Defines

#define ICMP6_DUR   1
#define ICMP6_ECHO   128
#define ICMP6_ER   129
#define ICMP6_TE   3

Enumerations

enum  icmp_dur_type {
+  ICMP_DUR_NET = 0, +ICMP_DUR_HOST = 1, +ICMP_DUR_PROTO = 2, +ICMP_DUR_PORT = 3, +
+  ICMP_DUR_FRAG = 4, +ICMP_DUR_SR = 5 +
+ }
enum  icmp_te_type { ICMP_TE_TTL = 0, +ICMP_TE_FRAG = 1 + }

Functions

void icmp_dest_unreach (struct pbuf *p, enum icmp_dur_type t)
void icmp_input (struct pbuf *p, struct netif *inp)
void icmp_time_exceeded (struct pbuf *p, enum icmp_te_type t)
+


Define Documentation

+ +
+
+ + + + +
#define ICMP6_DUR   1
+
+
+ +

+ +

+Definition at line 45 of file icmp.h. +

+

+ +

+
+ + + + +
#define ICMP6_ECHO   128
+
+
+ +

+ +

+Definition at line 47 of file icmp.h. +

+

+ +

+
+ + + + +
#define ICMP6_ER   129
+
+
+ +

+ +

+Definition at line 48 of file icmp.h. +

+

+ +

+
+ + + + +
#define ICMP6_TE   3
+
+
+ +

+ +

+Definition at line 46 of file icmp.h. +

+

+


Enumeration Type Documentation

+ +
+
+ + + + +
enum icmp_dur_type
+
+
+ +

+

Enumerator:
+ + + + + + + +
ICMP_DUR_NET  +
ICMP_DUR_HOST  +
ICMP_DUR_PROTO  +
ICMP_DUR_PORT  +
ICMP_DUR_FRAG  +
ICMP_DUR_SR  +
+
+ +

+Definition at line 51 of file icmp.h. +

+

+ +

+
+ + + + +
enum icmp_te_type
+
+
+ +

+

Enumerator:
+ + + +
ICMP_TE_TTL  +
ICMP_TE_FRAG  +
+
+ +

+Definition at line 60 of file icmp.h. +

+

+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
void icmp_dest_unreach (struct pbuf p,
enum icmp_dur_type  t 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void icmp_input (struct pbuf p,
struct netif inp 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void icmp_time_exceeded (struct pbuf p,
enum icmp_te_type  t 
)
+
+
+ +

+ +

+

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ipv6_2inet_8h-source.html b/doc/html/ipv6_2inet_8h-source.html new file mode 100644 index 0000000..7c49fd5 --- /dev/null +++ b/doc/html/ipv6_2inet_8h-source.html @@ -0,0 +1,100 @@ + + +UbixOS V2: src/sys/include/net/ipv6/inet.h Source File + + + + +
+
+
+
+ +

inet.h

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 #ifndef __LWIP_INET_H__
+00036 #define __LWIP_INET_H__
+00037 
+00038 #include "net/arch.h"
+00039 
+00040 #include "net/opt.h"
+00041 #include "net/pbuf.h"
+00042 #include "net/ipv6/ip_addr.h"
+00043 
+00044 u16_t inet_chksum(void *data, u16_t len);
+00045 u16_t inet_chksum_pbuf(struct pbuf *p);
+00046 u16_t inet_chksum_pseudo(struct pbuf *p,
+00047                          struct ip_addr *src, struct ip_addr *dest,
+00048                          u8_t proto, u32_t proto_len);
+00049 
+00050 
+00051 #ifndef _MACHINE_ENDIAN_H_
+00052 #ifndef _NETINET_IN_H
+00053 #ifndef _LINUX_BYTEORDER_GENERIC_H
+00054 u16_t htons(u16_t n);
+00055 u16_t ntohs(u16_t n);
+00056 u32_t htonl(u32_t n);
+00057 u32_t ntohl(u32_t n);
+00058 #endif /* _LINUX_BYTEORDER_GENERIC_H */
+00059 #endif /* _NETINET_IN_H */
+00060 #endif /* _MACHINE_ENDIAN_H_ */
+00061 
+00062 #endif /* __LWIP_INET_H__ */
+00063 
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ipv6_2inet_8h.html b/doc/html/ipv6_2inet_8h.html new file mode 100644 index 0000000..3bdebc5 --- /dev/null +++ b/doc/html/ipv6_2inet_8h.html @@ -0,0 +1,240 @@ + + +UbixOS V2: src/sys/include/net/ipv6/inet.h File Reference + + + + +
+
+
+
+ +

inet.h File Reference

+

+#include "net/arch.h"
+#include "net/opt.h"
+#include "net/pbuf.h"
+#include "net/ipv6/ip_addr.h"
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + +

Functions

u32_t htonl (u32_t n)
u16_t htons (u16_t n)
u16_t inet_chksum (void *data, u16_t len)
u16_t inet_chksum_pbuf (struct pbuf *p)
u16_t inet_chksum_pseudo (struct pbuf *p, struct ip_addr *src, struct ip_addr *dest, u8_t proto, u32_t proto_len)
u32_t ntohl (u32_t n)
u16_t ntohs (u16_t n)
+


Function Documentation

+ +
+
+ + + + + + + + + +
u32_t htonl (u32_t  n  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
u16_t htons (u16_t  n  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
u16_t inet_chksum (void *  data,
u16_t  len 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
u16_t inet_chksum_pbuf (struct pbuf p  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
u16_t inet_chksum_pseudo (struct pbuf p,
struct ip_addr src,
struct ip_addr dest,
u8_t  proto,
u32_t  proto_len 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
u32_t ntohl (u32_t  n  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
u16_t ntohs (u16_t  n  ) 
+
+
+ +

+ +

+

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ipv6_2ip_8h-source.html b/doc/html/ipv6_2ip_8h-source.html new file mode 100644 index 0000000..3e33575 --- /dev/null +++ b/doc/html/ipv6_2ip_8h-source.html @@ -0,0 +1,136 @@ + + +UbixOS V2: src/sys/include/net/ipv6/ip.h Source File + + + + +
+
+
+
+ +

ip.h

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 #ifndef __LWIP_IP_H__
+00036 #define __LWIP_IP_H__
+00037 
+00038 #include "lwip/debug.h"
+00039 #include "lwip/def.h"
+00040 #include "lwip/pbuf.h"
+00041 #include "lwip/ip_addr.h"
+00042 
+00043 #include "lwip/err.h"
+00044 
+00045 #define IP_HLEN 40
+00046 
+00047 #define IP_PROTO_ICMP 58
+00048 #define IP_PROTO_UDP 17
+00049 #define IP_PROTO_UDPLITE 170
+00050 #define IP_PROTO_TCP 6
+00051 
+00052 /* This is passed as the destination address to ip_output_if (not
+00053    to ip_output), meaning that an IP header already is constructed
+00054    in the pbuf. This is used when TCP retransmits. */
+00055 #ifdef IP_HDRINCL
+00056 #undef IP_HDRINCL
+00057 #endif /* IP_HDRINCL */
+00058 #define IP_HDRINCL  NULL
+00059 
+00060 
+00061 /* The IPv6 header. */
+00062 struct ip_hdr {
+00063 #if BYTE_ORDER == LITTLE_ENDIAN
+00064   u8_t tclass1:4, v:4;
+00065   u8_t flow1:4, tclass2:4;  
+00066 #else
+00067   u8_t v:4, tclass1:4;
+00068   u8_t tclass2:8, flow1:4;
+00069 #endif
+00070   u16_t flow2;
+00071   u16_t len;                /* payload length */
+00072   u8_t nexthdr;             /* next header */
+00073   u8_t hoplim;              /* hop limit (TTL) */
+00074   struct ip_addr src, dest;          /* source and destination IP addresses */
+00075 };
+00076 
+00077 void ip_init(void);
+00078 
+00079 #include "lwip/netif.h"
+00080 
+00081 struct netif *ip_route(struct ip_addr *dest);
+00082 
+00083 void ip_input(struct pbuf *p, struct netif *inp);
+00084 
+00085 /* source and destination addresses in network byte order, please */
+00086 err_t ip_output(struct pbuf *p, struct ip_addr *src, struct ip_addr *dest,
+00087                unsigned char ttl, unsigned char proto);
+00088 
+00089 err_t ip_output_if(struct pbuf *p, struct ip_addr *src, struct ip_addr *dest,
+00090                   unsigned char ttl, unsigned char proto,
+00091                   struct netif *netif);
+00092 
+00093 #if IP_DEBUG
+00094 void ip_debug_print(struct pbuf *p);
+00095 #endif /* IP_DEBUG */
+00096 
+00097 #endif /* __LWIP_IP_H__ */
+00098 
+00099 
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ipv6_2ip_8h.html b/doc/html/ipv6_2ip_8h.html new file mode 100644 index 0000000..3d6a4d1 --- /dev/null +++ b/doc/html/ipv6_2ip_8h.html @@ -0,0 +1,350 @@ + + +UbixOS V2: src/sys/include/net/ipv6/ip.h File Reference + + + + +
+
+
+
+ +

ip.h File Reference

+

+#include "lwip/debug.h"
+#include "lwip/def.h"
+#include "lwip/pbuf.h"
+#include "lwip/ip_addr.h"
+#include "lwip/err.h"
+#include "lwip/netif.h"
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  ip_hdr

Defines

#define IP_HDRINCL   NULL
#define IP_HLEN   40
#define IP_PROTO_ICMP   58
#define IP_PROTO_TCP   6
#define IP_PROTO_UDP   17
#define IP_PROTO_UDPLITE   170

Functions

void ip_init (void)
void ip_input (struct pbuf *p, struct netif *inp)
err_t ip_output (struct pbuf *p, struct ip_addr *src, struct ip_addr *dest, unsigned char ttl, unsigned char proto)
err_t ip_output_if (struct pbuf *p, struct ip_addr *src, struct ip_addr *dest, unsigned char ttl, unsigned char proto, struct netif *netif)
netifip_route (struct ip_addr *dest)
+


Define Documentation

+ +
+
+ + + + +
#define IP_HDRINCL   NULL
+
+
+ +

+ +

+Definition at line 58 of file ip.h. +

+

+ +

+
+ + + + +
#define IP_HLEN   40
+
+
+ +

+ +

+Definition at line 45 of file ip.h. +

+

+ +

+
+ + + + +
#define IP_PROTO_ICMP   58
+
+
+ +

+ +

+Definition at line 47 of file ip.h. +

+

+ +

+
+ + + + +
#define IP_PROTO_TCP   6
+
+
+ +

+ +

+Definition at line 50 of file ip.h. +

+

+ +

+
+ + + + +
#define IP_PROTO_UDP   17
+
+
+ +

+ +

+Definition at line 48 of file ip.h. +

+

+ +

+
+ + + + +
#define IP_PROTO_UDPLITE   170
+
+
+ +

+ +

+Definition at line 49 of file ip.h. +

+

+


Function Documentation

+ +
+
+ + + + + + + + + +
void ip_init (void   ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void ip_input (struct pbuf p,
struct netif inp 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
err_t ip_output (struct pbuf p,
struct ip_addr src,
struct ip_addr dest,
unsigned char  ttl,
unsigned char  proto 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
err_t ip_output_if (struct pbuf p,
struct ip_addr src,
struct ip_addr dest,
unsigned char  ttl,
unsigned char  proto,
struct netif netif 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
struct netif* ip_route (struct ip_addr dest  ) 
+
+
+ +

+ +

+

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ipv6_2ip__addr_8h-source.html b/doc/html/ipv6_2ip__addr_8h-source.html new file mode 100644 index 0000000..9b4784a --- /dev/null +++ b/doc/html/ipv6_2ip__addr_8h-source.html @@ -0,0 +1,99 @@ + + +UbixOS V2: src/sys/include/net/ipv6/ip_addr.h Source File + + + + +
+
+
+
+ +

ip_addr.h

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 #ifndef __LWIP_IP_ADDR_H__
+00036 #define __LWIP_IP_ADDR_H__
+00037 
+00038 #include "net/arch.h"
+00039 
+00040 #define IP_ADDR_ANY 0
+00041 
+00042 struct ip_addr {
+00043   u32_t addr[4];
+00044 };
+00045 
+00046 #define IP6_ADDR(ipaddr, a,b,c,d,e,f,g,h) do { (ipaddr)->addr[0] = htonl((u32_t)((a & 0xffff) << 16) | (b & 0xffff)); \
+00047                                                (ipaddr)->addr[1] = htonl(((c & 0xffff) << 16) | (d & 0xffff)); \
+00048                                                (ipaddr)->addr[2] = htonl(((e & 0xffff) << 16) | (f & 0xffff)); \
+00049                                                (ipaddr)->addr[3] = htonl(((g & 0xffff) << 16) | (h & 0xffff)); } while(0)
+00050 
+00051 int ip_addr_maskcmp(struct ip_addr *addr1, struct ip_addr *addr2,
+00052                     struct ip_addr *mask);
+00053 int ip_addr_cmp(struct ip_addr *addr1, struct ip_addr *addr2);
+00054 void ip_addr_set(struct ip_addr *dest, struct ip_addr *src);
+00055 int ip_addr_isany(struct ip_addr *addr);
+00056 
+00057 
+00058 #if IP_DEBUG
+00059 void ip_addr_debug_print(struct ip_addr *addr);
+00060 #endif /* IP_DEBUG */
+00061 
+00062 #endif /* __LWIP_IP_ADDR_H__ */
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ipv6_2ip__addr_8h.html b/doc/html/ipv6_2ip__addr_8h.html new file mode 100644 index 0000000..fa9bb10 --- /dev/null +++ b/doc/html/ipv6_2ip__addr_8h.html @@ -0,0 +1,244 @@ + + +UbixOS V2: src/sys/include/net/ipv6/ip_addr.h File Reference + + + + +
+
+
+
+ +

ip_addr.h File Reference

+

+#include "net/arch.h"
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + +

Data Structures

struct  ip_addr

Defines

#define IP6_ADDR(ipaddr, a, b, c, d, e, f, g, h)
#define IP_ADDR_ANY   0

Functions

int ip_addr_cmp (struct ip_addr *addr1, struct ip_addr *addr2)
int ip_addr_isany (struct ip_addr *addr)
int ip_addr_maskcmp (struct ip_addr *addr1, struct ip_addr *addr2, struct ip_addr *mask)
void ip_addr_set (struct ip_addr *dest, struct ip_addr *src)
+


Define Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#define IP6_ADDR (ipaddr,
a,
b,
c,
d,
e,
f,
g,
 ) 
+
+
+ +

+Value:

do { (ipaddr)->addr[0] = htonl((u32_t)((a & 0xffff) << 16) | (b & 0xffff)); \
+                                               (ipaddr)->addr[1] = htonl(((c & 0xffff) << 16) | (d & 0xffff)); \
+                                               (ipaddr)->addr[2] = htonl(((e & 0xffff) << 16) | (f & 0xffff)); \
+                                               (ipaddr)->addr[3] = htonl(((g & 0xffff) << 16) | (h & 0xffff)); } while(0)
+
+

+Definition at line 46 of file ip_addr.h. +

+

+ +

+
+ + + + +
#define IP_ADDR_ANY   0
+
+
+ +

+ +

+Definition at line 40 of file ip_addr.h. +

+

+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
int ip_addr_cmp (struct ip_addr addr1,
struct ip_addr addr2 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
int ip_addr_isany (struct ip_addr addr  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int ip_addr_maskcmp (struct ip_addr addr1,
struct ip_addr addr2,
struct ip_addr mask 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void ip_addr_set (struct ip_addr dest,
struct ip_addr src 
)
+
+
+ +

+ +

+

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/kern__descrip_8c-source.html b/doc/html/kern__descrip_8c-source.html new file mode 100644 index 0000000..872341b --- /dev/null +++ b/doc/html/kern__descrip_8c-source.html @@ -0,0 +1,153 @@ + + +UbixOS V2: src/sys/kernel/kern_descrip.c Source File + + + + +
+
+
+
+ +

kern_descrip.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <sys/kern_descrip.h>
+00031 #include <ubixos/types.h>
+00032 #include <sys/sysproto.h>
+00033 #include <sys/thread.h>
+00034 #include <lib/kprintf.h>
+00035 #include <ubixos/endtask.h>
+00036 #include <lib/kmalloc.h>
+00037 #include <assert.h>
+00038 
+00039 int fcntl(struct thread *td, struct fcntl_args *uap) {
+00040   struct file *fp = 0x0;
+00041 
+00042   if (td->o_files[uap->fd] == 0x0) {
+00043     kprintf("ERROR!!!\n");
+00044     return(-1);
+00045     }
+00046 
+00047   fp = (struct file *)td->o_files[uap->fd];
+00048   switch (uap->cmd) {
+00049     case 3:
+00050       td->td_retval[0] = fp->f_flag;
+00051       break;
+00052     case 4:
+00053        fp->f_flag &= ~FCNTLFLAGS;
+00054        fp->f_flag |= FFLAGS(uap->arg & ~O_ACCMODE) & FCNTLFLAGS;
+00055        break;
+00056     default:
+00057       kprintf("ERROR DEFAULT");
+00058     }
+00059 
+00060   return(0x0);
+00061   }
+00062 
+00063 int falloc(struct thread *td,struct file **resultfp, int *resultfd) {
+00064   struct file *fp = 0x0;
+00065   int i = 0;
+00066 
+00067   fp = (struct file *)kmalloc(sizeof(struct file));
+00068   /* First 5 Descriptors Are Reserved */
+00069   for (i = 5;i<1024;i++) {
+00070     if (td->o_files[i] == 0x0) {
+00071        td->o_files[i] = (uInt32)fp;
+00072        if (resultfd)
+00073          *resultfd = i;
+00074        if (resultfp)
+00075          *resultfp = fp;
+00076       break;
+00077       }
+00078     } 
+00079   return(0x0);
+00080   }
+00081 
+00082 int close(struct thread *td,struct close_args *uap) {
+00083   kfree((void *)td->o_files[uap->fd]);
+00084   td->o_files[uap->fd] = 0x0;
+00085   td->td_retval[0] = 0x0;  
+00086   return(0x0);
+00087   }
+00088 
+00089   /* HACK */
+00090 int getdtablesize(struct thread *td, struct getdtablesize_args *uap) {
+00091   td->td_retval[0] = 20;
+00092   return (0);
+00093   }
+00094 
+00095 /* HACK */
+00096 int fstat(struct thread *td,struct fstat_args *uap) {
+00097   struct file *fp = 0x0;
+00098   kprintf("fd: %i",uap->fd);
+00099   fp = _current->td.o_files[uap->fd]; 
+00100   uap->sb->st_mode    = 0x2180;
+00101   uap->sb->st_blksize = 0x1000;
+00102   return(0x0);
+00103   }
+00104 
+00105 int ioctl(struct thread *td, struct ioctl_args *uap) {
+00106   kprintf("ioctl HACK");
+00107   td->td_retval[0] = 0x0;
+00108   return(0x0);
+00109   }
+00110 
+00111 
+00112 
+00113 /***
+00114  END
+00115  ***/
+00116 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/kern__descrip_8c.html b/doc/html/kern__descrip_8c.html new file mode 100644 index 0000000..2448353 --- /dev/null +++ b/doc/html/kern__descrip_8c.html @@ -0,0 +1,272 @@ + + +UbixOS V2: src/sys/kernel/kern_descrip.c File Reference + + + + +
+
+
+
+ +

kern_descrip.c File Reference

+

+#include <sys/kern_descrip.h>
+#include <ubixos/types.h>
+#include <sys/sysproto.h>
+#include <sys/thread.h>
+#include <lib/kprintf.h>
+#include <ubixos/endtask.h>
+#include <lib/kmalloc.h>
+#include <assert.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + +

Functions

int close (struct thread *td, struct close_args *uap)
int falloc (struct thread *td, struct file **resultfp, int *resultfd)
int fcntl (struct thread *td, struct fcntl_args *uap)
int fstat (struct thread *td, struct fstat_args *uap)
int getdtablesize (struct thread *td, struct getdtablesize_args *uap)
int ioctl (struct thread *td, struct ioctl_args *uap)
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
int close (struct thread td,
struct close_args uap 
)
+
+
+ +

+ +

+Definition at line 82 of file kern_descrip.c. +

+References close_args::fd, kfree(), thread::o_files, and thread::td_retval. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int falloc (struct thread td,
struct file **  resultfp,
int *  resultfd 
)
+
+
+ +

+ +

+Definition at line 63 of file kern_descrip.c. +

+References kmalloc(), and thread::o_files. +

+Referenced by pipe(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int fcntl (struct thread td,
struct fcntl_args uap 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
int fstat (struct thread td,
struct fstat_args uap 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
int getdtablesize (struct thread td,
struct getdtablesize_args uap 
)
+
+
+ +

+ +

+Definition at line 90 of file kern_descrip.c. +

+References thread::td_retval. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int ioctl (struct thread td,
struct ioctl_args uap 
)
+
+
+ +

+ +

+Definition at line 105 of file kern_descrip.c. +

+References kprintf(), and thread::td_retval. +

+

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/kern__descrip_8h-source.html b/doc/html/kern__descrip_8h-source.html new file mode 100644 index 0000000..d31bb83 --- /dev/null +++ b/doc/html/kern__descrip_8h-source.html @@ -0,0 +1,198 @@ + + +UbixOS V2: src/sys/include/sys/kern_descrip.h Source File + + + + +
+
+
+
+ +

kern_descrip.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _KERN_DESCRIP_H
+00031 #define _KERN_DESCRIP_H
+00032 
+00033 #include <sys/thread.h>
+00034 #include <sys/sysproto.h>
+00035 
+00036 typedef  __mode_t        mode_t;
+00037 typedef  __nlink_t       nlink_t;
+00038 
+00039 /* command values */
+00040 #define F_DUPFD         0               /* duplicate file descriptor */
+00041 #define F_GETFD         1               /* get file descriptor flags */
+00042 #define F_SETFD         2               /* set file descriptor flags */
+00043 #define F_GETFL         3               /* get file status flags */
+00044 #define F_SETFL         4               /* set file status flags */
+00045 #define F_GETOWN        5               /* get SIGIO/SIGURG proc/pgrp */
+00046 #define F_SETOWN        6               /* set SIGIO/SIGURG proc/pgrp */
+00047 #define F_GETLK         7               /* get record locking information */
+00048 #define F_SETLK         8               /* set record locking information */
+00049 #define F_SETLKW        9               /* F_SETLK; wait if blocked */
+00050 
+00051 /* Flag Values */
+00052 #define FREAD           0x0001
+00053 #define FWRITE          0x0002
+00054 #define O_NONBLOCK      0x0004          /* no delay */
+00055 #define O_APPEND        0x0008          /* set append mode */
+00056 #define O_SHLOCK        0x0010          /* open with shared file lock */
+00057 #define O_EXLOCK        0x0020          /* open with exclusive file lock */
+00058 #define O_ASYNC         0x0040          /* signal pgrp when data ready */
+00059 #define O_FSYNC         0x0080          /* synchronous writes */
+00060 #define O_SYNC          0x0080          /* POSIX synonym for O_FSYNC */
+00061 #define O_NOFOLLOW      0x0100          /* don't follow symlinks */
+00062 #define O_CREAT         0x0200          /* create if nonexistent */
+00063 #define O_TRUNC         0x0400          /* truncate to zero length */
+00064 #define O_EXCL          0x0800          /* error if already exists */
+00065 #define O_DIRECT        0x00010000
+00066 #define O_RDONLY        0x0000          /* open for reading only */
+00067 #define O_WRONLY        0x0001          /* open for writing only */
+00068 #define O_RDWR          0x0002          /* open for reading and writing */
+00069 #define O_ACCMODE       0x0003          /* mask for above modes */
+00070 
+00071 
+00072 #define FHASLOCK        0x4000          /* descriptor holds advisory lock */
+00073 
+00074 
+00075 /* F MAPPERS */
+00076 #define FAPPEND         O_APPEND        /* kernel/compat */
+00077 #define FASYNC          O_ASYNC         /* kernel/compat */
+00078 #define FFSYNC          O_FSYNC         /* kernel */
+00079 #define FNONBLOCK       O_NONBLOCK      /* kernel */
+00080 #define FNDELAY         O_NONBLOCK      /* compat */
+00081 #define O_NDELAY        O_NONBLOCK      /* compat */
+00082 #define FPOSIXSHM       O_NOFOLLOW
+00083 
+00084 
+00085 
+00086 #define FCNTLFLAGS      (FAPPEND|FASYNC|FFSYNC|FNONBLOCK|FPOSIXSHM|O_DIRECT)
+00087 
+00088 #define FFLAGS(oflags)  ((oflags) + 1)
+00089 #define OFLAGS(fflags)  ((fflags) - 1)
+00090 
+00091 struct file {
+00092   int f_flag;
+00093   };
+00094 
+00095 /* TEMP */
+00096 struct __timespec {
+00097         __time_t tv_sec;        /* seconds */
+00098         long    tv_nsec;        /* and nanoseconds */
+00099 };
+00100 
+00101 struct stat {
+00102         __dev_t   st_dev;               /* inode's device */
+00103         ino_t     st_ino;               /* inode's number */
+00104         mode_t    st_mode;              /* inode protection mode */
+00105         nlink_t   st_nlink;             /* number of hard links */
+00106         uid_t     st_uid;               /* user ID of the file's owner */
+00107         gid_t     st_gid;               /* group ID of the file's group */
+00108         __dev_t   st_rdev;              /* device type */
+00109 #if __BSD_VISIBLE
+00110         struct  timespec st_atimespec;  /* time of last access */
+00111         struct  timespec st_mtimespec;  /* time of last data modification */
+00112         struct  timespec st_ctimespec;  /* time of last file status change */
+00113 #else
+00114         time_t    st_atime;             /* time of last access */
+00115         long      __st_atimensec;       /* nsec of last access */
+00116         time_t    st_mtime;             /* time of last data modification */
+00117         long      __st_mtimensec;       /* nsec of last data modification */
+00118         time_t    st_ctime;             /* time of last file status change */
+00119         long      __st_ctimensec;       /* nsec of last file status change */
+00120 #endif
+00121         off_t     st_size;              /* file size, in bytes */
+00122         blkcnt_t st_blocks;             /* blocks allocated for file */
+00123         blksize_t st_blksize;           /* optimal blocksize for I/O */
+00124         fflags_t  st_flags;             /* user defined flags for file */
+00125         __uint32_t st_gen;              /* file generation number */
+00126         __int32_t st_lspare;
+00127 #if __BSD_VISIBLE
+00128         struct timespec st_birthtimespec; /* time of file creation */
+00129         /*
+00130          * Explicitly pad st_birthtimespec to 16 bytes so that the size of
+00131          * struct stat is backwards compatible.  We use bitfields instead
+00132          * of an array of chars so that this doesn't require a C99 compiler
+00133          * to compile if the size of the padding is 0.  We use 2 bitfields
+00134          * to cover up to 64 bits on 32-bit machines.  We assume that
+00135          * CHAR_BIT is 8...
+00136          */
+00137         unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec));
+00138         unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec));
+00139 #else
+00140         time_t    st_birthtime;         /* time of file creation */
+00141         long      st_birthtimensec;     /* nsec of file creation */
+00142         unsigned int :(8 / 2) * (16 - (int)sizeof(struct __timespec));
+00143         unsigned int :(8 / 2) * (16 - (int)sizeof(struct __timespec));
+00144 #endif
+00145 };
+00146 
+00147 
+00148 int fcntl(struct thread *, struct fcntl_args *);
+00149 int close(struct thread *,struct close_args *);
+00150 int falloc(struct thread *, struct file **, int *);
+00151 int getdtablesize(struct thread *, struct getdtablesize_args *);
+00152 int fstat(struct thread *, struct fstat_args *);
+00153 int ioctl(struct thread *, struct ioctl_args *);
+00154 
+00155 
+00156 #endif
+00157 
+00158 /***
+00159  END
+00160  ***/
+00161 
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/kern__descrip_8h.html b/doc/html/kern__descrip_8h.html new file mode 100644 index 0000000..e41dfd2 --- /dev/null +++ b/doc/html/kern__descrip_8h.html @@ -0,0 +1,1066 @@ + + +UbixOS V2: src/sys/include/sys/kern_descrip.h File Reference + + + + +
+
+
+
+ +

kern_descrip.h File Reference

+

+#include <sys/thread.h>
+#include <sys/sysproto.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  __timespec
struct  file
struct  stat

Defines

#define F_DUPFD   0
#define F_GETFD   1
#define F_GETFL   3
#define F_GETLK   7
#define F_GETOWN   5
#define F_SETFD   2
#define F_SETFL   4
#define F_SETLK   8
#define F_SETLKW   9
#define F_SETOWN   6
#define FAPPEND   O_APPEND
#define FASYNC   O_ASYNC
#define FCNTLFLAGS   (FAPPEND|FASYNC|FFSYNC|FNONBLOCK|FPOSIXSHM|O_DIRECT)
#define FFLAGS(oflags)   ((oflags) + 1)
#define FFSYNC   O_FSYNC
#define FHASLOCK   0x4000
#define FNDELAY   O_NONBLOCK
#define FNONBLOCK   O_NONBLOCK
#define FPOSIXSHM   O_NOFOLLOW
#define FREAD   0x0001
#define FWRITE   0x0002
#define O_ACCMODE   0x0003
#define O_APPEND   0x0008
#define O_ASYNC   0x0040
#define O_CREAT   0x0200
#define O_DIRECT   0x00010000
#define O_EXCL   0x0800
#define O_EXLOCK   0x0020
#define O_FSYNC   0x0080
#define O_NDELAY   O_NONBLOCK
#define O_NOFOLLOW   0x0100
#define O_NONBLOCK   0x0004
#define O_RDONLY   0x0000
#define O_RDWR   0x0002
#define O_SHLOCK   0x0010
#define O_SYNC   0x0080
#define O_TRUNC   0x0400
#define O_WRONLY   0x0001
#define OFLAGS(fflags)   ((fflags) - 1)

Typedefs

typedef __mode_t mode_t
typedef __nlink_t nlink_t

Functions

int close (struct thread *, struct close_args *)
int falloc (struct thread *, struct file **, int *)
int fcntl (struct thread *, struct fcntl_args *)
int fstat (struct thread *, struct fstat_args *)
int getdtablesize (struct thread *, struct getdtablesize_args *)
int ioctl (struct thread *, struct ioctl_args *)
+


Define Documentation

+ +
+
+ + + + +
#define F_DUPFD   0
+
+
+ +

+ +

+Definition at line 40 of file kern_descrip.h. +

+

+ +

+
+ + + + +
#define F_GETFD   1
+
+
+ +

+ +

+Definition at line 41 of file kern_descrip.h. +

+

+ +

+
+ + + + +
#define F_GETFL   3
+
+
+ +

+ +

+Definition at line 43 of file kern_descrip.h. +

+

+ +

+
+ + + + +
#define F_GETLK   7
+
+
+ +

+ +

+Definition at line 47 of file kern_descrip.h. +

+

+ +

+
+ + + + +
#define F_GETOWN   5
+
+
+ +

+ +

+Definition at line 45 of file kern_descrip.h. +

+

+ +

+
+ + + + +
#define F_SETFD   2
+
+
+ +

+ +

+Definition at line 42 of file kern_descrip.h. +

+

+ +

+
+ + + + +
#define F_SETFL   4
+
+
+ +

+ +

+Definition at line 44 of file kern_descrip.h. +

+

+ +

+
+ + + + +
#define F_SETLK   8
+
+
+ +

+ +

+Definition at line 48 of file kern_descrip.h. +

+

+ +

+
+ + + + +
#define F_SETLKW   9
+
+
+ +

+ +

+Definition at line 49 of file kern_descrip.h. +

+

+ +

+
+ + + + +
#define F_SETOWN   6
+
+
+ +

+ +

+Definition at line 46 of file kern_descrip.h. +

+

+ +

+
+ + + + +
#define FAPPEND   O_APPEND
+
+
+ +

+ +

+Definition at line 76 of file kern_descrip.h. +

+

+ +

+
+ + + + +
#define FASYNC   O_ASYNC
+
+
+ +

+ +

+Definition at line 77 of file kern_descrip.h. +

+

+ +

+
+ + + + +
#define FCNTLFLAGS   (FAPPEND|FASYNC|FFSYNC|FNONBLOCK|FPOSIXSHM|O_DIRECT)
+
+
+ +

+ +

+Definition at line 86 of file kern_descrip.h. +

+Referenced by fcntl(). +

+

+ +

+
+ + + + + + + + + +
#define FFLAGS (oflags   )    ((oflags) + 1)
+
+
+ +

+ +

+Definition at line 88 of file kern_descrip.h. +

+Referenced by fcntl(). +

+

+ +

+
+ + + + +
#define FFSYNC   O_FSYNC
+
+
+ +

+ +

+Definition at line 78 of file kern_descrip.h. +

+

+ +

+
+ + + + +
#define FHASLOCK   0x4000
+
+
+ +

+ +

+Definition at line 72 of file kern_descrip.h. +

+

+ +

+
+ + + + +
#define FNDELAY   O_NONBLOCK
+
+
+ +

+ +

+Definition at line 80 of file kern_descrip.h. +

+

+ +

+
+ + + + +
#define FNONBLOCK   O_NONBLOCK
+
+
+ +

+ +

+Definition at line 79 of file kern_descrip.h. +

+

+ +

+
+ + + + +
#define FPOSIXSHM   O_NOFOLLOW
+
+
+ +

+ +

+Definition at line 82 of file kern_descrip.h. +

+

+ +

+
+ + + + +
#define FREAD   0x0001
+
+
+ +

+ +

+Definition at line 52 of file kern_descrip.h. +

+Referenced by pipe(). +

+

+ +

+
+ + + + +
#define FWRITE   0x0002
+
+
+ +

+ +

+Definition at line 53 of file kern_descrip.h. +

+Referenced by pipe(). +

+

+ +

+
+ + + + +
#define O_ACCMODE   0x0003
+
+
+ +

+ +

+Definition at line 69 of file kern_descrip.h. +

+Referenced by fcntl(). +

+

+ +

+
+ + + + +
#define O_APPEND   0x0008
+
+
+ +

+ +

+Definition at line 55 of file kern_descrip.h. +

+

+ +

+
+ + + + +
#define O_ASYNC   0x0040
+
+
+ +

+ +

+Definition at line 58 of file kern_descrip.h. +

+

+ +

+
+ + + + +
#define O_CREAT   0x0200
+
+
+ +

+ +

+Definition at line 62 of file kern_descrip.h. +

+

+ +

+
+ + + + +
#define O_DIRECT   0x00010000
+
+
+ +

+ +

+Definition at line 65 of file kern_descrip.h. +

+

+ +

+
+ + + + +
#define O_EXCL   0x0800
+
+
+ +

+ +

+Definition at line 64 of file kern_descrip.h. +

+

+ +

+
+ + + + +
#define O_EXLOCK   0x0020
+
+
+ +

+ +

+Definition at line 57 of file kern_descrip.h. +

+

+ +

+
+ + + + +
#define O_FSYNC   0x0080
+
+
+ +

+ +

+Definition at line 59 of file kern_descrip.h. +

+

+ +

+
+ + + + +
#define O_NDELAY   O_NONBLOCK
+
+
+ +

+ +

+Definition at line 81 of file kern_descrip.h. +

+

+ +

+
+ + + + +
#define O_NOFOLLOW   0x0100
+
+
+ +

+ +

+Definition at line 61 of file kern_descrip.h. +

+

+ +

+
+ + + + +
#define O_NONBLOCK   0x0004
+
+
+ +

+ +

+Definition at line 54 of file kern_descrip.h. +

+

+ +

+
+ + + + +
#define O_RDONLY   0x0000
+
+
+ +

+ +

+Definition at line 66 of file kern_descrip.h. +

+

+ +

+
+ + + + +
#define O_RDWR   0x0002
+
+
+ +

+ +

+Definition at line 68 of file kern_descrip.h. +

+

+ +

+
+ + + + +
#define O_SHLOCK   0x0010
+
+
+ +

+ +

+Definition at line 56 of file kern_descrip.h. +

+

+ +

+
+ + + + +
#define O_SYNC   0x0080
+
+
+ +

+ +

+Definition at line 60 of file kern_descrip.h. +

+

+ +

+
+ + + + +
#define O_TRUNC   0x0400
+
+
+ +

+ +

+Definition at line 63 of file kern_descrip.h. +

+

+ +

+
+ + + + +
#define O_WRONLY   0x0001
+
+
+ +

+ +

+Definition at line 67 of file kern_descrip.h. +

+

+ +

+
+ + + + + + + + + +
#define OFLAGS (fflags   )    ((fflags) - 1)
+
+
+ +

+ +

+Definition at line 89 of file kern_descrip.h. +

+

+


Typedef Documentation

+ +
+
+ + + + +
typedef __mode_t mode_t
+
+
+ +

+ +

+Definition at line 36 of file kern_descrip.h. +

+

+ +

+
+ + + + +
typedef __nlink_t nlink_t
+
+
+ +

+ +

+Definition at line 37 of file kern_descrip.h. +

+

+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
int close (struct thread,
struct close_args 
)
+
+
+ +

+ +

+Definition at line 82 of file kern_descrip.c. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int falloc (struct thread,
struct file ** ,
int *  
)
+
+
+ +

+ +

+Definition at line 63 of file kern_descrip.c. +

+References kmalloc(), and thread::o_files. +

+Referenced by pipe(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int fcntl (struct thread,
struct fcntl_args 
)
+
+
+ +

+ +

+Definition at line 39 of file kern_descrip.c. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int fstat (struct thread,
struct fstat_args 
)
+
+
+ +

+ +

+Definition at line 96 of file kern_descrip.c. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int getdtablesize (struct thread,
struct getdtablesize_args 
)
+
+
+ +

+ +

+Definition at line 90 of file kern_descrip.c. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int ioctl (struct thread,
struct ioctl_args 
)
+
+
+ +

+ +

+Definition at line 105 of file kern_descrip.c. +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/kern__sig_8c-source.html b/doc/html/kern__sig_8c-source.html new file mode 100644 index 0000000..cafaa58 --- /dev/null +++ b/doc/html/kern__sig_8c-source.html @@ -0,0 +1,89 @@ + + +UbixOS V2: src/sys/kernel/kern_sig.c Source File + + + + +
+
+
+
+ +

kern_sig.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <ubixos/types.h>
+00031 #include <sys/sysproto.h>
+00032 #include <sys/thread.h>
+00033 #include <sys/kern_sig.h>
+00034 #include <lib/kprintf.h>
+00035 #include <ubixos/endtask.h>
+00036 #include <lib/kmalloc.h>
+00037 #include <assert.h>
+00038 
+00039 int sigaction(struct thread *td,register struct sigaction_args *uap) {
+00040   return(0x0);
+00041   }
+00042 
+00043 int sigprocmask(register struct thread *td, struct sigprocmask_args *uap) {
+00044   return (0x0);
+00045   }
+00046 
+00047 
+00048 
+00049 /***
+00050  END
+00051  ***/
+00052 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/kern__sig_8c.html b/doc/html/kern__sig_8c.html new file mode 100644 index 0000000..c2ec483 --- /dev/null +++ b/doc/html/kern__sig_8c.html @@ -0,0 +1,120 @@ + + +UbixOS V2: src/sys/kernel/kern_sig.c File Reference + + + + +
+
+
+
+ +

kern_sig.c File Reference

+

+#include <ubixos/types.h>
+#include <sys/sysproto.h>
+#include <sys/thread.h>
+#include <sys/kern_sig.h>
+#include <lib/kprintf.h>
+#include <ubixos/endtask.h>
+#include <lib/kmalloc.h>
+#include <assert.h>
+ +

+Go to the source code of this file. + + + + + + +

Functions

int sigaction (struct thread *td, register struct sigaction_args *uap)
int sigprocmask (register struct thread *td, struct sigprocmask_args *uap)
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
int sigaction (struct thread td,
register struct sigaction_args uap 
)
+
+
+ +

+ +

+Definition at line 39 of file kern_sig.c. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int sigprocmask (register struct thread td,
struct sigprocmask_args uap 
)
+
+
+ +

+ +

+Definition at line 43 of file kern_sig.c. +

+

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/kern__sig_8h-source.html b/doc/html/kern__sig_8h-source.html new file mode 100644 index 0000000..c0c1f6a --- /dev/null +++ b/doc/html/kern__sig_8h-source.html @@ -0,0 +1,81 @@ + + +UbixOS V2: src/sys/include/sys/kern_sig.h Source File + + + + +
+
+
+
+ +

kern_sig.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _KERN_SIG_H
+00031 #define _KERN_SIG_H
+00032 
+00033 #include <sys/thread.h>
+00034 #include <sys/sysproto.h>
+00035 
+00036 int sigaction(struct thread *,struct sigaction_args *);
+00037 int sigprocmask(struct thread *, struct sigprocmask_args *);
+00038 
+00039 #endif
+00040 
+00041 /***
+00042  END
+00043  ***/
+00044 
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/kern__sig_8h.html b/doc/html/kern__sig_8h.html new file mode 100644 index 0000000..965ba76 --- /dev/null +++ b/doc/html/kern__sig_8h.html @@ -0,0 +1,110 @@ + + +UbixOS V2: src/sys/include/sys/kern_sig.h File Reference + + + + +
+
+
+
+ +

kern_sig.h File Reference

+

+#include <sys/thread.h>
+#include <sys/sysproto.h>
+ +

+Go to the source code of this file. + + + + + + +

Functions

int sigaction (struct thread *, struct sigaction_args *)
int sigprocmask (struct thread *, struct sigprocmask_args *)
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
int sigaction (struct thread,
struct sigaction_args 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int sigprocmask (struct thread,
struct sigprocmask_args 
)
+
+
+ +

+ +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/kern__sysctl_8c-source.html b/doc/html/kern__sysctl_8c-source.html new file mode 100644 index 0000000..684520b --- /dev/null +++ b/doc/html/kern__sysctl_8c-source.html @@ -0,0 +1,308 @@ + + +UbixOS V2: src/sys/kernel/kern_sysctl.c Source File + + + + +
+
+
+
+ +

kern_sysctl.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <sys/kern_sysctl.h>
+00031 #include <ubixos/types.h>
+00032 #include <ubixos/endtask.h>
+00033 #include <ubixos/kpanic.h>
+00034 #include <ubixos/spinlock.h>
+00035 #include <sys/thread.h>
+00036 #include <lib/kprintf.h>
+00037 #include <lib/kmalloc.h>
+00038 #include <assert.h>
+00039 #include <string.h>
+00040 
+00041 static struct sysctl_entry *ctls = 0x0;
+00042 static struct sysctl_entry *sysctl_find(int *,int);
+00043 
+00044 bool sysctl_enabled = FALSE;
+00045 
+00049 static void def_ctls() {
+00050   int name[CTL_MAXNAME], name_len;
+00051   uInt32 page_val = 0x1000;
+00052   name[0] = 6;
+00053   name[1] = 7;
+00054   name_len = 2; 
+00055   sysctl_add(name,name_len,"page_size",&page_val,sizeof(uInt32));
+00056   /* Clock Rate */
+00057   name[0] = 1;
+00058   name [1] = 12;
+00059   page_val = 0x3E8;
+00060   sysctl_add(name,name_len,"page_size",&page_val,sizeof(uInt32));
+00061   /* User Stack */
+00062   name[0] = 1;
+00063   name [1] = 33;
+00064   page_val = 0xCBE8000;
+00065   sysctl_add(name,name_len,"page_size",&page_val,sizeof(uInt32));
+00066   }
+00067 
+00069 
+00072 int sysctl_init() {
+00073   struct sysctl_entry *tmpCtl = 0x0;
+00074   if (ctls != 0x0)
+00075     K_PANIC("sysctl already Initialized\n");
+00076 
+00077   ctls = (struct sysctl_entry *)kmalloc(sizeof(struct sysctl_entry));
+00078   ctls->prev     = 0x0;
+00079   ctls->id       = CTL_UNSPEC;
+00080   ctls->children = 0x0;
+00081   sprintf(ctls->name,"unspec");
+00082 
+00083   tmpCtl = (struct sysctl_entry *)kmalloc(sizeof(struct sysctl_entry));
+00084   tmpCtl->prev     = ctls;
+00085   tmpCtl->id       = CTL_KERN;
+00086   tmpCtl->children = 0x0;
+00087   sprintf(tmpCtl->name,"kern");
+00088   ctls->next = tmpCtl;
+00089 
+00090   tmpCtl->next = (struct sysctl_entry *)kmalloc(sizeof(struct sysctl_entry));
+00091   tmpCtl->next->prev = tmpCtl;
+00092   tmpCtl             = tmpCtl->next;
+00093   tmpCtl->id         = CTL_VM;
+00094   tmpCtl->children   = 0x0;
+00095   sprintf(tmpCtl->name,"vm");
+00096 
+00097   tmpCtl->next = (struct sysctl_entry *)kmalloc(sizeof(struct sysctl_entry));
+00098   tmpCtl->next->prev = tmpCtl;
+00099   tmpCtl             = tmpCtl->next;
+00100   tmpCtl->id         = CTL_VFS;
+00101   tmpCtl->children   = 0x0;
+00102   sprintf(tmpCtl->name,"vfs");
+00103 
+00104   tmpCtl->next = (struct sysctl_entry *)kmalloc(sizeof(struct sysctl_entry));
+00105   tmpCtl->next->prev = tmpCtl;
+00106   tmpCtl             = tmpCtl->next;
+00107   tmpCtl->id         = CTL_NET;
+00108   tmpCtl->children   = 0x0;
+00109   sprintf(tmpCtl->name,"net");
+00110 
+00111   tmpCtl->next = (struct sysctl_entry *)kmalloc(sizeof(struct sysctl_entry));
+00112   tmpCtl->next->prev = tmpCtl;
+00113   tmpCtl             = tmpCtl->next;
+00114   tmpCtl->id         = CTL_DEBUG;
+00115   tmpCtl->children   = 0x0;
+00116   sprintf(tmpCtl->name,"debug");
+00117 
+00118   tmpCtl->next = (struct sysctl_entry *)kmalloc(sizeof(struct sysctl_entry));
+00119   tmpCtl->next->prev = tmpCtl;
+00120   tmpCtl             = tmpCtl->next;
+00121   tmpCtl->id         = CTL_HW;
+00122   tmpCtl->children   = 0x0;
+00123   sprintf(tmpCtl->name,"hw");
+00124 
+00125   tmpCtl->next = (struct sysctl_entry *)kmalloc(sizeof(struct sysctl_entry));
+00126   tmpCtl->next->prev = tmpCtl;
+00127   tmpCtl             = tmpCtl->next;
+00128   tmpCtl->id         = CTL_MACHDEP;
+00129   tmpCtl->children   = 0x0;
+00130   sprintf(tmpCtl->name,"machdep");
+00131 
+00132   tmpCtl->next = (struct sysctl_entry *)kmalloc(sizeof(struct sysctl_entry));
+00133   tmpCtl->next->prev = tmpCtl;
+00134   tmpCtl             = tmpCtl->next;
+00135   tmpCtl->id         = CTL_USER;
+00136   tmpCtl->children   = 0x0;
+00137   sprintf(tmpCtl->name,"user");
+00138 
+00139   tmpCtl->next = (struct sysctl_entry *)kmalloc(sizeof(struct sysctl_entry));
+00140   tmpCtl->next->prev = tmpCtl;
+00141   tmpCtl             = tmpCtl->next;
+00142   tmpCtl->id         = CTL_P1003_1B;
+00143   tmpCtl->children   = 0x0;
+00144   sprintf(tmpCtl->name,"p1003_1b");
+00145 
+00146   tmpCtl->next = (struct sysctl_enctry *)kmalloc(sizeof(struct sysctl_entry));
+00147   tmpCtl->next->prev = tmpCtl;
+00148   tmpCtl             = tmpCtl->next;
+00149   tmpCtl->id         = CTL_UBIX;
+00150   tmpCtl->children   = 0x0;
+00151   sprintf(tmpCtl->name,"ubix");
+00152 
+00154   def_ctls();
+00155 
+00156   sysctl_enabled = TRUE;
+00157 
+00158   return(0x0);
+00159   }
+00160 
+00161 int __sysctl(struct thread *td, struct sysctl_args *uap) {
+00162   int err = 0x0;
+00163   int name[CTL_MAXNAME];
+00164   size_t j = 0x0;
+00165 
+00169   if ((uap->namelen < 0x2) || (uap->namelen > CTL_MAXNAME)) {
+00170     return(EINVAL);
+00171     }
+00172 
+00176   err = memcpy(name,uap->name,uap->namelen * sizeof(int));
+00177   if (err)
+00178     return(err);
+00179   spinLock(&Master);
+00180 
+00181   kern_sysctl(td,name,uap->namelen, uap->old,uap->oldlenp,0x0,uap->new, uap->newlen, &j, 0x0);
+00182   spinUnlock(&Master);
+00183 
+00184   return(0x0);
+00185   }
+00186 
+00187 int kern_sysctl(struct thread *td,int *name,u_int namelen,void *old,size_t *oldlenp,int inkernel,void *new,size_t newlen,size_t *retval,int flags) {
+00188   struct sysctl_entry *tmpCtl = 0x0;
+00189   int i = 0;
+00190 
+00191   if (newlen < 0) {
+00192     kprintf("Changing Not supported yet.\n");
+00193     endTask(_current->id);
+00194     }
+00195 
+00196   tmpCtl = sysctl_find(name,namelen);
+00197   if (tmpCtl == 0x0) { 
+00198     kprintf("Invalid CTL\n");
+00199     for (i = 0x0;i < namelen;i++)
+00200       kprintf("(%i)",name[i]);
+00201     kprintf("\n");
+00202     endTask(_current->id);
+00203     }
+00204 
+00205   if (oldlenp < tmpCtl->val_len) 
+00206      memcpy(old,tmpCtl->value,oldlenp);
+00207   else
+00208      memcpy(old,tmpCtl->value,tmpCtl->val_len);
+00209 
+00210   td->td_retval[0] = 0x0;
+00211 
+00212   return(0x0);
+00213   }
+00214 
+00215 static struct sysctl_entry *sysctl_find(int *name,int namelen) {
+00216   int i = 0x0;
+00217   struct sysctl_entry *tmpCtl = 0x0;
+00218   struct sysctl_entry *lCtl = ctls;
+00219 
+00220   /* Loop Name Len */
+00221   for (i = 0; i < namelen;i++) {
+00222     for (tmpCtl = lCtl;tmpCtl != 0x0;tmpCtl = tmpCtl->next) {
+00223       //kprintf("ctlName: [%s], ctlId; [%i]\n",tmpCtl->name,tmpCtl->id);
+00224       if (tmpCtl->id == name[i]) {
+00225          if ((i+1) == namelen) {
+00226            return(tmpCtl);
+00227            }
+00228          lCtl = tmpCtl->children;
+00229          break;
+00230          }
+00231       }
+00232     }
+00233   return(0x0);
+00234   }
+00235 
+00236 int sysctl_add(int *name,int namelen,char *str_name,void *buf,int buf_size) {
+00237   struct sysctl_entry *tmpCtl = 0x0;
+00238   struct sysctl_entry *newCtl = 0x0;
+00239 
+00240   /* Check if it exists */
+00241   tmpCtl = sysctl_find(name,namelen);
+00242   if (tmpCtl != 0x0) {
+00243     kprintf("Node Exists!\n");
+00244     while (1);
+00245     }
+00246 
+00247   /* Get Parent Node */
+00248   tmpCtl = sysctl_find(name,namelen-1);
+00249   if (tmpCtl == 0x0) {
+00250     kprintf("Parent Node Non Existant\n");
+00251     return(-1);
+00252     }
+00253   if (tmpCtl->children == 0x0) {
+00254     tmpCtl->children = (struct sysctl_entry *)kmalloc(sizeof(struct sysctl_entry));
+00255     tmpCtl->children->children = 0x0;
+00256     tmpCtl->children->prev     = 0x0;
+00257     tmpCtl->children->next     = 0x0;
+00258     tmpCtl->children->id       = name[namelen-1];
+00259     sprintf(tmpCtl->children->name,str_name);
+00260     tmpCtl->children->value = (void  *)kmalloc(buf_size);
+00261     memcpy(tmpCtl->children->value,buf,buf_size);
+00262     tmpCtl->children->val_len = buf_size;
+00263     }
+00264   else {
+00265     newCtl = (struct sysctl_entry *)kmalloc(sizeof(struct sysctl_entry)); 
+00266     newCtl->prev     = 0x0;
+00267     newCtl->next     = tmpCtl->children;
+00268     newCtl->children = 0x0;
+00269     newCtl->id       = name[namelen-1];
+00270     sprintf(newCtl->name,str_name);
+00271     newCtl->value    = (void *)kmalloc(buf_size);
+00272     memcpy(newCtl->value,buf,buf_size);
+00273     newCtl->val_len  = buf_size;
+00274     tmpCtl->children->prev = newCtl;
+00275     tmpCtl->children = newCtl;
+00276     }
+00277 
+00278   return(0x0);
+00279   }
+00280 
+00281 
+00282 /***
+00283  END
+00284  ***/
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/kern__sysctl_8c.html b/doc/html/kern__sysctl_8c.html new file mode 100644 index 0000000..54089bc --- /dev/null +++ b/doc/html/kern__sysctl_8c.html @@ -0,0 +1,369 @@ + + +UbixOS V2: src/sys/kernel/kern_sysctl.c File Reference + + + + +
+
+
+
+ +

kern_sysctl.c File Reference

+

+#include <sys/kern_sysctl.h>
+#include <ubixos/types.h>
+#include <ubixos/endtask.h>
+#include <ubixos/kpanic.h>
+#include <ubixos/spinlock.h>
+#include <sys/thread.h>
+#include <lib/kprintf.h>
+#include <lib/kmalloc.h>
+#include <assert.h>
+#include <string.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + +

Functions

int __sysctl (struct thread *td, struct sysctl_args *uap)
static void def_ctls ()
int kern_sysctl (struct thread *td, int *name, u_int namelen, void *old, size_t *oldlenp, int inkernel, void *new, size_t newlen, size_t *retval, int flags)
int sysctl_add (int *name, int namelen, char *str_name, void *buf, int buf_size)
static struct sysctl_entrysysctl_find (int *, int)
int sysctl_init ()
 sysctl initialization routine

Variables

static struct sysctl_entryctls = 0x0
bool sysctl_enabled = FALSE
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
int __sysctl (struct thread td,
struct sysctl_args uap 
)
+
+ +

+ +

+
+ + + + + + + + +
static void def_ctls (  )  [static]
+
+
+ +

+This is a cheat for now it set ups some default CTL information +

+Definition at line 49 of file kern_sysctl.c. +

+References CTL_MAXNAME, name, and sysctl_add(). +

+Referenced by sysctl_init(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int kern_sysctl (struct thread td,
int *  name,
u_int  namelen,
void *  old,
size_t oldlenp,
int  inkernel,
void *  new,
size_t  newlen,
size_t retval,
int  flags 
)
+
+
+ +

+ +

+Definition at line 187 of file kern_sysctl.c. +

+References _current, endTask(), taskStruct::id, kprintf(), memcpy(), sysctl_find(), thread::td_retval, sysctl_entry::val_len, and sysctl_entry::value. +

+Referenced by __sysctl(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int sysctl_add (int *  name,
int  namelen,
char *  str_name,
void *  buf,
int  buf_size 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
static struct sysctl_entry * sysctl_find (int * ,
int  
) [static]
+
+
+ +

+ +

+Definition at line 215 of file kern_sysctl.c. +

+References sysctl_entry::children, ctls, sysctl_entry::id, and sysctl_entry::next. +

+Referenced by kern_sysctl(), and sysctl_add(). +

+

+ +

+
+ + + + + + + + +
int sysctl_init (  ) 
+
+
+ +

+sysctl initialization routine +

+This routine initializes the top level ctl information +

+Temporary place for setting up default ctls +

+Definition at line 72 of file kern_sysctl.c. +

+References sysctl_entry::children, CTL_DEBUG, CTL_HW, CTL_KERN, CTL_MACHDEP, CTL_NET, CTL_P1003_1B, CTL_UBIX, CTL_UNSPEC, CTL_USER, CTL_VFS, CTL_VM, ctls, def_ctls(), sysctl_entry::id, K_PANIC, kmalloc(), sysctl_entry::name, sysctl_entry::next, sysctl_entry::prev, sprintf(), sysctl_enabled, and TRUE. +

+

+


Variable Documentation

+ +
+
+ + + + +
struct sysctl_entry* ctls = 0x0 [static]
+
+
+ +

+ +

+Definition at line 41 of file kern_sysctl.c. +

+Referenced by sysctl_find(), and sysctl_init(). +

+

+ +

+
+ + + + +
bool sysctl_enabled = FALSE
+
+
+ +

+ +

+Definition at line 44 of file kern_sysctl.c. +

+Referenced by sysctl_init(), and vmmFindFreePage(). +

+

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/kern__sysctl_8h-source.html b/doc/html/kern__sysctl_8h-source.html new file mode 100644 index 0000000..f0663b5 --- /dev/null +++ b/doc/html/kern__sysctl_8h-source.html @@ -0,0 +1,107 @@ + + +UbixOS V2: src/sys/include/sys/kern_sysctl.h Source File + + + + +
+
+
+
+ +

kern_sysctl.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _KERNSYSCTL_H
+00031 #define _KERNSYSCTL_H
+00032 
+00033 #include <sys/thread.h>
+00034 #include <sys/sysproto.h>
+00035 
+00036 #define CTL_MAXNAME     24      /* largest number of components supported */
+00037 
+00038 /*
+00039  * Top-level identifiers
+00040  */
+00041 #define CTL_UNSPEC      0               /* unused */
+00042 #define CTL_KERN        1               /* "high kernel": proc, limits */
+00043 #define CTL_VM          2               /* virtual memory */
+00044 #define CTL_VFS         3               /* filesystem, mount type is next */
+00045 #define CTL_NET         4               /* network, see socket.h */
+00046 #define CTL_DEBUG       5               /* debugging parameters */
+00047 #define CTL_HW          6               /* generic cpu/io */
+00048 #define CTL_MACHDEP     7               /* machine dependent */
+00049 #define CTL_USER        8               /* user-level */
+00050 #define CTL_P1003_1B    9               /* POSIX 1003.1B */
+00051 #define CTL_UBIX       10               /* ubixos */
+00052 
+00053 #define EINVAL         -1               /* */
+00054 
+00055 struct sysctl_entry {
+00056   struct sysctl_entry *prev;
+00057   struct sysctl_entry *next;
+00058   struct sysctl_entry *children;
+00059   char                 name[32];
+00060   int                  id;
+00061   void                *value;
+00062   int                  val_len;
+00063   };
+00064 
+00065 #endif
+00066 
+00067 /***
+00068  END
+00069  ***/
+00070 
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/kern__sysctl_8h.html b/doc/html/kern__sysctl_8h.html new file mode 100644 index 0000000..208514e --- /dev/null +++ b/doc/html/kern__sysctl_8h.html @@ -0,0 +1,324 @@ + + +UbixOS V2: src/sys/include/sys/kern_sysctl.h File Reference + + + + +
+
+
+
+ +

kern_sysctl.h File Reference

+

+#include <sys/thread.h>
+#include <sys/sysproto.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  sysctl_entry

Defines

#define CTL_DEBUG   5
#define CTL_HW   6
#define CTL_KERN   1
#define CTL_MACHDEP   7
#define CTL_MAXNAME   24
#define CTL_NET   4
#define CTL_P1003_1B   9
#define CTL_UBIX   10
#define CTL_UNSPEC   0
#define CTL_USER   8
#define CTL_VFS   3
#define CTL_VM   2
#define EINVAL   -1
+


Define Documentation

+ +
+
+ + + + +
#define CTL_DEBUG   5
+
+
+ +

+ +

+Definition at line 46 of file kern_sysctl.h. +

+Referenced by sysctl_init(). +

+

+ +

+
+ + + + +
#define CTL_HW   6
+
+
+ +

+ +

+Definition at line 47 of file kern_sysctl.h. +

+Referenced by sysctl_init(). +

+

+ +

+
+ + + + +
#define CTL_KERN   1
+
+
+ +

+ +

+Definition at line 42 of file kern_sysctl.h. +

+Referenced by sysctl_init(). +

+

+ +

+
+ + + + +
#define CTL_MACHDEP   7
+
+
+ +

+ +

+Definition at line 48 of file kern_sysctl.h. +

+Referenced by sysctl_init(). +

+

+ +

+
+ + + + +
#define CTL_MAXNAME   24
+
+
+ +

+ +

+Definition at line 36 of file kern_sysctl.h. +

+Referenced by __sysctl(), and def_ctls(). +

+

+ +

+
+ + + + +
#define CTL_NET   4
+
+
+ +

+ +

+Definition at line 45 of file kern_sysctl.h. +

+Referenced by sysctl_init(). +

+

+ +

+
+ + + + +
#define CTL_P1003_1B   9
+
+
+ +

+ +

+Definition at line 50 of file kern_sysctl.h. +

+Referenced by sysctl_init(). +

+

+ +

+
+ + + + +
#define CTL_UBIX   10
+
+
+ +

+ +

+Definition at line 51 of file kern_sysctl.h. +

+Referenced by sysctl_init(). +

+

+ +

+
+ + + + +
#define CTL_UNSPEC   0
+
+
+ +

+ +

+Definition at line 41 of file kern_sysctl.h. +

+Referenced by sysctl_init(). +

+

+ +

+
+ + + + +
#define CTL_USER   8
+
+
+ +

+ +

+Definition at line 49 of file kern_sysctl.h. +

+Referenced by sysctl_init(). +

+

+ +

+
+ + + + +
#define CTL_VFS   3
+
+
+ +

+ +

+Definition at line 44 of file kern_sysctl.h. +

+Referenced by sysctl_init(). +

+

+ +

+
+ + + + +
#define CTL_VM   2
+
+
+ +

+ +

+Definition at line 43 of file kern_sysctl.h. +

+Referenced by sysctl_init(). +

+

+ +

+
+ + + + +
#define EINVAL   -1
+
+
+ +

+ +

+Definition at line 53 of file kern_sysctl.h. +

+Referenced by __sysctl(). +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/kmalloc_8c-source.html b/doc/html/kmalloc_8c-source.html new file mode 100644 index 0000000..b60743c --- /dev/null +++ b/doc/html/kmalloc_8c-source.html @@ -0,0 +1,585 @@ + + +UbixOS V2: src/sys/lib/kmalloc.c Source File + + + + +
+
+
+
+ +

kmalloc.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <lib/kmalloc.h>
+00031 #include <lib/kprintf.h>
+00032 #include <ubixos/kpanic.h>
+00033 #include <ubixos/sched.h>
+00034 #include <ubixos/spinlock.h>
+00035 #include <vmm/vmm.h>
+00036 #include <string.h>
+00037 #include <assert.h>
+00038 
+00039 /*
+00040  Set up three descriptor tables:
+00041  
+00042  kernDesc      - The inuse descriptor table 
+00043  freeKernDesc  - The free descriptor table (descriptors with memory backing just not in use)
+00044  emptyKernDesc - The empty descriptor table (descriptors with out a memory backing)
+00045  
+00046 */
+00047 static struct memDescriptor *usedKernDesc  = 0x0;
+00048 static struct memDescriptor *freeKernDesc  = 0x0;
+00049 static struct memDescriptor *emptyKernDesc = 0x0;
+00050 
+00051 /*
+00052  Set up our spinlocks so we do not corrupt linked lists if we have re-entrancy
+00053 */
+00054 static spinLock_t mallocSpinLock    = SPIN_LOCK_INITIALIZER;
+00055 static spinLock_t emptyDescSpinLock = SPIN_LOCK_INITIALIZER;
+00056 
+00057 /************************************************************************
+00058 
+00059 Function: void *getEmptyDesc()
+00060 Description: Find An Empty Descriptor
+00061 
+00062 Notes:
+00063 
+00064 02/17/03 - Is This Efficient?
+00065 
+00066 ************************************************************************/    
+00067 static void *getEmptyDesc() {
+00068   int i = 0x0;
+00069   struct memDescriptor *tmpDesc = 0x0;
+00070 
+00071   spinLock(&emptyDescSpinLock);
+00072   
+00073   tmpDesc = emptyKernDesc;
+00074   
+00075   if (tmpDesc != 0x0) {
+00076     emptyKernDesc       = tmpDesc->next;
+00077     if (emptyKernDesc != 0x0) 
+00078       emptyKernDesc->prev = 0x0;
+00079       
+00080      
+00081     tmpDesc->next       = 0x0;
+00082     tmpDesc->prev       = 0x0;
+00083     spinUnlock(&emptyDescSpinLock);
+00084     return(tmpDesc);
+00085     }
+00086 
+00087   if ((emptyKernDesc = (struct memDescriptor *)vmm_getFreeMallocPage(4)) == 0x0)
+00088     kpanic("Error: vmmGetFreeKernelPage returned NULL\n");
+00089     
+00090   /* zero out the memory so we know there is no garbage */
+00091   memset(emptyKernDesc,0x0,0x4000);
+00092 
+00093   emptyKernDesc[0].next = &emptyKernDesc[1];
+00094 
+00095   for (i = 0x1;i < ((0x4000/sizeof(struct memDescriptor)));i++) {
+00096     if (i+1 < (0x4000/sizeof(struct memDescriptor)))
+00097       emptyKernDesc[i].next = &emptyKernDesc[i+1];
+00098     else
+00099       emptyKernDesc[i].next = 0x0;
+00100     emptyKernDesc[i].prev = &emptyKernDesc[i-1];
+00101     }
+00102 
+00103   tmpDesc = &emptyKernDesc[0];
+00104 
+00105   emptyKernDesc       = tmpDesc->next;
+00106   emptyKernDesc->prev = 0x0;
+00107   tmpDesc->next       = 0x0;
+00108   tmpDesc->prev       = 0x0;
+00109   spinUnlock(&emptyDescSpinLock);
+00110   return(tmpDesc);
+00111   }
+00112 
+00113 /************************************************************************
+00114 
+00115 Function: void insertFreeDesc(struct memDescriptor *freeDesc)
+00116 Description: This Function Inserts A Free Descriptor On The List Which Is
+00117              Kept In Size Order
+00118 
+00119 Notes:
+00120 
+00121 02/17/03 - This Was Inspired By TCA's Great Wisdom -
+00122            "[20:20:59] <TCA> You should just insert it in order"
+00123 
+00124 ************************************************************************/
+00125 static int insertFreeDesc(struct memDescriptor *freeDesc) {
+00126   struct memDescriptor *tmpDesc = 0x0;
+00127   assert(freeDesc);
+00128   
+00129   if (freeDesc->limit <= 0x0)
+00130     kpanic("Inserting Descriptor with no limit\n");
+00131   
+00132   if (freeKernDesc != 0x0) {
+00133  
+00134     #if 0
+00135     freeDesc->next = freeKernDesc;
+00136     freeDesc->prev = 0x0;
+00137     freeKernDesc->prev = freeDesc;
+00138     freeKernDesc = freeDesc;
+00139     #endif 
+00140     
+00141     for (tmpDesc = freeKernDesc;tmpDesc != 0x0;tmpDesc = tmpDesc->next) {
+00142       if (freeDesc->limit <= tmpDesc->limit) {
+00143       
+00144         freeDesc->prev = tmpDesc->prev;
+00145         if (tmpDesc->prev != 0x0)
+00146           tmpDesc->prev->next = freeDesc;
+00147 
+00148         
+00149         tmpDesc->prev  = freeDesc;
+00150         freeDesc->next = tmpDesc;
+00151         
+00152         if (tmpDesc == freeKernDesc)
+00153           freeKernDesc = freeDesc;
+00154         return(0x0);
+00155         }
+00156        if (tmpDesc->next == 0x0) {
+00157          tmpDesc->next = freeDesc;
+00158          freeDesc->prev = tmpDesc;
+00159          freeDesc->next = 0x0;
+00160          return(0x0);
+00161          }
+00162       }
+00163     kpanic("didnt Insert\n");
+00164     return(0x0);
+00165     }
+00166   else {
+00167     freeDesc->prev = 0x0;
+00168     freeDesc->next = 0x0;
+00169     freeKernDesc = freeDesc;
+00170     return(0x0);
+00171     }
+00172 
+00173   return(0x1);
+00174   }
+00175 
+00176 /************************************************************************
+00177 
+00178 Function: void mergeMemBlocks()
+00179 Description: This Function Will Merge Free Blocks And Free Pages
+00180 
+00181 Notes:
+00182 
+00183 03/05/03 - We Have A Problem It Seems The First Block Is Limit 0x0
+00184 
+00185 ************************************************************************/
+00186 static void mergeMemBlocks() {
+00187   struct memDescriptor *tmpDesc1 = 0x0;
+00188   struct memDescriptor *tmpDesc2 = 0x0;
+00189   uInt32               baseAddr  = 0x0;
+00190 
+00191   return;
+00192 
+00193   //Loop The Free Descriptors See If We Can Merge Them
+00194   mergeStart:
+00195   for (tmpDesc1=freeKernDesc;tmpDesc1 != 0x0;tmpDesc1=tmpDesc1->next) {
+00196     /*
+00197      Compare The Base Addr With The Other Descriptors If You Find The One
+00198      That You Are Looking For Lets Merge Them
+00199     */
+00200     if (tmpDesc1->limit != 0x0) {
+00201       baseAddr = (uInt32)tmpDesc1->baseAddr + (uInt32)tmpDesc1->limit;
+00202       for (tmpDesc2=freeKernDesc;tmpDesc2;tmpDesc2=tmpDesc2->next) {
+00203         if ((uInt32)tmpDesc2->baseAddr == baseAddr) {
+00204           tmpDesc1->limit += tmpDesc2->limit;
+00205           tmpDesc2->baseAddr = 0x0;
+00206           tmpDesc2->limit    = 0x0;
+00207           if (tmpDesc2->prev) {
+00208             tmpDesc2->prev->next = tmpDesc2->next;
+00209             }
+00210           if (tmpDesc2->next) {
+00211             tmpDesc2->next->prev = tmpDesc2->prev;
+00212             }
+00213           tmpDesc2->prev      = 0x0;
+00214           tmpDesc2->next      = emptyKernDesc;
+00215           emptyKernDesc->prev = tmpDesc2;
+00216           emptyKernDesc       = tmpDesc2;
+00217           if (tmpDesc1->prev) {
+00218             tmpDesc1->prev->next = tmpDesc1->next;
+00219             }
+00220           if (tmpDesc1->next) {
+00221             tmpDesc1->next->prev = tmpDesc1->prev;
+00222             }
+00223           tmpDesc1->prev = 0x0;
+00224           tmpDesc1->next = 0x0;
+00225           kprintf("mergememBlocks: [%i]\n",tmpDesc1->limit);
+00226           insertFreeDesc(tmpDesc1);
+00227           //tmpDesc1 = freeKernDesc;
+00228           goto mergeStart;
+00229           break;
+00230           }
+00231         }
+00232       }
+00233     }
+00234   return;
+00235   }
+00236 
+00237 
+00238 /************************************************************************
+00239 
+00240 Function: void *kmalloc(uInt32 len)
+00241 Description: Allocate Kernel Memory
+00242 
+00243 Notes:
+00244 
+00245 02/17/03 - Do I Still Need To Pass In The Pid?
+00246 
+00247 ************************************************************************/    
+00248 void *kmalloc(uInt32 len) {
+00249   struct memDescriptor *tmpDesc1 = 0x0;
+00250   struct memDescriptor *tmpDesc2 = 0x0;
+00251   char                 *buf      = 0x0;
+00252   int                   i        = 0x0;
+00253   uInt16                pages    = 0x0;
+00254 
+00255   spinLock(&mallocSpinLock);
+00256   
+00257   len = MALLOC_ALIGN(len);
+00258   
+00259   if (len == 0x0) {
+00260     spinUnlock(&mallocSpinLock);
+00261         kprintf("kmalloc: len = 0!\n");
+00262     return(0x0);
+00263     }
+00264   for (tmpDesc1 = freeKernDesc;tmpDesc1 != 0x0;tmpDesc1=tmpDesc1->next) {
+00265     assert(tmpDesc1);
+00266     if (tmpDesc1->limit >= len) {
+00267       if (tmpDesc1->prev != 0x0)
+00268         tmpDesc1->prev->next = tmpDesc1->next;
+00269       if (tmpDesc1->next != 0x0)
+00270         tmpDesc1->next->prev = tmpDesc1->prev;
+00271 
+00272       if (tmpDesc1 == freeKernDesc)
+00273         freeKernDesc = tmpDesc1->next;
+00274 
+00275       tmpDesc1->prev = 0x0;
+00276       tmpDesc1->next = usedKernDesc;
+00277       if (usedKernDesc != 0x0)
+00278         usedKernDesc->prev = tmpDesc1;
+00279       usedKernDesc = tmpDesc1; 
+00280       if (tmpDesc1->limit > len) {
+00281         tmpDesc2 = getEmptyDesc();
+00282         assert(tmpDesc2);
+00283         tmpDesc2->limit = tmpDesc1->limit - len;
+00284         tmpDesc1->limit = len;
+00285         tmpDesc2->baseAddr = tmpDesc1->baseAddr + len;
+00286         tmpDesc2->next = 0x0;
+00287         tmpDesc2->prev = 0x0;
+00288         insertFreeDesc(tmpDesc2);
+00289         }
+00290       buf = (char *)tmpDesc1->baseAddr;
+00291       for (i=0;i<tmpDesc1->limit;i++) {
+00292         (char)buf[i] = (char)0x0;
+00293         }
+00294       spinUnlock(&mallocSpinLock);
+00295       //kprintf("m1[%i:%i:0x%X]",tmpDesc1->limit,len,tmpDesc1->baseAddr);
+00296         assert(tmpDesc1->baseAddr);
+00297       return(tmpDesc1->baseAddr);
+00298       }
+00299     }
+00300   tmpDesc1 = getEmptyDesc();
+00301   //kprintf("no empty desc\n");
+00302   if (tmpDesc1 != 0x0) {
+00303     pages = ((len + 4095)/4096);
+00304     tmpDesc1->baseAddr = (struct memDescriptor *)vmm_getFreeMallocPage(pages);
+00305     tmpDesc1->limit    = len;
+00306     tmpDesc1->next     = usedKernDesc;
+00307     tmpDesc1->prev     = 0x0;
+00308     if (usedKernDesc != 0x0)
+00309       usedKernDesc->prev       = tmpDesc1;
+00310     usedKernDesc             = tmpDesc1;
+00311 
+00312     if (((pages * 4096)-len) > 0x0) {
+00313       tmpDesc2           = getEmptyDesc();
+00314       assert(tmpDesc2);
+00315       tmpDesc2->baseAddr = tmpDesc1->baseAddr + tmpDesc1->limit;
+00316       tmpDesc2->limit    = ((pages * 4096)-len);
+00317       tmpDesc2->prev     = 0x0;
+00318       tmpDesc2->next     = 0x0;
+00319       if (tmpDesc2->limit <= 0x0)
+00320         kprintf("kmalloc-2 tmpDesc2: [%i]\n",tmpDesc2->limit);
+00321       insertFreeDesc(tmpDesc2);
+00322       }
+00323 
+00324       buf = (char *)tmpDesc1->baseAddr;
+00325       for (i=0;i<tmpDesc1->limit;i++) {
+00326         (char)buf[i] = (char)0x0;
+00327         }
+00328     spinUnlock(&mallocSpinLock);
+00329     //kprintf("baseAddr2[0x%X:0x%X]",tmpDesc1,tmpDesc1->baseAddr);
+00330     //kprintf("m2[%i:%i:0x%X]",tmpDesc1->limit,len,tmpDesc1->baseAddr);
+00331         assert(tmpDesc1->baseAddr);
+00332     return(tmpDesc1->baseAddr);
+00333     }
+00334   //Return Null If Unable To Malloc
+00335   spinUnlock(&mallocSpinLock);
+00336   //kprintf("baseAddr3[0x0]");
+00337   return(0x0);
+00338   }
+00339   
+00340 /************************************************************************
+00341 
+00342 Function: void kfree(void *baseAddr)
+00343 Description: This Will Find The Descriptor And Free It
+00344 
+00345 Notes:
+00346 
+00347 02/17/03 - I need To Make It Join Descriptors
+00348 
+00349 ************************************************************************/
+00350 void kfree(void *baseAddr) {
+00351   struct memDescriptor *tmpDesc = 0x0;
+00352 
+00353   if (baseAddr == 0x0) return; 
+00354   assert(baseAddr);
+00355 
+00356   assert(usedKernDesc);
+00357   spinLock(&mallocSpinLock);
+00358   
+00359   for (tmpDesc = usedKernDesc;tmpDesc != 0x0;tmpDesc = tmpDesc->next) {
+00360     
+00361     if (tmpDesc->baseAddr == baseAddr) {
+00362       memset(tmpDesc->baseAddr,0xBE,tmpDesc->limit);
+00363     
+00364       if (usedKernDesc == tmpDesc)
+00365         usedKernDesc = tmpDesc->next;
+00366 
+00367       if (tmpDesc->prev != 0x0)
+00368         tmpDesc->prev->next = tmpDesc->next;
+00369 
+00370       if (tmpDesc->next != 0x0)
+00371         tmpDesc->next->prev = tmpDesc->prev;
+00372 
+00373 
+00374       tmpDesc->next = 0x0;
+00375       tmpDesc->prev = 0x0;
+00376       
+00377       if (tmpDesc->limit <= 0x0)
+00378         kprintf("kfree tmpDesc1: [%i]\n",tmpDesc->limit);
+00379       //kprintf("{0x%X}",tmpDesc->baseAddr);
+00380       insertFreeDesc(tmpDesc);
+00381 
+00382      // mergeMemBlocks();
+00383       spinUnlock(&mallocSpinLock);
+00384       return;
+00385       }
+00386     }
+00387   spinUnlock(&mallocSpinLock);
+00388   kprintf("Kernel: Error Freeing Descriptor! [0x%X]\n",(uInt32)baseAddr);
+00389   return;
+00390   }
+00391 
+00392 /***
+00393  $Log$
+00394  Revision 1.2  2006/10/06 15:48:01  reddawg
+00395  Starting to make ubixos work with UFS2
+00396 
+00397  Revision 1.1.1.1  2006/06/01 12:46:16  reddawg
+00398  ubix2
+00399 
+00400  Revision 1.4  2006/06/01 12:42:09  reddawg
+00401  Getting back to the basics
+00402 
+00403  Revision 1.3  2006/06/01 03:58:33  reddawg
+00404  wondering about this stuff here
+00405 
+00406  Revision 1.2  2005/10/12 00:13:37  reddawg
+00407  Removed
+00408 
+00409  Revision 1.1.1.1  2005/09/26 17:24:11  reddawg
+00410  no message
+00411 
+00412  Revision 1.35  2005/08/04 18:32:59  fsdfs
+00413 
+00414  added error reporting
+00415 
+00416  Revision 1.34  2005/08/04 18:23:41  reddawg
+00417  BUG: Assert has issues that must be looked into
+00418 
+00419  Revision 1.33  2005/08/04 17:11:11  fsdfs
+00420 
+00421  ----------------------------------------
+00422 
+00423  -------------------
+00424 
+00425  Revision 1.32  2004/09/28 21:50:04  reddawg
+00426  kmalloc: now when we kfree memory is filled with 0xBE so it is easy to debug if we continue to use free'd memory
+00427 
+00428  Revision 1.31  2004/09/19 16:17:25  reddawg
+00429  fixed memory leak we now lose no memory....
+00430 
+00431  Revision 1.30  2004/09/14 21:51:24  reddawg
+00432  Debug info
+00433 
+00434  Revision 1.29  2004/09/11 23:39:31  reddawg
+00435  ok time for bed
+00436 
+00437  Revision 1.28  2004/09/11 23:21:26  reddawg
+00438  run now do you get fegfaults with BB?
+00439 
+00440  Revision 1.27  2004/09/11 22:49:28  reddawg
+00441  pat look at lines 276-285  does the math seem right?
+00442 
+00443  Revision 1.26  2004/09/11 22:33:13  reddawg
+00444  minor changes
+00445 
+00446  Revision 1.25  2004/09/11 12:11:11  reddawg
+00447  Cleaning up the VFS more changes to follow...
+00448 
+00449  Revision 1.24  2004/09/08 23:19:58  reddawg
+00450  hmm
+00451 
+00452  Revision 1.23  2004/09/06 15:13:25  reddawg
+00453  Last commit before FreeBSD 6.0
+00454 
+00455  Revision 1.22  2004/08/26 22:51:18  reddawg
+00456  TCA touched me :( i think he likes men....
+00457 
+00458 
+00459  sched.h:        kTask_t added parentPid
+00460  endtask.c:     fixed term back to parentPid
+00461  exec.c:          cleaned warnings
+00462  fork.c:            fixed term to childPid
+00463  sched.c:         clean up for dead tasks
+00464  systemtask.c: clean up dead tasks
+00465  kmalloc.c:       cleaned up warnings
+00466  udp.c:            cleaned up warnings
+00467  bot.c:             cleaned up warnings
+00468  shell.c:           cleaned up warnings
+00469  tcpdump.c:     took a dump
+00470  hd.c:             cleaned up warnings
+00471  ubixfs.c:        stopped prning debug info
+00472 
+00473  Revision 1.21  2004/07/28 15:05:43  reddawg
+00474  Major:
+00475    Pages now have strict security enforcement.
+00476    Many null dereferences have been resolved.
+00477    When apps loaded permissions set for pages rw and ro
+00478 
+00479  Revision 1.20  2004/07/28 00:17:05  reddawg
+00480  Major:
+00481    Disconnected page 0x0 from the system... Unfortunately this broke many things
+00482    all of which have been fixed. This was good because nothing deferences NULL
+00483    any more.
+00484 
+00485  Things affected:
+00486    malloc,kmalloc,getfreepage,getfreevirtualpage,pagefault,fork,exec,ld,ld.so,exec,file
+00487 
+00488  Revision 1.19  2004/07/26 19:15:49  reddawg
+00489  test code, fixes and the like
+00490 
+00491  Revision 1.18  2004/07/26 16:52:45  reddawg
+00492  here we go
+00493 
+00494  Revision 1.17  2004/07/24 23:04:44  reddawg
+00495  Changes... mark let me know if you fault at pid 185 when you type stress
+00496 
+00497  Revision 1.16  2004/07/21 10:02:09  reddawg
+00498  devfs: renamed functions
+00499  device system: renamed functions
+00500  fdc: fixed a few potential bugs and cleaned up some unused variables
+00501  strol: fixed definition
+00502  endtask: made it print out freepage debug info
+00503  kmalloc: fixed a huge memory leak we had some unhandled descriptor insertion so some descriptors were lost
+00504  ld: fixed a pointer conversion
+00505  file: cleaned up a few unused variables
+00506  sched: broke task deletion
+00507  kprintf: fixed ogPrintf definition
+00508 
+00509  Revision 1.15  2004/07/20 23:20:50  reddawg
+00510  kmalloc: forgot to remove an assert
+00511 
+00512  Revision 1.14  2004/07/20 23:18:11  reddawg
+00513  Made malloc a little more robust but we have a serious memory leak somewhere
+00514 
+00515  Revision 1.13  2004/07/20 22:29:55  reddawg
+00516  assert: remade assert
+00517 
+00518  Revision 1.12  2004/07/20 18:58:24  reddawg
+00519  Few fixes
+00520 
+00521  Revision 1.11  2004/07/18 05:24:15  reddawg
+00522  Fixens
+00523 
+00524  Revision 1.10  2004/07/17 18:00:47  reddawg
+00525  kmalloc: added assert()
+00526 
+00527  Revision 1.9  2004/07/17 15:54:52  reddawg
+00528  kmalloc: added assert()
+00529  bioscall: fixed some potential problem by not making 16bit code
+00530  paging: added assert()
+00531 
+00532  Revision 1.8  2004/06/17 14:50:32  reddawg
+00533  kmalloc: converted some variables to static
+00534 
+00535  Revision 1.7  2004/06/17 02:54:54  flameshadow
+00536  chg: fixed cast
+00537 
+00538  Revision 1.6  2004/05/26 11:56:51  reddawg
+00539  kmalloc: fixed memrgeMemBlocks hopefully it will prevent future segfault issues
+00540           by not having any more overlapping blocks
+00541 
+00542  Revision 1.5  2004/05/25 14:01:14  reddawg
+00543  Implimented Better Spinlocking No More Issues With KMALLOC which actually
+00544  was causing bizzare problems
+00545 
+00546  END
+00547  ***/
+00548 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/kmalloc_8c.html b/doc/html/kmalloc_8c.html new file mode 100644 index 0000000..88b5227 --- /dev/null +++ b/doc/html/kmalloc_8c.html @@ -0,0 +1,297 @@ + + +UbixOS V2: src/sys/lib/kmalloc.c File Reference + + + + +
+
+
+
+ +

kmalloc.c File Reference

+

+#include <lib/kmalloc.h>
+#include <lib/kprintf.h>
+#include <ubixos/kpanic.h>
+#include <ubixos/sched.h>
+#include <ubixos/spinlock.h>
+#include <vmm/vmm.h>
+#include <string.h>
+#include <assert.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + +

Functions

static void * getEmptyDesc ()
static int insertFreeDesc (struct memDescriptor *freeDesc)
void kfree (void *baseAddr)
void * kmalloc (uInt32 len)
static void mergeMemBlocks ()

Variables

static spinLock_t emptyDescSpinLock = SPIN_LOCK_INITIALIZER
static struct memDescriptoremptyKernDesc = 0x0
static struct memDescriptorfreeKernDesc = 0x0
static spinLock_t mallocSpinLock = SPIN_LOCK_INITIALIZER
static struct memDescriptorusedKernDesc = 0x0
+


Function Documentation

+ +
+
+ + + + + + + + +
static void* getEmptyDesc (  )  [static]
+
+ +

+ +

+
+ + + + + + + + + +
static int insertFreeDesc (struct memDescriptor freeDesc  )  [static]
+
+
+ +

+ +

+Definition at line 125 of file kmalloc.c. +

+References assert, freeKernDesc, kpanic(), memDescriptor::limit, memDescriptor::next, and memDescriptor::prev. +

+Referenced by kfree(), and kmalloc(). +

+

+ +

+
+ + + + + + + + + +
void kfree (void *  baseAddr  ) 
+
+ +

+ +

+
+ + + + + + + + + +
void* kmalloc (uInt32  len  ) 
+
+ +

+ +

+
+ + + + + + + + +
static void mergeMemBlocks (  )  [static]
+
+ +

+


Variable Documentation

+ +
+
+ + + + +
spinLock_t emptyDescSpinLock = SPIN_LOCK_INITIALIZER [static]
+
+
+ +

+ +

+Definition at line 55 of file kmalloc.c. +

+Referenced by getEmptyDesc(). +

+

+ +

+
+ + + + +
struct memDescriptor* emptyKernDesc = 0x0 [static]
+
+
+ +

+ +

+Definition at line 49 of file kmalloc.c. +

+Referenced by getEmptyDesc(), and mergeMemBlocks(). +

+

+ +

+
+ + + + +
struct memDescriptor* freeKernDesc = 0x0 [static]
+
+
+ +

+ +

+Definition at line 48 of file kmalloc.c. +

+Referenced by insertFreeDesc(), kmalloc(), and mergeMemBlocks(). +

+

+ +

+
+ + + + +
spinLock_t mallocSpinLock = SPIN_LOCK_INITIALIZER [static]
+
+
+ +

+ +

+Definition at line 54 of file kmalloc.c. +

+Referenced by kfree(), and kmalloc(). +

+

+ +

+
+ + + + +
struct memDescriptor* usedKernDesc = 0x0 [static]
+
+
+ +

+ +

+Definition at line 47 of file kmalloc.c. +

+Referenced by kfree(), and kmalloc(). +

+

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/kmalloc_8h-source.html b/doc/html/kmalloc_8h-source.html new file mode 100644 index 0000000..11a4664 --- /dev/null +++ b/doc/html/kmalloc_8h-source.html @@ -0,0 +1,134 @@ + + +UbixOS V2: src/sys/include/lib/kmalloc.h Source File + + + + +
+
+
+
+ +

kmalloc.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _KMALLOC_H
+00031 #define _KMALLOC_H
+00032 
+00033 #include <ubixos/types.h>
+00034 
+00035 #ifdef __cplusplus
+00036 extern "C" {
+00037 #endif
+00038 
+00039 #define sysID      -2
+00040 #define MALLOC_ALIGN_SIZE  32
+00041 #define MALLOC_ALIGN(size) (size + ((((size) % (MALLOC_ALIGN_SIZE)) == 0)? 0 : ((MALLOC_ALIGN_SIZE) - ((size) % (MALLOC_ALIGN_SIZE)))))
+00042 
+00043 struct memDescriptor {
+00044   struct memDescriptor *prev;        //4
+00045   struct memDescriptor *next;        //4
+00046   void                 *baseAddr;    //4
+00047   uInt32               limit;        //4
+00048   /*uInt8                status;       //1  */
+00049   /*char                 reserved[11]; //11 */
+00050   };
+00051 
+00052 void kfree(void *baseAddr);
+00053 void *kmalloc(uInt32 len);
+00054 
+00055 #ifdef __cplusplus
+00056  }
+00057 #endif
+00058 
+00059 #endif
+00060 
+00061 /***
+00062  $Log$
+00063  Revision 1.1.1.1  2006/06/01 12:46:13  reddawg
+00064  ubix2
+00065 
+00066  Revision 1.2  2005/10/12 00:13:36  reddawg
+00067  Removed
+00068 
+00069  Revision 1.1.1.1  2005/09/26 17:23:40  reddawg
+00070  no message
+00071 
+00072  Revision 1.7  2004/09/14 20:57:01  reddawg
+00073  Bug fixes: macro problem over opt a multiply
+00074 
+00075  Revision 1.6  2004/07/21 10:02:09  reddawg
+00076  devfs: renamed functions
+00077  device system: renamed functions
+00078  fdc: fixed a few potential bugs and cleaned up some unused variables
+00079  strol: fixed definition
+00080  endtask: made it print out freepage debug info
+00081  kmalloc: fixed a huge memory leak we had some unhandled descriptor insertion so some descriptors were lost
+00082  ld: fixed a pointer conversion
+00083  file: cleaned up a few unused variables
+00084  sched: broke task deletion
+00085  kprintf: fixed ogPrintf definition
+00086 
+00087  Revision 1.5  2004/07/19 02:08:27  reddawg
+00088  Cleaned out the rest of debuging code also temporarily disabled the ip stack to improve boot time
+00089 
+00090  Revision 1.4  2004/07/18 05:24:15  reddawg
+00091  Fixens
+00092 
+00093  Revision 1.3  2004/05/21 15:00:27  reddawg
+00094  Cleaned up
+00095 
+00096  END
+00097  ***/
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/kmalloc_8h.html b/doc/html/kmalloc_8h.html new file mode 100644 index 0000000..e0d59ad --- /dev/null +++ b/doc/html/kmalloc_8h.html @@ -0,0 +1,174 @@ + + +UbixOS V2: src/sys/include/lib/kmalloc.h File Reference + + + + +
+
+
+
+ +

kmalloc.h File Reference

+

+#include <ubixos/types.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + +

Data Structures

struct  memDescriptor

Defines

#define MALLOC_ALIGN(size)   (size + ((((size) % (MALLOC_ALIGN_SIZE)) == 0)? 0 : ((MALLOC_ALIGN_SIZE) - ((size) % (MALLOC_ALIGN_SIZE)))))
#define MALLOC_ALIGN_SIZE   32
#define sysID   -2

Functions

void kfree (void *baseAddr)
void * kmalloc (uInt32 len)
+


Define Documentation

+ +
+
+ + + + + + + + + +
#define MALLOC_ALIGN (size   )    (size + ((((size) % (MALLOC_ALIGN_SIZE)) == 0)? 0 : ((MALLOC_ALIGN_SIZE) - ((size) % (MALLOC_ALIGN_SIZE)))))
+
+
+ +

+ +

+Definition at line 41 of file kmalloc.h. +

+Referenced by kmalloc(). +

+

+ +

+
+ + + + +
#define MALLOC_ALIGN_SIZE   32
+
+
+ +

+ +

+Definition at line 40 of file kmalloc.h. +

+

+ +

+
+ + + + +
#define sysID   -2
+
+
+ +

+ +

+Definition at line 39 of file kmalloc.h. +

+Referenced by vmm_getFreeMallocPage(), vmm_pagingInit(), and vmmFindFreePage(). +

+

+


Function Documentation

+ +
+
+ + + + + + + + + +
void kfree (void *  baseAddr  ) 
+
+ +

+ +

+
+ + + + + + + + + +
void* kmalloc (uInt32  len  ) 
+
+ +

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/kmod_8c-source.html b/doc/html/kmod_8c-source.html new file mode 100644 index 0000000..49a8e8a --- /dev/null +++ b/doc/html/kmod_8c-source.html @@ -0,0 +1,252 @@ + + +UbixOS V2: src/sys/kmods/kmod.c Source File + + + + +
+
+
+
+ +

kmod.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2005 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <ubixos/types.h>
+00031 #include <ubixos/kmod.h>
+00032 #include <ubixos/sched.h>
+00033 #include <ubixos/elf.h>
+00034 #include <ubixos/kpanic.h>
+00035 #include <ubixos/lists.h>
+00036 #include <ubixos/spinlock.h>
+00037 #include <lib/kprintf.h>
+00038 #include <lib/kmalloc.h>
+00039 #include <vfs/vfs.h>
+00040 #include <vmm/vmm.h>
+00041 #include <string.h>
+00042 #include <assert.h>
+00043 
+00044 List_t *List = 0x0;
+00045 
+00046 uInt32 kmod_add(const char *kmod_file, const char *name)
+00047 {
+00048         uInt32 addr = 0x0;
+00049         Item_t *tmp;
+00050         kmod_t *kmods;
+00051 
+00052         
+00053         addr = kmod_load(kmod_file);
+00054         if (addr == 0x0)
+00055                 return 0x0;
+00056 
+00057         if(List == 0x0)
+00058         {
+00059                 List = InitializeList();
+00060         }
+00061 
+00062         tmp = CreateItem();
+00063         InsertItemAtFront(List, tmp);
+00064         kmods = kmalloc(sizeof *kmods);
+00065         tmp->data = kmods;
+00066         if(kmods == NULL)
+00067         {
+00068                 kprintf("kmod_add: unable to allocate memory!\n");
+00069                 return 0x0;
+00070         }
+00071                 
+00072         return 0x0;
+00073 }
+00074 
+00075 uInt32 kmod_load(const char *kmod_file) {
+00076   int               i             = 0x0;
+00077   int               x             = 0x0;
+00078   int               rel           = 0x0;
+00079   int               sym           = 0x0;
+00080   char             *newLoc        = 0x0; 
+00081   char             *shStr         = 0x0;
+00082   char             *dynStr        = 0x0;
+00083   uInt32           *reMap         = 0x0;
+00084   fileDescriptor   *kmod_fd       = 0x0;
+00085   elfHeader        *binaryHeader  = 0x0;
+00086   elfProgramHeader *programHeader = 0x0;
+00087   elfSectionHeader *sectionHeader = 0x0;
+00088   elfDynSym        *relSymTab     = 0x0;
+00089   elfPltInfo       *elfRel        = 0x0;
+00090 
+00091   /* Open kernel module */
+00092   kmod_fd = fopen(kmod_file,"rb");
+00093   if (kmod_fd == 0x0) {
+00094     kprintf("Can not open %s\n",kmod_file);
+00095       return 0x0;
+00096     }
+00097  
+00098   /* load module header */
+00099   fseek(kmod_fd,0x0,0x0);
+00100   binaryHeader = (elfHeader *)kmalloc(sizeof(elfHeader));
+00101   if(binaryHeader == 0x0)
+00102   {
+00103         kprintf("kmod: out of memory\n");
+00104         return 0x0;
+00105   }
+00106         
+00107   assert(binaryHeader);
+00108   fread(binaryHeader,sizeof(elfHeader),1,kmod_fd);
+00109 
+00110   programHeader = (elfProgramHeader *)kmalloc(sizeof(elfProgramHeader)*binaryHeader->ePhnum);
+00111   assert(programHeader);
+00112   fseek(kmod_fd,binaryHeader->ePhoff,0);
+00113   fread(programHeader,sizeof(elfSectionHeader),binaryHeader->ePhnum,kmod_fd);
+00114 
+00115   sectionHeader = (elfSectionHeader *)kmalloc(sizeof(elfSectionHeader)*binaryHeader->eShnum);
+00116   assert(sectionHeader);
+00117   fseek(kmod_fd,binaryHeader->eShoff,0);
+00118   fread(sectionHeader,sizeof(elfSectionHeader),binaryHeader->eShnum,kmod_fd);
+00119 
+00120   shStr = (char *)kmalloc(sectionHeader[binaryHeader->eShstrndx].shSize);
+00121   fseek(kmod_fd,sectionHeader[binaryHeader->eShstrndx].shOffset,0);
+00122   fread(shStr,sectionHeader[binaryHeader->eShstrndx].shSize,1,kmod_fd);
+00123 
+00124   for (i=0;i<binaryHeader->ePhnum;i++) {
+00125     switch (programHeader[i].phType) {
+00126       case PT_LOAD:
+00127       case PT_DYNAMIC:
+00128         newLoc = (char *)programHeader[i].phVaddr + LD_START;
+00129         /*
+00130         Allocate Memory Im Going To Have To Make This Load Memory With Correct
+00131         Settings so it helps us in the future
+00132         */
+00133         for (x=0;x < ((programHeader[i].phMemsz)+4095);x += 0x1000) {
+00134           /* make r/w or ro */
+00135           if ((vmm_remapPage(vmmFindFreePage(_current->id),((programHeader[i].phVaddr & 0xFFFFF000) + x + LD_START),PAGE_DEFAULT)) == 0x0) 
+00136             kpanic("vmmRemapPage: ld\n");
+00137           memset((void *)((programHeader[i].phVaddr & 0xFFFFF000) + x + LD_START),0x0,0x1000);
+00138           }
+00139         /* Now Load Section To Memory */
+00140         fseek(kmod_fd,programHeader[i].phOffset,0x0);
+00141         fread(newLoc,programHeader[i].phFilesz,1,kmod_fd);
+00142         break;
+00143       case PT_GNU_STACK:
+00144         /* Tells us if the stack should be executable.  Failsafe to executable
+00145            until we add checking */
+00146         break;
+00147       case PT_PAX_FLAGS:
+00148         /* Not sure... */
+00149         break;
+00150       default:
+00151         kprintf("Unhandled Header : %08x\n", programHeader[i].phType);
+00152         break;
+00153       }
+00154     }
+00155 
+00156   for (i=0x0;i<binaryHeader->eShnum;i++) {
+00157     switch (sectionHeader[i].shType) {
+00158      case 3:
+00159         if (!strcmp((shStr + sectionHeader[i].shName),".dynstr")) {
+00160           dynStr = (char *)kmalloc(sectionHeader[i].shSize);
+00161           fseek(kmod_fd,sectionHeader[i].shOffset,0x0);
+00162           fread(dynStr,sectionHeader[i].shSize,1,kmod_fd);
+00163           }
+00164         break;
+00165       case 9:
+00166         elfRel = (elfPltInfo *)kmalloc(sectionHeader[i].shSize);
+00167         fseek(kmod_fd,sectionHeader[i].shOffset,0x0);
+00168         fread(elfRel,sectionHeader[i].shSize,1,kmod_fd);
+00169 
+00170         for (x=0x0;x<sectionHeader[i].shSize/sizeof(elfPltInfo);x++) {
+00171           rel = ELF32_R_SYM(elfRel[x].pltInfo);
+00172           reMap = (uInt32 *)((uInt32)LD_START + elfRel[x].pltOffset);
+00173           switch (ELF32_R_TYPE(elfRel[x].pltInfo)) {
+00174             case R_386_32:
+00175               *reMap += ((uInt32)LD_START + relSymTab[rel].dynValue);
+00176               break;
+00177             case R_386_PC32:
+00178               *reMap += ((uInt32)LD_START + relSymTab[rel].dynValue) - (uInt32)reMap;
+00179               break;
+00180             case R_386_RELATIVE:
+00181               *reMap += (uInt32)LD_START;
+00182               break;
+00183             default:
+00184               kprintf("[0x%X][0x%X](%i)[%s]\n",elfRel[x].pltOffset,elfRel[x].pltInfo,rel,elfGetRelType(ELF32_R_TYPE(elfRel[x].pltInfo)));
+00185               kprintf("relTab [%s][0x%X][0x%X]\n",dynStr + relSymTab[rel].dynName,relSymTab[rel].dynValue,relSymTab[rel].dynName);
+00186               break;
+00187             }
+00188           }
+00189         kfree(elfRel);
+00190         break;
+00191       case 11:
+00192         relSymTab = (elfDynSym *)kmalloc(sectionHeader[i].shSize);
+00193         fseek(kmod_fd,sectionHeader[i].shOffset,0x0);
+00194         fread(relSymTab,sectionHeader[i].shSize,1,kmod_fd);
+00195         sym = i;
+00196         break;
+00197       }
+00198     }
+00199 
+00200   i = binaryHeader->eEntry + LD_START;
+00201 
+00202   kfree(dynStr);
+00203   kfree(shStr);
+00204   kfree(relSymTab);
+00205   kfree(sectionHeader);
+00206   kfree(programHeader);
+00207   kfree(binaryHeader);
+00208   fclose(kmod_fd);
+00209 
+00210   return((uInt32)i);
+00211   }
+00212 
+00213 /***
+00214  END
+00215  ***/
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/kmod_8c.html b/doc/html/kmod_8c.html new file mode 100644 index 0000000..578a67b --- /dev/null +++ b/doc/html/kmod_8c.html @@ -0,0 +1,145 @@ + + +UbixOS V2: src/sys/kmods/kmod.c File Reference + + + + +
+
+
+
+ +

kmod.c File Reference

+

+#include <ubixos/types.h>
+#include <ubixos/kmod.h>
+#include <ubixos/sched.h>
+#include <ubixos/elf.h>
+#include <ubixos/kpanic.h>
+#include <ubixos/lists.h>
+#include <ubixos/spinlock.h>
+#include <lib/kprintf.h>
+#include <lib/kmalloc.h>
+#include <vfs/vfs.h>
+#include <vmm/vmm.h>
+#include <string.h>
+#include <assert.h>
+ +

+Go to the source code of this file. + + + + + + + + + +

Functions

uInt32 kmod_add (const char *kmod_file, const char *name)
uInt32 kmod_load (const char *kmod_file)

Variables

List_tList = 0x0
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
uInt32 kmod_add (const char *  kmod_file,
const char *  name 
)
+
+
+ +

+ +

+Definition at line 46 of file kmod.c. +

+References CreateItem(), _item_t::data, InitializeList(), InsertItemAtFront(), kmalloc(), kmod_load(), kprintf(), List, and NULL. +

+

+ +

+
+ + + + + + + + + +
uInt32 kmod_load (const char *  kmod_file  ) 
+
+ +

+


Variable Documentation

+ +
+
+ + + + +
List_t* List = 0x0
+
+
+ +

+ +

+Definition at line 44 of file kmod.c. +

+Referenced by kmod_add(). +

+

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/kmod_8h-source.html b/doc/html/kmod_8h-source.html new file mode 100644 index 0000000..36349be --- /dev/null +++ b/doc/html/kmod_8h-source.html @@ -0,0 +1,117 @@ + + +UbixOS V2: src/sys/include/ubixos/kmod.h Source File + + + + +
+
+
+
+ +

kmod.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _KMOD_H
+00031 #define _KMOD_H
+00032 
+00033 #include <ubixos/types.h>
+00034 
+00035 #define LD_START 0x1000000
+00036 
+00037 typedef struct kmod_struct {
+00038   struct kmod_struct *next;
+00039   struct kmod_struct *prev;
+00040   uInt16              id;
+00041   uInt16              refs;
+00042   uInt32              address;
+00043   char                name[128];
+00044 } kmod_t;
+00045   
+00046 
+00047 uInt32 kmod_load(const char *);
+00048 uInt32 kmod_add(const char *, const char *name);
+00049 
+00050 #endif
+00051 
+00052 /***
+00053  $Log$
+00054  Revision 1.1.1.1  2006/06/01 12:46:14  reddawg
+00055  ubix2
+00056 
+00057  Revision 1.2  2005/10/12 00:13:37  reddawg
+00058  Removed
+00059 
+00060  Revision 1.1.1.1  2005/09/26 17:23:55  reddawg
+00061  no message
+00062 
+00063  Revision 1.5  2005/08/04 20:35:19  fsdfs
+00064 
+00065  various updates. mostly kprints, tabbing code to look cleaner
+00066 
+00067  Revision 1.4  2004/09/26 20:46:13  reddawg
+00068  ok time for bed added kmod_add keeps modules listed now
+00069 
+00070  Revision 1.3  2004/09/26 20:40:51  reddawg
+00071  Added baseAddr to the kmod_t
+00072 
+00073  Revision 1.2  2004/09/26 20:39:19  reddawg
+00074  Added kmod struct type kmod_t
+00075 
+00076  Revision 1.1  2004/09/20 07:33:10  reddawg
+00077  Start of kernel modules will make it much more flexable - These modules can be either in kernel threads or system services...
+00078 
+00079  END
+00080  ***/
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/kmod_8h.html b/doc/html/kmod_8h.html new file mode 100644 index 0000000..cba8034 --- /dev/null +++ b/doc/html/kmod_8h.html @@ -0,0 +1,155 @@ + + +UbixOS V2: src/sys/include/ubixos/kmod.h File Reference + + + + +
+
+
+
+ +

kmod.h File Reference

+

+#include <ubixos/types.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + +

Data Structures

struct  kmod_struct

Defines

#define LD_START   0x1000000

Typedefs

typedef kmod_struct kmod_t

Functions

uInt32 kmod_add (const char *, const char *name)
uInt32 kmod_load (const char *)
+


Define Documentation

+ +
+
+ + + + +
#define LD_START   0x1000000
+
+
+ +

+ +

+Definition at line 35 of file kmod.h. +

+Referenced by kmod_load(), and ldEnable(). +

+

+


Typedef Documentation

+ +
+
+ + + + +
typedef struct kmod_struct kmod_t
+
+
+ +

+ +

+

+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
uInt32 kmod_add (const char * ,
const char *  name 
)
+
+
+ +

+ +

+Definition at line 46 of file kmod.c. +

+References CreateItem(), _item_t::data, InitializeList(), InsertItemAtFront(), kmalloc(), kmod_load(), kprintf(), List, and NULL. +

+

+ +

+
+ + + + + + + + + +
uInt32 kmod_load (const char *   ) 
+
+ +

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/kpanic_8c-source.html b/doc/html/kpanic_8c-source.html new file mode 100644 index 0000000..99c1ee1 --- /dev/null +++ b/doc/html/kpanic_8c-source.html @@ -0,0 +1,107 @@ + + +UbixOS V2: src/sys/kernel/kpanic.c Source File + + + + +
+
+
+
+ +

kpanic.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <ubixos/kpanic.h>
+00031 #include <sys/video.h>
+00032 #include <isa/8259.h>
+00033 #include <lib/kprintf.h>
+00034 #include <stdarg.h>
+00035 
+00036 #include <ubixos/tty.h>
+00037 
+00038 /************************************************************************
+00039 
+00040 Function: void kpanic(const char *fmt, ...)
+00041 
+00042 Description: This function is used to cause a kernel panic
+00043 
+00044 Notes:
+00045 
+00046 ************************************************************************/
+00047 void kpanic(const char *fmt, ...) {
+00048   char   buf[512];
+00049   vaList args;
+00050 
+00051   vaStart(args, fmt);
+00052   vsprintf(buf, fmt, args);
+00053   vaEnd(args);
+00054   
+00055   /* It's important that we print on the current terminal so let's reset foreground */
+00056   tty_foreground = NULL;
+00057   kprintf("kPanic: %s", buf);
+00058 
+00059   /* Halt The System */
+00060   asm("cli");
+00061   irqDisable(0x0);
+00062 
+00063   while (1)
+00064     asm("hlt");
+00065   }
+00066 
+00067 /***
+00068  END
+00069  ***/
+00070 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/kpanic_8c.html b/doc/html/kpanic_8c.html new file mode 100644 index 0000000..ec693d4 --- /dev/null +++ b/doc/html/kpanic_8c.html @@ -0,0 +1,89 @@ + + +UbixOS V2: src/sys/kernel/kpanic.c File Reference + + + + +
+
+
+
+ +

kpanic.c File Reference

+

+#include <ubixos/kpanic.h>
+#include <sys/video.h>
+#include <isa/8259.h>
+#include <lib/kprintf.h>
+#include <stdarg.h>
+#include <ubixos/tty.h>
+ +

+Go to the source code of this file. + + + + +

Functions

void kpanic (const char *fmt,...)
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
void kpanic (const char *  fmt,
  ... 
)
+
+ +

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/kpanic_8h-source.html b/doc/html/kpanic_8h-source.html new file mode 100644 index 0000000..35b9c67 --- /dev/null +++ b/doc/html/kpanic_8h-source.html @@ -0,0 +1,79 @@ + + +UbixOS V2: src/sys/include/ubixos/kpanic.h Source File + + + + +
+
+
+
+ +

kpanic.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _KPANIC_H
+00031 #define _KPANIC_H
+00032 
+00033 #define K_PANIC(msg) kpanic("Error: (%s), File: %s, Line: %i\n",msg ,__FILE__,__LINE__);
+00034 
+00035 void kpanic(const char *fmt, ...);
+00036 
+00037 #endif
+00038 
+00039 /***
+00040  END
+00041  ***/
+00042 
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/kpanic_8h.html b/doc/html/kpanic_8h.html new file mode 100644 index 0000000..98d20a7 --- /dev/null +++ b/doc/html/kpanic_8h.html @@ -0,0 +1,111 @@ + + +UbixOS V2: src/sys/include/ubixos/kpanic.h File Reference + + + + +
+
+
+
+ +

kpanic.h File Reference

+

+ +

+Go to the source code of this file. + + + + + + + +

Defines

#define K_PANIC(msg)   kpanic("Error: (%s), File: %s, Line: %i\n",msg ,__FILE__,__LINE__);

Functions

void kpanic (const char *fmt,...)
+


Define Documentation

+ +
+
+ + + + + + + + + +
#define K_PANIC (msg   )    kpanic("Error: (%s), File: %s, Line: %i\n",msg ,__FILE__,__LINE__);
+
+ +

+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
void kpanic (const char *  fmt,
  ... 
)
+
+ +

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/kprint_8h-source.html b/doc/html/kprint_8h-source.html new file mode 100644 index 0000000..052dad7 --- /dev/null +++ b/doc/html/kprint_8h-source.html @@ -0,0 +1,94 @@ + + +UbixOS V2: src/sys/include/lib/kprint.h Source File + + + + +
+
+
+
+ +

kprint.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _KPRINT_H
+00031 #define _KPRINT_H
+00032 
+00033 #include <ubixos/types.h>
+00034 
+00035 int kprintf(const char *fmt, ...);
+00036 
+00037 extern int printOff;
+00038 
+00039 #endif
+00040 
+00041 /***
+00042  $Log$
+00043  Revision 1.1.1.1  2006/06/01 12:46:13  reddawg
+00044  ubix2
+00045 
+00046  Revision 1.2  2005/10/12 00:13:36  reddawg
+00047  Removed
+00048 
+00049  Revision 1.1.1.1  2005/09/26 17:23:40  reddawg
+00050  no message
+00051 
+00052  Revision 1.2  2004/05/21 15:00:27  reddawg
+00053  Cleaned up
+00054 
+00055 
+00056  END
+00057  ***/
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/kprint_8h.html b/doc/html/kprint_8h.html new file mode 100644 index 0000000..fd2971b --- /dev/null +++ b/doc/html/kprint_8h.html @@ -0,0 +1,105 @@ + + +UbixOS V2: src/sys/include/lib/kprint.h File Reference + + + + +
+
+
+
+ +

kprint.h File Reference

+

+#include <ubixos/types.h>
+ +

+Go to the source code of this file. + + + + + + + +

Functions

int kprintf (const char *fmt,...)

Variables

int printOff
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
int kprintf (const char *  fmt,
  ... 
)
+
+ +

+


Variable Documentation

+ +
+
+ + + + +
int printOff
+
+
+ +

+ +

+Definition at line 35 of file kprintf.c. +

+Referenced by kprintf(), and systemTask(). +

+

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/kprintf_8c-source.html b/doc/html/kprintf_8c-source.html new file mode 100644 index 0000000..14df65a --- /dev/null +++ b/doc/html/kprintf_8c-source.html @@ -0,0 +1,100 @@ + + +UbixOS V2: src/sys/lib/kprintf.c Source File + + + + +
+
+
+
+ +

kprintf.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005 Redistribution and use in source and binary forms, with or without modification, are
+00006 permitted provided that the following conditions are met:
+00007 
+00008 Redistributions of source code must retain the above copyright notice, this list of
+00009 conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010 form must reproduce the above copyright notice, this list of conditions, the following
+00011 disclaimer and the list of authors in the documentation and/or other materials provided
+00012 with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013 contributors may be used to endorse or promote products derived from this software
+00014 without specific prior written permission.
+00015 
+00016 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019 THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021 OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023 TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <lib/kprintf.h>
+00031 #include <sys/video.h>
+00032 #include <ubixos/kpanic.h>
+00033 #include <stdarg.h>
+00034 
+00035 int printOff   = 0x0;
+00036 int ogprintOff = 0x1;
+00037 
+00038 int kprintf(const char *fmt, ...) {
+00039   char buf[512];
+00040   vaList args;
+00041   int i = 0x0;
+00042   vaStart(args, fmt);
+00043   i = vsprintf(buf,fmt,args);
+00044   vaEnd(args);
+00045   if (printOff == 0x0)
+00046     kprint(buf);
+00047 
+00048   return(i);
+00049   }
+00050 
+00051 int sprintf(char *buf,const char *fmt, ...) {
+00052   vaList args;
+00053   int i;
+00054   vaStart(args, fmt);
+00055   i=vsprintf(buf,fmt,args);
+00056   vaEnd(args);
+00057   return(i);
+00058   }
+00059 
+00060 /***
+00061  END
+00062  ***/
+00063 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/kprintf_8c.html b/doc/html/kprintf_8c.html new file mode 100644 index 0000000..0ef8d83 --- /dev/null +++ b/doc/html/kprintf_8c.html @@ -0,0 +1,166 @@ + + +UbixOS V2: src/sys/lib/kprintf.c File Reference + + + + +
+
+
+
+ +

kprintf.c File Reference

+

+#include <lib/kprintf.h>
+#include <sys/video.h>
+#include <ubixos/kpanic.h>
+#include <stdarg.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + +

Functions

int kprintf (const char *fmt,...)
int sprintf (char *buf, const char *fmt,...)

Variables

int ogprintOff = 0x1
int printOff = 0x0
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
int kprintf (const char *  fmt,
  ... 
)
+
+
+ +

+ +

+Definition at line 38 of file kprintf.c. +

+References kprint(), printOff, vaEnd, vaStart, and vsprintf(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int sprintf (char *  buf,
const char *  fmt,
  ... 
)
+
+
+ +

+ +

+Definition at line 51 of file kprintf.c. +

+References vaEnd, vaStart, and vsprintf(). +

+

+


Variable Documentation

+ +
+
+ + + + +
int ogprintOff = 0x1
+
+
+ +

+ +

+Definition at line 36 of file kprintf.c. +

+

+ +

+
+ + + + +
int printOff = 0x0
+
+
+ +

+ +

+Definition at line 35 of file kprintf.c. +

+

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/kprintf_8h-source.html b/doc/html/kprintf_8h-source.html new file mode 100644 index 0000000..e999aa7 --- /dev/null +++ b/doc/html/kprintf_8h-source.html @@ -0,0 +1,96 @@ + + +UbixOS V2: src/sys/include/lib/kprintf.h Source File + + + + +
+
+
+
+ +

kprintf.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _KPRINTF_H
+00031 #define _KPRINTF_H
+00032 
+00033 #include <ubixos/types.h>
+00034 
+00035 int kprintf(const char *fmt, ...);
+00036 int ogPrintf(char *);
+00037 
+00038 extern int printOff;
+00039 extern int ogprintOff;
+00040 
+00041 #endif
+00042 
+00043 /***
+00044  $Log$
+00045  Revision 1.1.1.1  2006/06/01 12:46:13  reddawg
+00046  ubix2
+00047 
+00048  Revision 1.2  2005/10/12 00:13:36  reddawg
+00049  Removed
+00050 
+00051  Revision 1.1.1.1  2005/09/26 17:23:40  reddawg
+00052  no message
+00053 
+00054  Revision 1.2  2004/05/21 15:00:27  reddawg
+00055  Cleaned up
+00056 
+00057 
+00058  END
+00059  ***/
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/kprintf_8h.html b/doc/html/kprintf_8h.html new file mode 100644 index 0000000..5f3d78e --- /dev/null +++ b/doc/html/kprintf_8h.html @@ -0,0 +1,148 @@ + + +UbixOS V2: src/sys/include/lib/kprintf.h File Reference + + + + +
+
+
+
+ +

kprintf.h File Reference

+

+#include <ubixos/types.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + +

Functions

int kprintf (const char *fmt,...)
int ogPrintf (char *)

Variables

int ogprintOff
int printOff
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
int kprintf (const char *  fmt,
  ... 
)
+
+
+ +

+ +

+Definition at line 38 of file kprintf.c. +

+References kprint(), printOff, vaEnd, vaStart, and vsprintf(). +

+

+ +

+
+ + + + + + + + + +
int ogPrintf (char *   ) 
+
+
+ +

+ +

+Definition at line 42 of file ogprintf.cc. +

+References systemVitals. +

+

+


Variable Documentation

+ +
+
+ + + + +
int ogprintOff
+
+
+ +

+ +

+Definition at line 36 of file kprintf.c. +

+

+ +

+
+ + + + +
int printOff
+
+
+ +

+ +

+Definition at line 35 of file kprintf.c. +

+

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ld_8c-source.html b/doc/html/ld_8c-source.html new file mode 100644 index 0000000..4847e73 --- /dev/null +++ b/doc/html/ld_8c-source.html @@ -0,0 +1,218 @@ + + +UbixOS V2: src/sys/kernel/ld.c Source File + + + + +
+
+
+
+ +

ld.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <ubixos/types.h>
+00031 #include <ubixos/ld.h>
+00032 #include <ubixos/sched.h>
+00033 #include <ubixos/elf.h>
+00034 #include <ubixos/kpanic.h>
+00035 #include <lib/kprintf.h>
+00036 #include <lib/kmalloc.h>
+00037 #include <vfs/vfs.h>
+00038 #include <vmm/vmm.h>
+00039 #include <string.h>
+00040 #include <assert.h>
+00041 
+00042 uInt32 ldEnable() {
+00043   int               i             = 0x0;
+00044   int               x             = 0x0;
+00045   int               rel           = 0x0;
+00046   int               sym           = 0x0;
+00047   char             *newLoc        = 0x0; 
+00048   char             *shStr         = 0x0;
+00049   char             *dynStr        = 0x0;
+00050   uInt32           *reMap         = 0x0;
+00051   fileDescriptor   *ldFd          = 0x0;
+00052   elfHeader        *binaryHeader  = 0x0;
+00053   elfProgramHeader *programHeader = 0x0;
+00054   elfSectionHeader *sectionHeader = 0x0;
+00055   elfDynSym        *relSymTab     = 0x0;
+00056   elfPltInfo       *elfRel        = 0x0;
+00057 
+00058   /* Open our dynamic linker */
+00059   ldFd = fopen("sys:/lib/ld.so","rb");
+00060 
+00061   if (ldFd == 0x0) {
+00062     kprintf("Can not open ld.so\n");
+00063     }
+00064  
+00065   fseek(ldFd,0x0,0x0);
+00066   binaryHeader = (elfHeader *)kmalloc(sizeof(elfHeader));
+00067   assert(binaryHeader);
+00068   fread(binaryHeader,sizeof(elfHeader),1,ldFd);
+00069 
+00070   programHeader = (elfProgramHeader *)kmalloc(sizeof(elfProgramHeader)*binaryHeader->ePhnum);
+00071   assert(programHeader);
+00072   fseek(ldFd,binaryHeader->ePhoff,0);
+00073   fread(programHeader,sizeof(elfSectionHeader),binaryHeader->ePhnum,ldFd);
+00074 
+00075   sectionHeader = (elfSectionHeader *)kmalloc(sizeof(elfSectionHeader)*binaryHeader->eShnum);
+00076   assert(sectionHeader);
+00077   fseek(ldFd,binaryHeader->eShoff,0);
+00078   fread(sectionHeader,sizeof(elfSectionHeader),binaryHeader->eShnum,ldFd);
+00079 
+00080   shStr = (char *)kmalloc(sectionHeader[binaryHeader->eShstrndx].shSize);
+00081   fseek(ldFd,sectionHeader[binaryHeader->eShstrndx].shOffset,0);
+00082   fread(shStr,sectionHeader[binaryHeader->eShstrndx].shSize,1,ldFd);
+00083 
+00084   for (i = 0x0;i < binaryHeader->ePhnum;i++) {
+00085     switch (programHeader[i].phType) {
+00086       case PT_LOAD:
+00087         newLoc = (char *)programHeader[i].phVaddr + LD_START;
+00088         /*
+00089         Allocate Memory Im Going To Have To Make This Load Memory With Correct
+00090         Settings so it helps us in the future
+00091         */
+00092         for (x=0;x < (programHeader[i].phMemsz);x += 0x1000) {
+00093           /* make r/w or ro */
+00094           if ((vmm_remapPage(vmmFindFreePage(_current->id),((programHeader[i].phVaddr & 0xFFFFF000) + x + LD_START),PAGE_DEFAULT)) == 0x0) 
+00095             K_PANIC("vmmRemapPage: ld");
+00096           memset((void *)((programHeader[i].phVaddr & 0xFFFFF000) + x + LD_START),0x0,0x1000);
+00097           }
+00098         /* Now Load Section To Memory */
+00099         fseek(ldFd,programHeader[i].phOffset,0x0);
+00100         fread(newLoc,programHeader[i].phFilesz,1,ldFd);
+00101 
+00102         break;
+00103       case PT_DYNAMIC:
+00104         /* Now Load Section To Memory */
+00105         fseek(ldFd,programHeader[i].phOffset,0x0);
+00106         fread(newLoc,programHeader[i].phFilesz,1,ldFd);
+00107         break;
+00108       case PT_GNU_STACK:
+00109         /* Tells us if the stack should be executable.  Failsafe to executable
+00110            until we add checking */
+00111         break;
+00112       case PT_PAX_FLAGS:
+00113         /* Not sure... */
+00114         break;
+00115       default:
+00116         kprintf("Unhandled Header (kernel) : %08x\n", programHeader[i].phType);
+00117         break;
+00118       }
+00119     }
+00120 
+00121   for (i=0x0;i<binaryHeader->eShnum;i++) {
+00122     switch (sectionHeader[i].shType) {
+00123      case 3:
+00124         if (!strcmp((shStr + sectionHeader[i].shName),".dynstr")) {
+00125           dynStr = (char *)kmalloc(sectionHeader[i].shSize);
+00126           fseek(ldFd,sectionHeader[i].shOffset,0x0);
+00127           fread(dynStr,sectionHeader[i].shSize,1,ldFd);
+00128           }
+00129         break;
+00130       case 9:
+00131         elfRel = (elfPltInfo *)kmalloc(sectionHeader[i].shSize);
+00132         fseek(ldFd,sectionHeader[i].shOffset,0x0);
+00133         fread(elfRel,sectionHeader[i].shSize,1,ldFd);
+00134 
+00135         for (x=0x0;x<sectionHeader[i].shSize/sizeof(elfPltInfo);x++) {
+00136           rel = ELF32_R_SYM(elfRel[x].pltInfo);
+00137           reMap = (uInt32 *)((uInt32)LD_START + elfRel[x].pltOffset);
+00138           switch (ELF32_R_TYPE(elfRel[x].pltInfo)) {
+00139             case R_386_32:
+00140               *reMap += ((uInt32)LD_START + relSymTab[rel].dynValue);
+00141               break;
+00142             case R_386_PC32:
+00143               *reMap += ((uInt32)LD_START + relSymTab[rel].dynValue) - (uInt32)reMap;
+00144               break;
+00145             case R_386_RELATIVE:
+00146               *reMap += (uInt32)LD_START;
+00147               break;
+00148             default:
+00149               kprintf("[0x%X][0x%X](%i)[%s]\n",elfRel[x].pltOffset,elfRel[x].pltInfo,rel,elfGetRelType(ELF32_R_TYPE(elfRel[x].pltInfo)));
+00150               kprintf("relTab [%s][0x%X][0x%X]\n",dynStr + relSymTab[rel].dynName,relSymTab[rel].dynValue,relSymTab[rel].dynName);
+00151               break;
+00152             }
+00153           }
+00154         kfree(elfRel);
+00155         break;
+00156       case 11:
+00157         relSymTab = (elfDynSym *)kmalloc(sectionHeader[i].shSize);
+00158         fseek(ldFd,sectionHeader[i].shOffset,0x0);
+00159         fread(relSymTab,sectionHeader[i].shSize,1,ldFd);
+00160         sym = i;
+00161         break;
+00162       }
+00163     }
+00164 
+00165   i = binaryHeader->eEntry + LD_START;
+00166 
+00167   kfree(dynStr);
+00168   kfree(shStr);
+00169   kfree(relSymTab);
+00170   kfree(sectionHeader);
+00171   kfree(programHeader);
+00172   kfree(binaryHeader);
+00173   fclose(ldFd);
+00174 
+00175   return((uInt32)i);
+00176   }
+00177 
+00178 /***
+00179  END
+00180  ***/
+00181 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ld_8c.html b/doc/html/ld_8c.html new file mode 100644 index 0000000..547a023 --- /dev/null +++ b/doc/html/ld_8c.html @@ -0,0 +1,84 @@ + + +UbixOS V2: src/sys/kernel/ld.c File Reference + + + + +
+
+
+
+ +

ld.c File Reference

+

+#include <ubixos/types.h>
+#include <ubixos/ld.h>
+#include <ubixos/sched.h>
+#include <ubixos/elf.h>
+#include <ubixos/kpanic.h>
+#include <lib/kprintf.h>
+#include <lib/kmalloc.h>
+#include <vfs/vfs.h>
+#include <vmm/vmm.h>
+#include <string.h>
+#include <assert.h>
+ +

+Go to the source code of this file. + + + + +

Functions

uInt32 ldEnable ()
+


Function Documentation

+ +
+
+ + + + + + + + +
uInt32 ldEnable (  ) 
+
+ +

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ld_8h-source.html b/doc/html/ld_8h-source.html new file mode 100644 index 0000000..f28cf58 --- /dev/null +++ b/doc/html/ld_8h-source.html @@ -0,0 +1,111 @@ + + +UbixOS V2: src/sys/include/ubixos/ld.h Source File + + + + +
+
+
+
+ +

ld.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _LD_H
+00031 #define _LD_H
+00032 
+00033 #include <ubixos/types.h>
+00034 
+00035 #define LD_START 0x1000000
+00036 
+00037 uInt32 ldEnable();
+00038 
+00039 #endif
+00040 
+00041 /***
+00042  $Log$
+00043  Revision 1.1.1.1  2006/06/01 12:46:14  reddawg
+00044  ubix2
+00045 
+00046  Revision 1.2  2005/10/12 00:13:37  reddawg
+00047  Removed
+00048 
+00049  Revision 1.1.1.1  2005/09/26 17:23:55  reddawg
+00050  no message
+00051 
+00052  Revision 1.10  2004/06/17 12:20:32  reddawg
+00053  Try this now solarwind
+00054 
+00055  Revision 1.9  2004/06/17 02:19:29  reddawg
+00056  Cleaning out dead code
+00057 
+00058  Revision 1.8  2004/06/16 17:32:14  reddawg
+00059  Removed Dead LD Code now part of ld.so
+00060 
+00061  Revision 1.7  2004/06/16 17:04:13  reddawg
+00062  ld.so: rest of the commit
+00063 
+00064  Revision 1.4  2004/06/13 03:05:15  reddawg
+00065  we now have a dynamic linker
+00066 
+00067  Revision 1.3  2004/06/12 01:27:26  reddawg
+00068  shared objects: yes we almost fully support shared objects
+00069 
+00070  Revision 1.2  2004/05/21 15:20:00  reddawg
+00071  Cleaned up
+00072 
+00073  END
+00074  ***/
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ld_8h.html b/doc/html/ld_8h.html new file mode 100644 index 0000000..26aa0da --- /dev/null +++ b/doc/html/ld_8h.html @@ -0,0 +1,95 @@ + + +UbixOS V2: src/sys/include/ubixos/ld.h File Reference + + + + +
+
+
+
+ +

ld.h File Reference

+

+#include <ubixos/types.h>
+ +

+Go to the source code of this file. + + + + + + + +

Defines

#define LD_START   0x1000000

Functions

uInt32 ldEnable ()
+


Define Documentation

+ +
+
+ + + + +
#define LD_START   0x1000000
+
+
+ +

+ +

+Definition at line 35 of file ld.h. +

+

+


Function Documentation

+ +
+
+ + + + + + + + +
uInt32 ldEnable (  ) 
+
+ +

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/lib_2string_8h-source.html b/doc/html/lib_2string_8h-source.html new file mode 100644 index 0000000..b8473f2 --- /dev/null +++ b/doc/html/lib_2string_8h-source.html @@ -0,0 +1,123 @@ + + +UbixOS V2: src/sys/include/lib/string.h Source File + + + + +
+
+
+
+ +

string.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _STRING_H
+00031 #define _STRING_H
+00032 
+00033 #include <ubixos/types.h>
+00034 
+00035 #ifdef __cplusplus
+00036 extern "C" {
+00037 #endif
+00038 
+00039 char * strcpy(char *, const char *);
+00040 int strcmp(const char *str1,const char *str2);
+00041 int strncmp(const char * a, const char * b, size_t c);
+00042 void *memcpy(const void *dst, const void * src, size_t length);
+00043 void *memset(void * dst, int c, size_t length);
+00044 int strlen(const char * string);
+00045 int memcmp(const void * dst, const void * src, size_t length);
+00046 void strncpy(char * dest, const char * src, size_t size);
+00047 char *strtok(char *str, const char *sep);
+00048 char *strtok_r(char *str, const char *sep, char **last);
+00049 char *strstr(const char *s,char *find);
+00050 
+00051 int sprintf(char *buf,const char *fmt, ...);
+00052 
+00053 #ifdef __cplusplus
+00054 }
+00055 #endif
+00056   
+00057 #endif
+00058 
+00059 /***
+00060  $Log$
+00061  Revision 1.1.1.1  2006/06/01 12:46:13  reddawg
+00062  ubix2
+00063 
+00064  Revision 1.2  2005/10/12 00:13:36  reddawg
+00065  Removed
+00066 
+00067  Revision 1.1.1.1  2005/09/26 17:23:41  reddawg
+00068  no message
+00069 
+00070  Revision 1.5  2004/07/20 19:09:40  flameshadow
+00071  chg: put strcpy() declaration in the right .h file
+00072  add: prototypes for the dirCaching functions in dirCache.h
+00073  chg: renamed dirCaching functions
+00074 
+00075  Revision 1.4  2004/07/06 23:26:12  reddawg
+00076  Fixed A Compilation Error
+00077 
+00078  Revision 1.3  2004/06/28 23:12:58  reddawg
+00079  file format now container:/path/to/file
+00080 
+00081  Revision 1.2  2004/05/21 15:00:27  reddawg
+00082  Cleaned up
+00083 
+00084 
+00085  END
+00086  ***/
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/lib_2string_8h.html b/doc/html/lib_2string_8h.html new file mode 100644 index 0000000..103475b --- /dev/null +++ b/doc/html/lib_2string_8h.html @@ -0,0 +1,504 @@ + + +UbixOS V2: src/sys/include/lib/string.h File Reference + + + + +
+
+
+
+ +

string.h File Reference

+

+#include <ubixos/types.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + +

Functions

int memcmp (const void *dst, const void *src, size_t length)
void * memcpy (const void *dst, const void *src, size_t length)
void * memset (void *dst, int c, size_t length)
int sprintf (char *buf, const char *fmt,...)
int strcmp (const char *str1, const char *str2)
char * strcpy (char *, const char *)
int strlen (const char *string)
int strncmp (const char *a, const char *b, size_t c)
void strncpy (char *dest, const char *src, size_t size)
char * strstr (const char *s, char *find)
char * strtok (char *str, const char *sep)
char * strtok_r (char *str, const char *sep, char **last)
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int memcmp (const void *  dst,
const void *  src,
size_t  length 
)
+
+
+ +

+ +

+Definition at line 98 of file string.c. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void* memcpy (const void *  dst,
const void *  src,
size_t  length 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void* memset (void *  dst,
int  c,
size_t  length 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int sprintf (char *  buf,
const char *  fmt,
  ... 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
int strcmp (const char *  str1,
const char *  str2 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
char* strcpy (char * ,
const char *  
)
+
+
+ +

+ +

+Definition at line 33 of file string.c. +

+Referenced by main(), ubixfs_cacheNew(), and UbixFS::vfs_format(). +

+

+ +

+
+ + + + + + + + + +
int strlen (const char *  string  ) 
+
+
+ +

+ +

+Definition at line 87 of file string.c. +

+Referenced by devfs_makeNode(), sendstr(), strstr(), ubixfs_cacheNew(), UbixFS::vfs_mkdir(), and vsprintf(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int strncmp (const char *  a,
const char *  b,
size_t  c 
)
+
+
+ +

+ +

+Definition at line 58 of file string.c. +

+Referenced by strstr(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void strncpy (char *  dest,
const char *  src,
size_t  size 
)
+
+
+ +

+ +

+Definition at line 123 of file string.c. +

+Referenced by bTree::bTree(), bTree::Insert(), bTree::insertNode(), UbixFS::mknod(), bTree::splitNode(), and UbixFS::vfs_mkdir(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
char* strstr (const char *  s,
char *  find 
)
+
+
+ +

+ +

+Definition at line 136 of file string.c. +

+References NULL, strlen(), and strncmp(). +

+Referenced by fopen(), sysChDir(), and sysMkDir(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
char* strtok (char *  str,
const char *  sep 
)
+
+
+ +

+ +

+Definition at line 74 of file strtok.c. +

+References strtok_r(). +

+Referenced by fopen(), sysMkDir(), and unlink(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
char* strtok_r (char *  str,
const char *  sep,
char **  last 
)
+
+
+ +

+ +

+Definition at line 33 of file strtok.c. +

+References NULL. +

+Referenced by strtok(). +

+

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/lib_8h-source.html b/doc/html/lib_8h-source.html new file mode 100644 index 0000000..eeb3c2c --- /dev/null +++ b/doc/html/lib_8h-source.html @@ -0,0 +1,84 @@ + + +UbixOS V2: src/sys/include/net/arch/lib.h Source File + + + + +
+
+
+
+ +

lib.h

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 #ifndef __ARCH_LIB_H__
+00036 #define __ARCH_LIB_H__
+00037 
+00038 #ifndef _STRING_H_
+00039 #ifndef _STRING_H
+00040 int strlen(const char *str);
+00041 int strncmp(const char *str1, const char *str2, int len);
+00042 void bcopy(const void *src, void *dest, int len);
+00043 void bzero(void *data, int n);
+00044 #endif /* _STRING_H */
+00045 #endif /* _STRING_H_ */
+00046 
+00047 #endif /* __ARCH_LIB_H__ */
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/lib_8h.html b/doc/html/lib_8h.html new file mode 100644 index 0000000..a701057 --- /dev/null +++ b/doc/html/lib_8h.html @@ -0,0 +1,187 @@ + + +UbixOS V2: src/sys/include/net/arch/lib.h File Reference + + + + +
+
+
+
+ +

lib.h File Reference

+

+ +

+Go to the source code of this file. + + + + + + + + + + +

Functions

void bcopy (const void *src, void *dest, int len)
void bzero (void *data, int n)
int strlen (const char *str)
int strncmp (const char *str1, const char *str2, int len)
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void bcopy (const void *  src,
void *  dest,
int  len 
)
+
+
+ +

+ +

+Definition at line 103 of file net.c. +

+References memcpy(). +

+Referenced by loopif_output(), low_level_input(), and low_level_output(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void bzero (void *  data,
int  n 
)
+
+
+ +

+ +

+Definition at line 107 of file net.c. +

+References memset(). +

+

+ +

+
+ + + + + + + + + +
int strlen (const char *  str  ) 
+
+
+ +

+ +

+Definition at line 87 of file string.c. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int strncmp (const char *  str1,
const char *  str2,
int  len 
)
+
+
+ +

+ +

+Definition at line 58 of file string.c. +

+

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/libcpp_8cc-source.html b/doc/html/libcpp_8cc-source.html new file mode 100644 index 0000000..83ec948 --- /dev/null +++ b/doc/html/libcpp_8cc-source.html @@ -0,0 +1,137 @@ + + +UbixOS V2: src/sys/lib/libcpp.cc Source File + + + + +
+
+
+
+ +

libcpp.cc

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 extern "C" 
+00031 {       
+00032 #include <lib/kmalloc.h>
+00033 #include <sys/video.h>
+00034 void __pure_virtual() { while(1); }
+00035 
+00036 void __cxa_pure_virtual() { while(1); }
+00037 
+00038 /* Don't plan on exiting the kernel...so do nothing. */
+00039 int __cxa_atexit(void (*func)(void *), void * arg, void * d) { return 0; }
+00040 
+00041 void __dso_handle() { while(1); }
+00042 }
+00043 
+00044 #include <lib/libcpp.h>
+00045 
+00046 void * operator new[](unsigned size)
+00047 {
+00048     return kmalloc(size);
+00049 }
+00050 
+00051 void operator delete[](void * ptr)
+00052 {
+00053     kfree(ptr);
+00054 
+00055     return;
+00056 }
+00057 
+00058 void * operator new(unsigned size)
+00059 {
+00060     void * ptr = kmalloc(size);
+00061     return ptr;
+00062 }
+00063 
+00064 void operator delete(void * ptr)
+00065 {
+00066     kfree(ptr);
+00067     return;
+00068 }
+00069 
+00070 /***
+00071  $Log$
+00072  Revision 1.1.1.1  2006/06/01 12:46:16  reddawg
+00073  ubix2
+00074 
+00075  Revision 1.2  2005/10/12 00:13:37  reddawg
+00076  Removed
+00077 
+00078  Revision 1.1.1.1  2005/09/26 17:24:12  reddawg
+00079  no message
+00080 
+00081  Revision 1.5  2004/09/08 22:04:10  apwillia
+00082  Added calling of static constructors, commented out tty_printf in kprintf (due to deadlock)
+00083 
+00084  Revision 1.4  2004/07/20 22:58:33  reddawg
+00085  retiring to the laptop for the night must sync in work to resume from there
+00086 
+00087  Revision 1.3  2004/07/02 12:28:24  reddawg
+00088  Changes for new libc, someone please test that the kernel still works
+00089 
+00090  Revision 1.2  2004/05/19 04:07:43  reddawg
+00091  kmalloc(size,pid) no more it is no kmalloc(size); the way it should of been
+00092 
+00093  Revision 1.1.1.1  2004/04/15 12:07:10  reddawg
+00094  UbixOS v1.0
+00095 
+00096  Revision 1.2  2004/04/13 16:36:33  reddawg
+00097  Changed our copyright, it is all now under a BSD-Style license
+00098 
+00099  END
+00100  ***/
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/libcpp_8cc.html b/doc/html/libcpp_8cc.html new file mode 100644 index 0000000..ea4e841 --- /dev/null +++ b/doc/html/libcpp_8cc.html @@ -0,0 +1,261 @@ + + +UbixOS V2: src/sys/lib/libcpp.cc File Reference + + + + +
+
+
+
+ +

libcpp.cc File Reference

+

+#include <lib/kmalloc.h>
+#include <sys/video.h>
+#include <lib/libcpp.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + +

Functions

int __cxa_atexit (void(*func)(void *), void *arg, void *d)
void __cxa_pure_virtual ()
void __dso_handle ()
void __pure_virtual ()
void operator delete (void *ptr)
void operator delete[] (void *ptr)
void * operator new (unsigned size)
void * operator new[] (unsigned size)
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int __cxa_atexit (void(*)(void *)  func,
void *  arg,
void *  d 
)
+
+
+ +

+ +

+Definition at line 39 of file libcpp.cc. +

+

+ +

+
+ + + + + + + + +
void __cxa_pure_virtual (  ) 
+
+
+ +

+ +

+Definition at line 36 of file libcpp.cc. +

+

+ +

+
+ + + + + + + + +
void __dso_handle (  ) 
+
+
+ +

+ +

+Definition at line 41 of file libcpp.cc. +

+

+ +

+
+ + + + + + + + +
void __pure_virtual (  ) 
+
+
+ +

+ +

+Definition at line 34 of file libcpp.cc. +

+

+ +

+
+ + + + + + + + + +
void operator delete (void *  ptr  ) 
+
+
+ +

+ +

+Definition at line 64 of file libcpp.cc. +

+References kfree(). +

+

+ +

+
+ + + + + + + + + +
void operator delete[] (void *  ptr  ) 
+
+
+ +

+ +

+Definition at line 51 of file libcpp.cc. +

+References kfree(). +

+

+ +

+
+ + + + + + + + + +
void* operator new (unsigned  size  ) 
+
+
+ +

+ +

+Definition at line 58 of file libcpp.cc. +

+References kmalloc(). +

+

+ +

+
+ + + + + + + + + +
void* operator new[] (unsigned  size  ) 
+
+
+ +

+ +

+Definition at line 46 of file libcpp.cc. +

+References kmalloc(). +

+

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/libcpp_8h-source.html b/doc/html/libcpp_8h-source.html new file mode 100644 index 0000000..9c1f046 --- /dev/null +++ b/doc/html/libcpp_8h-source.html @@ -0,0 +1,95 @@ + + +UbixOS V2: src/sys/include/lib/libcpp.h Source File + + + + +
+
+
+
+ +

libcpp.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef __LIBCPP_H
+00031 #define __LIBCPP_H
+00032 
+00033 #include <ubixos/types.h>
+00034 
+00035 void * operator new(unsigned size);
+00036 void   operator delete(void * ptr);
+00037 void * operator new[](unsigned size);
+00038 void   operator delete[](void * ptr);
+00039 
+00040 #endif
+00041 
+00042 /***
+00043  $Log$
+00044  Revision 1.1.1.1  2006/06/01 12:46:13  reddawg
+00045  ubix2
+00046 
+00047  Revision 1.2  2005/10/12 00:13:36  reddawg
+00048  Removed
+00049 
+00050  Revision 1.1.1.1  2005/09/26 17:23:40  reddawg
+00051  no message
+00052 
+00053  Revision 1.2  2004/05/21 15:00:27  reddawg
+00054  Cleaned up
+00055 
+00056 
+00057  END
+00058  ***/
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/libcpp_8h.html b/doc/html/libcpp_8h.html new file mode 100644 index 0000000..abbff35 --- /dev/null +++ b/doc/html/libcpp_8h.html @@ -0,0 +1,151 @@ + + +UbixOS V2: src/sys/include/lib/libcpp.h File Reference + + + + +
+
+
+
+ +

libcpp.h File Reference

+

+#include <ubixos/types.h>
+ +

+Go to the source code of this file. + + + + + + + + + + +

Functions

void operator delete (void *ptr)
void operator delete[] (void *ptr)
void * operator new (unsigned size)
void * operator new[] (unsigned size)
+


Function Documentation

+ +
+
+ + + + + + + + + +
void operator delete (void *  ptr  ) 
+
+
+ +

+ +

+Definition at line 64 of file libcpp.cc. +

+References kfree(). +

+

+ +

+
+ + + + + + + + + +
void operator delete[] (void *  ptr  ) 
+
+
+ +

+ +

+Definition at line 51 of file libcpp.cc. +

+References kfree(). +

+

+ +

+
+ + + + + + + + + +
void* operator new (unsigned  size  ) 
+
+
+ +

+ +

+Definition at line 58 of file libcpp.cc. +

+References kmalloc(). +

+

+ +

+
+ + + + + + + + + +
void* operator new[] (unsigned  size  ) 
+
+
+ +

+ +

+Definition at line 46 of file libcpp.cc. +

+References kmalloc(). +

+

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/list_8h-source.html b/doc/html/list_8h-source.html new file mode 100644 index 0000000..652f829 --- /dev/null +++ b/doc/html/list_8h-source.html @@ -0,0 +1,87 @@ + + +UbixOS V2: src/sys/include/net/list.h Source File + + + + +
+
+
+
+ +

list.h

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 #ifndef __LWIP_LIST_H__
+00036 #define __LWIP_LIST_H__
+00037 
+00038 struct list;
+00039 
+00040 struct list *list_new(int size);
+00041 int list_push(struct list *list, void *elem);
+00042 void *list_pop(struct list *list);
+00043 int list_remove(struct list *list, void *elem);
+00044 void *list_first(struct list *list);
+00045 int list_elems(struct list *list);
+00046 void list_delete(struct list *list);
+00047 
+00048 void list_map(struct list *list, void (* func)(void *arg));
+00049 
+00050 #endif /* __LWIP_LIST_H__ */
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/list_8h.html b/doc/html/list_8h.html new file mode 100644 index 0000000..de94725 --- /dev/null +++ b/doc/html/list_8h.html @@ -0,0 +1,249 @@ + + +UbixOS V2: src/sys/include/net/list.h File Reference + + + + +
+
+
+
+ +

list.h File Reference

+

+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + +

Functions

void list_delete (struct list *list)
int list_elems (struct list *list)
void * list_first (struct list *list)
void list_map (struct list *list, void(*func)(void *arg))
list * list_new (int size)
void * list_pop (struct list *list)
int list_push (struct list *list, void *elem)
int list_remove (struct list *list, void *elem)
+


Function Documentation

+ +
+
+ + + + + + + + + +
void list_delete (struct list *  list  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
int list_elems (struct list *  list  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
void* list_first (struct list *  list  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void list_map (struct list *  list,
void(*)(void *arg)  func 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
struct list* list_new (int  size  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
void* list_pop (struct list *  list  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int list_push (struct list *  list,
void *  elem 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int list_remove (struct list *  list,
void *  elem 
)
+
+
+ +

+ +

+

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/lists_8h-source.html b/doc/html/lists_8h-source.html new file mode 100644 index 0000000..3ac2416 --- /dev/null +++ b/doc/html/lists_8h-source.html @@ -0,0 +1,88 @@ + + +UbixOS V2: src/sys/include/ubixos/lists.h Source File + + + + +
+
+
+
+ +

lists.h

Go to the documentation of this file.
00001 #define IN
+00002 #define STATUS_FAILURE -1
+00003 #define STATUS_SUCCESS 0
+00004 
+00005 typedef struct _item_t Item_t;
+00006 typedef struct _list_t List_t;
+00007 struct _item_t
+00008 {
+00009         Item_t          *Previous;
+00010         Item_t          *Next;
+00011         void            *data;
+00012 };
+00013 
+00014 struct _list_t
+00015 {
+00016         Item_t  *First;
+00017         Item_t  *Last;
+00018 };
+00019 
+00020 List_t * 
+00021 InitializeList();
+00022 Item_t *
+00023 CreateItem();
+00024 int
+00025 InsertItemAtFront(      IN List_t * TList,
+00026                         IN Item_t * kItem);
+00027 int
+00028 InsertItemBetweenItems( IN List_t * TList,
+00029                                 IN Item_t * Previous,
+00030                                 IN Item_t * Next,
+00031                                 IN Item_t * Insert);
+00032 int
+00033 RemoveItem(     IN List_t *     TList,
+00034                 IN Item_t *     kItem);
+00035 int
+00036 DestroyItemsInList(IN List_t * ItemList);
+00037 int
+00038 DestroyItemList(IN List_t * ItemList);
+00039 Item_t *
+00040 GetFirstItem(IN List_t * kItem);
+00041 
+00042 Item_t *
+00043 GetLastItem(IN List_t * kItem);
+00044 List_t *
+00045 RemoveItemListBetweenItems(     IN Item_t *     Previous,
+00046                                         IN Item_t *     Next);
+00047 
+00048 void
+00049 InsertItemListBetweenItems(     IN Item_t *     Previous,
+00050                                         IN Item_t *     Next,
+00051                                         IN List_t *     Insert);
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/lists_8h.html b/doc/html/lists_8h.html new file mode 100644 index 0000000..1b7fbd6 --- /dev/null +++ b/doc/html/lists_8h.html @@ -0,0 +1,459 @@ + + +UbixOS V2: src/sys/include/ubixos/lists.h File Reference + + + + +
+
+
+
+ +

lists.h File Reference

+

+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  _item_t
struct  _list_t

Defines

#define IN
#define STATUS_FAILURE   -1
#define STATUS_SUCCESS   0

Typedefs

typedef _item_t Item_t
typedef _list_t List_t

Functions

Item_tCreateItem ()
int DestroyItemList (IN List_t *ItemList)
int DestroyItemsInList (IN List_t *ItemList)
Item_tGetFirstItem (IN List_t *kItem)
Item_tGetLastItem (IN List_t *kItem)
List_tInitializeList ()
int InsertItemAtFront (IN List_t *TList, IN Item_t *kItem)
int InsertItemBetweenItems (IN List_t *TList, IN Item_t *Previous, IN Item_t *Next, IN Item_t *Insert)
void InsertItemListBetweenItems (IN Item_t *Previous, IN Item_t *Next, IN List_t *Insert)
int RemoveItem (IN List_t *TList, IN Item_t *kItem)
List_tRemoveItemListBetweenItems (IN Item_t *Previous, IN Item_t *Next)
+


Define Documentation

+ +
+
+ + + + +
#define IN
+
+
+ +

+ +

+Definition at line 1 of file lists.h. +

+

+ +

+
+ + + + +
#define STATUS_FAILURE   -1
+
+
+ +

+ +

+Definition at line 2 of file lists.h. +

+

+ +

+
+ + + + +
#define STATUS_SUCCESS   0
+
+
+ +

+ +

+Definition at line 3 of file lists.h. +

+

+


Typedef Documentation

+ +
+
+ + + + +
typedef struct _item_t Item_t
+
+
+ +

+ +

+Definition at line 5 of file lists.h. +

+

+ +

+
+ + + + +
typedef struct _list_t List_t
+
+
+ +

+ +

+Definition at line 6 of file lists.h. +

+

+


Function Documentation

+ +
+
+ + + + + + + + +
Item_t* CreateItem (  ) 
+
+
+ +

+ +

+Referenced by kmod_add(). +

+

+ +

+
+ + + + + + + + + +
int DestroyItemList (IN List_t ItemList  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
int DestroyItemsInList (IN List_t ItemList  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
Item_t* GetFirstItem (IN List_t kItem  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
Item_t* GetLastItem (IN List_t kItem  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
List_t* InitializeList (  ) 
+
+
+ +

+ +

+Referenced by kmod_add(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int InsertItemAtFront (IN List_t TList,
IN Item_t kItem 
)
+
+
+ +

+ +

+Referenced by kmod_add(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int InsertItemBetweenItems (IN List_t TList,
IN Item_t Previous,
IN Item_t Next,
IN Item_t Insert 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void InsertItemListBetweenItems (IN Item_t Previous,
IN Item_t Next,
IN List_t Insert 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int RemoveItem (IN List_t TList,
IN Item_t kItem 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
List_t* RemoveItemListBetweenItems (IN Item_t Previous,
IN Item_t Next 
)
+
+
+ +

+ +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/lnc_8c-source.html b/doc/html/lnc_8c-source.html new file mode 100644 index 0000000..3012dae --- /dev/null +++ b/doc/html/lnc_8c-source.html @@ -0,0 +1,350 @@ + + +UbixOS V2: src/sys/pci/lnc.c Source File + + + + +
+
+
+
+ +

lnc.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005 Redistribution and use in source and binary forms, with or without modification, are
+00006 permitted provided that the following conditions are met:
+00007 
+00008 Redistributions of source code must retain the above copyright notice, this list of
+00009 conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010 form must reproduce the above copyright notice, this list of conditions, the following
+00011 disclaimer and the list of authors in the documentation and/or other materials provided
+00012 with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013 contributors may be used to endorse or promote products derived from this software
+00014 without specific prior written permission.
+00015 
+00016 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019 THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021 OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023 TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Log$
+00027  Revision 1.1.1.1  2006/06/01 12:46:16  reddawg
+00028  ubix2
+00029 
+00030  Revision 1.2  2005/10/12 00:13:37  reddawg
+00031  Removed
+00032 
+00033  Revision 1.1.1.1  2005/09/26 17:24:35  reddawg
+00034  no message
+00035 
+00036  Revision 1.1.1.1  2004/04/15 12:07:15  reddawg
+00037  UbixOS v1.0
+00038 
+00039  Revision 1.4  2004/04/13 16:36:33  reddawg
+00040  Changed our copyright, it is all now under a BSD-Style license
+00041 
+00042 
+00043 
+00044  $Id$
+00045 
+00046 *****************************************************************************************/
+00047 
+00048 #include <pci/lnc.h>
+00049 #include <sys/io.h>
+00050 #include <ubixos/types.h>
+00051 #include <sys/idt.h>
+00052 #include <sys/gdt.h>
+00053 #include <lib/kmalloc.h>
+00054 #include <lib/kprintf.h>
+00055 #include <sys/video.h>
+00056 #include <isa/8259.h>
+00057 
+00058 struct lncInfo *lnc = 0x0;
+00059 
+00060 static char const * const nicIdent[] = {
+00061   "Unknown",
+00062   "BICC",
+00063   "NE2100",
+00064   "DEPCA",
+00065   "CNET98S",      /* PC-98 */
+00066   };
+00067 
+00068 static char const * const icIdent[] = {
+00069   "Unknown",
+00070   "LANCE",
+00071   "C-LANCE",
+00072   "PCnet-ISA",
+00073   "PCnet-ISA+",
+00074   "PCnet-ISA II",
+00075   "PCnet-32 VL-Bus",
+00076   "PCnet-PCI",
+00077   "PCnet-PCI II",
+00078   "PCnet-FAST",
+00079   "PCnet-FAST+",
+00080   "PCnet-Home",
+00081   };  
+00082 
+00083 void writeCsr(struct lncInfo *lnc, uInt16 port, uInt16 val) {
+00084   outportWord(lnc->rap, port);
+00085   outportWord(lnc->rdp, val);
+00086   }
+00087 
+00088 uInt16 readCsr(struct lncInfo *lnc, uInt16 port) {
+00089   outportWord(lnc->rap, port);
+00090   return(inportWord(lnc->rdp));
+00091   }
+00092 
+00093 void writeBcr(struct lncInfo *lnc, uInt16 port, uInt16 val) {
+00094   outportWord(lnc->rap, port);
+00095   outportWord(lnc->bdp, val);
+00096   }
+00097 
+00098 uInt16 readBcr(struct lncInfo *sc, uInt16 port) {
+00099   outportWord(sc->rap, port);
+00100   return (inportWord(sc->bdp));
+00101   }
+00102 
+00103 
+00104 void initLNC() {
+00105   int            i    = 0x0;
+00106   lnc = kmalloc(sizeof(struct lncInfo),-2);
+00107   
+00108   lnc->rap = 0x1000 + PCNET_RAP;
+00109   lnc->rdp = 0x1000 + PCNET_RDP;
+00110   lnc->bdp = 0x1000 + PCNET_BDP;
+00111 
+00112   lnc->nic.ic = probe(lnc);
+00113   if ((lnc->nic.ic > 0) && (lnc->nic.ic >= PCnet_32)) {
+00114     lnc->nic.ident = NE2100;
+00115     lnc->nic.memMode = DMA_FIXED;
+00116 
+00117     lnc->nrdre = NRDRE;
+00118     lnc->ntdre = NTDRE;
+00119 
+00120     /* Extract MAC address from PROM */
+00121     for (i = 0; i < ETHER_ADDR_LEN; i++) {
+00122       lnc->arpcom.ac_enaddr[i] = inportByte(0x1000 + i);
+00123       kprintf("[0x%X]",lnc->arpcom.ac_enaddr[i]);
+00124       }
+00125     }
+00126   else {
+00127     kprintf("LNC Init Error\n");
+00128     return;
+00129     }
+00130   lncAttach(lnc,0);
+00131   writeCsr(lnc, CSR3, 0);
+00132   writeCsr(lnc, CSR0, INIT);
+00133   for (i = 0; i < 1000; i++)
+00134     if (readCsr(lnc, CSR0) & IDON)
+00135       break;
+00136 
+00137   if (readCsr(lnc, CSR0) & IDON) {
+00138     writeCsr(lnc, CSR0, STRT | INEA);
+00139     setVector(_lncInt,mVec+9, (dInt + dPresent + dDpl3));
+00140     enableIrq(9);
+00141     /* 
+00142      * sc->arpcom.ac_if.if_flags |= IFF_RUNNING;
+00143      * sc->arpcom.ac_if.if_flags &= ~IFF_OACTIVE;
+00144      * lnc_start(&sc->arpcom.ac_if);
+00145      */
+00146     }
+00147   else {
+00148     kprintf("LNC init Error\n");
+00149     return;
+00150     }
+00151   return;
+00152   }
+00153 
+00154 int probe(struct lncInfo *lnc) {
+00155   uInt32 chipId = 0x0;
+00156   int    type   = 0x0;
+00157 
+00158   if ((type = lanceProbe(lnc))) {
+00159     chipId = readCsr(lnc, CSR89);
+00160     chipId <<= 16;
+00161     chipId |= readCsr(lnc, CSR88);
+00162     if (chipId & AMD_MASK) {
+00163       chipId >>= 12;
+00164       switch (chipId & PART_MASK) {
+00165         case Am79C960:
+00166           return(PCnet_ISA);
+00167         case Am79C961:
+00168           return (PCnet_ISAplus);
+00169         case Am79C961A:
+00170           return (PCnet_ISA_II);
+00171         case Am79C965:
+00172           return (PCnet_32);
+00173         case Am79C970:
+00174           return (PCnet_PCI);
+00175         case Am79C970A:
+00176           return (PCnet_PCI_II);
+00177         case Am79C971:
+00178           return (PCnet_FAST);
+00179         case Am79C972:
+00180         case Am79C973:
+00181           return (PCnet_FASTplus);
+00182         case Am79C978:
+00183           return (PCnet_Home);
+00184         default:
+00185           break;
+00186         }
+00187       }
+00188     }
+00189   return (type);
+00190   }
+00191 
+00192 int lanceProbe(struct lncInfo *lnc) {
+00193   writeCsr(lnc, CSR0, STOP);
+00194   if ((inportWord(lnc->rdp) & STOP) && !(readCsr(lnc, CSR3))) {
+00195     writeCsr(lnc, CSR0, INEA);
+00196     if (readCsr(lnc, CSR0) & INEA) {
+00197       return(C_LANCE);
+00198       }
+00199     else {
+00200       return(LANCE);
+00201       }
+00202     }
+00203   else {
+00204     return(UNKNOWN);
+00205     }
+00206   }
+00207 
+00208 void lncInt() {
+00209   uInt16 csr0 = 0x0;
+00210   while ((csr0 = inportWord(lnc->rdp)) & INTR) {
+00211     outportWord(lnc->rdp, csr0);
+00212     kprintf("CSR0: [0x%X]\n",csr0);
+00213     if (csr0 & ERR) {
+00214       kprintf("Error: [0x%X]\n",csr0);
+00215       }
+00216     if (csr0 & RINT) {
+00217       kprintf("RINT\n");
+00218       }
+00219     if (csr0 & TINT) {
+00220       kprintf("TINT\n");
+00221       }
+00222     }
+00223   kprintf("Finished!!!\n");
+00224   outportByte(0x20,0x20);
+00225   return;
+00226   }
+00227 
+00228 asm(
+00229     ".global _lncInt     \n"
+00230     "_lncInt   :         \n"
+00231 
+00232   "  pusha                \n" /* Save all registers           */
+00233   "  pushw %ds            \n" /* Set up the data segment      */
+00234   "  pushw %es            \n"
+00235   "  pushw %ss            \n" /* Note that ss is always valid */
+00236   "  pushw %ss            \n"
+00237   "  popw %ds             \n"
+00238   "  popw %es             \n"
+00239   "  call lncInt \n"
+00240   "  popw %es             \n"
+00241   "  popw %ds             \n" /* Restore registers            */
+00242   "  popa                 \n"
+00243   "  iret                 \n" /* Exit interrupt               */    
+00244     );
+00245 
+00246 int lncAttach(struct lncInfo *lnc,int unit) {
+00247   int lncMemSize = 0x0;
+00248 
+00249   lncMemSize = ((NDESC(lnc->nrdre) + NDESC(lnc->ntdre)) * sizeof(struct hostRingEntry));
+00250 
+00251   if (lnc->nic.memMode != SHMEM)
+00252     lncMemSize += sizeof(struct initBlock) + (sizeof(struct mds) * (NDESC(lnc->nrdre) + NDESC(lnc->ntdre))) + MEM_SLEW;
+00253 
+00254   if (lnc->nic.memMode == DMA_FIXED)
+00255     lncMemSize += (NDESC(lnc->nrdre) * RECVBUFSIZE) + (NDESC(lnc->ntdre) * TRANSBUFSIZE);
+00256 
+00257   if (lnc->nic.memMode != SHMEM) {
+00258     if (lnc->nic.ic < PCnet_32) {
+00259       /* ISA based cards */
+00260       kprintf("ISA Board\n");
+00261       /* sc->recv_ring = contigmalloc(lnc_mem_size, M_DEVBUF, M_NOWAIT,0ul, 0xfffffful, 4ul, 0x1000000); */
+00262       }
+00263     else {
+00264       /*
+00265       * For now it still needs to be below 16MB because the
+00266       * descriptor's can only hold 16 bit addresses.
+00267       */
+00268       /* sc->recv_ring = contigmalloc(lnc_mem_size, M_DEVBUF, M_NOWAIT,0ul, 0xfffffful, 4ul, 0x1000000); */
+00269       lnc->recvRing = kmalloc(lncMemSize,-2);
+00270       kprintf("PCI Board\n");
+00271       }      
+00272     }
+00273 
+00274   if (!lnc->recvRing) {
+00275     kprintf("lnc%d: Couldn't allocate memory for NIC\n", unit);
+00276     return (0);
+00277     }
+00278 
+00279   lnc->nic.mode = NORMAL;
+00280 
+00281   /* Fill in arpcom structure entries */
+00282   /*
+00283   lnc->arpcom.ac_if.if_softc = sc;
+00284   lnc->arpcom.ac_if.if_name = lncdriver.name;
+00285   lnc->arpcom.ac_if.if_unit = unit;
+00286   lnc->arpcom.ac_if.if_mtu = ETHERMTU;
+00287   lnc->arpcom.ac_if.if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
+00288   lnc->arpcom.ac_if.if_timer = 0;
+00289   lnc->arpcom.ac_if.if_output = ether_output;
+00290   lnc->arpcom.ac_if.if_start = lnc_start;
+00291   lnc->arpcom.ac_if.if_ioctl = lnc_ioctl;
+00292   lnc->arpcom.ac_if.if_watchdog = lnc_watchdog;
+00293   lnc->arpcom.ac_if.if_init = lnc_init;
+00294   lnc->arpcom.ac_if.if_type = IFT_ETHER;
+00295   lnc->arpcom.ac_if.if_addrlen = ETHER_ADDR_LEN;
+00296   lnc->arpcom.ac_if.if_hdrlen = ETHER_HDR_LEN;
+00297   lnc->arpcom.ac_if.if_snd.ifq_maxlen = IFQ_MAXLEN;
+00298   */
+00299   /* ether_ifattach(&sc->arpcom.ac_if, ETHER_BPF_SUPPORTED); */
+00300 
+00301   kprintf("lnc%d: ", unit);
+00302   if (lnc->nic.ic == LANCE || lnc->nic.ic == C_LANCE)
+00303     kprintf("%s (%s)",nicIdent[lnc->nic.ident], icIdent[lnc->nic.ic]);
+00304   else
+00305     kprintf("%s", icIdent[lnc->nic.ic]);
+00306   kprintf(" address 0x%X\n", lnc->arpcom.ac_enaddr);   
+00307   return(1);
+00308   }
+00309 
+00310 /***
+00311  END
+00312  ***/
+00313 
+

Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/lnc_8c.html b/doc/html/lnc_8c.html new file mode 100644 index 0000000..68b42fb --- /dev/null +++ b/doc/html/lnc_8c.html @@ -0,0 +1,462 @@ + + +UbixOS V2: src/sys/pci/lnc.c File Reference + + + + +
+
+
+
+ +

lnc.c File Reference

+

+#include <pci/lnc.h>
+#include <sys/io.h>
+#include <ubixos/types.h>
+#include <sys/idt.h>
+#include <sys/gdt.h>
+#include <lib/kmalloc.h>
+#include <lib/kprintf.h>
+#include <sys/video.h>
+#include <isa/8259.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Functions

 asm (".global _lncInt \n""_lncInt : \n"" pusha \n"" pushw %ds \n"" pushw %es \n"" pushw %ss \n"" pushw %ss \n"" popw %ds \n"" popw %es \n"" call lncInt \n"" popw %es \n"" popw %ds \n"" popa \n"" iret \n")
void initLNC ()
int lanceProbe (struct lncInfo *lnc)
int lncAttach (struct lncInfo *lnc, int unit)
void lncInt ()
int probe (struct lncInfo *lnc)
uInt16 readBcr (struct lncInfo *sc, uInt16 port)
uInt16 readCsr (struct lncInfo *lnc, uInt16 port)
void writeBcr (struct lncInfo *lnc, uInt16 port, uInt16 val)
void writeCsr (struct lncInfo *lnc, uInt16 port, uInt16 val)

Variables

static char const *const icIdent []
lncInfolnc = 0x0
static char const *const nicIdent []
+


Function Documentation

+ +
+
+ + + + + + + + + +
asm (".global _lncInt \n""_lncInt : \n"" pusha \n"" pushw %ds \n"" pushw %es \n"" pushw %ss \n"" pushw %ss \n"" popw %ds \n"" popw %es \n"" call lncInt \n"" popw %es \n"" popw %ds \n"" popa \n"" iret \n"   ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
void initLNC (  ) 
+
+ +

+ +

+
+ + + + + + + + + +
int lanceProbe (struct lncInfo lnc  ) 
+
+
+ +

+ +

+Definition at line 192 of file lnc.c. +

+References C_LANCE, CSR0, CSR3, INEA, inportWord(), LANCE, lnc, lncInfo::rdp, readCsr(), STOP, UNKNOWN, and writeCsr(). +

+Referenced by probe(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int lncAttach (struct lncInfo lnc,
int  unit 
)
+
+ +

+ +

+
+ + + + + + + + +
void lncInt (  ) 
+
+
+ +

+ +

+Definition at line 208 of file lnc.c. +

+References ERR, inportWord(), INTR, kprintf(), lnc, outportByte(), outportWord(), lncInfo::rdp, RINT, TINT, and x20. +

+

+ +

+
+ + + + + + + + + +
int probe (struct lncInfo lnc  ) 
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
uInt16 readBcr (struct lncInfo sc,
uInt16  port 
)
+
+
+ +

+ +

+Definition at line 98 of file lnc.c. +

+References lncInfo::bdp, inportWord(), outportWord(), and lncInfo::rap. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
uInt16 readCsr (struct lncInfo lnc,
uInt16  port 
)
+
+
+ +

+ +

+Definition at line 88 of file lnc.c. +

+References inportWord(), lnc, outportWord(), lncInfo::rap, and lncInfo::rdp. +

+Referenced by initLNC(), lanceProbe(), and probe(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void writeBcr (struct lncInfo lnc,
uInt16  port,
uInt16  val 
)
+
+
+ +

+ +

+Definition at line 93 of file lnc.c. +

+References lncInfo::bdp, lnc, outportWord(), and lncInfo::rap. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void writeCsr (struct lncInfo lnc,
uInt16  port,
uInt16  val 
)
+
+
+ +

+ +

+Definition at line 83 of file lnc.c. +

+References lnc, outportWord(), lncInfo::rap, and lncInfo::rdp. +

+Referenced by initLNC(), and lanceProbe(). +

+

+


Variable Documentation

+ +
+
+ + + + +
char const* const icIdent[] [static]
+
+
+ +

+Initial value:

 {
+  "Unknown",
+  "LANCE",
+  "C-LANCE",
+  "PCnet-ISA",
+  "PCnet-ISA+",
+  "PCnet-ISA II",
+  "PCnet-32 VL-Bus",
+  "PCnet-PCI",
+  "PCnet-PCI II",
+  "PCnet-FAST",
+  "PCnet-FAST+",
+  "PCnet-Home",
+  }
+
+

+Definition at line 68 of file lnc.c. +

+Referenced by lncAttach(). +

+

+ +

+
+ + + + +
struct lncInfo* lnc = 0x0
+
+
+ +

+ +

+Definition at line 58 of file lnc.c. +

+Referenced by initLNC(), lanceProbe(), lncAttach(), lncInt(), probe(), readCsr(), writeBcr(), and writeCsr(). +

+

+ +

+
+ + + + +
char const* const nicIdent[] [static]
+
+
+ +

+Initial value:

 {
+  "Unknown",
+  "BICC",
+  "NE2100",
+  "DEPCA",
+  "CNET98S",      
+  }
+
+

+Definition at line 60 of file lnc.c. +

+Referenced by lncAttach(). +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/lnc_8h-source.html b/doc/html/lnc_8h-source.html new file mode 100644 index 0000000..88c5b06 --- /dev/null +++ b/doc/html/lnc_8h-source.html @@ -0,0 +1,240 @@ + + +UbixOS V2: src/sys/include/pci/lnc.h Source File + + + + +
+
+
+
+ +

lnc.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _LNC_H
+00031 #define _LNC_H
+00032 
+00033 #include <ubixos/types.h>
+00034 
+00035 #define NDESC(len2) (1 << len2)
+00036 #define NORMAL 0
+00037 #define MEM_SLEW 8
+00038 #define TRANSBUFSIZE 1518
+00039 #define RECVBUFSIZE 1518
+00040 #define NRDRE 3
+00041 #define NTDRE 3
+00042 #define    ETHER_ADDR_LEN          6
+00043 #define NE2100_IOSIZE  24
+00044 #define PCNET_RDP    0x10        /* Register Data Port */
+00045 #define PCNET_RAP    0x12        /* Register Address Port */
+00046 #define PCNET_RESET  0x14
+00047 #define PCNET_BDP    0x16
+00048 #define PCNET_VSW    0x18
+00049 #define NE2100          2
+00050 
+00051 /* mem_mode values */
+00052 #define DMA_FIXED       1
+00053 #define DMA_MBUF        2
+00054 #define SHMEM           4
+00055 
+00056 
+00057 /********** Chip Types **********/
+00058 #define UNKNOWN         0        /* Unknown  */
+00059 #define LANCE           1        /* Am7990   */
+00060 #define C_LANCE         2        /* Am79C90  */
+00061 #define PCnet_ISA       3        /* Am79C960 */
+00062 #define PCnet_ISAplus   4        /* Am79C961 */
+00063 #define PCnet_ISA_II    5        /* Am79C961A */
+00064 #define PCnet_32        6        /* Am79C965 */
+00065 #define PCnet_PCI       7        /* Am79C970 */
+00066 #define PCnet_PCI_II    8        /* Am79C970A */
+00067 #define PCnet_FAST      9        /* Am79C971 */
+00068 #define PCnet_FASTplus  10       /* Am79C972 */
+00069 #define PCnet_Home      11       /* Am79C978 */
+00070 
+00071 /******** AM7990 Specifics **************/
+00072 #define CSR0    0x0000
+00073 #define CSR1    1
+00074 #define CSR2    2
+00075 #define CSR3    3
+00076 #define CSR88   88
+00077 #define CSR89   89
+00078 
+00079 #define ERR     0x8000
+00080 #define BABL    0x4000
+00081 #define CERR    0x2000
+00082 #define MISS    0x1000
+00083 #define MERR    0x0800
+00084 #define RINT    0x0400
+00085 #define TINT    0x0200
+00086 #define IDON    0x0100
+00087 #define INTR    0x0080
+00088 #define INEA    0x0040
+00089 #define RXON    0x0020
+00090 #define TXON    0x0010
+00091 #define TDMD    0x0008
+00092 #define STOP    0x0004
+00093 #define STRT    0x0002
+00094 #define INIT    0x0001
+00095 
+00096 
+00097 /* CSR88-89: Chip ID masks */
+00098 #define AMD_MASK  0x003
+00099 #define PART_MASK 0xffff
+00100 #define Am79C960  0x0003
+00101 #define Am79C961  0x2260
+00102 #define Am79C961A 0x2261
+00103 #define Am79C965  0x2430
+00104 #define Am79C970  0x0242
+00105 #define Am79C970A 0x2621
+00106 #define Am79C971  0x2623
+00107 #define Am79C972  0x2624
+00108 #define Am79C973  0x2625
+00109 #define Am79C978  0x2626
+00110 
+00111 /********** Structs **********/
+00112 
+00113 
+00114 
+00115 
+00116 struct initBlock {
+00117   uInt16 mode;           /* Mode register                        */
+00118   uInt8  padr[6];        /* Ethernet address                     */
+00119   uInt8  ladrf[8];       /* Logical address filter (multicast)   */
+00120   uInt16 rdra;           /* Low order pointer to receive ring    */
+00121   uInt16 rlen;           /* High order pointer and no. rings     */
+00122   uInt16 tdra;           /* Low order pointer to transmit ring   */
+00123   uInt16 tlen;           /* High order pointer and no rings      */
+00124   };
+00125 
+00126 struct mds {
+00127   uInt16 md0;
+00128   uInt16 md1;
+00129   short  md2;
+00130   uInt16 md3;
+00131   };
+00132 
+00133 struct hostRingEntry {
+00134   struct mds *md;
+00135   union {
+00136     //struct mbuf *mbuf;
+00137     char *data;
+00138     }buff;
+00139   };
+00140 
+00141 struct arpcom {
+00142   //struct  ifnet ac_if;            /* network-visible interface */
+00143   uInt8  ac_enaddr[6];           /* ethernet hardware address */
+00144   int    ac_multicnt;            /* length of ac_multiaddrs list */
+00145   void   *ac_netgraph;           /* ng_ether(4) netgraph node info */
+00146   };
+00147 
+00148 struct nicInfo {
+00149   int ident;         /* Type of card */
+00150   int ic;            /* Type of ic, Am7990, Am79C960 etc. */
+00151   int memMode;
+00152   int iobase;
+00153   int mode;          /* Mode setting at initialization */
+00154   };
+00155 
+00156 struct lncInfo {
+00157   struct arpcom        arpcom;
+00158   struct nicInfo       nic;
+00159   struct hostRingEntry *recvRing;
+00160   struct hostRingEntry *transRings;
+00161   struct initBlock     *initBloack;
+00162   int                  rap;
+00163   int                  rdp;
+00164   int                  bdp;
+00165   int                  nrdre;
+00166   int                  ntdre;
+00167   };
+00168 
+00169 extern struct lncInfo *lnc;
+00170 
+00171 void writeCsr(struct lncInfo *lnc, uInt16 port, uInt16 val);
+00172 uInt16 readCsr(struct lncInfo *lnc, uInt16 port);
+00173 void writeBcr(struct lncInfo *lnc, uInt16 port, uInt16 val);
+00174 uInt16 readBcr(struct lncInfo *lnc, uInt16 port);
+00175 
+00176 void initLNC();
+00177 int probe(struct lncInfo *lnc);
+00178 int lanceProbe(struct lncInfo *lnc);
+00179 int lncAttach(struct lncInfo *lnc,int unit);
+00180 
+00181 
+00182 void lncInt();
+00183 void _lncInt();
+00184 
+00185 #endif
+00186 
+00187 /***
+00188  $Log$
+00189  Revision 1.1.1.1  2006/06/01 12:46:14  reddawg
+00190  ubix2
+00191 
+00192  Revision 1.2  2005/10/12 00:13:37  reddawg
+00193  Removed
+00194 
+00195  Revision 1.1.1.1  2005/09/26 17:23:50  reddawg
+00196  no message
+00197 
+00198  Revision 1.2  2004/05/21 15:05:07  reddawg
+00199  Cleaned up
+00200 
+00201 
+00202  END
+00203  ***/
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/lnc_8h.html b/doc/html/lnc_8h.html new file mode 100644 index 0000000..b0d31f0 --- /dev/null +++ b/doc/html/lnc_8h.html @@ -0,0 +1,1730 @@ + + +UbixOS V2: src/sys/include/pci/lnc.h File Reference + + + + +
+
+
+
+ +

lnc.h File Reference

+

+#include <ubixos/types.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  arpcom
struct  hostRingEntry
struct  initBlock
struct  lncInfo
struct  mds
struct  nicInfo

Defines

#define Am79C960   0x0003
#define Am79C961   0x2260
#define Am79C961A   0x2261
#define Am79C965   0x2430
#define Am79C970   0x0242
#define Am79C970A   0x2621
#define Am79C971   0x2623
#define Am79C972   0x2624
#define Am79C973   0x2625
#define Am79C978   0x2626
#define AMD_MASK   0x003
#define BABL   0x4000
#define C_LANCE   2
#define CERR   0x2000
#define CSR0   0x0000
#define CSR1   1
#define CSR2   2
#define CSR3   3
#define CSR88   88
#define CSR89   89
#define DMA_FIXED   1
#define DMA_MBUF   2
#define ERR   0x8000
#define ETHER_ADDR_LEN   6
#define IDON   0x0100
#define INEA   0x0040
#define INIT   0x0001
#define INTR   0x0080
#define LANCE   1
#define MEM_SLEW   8
#define MERR   0x0800
#define MISS   0x1000
#define NDESC(len2)   (1 << len2)
#define NE2100   2
#define NE2100_IOSIZE   24
#define NORMAL   0
#define NRDRE   3
#define NTDRE   3
#define PART_MASK   0xffff
#define PCnet_32   6
#define PCNET_BDP   0x16
#define PCnet_FAST   9
#define PCnet_FASTplus   10
#define PCnet_Home   11
#define PCnet_ISA   3
#define PCnet_ISA_II   5
#define PCnet_ISAplus   4
#define PCnet_PCI   7
#define PCnet_PCI_II   8
#define PCNET_RAP   0x12
#define PCNET_RDP   0x10
#define PCNET_RESET   0x14
#define PCNET_VSW   0x18
#define RECVBUFSIZE   1518
#define RINT   0x0400
#define RXON   0x0020
#define SHMEM   4
#define STOP   0x0004
#define STRT   0x0002
#define TDMD   0x0008
#define TINT   0x0200
#define TRANSBUFSIZE   1518
#define TXON   0x0010
#define UNKNOWN   0

Functions

void _lncInt ()
void initLNC ()
int lanceProbe (struct lncInfo *lnc)
int lncAttach (struct lncInfo *lnc, int unit)
void lncInt ()
int probe (struct lncInfo *lnc)
uInt16 readBcr (struct lncInfo *lnc, uInt16 port)
uInt16 readCsr (struct lncInfo *lnc, uInt16 port)
void writeBcr (struct lncInfo *lnc, uInt16 port, uInt16 val)
void writeCsr (struct lncInfo *lnc, uInt16 port, uInt16 val)

Variables

lncInfolnc
+


Define Documentation

+ +
+
+ + + + +
#define Am79C960   0x0003
+
+
+ +

+ +

+Definition at line 100 of file lnc.h. +

+Referenced by probe(). +

+

+ +

+
+ + + + +
#define Am79C961   0x2260
+
+
+ +

+ +

+Definition at line 101 of file lnc.h. +

+Referenced by probe(). +

+

+ +

+
+ + + + +
#define Am79C961A   0x2261
+
+
+ +

+ +

+Definition at line 102 of file lnc.h. +

+Referenced by probe(). +

+

+ +

+
+ + + + +
#define Am79C965   0x2430
+
+
+ +

+ +

+Definition at line 103 of file lnc.h. +

+Referenced by probe(). +

+

+ +

+
+ + + + +
#define Am79C970   0x0242
+
+
+ +

+ +

+Definition at line 104 of file lnc.h. +

+Referenced by probe(). +

+

+ +

+
+ + + + +
#define Am79C970A   0x2621
+
+
+ +

+ +

+Definition at line 105 of file lnc.h. +

+Referenced by probe(). +

+

+ +

+
+ + + + +
#define Am79C971   0x2623
+
+
+ +

+ +

+Definition at line 106 of file lnc.h. +

+Referenced by probe(). +

+

+ +

+
+ + + + +
#define Am79C972   0x2624
+
+
+ +

+ +

+Definition at line 107 of file lnc.h. +

+Referenced by probe(). +

+

+ +

+
+ + + + +
#define Am79C973   0x2625
+
+
+ +

+ +

+Definition at line 108 of file lnc.h. +

+Referenced by probe(). +

+

+ +

+
+ + + + +
#define Am79C978   0x2626
+
+
+ +

+ +

+Definition at line 109 of file lnc.h. +

+Referenced by probe(). +

+

+ +

+
+ + + + +
#define AMD_MASK   0x003
+
+
+ +

+ +

+Definition at line 98 of file lnc.h. +

+Referenced by probe(). +

+

+ +

+
+ + + + +
#define BABL   0x4000
+
+
+ +

+ +

+Definition at line 80 of file lnc.h. +

+

+ +

+
+ + + + +
#define C_LANCE   2
+
+
+ +

+ +

+Definition at line 60 of file lnc.h. +

+Referenced by lanceProbe(), and lncAttach(). +

+

+ +

+
+ + + + +
#define CERR   0x2000
+
+
+ +

+ +

+Definition at line 81 of file lnc.h. +

+

+ +

+
+ + + + +
#define CSR0   0x0000
+
+
+ +

+ +

+Definition at line 72 of file lnc.h. +

+Referenced by initLNC(), and lanceProbe(). +

+

+ +

+
+ + + + +
#define CSR1   1
+
+
+ +

+ +

+Definition at line 73 of file lnc.h. +

+

+ +

+
+ + + + +
#define CSR2   2
+
+
+ +

+ +

+Definition at line 74 of file lnc.h. +

+

+ +

+
+ + + + +
#define CSR3   3
+
+
+ +

+ +

+Definition at line 75 of file lnc.h. +

+Referenced by initLNC(), and lanceProbe(). +

+

+ +

+
+ + + + +
#define CSR88   88
+
+
+ +

+ +

+Definition at line 76 of file lnc.h. +

+Referenced by probe(). +

+

+ +

+
+ + + + +
#define CSR89   89
+
+
+ +

+ +

+Definition at line 77 of file lnc.h. +

+Referenced by probe(). +

+

+ +

+
+ + + + +
#define DMA_FIXED   1
+
+
+ +

+ +

+Definition at line 52 of file lnc.h. +

+Referenced by initLNC(), and lncAttach(). +

+

+ +

+
+ + + + +
#define DMA_MBUF   2
+
+
+ +

+ +

+Definition at line 53 of file lnc.h. +

+

+ +

+
+ + + + +
#define ERR   0x8000
+
+
+ +

+ +

+Definition at line 79 of file lnc.h. +

+Referenced by lncInt(). +

+

+ +

+
+ + + + +
#define ETHER_ADDR_LEN   6
+
+
+ +

+ +

+Definition at line 42 of file lnc.h. +

+Referenced by initLNC(). +

+

+ +

+
+ + + + +
#define IDON   0x0100
+
+
+ +

+ +

+Definition at line 86 of file lnc.h. +

+Referenced by initLNC(). +

+

+ +

+
+ + + + +
#define INEA   0x0040
+
+
+ +

+ +

+Definition at line 88 of file lnc.h. +

+Referenced by initLNC(), and lanceProbe(). +

+

+ +

+
+ + + + +
#define INIT   0x0001
+
+
+ +

+ +

+Definition at line 94 of file lnc.h. +

+Referenced by initLNC(). +

+

+ +

+
+ + + + +
#define INTR   0x0080
+
+
+ +

+ +

+Definition at line 87 of file lnc.h. +

+Referenced by lncInt(). +

+

+ +

+
+ + + + +
#define LANCE   1
+
+
+ +

+ +

+Definition at line 59 of file lnc.h. +

+Referenced by lanceProbe(), and lncAttach(). +

+

+ +

+
+ + + + +
#define MEM_SLEW   8
+
+
+ +

+ +

+Definition at line 37 of file lnc.h. +

+Referenced by lncAttach(). +

+

+ +

+
+ + + + +
#define MERR   0x0800
+
+
+ +

+ +

+Definition at line 83 of file lnc.h. +

+

+ +

+
+ + + + +
#define MISS   0x1000
+
+
+ +

+ +

+Definition at line 82 of file lnc.h. +

+

+ +

+
+ + + + + + + + + +
#define NDESC (len2   )    (1 << len2)
+
+
+ +

+ +

+Definition at line 35 of file lnc.h. +

+Referenced by lncAttach(). +

+

+ +

+
+ + + + +
#define NE2100   2
+
+
+ +

+ +

+Definition at line 49 of file lnc.h. +

+Referenced by initLNC(). +

+

+ +

+
+ + + + +
#define NE2100_IOSIZE   24
+
+
+ +

+ +

+Definition at line 43 of file lnc.h. +

+

+ +

+
+ + + + +
#define NORMAL   0
+
+
+ +

+ +

+Definition at line 36 of file lnc.h. +

+Referenced by lncAttach(). +

+

+ +

+
+ + + + +
#define NRDRE   3
+
+
+ +

+ +

+Definition at line 40 of file lnc.h. +

+Referenced by initLNC(). +

+

+ +

+
+ + + + +
#define NTDRE   3
+
+
+ +

+ +

+Definition at line 41 of file lnc.h. +

+Referenced by initLNC(). +

+

+ +

+
+ + + + +
#define PART_MASK   0xffff
+
+
+ +

+ +

+Definition at line 99 of file lnc.h. +

+Referenced by probe(). +

+

+ +

+
+ + + + +
#define PCnet_32   6
+
+
+ +

+ +

+Definition at line 64 of file lnc.h. +

+Referenced by initLNC(), lncAttach(), and probe(). +

+

+ +

+
+ + + + +
#define PCNET_BDP   0x16
+
+
+ +

+ +

+Definition at line 47 of file lnc.h. +

+Referenced by initLNC(). +

+

+ +

+
+ + + + +
#define PCnet_FAST   9
+
+
+ +

+ +

+Definition at line 67 of file lnc.h. +

+Referenced by probe(). +

+

+ +

+
+ + + + +
#define PCnet_FASTplus   10
+
+
+ +

+ +

+Definition at line 68 of file lnc.h. +

+Referenced by probe(). +

+

+ +

+
+ + + + +
#define PCnet_Home   11
+
+
+ +

+ +

+Definition at line 69 of file lnc.h. +

+Referenced by probe(). +

+

+ +

+
+ + + + +
#define PCnet_ISA   3
+
+
+ +

+ +

+Definition at line 61 of file lnc.h. +

+Referenced by probe(). +

+

+ +

+
+ + + + +
#define PCnet_ISA_II   5
+
+
+ +

+ +

+Definition at line 63 of file lnc.h. +

+Referenced by probe(). +

+

+ +

+
+ + + + +
#define PCnet_ISAplus   4
+
+
+ +

+ +

+Definition at line 62 of file lnc.h. +

+Referenced by probe(). +

+

+ +

+
+ + + + +
#define PCnet_PCI   7
+
+
+ +

+ +

+Definition at line 65 of file lnc.h. +

+Referenced by probe(). +

+

+ +

+
+ + + + +
#define PCnet_PCI_II   8
+
+
+ +

+ +

+Definition at line 66 of file lnc.h. +

+Referenced by probe(). +

+

+ +

+
+ + + + +
#define PCNET_RAP   0x12
+
+
+ +

+ +

+Definition at line 45 of file lnc.h. +

+Referenced by initLNC(). +

+

+ +

+
+ + + + +
#define PCNET_RDP   0x10
+
+
+ +

+ +

+Definition at line 44 of file lnc.h. +

+Referenced by initLNC(). +

+

+ +

+
+ + + + +
#define PCNET_RESET   0x14
+
+
+ +

+ +

+Definition at line 46 of file lnc.h. +

+

+ +

+
+ + + + +
#define PCNET_VSW   0x18
+
+
+ +

+ +

+Definition at line 48 of file lnc.h. +

+

+ +

+
+ + + + +
#define RECVBUFSIZE   1518
+
+
+ +

+ +

+Definition at line 39 of file lnc.h. +

+Referenced by lncAttach(). +

+

+ +

+
+ + + + +
#define RINT   0x0400
+
+
+ +

+ +

+Definition at line 84 of file lnc.h. +

+Referenced by lncInt(). +

+

+ +

+
+ + + + +
#define RXON   0x0020
+
+
+ +

+ +

+Definition at line 89 of file lnc.h. +

+

+ +

+
+ + + + +
#define SHMEM   4
+
+
+ +

+ +

+Definition at line 54 of file lnc.h. +

+Referenced by lncAttach(). +

+

+ +

+
+ + + + +
#define STOP   0x0004
+
+
+ +

+ +

+Definition at line 92 of file lnc.h. +

+Referenced by lanceProbe(). +

+

+ +

+
+ + + + +
#define STRT   0x0002
+
+
+ +

+ +

+Definition at line 93 of file lnc.h. +

+Referenced by initLNC(). +

+

+ +

+
+ + + + +
#define TDMD   0x0008
+
+
+ +

+ +

+Definition at line 91 of file lnc.h. +

+

+ +

+
+ + + + +
#define TINT   0x0200
+
+
+ +

+ +

+Definition at line 85 of file lnc.h. +

+Referenced by lncInt(). +

+

+ +

+
+ + + + +
#define TRANSBUFSIZE   1518
+
+
+ +

+ +

+Definition at line 38 of file lnc.h. +

+Referenced by lncAttach(). +

+

+ +

+
+ + + + +
#define TXON   0x0010
+
+
+ +

+ +

+Definition at line 90 of file lnc.h. +

+

+ +

+
+ + + + +
#define UNKNOWN   0
+
+
+ +

+ +

+Definition at line 58 of file lnc.h. +

+Referenced by lanceProbe(). +

+

+


Function Documentation

+ +
+
+ + + + + + + + +
void _lncInt (  ) 
+
+
+ +

+ +

+Referenced by initLNC(). +

+

+ +

+
+ + + + + + + + +
void initLNC (  ) 
+
+ +

+ +

+
+ + + + + + + + + +
int lanceProbe (struct lncInfo lnc  ) 
+
+
+ +

+ +

+Definition at line 192 of file lnc.c. +

+References C_LANCE, CSR0, CSR3, INEA, inportWord(), LANCE, lnc, lncInfo::rdp, readCsr(), STOP, UNKNOWN, and writeCsr(). +

+Referenced by probe(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int lncAttach (struct lncInfo lnc,
int  unit 
)
+
+ +

+ +

+
+ + + + + + + + +
void lncInt (  ) 
+
+
+ +

+ +

+Definition at line 208 of file lnc.c. +

+References ERR, inportWord(), INTR, kprintf(), lnc, outportByte(), outportWord(), lncInfo::rdp, RINT, TINT, and x20. +

+

+ +

+
+ + + + + + + + + +
int probe (struct lncInfo lnc  ) 
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
uInt16 readBcr (struct lncInfo lnc,
uInt16  port 
)
+
+
+ +

+ +

+Definition at line 98 of file lnc.c. +

+References lncInfo::bdp, inportWord(), outportWord(), and lncInfo::rap. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
uInt16 readCsr (struct lncInfo lnc,
uInt16  port 
)
+
+
+ +

+ +

+Definition at line 88 of file lnc.c. +

+References inportWord(), lnc, outportWord(), lncInfo::rap, and lncInfo::rdp. +

+Referenced by initLNC(), lanceProbe(), and probe(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void writeBcr (struct lncInfo lnc,
uInt16  port,
uInt16  val 
)
+
+
+ +

+ +

+Definition at line 93 of file lnc.c. +

+References lncInfo::bdp, lnc, outportWord(), and lncInfo::rap. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void writeCsr (struct lncInfo lnc,
uInt16  port,
uInt16  val 
)
+
+
+ +

+ +

+Definition at line 83 of file lnc.c. +

+References lnc, outportWord(), lncInfo::rap, and lncInfo::rdp. +

+Referenced by initLNC(), and lanceProbe(). +

+

+


Variable Documentation

+ +
+
+ + + + +
struct lncInfo* lnc
+
+
+ +

+ +

+Definition at line 58 of file lnc.c. +

+Referenced by initLNC(), lanceProbe(), lncAttach(), lncInt(), probe(), readCsr(), writeBcr(), and writeCsr(). +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/loopif_8c-source.html b/doc/html/loopif_8c-source.html new file mode 100644 index 0000000..0ea2811 --- /dev/null +++ b/doc/html/loopif_8c-source.html @@ -0,0 +1,121 @@ + + +UbixOS V2: src/sys/net/netif/loopif.c Source File + + + + +
+
+
+
+ +

loopif.c

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 #include "net/debug.h"
+00036 #include "net/mem.h"
+00037 #include "net/opt.h"
+00038 #include "netif/loopif.h"
+00039 #include "netif/tcpdump.h"
+00040 
+00041 #include "net/tcp.h"
+00042 #include "net/ipv4/ip.h"
+00043 
+00044 /*-----------------------------------------------------------------------------------*/
+00045 static err_t
+00046 loopif_output(struct netif *netif, struct pbuf *p,
+00047              struct ip_addr *ipaddr)
+00048 {
+00049   struct pbuf *q, *r;
+00050   char *ptr;
+00051 
+00052 #ifdef LWIP_DEBUG
+00053   tcpdump(p);
+00054 #endif /* LWIP_DEBUG */
+00055   
+00056   r = pbuf_alloc(PBUF_RAW, p->tot_len, PBUF_RAM);
+00057   if(r != NULL) {
+00058     ptr = r->payload;
+00059     
+00060     for(q = p; q != NULL; q = q->next) {
+00061       bcopy(q->payload, ptr, q->len);
+00062       ptr += q->len;
+00063     }
+00064     netif->input(r, netif);
+00065     return ERR_OK;    
+00066   }
+00067   return ERR_MEM;
+00068 }
+00069 /*-----------------------------------------------------------------------------------*/
+00070 void
+00071 loopif_init(struct netif *netif)
+00072 {
+00073   netif->name[0] = 'l';
+00074   netif->name[1] = 'o';
+00075   netif->output = loopif_output;
+00076 }
+00077 /*-----------------------------------------------------------------------------------*/
+00078 
+00079 
+00080 
+00081 
+00082 
+00083 
+00084 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/loopif_8c.html b/doc/html/loopif_8c.html new file mode 100644 index 0000000..2e71439 --- /dev/null +++ b/doc/html/loopif_8c.html @@ -0,0 +1,124 @@ + + +UbixOS V2: src/sys/net/netif/loopif.c File Reference + + + + +
+
+
+
+ +

loopif.c File Reference

+

+#include "net/debug.h"
+#include "net/mem.h"
+#include "net/opt.h"
+#include "netif/loopif.h"
+#include "netif/tcpdump.h"
+#include "net/tcp.h"
+#include "net/ipv4/ip.h"
+ +

+Go to the source code of this file. + + + + + + +

Functions

void loopif_init (struct netif *netif)
static err_t loopif_output (struct netif *netif, struct pbuf *p, struct ip_addr *ipaddr)
+


Function Documentation

+ +
+
+ + + + + + + + + +
void loopif_init (struct netif netif  ) 
+
+
+ +

+ +

+Definition at line 71 of file loopif.c. +

+References loopif_output(), netif::name, and netif::output. +

+Referenced by netMainThread(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
static err_t loopif_output (struct netif netif,
struct pbuf p,
struct ip_addr ipaddr 
) [static]
+
+
+ +

+ +

+Definition at line 46 of file loopif.c. +

+References bcopy(), ERR_MEM, ERR_OK, netif::input, pbuf::len, pbuf::next, NULL, pbuf::payload, pbuf_alloc(), PBUF_RAM, PBUF_RAW, tcpdump(), and pbuf::tot_len. +

+Referenced by loopif_init(). +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/loopif_8h-source.html b/doc/html/loopif_8h-source.html new file mode 100644 index 0000000..7340506 --- /dev/null +++ b/doc/html/loopif_8h-source.html @@ -0,0 +1,79 @@ + + +UbixOS V2: src/sys/include/netif/loopif.h Source File + + + + +
+
+
+
+ +

loopif.h

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 #ifndef __NETIF_LOOPIF_H__
+00036 #define __NETIF_LOOPIF_H__
+00037 
+00038 #include "net/netif.h"
+00039 
+00040 void loopif_init(struct netif *netif);
+00041 
+00042 #endif /* __NETIF_LOOPIF_H__ */
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/loopif_8h.html b/doc/html/loopif_8h.html new file mode 100644 index 0000000..c325201 --- /dev/null +++ b/doc/html/loopif_8h.html @@ -0,0 +1,75 @@ + + +UbixOS V2: src/sys/include/netif/loopif.h File Reference + + + + +
+
+
+
+ +

loopif.h File Reference

+

+#include "net/netif.h"
+ +

+Go to the source code of this file. + + + + +

Functions

void loopif_init (struct netif *netif)
+


Function Documentation

+ +
+
+ + + + + + + + + +
void loopif_init (struct netif netif  ) 
+
+
+ +

+ +

+Definition at line 71 of file loopif.c. +

+References loopif_output(), netif::name, and netif::output. +

+Referenced by netMainThread(). +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/lwipopts_8h-source.html b/doc/html/lwipopts_8h-source.html new file mode 100644 index 0000000..f7cf243 --- /dev/null +++ b/doc/html/lwipopts_8h-source.html @@ -0,0 +1,211 @@ + + +UbixOS V2: src/sys/include/net/lwipopts.h Source File + + + + +
+
+
+
+ +

lwipopts.h

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 #ifndef __LWIPOPTS_H__
+00036 #define __LWIPOPTS_H__
+00037 
+00038 /* ---------- Memory options ---------- */
+00039 /* MEM_ALIGNMENT: should be set to the alignment of the CPU for which
+00040    lwIP is compiled. 4 byte alignment -> define MEM_ALIGNMENT to 4, 2
+00041    byte alignment -> define MEM_ALIGNMENT to 2. */
+00042 #define MEM_ALIGNMENT           2
+00043 
+00044 /* MEM_SIZE: the size of the heap memory. If the application will send
+00045 a lot of data that needs to be copied, this should be set high. */
+00046 #define MEM_SIZE                1000
+00047 
+00048 /* MEMP_NUM_PBUF: the number of memp struct pbufs. If the application
+00049    sends a lot of data out of ROM (or other static memory), this
+00050    should be set high. */
+00051 #define MEMP_NUM_PBUF           8
+00052 /* MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One
+00053    per active UDP "connection". */
+00054 #define MEMP_NUM_UDP_PCB        4
+00055 /* MEMP_NUM_TCP_PCB: the number of simulatenously active TCP
+00056    connections. */
+00057 #define MEMP_NUM_TCP_PCB        5
+00058 /* MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP
+00059    connections. */
+00060 #define MEMP_NUM_TCP_PCB_LISTEN 8
+00061 /* MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP
+00062    segments. */
+00063 #define MEMP_NUM_TCP_SEG        8
+00064 /* MEMP_NUM_SYS_TIMEOUT: the number of simulateously active
+00065    timeouts. */
+00066 #define MEMP_NUM_SYS_TIMEOUT    3
+00067 
+00068 
+00069 /* The following four are used only with the sequential API and can be
+00070    set to 0 if the application only will use the raw API. */
+00071 /* MEMP_NUM_NETBUF: the number of struct netbufs. */
+00072 #define MEMP_NUM_NETBUF         2
+00073 /* MEMP_NUM_NETCONN: the number of struct netconns. */
+00074 #define MEMP_NUM_NETCONN        4
+00075 /* MEMP_NUM_APIMSG: the number of struct api_msg, used for
+00076    communication between the TCP/IP stack and the sequential
+00077    programs. */
+00078 #define MEMP_NUM_API_MSG        8
+00079 /* MEMP_NUM_TCPIPMSG: the number of struct tcpip_msg, which is used
+00080    for sequential API communication and incoming packets. Used in
+00081    src/api/tcpip.c. */
+00082 #define MEMP_NUM_TCPIP_MSG      8
+00083 
+00084 /* These two control is reclaimer functions should be compiled
+00085    in. Should always be turned on (1). */
+00086 #define MEM_RECLAIM             1
+00087 #define MEMP_RECLAIM            1
+00088 
+00089 /* ---------- Pbuf options ---------- */
+00090 /* PBUF_POOL_SIZE: the number of buffers in the pbuf pool. */
+00091 #define PBUF_POOL_SIZE          6
+00092 
+00093 /* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. */
+00094 #define PBUF_POOL_BUFSIZE       128
+00095 
+00096 /* PBUF_LINK_HLEN: the number of bytes that should be allocated for a
+00097    link level header. */
+00098 #define PBUF_LINK_HLEN          16
+00099 
+00100 /* ---------- TCP options ---------- */
+00101 #define LWIP_TCP                1
+00102 #define TCP_TTL                 255
+00103 
+00104 /* Controls if TCP should queue segments that arrive out of
+00105    order. Define to 0 if your device is low on memory. */
+00106 #define TCP_QUEUE_OOSEQ         1
+00107 
+00108 /* TCP Maximum segment size. */
+00109 #define TCP_MSS                 128
+00110 
+00111 /* TCP sender buffer space (bytes). */
+00112 #define TCP_SND_BUF             256
+00113 
+00114 /* TCP sender buffer space (pbufs). This must be at least = 2 *
+00115    TCP_SND_BUF/TCP_MSS for things to work. */
+00116 #define TCP_SND_QUEUELEN        4 * TCP_SND_BUF/TCP_MSS
+00117 
+00118 /* TCP receive window. */
+00119 #define TCP_WND                 1024
+00120 
+00121 /* Maximum number of retransmissions of data segments. */
+00122 #define TCP_MAXRTX              12
+00123 
+00124 /* Maximum number of retransmissions of SYN segments. */
+00125 #define TCP_SYNMAXRTX           4
+00126 
+00127 /* ---------- ARP options ---------- */
+00128 #define ARP_TABLE_SIZE 10
+00129 
+00130 /* ---------- IP options ---------- */
+00131 /* Define IP_FORWARD to 1 if you wish to have the ability to forward
+00132    IP packets across network interfaces. If you are going to run lwIP
+00133    on a device with only one network interface, define this to 0. */
+00134 #define IP_FORWARD              1
+00135 
+00136 /* If defined to 1, IP options are allowed (but not parsed). If
+00137    defined to 0, all packets with IP options are dropped. */
+00138 #define IP_OPTIONS              1
+00139 
+00140 /* ---------- ICMP options ---------- */
+00141 #define ICMP_TTL                255
+00142 
+00143 
+00144 /* ---------- DHCP options ---------- */
+00145 /* Define LWIP_DHCP to 1 if you want DHCP configuration of
+00146    interfaces. DHCP is not implemented in lwIP 0.5.1, however, so
+00147    turning this on does currently not work. */
+00148 #define LWIP_DHCP               0
+00149 
+00150 /* 1 if you want to do an ARP check on the offered address
+00151    (recommended). */
+00152 #define DHCP_DOES_ARP_CHECK     1
+00153 
+00154 /* ---------- UDP options ---------- */
+00155 #define LWIP_UDP                1
+00156 #define UDP_TTL                 255
+00157 
+00158 
+00159 /* ---------- Statistics options ---------- */
+00160 #define STATS
+00161 
+00162 #ifdef STATS
+00163 #define LINK_STATS
+00164 #define IP_STATS
+00165 #define ICMP_STATS
+00166 #define UDP_STATS
+00167 #define TCP_STATS
+00168 #define MEM_STATS
+00169 #define MEMP_STATS
+00170 #define PBUF_STATS
+00171 #define SYS_STATS
+00172 #endif /* STATS */
+00173 
+00174 #endif /* __LWIPOPTS_H__ */
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/lwipopts_8h.html b/doc/html/lwipopts_8h.html new file mode 100644 index 0000000..59fed4e --- /dev/null +++ b/doc/html/lwipopts_8h.html @@ -0,0 +1,884 @@ + + +UbixOS V2: src/sys/include/net/lwipopts.h File Reference + + + + +
+
+
+
+ +

lwipopts.h File Reference

+

+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Defines

#define ARP_TABLE_SIZE   10
#define DHCP_DOES_ARP_CHECK   1
#define ICMP_STATS
#define ICMP_TTL   255
#define IP_FORWARD   1
#define IP_OPTIONS   1
#define IP_STATS
#define LINK_STATS
#define LWIP_DHCP   0
#define LWIP_TCP   1
#define LWIP_UDP   1
#define MEM_ALIGNMENT   2
#define MEM_RECLAIM   1
#define MEM_SIZE   1000
#define MEM_STATS
#define MEMP_NUM_API_MSG   8
#define MEMP_NUM_NETBUF   2
#define MEMP_NUM_NETCONN   4
#define MEMP_NUM_PBUF   8
#define MEMP_NUM_SYS_TIMEOUT   3
#define MEMP_NUM_TCP_PCB   5
#define MEMP_NUM_TCP_PCB_LISTEN   8
#define MEMP_NUM_TCP_SEG   8
#define MEMP_NUM_TCPIP_MSG   8
#define MEMP_NUM_UDP_PCB   4
#define MEMP_RECLAIM   1
#define MEMP_STATS
#define PBUF_LINK_HLEN   16
#define PBUF_POOL_BUFSIZE   128
#define PBUF_POOL_SIZE   6
#define PBUF_STATS
#define STATS
#define SYS_STATS
#define TCP_MAXRTX   12
#define TCP_MSS   128
#define TCP_QUEUE_OOSEQ   1
#define TCP_SND_BUF   256
#define TCP_SND_QUEUELEN   4 * TCP_SND_BUF/TCP_MSS
#define TCP_STATS
#define TCP_SYNMAXRTX   4
#define TCP_TTL   255
#define TCP_WND   1024
#define UDP_STATS
#define UDP_TTL   255
+


Define Documentation

+ +
+
+ + + + +
#define ARP_TABLE_SIZE   10
+
+
+ +

+ +

+Definition at line 128 of file lwipopts.h. +

+Referenced by add_arp_entry(), arp_init(), arp_lookup(), and arp_tmr(). +

+

+ +

+
+ + + + +
#define DHCP_DOES_ARP_CHECK   1
+
+
+ +

+ +

+Definition at line 152 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define ICMP_STATS
+
+
+ +

+ +

+Definition at line 165 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define ICMP_TTL   255
+
+
+ +

+ +

+Definition at line 141 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define IP_FORWARD   1
+
+
+ +

+ +

+Definition at line 134 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define IP_OPTIONS   1
+
+
+ +

+ +

+Definition at line 138 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define IP_STATS
+
+
+ +

+ +

+Definition at line 164 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define LINK_STATS
+
+
+ +

+ +

+Definition at line 163 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define LWIP_DHCP   0
+
+
+ +

+ +

+Definition at line 148 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define LWIP_TCP   1
+
+
+ +

+ +

+Definition at line 101 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define LWIP_UDP   1
+
+
+ +

+ +

+Definition at line 155 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define MEM_ALIGNMENT   2
+
+
+ +

+ +

+Definition at line 42 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define MEM_RECLAIM   1
+
+
+ +

+ +

+Definition at line 86 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define MEM_SIZE   1000
+
+
+ +

+ +

+Definition at line 46 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define MEM_STATS
+
+
+ +

+ +

+Definition at line 168 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define MEMP_NUM_API_MSG   8
+
+
+ +

+ +

+Definition at line 78 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define MEMP_NUM_NETBUF   2
+
+
+ +

+ +

+Definition at line 72 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define MEMP_NUM_NETCONN   4
+
+
+ +

+ +

+Definition at line 74 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define MEMP_NUM_PBUF   8
+
+
+ +

+ +

+Definition at line 51 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define MEMP_NUM_SYS_TIMEOUT   3
+
+
+ +

+ +

+Definition at line 66 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define MEMP_NUM_TCP_PCB   5
+
+
+ +

+ +

+Definition at line 57 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define MEMP_NUM_TCP_PCB_LISTEN   8
+
+
+ +

+ +

+Definition at line 60 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define MEMP_NUM_TCP_SEG   8
+
+
+ +

+ +

+Definition at line 63 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define MEMP_NUM_TCPIP_MSG   8
+
+
+ +

+ +

+Definition at line 82 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define MEMP_NUM_UDP_PCB   4
+
+
+ +

+ +

+Definition at line 54 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define MEMP_RECLAIM   1
+
+
+ +

+ +

+Definition at line 87 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define MEMP_STATS
+
+
+ +

+ +

+Definition at line 169 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define PBUF_LINK_HLEN   16
+
+
+ +

+ +

+Definition at line 98 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define PBUF_POOL_BUFSIZE   128
+
+
+ +

+ +

+Definition at line 94 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define PBUF_POOL_SIZE   6
+
+
+ +

+ +

+Definition at line 91 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define PBUF_STATS
+
+
+ +

+ +

+Definition at line 170 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define STATS
+
+
+ +

+ +

+Definition at line 160 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define SYS_STATS
+
+
+ +

+ +

+Definition at line 171 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define TCP_MAXRTX   12
+
+
+ +

+ +

+Definition at line 122 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define TCP_MSS   128
+
+
+ +

+ +

+Definition at line 109 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define TCP_QUEUE_OOSEQ   1
+
+
+ +

+ +

+Definition at line 106 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define TCP_SND_BUF   256
+
+
+ +

+ +

+Definition at line 112 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define TCP_SND_QUEUELEN   4 * TCP_SND_BUF/TCP_MSS
+
+
+ +

+ +

+Definition at line 116 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define TCP_STATS
+
+
+ +

+ +

+Definition at line 167 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define TCP_SYNMAXRTX   4
+
+
+ +

+ +

+Definition at line 125 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define TCP_TTL   255
+
+
+ +

+ +

+Definition at line 102 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define TCP_WND   1024
+
+
+ +

+ +

+Definition at line 119 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define UDP_STATS
+
+
+ +

+ +

+Definition at line 166 of file lwipopts.h. +

+

+ +

+
+ + + + +
#define UDP_TTL   255
+
+
+ +

+ +

+Definition at line 156 of file lwipopts.h. +

+

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/main.html b/doc/html/main.html new file mode 100644 index 0000000..9213cfc --- /dev/null +++ b/doc/html/main.html @@ -0,0 +1,32 @@ + + +UbixOS V2: Main Page + + + + +
+
+

UbixOS V2 Documentation

+

+

2.0


Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/main_8c-source.html b/doc/html/main_8c-source.html new file mode 100644 index 0000000..2ea5b30 --- /dev/null +++ b/doc/html/main_8c-source.html @@ -0,0 +1,198 @@ + + +UbixOS V2: src/sys/init/main.c Source File + + + + +
+
+
+
+ +

main.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004, 2005 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <ubixos/init.h>
+00031 #include <sys/gdt.h>
+00032 #include <sys/video.h>
+00033 #include <sys/tss.h>
+00034 #include <ubixos/exec.h>
+00035 #include <ubixos/kpanic.h>
+00036 #include <ubixos/systemtask.h>
+00037 #include <vfs/mount.h>
+00038 #include <lib/kprintf.h>
+00039 #include <lib/kmalloc.h>
+00040 
+00041 #define B_ADAPTORSHIFT          24
+00042 #define B_ADAPTORMASK           0x0f
+00043 #define B_ADAPTOR(val)          (((val) >> B_ADAPTORSHIFT) & B_ADAPTORMASK)
+00044 #define B_CONTROLLERSHIFT       20
+00045 #define B_CONTROLLERMASK        0xf
+00046 #define B_CONTROLLER(val)       (((val)>>B_CONTROLLERSHIFT) & B_CONTROLLERMASK)
+00047 #define B_SLICESHIFT            20
+00048 #define B_SLICEMASK             0xff
+00049 #define B_SLICE(val)            (((val)>>B_SLICESHIFT) & B_SLICEMASK)
+00050 #define B_UNITSHIFT             16
+00051 #define B_UNITMASK              0xf
+00052 #define B_UNIT(val)             (((val) >> B_UNITSHIFT) & B_UNITMASK)
+00053 #define B_PARTITIONSHIFT        8
+00054 #define B_PARTITIONMASK         0xff
+00055 #define B_PARTITION(val)        (((val) >> B_PARTITIONSHIFT) & B_PARTITIONMASK)
+00056 #define B_TYPESHIFT             0
+00057 #define B_TYPEMASK              0xff
+00058 #define B_TYPE(val)             (((val) >> B_TYPESHIFT) & B_TYPEMASK)
+00059 
+00060 
+00061 /*****************************************************************************************
+00062  Desc: The Kernels Descriptor table:
+00063        0x00 - Dummy Entry
+00064        0x08 - Ring 0 CS
+00065        0x10 - Ring 0 DS 
+00066        0x18 - Dummy LDT
+00067        0x20 - Scheduler TSS
+00068        0x28 - Ring 3 CS
+00069        0x30 - Ring 3 DS
+00070        0x38 - GPF TSS
+00071        0x40 - Stack Fault TSS
+00072 
+00073  Notes: 
+00074 
+00075 *****************************************************************************************/
+00076 ubixDescriptorTable(ubixGDT,9) {
+00077   {dummy:0},
+00078   ubixStandardDescriptor(0x0000, 0xFFFFF, (dCode + dRead + dBig + dBiglim)),
+00079   ubixStandardDescriptor(0x0000, 0xFFFFF, (dData + dWrite + dBig + dBiglim)),
+00080   ubixStandardDescriptor(0x0000, 0xFFFFF, (dLdt)),
+00081   ubixStandardDescriptor(0x4200, (sizeof(struct tssStruct)), (dTss + dDpl3)),
+00082   ubixStandardDescriptor(0x0000, 0xFFFFF, (dCode + dWrite + dBig + dBiglim + dDpl3)),
+00083   ubixStandardDescriptor(0x0000, 0xFFFFF, (dData + dWrite + dBig + dBiglim + dDpl3)),
+00084   ubixStandardDescriptor(0x4200, (sizeof(struct tssStruct)), (dTss)),
+00085   ubixStandardDescriptor(0x6200, (sizeof(struct tssStruct)), (dTss)),
+00086   };
+00087 struct {
+00088   unsigned short limit __attribute__ ((packed));
+00089   union descriptorTableUnion *gdt __attribute__ ((packed));
+00090   } loadGDT = { (9 * sizeof(union descriptorTableUnion) - 1), ubixGDT };
+00091 
+00092 /*****************************************************************************************
+00093  Functoin: int main()
+00094  
+00095  Desc: This is the entry point into the os where all of the kernels sub systems are 
+00096        started up. 
+00097 
+00098  Notes: 
+00099 
+00100 *****************************************************************************************/
+00101 int kmain(uInt32 rootdev) {
+00102   /* Set up counter for startup routine */
+00103   int i = 0x0;
+00104   uInt32 *sysTask = 0x0;
+00105 
+00106   /* Do A Clear Screen Just To Make The TEXT Buffer Nice And Empty */
+00107   clearScreen();
+00108   kprint("AAA");
+00109   kprint("BBB");
+00110 kprintf("TEST");
+00111   /* Modify src/sys/include/ubixos/init.h to add a startup routine */
+00112   for (i=0x0;i<init_tasksTotal;i++) {
+00113     if (init_tasks[i]() != 0x0) {
+00114       kpanic("Error: Initializing System.\n");
+00115       }
+00116     }
+00117 
+00118   /* New Root Mount Point */
+00119   //Old 2 new 10
+00120   kprintf("[0xX][0x%X:0x%X:0x%X:0x%X:0x%X:0x%X]\n",B_ADAPTOR(rootdev),B_CONTROLLER(rootdev),B_SLICE(rootdev),B_UNIT(rootdev),B_PARTITION(rootdev),B_TYPE(rootdev));
+00121   if (vfs_mount(0x1,B_PARTITION(rootdev)+2,0x0,0xAA,"sys","rw") != 0x0) {
+00122     kprintf("Problem Mounting sys Mount Point\n");
+00123     }
+00124 
+00125   /* Do our mounting */
+00126  /* 
+00127   if (vfs_mount(0x0,0x0,0x0,0x0,"sys","rw") != 0x0) {
+00128     kprintf("Problem Mounting sys Mount Point\n");
+00129     }
+00130   if (vfs_mount(0x0,0x0,0x1,0x0,"tmp","rw") != 0x0) {
+00131     kprintf("Problem Mounting tmp Mount Point\n");
+00132     }
+00133   */
+00134   
+00135   /* Initialize the system */
+00136   kprintf("Free Pages: [%i]\n",systemVitals->freePages); 
+00137 
+00138   kprintf("MemoryMap:  [0x%X]\n",vmmMemoryMap);
+00139   kprintf("Starting OS\n");
+00140   
+00141         sysTask = kmalloc(0x2000);
+00142         if(sysTask == NULL)
+00143                 kprintf("OS: Unable to allocate memory\n");
+00144 
+00145         execThread(systemTask, (uInt32)sysTask+0x2000,0x0);
+00146 
+00147         execFile("sys:/bin/init",0x0,0x0,0x0); /* OS Initializer    */
+00148   
+00149         irqEnable(0x0);
+00150   
+00151         while (0x1)
+00152                 asm("hlt"); /* Keep haulting until the scheduler reacts */
+00153   
+00154         /* Return to start however we should never get this far */
+00155         return(0x0);
+00156 }
+00157 
+00158 /***
+00159  END
+00160  ***/
+00161 
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/main_8c.html b/doc/html/main_8c.html new file mode 100644 index 0000000..9bcda7d --- /dev/null +++ b/doc/html/main_8c.html @@ -0,0 +1,528 @@ + + +UbixOS V2: src/sys/init/main.c File Reference + + + + +
+
+
+
+ +

main.c File Reference

+

+#include <ubixos/init.h>
+#include <sys/gdt.h>
+#include <sys/video.h>
+#include <sys/tss.h>
+#include <ubixos/exec.h>
+#include <ubixos/kpanic.h>
+#include <ubixos/systemtask.h>
+#include <vfs/mount.h>
+#include <lib/kprintf.h>
+#include <lib/kmalloc.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Defines

#define B_ADAPTOR(val)   (((val) >> B_ADAPTORSHIFT) & B_ADAPTORMASK)
#define B_ADAPTORMASK   0x0f
#define B_ADAPTORSHIFT   24
#define B_CONTROLLER(val)   (((val)>>B_CONTROLLERSHIFT) & B_CONTROLLERMASK)
#define B_CONTROLLERMASK   0xf
#define B_CONTROLLERSHIFT   20
#define B_PARTITION(val)   (((val) >> B_PARTITIONSHIFT) & B_PARTITIONMASK)
#define B_PARTITIONMASK   0xff
#define B_PARTITIONSHIFT   8
#define B_SLICE(val)   (((val)>>B_SLICESHIFT) & B_SLICEMASK)
#define B_SLICEMASK   0xff
#define B_SLICESHIFT   20
#define B_TYPE(val)   (((val) >> B_TYPESHIFT) & B_TYPEMASK)
#define B_TYPEMASK   0xff
#define B_TYPESHIFT   0
#define B_UNIT(val)   (((val) >> B_UNITSHIFT) & B_UNITMASK)
#define B_UNITMASK   0xf
#define B_UNITSHIFT   16

Functions

int kmain (uInt32 rootdev)
 ubixDescriptorTable (ubixGDT, 9)

Variables

struct {
descriptorTableUnion *gdt __attribute__ ((packed))
unsigned short limit __attribute__ ((packed))
loadGDT
+


Define Documentation

+ +
+
+ + + + + + + + + +
#define B_ADAPTOR (val   )    (((val) >> B_ADAPTORSHIFT) & B_ADAPTORMASK)
+
+
+ +

+ +

+Definition at line 43 of file main.c. +

+Referenced by kmain(). +

+

+ +

+
+ + + + +
#define B_ADAPTORMASK   0x0f
+
+
+ +

+ +

+Definition at line 42 of file main.c. +

+

+ +

+
+ + + + +
#define B_ADAPTORSHIFT   24
+
+
+ +

+ +

+Definition at line 41 of file main.c. +

+

+ +

+
+ + + + + + + + + +
#define B_CONTROLLER (val   )    (((val)>>B_CONTROLLERSHIFT) & B_CONTROLLERMASK)
+
+
+ +

+ +

+Definition at line 46 of file main.c. +

+Referenced by kmain(). +

+

+ +

+
+ + + + +
#define B_CONTROLLERMASK   0xf
+
+
+ +

+ +

+Definition at line 45 of file main.c. +

+

+ +

+
+ + + + +
#define B_CONTROLLERSHIFT   20
+
+
+ +

+ +

+Definition at line 44 of file main.c. +

+

+ +

+
+ + + + + + + + + +
#define B_PARTITION (val   )    (((val) >> B_PARTITIONSHIFT) & B_PARTITIONMASK)
+
+
+ +

+ +

+Definition at line 55 of file main.c. +

+Referenced by kmain(). +

+

+ +

+
+ + + + +
#define B_PARTITIONMASK   0xff
+
+
+ +

+ +

+Definition at line 54 of file main.c. +

+

+ +

+
+ + + + +
#define B_PARTITIONSHIFT   8
+
+
+ +

+ +

+Definition at line 53 of file main.c. +

+

+ +

+
+ + + + + + + + + +
#define B_SLICE (val   )    (((val)>>B_SLICESHIFT) & B_SLICEMASK)
+
+
+ +

+ +

+Definition at line 49 of file main.c. +

+Referenced by kmain(). +

+

+ +

+
+ + + + +
#define B_SLICEMASK   0xff
+
+
+ +

+ +

+Definition at line 48 of file main.c. +

+

+ +

+
+ + + + +
#define B_SLICESHIFT   20
+
+
+ +

+ +

+Definition at line 47 of file main.c. +

+

+ +

+
+ + + + + + + + + +
#define B_TYPE (val   )    (((val) >> B_TYPESHIFT) & B_TYPEMASK)
+
+
+ +

+ +

+Definition at line 58 of file main.c. +

+Referenced by kmain(). +

+

+ +

+
+ + + + +
#define B_TYPEMASK   0xff
+
+
+ +

+ +

+Definition at line 57 of file main.c. +

+

+ +

+
+ + + + +
#define B_TYPESHIFT   0
+
+
+ +

+ +

+Definition at line 56 of file main.c. +

+

+ +

+
+ + + + + + + + + +
#define B_UNIT (val   )    (((val) >> B_UNITSHIFT) & B_UNITMASK)
+
+
+ +

+ +

+Definition at line 52 of file main.c. +

+Referenced by kmain(). +

+

+ +

+
+ + + + +
#define B_UNITMASK   0xf
+
+
+ +

+ +

+Definition at line 51 of file main.c. +

+

+ +

+
+ + + + +
#define B_UNITSHIFT   16
+
+
+ +

+ +

+Definition at line 50 of file main.c. +

+

+


Function Documentation

+ +
+
+ + + + + + + + + +
int kmain (uInt32  rootdev  ) 
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
ubixDescriptorTable (ubixGDT ,
 
)
+
+
+ +

+ +

+Definition at line 76 of file main.c. +

+References dBig, dBiglim, dCode, dData, dDpl3, dLdt, dRead, dTss, dWrite, and ubixStandardDescriptor. +

+

+


Variable Documentation

+ +
+
+ + + + +
struct { ... } loadGDT
+
+
+ +

+ +

+

+


Generated on Sun Dec 3 02:38:08 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/main_8cpp-source.html b/doc/html/main_8cpp-source.html new file mode 100644 index 0000000..f421199 --- /dev/null +++ b/doc/html/main_8cpp-source.html @@ -0,0 +1,102 @@ + + +UbixOS V2: src/sys/ubixfsv2/main.cpp Source File + + + + +
+
+
+
+ +

main.cpp

Go to the documentation of this file.
00001 #include <iostream>
+00002 #include <vector>
+00003 #include <stdlib.h>
+00004 #include "vfs.h"
+00005 #include "btree.h"
+00006 #include "ubixfs.h"
+00007 #include "device.h"
+00008 #include "ramdrive.h"
+00009 using namespace std;
+00010 
+00011 int
+00012 main(void) {
+00013 
+00014   device_t * ramDrive = dev_ramDrive();
+00015   UbixFS * fs = new UbixFS(ramDrive);
+00016   fs->vfs_format(ramDrive);
+00017   fs->vfs_init(); 
+00018   fs->vfs_mkdir("/testdir", 0);
+00019   fs->vfs_stop();
+00020   dev_ramDestroy();
+00021 
+00022 #if 0
+00023   int i = 0;
+00024   ubixfsInode * inode = (ubixfsInode *)malloc(sizeof(ubixfsInode));
+00025   memset(inode, 0, sizeof(ubixfsInode));
+00026   strcpy(inode -> name, "50");
+00027   bTree * tree = new bTree(".", inode);
+00028 
+00029   for (i = 0; i < 100; i++) {
+00030 //  while (tree->Verify()) {
+00031 //    if (i%1000 == 0) cout << "-_- i = "<<i<<" -_-" << endl;
+00032     inode = (ubixfsInode *)malloc(sizeof(ubixfsInode));
+00033     if (inode == NULL) break;
+00034     memset(inode, 0, sizeof(ubixfsInode));
+00035     for (int k = 0; k < (random() % 100)+5; k++) {
+00036 //    for (int k = 0; k < 100; k++) {
+00037       inode->name[k] = (char)((random() % 26)+'a');
+00038     } // for k
+00039 //     tree->Insert(inode);
+00040     if (!tree->Insert(inode->name, inode)) cout << "Insert(" << inode->name << ") failed" << endl;
+00041 //    ++i;
+00042   } // for i
+00043 //  cout << "i made it to: " << i << endl;
+00044 
+00045   i = 0;
+00046   ubixfsInode * tmpInode = tmpInode = tree->GetFirstNode();
+00047   if (tmpInode == NULL) cout << "GetFirstNode() returns null" << endl;
+00048   while (tmpInode != NULL) {
+00049     //cout << "node[" << i++ << "]: " << tmpInode->name << endl;
+00050     cout << tmpInode->name << endl;
+00051     tmpInode = tmpInode->next.iPtr;
+00052   } // while
+00053 
+00054 
+00055 //  tree->Info();
+00056   tree->Save("tree.dat");
+00057   free(inode);
+00058   delete tree;
+00059 #endif
+00060   cout << "sizeof(bNode): " << sizeof(struct bNode) << endl;
+00061   cout << "sizeof(ubixfsInode): " << sizeof(struct ubixfsInode) << endl;
+00062   cout << "sizeof(diskSuperBlock): " << sizeof(struct diskSuperBlock) << endl;
+00063   cout << "sizeof(bTreeHeader): " << sizeof(struct bTreeHeader) << endl;
+00064   return 0;
+00065 }
+

Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/main_8cpp.html b/doc/html/main_8cpp.html new file mode 100644 index 0000000..4705328 --- /dev/null +++ b/doc/html/main_8cpp.html @@ -0,0 +1,80 @@ + + +UbixOS V2: src/sys/ubixfsv2/main.cpp File Reference + + + + +
+
+
+
+ +

main.cpp File Reference

+

+#include <iostream>
+#include <vector>
+#include <stdlib.h>
+#include "vfs.h"
+#include "btree.h"
+#include "ubixfs.h"
+#include "device.h"
+#include "ramdrive.h"
+ +

+Go to the source code of this file. + + + + +

Functions

int main (void)
+


Function Documentation

+ +
+
+ + + + + + + + + +
int main (void   ) 
+
+ +

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/math_8h-source.html b/doc/html/math_8h-source.html new file mode 100644 index 0000000..75a4c13 --- /dev/null +++ b/doc/html/math_8h-source.html @@ -0,0 +1,101 @@ + + +UbixOS V2: src/sys/include/math.h Source File + + + + +
+
+
+
+ +

math.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef __MATH_H
+00031 #define __MATH_H
+00032 
+00033 #include <ubixos/types.h>
+00034 
+00035 //typedef long long int quad_t;
+00036 typedef unsigned long long int u_quad_t;
+00037 
+00038 double atan(double x);
+00039 double sqrt(double x);
+00040 u_quad_t __udivdi3(u_quad_t a,u_quad_t b);
+00041 quad_t __divdi3(quad_t a,quad_t b);
+00042 
+00043 #endif
+00044 
+00045 /***
+00046  $Log$
+00047  Revision 1.2  2006/10/31 20:41:16  reddawg
+00048  Includes
+00049 
+00050  Revision 1.1.1.1  2006/06/01 12:46:13  reddawg
+00051  ubix2
+00052 
+00053  Revision 1.2  2005/10/12 00:13:36  reddawg
+00054  Removed
+00055 
+00056  Revision 1.1.1.1  2005/09/26 17:23:38  reddawg
+00057  no message
+00058 
+00059  Revision 1.2  2004/05/21 15:22:35  reddawg
+00060  Cleaned up
+00061 
+00062 
+00063  END
+00064  ***/
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/math_8h.html b/doc/html/math_8h.html new file mode 100644 index 0000000..f97f0c5 --- /dev/null +++ b/doc/html/math_8h.html @@ -0,0 +1,182 @@ + + +UbixOS V2: src/sys/include/math.h File Reference + + + + +
+
+
+
+ +

math.h File Reference

+

+#include <ubixos/types.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + +

Typedefs

typedef unsigned long long int u_quad_t

Functions

quad_t __divdi3 (quad_t a, quad_t b)
u_quad_t __udivdi3 (u_quad_t a, u_quad_t b)
double atan (double x)
double sqrt (double x)
+


Typedef Documentation

+ +
+
+ + + + +
typedef unsigned long long int u_quad_t
+
+
+ +

+ +

+Definition at line 36 of file math.h. +

+

+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
quad_t __divdi3 (quad_t  a,
quad_t  b 
)
+
+
+ +

+ +

+Definition at line 36 of file divdi3.c. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
u_quad_t __udivdi3 (u_quad_t  a,
u_quad_t  b 
)
+
+
+ +

+ +

+Definition at line 32 of file divdi3.c. +

+

+ +

+
+ + + + + + + + + +
double atan (double  x  ) 
+
+
+ +

+ +

+Definition at line 32 of file atan.c. +

+

+ +

+
+ + + + + + + + + +
double sqrt (double  x  ) 
+
+
+ +

+ +

+Definition at line 30 of file sqrt.c. +

+

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/mem_8h-source.html b/doc/html/mem_8h-source.html new file mode 100644 index 0000000..1d73699 --- /dev/null +++ b/doc/html/mem_8h-source.html @@ -0,0 +1,117 @@ + + +UbixOS V2: src/sys/include/net/mem.h Source File + + + + +
+
+
+
+ +

mem.h

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 #ifndef __LWIP_MEM_H__
+00036 #define __LWIP_MEM_H__
+00037 
+00038 #include <ubixos/types.h>
+00039 
+00040 #include "net/debug.h"
+00041 #include "net/opt.h"
+00042 #include "net/arch.h"
+00043 
+00044 #if MEM_SIZE > 64000l
+00045 typedef uInt32 mem_size_t;
+00046 #else
+00047 typedef uInt16 mem_size_t;
+00048 #endif /* MEM_SIZE > 64000 */
+00049 
+00050 
+00051 void mem_init(void);
+00052 
+00053 void *mem_malloc(mem_size_t size);
+00054 void *mem_malloc2(mem_size_t size);
+00055 void mem_free(void *mem);
+00056 void *mem_realloc(void *mem, mem_size_t size);
+00057 void *mem_reallocm(void *mem, mem_size_t size);
+00058 
+00059 #ifdef MEM_PERF
+00060 void mem_perf_start(void);
+00061 void mem_perf_init(char *fname);
+00062 #endif /* MEM_PERF */
+00063 
+00064 #ifdef MEM_RECLAIM
+00065 typedef mem_size_t (*mem_reclaim_func)(void *arg, mem_size_t size);
+00066 void mem_register_reclaim(mem_reclaim_func f, void *arg);
+00067 void mem_reclaim(unsigned int size);
+00068 #else
+00069 #define mem_register_reclaim(f, arg)
+00070 #endif /* MEM_RECLAIM */
+00071 
+00072 
+00073 #define MEM_ALIGN_SIZE(size) (size + \
+00074                              ((((size) % (MEM_ALIGNMENT)) == 0)? 0 : \
+00075                              ((MEM_ALIGNMENT) - ((size) % (MEM_ALIGNMENT)))))
+00076 
+00077 #define MEM_ALIGN(addr) (void *)MEM_ALIGN_SIZE((uInt32)addr)
+00078 
+00079 #endif /* __LWIP_MEM_H__ */
+00080 
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/mem_8h.html b/doc/html/mem_8h.html new file mode 100644 index 0000000..6894b55 --- /dev/null +++ b/doc/html/mem_8h.html @@ -0,0 +1,305 @@ + + +UbixOS V2: src/sys/include/net/mem.h File Reference + + + + +
+
+
+
+ +

mem.h File Reference

+

+#include <ubixos/types.h>
+#include "net/debug.h"
+#include "net/opt.h"
+#include "net/arch.h"
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + +

Defines

#define MEM_ALIGN(addr)   (void *)MEM_ALIGN_SIZE((uInt32)addr)
#define MEM_ALIGN_SIZE(size)
#define mem_register_reclaim(f, arg)

Typedefs

typedef uInt16 mem_size_t

Functions

void mem_free (void *mem)
void mem_init (void)
void * mem_malloc (mem_size_t size)
void * mem_malloc2 (mem_size_t size)
void * mem_realloc (void *mem, mem_size_t size)
void * mem_reallocm (void *mem, mem_size_t size)
+


Define Documentation

+ +
+
+ + + + + + + + + +
#define MEM_ALIGN (addr   )    (void *)MEM_ALIGN_SIZE((uInt32)addr)
+
+
+ +

+ +

+Definition at line 77 of file mem.h. +

+

+ +

+
+ + + + + + + + + +
#define MEM_ALIGN_SIZE (size   ) 
+
+
+ +

+Value:

(size + \
+                             ((((size) % (MEM_ALIGNMENT)) == 0)? 0 : \
+                             ((MEM_ALIGNMENT) - ((size) % (MEM_ALIGNMENT)))))
+
+

+Definition at line 73 of file mem.h. +

+

+ +

+
+ + + + + + + + + + + + +
#define mem_register_reclaim (f,
arg   ) 
+
+
+ +

+ +

+Definition at line 69 of file mem.h. +

+

+


Typedef Documentation

+ +
+
+ + + + +
typedef uInt16 mem_size_t
+
+
+ +

+ +

+Definition at line 47 of file mem.h. +

+

+


Function Documentation

+ +
+
+ + + + + + + + + +
void mem_free (void *  mem  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
void mem_init (void   ) 
+
+
+ +

+ +

+Referenced by net_init(). +

+

+ +

+
+ + + + + + + + + +
void* mem_malloc (mem_size_t  size  ) 
+
+
+ +

+ +

+Referenced by ethernetif_init(). +

+

+ +

+
+ + + + + + + + + +
void* mem_malloc2 (mem_size_t  size  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void* mem_realloc (void *  mem,
mem_size_t  size 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void* mem_reallocm (void *  mem,
mem_size_t  size 
)
+
+
+ +

+ +

+

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/memp_8h-source.html b/doc/html/memp_8h-source.html new file mode 100644 index 0000000..a88281c --- /dev/null +++ b/doc/html/memp_8h-source.html @@ -0,0 +1,116 @@ + + +UbixOS V2: src/sys/include/net/memp.h Source File + + + + +
+
+
+
+ +

memp.h

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 
+00036 #ifndef __LWIP_MEMP_H__
+00037 #define __LWIP_MEMP_H__
+00038 
+00039 #include <ubixos/types.h>
+00040 
+00041 #include "net/debug.h"
+00042 #include "net/arch/cc.h"
+00043 #include "net/lwipopts.h"
+00044 
+00045 typedef enum {
+00046   MEMP_PBUF,
+00047   MEMP_UDP_PCB,
+00048   MEMP_TCP_PCB,
+00049   MEMP_TCP_PCB_LISTEN,
+00050   MEMP_TCP_SEG,
+00051 
+00052   MEMP_NETBUF,
+00053   MEMP_NETCONN,
+00054   MEMP_API_MSG,
+00055   MEMP_TCPIP_MSG,
+00056 
+00057   MEMP_SYS_TIMEOUT,
+00058   
+00059   MEMP_MAX
+00060 } memp_t;
+00061 
+00062 void memp_init(void);
+00063 
+00064 void *memp_malloc(memp_t type);
+00065 void *memp_mallocp(memp_t type);
+00066 void *memp_malloc2(memp_t type);
+00067 void *memp_realloc(memp_t fromtype, memp_t totype, void *mem);
+00068 void memp_free(memp_t type, void *mem);
+00069 void memp_freep(memp_t type, void *mem);
+00070 
+00071 #if MEMP_RECLAIM
+00072 typedef uInt8 (*memp_reclaim_func)(void *arg, memp_t type);
+00073 void memp_register_reclaim(memp_t type, memp_reclaim_func f, void *arg);
+00074 #else 
+00075 #define memp_register_reclaim(t, f, arg)
+00076 #endif /* MEMP_RECLAIM */
+00077 
+00078 #endif /* __LWIP_MEMP_H__  */
+00079           
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/memp_8h.html b/doc/html/memp_8h.html new file mode 100644 index 0000000..8909927 --- /dev/null +++ b/doc/html/memp_8h.html @@ -0,0 +1,339 @@ + + +UbixOS V2: src/sys/include/net/memp.h File Reference + + + + +
+
+
+
+ +

memp.h File Reference

+

+#include <ubixos/types.h>
+#include "net/debug.h"
+#include "net/arch/cc.h"
+#include "net/lwipopts.h"
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + +

Defines

#define memp_register_reclaim(t, f, arg)

Enumerations

enum  memp_t {
+  MEMP_PBUF, +MEMP_UDP_PCB, +MEMP_TCP_PCB, +MEMP_TCP_PCB_LISTEN, +
+  MEMP_TCP_SEG, +MEMP_NETBUF, +MEMP_NETCONN, +MEMP_API_MSG, +
+  MEMP_TCPIP_MSG, +MEMP_SYS_TIMEOUT, +MEMP_MAX +
+ }

Functions

void memp_free (memp_t type, void *mem)
void memp_freep (memp_t type, void *mem)
void memp_init (void)
void * memp_malloc (memp_t type)
void * memp_malloc2 (memp_t type)
void * memp_mallocp (memp_t type)
void * memp_realloc (memp_t fromtype, memp_t totype, void *mem)
+


Define Documentation

+ +
+
+ + + + + + + + + + + + + + + +
#define memp_register_reclaim (t,
f,
arg   ) 
+
+
+ +

+ +

+Definition at line 75 of file memp.h. +

+

+


Enumeration Type Documentation

+ +
+
+ + + + +
enum memp_t
+
+
+ +

+

Enumerator:
+ + + + + + + + + + + + +
MEMP_PBUF  +
MEMP_UDP_PCB  +
MEMP_TCP_PCB  +
MEMP_TCP_PCB_LISTEN  +
MEMP_TCP_SEG  +
MEMP_NETBUF  +
MEMP_NETCONN  +
MEMP_API_MSG  +
MEMP_TCPIP_MSG  +
MEMP_SYS_TIMEOUT  +
MEMP_MAX  +
+
+ +

+Definition at line 45 of file memp.h. +

+

+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
void memp_free (memp_t  type,
void *  mem 
)
+
+
+ +

+ +

+Referenced by accept_function(), netconn_delete(), and tcpip_apimsg(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void memp_freep (memp_t  type,
void *  mem 
)
+
+ +

+ +

+
+ + + + + + + + + +
void memp_init (void   ) 
+
+
+ +

+ +

+Referenced by net_init(). +

+

+ +

+
+ + + + + + + + + +
void* memp_malloc (memp_t  type  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
void* memp_malloc2 (memp_t  type  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
void* memp_mallocp (memp_t  type  ) 
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void* memp_realloc (memp_t  fromtype,
memp_t  totype,
void *  mem 
)
+
+
+ +

+ +

+

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/memset_8c-source.html b/doc/html/memset_8c-source.html new file mode 100644 index 0000000..01d69f9 --- /dev/null +++ b/doc/html/memset_8c-source.html @@ -0,0 +1,136 @@ + + +UbixOS V2: src/sys/lib/memset.c Source File + + + + +
+
+
+
+ +

memset.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005 Redistribution and use in source and binary forms, with or without modification, are
+00006 permitted provided that the following conditions are met:
+00007 
+00008 Redistributions of source code must retain the above copyright notice, this list of
+00009 conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010 form must reproduce the above copyright notice, this list of conditions, the following
+00011 disclaimer and the list of authors in the documentation and/or other materials provided
+00012 with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013 contributors may be used to endorse or promote products derived from this software
+00014 without specific prior written permission.
+00015 
+00016 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019 THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021 OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023 TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <string.h>
+00031 
+00032 #define wsize   sizeof(uInt)
+00033 #define wmask   (wsize - 1)
+00034 #define VAL     c0
+00035 #define WIDEVAL c
+00036 
+00037 void *memset(void *dst0, int c0, size_t length) {
+00038   size_t t;
+00039   uInt c;
+00040   uInt8 *dst;
+00041 
+00042   dst = dst0;
+00043 
+00044         if (length < 3 * wsize) {
+00045                 while (length != 0) {
+00046                         *dst++ = VAL;
+00047                         --length;
+00048                 }
+00049                 return(dst0);
+00050         }
+00051 
+00052         if ((c = (uInt8)c0) != 0) {    /* Fill the word. */
+00053                 c = (c << 8) | c;       /* u_int is 16 bits. */
+00054                 c = (c << 16) | c;      /* u_int is 32 bits. */
+00055         }
+00056 
+00057         /* Align destination by filling in bytes. */
+00058         if ((t = (long)dst & wmask) != 0) {
+00059                 t = wsize - t;
+00060                 length -= t;
+00061                 do {
+00062                         *dst++ = VAL;
+00063                 } while (--t != 0);
+00064         }
+00065 
+00066         /* Fill words.  Length was >= 2*words so we know t >= 1 here. */
+00067         t = length / wsize;
+00068         do {
+00069                 *(u_int *)dst = WIDEVAL;
+00070                 dst += wsize;
+00071         } while (--t != 0);
+00072 
+00073         /* Mop up trailing bytes, if any. */
+00074         t = length & wmask;
+00075         if (t != 0)
+00076                 do {
+00077                         *dst++ = VAL;
+00078                 } while (--t != 0);
+00079         return(dst0);
+00080   }
+00081 
+00082 
+00083 /***
+00084  $Log$
+00085  Revision 1.1.1.1  2006/06/01 12:46:16  reddawg
+00086  ubix2
+00087 
+00088  Revision 1.2  2005/10/12 00:13:37  reddawg
+00089  Removed
+00090 
+00091  Revision 1.1.1.1  2005/09/26 17:24:12  reddawg
+00092  no message
+00093 
+00094  Revision 1.1  2004/07/28 16:20:10  reddawg
+00095  forgot this file
+00096 
+00097  END
+00098  ***/
+00099 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/memset_8c.html b/doc/html/memset_8c.html new file mode 100644 index 0000000..781b883 --- /dev/null +++ b/doc/html/memset_8c.html @@ -0,0 +1,174 @@ + + +UbixOS V2: src/sys/lib/memset.c File Reference + + + + +
+
+
+
+ +

memset.c File Reference

+

+#include <string.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + +

Defines

#define VAL   c0
#define WIDEVAL   c
#define wmask   (wsize - 1)
#define wsize   sizeof(uInt)

Functions

void * memset (void *dst0, int c0, size_t length)
+


Define Documentation

+ +
+
+ + + + +
#define VAL   c0
+
+
+ +

+ +

+Definition at line 34 of file memset.c. +

+Referenced by memset(). +

+

+ +

+
+ + + + +
#define WIDEVAL   c
+
+
+ +

+ +

+Definition at line 35 of file memset.c. +

+Referenced by memset(). +

+

+ +

+
+ + + + +
#define wmask   (wsize - 1)
+
+
+ +

+ +

+Definition at line 33 of file memset.c. +

+Referenced by memset(). +

+

+ +

+
+ + + + +
#define wsize   sizeof(uInt)
+
+
+ +

+ +

+Definition at line 32 of file memset.c. +

+Referenced by memset(). +

+

+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void* memset (void *  dst0,
int  c0,
size_t  length 
)
+
+
+ +

+ +

+Definition at line 37 of file memset.c. +

+References VAL, WIDEVAL, wmask, and wsize. +

+

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/message_8c-source.html b/doc/html/message_8c-source.html new file mode 100644 index 0000000..11b0ab5 --- /dev/null +++ b/doc/html/message_8c-source.html @@ -0,0 +1,118 @@ + + +UbixOS V2: src/sys/mpi/message.c Source File + + + + +
+
+
+
+ +

message.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <mpi/mpi.h>
+00031 
+00032 void sysMpiCreateMbox(uInt32 *status,char *name) {
+00033   if (status && name)
+00034     *status = mpi_createMbox(name); 
+00035   return;
+00036   }
+00037 
+00038 void sysMpiDestroyMbox(uInt32 *status,char *name) {
+00039   if (status && name)
+00040     *status = mpi_destroyMbox(name);
+00041   return;
+00042   }
+00043 
+00044 void sysMpiPostMessage(char *name,uInt32 *type,mpi_message_t *data) {
+00045   if (type && name && data)
+00046     *type = mpi_postMessage(name,*type,data);
+00047   return;
+00048   }
+00049 
+00050 void sysMpiFetchMessage(char *name,mpi_message_t *msg,uInt32 *status) {
+00051   if (status && name && msg)
+00052     *status = mpi_fetchMessage(name,msg);
+00053   return;
+00054   }
+00055 
+00056 void sysMpiSpam(uInt32 type,void *data,uInt32 *status) {
+00057   if (status && data)
+00058     *status = mpi_spam(type,data);
+00059   return;
+00060   }
+00061 
+00062 /***
+00063  $Log$
+00064  Revision 1.1.1.1  2006/06/01 12:46:16  reddawg
+00065  ubix2
+00066 
+00067  Revision 1.2  2005/10/12 00:13:37  reddawg
+00068  Removed
+00069 
+00070  Revision 1.1.1.1  2005/09/26 17:24:14  reddawg
+00071  no message
+00072 
+00073  Revision 1.12  2004/08/14 11:23:02  reddawg
+00074  Changes
+00075 
+00076  Revision 1.11  2004/07/28 17:07:25  reddawg
+00077  MPI: moved the syscalls
+00078 
+00079  END
+00080  ***/
+00081 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/message_8c.html b/doc/html/message_8c.html new file mode 100644 index 0000000..ed3ac5a --- /dev/null +++ b/doc/html/message_8c.html @@ -0,0 +1,240 @@ + + +UbixOS V2: src/sys/mpi/message.c File Reference + + + + +
+
+
+
+ +

message.c File Reference

+

+#include <mpi/mpi.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + +

Functions

void sysMpiCreateMbox (uInt32 *status, char *name)
void sysMpiDestroyMbox (uInt32 *status, char *name)
void sysMpiFetchMessage (char *name, mpi_message_t *msg, uInt32 *status)
void sysMpiPostMessage (char *name, uInt32 *type, mpi_message_t *data)
void sysMpiSpam (uInt32 type, void *data, uInt32 *status)
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
void sysMpiCreateMbox (uInt32 status,
char *  name 
)
+
+
+ +

+ +

+Definition at line 32 of file message.c. +

+References mpi_createMbox(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void sysMpiDestroyMbox (uInt32 status,
char *  name 
)
+
+
+ +

+ +

+Definition at line 38 of file message.c. +

+References mpi_destroyMbox(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void sysMpiFetchMessage (char *  name,
mpi_message_t msg,
uInt32 status 
)
+
+
+ +

+ +

+Definition at line 50 of file message.c. +

+References mpi_fetchMessage(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void sysMpiPostMessage (char *  name,
uInt32 type,
mpi_message_t data 
)
+
+
+ +

+ +

+Definition at line 44 of file message.c. +

+References mpi_postMessage(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void sysMpiSpam (uInt32  type,
void *  data,
uInt32 status 
)
+
+
+ +

+ +

+Definition at line 56 of file message.c. +

+References mpi_spam(). +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/mount_8c-source.html b/doc/html/mount_8c-source.html new file mode 100644 index 0000000..83698cb --- /dev/null +++ b/doc/html/mount_8c-source.html @@ -0,0 +1,184 @@ + + +UbixOS V2: src/sys/vfs/mount.c Source File + + + + +
+
+
+
+ +

mount.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <vfs/mount.h>
+00031 #include <ubixos/vitals.h>
+00032 #include <ubixos/kpanic.h>
+00033 #include <lib/kmalloc.h>
+00034 #include <lib/kprintf.h>
+00035 #include <lib/string.h>
+00036 #include <sys/device.h>
+00037 
+00038 /************************************************************************
+00039 
+00040 Function: mount(int driveId,int partition,int fsType,char *mountPoint,char *perms)
+00041 
+00042 Description: mount adds a mount point and returns 0 if successful 1 if it fails
+00043 
+00044 Notes:
+00045 
+00046 ************************************************************************/
+00047 int vfs_mount(int major,int minor,int partition,int vfsType,char *mountPoint,char *perms) {
+00048   vfs_mountPoint_t *mp     = 0x0;
+00049   struct device_node  *device = 0x0;
+00050 
+00051   /* Allocate Memory For Mount Point */
+00052   if ((mp = (vfs_mountPoint_t *)kmalloc(sizeof(vfs_mountPoint_t))) == NULL)
+00053     kprintf("vfs_mount: failed to allocate mp\n");
+00054 
+00055   /* Copy Mount Point Into Buffer */
+00056   sprintf(mp->mountPoint,mountPoint);
+00057   
+00058   /* Set Pointer To Physical Drive */
+00059   device = device_find(major,minor);
+00060 
+00061   /* Set Up Mp Defaults */
+00062   mp->device    = device;
+00063   mp->fs        = vfsFindFS(vfsType);
+00064   mp->partition = partition;
+00065   mp->perms     = *perms;
+00066 
+00067   if (mp->fs == 0x0) {
+00068     /* sysErr(systemErr,"File System Type: %i Not Found\n",fsType); */
+00069     kprintf("File System Type: %i Not Found\n",vfsType);
+00070     return(0x1);
+00071     }
+00072   /*What is this for? 10/6/2006 */
+00073 /*
+00074   if (device != 0x0) {
+00075     mp->diskLabel = (struct ubixDiskLabel *)kmalloc(512);
+00076     mp->device->devInfo->read(mp->device->devInfo->info,mp->diskLabel,1,1);
+00077     kprintf("READING SECTOR");
+00078     }
+00079 */
+00080 
+00081   /* Add Mountpoint If It Fails Free And Return */
+00082   if (vfs_addMount(mp) != 0x0) {
+00083     kfree(mp);
+00084     return(0x1);
+00085     }
+00086 
+00087   /* Initialize The File System If It Fails Return */
+00088   if (mp->fs->vfsInitFS(mp) == 0x0) {
+00089     kfree(mp);
+00090     return(0x1);
+00091     }
+00092   /* Return */
+00093   return(0x0);
+00094   }
+00095 
+00096 /************************************************************************
+00097 
+00098 Function: vfs_addMount(vfs_mountPoint_t *mp)
+00099 
+00100 Description: This function adds a mount point to the system
+00101 
+00102 Notes:
+00103 
+00104 ************************************************************************/
+00105 int vfs_addMount(vfs_mountPoint_t  *mp) {
+00106 
+00107   /* If There Are No Existing Mounts Make It The First */
+00108   if (systemVitals->mountPoints == 0x0) {
+00109     mp->prev               = 0x0;
+00110     mp->next               = 0x0;
+00111     systemVitals->mountPoints = mp;
+00112     }
+00113   else {
+00114     mp->next                        = systemVitals->mountPoints;
+00115     systemVitals->mountPoints->prev = mp;
+00116     mp->prev                        = 0x0;
+00117     systemVitals->mountPoints       = mp;
+00118     }
+00119   /* Return */
+00120   return(0x0);
+00121   }
+00122 
+00123 /************************************************************************
+00124 
+00125 Function: vfs_findMount(char *mountPoint)
+00126 
+00127 Description: This function finds a particular mount point
+00128 
+00129 Notes:
+00130 
+00131 ************************************************************************/
+00132 vfs_mountPoint_t *vfs_findMount(char *mountPoint) {
+00133   vfs_mountPoint_t *tmpMp = 0x0;
+00134 
+00135   for (tmpMp=systemVitals->mountPoints;tmpMp;tmpMp=tmpMp->next) {
+00136     if (strcmp(tmpMp->mountPoint,mountPoint) == 0x0) {
+00137       return(tmpMp);
+00138       }
+00139     }
+00140   /* Return NULL If Mount Point Not Found */
+00141   return NULL;
+00142   }
+00143 
+00144 /***
+00145  END
+00146  ***/
+00147 
+

Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/mount_8c.html b/doc/html/mount_8c.html new file mode 100644 index 0000000..5b79970 --- /dev/null +++ b/doc/html/mount_8c.html @@ -0,0 +1,170 @@ + + +UbixOS V2: src/sys/vfs/mount.c File Reference + + + + +
+
+
+
+ +

mount.c File Reference

+

+#include <vfs/mount.h>
+#include <ubixos/vitals.h>
+#include <ubixos/kpanic.h>
+#include <lib/kmalloc.h>
+#include <lib/kprintf.h>
+#include <lib/string.h>
+#include <sys/device.h>
+ +

+Go to the source code of this file. + + + + + + + + +

Functions

int vfs_addMount (vfs_mountPoint_t *mp)
vfs_mountPoint_tvfs_findMount (char *mountPoint)
int vfs_mount (int major, int minor, int partition, int vfsType, char *mountPoint, char *perms)
+


Function Documentation

+ +
+
+ + + + + + + + + +
int vfs_addMount (vfs_mountPoint_t mp  ) 
+
+
+ +

+ +

+Definition at line 105 of file mount.c. +

+References vfs_mountPoint::next, vfs_mountPoint::prev, and systemVitals. +

+Referenced by vfs_mount(). +

+

+ +

+
+ + + + + + + + + +
vfs_mountPoint_t* vfs_findMount (char *  mountPoint  ) 
+
+
+ +

+ +

+Definition at line 132 of file mount.c. +

+References vfs_mountPoint::mountPoint, vfs_mountPoint::next, NULL, strcmp(), and systemVitals. +

+Referenced by devfs_makeNode(), fopen(), and unlink(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int vfs_mount (int  major,
int  minor,
int  partition,
int  vfsType,
char *  mountPoint,
char *  perms 
)
+
+ +

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/mount_8h-source.html b/doc/html/mount_8h-source.html new file mode 100644 index 0000000..ae3de05 --- /dev/null +++ b/doc/html/mount_8h-source.html @@ -0,0 +1,92 @@ + + +UbixOS V2: src/sys/include/vfs/mount.h Source File + + + + +
+
+
+
+ +

mount.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _MOUNT_H
+00031 #define _MOUNT_H
+00032 
+00033 #include <ubixos/types.h>
+00034 
+00035 typedef struct vfs_mountPoint {
+00036   struct vfs_mountPoint   *prev;
+00037   struct vfs_mountPoint   *next;
+00038   struct fileSystem       *fs;
+00039   struct device_node      *device;
+00040   struct ubixDiskLabel   *diskLabel;
+00041   void               *fsInfo;
+00042   int                partition;
+00043   char               mountPoint[1024];
+00044   char               perms;
+00045   } vfs_mountPoint_t;
+00046 
+00047 int vfs_mount(int major,int minor,int partition,int fsType,char *mountPoint,char *perms);
+00048 int vfs_addMount(vfs_mountPoint_t *mp);
+00049 vfs_mountPoint_t *vfs_findMount(char *mountPoint);
+00050 
+00051 #endif
+00052 
+00053 /***
+00054  END
+00055  ***/
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/mount_8h.html b/doc/html/mount_8h.html new file mode 100644 index 0000000..8756f2d --- /dev/null +++ b/doc/html/mount_8h.html @@ -0,0 +1,186 @@ + + +UbixOS V2: src/sys/include/vfs/mount.h File Reference + + + + +
+
+
+
+ +

mount.h File Reference

+

+#include <ubixos/types.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + +

Data Structures

struct  vfs_mountPoint

Typedefs

typedef vfs_mountPoint vfs_mountPoint_t

Functions

int vfs_addMount (vfs_mountPoint_t *mp)
vfs_mountPoint_tvfs_findMount (char *mountPoint)
int vfs_mount (int major, int minor, int partition, int fsType, char *mountPoint, char *perms)
+


Typedef Documentation

+ +
+
+ + + + +
typedef struct vfs_mountPoint vfs_mountPoint_t
+
+
+ +

+ +

+

+


Function Documentation

+ +
+
+ + + + + + + + + +
int vfs_addMount (vfs_mountPoint_t mp  ) 
+
+
+ +

+ +

+Definition at line 105 of file mount.c. +

+References vfs_mountPoint::next, vfs_mountPoint::prev, and systemVitals. +

+Referenced by vfs_mount(). +

+

+ +

+
+ + + + + + + + + +
vfs_mountPoint_t* vfs_findMount (char *  mountPoint  ) 
+
+
+ +

+ +

+Definition at line 132 of file mount.c. +

+References vfs_mountPoint::mountPoint, vfs_mountPoint::next, NULL, strcmp(), and systemVitals. +

+Referenced by devfs_makeNode(), fopen(), and unlink(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int vfs_mount (int  major,
int  minor,
int  partition,
int  fsType,
char *  mountPoint,
char *  perms 
)
+
+ +

+


Generated on Sun Dec 3 02:38:08 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/mouse_8c-source.html b/doc/html/mouse_8c-source.html new file mode 100644 index 0000000..60ace46 --- /dev/null +++ b/doc/html/mouse_8c-source.html @@ -0,0 +1,209 @@ + + +UbixOS V2: src/sys/isa/mouse.c Source File + + + + +
+
+
+
+ +

mouse.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005 Redistribution and use in source and binary forms, with or without modification, are
+00006 permitted provided that the following conditions are met:
+00007 
+00008 Redistributions of source code must retain the above copyright notice, this list of
+00009 conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010 form must reproduce the above copyright notice, this list of conditions, the following
+00011 disclaimer and the list of authors in the documentation and/or other materials provided
+00012 with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013 contributors may be used to endorse or promote products derived from this software
+00014 without specific prior written permission.
+00015 
+00016 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019 THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021 OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023 TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <isa/mouse.h>
+00031 #include <isa/8259.h>
+00032 #include <sys/idt.h>
+00033 #include <sys/gdt.h>
+00034 #include <sys/io.h>
+00035 #include <lib/kprintf.h>
+00036 #include <ubixos/types.h>
+00037 
+00038 static uInt8 kbdRead() {
+00039   unsigned long Timeout;
+00040   uInt8 Stat, Data;
+00041 
+00042   for (Timeout = 50000L; Timeout != 0; Timeout--) {
+00043                 Stat = inportByte(0x64);
+00044 
+00045                 /* loop until 8042 output buffer full */
+00046                 if ((Stat & 0x01) != 0)
+00047                 {
+00048                         Data = inportByte(0x60);
+00049 
+00050                         /* loop if parity error or receive timeout */
+00051                         if((Stat & 0xC0) == 0)
+00052                                 return Data;
+00053                 }
+00054         }
+00055 
+00056         return -1;
+00057 }
+00058 
+00059 static void kbdWrite(uInt16 port,uInt8 data) {
+00060         uInt32 timeout;
+00061         uInt8 stat;
+00062 
+00063         for (timeout = 500000L; timeout != 0; timeout--)
+00064         {
+00065                 stat = inportByte(0x64);
+00066 
+00067                 if ((stat & 0x02) == 0)
+00068                         break;
+00069         }
+00070 
+00071         if (timeout != 0)
+00072                 outportByte(port, data);
+00073   }
+00074 
+00075 static uInt8 kbdWriteRead(uInt16 port,uInt8 data, const char* expect)
+00076 {
+00077         int RetVal;
+00078 
+00079         kbdWrite(port, data);
+00080         for (; *expect; expect++)
+00081         {
+00082                 RetVal = kbdRead();
+00083                 if ((uInt8) *expect != RetVal)
+00084                 {
+00085                         return RetVal;
+00086                 }
+00087         }
+00088 
+00089         return 0;
+00090 }
+00091 
+00092 
+00093 
+00094 int mouseInit() {
+00095   static uInt8 s1[] = { 0xF3, 0xC8, 0xF3, 0x64, 0xF3, 0x50, 0 };
+00096   static uInt8 s2[] = { 0xF6, 0xE6, 0xF4, 0xF3, 0x64, 0xE8, 0x03, 0 };
+00097   const  uInt8* ch;
+00098   Int8 cmd = 0x0;
+00099 
+00100   kbdWrite(0x64,0xA8);
+00101   for (ch = s1; *ch; ch++) {
+00102     kbdWrite(0x64, 0xD4);
+00103     kbdWriteRead(0x60, *ch,"\xFA");
+00104     }
+00105   for (ch = s2; *ch; ch++) {
+00106     kbdWrite(0x64, 0xD4);
+00107     kbdWriteRead(0x60, *ch,"\xFA");
+00108     }
+00109   kbdWrite(0x64,0xD4);
+00110   if (kbdWriteRead(0x60,0xF2,"\xFA") != 0x0) {
+00111     kprintf("Error With Mouse\n");
+00112     }
+00113   cmd = kbdRead();  
+00114   kprintf("CMD: [0x%X]\n",cmd);
+00115   kbdWrite(0x64, 0xD4);
+00116   kbdWriteRead(0x60, 0xF4,"\xFA");
+00117 
+00118   setVector(&mouseISR, mVec+12, dPresent + dInt + dDpl3);
+00119 
+00120   outportByte(mPic, eoi);
+00121   outportByte(sPic, eoi);
+00122   irqEnable(12);
+00123   outportByte(mPic, eoi);
+00124   outportByte(sPic, eoi);
+00125 
+00126   kprintf("psm0 - Address: [0x%X]\n",&mouseISR);
+00127 
+00128   /* Return so we know everything went well */
+00129   return(0x0);
+00130   }
+00131 
+00132 asm(
+00133   ".globl mouseISR \n"
+00134   "mouseISR:       \n"
+00135   "  pusha         \n" /* Save all registers           */
+00136   "  call mouseHandler \n"
+00137   "  popa          \n"
+00138   "  iret          \n" /* Exit interrupt               */
+00139   );
+00140 
+00141 void mouseHandler() {
+00142   kprintf("MOUSE!!!\n");
+00143 
+00144   outportByte(mPic, eoi);
+00145   outportByte(sPic, eoi);
+00146   /* Return */
+00147   return;
+00148   }
+00149 
+00150 /***
+00151  $Log$
+00152  Revision 1.1.1.1  2006/06/01 12:46:12  reddawg
+00153  ubix2
+00154 
+00155  Revision 1.2  2005/10/12 00:13:37  reddawg
+00156  Removed
+00157 
+00158  Revision 1.1.1.1  2005/09/26 17:24:02  reddawg
+00159  no message
+00160 
+00161  Revision 1.3  2004/09/07 21:54:38  reddawg
+00162  ok reverted back to old scheduling for now....
+00163 
+00164  Revision 1.2  2004/09/06 15:13:25  reddawg
+00165  Last commit before FreeBSD 6.0
+00166 
+00167  Revision 1.1  2004/06/04 10:20:53  reddawg
+00168  mouse drive: fixed a few bugs works a bit better now
+00169 
+00170  END
+00171  ***/
+00172 
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/mouse_8c.html b/doc/html/mouse_8c.html new file mode 100644 index 0000000..2b1add9 --- /dev/null +++ b/doc/html/mouse_8c.html @@ -0,0 +1,232 @@ + + +UbixOS V2: src/sys/isa/mouse.c File Reference + + + + +
+
+
+
+ +

mouse.c File Reference

+

+#include <isa/mouse.h>
+#include <isa/8259.h>
+#include <sys/idt.h>
+#include <sys/gdt.h>
+#include <sys/io.h>
+#include <lib/kprintf.h>
+#include <ubixos/types.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + +

Functions

 asm (".globl mouseISR \n""mouseISR: \n"" pusha \n"" call mouseHandler \n"" popa \n"" iret \n")
static uInt8 kbdRead ()
static void kbdWrite (uInt16 port, uInt8 data)
static uInt8 kbdWriteRead (uInt16 port, uInt8 data, const char *expect)
void mouseHandler ()
int mouseInit ()
+


Function Documentation

+ +
+
+ + + + + + + + + +
asm (".globl mouseISR \n""mouseISR: \n"" pusha \n"" call mouseHandler \n"" popa \n"" iret \n"   ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
static uInt8 kbdRead (  )  [static]
+
+
+ +

+ +

+Definition at line 38 of file mouse.c. +

+References inportByte(). +

+Referenced by kbdWriteRead(), and mouseInit(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
static void kbdWrite (uInt16  port,
uInt8  data 
) [static]
+
+
+ +

+ +

+Definition at line 59 of file mouse.c. +

+References inportByte(), and outportByte(). +

+Referenced by kbdWriteRead(), and mouseInit(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
static uInt8 kbdWriteRead (uInt16  port,
uInt8  data,
const char *  expect 
) [static]
+
+
+ +

+ +

+Definition at line 75 of file mouse.c. +

+References kbdRead(), and kbdWrite(). +

+Referenced by mouseInit(). +

+

+ +

+
+ + + + + + + + +
void mouseHandler (  ) 
+
+
+ +

+ +

+Definition at line 141 of file mouse.c. +

+References eoi, kprintf(), mPic, outportByte(), and sPic. +

+

+ +

+
+ + + + + + + + +
int mouseInit (  ) 
+
+
+ +

+ +

+Definition at line 94 of file mouse.c. +

+References dDpl3, dInt, dPresent, eoi, irqEnable(), kbdRead(), kbdWrite(), kbdWriteRead(), kprintf(), mouseISR(), mPic, mVec, outportByte(), setVector(), and sPic. +

+

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/mouse_8h-source.html b/doc/html/mouse_8h-source.html new file mode 100644 index 0000000..6fdaf97 --- /dev/null +++ b/doc/html/mouse_8h-source.html @@ -0,0 +1,91 @@ + + +UbixOS V2: src/sys/include/isa/mouse.h Source File + + + + +
+
+
+
+ +

mouse.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _MOUE_H
+00031 #define _MOUSE_H
+00032 
+00033 int mouseInit();
+00034 void mouseISR();
+00035 void mouseHandler();
+00036 
+00037 #endif
+00038 
+00039 /***
+00040  $Log$
+00041  Revision 1.1.1.1  2006/06/01 12:46:14  reddawg
+00042  ubix2
+00043 
+00044  Revision 1.2  2005/10/12 00:13:36  reddawg
+00045  Removed
+00046 
+00047  Revision 1.1.1.1  2005/09/26 17:23:39  reddawg
+00048  no message
+00049 
+00050  Revision 1.1  2004/06/04 10:20:53  reddawg
+00051  mouse drive: fixed a few bugs works a bit better now
+00052 
+00053  END
+00054  ***/
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/mouse_8h.html b/doc/html/mouse_8h.html new file mode 100644 index 0000000..b681b24 --- /dev/null +++ b/doc/html/mouse_8h.html @@ -0,0 +1,140 @@ + + +UbixOS V2: src/sys/include/isa/mouse.h File Reference + + + + +
+
+
+
+ +

mouse.h File Reference

+

+ +

+Go to the source code of this file. + + + + + + + + + + + +

Defines

#define _MOUSE_H

Functions

void mouseHandler ()
int mouseInit ()
void mouseISR ()
+


Define Documentation

+ +
+
+ + + + +
#define _MOUSE_H
+
+
+ +

+ +

+Definition at line 31 of file mouse.h. +

+

+


Function Documentation

+ +
+
+ + + + + + + + +
void mouseHandler (  ) 
+
+
+ +

+ +

+Definition at line 141 of file mouse.c. +

+References eoi, kprintf(), mPic, outportByte(), and sPic. +

+

+ +

+
+ + + + + + + + +
int mouseInit (  ) 
+
+
+ +

+ +

+Definition at line 94 of file mouse.c. +

+References dDpl3, dInt, dPresent, eoi, irqEnable(), kbdRead(), kbdWrite(), kbdWriteRead(), kprintf(), mouseISR(), mPic, mVec, outportByte(), setVector(), and sPic. +

+

+ +

+
+ + + + + + + + +
void mouseISR (  ) 
+
+
+ +

+ +

+Referenced by mouseInit(). +

+

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/mpi_8h-source.html b/doc/html/mpi_8h-source.html new file mode 100644 index 0000000..8b407f9 --- /dev/null +++ b/doc/html/mpi_8h-source.html @@ -0,0 +1,140 @@ + + +UbixOS V2: src/sys/include/mpi/mpi.h Source File + + + + +
+
+
+
+ +

mpi.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _MPI_H
+00031 #define _MPI_H
+00032 
+00033 #include <ubixos/types.h>
+00034 #include <ubixos/sched.h>
+00035 
+00036 #define MESSAGE_LENGTH 248
+00037 
+00038 struct mpi_message {
+00039   char                 data[MESSAGE_LENGTH];
+00040   uInt32               header;
+00041   pidType              pid;
+00042   struct mpi_message  *next;
+00043   };
+00044 
+00045 struct mpi_mbox {
+00046   struct mpi_mbox     *next;
+00047   struct mpi_mbox     *prev;
+00048   struct mpi_message  *msg;
+00049   struct mpi_message  *msgLast;
+00050   char                 name[64];
+00051   pidType              pid;
+00052   };
+00053 
+00054 typedef struct mpi_mbox    mpi_mbox_t;
+00055 typedef struct mpi_message mpi_message_t;
+00056 
+00057 
+00058 int mpi_createMbox(char *);
+00059 int mpi_destroyMbox(char *);
+00060 int mpi_postMessage(char *,uInt32,mpi_message_t *);
+00061 int mpi_fetchMessage(char *,mpi_message_t *);
+00062 int mpi_spam(uInt32,void *);
+00063 
+00064 #endif
+00065 
+00066 /***
+00067  $Log$
+00068  Revision 1.1.1.1  2006/06/01 12:46:14  reddawg
+00069  ubix2
+00070 
+00071  Revision 1.2  2005/10/12 00:13:36  reddawg
+00072  Removed
+00073 
+00074  Revision 1.1.1.1  2005/09/26 17:23:42  reddawg
+00075  no message
+00076 
+00077  Revision 1.8  2004/08/14 11:23:02  reddawg
+00078  Changes
+00079 
+00080  Revision 1.7  2004/05/28 03:52:56  reddawg
+00081  mpi: took a few suggestions from TCA
+00082 
+00083  Revision 1.6  2004/05/25 18:33:11  reddawg
+00084  We now use 128byte messages I can increase later
+00085 
+00086  Revision 1.5  2004/05/25 18:29:57  reddawg
+00087  We now lock onto a pid
+00088 
+00089  Revision 1.4  2004/05/25 16:52:22  reddawg
+00090  We now have mpiDestroyMbox(char *) This will of course destroy a mail box
+00091 
+00092  Revision 1.3  2004/05/25 16:28:21  reddawg
+00093  Made mpiFindMbox() static
+00094 
+00095  Revision 1.2  2004/05/25 15:42:19  reddawg
+00096  Enabled mpiSpam();
+00097 
+00098  Revision 1.1  2004/05/25 14:07:01  reddawg
+00099  Sorry we can't forget the headers files
+00100 
+00101  END
+00102  ***/
+00103 
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/mpi_8h.html b/doc/html/mpi_8h.html new file mode 100644 index 0000000..0a5600f --- /dev/null +++ b/doc/html/mpi_8h.html @@ -0,0 +1,289 @@ + + +UbixOS V2: src/sys/include/mpi/mpi.h File Reference + + + + +
+
+
+
+ +

mpi.h File Reference

+

+#include <ubixos/types.h>
+#include <ubixos/sched.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  mpi_mbox
struct  mpi_message

Defines

#define MESSAGE_LENGTH   248

Typedefs

typedef mpi_mbox mpi_mbox_t
typedef mpi_message mpi_message_t

Functions

int mpi_createMbox (char *)
int mpi_destroyMbox (char *)
int mpi_fetchMessage (char *, mpi_message_t *)
int mpi_postMessage (char *, uInt32, mpi_message_t *)
int mpi_spam (uInt32, void *)
+


Define Documentation

+ +
+
+ + + + +
#define MESSAGE_LENGTH   248
+
+
+ +

+ +

+Definition at line 36 of file mpi.h. +

+Referenced by mpi_fetchMessage(), mpi_postMessage(), and mpi_spam(). +

+

+


Typedef Documentation

+ +
+
+ + + + +
typedef struct mpi_mbox mpi_mbox_t
+
+
+ +

+ +

+Definition at line 54 of file mpi.h. +

+

+ +

+
+ + + + +
typedef struct mpi_message mpi_message_t
+
+
+ +

+ +

+Definition at line 55 of file mpi.h. +

+

+


Function Documentation

+ +
+
+ + + + + + + + + +
int mpi_createMbox (char *   ) 
+
+ +

+ +

+
+ + + + + + + + + +
int mpi_destroyMbox (char *   ) 
+
+
+ +

+ +

+Definition at line 234 of file system.c. +

+References _current, taskStruct::id, kfree(), mbox, mboxList, mpiSpinLock, spinLock(), spinUnlock(), and strcmp(). +

+Referenced by sysMpiDestroyMbox(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int mpi_fetchMessage (char * ,
mpi_message_t 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int mpi_postMessage (char * ,
uInt32 ,
mpi_message_t 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
int mpi_spam (uInt32 ,
void *  
)
+
+ +

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/namespaces.html b/doc/html/namespaces.html new file mode 100644 index 0000000..58fac18 --- /dev/null +++ b/doc/html/namespaces.html @@ -0,0 +1,33 @@ + + +UbixOS V2: Namespace Index + + + + +
+
+

UbixOS V2 Namespace List

Here is a list of all namespaces with brief descriptions: + +
std
+
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/namespacestd.html b/doc/html/namespacestd.html new file mode 100644 index 0000000..b537936 --- /dev/null +++ b/doc/html/namespacestd.html @@ -0,0 +1,37 @@ + + +UbixOS V2: std Namespace Reference + + + + +
+
+

std Namespace Reference

+

+ +

+ + +
+


Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ne2k_8c-source.html b/doc/html/ne2k_8c-source.html new file mode 100644 index 0000000..a47d96f --- /dev/null +++ b/doc/html/ne2k_8c-source.html @@ -0,0 +1,456 @@ + + +UbixOS V2: src/sys/isa/ne2k.c Source File + + + + +
+
+
+
+ +

ne2k.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <isa/ne2k.h>
+00031 #include <isa/8259.h>
+00032 #include <sys/device.old.h>
+00033 #include <sys/io.h>
+00034 #include <sys/idt.h>
+00035 #include <lib/kmalloc.h>
+00036 #include <lib/kprintf.h>
+00037 #include <string.h>
+00038 #include <ubixos/kpanic.h>
+00039 #include <ubixos/vitals.h>
+00040 #include <ubixos/spinlock.h>
+00041 #include <assert.h>
+00042 
+00043 
+00044 static spinLock_t ne2k_spinLock = SPIN_LOCK_INITIALIZER;
+00045 
+00046 static int dp_pkt2user(struct device *dev,int page,int length);
+00047 static void getblock(struct device *dev,int page,size_t offset,size_t size,void *dst);
+00048 static int dp_recv(struct device *);
+00049 
+00050 static struct nicBuffer *ne2kBuffer = 0x0;
+00051 static struct device    *mDev        = 0x0;
+00052 
+00053 asm(
+00054   ".globl ne2kISR         \n"
+00055   "ne2kISR:               \n"
+00056   "  pusha                \n" /* Save all registers           */
+00057   "  call ne2kHandler     \n"
+00058   "  popa                 \n"
+00059   "  iret                 \n" /* Exit interrupt               */
+00060   );
+00061 
+00062 /************************************************************************
+00063 
+00064 Function: int ne2kInit(uInt32 ioAddr)
+00065 Description: This Function Will Initialize The Programmable Timer
+00066 
+00067 Notes:
+00068 
+00069 ************************************************************************/
+00070 int ne2k_init() {
+00071   mDev = (struct device *)kmalloc(sizeof(struct device));
+00072   mDev->ioAddr = 0x280;
+00073   mDev->irq    = 10;
+00074   setVector(&ne2kISR, mVec+10, dPresent + dInt + dDpl0);
+00075   irqEnable(10);
+00076 //  kprintf("ne0 - irq: %i, ioAddr: 0x%X MAC: %X:%X:%X:%X:%X:%X\n",dev->irq,dev->ioAddr,dev->net->mac[0] & 0xFF,dev->net->mac[1] & 0xFF,dev->net->mac[2] & 0xFF,dev->net->mac[3] & 0xFF,dev->net->mac[4] & 0xFF,dev->net->mac[5] & 0xFF);
+00077 
+00078   outportByte(mDev->ioAddr + NE_CMD, 0x21);        // stop mode
+00079   outportByte(mDev->ioAddr + NE_DCR,0x29);         // 0x29 data config reg
+00080   outportByte(mDev->ioAddr + NE_RBCR0,0x00);       // LOW byte count (remote)
+00081   outportByte(mDev->ioAddr + NE_RBCR1,0x00);       // HIGH byte count (remote)
+00082   outportByte(mDev->ioAddr + NE_RCR,0x3C);         // receive config reg
+00083   outportByte(mDev->ioAddr + NE_TCR,0x02);         // LOOP mode (temp)
+00084   outportByte(mDev->ioAddr + NE_PSTART,startPage); // 0x26 PAGE start
+00085   outportByte(mDev->ioAddr + NE_BNRY,startPage);   // 0x26 BOUNDARY
+00086   outportByte(mDev->ioAddr + NE_PSTOP,stopPage);   // 0x40 PAGE stop
+00087   outportByte(mDev->ioAddr + NE_ISR,0xFF);         // interrupt status reg
+00088   outportByte(mDev->ioAddr + NE_IMR,0x0B);
+00089   outportByte(mDev->ioAddr + NE_CMD,0x61);         // PAGE 1 regs
+00090 
+00091   outportByte(mDev->ioAddr + DP_MAR0, 0xFF);
+00092   outportByte(mDev->ioAddr + DP_MAR1, 0xFF);
+00093   outportByte(mDev->ioAddr + DP_MAR2, 0xFF);
+00094   outportByte(mDev->ioAddr + DP_MAR3, 0xFF);
+00095   outportByte(mDev->ioAddr + DP_MAR4, 0xFF);
+00096   outportByte(mDev->ioAddr + DP_MAR5, 0xFF);
+00097   outportByte(mDev->ioAddr + DP_MAR6, 0xFF);
+00098   outportByte(mDev->ioAddr + DP_MAR7, 0xFF);
+00099   outportByte(mDev->ioAddr + DP_CURR, startPage + 1);
+00100   outportByte(mDev->ioAddr + NE_CMD,  0x20);
+00101   inportByte(mDev->ioAddr + DP_CNTR0);                /* reset counters by reading */
+00102   inportByte(mDev->ioAddr + DP_CNTR1);
+00103   inportByte(mDev->ioAddr + DP_CNTR2);
+00104 
+00105   outportByte(mDev->ioAddr + NE_TCR,  0x00);
+00106 
+00107   outportByte(mDev->ioAddr + NE_CMD, 0x0);
+00108   outportByte(mDev->ioAddr + NE_DCR, 0x29);
+00109 
+00110   kprintf("Initialized");
+00111   /* Return so we know everything went well */
+00112   return(0x0);
+00113   }
+00114 
+00115 int PCtoNIC(struct device *dev,void *packet,int length) {
+00116   int     i        = 0x0;
+00117   uInt16 *packet16 = (uInt16 *)packet;
+00118   uInt8  *packet8  = (uInt8  *)packet;
+00119   uInt8   word16   = 0x1;
+00120 
+00121   if ((inportByte(dev->ioAddr) & 0x04) == 0x04) {
+00122     kpanic("Device Not Ready\n");
+00123     }
+00124 
+00125   assert(length);
+00126   if ((word16 == 1) && (length & 0x01)) {
+00127     length++;
+00128     }
+00129 
+00130   outportByte(dev->ioAddr+EN0_RCNTLO,(length & 0xFF));
+00131   outportByte(dev->ioAddr+EN0_RCNTHI,(length >> 8));
+00132 
+00133   outportByte(dev->ioAddr+EN0_RSARLO,0x0);
+00134   outportByte(dev->ioAddr+EN0_RSARHI,0x41);
+00135 
+00136   outportByte(dev->ioAddr,E8390_RWRITE+E8390_START);
+00137 
+00138   if (word16 != 0x0) {
+00139     for(i=0;i<length/2;i++){
+00140       outportWord(dev->ioAddr + NE_DATAPORT,packet16[i]);
+00141       }
+00142     }
+00143   else {
+00144     for(i=0;i<length;i++){
+00145       outportByte(dev->ioAddr + NE_DATAPORT,packet8[i]);
+00146       }
+00147     }
+00148   
+00149   for (i = 0;i<=100;i++) {
+00150     if ((inportByte(dev->ioAddr+EN0_ISR) & 0x40) == 0x40) {
+00151       break;
+00152       }
+00153     }
+00154 
+00155   outportByte(dev->ioAddr+EN0_ISR,0x40);
+00156   outportByte(dev->ioAddr+EN0_TPSR,0x41);//ei_local->txStartPage);
+00157   outportByte(dev->ioAddr+0x05,(length & 0xFF));
+00158   outportByte(dev->ioAddr+0x06,(length >> 8));
+00159   outportByteP(dev->ioAddr,0x26);
+00160   //kprintf("SENT\n");
+00161   return(length);
+00162   }
+00163 
+00164 int NICtoPC(struct device *dev,void *packet,int length,int nic_addr) {
+00165   int i = 0x0;
+00166   uInt16 *packet16 = (uInt16 *)packet;
+00167 
+00168   assert(length);
+00169   
+00170   if (length & 0x01)
+00171     length++;
+00172 
+00173    
+00174 
+00175   outportByte(dev->ioAddr+EN0_RCNTLO,(length & 0xFF));
+00176   outportByte(dev->ioAddr+EN0_RCNTHI,(length >> 8));
+00177 
+00178   outportByte(dev->ioAddr+EN0_RSARLO,nic_addr & 0xFF);
+00179   outportByte(dev->ioAddr+EN0_RSARHI,nic_addr >> 8);
+00180 
+00181   outportByte(dev->ioAddr,0x0A);
+00182 
+00183   for(i=0;i<length/2;i++){
+00184     packet16[i] = inportWord(dev->ioAddr + NE_DATAPORT);
+00185     }
+00186 
+00187   outportByte(dev->ioAddr+EN0_ISR,0x40);
+00188   return(length);
+00189   }
+00190 
+00191 void ne2kHandler() {
+00192   uInt16 isr    = 0x0;
+00193   uInt16 status = 0x0;
+00194   
+00195   irqDisable(10);
+00196   outportByte(mPic, eoi);
+00197   outportByte(sPic, eoi);
+00198   
+00199   asm("sti");
+00200 
+00201   isr = inportByte(mDev->ioAddr + NE_ISR);
+00202   
+00203   if ((isr & 0x02) == 0x02) {
+00204     outportByte(mDev->ioAddr + NE_ISR, 0x0A);
+00205     status = inportByte(0x280 + NE_TPSR);
+00206     } 
+00207   if ((isr & 0x01) == 0x01) {
+00208     if (dp_recv(mDev)) {
+00209       kprintf("Error Getting Packet\n");
+00210       }
+00211     outportByte(mDev->ioAddr + NE_ISR, 0x05);
+00212     }
+00213     
+00214   outportByte(mDev->ioAddr + NE_IMR,0x0);
+00215   outportByte(mDev->ioAddr + NE_IMR,0x0B);
+00216   
+00217   asm("cli");
+00218   irqEnable(10);
+00219 
+00220   return;
+00221   }
+00222 
+00223 static int dp_recv(struct device *dev) {
+00224   dp_rcvhdr_t header;
+00225   unsigned int pageno = 0x0, curr = 0x0, next = 0x0;
+00226   int packet_processed = 0x0, r = 0x0;
+00227   uInt16 eth_type = 0x0;  
+00228 
+00229   uInt32 length = 0x0;
+00230 
+00231   pageno = inportByte(dev->ioAddr + NE_BNRY) + 1;
+00232   if (pageno == stopPage) pageno = startPage;
+00233 
+00234   do {
+00235     outportByte(dev->ioAddr + NE_CMD, 0x40);
+00236     curr = inportByte(dev->ioAddr + NE_CURRENT);
+00237     outportByte(dev->ioAddr, 0x0);
+00238     if (curr == pageno) break;
+00239     getblock(dev, pageno, (size_t)0, sizeof(header), &header);
+00240     getblock(dev, pageno, sizeof(header) + 2*sizeof(ether_addr_t), sizeof(eth_type), &eth_type);
+00241 
+00242     length = (header.dr_rbcl | (header.dr_rbch << 8)) - sizeof(dp_rcvhdr_t);
+00243     next = header.dr_next;
+00244 
+00245     //kprintf("length: [0x%X:0x%X:0x%X]\n",header.dr_next,header.dr_status,length);
+00246 
+00247     if (length < 60 || length > 1514) {
+00248       kprintf("dp8390: packet with strange length arrived: %d\n",length);
+00249       next= curr;
+00250       }
+00251     else if (next < startPage || next >= stopPage) {
+00252       kprintf("dp8390: strange next page\n");
+00253       next= curr;
+00254       }
+00255     else if (header.dr_status & RSR_FO) {
+00256       kpanic("dp8390: fifo overrun, resetting receive buffer\n");
+00257       next = curr;
+00258       }
+00259     else if (header.dr_status & RSR_PRX) {
+00260       r = dp_pkt2user(dev, pageno, length);
+00261       if (r != OK) {
+00262         kprintf("FRUIT");
+00263         return(0x0);
+00264         }
+00265 
+00266       packet_processed = 0x1;
+00267       }
+00268     if (next == startPage)
+00269       outportByte(dev->ioAddr + NE_BNRY, stopPage - 1);
+00270     else
+00271       outportByte(dev->ioAddr + NE_BNRY, next - 1);
+00272 
+00273     pageno = next;
+00274 
+00275     } while (packet_processed == 0x0);
+00276   return(0x0);
+00277   }
+00278 
+00279 static void getblock(struct device *dev,int page,size_t offset,size_t size,void *dst) {
+00280         uInt16 *ha = 0x0;
+00281         int i      = 0x0;
+00282 
+00283         ha = (uInt16 *) dst;
+00284         offset = page * DP_PAGESIZE + offset;
+00285         outportByte(dev->ioAddr + NE_RBCR0, size & 0xFF);
+00286         outportByte(dev->ioAddr + NE_RBCR1, size >> 8);
+00287         outportByte(dev->ioAddr + EN0_RSARLO, offset & 0xFF);
+00288         outportByte(dev->ioAddr + EN0_RSARHI, offset >> 8);
+00289         outportByte(dev->ioAddr + NE_CMD, E8390_RREAD | E8390_START);
+00290 
+00291         size /= 2;
+00292         for (i= 0; i<size; i++)
+00293                 ha[i]= inportWord(dev->ioAddr + NE_DATAPORT);
+00294   outportByte(dev->ioAddr+EN0_ISR,0x40);
+00295   }
+00296   
+00297 static int dp_pkt2user(struct device *dev,int page,int length) {
+00298   int last = 0x0;
+00299   struct nicBuffer *tmpBuf = 0x0;
+00300  
+00301   last = page + (length - 1) / DP_PAGESIZE;
+00302 
+00303   if (last >= stopPage) {
+00304     kprintf("FOOK STOP PAGE!!!");
+00305     }
+00306   else {
+00307     tmpBuf = ne2kAllocBuffer(length);
+00308     NICtoPC(dev,tmpBuf->buffer,length,page * DP_PAGESIZE + sizeof(dp_rcvhdr_t));
+00309     }
+00310   return(OK);
+00311   }
+00312 
+00313 struct nicBuffer *ne2kAllocBuffer(int length) {
+00314   struct nicBuffer *tmpBuf = 0x0;
+00315   
+00316   spinLock(&ne2k_spinLock);
+00317   
+00318   if (ne2kBuffer == 0x0) {
+00319     ne2kBuffer = (struct nicBuffer *)kmalloc(sizeof(struct nicBuffer));
+00320     ne2kBuffer->next   = 0x0;
+00321     ne2kBuffer->length = length;
+00322     ne2kBuffer->buffer = (char *)kmalloc(length);
+00323     spinUnlock(&ne2k_spinLock);
+00324     return(ne2kBuffer);
+00325     }
+00326   else {
+00327     for (tmpBuf = ne2kBuffer;tmpBuf->next != 0x0;tmpBuf = tmpBuf->next);
+00328     
+00329     tmpBuf->next   = (struct nicBuffer *)kmalloc(sizeof(struct nicBuffer));
+00330     tmpBuf         = tmpBuf->next;
+00331     tmpBuf->next   = 0x0;
+00332     tmpBuf->length = length;
+00333     tmpBuf->buffer = (char *)kmalloc(length);
+00334     spinUnlock(&ne2k_spinLock);
+00335     return(tmpBuf);
+00336     }
+00337   spinUnlock(&ne2k_spinLock);
+00338   return(0x0);
+00339   }
+00340 
+00341 struct nicBuffer *ne2kGetBuffer() {
+00342   struct nicBuffer *tmpBuf = 0x0;
+00343   
+00344   if (ne2k_spinLock == 0x1)
+00345     return(0x0);
+00346     
+00347   tmpBuf     = ne2kBuffer;
+00348   if (ne2kBuffer != 0x0)
+00349     ne2kBuffer = ne2kBuffer->next;
+00350   return(tmpBuf);
+00351   }
+00352 
+00353 void ne2kFreeBuffer(struct nicBuffer *buf) {
+00354   kfree(buf->buffer);
+00355   kfree(buf);
+00356   return;
+00357   }
+00358 
+00359 /***
+00360 
+00361  $Log$
+00362  Revision 1.1.1.1  2006/06/01 12:46:12  reddawg
+00363  ubix2
+00364 
+00365  Revision 1.2  2005/10/12 00:13:37  reddawg
+00366  Removed
+00367 
+00368  Revision 1.1.1.1  2005/09/26 17:24:02  reddawg
+00369  no message
+00370 
+00371  Revision 1.24  2004/09/28 21:47:56  reddawg
+00372  Fixed deadlock now safe to use in bochs
+00373 
+00374  Revision 1.23  2004/09/16 22:35:28  reddawg
+00375  Demo Release
+00376 
+00377  Revision 1.22  2004/09/15 21:25:33  reddawg
+00378  Fixens
+00379 
+00380  Revision 1.21  2004/09/11 19:15:37  reddawg
+00381  here you go irq 10 io 240 for your ne2k nic
+00382 
+00383  Revision 1.20  2004/09/07 22:26:04  reddawg
+00384  synced in
+00385 
+00386  Revision 1.19  2004/09/07 21:54:38  reddawg
+00387  ok reverted back to old scheduling for now....
+00388 
+00389  Revision 1.18  2004/09/06 15:13:25  reddawg
+00390  Last commit before FreeBSD 6.0
+00391 
+00392  Revision 1.17  2004/08/01 20:40:45  reddawg
+00393  Net related fixes
+00394 
+00395  Revision 1.16  2004/07/28 22:23:02  reddawg
+00396  make sure it still works before I goto bed
+00397 
+00398  Revision 1.15  2004/07/17 17:04:47  reddawg
+00399  ne2k: added assert hopefully it will help me solve this dma size 0 random error
+00400 
+00401  Revision 1.14  2004/07/14 12:03:50  reddawg
+00402  ne2k: ne2kInit to ne2k_init
+00403  Changed Startup Routines
+00404 
+00405  Revision 1.13  2004/06/04 10:19:42  reddawg
+00406  notes: we compile again, thank g-d anyways i was about to cry
+00407 
+00408  Revision 1.12  2004/05/21 12:48:22  reddawg
+00409  Cleaned up
+00410 
+00411  Revision 1.11  2004/05/19 04:07:42  reddawg
+00412  kmalloc(size,pid) no more it is no kmalloc(size); the way it should of been
+00413 
+00414  Revision 1.10  2004/05/10 02:23:24  reddawg
+00415  Minor Changes To Source Code To Prepare It For Open Source Release
+00416 
+00417  END
+00418  ***/
+00419 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ne2k_8c.html b/doc/html/ne2k_8c.html new file mode 100644 index 0000000..e9101a7 --- /dev/null +++ b/doc/html/ne2k_8c.html @@ -0,0 +1,496 @@ + + +UbixOS V2: src/sys/isa/ne2k.c File Reference + + + + +
+
+
+
+ +

ne2k.c File Reference

+

+#include <isa/ne2k.h>
+#include <isa/8259.h>
+#include <sys/device.old.h>
+#include <sys/io.h>
+#include <sys/idt.h>
+#include <lib/kmalloc.h>
+#include <lib/kprintf.h>
+#include <string.h>
+#include <ubixos/kpanic.h>
+#include <ubixos/vitals.h>
+#include <ubixos/spinlock.h>
+#include <assert.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Functions

 asm (".globl ne2kISR \n""ne2kISR: \n"" pusha \n"" call ne2kHandler \n"" popa \n"" iret \n")
static int dp_pkt2user (struct device *dev, int page, int length)
static int dp_recv (struct device *)
static void getblock (struct device *dev, int page, size_t offset, size_t size, void *dst)
int ne2k_init ()
nicBufferne2kAllocBuffer (int length)
void ne2kFreeBuffer (struct nicBuffer *buf)
nicBufferne2kGetBuffer ()
void ne2kHandler ()
int NICtoPC (struct device *dev, void *packet, int length, int nic_addr)
int PCtoNIC (struct device *dev, void *packet, int length)

Variables

static struct devicemDev = 0x0
static spinLock_t ne2k_spinLock = SPIN_LOCK_INITIALIZER
static struct nicBufferne2kBuffer = 0x0
+


Function Documentation

+ +
+
+ + + + + + + + + +
asm (".globl ne2kISR \n""ne2kISR: \n"" pusha \n"" call ne2kHandler \n"" popa \n"" iret \n"   ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
static int dp_pkt2user (struct device dev,
int  page,
int  length 
) [static]
+
+
+ +

+ +

+Definition at line 297 of file ne2k.c. +

+References nicBuffer::buffer, dev, DP_PAGESIZE, kprintf(), ne2kAllocBuffer(), NICtoPC(), OK, stopPage, and tmpBuf. +

+Referenced by dp_recv(). +

+

+ +

+
+ + + + + + + + + +
static int dp_recv (struct device  )  [static]
+
+
+ +

+ +

+Definition at line 223 of file ne2k.c. +

+References dev, dp_pkt2user(), getblock(), inportByte(), device::ioAddr, kpanic(), kprintf(), NE_BNRY, NE_CMD, NE_CURRENT, OK, outportByte(), RSR_FO, RSR_PRX, startPage, and stopPage. +

+Referenced by ne2kHandler(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static void getblock (struct device dev,
int  page,
size_t  offset,
size_t  size,
void *  dst 
) [static]
+
+
+ +

+ +

+Definition at line 279 of file ne2k.c. +

+References dev, DP_PAGESIZE, E8390_RREAD, E8390_START, EN0_ISR, EN0_RSARHI, EN0_RSARLO, inportWord(), device::ioAddr, NE_CMD, NE_DATAPORT, NE_RBCR0, NE_RBCR1, and outportByte(). +

+Referenced by dp_recv(). +

+

+ +

+
+ + + + + + + + +
int ne2k_init (  ) 
+
+ +

+ +

+
+ + + + + + + + + +
struct nicBuffer* ne2kAllocBuffer (int  length  ) 
+
+
+ +

+ +

+Definition at line 313 of file ne2k.c. +

+References nicBuffer::buffer, kmalloc(), nicBuffer::length, ne2k_spinLock, ne2kBuffer, nicBuffer::next, spinLock(), spinUnlock(), and tmpBuf. +

+Referenced by dp_pkt2user(). +

+

+ +

+
+ + + + + + + + + +
void ne2kFreeBuffer (struct nicBuffer buf  ) 
+
+
+ +

+ +

+Definition at line 353 of file ne2k.c. +

+References nicBuffer::buffer, and kfree(). +

+Referenced by ethernetif_thread(). +

+

+ +

+
+ + + + + + + + +
struct nicBuffer* ne2kGetBuffer (  ) 
+
+
+ +

+ +

+Definition at line 341 of file ne2k.c. +

+References ne2k_spinLock, ne2kBuffer, nicBuffer::next, tmpBuf, and x1. +

+Referenced by ethernetif_thread(). +

+

+ +

+
+ + + + + + + + +
void ne2kHandler (  ) 
+
+
+ +

+ +

+Definition at line 191 of file ne2k.c. +

+References dp_recv(), eoi, inportByte(), device::ioAddr, irqDisable(), irqEnable(), kprintf(), mDev, mPic, NE_IMR, NE_ISR, NE_TPSR, outportByte(), sPic, and status. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int NICtoPC (struct device dev,
void *  packet,
int  length,
int  nic_addr 
)
+
+
+ +

+ +

+Definition at line 164 of file ne2k.c. +

+References assert, dev, EN0_ISR, EN0_RCNTHI, EN0_RCNTLO, EN0_RSARHI, EN0_RSARLO, inportWord(), device::ioAddr, NE_DATAPORT, and outportByte(). +

+Referenced by dp_pkt2user(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int PCtoNIC (struct device dev,
void *  packet,
int  length 
)
+
+ +

+


Variable Documentation

+ +
+
+ + + + +
struct device* mDev = 0x0 [static]
+
+
+ +

+ +

+Definition at line 51 of file ne2k.c. +

+Referenced by ne2k_init(), and ne2kHandler(). +

+

+ +

+
+ + + + +
spinLock_t ne2k_spinLock = SPIN_LOCK_INITIALIZER [static]
+
+
+ +

+ +

+Definition at line 44 of file ne2k.c. +

+Referenced by ne2kAllocBuffer(), and ne2kGetBuffer(). +

+

+ +

+
+ + + + +
struct nicBuffer* ne2kBuffer = 0x0 [static]
+
+
+ +

+ +

+Definition at line 50 of file ne2k.c. +

+Referenced by ne2kAllocBuffer(), and ne2kGetBuffer(). +

+

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ne2k_8h-source.html b/doc/html/ne2k_8h-source.html new file mode 100644 index 0000000..69cf4c2 --- /dev/null +++ b/doc/html/ne2k_8h-source.html @@ -0,0 +1,234 @@ + + +UbixOS V2: src/sys/include/isa/ne2k.h Source File + + + + +
+
+
+
+ +

ne2k.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _NE2K_H
+00031 #define _NE2K_H
+00032 
+00033 #include <ubixos/types.h>
+00034 #include <sys/device.old.h>
+00035 
+00036 #define ether_addr  ether_addr_t
+00037 typedef struct dp_rcvhdr
+00038 {
+00039         uInt8 dr_status;                 /* Copy of rsr                       */
+00040         uInt8 dr_next;                   /* Pointer to next packet            */
+00041         uInt8 dr_rbcl;                   /* Receive Byte Count Low            */
+00042         uInt8 dr_rbch;                   /* Receive Byte Count High           */
+00043 } dp_rcvhdr_t;
+00044 
+00045 typedef union etheraddr {
+00046     unsigned char bytes[6];             /* byteorder safe initialization */
+00047     unsigned short shorts[3];           /* force 2-byte alignment */
+00048 } ether_addr;
+00049 
+00050 
+00051 struct nicBuffer {
+00052   struct nicBuffer *next;
+00053   int               length;
+00054   char             *buffer;
+00055   };
+00056 
+00057 #define RSR_FO         0x08
+00058 #define RSR_PRX                0x01
+00059 #define DEF_ENABLED    0x200
+00060 
+00061 #define OK      0
+00062 
+00063 
+00064 #define startPage 0x4C
+00065 #define stopPage  0x80
+00066 
+00067 
+00068 #define NE_CMD       0x00
+00069 #define NE_PSTART    0x01
+00070 #define NE_PSTOP     0x02
+00071 #define NE_BNRY      0x03
+00072 #define NE_TPSR      0x04
+00073 #define NE_ISR       0x07
+00074 #define NE_CURRENT   0x07
+00075 #define NE_RBCR0     0x0A
+00076 #define NE_RBCR1     0x0B
+00077 #define NE_RCR       0x0C
+00078 #define NE_TCR       0x0D
+00079 #define NE_DCR       0x0E
+00080 #define NE_IMR       0x0F
+00081 
+00082 
+00083 #define NE_DCR_WTS   0x01
+00084 #define NE_DCR_LS    0x08
+00085 #define NE_DCR_AR    0x10
+00086 #define NE_DCR_FT1   0x40
+00087 #define NE_DCR_FT0   0x20
+00088 
+00089 
+00090 
+00091 #define E8390_STOP   0x01
+00092 #define E8390_NODMA  0x20
+00093 #define E8390_PAGE0  0x00
+00094 #define E8390_PAGE1  0x40
+00095 #define E8390_CMD    0x00
+00096 #define E8390_START  0x02
+00097 #define E8390_RREAD  0x08
+00098 #define E8390_RWRITE 0x10
+00099 #define E8390_RXOFF  0x20
+00100 #define E8390_TXOFF  0x00
+00101 #define E8390_RXCONFIG 0x04
+00102 #define E8390_TXCONFIG 0x00
+00103 
+00104 #define EN0_COUNTER0 0x0d
+00105 #define EN0_DCFG     0x0e
+00106 #define EN0_RCNTLO   0x0a
+00107 #define EN0_RCNTHI   0x0b
+00108 #define EN0_ISR      0x07
+00109 #define EN0_IMR      0x0f
+00110 #define EN0_RSARLO   0x08
+00111 #define EN0_RSARHI   0x09
+00112 #define EN0_TPSR     0x04
+00113 #define EN0_RXCR     0x0c
+00114 #define EN0_TXCR     0x0D
+00115 #define EN0_STARTPG  0x01
+00116 #define EN0_STOPPG   0x02
+00117 #define EN0_BOUNDARY 0x03
+00118 
+00119 #define EN1_PHYS     0x01
+00120 #define EN1_CURPAG   0x07
+00121 #define EN1_MULT     0x08
+00122 
+00123 #define NE1SM_START_PG 0x20
+00124 #define NE1SM_STOP_PG 0x40
+00125 #define NESM_START_PG 0x40
+00126 #define NESM_STOP_PG  0x80
+00127 
+00128 #define ENISR_ALL    0x3f
+00129 
+00130 #define ENDCFG_WTS   0x01
+00131 
+00132 #define NE_DATAPORT  0x10
+00133 
+00134 #define TX_2X_PAGES 12
+00135 #define TX_1X_PAGES 6
+00136 #define TX_PAGES (dev->priv->pingPong ? TX_2X_PAGES : TX_1X_PAGES)
+00137 
+00138 
+00139 #define DP_CURR         0x7     /* Current Page Register             */
+00140 #define DP_MAR0         0x8     /* Multicast Address Register 0      */
+00141 #define DP_MAR1         0x9     /* Multicast Address Register 1      */
+00142 #define DP_MAR2         0xA     /* Multicast Address Register 2      */
+00143 #define DP_MAR3         0xB     /* Multicast Address Register 3      */
+00144 #define DP_MAR4         0xC     /* Multicast Address Register 4      */
+00145 #define DP_MAR5         0xD     /* Multicast Address Register 5      */
+00146 #define DP_MAR6         0xE     /* Multicast Address Register 6      */
+00147 #define DP_MAR7         0xF     /* Multicast Address Register 7      */
+00148 
+00149 #define DP_CNTR0        0xD     /* Tally Counter 0                   */
+00150 #define DP_CNTR1        0xE     /* Tally Counter 1                   */
+00151 #define DP_CNTR2        0xF     /* Tally Counter 2                   */
+00152 
+00153 
+00154 #define DP_PAGESIZE     256
+00155 
+00156 extern char *nicPacket;
+00157 extern uInt32 packetLength;
+00158 
+00159 
+00160 int ne2k_init();
+00161 int ne2kProbe(int,struct device *);
+00162 int ne2kDevInit(struct device *);
+00163 void NS8390_init(struct device *dev,int startp);
+00164 
+00165 void ne2kISR();
+00166 void ne2kHandler();
+00167 
+00168 int NICtoPC(struct device *dev,void *packet,int length,int nic_addr);
+00169 int PCtoNIC(struct device *dev,void *packet,int length);
+00170 
+00171 struct nicBuffer *ne2kAllocBuffer(int);
+00172 struct nicBuffer *ne2kGetBuffer();
+00173 void ne2kFreeBuffer(struct nicBuffer *);
+00174 
+00175 #endif
+00176 
+00177 /***
+00178  $Log$
+00179  Revision 1.1.1.1  2006/06/01 12:46:14  reddawg
+00180  ubix2
+00181 
+00182  Revision 1.2  2005/10/12 00:13:36  reddawg
+00183  Removed
+00184 
+00185  Revision 1.1.1.1  2005/09/26 17:23:39  reddawg
+00186  no message
+00187 
+00188  Revision 1.6  2004/07/14 12:03:49  reddawg
+00189  ne2k: ne2kInit to ne2k_init
+00190  Changed Startup Routines
+00191 
+00192  Revision 1.5  2004/05/21 14:57:16  reddawg
+00193  Cleaned up
+00194 
+00195 
+00196  END
+00197  ***/
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ne2k_8h.html b/doc/html/ne2k_8h.html new file mode 100644 index 0000000..cd510f7 --- /dev/null +++ b/doc/html/ne2k_8h.html @@ -0,0 +1,2004 @@ + + +UbixOS V2: src/sys/include/isa/ne2k.h File Reference + + + + +
+
+
+
+ +

ne2k.h File Reference

+

+#include <ubixos/types.h>
+#include <sys/device.old.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  dp_rcvhdr
union  etheraddr
struct  nicBuffer

Defines

#define DEF_ENABLED   0x200
#define DP_CNTR0   0xD
#define DP_CNTR1   0xE
#define DP_CNTR2   0xF
#define DP_CURR   0x7
#define DP_MAR0   0x8
#define DP_MAR1   0x9
#define DP_MAR2   0xA
#define DP_MAR3   0xB
#define DP_MAR4   0xC
#define DP_MAR5   0xD
#define DP_MAR6   0xE
#define DP_MAR7   0xF
#define DP_PAGESIZE   256
#define E8390_CMD   0x00
#define E8390_NODMA   0x20
#define E8390_PAGE0   0x00
#define E8390_PAGE1   0x40
#define E8390_RREAD   0x08
#define E8390_RWRITE   0x10
#define E8390_RXCONFIG   0x04
#define E8390_RXOFF   0x20
#define E8390_START   0x02
#define E8390_STOP   0x01
#define E8390_TXCONFIG   0x00
#define E8390_TXOFF   0x00
#define EN0_BOUNDARY   0x03
#define EN0_COUNTER0   0x0d
#define EN0_DCFG   0x0e
#define EN0_IMR   0x0f
#define EN0_ISR   0x07
#define EN0_RCNTHI   0x0b
#define EN0_RCNTLO   0x0a
#define EN0_RSARHI   0x09
#define EN0_RSARLO   0x08
#define EN0_RXCR   0x0c
#define EN0_STARTPG   0x01
#define EN0_STOPPG   0x02
#define EN0_TPSR   0x04
#define EN0_TXCR   0x0D
#define EN1_CURPAG   0x07
#define EN1_MULT   0x08
#define EN1_PHYS   0x01
#define ENDCFG_WTS   0x01
#define ENISR_ALL   0x3f
#define ether_addr   ether_addr_t
#define NE1SM_START_PG   0x20
#define NE1SM_STOP_PG   0x40
#define NE_BNRY   0x03
#define NE_CMD   0x00
#define NE_CURRENT   0x07
#define NE_DATAPORT   0x10
#define NE_DCR   0x0E
#define NE_DCR_AR   0x10
#define NE_DCR_FT0   0x20
#define NE_DCR_FT1   0x40
#define NE_DCR_LS   0x08
#define NE_DCR_WTS   0x01
#define NE_IMR   0x0F
#define NE_ISR   0x07
#define NE_PSTART   0x01
#define NE_PSTOP   0x02
#define NE_RBCR0   0x0A
#define NE_RBCR1   0x0B
#define NE_RCR   0x0C
#define NE_TCR   0x0D
#define NE_TPSR   0x04
#define NESM_START_PG   0x40
#define NESM_STOP_PG   0x80
#define OK   0
#define RSR_FO   0x08
#define RSR_PRX   0x01
#define startPage   0x4C
#define stopPage   0x80
#define TX_1X_PAGES   6
#define TX_2X_PAGES   12
#define TX_PAGES   (dev->priv->pingPong ? TX_2X_PAGES : TX_1X_PAGES)

Typedefs

typedef dp_rcvhdr dp_rcvhdr_t
typedef etheraddr ether_addr

Functions

int ne2k_init ()
nicBufferne2kAllocBuffer (int)
int ne2kDevInit (struct device *)
void ne2kFreeBuffer (struct nicBuffer *)
nicBufferne2kGetBuffer ()
void ne2kHandler ()
void ne2kISR ()
int ne2kProbe (int, struct device *)
int NICtoPC (struct device *dev, void *packet, int length, int nic_addr)
void NS8390_init (struct device *dev, int startp)
int PCtoNIC (struct device *dev, void *packet, int length)

Variables

char * nicPacket
uInt32 packetLength
+


Define Documentation

+ +
+
+ + + + +
#define DEF_ENABLED   0x200
+
+
+ +

+ +

+Definition at line 59 of file ne2k.h. +

+

+ +

+
+ + + + +
#define DP_CNTR0   0xD
+
+
+ +

+ +

+Definition at line 149 of file ne2k.h. +

+Referenced by ne2k_init(). +

+

+ +

+
+ + + + +
#define DP_CNTR1   0xE
+
+
+ +

+ +

+Definition at line 150 of file ne2k.h. +

+Referenced by ne2k_init(). +

+

+ +

+
+ + + + +
#define DP_CNTR2   0xF
+
+
+ +

+ +

+Definition at line 151 of file ne2k.h. +

+Referenced by ne2k_init(). +

+

+ +

+
+ + + + +
#define DP_CURR   0x7
+
+
+ +

+ +

+Definition at line 139 of file ne2k.h. +

+Referenced by ne2k_init(). +

+

+ +

+
+ + + + +
#define DP_MAR0   0x8
+
+
+ +

+ +

+Definition at line 140 of file ne2k.h. +

+Referenced by ne2k_init(). +

+

+ +

+
+ + + + +
#define DP_MAR1   0x9
+
+
+ +

+ +

+Definition at line 141 of file ne2k.h. +

+Referenced by ne2k_init(). +

+

+ +

+
+ + + + +
#define DP_MAR2   0xA
+
+
+ +

+ +

+Definition at line 142 of file ne2k.h. +

+Referenced by ne2k_init(). +

+

+ +

+
+ + + + +
#define DP_MAR3   0xB
+
+
+ +

+ +

+Definition at line 143 of file ne2k.h. +

+Referenced by ne2k_init(). +

+

+ +

+
+ + + + +
#define DP_MAR4   0xC
+
+
+ +

+ +

+Definition at line 144 of file ne2k.h. +

+Referenced by ne2k_init(). +

+

+ +

+
+ + + + +
#define DP_MAR5   0xD
+
+
+ +

+ +

+Definition at line 145 of file ne2k.h. +

+Referenced by ne2k_init(). +

+

+ +

+
+ + + + +
#define DP_MAR6   0xE
+
+
+ +

+ +

+Definition at line 146 of file ne2k.h. +

+Referenced by ne2k_init(). +

+

+ +

+
+ + + + +
#define DP_MAR7   0xF
+
+
+ +

+ +

+Definition at line 147 of file ne2k.h. +

+Referenced by ne2k_init(). +

+

+ +

+
+ + + + +
#define DP_PAGESIZE   256
+
+
+ +

+ +

+Definition at line 154 of file ne2k.h. +

+Referenced by dp_pkt2user(), and getblock(). +

+

+ +

+
+ + + + +
#define E8390_CMD   0x00
+
+
+ +

+ +

+Definition at line 95 of file ne2k.h. +

+

+ +

+
+ + + + +
#define E8390_NODMA   0x20
+
+
+ +

+ +

+Definition at line 92 of file ne2k.h. +

+

+ +

+
+ + + + +
#define E8390_PAGE0   0x00
+
+
+ +

+ +

+Definition at line 93 of file ne2k.h. +

+

+ +

+
+ + + + +
#define E8390_PAGE1   0x40
+
+
+ +

+ +

+Definition at line 94 of file ne2k.h. +

+

+ +

+
+ + + + +
#define E8390_RREAD   0x08
+
+
+ +

+ +

+Definition at line 97 of file ne2k.h. +

+Referenced by getblock(). +

+

+ +

+
+ + + + +
#define E8390_RWRITE   0x10
+
+
+ +

+ +

+Definition at line 98 of file ne2k.h. +

+Referenced by PCtoNIC(). +

+

+ +

+
+ + + + +
#define E8390_RXCONFIG   0x04
+
+
+ +

+ +

+Definition at line 101 of file ne2k.h. +

+

+ +

+
+ + + + +
#define E8390_RXOFF   0x20
+
+
+ +

+ +

+Definition at line 99 of file ne2k.h. +

+

+ +

+
+ + + + +
#define E8390_START   0x02
+
+
+ +

+ +

+Definition at line 96 of file ne2k.h. +

+Referenced by getblock(), and PCtoNIC(). +

+

+ +

+
+ + + + +
#define E8390_STOP   0x01
+
+
+ +

+ +

+Definition at line 91 of file ne2k.h. +

+

+ +

+
+ + + + +
#define E8390_TXCONFIG   0x00
+
+
+ +

+ +

+Definition at line 102 of file ne2k.h. +

+

+ +

+
+ + + + +
#define E8390_TXOFF   0x00
+
+
+ +

+ +

+Definition at line 100 of file ne2k.h. +

+

+ +

+
+ + + + +
#define EN0_BOUNDARY   0x03
+
+
+ +

+ +

+Definition at line 117 of file ne2k.h. +

+

+ +

+
+ + + + +
#define EN0_COUNTER0   0x0d
+
+
+ +

+ +

+Definition at line 104 of file ne2k.h. +

+

+ +

+
+ + + + +
#define EN0_DCFG   0x0e
+
+
+ +

+ +

+Definition at line 105 of file ne2k.h. +

+

+ +

+
+ + + + +
#define EN0_IMR   0x0f
+
+
+ +

+ +

+Definition at line 109 of file ne2k.h. +

+

+ +

+
+ + + + +
#define EN0_ISR   0x07
+
+
+ +

+ +

+Definition at line 108 of file ne2k.h. +

+Referenced by getblock(), NICtoPC(), and PCtoNIC(). +

+

+ +

+
+ + + + +
#define EN0_RCNTHI   0x0b
+
+
+ +

+ +

+Definition at line 107 of file ne2k.h. +

+Referenced by NICtoPC(), and PCtoNIC(). +

+

+ +

+
+ + + + +
#define EN0_RCNTLO   0x0a
+
+
+ +

+ +

+Definition at line 106 of file ne2k.h. +

+Referenced by NICtoPC(), and PCtoNIC(). +

+

+ +

+
+ + + + +
#define EN0_RSARHI   0x09
+
+
+ +

+ +

+Definition at line 111 of file ne2k.h. +

+Referenced by getblock(), NICtoPC(), and PCtoNIC(). +

+

+ +

+
+ + + + +
#define EN0_RSARLO   0x08
+
+
+ +

+ +

+Definition at line 110 of file ne2k.h. +

+Referenced by getblock(), NICtoPC(), and PCtoNIC(). +

+

+ +

+
+ + + + +
#define EN0_RXCR   0x0c
+
+
+ +

+ +

+Definition at line 113 of file ne2k.h. +

+

+ +

+
+ + + + +
#define EN0_STARTPG   0x01
+
+
+ +

+ +

+Definition at line 115 of file ne2k.h. +

+

+ +

+
+ + + + +
#define EN0_STOPPG   0x02
+
+
+ +

+ +

+Definition at line 116 of file ne2k.h. +

+

+ +

+
+ + + + +
#define EN0_TPSR   0x04
+
+
+ +

+ +

+Definition at line 112 of file ne2k.h. +

+

+ +

+
+ + + + +
#define EN0_TXCR   0x0D
+
+
+ +

+ +

+Definition at line 114 of file ne2k.h. +

+

+ +

+
+ + + + +
#define EN1_CURPAG   0x07
+
+
+ +

+ +

+Definition at line 120 of file ne2k.h. +

+

+ +

+
+ + + + +
#define EN1_MULT   0x08
+
+
+ +

+ +

+Definition at line 121 of file ne2k.h. +

+

+ +

+
+ + + + +
#define EN1_PHYS   0x01
+
+
+ +

+ +

+Definition at line 119 of file ne2k.h. +

+

+ +

+
+ + + + +
#define ENDCFG_WTS   0x01
+
+
+ +

+ +

+Definition at line 130 of file ne2k.h. +

+

+ +

+
+ + + + +
#define ENISR_ALL   0x3f
+
+
+ +

+ +

+Definition at line 128 of file ne2k.h. +

+

+ +

+
+ + + + +
#define ether_addr   ether_addr_t
+
+
+ +

+ +

+Definition at line 36 of file ne2k.h. +

+

+ +

+
+ + + + +
#define NE1SM_START_PG   0x20
+
+
+ +

+ +

+Definition at line 123 of file ne2k.h. +

+

+ +

+
+ + + + +
#define NE1SM_STOP_PG   0x40
+
+
+ +

+ +

+Definition at line 124 of file ne2k.h. +

+

+ +

+
+ + + + +
#define NE_BNRY   0x03
+
+
+ +

+ +

+Definition at line 71 of file ne2k.h. +

+Referenced by dp_recv(), and ne2k_init(). +

+

+ +

+
+ + + + +
#define NE_CMD   0x00
+
+
+ +

+ +

+Definition at line 68 of file ne2k.h. +

+Referenced by dp_recv(), getblock(), and ne2k_init(). +

+

+ +

+
+ + + + +
#define NE_CURRENT   0x07
+
+
+ +

+ +

+Definition at line 74 of file ne2k.h. +

+Referenced by dp_recv(). +

+

+ +

+
+ + + + +
#define NE_DATAPORT   0x10
+
+
+ +

+ +

+Definition at line 132 of file ne2k.h. +

+Referenced by getblock(), NICtoPC(), and PCtoNIC(). +

+

+ +

+
+ + + + +
#define NE_DCR   0x0E
+
+
+ +

+ +

+Definition at line 79 of file ne2k.h. +

+Referenced by ne2k_init(). +

+

+ +

+
+ + + + +
#define NE_DCR_AR   0x10
+
+
+ +

+ +

+Definition at line 85 of file ne2k.h. +

+

+ +

+
+ + + + +
#define NE_DCR_FT0   0x20
+
+
+ +

+ +

+Definition at line 87 of file ne2k.h. +

+

+ +

+
+ + + + +
#define NE_DCR_FT1   0x40
+
+
+ +

+ +

+Definition at line 86 of file ne2k.h. +

+

+ +

+
+ + + + +
#define NE_DCR_LS   0x08
+
+
+ +

+ +

+Definition at line 84 of file ne2k.h. +

+

+ +

+
+ + + + +
#define NE_DCR_WTS   0x01
+
+
+ +

+ +

+Definition at line 83 of file ne2k.h. +

+

+ +

+
+ + + + +
#define NE_IMR   0x0F
+
+
+ +

+ +

+Definition at line 80 of file ne2k.h. +

+Referenced by ne2k_init(), and ne2kHandler(). +

+

+ +

+
+ + + + +
#define NE_ISR   0x07
+
+
+ +

+ +

+Definition at line 73 of file ne2k.h. +

+Referenced by ne2k_init(), and ne2kHandler(). +

+

+ +

+
+ + + + +
#define NE_PSTART   0x01
+
+
+ +

+ +

+Definition at line 69 of file ne2k.h. +

+Referenced by ne2k_init(). +

+

+ +

+
+ + + + +
#define NE_PSTOP   0x02
+
+
+ +

+ +

+Definition at line 70 of file ne2k.h. +

+Referenced by ne2k_init(). +

+

+ +

+
+ + + + +
#define NE_RBCR0   0x0A
+
+
+ +

+ +

+Definition at line 75 of file ne2k.h. +

+Referenced by getblock(), and ne2k_init(). +

+

+ +

+
+ + + + +
#define NE_RBCR1   0x0B
+
+
+ +

+ +

+Definition at line 76 of file ne2k.h. +

+Referenced by getblock(), and ne2k_init(). +

+

+ +

+
+ + + + +
#define NE_RCR   0x0C
+
+
+ +

+ +

+Definition at line 77 of file ne2k.h. +

+Referenced by ne2k_init(). +

+

+ +

+
+ + + + +
#define NE_TCR   0x0D
+
+
+ +

+ +

+Definition at line 78 of file ne2k.h. +

+Referenced by ne2k_init(). +

+

+ +

+
+ + + + +
#define NE_TPSR   0x04
+
+
+ +

+ +

+Definition at line 72 of file ne2k.h. +

+Referenced by ne2kHandler(). +

+

+ +

+
+ + + + +
#define NESM_START_PG   0x40
+
+
+ +

+ +

+Definition at line 125 of file ne2k.h. +

+

+ +

+
+ + + + +
#define NESM_STOP_PG   0x80
+
+
+ +

+ +

+Definition at line 126 of file ne2k.h. +

+

+ +

+
+ + + + +
#define OK   0
+
+
+ +

+ +

+Definition at line 61 of file ne2k.h. +

+Referenced by dp_pkt2user(), and dp_recv(). +

+

+ +

+
+ + + + +
#define RSR_FO   0x08
+
+
+ +

+ +

+Definition at line 57 of file ne2k.h. +

+Referenced by dp_recv(). +

+

+ +

+
+ + + + +
#define RSR_PRX   0x01
+
+
+ +

+ +

+Definition at line 58 of file ne2k.h. +

+Referenced by dp_recv(). +

+

+ +

+
+ + + + +
#define startPage   0x4C
+
+
+ +

+ +

+Definition at line 64 of file ne2k.h. +

+Referenced by dp_recv(), and ne2k_init(). +

+

+ +

+
+ + + + +
#define stopPage   0x80
+
+
+ +

+ +

+Definition at line 65 of file ne2k.h. +

+Referenced by dp_pkt2user(), dp_recv(), and ne2k_init(). +

+

+ +

+
+ + + + +
#define TX_1X_PAGES   6
+
+
+ +

+ +

+Definition at line 135 of file ne2k.h. +

+

+ +

+
+ + + + +
#define TX_2X_PAGES   12
+
+
+ +

+ +

+Definition at line 134 of file ne2k.h. +

+

+ +

+
+ + + + +
#define TX_PAGES   (dev->priv->pingPong ? TX_2X_PAGES : TX_1X_PAGES)
+
+
+ +

+ +

+Definition at line 136 of file ne2k.h. +

+

+


Typedef Documentation

+ +
+
+ + + + +
typedef struct dp_rcvhdr dp_rcvhdr_t
+
+
+ +

+ +

+

+ +

+
+ + + + +
typedef union etheraddr ether_addr
+
+
+ +

+ +

+

+


Function Documentation

+ +
+
+ + + + + + + + +
int ne2k_init (  ) 
+
+ +

+ +

+
+ + + + + + + + + +
struct nicBuffer* ne2kAllocBuffer (int   ) 
+
+
+ +

+ +

+Definition at line 313 of file ne2k.c. +

+References nicBuffer::buffer, kmalloc(), nicBuffer::length, ne2k_spinLock, ne2kBuffer, nicBuffer::next, spinLock(), spinUnlock(), and tmpBuf. +

+Referenced by dp_pkt2user(). +

+

+ +

+
+ + + + + + + + + +
int ne2kDevInit (struct device  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
void ne2kFreeBuffer (struct nicBuffer  ) 
+
+
+ +

+ +

+Definition at line 353 of file ne2k.c. +

+References nicBuffer::buffer, and kfree(). +

+Referenced by ethernetif_thread(). +

+

+ +

+
+ + + + + + + + +
struct nicBuffer* ne2kGetBuffer (  ) 
+
+
+ +

+ +

+Definition at line 341 of file ne2k.c. +

+References ne2k_spinLock, ne2kBuffer, nicBuffer::next, tmpBuf, and x1. +

+Referenced by ethernetif_thread(). +

+

+ +

+
+ + + + + + + + +
void ne2kHandler (  ) 
+
+
+ +

+ +

+Definition at line 191 of file ne2k.c. +

+References dp_recv(), eoi, inportByte(), device::ioAddr, irqDisable(), irqEnable(), kprintf(), mDev, mPic, NE_IMR, NE_ISR, NE_TPSR, outportByte(), sPic, and status. +

+

+ +

+
+ + + + + + + + +
void ne2kISR (  ) 
+
+
+ +

+ +

+Referenced by ne2k_init(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int ne2kProbe (int ,
struct device 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int NICtoPC (struct device dev,
void *  packet,
int  length,
int  nic_addr 
)
+
+
+ +

+ +

+Definition at line 164 of file ne2k.c. +

+References assert, dev, EN0_ISR, EN0_RCNTHI, EN0_RCNTLO, EN0_RSARHI, EN0_RSARLO, inportWord(), device::ioAddr, NE_DATAPORT, and outportByte(). +

+Referenced by dp_pkt2user(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void NS8390_init (struct device dev,
int  startp 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int PCtoNIC (struct device dev,
void *  packet,
int  length 
)
+
+ +

+


Variable Documentation

+ +
+
+ + + + +
char* nicPacket
+
+
+ +

+ +

+

+ +

+
+ + + + +
uInt32 packetLength
+
+
+ +

+ +

+

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/net_2arch_2init_8h-source.html b/doc/html/net_2arch_2init_8h-source.html new file mode 100644 index 0000000..6515aea --- /dev/null +++ b/doc/html/net_2arch_2init_8h-source.html @@ -0,0 +1,81 @@ + + +UbixOS V2: src/sys/include/net/arch/init.h Source File + + + + +
+
+
+
+ +

init.h

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 #ifndef __ARCH_INIT_H__
+00036 #define __ARCH_INIT_H__
+00037 
+00038 #define TCPIP_INIT_DONE(arg) sys_sem_signal(*(sys_sem_t *)arg)
+00039 
+00040 #endif /* __ARCH_INIT_H__ */
+00041 
+00042 
+00043 
+00044 
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/net_2arch_2init_8h.html b/doc/html/net_2arch_2init_8h.html new file mode 100644 index 0000000..c3f9380 --- /dev/null +++ b/doc/html/net_2arch_2init_8h.html @@ -0,0 +1,70 @@ + + +UbixOS V2: src/sys/include/net/arch/init.h File Reference + + + + +
+
+
+
+ +

init.h File Reference

+

+ +

+Go to the source code of this file. + + + + +

Defines

#define TCPIP_INIT_DONE(arg)   sys_sem_signal(*(sys_sem_t *)arg)
+


Define Documentation

+ +
+
+ + + + + + + + + +
#define TCPIP_INIT_DONE (arg   )    sys_sem_signal(*(sys_sem_t *)arg)
+
+
+ +

+ +

+Definition at line 38 of file init.h. +

+

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/net_8c-source.html b/doc/html/net_8c-source.html new file mode 100644 index 0000000..4a6cb5f --- /dev/null +++ b/doc/html/net_8c-source.html @@ -0,0 +1,251 @@ + + +UbixOS V2: src/sys/lib/net.c Source File + + + + +
+
+
+
+ +

net.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005 Redistribution and use in source and binary forms, with or without modification, are
+00006 permitted provided that the following conditions are met:
+00007 
+00008 Redistributions of source code must retain the above copyright notice, this list of
+00009 conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010 form must reproduce the above copyright notice, this list of conditions, the following
+00011 disclaimer and the list of authors in the documentation and/or other materials provided
+00012 with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013 contributors may be used to endorse or promote products derived from this software
+00014 without specific prior written permission.
+00015 
+00016 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019 THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021 OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023 TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Log$
+00027  Revision 1.1.1.1  2006/06/01 12:46:16  reddawg
+00028  ubix2
+00029 
+00030  Revision 1.2  2005/10/12 00:13:37  reddawg
+00031  Removed
+00032 
+00033  Revision 1.1.1.1  2005/09/26 17:24:12  reddawg
+00034  no message
+00035 
+00036  Revision 1.6  2004/07/21 10:02:09  reddawg
+00037  devfs: renamed functions
+00038  device system: renamed functions
+00039  fdc: fixed a few potential bugs and cleaned up some unused variables
+00040  strol: fixed definition
+00041  endtask: made it print out freepage debug info
+00042  kmalloc: fixed a huge memory leak we had some unhandled descriptor insertion so some descriptors were lost
+00043  ld: fixed a pointer conversion
+00044  file: cleaned up a few unused variables
+00045  sched: broke task deletion
+00046  kprintf: fixed ogPrintf definition
+00047 
+00048  Revision 1.5  2004/06/28 23:12:58  reddawg
+00049  file format now container:/path/to/file
+00050 
+00051  Revision 1.4  2004/06/17 03:14:59  flameshadow
+00052  chg: added missing #include for kprintf()
+00053 
+00054  Revision 1.3  2004/05/20 22:54:02  reddawg
+00055  Cleaned Up Warrnings
+00056 
+00057  Revision 1.2  2004/04/30 14:16:04  reddawg
+00058  Fixed all the datatypes to be consistant uInt8,uInt16,uInt32,Int8,Int16,Int32
+00059 
+00060  Revision 1.1.1.1  2004/04/15 12:07:10  reddawg
+00061  UbixOS v1.0
+00062 
+00063  Revision 1.8  2004/04/13 21:29:52  reddawg
+00064  We now have sockets working. Lots of functionality to be added to continually
+00065  improve on the existing layers now its clean up time to get things in a better
+00066  working order.
+00067 
+00068  Revision 1.7  2004/04/13 16:36:33  reddawg
+00069  Changed our copyright, it is all now under a BSD-Style license
+00070 
+00071 
+00072 
+00073  $Id$
+00074 
+00075 *****************************************************************************************/
+00076 
+00077 #include <ubixos/types.h>
+00078 #include <net/sockets.h>
+00079 #include <string.h>
+00080 
+00081 #include "lib/kprintf.h"
+00082 
+00083 #ifndef _IN_ADDR_T_DECLARED
+00084 typedef uInt32        in_addr_t;
+00085 #define _IN_ADDR_T_DECLARED
+00086 #endif
+00087 
+00088 uInt32 htonl(uInt32 n) {
+00089   uInt32 retVal = 0x0;
+00090   retVal += ((n & 0xff) << 24); 
+00091   retVal += ((n & 0xff00) << 8);
+00092   retVal += ((n & 0xff0000) >> 8);
+00093   retVal += ((n & 0xff000000) >> 24);
+00094   return(retVal);
+00095   }
+00096 
+00097 uInt32 htons(uInt32 n) {
+00098   uInt32 retVal = 0x0;
+00099   retVal = (((n & 0xff) << 8) | ((n & 0xff00) >> 8));
+00100   return(retVal);
+00101   }
+00102 
+00103 void bcopy(const void *src, void *dest, int len) {
+00104   memcpy(dest,src,len);
+00105   }
+00106 
+00107 void bzero(void *data, int n) {
+00108   memset(data, 0, n);
+00109   }
+00110 
+00111 
+00112 int inet_aton(cp, addr)
+00113         const char *cp;
+00114         struct in_addr *addr;
+00115 {
+00116         uInt32 parts[4];
+00117         in_addr_t val;
+00118         char *c;
+00119         char *endptr;
+00120         int gotend, n;
+00121 
+00122         c = (char *)cp;
+00123         n = 0;
+00124         /*
+00125          * Run through the string, grabbing numbers until
+00126          * the end of the string, or some error
+00127          */
+00128         gotend = 0;
+00129         while (!gotend) {
+00130                 //errno = 0;
+00131                 val = strtol(c, &endptr, 0);
+00132                 kprintf("VAL: [%x]",val);
+00133 
+00134                 //if (errno == ERANGE)    /* Fail completely if it overflowed. */
+00135                 //        return (0);
+00136 
+00137                 /*
+00138                  * If the whole string is invalid, endptr will equal
+00139                  * c.. this way we can make sure someone hasn't
+00140                  * gone '.12' or something which would get past
+00141                  * the next check.
+00142                  */
+00143                 if (endptr == c)
+00144                         return (0);
+00145                 parts[n] = val;
+00146                 c = endptr;
+00147 
+00148                 /* Check the next character past the previous number's end */
+00149                 switch (*c) {
+00150                 case '.' :
+00151                         /* Make sure we only do 3 dots .. */
+00152                         if (n == 3)     /* Whoops. Quit. */
+00153                                 return (0);
+00154                         n++;
+00155                         c++;
+00156                         break;
+00157 
+00158                 case '\0':
+00159                         gotend = 1;
+00160                         break;
+00161 
+00162                 default:
+00163                        /*
+00164                         if (isspace((unsigned char)*c)) {
+00165                                 gotend = 1;
+00166                                 break;
+00167                         } else
+00168                        */
+00169                                 return (0);     /* Invalid character, so fail */
+00170                 }
+00171 
+00172         }
+00173 
+00174         /*
+00175          * Concoct the address according to
+00176          * the number of parts specified.
+00177          */
+00178 
+00179         switch (n) {
+00180         case 0:                         /* a -- 32 bits */
+00181                 /*
+00182                  * Nothing is necessary here.  Overflow checking was
+00183                  * already done in strtoul().
+00184                  */
+00185                 break;
+00186         case 1:                         /* a.b -- 8.24 bits */
+00187                 if (val > 0xffffff || parts[0] > 0xff)
+00188                         return (0);
+00189                 val |= parts[0] << 24;
+00190                 break;
+00191 
+00192         case 2:                         /* a.b.c -- 8.8.16 bits */
+00193                 if (val > 0xffff || parts[0] > 0xff || parts[1] > 0xff)
+00194                         return (0);
+00195                 val |= (parts[0] << 24) | (parts[1] << 16);
+00196                 break;
+00197 
+00198         case 3:                         /* a.b.c.d -- 8.8.8.8 bits */
+00199                 if (val > 0xff || parts[0] > 0xff || parts[1] > 0xff ||
+00200                     parts[2] > 0xff)
+00201                         return (0);
+00202                 val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8);
+00203                 break;
+00204         }
+00205 
+00206         if (addr != NULL)
+00207                 addr->s_addr = htonl(val);
+00208         return (1);
+00209 }
+00210 
+00211 /***
+00212  END
+00213  ***/
+00214   
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/net_8c.html b/doc/html/net_8c.html new file mode 100644 index 0000000..061c277 --- /dev/null +++ b/doc/html/net_8c.html @@ -0,0 +1,232 @@ + + +UbixOS V2: src/sys/lib/net.c File Reference + + + + +
+
+
+
+ +

net.c File Reference

+

+#include <ubixos/types.h>
+#include <net/sockets.h>
+#include <string.h>
+#include "lib/kprintf.h"
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + +

Typedefs

typedef uInt32 in_addr_t

Functions

void bcopy (const void *src, void *dest, int len)
void bzero (void *data, int n)
uInt32 htonl (uInt32 n)
uInt32 htons (uInt32 n)
int inet_aton (char *cp, struct in_addr *addr) const
+


Typedef Documentation

+ +
+
+ + + + +
typedef uInt32 in_addr_t
+
+
+ +

+ +

+Definition at line 84 of file net.c. +

+

+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void bcopy (const void *  src,
void *  dest,
int  len 
)
+
+
+ +

+ +

+Definition at line 103 of file net.c. +

+References memcpy(). +

+Referenced by loopif_output(), low_level_input(), and low_level_output(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void bzero (void *  data,
int  n 
)
+
+
+ +

+ +

+Definition at line 107 of file net.c. +

+References memset(). +

+

+ +

+
+ + + + + + + + + +
uInt32 htonl (uInt32  n  ) 
+
+
+ +

+ +

+Definition at line 88 of file net.c. +

+

+ +

+
+ + + + + + + + + +
uInt32 htons (uInt32  n  ) 
+
+
+ +

+ +

+Definition at line 97 of file net.c. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int inet_aton (char *  cp,
struct in_addr addr 
) const
+
+
+ +

+ +

+Definition at line 112 of file net.c. +

+References htonl, kprintf(), NULL, in_addr::s_addr, and strtol(). +

+

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/net_8h-source.html b/doc/html/net_8h-source.html new file mode 100644 index 0000000..519e269 --- /dev/null +++ b/doc/html/net_8h-source.html @@ -0,0 +1,73 @@ + + +UbixOS V2: src/sys/include/net/net.h Source File + + + + +
+
+
+
+ +

net.h

Go to the documentation of this file.
00001 /**************************************************************************************
+00002  Copyright (c) 2002 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+00006 
+00007 Redistributions of source code must retain the above copyright notice, this list of conditions, the following disclaimer and the list of authors.
+00008 Redistributions in binary form must reproduce the above copyright notice, this list of conditions, the following disclaimer and the list of authors
+00009 in the documentation and/or other materials provided with the distribution. Neither the name of the UbixOS Project nor the names of its
+00010 contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+00011 
+00012 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
+00013 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+00014 PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+00015 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+00016 GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+00017 OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+00018 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00019 
+00020  $Id$
+00021 
+00022 **************************************************************************************/
+00023 
+00024 #ifndef _NET_H
+00025 #define _NET_H
+00026 
+00027 #include <ubixos/types.h>
+00028 
+00029 int net_init();
+00030 
+00031 #endif
+00032 
+00033 /***
+00034  END
+00035  ***/
+00036 
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/net_8h.html b/doc/html/net_8h.html new file mode 100644 index 0000000..93bd14e --- /dev/null +++ b/doc/html/net_8h.html @@ -0,0 +1,72 @@ + + +UbixOS V2: src/sys/include/net/net.h File Reference + + + + +
+
+
+
+ +

net.h File Reference

+

+#include <ubixos/types.h>
+ +

+Go to the source code of this file. + + + + +

Functions

int net_init ()
+


Function Documentation

+ +
+
+ + + + + + + + +
int net_init (  ) 
+
+
+ +

+ +

+Definition at line 50 of file init.c. +

+References mem_init(), memp_init(), netMainThread(), pbuf_init(), sys_init(), and sys_thread_new(). +

+

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/netif_8h-source.html b/doc/html/netif_8h-source.html new file mode 100644 index 0000000..ae16060 --- /dev/null +++ b/doc/html/netif_8h-source.html @@ -0,0 +1,136 @@ + + +UbixOS V2: src/sys/include/net/netif.h Source File + + + + +
+
+
+
+ +

netif.h

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 #ifndef __LWIP_NETIF_H__
+00036 #define __LWIP_NETIF_H__
+00037 
+00038 #include "net/opt.h"
+00039 
+00040 #include "net/err.h"
+00041 
+00042 #include "net/ipv4/ip_addr.h"
+00043 #include "net/ipv4/inet.h"
+00044 
+00045 #include "net/pbuf.h"
+00046 
+00047 
+00048 struct netif {
+00049   struct netif *next;
+00050   uInt8 num;
+00051   struct ip_addr ip_addr;
+00052   struct ip_addr netmask;  /* netmask in network byte order */
+00053   struct ip_addr gw;
+00054   char hwaddr[6];
+00055 
+00056   /* This function is called by the network device driver
+00057      when it wants to pass a packet to the TCP/IP stack. */
+00058   err_t (* input)(struct pbuf *p, struct netif *inp);
+00059 
+00060   /* The following two fields should be filled in by the
+00061      initialization function for the device driver. */
+00062 
+00063   char name[2];
+00064   /* This function is called by the IP module when it wants
+00065      to send a packet on the interface. */
+00066   err_t (* output)(struct netif *netif, struct pbuf *p, struct ip_addr *ipaddr);
+00067   err_t (* linkoutput)(struct netif *netif, struct pbuf *p);
+00068 
+00069   /* This field can be set bu the device driver and could point
+00070      to state information for the device. */
+00071   void *state;
+00072 };
+00073 
+00074 /* The list of network interfaces. */
+00075 extern struct netif *netif_list;
+00076 extern struct netif *netif_default;
+00077 
+00078 
+00079 /* netif_init() must be called first. */
+00080 void netif_init();
+00081 
+00082 struct netif *netif_add(struct ip_addr *ipaddr, struct ip_addr *netmask,
+00083                         struct ip_addr *gw,
+00084                         void (* init)(struct netif *netif),
+00085                         err_t (* input)(struct pbuf *p, struct netif *netif));
+00086 
+00087 /* Returns a network interface given its name. The name is of the form
+00088    "et0", where the first two letters are the "name" field in the
+00089    netif structure, and the digit is in the num field in the same
+00090    structure. */
+00091 struct netif *netif_find(char *name);
+00092 
+00093 void netif_set_default(struct netif *netif);
+00094 
+00095 void netif_set_ipaddr(struct netif *netif, struct ip_addr *ipaddr);
+00096 void netif_set_netmask(struct netif *netif, struct ip_addr *netmast);
+00097 void netif_set_gw(struct netif *netif, struct ip_addr *gw);
+00098 
+00099 #endif /* __LWIP_NETIF_H__ */
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/netif_8h.html b/doc/html/netif_8h.html new file mode 100644 index 0000000..83a6616 --- /dev/null +++ b/doc/html/netif_8h.html @@ -0,0 +1,303 @@ + + +UbixOS V2: src/sys/include/net/netif.h File Reference + + + + +
+
+
+
+ +

netif.h File Reference

+

+#include "net/opt.h"
+#include "net/err.h"
+#include "net/ipv4/ip_addr.h"
+#include "net/ipv4/inet.h"
+#include "net/pbuf.h"
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  netif

Functions

netifnetif_add (struct ip_addr *ipaddr, struct ip_addr *netmask, struct ip_addr *gw, void(*init)(struct netif *netif), err_t(*input)(struct pbuf *p, struct netif *netif))
netifnetif_find (char *name)
void netif_init ()
void netif_set_default (struct netif *netif)
void netif_set_gw (struct netif *netif, struct ip_addr *gw)
void netif_set_ipaddr (struct netif *netif, struct ip_addr *ipaddr)
void netif_set_netmask (struct netif *netif, struct ip_addr *netmast)

Variables

netifnetif_default
netifnetif_list
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
struct netif* netif_add (struct ip_addr ipaddr,
struct ip_addr netmask,
struct ip_addr gw,
void(*)(struct netif *netif init,
err_t(*)(struct pbuf *p, struct netif *netif input 
)
+
+
+ +

+ +

+Referenced by netMainThread(). +

+

+ +

+
+ + + + + + + + + +
struct netif* netif_find (char *  name  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
void netif_init (  ) 
+
+
+ +

+ +

+Referenced by netMainThread(). +

+

+ +

+
+ + + + + + + + + +
void netif_set_default (struct netif netif  ) 
+
+
+ +

+ +

+Referenced by netMainThread(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void netif_set_gw (struct netif netif,
struct ip_addr gw 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void netif_set_ipaddr (struct netif netif,
struct ip_addr ipaddr 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void netif_set_netmask (struct netif netif,
struct ip_addr netmast 
)
+
+
+ +

+ +

+

+


Variable Documentation

+ +
+
+ + + + +
struct netif* netif_default
+
+
+ +

+ +

+

+ +

+
+ + + + +
struct netif* netif_list
+
+
+ +

+ +

+

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/null_8c-source.html b/doc/html/null_8c-source.html new file mode 100644 index 0000000..04b6acb --- /dev/null +++ b/doc/html/null_8c-source.html @@ -0,0 +1,41 @@ + + +UbixOS V2: src/sys/compile/null.c Source File + + + + +
+
+
+
+ +

null.c

Go to the documentation of this file.
00001 /* 
+00002 Sat Dec  2 18:05:12 EST 2006
+00003 ser
+00004  */
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/null_8c.html b/doc/html/null_8c.html new file mode 100644 index 0000000..b79dc55 --- /dev/null +++ b/doc/html/null_8c.html @@ -0,0 +1,44 @@ + + +UbixOS V2: src/sys/compile/null.c File Reference + + + + +
+
+
+
+ +

null.c File Reference

+

+ +

+Go to the source code of this file. + +
+


Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ogDisplay__UbixOS_8h-source.html b/doc/html/ogDisplay__UbixOS_8h-source.html new file mode 100644 index 0000000..992ae09 --- /dev/null +++ b/doc/html/ogDisplay__UbixOS_8h-source.html @@ -0,0 +1,124 @@ + + +UbixOS V2: src/sys/include/sde/ogDisplay_UbixOS.h Source File + + + + +
+
+
+
+ +

ogDisplay_UbixOS.h

Go to the documentation of this file.
00001 #ifndef OGDISPLAY_UBIXOS_H
+00002 #define OGDISPLAY_UBIXOS_H
+00003 
+00004 #include <objgfx40/objgfx40.h>
+00005 
+00006 struct ogModeInfo {
+00007     uInt16 modeAttributes     __attribute__((packed));
+00008     uInt8  windowAFlags       __attribute__((packed));
+00009     uInt8  windowBFlags       __attribute__((packed));
+00010     uInt16 granularity        __attribute__((packed));
+00011     uInt16 windowSize         __attribute__((packed));
+00012     uInt16 windowASeg         __attribute__((packed));
+00013     uInt16 windowBSeg         __attribute__((packed));
+00014     void*  bankSwitch         __attribute__((packed));
+00015     uInt16 bytesPerLine       __attribute__((packed));
+00016     uInt16 xRes               __attribute__((packed));
+00017     uInt16 yRes               __attribute__((packed));
+00018     uInt8  charWidth          __attribute__((packed));
+00019     uInt8  charHeight         __attribute__((packed));
+00020     uInt8  numBitPlanes       __attribute__((packed));
+00021     uInt8  bitsPerPixel       __attribute__((packed));
+00022     uInt8  numberOfBanks      __attribute__((packed));
+00023     uInt8  memoryModel        __attribute__((packed));
+00024     uInt8  bankSize           __attribute__((packed));
+00025     uInt8  numOfImagePages    __attribute__((packed));
+00026     uInt8  reserved           __attribute__((packed));
+00027     // Direct colour fields (required for Direct/6 and YUV/7 memory models
+00028     uInt8  redMaskSize        __attribute__((packed));
+00029     uInt8  redFieldPosition   __attribute__((packed));
+00030     uInt8  greenMaskSize      __attribute__((packed));
+00031     uInt8  greenFieldPosition __attribute__((packed));
+00032     uInt8  blueMaskSize       __attribute__((packed));
+00033     uInt8  blueFieldPosition  __attribute__((packed));
+00034     uInt8  alphaMaskSize      __attribute__((packed));
+00035     uInt8  alphaFieldPosition __attribute__((packed));
+00036     uInt8  directColourMode   __attribute__((packed));
+00037     // VESA 2.0 specific fields
+00038     uInt32 physBasePtr        __attribute__((packed));
+00039     void*  offScreenMemOffset __attribute__((packed));
+00040     uInt16 offScreenMemSize   __attribute__((packed));
+00041     uInt8  paddington[461]    __attribute__((packed));
+00042 };
+00043 
+00044 struct ogVESAInfo {
+00045     char    VBESignature[4]   __attribute__((packed));
+00046     uInt8   minVersion        __attribute__((packed));
+00047     uInt8   majVersion        __attribute__((packed));
+00048     uInt32  OEMStringPtr      __attribute__((packed));
+00049     uInt32  capabilities      __attribute__((packed));
+00050     uInt32  videoModePtr      __attribute__((packed));
+00051     uInt16  totalMemory       __attribute__((packed));
+00052     // VESA 2.0 specific fields
+00053     uInt16  OEMSoftwareRev    __attribute__((packed));
+00054     uInt32  OEMVendorNamePtr  __attribute__((packed));
+00055     uInt32  OEMProductNamePtr __attribute__((packed));
+00056     uInt32  OEMProductRevPtr  __attribute__((packed));
+00057     uInt8   paddington[474]   __attribute__((packed));
+00058 };
+00059 
+00060 
+00061 class ogDisplay_UbixOS : public ogSurface {
+00062  protected:
+00063   void *         pages[2];
+00064   uInt32         activePage;
+00065   uInt32         visualPage;
+00066   ogVESAInfo *   VESAInfo;
+00067   ogModeInfo *   modeInfo;
+00068 
+00069   uInt16         FindMode(uInt32, uInt32, uInt32);
+00070   void           GetModeInfo(uInt16);
+00071   void           GetVESAInfo(void);
+00072   void           SetMode(uInt16);
+00073   void           SetPal(void);
+00074  public:
+00075                  ogDisplay_UbixOS(void);
+00076   virtual bool   ogAlias(ogSurface&, uInt32, uInt32, uInt32, uInt32);
+00077   virtual bool   ogClone(ogSurface&);
+00078   virtual void   ogCopyPalette(ogSurface&);
+00079   virtual bool   ogCreate(uInt32, uInt32, ogPixelFmt);
+00080   virtual bool   ogLoadPalette(const char *);
+00081   virtual void   ogSetPalette(const ogRGBA8[]);
+00082   virtual void   ogSetPalette(uInt8, uInt8, uInt8, uInt8);
+00083   virtual void   ogSetPalette(uInt8, uInt8, uInt8, uInt8, uInt8);
+00084   virtual        ~ogDisplay_UbixOS(void);
+00085 }; // ogDisplay_UbixOS
+00086 
+00087 #endif
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ogDisplay__UbixOS_8h.html b/doc/html/ogDisplay__UbixOS_8h.html new file mode 100644 index 0000000..4f4db23 --- /dev/null +++ b/doc/html/ogDisplay__UbixOS_8h.html @@ -0,0 +1,52 @@ + + +UbixOS V2: src/sys/include/sde/ogDisplay_UbixOS.h File Reference + + + + +
+
+
+
+ +

ogDisplay_UbixOS.h File Reference

+

+#include <objgfx40/objgfx40.h>
+ +

+Go to the source code of this file. + + + + + + + + +

Data Structures

class  ogDisplay_UbixOS
struct  ogModeInfo
struct  ogVESAInfo
+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ogDisplay__VESA_8h-source.html b/doc/html/ogDisplay__VESA_8h-source.html new file mode 100644 index 0000000..a1ab4bd --- /dev/null +++ b/doc/html/ogDisplay__VESA_8h-source.html @@ -0,0 +1,132 @@ + + +UbixOS V2: src/sys/include/objgfx/ogDisplay_VESA.h Source File + + + + +
+
+
+
+ +

ogDisplay_VESA.h

Go to the documentation of this file.
00001 #ifndef OGDISPLAY_VESA_H
+00002 #define OGDISPLAY_VESA_H
+00003 
+00004 #include "objgfx30.h"
+00005 
+00006 struct TMode_Rec {
+00007     uInt16 ModeAttributes     __attribute__((packed));
+00008     uInt8  WindowAFlags       __attribute__((packed));
+00009     uInt8  WindowBFlags       __attribute__((packed));
+00010     uInt16 Granularity        __attribute__((packed));
+00011     uInt16 WindowSize         __attribute__((packed));
+00012     uInt16 WindowASeg         __attribute__((packed));
+00013     uInt16 WindowBSeg         __attribute__((packed));
+00014     void*  BankSwitch         __attribute__((packed));
+00015     uInt16 BytesPerLine       __attribute__((packed));
+00016     uInt16 xRes               __attribute__((packed));
+00017     uInt16 yRes               __attribute__((packed));
+00018     uInt8  CharWidth          __attribute__((packed));
+00019     uInt8  CharHeight         __attribute__((packed));
+00020     uInt8  NumBitPlanes       __attribute__((packed));
+00021     uInt8  BitsPerPixel       __attribute__((packed));
+00022     uInt8  NumberOfBanks      __attribute__((packed));
+00023     uInt8  MemoryModel        __attribute__((packed));
+00024     uInt8  BankSize           __attribute__((packed));
+00025     uInt8  NumOfImagePages    __attribute__((packed));
+00026     uInt8  Reserved           __attribute__((packed));
+00027     // Direct colour fields (required for Direct/6 and YUV/7 memory models
+00028     uInt8  RedMaskSize        __attribute__((packed));
+00029     uInt8  RedFieldPosition   __attribute__((packed));
+00030     uInt8  GreenMaskSize      __attribute__((packed));
+00031     uInt8  GreenFieldPosition __attribute__((packed));
+00032     uInt8  BlueMaskSize       __attribute__((packed));
+00033     uInt8  BlueFieldPosition  __attribute__((packed));
+00034     uInt8  AlphaMaskSize      __attribute__((packed));
+00035     uInt8  AlphaFieldPosition __attribute__((packed));
+00036     uInt8  DirectColourMode   __attribute__((packed));
+00037     // VESA 2.0 specific fields
+00038     uInt32 physBasePtr        __attribute__((packed));
+00039     void*  OffScreenMemOffset __attribute__((packed));
+00040     uInt16 OffScreenMemSize   __attribute__((packed));
+00041     uInt8  paddington[461]    __attribute__((packed));
+00042 };
+00043 
+00044 struct TVESA_Rec {
+00045     char    VBESignature[4]   __attribute__((packed));
+00046     uInt8   minVersion        __attribute__((packed));
+00047     uInt8   majVersion        __attribute__((packed));
+00048     uInt32  OEMStringPtr      __attribute__((packed));
+00049     uInt32  Capabilities      __attribute__((packed));
+00050     uInt32  VideoModePtr      __attribute__((packed));
+00051     uInt16  TotalMemory       __attribute__((packed));
+00052     // VESA 2.0 specific fields
+00053     uInt16  OEMSoftwareRev    __attribute__((packed));
+00054     uInt32  OEMVendorNamePtr  __attribute__((packed));
+00055     uInt32  OEMProductNamePtr __attribute__((packed));
+00056     uInt32  OEMProductRevPtr  __attribute__((packed));
+00057     uInt8   paddington[474]   __attribute__((packed));
+00058 };
+00059 
+00060 class ogDisplay_VESA : public ogSurface {
+00061  protected:
+00062   uInt16       ScreenSelector;
+00063   TVESA_Rec*   VESARec;
+00064   TMode_Rec*   ModeRec;
+00065   bool         InGraphics;
+00066   uInt16       findMode(uInt32, uInt32, uInt32);
+00067   void         getModeInfo(uInt16);
+00068   void         getVESAInfo(void);
+00069   void         setMode(uInt16);
+00070   virtual uInt32 rawGetPixel(uInt32, uInt32);  
+00071   virtual void rawSetPixel(uInt32, uInt32, uInt32);
+00072   virtual void rawLine(uInt32, uInt32, uInt32, uInt32, uInt32);
+00073   void         setPal(void);
+00074  public:
+00075                ogDisplay_VESA(void);
+00076   virtual bool ogAvail(void);
+00077   virtual bool ogAlias(ogSurface&, uInt32, uInt32, uInt32, uInt32);
+00078   virtual void ogClear(uInt32);
+00079   virtual bool ogClone(ogSurface&);
+00080   virtual void ogCopyLineTo(uInt32, uInt32, const void *, uInt32);
+00081   virtual void ogCopyLineFrom(uInt32, uInt32, void *, uInt32);
+00082   virtual void ogCopyPal(ogSurface&);
+00083   virtual bool ogCreate(uInt32, uInt32, ogPixelFmt);
+00084   virtual uInt32 ogGetPixel(int32, int32);
+00085   virtual void * ogGetPtr(uInt32, uInt32);
+00086   virtual void ogHLine(int32, int32, int32, uInt32);
+00087   virtual bool ogLoadPal(const char *);  
+00088   virtual void ogSetPixel(int32, int32, uInt32);
+00089   virtual void ogSetRGBPalette(uInt8, uInt8, uInt8, uInt8);  
+00090   virtual void ogVFlip(void);
+00091   virtual void ogVLine(int32, int32, int32, uInt32);
+00092   virtual      ~ogDisplay_VESA(void);
+00093 }; // ogDisplay_VESA
+00094 
+00095 #endif
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ogDisplay__VESA_8h.html b/doc/html/ogDisplay__VESA_8h.html new file mode 100644 index 0000000..d26ff8d --- /dev/null +++ b/doc/html/ogDisplay__VESA_8h.html @@ -0,0 +1,52 @@ + + +UbixOS V2: src/sys/include/objgfx/ogDisplay_VESA.h File Reference + + + + +
+
+
+
+ +

ogDisplay_VESA.h File Reference

+

+#include "objgfx30.h"
+ +

+Go to the source code of this file. + + + + + + + + +

Data Structures

class  ogDisplay_VESA
struct  TMode_Rec
struct  TVESA_Rec
+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ogprintf_8cc-source.html b/doc/html/ogprintf_8cc-source.html new file mode 100644 index 0000000..f975a46 --- /dev/null +++ b/doc/html/ogprintf_8cc-source.html @@ -0,0 +1,161 @@ + + +UbixOS V2: src/sys/lib/ogprintf.cc Source File + + + + +
+
+
+
+ +

ogprintf.cc

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005 Redistribution and use in source and binary forms, with or without modification, are
+00006 permitted provided that the following conditions are met:
+00007 
+00008 Redistributions of source code must retain the above copyright notice, this list of
+00009 conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010 form must reproduce the above copyright notice, this list of conditions, the following
+00011 disclaimer and the list of authors in the documentation and/or other materials provided
+00012 with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013 contributors may be used to endorse or promote products derived from this software
+00014 without specific prior written permission.
+00015 
+00016 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019 THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021 OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023 TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <objgfx40/objgfx40.h>
+00031 #include <objgfx40/ogFont.h>
+00032 #include <sde/ogDisplay_UbixOS.h>
+00033 
+00034 extern "C" {
+00035 
+00036 #include <ubixos/vitals.h>
+00037 
+00038 
+00039 static int screenRow  = 0x0;
+00040 static int screenCol  = 0x1;
+00041   
+00042 int ogPrintf(char *s) {
+00043   int i = 0x0;
+00044   int bufHeight;
+00045   ogSurface *screen = (ogDisplay_UbixOS *)systemVitals->screen;
+00046   ogBitFont *font   = (ogBitFont *)systemVitals->font; 
+00047 
+00048 
+00049   while ('\0' != s[i]) {
+00050     switch (s[i]) {
+00051     case '\t':
+00052       screenCol += 3;
+00053       break;
+00054     case '\b':
+00055       if (screenCol > 0) --screenCol;
+00056     case '\n':
+00057       screenCol = 0;
+00058 
+00059       bufHeight = ((screen->ogGetMaxY()+1) / font->GetHeight())-1;
+00060       if (screenRow < bufHeight) 
+00061         ++screenRow;
+00062       else {
+00063         screen->ogCopyBuf(0, 0,
+00064                           *screen,
+00065                           0, font->GetHeight(),
+00066                           screen->ogGetMaxX(), screen->ogGetMaxY());
+00067         screen->ogFillRect(0, bufHeight * font->GetHeight()+1,
+00068                            screen->ogGetMaxX(), screen->ogGetMaxY(),
+00069                            screen->ogPack(122, 140, 163));
+00070       }
+00071       break;
+00072     default:
+00073       font->PutChar(*screen,
+00074                     screenCol * font->GetWidth(),
+00075                     screenRow * font->GetHeight(),
+00076                     s[i]);
+00077       break;
+00078     }                           /* switch */
+00079     ++screenCol;
+00080     ++i;
+00081   } /* while */
+00082 
+00083   return 0;
+00084 } // ogPrintf
+00085 
+00086 }
+00087 
+00088 /***
+00089  $Log$
+00090  Revision 1.1.1.1  2006/06/01 12:46:16  reddawg
+00091  ubix2
+00092 
+00093  Revision 1.2  2005/10/12 00:13:37  reddawg
+00094  Removed
+00095 
+00096  Revision 1.1.1.1  2005/09/26 17:24:13  reddawg
+00097  no message
+00098 
+00099  Revision 1.7  2004/07/20 22:58:33  reddawg
+00100  retiring to the laptop for the night must sync in work to resume from there
+00101 
+00102  Revision 1.6  2004/07/17 14:24:22  reddawg
+00103  compile: changes to the way we link the kernel should prevent future errors
+00104 
+00105  Revision 1.5  2004/05/23 23:30:34  reddawg
+00106  Fixens
+00107 
+00108  Revision 1.4  2004/05/23 01:40:19  reddawg
+00109  Spinlock
+00110 
+00111  Revision 1.3  2004/05/19 17:09:50  flameshadow
+00112  chg: Undid previous renaming. This now restores me as the EOOUIAD.
+00113 
+00114  Revision 1.2  2004/04/26 12:56:01  reddawg
+00115  Made src/sys/sde Copy and Make the ogPixelFormat.cpp
+00116 
+00117  Revision 1.1.1.1  2004/04/15 12:07:10  reddawg
+00118  UbixOS v1.0
+00119 
+00120  Revision 1.19  2004/04/13 16:36:33  reddawg
+00121  Changed our copyright, it is all now under a BSD-Style license
+00122 
+00123  END
+00124  ***/
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ogprintf_8cc.html b/doc/html/ogprintf_8cc.html new file mode 100644 index 0000000..c0c1725 --- /dev/null +++ b/doc/html/ogprintf_8cc.html @@ -0,0 +1,116 @@ + + +UbixOS V2: src/sys/lib/ogprintf.cc File Reference + + + + +
+
+
+
+ +

ogprintf.cc File Reference

+

+#include <objgfx40/objgfx40.h>
+#include <objgfx40/ogFont.h>
+#include <sde/ogDisplay_UbixOS.h>
+#include <ubixos/vitals.h>
+ +

+Go to the source code of this file. + + + + + + + + + +

Functions

int ogPrintf (char *s)

Variables

static int screenCol = 0x1
static int screenRow = 0x0
+


Function Documentation

+ +
+
+ + + + + + + + + +
int ogPrintf (char *  s  ) 
+
+
+ +

+ +

+Definition at line 42 of file ogprintf.cc. +

+References systemVitals. +

+

+


Variable Documentation

+ +
+
+ + + + +
int screenCol = 0x1 [static]
+
+
+ +

+ +

+Definition at line 40 of file ogprintf.cc. +

+

+ +

+
+ + + + +
int screenRow = 0x0 [static]
+
+
+ +

+ +

+Definition at line 39 of file ogprintf.cc. +

+

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/opt_8h-source.html b/doc/html/opt_8h-source.html new file mode 100644 index 0000000..f7e6982 --- /dev/null +++ b/doc/html/opt_8h-source.html @@ -0,0 +1,134 @@ + + +UbixOS V2: src/sys/include/net/opt.h Source File + + + + +
+
+
+
+ +

opt.h

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 #ifndef __LWIP_OPT_H__
+00036 #define __LWIP_OPT_H__
+00037 
+00038 #include "net/lwipopts.h"
+00039 
+00040 /* Define some handy default values for configuration parameters. */
+00041 
+00042 #ifndef ICMP_TTL
+00043 #define ICMP_TTL                255
+00044 #endif
+00045 
+00046 #ifndef UDP_TTL
+00047 #define UDP_TTL                 255
+00048 #endif
+00049 
+00050 #ifndef TCP_TTL
+00051 #define TCP_TTL                 255
+00052 #endif
+00053 
+00054 #ifndef TCP_MSS
+00055 #define TCP_MSS                 128 /* A *very* conservative default. */
+00056 #endif
+00057 
+00058 #ifndef TCP_WND
+00059 #define TCP_WND                 2048
+00060 #endif 
+00061 
+00062 #ifndef TCP_MAXRTX
+00063 #define TCP_MAXRTX              12
+00064 #endif
+00065 
+00066 #ifndef TCP_SYNMAXRTX
+00067 #define TCP_SYNMAXRTX           6
+00068 #endif
+00069 
+00070 #ifndef MEM_ALIGNMENT
+00071 #define MEM_ALIGNMENT           1
+00072 #endif
+00073 
+00074 #ifndef PBUF_POOL_SIZE
+00075 #define PBUF_POOL_SIZE          16
+00076 #endif
+00077 
+00078 #ifndef PBUF_POOL_BUFSIZE
+00079 #define PBUF_POOL_BUFSIZE       128
+00080 #endif
+00081 
+00082 #ifndef PBUF_LINK_HLEN
+00083 #define PBUF_LINK_HLEN          0
+00084 #endif
+00085 
+00086 #ifndef LWIP_UDP
+00087 #define LWIP_UDP                1
+00088 #endif
+00089 
+00090 #ifndef LWIP_TCP
+00091 #define LWIP_TCP                1
+00092 #endif
+00093 
+00094 #endif /* __LWIP_OPT_H__ */
+00095 
+00096 
+00097 
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/opt_8h.html b/doc/html/opt_8h.html new file mode 100644 index 0000000..73b3629 --- /dev/null +++ b/doc/html/opt_8h.html @@ -0,0 +1,294 @@ + + +UbixOS V2: src/sys/include/net/opt.h File Reference + + + + +
+
+
+
+ +

opt.h File Reference

+

+#include "net/lwipopts.h"
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Defines

#define ICMP_TTL   255
#define LWIP_TCP   1
#define LWIP_UDP   1
#define MEM_ALIGNMENT   1
#define PBUF_LINK_HLEN   0
#define PBUF_POOL_BUFSIZE   128
#define PBUF_POOL_SIZE   16
#define TCP_MAXRTX   12
#define TCP_MSS   128
#define TCP_SYNMAXRTX   6
#define TCP_TTL   255
#define TCP_WND   2048
#define UDP_TTL   255
+


Define Documentation

+ +
+
+ + + + +
#define ICMP_TTL   255
+
+
+ +

+ +

+Definition at line 43 of file opt.h. +

+

+ +

+
+ + + + +
#define LWIP_TCP   1
+
+
+ +

+ +

+Definition at line 91 of file opt.h. +

+

+ +

+
+ + + + +
#define LWIP_UDP   1
+
+
+ +

+ +

+Definition at line 87 of file opt.h. +

+

+ +

+
+ + + + +
#define MEM_ALIGNMENT   1
+
+
+ +

+ +

+Definition at line 71 of file opt.h. +

+

+ +

+
+ + + + +
#define PBUF_LINK_HLEN   0
+
+
+ +

+ +

+Definition at line 83 of file opt.h. +

+

+ +

+
+ + + + +
#define PBUF_POOL_BUFSIZE   128
+
+
+ +

+ +

+Definition at line 79 of file opt.h. +

+

+ +

+
+ + + + +
#define PBUF_POOL_SIZE   16
+
+
+ +

+ +

+Definition at line 75 of file opt.h. +

+

+ +

+
+ + + + +
#define TCP_MAXRTX   12
+
+
+ +

+ +

+Definition at line 63 of file opt.h. +

+

+ +

+
+ + + + +
#define TCP_MSS   128
+
+
+ +

+ +

+Definition at line 55 of file opt.h. +

+

+ +

+
+ + + + +
#define TCP_SYNMAXRTX   6
+
+
+ +

+ +

+Definition at line 67 of file opt.h. +

+

+ +

+
+ + + + +
#define TCP_TTL   255
+
+
+ +

+ +

+Definition at line 51 of file opt.h. +

+

+ +

+
+ + + + +
#define TCP_WND   2048
+
+
+ +

+ +

+Definition at line 59 of file opt.h. +

+

+ +

+
+ + + + +
#define UDP_TTL   255
+
+
+ +

+ +

+Definition at line 47 of file opt.h. +

+

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/page__fault_8S-source.html b/doc/html/page__fault_8S-source.html new file mode 100644 index 0000000..ac75144 --- /dev/null +++ b/doc/html/page__fault_8S-source.html @@ -0,0 +1,97 @@ + + +UbixOS V2: src/sys/vmm/page_fault.S Source File + + + + +
+
+
+
+ +

page_fault.S

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 /*
+00031    Page fault wrapper this will aquire some values we need for later use
+00032  */
+00033 
+00034 .globl _vmm_pageFault
+00035 .text
+00036 .code32
+00037 _vmm_pageFault:
+00038   xchgl %eax,(%esp)   /* Save EAX                                         */
+00039   movl  4(%esp),%eax  /* Move EIP into EAX to use later                   */
+00040   pushl %ebx          /* Save EBX                                         */
+00041   movl  20(%esp),%ebx /* Save ESP for ring 3 to use later                 */ 
+00042   pushl %ecx          /* Save ECX,EDX                                     */
+00043   pushl %edx             
+00044   push  %ebx          /* Push ESP                                         */
+00045   push  %eax          /* Push EIP                                         */
+00046   movl  %cr2,%eax     /* Push the faulted address                         */
+00047   pushl %eax
+00048   sti                 /* Turn interrupts back on we are now entrant safe  */
+00049   call  vmm_pageFault /* Call our page fault handler                      */
+00050   addl  $0xC,%esp     /* Adjust the stack to compensate for pushed values */
+00051   popl  %edx          /* Restore EAX,EBX,ECX,EDX                          */
+00052   popl  %ecx
+00053   popl  %ebx
+00054   popl  %eax
+00055   iret                /* Return from the interrupt                        */        
+00056 
+00057 
+00058 /***
+00059  END
+00060  ***/
+

Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/page__fault_8S.html b/doc/html/page__fault_8S.html new file mode 100644 index 0000000..74e2580 --- /dev/null +++ b/doc/html/page__fault_8S.html @@ -0,0 +1,138 @@ + + +UbixOS V2: src/sys/vmm/page_fault.S File Reference + + + + +
+
+
+
+ +

page_fault.S File Reference

+

+ +

+Go to the source code of this file. + + + + + + + + + + + +

Functions

globl _vmm_pageFault text
+code32 esp 
movl (%esp)

Variables

globl _vmm_pageFault text
+code32 
_vmm_pageFault
globl _vmm_pageFault text
+code32 esp eax pushl ebx ebx
+pushl ecx pushl edx push ebx
+push eax movl 
cr2
globl _vmm_pageFault text
+code32 esp eax pushl ebx ebx
+pushl ecx pushl edx push ebx
+push eax movl eax pushl eax
+sti call vmm_pageFault addl 
xC
+


Function Documentation

+ +
+
+ + + + + + + + + +
globl _vmm_pageFault text code32 esp movl ( esp  ) 
+
+
+ +

+ +

+

+


Variable Documentation

+ +
+
+ + + + +
globl _vmm_pageFault text code32 _vmm_pageFault
+
+
+ +

+ +

+Definition at line 38 of file page_fault.S. +

+Referenced by idt_init(), and vmm_pagingInit(). +

+

+ +

+
+ + + + +
globl _vmm_pageFault text code32 esp eax pushl ebx ebx pushl ecx pushl edx push ebx push eax movl cr2
+
+
+ +

+ +

+Definition at line 46 of file page_fault.S. +

+

+ +

+
+ + + + +
globl _vmm_pageFault text code32 esp eax pushl ebx ebx pushl ecx pushl edx push ebx push eax movl eax pushl eax sti call vmm_pageFault addl xC
+
+
+ +

+ +

+Definition at line 46 of file page_fault.S. +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/pagefault_8c-source.html b/doc/html/pagefault_8c-source.html new file mode 100644 index 0000000..3d0d388 --- /dev/null +++ b/doc/html/pagefault_8c-source.html @@ -0,0 +1,248 @@ + + +UbixOS V2: src/sys/vmm/pagefault.c Source File + + + + +
+
+
+
+ +

pagefault.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005 Redistribution and use in source and binary forms, with or without modification, are
+00006 permitted provided that the following conditions are met:
+00007 
+00008 Redistributions of source code must retain the above copyright notice, this list of
+00009 conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010 form must reproduce the above copyright notice, this list of conditions, the following
+00011 disclaimer and the list of authors in the documentation and/or other materials provided
+00012 with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013 contributors may be used to endorse or promote products derived from this software
+00014 without specific prior written permission.
+00015 
+00016 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019 THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021 OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023 TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <vmm/vmm.h>
+00031 #include <ubixos/sched.h>
+00032 #include <ubixos/kpanic.h>
+00033 #include <ubixos/spinlock.h>
+00034 #include <lib/kprintf.h>
+00035 
+00036 static spinLock_t pageFaultSpinLock = SPIN_LOCK_INITIALIZER;
+00037 
+00038 /*****************************************************************************************
+00039 
+00040  Function:    void vmm_pageFault(uInt32 memAddr,uInt32 eip,uInt32 esp);
+00041  Description: This is the page fault handler, it will handle COW and trap all other
+00042               exceptions and segfault the thread.
+00043 
+00044  Notes:
+00045  
+00046 07/30/02 - Fixed COW However I Need To Think Of A Way To Impliment
+00047            A Paging System Also Start To Add Security Levels
+00048     
+00049 07/27/04 - Added spin locking to ensure that we are thread safe. I know that spining a 
+00050            cpu is a waste of resources but for now it prevents errors.
+00051 
+00052 *****************************************************************************************/
+00053 void vmm_pageFault(uInt32 memAddr,uInt32 eip,uInt32 esp) {
+00054   uInt32 i = 0x0, pageTableIndex = 0x0,pageDirectoryIndex = 0x0;
+00055   uInt32 *pageDir = 0x0,*pageTable = 0x0;
+00056   uInt32 *src = 0x0,*dst = 0x0;
+00057   
+00058   /* Try to aquire lock otherwise spin till we do */
+00059   spinLock(&pageFaultSpinLock);
+00060   
+00061   /* Set page dir pointer to the address of the visable page directory */
+00062   pageDir = (uInt32 *)parentPageDirAddr;
+00063 
+00064   /* UBU - This is a temp panic for 0x0 read write later on I will handle this differently */
+00065   if (memAddr == 0x0) {
+00066     kprintf("Segfault At Address: [0x%X][0x%X][%i][0x%X]\n",memAddr,esp,_current->id,eip);
+00067     kpanic("Error We Wrote To 0x0\n");
+00068     }
+00069   
+00070   /* Calculate The Page Directory Index */
+00071   pageDirectoryIndex = (memAddr >> 22);
+00072   
+00073   /* Calculate The Page Table Index     */
+00074   pageTableIndex = ((memAddr >> 12) & 0x3FF);
+00075 
+00076   /* UBU - This is a temporary routine for handling access to a page of a non existant page table */
+00077   if (pageDir[pageDirectoryIndex] == 0x0) {
+00078     kprintf("Segfault At Address: [0x%X][0x%X][%i][0x%X], Not A Valid Page Table\n",memAddr,esp,_current->id,eip);
+00079     spinUnlock(&pageFaultSpinLock);
+00080     endTask(_current->id);
+00081     }
+00082   else {
+00083     /* Set pageTable To Point To Virtual Address Of Page Table */
+00084     pageTable = (uInt32 *)(tablesBaseAddress + (0x1000 * pageDirectoryIndex));
+00085     
+00086     /* Test if this is a COW on page */
+00087     if (((uInt32)pageTable[pageTableIndex] & PAGE_COW) == PAGE_COW) {
+00088       /* Set Src To Base Address Of Page To Copy */
+00089       src = (uInt32 *)(memAddr & 0xFFFFF000);
+00090       /* Allocate A Free Page For Destination */
+00091       /* USE vmInfo */
+00092       dst = (uInt32 *) vmmGetFreeVirtualPage(_current->id,1,0x1);
+00093       /* Copy Memory */
+00094       for (i=0;i<pageEntries;i++) {
+00095         dst[i] = src[i];
+00096         }
+00097       /* Adjust The COW Counter For Physical Page */
+00098       adjustCowCounter(((uInt32)pageTable[pageTableIndex] & 0xFFFFF000),-1);
+00099       /* Remap In New Page */
+00100       pageTable[pageTableIndex] = (uInt32)(vmm_getPhysicalAddr((uInt32)dst)|(memAddr & 0xFFF));
+00101       /* Unlink From Memory Map Allocated Page */
+00102       vmmUnmapPage((uInt32)dst,1);
+00103       }
+00104     else if (pageTable[pageTableIndex] != 0x0) {
+00105       kprintf("Security failed pagetable not user permission\n");
+00106       kprintf("pageTable: [0x%X:0x%X:0x%X:0x%X]\n",pageTable[pageTableIndex],pageTableIndex,pageDirectoryIndex,eip);
+00107       kprintf("Segfault At Address: [0x%X][0x%X][%i][0x%X] Non Mapped\n",memAddr,esp,_current->id,eip);
+00108       spinUnlock(&pageFaultSpinLock);
+00109       endTask(_current->id);
+00110       }
+00111     else if (memAddr < (_current->td.vm_dsize + _current->td.vm_daddr)) {
+00112       pageTable[pageTableIndex] = (uInt32)vmmFindFreePage(_current->id) | PAGE_DEFAULT;
+00113       }
+00114     else {
+00115       spinUnlock(&pageFaultSpinLock);
+00116       /* Need To Create A Routine For Attempting To Access Non Mapped Memory */
+00117       kprintf("Segfault At Address: [0x%X][0x%X][%i][0x%X] Non Mapped\n",memAddr,esp,_current->id,eip);
+00118       kprintf("Out Of Stack Space: [0x%X]\n",memAddr & 0xFF0000);
+00119       spinUnlock(&pageFaultSpinLock);
+00120       endTask(_current->id);
+00121       }
+00122     }
+00123   asm volatile(
+00124     "movl %cr3,%eax\n"
+00125     "movl %eax,%cr3\n"
+00126     );
+00127   
+00128   /* Release the spin lock */
+00129   spinUnlock(&pageFaultSpinLock);
+00130   return;
+00131   }
+00132   
+00133 /***
+00134  $Log$
+00135  Revision 1.5  2006/12/01 05:12:35  reddawg
+00136  We're almost there... :)
+00137 
+00138  Revision 1.4  2006/11/21 13:25:49  reddawg
+00139  A handful of changes ;)
+00140 
+00141  Revision 1.3  2006/11/06 19:10:12  reddawg
+00142  Lots Of Updates... Still having issues with brk();
+00143 
+00144  Revision 1.2  2006/10/31 20:44:19  reddawg
+00145  Lots of changes
+00146 
+00147  Revision 1.1.1.1  2006/06/01 12:46:13  reddawg
+00148  ubix2
+00149 
+00150  Revision 1.2  2005/10/12 00:13:38  reddawg
+00151  Removed
+00152 
+00153  Revision 1.1.1.1  2005/09/26 17:24:52  reddawg
+00154  no message
+00155 
+00156  Revision 1.14  2004/08/25 22:02:41  reddawg
+00157  task switching - We now are using software switching to be consistant with the rest of the world because all of this open source freaks gave me a hard time about something I liked. There doesn't seem to be any gain in performance but it is working fine and flawlessly
+00158 
+00159  Revision 1.13  2004/08/24 05:24:37  reddawg
+00160  TCA Is A BONER!!!!
+00161 
+00162  Revision 1.12  2004/08/14 11:23:03  reddawg
+00163  Changes
+00164 
+00165  Revision 1.11  2004/07/28 15:05:43  reddawg
+00166  Major:
+00167    Pages now have strict security enforcement.
+00168    Many null dereferences have been resolved.
+00169    When apps loaded permissions set for pages rw and ro
+00170 
+00171  Revision 1.10  2004/07/28 00:22:56  reddawg
+00172  bah
+00173 
+00174  Revision 1.9  2004/07/28 00:17:05  reddawg
+00175  Major:
+00176    Disconnected page 0x0 from the system... Unfortunately this broke many things
+00177    all of which have been fixed. This was good because nothing deferences NULL
+00178    any more.
+00179 
+00180  Things affected:
+00181    malloc,kmalloc,getfreepage,getfreevirtualpage,pagefault,fork,exec,ld,ld.so,exec,file
+00182 
+00183  Revision 1.8  2004/07/27 07:09:38  reddawg
+00184  Put in a test for 0x0
+00185 
+00186  Revision 1.7  2004/07/26 19:15:49  reddawg
+00187  test code, fixes and the like
+00188 
+00189  Revision 1.6  2004/07/24 23:04:44  reddawg
+00190  Changes... mark let me know if you fault at pid 185 when you type stress
+00191 
+00192  Revision 1.5  2004/07/24 20:00:51  reddawg
+00193  Lots of changes to the vmm subsystem.... Page faults have been adjust to now be blocking on a per thread basis not system wide. This has resulted in no more deadlocks.. also the addition of per thread locking has removed segfaults as a result of COW in which two tasks fault the same COW page and try to modify it.
+00194 
+00195  Revision 1.4  2004/07/24 17:47:28  reddawg
+00196  vmm_pageFault: deadlock resolved thanks to a propper solution suggested by geist
+00197 
+00198  Revision 1.3  2004/07/19 02:05:26  reddawg
+00199  vmmPageFault: had a potential memory leak here for one page it was still using sysID on certain COW scenarios
+00200 
+00201  Revision 1.2  2004/06/10 22:23:56  reddawg
+00202  Volatiles
+00203 
+00204  Revision 1.1.1.1  2004/04/15 12:06:52  reddawg
+00205  UbixOS v1.0
+00206 
+00207  Revision 1.4  2004/04/13 16:36:34  reddawg
+00208  Changed our copyright, it is all now under a BSD-Style license
+00209 
+00210  END
+00211  ***/
+

Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/pagefault_8c.html b/doc/html/pagefault_8c.html new file mode 100644 index 0000000..fc3f1b2 --- /dev/null +++ b/doc/html/pagefault_8c.html @@ -0,0 +1,115 @@ + + +UbixOS V2: src/sys/vmm/pagefault.c File Reference + + + + +
+
+
+
+ +

pagefault.c File Reference

+

+#include <vmm/vmm.h>
+#include <ubixos/sched.h>
+#include <ubixos/kpanic.h>
+#include <ubixos/spinlock.h>
+#include <lib/kprintf.h>
+ +

+Go to the source code of this file. + + + + + + + +

Functions

void vmm_pageFault (uInt32 memAddr, uInt32 eip, uInt32 esp)

Variables

static spinLock_t pageFaultSpinLock = SPIN_LOCK_INITIALIZER
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void vmm_pageFault (uInt32  memAddr,
uInt32  eip,
uInt32  esp 
)
+
+ +

+


Variable Documentation

+ +
+
+ + + + +
spinLock_t pageFaultSpinLock = SPIN_LOCK_INITIALIZER [static]
+
+
+ +

+ +

+Definition at line 36 of file pagefault.c. +

+Referenced by vmm_pageFault(). +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/paging_8c-source.html b/doc/html/paging_8c-source.html new file mode 100644 index 0000000..3550b70 --- /dev/null +++ b/doc/html/paging_8c-source.html @@ -0,0 +1,603 @@ + + +UbixOS V2: src/sys/vmm/paging.c Source File + + + + +
+
+
+
+ +

paging.c

Go to the documentation of this file.
00001  /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <vmm/vmm.h>
+00031 #include <lib/kprintf.h>
+00032 #include <lib/kmalloc.h>
+00033 #include <ubixos/types.h>
+00034 #include <ubixos/kpanic.h>
+00035 #include <ubixos/sched.h>
+00036 #include <ubixos/spinlock.h>
+00037 #include <string.h>
+00038 #include <assert.h>
+00039 
+00040 uInt32         *kernelPageDirectory = 0x0;
+00041 
+00042 
+00043 static spinLock_t fkpSpinLock = SPIN_LOCK_INITIALIZER;
+00044 static spinLock_t rmpSpinLock = SPIN_LOCK_INITIALIZER;
+00045 
+00046 
+00047 /*****************************************************************************************
+00048  Function: int vmm_pagingInit();
+00049 
+00050  Description: This Function Will Initialize The Operating Systems Paging
+00051              Abilities.
+00052 
+00053  Notes:
+00054   02/20/2004 - Looked Over Code And Have Approved Its Quality
+00055   07/28/3004 - All pages are set for ring-0 only no more user accessable
+00056 
+00057 *****************************************************************************************/
+00058 
+00059 int vmm_pagingInit(){
+00060   uInt32          i = 0x0;
+00061   uInt32         *pageTable = 0x0;
+00062 
+00063   /* Allocate A Page Of Memory For Kernels Page Directory */
+00064   kernelPageDirectory = (uInt32 *) vmmFindFreePage(sysID);
+00065   if (kernelPageDirectory == 0x0) {
+00066     K_PANIC("Error: vmmFindFreePage Failed");
+00067     return (0x1);
+00068     } /* end if */
+00069     
+00070   /* Clear The Memory To Ensure There Is No Garbage */
+00071   for (i = 0; i < pageEntries; i++) {
+00072     (uInt32) kernelPageDirectory[i] = (uInt32) 0x0;
+00073   } /* end for */
+00074   
+00075   /* Allocate a page for the first 4MB of memory */
+00076   if ((pageTable = (uInt32 *) vmmFindFreePage(sysID)) == 0x0)
+00077     K_PANIC("Error: vmmFindFreePage Failed");
+00078   kernelPageDirectory[0] = (uInt32) ((uInt32) (pageTable) | KERNEL_PAGE_DEFAULT);    
+00079     
+00080   /* Make Sure The Page Table Is Clean */
+00081   memset(pageTable,0x0,0x1000);
+00082     
+00083   /*
+00084    * Map the first 1MB of Memory to the kernel MM space because our kernel starts
+00085    * at 0x30000
+00086    * Do not map page at address 0x0 this is reserved for null...
+00087    */
+00088   for (i = 0x1; i < (pageEntries / 0x4); i++) {
+00089     pageTable[i] = (uInt32) ((i * 0x1000) | KERNEL_PAGE_DEFAULT);
+00090     } /* end for */
+00091 
+00092   /*
+00093    * Create page tables for the top 1GB of VM space. This space is set aside
+00094    * for kernel space and will be shared with each process
+00095    */
+00096   for (i = 768; i < pageEntries; i++) {
+00097     if ((pageTable = (uInt32 *) vmmFindFreePage(sysID)) == 0x0)
+00098       K_PANIC("Error: vmmFindFreePage Failed");
+00099       
+00100     /* Make Sure The Page Table Is Clean */
+00101     memset(pageTable,0x0,0x1000);
+00102 
+00103     /* Map In The Page Directory */
+00104     kernelPageDirectory[i] = (uInt32) ((uInt32) (pageTable) | KERNEL_PAGE_DEFAULT);
+00105     } /* end for */
+00106     
+00107   /* Set Up Memory To Be All The Allocated Page Directories */
+00108   if ((pageTable = (uInt32 *) vmmFindFreePage(sysID)) == 0x0)
+00109     K_PANIC("Error: vmmFindFreePage Failed");
+00110   
+00111   /* Clean Page Table */
+00112   memset(pageTable,0x0,0x1000);
+00113   
+00114   kernelPageDirectory[767] = ((uInt32) pageTable | KERNEL_PAGE_DEFAULT);
+00115   for (i = 0; i < pageEntries; i++) {
+00116     pageTable[i] = kernelPageDirectory[i];
+00117     } /* end for */
+00118   
+00119   /* Also Set Up Page Directory To Be The The First Page In 0xE0400000 */
+00120   pageTable = (uInt32 *) (kernelPageDirectory[0] & 0xFFFFF000);
+00121   pageTable[256] = (uInt32) ((uInt32) (kernelPageDirectory) | KERNEL_PAGE_DEFAULT);
+00122 
+00123   /* Now Lets Turn On Paging With This Initial Page Table */
+00124   asm volatile(
+00125     "movl %0,%%eax          \n"
+00126     "movl %%eax,%%cr3       \n"
+00127     "movl %%cr0,%%eax       \n"
+00128     "orl  $0x80010000,%%eax \n" /* Turn on memory protection */
+00129     "movl %%eax,%%cr0       \n"
+00130     :
+00131     :  "d"((uInt32 *) (kernelPageDirectory))
+00132     );
+00133 
+00134   /* Remap The Memory List */
+00135   for (i = 0x101000; i <= (0x101000 + (numPages * sizeof(mMap))); i += 0x1000) {
+00136     if ((vmm_remapPage(i, (vmmMemoryMapAddr + (i - 0x101000)),KERNEL_PAGE_DEFAULT)) == 0x0)
+00137       K_PANIC("vmmRemapPage failed\n");
+00138     }
+00139   /* Set New Address For Memory Map Since Its Relocation */
+00140   vmmMemoryMap = (mMap *) vmmMemoryMapAddr;
+00141 
+00142   /* Print information on paging */
+00143   kprintf("paging0 - Address: [0x%X], PagingISR Address: [0x%X]\n", kernelPageDirectory, &_vmm_pageFault);
+00144 
+00145   /* Return so we know everything went well */
+00146   return (0x0);
+00147   } /* END */
+00148 
+00149 /*****************************************************************************************
+00150  Function: int vmmRemapPage(Physical Source,Virtual Destination)
+00151  
+00152  Description: This Function Will Remap A Physical Page Into Virtual Space
+00153  
+00154  Notes:
+00155   07/29/02 - Rewrote This To Work With Our New Paging System
+00156   07/30/02 - Changed Address Of Page Tables And Page Directory
+00157   07/28/04 - If perms == 0x0 set to PAGE_DEFAULT
+00158 
+00159 *****************************************************************************************/
+00160 int vmm_remapPage(uInt32 source,uInt32 dest,uInt16 perms)
+00161 {
+00162   uInt16  destPageDirectoryIndex = 0x0, destPageTableIndex = 0x0;
+00163   uInt32 *pageDir = 0x0, *pageTable = 0x0;
+00164   short   i = 0x0;
+00165 
+00166   if (source == 0x0)
+00167     K_PANIC("source == 0x0");
+00168   if (dest == 0x0)
+00169     K_PANIC("dest == 0x0");
+00170 
+00171   spinLock(&rmpSpinLock);
+00172   if (perms == 0x0)
+00173     perms = KERNEL_PAGE_DEFAULT;
+00174 
+00175   /*
+00176    * Set Pointer pageDirectory To Point To The Virtual Mapping Of The Page
+00177    * Directory
+00178    */
+00179   pageDir = (uInt32 *) parentPageDirAddr;
+00180   /* Check To See If Page Table Exists */
+00181   if (dest == 0x0)
+00182     return(0x0);
+00183   
+00184   /* Get Index Into The Page Directory */
+00185   destPageDirectoryIndex = (dest / 0x400000);
+00186   
+00187   if ((pageDir[destPageDirectoryIndex] & PAGE_PRESENT) != PAGE_PRESENT) {
+00188     /* If Page Table Is Non Existant Then Set It Up */
+00189     /* UBU Why does the page table need to be user writable? */
+00190     pageDir[destPageDirectoryIndex] = (uInt32) vmmFindFreePage(_current->id) | PAGE_DEFAULT;
+00191     
+00192     /* Also Add It To Virtual Space So We Can Make Changes Later */
+00193     pageTable = (uInt32 *) (tablesBaseAddress + 0x2FF000);
+00194     pageTable[destPageDirectoryIndex] = pageDir[destPageDirectoryIndex];
+00195     /* Reload Page Directory */
+00196     asm volatile(
+00197       "push %eax       \n"
+00198       "mov  %cr3,%eax  \n"
+00199       "mov  %eax,%cr3  \n"
+00200       "pop  %eax       \n"
+00201       );
+00202     pageTable = (uInt32 *) (tablesBaseAddress + (0x1000 * destPageDirectoryIndex));
+00203     for (i = 0x0;i < pageEntries;i++)
+00204       pageTable[i] = 0x0;
+00205   }
+00206   /* Set Address To Page Table */
+00207   pageTable = (uInt32 *) (tablesBaseAddress + (0x1000 * destPageDirectoryIndex));
+00208 
+00209   /* Get The Index To The Page Table */
+00210   destPageTableIndex = ((dest - (destPageDirectoryIndex * 0x400000)) / 0x1000);
+00211 
+00212 
+00213   /* If The Page Is Mapped In Free It Before We Remap */
+00214   if ((pageTable[destPageTableIndex] & PAGE_PRESENT) == PAGE_PRESENT) {
+00215     if ((pageTable[destPageTableIndex] & PAGE_STACK) == PAGE_STACK)
+00216       kprintf("Stack Page: [0x%X]\n",dest);
+00217 
+00218     if ((pageTable[destPageTableIndex] & PAGE_COW) != PAGE_COW) {
+00219       kprintf("Page NOT COW\n");
+00220       kprintf("Page Present: [0x%X][0x%X]",dest,pageTable[destPageTableIndex]);
+00221       source = 0x0;
+00222       goto rmDone;
+00223       }
+00224     /* Clear The Page First For Security Reasons */
+00225     freePage(((uInt32) pageTable[destPageTableIndex] & 0xFFFFF000));
+00226   }
+00227   /* Set The Source Address In The Destination */
+00228   pageTable[destPageTableIndex] = (uInt32) (source | perms);
+00229   /* Reload The Page Table; */
+00230   asm volatile(
+00231       "push %eax     \n"
+00232       "movl %cr3,%eax\n"
+00233       "movl %eax,%cr3\n"
+00234       "pop  %eax     \n"
+00235     );
+00236 
+00237   rmDone:
+00238   /* Return */
+00239   spinUnlock(&rmpSpinLock);
+00240   return (source);
+00241 }
+00242 
+00243 /************************************************************************
+00244 
+00245 Function: void *vmmGetFreeKernelPage(pidType pid);
+00246 Description: Returns A Free Page Mapped To The VM Space
+00247 Notes:
+00248 
+00249 07/30/02 - This Returns A Free Page In The Top 1GB For The Kernel
+00250 
+00251 ************************************************************************/
+00252 void           *
+00253 vmmGetFreeKernelPage(pidType pid, uInt16 count)
+00254 {
+00255   int             x = 0, y = 0, c = 0;
+00256   uInt32         *pageTableSrc = 0x0;
+00257 
+00258   spinLock(&fkpSpinLock);
+00259   /* Lets Search For A Free Page */
+00260   for (x = 768; x < 1024; x++) {
+00261     /* Set Page Table Address */
+00262     pageTableSrc = (uInt32 *) (tablesBaseAddress + (4096 * x));
+00263     for (y = 0; y < 1024; y++) {
+00264       /* Loop Through The Page Table Find An UnAllocated Page */
+00265       if ((uInt32) pageTableSrc[y] == (uInt32) 0x0) {
+00266         if (count > 1) {
+00267           for (c = 0; c < count; c++) {
+00268             if (y + c < 1024) {
+00269               if ((uInt32) pageTableSrc[y + c] != (uInt32) 0x0) {
+00270                 c = -1;
+00271                 break;
+00272                 }
+00273               }
+00274             }
+00275           if (c != -1) {
+00276             for (c = 0; c < count; c++) {
+00277               if ((vmm_remapPage((uInt32) vmmFindFreePage(pid), ((x * (1024 * 4096)) + ((y + c) * 4096)),KERNEL_PAGE_DEFAULT)) == 0x0)
+00278                 K_PANIC("vmmRemapPage failed: gfkp-1\n");
+00279               vmmClearVirtualPage((uInt32) ((x * (1024 * 4096)) + ((y + c) * 4096)));
+00280             }
+00281             spinUnlock(&fkpSpinLock);
+00282             return ((void *)((x * (1024 * 4096)) + (y * 4096)));
+00283           }
+00284         } else {
+00285           /* Map A Physical Page To The Virtual Page */
+00286 
+00287           if ((vmm_remapPage((uInt32) vmmFindFreePage(pid), ((x * (1024 * 4096)) + (y * 4096)),KERNEL_PAGE_DEFAULT)) == 0x0)
+00288             K_PANIC("vmmRemapPage failed: gfkp-2\n");
+00289           /* Clear This Page So No Garbage Is There */
+00290           vmmClearVirtualPage((uInt32) ((x * (1024 * 4096)) + (y * 4096)));
+00291           /* Return The Address Of The Newly Allocate Page */
+00292           spinUnlock(&fkpSpinLock);
+00293           return ((void *)((x * (1024 * 4096)) + (y * 4096)));
+00294         }
+00295       }
+00296     }
+00297   }
+00298   /* If No Free Page Was Found Return NULL */
+00299   spinUnlock(&fkpSpinLock);
+00300   return (0x0);
+00301 }
+00302 
+00303 
+00304 /************************************************************************
+00305 
+00306 Function: void vmmClearVirtualPage(uInt32 pageAddr);
+00307 
+00308 Description: This Will Null Out A Page Of Memory
+00309 
+00310 Notes:
+00311 
+00312 ************************************************************************/
+00313 int 
+00314 vmmClearVirtualPage(uInt32 pageAddr)
+00315 {
+00316   uInt32         *src = 0x0;
+00317   int             counter = 0x0;
+00318 
+00319   /* Set Source Pointer To Virtual Page Address */
+00320   src = (uInt32 *) pageAddr;
+00321 
+00322   /* Clear Out The Page */
+00323   for (counter = 0x0; counter < pageEntries; counter++) {
+00324     (uInt32) src[counter] = (uInt32) 0x0;
+00325   }
+00326 
+00327   /* Return */
+00328   return (0x0);
+00329 }
+00330 
+00331 
+00332 void *vmmMapFromTask(pidType pid,void *ptr,uInt32 size) {
+00333   kTask_t *child = 0x0;
+00334   uInt32 i = 0x0,x = 0x0,y = 0x0,count = ((size+4095)/0x1000),c = 0x0;
+00335   uInt16 dI = 0x0,tI = 0x0;
+00336   uInt32 baseAddr = 0x0,offset = 0x0;
+00337   uInt32 *childPageDir   = (uInt32 *)0x5A00000;
+00338   uInt32 *childPageTable = 0x0;
+00339   uInt32 *pageTableSrc   = 0x0;
+00340   offset = (uInt32)ptr & 0xFFF;
+00341   baseAddr = (uInt32)ptr & 0xFFFFF000;
+00342   child = schedFindTask(pid);
+00343   //Calculate The Page Table Index And Page Directory Index
+00344   dI = (baseAddr/(1024*4096));
+00345   tI = ((baseAddr-(dI*(1024*4096)))/4096);
+00346   if (vmm_remapPage(child->tss.cr3,0x5A00000,KERNEL_PAGE_DEFAULT) == 0x0)
+00347     K_PANIC("vmmFailed");
+00348 
+00349   for (i=0;i<0x1000;i++) {
+00350     if (vmm_remapPage(childPageDir[i],0x5A01000 + (i * 0x1000),KERNEL_PAGE_DEFAULT) == 0x0)
+00351       K_PANIC("Returned NULL");
+00352     }
+00353   for (x=(_current->oInfo.vmStart/(1024*4096));x<1024;x++) {
+00354     pageTableSrc = (uInt32 *)(tablesBaseAddress + (4096*x));
+00355     for (y=0;y<1024;y++) {
+00356       //Loop Through The Page Table Find An UnAllocated Page
+00357       if ((uInt32)pageTableSrc[y] == (uInt32)0x0) {
+00358         if (count > 1) {
+00359           for (c=0;((c<count) && (y+c < 1024));c++) {
+00360             if ((uInt32)pageTableSrc[y+c] != (uInt32)0x0) {
+00361               c = -1;
+00362               break;
+00363               }
+00364             }
+00365           if (c != -1) {
+00366             for (c=0;c<count;c++) {
+00367               if ((tI + c) >= 0x1000) {
+00368                 dI++;
+00369                 tI = 0-c;
+00370                 }
+00371               childPageTable = (uInt32 *)(0x5A01000 + (0x1000 * dI));
+00372               if (vmm_remapPage(childPageTable[tI+c],((x*(1024*4096))+((y+c)*4096)),KERNEL_PAGE_DEFAULT) == 0x0)
+00373                 K_PANIC("remap == NULL");
+00374               }
+00375             vmmUnmapPage(0x5A00000,1);
+00376             for (i=0;i<0x1000;i++) {
+00377               vmmUnmapPage((0x5A01000 + (i*0x1000)),1);
+00378               }
+00379             return((void *)((x*(1024*4096))+(y*4096)+offset));
+00380             }
+00381           }
+00382         else {
+00383           //Map A Physical Page To The Virtual Page
+00384           childPageTable = (uInt32 *)(0x5A01000 + (0x1000 * dI));
+00385           if (vmm_remapPage(childPageTable[tI],((x*(1024*4096))+(y*4096)),KERNEL_PAGE_DEFAULT) == 0x0)
+00386             K_PANIC("remap Failed");
+00387 
+00388           //Return The Address Of The Mapped In Memory
+00389           vmmUnmapPage(0x5A00000,1);
+00390           for (i=0;i<0x1000;i++) {
+00391             vmmUnmapPage((0x5A01000 + (i*0x1000)),1);
+00392             }
+00393           return((void *)((x*(1024*4096))+(y*4096)+offset));
+00394           }
+00395         }
+00396       }
+00397     }
+00398   return(0x0);
+00399   }
+00400 
+00401 void *vmm_getFreeMallocPage(uInt16 count) {
+00402   uInt16  x = 0x0, y = 0x0;
+00403   int     c = 0x0;
+00404   uInt32 *pageTableSrc = 0x0;
+00405 
+00406   spinLock(&fkpSpinLock);
+00407   /* Lets Search For A Free Page */
+00408   for (x = 960; x < 1024; x++) {
+00409     /* Set Page Table Address */
+00410     pageTableSrc = (uInt32 *) (tablesBaseAddress + (0x1000 * x));
+00411     for (y = 0; y < 1024; y++) {
+00412       /* Loop Through The Page Table Find An UnAllocated Page */
+00413       if ((uInt32) pageTableSrc[y] == (uInt32) 0x0) {
+00414         if (count > 1) {
+00415           for (c = 0; c < count; c++) {
+00416             if (y + c < 1024) {
+00417               if ((uInt32) pageTableSrc[y + c] != (uInt32) 0x0) {
+00418                 c = -1;
+00419                 break;
+00420                 }
+00421               }
+00422             }
+00423           if (c != -1) {
+00424             for (c = 0; c < count; c++) {
+00425               if (vmm_remapPage((uInt32) vmmFindFreePage(sysID), ((x * 0x400000) + ((y + c) * 0x1000)),KERNEL_PAGE_DEFAULT) == 0x0)
+00426                 K_PANIC("remap Failed");
+00427 
+00428               vmmClearVirtualPage((uInt32) ((x * 0x400000) + ((y + c) * 0x1000)));
+00429               }
+00430             spinUnlock(&fkpSpinLock);
+00431             return ((void *)((x * 0x400000) + (y * 0x1000)));
+00432             }
+00433           }
+00434         else {
+00435           /* Map A Physical Page To The Virtual Page */
+00436           if (vmm_remapPage((uInt32) vmmFindFreePage(sysID), ((x * 0x400000) + (y * 0x1000)),KERNEL_PAGE_DEFAULT) == 0x0)
+00437             K_PANIC("Failed");
+00438 
+00439           /* Clear This Page So No Garbage Is There */
+00440           vmmClearVirtualPage((uInt32) ((x * 0x400000) + (y * 0x1000)));
+00441           /* Return The Address Of The Newly Allocate Page */
+00442           spinUnlock(&fkpSpinLock);
+00443           return ((void *)((x * 0x400000) + (y * 0x1000)));
+00444           }
+00445         }
+00446       }
+00447     }
+00448   /* If No Free Page Was Found Return NULL */
+00449   spinUnlock(&fkpSpinLock);
+00450   return (0x0);
+00451   }
+00452   
+00453 int mmap(struct thread *td,struct mmap_args *uap) {
+00454   vm_offset_t addr = 0x0;
+00455 
+00456   addr = (vm_offset_t) uap->addr;
+00457 
+00458   if (uap->addr != 0x0) {
+00459     kprintf("Address hints are not supported yet.\n");
+00460     }
+00461   /*
+00462   kprintf("uap->flags: [0x%X]\n",uap->flags);
+00463   kprintf("uap->addr:  [0x%X]\n",uap->addr);
+00464   kprintf("uap->len:   [0x%X]\n",uap->len);
+00465   kprintf("uap->prot:  [0x%X]\n",uap->prot);
+00466   kprintf("uap->fd:    [%i]\n",uap->fd);
+00467   kprintf("uap->pad:   [0x%X]\n",uap->pad);
+00468   kprintf("uap->pos:   [0x%X]\n",uap->pos);
+00469   */
+00470   if (uap->fd == -1)
+00471     td->td_retval[0] = vmmGetFreeVirtualPage(_current->id,uap->len/0x1000,VM_TASK);
+00472   else 
+00473     td->td_retval[0] = 0x0;
+00474   return(0x0);
+00475   }
+00476 
+00477 int obreak(struct thread *td,struct obreak_args *uap) {
+00478   u_int32_t   i    = 0x0;
+00479   vm_offset_t old  = 0x0;
+00480   vm_offset_t base = 0x0;
+00481   vm_offset_t new  = 0x0;
+00482   
+00483   /*
+00484   kprintf("vm_offset_t: [%i]\n",sizeof(vm_offset_t));
+00485   kprintf("nsize:    [0x%X]\n",uap->nsize);
+00486   kprintf("vm_daddr: [0x%X]\n",td->vm_daddr);
+00487   kprintf("vm_dsize: [0x%X]\n",td->vm_dsize);
+00488   kprintf("total:    [0x%X]\n",td->vm_daddr + td->vm_dsize);
+00489   */
+00490 
+00491   new  = round_page((vm_offset_t)uap->nsize);
+00492 
+00493   base = round_page((vm_offset_t)td->vm_daddr);
+00494 
+00495   old = base + ctob(td->vm_dsize);
+00496   //kprintf("ctob: [0x%X]\n",ctob(td->vm_dsize));
+00497   //kprintf("Base: [0x%x], Old: [0x%x], New: [0x%x]\n",base,old,new);
+00498 
+00499   if (new < base) 
+00500     K_PANIC("EINVAL");
+00501 
+00502   //kprintf("obreak: [0x%X:0x%X]",new,old);
+00503   if (new > old) {
+00504     for (i = old;i < new;i+= 0x1000) {
+00505       if (vmm_remapPage(vmmFindFreePage(_current->id),i,PAGE_DEFAULT) == 0x0)
+00506         K_PANIC("remap Failed");
+00507       }
+00508     td->vm_dsize += btoc(new - old);
+00509     }
+00510   else if (new < old) {
+00511     /*
+00512     for (i = old; i > new;i -= 0x1000) {
+00513       kprintf("[0x%X]",i);
+00514       }
+00515     */
+00516     K_PANIC("new < old"); 
+00517     td->vm_dsize -= btoc(old - new);
+00518     }
+00519   return(0x0);
+00520   }
+00521 
+00522 int munmap(struct thread *td,struct munmap_args *uap) {
+00523   /* HACK */
+00524   kprintf("munmap");
+00525   return(0x0);
+00526   }
+00527 
+00528 int vmm_cleanVirtualSpace(u_int32_t addr) {
+00529   int         x            = 0x0;
+00530   int         y            = 0x0;
+00531   u_int32_t  *pageTableSrc = 0x0;
+00532   u_int32_t  *pageDir      = 0x0;
+00533 
+00534   pageDir = (uInt32 *) parentPageDirAddr;
+00535 
+00536   kprintf("CVS: [0x%X]\n",addr);
+00537 
+00538   for (x = (addr / (1024 * 4096)); x < 770; x++) {
+00539     if ((pageDir[x] & PAGE_PRESENT) == PAGE_PRESENT) {
+00540       pageTableSrc = (uInt32 *) (tablesBaseAddress + (0x1000 * x));
+00541       for (y = 0;y < 1024;y++) {
+00542         if (pageTableSrc[y] != 0x0) { 
+00543           if ((pageTableSrc[y] & PAGE_COW) == PAGE_COW) {
+00544             //kprintf("COWi*");
+00545             pageTableSrc[y] = 0x0;
+00546             }
+00547           else if ((pageTableSrc[y] & PAGE_STACK) == PAGE_STACK) {
+00548             //pageTableSrc[y] = 0x0;
+00549             //kprintf("STACK: (%i:%i)",x,y);
+00550             }
+00551           else {
+00552             kprintf("+");
+00553             }
+00554           }
+00555         }
+00556       }
+00557     }
+00558 
+00559   return(0x0);
+00560   }
+00561 
+00562 
+00563 /***
+00564  END
+00565  ***/
+00566 
+

Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/paging_8c.html b/doc/html/paging_8c.html new file mode 100644 index 0000000..6baae6f --- /dev/null +++ b/doc/html/paging_8c.html @@ -0,0 +1,457 @@ + + +UbixOS V2: src/sys/vmm/paging.c File Reference + + + + +
+
+
+
+ +

paging.c File Reference

+

+#include <vmm/vmm.h>
+#include <lib/kprintf.h>
+#include <lib/kmalloc.h>
+#include <ubixos/types.h>
+#include <ubixos/kpanic.h>
+#include <ubixos/sched.h>
+#include <ubixos/spinlock.h>
+#include <string.h>
+#include <assert.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Functions

int mmap (struct thread *td, struct mmap_args *uap)
int munmap (struct thread *td, struct munmap_args *uap)
int obreak (struct thread *td, struct obreak_args *uap)
int vmm_cleanVirtualSpace (u_int32_t addr)
void * vmm_getFreeMallocPage (uInt16 count)
int vmm_pagingInit ()
int vmm_remapPage (uInt32 source, uInt32 dest, uInt16 perms)
int vmmClearVirtualPage (uInt32 pageAddr)
void * vmmGetFreeKernelPage (pidType pid, uInt16 count)
void * vmmMapFromTask (pidType pid, void *ptr, uInt32 size)

Variables

static spinLock_t fkpSpinLock = SPIN_LOCK_INITIALIZER
uInt32kernelPageDirectory = 0x0
static spinLock_t rmpSpinLock = SPIN_LOCK_INITIALIZER
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
int mmap (struct thread td,
struct mmap_args uap 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
int munmap (struct thread td,
struct munmap_args uap 
)
+
+
+ +

+ +

+Definition at line 522 of file paging.c. +

+References kprintf(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int obreak (struct thread td,
struct obreak_args uap 
)
+
+ +

+ +

+
+ + + + + + + + + +
int vmm_cleanVirtualSpace (u_int32_t  addr  ) 
+
+
+ +

+ +

+Definition at line 528 of file paging.c. +

+References kprintf(), PAGE_COW, PAGE_PRESENT, PAGE_STACK, parentPageDirAddr, tablesBaseAddress, and x1000. +

+Referenced by sysExec(). +

+

+ +

+
+ + + + + + + + + +
void* vmm_getFreeMallocPage (uInt16  count  ) 
+
+ +

+ +

+
+ + + + + + + + +
int vmm_pagingInit (  ) 
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int vmm_remapPage (uInt32  source,
uInt32  dest,
uInt16  perms 
)
+
+ +

+ +

+
+ + + + + + + + + +
int vmmClearVirtualPage (uInt32  pageAddr  ) 
+
+
+ +

+ +

+Definition at line 314 of file paging.c. +

+References pageEntries. +

+Referenced by vmm_getFreeMallocPage(), vmmGetFreeKernelPage(), vmmGetFreePage(), and vmmGetFreeVirtualPage(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void* vmmGetFreeKernelPage (pidType  pid,
uInt16  count 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void* vmmMapFromTask (pidType  pid,
void *  ptr,
uInt32  size 
)
+
+ +

+


Variable Documentation

+ +
+
+ + + + +
spinLock_t fkpSpinLock = SPIN_LOCK_INITIALIZER [static]
+
+
+ +

+ +

+Definition at line 43 of file paging.c. +

+Referenced by vmm_getFreeMallocPage(), and vmmGetFreeKernelPage(). +

+

+ +

+
+ + + + +
uInt32* kernelPageDirectory = 0x0
+
+
+ +

+ +

+Definition at line 40 of file paging.c. +

+Referenced by _int8(), execFile(), execThread(), idt_init(), and vmm_pagingInit(). +

+

+ +

+
+ + + + +
spinLock_t rmpSpinLock = SPIN_LOCK_INITIALIZER [static]
+
+
+ +

+ +

+Definition at line 44 of file paging.c. +

+Referenced by vmm_remapPage(). +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/paging_8h-source.html b/doc/html/paging_8h-source.html new file mode 100644 index 0000000..da1e41b --- /dev/null +++ b/doc/html/paging_8h-source.html @@ -0,0 +1,132 @@ + + +UbixOS V2: src/sys/include/vmm/paging.h Source File + + + + +
+
+
+
+ +

paging.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _PAGING_H
+00031 #define _PAGING_H
+00032 
+00033 #include <ubixos/types.h>
+00034 #include <sys/sysproto.h>
+00035 #include <sys/thread.h>
+00036 
+00037 #define VM_THRD           0
+00038 #define VM_TASK           1
+00039 
+00040 #define pageLength        0x00000400
+00041 #define pageSize          4096
+00042 #define pageEntries       (pageSize/4)
+00043 #define tablesBaseAddress   0xBFC00000
+00044 #define parentPageDirAddr   0x100000
+00045 
+00046 #define PAGE_COW            0x00000200
+00047 #define PAGE_STACK          0x00000400
+00048 #define PAGE_WIRED          0x00000600
+00049 #define PAGE_PRESENT        0x00000001
+00050 #define PAGE_WRITE          0x00000002
+00051 #define PAGE_USER           0x00000004
+00052 #define PAGE_DEFAULT        (PAGE_PRESENT|PAGE_WRITE|PAGE_USER)
+00053 #define KERNEL_PAGE_DEFAULT (PAGE_PRESENT|PAGE_WRITE)
+00054 
+00055 #define PAGE_SHIFT      12              /* LOG2(PAGE_SIZE) */
+00056 #define PAGE_SIZE       (1<<PAGE_SHIFT) /* bytes/page */
+00057 #define PAGE_MASK       (PAGE_SIZE-1)
+00058 
+00059 #define trunc_page(x)           ((x) & ~PAGE_MASK)
+00060 #define round_page(x)   (((x) + PAGE_MASK) & ~PAGE_MASK)
+00061 #define ctob(x)                 ((x)<<PAGE_SHIFT)
+00062 #define btoc(x)                 (((vm_offset_t)(x)+PAGE_MASK)>>PAGE_SHIFT)
+00063 
+00064 
+00065 int vmmClearVirtualPage(uInt32 pageAddr);
+00066 
+00067 void vmmUnmapPage(uInt32,int);
+00068 void vmmUnmapPages(void *,uInt32);
+00069 void *vmmMapFromTask(pidType,void *,uInt32);
+00070 void *vmmCopyVirtualSpace(pidType);
+00071 void *vmmGetFreePage(pidType);
+00072 void *vmmGetFreeKernelPage(pidType pid,uInt16 count);
+00073 void *vmmCreateVirtualSpace(pidType);
+00074 void *vmmGetFreeVirtualPage(pidType,int,int);
+00075 
+00076 uInt32 vmm_getPhysicalAddr(uInt32);
+00077 int    vmm_setPageAttributes(uInt32,uInt16);
+00078 int    vmm_remapPage(uInt32,uInt32,uInt16);
+00079 int    vmm_pagingInit();
+00080 void  *vmm_getFreeMallocPage(uInt16 count);
+00081 void   vmm_pageFault(uInt32,uInt32,uInt32);
+00082 void  _vmm_pageFault();
+00083 int mmap(struct thread *,struct mmap_args *);
+00084 int obreak(struct thread *,struct obreak_args *);
+00085 int munmap(struct thread *,struct munmap_args *);
+00086 
+00087 
+00088 extern uInt32 *kernelPageDirectory;
+00089 
+00090 #endif
+00091 
+00092 /***
+00093  END
+00094  ***/
+00095 
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/paging_8h.html b/doc/html/paging_8h.html new file mode 100644 index 0000000..eb02354 --- /dev/null +++ b/doc/html/paging_8h.html @@ -0,0 +1,1181 @@ + + +UbixOS V2: src/sys/include/vmm/paging.h File Reference + + + + +
+
+
+
+ +

paging.h File Reference

+

+#include <ubixos/types.h>
+#include <sys/sysproto.h>
+#include <sys/thread.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Defines

#define btoc(x)   (((vm_offset_t)(x)+PAGE_MASK)>>PAGE_SHIFT)
#define ctob(x)   ((x)<<PAGE_SHIFT)
#define KERNEL_PAGE_DEFAULT   (PAGE_PRESENT|PAGE_WRITE)
#define PAGE_COW   0x00000200
#define PAGE_DEFAULT   (PAGE_PRESENT|PAGE_WRITE|PAGE_USER)
#define PAGE_MASK   (PAGE_SIZE-1)
#define PAGE_PRESENT   0x00000001
#define PAGE_SHIFT   12
#define PAGE_SIZE   (1<<PAGE_SHIFT)
#define PAGE_STACK   0x00000400
#define PAGE_USER   0x00000004
#define PAGE_WIRED   0x00000600
#define PAGE_WRITE   0x00000002
#define pageEntries   (pageSize/4)
#define pageLength   0x00000400
#define pageSize   4096
#define parentPageDirAddr   0x100000
#define round_page(x)   (((x) + PAGE_MASK) & ~PAGE_MASK)
#define tablesBaseAddress   0xBFC00000
#define trunc_page(x)   ((x) & ~PAGE_MASK)
#define VM_TASK   1
#define VM_THRD   0

Functions

void _vmm_pageFault ()
int mmap (struct thread *, struct mmap_args *)
int munmap (struct thread *, struct munmap_args *)
int obreak (struct thread *, struct obreak_args *)
void * vmm_getFreeMallocPage (uInt16 count)
uInt32 vmm_getPhysicalAddr (uInt32)
void vmm_pageFault (uInt32, uInt32, uInt32)
int vmm_pagingInit ()
int vmm_remapPage (uInt32, uInt32, uInt16)
int vmm_setPageAttributes (uInt32, uInt16)
int vmmClearVirtualPage (uInt32 pageAddr)
void * vmmCopyVirtualSpace (pidType)
void * vmmCreateVirtualSpace (pidType)
void * vmmGetFreeKernelPage (pidType pid, uInt16 count)
void * vmmGetFreePage (pidType)
void * vmmGetFreeVirtualPage (pidType, int, int)
void * vmmMapFromTask (pidType, void *, uInt32)
void vmmUnmapPage (uInt32, int)
void vmmUnmapPages (void *, uInt32)

Variables

uInt32kernelPageDirectory
+


Define Documentation

+ +
+
+ + + + + + + + + +
#define btoc (  )    (((vm_offset_t)(x)+PAGE_MASK)>>PAGE_SHIFT)
+
+
+ +

+ +

+Definition at line 62 of file paging.h. +

+Referenced by obreak(), and vmmGetFreeVirtualPage(). +

+

+ +

+
+ + + + + + + + + +
#define ctob (  )    ((x)<<PAGE_SHIFT)
+
+
+ +

+ +

+Definition at line 61 of file paging.h. +

+Referenced by obreak(), and vmmGetFreeVirtualPage(). +

+

+ +

+
+ + + + +
#define KERNEL_PAGE_DEFAULT   (PAGE_PRESENT|PAGE_WRITE)
+
+ +

+ +

+
+ + + + +
#define PAGE_COW   0x00000200
+
+ +

+ +

+
+ + + + +
#define PAGE_DEFAULT   (PAGE_PRESENT|PAGE_WRITE|PAGE_USER)
+
+ +

+ +

+
+ + + + +
#define PAGE_MASK   (PAGE_SIZE-1)
+
+
+ +

+ +

+Definition at line 57 of file paging.h. +

+

+ +

+
+ + + + +
#define PAGE_PRESENT   0x00000001
+
+
+ +

+ +

+Definition at line 49 of file paging.h. +

+Referenced by execFile(), sysExec(), vmm_cleanVirtualSpace(), vmm_remapPage(), and vmmGetFreeVirtualPage(). +

+

+ +

+
+ + + + +
#define PAGE_SHIFT   12
+
+
+ +

+ +

+Definition at line 55 of file paging.h. +

+Referenced by sysExec(). +

+

+ +

+
+ + + + +
#define PAGE_SIZE   (1<<PAGE_SHIFT)
+
+
+ +

+ +

+Definition at line 56 of file paging.h. +

+Referenced by sysExec(). +

+

+ +

+
+ + + + +
#define PAGE_STACK   0x00000400
+
+
+ +

+ +

+Definition at line 47 of file paging.h. +

+Referenced by execFile(), vmm_cleanVirtualSpace(), vmm_remapPage(), and vmmCopyVirtualSpace(). +

+

+ +

+
+ + + + +
#define PAGE_USER   0x00000004
+
+
+ +

+ +

+Definition at line 51 of file paging.h. +

+Referenced by execFile(), and sysExec(). +

+

+ +

+
+ + + + +
#define PAGE_WIRED   0x00000600
+
+
+ +

+ +

+Definition at line 48 of file paging.h. +

+

+ +

+
+ + + + +
#define PAGE_WRITE   0x00000002
+
+
+ +

+ +

+Definition at line 50 of file paging.h. +

+

+ +

+
+ + + + +
#define pageEntries   (pageSize/4)
+
+ +

+ +

+
+ + + + +
#define pageLength   0x00000400
+
+
+ +

+ +

+Definition at line 40 of file paging.h. +

+

+ +

+
+ + + + +
#define pageSize   4096
+
+
+ +

+ +

+Definition at line 41 of file paging.h. +

+

+ +

+
+ + + + +
#define parentPageDirAddr   0x100000
+
+ +

+ +

+
+ + + + + + + + + +
#define round_page (  )    (((x) + PAGE_MASK) & ~PAGE_MASK)
+
+
+ +

+ +

+Definition at line 60 of file paging.h. +

+Referenced by obreak(), and sysExec(). +

+

+ +

+
+ + + + +
#define tablesBaseAddress   0xBFC00000
+
+ +

+ +

+
+ + + + + + + + + +
#define trunc_page (  )    ((x) & ~PAGE_MASK)
+
+
+ +

+ +

+Definition at line 59 of file paging.h. +

+Referenced by sysExec(). +

+

+ +

+
+ + + + +
#define VM_TASK   1
+
+
+ +

+ +

+Definition at line 38 of file paging.h. +

+Referenced by mmap(), sysGetFreePage(), and vmmGetFreeVirtualPage(). +

+

+ +

+
+ + + + +
#define VM_THRD   0
+
+
+ +

+ +

+Definition at line 37 of file paging.h. +

+Referenced by sysGetFreePage(), and vmmGetFreeVirtualPage(). +

+

+


Function Documentation

+ +
+
+ + + + + + + + +
void _vmm_pageFault (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int mmap (struct thread,
struct mmap_args 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
int munmap (struct thread,
struct munmap_args 
)
+
+
+ +

+ +

+Definition at line 522 of file paging.c. +

+References kprintf(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int obreak (struct thread,
struct obreak_args 
)
+
+ +

+ +

+
+ + + + + + + + + +
void* vmm_getFreeMallocPage (uInt16  count  ) 
+
+ +

+ +

+
+ + + + + + + + + +
uInt32 vmm_getPhysicalAddr (uInt32  pageAddr  ) 
+
+
+ +

+Function: void *vmmGetPhysicalAddr(); Description: Returns The Physical Address Of The Virtual Page Notes: +

+Definition at line 40 of file getphysicaladdr.c. +

+References tablesBaseAddress, and x1000. +

+Referenced by vmm_pageFault(), vmmCopyVirtualSpace(), and vmmCreateVirtualSpace(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void vmm_pageFault (uInt32 ,
uInt32 ,
uInt32  
)
+
+ +

+ +

+
+ + + + + + + + +
int vmm_pagingInit (  ) 
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int vmm_remapPage (uInt32 ,
uInt32 ,
uInt16  
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
int vmm_setPageAttributes (uInt32 ,
uInt16  
)
+
+
+ +

+ +

+Definition at line 41 of file setpageattributes.c. +

+References kpanic(), tablesBaseAddress, and x1000. +

+Referenced by execFile(), and sysExec(). +

+

+ +

+
+ + + + + + + + + +
int vmmClearVirtualPage (uInt32  pageAddr  ) 
+
+
+ +

+ +

+Definition at line 314 of file paging.c. +

+References pageEntries. +

+Referenced by vmm_getFreeMallocPage(), vmmGetFreeKernelPage(), vmmGetFreePage(), and vmmGetFreeVirtualPage(). +

+

+ +

+
+ + + + + + + + + +
void* vmmCopyVirtualSpace (pidType   ) 
+
+ +

+ +

+
+ + + + + + + + + +
void* vmmCreateVirtualSpace (pidType   ) 
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
void* vmmGetFreeKernelPage (pidType  pid,
uInt16  count 
)
+
+ +

+ +

+
+ + + + + + + + + +
void* vmmGetFreePage (pidType   ) 
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void* vmmGetFreeVirtualPage (pidType ,
int ,
int  
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void* vmmMapFromTask (pidType ,
void * ,
uInt32  
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
void vmmUnmapPage (uInt32 ,
int  
)
+
+
+ +

+ +

+Definition at line 50 of file unmappage.c. +

+References tablesBaseAddress, and x1000. +

+Referenced by vmm_pageFault(), vmmCopyVirtualSpace(), vmmCreateVirtualSpace(), and vmmMapFromTask(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void vmmUnmapPages (void * ,
uInt32  
)
+
+
+ +

+ +

+Definition at line 101 of file unmappage.c. +

+References tablesBaseAddress. +

+

+


Variable Documentation

+ +
+ +
+ +

+ +

+Definition at line 40 of file paging.c. +

+Referenced by _int8(), execFile(), execThread(), idt_init(), and vmm_pagingInit(). +

+

+


Generated on Sun Dec 3 02:38:08 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/pbuf_8h-source.html b/doc/html/pbuf_8h-source.html new file mode 100644 index 0000000..6ffb4c7 --- /dev/null +++ b/doc/html/pbuf_8h-source.html @@ -0,0 +1,189 @@ + + +UbixOS V2: src/sys/include/net/pbuf.h Source File + + + + +
+
+
+
+ +

pbuf.h

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 /*-----------------------------------------------------------------------------------*/
+00036 #ifndef __LWIP_PBUF_H__
+00037 #define __LWIP_PBUF_H__
+00038 
+00039 #include "net/debug.h"
+00040 #include "net/arch.h"
+00041 
+00042 
+00043 #define PBUF_TRANSPORT_HLEN 20
+00044 #define PBUF_IP_HLEN        20
+00045 
+00046 typedef enum {
+00047   PBUF_TRANSPORT,
+00048   PBUF_IP,
+00049   PBUF_LINK,
+00050   PBUF_RAW
+00051 } pbuf_layer;
+00052 
+00053 typedef enum {
+00054   PBUF_RAM,
+00055   PBUF_ROM,
+00056   PBUF_POOL
+00057 } pbuf_flag;
+00058 
+00059 /* Definitions for the pbuf flag field (these are not the flags that
+00060    are passed to pbuf_alloc()). */
+00061 #define PBUF_FLAG_RAM   0x00    /* Flags that pbuf data is stored in RAM. */
+00062 #define PBUF_FLAG_ROM   0x01    /* Flags that pbuf data is stored in ROM. */
+00063 #define PBUF_FLAG_POOL  0x02    /* Flags that the pbuf comes from the
+00064                                    pbuf pool. */
+00065 
+00066 struct pbuf {
+00067   struct pbuf *next;
+00068   
+00069   /* high 4 bits, flags, low 4 bits reference count */
+00070   uInt8 flags, ref;
+00071   void *payload;
+00072   
+00073   /* Total length of buffer + additionally chained buffers. */
+00074   uInt16 tot_len;
+00075   /* Length of this buffer. */
+00076   uInt16 len;  
+00077   
+00078 };
+00079 
+00080 /* pbuf_init():
+00081 
+00082    Initializes the pbuf module. The num parameter determines how many
+00083    pbufs that should be allocated to the pbuf pool, and the size
+00084    parameter specifies the size of the data allocated to those.  */
+00085 void pbuf_init(void);
+00086 
+00087 /* pbuf_alloc():
+00088    
+00089    Allocates a pbuf at protocol layer l. The actual memory allocated
+00090    for the pbuf is determined by the layer at which the pbuf is
+00091    allocated and the requested size (from the size parameter). The
+00092    flag parameter decides how and where the pbuf should be allocated
+00093    as follows:
+00094  
+00095    * PBUF_RAM: buffer memory for pbuf is allocated as one large
+00096                chunk. This includesprotocol headers as well.
+00097    
+00098    * RBUF_ROM: no buffer memory is allocated for the pbuf, even for
+00099                 protocol headers.  Additional headers must be
+00100                 prepended by allocating another pbuf and chain in to
+00101                 the front of the ROM pbuf.
+00102 
+00103    * PBUF_ROOL: the pbuf is allocated as a pbuf chain, with pbufs from
+00104                 the pbuf pool that is allocated during pbuf_init().  */
+00105 struct pbuf *pbuf_alloc(pbuf_layer l, uInt16 size, pbuf_flag flag);
+00106 
+00107 /* pbuf_realloc():
+00108 
+00109    Shrinks the pbuf to the size given by the size parameter. 
+00110  */
+00111 void pbuf_realloc(struct pbuf *p, uInt16 size); 
+00112 
+00113 /* pbuf_header():
+00114 
+00115    Tries to move the p->payload pointer header_size number of bytes
+00116    upward within the pbuf. The return value is non-zero if it
+00117    fails. If so, an additional pbuf should be allocated for the header
+00118    and it should be chained to the front. */
+00119 uInt8 pbuf_header(struct pbuf *p, Int16 header_size);
+00120 
+00121 /* pbuf_ref():
+00122 
+00123    Increments the reference count of the pbuf p.
+00124  */
+00125 void pbuf_ref(struct pbuf *p);
+00126 
+00127 /* pbuf_free():
+00128 
+00129    Decrements the reference count and deallocates the pbuf if the
+00130    reference count is zero. If the pbuf is a chain all pbufs in the
+00131    chain are deallocated.  */
+00132 uInt8 pbuf_free(struct pbuf *p);
+00133 
+00134 /* pbuf_clen():
+00135 
+00136    Returns the length of the pbuf chain. */
+00137 uInt8 pbuf_clen(struct pbuf *p);  
+00138 
+00139 /* pbuf_chain():
+00140 
+00141    Chains pbuf t on the end of pbuf h. Pbuf h will have it's tot_len
+00142    field adjusted accordingly. Pbuf t should no be used any more after
+00143    a call to this function, since pbuf t is now a part of pbuf h.  */
+00144 void pbuf_chain(struct pbuf *h, struct pbuf *t);
+00145 
+00146 /* pbuf_dechain():
+00147 
+00148    Picks off the first pbuf from the pbuf chain p. Returns the tail of
+00149    the pbuf chain or NULL if the pbuf p was not chained. */
+00150 struct pbuf *pbuf_dechain(struct pbuf *p);
+00151 
+00152 #endif /* __LWIP_PBUF_H__ */
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/pbuf_8h.html b/doc/html/pbuf_8h.html new file mode 100644 index 0000000..04411ea --- /dev/null +++ b/doc/html/pbuf_8h.html @@ -0,0 +1,467 @@ + + +UbixOS V2: src/sys/include/net/pbuf.h File Reference + + + + +
+
+
+
+ +

pbuf.h File Reference

+

+#include "net/debug.h"
+#include "net/arch.h"
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  pbuf

Defines

#define PBUF_FLAG_POOL   0x02
#define PBUF_FLAG_RAM   0x00
#define PBUF_FLAG_ROM   0x01
#define PBUF_IP_HLEN   20
#define PBUF_TRANSPORT_HLEN   20

Enumerations

enum  pbuf_flag { PBUF_RAM, +PBUF_ROM, +PBUF_POOL + }
enum  pbuf_layer { PBUF_TRANSPORT, +PBUF_IP, +PBUF_LINK, +PBUF_RAW + }

Functions

pbufpbuf_alloc (pbuf_layer l, uInt16 size, pbuf_flag flag)
void pbuf_chain (struct pbuf *h, struct pbuf *t)
uInt8 pbuf_clen (struct pbuf *p)
pbufpbuf_dechain (struct pbuf *p)
uInt8 pbuf_free (struct pbuf *p)
uInt8 pbuf_header (struct pbuf *p, Int16 header_size)
void pbuf_init (void)
void pbuf_realloc (struct pbuf *p, uInt16 size)
void pbuf_ref (struct pbuf *p)
+


Define Documentation

+ +
+
+ + + + +
#define PBUF_FLAG_POOL   0x02
+
+
+ +

+ +

+Definition at line 63 of file pbuf.h. +

+

+ +

+
+ + + + +
#define PBUF_FLAG_RAM   0x00
+
+
+ +

+ +

+Definition at line 61 of file pbuf.h. +

+

+ +

+
+ + + + +
#define PBUF_FLAG_ROM   0x01
+
+
+ +

+ +

+Definition at line 62 of file pbuf.h. +

+

+ +

+
+ + + + +
#define PBUF_IP_HLEN   20
+
+
+ +

+ +

+Definition at line 44 of file pbuf.h. +

+

+ +

+
+ + + + +
#define PBUF_TRANSPORT_HLEN   20
+
+
+ +

+ +

+Definition at line 43 of file pbuf.h. +

+

+


Enumeration Type Documentation

+ +
+
+ + + + +
enum pbuf_flag
+
+
+ +

+

Enumerator:
+ + + + +
PBUF_RAM  +
PBUF_ROM  +
PBUF_POOL  +
+
+ +

+Definition at line 53 of file pbuf.h. +

+

+ +

+
+ + + + +
enum pbuf_layer
+
+
+ +

+

Enumerator:
+ + + + + +
PBUF_TRANSPORT  +
PBUF_IP  +
PBUF_LINK  +
PBUF_RAW  +
+
+ +

+Definition at line 46 of file pbuf.h. +

+

+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
struct pbuf* pbuf_alloc (pbuf_layer  l,
uInt16  size,
pbuf_flag  flag 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
void pbuf_chain (struct pbuf h,
struct pbuf t 
)
+
+
+ +

+ +

+Referenced by ethernetif_output(), and netbuf_chain(). +

+

+ +

+
+ + + + + + + + + +
uInt8 pbuf_clen (struct pbuf p  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
struct pbuf* pbuf_dechain (struct pbuf p  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 pbuf_free (struct pbuf p  ) 
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
uInt8 pbuf_header (struct pbuf p,
Int16  header_size 
)
+
+
+ +

+ +

+Referenced by ethernetif_input(), and ethernetif_output(). +

+

+ +

+
+ + + + + + + + + +
void pbuf_init (void   ) 
+
+
+ +

+ +

+Referenced by net_init(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void pbuf_realloc (struct pbuf p,
uInt16  size 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
void pbuf_ref (struct pbuf p  ) 
+
+
+ +

+ +

+

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/pci_8c-source.html b/doc/html/pci_8c-source.html new file mode 100644 index 0000000..d6b5503 --- /dev/null +++ b/doc/html/pci_8c-source.html @@ -0,0 +1,378 @@ + + +UbixOS V2: src/sys/pci/pci.c Source File + + + + +
+
+
+
+ +

pci.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <pci/pci.h>
+00031 #include <sys/io.h>
+00032 #include <ubixos/types.h>
+00033 #include <lib/kprintf.h>
+00034 
+00035 const struct {
+00036   uInt8 baseClass;
+00037   uInt8 subClass;
+00038   uInt8 interface;
+00039   const char* name;
+00040   } pciClasses[] = {
+00041     { 0x00, 0x00, 0x00, "Undefined" },
+00042     { 0x00, 0x01, 0x00, "VGA" },
+00043 
+00044     { 0x01, 0x00, 0x00, "SCSI" },
+00045     { 0x01, 0x01, 0x00, "IDE" },
+00046     { 0x01, 0x01, 0x8A, "IDE" },
+00047     { 0x01, 0x02, 0x00, "Floppy" },
+00048     { 0x01, 0x03, 0x00, "IPI" },
+00049     { 0x01, 0x04, 0x00, "RAID" },
+00050     { 0x01, 0x80, 0x00, "Other" },
+00051 
+00052     { 0x02, 0x00, 0x00, "Ethernet" },
+00053     { 0x02, 0x01, 0x00, "Token Ring" },
+00054     { 0x02, 0x02, 0x00, "FDDI" },
+00055     { 0x02, 0x03, 0x00, "ATM" },
+00056     { 0x02, 0x04, 0x00, "ISDN" },
+00057     { 0x02, 0x80, 0x00, "Other" },
+00058 
+00059     { 0x03, 0x00, 0x00, "VGA" },
+00060     { 0x03, 0x00, 0x01, "VGA+8514" },
+00061     { 0x03, 0x01, 0x00, "XGA" },
+00062     { 0x03, 0x02, 0x00, "3D" },
+00063     { 0x03, 0x80, 0x00, "VGA Other" },
+00064 
+00065     { 0x04, 0x00, 0x00, "Video" },
+00066     { 0x04, 0x01, 0x00, "Audio" },
+00067     { 0x04, 0x02, 0x00, "Telephony" },
+00068     { 0x04, 0x80, 0x00, "Other" },
+00069 
+00070     { 0x05, 0x00, 0x00, "RAM" },
+00071     { 0x05, 0x01, 0x00, "Flash" },
+00072     { 0x05, 0x80, 0x00, "Other" },
+00073         
+00074     { 0x06, 0x00, 0x00, "PCI to HOST" },
+00075     { 0x06, 0x01, 0x00, "PCI to ISA" },
+00076     { 0x06, 0x02, 0x00, "PCI to EISA" },
+00077     { 0x06, 0x03, 0x00, "PCI to MCA" },
+00078     { 0x06, 0x04, 0x00, "PCI to PCI" },
+00079     { 0x06, 0x04, 0x01, "PCI to PCI (Subtractive Decode)" },
+00080     { 0x06, 0x05, 0x00, "PCI to PCMCIA" },
+00081     { 0x06, 0x06, 0x00, "PCI to NuBUS" },
+00082     { 0x06, 0x07, 0x00, "PCI to Cardbus" },
+00083     { 0x06, 0x08, 0x00, "PCI to RACEway" },
+00084     { 0x06, 0x09, 0x00, "PCI to PCI" },
+00085     { 0x06, 0x0A, 0x00, "PCI to InfiBand" },
+00086     { 0x06, 0x80, 0x00, "PCI to Other" },
+00087 
+00088     { 0x07, 0x00, 0x00, "Serial" },
+00089     { 0x07, 0x00, 0x01, "Serial - 16450" },
+00090     { 0x07, 0x00, 0x02, "Serial - 16550" },
+00091     { 0x07, 0x00, 0x03, "Serial - 16650" },
+00092     { 0x07, 0x00, 0x04, "Serial - 16750" },
+00093     { 0x07, 0x00, 0x05, "Serial - 16850" },
+00094     { 0x07, 0x00, 0x06, "Serial - 16950" },
+00095     { 0x07, 0x01, 0x00, "Parallel" },
+00096     { 0x07, 0x01, 0x01, "Parallel - BiDir" },
+00097     { 0x07, 0x01, 0x02, "Parallel - ECP" },
+00098     { 0x07, 0x01, 0x03, "Parallel - IEEE1284" },
+00099     { 0x07, 0x01, 0xFE, "Parallel - IEEE1284 Target" },
+00100     { 0x07, 0x02, 0x00, "Multiport Serial" },
+00101     { 0x07, 0x03, 0x00, "Hayes Compatible Modem" },
+00102     { 0x07, 0x03, 0x01, "Hayes Compatible Modem, 16450" },
+00103     { 0x07, 0x03, 0x02, "Hayes Compatible Modem, 16550" },
+00104     { 0x07, 0x03, 0x03, "Hayes Compatible Modem, 16650" },
+00105     { 0x07, 0x03, 0x04, "Hayes Compatible Modem, 16750" },
+00106     { 0x07, 0x80, 0x00, "Other" },
+00107 
+00108     { 0x08, 0x00, 0x00, "PIC" },
+00109     { 0x08, 0x00, 0x01, "ISA PIC" },
+00110     { 0x08, 0x00, 0x02, "EISA PIC" },
+00111     { 0x08, 0x00, 0x10, "I/O APIC" },
+00112     { 0x08, 0x00, 0x20, "I/O(x) APIC" },
+00113     { 0x08, 0x01, 0x00, "DMA" },
+00114     { 0x08, 0x01, 0x01, "ISA DMA" },
+00115     { 0x08, 0x01, 0x02, "EISA DMA" },
+00116     { 0x08, 0x02, 0x00, "Timer" },
+00117     { 0x08, 0x02, 0x01, "ISA Timer" },
+00118     { 0x08, 0x02, 0x02, "EISA Timer" },
+00119     { 0x08, 0x03, 0x00, "RTC" },
+00120     { 0x08, 0x03, 0x00, "ISA RTC" },
+00121     { 0x08, 0x03, 0x00, "Hot-Plug" },
+00122     { 0x08, 0x80, 0x00, "Other" },
+00123 
+00124     { 0x09, 0x00, 0x00, "Keyboard" },
+00125     { 0x09, 0x01, 0x00, "Pen" },
+00126     { 0x09, 0x02, 0x00, "Mouse" },
+00127     { 0x09, 0x03, 0x00, "Scanner" },
+00128     { 0x09, 0x04, 0x00, "Game Port" },
+00129     { 0x09, 0x80, 0x00, "Other" },
+00130 
+00131     { 0x0a, 0x00, 0x00, "Generic" },
+00132     { 0x0a, 0x80, 0x00, "Other" },
+00133 
+00134     { 0x0b, 0x00, 0x00, "386" },
+00135     { 0x0b, 0x01, 0x00, "486" },
+00136     { 0x0b, 0x02, 0x00, "Pentium" },
+00137     { 0x0b, 0x03, 0x00, "PentiumPro" },
+00138     { 0x0b, 0x10, 0x00, "DEC Alpha" },
+00139     { 0x0b, 0x20, 0x00, "PowerPC" },
+00140     { 0x0b, 0x30, 0x00, "MIPS" },
+00141     { 0x0b, 0x40, 0x00, "Coprocessor" },
+00142     { 0x0b, 0x80, 0x00, "Other" },
+00143 
+00144     { 0x0c, 0x00, 0x00, "FireWire" },
+00145     { 0x0c, 0x00, 0x10, "OHCI FireWire" },
+00146     { 0x0c, 0x01, 0x00, "Access.bus" },
+00147     { 0x0c, 0x02, 0x00, "SSA" },
+00148     { 0x0c, 0x03, 0x00, "USB (UHCI)" },
+00149     { 0x0c, 0x03, 0x10, "USB (OHCI)" },
+00150     { 0x0c, 0x03, 0x80, "USB" },
+00151     { 0x0c, 0x03, 0xFE, "USB Device" },
+00152     { 0x0c, 0x04, 0x00, "Fiber" },
+00153     { 0x0c, 0x05, 0x00, "SMBus Controller" },
+00154     { 0x0c, 0x06, 0x00, "InfiniBand" },
+00155     { 0x0c, 0x80, 0x00, "Other" },
+00156 
+00157     { 0x0d, 0x00, 0x00, "iRDA" },
+00158     { 0x0d, 0x01, 0x00, "Consumer IR" },
+00159     { 0x0d, 0x10, 0x00, "RF" },
+00160     { 0x0d, 0x80, 0x00, "Other" },
+00161 
+00162     { 0x0e, 0x00, 0x00, "I2O" },
+00163     { 0x0e, 0x80, 0x00, "Other" },
+00164 
+00165     { 0x0f, 0x01, 0x00, "TV" },
+00166     { 0x0f, 0x02, 0x00, "Audio" },
+00167     { 0x0f, 0x03, 0x00, "Voice" },
+00168     { 0x0f, 0x04, 0x00, "Data" },
+00169     { 0x0f, 0x80, 0x00, "Other" },
+00170 
+00171     { 0x10, 0x00, 0x00, "Network" },
+00172     { 0x10, 0x10, 0x00, "Entertainment" },
+00173     { 0x10, 0x80, 0x00, "Other" },
+00174 
+00175     { 0x11, 0x00, 0x00, "DPIO Modules" },
+00176     { 0x11, 0x01, 0x00, "Performance Counters" },
+00177     { 0x11, 0x10, 0x00, "Comm Sync, Time+Frequency Measurement" },
+00178     { 0x11, 0x80, 0x00, "Other" },       
+00179     
+00180   };
+00181 
+00182 uInt32 pciRead(int bus,int dev,int func,int reg,int bytes) {
+00183   uInt16 base;
+00184 
+00185   union {
+00186     struct confadd c;
+00187     uInt32 n;
+00188     } u;
+00189 
+00190   u.n = 0;
+00191   u.c.enable = 1;
+00192   u.c.rsvd = 0;
+00193   u.c.bus = bus;
+00194   u.c.dev = dev;
+00195   u.c.func = func;
+00196   u.c.reg = reg & 0xFC;
+00197   
+00198   outportDWord(0xCF8, u.n);
+00199 
+00200   base = 0xCFC + (reg & 0x03);
+00201 
+00202   switch(bytes){
+00203     case 1: return(inportByte(base));
+00204     case 2: return(inportWord(base));
+00205     case 4: return(inportDWord(base));
+00206     default: return 0;
+00207     }
+00208   }
+00209 
+00210 void pciWrite(int bus,int dev,int func,int reg,uInt32 v,int bytes) {
+00211   uInt16 base;
+00212 
+00213   union {
+00214     struct confadd c;
+00215     uInt32 n;
+00216     } u;
+00217 
+00218   u.n = 0;
+00219   u.c.enable = 1;
+00220   u.c.rsvd = 0;
+00221   u.c.bus = bus;
+00222   u.c.dev = dev;
+00223   u.c.func = func;
+00224   u.c.reg = reg & 0xFC;
+00225 
+00226   base = 0xCFC + (reg & 0x03);
+00227   outportDWord(0xCF8, u.n);
+00228   switch(bytes){
+00229     case 1: outportByte(base, (uInt8) v); break;
+00230     case 2: outportWord(base, (uInt16) v); break;
+00231     case 4: outportDWord(base, v); break;
+00232     }
+00233   }
+00234 
+00235 
+00236 bool pciProbe(int bus, int dev, int func,struct pciConfig *cfg) {
+00237   uInt32 *word = (uInt32 *) cfg;
+00238   uInt32 v;
+00239   int i;
+00240   for(i=0;i<4;i++) {
+00241     word[i] = pciRead(bus,dev,func,4*i,4);
+00242     }
+00243   if(cfg->vendorId == 0xffff) return FALSE;
+00244   if(cfg->vendorId == 0x0)    return FALSE; /* Quick Hack */
+00245 
+00246   cfg->bus = bus;
+00247   cfg->dev = dev;
+00248   cfg->func = func;
+00249   cfg->subsysVendor = pciRead(bus, dev, func, 0x2c, 2);
+00250   cfg->subsys = pciRead(bus, dev, func, 0x2e, 2);
+00251   kprintf("Device Info: /bus/pci/%d/%d/%d\n",bus,dev,func);
+00252   kprintf("  * Vendor: %X   Device: %X  Class/SubClass/Interface %X/%X/%X\n",cfg->vendorId,cfg->deviceId,cfg->baseClass,cfg->subClass,cfg->interface);
+00253   kprintf("  * Status: %X  Command: %X  BIST/Type/Lat/CLS: %X/%X/%X/%X\n",cfg->status, cfg->command, cfg->bist, cfg->headerType,cfg->latencyTimer, cfg->cacheLineSize);
+00254   switch(cfg->headerType & 0x7F){
+00255     case 0: /* normal device */
+00256       for(i=0;i<6;i++) {
+00257       v = pciRead(bus,dev,func,i*4 + 0x10, 4);
+00258       if(v) {
+00259         int v2;
+00260         pciWrite(bus,dev,func,i*4 + 0x10, 0xffffffff, 4);
+00261         v2 = pciRead(bus,dev,func,i*4+0x10, 4) & 0xfffffff0;
+00262         pciWrite(bus,dev,func,i*4 + 0x10, v, 4);
+00263         v2 = 1 + ~v2;
+00264         if(v & 1) {
+00265           cfg->base[i] = v & 0xffff;
+00266           cfg->size[i] = v2 & 0xffff;
+00267           }
+00268         else {
+00269           cfg->base[i] = v;
+00270           cfg->size[i] = v2;
+00271           }
+00272         }
+00273       else {
+00274         cfg->base[i] = 0;
+00275         cfg->size[i] = 0;
+00276         }
+00277       }
+00278       v = pciRead(bus,dev,func,0x3c,1);
+00279       cfg->irq = (v == 0xff ? 0 : v);
+00280       break;
+00281     case 1:
+00282       kprintf("  * PCI <-> PCI Bridge\n");
+00283       break;
+00284     default:
+00285       kprintf("  * Unknown Header Type\n");
+00286       break;
+00287     }
+00288 
+00289   return(TRUE);
+00290   }
+00291 
+00292 int pci_init() {
+00293   uInt16 bus,dev,func;
+00294   int i = 0x0;
+00295   struct pciConfig pcfg;
+00296   for (bus = 0x0; bus < 0x2; bus++) { /* 255 */
+00297     for (dev = 0; dev < 32; dev++) {
+00298       for (func = 0; func < 8; func++) {
+00299         if (pciProbe(bus, dev, func, &pcfg) == TRUE) {
+00300           /* kprintf("  * Vendor: %X   Device: %X  Class/SubClass/Interface %X/%X/%X\n",pcfg.vendorId,pcfg.deviceId,pcfg.baseClass,pcfg.subClass,pcfg.interface); */
+00301           for (i=0x0;i<countof(pciClasses);i++) {
+00302             if (pcfg.baseClass == pciClasses[i].baseClass && pcfg.subClass == pciClasses[i].subClass && pcfg.interface == pciClasses[i].interface) {
+00303               kprintf("PCI Device: %s @ IRQ: 0x%X\n",pciClasses[i].name,pcfg.irq);
+00304               break;
+00305               }
+00306             }
+00307           }
+00308         }
+00309       }
+00310     }
+00311   return(0x0);
+00312   }
+00313 
+00314 /***
+00315  $Log$
+00316  Revision 1.1.1.1  2006/06/01 12:46:16  reddawg
+00317  ubix2
+00318 
+00319  Revision 1.2  2005/10/12 00:13:37  reddawg
+00320  Removed
+00321 
+00322  Revision 1.1.1.1  2005/09/26 17:24:36  reddawg
+00323  no message
+00324 
+00325  Revision 1.4  2004/08/20 17:49:13  reddawg
+00326  Tiny fixens
+00327 
+00328  Revision 1.3  2004/08/20 16:49:11  reddawg
+00329  PCI Updates - More to follow as PCI system gets revamped
+00330 
+00331  Revision 1.2  2004/07/09 11:58:19  reddawg
+00332  Updating Driver Routines
+00333 
+00334  Revision 1.1.1.1  2004/04/15 12:07:16  reddawg
+00335  UbixOS v1.0
+00336 
+00337  Revision 1.5  2004/04/13 16:36:33  reddawg
+00338  Changed our copyright, it is all now under a BSD-Style license
+00339 
+00340  END
+00341  ***/
+

Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/pci_8c.html b/doc/html/pci_8c.html new file mode 100644 index 0000000..f89a6d9 --- /dev/null +++ b/doc/html/pci_8c.html @@ -0,0 +1,341 @@ + + +UbixOS V2: src/sys/pci/pci.c File Reference + + + + +
+
+
+
+ +

pci.c File Reference

+

+#include <pci/pci.h>
+#include <sys/io.h>
+#include <ubixos/types.h>
+#include <lib/kprintf.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + +

Functions

int pci_init ()
bool pciProbe (int bus, int dev, int func, struct pciConfig *cfg)
uInt32 pciRead (int bus, int dev, int func, int reg, int bytes)
void pciWrite (int bus, int dev, int func, int reg, uInt32 v, int bytes)

Variables

struct {
   uInt8   baseClass
   uInt8   interface
   const char *   name
   uInt8   subClass
pciClasses []
+


Function Documentation

+ +
+
+ + + + + + + + +
int pci_init (  ) 
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool pciProbe (int  bus,
int  dev,
int  func,
struct pciConfig cfg 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
uInt32 pciRead (int  bus,
int  dev,
int  func,
int  reg,
int  bytes 
)
+
+
+ +

+ +

+Definition at line 182 of file pci.c. +

+References inportByte(), inportDWord(), inportWord(), and outportDWord(). +

+Referenced by pciProbe(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void pciWrite (int  bus,
int  dev,
int  func,
int  reg,
uInt32  v,
int  bytes 
)
+
+
+ +

+ +

+Definition at line 210 of file pci.c. +

+References outportByte(), outportDWord(), and outportWord(). +

+Referenced by pciProbe(). +

+

+


Variable Documentation

+ +
+
+ + + + +
uInt8 baseClass
+
+
+ +

+ +

+Definition at line 36 of file pci.c. +

+

+ +

+
+ + + + +
uInt8 interface
+
+
+ +

+ +

+Definition at line 38 of file pci.c. +

+

+ +

+
+ + + + +
const char* name
+
+
+ +

+ +

+Definition at line 39 of file pci.c. +

+Referenced by __sysctl(), def_ctls(), initHardDisk(), lookup(), lwip_bind(), lwip_connect(), main(), pci_init(), and UbixFS::vfs_mkdir(). +

+

+ +

+
+ + + + +
struct { ... } pciClasses[]
+
+
+ +

+ +

+Referenced by pci_init(). +

+

+ +

+
+ + + + +
uInt8 subClass
+
+
+ +

+ +

+Definition at line 37 of file pci.c. +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/pci_8h-source.html b/doc/html/pci_8h-source.html new file mode 100644 index 0000000..64924ef --- /dev/null +++ b/doc/html/pci_8h-source.html @@ -0,0 +1,144 @@ + + +UbixOS V2: src/sys/include/pci/pci.h Source File + + + + +
+
+
+
+ +

pci.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _PCI_H
+00031 #define _PCI_H
+00032 
+00033 #include <ubixos/types.h>
+00034 
+00035 
+00036 struct pciConfig {
+00037   uInt16 vendorId;
+00038   uInt16 deviceId;
+00039 
+00040   uInt16 command;
+00041   uInt16 status;
+00042 
+00043   uInt8  revisionId;
+00044   uInt8  interface;
+00045   uInt8  subClass;
+00046   uInt8  baseClass;
+00047 
+00048   uInt8  cacheLineSize;
+00049   uInt8  latencyTimer;
+00050   uInt8  headerType;
+00051   uInt8  bist;
+00052 
+00053   /* device info */
+00054   uInt8  bus;
+00055   uInt8  dev;
+00056   uInt8  func;
+00057   uInt8  irq;
+00058 
+00059   /* base registers */
+00060   uInt32 base[6];
+00061   uInt32 size[6];
+00062 
+00063   uInt16 subsysVendor;
+00064   uInt16 subsys;
+00065   
+00066   };
+00067 
+00068 struct confadd {
+00069   uInt8 reg:8;
+00070   uInt8 func:3;
+00071   uInt8 dev:5;
+00072   uInt8 bus:8;
+00073   uInt8 rsvd:7;
+00074   uInt8 enable:1;
+00075   };
+00076 
+00077 #define countof(a)     (sizeof(a) / sizeof(a[0]))
+00078   
+00079 int pci_init();
+00080 
+00081 
+00082 bool pciProbe(int bus,int dev,int func,struct pciConfig *cfg);
+00083 uInt32 pciRead(int bus, int dev, int func, int reg, int bytes);
+00084 void pciWrite(int bus,int dev,int func,int reg,uInt32 v,int bytes);
+00085 
+00086 #endif
+00087 
+00088 /***
+00089  $Log$
+00090  Revision 1.1.1.1  2006/06/01 12:46:14  reddawg
+00091  ubix2
+00092 
+00093  Revision 1.2  2005/10/12 00:13:37  reddawg
+00094  Removed
+00095 
+00096  Revision 1.1.1.1  2005/09/26 17:23:51  reddawg
+00097  no message
+00098 
+00099  Revision 1.3  2004/08/20 16:49:11  reddawg
+00100  PCI Updates - More to follow as PCI system gets revamped
+00101 
+00102  Revision 1.2  2004/05/21 15:05:07  reddawg
+00103  Cleaned up
+00104 
+00105 
+00106  END
+00107  ***/
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/pci_8h.html b/doc/html/pci_8h.html new file mode 100644 index 0000000..d61b0a9 --- /dev/null +++ b/doc/html/pci_8h.html @@ -0,0 +1,270 @@ + + +UbixOS V2: src/sys/include/pci/pci.h File Reference + + + + +
+
+
+
+ +

pci.h File Reference

+

+#include <ubixos/types.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + +

Data Structures

struct  confadd
struct  pciConfig

Defines

#define countof(a)   (sizeof(a) / sizeof(a[0]))

Functions

int pci_init ()
bool pciProbe (int bus, int dev, int func, struct pciConfig *cfg)
uInt32 pciRead (int bus, int dev, int func, int reg, int bytes)
void pciWrite (int bus, int dev, int func, int reg, uInt32 v, int bytes)
+


Define Documentation

+ +
+
+ + + + + + + + + +
#define countof (  )    (sizeof(a) / sizeof(a[0]))
+
+
+ +

+ +

+Definition at line 77 of file pci.h. +

+Referenced by pci_init(). +

+

+


Function Documentation

+ +
+
+ + + + + + + + +
int pci_init (  ) 
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool pciProbe (int  bus,
int  dev,
int  func,
struct pciConfig cfg 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
uInt32 pciRead (int  bus,
int  dev,
int  func,
int  reg,
int  bytes 
)
+
+
+ +

+ +

+Definition at line 182 of file pci.c. +

+References inportByte(), inportDWord(), inportWord(), and outportDWord(). +

+Referenced by pciProbe(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void pciWrite (int  bus,
int  dev,
int  func,
int  reg,
uInt32  v,
int  bytes 
)
+
+
+ +

+ +

+Definition at line 210 of file pci.c. +

+References outportByte(), outportDWord(), and outportWord(). +

+Referenced by pciProbe(). +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/perf_8h-source.html b/doc/html/perf_8h-source.html new file mode 100644 index 0000000..376d2da --- /dev/null +++ b/doc/html/perf_8h-source.html @@ -0,0 +1,103 @@ + + +UbixOS V2: src/sys/include/net/arch/perf.h Source File + + + + +
+
+
+
+ +

perf.h

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 #ifndef __ARCH_PERF_H__
+00036 #define __ARCH_PERF_H__
+00037 
+00038 #include <ubixos/times.h>
+00039 
+00040 #ifdef PERF
+00041 #define PERF_START  { \
+00042                          unsigned long __c1l, __c1h, __c2l, __c2h; \
+00043                          __asm__(".byte 0x0f, 0x31" : "=a" (__c1l), "=d" (__c1h))
+00044 #define PERF_STOP(x)   __asm__(".byte 0x0f, 0x31" : "=a" (__c2l), "=d" (__c2h)); \
+00045                        perf_print(__c1l, __c1h, __c2l, __c2h, x);}
+00046 
+00047 /*#define PERF_START do { \
+00048                      struct tms __perf_start, __perf_end; \
+00049                      times(&__perf_start)
+00050 #define PERF_STOP(x) times(&__perf_end); \
+00051                      perf_print_times(&__perf_start, &__perf_end, x);\
+00052                      } while(0)*/
+00053 #else /* PERF */
+00054 #define PERF_START    /* null definition */
+00055 #define PERF_STOP(x)  /* null definition */
+00056 #endif /* PERF */
+00057 
+00058 void perf_print(unsigned long c1l, unsigned long c1h,
+00059                 unsigned long c2l, unsigned long c2h,
+00060                 char *key);
+00061 
+00062 void perf_print_times(struct tms *start, struct tms *end, char *key);
+00063 
+00064 void perf_init(char *fname);
+00065 
+00066 #endif /* __ARCH_PERF_H__ */
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/perf_8h.html b/doc/html/perf_8h.html new file mode 100644 index 0000000..fc114f7 --- /dev/null +++ b/doc/html/perf_8h.html @@ -0,0 +1,200 @@ + + +UbixOS V2: src/sys/include/net/arch/perf.h File Reference + + + + +
+
+
+
+ +

perf.h File Reference

+

+#include <ubixos/times.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + +

Defines

#define PERF_START
#define PERF_STOP(x)

Functions

void perf_init (char *fname)
void perf_print (unsigned long c1l, unsigned long c1h, unsigned long c2l, unsigned long c2h, char *key)
void perf_print_times (struct tms *start, struct tms *end, char *key)
+


Define Documentation

+ +
+
+ + + + +
#define PERF_START
+
+
+ +

+ +

+Definition at line 54 of file perf.h. +

+

+ +

+
+ + + + + + + + + +
#define PERF_STOP (  ) 
+
+
+ +

+ +

+Definition at line 55 of file perf.h. +

+

+


Function Documentation

+ +
+
+ + + + + + + + + +
void perf_init (char *  fname  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void perf_print (unsigned long  c1l,
unsigned long  c1h,
unsigned long  c2l,
unsigned long  c2h,
char *  key 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void perf_print_times (struct tms start,
struct tms end,
char *  key 
)
+
+
+ +

+ +

+

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/pipe_8c-source.html b/doc/html/pipe_8c-source.html new file mode 100644 index 0000000..2d15e78 --- /dev/null +++ b/doc/html/pipe_8c-source.html @@ -0,0 +1,91 @@ + + +UbixOS V2: src/sys/kernel/pipe.c Source File + + + + +
+
+
+
+ +

pipe.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <ubixos/types.h>
+00031 #include <sys/sysproto.h>
+00032 #include <sys/thread.h>
+00033 #include <sys/pipe.h>
+00034 #include <sys/kern_descrip.h>
+00035 #include <lib/kprintf.h>
+00036 #include <assert.h>
+00037 
+00038 int pipe(struct thread *td, struct pipe_args *uap) {
+00039   struct file *rf, *wf;
+00040   int fd = 0x0;
+00041   kprintf("PIPE");
+00042   falloc(td,&rf,&fd);
+00043   rf->f_flag = FREAD | FWRITE;
+00044   td->td_retval[0] = fd;
+00045   falloc(td,&wf,&fd);
+00046   wf->f_flag = FREAD | FWRITE;
+00047   td->td_retval[1] = fd;
+00048   return(0x0);
+00049   }
+00050 
+00051 /***
+00052  END
+00053  ***/
+00054 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/pipe_8c.html b/doc/html/pipe_8c.html new file mode 100644 index 0000000..cece4d9 --- /dev/null +++ b/doc/html/pipe_8c.html @@ -0,0 +1,88 @@ + + +UbixOS V2: src/sys/kernel/pipe.c File Reference + + + + +
+
+
+
+ +

pipe.c File Reference

+

+#include <ubixos/types.h>
+#include <sys/sysproto.h>
+#include <sys/thread.h>
+#include <sys/pipe.h>
+#include <sys/kern_descrip.h>
+#include <lib/kprintf.h>
+#include <assert.h>
+ +

+Go to the source code of this file. + + + + +

Functions

int pipe (struct thread *td, struct pipe_args *uap)
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
int pipe (struct thread td,
struct pipe_args uap 
)
+
+
+ +

+ +

+Definition at line 38 of file pipe.c. +

+References file::f_flag, falloc(), FREAD, FWRITE, kprintf(), and thread::td_retval. +

+

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/pipe_8h-source.html b/doc/html/pipe_8h-source.html new file mode 100644 index 0000000..8adb677 --- /dev/null +++ b/doc/html/pipe_8h-source.html @@ -0,0 +1,80 @@ + + +UbixOS V2: src/sys/include/sys/pipe.h Source File + + + + +
+
+
+
+ +

pipe.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _PIPE_H
+00031 #define _PIPE_H
+00032 
+00033 #include <sys/thread.h>
+00034 #include <sys/sysproto.h>
+00035 
+00036 int pipe(struct thread *, struct pipe_args *);
+00037 
+00038 #endif
+00039 
+00040 /***
+00041  END
+00042  ***/
+00043 
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/pipe_8h.html b/doc/html/pipe_8h.html new file mode 100644 index 0000000..b37bdcc --- /dev/null +++ b/doc/html/pipe_8h.html @@ -0,0 +1,81 @@ + + +UbixOS V2: src/sys/include/sys/pipe.h File Reference + + + + +
+
+
+
+ +

pipe.h File Reference

+

+#include <sys/thread.h>
+#include <sys/sysproto.h>
+ +

+Go to the source code of this file. + + + + +

Functions

int pipe (struct thread *, struct pipe_args *)
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
int pipe (struct thread,
struct pipe_args 
)
+
+
+ +

+ +

+Definition at line 38 of file pipe.c. +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/pit_8c-source.html b/doc/html/pit_8c-source.html new file mode 100644 index 0000000..a2ce4c5 --- /dev/null +++ b/doc/html/pit_8c-source.html @@ -0,0 +1,145 @@ + + +UbixOS V2: src/sys/isa/pit.c Source File + + + + +
+
+
+
+ +

pit.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <isa/pit.h>
+00031 #include <sys/io.h>
+00032 #include <lib/kprintf.h>
+00033 
+00034 /*****************************************************************************************
+00035 
+00036  Function: int pitInit()
+00037 
+00038  Description: This Function Will Initialize The Programmable Timer
+00039 
+00040  Notes:
+00041 
+00042  0040   r/w     PIT  counter 0, counter divisor       (XT, AT, PS/2)
+00043  0041   r/w     PIT  counter 1, RAM refresh counter   (XT, AT)
+00044  0042   r/w     PIT  counter 2, cassette & speaker    (XT, AT, PS/2)
+00045  0043   r/w     PIT  mode port, control word register for counters 0-2
+00046 
+00047                  bit 7-6 = 00  counter 0 select
+00048                          = 01  counter 1 select   (not PS/2)
+00049                          = 10  counter 2 select
+00050                  bit 5-4 = 00  counter latch command
+00051                          = 01  read/write counter bits 0-7 only
+00052                          = 10  read/write counter bits 8-15 only
+00053                          = 11  read/write counter bits 0-7 first, then 8-15
+00054                  bit 3-1 = 000 mode 0 select
+00055                          = 001 mode 1 select - programmable one shot
+00056                          = x10 mode 2 select - rate generator
+00057                          = x11 mode 3 select - square wave generator
+00058                          = 100 mode 4 select - software triggered strobe
+00059                          = 101 mode 5 select - hardware triggered strobe
+00060                  bit 0   = 0   binary counter 16 bits
+00061                          = 1   BCD counter
+00062 
+00063 *****************************************************************************************/
+00064 int pit_init() {
+00065   outportByteP(0x43,0x36);
+00066   outportByteP(0x40,((1193180/PIT_TIMER) & 0xFF));
+00067   outportByte(0x40,(((1193180/PIT_TIMER) >> 8) & 0xFF));
+00068 
+00069   /* Print out information on the PIT */
+00070   kprintf("pit0 - Port [0x%X], Timer Hz: [%iHz]\n",0x43,PIT_TIMER);
+00071 
+00072   /* Return so we know everything went well */
+00073   return(0x0);
+00074   }
+00075 
+00076 /***
+00077  $Log$
+00078  Revision 1.1.1.1  2006/06/01 12:46:12  reddawg
+00079  ubix2
+00080 
+00081  Revision 1.2  2005/10/12 00:13:37  reddawg
+00082  Removed
+00083 
+00084  Revision 1.1.1.1  2005/09/26 17:24:03  reddawg
+00085  no message
+00086 
+00087  Revision 1.7  2004/07/16 04:06:32  reddawg
+00088  Tune ups this stuff should of been taken care of months ago
+00089 
+00090  Revision 1.6  2004/07/16 01:08:58  reddawg
+00091  Whew we work once again
+00092 
+00093  Revision 1.5  2004/07/09 13:29:15  reddawg
+00094  pit: pitInit to pit_init
+00095  Adjusted initialization routines
+00096 
+00097  Revision 1.4  2004/05/21 12:48:22  reddawg
+00098  Cleaned up
+00099 
+00100  Revision 1.3  2004/05/20 22:51:09  reddawg
+00101  Cleaned Up Warnings
+00102 
+00103  Revision 1.2  2004/05/10 02:23:24  reddawg
+00104  Minor Changes To Source Code To Prepare It For Open Source Release
+00105 
+00106  END
+00107  ***/
+00108 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/pit_8c.html b/doc/html/pit_8c.html new file mode 100644 index 0000000..81a05e7 --- /dev/null +++ b/doc/html/pit_8c.html @@ -0,0 +1,74 @@ + + +UbixOS V2: src/sys/isa/pit.c File Reference + + + + +
+
+
+
+ +

pit.c File Reference

+

+#include <isa/pit.h>
+#include <sys/io.h>
+#include <lib/kprintf.h>
+ +

+Go to the source code of this file. + + + + +

Functions

int pit_init ()
+


Function Documentation

+ +
+
+ + + + + + + + +
int pit_init (  ) 
+
+
+ +

+ +

+Definition at line 64 of file pit.c. +

+References kprintf(), outportByte(), outportByteP(), and PIT_TIMER. +

+

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/pit_8h-source.html b/doc/html/pit_8h-source.html new file mode 100644 index 0000000..5b2d0cb --- /dev/null +++ b/doc/html/pit_8h-source.html @@ -0,0 +1,105 @@ + + +UbixOS V2: src/sys/include/isa/pit.h Source File + + + + +
+
+
+
+ +

pit.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _PIT_H
+00031 #define _PIT_H
+00032 
+00033 #define PIT_TIMER 200
+00034 
+00035 int pit_init();
+00036 
+00037 #endif
+00038 
+00039 /***
+00040  $Log$
+00041  Revision 1.1.1.1  2006/06/01 12:46:14  reddawg
+00042  ubix2
+00043 
+00044  Revision 1.2  2005/10/12 00:13:36  reddawg
+00045  Removed
+00046 
+00047  Revision 1.1.1.1  2005/09/26 17:23:40  reddawg
+00048  no message
+00049 
+00050  Revision 1.6  2004/08/14 11:23:02  reddawg
+00051  Changes
+00052 
+00053  Revision 1.5  2004/07/16 04:06:32  reddawg
+00054  Tune ups this stuff should of been taken care of months ago
+00055 
+00056  Revision 1.4  2004/07/16 01:08:58  reddawg
+00057  Whew we work once again
+00058 
+00059  Revision 1.3  2004/07/09 13:29:15  reddawg
+00060  pit: pitInit to pit_init
+00061  Adjusted initialization routines
+00062 
+00063  Revision 1.2  2004/05/21 14:57:16  reddawg
+00064  Cleaned up
+00065 
+00066  END
+00067  ***/
+00068 
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/pit_8h.html b/doc/html/pit_8h.html new file mode 100644 index 0000000..a73402c --- /dev/null +++ b/doc/html/pit_8h.html @@ -0,0 +1,94 @@ + + +UbixOS V2: src/sys/include/isa/pit.h File Reference + + + + +
+
+
+
+ +

pit.h File Reference

+

+ +

+Go to the source code of this file. + + + + + + + +

Defines

#define PIT_TIMER   200

Functions

int pit_init ()
+


Define Documentation

+ +
+
+ + + + +
#define PIT_TIMER   200
+
+
+ +

+ +

+Definition at line 33 of file pit.h. +

+Referenced by pit_init(). +

+

+


Function Documentation

+ +
+
+ + + + + + + + +
int pit_init (  ) 
+
+
+ +

+ +

+Definition at line 64 of file pit.c. +

+References kprintf(), outportByte(), outportByteP(), and PIT_TIMER. +

+

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ramdrive_8cpp-source.html b/doc/html/ramdrive_8cpp-source.html new file mode 100644 index 0000000..ed9b42f --- /dev/null +++ b/doc/html/ramdrive_8cpp-source.html @@ -0,0 +1,216 @@ + + +UbixOS V2: src/sys/ubixfsv2/ramdrive.cpp Source File + + + + +
+
+
+
+ +

ramdrive.cpp

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <stdlib.h>
+00031 #include <stdio.h>
+00032 #include <string.h>
+00033 #include <assert.h>
+00034 #include "device.h"
+00035 
+00036 
+00037 static char *ram_data = 0x0;
+00038 
+00039 #define RAM_DRIVE_SIZE 1024*1024*100
+00040 
+00041 static 
+00042 int 
+00043 ramDrive_read(device_t *dev,void *ptr,off_t offset,size_t length) {
+00044   char *data = ram_data + (offset*512);
+00045   assert(ram_data);
+00046   assert(offset+length <= dev->sectors); 
+00047   memcpy(ptr, data, length * 512);
+00048   
+00049   return(length);
+00050 }
+00051   
+00052 static 
+00053 int  
+00054 ramDrive_write(device_t *dev,void *ptr,off_t offset,size_t length) {
+00055   char *data = ram_data + (offset*512);
+00056   assert(ram_data);
+00057 
+00058   assert(offset+length <= dev->sectors); 
+00059   
+00060   memcpy(data, ptr, length * 512);
+00061   
+00062   return(length);
+00063 }
+00064   
+00065 device_t *
+00066 dev_ramDrive(void) {
+00067   device_t *ramDrive = 0x0;
+00068   
+00069   FILE *ramDisk;
+00070   
+00071   ramDisk = fopen("./ram.dsk","rb");
+00072 
+00073   ramDrive = (device_t *)malloc(sizeof(device_t));
+00074   
+00075   ram_data = (char *)malloc(RAM_DRIVE_SIZE);
+00076   
+00077   if (ramDisk != 0x0) {
+00078     printf("Loaded Ram Disk\n");
+00079     fread(ram_data,RAM_DRIVE_SIZE,1,ramDisk);
+00080     fclose(ramDisk);
+00081     }
+00082   
+00083   ramDrive->major = 0x1;
+00084   ramDrive->sectors = RAM_DRIVE_SIZE / 512;
+00085   
+00086   ramDrive->read = ramDrive_read;
+00087   ramDrive->write = ramDrive_write;
+00088   
+00089   printf("leaving dev_ramDrive()\n");
+00090   return(ramDrive);
+00091 
+00092 } // dev_ramDrive
+00093   
+00094 int 
+00095 dev_ramDestroy(void) {
+00096   printf("dev_ramDestroy()\n");
+00097   FILE *ramDisk;
+00098   
+00099   ramDisk = fopen("./ram.dsk","wb");
+00100   
+00101   fwrite(ram_data, RAM_DRIVE_SIZE ,1,ramDisk);
+00102   
+00103   fclose(ramDisk);
+00104   
+00105   printf("Saved Ram Disk\n");
+00106   
+00107   return(0x0);
+00108 } // dev_ramDestroy
+00109 
+00110 /***
+00111  $Log$
+00112  Revision 1.1.1.1  2006/06/01 12:46:15  reddawg
+00113  ubix2
+00114 
+00115  Revision 1.2  2005/10/12 00:13:38  reddawg
+00116  Removed
+00117 
+00118  Revision 1.1.1.1  2005/09/26 17:24:45  reddawg
+00119  no message
+00120 
+00121  Revision 1.5  2004/09/20 00:53:04  flameshadow
+00122  chg: UbixFS::vfs_read() now works for direct block extents
+00123  chg: UbixFS::vfs_read() returns ~0 on error, or the size read in on success
+00124  chg: UbixFS::root member is now a fileDescriptor
+00125  chg: UbixFS::vfs_init() creates a file descriptor for the root dir
+00126  chg: UbixFS::vfs_format() now sets all values in the bTreeHeader before writing
+00127  chg: UbixFS::vfs_format() sets the inode magic number
+00128  chg: device_t::read(device_t *, void *, off_t, size_t)
+00129  chg: device_t::write(device_t *, void *, off_t, size_t)
+00130  chg: vfs_abstract::vfs_read(fileDescriptor *, void *, off_t, size_t)
+00131  chg: vfs_abstract::vfs_write(fileDescriptor *, void *, off_t, size_t)
+00132  chg: ramDrive_read(device_t *dev,void *ptr,off_t offset,size_t length)
+00133  chg: ramDrive_write(device_t *dev,void *ptr,off_t offset,size_t length)
+00134 
+00135  Revision 1.4  2004/09/13 20:10:11  flameshadow
+00136  chg: UbixFS::vfs_format() works
+00137  chg: UbixFS::vfs_init() works
+00138 
+00139  Revision 1.3  2004/09/13 15:48:29  flameshadow
+00140  chg: oops, the ramDrive is 100MB, not 512MB
+00141 
+00142  Revision 1.2  2004/09/13 15:21:26  flameshadow
+00143  add: ramdrive.h
+00144  chg: renamed device_t.size to sectors
+00145  chg: made #define for size of ramdisk
+00146  chg: calculated sectors of ramdisk and stored in the device_t struct
+00147 
+00148  Revision 1.1  2004/09/13 14:37:49  flameshadow
+00149  add: ramdrive.cpp
+00150  chg: added ramdrive to the makefile
+00151  chg: finished root dir inode initialization and saving in UbixFS::format()
+00152 
+00153  Revision 1.8  2004/08/30 13:29:08  reddawg
+00154  Fixed ramdisk to write/read 512 blocks
+00155 
+00156  Revision 1.7  2004/08/13 22:06:54  reddawg
+00157  UbixFS: fixed the test shell
+00158 
+00159  Revision 1.6  2004/08/13 21:47:49  reddawg
+00160  Fixed
+00161 
+00162  Revision 1.5  2004/08/13 17:25:06  reddawg
+00163  Testing better
+00164 
+00165  Revision 1.4  2004/08/13 17:07:32  reddawg
+00166  Works
+00167 
+00168  Revision 1.3  2004/08/13 16:58:57  reddawg
+00169  test
+00170 
+00171  Revision 1.2  2004/08/13 16:54:14  reddawg
+00172  fixed
+00173 
+00174  Revision 1.1  2004/08/13 16:51:55  reddawg
+00175  Start of ubixfs shell
+00176 
+00177  END
+00178  ***/
+00179 
+

Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ramdrive_8cpp.html b/doc/html/ramdrive_8cpp.html new file mode 100644 index 0000000..d15d3c8 --- /dev/null +++ b/doc/html/ramdrive_8cpp.html @@ -0,0 +1,251 @@ + + +UbixOS V2: src/sys/ubixfsv2/ramdrive.cpp File Reference + + + + +
+
+
+
+ +

ramdrive.cpp File Reference

+

+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+#include "device.h"
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + +

Defines

#define RAM_DRIVE_SIZE   1024*1024*100

Functions

int dev_ramDestroy (void)
device_tdev_ramDrive (void)
static int ramDrive_read (device_t *dev, void *ptr, off_t offset, size_t length)
static int ramDrive_write (device_t *dev, void *ptr, off_t offset, size_t length)

Variables

static char * ram_data = 0x0
+


Define Documentation

+ +
+
+ + + + +
#define RAM_DRIVE_SIZE   1024*1024*100
+
+
+ +

+ +

+Definition at line 39 of file ramdrive.cpp. +

+Referenced by dev_ramDestroy(), and dev_ramDrive(). +

+

+


Function Documentation

+ +
+
+ + + + + + + + + +
int dev_ramDestroy (void   ) 
+
+
+ +

+ +

+Definition at line 95 of file ramdrive.cpp. +

+References fclose(), fopen(), fwrite(), ram_data, and RAM_DRIVE_SIZE. +

+Referenced by main(). +

+

+ +

+
+ + + + + + + + + +
device_t* dev_ramDrive (void   ) 
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static int ramDrive_read (device_t dev,
void *  ptr,
off_t  offset,
size_t  length 
) [static]
+
+
+ +

+ +

+Definition at line 43 of file ramdrive.cpp. +

+References assert, memcpy(), and ram_data. +

+Referenced by dev_ramDrive(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static int ramDrive_write (device_t dev,
void *  ptr,
off_t  offset,
size_t  length 
) [static]
+
+
+ +

+ +

+Definition at line 54 of file ramdrive.cpp. +

+References assert, memcpy(), and ram_data. +

+Referenced by dev_ramDrive(). +

+

+


Variable Documentation

+ +
+
+ + + + +
char* ram_data = 0x0 [static]
+
+
+ +

+ +

+Definition at line 37 of file ramdrive.cpp. +

+Referenced by dev_ramDestroy(), dev_ramDrive(), ramDrive_read(), and ramDrive_write(). +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ramdrive_8h-source.html b/doc/html/ramdrive_8h-source.html new file mode 100644 index 0000000..9af78ef --- /dev/null +++ b/doc/html/ramdrive_8h-source.html @@ -0,0 +1,99 @@ + + +UbixOS V2: src/sys/ubixfsv2/ramdrive.h Source File + + + + +
+
+
+
+ +

ramdrive.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef __RAMDRIVE_H_
+00031 #define __RAMDRIVE_H_
+00032 
+00033 #include <device.h>
+00034 
+00035 int       dev_ramDestroy();
+00036 device_t *dev_ramDrive();
+00037 
+00038 #endif
+00039 
+00040 /***
+00041  $Log$
+00042  Revision 1.1.1.1  2006/06/01 12:46:15  reddawg
+00043  ubix2
+00044 
+00045  Revision 1.2  2005/10/12 00:13:38  reddawg
+00046  Removed
+00047 
+00048  Revision 1.1.1.1  2005/09/26 17:24:45  reddawg
+00049  no message
+00050 
+00051  Revision 1.1  2004/09/13 15:21:26  flameshadow
+00052  add: ramdrive.h
+00053  chg: renamed device_t.size to sectors
+00054  chg: made #define for size of ramdisk
+00055  chg: calculated sectors of ramdisk and stored in the device_t struct
+00056 
+00057  Revision 1.1  2004/08/13 21:47:49  reddawg
+00058  Fixed
+00059 
+00060  END
+00061  ***/
+00062 
+

Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ramdrive_8h.html b/doc/html/ramdrive_8h.html new file mode 100644 index 0000000..34fdcfb --- /dev/null +++ b/doc/html/ramdrive_8h.html @@ -0,0 +1,101 @@ + + +UbixOS V2: src/sys/ubixfsv2/ramdrive.h File Reference + + + + +
+
+
+
+ +

ramdrive.h File Reference

+

+#include <device.h>
+ +

+Go to the source code of this file. + + + + + + +

Functions

int dev_ramDestroy ()
device_tdev_ramDrive ()
+


Function Documentation

+ +
+
+ + + + + + + + +
int dev_ramDestroy (  ) 
+
+
+ +

+ +

+Definition at line 95 of file ramdrive.cpp. +

+References fclose(), fopen(), fwrite(), ram_data, and RAM_DRIVE_SIZE. +

+Referenced by main(). +

+

+ +

+
+ + + + + + + + +
device_t* dev_ramDrive (  ) 
+
+ +

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/rs232_8c-source.html b/doc/html/rs232_8c-source.html new file mode 100644 index 0000000..a0b0a01 --- /dev/null +++ b/doc/html/rs232_8c-source.html @@ -0,0 +1,89 @@ + + +UbixOS V2: src/sys/isa/rs232.c Source File + + + + +
+
+
+
+ +

rs232.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005 Redistribution and use in source and binary forms, with or without modification, are
+00006 permitted provided that the following conditions are met:
+00007 
+00008 Redistributions of source code must retain the above copyright notice, this list of
+00009 conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010 form must reproduce the above copyright notice, this list of conditions, the following
+00011 disclaimer and the list of authors in the documentation and/or other materials provided
+00012 with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013 contributors may be used to endorse or promote products derived from this software
+00014 without specific prior written permission.
+00015 
+00016 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019 THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021 OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023 TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 void rs232Init() {
+00031   return;
+00032   }
+00033 
+00034 /***
+00035 
+00036  $Log$
+00037  Revision 1.1.1.1  2006/06/01 12:46:12  reddawg
+00038  ubix2
+00039 
+00040  Revision 1.2  2005/10/12 00:13:37  reddawg
+00041  Removed
+00042 
+00043  Revision 1.1.1.1  2005/09/26 17:24:03  reddawg
+00044  no message
+00045 
+00046  Revision 1.2  2004/05/10 02:23:24  reddawg
+00047  Minor Changes To Source Code To Prepare It For Open Source Release
+00048 
+00049 
+00050  END
+00051  ***/
+00052 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/rs232_8c.html b/doc/html/rs232_8c.html new file mode 100644 index 0000000..2699177 --- /dev/null +++ b/doc/html/rs232_8c.html @@ -0,0 +1,69 @@ + + +UbixOS V2: src/sys/isa/rs232.c File Reference + + + + +
+
+
+
+ +

rs232.c File Reference

+

+ +

+Go to the source code of this file. + + + + +

Functions

void rs232Init ()
+


Function Documentation

+ +
+
+ + + + + + + + +
void rs232Init (  ) 
+
+
+ +

+ +

+Definition at line 30 of file rs232.c. +

+

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/sched_8c-source.html b/doc/html/sched_8c-source.html new file mode 100644 index 0000000..98752c9 --- /dev/null +++ b/doc/html/sched_8c-source.html @@ -0,0 +1,330 @@ + + +UbixOS V2: src/sys/kernel/sched.c Source File + + + + +
+
+
+
+ +

sched.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <ubixos/sched.h>
+00031 #include <ubixos/kpanic.h>
+00032 #include <ubixos/spinlock.h>
+00033 #include <ubixos/endtask.h>
+00034 #include <ubixos/vitals.h>
+00035 #include <vfs/mount.h>
+00036 #include <lib/kmalloc.h>
+00037 #include <lib/kprintf.h>
+00038 #include <vmm/vmm.h>
+00039 #include <sys/gdt.h>
+00040 #include <sys/idt.h>
+00041 #include <sys/kern_descrip.h>
+00042 #include <isa/8259.h>
+00043 #include <string.h>
+00044 #include <assert.h>
+00045 
+00046 #include <ubixos/spinlock.h>
+00047 
+00048 static kTask_t *taskList = 0x0;
+00049 static kTask_t *delList  = 0x0;
+00050 static uInt32  nextID    = -1;
+00051 
+00052 kTask_t *_current = 0x0;
+00053 kTask_t *_usedMath = 0x0;
+00054 
+00055 static spinLock_t schedulerSpinLock = SPIN_LOCK_INITIALIZER;
+00056 
+00057 /************************************************************************
+00058 
+00059 Function: int sched_init()
+00060 
+00061 Description: This function is used to enable the kernel scheduler
+00062 
+00063 Notes:
+00064 
+00065 02/20/2004 - Approved for quality
+00066 
+00067 ************************************************************************/
+00068 
+00069 
+00070 int sched_init() {        
+00071   taskList = (kTask_t *)kmalloc(sizeof(kTask_t));
+00072   if(taskList == 0x0)
+00073         kpanic("Unable to create task list");
+00074    
+00075   taskList->id = nextID++;
+00076 
+00077   /* Print out information on scheduler */
+00078   kprintf("sched0 - Address: [0x%X]\n", taskList);
+00079         
+00080   /* Return so we know everything went well */
+00081   return(0x0); 
+00082   }
+00083 
+00084 
+00085 void sched(){
+00086   uInt32 memAddr   = 0x0;
+00087   kTask_t *tmpTask = 0x0;
+00088   kTask_t *delTask = 0x0;
+00089   
+00090   if (!spinTryLock(&schedulerSpinLock))
+00091         return;
+00092   
+00093   tmpTask = _current->next;
+00094   //outportByte(0xE9,_current->id + '0');
+00095   schedStart:
+00096 
+00097   /* Yield the next task from the current prio queue */
+00098   for (;tmpTask != 0x0; tmpTask = tmpTask->next) {
+00099     if (tmpTask->state > 0x0) {
+00100       _current = tmpTask;
+00101       if (_current->state == FORK)
+00102         _current->state = READY;
+00103       break;
+00104       }
+00105     else if (tmpTask->state == DEAD)
+00106       {
+00107         delTask  = tmpTask;
+00108         tmpTask  = tmpTask->next;
+00109         sched_deleteTask(delTask->id);
+00110         sched_addDelTask(delTask);
+00111         goto schedStart;
+00112       }
+00113     }
+00114 
+00115         /* Finished all the tasks, restarting the list */
+00116         if (0x0 == tmpTask) {
+00117                 tmpTask = taskList;
+00118                 goto schedStart;
+00119         }
+00120         
+00121         
+00122         if (_current->state > 0x0) {
+00123                 if (_current->oInfo.v86Task == 0x1)
+00124                         irqDisable(0x0);
+00125                 asm("cli");
+00126                 memAddr = (uInt32)&(_current->tss);
+00127                 ubixGDT[4].descriptor.baseLow  = (memAddr & 0xFFFF);
+00128                 ubixGDT[4].descriptor.baseMed  = ((memAddr >> 16) & 0xFF);
+00129                 ubixGDT[4].descriptor.baseHigh = (memAddr >> 24);
+00130                 ubixGDT[4].descriptor.access   = '\x89';
+00131                 spinUnlock(&schedulerSpinLock);
+00132                 asm("sti");
+00133                 asm("ljmp $0x20,$0\n");
+00134         }
+00135         else
+00136         {
+00137                 spinUnlock(&schedulerSpinLock);
+00138         }
+00139         
+00140         return;
+00141 }
+00142 
+00143 
+00144 kTask_t *schedNewTask() {
+00145   int i = 0;
+00146   kTask_t *tmpTask  = (kTask_t *)kmalloc(sizeof(kTask_t));
+00147   struct file *fp = 0x0;
+00148   if (tmpTask == 0x0)
+00149     kpanic("Error: schedNewTask() - kmalloc failed trying to initialize a new task struct\n");
+00150 
+00151   memset(tmpTask,0x0,sizeof(kTask_t)); 
+00152   /* Filling in tasks attrs */
+00153   tmpTask->usedMath   = 0x0;
+00154   tmpTask->state      = NEW;
+00155 
+00156   /* HACK */
+00157   for (i=0;i<3;i++) {
+00158     fp = kmalloc(sizeof(struct file));
+00159     tmpTask->td.o_files[i] = fp;
+00160     fp->f_flag = 0x4;
+00161     }
+00162 
+00163   spinLock(&schedulerSpinLock);
+00164   tmpTask->id         = nextID++;
+00165   tmpTask->next  = taskList;
+00166   tmpTask->prev  = 0x0;
+00167   taskList->prev = tmpTask;
+00168   taskList       = tmpTask;
+00169 
+00170   spinUnlock(&schedulerSpinLock);
+00171   
+00172   return(tmpTask);
+00173   }
+00174 
+00175 
+00176 int sched_deleteTask(pidType id) {
+00177   kTask_t *tmpTask = 0x0; 
+00178 
+00179   /* Checking each task from the prio queue */
+00180   for (tmpTask = taskList; tmpTask != 0x0; tmpTask = tmpTask->next) {
+00181    if (tmpTask->id == id) {
+00182      if (tmpTask->prev != 0x0)
+00183        tmpTask->prev->next = tmpTask->next;
+00184      if (tmpTask->next != 0x0)
+00185        tmpTask->next->prev = tmpTask->prev;
+00186      if (taskList == tmpTask)
+00187        taskList = tmpTask->next;
+00188       
+00189      return(0x0);
+00190      }
+00191    }
+00192   return(0x1);
+00193   }
+00194   
+00195 int  sched_addDelTask(kTask_t *tmpTask) {
+00196   tmpTask->next = delList;
+00197   tmpTask->prev = 0x0;
+00198   if (delList != 0x0)
+00199     delList->prev = tmpTask;
+00200   delList       = tmpTask;
+00201   return(0x0);
+00202   }
+00203   
+00204 kTask_t *sched_getDelTask() {
+00205   kTask_t *tmpTask = 0x0;
+00206   
+00207   if (delList == 0x0)
+00208     return(0x0);
+00209     
+00210   tmpTask = delList;
+00211   delList = delList->next;
+00212   return(tmpTask);
+00213   }
+00214 
+00215 
+00216 kTask_t * 
+00217 schedFindTask(uInt32 id) 
+00218 {
+00219         kTask_t *tmpTask = 0x0; 
+00220 
+00221         for (tmpTask = taskList; tmpTask; tmpTask = tmpTask->next) {
+00222                 if (tmpTask->id == id)
+00223                         return(tmpTask);
+00224         }
+00225 
+00226         return(0x0);
+00227 }
+00228 
+00229 
+00230 /************************************************************************
+00231 
+00232  Function: void schedEndTask()
+00233 
+00234  Description: This function will end a task
+00235 
+00236  Notes:
+00237 
+00238   02/20/2004 - Approved for quality
+00239 
+00240 ************************************************************************/
+00241 void 
+00242 schedEndTask(pidType pid) {
+00243         endTask(_current->id);
+00244         sched_yield();
+00245 }
+00246 
+00247 /************************************************************************
+00248 
+00249 Function: int schedEndTask()
+00250 
+00251 Description: This function will yield a task 
+00252 
+00253 Notes:
+00254 
+00255 02/20/2004 - Approved for quality
+00256 
+00257 ************************************************************************/
+00258 
+00259 void 
+00260 sched_yield() {
+00261   sched();
+00262   }
+00263 
+00264 /*
+00265 asm(
+00266   ".globl sched_yield \n"
+00267   "sched_yield:       \n"
+00268   "  cli              \n"
+00269   "  call sched       \n"
+00270   );
+00271 */
+00272 
+00273 /************************************************************************
+00274 
+00275 Function: int sched_setStatus(pidType pid,tState state)
+00276 
+00277 Description: Change the tasks status
+00278 
+00279 Notes:
+00280 
+00281 ************************************************************************/
+00282 int sched_setStatus(pidType pid,tState state) {
+00283   kTask_t *tmpTask = schedFindTask(pid);
+00284   if (tmpTask == 0x0)
+00285     return(0x1);
+00286   tmpTask->state = state;
+00287   return(0x0);
+00288   }
+00289 
+00290 /***
+00291  END
+00292  ***/
+00293 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/sched_8c.html b/doc/html/sched_8c.html new file mode 100644 index 0000000..4973b3f --- /dev/null +++ b/doc/html/sched_8c.html @@ -0,0 +1,469 @@ + + +UbixOS V2: src/sys/kernel/sched.c File Reference + + + + +
+
+
+
+ +

sched.c File Reference

+

+#include <ubixos/sched.h>
+#include <ubixos/kpanic.h>
+#include <ubixos/spinlock.h>
+#include <ubixos/endtask.h>
+#include <ubixos/vitals.h>
+#include <vfs/mount.h>
+#include <lib/kmalloc.h>
+#include <lib/kprintf.h>
+#include <vmm/vmm.h>
+#include <sys/gdt.h>
+#include <sys/idt.h>
+#include <sys/kern_descrip.h>
+#include <isa/8259.h>
+#include <string.h>
+#include <assert.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Functions

void sched ()
int sched_addDelTask (kTask_t *tmpTask)
int sched_deleteTask (pidType id)
kTask_tsched_getDelTask ()
int sched_init ()
int sched_setStatus (pidType pid, tState state)
void sched_yield ()
void schedEndTask (pidType pid)
kTask_tschedFindTask (uInt32 id)
kTask_tschedNewTask ()

Variables

kTask_t_current = 0x0
kTask_t_usedMath = 0x0
static kTask_tdelList = 0x0
static uInt32 nextID = -1
static spinLock_t schedulerSpinLock = SPIN_LOCK_INITIALIZER
static kTask_ttaskList = 0x0
+


Function Documentation

+ +
+
+ + + + + + + + +
void sched (  ) 
+
+ +

+ +

+
+ + + + + + + + + +
int sched_addDelTask (kTask_t tmpTask  ) 
+
+
+ +

+ +

+Definition at line 195 of file sched.c. +

+References delList, taskStruct::next, and taskStruct::prev. +

+Referenced by sched(). +

+

+ +

+
+ + + + + + + + + +
int sched_deleteTask (pidType  id  ) 
+
+
+ +

+ +

+Definition at line 176 of file sched.c. +

+References taskStruct::id, taskStruct::next, taskStruct::prev, and taskList. +

+Referenced by sched(). +

+

+ +

+
+ + + + + + + + +
kTask_t* sched_getDelTask (  ) 
+
+
+ +

+ +

+Definition at line 204 of file sched.c. +

+References delList, and taskStruct::next. +

+Referenced by systemTask(). +

+

+ +

+
+ + + + + + + + +
int sched_init (  ) 
+
+
+ +

+ +

+Definition at line 70 of file sched.c. +

+References taskStruct::id, kmalloc(), kpanic(), kprintf(), nextID, and taskList. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int sched_setStatus (pidType  pid,
tState  state 
)
+
+
+ +

+ +

+Definition at line 282 of file sched.c. +

+References schedFindTask(), taskStruct::state, and x1. +

+Referenced by endTask(), execFile(), and execThread(). +

+

+ +

+
+ + + + + + + + +
void sched_yield (  ) 
+
+ +

+ +

+
+ + + + + + + + + +
void schedEndTask (pidType  pid  ) 
+
+
+ +

+ +

+Definition at line 242 of file sched.c. +

+References _current, endTask(), taskStruct::id, and sched_yield(). +

+

+ +

+
+ + + + + + + + + +
kTask_t* schedFindTask (uInt32  id  ) 
+
+
+ +

+ +

+Definition at line 217 of file sched.c. +

+References taskStruct::id, taskStruct::next, and taskList. +

+Referenced by sched_setStatus(), sysCheckPid(), systemTask(), and vmmMapFromTask(). +

+

+ +

+
+ + + + + + + + +
kTask_t* schedNewTask (  ) 
+
+ +

+


Variable Documentation

+ +
+
+ + + + +
kTask_t* _current = 0x0
+
+ +

+ +

+
+ + + + +
kTask_t* _usedMath = 0x0
+
+
+ +

+ +

+Definition at line 53 of file sched.c. +

+Referenced by mathStateRestore(). +

+

+ +

+
+ + + + +
kTask_t* delList = 0x0 [static]
+
+
+ +

+ +

+Definition at line 49 of file sched.c. +

+Referenced by sched_addDelTask(), and sched_getDelTask(). +

+

+ +

+
+ + + + +
uInt32 nextID = -1 [static]
+
+
+ +

+ +

+Definition at line 50 of file sched.c. +

+Referenced by sched_init(), and schedNewTask(). +

+

+ +

+
+ + + + +
spinLock_t schedulerSpinLock = SPIN_LOCK_INITIALIZER [static]
+
+
+ +

+ +

+Definition at line 55 of file sched.c. +

+Referenced by sched(), and schedNewTask(). +

+

+ +

+
+ + + + +
kTask_t* taskList = 0x0 [static]
+
+
+ +

+ +

+Definition at line 48 of file sched.c. +

+Referenced by sched_deleteTask(), sched_init(), schedFindTask(), and schedNewTask(). +

+

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/sched_8h-source.html b/doc/html/sched_8h-source.html new file mode 100644 index 0000000..8d125f6 --- /dev/null +++ b/doc/html/sched_8h-source.html @@ -0,0 +1,214 @@ + + +UbixOS V2: src/sys/include/ubixos/sched.h Source File + + + + +
+
+
+
+ +

sched.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _SCHED_H
+00031 #define _SCHED_H
+00032 
+00033 #include <ubixos/types.h>
+00034 #include <ubixos/elf.h>
+00035 #include <ubixos/tty.h>
+00036 #include <vfs/file.h>
+00037 #include <sys/tss.h>
+00038 #include <sys/thread.h>
+00039 
+00040 
+00041 typedef enum { PLACEHOLDER=-2,DEAD=-1,NEW=0,READY=1,RUNNING=2,IDLE=3,FORK=4,WAIT=5 } tState;
+00042 
+00043 struct osInfo {
+00044   uInt8                 timer;
+00045   uInt8                 v86Task;
+00046   bool                  v86If;
+00047   uInt32                vmStart;
+00048   uInt32                stdinSize;
+00049   uInt32                controlKeys;
+00050   char                 *stdin;       
+00051   char                  cwd[1024];          /* current working dir */
+00052   };
+00053 
+00054 typedef struct taskStruct {
+00055   pidType            id;
+00056   struct taskStruct *prev;
+00057   struct taskStruct *next;
+00058   struct tssStruct   tss;
+00059   struct i387Struct  i387;
+00060   struct osInfo      oInfo;
+00061   fileDescriptor    *imageFd;
+00062   tState             state;
+00063   uInt32             gid;
+00064   uInt32             uid;
+00065   uInt16             usedMath;
+00066   tty_term          *term;
+00067   struct thread      td;
+00068   } kTask_t;
+00069 
+00070 
+00071 int      sched_init();
+00072 int      sched_setStatus(pidType,tState);
+00073 int      sched_deleteTask(pidType);
+00074 int      sched_addDelTask(kTask_t *);
+00075 kTask_t *sched_getDelTask();
+00076 void     sched_yield();
+00077 void     sched();
+00078 
+00079 void schedEndTask(pidType pid);
+00080 kTask_t *schedNewTask();
+00081 kTask_t *schedFindTask(uInt32 id);
+00082 
+00083 extern kTask_t *_current;
+00084 extern kTask_t *_usedMath;
+00085 
+00086 
+00087 #endif
+00088 
+00089 /***
+00090  $Log$
+00091  Revision 1.2  2006/10/27 16:42:42  reddawg
+00092  Testing
+00093 
+00094  Revision 1.1.1.1  2006/06/01 12:46:14  reddawg
+00095  ubix2
+00096 
+00097  Revision 1.2  2005/10/12 00:13:37  reddawg
+00098  Removed
+00099 
+00100  Revision 1.1.1.1  2005/09/26 17:23:55  reddawg
+00101  no message
+00102 
+00103  Revision 1.30  2004/09/11 22:21:11  reddawg
+00104  oInfo.cwd is now an array no longer a pointer..
+00105 
+00106  Revision 1.29  2004/09/08 23:19:58  reddawg
+00107  hmm
+00108 
+00109  Revision 1.28  2004/09/08 22:16:02  reddawg
+00110  Fixens
+00111 
+00112  Revision 1.27  2004/09/08 21:19:32  reddawg
+00113  All good now
+00114 
+00115  Revision 1.26  2004/09/07 21:54:38  reddawg
+00116  ok reverted back to old scheduling for now....
+00117 
+00118  Revision 1.20  2004/08/09 12:58:05  reddawg
+00119  let me know when you got the surce
+00120 
+00121  Revision 1.19  2004/08/06 22:43:04  reddawg
+00122  ok
+00123 
+00124  Revision 1.18  2004/08/06 22:32:16  reddawg
+00125  Ubix Works Again
+00126 
+00127  Revision 1.16  2004/08/04 08:17:57  reddawg
+00128  tty: we have primative ttys try f1-f5 so it is easier to use and debug
+00129       ubixos
+00130 
+00131  Revision 1.15  2004/07/29 21:32:16  reddawg
+00132  My quick lunchs breaks worth of updates....
+00133 
+00134  Revision 1.14  2004/07/21 17:15:02  reddawg
+00135  removed garbage
+00136 
+00137  Revision 1.13  2004/07/21 14:43:14  flameshadow
+00138  add: added cwc (current working container) to the osInfo strut
+00139 
+00140  Revision 1.12  2004/07/19 02:32:21  reddawg
+00141  sched: we now set task status to dead which then makes the scheduler do some clean it could be some minor overhead but i feel this is our most efficient approach right now to prevent corruption of the queues
+00142 
+00143  Revision 1.11  2004/07/19 02:08:27  reddawg
+00144  Cleaned out the rest of debuging code also temporarily disabled the ip stack to improve boot time
+00145 
+00146  Revision 1.10  2004/07/18 05:24:15  reddawg
+00147  Fixens
+00148 
+00149  Revision 1.9  2004/07/09 13:23:20  reddawg
+00150  sched: schedInit to sched_init
+00151  Adjusted initialization routines
+00152 
+00153  Revision 1.8  2004/06/22 14:02:14  solar
+00154  Added the PLACEHOLDER state for a task
+00155 
+00156  Revision 1.7  2004/06/18 13:01:47  solar
+00157  Added nice and timeSlice members to the kTask_t type
+00158 
+00159  Revision 1.6  2004/06/17 02:12:57  reddawg
+00160  Cleaned Out Dead Code
+00161 
+00162  Revision 1.5  2004/06/16 14:04:51  reddawg
+00163  Renamed a typedef
+00164 
+00165  Revision 1.4  2004/06/14 12:20:54  reddawg
+00166  notes: many bugs repaired and ld works 100% now.
+00167 
+00168  Revision 1.3  2004/05/21 15:49:13  reddawg
+00169  The os does better housekeeping now when a task is exited
+00170 
+00171  Revision 1.2  2004/05/21 15:20:00  reddawg
+00172  Cleaned up
+00173 
+00174 
+00175  END
+00176  ***/
+00177 
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/sched_8h.html b/doc/html/sched_8h.html new file mode 100644 index 0000000..0aa1aa9 --- /dev/null +++ b/doc/html/sched_8h.html @@ -0,0 +1,452 @@ + + +UbixOS V2: src/sys/include/ubixos/sched.h File Reference + + + + +
+
+
+
+ +

sched.h File Reference

+

+#include <ubixos/types.h>
+#include <ubixos/elf.h>
+#include <ubixos/tty.h>
+#include <vfs/file.h>
+#include <sys/tss.h>
+#include <sys/thread.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  osInfo
struct  taskStruct

Typedefs

typedef taskStruct kTask_t

Enumerations

enum  tState {
+  PLACEHOLDER = -2, +DEAD = -1, +NEW = 0, +READY = 1, +
+  RUNNING = 2, +IDLE = 3, +FORK = 4, +WAIT = 5 +
+ }

Functions

void sched ()
int sched_addDelTask (kTask_t *)
int sched_deleteTask (pidType)
kTask_tsched_getDelTask ()
int sched_init ()
int sched_setStatus (pidType, tState)
void sched_yield ()
void schedEndTask (pidType pid)
kTask_tschedFindTask (uInt32 id)
kTask_tschedNewTask ()

Variables

kTask_t_current
kTask_t_usedMath
+


Typedef Documentation

+ +
+
+ + + + +
typedef struct taskStruct kTask_t
+
+
+ +

+ +

+

+


Enumeration Type Documentation

+ +
+
+ + + + +
enum tState
+
+
+ +

+

Enumerator:
+ + + + + + + + + +
PLACEHOLDER  +
DEAD  +
NEW  +
READY  +
RUNNING  +
IDLE  +
FORK  +
WAIT  +
+
+ +

+Definition at line 41 of file sched.h. +

+

+


Function Documentation

+ +
+
+ + + + + + + + +
void sched (  ) 
+
+ +

+ +

+
+ + + + + + + + + +
int sched_addDelTask (kTask_t  ) 
+
+
+ +

+ +

+Definition at line 195 of file sched.c. +

+References delList, taskStruct::next, and taskStruct::prev. +

+Referenced by sched(). +

+

+ +

+
+ + + + + + + + + +
int sched_deleteTask (pidType   ) 
+
+
+ +

+ +

+Definition at line 176 of file sched.c. +

+References taskStruct::id, taskStruct::next, taskStruct::prev, and taskList. +

+Referenced by sched(). +

+

+ +

+
+ + + + + + + + +
kTask_t* sched_getDelTask (  ) 
+
+
+ +

+ +

+Definition at line 204 of file sched.c. +

+References delList, and taskStruct::next. +

+Referenced by systemTask(). +

+

+ +

+
+ + + + + + + + +
int sched_init (  ) 
+
+
+ +

+ +

+Definition at line 70 of file sched.c. +

+References taskStruct::id, kmalloc(), kpanic(), kprintf(), nextID, and taskList. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int sched_setStatus (pidType ,
tState  
)
+
+
+ +

+ +

+Definition at line 282 of file sched.c. +

+References schedFindTask(), taskStruct::state, and x1. +

+Referenced by endTask(), execFile(), and execThread(). +

+

+ +

+
+ + + + + + + + +
void sched_yield (  ) 
+
+ +

+ +

+
+ + + + + + + + + +
void schedEndTask (pidType  pid  ) 
+
+
+ +

+ +

+Definition at line 242 of file sched.c. +

+References _current, endTask(), taskStruct::id, and sched_yield(). +

+

+ +

+
+ + + + + + + + + +
kTask_t* schedFindTask (uInt32  id  ) 
+
+
+ +

+ +

+Definition at line 217 of file sched.c. +

+References taskStruct::id, taskStruct::next, and taskList. +

+Referenced by sched_setStatus(), sysCheckPid(), systemTask(), and vmmMapFromTask(). +

+

+ +

+
+ + + + + + + + +
kTask_t* schedNewTask (  ) 
+
+ +

+


Variable Documentation

+ +
+
+ + + + +
kTask_t* _current
+
+ +

+ +

+
+ + + + +
kTask_t* _usedMath
+
+
+ +

+ +

+Definition at line 53 of file sched.c. +

+Referenced by mathStateRestore(). +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/schedyield_8S-source.html b/doc/html/schedyield_8S-source.html new file mode 100644 index 0000000..1dd435a --- /dev/null +++ b/doc/html/schedyield_8S-source.html @@ -0,0 +1,89 @@ + + +UbixOS V2: src/sys/kernel/schedyield.S Source File + + + + +
+
+
+
+ +

schedyield.S

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 .globl sched_yield_new
+00031 .text
+00032 .code32
+00033 sched_yield_new:         
+00034   pusha            /* Save all of the registers                */
+00035   push %ss
+00036   push %ds
+00037   push %es
+00038   push %fs
+00039   push %gs
+00040   call sched
+00041   mov  %eax,%esp
+00042   pop  %gs
+00043   pop  %fs             
+00044   pop  %es
+00045   pop  %ds
+00046   pop  %ss                 
+00047   popa             /* Restore Registers                        */
+00048   iret                    
+00049 
+00050 /***
+00051  END
+00052  ***/
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/schedyield_8S.html b/doc/html/schedyield_8S.html new file mode 100644 index 0000000..7d7adef --- /dev/null +++ b/doc/html/schedyield_8S.html @@ -0,0 +1,66 @@ + + +UbixOS V2: src/sys/kernel/schedyield.S File Reference + + + + +
+
+
+
+ +

schedyield.S File Reference

+

+ +

+Go to the source code of this file. + + + + +

Variables

globl sched_yield_new text
+code32 
sched_yield_new
+


Variable Documentation

+ +
+
+ + + + +
globl sched_yield_new text code32 sched_yield_new
+
+
+ +

+ +

+Definition at line 41 of file schedyield.S. +

+

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/sde_8h-source.html b/doc/html/sde_8h-source.html new file mode 100644 index 0000000..5842eed --- /dev/null +++ b/doc/html/sde_8h-source.html @@ -0,0 +1,92 @@ + + +UbixOS V2: src/sys/include/sde/sde.h Source File + + + + +
+
+
+
+ +

sde.h

Go to the documentation of this file.
00001 /**************************************************************************************
+00002  Copyright (c) 2002 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+00006 
+00007 Redistributions of source code must retain the above copyright notice, this list of conditions, the following disclaimer and the list of authors.
+00008 Redistributions in binary form must reproduce the above copyright notice, this list of conditions, the following disclaimer and the list of authors
+00009 in the documentation and/or other materials provided with the distribution. Neither the name of the UbixOS Project nor the names of its
+00010 contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+00011 
+00012 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
+00013 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+00014 PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+00015 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+00016 GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+00017 OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+00018 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00019 
+00020  $Id$
+00021 
+00022 **************************************************************************************/
+00023 
+00024 #ifndef _SDE_H
+00025 #define _SDE_H
+00026 
+00027 #include <ubixos/types.h>
+00028 
+00029 #define registerWindow   1
+00030 #define windowReady      2
+00031 #define drawWindow       3
+00032 #define killWindow       4
+00033 
+00034 #ifdef __cplusplus
+00035 extern "C"
+00036 #endif
+00037 void sdeThread();
+00038 
+00039 #ifdef __cplusplus
+00040 extern "C"
+00041 #endif
+00042 void sysSDE(uInt32 cmd,void *ptr);
+00043 
+00044 struct sdeWindows {
+00045   struct sdeWindows *next;
+00046   struct sdeWindows *prev;
+00047   void              *buf;
+00048   pidType            pid;
+00049   uInt8              status;
+00050   };
+00051 
+00052 extern struct sdeWindows *windows;  
+00053   
+00054 #endif
+00055 
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/sde_8h.html b/doc/html/sde_8h.html new file mode 100644 index 0000000..c7c8681 --- /dev/null +++ b/doc/html/sde_8h.html @@ -0,0 +1,199 @@ + + +UbixOS V2: src/sys/include/sde/sde.h File Reference + + + + +
+
+
+
+ +

sde.h File Reference

+

+#include <ubixos/types.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  sdeWindows

Defines

#define drawWindow   3
#define killWindow   4
#define registerWindow   1
#define windowReady   2

Functions

void sdeThread ()
void sysSDE (uInt32 cmd, void *ptr)

Variables

sdeWindowswindows
+


Define Documentation

+ +
+
+ + + + +
#define drawWindow   3
+
+
+ +

+ +

+Definition at line 31 of file sde.h. +

+

+ +

+
+ + + + +
#define killWindow   4
+
+
+ +

+ +

+Definition at line 32 of file sde.h. +

+

+ +

+
+ + + + +
#define registerWindow   1
+
+
+ +

+ +

+Definition at line 29 of file sde.h. +

+

+ +

+
+ + + + +
#define windowReady   2
+
+
+ +

+ +

+Definition at line 30 of file sde.h. +

+

+


Function Documentation

+ +
+
+ + + + + + + + +
void sdeThread (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void sysSDE (uInt32  cmd,
void *  ptr 
)
+
+
+ +

+ +

+

+


Variable Documentation

+ +
+
+ + + + +
struct sdeWindows* windows
+
+
+ +

+ +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/sem_8c-source.html b/doc/html/sem_8c-source.html new file mode 100644 index 0000000..5335d25 --- /dev/null +++ b/doc/html/sem_8c-source.html @@ -0,0 +1,72 @@ + + +UbixOS V2: src/sys/kernel/sem.c Source File + + + + +
+
+
+
+ +

sem.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <ubixos/sem.h>
+00031 
+00032 /***
+00033  END
+00034  ***/
+00035 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/sem_8c.html b/doc/html/sem_8c.html new file mode 100644 index 0000000..d9be258 --- /dev/null +++ b/doc/html/sem_8c.html @@ -0,0 +1,45 @@ + + +UbixOS V2: src/sys/kernel/sem.c File Reference + + + + +
+
+
+
+ +

sem.c File Reference

+

+#include <ubixos/sem.h>
+ +

+Go to the source code of this file. + +
+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/sem_8h-source.html b/doc/html/sem_8h-source.html new file mode 100644 index 0000000..25d3364 --- /dev/null +++ b/doc/html/sem_8h-source.html @@ -0,0 +1,88 @@ + + +UbixOS V2: src/sys/include/ubixos/sem.h Source File + + + + +
+
+
+
+ +

sem.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _SEM_H
+00031 #define _SEM_H
+00032 
+00033 #endif
+00034 
+00035 /***
+00036  $Log$
+00037  Revision 1.1.1.1  2006/06/01 12:46:14  reddawg
+00038  ubix2
+00039 
+00040  Revision 1.2  2005/10/12 00:13:37  reddawg
+00041  Removed
+00042 
+00043  Revision 1.1.1.1  2005/09/26 17:23:55  reddawg
+00044  no message
+00045 
+00046  Revision 1.1  2004/07/20 18:58:24  reddawg
+00047  Few fixes
+00048 
+00049  END
+00050  ***/
+00051 
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/sem_8h.html b/doc/html/sem_8h.html new file mode 100644 index 0000000..07e17ab --- /dev/null +++ b/doc/html/sem_8h.html @@ -0,0 +1,44 @@ + + +UbixOS V2: src/sys/include/ubixos/sem.h File Reference + + + + +
+
+
+
+ +

sem.h File Reference

+

+ +

+Go to the source code of this file. + +
+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/setpageattributes_8c-source.html b/doc/html/setpageattributes_8c-source.html new file mode 100644 index 0000000..f045501 --- /dev/null +++ b/doc/html/setpageattributes_8c-source.html @@ -0,0 +1,138 @@ + + +UbixOS V2: src/sys/vmm/setpageattributes.c Source File + + + + +
+
+
+
+ +

setpageattributes.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005 Redistribution and use in source and binary forms, with or without modification, are
+00006 permitted provided that the following conditions are met:
+00007 
+00008 Redistributions of source code must retain the above copyright notice, this list of
+00009 conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010 form must reproduce the above copyright notice, this list of conditions, the following
+00011 disclaimer and the list of authors in the documentation and/or other materials provided
+00012 with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013 contributors may be used to endorse or promote products derived from this software
+00014 without specific prior written permission.
+00015 
+00016 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019 THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021 OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023 TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <vmm/vmm.h>
+00031 #include <ubixos/kpanic.h>
+00032 
+00033 /************************************************************************
+00034 
+00035 Function: void vmmSetPageAttributes(uInt32 pageAddr,int attributes;
+00036 Description: This Function Will Set The Page Attributes Such As
+00037              A Read Only Page, Stack Page, COW Page, ETC.
+00038 Notes:
+00039 
+00040 ************************************************************************/
+00041 int vmm_setPageAttributes(uInt32 memAddr,uInt16 attributes) {
+00042   uInt16          directoryIndex = 0x0, tableIndex = 0x0;
+00043   uInt32         *pageTable = 0x0;
+00044 
+00045   /* Calculate The Page Directory Index */
+00046   directoryIndex = (memAddr >> 22);
+00047   
+00048   /* Calculate The Page Table Index */
+00049   tableIndex = ((memAddr >> 12) & 0x3FF);
+00050 
+00051   /* Set Table Pointer */
+00052   if ((pageTable = (uInt32 *) (tablesBaseAddress + (0x1000 * directoryIndex))) == 0x0)
+00053     kpanic("Error: pageTable == NULL, File: %s, Line: %i\n",__FILE__,__LINE__);
+00054     
+00055   /* Set Attribute If Page Is Mapped */
+00056   if (pageTable[tableIndex] != 0x0)
+00057     pageTable[tableIndex] = ((pageTable[tableIndex] & 0xFFFFF000) | attributes);
+00058 
+00059   /* Reload The Page Table; */
+00060   asm volatile(
+00061       "push %eax     \n"
+00062       "movl %cr3,%eax\n"
+00063       "movl %eax,%cr3\n"
+00064       "pop  %eax     \n"
+00065     );
+00066   /* Return */
+00067   return(0x0);
+00068   }
+00069 
+00070 /***
+00071  $Log$
+00072  Revision 1.1.1.1  2006/06/01 12:46:13  reddawg
+00073  ubix2
+00074 
+00075  Revision 1.2  2005/10/12 00:13:38  reddawg
+00076  Removed
+00077 
+00078  Revision 1.1.1.1  2005/09/26 17:24:53  reddawg
+00079  no message
+00080 
+00081  Revision 1.4  2004/07/28 15:05:43  reddawg
+00082  Major:
+00083    Pages now have strict security enforcement.
+00084    Many null dereferences have been resolved.
+00085    When apps loaded permissions set for pages rw and ro
+00086 
+00087  Revision 1.3  2004/07/20 22:29:55  reddawg
+00088  assert: remade assert
+00089 
+00090  Revision 1.2  2004/06/10 22:23:56  reddawg
+00091  Volatiles
+00092 
+00093  Revision 1.1.1.1  2004/04/15 12:06:53  reddawg
+00094  UbixOS v1.0
+00095 
+00096  Revision 1.6  2004/04/13 16:36:34  reddawg
+00097  Changed our copyright, it is all now under a BSD-Style license
+00098 
+00099  END
+00100  ***/
+00101 
+

Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/setpageattributes_8c.html b/doc/html/setpageattributes_8c.html new file mode 100644 index 0000000..a1bb533 --- /dev/null +++ b/doc/html/setpageattributes_8c.html @@ -0,0 +1,85 @@ + + +UbixOS V2: src/sys/vmm/setpageattributes.c File Reference + + + + +
+
+
+
+ +

setpageattributes.c File Reference

+

+#include <vmm/vmm.h>
+#include <ubixos/kpanic.h>
+ +

+Go to the source code of this file. + + + + +

Functions

int vmm_setPageAttributes (uInt32 memAddr, uInt16 attributes)
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
int vmm_setPageAttributes (uInt32  memAddr,
uInt16  attributes 
)
+
+
+ +

+ +

+Definition at line 41 of file setpageattributes.c. +

+References kpanic(), tablesBaseAddress, and x1000. +

+Referenced by execFile(), and sysExec(). +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/shell_8c-source.html b/doc/html/shell_8c-source.html new file mode 100644 index 0000000..5b3ca3e --- /dev/null +++ b/doc/html/shell_8c-source.html @@ -0,0 +1,158 @@ + + +UbixOS V2: src/sys/net/net/shell.c Source File + + + + +
+
+
+
+ +

shell.c

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 
+00036 #include <lib/kmalloc.h>
+00037 #include <ubixos/fork.h>
+00038 #include <string.h>
+00039 
+00040 #include "net/mem.h"
+00041 #include "net/debug.h"
+00042 #include "net/def.h"
+00043 #include "net/api.h"
+00044 #include "net/stats.h"
+00045 
+00046 #include "lib/kprintf.h"
+00047 char *buffer = 0x0;
+00048 
+00049 #define ESUCCESS 0
+00050 #define ESYNTAX -1
+00051 #define ETOOFEW -2
+00052 #define ETOOMANY -3
+00053 #define ECLOSED -4
+00054 
+00055 #define NCONNS 10
+00056 // UBU static struct netconn *conns[NCONNS];
+00057 
+00058 static void sendstr(const char *str, struct netconn *conn) {
+00059   netconn_write(conn, (void *)str, strlen(str), NETCONN_NOCOPY);
+00060   }
+00061 
+00062 static void prompt(struct netconn *conn) {
+00063   sendstr("uBixCube:@sys> ", conn);
+00064   }  
+00065 
+00066 static void shell_main(struct netconn *conn) {
+00067   struct netbuf *buf = 0x0;
+00068   uInt32 len;
+00069   // UBU int i;
+00070   // UBU char bufr[1500];
+00071   prompt(conn);
+00072   while (1) {
+00073     buf = netconn_recv(conn);
+00074     if (buf != 0x0)
+00075       netbuf_copy(buf,buffer,1024);
+00076       len = netbuf_len(buf);
+00077       netbuf_delete(buf);
+00078       buffer[len-2] = '\0';
+00079       kprintf("Buffer: [%s:%i]\n",buffer,len);
+00080       if (!strcmp(buffer,"quit")) {
+00081         netconn_close(conn);
+00082         break;
+00083         }
+00084       else if (!strcmp(buffer,"ls")) {
+00085         sendstr("no\nfiles\nhere\n", conn);
+00086         }
+00087       else if (!strcmp(buffer,"uname")) {
+00088         sendstr("UbixOS v1.0 reddawg@devel.ubixos.com:/ubix.elf\n",conn);
+00089         }
+00090       prompt(conn);
+00091       }
+00092   }
+00093 
+00094 static void shell_thread(void *arg) {
+00095   struct netconn *conn = 0x0, *newconn = 0x0;
+00096   
+00097   buffer = (char *)kmalloc(1024);
+00098  
+00099   conn = netconn_new(NETCONN_TCP);
+00100   netconn_bind(conn, NULL, 23);
+00101   netconn_listen(conn);
+00102 
+00103   while(1) {
+00104     kprintf("1");
+00105     newconn = netconn_accept(conn);
+00106     kprintf("2");
+00107     shell_main(newconn);
+00108     kprintf("3");
+00109     //netconn_delete(newconn);
+00110     kprintf("4");
+00111     }
+00112   }
+00113 
+00114 void shell_init(void)     {
+00115   sys_thread_new(shell_thread, NULL);
+00116   }
+00117 
+00118 /***
+00119  END
+00120  ***/
+00121 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/shell_8c.html b/doc/html/shell_8c.html new file mode 100644 index 0000000..9577b60 --- /dev/null +++ b/doc/html/shell_8c.html @@ -0,0 +1,343 @@ + + +UbixOS V2: src/sys/net/net/shell.c File Reference + + + + +
+
+
+
+ +

shell.c File Reference

+

+#include <lib/kmalloc.h>
+#include <ubixos/fork.h>
+#include <string.h>
+#include "net/mem.h"
+#include "net/debug.h"
+#include "net/def.h"
+#include "net/api.h"
+#include "net/stats.h"
+#include "lib/kprintf.h"
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Defines

#define ECLOSED   -4
#define ESUCCESS   0
#define ESYNTAX   -1
#define ETOOFEW   -2
#define ETOOMANY   -3
#define NCONNS   10

Functions

static void prompt (struct netconn *conn)
static void sendstr (const char *str, struct netconn *conn)
void shell_init (void)
static void shell_main (struct netconn *conn)
static void shell_thread (void *arg)

Variables

char * buffer = 0x0
+


Define Documentation

+ +
+
+ + + + +
#define ECLOSED   -4
+
+
+ +

+ +

+Definition at line 53 of file shell.c. +

+

+ +

+
+ + + + +
#define ESUCCESS   0
+
+
+ +

+ +

+Definition at line 49 of file shell.c. +

+

+ +

+
+ + + + +
#define ESYNTAX   -1
+
+
+ +

+ +

+Definition at line 50 of file shell.c. +

+

+ +

+
+ + + + +
#define ETOOFEW   -2
+
+
+ +

+ +

+Definition at line 51 of file shell.c. +

+

+ +

+
+ + + + +
#define ETOOMANY   -3
+
+
+ +

+ +

+Definition at line 52 of file shell.c. +

+

+ +

+
+ + + + +
#define NCONNS   10
+
+
+ +

+ +

+Definition at line 55 of file shell.c. +

+

+


Function Documentation

+ +
+
+ + + + + + + + + +
static void prompt (struct netconn conn  )  [static]
+
+
+ +

+ +

+Definition at line 62 of file shell.c. +

+References sendstr(). +

+Referenced by shell_main(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
static void sendstr (const char *  str,
struct netconn conn 
) [static]
+
+
+ +

+ +

+Definition at line 58 of file shell.c. +

+References NETCONN_NOCOPY, netconn_write(), and strlen(). +

+Referenced by prompt(), and shell_main(). +

+

+ +

+
+ + + + + + + + + +
void shell_init (void   ) 
+
+
+ +

+ +

+Definition at line 114 of file shell.c. +

+References NULL, shell_thread(), and sys_thread_new(). +

+Referenced by netMainThread(). +

+

+ +

+
+ + + + + + + + + +
static void shell_main (struct netconn conn  )  [static]
+
+
+ +

+ +

+Definition at line 66 of file shell.c. +

+References buffer, kprintf(), netbuf_copy(), netbuf_delete(), netbuf_len(), netconn_close(), netconn_recv(), prompt(), sendstr(), and strcmp(). +

+Referenced by shell_thread(). +

+

+ +

+
+ + + + + + + + + +
static void shell_thread (void *  arg  )  [static]
+
+
+ +

+ +

+Definition at line 94 of file shell.c. +

+References buffer, kmalloc(), kprintf(), netconn_accept(), netconn_bind(), netconn_listen(), netconn_new(), NETCONN_TCP, NULL, and shell_main(). +

+Referenced by shell_init(). +

+

+


Variable Documentation

+ +
+
+ + + + +
char* buffer = 0x0
+
+
+ +

+ +

+Definition at line 47 of file shell.c. +

+Referenced by readUbixFS(), shell_main(), shell_thread(), sys_write(), and udpecho_thread(). +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/shell_8h-source.html b/doc/html/shell_8h-source.html new file mode 100644 index 0000000..2472f84 --- /dev/null +++ b/doc/html/shell_8h-source.html @@ -0,0 +1,77 @@ + + +UbixOS V2: src/sys/net/net/shell.h Source File + + + + +
+
+
+
+ +

shell.h

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 #ifndef __SHELL_H__
+00036 #define __SHELL_H__
+00037 
+00038 void shell_init(void);
+00039 
+00040 #endif /* __SHELL_H__ */
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/shell_8h.html b/doc/html/shell_8h.html new file mode 100644 index 0000000..6c304e7 --- /dev/null +++ b/doc/html/shell_8h.html @@ -0,0 +1,74 @@ + + +UbixOS V2: src/sys/net/net/shell.h File Reference + + + + +
+
+
+
+ +

shell.h File Reference

+

+ +

+Go to the source code of this file. + + + + +

Functions

void shell_init (void)
+


Function Documentation

+ +
+
+ + + + + + + + + +
void shell_init (void   ) 
+
+
+ +

+ +

+Definition at line 114 of file shell.c. +

+References NULL, shell_thread(), and sys_thread_new(). +

+Referenced by netMainThread(). +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/signal_8h-source.html b/doc/html/signal_8h-source.html new file mode 100644 index 0000000..4b34412 --- /dev/null +++ b/doc/html/signal_8h-source.html @@ -0,0 +1,49 @@ + + +UbixOS V2: src/sys/include/sys/signal.h Source File + + + + +
+
+
+
+ +

signal.h

Go to the documentation of this file.
00001 #define _SIG_WORDS      4
+00002 #define _SIG_MAXSIG     128
+00003 #define _SIG_IDX(sig)   ((sig) - 1)
+00004 #define _SIG_WORD(sig)  (_SIG_IDX(sig) >> 5)
+00005 #define _SIG_BIT(sig)   (1 << (_SIG_IDX(sig) & 31))
+00006 #define _SIG_VALID(sig) ((sig) <= _SIG_MAXSIG && (sig) > 0)
+00007 
+00008 typedef struct __sigset {
+00009         __uint32_t __bits[_SIG_WORDS];
+00010   } __sigset_t;
+00011 
+00012 typedef __sigset_t sigset_t;
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/signal_8h.html b/doc/html/signal_8h.html new file mode 100644 index 0000000..5545b19 --- /dev/null +++ b/doc/html/signal_8h.html @@ -0,0 +1,221 @@ + + +UbixOS V2: src/sys/include/sys/signal.h File Reference + + + + +
+
+
+
+ +

signal.h File Reference

+

+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  __sigset

Defines

#define _SIG_BIT(sig)   (1 << (_SIG_IDX(sig) & 31))
#define _SIG_IDX(sig)   ((sig) - 1)
#define _SIG_MAXSIG   128
#define _SIG_VALID(sig)   ((sig) <= _SIG_MAXSIG && (sig) > 0)
#define _SIG_WORD(sig)   (_SIG_IDX(sig) >> 5)
#define _SIG_WORDS   4

Typedefs

typedef __sigset __sigset_t
typedef __sigset_t sigset_t
+


Define Documentation

+ +
+
+ + + + + + + + + +
#define _SIG_BIT (sig   )    (1 << (_SIG_IDX(sig) & 31))
+
+
+ +

+ +

+Definition at line 5 of file signal.h. +

+

+ +

+
+ + + + + + + + + +
#define _SIG_IDX (sig   )    ((sig) - 1)
+
+
+ +

+ +

+Definition at line 3 of file signal.h. +

+

+ +

+
+ + + + +
#define _SIG_MAXSIG   128
+
+
+ +

+ +

+Definition at line 2 of file signal.h. +

+

+ +

+
+ + + + + + + + + +
#define _SIG_VALID (sig   )    ((sig) <= _SIG_MAXSIG && (sig) > 0)
+
+
+ +

+ +

+Definition at line 6 of file signal.h. +

+

+ +

+
+ + + + + + + + + +
#define _SIG_WORD (sig   )    (_SIG_IDX(sig) >> 5)
+
+
+ +

+ +

+Definition at line 4 of file signal.h. +

+

+ +

+
+ + + + +
#define _SIG_WORDS   4
+
+
+ +

+ +

+Definition at line 1 of file signal.h. +

+

+


Typedef Documentation

+ +
+
+ + + + +
typedef struct __sigset __sigset_t
+
+
+ +

+ +

+

+ +

+
+ + + + +
typedef __sigset_t sigset_t
+
+
+ +

+ +

+Definition at line 12 of file signal.h. +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/smp_8c-source.html b/doc/html/smp_8c-source.html new file mode 100644 index 0000000..d983d58 --- /dev/null +++ b/doc/html/smp_8c-source.html @@ -0,0 +1,328 @@ + + +UbixOS V2: src/sys/kernel/smp.c Source File + + + + +
+
+
+
+ +

smp.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005 Redistribution and use in source and binary forms, with or without modification, are
+00006 permitted provided that the following conditions are met:
+00007 
+00008 Redistributions of source code must retain the above copyright notice, this list of
+00009 conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010 form must reproduce the above copyright notice, this list of conditions, the following
+00011 disclaimer and the list of authors in the documentation and/or other materials provided
+00012 with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013 contributors may be used to endorse or promote products derived from this software
+00014 without specific prior written permission.
+00015 
+00016 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019 THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021 OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023 TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <ubixos/smp.h>
+00031 #include <ubixos/spinlock.h>
+00032 #include <ubixos/kpanic.h>
+00033 #include <lib/kprintf.h>
+00034 #include <lib/string.h>
+00035 #include <sys/io.h>
+00036 
+00037 static spinLock_t initSpinLock = SPIN_LOCK_INITIALIZER;
+00038 static spinLock_t cpuInfoLock = SPIN_LOCK_INITIALIZER;
+00039 static uInt32 cpus = 0;
+00040 struct cpuinfo_t cpuinfo[8];
+00041 
+00042 uInt8 kernel_function(void);
+00043 uInt8 *vram = (uInt8 *)0xB8000;
+00044 
+00045 static inline unsigned int apicRead(address) {
+00046   return *(volatile unsigned int *) (0xFEE00000 + address);
+00047   }
+00048 
+00049 static inline void apicWrite(unsigned int address,unsigned int data) {
+00050   *(volatile unsigned int *) (0xFEE00000 + address) = data;
+00051   }
+00052 
+00053 static __inline__ void setDr3 (void *dr3) {
+00054   register uInt32 value = (uInt32)dr3;
+00055   __asm__ __volatile__ ("mov %0, %%dr3" :: "r" (value));
+00056   }
+00057 
+00058 static __inline__ uInt32 getDr3 (void) {
+00059   register uInt32 value;
+00060   __asm__ __volatile__ ("mov %%dr3, %0" : "=r" (value));
+00061   return value;
+00062   }
+00063 
+00064 struct gdt_descr {
+00065   uInt16  limit;
+00066   uInt32 *base __attribute__ ((packed));
+00067 };
+00068 
+00069 static void GDT_fixer() {
+00070   struct gdt_descr  gdt_descr;
+00071   uInt32 *gdt = (uInt32 *)0x20000; // 128KB
+00072 
+00073   gdt[0] = 0;
+00074   gdt[1] = 0;
+00075   gdt[2] = 0x0000ffff; // seg 0x8  -- DPL 0 4GB code
+00076   gdt[3] = 0x00cf9a00;
+00077   gdt[4] = 0x0000ffff; // seg 0x10 -- DPL 0 4GB data
+00078   gdt[5] = 0x00cf9200;
+00079   gdt[6] = 0x0000ffff; // seg 0x1b -- DPL 3 4GB code
+00080   gdt[7] = 0x00cffa00;
+00081   gdt[8] = 0x0000ffff; // seg 0x23 -- DPL 3 4GB data
+00082   gdt[9] = 0x00cff200;
+00083 
+00084   gdt_descr.limit = 32 * 4;
+00085   gdt_descr.base  = gdt;
+00086 
+00087   /*
+00088   asm("lgdt %0;" : : "m" (gdt_descr));
+00089   __asm__ __volatile__ ("ljmp %0,$1f; 1:" :: "i" (0x08));
+00090   __asm__ __volatile__ ("movw %w0,%%ds" :: "r" (0x10));
+00091   __asm__ __volatile__ ("movw %w0,%%es" :: "r" (0x10));
+00092   __asm__ __volatile__ ("movw %w0,%%ss" :: "r" (0x10));
+00093   */
+00094   }
+00095 
+00096 
+00097 void cpu0_thread(void) {
+00098   for(;;) {
+00099     vram[40+640] = kernel_function();
+00100     vram[42+640]++;
+00101   }
+00102 }
+00103 void cpu1_thread(void) {
+00104   for(;;) {
+00105     vram[60+640] = kernel_function();
+00106     vram[62+640]++;
+00107   }
+00108 }
+00109 void cpu2_thread(void) {
+00110   for(;;) {
+00111     vram[80+640] = kernel_function();
+00112     vram[82+640]++;
+00113   }
+00114 }
+00115 void cpu3_thread(void) {
+00116   for(;;) {
+00117     vram[100+640] = kernel_function();
+00118     vram[102+640]++;
+00119   }
+00120 }
+00121 
+00122 static spinLock_t bkl = SPIN_LOCK_INITIALIZER;
+00123 uInt8 kernel_function(void) {
+00124   struct cpuinfo_t *cpu;
+00125 
+00126   spinLock(&bkl);
+00127 
+00128 
+00129   cpu = (struct cpuinfo_t *)getDr3();
+00130 
+00131   spinUnlock(&bkl);
+00132 
+00133   return('0' + cpu->id);
+00134 }
+00135 
+00136 
+00137 void c_ap_boot(void) {
+00138 
+00139   while(spinLockLocked(&initSpinLock));
+00140 
+00141   switch(cpuInfo()) {
+00142   case 1:
+00143     cpu1_thread();
+00144     break;
+00145   case 2:
+00146     cpu2_thread();
+00147     break;
+00148   case 3:
+00149     cpu3_thread();
+00150     break;
+00151   }
+00152 
+00153   outportByte(0xe9,'5');
+00154 
+00155   for(;;) {
+00156     asm("nop");
+00157   }
+00158 }
+00159 
+00160 
+00161 void smpInit() {
+00162   spinLock(&initSpinLock);
+00163   GDT_fixer();
+00164   cpuidDetect();
+00165   cpuInfo();
+00166   apicMagic();
+00167   spinUnlock(&initSpinLock);
+00168 
+00169   //cpu0_thread(); 
+00170  
+00171   }
+00172 
+00173 void cpuidDetect() {
+00174   if (!(getEflags() & (1<<21)) ) {
+00175     setEflags(getEflags() | (1<<21));
+00176     if( !(getEflags() & (1<<21)) ) {
+00177       kpanic("CPU doesn't support CPUID, get a newer machine\n");
+00178       }
+00179     }
+00180   }
+00181 
+00182 uInt8 cpuInfo() {
+00183   uInt32 data[4],i;
+00184 
+00185   if( !(getEflags() & (1<<21)) ) {       // If the cpuid bit in eflags not set..
+00186     setEflags(getEflags() | (1<<21));   // ..try and set it to see if it comes on..
+00187     if( !(getEflags() & (1<<21)) ) {     // It didn't.. This CPU suck
+00188       kpanic("CPU doesn't support CPUID, get a newer machine\n");
+00189     }
+00190   }
+00191 
+00192   spinLock(&cpuInfoLock);
+00193   cpuinfo[cpus].ok = 1;
+00194   cpuinfo[cpus].apic_id  = apicRead(0x20) >> 24;
+00195   cpuinfo[cpus].apic_ver = apicRead(0x30) & 0xFF;
+00196 
+00197   cpuid(0,data);
+00198   *(uInt32 *)&cpuinfo[cpus].ident[0] = data[1];
+00199   *(uInt32 *)&cpuinfo[cpus].ident[4] = data[3];
+00200   *(uInt32 *)&cpuinfo[cpus].ident[8] = data[2];
+00201   cpuinfo[cpus].ident[17] = 0;
+00202   cpuinfo[cpus].max = data[0];
+00203 
+00204   cpuid(1,data);
+00205   cpuinfo[cpus].signature = data[0];
+00206   cpuinfo[cpus].feature   = data[3];
+00207 
+00208   cpuid(0x80000000,data);
+00209   if(data[0]>=0x80000004) {
+00210     for(i=0;i<3;i++) {
+00211       cpuid(0x80000002 + i,data);
+00212 
+00213       *(unsigned int *)&cpuinfo[cpus].brand[16*i+0]  = data[0];
+00214       *(unsigned int *)&cpuinfo[cpus].brand[16*i+4]  = data[1];
+00215       *(unsigned int *)&cpuinfo[cpus].brand[16*i+8]  = data[2];
+00216       *(unsigned int *)&cpuinfo[cpus].brand[16*i+12] = data[3];
+00217     }
+00218     cpuinfo[cpus].brand[48] = 0;
+00219   } else {
+00220     cpuinfo[cpus].brand[0] = 0;
+00221   }
+00222 
+00223   setDr3(&cpuinfo[cpus]); // DR3 always points to the cpu-struct for that CPU (should be thread-struct of current thread)
+00224   cpuinfo[cpus].id = cpus;
+00225 
+00226   cpus++;
+00227 
+00228   spinUnlock(&cpuInfoLock);
+00229 
+00230   return(cpus - 1);
+00231   }
+00232 
+00233 extern void ap_trampoline_start(),ap_trampoline_end();
+00234 void apicMagic(void) {
+00235   uInt32 tmp;
+00236 
+00237   kprintf("Copying %u bytes from 0x%x to 0x00\n",ap_trampoline_end - ap_trampoline_start,ap_trampoline_start);
+00238   memcpy(0x0,(char *)ap_trampoline_start,ap_trampoline_end - ap_trampoline_start);
+00239   apicWrite(0x280,0);
+00240   apicRead(0x280);
+00241 
+00242   apicWrite(0x300,0x000C4500);  // INIT IPI to all CPUs
+00243   for(tmp=0;tmp<800000;tmp++) asm("nop"); // Sleep a little (should be 10ms)
+00244   apicWrite(0x300,0x000C4600);  // INIT SIPI to all CPUs
+00245   for(tmp=0;tmp<800000;tmp++) asm("nop"); // Sleep a little (should be 200ms)
+00246   apicWrite(0x300,0x000C4600);  // Second INIT SIPI
+00247   for(tmp=0;tmp<800000;tmp++) asm("nop"); // Sleep a little (should be 200ms)
+00248   }
+00249 
+00250 
+00251 
+00252 uInt32 getEflags() {
+00253   uInt32 eflags = 0x0;
+00254   asm(
+00255     "pushfl     \n"
+00256     "popl %%eax \n"
+00257     : "=a" (eflags)
+00258     );
+00259   return(eflags);
+00260   }
+00261 
+00262 void setEflags(uInt32 eflags) {
+00263   asm(
+00264     "pushl %%eax \n"
+00265     "popfl       \n"
+00266     :
+00267     : "a" (eflags)
+00268     );
+00269   }
+00270 
+00271 asm(
+00272   ".globl cpuid            \n"
+00273   "cpuid:                  \n"
+00274   "  pushl   %ebx          \n"
+00275   "  pushl   %edi          \n"
+00276   "  movl    12(%esp),%eax \n"
+00277   "  movl    16(%esp),%edi \n"
+00278   "  cpuid                 \n"
+00279   "  movl    %eax,0(%edi)  \n"
+00280   "  movl    %ebx,4(%edi)  \n"
+00281   "  movl    %ecx,8(%edi)  \n"
+00282   "  movl    %edx,12(%edi) \n"
+00283   "  popl    %edi          \n"
+00284   "  popl    %ebx          \n"
+00285   "  ret                   \n"
+00286   );
+00287  
+00288 /***
+00289  END
+00290  ***/
+00291 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/smp_8c.html b/doc/html/smp_8c.html new file mode 100644 index 0000000..ed75c30 --- /dev/null +++ b/doc/html/smp_8c.html @@ -0,0 +1,748 @@ + + +UbixOS V2: src/sys/kernel/smp.c File Reference + + + + +
+
+
+
+ +

smp.c File Reference

+

+#include <ubixos/smp.h>
+#include <ubixos/spinlock.h>
+#include <ubixos/kpanic.h>
+#include <lib/kprintf.h>
+#include <lib/string.h>
+#include <sys/io.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  gdt_descr

Functions

void ap_trampoline_end ()
void ap_trampoline_start ()
void apicMagic (void)
static unsigned int apicRead (address)
static void apicWrite (unsigned int address, unsigned int data)
 asm (".globl cpuid \n""cpuid: \n"" pushl %ebx \n"" pushl %edi \n"" movl 12(%esp),%eax \n"" movl 16(%esp),%edi \n"" cpuid \n"" movl %eax,0(%edi) \n"" movl %ebx,4(%edi) \n"" movl %ecx,8(%edi) \n"" movl %edx,12(%edi) \n"" popl %edi \n"" popl %ebx \n"" ret \n")
void c_ap_boot (void)
void cpu0_thread (void)
void cpu1_thread (void)
void cpu2_thread (void)
void cpu3_thread (void)
void cpuidDetect ()
uInt8 cpuInfo ()
static void GDT_fixer ()
static __inline__ uInt32 getDr3 (void)
uInt32 getEflags ()
uInt8 kernel_function (void)
static __inline__ void setDr3 (void *dr3)
void setEflags (uInt32 eflags)
void smpInit ()

Variables

static spinLock_t bkl = SPIN_LOCK_INITIALIZER
cpuinfo_t cpuinfo [8]
static spinLock_t cpuInfoLock = SPIN_LOCK_INITIALIZER
static uInt32 cpus = 0
static spinLock_t initSpinLock = SPIN_LOCK_INITIALIZER
uInt8vram = (uInt8 *)0xB8000
+


Function Documentation

+ +
+
+ + + + + + + + +
void ap_trampoline_end (  ) 
+
+
+ +

+ +

+Referenced by apicMagic(). +

+

+ +

+
+ + + + + + + + +
void ap_trampoline_start (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
void apicMagic (void   ) 
+
+
+ +

+ +

+Definition at line 234 of file smp.c. +

+References ap_trampoline_end(), ap_trampoline_start, apicRead(), apicWrite(), kprintf(), and memcpy(). +

+Referenced by smpInit(). +

+

+ +

+
+ + + + + + + + + +
static unsigned int apicRead (address   )  [inline, static]
+
+
+ +

+ +

+Definition at line 45 of file smp.c. +

+Referenced by apicMagic(), and cpuInfo(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
static void apicWrite (unsigned int  address,
unsigned int  data 
) [inline, static]
+
+
+ +

+ +

+Definition at line 49 of file smp.c. +

+Referenced by apicMagic(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
asm (".globl cpuid \n""cpuid: \n"" pushl %ebx \n"" pushl %edi \n"" movl   12(%esp),
%eax\n""movl   16(%esp),
%edi\n""cpuid\n""movl%  eax,
0(%edi)\n""movl%  ebx,
4(%edi)\n""movl%  ecx,
8(%edi)\n""movl%  edx,
12(%edi)\n""popl%edi\n""popl%ebx\n""ret\n"  
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
void c_ap_boot (void   ) 
+
+
+ +

+ +

+Definition at line 137 of file smp.c. +

+References cpu1_thread(), cpu2_thread(), cpu3_thread(), cpuInfo(), initSpinLock, outportByte(), spinLockLocked(), and xe9. +

+

+ +

+
+ + + + + + + + + +
void cpu0_thread (void   ) 
+
+
+ +

+ +

+Definition at line 97 of file smp.c. +

+References kernel_function(), and vram. +

+

+ +

+
+ + + + + + + + + +
void cpu1_thread (void   ) 
+
+
+ +

+ +

+Definition at line 103 of file smp.c. +

+References kernel_function(), and vram. +

+Referenced by c_ap_boot(). +

+

+ +

+
+ + + + + + + + + +
void cpu2_thread (void   ) 
+
+
+ +

+ +

+Definition at line 109 of file smp.c. +

+References kernel_function(), and vram. +

+Referenced by c_ap_boot(). +

+

+ +

+
+ + + + + + + + + +
void cpu3_thread (void   ) 
+
+
+ +

+ +

+Definition at line 115 of file smp.c. +

+References kernel_function(), and vram. +

+Referenced by c_ap_boot(). +

+

+ +

+
+ + + + + + + + +
void cpuidDetect (  ) 
+
+
+ +

+ +

+Definition at line 173 of file smp.c. +

+References getEflags(), kpanic(), and setEflags(). +

+Referenced by smpInit(). +

+

+ +

+
+ + + + + + + + +
uInt8 cpuInfo (  ) 
+
+ +

+ +

+
+ + + + + + + + +
static void GDT_fixer (  )  [static]
+
+
+ +

+ +

+Definition at line 69 of file smp.c. +

+References gdt_descr::limit. +

+Referenced by smpInit(). +

+

+ +

+
+ + + + + + + + + +
static __inline__ uInt32 getDr3 (void   )  [static]
+
+
+ +

+ +

+Definition at line 58 of file smp.c. +

+Referenced by kernel_function(). +

+

+ +

+
+ + + + + + + + +
uInt32 getEflags (  ) 
+
+
+ +

+ +

+Definition at line 252 of file smp.c. +

+Referenced by cpuidDetect(), and cpuInfo(). +

+

+ +

+
+ + + + + + + + + +
uInt8 kernel_function (void   ) 
+
+
+ +

+ +

+Definition at line 123 of file smp.c. +

+References getDr3(), cpuinfo_t::id, spinLock(), and spinUnlock(). +

+Referenced by cpu0_thread(), cpu1_thread(), cpu2_thread(), and cpu3_thread(). +

+

+ +

+
+ + + + + + + + + +
static __inline__ void setDr3 (void *  dr3  )  [static]
+
+
+ +

+ +

+Definition at line 53 of file smp.c. +

+Referenced by cpuInfo(). +

+

+ +

+
+ + + + + + + + + +
void setEflags (uInt32  eflags  ) 
+
+
+ +

+ +

+Definition at line 262 of file smp.c. +

+Referenced by cpuidDetect(), and cpuInfo(). +

+

+ +

+
+ + + + + + + + +
void smpInit (  ) 
+
+
+ +

+ +

+Definition at line 161 of file smp.c. +

+References apicMagic(), cpuidDetect(), cpuInfo(), GDT_fixer(), initSpinLock, spinLock(), and spinUnlock(). +

+

+


Variable Documentation

+ +
+
+ + + + +
spinLock_t bkl = SPIN_LOCK_INITIALIZER [static]
+
+
+ +

+ +

+Definition at line 122 of file smp.c. +

+

+ +

+
+ + + + +
struct cpuinfo_t cpuinfo[8]
+
+
+ +

+ +

+Definition at line 40 of file smp.c. +

+Referenced by cpuInfo(). +

+

+ +

+
+ + + + +
spinLock_t cpuInfoLock = SPIN_LOCK_INITIALIZER [static]
+
+
+ +

+ +

+Definition at line 38 of file smp.c. +

+Referenced by cpuInfo(). +

+

+ +

+
+ + + + +
uInt32 cpus = 0 [static]
+
+
+ +

+ +

+Definition at line 39 of file smp.c. +

+Referenced by cpuInfo(). +

+

+ +

+
+ + + + +
spinLock_t initSpinLock = SPIN_LOCK_INITIALIZER [static]
+
+
+ +

+ +

+Definition at line 37 of file smp.c. +

+Referenced by c_ap_boot(), and smpInit(). +

+

+ +

+
+ + + + +
uInt8* vram = (uInt8 *)0xB8000
+
+
+ +

+ +

+Definition at line 43 of file smp.c. +

+Referenced by cpu0_thread(), cpu1_thread(), cpu2_thread(), and cpu3_thread(). +

+

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/smp_8h-source.html b/doc/html/smp_8h-source.html new file mode 100644 index 0000000..9e8bd32 --- /dev/null +++ b/doc/html/smp_8h-source.html @@ -0,0 +1,110 @@ + + +UbixOS V2: src/sys/include/ubixos/smp.h Source File + + + + +
+
+
+
+ +

smp.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _SMP_H
+00031 #define _SMP_H
+00032 
+00033 #include <ubixos/types.h>
+00034 
+00035 struct cpuinfo_t {
+00036   uInt8  id;
+00037   uInt8  ok;  // 1=Ok, 0=Bad
+00038   uInt8  apic_id,apic_ver;
+00039   uInt32 signature; // Family, Model, Stepping
+00040   uInt32 feature;
+00041   uInt32 max;
+00042   char   brand[49];  // Brand name
+00043   char   ident[17];
+00044   };
+00045 
+00046 
+00047 void smpInit();
+00048 void cpuidDetect();
+00049 uInt8 cpuInfo();
+00050 uInt32 getEflags();
+00051 void setEflags(uInt32);
+00052 void cpuid(uInt32,uInt32 *);
+00053 void apicMagic();
+00054 
+00055 #endif
+00056 
+00057 /***
+00058  $Log$
+00059  Revision 1.1.1.1  2006/06/01 12:46:14  reddawg
+00060  ubix2
+00061 
+00062  Revision 1.2  2005/10/12 00:13:37  reddawg
+00063  Removed
+00064 
+00065  Revision 1.1.1.1  2005/09/26 17:23:56  reddawg
+00066  no message
+00067 
+00068  Revision 1.2  2004/05/21 15:20:00  reddawg
+00069  Cleaned up
+00070 
+00071 
+00072  END
+00073  ***/
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/smp_8h.html b/doc/html/smp_8h.html new file mode 100644 index 0000000..0a614f5 --- /dev/null +++ b/doc/html/smp_8h.html @@ -0,0 +1,240 @@ + + +UbixOS V2: src/sys/include/ubixos/smp.h File Reference + + + + +
+
+
+
+ +

smp.h File Reference

+

+#include <ubixos/types.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  cpuinfo_t

Functions

void apicMagic ()
void cpuid (uInt32, uInt32 *)
void cpuidDetect ()
uInt8 cpuInfo ()
uInt32 getEflags ()
void setEflags (uInt32)
void smpInit ()
+


Function Documentation

+ +
+
+ + + + + + + + +
void apicMagic (  ) 
+
+
+ +

+ +

+Definition at line 234 of file smp.c. +

+References ap_trampoline_end(), ap_trampoline_start, apicRead(), apicWrite(), kprintf(), and memcpy(). +

+Referenced by smpInit(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void cpuid (uInt32 ,
uInt32 
)
+
+
+ +

+ +

+Referenced by cpuInfo(). +

+

+ +

+
+ + + + + + + + +
void cpuidDetect (  ) 
+
+
+ +

+ +

+Definition at line 173 of file smp.c. +

+References getEflags(), kpanic(), and setEflags(). +

+Referenced by smpInit(). +

+

+ +

+
+ + + + + + + + +
uInt8 cpuInfo (  ) 
+
+ +

+ +

+
+ + + + + + + + +
uInt32 getEflags (  ) 
+
+
+ +

+ +

+Definition at line 252 of file smp.c. +

+Referenced by cpuidDetect(), and cpuInfo(). +

+

+ +

+
+ + + + + + + + + +
void setEflags (uInt32   ) 
+
+
+ +

+ +

+Definition at line 262 of file smp.c. +

+Referenced by cpuidDetect(), and cpuInfo(). +

+

+ +

+
+ + + + + + + + +
void smpInit (  ) 
+
+
+ +

+ +

+Definition at line 161 of file smp.c. +

+References apicMagic(), cpuidDetect(), cpuInfo(), GDT_fixer(), initSpinLock, spinLock(), and spinUnlock(). +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/sockets_8c-source.html b/doc/html/sockets_8c-source.html new file mode 100644 index 0000000..b754f07 --- /dev/null +++ b/doc/html/sockets_8c-source.html @@ -0,0 +1,483 @@ + + +UbixOS V2: src/sys/net/api/sockets.c Source File + + + + +
+
+
+
+ +

sockets.c

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 
+00036 #include <ubixos/types.h>
+00037 
+00038 #include "net/debug.h"
+00039 #include "net/api.h"
+00040 
+00041 #include "net/sockets.h"
+00042 
+00043 #define NUM_SOCKETS 10
+00044 
+00045 struct lwip_socket {
+00046   struct netconn *conn;
+00047   struct netbuf *lastdata;
+00048   uInt16 lastoffset;
+00049 };
+00050 
+00051 static struct lwip_socket sockets[NUM_SOCKETS];
+00052 
+00053 /*-----------------------------------------------------------------------------------*/
+00054 static struct lwip_socket *
+00055 get_socket(int s)
+00056 {
+00057   struct lwip_socket *sock;
+00058   
+00059   if(s > NUM_SOCKETS) {
+00060     /* errno = EBADF; */
+00061     return NULL;
+00062   }
+00063   
+00064   sock = &sockets[s];
+00065 
+00066   if(sock->conn == NULL) {
+00067     /* errno = EBADF; */
+00068     return NULL;
+00069   }
+00070   return sock;
+00071 }
+00072 /*-----------------------------------------------------------------------------------*/
+00073 static int
+00074 alloc_socket(struct netconn *newconn)
+00075 {
+00076   int i;
+00077   
+00078   /* allocate a new socket identifier */
+00079   for(i = 0; i < NUM_SOCKETS; ++i) {
+00080     if(sockets[i].conn == NULL) {
+00081       sockets[i].conn = newconn;
+00082       sockets[i].lastdata = NULL;
+00083       sockets[i].lastoffset = 0;
+00084       return i;
+00085     }
+00086   }
+00087   return -1;
+00088 }
+00089 /*-----------------------------------------------------------------------------------*/
+00090 int
+00091 lwip_accept(int s, struct sockaddr *addr, int *addrlen)
+00092 {
+00093   struct lwip_socket *sock;
+00094   struct netconn *newconn;
+00095   struct ip_addr *naddr;
+00096   uInt16 port;
+00097   int newsock;
+00098 
+00099   sock = get_socket(s);
+00100   if(sock == NULL) {
+00101     return -1;
+00102   }
+00103   
+00104   newconn = netconn_accept(sock->conn);
+00105     
+00106   /* get the IP address and port of the remote host */
+00107   netconn_peer(newconn, &naddr, &port);
+00108   
+00109   ((struct sockaddr_in *)addr)->sin_addr.s_addr = naddr->addr;
+00110   ((struct sockaddr_in *)addr)->sin_port = port;
+00111 
+00112   newsock = alloc_socket(newconn);
+00113   if(newsock == -1) {  
+00114     netconn_delete(newconn);
+00115     /* errno = ENOBUFS; */
+00116   }
+00117   return newsock;
+00118 }
+00119 /*-----------------------------------------------------------------------------------*/
+00120 int
+00121 lwip_bind(int s, struct sockaddr *name, int namelen)
+00122 {
+00123   struct lwip_socket *sock;
+00124   struct ip_addr remote_addr;
+00125   uInt16 remote_port;
+00126   err_t err;
+00127   
+00128   sock = get_socket(s);
+00129   if(sock == NULL) {
+00130     return -1;
+00131   }
+00132   
+00133   remote_addr.addr = ((struct sockaddr_in *)name)->sin_addr.s_addr;
+00134   remote_port = ((struct sockaddr_in *)name)->sin_port;
+00135   
+00136   err = netconn_bind(sock->conn, &remote_addr, ntohs(remote_port));
+00137 
+00138   if(err != ERR_OK) {
+00139     /* errno = ... */
+00140     return -1;
+00141   }
+00142 
+00143   return 0;
+00144 }
+00145 /*-----------------------------------------------------------------------------------*/
+00146 int
+00147 lwip_close(int s)
+00148 {
+00149   struct lwip_socket *sock;
+00150   
+00151   DEBUGF(SOCKETS_DEBUG, ("close: socket %d\n", s));
+00152   sock = get_socket(s);
+00153   if(sock == NULL) {
+00154     return -1;
+00155   }
+00156   
+00157   
+00158   netconn_delete(sock->conn);
+00159   if(sock->lastdata != NULL) {
+00160     netbuf_delete(sock->lastdata);
+00161   }
+00162   sock->lastdata = NULL;
+00163   sock->lastoffset = 0;
+00164   sock->conn = NULL;
+00165   return 0;
+00166 }
+00167 /*-----------------------------------------------------------------------------------*/
+00168 int
+00169 lwip_connect(int s, struct sockaddr *name, int namelen)
+00170 {
+00171   struct lwip_socket *sock;
+00172   struct ip_addr remote_addr;
+00173   uInt16 remote_port;
+00174   err_t err;
+00175 
+00176   sock = get_socket(s);
+00177   if(sock == NULL) {
+00178     return -1;
+00179   }
+00180   
+00181   remote_addr.addr = ((struct sockaddr_in *)name)->sin_addr.s_addr;
+00182   remote_port = ((struct sockaddr_in *)name)->sin_port;
+00183   
+00184   err = netconn_connect(sock->conn, &remote_addr, ntohs(remote_port));
+00185 
+00186   if(err != ERR_OK) {
+00187     /* errno = ... */
+00188     return -1;
+00189   }
+00190 
+00191   return 0;
+00192 }
+00193 /*-----------------------------------------------------------------------------------*/
+00194 int
+00195 lwip_listen(int s, int backlog)
+00196 {
+00197   struct lwip_socket *sock;    
+00198   err_t err;
+00199   
+00200   sock = get_socket(s);
+00201   if(sock == NULL) {
+00202     return -1;
+00203   }
+00204  
+00205   err = netconn_listen(sock->conn);
+00206 
+00207   if(err != ERR_OK) {
+00208     /* errno = ... */
+00209     return -1;
+00210   }
+00211 
+00212   return 0;
+00213 }
+00214 /*-----------------------------------------------------------------------------------*/
+00215 int
+00216 lwip_recvfrom(int s, void *mem, int len, unsigned int flags,
+00217               struct sockaddr *from, int *fromlen)
+00218 {
+00219   struct lwip_socket *sock;
+00220   struct netbuf *buf;
+00221   uInt16 buflen, copylen;
+00222   struct ip_addr *addr;
+00223   uInt16 port;
+00224 
+00225   
+00226   sock = get_socket(s);
+00227   if(sock == NULL) {
+00228     return -1;
+00229   }
+00230 
+00231   /* Check if there is data left from the last recv operation. */
+00232   if(sock->lastdata != NULL) {    
+00233     buf = sock->lastdata;
+00234   } else {
+00235     /* No data was left from the previous operation, so we try to get
+00236        some from the network. */
+00237     buf = netconn_recv(sock->conn);
+00238     
+00239     if(buf == NULL) {
+00240       /* We should really do some error checking here. */
+00241       return 0;
+00242     }
+00243   }
+00244   
+00245   buflen = netbuf_len(buf);
+00246 
+00247   buflen -= sock->lastoffset;
+00248   
+00249   if(len > buflen) {
+00250     copylen = buflen;
+00251   } else {
+00252     copylen = len;
+00253   }
+00254   
+00255   /* copy the contents of the received buffer into
+00256      the supplied memory pointer mem */
+00257   netbuf_copy_partial(buf, mem, copylen, sock->lastoffset);
+00258 
+00259   /* If this is a TCP socket, check if there is data left in the
+00260      buffer. If so, it should be saved in the sock structure for next
+00261      time around. */
+00262   if(netconn_type(sock->conn) == NETCONN_TCP && buflen - copylen > 0) {
+00263     sock->lastdata = buf;
+00264     sock->lastoffset = buflen - copylen;
+00265   } else {
+00266     sock->lastdata = NULL;
+00267     sock->lastoffset = 0;
+00268     netbuf_delete(buf);
+00269   }
+00270 
+00271   /* Check to see from where the data was. */
+00272   if(from != NULL && fromlen != NULL) {
+00273     addr = netbuf_fromaddr(buf);
+00274     port = htons(netbuf_fromport(buf));  
+00275     ((struct sockaddr_in *)from)->sin_addr.s_addr = addr->addr;
+00276     ((struct sockaddr_in *)from)->sin_port = port;
+00277     *fromlen = sizeof(struct sockaddr_in);
+00278   }
+00279 
+00280   
+00281   /* if the length of the received data is larger than
+00282      len, this data is discarded and we return len.
+00283      otherwise we return the actual length of the received
+00284      data */
+00285   if(len > copylen) {
+00286     return copylen;
+00287   } else {
+00288     return len;
+00289   }
+00290 }
+00291 /*-----------------------------------------------------------------------------------*/
+00292 int
+00293 lwip_read(int s, void *mem, int len)
+00294 {
+00295   return lwip_recv(s, mem, len, 0);
+00296 }
+00297 /*-----------------------------------------------------------------------------------*/
+00298 int
+00299 lwip_recv(int s, void *mem, int len, unsigned int flags)
+00300 {
+00301   return lwip_recvfrom(s, mem, len, flags, NULL, NULL);
+00302 }
+00303 /*-----------------------------------------------------------------------------------*/
+00304 int
+00305 lwip_send(int s, void *data, int size, unsigned int flags)
+00306 {
+00307   struct lwip_socket *sock;
+00308   struct netbuf *buf;
+00309   err_t err;
+00310 
+00311   DEBUGF(SOCKETS_DEBUG, ("send: socket %d, size %d\n", s, size));
+00312 
+00313   sock = get_socket(s);
+00314   if(sock == NULL) {
+00315     return -1;
+00316   }  
+00317   
+00318   switch(netconn_type(sock->conn)) {
+00319   case NETCONN_UDP:
+00320     /* create a buffer */
+00321     buf = netbuf_new();
+00322 
+00323     if(buf == NULL) {
+00324       /* errno = ENOBUFS; */
+00325       return -1;
+00326     }
+00327     
+00328     /* make the buffer point to the data that should
+00329        be sent */
+00330     netbuf_ref(buf, data, size);
+00331 
+00332     /* send the data */
+00333     err = netconn_send(sock->conn, buf);
+00334 
+00335     /* deallocated the buffer */
+00336     netbuf_delete(buf);
+00337     break;
+00338   case NETCONN_TCP:
+00339     err = netconn_write(sock->conn, data, size, NETCONN_COPY);
+00340     break;
+00341   default:
+00342     err = ERR_ARG;
+00343     break;
+00344   }
+00345   if(err != ERR_OK) {
+00346     /* errno = ... */
+00347     return -1;    
+00348   }
+00349     
+00350   return size;
+00351 }
+00352 /*-----------------------------------------------------------------------------------*/
+00353 int
+00354 lwip_sendto(int s, void *data, int size, unsigned int flags,
+00355        struct sockaddr *to, int tolen)
+00356 {
+00357   struct lwip_socket *sock;
+00358   struct ip_addr remote_addr, *addr;
+00359   uInt16 remote_port, port;
+00360   int ret;
+00361 
+00362   sock = get_socket(s);
+00363   if(sock == NULL) {
+00364     return -1;
+00365   }
+00366   
+00367   /* get the peer if currently connected */
+00368   netconn_peer(sock->conn, &addr, &port);
+00369   
+00370   remote_addr.addr = ((struct sockaddr_in *)to)->sin_addr.s_addr;
+00371   remote_port = ((struct sockaddr_in *)to)->sin_port;
+00372   netconn_connect(sock->conn, &remote_addr, remote_port);
+00373   
+00374   ret = lwip_send(s, data, size, flags);
+00375 
+00376   /* reset the remote address and port number
+00377      of the connection */
+00378   netconn_connect(sock->conn, addr, port);
+00379   return ret;
+00380 }
+00381 /*-----------------------------------------------------------------------------------*/
+00382 int
+00383 lwip_socket(int domain, int type, int protocol)
+00384 {
+00385   struct netconn *conn;
+00386   int i;
+00387 
+00388   /* create a netconn */
+00389   switch(type) {
+00390   case SOCK_DGRAM:
+00391     conn = netconn_new(NETCONN_UDP);
+00392     break;
+00393   case SOCK_STREAM:
+00394     conn = netconn_new(NETCONN_TCP);
+00395     break;
+00396   default:
+00397     /* errno = ... */
+00398     return -1;
+00399   }
+00400 
+00401   if(conn == NULL) {
+00402     DEBUGF(SOCKETS_DEBUG, ("socket: could not create netconn.\n"));
+00403     /* errno = ENOBUFS; */
+00404     return -1;
+00405   }
+00406 
+00407   i = alloc_socket(conn);
+00408 
+00409   if(i == -1) {
+00410     /* errno = ENOBUFS; */
+00411     netconn_delete(conn);
+00412   }
+00413   return i;
+00414 }
+00415 /*-----------------------------------------------------------------------------------*/
+00416 int
+00417 lwip_write(int s, void *data, int size)
+00418 {
+00419   struct lwip_socket *sock;
+00420   err_t err;
+00421 
+00422   DEBUGF(SOCKETS_DEBUG, ("write: socket %d, size %d\n", s, size));
+00423 
+00424   sock = get_socket(s);
+00425   if(sock == NULL) {
+00426     return -1;
+00427   }
+00428     
+00429   switch(netconn_type(sock->conn)) {
+00430   case NETCONN_UDP:
+00431     return lwip_send(s, data, size, 0);
+00432 
+00433   case NETCONN_TCP:
+00434     err = netconn_write(sock->conn, data, size, NETCONN_COPY);
+00435     break;
+00436   default:
+00437     err = ERR_ARG;
+00438     break;
+00439   }
+00440   if(err != ERR_OK) {
+00441     /* errno = ... */
+00442     return -1;
+00443   }
+00444   return size;
+00445 }
+00446 /*-----------------------------------------------------------------------------------*/
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/sockets_8c.html b/doc/html/sockets_8c.html new file mode 100644 index 0000000..99f9abd --- /dev/null +++ b/doc/html/sockets_8c.html @@ -0,0 +1,680 @@ + + +UbixOS V2: src/sys/net/api/sockets.c File Reference + + + + +
+
+
+
+ +

sockets.c File Reference

+

+#include <ubixos/types.h>
+#include "net/debug.h"
+#include "net/api.h"
+#include "net/sockets.h"
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  lwip_socket

Defines

#define NUM_SOCKETS   10

Functions

static int alloc_socket (struct netconn *newconn)
static struct lwip_socketget_socket (int s)
int lwip_accept (int s, struct sockaddr *addr, int *addrlen)
int lwip_bind (int s, struct sockaddr *name, int namelen)
int lwip_close (int s)
int lwip_connect (int s, struct sockaddr *name, int namelen)
int lwip_listen (int s, int backlog)
int lwip_read (int s, void *mem, int len)
int lwip_recv (int s, void *mem, int len, unsigned int flags)
int lwip_recvfrom (int s, void *mem, int len, unsigned int flags, struct sockaddr *from, int *fromlen)
int lwip_send (int s, void *data, int size, unsigned int flags)
int lwip_sendto (int s, void *data, int size, unsigned int flags, struct sockaddr *to, int tolen)
int lwip_socket (int domain, int type, int protocol)
int lwip_write (int s, void *data, int size)

Variables

static struct lwip_socket sockets [NUM_SOCKETS]
+


Define Documentation

+ +
+
+ + + + +
#define NUM_SOCKETS   10
+
+
+ +

+ +

+Definition at line 43 of file sockets.c. +

+Referenced by alloc_socket(), and get_socket(). +

+

+


Function Documentation

+ +
+
+ + + + + + + + + +
static int alloc_socket (struct netconn newconn  )  [static]
+
+
+ +

+ +

+Definition at line 74 of file sockets.c. +

+References lwip_socket::conn, lwip_socket::lastdata, lwip_socket::lastoffset, NULL, NUM_SOCKETS, and sockets. +

+Referenced by lwip_accept(), and lwip_socket(). +

+

+ +

+
+ + + + + + + + + +
static struct lwip_socket* get_socket (int  s  )  [static]
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int lwip_accept (int  s,
struct sockaddr addr,
int *  addrlen 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int lwip_bind (int  s,
struct sockaddr name,
int  namelen 
)
+
+
+ +

+ +

+Definition at line 121 of file sockets.c. +

+References ip_addr::addr, lwip_socket::conn, ERR_OK, get_socket(), name, netconn_bind(), ntohs, and NULL. +

+

+ +

+
+ + + + + + + + + +
int lwip_close (int  s  ) 
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int lwip_connect (int  s,
struct sockaddr name,
int  namelen 
)
+
+
+ +

+ +

+Definition at line 169 of file sockets.c. +

+References ip_addr::addr, lwip_socket::conn, ERR_OK, get_socket(), name, netconn_connect(), ntohs, and NULL. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int lwip_listen (int  s,
int  backlog 
)
+
+
+ +

+ +

+Definition at line 195 of file sockets.c. +

+References lwip_socket::conn, ERR_OK, get_socket(), netconn_listen(), and NULL. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int lwip_read (int  s,
void *  mem,
int  len 
)
+
+
+ +

+ +

+Definition at line 293 of file sockets.c. +

+References lwip_recv(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int lwip_recv (int  s,
void *  mem,
int  len,
unsigned int  flags 
)
+
+
+ +

+ +

+Definition at line 299 of file sockets.c. +

+References lwip_recvfrom(), and NULL. +

+Referenced by lwip_read(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int lwip_recvfrom (int  s,
void *  mem,
int  len,
unsigned int  flags,
struct sockaddr from,
int *  fromlen 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int lwip_send (int  s,
void *  data,
int  size,
unsigned int  flags 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int lwip_sendto (int  s,
void *  data,
int  size,
unsigned int  flags,
struct sockaddr to,
int  tolen 
)
+
+
+ +

+ +

+Definition at line 354 of file sockets.c. +

+References ip_addr::addr, lwip_socket::conn, get_socket(), lwip_send(), netconn_connect(), netconn_peer(), and NULL. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int lwip_socket (int  domain,
int  type,
int  protocol 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int lwip_write (int  s,
void *  data,
int  size 
)
+
+ +

+


Variable Documentation

+ +
+
+ + + + +
struct lwip_socket sockets[NUM_SOCKETS] [static]
+
+
+ +

+ +

+Definition at line 51 of file sockets.c. +

+Referenced by alloc_socket(), and get_socket(). +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/sockets_8h-source.html b/doc/html/sockets_8h-source.html new file mode 100644 index 0000000..207a246 --- /dev/null +++ b/doc/html/sockets_8h-source.html @@ -0,0 +1,141 @@ + + +UbixOS V2: src/sys/include/net/sockets.h Source File + + + + +
+
+
+
+ +

sockets.h

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 
+00036 
+00037 #ifndef __LWIP_SOCKETS_H__
+00038 #define __LWIP_SOCKETS_H__
+00039 
+00040 #include <ubixos/types.h>
+00041 
+00042 struct in_addr {
+00043   uInt32 s_addr;
+00044 };
+00045 
+00046 
+00047 struct sockaddr_in {
+00048   uInt8 sin_len;
+00049   uInt8 sin_family;
+00050   uInt16 sin_port;
+00051   struct in_addr sin_addr;
+00052   char sin_zero[8];
+00053 };
+00054 
+00055 struct sockaddr {
+00056   uInt8 sa_len;
+00057   uInt8 sa_family;
+00058   char sa_data[14];
+00059 };
+00060 
+00061 #define SOCK_STREAM     1
+00062 #define SOCK_DGRAM      2
+00063 
+00064 #define AF_INET         2
+00065 #define PF_INET         AF_INET
+00066 
+00067 #define IPPROTO_TCP     6
+00068 #define IPPROTO_UDP     17
+00069 
+00070 #define INADDR_ANY      0
+00071 #define INADDR_BROADCAST 0xffffffff
+00072 
+00073 int lwip_accept(int s, struct sockaddr *addr, int *addrlen);
+00074 int lwip_bind(int s, struct sockaddr *name, int namelen);
+00075 int lwip_close(int s);
+00076 int lwip_connect(int s, struct sockaddr *name, int namelen);
+00077 int lwip_listen(int s, int backlog);
+00078 int lwip_recv(int s, void *mem, int len, unsigned int flags);
+00079 int lwip_read(int s, void *mem, int len);
+00080 int lwip_recvfrom(int s, void *mem, int len, unsigned int flags,
+00081                   struct sockaddr *from, int *fromlen);
+00082 int lwip_send(int s, void *dataptr, int size, unsigned int flags);
+00083 int lwip_sendto(int s, void *dataptr, int size, unsigned int flags,
+00084                 struct sockaddr *to, int tolen);
+00085 int lwip_socket(int domain, int type, int protocol);
+00086 int lwip_write(int s, void *dataptr, int size);
+00087 
+00088 #ifdef LWIP_COMPAT_SOCKETS
+00089 #define accept(a,b,c)         lwip_accept(a,b,c)
+00090 #define bind(a,b,c)           lwip_bind(a,b,c)
+00091 #define close(s)              lwip_close(s)
+00092 #define connect(a,b,c)        lwip_connect(a,b,c)
+00093 #define listen(a,b)           lwip_listen(a,b)
+00094 #define recv(a,b,c,d)         lwip_recv(a,b,c,d)
+00095 #define read(a,b,c)           lwip_read(a,b,c)
+00096 #define recvfrom(a,b,c,d,e,f) lwip_recvfrom(a,b,c,d,e,f)
+00097 #define send(a,b,c,d)         lwip_send(a,b,c,d)
+00098 #define sendto(a,b,c,d,e,f)   lwip_sendto(a,b,c,d,e,f)
+00099 #define socket(a,b,c)         lwip_socket(a,b,c)
+00100 #define write(a,b,c)          lwip_write(a,b,c)
+00101 #endif /* LWIP_NO_COMPAT_SOCKETS */
+00102 
+00103 #endif /* __LWIP_SOCKETS_H__ */
+00104 
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/sockets_8h.html b/doc/html/sockets_8h.html new file mode 100644 index 0000000..f3ec75e --- /dev/null +++ b/doc/html/sockets_8h.html @@ -0,0 +1,737 @@ + + +UbixOS V2: src/sys/include/net/sockets.h File Reference + + + + +
+
+
+
+ +

sockets.h File Reference

+

+#include <ubixos/types.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  in_addr
struct  sockaddr
struct  sockaddr_in

Defines

#define AF_INET   2
#define INADDR_ANY   0
#define INADDR_BROADCAST   0xffffffff
#define IPPROTO_TCP   6
#define IPPROTO_UDP   17
#define PF_INET   AF_INET
#define SOCK_DGRAM   2
#define SOCK_STREAM   1

Functions

int lwip_accept (int s, struct sockaddr *addr, int *addrlen)
int lwip_bind (int s, struct sockaddr *name, int namelen)
int lwip_close (int s)
int lwip_connect (int s, struct sockaddr *name, int namelen)
int lwip_listen (int s, int backlog)
int lwip_read (int s, void *mem, int len)
int lwip_recv (int s, void *mem, int len, unsigned int flags)
int lwip_recvfrom (int s, void *mem, int len, unsigned int flags, struct sockaddr *from, int *fromlen)
int lwip_send (int s, void *dataptr, int size, unsigned int flags)
int lwip_sendto (int s, void *dataptr, int size, unsigned int flags, struct sockaddr *to, int tolen)
int lwip_socket (int domain, int type, int protocol)
int lwip_write (int s, void *dataptr, int size)
+


Define Documentation

+ +
+
+ + + + +
#define AF_INET   2
+
+
+ +

+ +

+Definition at line 64 of file sockets.h. +

+

+ +

+
+ + + + +
#define INADDR_ANY   0
+
+
+ +

+ +

+Definition at line 70 of file sockets.h. +

+

+ +

+
+ + + + +
#define INADDR_BROADCAST   0xffffffff
+
+
+ +

+ +

+Definition at line 71 of file sockets.h. +

+

+ +

+
+ + + + +
#define IPPROTO_TCP   6
+
+
+ +

+ +

+Definition at line 67 of file sockets.h. +

+

+ +

+
+ + + + +
#define IPPROTO_UDP   17
+
+
+ +

+ +

+Definition at line 68 of file sockets.h. +

+

+ +

+
+ + + + +
#define PF_INET   AF_INET
+
+
+ +

+ +

+Definition at line 65 of file sockets.h. +

+

+ +

+
+ + + + +
#define SOCK_DGRAM   2
+
+
+ +

+ +

+Definition at line 62 of file sockets.h. +

+Referenced by lwip_socket(). +

+

+ +

+
+ + + + +
#define SOCK_STREAM   1
+
+
+ +

+ +

+Definition at line 61 of file sockets.h. +

+Referenced by lwip_socket(). +

+

+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int lwip_accept (int  s,
struct sockaddr addr,
int *  addrlen 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int lwip_bind (int  s,
struct sockaddr name,
int  namelen 
)
+
+
+ +

+ +

+Definition at line 121 of file sockets.c. +

+References ip_addr::addr, lwip_socket::conn, ERR_OK, get_socket(), name, netconn_bind(), ntohs, and NULL. +

+

+ +

+
+ + + + + + + + + +
int lwip_close (int  s  ) 
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int lwip_connect (int  s,
struct sockaddr name,
int  namelen 
)
+
+
+ +

+ +

+Definition at line 169 of file sockets.c. +

+References ip_addr::addr, lwip_socket::conn, ERR_OK, get_socket(), name, netconn_connect(), ntohs, and NULL. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int lwip_listen (int  s,
int  backlog 
)
+
+
+ +

+ +

+Definition at line 195 of file sockets.c. +

+References lwip_socket::conn, ERR_OK, get_socket(), netconn_listen(), and NULL. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int lwip_read (int  s,
void *  mem,
int  len 
)
+
+
+ +

+ +

+Definition at line 293 of file sockets.c. +

+References lwip_recv(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int lwip_recv (int  s,
void *  mem,
int  len,
unsigned int  flags 
)
+
+
+ +

+ +

+Definition at line 299 of file sockets.c. +

+References lwip_recvfrom(), and NULL. +

+Referenced by lwip_read(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int lwip_recvfrom (int  s,
void *  mem,
int  len,
unsigned int  flags,
struct sockaddr from,
int *  fromlen 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int lwip_send (int  s,
void *  dataptr,
int  size,
unsigned int  flags 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int lwip_sendto (int  s,
void *  dataptr,
int  size,
unsigned int  flags,
struct sockaddr to,
int  tolen 
)
+
+
+ +

+ +

+Definition at line 354 of file sockets.c. +

+References ip_addr::addr, lwip_socket::conn, get_socket(), lwip_send(), netconn_connect(), netconn_peer(), and NULL. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int lwip_socket (int  domain,
int  type,
int  protocol 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int lwip_write (int  s,
void *  dataptr,
int  size 
)
+
+ +

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/spinlock_8c-source.html b/doc/html/spinlock_8c-source.html new file mode 100644 index 0000000..4a85e06 --- /dev/null +++ b/doc/html/spinlock_8c-source.html @@ -0,0 +1,115 @@ + + +UbixOS V2: src/sys/kernel/spinlock.c Source File + + + + +
+
+
+
+ +

spinlock.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <ubixos/spinlock.h>
+00031 #include <ubixos/sched.h>
+00032 
+00033 void spinLockInit(spinLock_t *lock) {
+00034   *lock = SPIN_LOCK_INITIALIZER;
+00035   }
+00036 
+00037 void spinUnlock(spinLock_t *lock) {
+00038   *lock = 0x0;
+00039   /*
+00040   register int unlocked;
+00041   asm volatile(
+00042     "xchgl %0, %1"
+00043     : "=&r" (unlocked), "=m" (*lock) : "0" (0)
+00044     );
+00045   */
+00046   }
+00047 
+00048 int spinTryLock(spinLock_t *lock) {
+00049   register int locked;
+00050   asm volatile("xchgl %0, %1"
+00051     : "=&r" (locked), "=m" (*lock) : "0" (1)
+00052     );
+00053   return(!locked);
+00054   }
+00055 
+00056 void spinLock(spinLock_t *lock) {
+00057   while (!spinTryLock(lock))
+00058   {
+00059     while (*lock == 1)
+00060         sched_yield();
+00061   }
+00062 }
+00063 
+00064 void spinLock_scheduler(spinLock_t *lock) {
+00065   while (!spinTryLock(lock))
+00066     while (*lock == 1);
+00067   }
+00068 
+00069 
+00070 int spinLockLocked(spinLock_t *lock) {
+00071   return(*lock != 0);
+00072   }
+00073 
+00074  
+00075 /***
+00076  END
+00077  ***/
+00078 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/spinlock_8c.html b/doc/html/spinlock_8c.html new file mode 100644 index 0000000..5fd927d --- /dev/null +++ b/doc/html/spinlock_8c.html @@ -0,0 +1,206 @@ + + +UbixOS V2: src/sys/kernel/spinlock.c File Reference + + + + +
+
+
+
+ +

spinlock.c File Reference

+

+#include <ubixos/spinlock.h>
+#include <ubixos/sched.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + +

Functions

void spinLock (spinLock_t *lock)
void spinLock_scheduler (spinLock_t *lock)
void spinLockInit (spinLock_t *lock)
int spinLockLocked (spinLock_t *lock)
int spinTryLock (spinLock_t *lock)
void spinUnlock (spinLock_t *lock)
+


Function Documentation

+ +
+
+ + + + + + + + + +
void spinLock (spinLock_t lock  ) 
+
+ +

+ +

+
+ + + + + + + + + +
void spinLock_scheduler (spinLock_t lock  ) 
+
+
+ +

+ +

+Definition at line 64 of file spinlock.c. +

+References spinTryLock(). +

+

+ +

+
+ + + + + + + + + +
void spinLockInit (spinLock_t lock  ) 
+
+
+ +

+ +

+Definition at line 33 of file spinlock.c. +

+References SPIN_LOCK_INITIALIZER. +

+

+ +

+
+ + + + + + + + + +
int spinLockLocked (spinLock_t lock  ) 
+
+
+ +

+ +

+Definition at line 70 of file spinlock.c. +

+Referenced by c_ap_boot(). +

+

+ +

+
+ + + + + + + + + +
int spinTryLock (spinLock_t lock  ) 
+
+
+ +

+ +

+Definition at line 48 of file spinlock.c. +

+Referenced by keyboardHandler(), sched(), spinLock(), and spinLock_scheduler(). +

+

+ +

+
+ + + + + + + + + +
void spinUnlock (spinLock_t lock  ) 
+
+ +

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/spinlock_8h-source.html b/doc/html/spinlock_8h-source.html new file mode 100644 index 0000000..1cfb0eb --- /dev/null +++ b/doc/html/spinlock_8h-source.html @@ -0,0 +1,92 @@ + + +UbixOS V2: src/sys/include/ubixos/spinlock.h Source File + + + + +
+
+
+
+ +

spinlock.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _SPINLOCK_H
+00031 #define _SPINLOCK_H
+00032 
+00033 #include <ubixos/types.h>
+00034 
+00035 #define SPIN_LOCK_INITIALIZER   0
+00036 
+00037 typedef volatile int spinLock_t;
+00038 
+00039 extern spinLock_t Master;
+00040 
+00041 void spinLockInit(spinLock_t *);
+00042 void spinUnlock(spinLock_t *);
+00043 int spinTryLock(spinLock_t *);
+00044 void spinLock(spinLock_t *);
+00045 
+00046 void spinLock_scheduler(spinLock_t *); /* Only use this spinlock in the sched. */
+00047 
+00048 int spinLockLocked(spinLock_t *);
+00049 
+00050 #endif
+00051 
+00052 /***
+00053  END
+00054  ***/
+00055 
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/spinlock_8h.html b/doc/html/spinlock_8h.html new file mode 100644 index 0000000..7037155 --- /dev/null +++ b/doc/html/spinlock_8h.html @@ -0,0 +1,272 @@ + + +UbixOS V2: src/sys/include/ubixos/spinlock.h File Reference + + + + +
+
+
+
+ +

spinlock.h File Reference

+

+#include <ubixos/types.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + +

Defines

#define SPIN_LOCK_INITIALIZER   0

Typedefs

typedef volatile int spinLock_t

Functions

void spinLock (spinLock_t *)
void spinLock_scheduler (spinLock_t *)
void spinLockInit (spinLock_t *)
int spinLockLocked (spinLock_t *)
int spinTryLock (spinLock_t *)
void spinUnlock (spinLock_t *)

Variables

spinLock_t Master
+


Define Documentation

+ +
+
+ + + + +
#define SPIN_LOCK_INITIALIZER   0
+
+
+ +

+ +

+Definition at line 35 of file spinlock.h. +

+Referenced by spinLockInit(). +

+

+


Typedef Documentation

+ +
+
+ + + + +
typedef volatile int spinLock_t
+
+
+ +

+ +

+Definition at line 37 of file spinlock.h. +

+

+


Function Documentation

+ +
+
+ + + + + + + + + +
void spinLock (spinLock_t  ) 
+
+ +

+ +

+
+ + + + + + + + + +
void spinLock_scheduler (spinLock_t  ) 
+
+
+ +

+ +

+Definition at line 64 of file spinlock.c. +

+References spinTryLock(). +

+

+ +

+
+ + + + + + + + + +
void spinLockInit (spinLock_t  ) 
+
+
+ +

+ +

+Definition at line 33 of file spinlock.c. +

+References SPIN_LOCK_INITIALIZER. +

+

+ +

+
+ + + + + + + + + +
int spinLockLocked (spinLock_t  ) 
+
+
+ +

+ +

+Definition at line 70 of file spinlock.c. +

+Referenced by c_ap_boot(). +

+

+ +

+
+ + + + + + + + + +
int spinTryLock (spinLock_t  ) 
+
+
+ +

+ +

+Definition at line 48 of file spinlock.c. +

+Referenced by keyboardHandler(), sched(), spinLock(), and spinLock_scheduler(). +

+

+ +

+
+ + + + + + + + + +
void spinUnlock (spinLock_t  ) 
+
+ +

+


Variable Documentation

+ +
+
+ + + + +
spinLock_t Master
+
+
+ +

+ +

+Definition at line 39 of file syscall_new.c. +

+Referenced by __sysctl(). +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/sqrt_8c-source.html b/doc/html/sqrt_8c-source.html new file mode 100644 index 0000000..5bb3e9b --- /dev/null +++ b/doc/html/sqrt_8c-source.html @@ -0,0 +1,93 @@ + + +UbixOS V2: src/sys/lib/sqrt.c Source File + + + + +
+
+
+
+ +

sqrt.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005 Redistribution and use in source and binary forms, with or without modification, are
+00006 permitted provided that the following conditions are met:
+00007 
+00008 Redistributions of source code must retain the above copyright notice, this list of
+00009 conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010 form must reproduce the above copyright notice, this list of conditions, the following
+00011 disclaimer and the list of authors in the documentation and/or other materials provided
+00012 with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013 contributors may be used to endorse or promote products derived from this software
+00014 without specific prior written permission.
+00015 
+00016 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019 THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021 OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023 TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 double sqrt(double x) {
+00031   return(x); /* Quick Hack */
+00032   }
+00033 
+00034 /***
+00035  $Log$
+00036  Revision 1.1.1.1  2006/06/01 12:46:16  reddawg
+00037  ubix2
+00038 
+00039  Revision 1.2  2005/10/12 00:13:37  reddawg
+00040  Removed
+00041 
+00042  Revision 1.1.1.1  2005/09/26 17:24:13  reddawg
+00043  no message
+00044 
+00045  Revision 1.2  2004/05/19 03:46:32  reddawg
+00046  A Few Quick Hacks To Make Things Work
+00047 
+00048  Revision 1.1.1.1  2004/04/15 12:07:11  reddawg
+00049  UbixOS v1.0
+00050 
+00051  Revision 1.2  2004/04/13 16:36:33  reddawg
+00052  Changed our copyright, it is all now under a BSD-Style license
+00053 
+00054  END
+00055  ***/
+00056 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/sqrt_8c.html b/doc/html/sqrt_8c.html new file mode 100644 index 0000000..5e0ae2d --- /dev/null +++ b/doc/html/sqrt_8c.html @@ -0,0 +1,70 @@ + + +UbixOS V2: src/sys/lib/sqrt.c File Reference + + + + +
+
+
+
+ +

sqrt.c File Reference

+

+ +

+Go to the source code of this file. + + + + +

Functions

double sqrt (double x)
+


Function Documentation

+ +
+
+ + + + + + + + + +
double sqrt (double  x  ) 
+
+
+ +

+ +

+Definition at line 30 of file sqrt.c. +

+

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/start_8S-source.html b/doc/html/start_8S-source.html new file mode 100644 index 0000000..d435a2e --- /dev/null +++ b/doc/html/start_8S-source.html @@ -0,0 +1,112 @@ + + +UbixOS V2: src/sys/init/start.S Source File + + + + +
+
+
+
+ +

start.S

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 .globl _start
+00031 .text
+00032 .code32
+00033 _start:
+00034   movw  $0x1234,0x472
+00035   pushl %ebp
+00036   movl  %esp,%ebp
+00037   pushl $0x00000002
+00038   popfl
+00039   /* Clear the BSS */
+00040   movl  $(_end),%ecx
+00041   movl  $(__bss_start),%edi
+00042   subl  %edi,%ecx
+00043   xorl  %eax,%eax
+00044   cld
+00045   rep
+00046   stosb
+00047  
+00048   /* Load GDT */
+00049   lgdtl (loadGDT)
+00050   mov   $0x10,%eax 
+00051   mov   %eax,%ds
+00052   mov   %eax,%es
+00053   mov   %eax,%fs
+00054   mov   %eax,%gs
+00055   mov   %eax,%ss
+00056   mov   $kStack,%eax
+00057   addl  $0x2000,%eax
+00058   mov   %esp,%edx
+00059   mov   %eax,%esp
+00060   mov   %eax,%ebp 
+00061   mov   $0x18,%ax
+00062   lldt  %ax
+00063   mov   $0x20,%ax
+00064   ltr   %ax
+00065   ljmp  $0x08,$start_next
+00066 start_next:
+00067   push 8(%edx)
+00068   call kmain
+00069 
+00070 .data
+00071 .comm kStack,0x2000
+00072 
+00073 /***
+00074  END
+00075  ***/
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/start_8S.html b/doc/html/start_8S.html new file mode 100644 index 0000000..6ceadaf --- /dev/null +++ b/doc/html/start_8S.html @@ -0,0 +1,547 @@ + + +UbixOS V2: src/sys/init/start.S File Reference + + + + +
+
+
+
+ +

start.S File Reference

+

+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Functions

globl _start text code32 x472
+pushl ebp movl ebp pushl x00000002
+popfl ecx edi subl ecx xorl
+eax cld rep stosb 
lgdtl (loadGDT) mov $0x10
globl _start text code32 x472
+pushl ebp movl ebp pushl x00000002
+popfl ecx 
movl (__bss_start)
globl _start text code32 x472
+pushl ebp movl ebp pushl x00000002
+popfl 
movl (_end)

Variables

globl _start text code32 x472
+pushl ebp movl ebp pushl x00000002
+popfl ecx edi subl ecx xorl
+eax cld rep stosb eax mov
+ds mov es mov fs mov gs mov
+ss mov 
$kStack
globl _start text code32 _start
globl _start text code32 x472
+pushl ebp movl ebp pushl x00000002
+popfl ecx edi subl ecx xorl
+eax cld rep stosb eax mov
+ds mov es mov fs mov gs mov
+ss mov eax addl eax mov edx
+mov esp mov 
eax
globl _start text code32 x472
+pushl ebp movl ebp pushl x00000002
+popfl ecx edi subl ecx xorl
+eax cld rep stosb eax mov
+ds mov es mov fs mov gs mov
+ss mov eax addl eax mov edx
+mov 
eax
globl _start text code32 x472
+pushl ebp movl ebp pushl x00000002
+popfl ecx edi subl ecx xorl
+eax cld rep stosb eax mov
+ds mov es mov fs mov gs mov 
eax
globl _start text code32 x472
+pushl ebp movl ebp pushl x00000002
+popfl ecx edi subl ecx xorl
+eax cld rep stosb eax mov
+ds mov es mov fs mov 
eax
globl _start text code32 x472
+pushl ebp movl ebp pushl x00000002
+popfl ecx edi subl ecx xorl
+eax cld rep stosb eax mov
+ds mov es mov 
eax
globl _start text code32 x472
+pushl ebp movl ebp pushl x00000002
+popfl ecx edi subl ecx xorl
+eax cld rep stosb eax mov
+ds mov 
eax
globl _start text code32 x472
+pushl ebp movl ebp pushl x00000002
+popfl ecx edi subl ecx xorl
+eax cld rep stosb eax mov 
eax
globl _start text code32 x472
+pushl ebp movl ebp pushl x00000002
+popfl ecx edi subl ecx xorl 
eax
globl _start text code32 x472
+pushl ebp movl ebp pushl x00000002
+popfl ecx edi subl 
edi
globl _start text code32 x472
+pushl ebp movl ebp pushl x00000002
+popfl ecx edi subl ecx xorl
+eax cld rep stosb eax mov
+ds mov es mov fs mov gs mov
+ss mov eax addl eax mov 
esp
globl _start text code32 x472
+pushl ebp movl 
esp
globl _start text code32 x472
+pushl ebp movl ebp pushl x00000002
+popfl ecx edi subl ecx xorl
+eax cld rep stosb eax mov
+ds mov es mov fs mov gs mov
+ss mov eax addl eax mov edx
+mov esp mov ebp mov ax lldt
+ax mov ax ltr ax ljmp $start_next 
start_next
globl _start text code32 x472
+pushl ebp movl ebp pushl x00000002
+popfl ecx edi subl ecx xorl
+eax cld rep stosb eax mov
+ds mov es mov fs mov gs mov
+ss mov eax addl eax mov edx
+mov esp mov ebp mov ax lldt
+ax mov ax ltr ax ljmp 
x08
globl _start text code32 x472
+pushl ebp movl ebp pushl x00000002
+popfl ecx edi subl ecx xorl
+eax cld rep stosb eax mov
+ds mov es mov fs mov gs mov
+ss mov eax addl eax mov edx
+mov esp mov ebp mov 
x18
globl _start text code32 x472
+pushl ebp movl ebp pushl x00000002
+popfl ecx edi subl ecx xorl
+eax cld rep stosb eax mov
+ds mov es mov fs mov gs mov
+ss mov eax addl eax mov edx
+mov esp mov ebp mov ax lldt
+ax mov 
x20
globl _start text code32 x472
+pushl ebp movl ebp pushl x00000002
+popfl ecx edi subl ecx xorl
+eax cld rep stosb eax mov
+ds mov es mov fs mov gs mov
+ss mov eax addl 
x2000
+


Function Documentation

+ +
+
+ + + + + + + + + +
globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb lgdtl (loadGDT   ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx movl (__bss_start   ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl movl (_end   ) 
+
+
+ +

+ +

+

+


Variable Documentation

+ +
+
+ + + + +
globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov ds mov es mov fs mov gs mov ss mov $kStack
+
+
+ +

+ +

+Definition at line 51 of file start.S. +

+

+ +

+
+ + + + +
globl _start text code32 _start
+
+
+ +

+ +

+Definition at line 34 of file start.S. +

+

+ +

+
+ + + + +
globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov ds mov es mov fs mov gs mov ss mov eax addl eax mov edx mov esp mov eax
+
+
+ +

+ +

+Definition at line 51 of file start.S. +

+

+ +

+
+ + + + +
globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov ds mov es mov fs mov gs mov ss mov eax addl eax mov edx mov eax
+
+
+ +

+ +

+Definition at line 51 of file start.S. +

+

+ +

+
+ + + + +
globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov ds mov es mov fs mov gs mov eax
+
+
+ +

+ +

+Definition at line 51 of file start.S. +

+

+ +

+
+ + + + +
globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov ds mov es mov fs mov eax
+
+
+ +

+ +

+Definition at line 51 of file start.S. +

+

+ +

+
+ + + + +
globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov ds mov es mov eax
+
+
+ +

+ +

+Definition at line 51 of file start.S. +

+

+ +

+
+ + + + +
globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov ds mov eax
+
+
+ +

+ +

+Definition at line 51 of file start.S. +

+

+ +

+
+ + + + +
globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov eax
+
+
+ +

+ +

+Definition at line 51 of file start.S. +

+

+ +

+
+ + + + +
globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax
+
+
+ +

+ +

+Definition at line 42 of file start.S. +

+

+ +

+
+ + + + +
globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl edi
+
+
+ +

+ +

+Definition at line 42 of file start.S. +

+

+ +

+
+ + + + +
globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov ds mov es mov fs mov gs mov ss mov eax addl eax mov esp
+
+
+ +

+ +

+Definition at line 51 of file start.S. +

+

+ +

+
+ + + + +
globl _start text code32 x472 pushl ebp movl esp
+
+
+ +

+ +

+Definition at line 34 of file start.S. +

+

+ +

+
+ + + + +
globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov ds mov es mov fs mov gs mov ss mov eax addl eax mov edx mov esp mov ebp mov ax lldt ax mov ax ltr ax ljmp $start_next start_next
+
+
+ +

+ +

+Definition at line 51 of file start.S. +

+

+ +

+
+ + + + +
globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov ds mov es mov fs mov gs mov ss mov eax addl eax mov edx mov esp mov ebp mov ax lldt ax mov ax ltr ax ljmp x08
+
+
+ +

+ +

+Definition at line 51 of file start.S. +

+

+ +

+
+ + + + +
globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov ds mov es mov fs mov gs mov ss mov eax addl eax mov edx mov esp mov ebp mov x18
+
+
+ +

+ +

+Definition at line 51 of file start.S. +

+Referenced by execFile(). +

+

+ +

+
+ + + + +
globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov ds mov es mov fs mov gs mov ss mov eax addl eax mov edx mov esp mov ebp mov ax lldt ax mov x20
+
+
+ +

+ +

+Definition at line 51 of file start.S. +

+Referenced by clearScreen(), cpuInfo(), floppyIsrhndlr(), hdRead(), kprint(), lncInt(), ne2k_init(), seek(), and tty_print(). +

+

+ +

+
+ + + + +
globl _start text code32 x472 pushl ebp movl ebp pushl x00000002 popfl ecx edi subl ecx xorl eax cld rep stosb eax mov ds mov es mov fs mov gs mov ss mov eax addl x2000
+
+
+ +

+ +

+Definition at line 51 of file start.S. +

+Referenced by biosCall(), kmain(), and ubthread_create(). +

+

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/static_8c-source.html b/doc/html/static_8c-source.html new file mode 100644 index 0000000..030109e --- /dev/null +++ b/doc/html/static_8c-source.html @@ -0,0 +1,87 @@ + + +UbixOS V2: src/sys/init/static.c Source File + + + + +
+
+
+
+ +

static.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <lib/kprintf.h>
+00031 
+00032 int static_constructors(void) {
+00033   extern void (* __ctor_list)();
+00034   void (** l_ctor)() = &__ctor_list;
+00035   int l_ctorCount = *(int *)l_ctor;
+00036 
+00037 //  kprintf("Calling static constructors\n");
+00038     
+00039   l_ctor++;
+00040   while(l_ctorCount) {
+00041     (*l_ctor)();
+00042     l_ctorCount--;
+00043     l_ctor++;
+00044     }
+00045     return(0x0);
+00046   }
+00047 
+00048 /***
+00049  END
+00050  ***/
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/static_8c.html b/doc/html/static_8c.html new file mode 100644 index 0000000..4973a9a --- /dev/null +++ b/doc/html/static_8c.html @@ -0,0 +1,71 @@ + + +UbixOS V2: src/sys/init/static.c File Reference + + + + +
+
+
+
+ +

static.c File Reference

+

+#include <lib/kprintf.h>
+ +

+Go to the source code of this file. + + + + +

Functions

int static_constructors (void)
+


Function Documentation

+ +
+
+ + + + + + + + + +
int static_constructors (void   ) 
+
+
+ +

+ +

+Definition at line 32 of file static.c. +

+

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/static_8h-source.html b/doc/html/static_8h-source.html new file mode 100644 index 0000000..bc7eec0 --- /dev/null +++ b/doc/html/static_8h-source.html @@ -0,0 +1,43 @@ + + +UbixOS V2: src/sys/include/ubixos/static.h Source File + + + + +
+
+
+
+ +

static.h

Go to the documentation of this file.
00001 #ifndef _UBIXOS_STATIC_H
+00002 #define _UBIXOS_STATIC_H
+00003 
+00004 int static_constructors(void);
+00005 
+00006 #endif
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/static_8h.html b/doc/html/static_8h.html new file mode 100644 index 0000000..be2f01f --- /dev/null +++ b/doc/html/static_8h.html @@ -0,0 +1,70 @@ + + +UbixOS V2: src/sys/include/ubixos/static.h File Reference + + + + +
+
+
+
+ +

static.h File Reference

+

+ +

+Go to the source code of this file. + + + + +

Functions

int static_constructors (void)
+


Function Documentation

+ +
+
+ + + + + + + + + +
int static_constructors (void   ) 
+
+
+ +

+ +

+Definition at line 32 of file static.c. +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/stats_8h-source.html b/doc/html/stats_8h-source.html new file mode 100644 index 0000000..fdb7069 --- /dev/null +++ b/doc/html/stats_8h-source.html @@ -0,0 +1,149 @@ + + +UbixOS V2: src/sys/include/net/stats.h Source File + + + + +
+
+
+
+ +

stats.h

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 #ifndef __LWIP_STATS_H__
+00036 #define __LWIP_STATS_H__
+00037 
+00038 #include "net/opt.h"
+00039 #include "net/arch/cc.h"
+00040 
+00041 #include "net/memp.h"
+00042 
+00043 #ifdef STATS
+00044 
+00045 struct stats_proto {
+00046   uInt16 xmit;    /* Transmitted packets. */
+00047   uInt16 rexmit;  /* Retransmitted packets. */
+00048   uInt16 recv;    /* Received packets. */
+00049   uInt16 fw;      /* Forwarded packets. */
+00050   uInt16 drop;    /* Dropped packets. */
+00051   uInt16 chkerr;  /* Checksum error. */
+00052   uInt16 lenerr;  /* Invalid length error. */
+00053   uInt16 memerr;  /* Out of memory error. */
+00054   uInt16 rterr;   /* Routing error. */
+00055   uInt16 proterr; /* Protocol error. */
+00056   uInt16 opterr;  /* Error in options. */
+00057   uInt16 err;     /* Misc error. */
+00058   uInt16 cachehit;
+00059 };
+00060 
+00061 struct stats_mem {
+00062   uInt16 avail;
+00063   uInt16 used;
+00064   uInt16 max;  
+00065   uInt16 err;
+00066   uInt16 reclaimed;
+00067 };
+00068 
+00069 struct stats_pbuf {
+00070   uInt16 avail;
+00071   uInt16 used;
+00072   uInt16 max;  
+00073   uInt16 err;
+00074   uInt16 reclaimed;
+00075 
+00076   uInt16 alloc_locked;
+00077   uInt16 refresh_locked;
+00078 };
+00079 
+00080 struct stats_syselem {
+00081   uInt16 used;
+00082   uInt16 max;
+00083   uInt16 err;
+00084 };
+00085 
+00086 struct stats_sys {
+00087   struct stats_syselem sem;
+00088   struct stats_syselem mbox;
+00089 };
+00090 
+00091 struct stats_ {
+00092   struct stats_proto link;
+00093   struct stats_proto ip;
+00094   struct stats_proto icmp;
+00095   struct stats_proto udp;
+00096   struct stats_proto tcp;
+00097   struct stats_pbuf pbuf;
+00098   struct stats_mem mem;
+00099   struct stats_mem memp[MEMP_MAX];
+00100   struct stats_sys sys;
+00101 };
+00102 
+00103 extern struct stats_ stats;
+00104 
+00105 #endif /* STATS */
+00106 
+00107 void stats_init(void);
+00108 #endif /* __LWIP_STATS_H__ */
+00109 
+00110 
+00111 
+00112 
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/stats_8h.html b/doc/html/stats_8h.html new file mode 100644 index 0000000..7805238 --- /dev/null +++ b/doc/html/stats_8h.html @@ -0,0 +1,71 @@ + + +UbixOS V2: src/sys/include/net/stats.h File Reference + + + + +
+
+
+
+ +

stats.h File Reference

+

+#include "net/opt.h"
+#include "net/arch/cc.h"
+#include "net/memp.h"
+ +

+Go to the source code of this file. + + + + +

Functions

void stats_init (void)
+


Function Documentation

+ +
+
+ + + + + + + + + +
void stats_init (void   ) 
+
+
+ +

+ +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/stdarg_8h-source.html b/doc/html/stdarg_8h-source.html new file mode 100644 index 0000000..6d68b4e --- /dev/null +++ b/doc/html/stdarg_8h-source.html @@ -0,0 +1,103 @@ + + +UbixOS V2: src/sys/include/stdarg.h Source File + + + + +
+
+
+
+ +

stdarg.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _STDARG_H
+00031 #define _STDARG_H
+00032 
+00033 typedef char *vaList[1];
+00034 
+00035 #define vaStart(ap, parm)  ((ap)[0] = (char *) &parm \
+00036          + ((sizeof(parm) + sizeof(int) - 1) & ~(sizeof(int) - 1)), (void) 0)
+00037 
+00038 #define vaArg(ap, type)  ((ap)[0] += \
+00039          ((sizeof(type) + sizeof(int) - 1) & ~(sizeof(int) - 1)), \
+00040         (*(type *) ((ap)[0] \
+00041          - ((sizeof(type) + sizeof(int) - 1) & ~(sizeof(int) - 1)) )))
+00042 
+00043 #define vaEnd(ap)   ((ap)[0] = 0, (void) 0)
+00044 
+00045 
+00046 int vsprintf(char *buf, const char *fmt, vaList args);
+00047 
+00048 #endif
+00049 
+00050 /***
+00051  $Log$
+00052  Revision 1.1.1.1  2006/06/01 12:46:13  reddawg
+00053  ubix2
+00054 
+00055  Revision 1.2  2005/10/12 00:13:36  reddawg
+00056  Removed
+00057 
+00058  Revision 1.1.1.1  2005/09/26 17:23:38  reddawg
+00059  no message
+00060 
+00061  Revision 1.2  2004/05/21 15:22:35  reddawg
+00062  Cleaned up
+00063 
+00064 
+00065  END
+00066  ***/
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/stdarg_8h.html b/doc/html/stdarg_8h.html new file mode 100644 index 0000000..ac7fe0d --- /dev/null +++ b/doc/html/stdarg_8h.html @@ -0,0 +1,202 @@ + + +UbixOS V2: src/sys/include/stdarg.h File Reference + + + + +
+
+
+
+ +

stdarg.h File Reference

+

+ +

+Go to the source code of this file. + + + + + + + + + + + + + + +

Defines

#define vaArg(ap, type)
#define vaEnd(ap)   ((ap)[0] = 0, (void) 0)
#define vaStart(ap, parm)

Typedefs

typedef char * vaList [1]

Functions

int vsprintf (char *buf, const char *fmt, vaList args)
+


Define Documentation

+ +
+
+ + + + + + + + + + + + +
#define vaArg (ap,
type   ) 
+
+
+ +

+Value:

((ap)[0] += \
+         ((sizeof(type) + sizeof(int) - 1) & ~(sizeof(int) - 1)), \
+        (*(type *) ((ap)[0] \
+         - ((sizeof(type) + sizeof(int) - 1) & ~(sizeof(int) - 1)) )))
+
+

+Definition at line 38 of file stdarg.h. +

+Referenced by vsprintf(). +

+

+ +

+
+ + + + + + + + + +
#define vaEnd (ap   )    ((ap)[0] = 0, (void) 0)
+
+
+ +

+ +

+Definition at line 43 of file stdarg.h. +

+Referenced by kpanic(), kprintf(), and sprintf(). +

+

+ +

+
+ + + + + + + + + + + + +
#define vaStart (ap,
parm   ) 
+
+
+ +

+Value:

((ap)[0] = (char *) &parm \
+         + ((sizeof(parm) + sizeof(int) - 1) & ~(sizeof(int) - 1)), (void) 0)
+
+

+Definition at line 35 of file stdarg.h. +

+Referenced by kpanic(), kprintf(), and sprintf(). +

+

+


Typedef Documentation

+ +
+
+ + + + +
typedef char* vaList[1]
+
+
+ +

+ +

+Definition at line 33 of file stdarg.h. +

+

+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int vsprintf (char *  buf,
const char *  fmt,
vaList  args 
)
+
+
+ +

+ +

+Definition at line 139 of file vsprintf.c. +

+References is_digit, LEFT, number(), PLUS, SIGN, skip_atoi(), SMALL, SPACE, SPECIAL, strlen(), vaArg, and ZEROPAD. +

+Referenced by kpanic(), kprintf(), and sprintf(). +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/string_8c-source.html b/doc/html/string_8c-source.html new file mode 100644 index 0000000..291b349 --- /dev/null +++ b/doc/html/string_8c-source.html @@ -0,0 +1,229 @@ + + +UbixOS V2: src/sys/lib/string.c Source File + + + + +
+
+
+
+ +

string.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <lib/string.h>
+00031 
+00032 char *
+00033 strcpy(char * dst, const char * src) {
+00034   char * tmp = dst;
+00035   do {
+00036     *dst = *src;
+00037     dst++;
+00038   } while (*src++ != '\0');
+00039   return tmp;
+00040 } /* strcpy */
+00041 
+00042 int strcmp(const char *str1,const char *str2) {
+00043   while ((*str1 == *str2) && (*str1 != 0x0) && (*str2 != 0x0)) {
+00044     str1++;
+00045     str2++;
+00046     }
+00047   if (*str1 == *str2) {
+00048     return(0);
+00049     }
+00050   else if (*str1 > *str2) {
+00051     return(1);
+00052     }
+00053   else {
+00054     return(-1);
+00055     }
+00056   }
+00057 
+00058 int strncmp(const char * a, const char * b, size_t c) {
+00059   int i = 0;
+00060   while (i < c) {
+00061     if ((a[i] != b[i]) || (a[i] == '\0') || (b[i] == '\0'))
+00062       return a[i] - b[i];
+00063     i++;
+00064     }
+00065   return 0;
+00066   }
+00067 
+00068 
+00069 
+00070 void *memcpy(const void *dst, const void * src, size_t length) {
+00071   size_t x = length >> 2;
+00072   size_t y = length & 0xf;
+00073   size_t i;
+00074 
+00075   for (i = 0; i < x; i++) {
+00076     ((unsigned long *)dst)[i] = ((unsigned long *)src)[i];
+00077     }
+00078 
+00079   for (i = 0; i < y; i++) {
+00080     ((char *) dst)[length-y+i] = ((char *) src)[length-y+i];
+00081     }
+00082 
+00083   return((void *)dst);
+00084   }
+00085 
+00086 
+00087 int strlen(const char * string) {
+00088   int i = 0;
+00089 
+00090   while (1) {
+00091     if (string[i] == '\0')
+00092       return i;
+00093     i++;
+00094     }
+00095   return 0;
+00096   }  
+00097 
+00098 int memcmp(const void * dst, const void * src, size_t length)
+00099 {
+00100     size_t x = length >> 2;
+00101     size_t y = length & 0xf;
+00102     size_t i;
+00103 
+00104     for (i = 0; i < x; i++)
+00105     {
+00106         if (((unsigned long *)dst)[i] > ((unsigned long *)src)[i])
+00107             return 1;
+00108         if (((unsigned long *)dst)[i] < ((unsigned long *)src)[i])
+00109             return -1;
+00110     }
+00111 
+00112     for (i = 0; i < y; i++)
+00113     {
+00114         if (((char *) dst)[length-y+i] > ((char *) src)[length-y+i])
+00115             return 1;
+00116         if (((char *) dst)[length-y+i] < ((char *) src)[length-y+i])
+00117             return -1;
+00118     }
+00119 
+00120     return 0;
+00121 }
+00122 
+00123 void strncpy(char * dest, const char * src, size_t size)
+00124 {
+00125     if (size == 0)
+00126         return;
+00127     do
+00128     {
+00129         *dest = *src;
+00130         dest++; src++;
+00131         size--;
+00132     }
+00133     while(('\0' != *(src-1)) && (size));
+00134 }
+00135 
+00136 char *strstr(const char *s,char *find) {
+00137   char c, sc;
+00138   size_t len;
+00139 
+00140   if ((c = *find++) != 0) {
+00141     len = strlen(find);
+00142     do {
+00143       do {
+00144         if ((sc = *s++) == 0)
+00145           return (NULL);
+00146         } while (sc != c);
+00147       } while (strncmp(s, find, len) != 0);
+00148     s--;
+00149     }
+00150   return ((char *)s);
+00151   }
+00152 
+00153 
+00154 /***
+00155  $Log$
+00156  Revision 1.1.1.1  2006/06/01 12:46:16  reddawg
+00157  ubix2
+00158 
+00159  Revision 1.2  2005/10/12 00:13:37  reddawg
+00160  Removed
+00161 
+00162  Revision 1.1.1.1  2005/09/26 17:24:13  reddawg
+00163  no message
+00164 
+00165  Revision 1.6  2004/07/28 15:05:43  reddawg
+00166  Major:
+00167    Pages now have strict security enforcement.
+00168    Many null dereferences have been resolved.
+00169    When apps loaded permissions set for pages rw and ro
+00170 
+00171  Revision 1.5  2004/07/20 18:42:41  flameshadow
+00172  add: strcpy()
+00173  chg: modified dirCache.c to use strcpy()
+00174 
+00175  Revision 1.4  2004/07/05 23:06:32  reddawg
+00176  Fixens
+00177 
+00178  Revision 1.3  2004/06/28 23:12:58  reddawg
+00179  file format now container:/path/to/file
+00180 
+00181  Revision 1.2  2004/05/19 14:40:58  reddawg
+00182  Cleaned up some warning from leaving out typedefs
+00183 
+00184  Revision 1.1.1.1  2004/04/15 12:07:11  reddawg
+00185  UbixOS v1.0
+00186 
+00187  Revision 1.5  2004/04/13 16:36:33  reddawg
+00188  Changed our copyright, it is all now under a BSD-Style license
+00189 
+00190  END
+00191  ***/
+00192 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/string_8c.html b/doc/html/string_8c.html new file mode 100644 index 0000000..bc5d997 --- /dev/null +++ b/doc/html/string_8c.html @@ -0,0 +1,334 @@ + + +UbixOS V2: src/sys/lib/string.c File Reference + + + + +
+
+
+
+ +

string.c File Reference

+

+#include <lib/string.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + +

Functions

int memcmp (const void *dst, const void *src, size_t length)
void * memcpy (const void *dst, const void *src, size_t length)
int strcmp (const char *str1, const char *str2)
char * strcpy (char *dst, const char *src)
int strlen (const char *string)
int strncmp (const char *a, const char *b, size_t c)
void strncpy (char *dest, const char *src, size_t size)
char * strstr (const char *s, char *find)
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int memcmp (const void *  dst,
const void *  src,
size_t  length 
)
+
+
+ +

+ +

+Definition at line 98 of file string.c. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void* memcpy (const void *  dst,
const void *  src,
size_t  length 
)
+
+
+ +

+ +

+Definition at line 70 of file string.c. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int strcmp (const char *  str1,
const char *  str2 
)
+
+
+ +

+ +

+Definition at line 42 of file string.c. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
char* strcpy (char *  dst,
const char *  src 
)
+
+
+ +

+ +

+Definition at line 33 of file string.c. +

+Referenced by main(), ubixfs_cacheNew(), and UbixFS::vfs_format(). +

+

+ +

+
+ + + + + + + + + +
int strlen (const char *  string  ) 
+
+
+ +

+ +

+Definition at line 87 of file string.c. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int strncmp (const char *  a,
const char *  b,
size_t  c 
)
+
+
+ +

+ +

+Definition at line 58 of file string.c. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void strncpy (char *  dest,
const char *  src,
size_t  size 
)
+
+
+ +

+ +

+Definition at line 123 of file string.c. +

+Referenced by bTree::bTree(), bTree::Insert(), bTree::insertNode(), UbixFS::mknod(), bTree::splitNode(), and UbixFS::vfs_mkdir(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
char* strstr (const char *  s,
char *  find 
)
+
+
+ +

+ +

+Definition at line 136 of file string.c. +

+References NULL, strlen(), and strncmp(). +

+Referenced by fopen(), sysChDir(), and sysMkDir(). +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/string_8h-source.html b/doc/html/string_8h-source.html new file mode 100644 index 0000000..ed30bee --- /dev/null +++ b/doc/html/string_8h-source.html @@ -0,0 +1,120 @@ + + +UbixOS V2: src/sys/include/string.h Source File + + + + +
+
+
+
+ +

string.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _STRING_H
+00031 #define _STRING_H
+00032 
+00033 #include <ubixos/types.h>
+00034 
+00035 void * memcpy(void * dst, const void * src, size_t length);
+00036 void *memset(void * dst, int c, size_t length);
+00037 int strlen(const char * string);
+00038 int strcmp(const char *,const char *);
+00039 
+00040 int sprintf(char * str, const char * format, ...);
+00041 
+00042 long strtol(const char * __restrict nptr, char ** __restrict endptr, int base);
+00043 
+00044 #endif
+00045 
+00046 /***
+00047  $Log$
+00048  Revision 1.1.1.1  2006/06/01 12:46:13  reddawg
+00049  ubix2
+00050 
+00051  Revision 1.2  2005/10/12 00:13:36  reddawg
+00052  Removed
+00053 
+00054  Revision 1.1.1.1  2005/09/26 17:23:38  reddawg
+00055  no message
+00056 
+00057  Revision 1.5  2004/07/21 10:02:09  reddawg
+00058  devfs: renamed functions
+00059  device system: renamed functions
+00060  fdc: fixed a few potential bugs and cleaned up some unused variables
+00061  strol: fixed definition
+00062  endtask: made it print out freepage debug info
+00063  kmalloc: fixed a huge memory leak we had some unhandled descriptor insertion so some descriptors were lost
+00064  ld: fixed a pointer conversion
+00065  file: cleaned up a few unused variables
+00066  sched: broke task deletion
+00067  kprintf: fixed ogPrintf definition
+00068 
+00069  Revision 1.4  2004/07/05 23:06:32  reddawg
+00070  Fixens
+00071 
+00072  Revision 1.3  2004/06/04 13:29:56  reddawg
+00073  libc: modified mkdir(); interface
+00074  kpanic: kPanic(); now says kPanic: %s
+00075  system: now reboots when receives message for reboot
+00076          also when command start sde is received by system the STD is started
+00077 
+00078  Revision 1.2  2004/05/21 15:22:35  reddawg
+00079  Cleaned up
+00080 
+00081 
+00082  END
+00083  ***/
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/string_8h.html b/doc/html/string_8h.html new file mode 100644 index 0000000..9352c7b --- /dev/null +++ b/doc/html/string_8h.html @@ -0,0 +1,266 @@ + + +UbixOS V2: src/sys/include/string.h File Reference + + + + +
+
+
+
+ +

string.h File Reference

+

+#include <ubixos/types.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + +

Functions

void * memcpy (void *dst, const void *src, size_t length)
void * memset (void *dst, int c, size_t length)
int sprintf (char *str, const char *format,...)
int strcmp (const char *, const char *)
int strlen (const char *string)
long strtol (const char *__restrict nptr, char **__restrict endptr, int base)
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void* memcpy (void *  dst,
const void *  src,
size_t  length 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void* memset (void *  dst,
int  c,
size_t  length 
)
+
+
+ +

+ +

+Definition at line 37 of file memset.c. +

+References VAL, WIDEVAL, wmask, and wsize. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int sprintf (char *  str,
const char *  format,
  ... 
)
+
+
+ +

+ +

+Definition at line 51 of file kprintf.c. +

+References vaEnd, vaStart, and vsprintf(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int strcmp (const char * ,
const char *  
)
+
+
+ +

+ +

+Definition at line 42 of file string.c. +

+

+ +

+
+ + + + + + + + + +
int strlen (const char *  string  ) 
+
+
+ +

+ +

+Definition at line 87 of file string.c. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
long strtol (const char *__restrict  nptr,
char **__restrict  endptr,
int  base 
)
+
+
+ +

+ +

+Definition at line 12 of file strtol.c. +

+References LONG_MAX, LONG_MIN, and NULL. +

+Referenced by inet_aton(). +

+

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/strtok_8c-source.html b/doc/html/strtok_8c-source.html new file mode 100644 index 0000000..3184a19 --- /dev/null +++ b/doc/html/strtok_8c-source.html @@ -0,0 +1,139 @@ + + +UbixOS V2: src/sys/lib/strtok.c Source File + + + + +
+
+
+
+ +

strtok.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005 Redistribution and use in source and binary forms, with or without modification, are
+00006 permitted provided that the following conditions are met:
+00007 
+00008 Redistributions of source code must retain the above copyright notice, this list of
+00009 conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010 form must reproduce the above copyright notice, this list of conditions, the following
+00011 disclaimer and the list of authors in the documentation and/or other materials provided
+00012 with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013 contributors may be used to endorse or promote products derived from this software
+00014 without specific prior written permission.
+00015 
+00016 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019 THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021 OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023 TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <lib/string.h>
+00031 #include <ubixos/types.h>
+00032 
+00033 char *strtok_r(char *s, const char *delim, char **last) {
+00034   char *spanp;
+00035   int c, sc;
+00036   char *tok;
+00037 
+00038   if ((s == NULL) && ((s = *last) == NULL)) {
+00039     return(NULL);
+00040     }
+00041 
+00042 cont:
+00043   c = *s++;
+00044   for (spanp = (char *)delim; (sc = *spanp++) != 0; ) {
+00045     if (c == sc) {
+00046       goto cont;
+00047       }
+00048     }
+00049   if (c == 0) {
+00050     *last = NULL;
+00051     return(NULL);
+00052     }
+00053   tok = s - 1;
+00054 
+00055   for (;;) {
+00056     c = *s++;
+00057     spanp = (char *)delim;
+00058     do {
+00059       if ((sc = *spanp++) == c) {
+00060         if (c == 0) {
+00061           s = NULL;
+00062           }
+00063         else {
+00064           char *w = s - 1;
+00065           *w = '\0';
+00066           }
+00067         *last = s;
+00068         return(tok);
+00069         }
+00070       } while (sc != 0);
+00071     }
+00072   }
+00073 
+00074 char *strtok(char *s, const char *delim) {
+00075   static char *last;
+00076   return (strtok_r(s, delim, &last));
+00077   }
+00078 
+00079 /***
+00080  $Log$
+00081  Revision 1.1.1.1  2006/06/01 12:46:16  reddawg
+00082  ubix2
+00083 
+00084  Revision 1.2  2005/10/12 00:13:37  reddawg
+00085  Removed
+00086 
+00087  Revision 1.1.1.1  2005/09/26 17:24:13  reddawg
+00088  no message
+00089 
+00090  Revision 1.2  2004/05/19 03:46:32  reddawg
+00091  A Few Quick Hacks To Make Things Work
+00092 
+00093  Revision 1.1.1.1  2004/04/15 12:07:11  reddawg
+00094  UbixOS v1.0
+00095 
+00096  Revision 1.2  2004/04/13 16:36:33  reddawg
+00097  Changed our copyright, it is all now under a BSD-Style license
+00098 
+00099  END
+00100  ***/
+00101 
+00102 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/strtok_8c.html b/doc/html/strtok_8c.html new file mode 100644 index 0000000..a0965f8 --- /dev/null +++ b/doc/html/strtok_8c.html @@ -0,0 +1,128 @@ + + +UbixOS V2: src/sys/lib/strtok.c File Reference + + + + +
+
+
+
+ +

strtok.c File Reference

+

+#include <lib/string.h>
+#include <ubixos/types.h>
+ +

+Go to the source code of this file. + + + + + + +

Functions

char * strtok (char *s, const char *delim)
char * strtok_r (char *s, const char *delim, char **last)
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
char* strtok (char *  s,
const char *  delim 
)
+
+
+ +

+ +

+Definition at line 74 of file strtok.c. +

+References strtok_r(). +

+Referenced by fopen(), sysMkDir(), and unlink(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
char* strtok_r (char *  s,
const char *  delim,
char **  last 
)
+
+
+ +

+ +

+Definition at line 33 of file strtok.c. +

+References NULL. +

+Referenced by strtok(). +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/strtol_8c-source.html b/doc/html/strtol_8c-source.html new file mode 100644 index 0000000..ca554a7 --- /dev/null +++ b/doc/html/strtol_8c-source.html @@ -0,0 +1,140 @@ + + +UbixOS V2: src/sys/lib/strtol.c Source File + + + + +
+
+
+
+ +

strtol.c

Go to the documentation of this file.
00001 #include <sys/cdefs.h>
+00002 //#include <limits.h>
+00003 //#include <ctype.h>
+00004 //#include <stdlib.h>
+00005 
+00006 #define LONG_MIN      (-0x7fffffffL - 1)
+00007 #define LONG_MAX      0x7fffffffL
+00008 
+00009 
+00010 
+00011 long
+00012 strtol(const char * __restrict nptr, char ** __restrict endptr, int base)
+00013 {
+00014         const char *s;
+00015         unsigned long acc;
+00016         char c = 0x0;  /* to remove warning */
+00017         unsigned long cutoff;
+00018         int neg, any, cutlim;
+00019 
+00020         /*
+00021          * Skip white space and pick up leading +/- sign if any.
+00022          * If base is 0, allow 0x for hex and 0 for octal, else
+00023          * assume decimal; if base is already 16, allow 0x.
+00024          */
+00025         s = nptr;
+00026         /*
+00027         do {
+00028                 c = *s++;
+00029         } while (isspace((unsigned char)c));
+00030         */
+00031         if (c == '-') {
+00032                 neg = 1;
+00033                 c = *s++;
+00034         } else {
+00035                 neg = 0;
+00036                 if (c == '+')
+00037                         c = *s++;
+00038         }
+00039         if ((base == 0 || base == 16) &&
+00040             c == '0' && (*s == 'x' || *s == 'X')) {
+00041                 c = s[1];
+00042                 s += 2;
+00043                 base = 16;
+00044         }
+00045         if (base == 0)
+00046                 base = c == '0' ? 8 : 10;
+00047         acc = any = 0;
+00048         if (base < 2 || base > 36)
+00049                 goto noconv;
+00050 
+00051         /*
+00052          * Compute the cutoff value between legal numbers and illegal
+00053          * numbers.  That is the largest legal value, divided by the
+00054          * base.  An input number that is greater than this value, if
+00055          * followed by a legal input character, is too big.  One that
+00056          * is equal to this value may be valid or not; the limit
+00057          * between valid and invalid numbers is then based on the last
+00058          * digit.  For instance, if the range for longs is
+00059          * [-2147483648..2147483647] and the input base is 10,
+00060          * cutoff will be set to 214748364 and cutlim to either
+00061          * 7 (neg==0) or 8 (neg==1), meaning that if we have accumulated
+00062          * a value > 214748364, or equal but the next digit is > 7 (or 8),
+00063          * the number is too big, and we will return a range error.
+00064          *
+00065          * Set 'any' if any `digits' consumed; make it negative to indicate
+00066          * overflow.
+00067          */
+00068         cutoff = neg ? (unsigned long)-(LONG_MIN + LONG_MAX) + LONG_MAX
+00069             : LONG_MAX;
+00070         cutlim = cutoff % base;
+00071         cutoff /= base;
+00072         for ( ; ; c = *s++) {
+00073                 if (c >= '0' && c <= '9')
+00074                         c -= '0';
+00075                 else if (c >= 'A' && c <= 'Z')
+00076                         c -= 'A' - 10;
+00077                 else if (c >= 'a' && c <= 'z')
+00078                         c -= 'a' - 10;
+00079                 else
+00080                         break;
+00081                 if (c >= base)
+00082                         break;
+00083                 if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim))
+00084                         any = -1;
+00085                 else {
+00086                         any = 1;
+00087                         acc *= base;
+00088                         acc += c;
+00089                 }
+00090         }
+00091         if (any < 0) {
+00092                 acc = neg ? LONG_MIN : LONG_MAX;
+00093                 //errno = ERANGE;
+00094         } else if (!any) {
+00095 noconv:
+00096                 //errno = EINVAL;
+00097         cutoff = 0x0;//UBU
+00098         } else if (neg)
+00099                 acc = -acc;
+00100         if (endptr != NULL)
+00101                 *endptr = (char *)(any ? s - 1 : nptr);
+00102         return (acc);
+00103 }
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/strtol_8c.html b/doc/html/strtol_8c.html new file mode 100644 index 0000000..6f58eec --- /dev/null +++ b/doc/html/strtol_8c.html @@ -0,0 +1,134 @@ + + +UbixOS V2: src/sys/lib/strtol.c File Reference + + + + +
+
+
+
+ +

strtol.c File Reference

+

+#include <sys/cdefs.h>
+ +

+Go to the source code of this file. + + + + + + + + + +

Defines

#define LONG_MAX   0x7fffffffL
#define LONG_MIN   (-0x7fffffffL - 1)

Functions

long strtol (const char *__restrict nptr, char **__restrict endptr, int base)
+


Define Documentation

+ +
+
+ + + + +
#define LONG_MAX   0x7fffffffL
+
+
+ +

+ +

+Definition at line 7 of file strtol.c. +

+Referenced by strtol(). +

+

+ +

+
+ + + + +
#define LONG_MIN   (-0x7fffffffL - 1)
+
+
+ +

+ +

+Definition at line 6 of file strtol.c. +

+Referenced by strtol(). +

+

+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
long strtol (const char *__restrict  nptr,
char **__restrict  endptr,
int  base 
)
+
+
+ +

+ +

+Definition at line 12 of file strtol.c. +

+References LONG_MAX, LONG_MIN, and NULL. +

+Referenced by inet_aton(). +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structDrvGeom.html b/doc/html/structDrvGeom.html new file mode 100644 index 0000000..31a1aa9 --- /dev/null +++ b/doc/html/structDrvGeom.html @@ -0,0 +1,112 @@ + + +UbixOS V2: DrvGeom Struct Reference + + + + +
+
+
+
+

DrvGeom Struct Reference

#include <fdc.h> +

+


Detailed Description

+ +

+ +

+Definition at line 35 of file fdc.h. + + + + + + + + +

Data Fields

Int8 heads
Int8 spt
Int8 tracks
+


Field Documentation

+ +
+
+ + + + +
Int8 DrvGeom::heads
+
+
+ +

+ +

+Definition at line 36 of file fdc.h. +

+Referenced by block2Hts(). +

+

+ +

+
+ + + + +
Int8 DrvGeom::spt
+
+
+ +

+ +

+Definition at line 38 of file fdc.h. +

+Referenced by block2Hts(), and fdcRw(). +

+

+ +

+
+ + + + +
Int8 DrvGeom::tracks
+
+
+ +

+ +

+Definition at line 37 of file fdc.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structTMode__Rec.html b/doc/html/structTMode__Rec.html new file mode 100644 index 0000000..9c903f3 --- /dev/null +++ b/doc/html/structTMode__Rec.html @@ -0,0 +1,777 @@ + + +UbixOS V2: TMode_Rec Struct Reference + + + + +
+
+
+
+

TMode_Rec Struct Reference

#include <ogDisplay_VESA.h> +

+


Detailed Description

+ +

+ +

+Definition at line 6 of file ogDisplay_VESA.h. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

uInt8 paddington[461] __attribute__ ((packed))
uInt16 OffScreenMemSize __attribute__ ((packed))
void *OffScreenMemOffset __attribute__ ((packed))
uInt32 physBasePtr __attribute__ ((packed))
uInt8 DirectColourMode __attribute__ ((packed))
uInt8 AlphaFieldPosition __attribute__ ((packed))
uInt8 AlphaMaskSize __attribute__ ((packed))
uInt8 BlueFieldPosition __attribute__ ((packed))
uInt8 BlueMaskSize __attribute__ ((packed))
uInt8 GreenFieldPosition __attribute__ ((packed))
uInt8 GreenMaskSize __attribute__ ((packed))
uInt8 RedFieldPosition __attribute__ ((packed))
uInt8 RedMaskSize __attribute__ ((packed))
uInt8 Reserved __attribute__ ((packed))
uInt8 NumOfImagePages __attribute__ ((packed))
uInt8 BankSize __attribute__ ((packed))
uInt8 MemoryModel __attribute__ ((packed))
uInt8 NumberOfBanks __attribute__ ((packed))
uInt8 BitsPerPixel __attribute__ ((packed))
uInt8 NumBitPlanes __attribute__ ((packed))
uInt8 CharHeight __attribute__ ((packed))
uInt8 CharWidth __attribute__ ((packed))
uInt16 yRes __attribute__ ((packed))
uInt16 xRes __attribute__ ((packed))
uInt16 BytesPerLine __attribute__ ((packed))
void *BankSwitch __attribute__ ((packed))
uInt16 WindowBSeg __attribute__ ((packed))
uInt16 WindowASeg __attribute__ ((packed))
uInt16 WindowSize __attribute__ ((packed))
uInt16 Granularity __attribute__ ((packed))
uInt8 WindowBFlags __attribute__ ((packed))
uInt8 WindowAFlags __attribute__ ((packed))
uInt16 ModeAttributes __attribute__ ((packed))
+


Member Function Documentation

+ +
+
+ + + + + + + + + +
uInt8 paddington [461] TMode_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt16 OffScreenMemSize TMode_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
void* OffScreenMemOffset TMode_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt32 physBasePtr TMode_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 DirectColourMode TMode_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 AlphaFieldPosition TMode_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 AlphaMaskSize TMode_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 BlueFieldPosition TMode_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 BlueMaskSize TMode_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 GreenFieldPosition TMode_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 GreenMaskSize TMode_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 RedFieldPosition TMode_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 RedMaskSize TMode_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 Reserved TMode_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 NumOfImagePages TMode_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 BankSize TMode_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 MemoryModel TMode_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 NumberOfBanks TMode_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 BitsPerPixel TMode_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 NumBitPlanes TMode_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 CharHeight TMode_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 CharWidth TMode_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt16 yRes TMode_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt16 xRes TMode_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt16 BytesPerLine TMode_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
void* BankSwitch TMode_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt16 WindowBSeg TMode_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt16 WindowASeg TMode_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt16 WindowSize TMode_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt16 Granularity TMode_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 WindowBFlags TMode_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 WindowAFlags TMode_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt16 ModeAttributes TMode_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:15 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structTVESA__Rec.html b/doc/html/structTVESA__Rec.html new file mode 100644 index 0000000..f9bd0cf --- /dev/null +++ b/doc/html/structTVESA__Rec.html @@ -0,0 +1,315 @@ + + +UbixOS V2: TVESA_Rec Struct Reference + + + + +
+
+
+
+

TVESA_Rec Struct Reference

#include <ogDisplay_VESA.h> +

+


Detailed Description

+ +

+ +

+Definition at line 44 of file ogDisplay_VESA.h. + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

uInt8 paddington[474] __attribute__ ((packed))
uInt32 OEMProductRevPtr __attribute__ ((packed))
uInt32 OEMProductNamePtr __attribute__ ((packed))
uInt32 OEMVendorNamePtr __attribute__ ((packed))
uInt16 OEMSoftwareRev __attribute__ ((packed))
uInt16 TotalMemory __attribute__ ((packed))
uInt32 VideoModePtr __attribute__ ((packed))
uInt32 Capabilities __attribute__ ((packed))
uInt32 OEMStringPtr __attribute__ ((packed))
uInt8 majVersion __attribute__ ((packed))
uInt8 minVersion __attribute__ ((packed))
char VBESignature[4] __attribute__ ((packed))
+


Member Function Documentation

+ +
+
+ + + + + + + + + +
uInt8 paddington [474] TVESA_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt32 OEMProductRevPtr TVESA_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt32 OEMProductNamePtr TVESA_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt32 OEMVendorNamePtr TVESA_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt16 OEMSoftwareRev TVESA_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt16 TotalMemory TVESA_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt32 VideoModePtr TVESA_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt32 Capabilities TVESA_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt32 OEMStringPtr TVESA_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 majVersion TVESA_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 minVersion TVESA_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
char VBESignature [4] TVESA_Rec::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:15 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/struct__UbixUser.html b/doc/html/struct__UbixUser.html new file mode 100644 index 0000000..b11b146 --- /dev/null +++ b/doc/html/struct__UbixUser.html @@ -0,0 +1,171 @@ + + +UbixOS V2: _UbixUser Struct Reference + + + + +
+
+
+
+

_UbixUser Struct Reference


Detailed Description

+ +

+ +

+Definition at line 89 of file syscall.c. + + + + + + + + + + + + + + +

Data Fields

int gid
char * home
char * password
char * shell
int uid
char * username
+


Field Documentation

+ +
+
+ + + + +
int _UbixUser::gid
+
+
+ +

+ +

+Definition at line 94 of file syscall.c. +

+Referenced by sysAuth(). +

+

+ +

+
+ + + + +
char* _UbixUser::home
+
+
+ +

+ +

+Definition at line 95 of file syscall.c. +

+

+ +

+
+ + + + +
char* _UbixUser::password
+
+
+ +

+ +

+Definition at line 92 of file syscall.c. +

+Referenced by sysAuth(). +

+

+ +

+
+ + + + +
char* _UbixUser::shell
+
+
+ +

+ +

+Definition at line 96 of file syscall.c. +

+

+ +

+
+ + + + +
int _UbixUser::uid
+
+
+ +

+ +

+Definition at line 93 of file syscall.c. +

+Referenced by sysAuth(). +

+

+ +

+
+ + + + +
char* _UbixUser::username
+
+
+ +

+ +

+Definition at line 91 of file syscall.c. +

+Referenced by sysAuth(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/struct____sigset.html b/doc/html/struct____sigset.html new file mode 100644 index 0000000..f8dcf95 --- /dev/null +++ b/doc/html/struct____sigset.html @@ -0,0 +1,70 @@ + + +UbixOS V2: __sigset Struct Reference + + + + +
+
+
+
+

__sigset Struct Reference

#include <signal.h> +

+


Detailed Description

+ +

+ +

+Definition at line 8 of file signal.h. + + + + +

Data Fields

__uint32_t __bits [_SIG_WORDS]
+


Field Documentation

+ +
+
+ + + + +
__uint32_t __sigset::__bits[_SIG_WORDS]
+
+
+ +

+ +

+Definition at line 9 of file signal.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/struct____timespec.html b/doc/html/struct____timespec.html new file mode 100644 index 0000000..68bbefb --- /dev/null +++ b/doc/html/struct____timespec.html @@ -0,0 +1,89 @@ + + +UbixOS V2: __timespec Struct Reference + + + + +
+
+
+
+

__timespec Struct Reference

#include <kern_descrip.h> +

+


Detailed Description

+ +

+ +

+Definition at line 96 of file kern_descrip.h. + + + + + + +

Data Fields

long tv_nsec
__time_t tv_sec
+


Field Documentation

+ +
+
+ + + + +
long __timespec::tv_nsec
+
+
+ +

+ +

+Definition at line 98 of file kern_descrip.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 97 of file kern_descrip.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/struct__item__t.html b/doc/html/struct__item__t.html new file mode 100644 index 0000000..fc16315 --- /dev/null +++ b/doc/html/struct__item__t.html @@ -0,0 +1,110 @@ + + +UbixOS V2: _item_t Struct Reference + + + + +
+
+
+
+

_item_t Struct Reference

#include <lists.h> +

+


Detailed Description

+ +

+ +

+Definition at line 7 of file lists.h. + + + + + + + + +

Data Fields

void * data
Item_tNext
Item_tPrevious
+


Field Documentation

+ +
+
+ + + + +
void* _item_t::data
+
+
+ +

+ +

+Definition at line 11 of file lists.h. +

+Referenced by kmod_add(). +

+

+ +

+
+ + + + +
Item_t* _item_t::Next
+
+
+ +

+ +

+Definition at line 10 of file lists.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 9 of file lists.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/struct__list__t.html b/doc/html/struct__list__t.html new file mode 100644 index 0000000..5fdc49f --- /dev/null +++ b/doc/html/struct__list__t.html @@ -0,0 +1,89 @@ + + +UbixOS V2: _list_t Struct Reference + + + + +
+
+
+
+

_list_t Struct Reference

#include <lists.h> +

+


Detailed Description

+ +

+ +

+Definition at line 14 of file lists.h. + + + + + + +

Data Fields

Item_tFirst
Item_tLast
+


Field Documentation

+ +
+
+ + + + +
Item_t* _list_t::First
+
+
+ +

+ +

+Definition at line 16 of file lists.h. +

+

+ +

+
+ + + + +
Item_t* _list_t::Last
+
+
+ +

+ +

+Definition at line 17 of file lists.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structapi__msg.html b/doc/html/structapi__msg.html new file mode 100644 index 0000000..f28889c --- /dev/null +++ b/doc/html/structapi__msg.html @@ -0,0 +1,93 @@ + + +UbixOS V2: api_msg Struct Reference + + + + +
+
+
+
+

api_msg Struct Reference

#include <api_msg.h> +

+


Detailed Description

+ +

+ +

+Definition at line 87 of file api_msg.h. + + + + + + +

Data Fields

api_msg_msg msg
enum api_msg_type type
+


Field Documentation

+ +
+
+ + + + +
struct api_msg_msg api_msg::msg
+
+ +

+ +

+
+ + + + +
enum api_msg_type api_msg::type
+
+
+ +

+ +

+Definition at line 88 of file api_msg.h. +

+Referenced by netconn_recv(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structapi__msg__msg.html b/doc/html/structapi__msg__msg.html new file mode 100644 index 0000000..32a6c84 --- /dev/null +++ b/doc/html/structapi__msg__msg.html @@ -0,0 +1,293 @@ + + +UbixOS V2: api_msg_msg Struct Reference + + + + +
+
+
+
+

api_msg_msg Struct Reference

#include <api_msg.h> +

+


Detailed Description

+ +

+ +

+Definition at line 68 of file api_msg.h. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Fields

netconnconn
enum netconn_type conntype
union {
   struct {
      ip_addr *   ipaddr
      uInt16   port
   }   bc
   uInt16   len
   sys_mbox_t   mbox
   pbuf *   p
   struct {
      unsigned char   copy
      void *   dataptr
      uInt16   len
   }   w
msg
+


Field Documentation

+ +
+
+ + + + +
struct { ... } api_msg_msg::bc
+
+
+ +

+ +

+Referenced by do_bind(), do_connect(), netconn_bind(), and netconn_connect(). +

+

+ +

+
+ + + + +
struct netconn* api_msg_msg::conn
+
+ +

+ +

+ +
+ +

+ +

+Definition at line 70 of file api_msg.h. +

+

+ +

+
+ + + + +
unsigned char api_msg_msg::copy
+
+
+ +

+ +

+Definition at line 80 of file api_msg.h. +

+

+ +

+
+ + + + +
void* api_msg_msg::dataptr
+
+
+ +

+ +

+Definition at line 78 of file api_msg.h. +

+

+ +

+
+ + + + +
struct ip_addr* api_msg_msg::ipaddr
+
+
+ +

+ +

+Definition at line 74 of file api_msg.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 79 of file api_msg.h. +

+Referenced by do_recv(), and netconn_recv(). +

+

+ +

+ +
+ +

+ +

+Definition at line 82 of file api_msg.h. +

+

+ +

+
+ + + + +
union { ... } api_msg_msg::msg
+
+ +

+ +

+
+ + + + +
struct pbuf* api_msg_msg::p
+
+
+ +

+ +

+Definition at line 72 of file api_msg.h. +

+Referenced by do_send(), and netconn_send(). +

+

+ +

+ +
+ +

+ +

+Definition at line 75 of file api_msg.h. +

+

+ +

+
+ + + + +
struct { ... } api_msg_msg::w
+
+
+ +

+ +

+Referenced by do_write(), and netconn_write(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structarp__entry.html b/doc/html/structarp__entry.html new file mode 100644 index 0000000..537b86b --- /dev/null +++ b/doc/html/structarp__entry.html @@ -0,0 +1,112 @@ + + +UbixOS V2: arp_entry Struct Reference + + + + +
+
+
+
+

arp_entry Struct Reference


Detailed Description

+ +

+ +

+Definition at line 82 of file arp.c. + + + + + + + + +

Data Fields

uInt8 ctime
eth_addr ethaddr
ip_addr ipaddr
+


Field Documentation

+ +
+
+ + + + +
uInt8 arp_entry::ctime
+
+
+ +

+ +

+Definition at line 85 of file arp.c. +

+Referenced by add_arp_entry(). +

+

+ +

+
+ + + + +
struct eth_addr arp_entry::ethaddr
+
+
+ +

+ +

+Definition at line 84 of file arp.c. +

+Referenced by add_arp_entry(). +

+

+ +

+
+ + + + +
struct ip_addr arp_entry::ipaddr
+
+
+ +

+ +

+Definition at line 83 of file arp.c. +

+Referenced by add_arp_entry(), arp_init(), and arp_tmr(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structarp__hdr.html b/doc/html/structarp__hdr.html new file mode 100644 index 0000000..b1ea7ac --- /dev/null +++ b/doc/html/structarp__hdr.html @@ -0,0 +1,247 @@ + + +UbixOS V2: arp_hdr Struct Reference + + + + +
+
+
+
+

arp_hdr Struct Reference


Detailed Description

+ +

+ +

+Definition at line 55 of file arp.c. + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

 PACK_STRUCT_FIELD (struct ip_addr dipaddr)
 PACK_STRUCT_FIELD (struct eth_addr dhwaddr)
 PACK_STRUCT_FIELD (struct ip_addr sipaddr)
 PACK_STRUCT_FIELD (struct eth_addr shwaddr)
 PACK_STRUCT_FIELD (uInt16 opcode)
 PACK_STRUCT_FIELD (uInt16 _hwlen_protolen)
 PACK_STRUCT_FIELD (uInt16 proto)
 PACK_STRUCT_FIELD (uInt16 hwtype)
 PACK_STRUCT_FIELD (struct eth_hdr ethhdr)
+


Member Function Documentation

+ +
+
+ + + + + + + + + +
arp_hdr::PACK_STRUCT_FIELD (struct ip_addr  dipaddr  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
arp_hdr::PACK_STRUCT_FIELD (struct eth_addr  dhwaddr  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
arp_hdr::PACK_STRUCT_FIELD (struct ip_addr  sipaddr  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
arp_hdr::PACK_STRUCT_FIELD (struct eth_addr  shwaddr  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
arp_hdr::PACK_STRUCT_FIELD (uInt16  opcode  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
arp_hdr::PACK_STRUCT_FIELD (uInt16  _hwlen_protolen  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
arp_hdr::PACK_STRUCT_FIELD (uInt16  proto  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
arp_hdr::PACK_STRUCT_FIELD (uInt16  hwtype  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
arp_hdr::PACK_STRUCT_FIELD (struct eth_hdr  ethhdr  ) 
+
+
+ +

+ +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structarpcom.html b/doc/html/structarpcom.html new file mode 100644 index 0000000..cbd56e0 --- /dev/null +++ b/doc/html/structarpcom.html @@ -0,0 +1,110 @@ + + +UbixOS V2: arpcom Struct Reference + + + + +
+
+
+
+

arpcom Struct Reference

#include <lnc.h> +

+


Detailed Description

+ +

+ +

+Definition at line 141 of file lnc.h. + + + + + + + + +

Data Fields

uInt8 ac_enaddr [6]
int ac_multicnt
void * ac_netgraph
+


Field Documentation

+ +
+
+ + + + +
uInt8 arpcom::ac_enaddr[6]
+
+
+ +

+ +

+Definition at line 143 of file lnc.h. +

+Referenced by initLNC(), and lncAttach(). +

+

+ +

+
+ + + + +
int arpcom::ac_multicnt
+
+
+ +

+ +

+Definition at line 144 of file lnc.h. +

+

+ +

+
+ + + + +
void* arpcom::ac_netgraph
+
+
+ +

+ +

+Definition at line 145 of file lnc.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structbNode.html b/doc/html/structbNode.html new file mode 100644 index 0000000..c5bed12 --- /dev/null +++ b/doc/html/structbNode.html @@ -0,0 +1,315 @@ + + +UbixOS V2: bNode Struct Reference + + + + +
+
+
+
+

bNode Struct Reference

#include <btree.h> +

+


Detailed Description

+ +

+ +

+Definition at line 20 of file btree.h. + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

char reserved[131] __attribute__ ((packed))
bool leaf __attribute__ ((packed))
uInt32 magic2 __attribute__ ((packed))
uInt32 childCount[B_MAX_KEYS+1] __attribute__ ((packed))
uPtr tail[B_MAX_KEYS+1] __attribute__ ((packed))
uPtr head[B_MAX_KEYS+1] __attribute__ ((packed))
bool present[B_MAX_KEYS+1] __attribute__ ((packed))
char keys[B_MAX_KEYS][B_MAX_NAME_LENGTH] __attribute__ ((packed))
uInt64 tag __attribute__ ((packed))
uPtr parent __attribute__ ((packed))
uInt32 used __attribute__ ((packed))
uInt32 magic1 __attribute__ ((packed))
+


Member Function Documentation

+ +
+
+ + + + + + + + + +
char reserved [131] bNode::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
bool leaf bNode::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt32 magic2 bNode::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt32 childCount [B_MAX_KEYS+1] bNode::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uPtr tail [B_MAX_KEYS+1] bNode::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uPtr head [B_MAX_KEYS+1] bNode::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
bool present [B_MAX_KEYS+1] bNode::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
char keys [B_MAX_KEYS][B_MAX_NAME_LENGTH] bNode::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt64 tag bNode::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uPtr parent bNode::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt32 used bNode::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt32 magic1 bNode::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structbTreeHeader.html b/doc/html/structbTreeHeader.html new file mode 100644 index 0000000..d97f47f --- /dev/null +++ b/doc/html/structbTreeHeader.html @@ -0,0 +1,175 @@ + + +UbixOS V2: bTreeHeader Struct Reference + + + + +
+
+
+
+

bTreeHeader Struct Reference

#include <btreeheader.h> +

+


Detailed Description

+ +

+ +

+Definition at line 4 of file btreeheader.h. + + + + + + + + + + + + + + +

Data Fields

off_t firstDeleted
off_t firstNodeOffset
char paddington [4068]
uInt32 treeDepth
uInt32 treeLeafCount
uInt32 treeWidth
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 9 of file btreeheader.h. +

+Referenced by bTree::bTree(), bTree::Insert(), bTree::Save(), and UbixFS::vfs_format(). +

+

+ +

+ +
+ +

+ +

+Definition at line 8 of file btreeheader.h. +

+Referenced by bTree::bTree(), bTree::Insert(), bTree::Save(), and UbixFS::vfs_format(). +

+

+ +

+
+ + + + +
char bTreeHeader::paddington[4068]
+
+
+ +

+ +

+Definition at line 10 of file btreeheader.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 5 of file btreeheader.h. +

+Referenced by bTree::bTree(), bTree::Info(), bTree::Insert(), bTree::splitNode(), UbixFS::vfs_format(), and bTree::~bTree(). +

+

+ +

+ +
+ +

+ +

+Definition at line 7 of file btreeheader.h. +

+Referenced by bTree::bTree(), bTree::Info(), bTree::Insert(), UbixFS::vfs_format(), and bTree::~bTree(). +

+

+ +

+ +
+ +

+ +

+Definition at line 6 of file btreeheader.h. +

+Referenced by bTree::bTree(), bTree::Info(), bTree::Insert(), UbixFS::vfs_format(), and bTree::~bTree(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structblockAllocationTableEntry.html b/doc/html/structblockAllocationTableEntry.html new file mode 100644 index 0000000..a56ab36 --- /dev/null +++ b/doc/html/structblockAllocationTableEntry.html @@ -0,0 +1,133 @@ + + +UbixOS V2: blockAllocationTableEntry Struct Reference + + + + +
+
+
+
+

blockAllocationTableEntry Struct Reference

#include <ubixfs.h> +

+


Detailed Description

+ +

+ +

+Definition at line 95 of file ubixfs.h. + + + + + + + + + + +

Data Fields

long attributes
long nextBlock
long realSector
long reserved
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 96 of file ubixfs.h. +

+Referenced by freeBlocks(), and getFreeBlocks(). +

+

+ +

+ +
+ +

+ +

+Definition at line 98 of file ubixfs.h. +

+Referenced by freeBlocks(), getFreeBlocks(), ubixfs_loadData(), writeFileByte(), and writeUbixFS(). +

+

+ +

+ +
+ +

+ +

+Definition at line 97 of file ubixfs.h. +

+Referenced by ubixfs_loadData(), ubixFSmkDir(), and writeUbixFS(). +

+

+ +

+ +
+ +

+ +

+Definition at line 99 of file ubixfs.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structblockRun.html b/doc/html/structblockRun.html new file mode 100644 index 0000000..6719931 --- /dev/null +++ b/doc/html/structblockRun.html @@ -0,0 +1,117 @@ + + +UbixOS V2: blockRun Struct Reference + + + + +
+
+
+
+

blockRun Struct Reference

#include <ubixfs.h> +

+


Detailed Description

+ +

+ +

+Definition at line 37 of file ubixfs.h. + + + + + + + + +

Public Member Functions

unsigned short len __attribute__ ((packed))
unsigned short start __attribute__ ((packed))
int AG __attribute__ ((packed))
+


Member Function Documentation

+ +
+
+ + + + + + + + + +
unsigned short len blockRun::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
unsigned short start blockRun::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
int AG blockRun::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structbootSect.html b/doc/html/structbootSect.html new file mode 100644 index 0000000..94a5afa --- /dev/null +++ b/doc/html/structbootSect.html @@ -0,0 +1,279 @@ + + +UbixOS V2: bootSect Struct Reference + + + + +
+
+
+
+

bootSect Struct Reference

#include <ubixfs.h> +

+


Detailed Description

+ +

+ +

+Definition at line 115 of file ubixfs.h. + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Fields

uInt BytesPerSector
uInt8 code [479]
uInt16 fsStart
uInt8 id [6]
uInt8 jmp [4]
uInt32 krnl_start
uInt SectersPerTrack
uInt16 tmp
uInt16 tmp2
uInt TotalHeads
uInt32 TotalSectors
uInt16 version
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 123 of file ubixfs.h. +

+

+ +

+
+ + + + +
uInt8 bootSect::code[479]
+
+
+ +

+ +

+Definition at line 127 of file ubixfs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 120 of file ubixfs.h. +

+

+ +

+
+ + + + +
uInt8 bootSect::id[6]
+
+
+ +

+ +

+Definition at line 117 of file ubixfs.h. +

+

+ +

+
+ + + + +
uInt8 bootSect::jmp[4]
+
+
+ +

+ +

+Definition at line 116 of file ubixfs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 122 of file ubixfs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 124 of file ubixfs.h. +

+

+ +

+
+ + + + +
uInt16 bootSect::tmp
+
+
+ +

+ +

+Definition at line 119 of file ubixfs.h. +

+

+ +

+
+ + + + +
uInt16 bootSect::tmp2
+
+
+ +

+ +

+Definition at line 121 of file ubixfs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 125 of file ubixfs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 126 of file ubixfs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 118 of file ubixfs.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structbsd__disklabel.html b/doc/html/structbsd__disklabel.html new file mode 100644 index 0000000..149d12e --- /dev/null +++ b/doc/html/structbsd__disklabel.html @@ -0,0 +1,607 @@ + + +UbixOS V2: bsd_disklabel Struct Reference + + + + +
+
+
+
+

bsd_disklabel Struct Reference

#include <hd.h> +

+


Detailed Description

+ +

+ +

+Definition at line 86 of file hd.h. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Fields

u_int32_t d_acylinders
u_int32_t d_bbsize
u_int16_t d_checksum
u_int16_t d_cylskew
u_int32_t d_drivedata [NDDATA]
u_int32_t d_flags
u_int32_t d_headswitch
u_int16_t d_interleave
u_int32_t d_magic
u_int32_t d_magic2
u_int32_t d_ncylinders
u_int16_t d_npartitions
u_int32_t d_nsectors
u_int32_t d_ntracks
char d_packname [16]
bsd_disklabel::partition d_partitions [MAXPARTITIONS]
u_int16_t d_rpm
u_int32_t d_sbsize
u_int32_t d_secpercyl
u_int32_t d_secperunit
u_int32_t d_secsize
u_int32_t d_spare [NSPARE]
u_int16_t d_sparespercyl
u_int16_t d_sparespertrack
u_int16_t d_subtype
u_int16_t d_trackskew
u_int32_t d_trkseek
u_int16_t d_type
char d_typename [16]

Data Structures

struct  partition
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 114 of file hd.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 149 of file hd.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 145 of file hd.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 136 of file hd.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 141 of file hd.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 139 of file hd.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 137 of file hd.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 134 of file hd.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 87 of file hd.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 144 of file hd.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 98 of file hd.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 148 of file hd.h. +

+Referenced by initHardDisk(). +

+

+ +

+ +
+ +

+ +

+Definition at line 96 of file hd.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 97 of file hd.h. +

+

+ +

+
+ + + + +
char bsd_disklabel::d_packname[16]
+
+
+ +

+ +

+Definition at line 92 of file hd.h. +

+

+ +

+
+ + + + +
struct bsd_disklabel::partition bsd_disklabel::d_partitions[MAXPARTITIONS]
+
+
+ +

+ +

+Referenced by initHardDisk(). +

+

+ +

+ +
+ +

+ +

+Definition at line 133 of file hd.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 150 of file hd.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 99 of file hd.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 100 of file hd.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 95 of file hd.h. +

+

+ +

+
+ + + + +
u_int32_t bsd_disklabel::d_spare[NSPARE]
+
+
+ +

+ +

+Definition at line 143 of file hd.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 109 of file hd.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 108 of file hd.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 89 of file hd.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 135 of file hd.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 138 of file hd.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 88 of file hd.h. +

+

+ +

+
+ + + + +
char bsd_disklabel::d_typename[16]
+
+
+ +

+ +

+Definition at line 90 of file hd.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structbsd__disklabel_1_1partition.html b/doc/html/structbsd__disklabel_1_1partition.html new file mode 100644 index 0000000..b66f8ca --- /dev/null +++ b/doc/html/structbsd__disklabel_1_1partition.html @@ -0,0 +1,173 @@ + + +UbixOS V2: bsd_disklabel::partition Struct Reference + + + + +
+
+
+
+ +

bsd_disklabel::partition Struct Reference

#include <hd.h> +

+


Detailed Description

+ +

+ +

+Definition at line 151 of file hd.h. + + + + + + + + + + + + + + +

Data Fields

u_int16_t p_cpg
u_int8_t p_frag
u_int32_t p_fsize
u_int8_t p_fstype
u_int32_t p_offset
u_int32_t p_size
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 157 of file hd.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 156 of file hd.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 154 of file hd.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 155 of file hd.h. +

+Referenced by initHardDisk(). +

+

+ +

+ +
+ +

+ +

+Definition at line 153 of file hd.h. +

+Referenced by initHardDisk(). +

+

+ +

+ +
+ +

+ +

+Definition at line 152 of file hd.h. +

+Referenced by initHardDisk(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structbuf.html b/doc/html/structbuf.html new file mode 100644 index 0000000..386c7b9 --- /dev/null +++ b/doc/html/structbuf.html @@ -0,0 +1,49 @@ + + +UbixOS V2: buf Struct Reference + + + + +
+
+
+
+

buf Struct Reference

#include <buf.h> +

+


Detailed Description

+ +

+ +

+Definition at line 37 of file buf.h. + +
+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structcacheNode.html b/doc/html/structcacheNode.html new file mode 100644 index 0000000..a356063 --- /dev/null +++ b/doc/html/structcacheNode.html @@ -0,0 +1,324 @@ + + +UbixOS V2: cacheNode Struct Reference + + + + +
+
+
+
+

cacheNode Struct Reference

#include <dirCache.h> +

+


Detailed Description

+ +

+ +

+Definition at line 7 of file dirCache.h. + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Fields

uInt16attributes
int dirty
cacheNodefileListHead
cacheNodefileListTail
void * info
char * name
cacheNodenext
cacheNodeparent
uInt16permissions
int present
cacheNodeprev
int * size
uInt32startCluster
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 19 of file dirCache.h. +

+Referenced by ubixfs_cacheFind(), ubixfs_cacheNew(), and ubixfs_initialize(). +

+

+ +

+
+ + + + +
int cacheNode::dirty
+
+
+ +

+ +

+Definition at line 17 of file dirCache.h. +

+Referenced by ubixfs_cacheNew(). +

+

+ +

+
+ + + + +
struct cacheNode* cacheNode::fileListHead
+
+
+ +

+ +

+Definition at line 12 of file dirCache.h. +

+Referenced by ubixfs_cacheAdd(), ubixfs_cacheDelete(), ubixfs_cacheFind(), and ubixfs_cacheNew(). +

+

+ +

+
+ + + + +
struct cacheNode* cacheNode::fileListTail
+
+
+ +

+ +

+Definition at line 13 of file dirCache.h. +

+Referenced by ubixfs_cacheAdd(), ubixfs_cacheFind(), and ubixfs_cacheNew(). +

+

+ +

+
+ + + + +
void* cacheNode::info
+
+
+ +

+ +

+Definition at line 14 of file dirCache.h. +

+Referenced by openFileUbixFS(), ubixfs_cacheDelete(), ubixfs_cacheFind(), ubixfs_cacheNew(), and ubixfs_initialize(). +

+

+ +

+
+ + + + +
char* cacheNode::name
+
+
+ +

+ +

+Definition at line 8 of file dirCache.h. +

+Referenced by ubixfs_cacheDelete(), ubixfs_cacheFind(), and ubixfs_cacheNew(). +

+

+ +

+
+ + + + +
struct cacheNode* cacheNode::next
+
+
+ +

+ +

+Definition at line 10 of file dirCache.h. +

+Referenced by ubixfs_cacheAdd(), ubixfs_cacheDelete(), ubixfs_cacheFind(), and ubixfs_cacheNew(). +

+

+ +

+
+ + + + +
struct cacheNode* cacheNode::parent
+
+
+ +

+ +

+Definition at line 11 of file dirCache.h. +

+Referenced by ubixfs_cacheAdd(), ubixfs_cacheFind(), and ubixfs_cacheNew(). +

+

+ +

+ +
+ +

+ +

+Definition at line 20 of file dirCache.h. +

+Referenced by openFileUbixFS(), ubixfs_cacheFind(), ubixfs_cacheNew(), and ubixfs_initialize(). +

+

+ +

+
+ + + + +
int cacheNode::present
+
+
+ +

+ +

+Definition at line 16 of file dirCache.h. +

+Referenced by openFileUbixFS(), ubixfs_cacheFind(), ubixfs_cacheNew(), and ubixfs_initialize(). +

+

+ +

+
+ + + + +
struct cacheNode* cacheNode::prev
+
+
+ +

+ +

+Definition at line 9 of file dirCache.h. +

+Referenced by ubixfs_cacheAdd(), ubixfs_cacheFind(), and ubixfs_cacheNew(). +

+

+ +

+
+ + + + +
int* cacheNode::size
+
+
+ +

+ +

+Definition at line 15 of file dirCache.h. +

+Referenced by openFileUbixFS(), ubixfs_cacheFind(), ubixfs_cacheNew(), and ubixfs_initialize(). +

+

+ +

+ +
+ +

+ +

+Definition at line 18 of file dirCache.h. +

+Referenced by openFileUbixFS(), ubixfs_cacheFind(), ubixfs_cacheNew(), and ubixfs_initialize(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structclose__args.html b/doc/html/structclose__args.html new file mode 100644 index 0000000..611962b --- /dev/null +++ b/doc/html/structclose__args.html @@ -0,0 +1,110 @@ + + +UbixOS V2: close_args Struct Reference + + + + +
+
+
+
+

close_args Struct Reference

#include <sysproto.h> +

+


Detailed Description

+ +

+ +

+Definition at line 93 of file sysproto.h. + + + + + + + + +

Data Fields

int fd
char fd_l_ [PADL_(int)]
char fd_r_ [PADR_(int)]
+


Field Documentation

+ +
+
+ + + + +
int close_args::fd
+
+
+ +

+ +

+Definition at line 94 of file sysproto.h. +

+Referenced by close(). +

+

+ +

+
+ + + + +
char close_args::fd_l_[PADL_(int)]
+
+
+ +

+ +

+Definition at line 94 of file sysproto.h. +

+

+ +

+
+ + + + +
char close_args::fd_r_[PADR_(int)]
+
+
+ +

+ +

+Definition at line 94 of file sysproto.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structconfadd.html b/doc/html/structconfadd.html new file mode 100644 index 0000000..0f995f0 --- /dev/null +++ b/doc/html/structconfadd.html @@ -0,0 +1,169 @@ + + +UbixOS V2: confadd Struct Reference + + + + +
+
+
+
+

confadd Struct Reference

#include <pci.h> +

+


Detailed Description

+ +

+ +

+Definition at line 68 of file pci.h. + + + + + + + + + + + + + + +

Data Fields

uInt8 bus:8
uInt8 dev:5
uInt8 enable:1
uInt8 func:3
uInt8 reg:8
uInt8 rsvd:7
+


Field Documentation

+ +
+
+ + + + +
uInt8 confadd::bus
+
+
+ +

+ +

+Definition at line 72 of file pci.h. +

+Referenced by pci_init(). +

+

+ +

+
+ + + + +
uInt8 confadd::dev
+
+
+ +

+ +

+Definition at line 71 of file pci.h. +

+

+ +

+
+ + + + +
uInt8 confadd::enable
+
+
+ +

+ +

+Definition at line 74 of file pci.h. +

+

+ +

+
+ + + + +
uInt8 confadd::func
+
+
+ +

+ +

+Definition at line 70 of file pci.h. +

+Referenced by pci_init(). +

+

+ +

+
+ + + + +
uInt8 confadd::reg
+
+
+ +

+ +

+Definition at line 69 of file pci.h. +

+

+ +

+
+ + + + +
uInt8 confadd::rsvd
+
+
+ +

+ +

+Definition at line 73 of file pci.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structcpuinfo__t.html b/doc/html/structcpuinfo__t.html new file mode 100644 index 0000000..d3481e1 --- /dev/null +++ b/doc/html/structcpuinfo__t.html @@ -0,0 +1,240 @@ + + +UbixOS V2: cpuinfo_t Struct Reference + + + + +
+
+
+
+

cpuinfo_t Struct Reference

#include <smp.h> +

+


Detailed Description

+ +

+ +

+Definition at line 35 of file smp.h. + + + + + + + + + + + + + + + + + + + + +

Data Fields

uInt8 apic_id
uInt8 apic_ver
char brand [49]
uInt32 feature
uInt8 id
char ident [17]
uInt32 max
uInt8 ok
uInt32 signature
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 38 of file smp.h. +

+Referenced by cpuInfo(). +

+

+ +

+ +
+ +

+ +

+Definition at line 38 of file smp.h. +

+Referenced by cpuInfo(). +

+

+ +

+
+ + + + +
char cpuinfo_t::brand[49]
+
+
+ +

+ +

+Definition at line 42 of file smp.h. +

+Referenced by cpuInfo(). +

+

+ +

+ +
+ +

+ +

+Definition at line 40 of file smp.h. +

+Referenced by cpuInfo(). +

+

+ +

+
+ + + + +
uInt8 cpuinfo_t::id
+
+
+ +

+ +

+Definition at line 36 of file smp.h. +

+Referenced by cpuInfo(), and kernel_function(). +

+

+ +

+
+ + + + +
char cpuinfo_t::ident[17]
+
+
+ +

+ +

+Definition at line 43 of file smp.h. +

+Referenced by cpuInfo(). +

+

+ +

+
+ + + + +
uInt32 cpuinfo_t::max
+
+
+ +

+ +

+Definition at line 41 of file smp.h. +

+Referenced by cpuInfo(). +

+

+ +

+
+ + + + +
uInt8 cpuinfo_t::ok
+
+
+ +

+ +

+Definition at line 37 of file smp.h. +

+Referenced by cpuInfo(). +

+

+ +

+ +
+ +

+ +

+Definition at line 39 of file smp.h. +

+Referenced by cpuInfo(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structcsum.html b/doc/html/structcsum.html new file mode 100644 index 0000000..4c79b0d --- /dev/null +++ b/doc/html/structcsum.html @@ -0,0 +1,127 @@ + + +UbixOS V2: csum Struct Reference + + + + +
+
+
+
+

csum Struct Reference

#include <ufs.h> +

+


Detailed Description

+ +

+ +

+Definition at line 173 of file ufs.h. + + + + + + + + + + +

Data Fields

int32_t cs_nbfree
int32_t cs_ndir
int32_t cs_nffree
int32_t cs_nifree
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 175 of file ufs.h. +

+

+ +

+
+ + + + +
int32_t csum::cs_ndir
+
+
+ +

+ +

+Definition at line 174 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 177 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 176 of file ufs.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structcsum__total.html b/doc/html/structcsum__total.html new file mode 100644 index 0000000..6497d20 --- /dev/null +++ b/doc/html/structcsum__total.html @@ -0,0 +1,165 @@ + + +UbixOS V2: csum_total Struct Reference + + + + +
+
+
+
+

csum_total Struct Reference

#include <ufs.h> +

+


Detailed Description

+ +

+ +

+Definition at line 179 of file ufs.h. + + + + + + + + + + + + + + +

Data Fields

int64_t cs_nbfree
int64_t cs_ndir
int64_t cs_nffree
int64_t cs_nifree
int64_t cs_numclusters
int64_t cs_spare [3]
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 181 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 180 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 183 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 182 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 184 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 185 of file ufs.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structdataStream.html b/doc/html/structdataStream.html new file mode 100644 index 0000000..c709452 --- /dev/null +++ b/doc/html/structdataStream.html @@ -0,0 +1,205 @@ + + +UbixOS V2: dataStream Struct Reference + + + + +
+
+
+
+

dataStream Struct Reference

#include <ubixfs.h> +

+


Detailed Description

+ +

+ +

+Definition at line 100 of file ubixfs.h. + + + + + + + + + + + + + + + + +

Public Member Functions

off_t size __attribute__ ((packed))
off_t maxDoubleIndirectRange __attribute__ ((packed))
blockRun double_indirect __attribute__ ((packed))
off_t maxIndirectRange __attribute__ ((packed))
blockRun indirect __attribute__ ((packed))
off_t maxDirectRange __attribute__ ((packed))
blockRun direct[NUM_DIRECT_BLOCKS] __attribute__ ((packed))
+


Member Function Documentation

+ +
+
+ + + + + + + + + +
off_t size dataStream::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
off_t maxDoubleIndirectRange dataStream::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
struct blockRun double_indirect dataStream::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
off_t maxIndirectRange dataStream::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
struct blockRun indirect dataStream::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
off_t maxDirectRange dataStream::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
struct blockRun direct [NUM_DIRECT_BLOCKS] dataStream::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structdevMethodType.html b/doc/html/structdevMethodType.html new file mode 100644 index 0000000..e630fd2 --- /dev/null +++ b/doc/html/structdevMethodType.html @@ -0,0 +1,49 @@ + + +UbixOS V2: devMethodType Struct Reference + + + + +
+
+
+
+

devMethodType Struct Reference

#include <driver.h> +

+


Detailed Description

+ +

+ +

+Definition at line 38 of file driver.h. + +
+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structdevfs__devices.html b/doc/html/structdevfs__devices.html new file mode 100644 index 0000000..a7dd696 --- /dev/null +++ b/doc/html/structdevfs__devices.html @@ -0,0 +1,177 @@ + + +UbixOS V2: devfs_devices Struct Reference + + + + +
+
+
+
+

devfs_devices Struct Reference

#include <devfs.h> +

+


Detailed Description

+ +

+ +

+Definition at line 36 of file devfs.h. + + + + + + + + + + + + + + +

Data Fields

uInt16 devMajor
uInt16 devMinor
char devName [32]
uInt8 devType
devfs_devicesnext
devfs_devicesprev
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 40 of file devfs.h. +

+Referenced by devfs_makeNode(), devfs_open(), devfs_read(), and devfs_write(). +

+

+ +

+ +
+ +

+ +

+Definition at line 41 of file devfs.h. +

+Referenced by devfs_makeNode(), devfs_open(), devfs_read(), and devfs_write(). +

+

+ +

+
+ + + + +
char devfs_devices::devName[32]
+
+
+ +

+ +

+Definition at line 42 of file devfs.h. +

+Referenced by devfs_makeNode(), and devfs_open(). +

+

+ +

+ +
+ +

+ +

+Definition at line 39 of file devfs.h. +

+Referenced by devfs_makeNode(). +

+

+ +

+
+ + + + +
struct devfs_devices* devfs_devices::next
+
+
+ +

+ +

+Definition at line 37 of file devfs.h. +

+Referenced by devfs_makeNode(), and devfs_open(). +

+

+ +

+
+ + + + +
struct devfs_devices* devfs_devices::prev
+
+
+ +

+ +

+Definition at line 38 of file devfs.h. +

+Referenced by devfs_makeNode(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structdevfs__info.html b/doc/html/structdevfs__info.html new file mode 100644 index 0000000..b44220e --- /dev/null +++ b/doc/html/structdevfs__info.html @@ -0,0 +1,72 @@ + + +UbixOS V2: devfs_info Struct Reference + + + + +
+
+
+
+

devfs_info Struct Reference

#include <devfs.h> +

+


Detailed Description

+ +

+ +

+Definition at line 45 of file devfs.h. + + + + +

Data Fields

devfs_devicesdeviceList
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 46 of file devfs.h. +

+Referenced by devfs_initialize(), devfs_makeNode(), and devfs_open(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structdevice.html b/doc/html/structdevice.html new file mode 100644 index 0000000..b06d20a --- /dev/null +++ b/doc/html/structdevice.html @@ -0,0 +1,150 @@ + + +UbixOS V2: device Struct Reference + + + + +
+
+
+
+

device Struct Reference

#include <device.old.h> +

+


Detailed Description

+ +

+ +

+Definition at line 29 of file device.old.h. + + + + + + + + + + + + +

Data Fields

uInt16 ioAddr
uInt32 irq
uInt32 mtu
netnet
ei_devicepriv
+


Field Documentation

+ +
+
+ + + + +
uInt16 device::ioAddr
+
+
+ +

+ +

+Definition at line 31 of file device.old.h. +

+Referenced by dp_recv(), getblock(), low_level_init(), low_level_output(), ne2k_init(), ne2kHandler(), NICtoPC(), and PCtoNIC(). +

+

+ +

+
+ + + + +
uInt32 device::irq
+
+
+ +

+ +

+Definition at line 32 of file device.old.h. +

+Referenced by low_level_init(), low_level_output(), and ne2k_init(). +

+

+ +

+
+ + + + +
uInt32 device::mtu
+
+
+ +

+ +

+Definition at line 34 of file device.old.h. +

+

+ +

+
+ + + + +
struct net* device::net
+
+
+ +

+ +

+Definition at line 30 of file device.old.h. +

+

+ +

+
+ + + + +
struct ei_device* device::priv
+
+
+ +

+ +

+Definition at line 33 of file device.old.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structdevice__interface.html b/doc/html/structdevice__interface.html new file mode 100644 index 0000000..3dcbb2d --- /dev/null +++ b/doc/html/structdevice__interface.html @@ -0,0 +1,287 @@ + + +UbixOS V2: device_interface Struct Reference + + + + +
+
+
+
+

device_interface Struct Reference

#include <device.h> +

+


Detailed Description

+ +

+ +

+Definition at line 48 of file device.h. + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Fields

void * info
int(* init )(void *)
uInt8 initialized
void(* ioctl )(void *)
int major
void(* read )(void *, void *, uInt32, uInt32)
void(* reset )(void *)
uInt32 size
void(* standby )(void *)
void(* start )(void *)
void(* stop )(void *)
void(* write )(void *, void *, uInt32, uInt32)
+


Field Documentation

+ +
+
+ + + + +
void* device_interface::info
+
+
+ +

+ +

+Definition at line 52 of file device.h. +

+Referenced by devfs_read(), devfs_write(), initHardDisk(), syncBat(), ubixfs_initialize(), and ubixFSUnlink(). +

+

+ +

+
+ + + + +
int(* device_interface::init)(void *)
+
+
+ +

+ +

+Referenced by device_add(), fdc_init(), and initHardDisk(). +

+

+ +

+ +
+ +

+ +

+Definition at line 49 of file device.h. +

+Referenced by device_add(). +

+

+ +

+
+ + + + +
void(* device_interface::ioctl)(void *)
+
+
+ +

+ +

+Referenced by initHardDisk(). +

+

+ +

+
+ + + + +
int device_interface::major
+
+
+ +

+ +

+Definition at line 51 of file device.h. +

+Referenced by device_find(), fdc_init(), and initHardDisk(). +

+

+ +

+
+ + + + +
void(* device_interface::read)(void *, void *, uInt32, uInt32)
+
+ +

+ +

+
+ + + + +
void(* device_interface::reset)(void *)
+
+
+ +

+ +

+Referenced by fdc_init(), and initHardDisk(). +

+

+ +

+ +
+ +

+ +

+Definition at line 50 of file device.h. +

+Referenced by devfs_open(). +

+

+ +

+
+ + + + +
void(* device_interface::standby)(void *)
+
+
+ +

+ +

+Referenced by initHardDisk(). +

+

+ +

+
+ + + + +
void(* device_interface::start)(void *)
+
+
+ +

+ +

+Referenced by initHardDisk(). +

+

+ +

+
+ + + + +
void(* device_interface::stop)(void *)
+
+
+ +

+ +

+Referenced by initHardDisk(). +

+

+ +

+
+ + + + +
void(* device_interface::write)(void *, void *, uInt32, uInt32)
+
+ +

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structdevice__node.html b/doc/html/structdevice__node.html new file mode 100644 index 0000000..99f1c28 --- /dev/null +++ b/doc/html/structdevice__node.html @@ -0,0 +1,251 @@ + + +UbixOS V2: device_node Struct Reference + + + + +
+
+
+
+

device_node Struct Reference

#include <device.h> +

+


Detailed Description

+ +

+ +

+Definition at line 35 of file device.h. + + + + + + + + + + + + + + + + + + + + + + +

Data Fields

device_tdevInfo
device_interfacedevInfo
device_resourcedevRec
device_resourcedevRec
int minor
device_nodenext
device_nodenext
device_nodeprev
device_nodeprev
char type
+


Field Documentation

+ +
+
+ + + + +
struct device_t* device_node::devInfo
+
+
+ +

+ +

+Definition at line 40 of file device.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 38 of file device.h. +

+Referenced by devfs_open(), devfs_read(), devfs_write(), device_add(), device_find(), syncBat(), ubixfs_initialize(), and ubixFSUnlink(). +

+

+ +

+ +
+ +

+ +

+Definition at line 41 of file device.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 39 of file device.h. +

+

+ +

+
+ + + + +
int device_node::minor
+
+
+ +

+ +

+Definition at line 41 of file device.h. +

+Referenced by device_add(), and device_find(). +

+

+ +

+
+ + + + +
struct device_node* device_node::next
+
+
+ +

+ +

+Definition at line 39 of file device.h. +

+

+ +

+
+ + + + +
struct device_node* device_node::next
+
+
+ +

+ +

+Definition at line 37 of file device.h. +

+Referenced by device_add(), device_find(), and device_remove(). +

+

+ +

+
+ + + + +
struct device_node* device_node::prev
+
+
+ +

+ +

+Definition at line 38 of file device.h. +

+

+ +

+
+ + + + +
struct device_node* device_node::prev
+
+
+ +

+ +

+Definition at line 36 of file device.h. +

+Referenced by device_add(). +

+

+ +

+
+ + + + +
char device_node::type
+
+
+ +

+ +

+Definition at line 40 of file device.h. +

+Referenced by device_add(). +

+

+


The documentation for this struct was generated from the following files: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structdevice__resource.html b/doc/html/structdevice__resource.html new file mode 100644 index 0000000..eeb393e --- /dev/null +++ b/doc/html/structdevice__resource.html @@ -0,0 +1,70 @@ + + +UbixOS V2: device_resource Struct Reference + + + + +
+
+
+
+

device_resource Struct Reference

#include <device.h> +

+


Detailed Description

+ +

+ +

+Definition at line 44 of file device.h. + + + + +

Data Fields

uInt8 irq
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 45 of file device.h. +

+

+


The documentation for this struct was generated from the following files: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structdevice__t.html b/doc/html/structdevice__t.html new file mode 100644 index 0000000..8f21387 --- /dev/null +++ b/doc/html/structdevice__t.html @@ -0,0 +1,252 @@ + + +UbixOS V2: device_t Struct Reference + + + + +
+
+
+
+

device_t Struct Reference

#include <device.h> +

+


Detailed Description

+ +

+ +

+Definition at line 50 of file device.h. + + + + + + + + + + + + + + + + + + + + + + + + +

Data Fields

void * info
int(* init )(device_t *)
void(* ioctl )(void *)
int major
int(* read )(device_t *, void *, off_t, size_t)
int(* reset )(void *)
uInt32 sectors
void(* standby )(void *)
void(* start )(void *)
void(* stop )(void *)
int(* write )(device_t *, void *, off_t, size_t)
+


Field Documentation

+ +
+
+ + + + +
void* device_t::info
+
+
+ +

+ +

+Definition at line 52 of file device.h. +

+

+ +

+
+ + + + +
int(* device_t::init)(device_t *)
+
+
+ +

+ +

+

+ +

+
+ + + + +
void(* device_t::ioctl)(void *)
+
+
+ +

+ +

+

+ +

+
+ + + + +
int device_t::major
+
+
+ +

+ +

+Definition at line 51 of file device.h. +

+Referenced by dev_ramDrive(). +

+

+ +

+
+ + + + +
int(* device_t::read)(device_t *, void *, off_t, size_t)
+
+
+ +

+ +

+Referenced by dev_ramDrive(). +

+

+ +

+
+ + + + +
int(* device_t::reset)(void *)
+
+
+ +

+ +

+

+ +

+ +
+ +

+ +

+Definition at line 53 of file device.h. +

+Referenced by dev_ramDrive(). +

+

+ +

+
+ + + + +
void(* device_t::standby)(void *)
+
+
+ +

+ +

+

+ +

+
+ + + + +
void(* device_t::start)(void *)
+
+
+ +

+ +

+

+ +

+
+ + + + +
void(* device_t::stop)(void *)
+
+
+ +

+ +

+

+ +

+
+ + + + +
int(* device_t::write)(device_t *, void *, off_t, size_t)
+
+
+ +

+ +

+Referenced by dev_ramDrive(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structdirectoryEntry.html b/doc/html/structdirectoryEntry.html new file mode 100644 index 0000000..6856a10 --- /dev/null +++ b/doc/html/structdirectoryEntry.html @@ -0,0 +1,232 @@ + + +UbixOS V2: directoryEntry Struct Reference + + + + +
+
+
+
+

directoryEntry Struct Reference

#include <ubixfs.h> +

+


Detailed Description

+ +

+ +

+Definition at line 103 of file ubixfs.h. + + + + + + + + + + + + + + + + + + + + +

Data Fields

uInt16 attributes
uInt32 creationDate
char fileName [256]
uInt32 gid
uInt32 lastModified
uInt16 permissions
uInt32 size
uInt32 startCluster
uInt32 uid
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 110 of file ubixfs.h. +

+Referenced by ubixFSmkDir(). +

+

+ +

+ +
+ +

+ +

+Definition at line 106 of file ubixfs.h. +

+

+ +

+
+ + + + +
char directoryEntry::fileName[256]
+
+
+ +

+ +

+Definition at line 112 of file ubixfs.h. +

+Referenced by ubixfs_findName(), ubixFSmkDir(), ubixFSUnlink(), and writeUbixFS(). +

+

+ +

+ +
+ +

+ +

+Definition at line 109 of file ubixfs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 107 of file ubixfs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 111 of file ubixfs.h. +

+Referenced by ubixFSmkDir(). +

+

+ +

+ +
+ +

+ +

+Definition at line 105 of file ubixfs.h. +

+Referenced by ubixFSmkDir(), and writeUbixFS(). +

+

+ +

+ +
+ +

+ +

+Definition at line 104 of file ubixfs.h. +

+Referenced by ubixFSmkDir(), and writeUbixFS(). +

+

+ +

+ +
+ +

+ +

+Definition at line 108 of file ubixfs.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structdirectoryList.html b/doc/html/structdirectoryList.html new file mode 100644 index 0000000..0fd6709 --- /dev/null +++ b/doc/html/structdirectoryList.html @@ -0,0 +1,154 @@ + + +UbixOS V2: directoryList Struct Reference + + + + +
+
+
+
+

directoryList Struct Reference

#include <ubixfs.h> +

+


Detailed Description

+ +

+ +

+Definition at line 57 of file ubixfs.h. + + + + + + + + + + + + +

Data Fields

uInt32 dirBlock
char * dirCache
char dirName [256]
directoryListnext
directoryListprev
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 60 of file ubixfs.h. +

+

+ +

+
+ + + + +
char* directoryList::dirCache
+
+
+ +

+ +

+Definition at line 59 of file ubixfs.h. +

+Referenced by ubixFSLoadDir(). +

+

+ +

+
+ + + + +
char directoryList::dirName[256]
+
+
+ +

+ +

+Definition at line 58 of file ubixfs.h. +

+Referenced by ubixFSLoadDir(). +

+

+ +

+
+ + + + +
struct directoryList* directoryList::next
+
+
+ +

+ +

+Definition at line 61 of file ubixfs.h. +

+Referenced by ubixFSLoadDir(). +

+

+ +

+
+ + + + +
struct directoryList* directoryList::prev
+
+
+ +

+ +

+Definition at line 62 of file ubixfs.h. +

+Referenced by ubixFSLoadDir(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structdirent.html b/doc/html/structdirent.html new file mode 100644 index 0000000..61e0352 --- /dev/null +++ b/doc/html/structdirent.html @@ -0,0 +1,154 @@ + + +UbixOS V2: dirent Struct Reference + + + + +
+
+
+
+

dirent Struct Reference

#include <ufs.h> +

+


Detailed Description

+ +

+ +

+Definition at line 112 of file ufs.h. + + + + + + + + + + + + +

Data Fields

__uint32_t d_fileno
char d_name [MAXNAMLEN+1]
__uint8_t d_namlen
__uint16_t d_reclen
__uint8_t d_type
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 113 of file ufs.h. +

+Referenced by fsfind(). +

+

+ +

+
+ + + + +
char dirent::d_name[MAXNAMLEN+1]
+
+
+ +

+ +

+Definition at line 117 of file ufs.h. +

+Referenced by fsfind(). +

+

+ +

+ +
+ +

+ +

+Definition at line 116 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 114 of file ufs.h. +

+Referenced by fsfind(). +

+

+ +

+ +
+ +

+ +

+Definition at line 115 of file ufs.h. +

+Referenced by fsfind(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structdiskSuperBlock.html b/doc/html/structdiskSuperBlock.html new file mode 100644 index 0000000..56cb616 --- /dev/null +++ b/doc/html/structdiskSuperBlock.html @@ -0,0 +1,557 @@ + + +UbixOS V2: diskSuperBlock Struct Reference + + + + +
+
+
+
+

diskSuperBlock Struct Reference

#include <ubixfs.h> +

+


Detailed Description

+ +

+ +

+Definition at line 56 of file ubixfs.h. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

char pad[368] __attribute__ ((packed))
inodeAddr indicies __attribute__ ((packed))
inodeAddr rootDir __attribute__ ((packed))
int32 magic3 __attribute__ ((packed))
off_t logEnd __attribute__ ((packed))
off_t logStart __attribute__ ((packed))
blockRun logBlocks __attribute__ ((packed))
int32 flags __attribute__ ((packed))
uInt32 lastUsedAG __attribute__ ((packed))
uInt32 numAGs __attribute__ ((packed))
uInt32 AGShift __attribute__ ((packed))
uInt32 blocksPerAG __attribute__ ((packed))
uInt32 magic2 __attribute__ ((packed))
uInt32 inodeSize __attribute__ ((packed))
uInt32 inodeCount __attribute__ ((packed))
uInt32 batSectors __attribute__ ((packed))
off_t usedBlocks __attribute__ ((packed))
off_t numBlocks __attribute__ ((packed))
uInt32 blockShift __attribute__ ((packed))
int32 blockSize __attribute__ ((packed))
int32 fsByteOrder __attribute__ ((packed))
int32 magic1 __attribute__ ((packed))
char name[32] __attribute__ ((packed))
+


Member Function Documentation

+ +
+
+ + + + + + + + + +
char pad [368] diskSuperBlock::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
inodeAddr indicies diskSuperBlock::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
inodeAddr rootDir diskSuperBlock::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
int32 magic3 diskSuperBlock::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
off_t logEnd diskSuperBlock::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
off_t logStart diskSuperBlock::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
blockRun logBlocks diskSuperBlock::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
int32 flags diskSuperBlock::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt32 lastUsedAG diskSuperBlock::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt32 numAGs diskSuperBlock::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt32 AGShift diskSuperBlock::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt32 blocksPerAG diskSuperBlock::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt32 magic2 diskSuperBlock::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt32 inodeSize diskSuperBlock::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt32 inodeCount diskSuperBlock::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt32 batSectors diskSuperBlock::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
off_t usedBlocks diskSuperBlock::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
off_t numBlocks diskSuperBlock::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt32 blockShift diskSuperBlock::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
int32 blockSize diskSuperBlock::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
int32 fsByteOrder diskSuperBlock::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
int32 magic1 diskSuperBlock::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
char name [32] diskSuperBlock::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structdmadat.html b/doc/html/structdmadat.html new file mode 100644 index 0000000..6edca36 --- /dev/null +++ b/doc/html/structdmadat.html @@ -0,0 +1,127 @@ + + +UbixOS V2: dmadat Struct Reference + + + + +
+
+
+
+

dmadat Struct Reference

#include <file.h> +

+


Detailed Description

+ +

+ +

+Definition at line 39 of file file.h. + + + + + + + + + + +

Data Fields

char blkbuf [VBLKSIZE]
char indbuf [VBLKSIZE]
char sbbuf [SBLOCKSIZE]
char secbuf [DEV_BSIZE]
+


Field Documentation

+ +
+
+ + + + +
char dmadat::blkbuf[VBLKSIZE]
+
+
+ +

+ +

+Definition at line 40 of file file.h. +

+

+ +

+
+ + + + +
char dmadat::indbuf[VBLKSIZE]
+
+
+ +

+ +

+Definition at line 41 of file file.h. +

+

+ +

+
+ + + + +
char dmadat::sbbuf[SBLOCKSIZE]
+
+
+ +

+ +

+Definition at line 42 of file file.h. +

+

+ +

+
+ + + + +
char dmadat::secbuf[DEV_BSIZE]
+
+
+ +

+ +

+Definition at line 43 of file file.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structdos__partition.html b/doc/html/structdos__partition.html new file mode 100644 index 0000000..76e4883 --- /dev/null +++ b/doc/html/structdos__partition.html @@ -0,0 +1,243 @@ + + +UbixOS V2: dos_partition Struct Reference + + + + +
+
+
+
+

dos_partition Struct Reference

#include <hd.h> +

+


Detailed Description

+ +

+ +

+Definition at line 71 of file hd.h. + + + + + + + + + + + + + + + + + + + + + + +

Data Fields

unsigned char dp_ecyl
unsigned char dp_ehd
unsigned char dp_esect
unsigned char dp_flag
unsigned char dp_scyl
unsigned char dp_shd
uInt32 dp_size
unsigned char dp_ssect
uInt32 dp_start
unsigned char dp_type
+


Field Documentation

+ +
+
+ + + + +
unsigned char dos_partition::dp_ecyl
+
+
+ +

+ +

+Definition at line 79 of file hd.h. +

+

+ +

+
+ + + + +
unsigned char dos_partition::dp_ehd
+
+
+ +

+ +

+Definition at line 77 of file hd.h. +

+

+ +

+
+ + + + +
unsigned char dos_partition::dp_esect
+
+
+ +

+ +

+Definition at line 78 of file hd.h. +

+

+ +

+
+ + + + +
unsigned char dos_partition::dp_flag
+
+
+ +

+ +

+Definition at line 72 of file hd.h. +

+

+ +

+
+ + + + +
unsigned char dos_partition::dp_scyl
+
+
+ +

+ +

+Definition at line 75 of file hd.h. +

+

+ +

+
+ + + + +
unsigned char dos_partition::dp_shd
+
+
+ +

+ +

+Definition at line 73 of file hd.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 81 of file hd.h. +

+

+ +

+
+ + + + +
unsigned char dos_partition::dp_ssect
+
+
+ +

+ +

+Definition at line 74 of file hd.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 80 of file hd.h. +

+Referenced by initHardDisk(). +

+

+ +

+
+ + + + +
unsigned char dos_partition::dp_type
+
+
+ +

+ +

+Definition at line 76 of file hd.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structdp__rcvhdr.html b/doc/html/structdp__rcvhdr.html new file mode 100644 index 0000000..592fa33 --- /dev/null +++ b/doc/html/structdp__rcvhdr.html @@ -0,0 +1,127 @@ + + +UbixOS V2: dp_rcvhdr Struct Reference + + + + +
+
+
+
+

dp_rcvhdr Struct Reference

#include <ne2k.h> +

+


Detailed Description

+ +

+ +

+Definition at line 37 of file ne2k.h. + + + + + + + + + + +

Data Fields

uInt8 dr_next
uInt8 dr_rbch
uInt8 dr_rbcl
uInt8 dr_status
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 40 of file ne2k.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 42 of file ne2k.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 41 of file ne2k.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 39 of file ne2k.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structdriveInfo.html b/doc/html/structdriveInfo.html new file mode 100644 index 0000000..96e90af --- /dev/null +++ b/doc/html/structdriveInfo.html @@ -0,0 +1,299 @@ + + +UbixOS V2: driveInfo Struct Reference + + + + +
+
+
+
+

driveInfo Struct Reference

#include <hd.h> +

+


Detailed Description

+ +

+ +

+Definition at line 46 of file hd.h. + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Fields

driveDiskLabel * diskLabel
long hdCalc
char hdDev
char hdEnable
char hdFlags
long hdMask
long hdMulti
long hdPort
char hdSector [512]
char hdShift
long hdSize
long parOffset
+


Field Documentation

+ +
+
+ + + + +
struct driveDiskLabel* driveInfo::diskLabel
+
+
+ +

+ +

+Definition at line 47 of file hd.h. +

+

+ +

+
+ + + + +
long driveInfo::hdCalc
+
+
+ +

+ +

+Definition at line 57 of file hd.h. +

+Referenced by hdRead(), and hdWrite(). +

+

+ +

+
+ + + + +
char driveInfo::hdDev
+
+
+ +

+ +

+Definition at line 50 of file hd.h. +

+Referenced by hdInit(), hdRead(), hdWrite(), and initHardDisk(). +

+

+ +

+
+ + + + +
char driveInfo::hdEnable
+
+
+ +

+ +

+Definition at line 49 of file hd.h. +

+Referenced by hdInit(), hdRead(), and hdWrite(). +

+

+ +

+
+ + + + +
char driveInfo::hdFlags
+
+
+ +

+ +

+Definition at line 51 of file hd.h. +

+

+ +

+
+ + + + +
long driveInfo::hdMask
+
+
+ +

+ +

+Definition at line 53 of file hd.h. +

+Referenced by hdInit(). +

+

+ +

+
+ + + + +
long driveInfo::hdMulti
+
+
+ +

+ +

+Definition at line 54 of file hd.h. +

+Referenced by hdInit(), hdRead(), and hdWrite(). +

+

+ +

+
+ + + + +
long driveInfo::hdPort
+
+
+ +

+ +

+Definition at line 55 of file hd.h. +

+Referenced by hdInit(), hdRead(), hdWrite(), and initHardDisk(). +

+

+ +

+
+ + + + +
char driveInfo::hdSector[512]
+
+
+ +

+ +

+Definition at line 48 of file hd.h. +

+Referenced by hdInit(). +

+

+ +

+
+ + + + +
char driveInfo::hdShift
+
+
+ +

+ +

+Definition at line 52 of file hd.h. +

+Referenced by hdInit(), hdRead(), and hdWrite(). +

+

+ +

+
+ + + + +
long driveInfo::hdSize
+
+
+ +

+ +

+Definition at line 56 of file hd.h. +

+Referenced by hdInit(), and initHardDisk(). +

+

+ +

+
+ + + + +
long driveInfo::parOffset
+
+
+ +

+ +

+Definition at line 58 of file hd.h. +

+Referenced by hdRead(), hdWrite(), and initHardDisk(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structdriverType.html b/doc/html/structdriverType.html new file mode 100644 index 0000000..2134478 --- /dev/null +++ b/doc/html/structdriverType.html @@ -0,0 +1,89 @@ + + +UbixOS V2: driverType Struct Reference + + + + +
+
+
+
+

driverType Struct Reference

#include <driver.h> +

+


Detailed Description

+ +

+ +

+Definition at line 41 of file driver.h. + + + + + + +

Data Fields

const char * devName
devMethodmethods
+


Field Documentation

+ +
+
+ + + + +
const char* driverType::devName
+
+
+ +

+ +

+Definition at line 42 of file driver.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 43 of file driver.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structei__device.html b/doc/html/structei__device.html new file mode 100644 index 0000000..2b33e7f --- /dev/null +++ b/doc/html/structei__device.html @@ -0,0 +1,203 @@ + + +UbixOS V2: ei_device Struct Reference + + + + +
+
+
+
+

ei_device Struct Reference

#include <device.old.h> +

+


Detailed Description

+ +

+ +

+Definition at line 42 of file device.old.h. + + + + + + + + + + + + + + + + + + +

Data Fields

int currentPage
uInt32 pingPong
int rxStartPage
int stopPage
int tx1
int tx2
int txStartPage
uInt16 word16
+


Field Documentation

+ +
+
+ + + + +
int ei_device::currentPage
+
+
+ +

+ +

+Definition at line 46 of file device.old.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 48 of file device.old.h. +

+

+ +

+
+ + + + +
int ei_device::rxStartPage
+
+
+ +

+ +

+Definition at line 44 of file device.old.h. +

+

+ +

+
+ + + + +
int ei_device::stopPage
+
+
+ +

+ +

+Definition at line 45 of file device.old.h. +

+

+ +

+
+ + + + +
int ei_device::tx1
+
+
+ +

+ +

+Definition at line 49 of file device.old.h. +

+

+ +

+
+ + + + +
int ei_device::tx2
+
+
+ +

+ +

+Definition at line 50 of file device.old.h. +

+

+ +

+
+ + + + +
int ei_device::txStartPage
+
+
+ +

+ +

+Definition at line 43 of file device.old.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 47 of file device.old.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structelfDynSym.html b/doc/html/structelfDynSym.html new file mode 100644 index 0000000..da68f8c --- /dev/null +++ b/doc/html/structelfDynSym.html @@ -0,0 +1,127 @@ + + +UbixOS V2: elfDynSym Struct Reference + + + + +
+
+
+
+

elfDynSym Struct Reference

#include <elf.h> +

+


Detailed Description

+ +

+ +

+Definition at line 142 of file elf.h. + + + + + + + + + + +

Data Fields

uInt32 dynInfo
uInt32 dynName
uInt32 dynSize
uInt32 dynValue
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 146 of file elf.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 143 of file elf.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 145 of file elf.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 144 of file elf.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structelfDynamic.html b/doc/html/structelfDynamic.html new file mode 100644 index 0000000..d449909 --- /dev/null +++ b/doc/html/structelfDynamic.html @@ -0,0 +1,89 @@ + + +UbixOS V2: elfDynamic Struct Reference + + + + +
+
+
+
+

elfDynamic Struct Reference

#include <elf.h> +

+


Detailed Description

+ +

+ +

+Definition at line 149 of file elf.h. + + + + + + +

Data Fields

uInt32 dynPtr
uInt32 dynVal
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 151 of file elf.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 150 of file elf.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structelfHeader.html b/doc/html/structelfHeader.html new file mode 100644 index 0000000..96feb6e --- /dev/null +++ b/doc/html/structelfHeader.html @@ -0,0 +1,333 @@ + + +UbixOS V2: elfHeader Struct Reference + + + + +
+
+
+
+

elfHeader Struct Reference

#include <elf.h> +

+


Detailed Description

+ +

+ +

+Definition at line 96 of file elf.h. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Fields

uInt16 eEhsize
uInt32 eEntry
uInt32 eFlags
uInt8 eIdent [16]
uInt16 eMachine
uInt16 ePhentsize
uInt16 ePhnum
uInt32 ePhoff
uInt16 eShentsize
uInt16 eShnum
uInt32 eShoff
uInt16 eShstrndx
uInt16 eType
uInt32 eVersion
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 105 of file elf.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 101 of file elf.h. +

+Referenced by execFile(), kmod_load(), ldEnable(), and sysExec(). +

+

+ +

+ +
+ +

+ +

+Definition at line 104 of file elf.h. +

+

+ +

+
+ + + + +
uInt8 elfHeader::eIdent[16]
+
+
+ +

+ +

+Definition at line 97 of file elf.h. +

+Referenced by execFile(), and sysExec(). +

+

+ +

+ +
+ +

+ +

+Definition at line 99 of file elf.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 106 of file elf.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 107 of file elf.h. +

+Referenced by execFile(), kmod_load(), ldEnable(), and sysExec(). +

+

+ +

+ +
+ +

+ +

+Definition at line 102 of file elf.h. +

+Referenced by execFile(), kmod_load(), ldEnable(), and sysExec(). +

+

+ +

+ +
+ +

+ +

+Definition at line 108 of file elf.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 109 of file elf.h. +

+Referenced by kmod_load(), ldEnable(), and sysExec(). +

+

+ +

+ +
+ +

+ +

+Definition at line 103 of file elf.h. +

+Referenced by kmod_load(), ldEnable(), and sysExec(). +

+

+ +

+ +
+ +

+ +

+Definition at line 110 of file elf.h. +

+Referenced by kmod_load(), and ldEnable(). +

+

+ +

+ +
+ +

+ +

+Definition at line 98 of file elf.h. +

+Referenced by execFile(), and sysExec(). +

+

+ +

+ +
+ +

+ +

+Definition at line 100 of file elf.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structelfPltInfo.html b/doc/html/structelfPltInfo.html new file mode 100644 index 0000000..4545759 --- /dev/null +++ b/doc/html/structelfPltInfo.html @@ -0,0 +1,89 @@ + + +UbixOS V2: elfPltInfo Struct Reference + + + + +
+
+
+
+

elfPltInfo Struct Reference

#include <elf.h> +

+


Detailed Description

+ +

+ +

+Definition at line 137 of file elf.h. + + + + + + +

Data Fields

uInt32 pltInfo
uInt32 pltOffset
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 139 of file elf.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 138 of file elf.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structelfProgramHeader.html b/doc/html/structelfProgramHeader.html new file mode 100644 index 0000000..36973d8 --- /dev/null +++ b/doc/html/structelfProgramHeader.html @@ -0,0 +1,207 @@ + + +UbixOS V2: elfProgramHeader Struct Reference + + + + +
+
+
+
+

elfProgramHeader Struct Reference

#include <elf.h> +

+


Detailed Description

+ +

+ +

+Definition at line 113 of file elf.h. + + + + + + + + + + + + + + + + + + +

Data Fields

uInt32 phAlign
uInt32 phFilesz
uInt32 phFlags
uInt32 phMemsz
uInt32 phOffset
uInt32 phPaddr
uInt32 phType
uInt32 phVaddr
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 121 of file elf.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 118 of file elf.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 120 of file elf.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 119 of file elf.h. +

+Referenced by execFile(), kmod_load(), ldEnable(), and sysExec(). +

+

+ +

+ +
+ +

+ +

+Definition at line 115 of file elf.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 117 of file elf.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 114 of file elf.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 116 of file elf.h. +

+Referenced by execFile(), kmod_load(), ldEnable(), and sysExec(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structelfSectionHeader.html b/doc/html/structelfSectionHeader.html new file mode 100644 index 0000000..7f156b8 --- /dev/null +++ b/doc/html/structelfSectionHeader.html @@ -0,0 +1,243 @@ + + +UbixOS V2: elfSectionHeader Struct Reference + + + + +
+
+
+
+

elfSectionHeader Struct Reference

#include <elf.h> +

+


Detailed Description

+ +

+ +

+Definition at line 124 of file elf.h. + + + + + + + + + + + + + + + + + + + + + + +

Data Fields

uInt32 shAddr
uInt32 shAddralign
uInt32 shEntsize
uInt32 shFlags
uInt32 shInfo
uInt32 shLink
uInt32 shName
uInt32 shOffset
uInt32 shSize
uInt32 shType
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 128 of file elf.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 133 of file elf.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 134 of file elf.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 127 of file elf.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 132 of file elf.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 131 of file elf.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 125 of file elf.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 129 of file elf.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 130 of file elf.h. +

+Referenced by kmod_load(), and ldEnable(). +

+

+ +

+ +
+ +

+ +

+Definition at line 126 of file elf.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structeth__addr.html b/doc/html/structeth__addr.html new file mode 100644 index 0000000..d3dcfca --- /dev/null +++ b/doc/html/structeth__addr.html @@ -0,0 +1,73 @@ + + +UbixOS V2: eth_addr Struct Reference + + + + +
+
+
+
+

eth_addr Struct Reference

#include <arp.h> +

+


Detailed Description

+ +

+ +

+Definition at line 48 of file arp.h. + + + + +

Public Member Functions

 PACK_STRUCT_FIELD (uInt8 addr[6])
+


Member Function Documentation

+ +
+
+ + + + + + + + + +
eth_addr::PACK_STRUCT_FIELD (uInt8  addr[6]  ) 
+
+
+ +

+ +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structeth__hdr.html b/doc/html/structeth__hdr.html new file mode 100644 index 0000000..e7769bc --- /dev/null +++ b/doc/html/structeth__hdr.html @@ -0,0 +1,117 @@ + + +UbixOS V2: eth_hdr Struct Reference + + + + +
+
+
+
+

eth_hdr Struct Reference

#include <arp.h> +

+


Detailed Description

+ +

+ +

+Definition at line 52 of file arp.h. + + + + + + + + +

Public Member Functions

 PACK_STRUCT_FIELD (uInt16 type)
 PACK_STRUCT_FIELD (struct eth_addr src)
 PACK_STRUCT_FIELD (struct eth_addr dest)
+


Member Function Documentation

+ +
+
+ + + + + + + + + +
eth_hdr::PACK_STRUCT_FIELD (uInt16  type  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
eth_hdr::PACK_STRUCT_FIELD (struct eth_addr  src  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
eth_hdr::PACK_STRUCT_FIELD (struct eth_addr  dest  ) 
+
+
+ +

+ +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structethernetif.html b/doc/html/structethernetif.html new file mode 100644 index 0000000..48c599b --- /dev/null +++ b/doc/html/structethernetif.html @@ -0,0 +1,70 @@ + + +UbixOS V2: ethernetif Struct Reference + + + + +
+
+
+
+

ethernetif Struct Reference


Detailed Description

+ +

+ +

+Definition at line 67 of file ethernetif.c. + + + + +

Data Fields

eth_addrethaddr
+


Field Documentation

+ +
+
+ + + + +
struct eth_addr* ethernetif::ethaddr
+
+
+ +

+ +

+Definition at line 68 of file ethernetif.c. +

+Referenced by ethernetif_input(), ethernetif_output(), and low_level_init(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structethip__hdr.html b/doc/html/structethip__hdr.html new file mode 100644 index 0000000..46a61c4 --- /dev/null +++ b/doc/html/structethip__hdr.html @@ -0,0 +1,93 @@ + + +UbixOS V2: ethip_hdr Struct Reference + + + + +
+
+
+
+

ethip_hdr Struct Reference


Detailed Description

+ +

+ +

+Definition at line 76 of file arp.c. + + + + + + +

Public Member Functions

 PACK_STRUCT_FIELD (struct ip_hdr ip)
 PACK_STRUCT_FIELD (struct eth_hdr eth)
+


Member Function Documentation

+ +
+
+ + + + + + + + + +
ethip_hdr::PACK_STRUCT_FIELD (struct ip_hdr  ip  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
ethip_hdr::PACK_STRUCT_FIELD (struct eth_hdr  eth  ) 
+
+
+ +

+ +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structfcntl__args.html b/doc/html/structfcntl__args.html new file mode 100644 index 0000000..ff04eea --- /dev/null +++ b/doc/html/structfcntl__args.html @@ -0,0 +1,228 @@ + + +UbixOS V2: fcntl_args Struct Reference + + + + +
+
+
+
+

fcntl_args Struct Reference

#include <sysproto.h> +

+


Detailed Description

+ +

+ +

+Definition at line 70 of file sysproto.h. + + + + + + + + + + + + + + + + + + + + +

Data Fields

long arg
char arg_l_ [PADL_(long)]
char arg_r_ [PADR_(long)]
int cmd
char cmd_l_ [PADL_(int)]
char cmd_r_ [PADR_(int)]
int fd
char fd_l_ [PADL_(int)]
char fd_r_ [PADR_(int)]
+


Field Documentation

+ +
+
+ + + + +
long fcntl_args::arg
+
+
+ +

+ +

+Definition at line 73 of file sysproto.h. +

+Referenced by fcntl(). +

+

+ +

+
+ + + + +
char fcntl_args::arg_l_[PADL_(long)]
+
+
+ +

+ +

+Definition at line 73 of file sysproto.h. +

+

+ +

+
+ + + + +
char fcntl_args::arg_r_[PADR_(long)]
+
+
+ +

+ +

+Definition at line 73 of file sysproto.h. +

+

+ +

+
+ + + + +
int fcntl_args::cmd
+
+
+ +

+ +

+Definition at line 72 of file sysproto.h. +

+Referenced by fcntl(). +

+

+ +

+
+ + + + +
char fcntl_args::cmd_l_[PADL_(int)]
+
+
+ +

+ +

+Definition at line 72 of file sysproto.h. +

+

+ +

+
+ + + + +
char fcntl_args::cmd_r_[PADR_(int)]
+
+
+ +

+ +

+Definition at line 72 of file sysproto.h. +

+

+ +

+
+ + + + +
int fcntl_args::fd
+
+
+ +

+ +

+Definition at line 71 of file sysproto.h. +

+Referenced by fcntl(). +

+

+ +

+
+ + + + +
char fcntl_args::fd_l_[PADL_(int)]
+
+
+ +

+ +

+Definition at line 71 of file sysproto.h. +

+

+ +

+
+ + + + +
char fcntl_args::fd_r_[PADR_(int)]
+
+
+ +

+ +

+Definition at line 71 of file sysproto.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structfile.html b/doc/html/structfile.html new file mode 100644 index 0000000..8e7e722 --- /dev/null +++ b/doc/html/structfile.html @@ -0,0 +1,72 @@ + + +UbixOS V2: file Struct Reference + + + + +
+
+
+
+

file Struct Reference

#include <kern_descrip.h> +

+


Detailed Description

+ +

+ +

+Definition at line 91 of file kern_descrip.h. + + + + +

Data Fields

int f_flag
+


Field Documentation

+ +
+
+ + + + +
int file::f_flag
+
+
+ +

+ +

+Definition at line 92 of file kern_descrip.h. +

+Referenced by fcntl(), pipe(), and schedNewTask(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structfileDescriptor.html b/doc/html/structfileDescriptor.html new file mode 100644 index 0000000..68580e8 --- /dev/null +++ b/doc/html/structfileDescriptor.html @@ -0,0 +1,156 @@ + + +UbixOS V2: fileDescriptor Struct Reference + + + + +
+
+
+
+

fileDescriptor Struct Reference

#include <file.h> +

+


Detailed Description

+ +

+ +

+Definition at line 6 of file file.h. + + + + + + + + + + + + +

Data Fields

void * inode
fileDescriptornext
off_t offset
fileDescriptorprev
size_t size
+


Field Documentation

+ +
+
+ + + + +
void* fileDescriptor::inode
+
+ +

+ +

+ +
+ +

+ +

+Definition at line 8 of file file.h. +

+Referenced by fclose(), and fopen(). +

+

+ +

+ +
+ +

+ +

+Definition at line 10 of file file.h. +

+Referenced by addDirEntry(), fgetc(), fopen(), fputc(), fread(), fseek(), fsfind(), fsread(), fwrite(), ufs_openFile(), and UbixFS::vfs_open(). +

+

+ +

+ +
+ +

+ +

+Definition at line 7 of file file.h. +

+Referenced by fclose(), and fopen(). +

+

+ +

+ +
+ +

+ +

+Definition at line 11 of file file.h. +

+Referenced by addDirEntry(), devfs_open(), fsread(), openFileUbixFS(), readUbixFS(), UbixFS::vfs_open(), and writeUbixFS(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structfileDescriptorStruct.html b/doc/html/structfileDescriptorStruct.html new file mode 100644 index 0000000..871dbb0 --- /dev/null +++ b/doc/html/structfileDescriptorStruct.html @@ -0,0 +1,378 @@ + + +UbixOS V2: fileDescriptorStruct Struct Reference + + + + +
+
+
+
+

fileDescriptorStruct Struct Reference

#include <file.h> +

+


Detailed Description

+ +

+ +

+Definition at line 46 of file file.h. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Fields

char * buffer
cacheNodecacheNode
dmadatdmadat
int dsk_meta
char fileName [512]
uInt32 ino
uInt16 length
uInt16 mode
vfs_mountPoint_tmp
fileDescriptorStructnext
uInt32 offset
uInt32 perms
fileDescriptorStructprev
uInt32 resid
uInt32 size
uInt32 start
uInt16 status
+


Field Documentation

+ +
+
+ + + + +
char* fileDescriptorStruct::buffer
+
+
+ +

+ +

+Definition at line 57 of file file.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 59 of file file.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 61 of file file.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 62 of file file.h. +

+

+ +

+
+ + + + +
char fileDescriptorStruct::fileName[512]
+
+
+ +

+ +

+Definition at line 56 of file file.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 58 of file file.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 54 of file file.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 51 of file file.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 49 of file file.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 48 of file file.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 52 of file file.h. +

+Referenced by sysFseek(). +

+

+ +

+ +
+ +

+ +

+Definition at line 60 of file file.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 47 of file file.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 63 of file file.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 53 of file file.h. +

+Referenced by sysFopen(). +

+

+ +

+ +
+ +

+ +

+Definition at line 55 of file file.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 50 of file file.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structfileSystem.html b/doc/html/structfileSystem.html new file mode 100644 index 0000000..71125e0 --- /dev/null +++ b/doc/html/structfileSystem.html @@ -0,0 +1,254 @@ + + +UbixOS V2: fileSystem Struct Reference + + + + +
+
+
+
+

fileSystem Struct Reference

#include <vfs.h> +

+


Detailed Description

+ +

+ +

+Definition at line 49 of file vfs.h. + + + + + + + + + + + + + + + + + + + + + + + + +

Data Fields

fileSystemnext
fileSystemprev
int(* vfsInitFS )(void *)
int(* vfsMakeDir )(char *, void *)
int(* vfsOpenFile )(void *, void *)
int(* vfsRead )(void *, char *, long, long)
int(* vfsRemDir )(char *)
int(* vfsSync )(void)
int vfsType
int(* vfsUnlink )(char *, void *)
int(* vfsWrite )(void *, char *, long, long)
+


Field Documentation

+ +
+
+ + + + +
struct fileSystem* fileSystem::next
+
+
+ +

+ +

+Definition at line 51 of file vfs.h. +

+Referenced by bTree::Verify(), vfsFindFS(), and vfsRegisterFS(). +

+

+ +

+
+ + + + +
struct fileSystem* fileSystem::prev
+
+
+ +

+ +

+Definition at line 50 of file vfs.h. +

+Referenced by vfsRegisterFS(). +

+

+ +

+
+ + + + +
int(* fileSystem::vfsInitFS)(void *)
+
+
+ +

+ +

+Referenced by vfs_mount(). +

+

+ +

+
+ + + + +
int(* fileSystem::vfsMakeDir)(char *, void *)
+
+
+ +

+ +

+

+ +

+
+ + + + +
int(* fileSystem::vfsOpenFile)(void *, void *)
+
+
+ +

+ +

+

+ +

+
+ + + + +
int(* fileSystem::vfsRead)(void *, char *, long, long)
+
+
+ +

+ +

+

+ +

+
+ + + + +
int(* fileSystem::vfsRemDir)(char *)
+
+
+ +

+ +

+

+ +

+
+ + + + +
int(* fileSystem::vfsSync)(void)
+
+
+ +

+ +

+

+ +

+
+ + + + +
int fileSystem::vfsType
+
+
+ +

+ +

+Definition at line 60 of file vfs.h. +

+Referenced by vfsFindFS(), and vfsRegisterFS(). +

+

+ +

+
+ + + + +
int(* fileSystem::vfsUnlink)(char *, void *)
+
+
+ +

+ +

+Referenced by unlink(). +

+

+ +

+
+ + + + +
int(* fileSystem::vfsWrite)(void *, char *, long, long)
+
+
+ +

+ +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structfs.html b/doc/html/structfs.html new file mode 100644 index 0000000..72069f8 --- /dev/null +++ b/doc/html/structfs.html @@ -0,0 +1,1746 @@ + + +UbixOS V2: fs Struct Reference + + + + +
+
+
+
+

fs Struct Reference

#include <ufs.h> +

+


Detailed Description

+ +

+ +

+Definition at line 189 of file ufs.h. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Fields

u_intfs_active
int32_t fs_avgfilesize
int32_t fs_avgfpdir
int32_t fs_bmask
int32_t fs_bshift
int32_t fs_bsize
int32_t fs_cblkno
int32_t fs_cgrotor
int32_t fs_cgsize
int8_t fs_clean
u_int8_tfs_contigdirs
int32_t fs_contigsumsize
ufs2_daddr_t fs_csaddr
csumfs_csp
int32_t fs_cssize
csum_total fs_cstotal
int32_t fs_dblkno
int64_t fs_dsize
int32_t fs_firstfield
int32_t fs_flags
int32_t fs_fmask
int8_t fs_fmod
int32_t fs_fpg
int32_t fs_frag
int32_t fs_fragshift
int32_t fs_fsbtodb
int32_t fs_fshift
int32_t fs_fsize
u_char fs_fsmnt [MAXMNTLEN]
int32_t fs_iblkno
int32_t fs_id [2]
int32_t fs_inopb
int32_t fs_ipg
int32_t fs_magic
int32_t fs_maxbpg
int32_t fs_maxbsize
int32_tfs_maxcluster
int32_t fs_maxcontig
u_int64_t fs_maxfilesize
int32_t fs_maxsymlinklen
int32_t fs_minfree
int32_t fs_ncg
int32_t fs_nindir
void * fs_ocsp [NOCSPTRS]
int32_t fs_old_cgmask
int32_t fs_old_cgoffset
int32_t fs_old_cpc
int32_t fs_old_cpg
int32_t fs_old_csaddr
csum fs_old_cstotal
int32_t fs_old_dsize
int8_t fs_old_flags
int32_t fs_old_inodefmt
int32_t fs_old_interleave
int32_t fs_old_ncyl
int32_t fs_old_npsect
int32_t fs_old_nrpos
int32_t fs_old_nsect
int32_t fs_old_nspf
int32_t fs_old_postblformat
int32_t fs_old_rotdelay
int32_t fs_old_rps
int32_t fs_old_size
int32_t fs_old_spc
int32_t fs_old_time
int32_t fs_old_trackskew
int32_t fs_optim
int32_t fs_pad
int64_t fs_pendingblocks
int32_t fs_pendinginodes
int64_t fs_qbmask
int64_t fs_qfmask
int8_t fs_ronly
int32_t fs_save_cgsize
int32_t fs_sblkno
int64_t fs_sblockloc
int32_t fs_sbsize
int64_t fs_size
int32_t fs_snapinum [FSMAXSNAP]
int32_t fs_spare1 [2]
int32_t fs_spare2
int32_t fs_spare5 [2]
int32_t fs_sparecon32 [26]
int64_t fs_sparecon64 [17]
int32_t fs_state
u_int64_t fs_swuid
ufs_time_t fs_time
int32_t fs_unused_1
u_char fs_volname [MAXVOLLEN]
+


Field Documentation

+ +
+
+ + + + +
u_int* fs::fs_active
+
+
+ +

+ +

+Definition at line 260 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 273 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 274 of file ufs.h. +

+

+ +

+
+ + + + +
int32_t fs::fs_bmask
+
+
+ +

+ +

+Definition at line 210 of file ufs.h. +

+

+ +

+
+ + + + +
int32_t fs::fs_bshift
+
+
+ +

+ +

+Definition at line 212 of file ufs.h. +

+

+ +

+
+ + + + +
int32_t fs::fs_bsize
+
+
+ +

+ +

+Definition at line 202 of file ufs.h. +

+

+ +

+
+ + + + +
int32_t fs::fs_cblkno
+
+
+ +

+ +

+Definition at line 193 of file ufs.h. +

+

+ +

+
+ + + + +
int32_t fs::fs_cgrotor
+
+
+ +

+ +

+Definition at line 255 of file ufs.h. +

+

+ +

+
+ + + + +
int32_t fs::fs_cgsize
+
+
+ +

+ +

+Definition at line 235 of file ufs.h. +

+

+ +

+
+ + + + +
int8_t fs::fs_clean
+
+
+ +

+ +

+Definition at line 247 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 257 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 278 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 269 of file ufs.h. +

+

+ +

+
+ + + + +
struct csum* fs::fs_csp
+
+
+ +

+ +

+Definition at line 258 of file ufs.h. +

+

+ +

+
+ + + + +
int32_t fs::fs_cssize
+
+
+ +

+ +

+Definition at line 234 of file ufs.h. +

+

+ +

+
+ + + + +
struct csum_total fs::fs_cstotal
+
+
+ +

+ +

+Definition at line 265 of file ufs.h. +

+

+ +

+
+ + + + +
int32_t fs::fs_dblkno
+
+
+ +

+ +

+Definition at line 195 of file ufs.h. +

+

+ +

+
+ + + + +
int64_t fs::fs_dsize
+
+
+ +

+ +

+Definition at line 268 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 190 of file ufs.h. +

+

+ +

+
+ + + + +
int32_t fs::fs_flags
+
+
+ +

+ +

+Definition at line 277 of file ufs.h. +

+

+ +

+
+ + + + +
int32_t fs::fs_fmask
+
+
+ +

+ +

+Definition at line 211 of file ufs.h. +

+

+ +

+
+ + + + +
int8_t fs::fs_fmod
+
+
+ +

+ +

+Definition at line 246 of file ufs.h. +

+

+ +

+
+ + + + +
int32_t fs::fs_fpg
+
+
+ +

+ +

+Definition at line 242 of file ufs.h. +

+

+ +

+
+ + + + +
int32_t fs::fs_frag
+
+
+ +

+ +

+Definition at line 204 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 218 of file ufs.h. +

+

+ +

+
+ + + + +
int32_t fs::fs_fsbtodb
+
+
+ +

+ +

+Definition at line 219 of file ufs.h. +

+

+ +

+
+ + + + +
int32_t fs::fs_fshift
+
+
+ +

+ +

+Definition at line 213 of file ufs.h. +

+

+ +

+
+ + + + +
int32_t fs::fs_fsize
+
+
+ +

+ +

+Definition at line 203 of file ufs.h. +

+

+ +

+
+ + + + +
u_char fs::fs_fsmnt[MAXMNTLEN]
+
+
+ +

+ +

+Definition at line 250 of file ufs.h. +

+

+ +

+
+ + + + +
int32_t fs::fs_iblkno
+
+
+ +

+ +

+Definition at line 194 of file ufs.h. +

+

+ +

+
+ + + + +
int32_t fs::fs_id[2]
+
+
+ +

+ +

+Definition at line 231 of file ufs.h. +

+

+ +

+
+ + + + +
int32_t fs::fs_inopb
+
+
+ +

+ +

+Definition at line 224 of file ufs.h. +

+

+ +

+
+ + + + +
int32_t fs::fs_ipg
+
+
+ +

+ +

+Definition at line 241 of file ufs.h. +

+

+ +

+
+ + + + +
int32_t fs::fs_magic
+
+
+ +

+ +

+Definition at line 289 of file ufs.h. +

+Referenced by fsread(). +

+

+ +

+
+ + + + +
int32_t fs::fs_maxbpg
+
+
+ +

+ +

+Definition at line 216 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 262 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 259 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 215 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 281 of file ufs.h. +

+Referenced by ffs_read(). +

+

+ +

+ +
+ +

+ +

+Definition at line 279 of file ufs.h. +

+

+ +

+
+ + + + +
int32_t fs::fs_minfree
+
+
+ +

+ +

+Definition at line 206 of file ufs.h. +

+

+ +

+
+ + + + +
int32_t fs::fs_ncg
+
+
+ +

+ +

+Definition at line 201 of file ufs.h. +

+

+ +

+
+ + + + +
int32_t fs::fs_nindir
+
+
+ +

+ +

+Definition at line 223 of file ufs.h. +

+

+ +

+
+ + + + +
void* fs::fs_ocsp[NOCSPTRS]
+
+
+ +

+ +

+Definition at line 256 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 197 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 196 of file ufs.h. +

+

+ +

+
+ + + + +
int32_t fs::fs_old_cpc
+
+
+ +

+ +

+Definition at line 261 of file ufs.h. +

+

+ +

+
+ + + + +
int32_t fs::fs_old_cpg
+
+
+ +

+ +

+Definition at line 240 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 233 of file ufs.h. +

+

+ +

+
+ + + + +
struct csum fs::fs_old_cstotal
+
+
+ +

+ +

+Definition at line 244 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 200 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 249 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 280 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 229 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 239 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 228 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 286 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 237 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 225 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 285 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 207 of file ufs.h. +

+

+ +

+
+ + + + +
int32_t fs::fs_old_rps
+
+
+ +

+ +

+Definition at line 208 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 199 of file ufs.h. +

+

+ +

+
+ + + + +
int32_t fs::fs_old_spc
+
+
+ +

+ +

+Definition at line 238 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 198 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 230 of file ufs.h. +

+

+ +

+
+ + + + +
int32_t fs::fs_optim
+
+
+ +

+ +

+Definition at line 227 of file ufs.h. +

+

+ +

+
+ + + + +
int32_t fs::fs_pad
+
+
+ +

+ +

+Definition at line 253 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 270 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 271 of file ufs.h. +

+

+ +

+
+ + + + +
int64_t fs::fs_qbmask
+
+
+ +

+ +

+Definition at line 282 of file ufs.h. +

+

+ +

+
+ + + + +
int64_t fs::fs_qfmask
+
+
+ +

+ +

+Definition at line 283 of file ufs.h. +

+

+ +

+
+ + + + +
int8_t fs::fs_ronly
+
+
+ +

+ +

+Definition at line 248 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 275 of file ufs.h. +

+

+ +

+
+ + + + +
int32_t fs::fs_sblkno
+
+
+ +

+ +

+Definition at line 192 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 264 of file ufs.h. +

+

+ +

+
+ + + + +
int32_t fs::fs_sbsize
+
+
+ +

+ +

+Definition at line 220 of file ufs.h. +

+

+ +

+
+ + + + +
int64_t fs::fs_size
+
+
+ +

+ +

+Definition at line 267 of file ufs.h. +

+

+ +

+
+ + + + +
int32_t fs::fs_snapinum[FSMAXSNAP]
+
+
+ +

+ +

+Definition at line 272 of file ufs.h. +

+

+ +

+
+ + + + +
int32_t fs::fs_spare1[2]
+
+
+ +

+ +

+Definition at line 221 of file ufs.h. +

+

+ +

+
+ + + + +
int32_t fs::fs_spare2
+
+
+ +

+ +

+Definition at line 236 of file ufs.h. +

+

+ +

+
+ + + + +
int32_t fs::fs_spare5[2]
+
+
+ +

+ +

+Definition at line 287 of file ufs.h. +

+

+ +

+
+ + + + +
int32_t fs::fs_sparecon32[26]
+
+
+ +

+ +

+Definition at line 276 of file ufs.h. +

+

+ +

+
+ + + + +
int64_t fs::fs_sparecon64[17]
+
+
+ +

+ +

+Definition at line 263 of file ufs.h. +

+

+ +

+
+ + + + +
int32_t fs::fs_state
+
+
+ +

+ +

+Definition at line 284 of file ufs.h. +

+

+ +

+
+ + + + +
u_int64_t fs::fs_swuid
+
+
+ +

+ +

+Definition at line 252 of file ufs.h. +

+

+ +

+
+ + + + +
ufs_time_t fs::fs_time
+
+
+ +

+ +

+Definition at line 266 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 191 of file ufs.h. +

+

+ +

+
+ + + + +
u_char fs::fs_volname[MAXVOLLEN]
+
+
+ +

+ +

+Definition at line 251 of file ufs.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:12 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structfstat__args.html b/doc/html/structfstat__args.html new file mode 100644 index 0000000..4cee621 --- /dev/null +++ b/doc/html/structfstat__args.html @@ -0,0 +1,169 @@ + + +UbixOS V2: fstat_args Struct Reference + + + + +
+
+
+
+

fstat_args Struct Reference

#include <sysproto.h> +

+


Detailed Description

+ +

+ +

+Definition at line 135 of file sysproto.h. + + + + + + + + + + + + + + +

Data Fields

int fd
char fd_l_ [PADL_(int)]
char fd_r_ [PADR_(int)]
statsb
char sb_l_ [PADL_(struct stat *)]
char sb_r_ [PADR_(struct stat *)]
+


Field Documentation

+ +
+
+ + + + +
int fstat_args::fd
+
+
+ +

+ +

+Definition at line 136 of file sysproto.h. +

+Referenced by fstat(). +

+

+ +

+
+ + + + +
char fstat_args::fd_l_[PADL_(int)]
+
+
+ +

+ +

+Definition at line 136 of file sysproto.h. +

+

+ +

+
+ + + + +
char fstat_args::fd_r_[PADR_(int)]
+
+
+ +

+ +

+Definition at line 136 of file sysproto.h. +

+

+ +

+
+ + + + +
struct stat* fstat_args::sb
+
+
+ +

+ +

+Definition at line 137 of file sysproto.h. +

+Referenced by fstat(). +

+

+ +

+
+ + + + +
char fstat_args::sb_l_[PADL_(struct stat *)]
+
+
+ +

+ +

+Definition at line 137 of file sysproto.h. +

+

+ +

+
+ + + + +
char fstat_args::sb_r_[PADR_(struct stat *)]
+
+
+ +

+ +

+Definition at line 137 of file sysproto.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:12 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structgdtDescriptor.html b/doc/html/structgdtDescriptor.html new file mode 100644 index 0000000..339789e --- /dev/null +++ b/doc/html/structgdtDescriptor.html @@ -0,0 +1,184 @@ + + +UbixOS V2: gdtDescriptor Struct Reference + + + + +
+
+
+
+

gdtDescriptor Struct Reference

#include <gdt.h> +

+


Detailed Description

+ +

+ +

+Definition at line 60 of file gdt.h. + + + + + + + + + + + + + + + + +

Data Fields

unsigned char access
unsigned char baseHigh
unsigned short baseLow
unsigned char baseMed
unsigned int granularity:4
unsigned int limitHigh:4
unsigned short limitLow
+


Field Documentation

+ +
+
+ + + + +
unsigned char gdtDescriptor::access
+
+
+ +

+ +

+Definition at line 64 of file gdt.h. +

+

+ +

+
+ + + + +
unsigned char gdtDescriptor::baseHigh
+
+
+ +

+ +

+Definition at line 67 of file gdt.h. +

+

+ +

+
+ + + + +
unsigned short gdtDescriptor::baseLow
+
+
+ +

+ +

+Definition at line 62 of file gdt.h. +

+

+ +

+
+ + + + +
unsigned char gdtDescriptor::baseMed
+
+
+ +

+ +

+Definition at line 63 of file gdt.h. +

+

+ +

+
+ + + + +
unsigned int gdtDescriptor::granularity
+
+
+ +

+ +

+Definition at line 66 of file gdt.h. +

+

+ +

+
+ + + + +
unsigned int gdtDescriptor::limitHigh
+
+
+ +

+ +

+Definition at line 65 of file gdt.h. +

+

+ +

+
+ + + + +
unsigned short gdtDescriptor::limitLow
+
+
+ +

+ +

+Definition at line 61 of file gdt.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:12 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structgdtGate.html b/doc/html/structgdtGate.html new file mode 100644 index 0000000..43cf002 --- /dev/null +++ b/doc/html/structgdtGate.html @@ -0,0 +1,135 @@ + + +UbixOS V2: gdtGate Struct Reference + + + + +
+
+
+
+

gdtGate Struct Reference

#include <gdt.h> +

+


Detailed Description

+ +

+ +

+Definition at line 70 of file gdt.h. + + + + + + + + + + +

Data Fields

unsigned short access
unsigned short offsetHigh
unsigned short offsetLow
unsigned short selector
+


Field Documentation

+ +
+
+ + + + +
unsigned short gdtGate::access
+
+
+ +

+ +

+Definition at line 73 of file gdt.h. +

+Referenced by setTaskVector(), and setVector(). +

+

+ +

+
+ + + + +
unsigned short gdtGate::offsetHigh
+
+
+ +

+ +

+Definition at line 74 of file gdt.h. +

+Referenced by setTaskVector(), and setVector(). +

+

+ +

+
+ + + + +
unsigned short gdtGate::offsetLow
+
+
+ +

+ +

+Definition at line 71 of file gdt.h. +

+Referenced by setTaskVector(), and setVector(). +

+

+ +

+
+ + + + +
unsigned short gdtGate::selector
+
+
+ +

+ +

+Definition at line 72 of file gdt.h. +

+Referenced by setTaskVector(), and setVector(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:12 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structgdt__descr.html b/doc/html/structgdt__descr.html new file mode 100644 index 0000000..15ccb05 --- /dev/null +++ b/doc/html/structgdt__descr.html @@ -0,0 +1,94 @@ + + +UbixOS V2: gdt_descr Struct Reference + + + + +
+
+
+
+

gdt_descr Struct Reference


Detailed Description

+ +

+ +

+Definition at line 64 of file smp.c. + + + + + + + +

Public Member Functions

uInt32 *base __attribute__ ((packed))

Data Fields

uInt16 limit
+


Member Function Documentation

+ +
+
+ + + + + + + + + +
uInt32* base gdt_descr::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 65 of file smp.c. +

+Referenced by GDT_fixer(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:12 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structgetdtablesize__args.html b/doc/html/structgetdtablesize__args.html new file mode 100644 index 0000000..e3ce0c5 --- /dev/null +++ b/doc/html/structgetdtablesize__args.html @@ -0,0 +1,70 @@ + + +UbixOS V2: getdtablesize_args Struct Reference + + + + +
+
+
+
+

getdtablesize_args Struct Reference

#include <sysproto.h> +

+


Detailed Description

+ +

+ +

+Definition at line 117 of file sysproto.h. + + + + +

Data Fields

register_t dummy
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 118 of file sysproto.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:12 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structgetgid__args.html b/doc/html/structgetgid__args.html new file mode 100644 index 0000000..26ebec1 --- /dev/null +++ b/doc/html/structgetgid__args.html @@ -0,0 +1,70 @@ + + +UbixOS V2: getgid_args Struct Reference + + + + +
+
+
+
+

getgid_args Struct Reference

#include <sysproto.h> +

+


Detailed Description

+ +

+ +

+Definition at line 90 of file sysproto.h. + + + + +

Data Fields

register_t dummy
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 91 of file sysproto.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:12 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structgetpid__args.html b/doc/html/structgetpid__args.html new file mode 100644 index 0000000..ad9fd7e --- /dev/null +++ b/doc/html/structgetpid__args.html @@ -0,0 +1,70 @@ + + +UbixOS V2: getpid_args Struct Reference + + + + +
+
+
+
+

getpid_args Struct Reference

#include <sysproto.h> +

+


Detailed Description

+ +

+ +

+Definition at line 64 of file sysproto.h. + + + + +

Data Fields

register_t dummy
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 65 of file sysproto.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:12 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structgettimeofday__args.html b/doc/html/structgettimeofday__args.html new file mode 100644 index 0000000..a29c2b8 --- /dev/null +++ b/doc/html/structgettimeofday__args.html @@ -0,0 +1,165 @@ + + +UbixOS V2: gettimeofday_args Struct Reference + + + + +
+
+
+
+

gettimeofday_args Struct Reference

#include <sysproto.h> +

+


Detailed Description

+ +

+ +

+Definition at line 131 of file sysproto.h. + + + + + + + + + + + + + + +

Data Fields

timevaltp
char tp_l_ [PADL_(struct timeval *)]
char tp_r_ [PADR_(struct timeval *)]
timezonetzp
char tzp_l_ [PADL_(struct timezone *)]
char tzp_r_ [PADR_(struct timezone *)]
+


Field Documentation

+ +
+
+ + + + +
struct timeval* gettimeofday_args::tp
+
+
+ +

+ +

+Definition at line 132 of file sysproto.h. +

+

+ +

+
+ + + + +
char gettimeofday_args::tp_l_[PADL_(struct timeval *)]
+
+
+ +

+ +

+Definition at line 132 of file sysproto.h. +

+

+ +

+
+ + + + +
char gettimeofday_args::tp_r_[PADR_(struct timeval *)]
+
+
+ +

+ +

+Definition at line 132 of file sysproto.h. +

+

+ +

+
+ + + + +
struct timezone* gettimeofday_args::tzp
+
+
+ +

+ +

+Definition at line 133 of file sysproto.h. +

+

+ +

+
+ + + + +
char gettimeofday_args::tzp_l_[PADL_(struct timezone *)]
+
+
+ +

+ +

+Definition at line 133 of file sysproto.h. +

+

+ +

+
+ + + + +
char gettimeofday_args::tzp_r_[PADR_(struct timezone *)]
+
+
+ +

+ +

+Definition at line 133 of file sysproto.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:12 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structgetuid__args.html b/doc/html/structgetuid__args.html new file mode 100644 index 0000000..97210b1 --- /dev/null +++ b/doc/html/structgetuid__args.html @@ -0,0 +1,70 @@ + + +UbixOS V2: getuid_args Struct Reference + + + + +
+
+
+
+

getuid_args Struct Reference

#include <sysproto.h> +

+


Detailed Description

+ +

+ +

+Definition at line 86 of file sysproto.h. + + + + +

Data Fields

register_t dummy
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 87 of file sysproto.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:12 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structhostRingEntry.html b/doc/html/structhostRingEntry.html new file mode 100644 index 0000000..821834f --- /dev/null +++ b/doc/html/structhostRingEntry.html @@ -0,0 +1,108 @@ + + +UbixOS V2: hostRingEntry Struct Reference + + + + +
+
+
+
+

hostRingEntry Struct Reference

#include <lnc.h> +

+


Detailed Description

+ +

+ +

+Definition at line 133 of file lnc.h. + + + + + + + + + + +

Data Fields

union {
   char *   data
buff
mdsmd
+


Field Documentation

+ +
+
+ + + + +
union { ... } hostRingEntry::buff
+
+
+ +

+ +

+

+ +

+
+ + + + +
char* hostRingEntry::data
+
+
+ +

+ +

+Definition at line 137 of file lnc.h. +

+

+ +

+
+ + + + +
struct mds* hostRingEntry::md
+
+
+ +

+ +

+Definition at line 134 of file lnc.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:12 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structi386__frame.html b/doc/html/structi386__frame.html new file mode 100644 index 0000000..d778b8e --- /dev/null +++ b/doc/html/structi386__frame.html @@ -0,0 +1,393 @@ + + +UbixOS V2: i386_frame Struct Reference + + + + +
+
+
+
+

i386_frame Struct Reference

#include <tss.h> +

+


Detailed Description

+ +

+ +

+Definition at line 85 of file tss.h. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Fields

uInt32 cs
uInt32 ds
uInt32 eax
uInt32 ebp
uInt32 ebx
uInt32 ecx
uInt32 edi
uInt32 edx
uInt32 eip
uInt32 es
uInt32 esi
uInt32 esp
uInt32 flags
uInt32 fs
uInt32 gs
uInt32 ss
uInt32 user_esp
uInt32 user_ss
+


Field Documentation

+ +
+
+ + + + +
uInt32 i386_frame::cs
+
+
+ +

+ +

+Definition at line 104 of file tss.h. +

+

+ +

+
+ + + + +
uInt32 i386_frame::ds
+
+
+ +

+ +

+Definition at line 89 of file tss.h. +

+

+ +

+
+ + + + +
uInt32 i386_frame::eax
+
+
+ +

+ +

+Definition at line 98 of file tss.h. +

+

+ +

+
+ + + + +
uInt32 i386_frame::ebp
+
+
+ +

+ +

+Definition at line 93 of file tss.h. +

+

+ +

+
+ + + + +
uInt32 i386_frame::ebx
+
+
+ +

+ +

+Definition at line 95 of file tss.h. +

+

+ +

+
+ + + + +
uInt32 i386_frame::ecx
+
+
+ +

+ +

+Definition at line 97 of file tss.h. +

+

+ +

+
+ + + + +
uInt32 i386_frame::edi
+
+
+ +

+ +

+Definition at line 91 of file tss.h. +

+

+ +

+
+ + + + +
uInt32 i386_frame::edx
+
+
+ +

+ +

+Definition at line 96 of file tss.h. +

+

+ +

+
+ + + + +
uInt32 i386_frame::eip
+
+
+ +

+ +

+Definition at line 103 of file tss.h. +

+

+ +

+
+ + + + +
uInt32 i386_frame::es
+
+
+ +

+ +

+Definition at line 88 of file tss.h. +

+

+ +

+
+ + + + +
uInt32 i386_frame::esi
+
+
+ +

+ +

+Definition at line 92 of file tss.h. +

+

+ +

+
+ + + + +
uInt32 i386_frame::esp
+
+
+ +

+ +

+Definition at line 94 of file tss.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 105 of file tss.h. +

+

+ +

+
+ + + + +
uInt32 i386_frame::fs
+
+
+ +

+ +

+Definition at line 87 of file tss.h. +

+

+ +

+
+ + + + +
uInt32 i386_frame::gs
+
+
+ +

+ +

+Definition at line 86 of file tss.h. +

+

+ +

+
+ + + + +
uInt32 i386_frame::ss
+
+
+ +

+ +

+Definition at line 90 of file tss.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 106 of file tss.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 107 of file tss.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:12 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structi387Struct.html b/doc/html/structi387Struct.html new file mode 100644 index 0000000..4060e46 --- /dev/null +++ b/doc/html/structi387Struct.html @@ -0,0 +1,203 @@ + + +UbixOS V2: i387Struct Struct Reference + + + + +
+
+
+
+

i387Struct Struct Reference

#include <tss.h> +

+


Detailed Description

+ +

+ +

+Definition at line 74 of file tss.h. + + + + + + + + + + + + + + + + + + +

Data Fields

long cwd
long fcs
long fip
long foo
long fos
long st_space [20]
long swd
long twd
+


Field Documentation

+ +
+
+ + + + +
long i387Struct::cwd
+
+
+ +

+ +

+Definition at line 75 of file tss.h. +

+

+ +

+
+ + + + +
long i387Struct::fcs
+
+
+ +

+ +

+Definition at line 79 of file tss.h. +

+

+ +

+
+ + + + +
long i387Struct::fip
+
+
+ +

+ +

+Definition at line 78 of file tss.h. +

+

+ +

+
+ + + + +
long i387Struct::foo
+
+
+ +

+ +

+Definition at line 80 of file tss.h. +

+

+ +

+
+ + + + +
long i387Struct::fos
+
+
+ +

+ +

+Definition at line 81 of file tss.h. +

+

+ +

+
+ + + + +
long i387Struct::st_space[20]
+
+
+ +

+ +

+Definition at line 82 of file tss.h. +

+

+ +

+
+ + + + +
long i387Struct::swd
+
+
+ +

+ +

+Definition at line 76 of file tss.h. +

+

+ +

+
+ + + + +
long i387Struct::twd
+
+
+ +

+ +

+Definition at line 77 of file tss.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:12 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structicmp__dur__hdr.html b/doc/html/structicmp__dur__hdr.html new file mode 100644 index 0000000..c455c1e --- /dev/null +++ b/doc/html/structicmp__dur__hdr.html @@ -0,0 +1,195 @@ + + +UbixOS V2: icmp_dur_hdr Struct Reference + + + + +
+
+
+
+

icmp_dur_hdr Struct Reference

#include <icmp.h> +

+


Detailed Description

+ +

+ +

+Definition at line 85 of file icmp.h. + + + + + + + + + + + + + + + + + +

Public Member Functions

 PACK_STRUCT_FIELD (uInt32 unused)
 PACK_STRUCT_FIELD (uInt16 chksum)
 PACK_STRUCT_FIELD (uInt16 _type_code)

Data Fields

u16_t chksum
u8_t icode
u8_t type
u32_t unused
+


Member Function Documentation

+ +
+
+ + + + + + + + + +
icmp_dur_hdr::PACK_STRUCT_FIELD (uInt32  unused  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
icmp_dur_hdr::PACK_STRUCT_FIELD (uInt16  chksum  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
icmp_dur_hdr::PACK_STRUCT_FIELD (uInt16  _type_code  ) 
+
+
+ +

+ +

+

+


Field Documentation

+ +
+
+ + + + +
u16_t icmp_dur_hdr::chksum
+
+
+ +

+ +

+Definition at line 81 of file icmp.h. +

+

+ +

+
+ + + + +
u8_t icmp_dur_hdr::icode
+
+
+ +

+ +

+Definition at line 80 of file icmp.h. +

+

+ +

+
+ + + + +
u8_t icmp_dur_hdr::type
+
+
+ +

+ +

+Definition at line 79 of file icmp.h. +

+

+ +

+
+ + + + +
u32_t icmp_dur_hdr::unused
+
+
+ +

+ +

+Definition at line 82 of file icmp.h. +

+

+


The documentation for this struct was generated from the following files: +
Generated on Sun Dec 3 02:38:12 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structicmp__echo__hdr.html b/doc/html/structicmp__echo__hdr.html new file mode 100644 index 0000000..c22fcc9 --- /dev/null +++ b/doc/html/structicmp__echo__hdr.html @@ -0,0 +1,236 @@ + + +UbixOS V2: icmp_echo_hdr Struct Reference + + + + +
+
+
+
+

icmp_echo_hdr Struct Reference

#include <icmp.h> +

+


Detailed Description

+ +

+ +

+Definition at line 76 of file icmp.h. + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

 PACK_STRUCT_FIELD (uInt16 seqno)
 PACK_STRUCT_FIELD (uInt16 id)
 PACK_STRUCT_FIELD (uInt16 chksum)
 PACK_STRUCT_FIELD (uInt16 _type_code)

Data Fields

u16_t chksum
u8_t icode
u16_t id
u16_t seqno
u8_t type
+


Member Function Documentation

+ +
+
+ + + + + + + + + +
icmp_echo_hdr::PACK_STRUCT_FIELD (uInt16  seqno  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
icmp_echo_hdr::PACK_STRUCT_FIELD (uInt16  id  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
icmp_echo_hdr::PACK_STRUCT_FIELD (uInt16  chksum  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
icmp_echo_hdr::PACK_STRUCT_FIELD (uInt16  _type_code  ) 
+
+
+ +

+ +

+

+


Field Documentation

+ +
+
+ + + + +
u16_t icmp_echo_hdr::chksum
+
+
+ +

+ +

+Definition at line 73 of file icmp.h. +

+

+ +

+
+ + + + +
u8_t icmp_echo_hdr::icode
+
+
+ +

+ +

+Definition at line 72 of file icmp.h. +

+

+ +

+
+ + + + +
u16_t icmp_echo_hdr::id
+
+
+ +

+ +

+Definition at line 74 of file icmp.h. +

+

+ +

+
+ + + + +
u16_t icmp_echo_hdr::seqno
+
+
+ +

+ +

+Definition at line 75 of file icmp.h. +

+

+ +

+
+ + + + +
u8_t icmp_echo_hdr::type
+
+
+ +

+ +

+Definition at line 71 of file icmp.h. +

+

+


The documentation for this struct was generated from the following files: +
Generated on Sun Dec 3 02:38:12 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structicmp__te__hdr.html b/doc/html/structicmp__te__hdr.html new file mode 100644 index 0000000..5f2ad95 --- /dev/null +++ b/doc/html/structicmp__te__hdr.html @@ -0,0 +1,195 @@ + + +UbixOS V2: icmp_te_hdr Struct Reference + + + + +
+
+
+
+

icmp_te_hdr Struct Reference

#include <icmp.h> +

+


Detailed Description

+ +

+ +

+Definition at line 91 of file icmp.h. + + + + + + + + + + + + + + + + + +

Public Member Functions

 PACK_STRUCT_FIELD (uInt32 unused)
 PACK_STRUCT_FIELD (uInt16 chksum)
 PACK_STRUCT_FIELD (uInt16 _type_code)

Data Fields

u16_t chksum
u8_t icode
u8_t type
u32_t unused
+


Member Function Documentation

+ +
+
+ + + + + + + + + +
icmp_te_hdr::PACK_STRUCT_FIELD (uInt32  unused  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
icmp_te_hdr::PACK_STRUCT_FIELD (uInt16  chksum  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
icmp_te_hdr::PACK_STRUCT_FIELD (uInt16  _type_code  ) 
+
+
+ +

+ +

+

+


Field Documentation

+ +
+
+ + + + +
u16_t icmp_te_hdr::chksum
+
+
+ +

+ +

+Definition at line 88 of file icmp.h. +

+

+ +

+
+ + + + +
u8_t icmp_te_hdr::icode
+
+
+ +

+ +

+Definition at line 87 of file icmp.h. +

+

+ +

+
+ + + + +
u8_t icmp_te_hdr::type
+
+
+ +

+ +

+Definition at line 86 of file icmp.h. +

+

+ +

+
+ + + + +
u32_t icmp_te_hdr::unused
+
+
+ +

+ +

+Definition at line 89 of file icmp.h. +

+

+


The documentation for this struct was generated from the following files: +
Generated on Sun Dec 3 02:38:12 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structin__addr.html b/doc/html/structin__addr.html new file mode 100644 index 0000000..a647bfb --- /dev/null +++ b/doc/html/structin__addr.html @@ -0,0 +1,72 @@ + + +UbixOS V2: in_addr Struct Reference + + + + +
+
+
+
+

in_addr Struct Reference

#include <sockets.h> +

+


Detailed Description

+ +

+ +

+Definition at line 42 of file sockets.h. + + + + +

Data Fields

uInt32 s_addr
+


Field Documentation

+ +
+
+ + + + +
uInt32 in_addr::s_addr
+
+
+ +

+ +

+Definition at line 43 of file sockets.h. +

+Referenced by inet_aton(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:12 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structinitBlock.html b/doc/html/structinitBlock.html new file mode 100644 index 0000000..6080323 --- /dev/null +++ b/doc/html/structinitBlock.html @@ -0,0 +1,184 @@ + + +UbixOS V2: initBlock Struct Reference + + + + +
+
+
+
+

initBlock Struct Reference

#include <lnc.h> +

+


Detailed Description

+ +

+ +

+Definition at line 116 of file lnc.h. + + + + + + + + + + + + + + + + +

Data Fields

uInt8 ladrf [8]
uInt16 mode
uInt8 padr [6]
uInt16 rdra
uInt16 rlen
uInt16 tdra
uInt16 tlen
+


Field Documentation

+ +
+
+ + + + +
uInt8 initBlock::ladrf[8]
+
+
+ +

+ +

+Definition at line 119 of file lnc.h. +

+

+ +

+
+ + + + +
uInt16 initBlock::mode
+
+
+ +

+ +

+Definition at line 117 of file lnc.h. +

+

+ +

+
+ + + + +
uInt8 initBlock::padr[6]
+
+
+ +

+ +

+Definition at line 118 of file lnc.h. +

+

+ +

+
+ + + + +
uInt16 initBlock::rdra
+
+
+ +

+ +

+Definition at line 120 of file lnc.h. +

+

+ +

+
+ + + + +
uInt16 initBlock::rlen
+
+
+ +

+ +

+Definition at line 121 of file lnc.h. +

+

+ +

+
+ + + + +
uInt16 initBlock::tdra
+
+
+ +

+ +

+Definition at line 122 of file lnc.h. +

+

+ +

+
+ + + + +
uInt16 initBlock::tlen
+
+
+ +

+ +

+Definition at line 123 of file lnc.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:12 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structioctl__args.html b/doc/html/structioctl__args.html new file mode 100644 index 0000000..b3296b6 --- /dev/null +++ b/doc/html/structioctl__args.html @@ -0,0 +1,222 @@ + + +UbixOS V2: ioctl_args Struct Reference + + + + +
+
+
+
+

ioctl_args Struct Reference

#include <sysproto.h> +

+


Detailed Description

+ +

+ +

+Definition at line 139 of file sysproto.h. + + + + + + + + + + + + + + + + + + + + +

Data Fields

u_long com
char com_l_ [PADL_(u_long)]
char com_r_ [PADR_(u_long)]
caddr_t data
char data_l_ [PADL_(caddr_t)]
char data_r_ [PADR_(caddr_t)]
int fd
char fd_l_ [PADL_(int)]
char fd_r_ [PADR_(int)]
+


Field Documentation

+ +
+
+ + + + +
u_long ioctl_args::com
+
+
+ +

+ +

+Definition at line 141 of file sysproto.h. +

+

+ +

+
+ + + + +
char ioctl_args::com_l_[PADL_(u_long)]
+
+
+ +

+ +

+Definition at line 141 of file sysproto.h. +

+

+ +

+
+ + + + +
char ioctl_args::com_r_[PADR_(u_long)]
+
+
+ +

+ +

+Definition at line 141 of file sysproto.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 142 of file sysproto.h. +

+

+ +

+
+ + + + +
char ioctl_args::data_l_[PADL_(caddr_t)]
+
+
+ +

+ +

+Definition at line 142 of file sysproto.h. +

+

+ +

+
+ + + + +
char ioctl_args::data_r_[PADR_(caddr_t)]
+
+
+ +

+ +

+Definition at line 142 of file sysproto.h. +

+

+ +

+
+ + + + +
int ioctl_args::fd
+
+
+ +

+ +

+Definition at line 140 of file sysproto.h. +

+

+ +

+
+ + + + +
char ioctl_args::fd_l_[PADL_(int)]
+
+
+ +

+ +

+Definition at line 140 of file sysproto.h. +

+

+ +

+
+ + + + +
char ioctl_args::fd_r_[PADR_(int)]
+
+
+ +

+ +

+Definition at line 140 of file sysproto.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:12 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structip__addr.html b/doc/html/structip__addr.html new file mode 100644 index 0000000..2f2f29d --- /dev/null +++ b/doc/html/structip__addr.html @@ -0,0 +1,96 @@ + + +UbixOS V2: ip_addr Struct Reference + + + + +
+
+
+
+

ip_addr Struct Reference

#include <ip_addr.h> +

+


Detailed Description

+ +

+ +

+Definition at line 45 of file ip_addr.h. + + + + + + + +

Public Member Functions

 PACK_STRUCT_FIELD (uInt32 addr)

Data Fields

u32_t addr [4]
+


Member Function Documentation

+ +
+
+ + + + + + + + + +
ip_addr::PACK_STRUCT_FIELD (uInt32  addr  ) 
+
+
+ +

+ +

+

+


Field Documentation

+ +
+
+ + + + +
u32_t ip_addr::addr[4]
+
+
+ +

+ +

+Definition at line 43 of file ip_addr.h. +

+Referenced by lwip_accept(), lwip_bind(), lwip_connect(), lwip_recvfrom(), lwip_sendto(), and udpecho_thread(). +

+

+


The documentation for this struct was generated from the following files: +
Generated on Sun Dec 3 02:38:12 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structip__hdr.html b/doc/html/structip__hdr.html new file mode 100644 index 0000000..9298400 --- /dev/null +++ b/doc/html/structip__hdr.html @@ -0,0 +1,400 @@ + + +UbixOS V2: ip_hdr Struct Reference + + + + +
+
+
+
+

ip_hdr Struct Reference

#include <ip.h> +

+


Detailed Description

+ +

+ +

+Definition at line 72 of file ip.h. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

 PACK_STRUCT_FIELD (struct ip_addr dest)
 PACK_STRUCT_FIELD (struct ip_addr src)
 PACK_STRUCT_FIELD (uInt16 _chksum)
 PACK_STRUCT_FIELD (uInt16 _ttl_proto)
 PACK_STRUCT_FIELD (uInt16 _offset)
 PACK_STRUCT_FIELD (uInt16 _id)
 PACK_STRUCT_FIELD (uInt16 _len)
 PACK_STRUCT_FIELD (uInt16 _v_hl_tos)

Data Fields

ip_addr src dest
u8_t flow1:4
u16_t flow2
u8_t hoplim
u16_t len
u8_t nexthdr
u8_t tclass1:4
u8_t tclass2:4
u8_t v:4
+


Member Function Documentation

+ +
+
+ + + + + + + + + +
ip_hdr::PACK_STRUCT_FIELD (struct ip_addr  dest  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
ip_hdr::PACK_STRUCT_FIELD (struct ip_addr  src  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
ip_hdr::PACK_STRUCT_FIELD (uInt16  _chksum  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
ip_hdr::PACK_STRUCT_FIELD (uInt16  _ttl_proto  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
ip_hdr::PACK_STRUCT_FIELD (uInt16  _offset  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
ip_hdr::PACK_STRUCT_FIELD (uInt16  _id  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
ip_hdr::PACK_STRUCT_FIELD (uInt16  _len  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
ip_hdr::PACK_STRUCT_FIELD (uInt16  _v_hl_tos  ) 
+
+
+ +

+ +

+

+


Field Documentation

+ +
+
+ + + + +
struct ip_addr src ip_hdr::dest
+
+
+ +

+ +

+Definition at line 74 of file ip.h. +

+

+ +

+
+ + + + +
u8_t ip_hdr::flow1
+
+
+ +

+ +

+Definition at line 65 of file ip.h. +

+

+ +

+
+ + + + +
u16_t ip_hdr::flow2
+
+
+ +

+ +

+Definition at line 70 of file ip.h. +

+

+ +

+
+ + + + +
u8_t ip_hdr::hoplim
+
+
+ +

+ +

+Definition at line 73 of file ip.h. +

+

+ +

+
+ + + + +
u16_t ip_hdr::len
+
+
+ +

+ +

+Definition at line 71 of file ip.h. +

+

+ +

+
+ + + + +
u8_t ip_hdr::nexthdr
+
+
+ +

+ +

+Definition at line 72 of file ip.h. +

+

+ +

+
+ + + + +
u8_t ip_hdr::tclass1
+
+
+ +

+ +

+Definition at line 64 of file ip.h. +

+

+ +

+
+ + + + +
u8_t ip_hdr::tclass2
+
+
+ +

+ +

+Definition at line 65 of file ip.h. +

+

+ +

+
+ + + + +
u8_t ip_hdr::v
+
+
+ +

+ +

+Definition at line 64 of file ip.h. +

+

+


The documentation for this struct was generated from the following files: +
Generated on Sun Dec 3 02:38:12 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structissetugid__args.html b/doc/html/structissetugid__args.html new file mode 100644 index 0000000..839d0c6 --- /dev/null +++ b/doc/html/structissetugid__args.html @@ -0,0 +1,70 @@ + + +UbixOS V2: issetugid_args Struct Reference + + + + +
+
+
+
+

issetugid_args Struct Reference

#include <sysproto.h> +

+


Detailed Description

+ +

+ +

+Definition at line 67 of file sysproto.h. + + + + +

Data Fields

register_t dummy
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 68 of file sysproto.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:12 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structkmod__struct.html b/doc/html/structkmod__struct.html new file mode 100644 index 0000000..03c5dfa --- /dev/null +++ b/doc/html/structkmod__struct.html @@ -0,0 +1,165 @@ + + +UbixOS V2: kmod_struct Struct Reference + + + + +
+
+
+
+

kmod_struct Struct Reference

#include <kmod.h> +

+


Detailed Description

+ +

+ +

+Definition at line 37 of file kmod.h. + + + + + + + + + + + + + + +

Data Fields

uInt32 address
uInt16 id
char name [128]
kmod_structnext
kmod_structprev
uInt16 refs
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 42 of file kmod.h. +

+

+ +

+
+ + + + +
uInt16 kmod_struct::id
+
+
+ +

+ +

+Definition at line 40 of file kmod.h. +

+

+ +

+
+ + + + +
char kmod_struct::name[128]
+
+
+ +

+ +

+Definition at line 43 of file kmod.h. +

+

+ +

+
+ + + + +
struct kmod_struct* kmod_struct::next
+
+
+ +

+ +

+Definition at line 38 of file kmod.h. +

+

+ +

+
+ + + + +
struct kmod_struct* kmod_struct::prev
+
+
+ +

+ +

+Definition at line 39 of file kmod.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 41 of file kmod.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:12 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structlncInfo.html b/doc/html/structlncInfo.html new file mode 100644 index 0000000..2ce9bb7 --- /dev/null +++ b/doc/html/structlncInfo.html @@ -0,0 +1,257 @@ + + +UbixOS V2: lncInfo Struct Reference + + + + +
+
+
+
+

lncInfo Struct Reference

#include <lnc.h> +

+


Detailed Description

+ +

+ +

+Definition at line 156 of file lnc.h. + + + + + + + + + + + + + + + + + + + + + + +

Data Fields

arpcom arpcom
int bdp
initBlockinitBloack
nicInfo nic
int nrdre
int ntdre
int rap
int rdp
hostRingEntryrecvRing
hostRingEntrytransRings
+


Field Documentation

+ +
+
+ + + + +
struct arpcom lncInfo::arpcom
+
+
+ +

+ +

+Definition at line 157 of file lnc.h. +

+Referenced by initLNC(), and lncAttach(). +

+

+ +

+
+ + + + +
int lncInfo::bdp
+
+
+ +

+ +

+Definition at line 164 of file lnc.h. +

+Referenced by initLNC(), readBcr(), and writeBcr(). +

+

+ +

+
+ + + + +
struct initBlock* lncInfo::initBloack
+
+
+ +

+ +

+Definition at line 161 of file lnc.h. +

+

+ +

+
+ + + + +
struct nicInfo lncInfo::nic
+
+
+ +

+ +

+Definition at line 158 of file lnc.h. +

+Referenced by initLNC(), and lncAttach(). +

+

+ +

+
+ + + + +
int lncInfo::nrdre
+
+
+ +

+ +

+Definition at line 165 of file lnc.h. +

+Referenced by initLNC(), and lncAttach(). +

+

+ +

+
+ + + + +
int lncInfo::ntdre
+
+
+ +

+ +

+Definition at line 166 of file lnc.h. +

+Referenced by initLNC(), and lncAttach(). +

+

+ +

+
+ + + + +
int lncInfo::rap
+
+
+ +

+ +

+Definition at line 162 of file lnc.h. +

+Referenced by initLNC(), readBcr(), readCsr(), writeBcr(), and writeCsr(). +

+

+ +

+
+ + + + +
int lncInfo::rdp
+
+
+ +

+ +

+Definition at line 163 of file lnc.h. +

+Referenced by initLNC(), lanceProbe(), lncInt(), readCsr(), and writeCsr(). +

+

+ +

+
+ + + + +
struct hostRingEntry* lncInfo::recvRing
+
+
+ +

+ +

+Definition at line 159 of file lnc.h. +

+Referenced by lncAttach(). +

+

+ +

+
+ + + + +
struct hostRingEntry* lncInfo::transRings
+
+
+ +

+ +

+Definition at line 160 of file lnc.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:12 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structlwip__socket.html b/doc/html/structlwip__socket.html new file mode 100644 index 0000000..8bcc71a --- /dev/null +++ b/doc/html/structlwip__socket.html @@ -0,0 +1,112 @@ + + +UbixOS V2: lwip_socket Struct Reference + + + + +
+
+
+
+

lwip_socket Struct Reference


Detailed Description

+ +

+ +

+Definition at line 45 of file sockets.c. + + + + + + + + +

Data Fields

netconnconn
netbuflastdata
uInt16 lastoffset
+


Field Documentation

+ +
+
+ + + + +
struct netconn* lwip_socket::conn
+
+ +

+ +

+
+ + + + +
struct netbuf* lwip_socket::lastdata
+
+
+ +

+ +

+Definition at line 47 of file sockets.c. +

+Referenced by alloc_socket(), lwip_close(), and lwip_recvfrom(). +

+

+ +

+ +
+ +

+ +

+Definition at line 48 of file sockets.c. +

+Referenced by alloc_socket(), lwip_close(), and lwip_recvfrom(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:12 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structmMap.html b/doc/html/structmMap.html new file mode 100644 index 0000000..70280cd --- /dev/null +++ b/doc/html/structmMap.html @@ -0,0 +1,154 @@ + + +UbixOS V2: mMap Struct Reference + + + + +
+
+
+
+

mMap Struct Reference

#include <vmm.h> +

+


Detailed Description

+ +

+ +

+Definition at line 41 of file vmm.h. + + + + + + + + + + + + +

Data Fields

int cowCounter
uInt32 pageAddr
pid_t pid
uInt16 reserved
uInt16 status
+


Field Documentation

+ +
+
+ + + + +
int mMap::cowCounter
+
+
+ +

+ +

+Definition at line 46 of file vmm.h. +

+Referenced by adjustCowCounter(), freePage(), and vmmFreeProcessPages(). +

+

+ +

+
+ + + + +
uInt32 mMap::pageAddr
+
+
+ +

+ +

+Definition at line 42 of file vmm.h. +

+Referenced by vmmMemMapInit(). +

+

+ +

+
+ + + + +
pid_t mMap::pid
+
+
+ +

+ +

+Definition at line 45 of file vmm.h. +

+Referenced by adjustCowCounter(), freePage(), vmmFindFreePage(), vmmFreeProcessPages(), and vmmMemMapInit(). +

+

+ +

+
+ + + + +
uInt16 mMap::reserved
+
+
+ +

+ +

+Definition at line 44 of file vmm.h. +

+

+ +

+
+ + + + +
uInt16 mMap::status
+
+
+ +

+ +

+Definition at line 43 of file vmm.h. +

+Referenced by adjustCowCounter(), freePage(), and vmmMemMapInit(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:13 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structmds.html b/doc/html/structmds.html new file mode 100644 index 0000000..2009466 --- /dev/null +++ b/doc/html/structmds.html @@ -0,0 +1,127 @@ + + +UbixOS V2: mds Struct Reference + + + + +
+
+
+
+

mds Struct Reference

#include <lnc.h> +

+


Detailed Description

+ +

+ +

+Definition at line 126 of file lnc.h. + + + + + + + + + + +

Data Fields

uInt16 md0
uInt16 md1
short md2
uInt16 md3
+


Field Documentation

+ +
+
+ + + + +
uInt16 mds::md0
+
+
+ +

+ +

+Definition at line 127 of file lnc.h. +

+

+ +

+
+ + + + +
uInt16 mds::md1
+
+
+ +

+ +

+Definition at line 128 of file lnc.h. +

+

+ +

+
+ + + + +
short mds::md2
+
+
+ +

+ +

+Definition at line 129 of file lnc.h. +

+

+ +

+
+ + + + +
uInt16 mds::md3
+
+
+ +

+ +

+Definition at line 130 of file lnc.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:13 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structmemDescriptor.html b/doc/html/structmemDescriptor.html new file mode 100644 index 0000000..91d7d9a --- /dev/null +++ b/doc/html/structmemDescriptor.html @@ -0,0 +1,135 @@ + + +UbixOS V2: memDescriptor Struct Reference + + + + +
+
+
+
+

memDescriptor Struct Reference

#include <kmalloc.h> +

+


Detailed Description

+ +

+ +

+Definition at line 43 of file kmalloc.h. + + + + + + + + + + +

Data Fields

void * baseAddr
uInt32 limit
memDescriptornext
memDescriptorprev
+


Field Documentation

+ +
+
+ + + + +
void* memDescriptor::baseAddr
+
+
+ +

+ +

+Definition at line 46 of file kmalloc.h. +

+Referenced by kfree(), kmalloc(), and mergeMemBlocks(). +

+

+ +

+ +
+ +

+ +

+Definition at line 47 of file kmalloc.h. +

+Referenced by insertFreeDesc(), kfree(), kmalloc(), and mergeMemBlocks(). +

+

+ +

+
+ + + + +
struct memDescriptor* memDescriptor::next
+
+
+ +

+ +

+Definition at line 45 of file kmalloc.h. +

+Referenced by getEmptyDesc(), insertFreeDesc(), kfree(), kmalloc(), and mergeMemBlocks(). +

+

+ +

+
+ + + + +
struct memDescriptor* memDescriptor::prev
+
+
+ +

+ +

+Definition at line 44 of file kmalloc.h. +

+Referenced by getEmptyDesc(), insertFreeDesc(), kfree(), kmalloc(), and mergeMemBlocks(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:13 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structmmap__args.html b/doc/html/structmmap__args.html new file mode 100644 index 0000000..fbef30f --- /dev/null +++ b/doc/html/structmmap__args.html @@ -0,0 +1,456 @@ + + +UbixOS V2: mmap_args Struct Reference + + + + +
+
+
+
+

mmap_args Struct Reference

#include <sysproto.h> +

+


Detailed Description

+ +

+ +

+Definition at line 97 of file sysproto.h. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Fields

caddr_t addr
char addr_l_ [PADL_(caddr_t)]
char addr_r_ [PADR_(caddr_t)]
int fd
char fd_l_ [PADL_(int)]
char fd_r_ [PADR_(int)]
int flags
char flags_l_ [PADL_(int)]
char flags_r_ [PADR_(int)]
size_t len
char len_l_ [PADL_(size_t)]
char len_r_ [PADR_(size_t)]
int pad
char pad_l_ [PADL_(int)]
char pad_r_ [PADR_(int)]
off_t pos
char pos_l_ [PADL_(off_t)]
char pos_r_ [PADR_(off_t)]
int prot
char prot_l_ [PADL_(int)]
char prot_r_ [PADR_(int)]
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 98 of file sysproto.h. +

+Referenced by mmap(). +

+

+ +

+
+ + + + +
char mmap_args::addr_l_[PADL_(caddr_t)]
+
+
+ +

+ +

+Definition at line 98 of file sysproto.h. +

+

+ +

+
+ + + + +
char mmap_args::addr_r_[PADR_(caddr_t)]
+
+
+ +

+ +

+Definition at line 98 of file sysproto.h. +

+

+ +

+
+ + + + +
int mmap_args::fd
+
+
+ +

+ +

+Definition at line 102 of file sysproto.h. +

+Referenced by mmap(). +

+

+ +

+
+ + + + +
char mmap_args::fd_l_[PADL_(int)]
+
+
+ +

+ +

+Definition at line 102 of file sysproto.h. +

+

+ +

+
+ + + + +
char mmap_args::fd_r_[PADR_(int)]
+
+
+ +

+ +

+Definition at line 102 of file sysproto.h. +

+

+ +

+
+ + + + +
int mmap_args::flags
+
+
+ +

+ +

+Definition at line 101 of file sysproto.h. +

+

+ +

+
+ + + + +
char mmap_args::flags_l_[PADL_(int)]
+
+
+ +

+ +

+Definition at line 101 of file sysproto.h. +

+

+ +

+
+ + + + +
char mmap_args::flags_r_[PADR_(int)]
+
+
+ +

+ +

+Definition at line 101 of file sysproto.h. +

+

+ +

+
+ + + + +
size_t mmap_args::len
+
+
+ +

+ +

+Definition at line 99 of file sysproto.h. +

+Referenced by mmap(). +

+

+ +

+
+ + + + +
char mmap_args::len_l_[PADL_(size_t)]
+
+
+ +

+ +

+Definition at line 99 of file sysproto.h. +

+

+ +

+
+ + + + +
char mmap_args::len_r_[PADR_(size_t)]
+
+
+ +

+ +

+Definition at line 99 of file sysproto.h. +

+

+ +

+
+ + + + +
int mmap_args::pad
+
+
+ +

+ +

+Definition at line 103 of file sysproto.h. +

+

+ +

+
+ + + + +
char mmap_args::pad_l_[PADL_(int)]
+
+
+ +

+ +

+Definition at line 103 of file sysproto.h. +

+

+ +

+
+ + + + +
char mmap_args::pad_r_[PADR_(int)]
+
+
+ +

+ +

+Definition at line 103 of file sysproto.h. +

+

+ +

+
+ + + + +
off_t mmap_args::pos
+
+
+ +

+ +

+Definition at line 104 of file sysproto.h. +

+

+ +

+
+ + + + +
char mmap_args::pos_l_[PADL_(off_t)]
+
+
+ +

+ +

+Definition at line 104 of file sysproto.h. +

+

+ +

+
+ + + + +
char mmap_args::pos_r_[PADR_(off_t)]
+
+
+ +

+ +

+Definition at line 104 of file sysproto.h. +

+

+ +

+
+ + + + +
int mmap_args::prot
+
+
+ +

+ +

+Definition at line 100 of file sysproto.h. +

+

+ +

+
+ + + + +
char mmap_args::prot_l_[PADL_(int)]
+
+
+ +

+ +

+Definition at line 100 of file sysproto.h. +

+

+ +

+
+ + + + +
char mmap_args::prot_r_[PADR_(int)]
+
+
+ +

+ +

+Definition at line 100 of file sysproto.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:13 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structmpi__mbox.html b/doc/html/structmpi__mbox.html new file mode 100644 index 0000000..cd1822a --- /dev/null +++ b/doc/html/structmpi__mbox.html @@ -0,0 +1,167 @@ + + +UbixOS V2: mpi_mbox Struct Reference + + + + +
+
+
+
+

mpi_mbox Struct Reference

#include <mpi.h> +

+


Detailed Description

+ +

+ +

+Definition at line 45 of file mpi.h. + + + + + + + + + + + + + + +

Data Fields

mpi_messagemsg
mpi_messagemsgLast
char name [64]
mpi_mboxnext
pidType pid
mpi_mboxprev
+


Field Documentation

+ +
+
+ + + + +
struct mpi_message* mpi_mbox::msg
+
+
+ +

+ +

+Definition at line 48 of file mpi.h. +

+

+ +

+
+ + + + +
struct mpi_message* mpi_mbox::msgLast
+
+
+ +

+ +

+Definition at line 49 of file mpi.h. +

+

+ +

+
+ + + + +
char mpi_mbox::name[64]
+
+
+ +

+ +

+Definition at line 50 of file mpi.h. +

+

+ +

+
+ + + + +
struct mpi_mbox* mpi_mbox::next
+
+
+ +

+ +

+Definition at line 46 of file mpi.h. +

+

+ +

+
+ + + + +
pidType mpi_mbox::pid
+
+
+ +

+ +

+Definition at line 51 of file mpi.h. +

+

+ +

+
+ + + + +
struct mpi_mbox* mpi_mbox::prev
+
+
+ +

+ +

+Definition at line 47 of file mpi.h. +

+Referenced by mpi_createMbox(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:13 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structmpi__message.html b/doc/html/structmpi__message.html new file mode 100644 index 0000000..69cb579 --- /dev/null +++ b/doc/html/structmpi__message.html @@ -0,0 +1,135 @@ + + +UbixOS V2: mpi_message Struct Reference + + + + +
+
+
+
+

mpi_message Struct Reference

#include <mpi.h> +

+


Detailed Description

+ +

+ +

+Definition at line 38 of file mpi.h. + + + + + + + + + + +

Data Fields

char data [MESSAGE_LENGTH]
uInt32 header
mpi_messagenext
pidType pid
+


Field Documentation

+ +
+
+ + + + +
char mpi_message::data[MESSAGE_LENGTH]
+
+
+ +

+ +

+Definition at line 39 of file mpi.h. +

+Referenced by mpi_fetchMessage(), mpi_postMessage(), mpi_spam(), and systemTask(). +

+

+ +

+ +
+ +

+ +

+Definition at line 40 of file mpi.h. +

+Referenced by mpi_fetchMessage(), mpi_postMessage(), mpi_spam(), systemTask(), and ubixfs_thread(). +

+

+ +

+
+ + + + +
struct mpi_message* mpi_message::next
+
+
+ +

+ +

+Definition at line 42 of file mpi.h. +

+Referenced by mpi_postMessage(), and mpi_spam(). +

+

+ +

+ +
+ +

+ +

+Definition at line 41 of file mpi.h. +

+Referenced by mpi_fetchMessage(), mpi_postMessage(), and systemTask(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:13 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structmunmap__args.html b/doc/html/structmunmap__args.html new file mode 100644 index 0000000..04a2471 --- /dev/null +++ b/doc/html/structmunmap__args.html @@ -0,0 +1,165 @@ + + +UbixOS V2: munmap_args Struct Reference + + + + +
+
+
+
+

munmap_args Struct Reference

#include <sysproto.h> +

+


Detailed Description

+ +

+ +

+Definition at line 121 of file sysproto.h. + + + + + + + + + + + + + + +

Data Fields

void * addr
char addr_l_ [PADL_(void *)]
char addr_r_ [PADR_(void *)]
size_t len
char len_l_ [PADL_(size_t)]
char len_r_ [PADR_(size_t)]
+


Field Documentation

+ +
+
+ + + + +
void* munmap_args::addr
+
+
+ +

+ +

+Definition at line 122 of file sysproto.h. +

+

+ +

+
+ + + + +
char munmap_args::addr_l_[PADL_(void *)]
+
+
+ +

+ +

+Definition at line 122 of file sysproto.h. +

+

+ +

+
+ + + + +
char munmap_args::addr_r_[PADR_(void *)]
+
+
+ +

+ +

+Definition at line 122 of file sysproto.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 123 of file sysproto.h. +

+

+ +

+
+ + + + +
char munmap_args::len_l_[PADL_(size_t)]
+
+
+ +

+ +

+Definition at line 123 of file sysproto.h. +

+

+ +

+
+ + + + +
char munmap_args::len_r_[PADR_(size_t)]
+
+
+ +

+ +

+Definition at line 123 of file sysproto.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:13 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structnet.html b/doc/html/structnet.html new file mode 100644 index 0000000..632446c --- /dev/null +++ b/doc/html/structnet.html @@ -0,0 +1,89 @@ + + +UbixOS V2: net Struct Reference + + + + +
+
+
+
+

net Struct Reference

#include <device.old.h> +

+


Detailed Description

+ +

+ +

+Definition at line 37 of file device.old.h. + + + + + + +

Data Fields

char broadcast [6]
char mac [6]
+


Field Documentation

+ +
+
+ + + + +
char net::broadcast[6]
+
+
+ +

+ +

+Definition at line 39 of file device.old.h. +

+

+ +

+
+ + + + +
char net::mac[6]
+
+
+ +

+ +

+Definition at line 38 of file device.old.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:13 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structnetbuf.html b/doc/html/structnetbuf.html new file mode 100644 index 0000000..b9d0a2c --- /dev/null +++ b/doc/html/structnetbuf.html @@ -0,0 +1,156 @@ + + +UbixOS V2: netbuf Struct Reference + + + + +
+
+
+
+

netbuf Struct Reference

#include <api.h> +

+


Detailed Description

+ +

+ +

+Definition at line 68 of file api.h. + + + + + + + + + + + + +

Data Fields

err_t err
ip_addrfromaddr
uInt16 fromport
pbufp
pbufptr
+


Field Documentation

+ +
+
+ + + + +
err_t netbuf::err
+
+
+ +

+ +

+Definition at line 72 of file api.h. +

+Referenced by lwip_send(). +

+

+ +

+
+ + + + +
struct ip_addr* netbuf::fromaddr
+
+
+ +

+ +

+Definition at line 70 of file api.h. +

+Referenced by netbuf_fromaddr(), netconn_recv(), and recv_udp(). +

+

+ +

+ +
+ +

+ +

+Definition at line 71 of file api.h. +

+Referenced by netbuf_fromport(), netconn_recv(), and recv_udp(). +

+

+ +

+
+ + + + +
struct pbuf* netbuf::p
+
+ +

+ +

+
+ + + + +
struct pbuf * netbuf::ptr
+
+ +

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:13 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structnetconn.html b/doc/html/structnetconn.html new file mode 100644 index 0000000..1e30ac5 --- /dev/null +++ b/doc/html/structnetconn.html @@ -0,0 +1,261 @@ + + +UbixOS V2: netconn Struct Reference + + + + +
+
+
+
+

netconn Struct Reference

#include <api.h> +

+


Detailed Description

+ +

+ +

+Definition at line 75 of file api.h. + + + + + + + + + + + + + + + + + + + + + + + + +

Data Fields

sys_mbox_t acceptmbox
err_t err
sys_mbox_t mbox
union {
   tcp_pcb *   tcp
   udp_pcb *   udp
pcb
sys_mbox_t recvmbox
sys_sem_t sem
enum netconn_state state
enum netconn_type type
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 85 of file api.h. +

+Referenced by accept_function(), do_listen(), err_tcp(), netconn_accept(), netconn_delete(), netconn_listen(), and netconn_new(). +

+

+ +

+
+ + + + +
err_t netconn::err
+
+ +

+ +

+ + +

+ +

+
+ + + + +
union { ... } netconn::pcb
+
+ +

+ +

+ + +

+ +

+
+ + + + +
sys_sem_t netconn::sem
+
+
+ +

+ +

+Definition at line 86 of file api.h. +

+Referenced by accept_function(), err_tcp(), netconn_close(), netconn_delete(), netconn_new(), netconn_write(), poll_tcp(), and sent_tcp(). +

+

+ +

+
+ + + + +
enum netconn_state netconn::state
+
+
+ +

+ +

+Definition at line 77 of file api.h. +

+Referenced by netconn_close(), netconn_new(), netconn_write(), and poll_tcp(). +

+

+ +

+
+ + + + +
struct tcp_pcb* netconn::tcp
+
+ +

+ +

+
+ + + + +
enum netconn_type netconn::type
+
+ +

+ +

+
+ + + + +
struct udp_pcb* netconn::udp
+
+
+ +

+ +

+Definition at line 80 of file api.h. +

+Referenced by do_bind(), do_connect(), do_delconn(), do_send(), netconn_addr(), and netconn_peer(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:13 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structnetif.html b/doc/html/structnetif.html new file mode 100644 index 0000000..94c006d --- /dev/null +++ b/doc/html/structnetif.html @@ -0,0 +1,272 @@ + + +UbixOS V2: netif Struct Reference + + + + +
+
+
+
+

netif Struct Reference

#include <netif.h> +

+


Detailed Description

+ +

+ +

+Definition at line 48 of file netif.h. + + + + + + + + + + + + + + + + + + + + + + + + +

Data Fields

ip_addr gw
char hwaddr [6]
err_t(* input )(struct pbuf *p, struct netif *inp)
ip_addr ip_addr
err_t(* linkoutput )(struct netif *netif, struct pbuf *p)
char name [2]
ip_addr netmask
netifnext
uInt8 num
err_t(* output )(struct netif *netif, struct pbuf *p, struct ip_addr *ipaddr)
void * state
+


Field Documentation

+ +
+
+ + + + +
struct ip_addr netif::gw
+
+
+ +

+ +

+Definition at line 53 of file netif.h. +

+Referenced by ethernetif_output(). +

+

+ +

+
+ + + + +
char netif::hwaddr[6]
+
+
+ +

+ +

+Definition at line 54 of file netif.h. +

+Referenced by ethernetif_init(). +

+

+ +

+
+ + + + +
err_t(* netif::input)(struct pbuf *p, struct netif *inp)
+
+
+ +

+ +

+Referenced by ethernetif_input(), and loopif_output(). +

+

+ +

+
+ + + + +
struct ip_addr netif::ip_addr
+
+
+ +

+ +

+Definition at line 51 of file netif.h. +

+Referenced by arp_arp_input(), arp_ip_input(), arp_query(), and ethernetif_output(). +

+

+ +

+
+ + + + +
err_t(* netif::linkoutput)(struct netif *netif, struct pbuf *p)
+
+
+ +

+ +

+Referenced by ethernetif_init(). +

+

+ +

+
+ + + + +
char netif::name[2]
+
+
+ +

+ +

+Definition at line 63 of file netif.h. +

+Referenced by ethernetif_init(), and loopif_init(). +

+

+ +

+
+ + + + +
struct ip_addr netif::netmask
+
+
+ +

+ +

+Definition at line 52 of file netif.h. +

+Referenced by arp_ip_input(), and ethernetif_output(). +

+

+ +

+
+ + + + +
struct netif* netif::next
+
+
+ +

+ +

+Definition at line 49 of file netif.h. +

+

+ +

+
+ + + + +
uInt8 netif::num
+
+
+ +

+ +

+Definition at line 50 of file netif.h. +

+

+ +

+
+ + + + +
err_t(* netif::output)(struct netif *netif, struct pbuf *p, struct ip_addr *ipaddr)
+
+
+ +

+ +

+Referenced by ethernetif_init(), and loopif_init(). +

+

+ +

+
+ + + + +
void* netif::state
+
+
+ +

+ +

+Definition at line 71 of file netif.h. +

+Referenced by ethernetif_init(), ethernetif_input(), ethernetif_output(), and low_level_init(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:13 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structnicBuffer.html b/doc/html/structnicBuffer.html new file mode 100644 index 0000000..7616b47 --- /dev/null +++ b/doc/html/structnicBuffer.html @@ -0,0 +1,114 @@ + + +UbixOS V2: nicBuffer Struct Reference + + + + +
+
+
+
+

nicBuffer Struct Reference

#include <ne2k.h> +

+


Detailed Description

+ +

+ +

+Definition at line 51 of file ne2k.h. + + + + + + + + +

Data Fields

char * buffer
int length
nicBuffernext
+


Field Documentation

+ +
+
+ + + + +
char* nicBuffer::buffer
+
+
+ +

+ +

+Definition at line 54 of file ne2k.h. +

+Referenced by dp_pkt2user(), low_level_input(), ne2kAllocBuffer(), and ne2kFreeBuffer(). +

+

+ +

+
+ + + + +
int nicBuffer::length
+
+
+ +

+ +

+Definition at line 53 of file ne2k.h. +

+Referenced by ethernetif_thread(), low_level_input(), and ne2kAllocBuffer(). +

+

+ +

+
+ + + + +
struct nicBuffer* nicBuffer::next
+
+
+ +

+ +

+Definition at line 52 of file ne2k.h. +

+Referenced by ne2kAllocBuffer(), and ne2kGetBuffer(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:13 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structnicInfo.html b/doc/html/structnicInfo.html new file mode 100644 index 0000000..5d9b6fa --- /dev/null +++ b/doc/html/structnicInfo.html @@ -0,0 +1,154 @@ + + +UbixOS V2: nicInfo Struct Reference + + + + +
+
+
+
+

nicInfo Struct Reference

#include <lnc.h> +

+


Detailed Description

+ +

+ +

+Definition at line 148 of file lnc.h. + + + + + + + + + + + + +

Data Fields

int ic
int ident
int iobase
int memMode
int mode
+


Field Documentation

+ +
+
+ + + + +
int nicInfo::ic
+
+
+ +

+ +

+Definition at line 150 of file lnc.h. +

+Referenced by initLNC(), and lncAttach(). +

+

+ +

+
+ + + + +
int nicInfo::ident
+
+
+ +

+ +

+Definition at line 149 of file lnc.h. +

+Referenced by initLNC(), and lncAttach(). +

+

+ +

+
+ + + + +
int nicInfo::iobase
+
+
+ +

+ +

+Definition at line 152 of file lnc.h. +

+

+ +

+
+ + + + +
int nicInfo::memMode
+
+
+ +

+ +

+Definition at line 151 of file lnc.h. +

+Referenced by initLNC(), and lncAttach(). +

+

+ +

+
+ + + + +
int nicInfo::mode
+
+
+ +

+ +

+Definition at line 153 of file lnc.h. +

+Referenced by lncAttach(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:13 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structobreak__args.html b/doc/html/structobreak__args.html new file mode 100644 index 0000000..1b1d9cf --- /dev/null +++ b/doc/html/structobreak__args.html @@ -0,0 +1,110 @@ + + +UbixOS V2: obreak_args Struct Reference + + + + +
+
+
+
+

obreak_args Struct Reference

#include <sysproto.h> +

+


Detailed Description

+ +

+ +

+Definition at line 107 of file sysproto.h. + + + + + + + + +

Data Fields

char * nsize
char nsize_l_ [PADL_(char *)]
char nsize_r_ [PADR_(char *)]
+


Field Documentation

+ +
+
+ + + + +
char* obreak_args::nsize
+
+
+ +

+ +

+Definition at line 108 of file sysproto.h. +

+Referenced by obreak(). +

+

+ +

+
+ + + + +
char obreak_args::nsize_l_[PADL_(char *)]
+
+
+ +

+ +

+Definition at line 108 of file sysproto.h. +

+

+ +

+
+ + + + +
char obreak_args::nsize_r_[PADR_(char *)]
+
+
+ +

+ +

+Definition at line 108 of file sysproto.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:13 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structogModeInfo.html b/doc/html/structogModeInfo.html new file mode 100644 index 0000000..5e29fc8 --- /dev/null +++ b/doc/html/structogModeInfo.html @@ -0,0 +1,777 @@ + + +UbixOS V2: ogModeInfo Struct Reference + + + + +
+
+
+
+

ogModeInfo Struct Reference

#include <ogDisplay_UbixOS.h> +

+


Detailed Description

+ +

+ +

+Definition at line 6 of file ogDisplay_UbixOS.h. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

uInt8 paddington[461] __attribute__ ((packed))
uInt16 offScreenMemSize __attribute__ ((packed))
void *offScreenMemOffset __attribute__ ((packed))
uInt32 physBasePtr __attribute__ ((packed))
uInt8 directColourMode __attribute__ ((packed))
uInt8 alphaFieldPosition __attribute__ ((packed))
uInt8 alphaMaskSize __attribute__ ((packed))
uInt8 blueFieldPosition __attribute__ ((packed))
uInt8 blueMaskSize __attribute__ ((packed))
uInt8 greenFieldPosition __attribute__ ((packed))
uInt8 greenMaskSize __attribute__ ((packed))
uInt8 redFieldPosition __attribute__ ((packed))
uInt8 redMaskSize __attribute__ ((packed))
uInt8 reserved __attribute__ ((packed))
uInt8 numOfImagePages __attribute__ ((packed))
uInt8 bankSize __attribute__ ((packed))
uInt8 memoryModel __attribute__ ((packed))
uInt8 numberOfBanks __attribute__ ((packed))
uInt8 bitsPerPixel __attribute__ ((packed))
uInt8 numBitPlanes __attribute__ ((packed))
uInt8 charHeight __attribute__ ((packed))
uInt8 charWidth __attribute__ ((packed))
uInt16 yRes __attribute__ ((packed))
uInt16 xRes __attribute__ ((packed))
uInt16 bytesPerLine __attribute__ ((packed))
void *bankSwitch __attribute__ ((packed))
uInt16 windowBSeg __attribute__ ((packed))
uInt16 windowASeg __attribute__ ((packed))
uInt16 windowSize __attribute__ ((packed))
uInt16 granularity __attribute__ ((packed))
uInt8 windowBFlags __attribute__ ((packed))
uInt8 windowAFlags __attribute__ ((packed))
uInt16 modeAttributes __attribute__ ((packed))
+


Member Function Documentation

+ +
+
+ + + + + + + + + +
uInt8 paddington [461] ogModeInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt16 offScreenMemSize ogModeInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
void* offScreenMemOffset ogModeInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt32 physBasePtr ogModeInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 directColourMode ogModeInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 alphaFieldPosition ogModeInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 alphaMaskSize ogModeInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 blueFieldPosition ogModeInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 blueMaskSize ogModeInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 greenFieldPosition ogModeInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 greenMaskSize ogModeInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 redFieldPosition ogModeInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 redMaskSize ogModeInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 reserved ogModeInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 numOfImagePages ogModeInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 bankSize ogModeInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 memoryModel ogModeInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 numberOfBanks ogModeInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 bitsPerPixel ogModeInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 numBitPlanes ogModeInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 charHeight ogModeInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 charWidth ogModeInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt16 yRes ogModeInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt16 xRes ogModeInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt16 bytesPerLine ogModeInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
void* bankSwitch ogModeInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt16 windowBSeg ogModeInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt16 windowASeg ogModeInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt16 windowSize ogModeInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt16 granularity ogModeInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 windowBFlags ogModeInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 windowAFlags ogModeInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt16 modeAttributes ogModeInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:13 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structogVESAInfo.html b/doc/html/structogVESAInfo.html new file mode 100644 index 0000000..27a30d9 --- /dev/null +++ b/doc/html/structogVESAInfo.html @@ -0,0 +1,315 @@ + + +UbixOS V2: ogVESAInfo Struct Reference + + + + +
+
+
+
+

ogVESAInfo Struct Reference

#include <ogDisplay_UbixOS.h> +

+


Detailed Description

+ +

+ +

+Definition at line 44 of file ogDisplay_UbixOS.h. + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

uInt8 paddington[474] __attribute__ ((packed))
uInt32 OEMProductRevPtr __attribute__ ((packed))
uInt32 OEMProductNamePtr __attribute__ ((packed))
uInt32 OEMVendorNamePtr __attribute__ ((packed))
uInt16 OEMSoftwareRev __attribute__ ((packed))
uInt16 totalMemory __attribute__ ((packed))
uInt32 videoModePtr __attribute__ ((packed))
uInt32 capabilities __attribute__ ((packed))
uInt32 OEMStringPtr __attribute__ ((packed))
uInt8 majVersion __attribute__ ((packed))
uInt8 minVersion __attribute__ ((packed))
char VBESignature[4] __attribute__ ((packed))
+


Member Function Documentation

+ +
+
+ + + + + + + + + +
uInt8 paddington [474] ogVESAInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt32 OEMProductRevPtr ogVESAInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt32 OEMProductNamePtr ogVESAInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt32 OEMVendorNamePtr ogVESAInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt16 OEMSoftwareRev ogVESAInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt16 totalMemory ogVESAInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt32 videoModePtr ogVESAInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt32 capabilities ogVESAInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt32 OEMStringPtr ogVESAInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 majVersion ogVESAInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 minVersion ogVESAInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
char VBESignature [4] ogVESAInfo::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:13 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structosInfo.html b/doc/html/structosInfo.html new file mode 100644 index 0000000..807ae23 --- /dev/null +++ b/doc/html/structosInfo.html @@ -0,0 +1,213 @@ + + +UbixOS V2: osInfo Struct Reference + + + + +
+
+
+
+

osInfo Struct Reference

#include <sched.h> +

+


Detailed Description

+ +

+ +

+Definition at line 43 of file sched.h. + + + + + + + + + + + + + + + + + + +

Data Fields

uInt32 controlKeys
char cwd [1024]
char * stdin
uInt32 stdinSize
uInt8 timer
bool v86If
uInt8 v86Task
uInt32 vmStart
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 49 of file sched.h. +

+

+ +

+
+ + + + +
char osInfo::cwd[1024]
+
+
+ +

+ +

+Definition at line 51 of file sched.h. +

+Referenced by fork_copyProcess(), sysChDir(), sysGetCwd(), and sysMkDir(). +

+

+ +

+
+ + + + +
char* osInfo::stdin
+
+
+ +

+ +

+Definition at line 50 of file sched.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 48 of file sched.h. +

+

+ +

+
+ + + + +
uInt8 osInfo::timer
+
+
+ +

+ +

+Definition at line 44 of file sched.h. +

+Referenced by _int13(). +

+

+ +

+
+ + + + +
bool osInfo::v86If
+
+
+ +

+ +

+Definition at line 46 of file sched.h. +

+Referenced by _int13(). +

+

+ +

+
+ + + + +
uInt8 osInfo::v86Task
+
+
+ +

+ +

+Definition at line 45 of file sched.h. +

+Referenced by biosCall(). +

+

+ +

+
+ + + + +
uInt32 osInfo::vmStart
+
+
+ +

+ +

+Definition at line 47 of file sched.h. +

+Referenced by execFile(), execThread(), fork_copyProcess(), sysExec(), vmmGetFreeVirtualPage(), and vmmMapFromTask(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:13 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structpartitionInformation.html b/doc/html/structpartitionInformation.html new file mode 100644 index 0000000..23462f6 --- /dev/null +++ b/doc/html/structpartitionInformation.html @@ -0,0 +1,127 @@ + + +UbixOS V2: partitionInformation Struct Reference + + + + +
+
+
+
+

partitionInformation Struct Reference

#include <ubixfs.h> +

+


Detailed Description

+ +

+ +

+Definition at line 87 of file ubixfs.h. + + + + + + + + + + +

Data Fields

uInt32 blockAllocationTable
uInt32 rootDirectory
uInt32 size
uInt32 startSector
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 90 of file ubixfs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 91 of file ubixfs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 88 of file ubixfs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 89 of file ubixfs.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:13 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structpbuf.html b/doc/html/structpbuf.html new file mode 100644 index 0000000..54327d9 --- /dev/null +++ b/doc/html/structpbuf.html @@ -0,0 +1,173 @@ + + +UbixOS V2: pbuf Struct Reference + + + + +
+
+
+
+

pbuf Struct Reference

#include <pbuf.h> +

+


Detailed Description

+ +

+ +

+Definition at line 66 of file pbuf.h. + + + + + + + + + + + + + + +

Data Fields

uInt8 flags
uInt16 len
pbufnext
void * payload
uInt8 ref
uInt16 tot_len
+


Field Documentation

+ +
+
+ + + + +
uInt8 pbuf::flags
+
+
+ +

+ +

+Definition at line 70 of file pbuf.h. +

+

+ +

+
+ + + + +
uInt16 pbuf::len
+
+
+ +

+ +

+Definition at line 76 of file pbuf.h. +

+Referenced by loopif_output(), low_level_input(), low_level_output(), netbuf_copy_partial(), netbuf_data(), and netbuf_ref(). +

+

+ +

+
+ + + + +
struct pbuf* pbuf::next
+
+
+ +

+ +

+Definition at line 67 of file pbuf.h. +

+Referenced by loopif_output(), low_level_input(), low_level_output(), netbuf_copy_partial(), and netbuf_next(). +

+

+ +

+
+ + + + +
void* pbuf::payload
+
+ +

+ +

+
+ + + + +
uInt8 pbuf::ref
+
+
+ +

+ +

+Definition at line 70 of file pbuf.h. +

+

+ +

+
+ + + + +
uInt16 pbuf::tot_len
+
+
+ +

+ +

+Definition at line 74 of file pbuf.h. +

+Referenced by arp_arp_input(), loopif_output(), low_level_output(), netbuf_len(), netbuf_ref(), netconn_recv(), and netconn_send(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:13 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structpciConfig.html b/doc/html/structpciConfig.html new file mode 100644 index 0000000..4791868 --- /dev/null +++ b/doc/html/structpciConfig.html @@ -0,0 +1,469 @@ + + +UbixOS V2: pciConfig Struct Reference + + + + +
+
+
+
+

pciConfig Struct Reference

#include <pci.h> +

+


Detailed Description

+ +

+ +

+Definition at line 36 of file pci.h. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Fields

uInt32 base [6]
uInt8 baseClass
uInt8 bist
uInt8 bus
uInt8 cacheLineSize
uInt16 command
uInt8 dev
uInt16 deviceId
uInt8 func
uInt8 headerType
uInt8 interface
uInt8 irq
uInt8 latencyTimer
uInt8 revisionId
uInt32 size [6]
uInt16 status
uInt8 subClass
uInt16 subsys
uInt16 subsysVendor
uInt16 vendorId
+


Field Documentation

+ +
+
+ + + + +
uInt32 pciConfig::base[6]
+
+
+ +

+ +

+Definition at line 60 of file pci.h. +

+Referenced by pciProbe(). +

+

+ +

+ +
+ +

+ +

+Definition at line 46 of file pci.h. +

+Referenced by pci_init(), and pciProbe(). +

+

+ +

+
+ + + + +
uInt8 pciConfig::bist
+
+
+ +

+ +

+Definition at line 51 of file pci.h. +

+Referenced by pciProbe(). +

+

+ +

+
+ + + + +
uInt8 pciConfig::bus
+
+
+ +

+ +

+Definition at line 54 of file pci.h. +

+Referenced by pciProbe(). +

+

+ +

+ +
+ +

+ +

+Definition at line 48 of file pci.h. +

+Referenced by pciProbe(). +

+

+ +

+ +
+ +

+ +

+Definition at line 40 of file pci.h. +

+Referenced by pciProbe(). +

+

+ +

+
+ + + + +
uInt8 pciConfig::dev
+
+
+ +

+ +

+Definition at line 55 of file pci.h. +

+Referenced by pciProbe(). +

+

+ +

+ +
+ +

+ +

+Definition at line 38 of file pci.h. +

+Referenced by pciProbe(). +

+

+ +

+
+ + + + +
uInt8 pciConfig::func
+
+
+ +

+ +

+Definition at line 56 of file pci.h. +

+Referenced by pciProbe(). +

+

+ +

+ +
+ +

+ +

+Definition at line 50 of file pci.h. +

+Referenced by pciProbe(). +

+

+ +

+ +
+ +

+ +

+Definition at line 44 of file pci.h. +

+Referenced by pci_init(), and pciProbe(). +

+

+ +

+
+ + + + +
uInt8 pciConfig::irq
+
+
+ +

+ +

+Definition at line 57 of file pci.h. +

+Referenced by pci_init(), and pciProbe(). +

+

+ +

+ +
+ +

+ +

+Definition at line 49 of file pci.h. +

+Referenced by pciProbe(). +

+

+ +

+ +
+ +

+ +

+Definition at line 43 of file pci.h. +

+

+ +

+
+ + + + +
uInt32 pciConfig::size[6]
+
+
+ +

+ +

+Definition at line 61 of file pci.h. +

+Referenced by pciProbe(). +

+

+ +

+ +
+ +

+ +

+Definition at line 41 of file pci.h. +

+Referenced by pciProbe(). +

+

+ +

+ +
+ +

+ +

+Definition at line 45 of file pci.h. +

+Referenced by pci_init(), and pciProbe(). +

+

+ +

+ +
+ +

+ +

+Definition at line 64 of file pci.h. +

+Referenced by pciProbe(). +

+

+ +

+ +
+ +

+ +

+Definition at line 63 of file pci.h. +

+Referenced by pciProbe(). +

+

+ +

+ +
+ +

+ +

+Definition at line 37 of file pci.h. +

+Referenced by pciProbe(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:13 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structpipe__args.html b/doc/html/structpipe__args.html new file mode 100644 index 0000000..ed88606 --- /dev/null +++ b/doc/html/structpipe__args.html @@ -0,0 +1,70 @@ + + +UbixOS V2: pipe_args Struct Reference + + + + +
+
+
+
+

pipe_args Struct Reference

#include <sysproto.h> +

+


Detailed Description

+ +

+ +

+Definition at line 76 of file sysproto.h. + + + + +

Data Fields

register_t dummy
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 77 of file sysproto.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:13 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structreadlink__args.html b/doc/html/structreadlink__args.html new file mode 100644 index 0000000..f73f6ee --- /dev/null +++ b/doc/html/structreadlink__args.html @@ -0,0 +1,226 @@ + + +UbixOS V2: readlink_args Struct Reference + + + + +
+
+
+
+

readlink_args Struct Reference

#include <sysproto.h> +

+


Detailed Description

+ +

+ +

+Definition at line 80 of file sysproto.h. + + + + + + + + + + + + + + + + + + + + +

Data Fields

char * buf
char buf_l_ [PADL_(char *)]
char buf_r_ [PADR_(char *)]
int count
char count_l_ [PADL_(int)]
char count_r_ [PADR_(int)]
char * path
char path_l_ [PADL_(char *)]
char path_r_ [PADR_(char *)]
+


Field Documentation

+ +
+
+ + + + +
char* readlink_args::buf
+
+
+ +

+ +

+Definition at line 82 of file sysproto.h. +

+

+ +

+
+ + + + +
char readlink_args::buf_l_[PADL_(char *)]
+
+
+ +

+ +

+Definition at line 82 of file sysproto.h. +

+

+ +

+
+ + + + +
char readlink_args::buf_r_[PADR_(char *)]
+
+
+ +

+ +

+Definition at line 82 of file sysproto.h. +

+

+ +

+
+ + + + +
int readlink_args::count
+
+
+ +

+ +

+Definition at line 83 of file sysproto.h. +

+Referenced by readlink(). +

+

+ +

+
+ + + + +
char readlink_args::count_l_[PADL_(int)]
+
+
+ +

+ +

+Definition at line 83 of file sysproto.h. +

+

+ +

+
+ + + + +
char readlink_args::count_r_[PADR_(int)]
+
+
+ +

+ +

+Definition at line 83 of file sysproto.h. +

+

+ +

+
+ + + + +
char* readlink_args::path
+
+
+ +

+ +

+Definition at line 81 of file sysproto.h. +

+Referenced by readlink(). +

+

+ +

+
+ + + + +
char readlink_args::path_l_[PADL_(char *)]
+
+
+ +

+ +

+Definition at line 81 of file sysproto.h. +

+

+ +

+
+ + + + +
char readlink_args::path_r_[PADR_(char *)]
+
+
+ +

+ +

+Definition at line 81 of file sysproto.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:13 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structsdeWindows.html b/doc/html/structsdeWindows.html new file mode 100644 index 0000000..ba82fc2 --- /dev/null +++ b/doc/html/structsdeWindows.html @@ -0,0 +1,146 @@ + + +UbixOS V2: sdeWindows Struct Reference + + + + +
+
+
+
+

sdeWindows Struct Reference

#include <sde.h> +

+


Detailed Description

+ +

+ +

+Definition at line 44 of file sde.h. + + + + + + + + + + + + +

Data Fields

void * buf
sdeWindowsnext
pidType pid
sdeWindowsprev
uInt8 status
+


Field Documentation

+ +
+
+ + + + +
void* sdeWindows::buf
+
+
+ +

+ +

+Definition at line 47 of file sde.h. +

+

+ +

+
+ + + + +
struct sdeWindows* sdeWindows::next
+
+
+ +

+ +

+Definition at line 45 of file sde.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 48 of file sde.h. +

+

+ +

+
+ + + + +
struct sdeWindows* sdeWindows::prev
+
+
+ +

+ +

+Definition at line 46 of file sde.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 49 of file sde.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:13 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structsigaction__args.html b/doc/html/structsigaction__args.html new file mode 100644 index 0000000..f43c8b6 --- /dev/null +++ b/doc/html/structsigaction__args.html @@ -0,0 +1,222 @@ + + +UbixOS V2: sigaction_args Struct Reference + + + + +
+
+
+
+

sigaction_args Struct Reference

#include <sysproto.h> +

+


Detailed Description

+ +

+ +

+Definition at line 111 of file sysproto.h. + + + + + + + + + + + + + + + + + + + + +

Data Fields

sigaction * act
char act_l_ [PADL_(const struct sigaction *)]
char act_r_ [PADR_(const struct sigaction *)]
sigaction * oact
char oact_l_ [PADL_(struct sigaction *)]
char oact_r_ [PADR_(struct sigaction *)]
int sig
char sig_l_ [PADL_(int)]
char sig_r_ [PADR_(int)]
+


Field Documentation

+ +
+
+ + + + +
struct sigaction* sigaction_args::act
+
+
+ +

+ +

+Definition at line 113 of file sysproto.h. +

+

+ +

+
+ + + + +
char sigaction_args::act_l_[PADL_(const struct sigaction *)]
+
+
+ +

+ +

+Definition at line 113 of file sysproto.h. +

+

+ +

+
+ + + + +
char sigaction_args::act_r_[PADR_(const struct sigaction *)]
+
+
+ +

+ +

+Definition at line 113 of file sysproto.h. +

+

+ +

+
+ + + + +
struct sigaction* sigaction_args::oact
+
+
+ +

+ +

+Definition at line 114 of file sysproto.h. +

+

+ +

+
+ + + + +
char sigaction_args::oact_l_[PADL_(struct sigaction *)]
+
+
+ +

+ +

+Definition at line 114 of file sysproto.h. +

+

+ +

+
+ + + + +
char sigaction_args::oact_r_[PADR_(struct sigaction *)]
+
+
+ +

+ +

+Definition at line 114 of file sysproto.h. +

+

+ +

+
+ + + + +
int sigaction_args::sig
+
+
+ +

+ +

+Definition at line 112 of file sysproto.h. +

+

+ +

+
+ + + + +
char sigaction_args::sig_l_[PADL_(int)]
+
+
+ +

+ +

+Definition at line 112 of file sysproto.h. +

+

+ +

+
+ + + + +
char sigaction_args::sig_r_[PADR_(int)]
+
+
+ +

+ +

+Definition at line 112 of file sysproto.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:13 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structsigprocmask__args.html b/doc/html/structsigprocmask__args.html new file mode 100644 index 0000000..ad0fe28 --- /dev/null +++ b/doc/html/structsigprocmask__args.html @@ -0,0 +1,222 @@ + + +UbixOS V2: sigprocmask_args Struct Reference + + + + +
+
+
+
+

sigprocmask_args Struct Reference

#include <sysproto.h> +

+


Detailed Description

+ +

+ +

+Definition at line 126 of file sysproto.h. + + + + + + + + + + + + + + + + + + + + +

Data Fields

int how
char how_l_ [PADL_(int)]
char how_r_ [PADR_(int)]
sigset_toset
char oset_l_ [PADL_(sigset_t *)]
char oset_r_ [PADR_(sigset_t *)]
const sigset_tset
char set_l_ [PADL_(const sigset_t *)]
char set_r_ [PADR_(const sigset_t *)]
+


Field Documentation

+ +
+
+ + + + +
int sigprocmask_args::how
+
+
+ +

+ +

+Definition at line 127 of file sysproto.h. +

+

+ +

+
+ + + + +
char sigprocmask_args::how_l_[PADL_(int)]
+
+
+ +

+ +

+Definition at line 127 of file sysproto.h. +

+

+ +

+
+ + + + +
char sigprocmask_args::how_r_[PADR_(int)]
+
+
+ +

+ +

+Definition at line 127 of file sysproto.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 129 of file sysproto.h. +

+

+ +

+
+ + + + +
char sigprocmask_args::oset_l_[PADL_(sigset_t *)]
+
+
+ +

+ +

+Definition at line 129 of file sysproto.h. +

+

+ +

+
+ + + + +
char sigprocmask_args::oset_r_[PADR_(sigset_t *)]
+
+
+ +

+ +

+Definition at line 129 of file sysproto.h. +

+

+ +

+
+ + + + +
const sigset_t* sigprocmask_args::set
+
+
+ +

+ +

+Definition at line 128 of file sysproto.h. +

+

+ +

+
+ + + + +
char sigprocmask_args::set_l_[PADL_(const sigset_t *)]
+
+
+ +

+ +

+Definition at line 128 of file sysproto.h. +

+

+ +

+
+ + + + +
char sigprocmask_args::set_r_[PADR_(const sigset_t *)]
+
+
+ +

+ +

+Definition at line 128 of file sysproto.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:13 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structsockaddr.html b/doc/html/structsockaddr.html new file mode 100644 index 0000000..19f8041 --- /dev/null +++ b/doc/html/structsockaddr.html @@ -0,0 +1,108 @@ + + +UbixOS V2: sockaddr Struct Reference + + + + +
+
+
+
+

sockaddr Struct Reference

#include <sockets.h> +

+


Detailed Description

+ +

+ +

+Definition at line 55 of file sockets.h. + + + + + + + + +

Data Fields

char sa_data [14]
uInt8 sa_family
uInt8 sa_len
+


Field Documentation

+ +
+
+ + + + +
char sockaddr::sa_data[14]
+
+
+ +

+ +

+Definition at line 58 of file sockets.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 57 of file sockets.h. +

+

+ +

+
+ + + + +
uInt8 sockaddr::sa_len
+
+
+ +

+ +

+Definition at line 56 of file sockets.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:14 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structsockaddr__in.html b/doc/html/structsockaddr__in.html new file mode 100644 index 0000000..70991a6 --- /dev/null +++ b/doc/html/structsockaddr__in.html @@ -0,0 +1,146 @@ + + +UbixOS V2: sockaddr_in Struct Reference + + + + +
+
+
+
+

sockaddr_in Struct Reference

#include <sockets.h> +

+


Detailed Description

+ +

+ +

+Definition at line 47 of file sockets.h. + + + + + + + + + + + + +

Data Fields

in_addr sin_addr
uInt8 sin_family
uInt8 sin_len
uInt16 sin_port
char sin_zero [8]
+


Field Documentation

+ +
+
+ + + + +
struct in_addr sockaddr_in::sin_addr
+
+
+ +

+ +

+Definition at line 51 of file sockets.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 49 of file sockets.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 48 of file sockets.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 50 of file sockets.h. +

+

+ +

+
+ + + + +
char sockaddr_in::sin_zero[8]
+
+
+ +

+ +

+Definition at line 52 of file sockets.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:14 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structstat.html b/doc/html/structstat.html new file mode 100644 index 0000000..c3985eb --- /dev/null +++ b/doc/html/structstat.html @@ -0,0 +1,473 @@ + + +UbixOS V2: stat Struct Reference + + + + +
+
+
+
+

stat Struct Reference

#include <kern_descrip.h> +

+


Detailed Description

+ +

+ +

+Definition at line 101 of file kern_descrip.h. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Fields

long __st_atimensec
long __st_ctimensec
long __st_mtimensec
unsigned int:(8 / 2) * (16 - (int)sizeof(struct __timespec))
time_t st_atime
time_t st_birthtime
long st_birthtimensec
blksize_t st_blksize
blkcnt_t st_blocks
time_t st_ctime
__dev_t st_dev
fflags_t st_flags
__uint32_t st_gen
gid_t st_gid
ino_t st_ino
__int32_t st_lspare
mode_t st_mode
time_t st_mtime
nlink_t st_nlink
__dev_t st_rdev
off_t st_size
uid_t st_uid
+


Field Documentation

+ +
+
+ + + + +
long stat::__st_atimensec
+
+
+ +

+ +

+Definition at line 115 of file kern_descrip.h. +

+

+ +

+
+ + + + +
long stat::__st_ctimensec
+
+
+ +

+ +

+Definition at line 119 of file kern_descrip.h. +

+

+ +

+
+ + + + +
long stat::__st_mtimensec
+
+
+ +

+ +

+Definition at line 117 of file kern_descrip.h. +

+

+ +

+
+ + + + +
unsigned stat::int
+
+
+ +

+ +

+Definition at line 142 of file kern_descrip.h. +

+

+ +

+
+ + + + +
time_t stat::st_atime
+
+
+ +

+ +

+Definition at line 114 of file kern_descrip.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 140 of file kern_descrip.h. +

+

+ +

+
+ + + + +
long stat::st_birthtimensec
+
+
+ +

+ +

+Definition at line 141 of file kern_descrip.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 123 of file kern_descrip.h. +

+Referenced by fstat(). +

+

+ +

+ +
+ +

+ +

+Definition at line 122 of file kern_descrip.h. +

+

+ +

+
+ + + + +
time_t stat::st_ctime
+
+
+ +

+ +

+Definition at line 118 of file kern_descrip.h. +

+

+ +

+
+ + + + +
__dev_t stat::st_dev
+
+
+ +

+ +

+Definition at line 102 of file kern_descrip.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 124 of file kern_descrip.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 125 of file kern_descrip.h. +

+

+ +

+
+ + + + +
gid_t stat::st_gid
+
+
+ +

+ +

+Definition at line 107 of file kern_descrip.h. +

+

+ +

+
+ + + + +
ino_t stat::st_ino
+
+
+ +

+ +

+Definition at line 103 of file kern_descrip.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 126 of file kern_descrip.h. +

+

+ +

+
+ + + + +
mode_t stat::st_mode
+
+
+ +

+ +

+Definition at line 104 of file kern_descrip.h. +

+Referenced by fstat(). +

+

+ +

+
+ + + + +
time_t stat::st_mtime
+
+
+ +

+ +

+Definition at line 116 of file kern_descrip.h. +

+

+ +

+
+ + + + +
nlink_t stat::st_nlink
+
+
+ +

+ +

+Definition at line 105 of file kern_descrip.h. +

+

+ +

+
+ + + + +
__dev_t stat::st_rdev
+
+
+ +

+ +

+Definition at line 108 of file kern_descrip.h. +

+

+ +

+
+ + + + +
off_t stat::st_size
+
+
+ +

+ +

+Definition at line 121 of file kern_descrip.h. +

+

+ +

+
+ + + + +
uid_t stat::st_uid
+
+
+ +

+ +

+Definition at line 106 of file kern_descrip.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:14 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structsys__mbox.html b/doc/html/structsys__mbox.html new file mode 100644 index 0000000..c3c4aed --- /dev/null +++ b/doc/html/structsys__mbox.html @@ -0,0 +1,154 @@ + + +UbixOS V2: sys_mbox Struct Reference + + + + +
+
+
+
+

sys_mbox Struct Reference


Detailed Description

+ +

+ +

+Definition at line 108 of file sys_arch.c. + + + + + + + + + + + + +

Data Fields

uInt16 first
uInt16 last
sys_semmail
void * msgs [SYS_MBOX_SIZE]
sys_semmutex
+


Field Documentation

+ +
+
+ + + + +
uInt16 sys_mbox::first
+
+
+ +

+ +

+Definition at line 109 of file sys_arch.c. +

+Referenced by sys_arch_mbox_fetch(), sys_mbox_new(), and sys_mbox_post(). +

+

+ +

+
+ + + + +
uInt16 sys_mbox::last
+
+
+ +

+ +

+Definition at line 109 of file sys_arch.c. +

+Referenced by sys_arch_mbox_fetch(), sys_mbox_new(), and sys_mbox_post(). +

+

+ +

+
+ + + + +
struct sys_sem* sys_mbox::mail
+
+
+ +

+ +

+Definition at line 111 of file sys_arch.c. +

+Referenced by sys_arch_mbox_fetch(), sys_mbox_free(), sys_mbox_new(), and sys_mbox_post(). +

+

+ +

+
+ + + + +
void* sys_mbox::msgs[SYS_MBOX_SIZE]
+
+
+ +

+ +

+Definition at line 110 of file sys_arch.c. +

+Referenced by sys_arch_mbox_fetch(), and sys_mbox_post(). +

+

+ +

+
+ + + + +
struct sys_sem* sys_mbox::mutex
+
+
+ +

+ +

+Definition at line 112 of file sys_arch.c. +

+Referenced by sys_arch_mbox_fetch(), sys_mbox_free(), sys_mbox_new(), and sys_mbox_post(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:14 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structsys__mbox__msg.html b/doc/html/structsys__mbox__msg.html new file mode 100644 index 0000000..dc51a47 --- /dev/null +++ b/doc/html/structsys__mbox__msg.html @@ -0,0 +1,87 @@ + + +UbixOS V2: sys_mbox_msg Struct Reference + + + + +
+
+
+
+

sys_mbox_msg Struct Reference


Detailed Description

+ +

+ +

+Definition at line 101 of file sys_arch.c. + + + + + + +

Data Fields

void * msg
sys_mbox_msgnext
+


Field Documentation

+ +
+
+ + + + +
void* sys_mbox_msg::msg
+
+
+ +

+ +

+Definition at line 103 of file sys_arch.c. +

+

+ +

+
+ + + + +
struct sys_mbox_msg* sys_mbox_msg::next
+
+
+ +

+ +

+Definition at line 102 of file sys_arch.c. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:14 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structsys__sem.html b/doc/html/structsys__sem.html new file mode 100644 index 0000000..13f2d11 --- /dev/null +++ b/doc/html/structsys__sem.html @@ -0,0 +1,112 @@ + + +UbixOS V2: sys_sem Struct Reference + + + + +
+
+
+
+

sys_sem Struct Reference


Detailed Description

+ +

+ +

+Definition at line 115 of file sys_arch.c. + + + + + + + + +

Data Fields

unsigned int c
ubthread_cond_t cond
ubthread_mutex_t mutex
+


Field Documentation

+ +
+
+ + + + +
unsigned int sys_sem::c
+
+
+ +

+ +

+Definition at line 116 of file sys_arch.c. +

+Referenced by sys_arch_sem_wait(), sys_sem_new_(), and sys_sem_signal(). +

+

+ +

+ +
+ +

+ +

+Definition at line 117 of file sys_arch.c. +

+Referenced by sys_arch_sem_wait(), sys_sem_free_(), sys_sem_new_(), and sys_sem_signal(). +

+

+ +

+ +
+ +

+ +

+Definition at line 118 of file sys_arch.c. +

+Referenced by sys_arch_sem_wait(), sys_sem_free_(), sys_sem_new_(), and sys_sem_signal(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:14 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structsys__thread.html b/doc/html/structsys__thread.html new file mode 100644 index 0000000..60444d0 --- /dev/null +++ b/doc/html/structsys__thread.html @@ -0,0 +1,112 @@ + + +UbixOS V2: sys_thread Struct Reference + + + + +
+
+
+
+

sys_thread Struct Reference


Detailed Description

+ +

+ +

+Definition at line 121 of file sys_arch.c. + + + + + + + + +

Data Fields

sys_threadnext
sys_timeouts timeouts
kTask_tubthread
+


Field Documentation

+ +
+
+ + + + +
struct sys_thread* sys_thread::next
+
+
+ +

+ +

+Definition at line 122 of file sys_arch.c. +

+Referenced by current_thread(), and sys_thread_new(). +

+

+ +

+ +
+ +

+ +

+Definition at line 123 of file sys_arch.c. +

+Referenced by sys_arch_timeouts(), and sys_thread_new(). +

+

+ +

+ +
+ +

+ +

+Definition at line 124 of file sys_arch.c. +

+Referenced by current_thread(), and sys_thread_new(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:14 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structsys__timeout.html b/doc/html/structsys__timeout.html new file mode 100644 index 0000000..b8ce13f --- /dev/null +++ b/doc/html/structsys__timeout.html @@ -0,0 +1,127 @@ + + +UbixOS V2: sys_timeout Struct Reference + + + + +
+
+
+
+

sys_timeout Struct Reference

#include <sys.h> +

+


Detailed Description

+ +

+ +

+Definition at line 43 of file sys.h. + + + + + + + + + + +

Data Fields

void * arg
sys_timeout_handler h
sys_timeoutnext
uInt16 time
+


Field Documentation

+ +
+
+ + + + +
void* sys_timeout::arg
+
+
+ +

+ +

+Definition at line 47 of file sys.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 46 of file sys.h. +

+

+ +

+
+ + + + +
struct sys_timeout* sys_timeout::next
+
+
+ +

+ +

+Definition at line 44 of file sys.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 45 of file sys.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:14 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structsys__timeouts.html b/doc/html/structsys__timeouts.html new file mode 100644 index 0000000..09d9679 --- /dev/null +++ b/doc/html/structsys__timeouts.html @@ -0,0 +1,72 @@ + + +UbixOS V2: sys_timeouts Struct Reference + + + + +
+
+
+
+

sys_timeouts Struct Reference

#include <sys.h> +

+


Detailed Description

+ +

+ +

+Definition at line 50 of file sys.h. + + + + +

Data Fields

sys_timeoutnext
+


Field Documentation

+ +
+
+ + + + +
struct sys_timeout* sys_timeouts::next
+
+
+ +

+ +

+Definition at line 51 of file sys.h. +

+Referenced by sys_thread_new(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:14 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structsysctl__args.html b/doc/html/structsysctl__args.html new file mode 100644 index 0000000..c3a8943 --- /dev/null +++ b/doc/html/structsysctl__args.html @@ -0,0 +1,405 @@ + + +UbixOS V2: sysctl_args Struct Reference + + + + +
+
+
+
+

sysctl_args Struct Reference

#include <sysproto.h> +

+


Detailed Description

+ +

+ +

+Definition at line 55 of file sysproto.h. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Fields

int * name
char name_l_ [PADL_(int *)]
char name_r_ [PADR_(int *)]
u_int namelen
char namelen_l_ [PADL_(u_int)]
char namelen_r_ [PADR_(u_int)]
void * new
char new_l_ [PADL_(void *)]
char new_r_ [PADR_(void *)]
size_t newlen
char newlen_l_ [PADL_(size_t)]
char newlen_r_ [PADR_(size_t)]
void * old
char old_l_ [PADL_(void *)]
char old_r_ [PADR_(void *)]
size_toldlenp
char oldlenp_l_ [PADL_(size_t *)]
char oldlenp_r_ [PADR_(size_t *)]
+


Field Documentation

+ +
+
+ + + + +
int* sysctl_args::name
+
+
+ +

+ +

+Definition at line 56 of file sysproto.h. +

+Referenced by __sysctl(). +

+

+ +

+
+ + + + +
char sysctl_args::name_l_[PADL_(int *)]
+
+
+ +

+ +

+Definition at line 56 of file sysproto.h. +

+

+ +

+
+ + + + +
char sysctl_args::name_r_[PADR_(int *)]
+
+
+ +

+ +

+Definition at line 56 of file sysproto.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 57 of file sysproto.h. +

+Referenced by __sysctl(). +

+

+ +

+
+ + + + +
char sysctl_args::namelen_l_[PADL_(u_int)]
+
+
+ +

+ +

+Definition at line 57 of file sysproto.h. +

+

+ +

+
+ + + + +
char sysctl_args::namelen_r_[PADR_(u_int)]
+
+
+ +

+ +

+Definition at line 57 of file sysproto.h. +

+

+ +

+
+ + + + +
void* sysctl_args::new
+
+
+ +

+ +

+Definition at line 60 of file sysproto.h. +

+Referenced by __sysctl(). +

+

+ +

+
+ + + + +
char sysctl_args::new_l_[PADL_(void *)]
+
+
+ +

+ +

+Definition at line 60 of file sysproto.h. +

+

+ +

+
+ + + + +
char sysctl_args::new_r_[PADR_(void *)]
+
+
+ +

+ +

+Definition at line 60 of file sysproto.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 61 of file sysproto.h. +

+Referenced by __sysctl(). +

+

+ +

+
+ + + + +
char sysctl_args::newlen_l_[PADL_(size_t)]
+
+
+ +

+ +

+Definition at line 61 of file sysproto.h. +

+

+ +

+
+ + + + +
char sysctl_args::newlen_r_[PADR_(size_t)]
+
+
+ +

+ +

+Definition at line 61 of file sysproto.h. +

+

+ +

+
+ + + + +
void* sysctl_args::old
+
+
+ +

+ +

+Definition at line 58 of file sysproto.h. +

+Referenced by __sysctl(). +

+

+ +

+
+ + + + +
char sysctl_args::old_l_[PADL_(void *)]
+
+
+ +

+ +

+Definition at line 58 of file sysproto.h. +

+

+ +

+
+ + + + +
char sysctl_args::old_r_[PADR_(void *)]
+
+
+ +

+ +

+Definition at line 58 of file sysproto.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 59 of file sysproto.h. +

+Referenced by __sysctl(). +

+

+ +

+
+ + + + +
char sysctl_args::oldlenp_l_[PADL_(size_t *)]
+
+
+ +

+ +

+Definition at line 59 of file sysproto.h. +

+

+ +

+
+ + + + +
char sysctl_args::oldlenp_r_[PADR_(size_t *)]
+
+
+ +

+ +

+Definition at line 59 of file sysproto.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:14 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structsysctl__entry.html b/doc/html/structsysctl__entry.html new file mode 100644 index 0000000..8dd934f --- /dev/null +++ b/doc/html/structsysctl__entry.html @@ -0,0 +1,198 @@ + + +UbixOS V2: sysctl_entry Struct Reference + + + + +
+
+
+
+

sysctl_entry Struct Reference

#include <kern_sysctl.h> +

+


Detailed Description

+ +

+ +

+Definition at line 55 of file kern_sysctl.h. + + + + + + + + + + + + + + + + +

Data Fields

sysctl_entrychildren
int id
char name [32]
sysctl_entrynext
sysctl_entryprev
int val_len
void * value
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 58 of file kern_sysctl.h. +

+Referenced by sysctl_add(), sysctl_find(), and sysctl_init(). +

+

+ +

+
+ + + + +
int sysctl_entry::id
+
+
+ +

+ +

+Definition at line 60 of file kern_sysctl.h. +

+Referenced by sysctl_add(), sysctl_find(), and sysctl_init(). +

+

+ +

+
+ + + + +
char sysctl_entry::name[32]
+
+
+ +

+ +

+Definition at line 59 of file kern_sysctl.h. +

+Referenced by sysctl_add(), and sysctl_init(). +

+

+ +

+
+ + + + +
struct sysctl_entry* sysctl_entry::next
+
+
+ +

+ +

+Definition at line 57 of file kern_sysctl.h. +

+Referenced by sysctl_add(), sysctl_find(), and sysctl_init(). +

+

+ +

+
+ + + + +
struct sysctl_entry* sysctl_entry::prev
+
+
+ +

+ +

+Definition at line 56 of file kern_sysctl.h. +

+Referenced by sysctl_add(), and sysctl_init(). +

+

+ +

+
+ + + + +
int sysctl_entry::val_len
+
+
+ +

+ +

+Definition at line 62 of file kern_sysctl.h. +

+Referenced by kern_sysctl(), and sysctl_add(). +

+

+ +

+
+ + + + +
void* sysctl_entry::value
+
+
+ +

+ +

+Definition at line 61 of file kern_sysctl.h. +

+Referenced by kern_sysctl(), and sysctl_add(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:14 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structtaskStruct.html b/doc/html/structtaskStruct.html new file mode 100644 index 0000000..2b867e5 --- /dev/null +++ b/doc/html/structtaskStruct.html @@ -0,0 +1,324 @@ + + +UbixOS V2: taskStruct Struct Reference + + + + +
+
+
+
+

taskStruct Struct Reference

#include <sched.h> +

+


Detailed Description

+ +

+ +

+Definition at line 54 of file sched.h. + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Fields

uInt32 gid
i387Struct i387
pidType id
fileDescriptorimageFd
taskStructnext
osInfo oInfo
taskStructprev
tState state
thread td
tty_termterm
tssStruct tss
uInt32 uid
uInt16 usedMath
+


Field Documentation

+ +
+
+ + + + +
uInt32 taskStruct::gid
+
+
+ +

+ +

+Definition at line 63 of file sched.h. +

+Referenced by execFile(), fork_copyProcess(), getgid(), sysGetGid(), and sysSetGid(). +

+

+ +

+
+ + + + +
struct i387Struct taskStruct::i387
+
+
+ +

+ +

+Definition at line 59 of file sched.h. +

+Referenced by mathStateRestore(). +

+

+ +

+
+ + + + +
pidType taskStruct::id
+
+ +

+ +

+ +
+ +

+ +

+Definition at line 61 of file sched.h. +

+Referenced by execThread(), sysExec(), and systemTask(). +

+

+ +

+
+ + + + +
struct taskStruct* taskStruct::next
+
+
+ +

+ +

+Definition at line 57 of file sched.h. +

+Referenced by sched(), sched_addDelTask(), sched_deleteTask(), sched_getDelTask(), schedFindTask(), and schedNewTask(). +

+

+ +

+
+ + + + +
struct osInfo taskStruct::oInfo
+
+ +

+ +

+
+ + + + +
struct taskStruct* taskStruct::prev
+
+
+ +

+ +

+Definition at line 56 of file sched.h. +

+Referenced by sched_addDelTask(), sched_deleteTask(), and schedNewTask(). +

+

+ +

+ +
+ +

+ +

+Definition at line 62 of file sched.h. +

+Referenced by _int13(), biosCall(), fork_copyProcess(), sched(), sched_setStatus(), schedNewTask(), and sysCheckPid(). +

+

+ +

+
+ + + + +
struct thread taskStruct::td
+
+ +

+ +

+ +
+ +

+ +

+Definition at line 66 of file sched.h. +

+Referenced by execFile(), fork_copyProcess(), sysFgetc(), sysFwrite(), and systemTask(). +

+

+ +

+
+ + + + +
struct tssStruct taskStruct::tss
+
+
+ +

+ +

+Definition at line 58 of file sched.h. +

+Referenced by _int13(), biosCall(), execFile(), execThread(), fork_copyProcess(), sysExec(), and vmmMapFromTask(). +

+

+ +

+
+ + + + +
uInt32 taskStruct::uid
+
+
+ +

+ +

+Definition at line 64 of file sched.h. +

+Referenced by execFile(), fork_copyProcess(), getuid(), sysGetUid(), sysPasswd(), and sysSetUid(). +

+

+ +

+ +
+ +

+ +

+Definition at line 65 of file sched.h. +

+Referenced by mathStateRestore(), and schedNewTask(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:14 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structtcp__hdr.html b/doc/html/structtcp__hdr.html new file mode 100644 index 0000000..175d113 --- /dev/null +++ b/doc/html/structtcp__hdr.html @@ -0,0 +1,227 @@ + + +UbixOS V2: tcp_hdr Struct Reference + + + + +
+
+
+
+

tcp_hdr Struct Reference

#include <tcp.h> +

+


Detailed Description

+ +

+ +

+Definition at line 139 of file tcp.h. + + + + + + + + + + + + + + + + + + +

Public Member Functions

 PACK_STRUCT_FIELD (uInt16 urgp)
 PACK_STRUCT_FIELD (uInt16 chksum)
 PACK_STRUCT_FIELD (uInt16 wnd)
 PACK_STRUCT_FIELD (uInt16 _offset_flags)
 PACK_STRUCT_FIELD (uInt32 ackno)
 PACK_STRUCT_FIELD (uInt32 seqno)
 PACK_STRUCT_FIELD (uInt16 dest)
 PACK_STRUCT_FIELD (uInt16 src)
+


Member Function Documentation

+ +
+
+ + + + + + + + + +
tcp_hdr::PACK_STRUCT_FIELD (uInt16  urgp  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
tcp_hdr::PACK_STRUCT_FIELD (uInt16  chksum  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
tcp_hdr::PACK_STRUCT_FIELD (uInt16  wnd  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
tcp_hdr::PACK_STRUCT_FIELD (uInt16  _offset_flags  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
tcp_hdr::PACK_STRUCT_FIELD (uInt32  ackno  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
tcp_hdr::PACK_STRUCT_FIELD (uInt32  seqno  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
tcp_hdr::PACK_STRUCT_FIELD (uInt16  dest  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
tcp_hdr::PACK_STRUCT_FIELD (uInt16  src  ) 
+
+
+ +

+ +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:14 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structtcp__pcb.html b/doc/html/structtcp__pcb.html new file mode 100644 index 0000000..aca60e0 --- /dev/null +++ b/doc/html/structtcp__pcb.html @@ -0,0 +1,868 @@ + + +UbixOS V2: tcp_pcb Struct Reference + + + + +
+
+
+
+

tcp_pcb Struct Reference

#include <tcp.h> +

+


Detailed Description

+ +

+ +

+Definition at line 175 of file tcp.h. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Fields

err_t(* accept )(void *arg, struct tcp_pcb *newpcb, err_t err)
uInt16 acked
void * callback_arg
err_t(* connected )(void *arg, struct tcp_pcb *pcb, err_t err)
uInt16 cwnd
uInt8 dupacks
void(* errf )(void *arg, err_t err)
uInt8 flags
uInt32 lastack
ip_addr local_ip
uInt16 local_port
uInt16 mss
tcp_pcbnext
uInt8 nrtx
err_t(* poll )(void *arg, struct tcp_pcb *pcb)
uInt8 pollinterval
uInt8 polltmr
uInt32 rcv_nxt
uInt16 rcv_wnd
err_t(* recv )(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err)
pbufrecv_data
ip_addr remote_ip
uInt16 remote_port
uInt8 rtime
uInt16 rto
uInt32 rtseq
uInt16 rttest
Int32 sa
err_t(* sent )(void *arg, struct tcp_pcb *pcb, uInt16 space)
uInt16 snd_buf
uInt32 snd_lbb
uInt32 snd_max
uInt32 snd_nxt
uInt8 snd_queuelen
uInt32 snd_wl1
uInt32 snd_wl2
uInt32 snd_wnd
uInt16 ssthresh
enum tcp_state state
Int32 sv
uInt16 tmr
tcp_segunacked
tcp_segunsent
+


Field Documentation

+ +
+
+ + + + +
err_t(* tcp_pcb::accept)(void *arg, struct tcp_pcb *newpcb, err_t err)
+
+
+ +

+ +

+

+ +

+
+ + + + +
uInt16 tcp_pcb::acked
+
+
+ +

+ +

+Definition at line 239 of file tcp.h. +

+

+ +

+
+ + + + +
void* tcp_pcb::callback_arg
+
+
+ +

+ +

+Definition at line 180 of file tcp.h. +

+

+ +

+
+ + + + +
err_t(* tcp_pcb::connected)(void *arg, struct tcp_pcb *pcb, err_t err)
+
+
+ +

+ +

+

+ +

+
+ + + + +
uInt16 tcp_pcb::cwnd
+
+
+ +

+ +

+Definition at line 224 of file tcp.h. +

+

+ +

+
+ + + + +
uInt8 tcp_pcb::dupacks
+
+
+ +

+ +

+Definition at line 221 of file tcp.h. +

+

+ +

+
+ + + + +
void(* tcp_pcb::errf)(void *arg, err_t err)
+
+
+ +

+ +

+

+ +

+
+ + + + +
uInt8 tcp_pcb::flags
+
+
+ +

+ +

+Definition at line 203 of file tcp.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 220 of file tcp.h. +

+

+ +

+
+ + + + +
struct ip_addr tcp_pcb::local_ip
+
+
+ +

+ +

+Definition at line 185 of file tcp.h. +

+Referenced by netconn_addr(). +

+

+ +

+ +
+ +

+ +

+Definition at line 186 of file tcp.h. +

+Referenced by netconn_addr(). +

+

+ +

+
+ + + + +
uInt16 tcp_pcb::mss
+
+
+ +

+ +

+Definition at line 201 of file tcp.h. +

+

+ +

+
+ + + + +
struct tcp_pcb* tcp_pcb::next
+
+
+ +

+ +

+Definition at line 176 of file tcp.h. +

+

+ +

+
+ + + + +
uInt8 tcp_pcb::nrtx
+
+
+ +

+ +

+Definition at line 217 of file tcp.h. +

+

+ +

+
+ + + + +
err_t(* tcp_pcb::poll)(void *arg, struct tcp_pcb *pcb)
+
+
+ +

+ +

+

+ +

+ +
+ +

+ +

+Definition at line 254 of file tcp.h. +

+

+ +

+
+ + + + +
uInt8 tcp_pcb::polltmr
+
+
+ +

+ +

+Definition at line 254 of file tcp.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 192 of file tcp.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 193 of file tcp.h. +

+

+ +

+
+ + + + +
err_t(* tcp_pcb::recv)(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err)
+
+
+ +

+ +

+

+ +

+
+ + + + +
struct pbuf* tcp_pcb::recv_data
+
+
+ +

+ +

+Definition at line 243 of file tcp.h. +

+

+ +

+
+ + + + +
struct ip_addr tcp_pcb::remote_ip
+
+
+ +

+ +

+Definition at line 188 of file tcp.h. +

+Referenced by netconn_peer(). +

+

+ +

+ +
+ +

+ +

+Definition at line 189 of file tcp.h. +

+Referenced by netconn_peer(). +

+

+ +

+
+ + + + +
uInt8 tcp_pcb::rtime
+
+
+ +

+ +

+Definition at line 199 of file tcp.h. +

+

+ +

+
+ + + + +
uInt16 tcp_pcb::rto
+
+
+ +

+ +

+Definition at line 216 of file tcp.h. +

+

+ +

+
+ + + + +
uInt32 tcp_pcb::rtseq
+
+
+ +

+ +

+Definition at line 213 of file tcp.h. +

+

+ +

+
+ + + + +
uInt16 tcp_pcb::rttest
+
+
+ +

+ +

+Definition at line 212 of file tcp.h. +

+

+ +

+
+ + + + +
Int32 tcp_pcb::sa
+
+
+ +

+ +

+Definition at line 214 of file tcp.h. +

+

+ +

+
+ + + + +
err_t(* tcp_pcb::sent)(void *arg, struct tcp_pcb *pcb, uInt16 space)
+
+
+ +

+ +

+

+ +

+ +
+ +

+ +

+Definition at line 234 of file tcp.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 228 of file tcp.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 228 of file tcp.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 228 of file tcp.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 235 of file tcp.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 228 of file tcp.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 228 of file tcp.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 228 of file tcp.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 225 of file tcp.h. +

+

+ +

+
+ + + + +
enum tcp_state tcp_pcb::state
+
+
+ +

+ +

+Definition at line 178 of file tcp.h. +

+Referenced by accept_function(), do_close(), do_delconn(), and netconn_recv(). +

+

+ +

+
+ + + + +
Int32 tcp_pcb::sv
+
+
+ +

+ +

+Definition at line 214 of file tcp.h. +

+

+ +

+
+ + + + +
uInt16 tcp_pcb::tmr
+
+
+ +

+ +

+Definition at line 196 of file tcp.h. +

+

+ +

+
+ + + + +
struct tcp_seg* tcp_pcb::unacked
+
+
+ +

+ +

+Definition at line 258 of file tcp.h. +

+Referenced by do_write(). +

+

+ +

+
+ + + + +
struct tcp_seg* tcp_pcb::unsent
+
+
+ +

+ +

+Definition at line 257 of file tcp.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:14 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structtcp__pcb__listen.html b/doc/html/structtcp__pcb__listen.html new file mode 100644 index 0000000..2c3e11f --- /dev/null +++ b/doc/html/structtcp__pcb__listen.html @@ -0,0 +1,163 @@ + + +UbixOS V2: tcp_pcb_listen Struct Reference + + + + +
+
+
+
+

tcp_pcb_listen Struct Reference

#include <tcp.h> +

+


Detailed Description

+ +

+ +

+Definition at line 265 of file tcp.h. + + + + + + + + + + + + + + +

Data Fields

void(* accept )(void *arg, struct tcp_pcb *newpcb)
void * callback_arg
ip_addr local_ip
uInt16 local_port
tcp_pcb_listennext
enum tcp_state state
+


Field Documentation

+ +
+
+ + + + +
void(* tcp_pcb_listen::accept)(void *arg, struct tcp_pcb *newpcb)
+
+
+ +

+ +

+

+ +

+
+ + + + +
void* tcp_pcb_listen::callback_arg
+
+
+ +

+ +

+Definition at line 270 of file tcp.h. +

+

+ +

+
+ + + + +
struct ip_addr tcp_pcb_listen::local_ip
+
+
+ +

+ +

+Definition at line 275 of file tcp.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 276 of file tcp.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 266 of file tcp.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 268 of file tcp.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:14 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structtcp__seg.html b/doc/html/structtcp__seg.html new file mode 100644 index 0000000..f826c61 --- /dev/null +++ b/doc/html/structtcp__seg.html @@ -0,0 +1,146 @@ + + +UbixOS V2: tcp_seg Struct Reference + + + + +
+
+
+
+

tcp_seg Struct Reference

#include <tcp.h> +

+


Detailed Description

+ +

+ +

+Definition at line 280 of file tcp.h. + + + + + + + + + + + + +

Data Fields

void * dataptr
uInt16 len
tcp_segnext
pbufp
tcp_hdrtcphdr
+


Field Documentation

+ +
+
+ + + + +
void* tcp_seg::dataptr
+
+
+ +

+ +

+Definition at line 283 of file tcp.h. +

+

+ +

+
+ + + + +
uInt16 tcp_seg::len
+
+
+ +

+ +

+Definition at line 284 of file tcp.h. +

+

+ +

+
+ + + + +
struct tcp_seg* tcp_seg::next
+
+
+ +

+ +

+Definition at line 281 of file tcp.h. +

+

+ +

+
+ + + + +
struct pbuf* tcp_seg::p
+
+
+ +

+ +

+Definition at line 282 of file tcp.h. +

+

+ +

+
+ + + + +
struct tcp_hdr* tcp_seg::tcphdr
+
+
+ +

+ +

+Definition at line 285 of file tcp.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:14 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structtcpip__msg.html b/doc/html/structtcpip__msg.html new file mode 100644 index 0000000..1ee7742 --- /dev/null +++ b/doc/html/structtcpip__msg.html @@ -0,0 +1,192 @@ + + +UbixOS V2: tcpip_msg Struct Reference + + + + +
+
+
+
+

tcpip_msg Struct Reference

#include <tcpip.h> +

+


Detailed Description

+ +

+ +

+Definition at line 50 of file tcpip.h. + + + + + + + + + + + + + + + + + + + + +

Data Fields

union {
   api_msg *   apimsg
   struct {
      netif *   netif
      pbuf *   p
   }   inp
msg
sys_sem_tsem
enum tcpip_msg_type type
+


Field Documentation

+ +
+
+ + + + +
struct api_msg* tcpip_msg::apimsg
+
+
+ +

+ +

+Definition at line 54 of file tcpip.h. +

+Referenced by tcpip_apimsg(). +

+

+ +

+
+ + + + +
struct { ... } tcpip_msg::inp
+
+
+ +

+ +

+Referenced by tcpip_input(). +

+

+ +

+
+ + + + +
union { ... } tcpip_msg::msg
+
+
+ +

+ +

+Referenced by tcpip_apimsg(), tcpip_input(), and tcpip_thread(). +

+

+ +

+
+ + + + +
struct netif* tcpip_msg::netif
+
+
+ +

+ +

+Definition at line 57 of file tcpip.h. +

+

+ +

+
+ + + + +
struct pbuf* tcpip_msg::p
+
+
+ +

+ +

+Definition at line 56 of file tcpip.h. +

+Referenced by tcpip_input(). +

+

+ +

+ +
+ +

+ +

+Definition at line 52 of file tcpip.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 51 of file tcpip.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:14 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structthread.html b/doc/html/structthread.html new file mode 100644 index 0000000..d41fbf6 --- /dev/null +++ b/doc/html/structthread.html @@ -0,0 +1,135 @@ + + +UbixOS V2: thread Struct Reference + + + + +
+
+
+
+

thread Struct Reference

#include <thread.h> +

+


Detailed Description

+ +

+ +

+Definition at line 35 of file thread.h. + + + + + + + + + + +

Data Fields

uInt32 o_files [64]
int td_retval [2]
char * vm_daddr
int32_t vm_dsize
+


Field Documentation

+ +
+
+ + + + +
uInt32 thread::o_files[64]
+
+
+ +

+ +

+Definition at line 37 of file thread.h. +

+Referenced by close(), falloc(), fcntl(), fstat(), and schedNewTask(). +

+

+ +

+
+ + + + +
int thread::td_retval[2]
+
+
+ +

+ +

+Definition at line 36 of file thread.h. +

+Referenced by close(), fcntl(), getdtablesize(), getgid(), getpid(), getuid(), ioctl(), kern_sysctl(), mmap(), pipe(), readlink(), and syscall(). +

+

+ +

+
+ + + + +
char* thread::vm_daddr
+
+
+ +

+ +

+Definition at line 38 of file thread.h. +

+Referenced by execFile(), obreak(), sysExec(), vmm_pageFault(), and vmmGetFreeVirtualPage(). +

+

+ +

+ +
+ +

+ +

+Definition at line 39 of file thread.h. +

+Referenced by obreak(), sysExec(), vmm_pageFault(), and vmmGetFreeVirtualPage(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:14 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structthread__start__param.html b/doc/html/structthread__start__param.html new file mode 100644 index 0000000..409eb6e --- /dev/null +++ b/doc/html/structthread__start__param.html @@ -0,0 +1,104 @@ + + +UbixOS V2: thread_start_param Struct Reference + + + + +
+
+
+
+

thread_start_param Struct Reference


Detailed Description

+ +

+ +

+Definition at line 156 of file sys_arch.c. + + + + + + + + +

Data Fields

void * arg
void(* function )(void *)
sys_threadthread
+


Field Documentation

+ +
+
+ + + + +
void* thread_start_param::arg
+
+
+ +

+ +

+Definition at line 159 of file sys_arch.c. +

+

+ +

+
+ + + + +
void(* thread_start_param::function)(void *)
+
+
+ +

+ +

+

+ +

+ +
+ +

+ +

+Definition at line 157 of file sys_arch.c. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:14 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structtimeStruct.html b/doc/html/structtimeStruct.html new file mode 100644 index 0000000..7e3e8ac --- /dev/null +++ b/doc/html/structtimeStruct.html @@ -0,0 +1,177 @@ + + +UbixOS V2: timeStruct Struct Reference + + + + +
+
+
+
+

timeStruct Struct Reference

#include <time.h> +

+


Detailed Description

+ +

+ +

+Definition at line 57 of file time.h. + + + + + + + + + + + + + + +

Data Fields

int day
int hour
int min
int mon
int sec
int year
+


Field Documentation

+ +
+
+ + + + +
int timeStruct::day
+
+
+ +

+ +

+Definition at line 61 of file time.h. +

+Referenced by time_init(), and timeMake(). +

+

+ +

+
+ + + + +
int timeStruct::hour
+
+
+ +

+ +

+Definition at line 60 of file time.h. +

+Referenced by time_init(), and timeMake(). +

+

+ +

+
+ + + + +
int timeStruct::min
+
+
+ +

+ +

+Definition at line 59 of file time.h. +

+Referenced by time_init(), and timeMake(). +

+

+ +

+
+ + + + +
int timeStruct::mon
+
+
+ +

+ +

+Definition at line 62 of file time.h. +

+Referenced by time_init(), and timeMake(). +

+

+ +

+
+ + + + +
int timeStruct::sec
+
+
+ +

+ +

+Definition at line 58 of file time.h. +

+Referenced by time_init(), and timeMake(). +

+

+ +

+
+ + + + +
int timeStruct::year
+
+
+ +

+ +

+Definition at line 63 of file time.h. +

+Referenced by time_init(), and timeMake(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:14 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structtimespec.html b/doc/html/structtimespec.html new file mode 100644 index 0000000..b01bbe6 --- /dev/null +++ b/doc/html/structtimespec.html @@ -0,0 +1,93 @@ + + +UbixOS V2: timespec Struct Reference + + + + +
+
+
+
+

timespec Struct Reference

#include <time.h> +

+


Detailed Description

+ +

+ +

+Definition at line 50 of file time.h. + + + + + + +

Data Fields

long tv_nsec
time_t tv_sec
+


Field Documentation

+ +
+
+ + + + +
long timespec::tv_nsec
+
+
+ +

+ +

+Definition at line 52 of file time.h. +

+Referenced by cond_wait(). +

+

+ +

+ +
+ +

+ +

+Definition at line 51 of file time.h. +

+Referenced by cond_wait(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:14 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structtimeval.html b/doc/html/structtimeval.html new file mode 100644 index 0000000..52b4d4d --- /dev/null +++ b/doc/html/structtimeval.html @@ -0,0 +1,93 @@ + + +UbixOS V2: timeval Struct Reference + + + + +
+
+
+
+

timeval Struct Reference

#include <time.h> +

+


Detailed Description

+ +

+ +

+Definition at line 72 of file time.h. + + + + + + +

Data Fields

long tv_sec
suseconds_t tv_usec
+


Field Documentation

+ +
+
+ + + + +
long timeval::tv_sec
+
+
+ +

+ +

+Definition at line 73 of file time.h. +

+Referenced by cond_wait(), gettimeofday(), and sys_unix_now(). +

+

+ +

+ +
+ +

+ +

+Definition at line 74 of file time.h. +

+Referenced by cond_wait(), gettimeofday(), and sys_unix_now(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:15 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structtimezone.html b/doc/html/structtimezone.html new file mode 100644 index 0000000..09ecfe4 --- /dev/null +++ b/doc/html/structtimezone.html @@ -0,0 +1,89 @@ + + +UbixOS V2: timezone Struct Reference + + + + +
+
+
+
+

timezone Struct Reference

#include <time.h> +

+


Detailed Description

+ +

+ +

+Definition at line 67 of file time.h. + + + + + + +

Data Fields

int tz_dsttime
int tz_minuteswest
+


Field Documentation

+ +
+
+ + + + +
int timezone::tz_dsttime
+
+
+ +

+ +

+Definition at line 69 of file time.h. +

+

+ +

+
+ + + + +
int timezone::tz_minuteswest
+
+
+ +

+ +

+Definition at line 68 of file time.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:15 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structtms.html b/doc/html/structtms.html new file mode 100644 index 0000000..6986c74 --- /dev/null +++ b/doc/html/structtms.html @@ -0,0 +1,127 @@ + + +UbixOS V2: tms Struct Reference + + + + +
+
+
+
+

tms Struct Reference

#include <times.h> +

+


Detailed Description

+ +

+ +

+Definition at line 41 of file times.h. + + + + + + + + + + +

Data Fields

clock_t tms_cstime
clock_t tms_cutime
clock_t tms_stime
clock_t tms_utime
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 45 of file times.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 44 of file times.h. +

+

+ +

+
+ + + + +
clock_t tms::tms_stime
+
+
+ +

+ +

+Definition at line 43 of file times.h. +

+

+ +

+
+ + + + +
clock_t tms::tms_utime
+
+
+ +

+ +

+Definition at line 42 of file times.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:15 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structtrapframe.html b/doc/html/structtrapframe.html new file mode 100644 index 0000000..55a4d07 --- /dev/null +++ b/doc/html/structtrapframe.html @@ -0,0 +1,405 @@ + + +UbixOS V2: trapframe Struct Reference + + + + +
+
+
+
+

trapframe Struct Reference

#include <trap.h> +

+


Detailed Description

+ +

+ +

+Definition at line 33 of file trap.h. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Fields

int tf_cs
int tf_ds
int tf_eax
int tf_ebp
int tf_ebx
int tf_ecx
int tf_edi
int tf_edx
int tf_eflags
int tf_eip
int tf_err
int tf_es
int tf_esi
int tf_esp
int tf_fs
int tf_isp
int tf_ss
int tf_trapno
+


Field Documentation

+ +
+
+ + + + +
int trapframe::tf_cs
+
+
+ +

+ +

+Definition at line 49 of file trap.h. +

+

+ +

+
+ + + + +
int trapframe::tf_ds
+
+
+ +

+ +

+Definition at line 36 of file trap.h. +

+

+ +

+
+ + + + +
int trapframe::tf_eax
+
+
+ +

+ +

+Definition at line 44 of file trap.h. +

+Referenced by syscall(). +

+

+ +

+
+ + + + +
int trapframe::tf_ebp
+
+
+ +

+ +

+Definition at line 39 of file trap.h. +

+

+ +

+
+ + + + +
int trapframe::tf_ebx
+
+
+ +

+ +

+Definition at line 41 of file trap.h. +

+

+ +

+
+ + + + +
int trapframe::tf_ecx
+
+
+ +

+ +

+Definition at line 43 of file trap.h. +

+

+ +

+
+ + + + +
int trapframe::tf_edi
+
+
+ +

+ +

+Definition at line 37 of file trap.h. +

+

+ +

+
+ + + + +
int trapframe::tf_edx
+
+
+ +

+ +

+Definition at line 42 of file trap.h. +

+Referenced by syscall(). +

+

+ +

+
+ + + + +
int trapframe::tf_eflags
+
+
+ +

+ +

+Definition at line 50 of file trap.h. +

+Referenced by syscall(). +

+

+ +

+
+ + + + +
int trapframe::tf_eip
+
+
+ +

+ +

+Definition at line 48 of file trap.h. +

+Referenced by syscall(). +

+

+ +

+
+ + + + +
int trapframe::tf_err
+
+
+ +

+ +

+Definition at line 47 of file trap.h. +

+Referenced by syscall(). +

+

+ +

+
+ + + + +
int trapframe::tf_es
+
+
+ +

+ +

+Definition at line 35 of file trap.h. +

+

+ +

+
+ + + + +
int trapframe::tf_esi
+
+
+ +

+ +

+Definition at line 38 of file trap.h. +

+

+ +

+
+ + + + +
int trapframe::tf_esp
+
+
+ +

+ +

+Definition at line 52 of file trap.h. +

+Referenced by syscall(). +

+

+ +

+
+ + + + +
int trapframe::tf_fs
+
+
+ +

+ +

+Definition at line 34 of file trap.h. +

+

+ +

+
+ + + + +
int trapframe::tf_isp
+
+
+ +

+ +

+Definition at line 40 of file trap.h. +

+

+ +

+
+ + + + +
int trapframe::tf_ss
+
+
+ +

+ +

+Definition at line 53 of file trap.h. +

+

+ +

+
+ + + + +
int trapframe::tf_trapno
+
+
+ +

+ +

+Definition at line 45 of file trap.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:15 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structtssStruct.html b/doc/html/structtssStruct.html new file mode 100644 index 0000000..a5456d6 --- /dev/null +++ b/doc/html/structtssStruct.html @@ -0,0 +1,846 @@ + + +UbixOS V2: tssStruct Struct Reference + + + + +
+
+
+
+

tssStruct Struct Reference

#include <tss.h> +

+


Detailed Description

+ +

+ +

+Definition at line 35 of file tss.h. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Fields

short back_link
short back_link_reserved
long cr3
short cs
short cs_reserved
short ds
short ds_reserved
long eax
long ebp
long ebx
long ecx
long edi
long edx
long eflags
long eip
short es
short es_reserved
long esi
long esp
long esp0
long esp1
long esp2
short fs
short fs_reserved
short gs
short gs_reserved
short io_map
char io_space [8192]
short ldt
short ldt_reserved
short ss
short ss0
short ss0_reserved
short ss1
short ss1_reserved
short ss2
short ss2_reserved
short ss_reserved
short trace_bitmap
+


Field Documentation

+ +
+
+ + + + +
short tssStruct::back_link
+
+
+ +

+ +

+Definition at line 36 of file tss.h. +

+Referenced by biosCall(), execFile(), execThread(), fork_copyProcess(), and idt_init(). +

+

+ +

+ +
+ +

+ +

+Definition at line 37 of file tss.h. +

+

+ +

+
+ + + + +
long tssStruct::cr3
+
+
+ +

+ +

+Definition at line 47 of file tss.h. +

+Referenced by _int8(), biosCall(), execFile(), execThread(), fork_copyProcess(), idt_init(), and vmmMapFromTask(). +

+

+ +

+
+ + + + +
short tssStruct::cs
+
+
+ +

+ +

+Definition at line 57 of file tss.h. +

+Referenced by _int13(), _int8(), biosCall(), execFile(), execThread(), fork_copyProcess(), and idt_init(). +

+

+ +

+
+ + + + +
short tssStruct::cs_reserved
+
+
+ +

+ +

+Definition at line 58 of file tss.h. +

+

+ +

+
+ + + + +
short tssStruct::ds
+
+
+ +

+ +

+Definition at line 61 of file tss.h. +

+Referenced by _int8(), biosCall(), execFile(), execThread(), fork_copyProcess(), and idt_init(). +

+

+ +

+
+ + + + +
short tssStruct::ds_reserved
+
+
+ +

+ +

+Definition at line 62 of file tss.h. +

+

+ +

+
+ + + + +
long tssStruct::eax
+
+
+ +

+ +

+Definition at line 50 of file tss.h. +

+Referenced by _int13(), biosCall(), and fork_copyProcess(). +

+

+ +

+
+ + + + +
long tssStruct::ebp
+
+
+ +

+ +

+Definition at line 52 of file tss.h. +

+Referenced by _int13(), _int8(), biosCall(), execFile(), execThread(), fork_copyProcess(), and idt_init(). +

+

+ +

+
+ + + + +
long tssStruct::ebx
+
+
+ +

+ +

+Definition at line 50 of file tss.h. +

+Referenced by biosCall(), and fork_copyProcess(). +

+

+ +

+
+ + + + +
long tssStruct::ecx
+
+
+ +

+ +

+Definition at line 50 of file tss.h. +

+Referenced by biosCall(), and fork_copyProcess(). +

+

+ +

+
+ + + + +
long tssStruct::edi
+
+
+ +

+ +

+Definition at line 54 of file tss.h. +

+Referenced by biosCall(), execFile(), execThread(), fork_copyProcess(), and idt_init(). +

+

+ +

+
+ + + + +
long tssStruct::edx
+
+
+ +

+ +

+Definition at line 50 of file tss.h. +

+Referenced by _int13(), biosCall(), and fork_copyProcess(). +

+

+ +

+
+ + + + +
long tssStruct::eflags
+
+
+ +

+ +

+Definition at line 49 of file tss.h. +

+Referenced by _int13(), _int8(), biosCall(), execFile(), execThread(), fork_copyProcess(), and idt_init(). +

+

+ +

+
+ + + + +
long tssStruct::eip
+
+
+ +

+ +

+Definition at line 48 of file tss.h. +

+Referenced by _int13(), _int8(), biosCall(), execFile(), execThread(), fork_copyProcess(), and idt_init(). +

+

+ +

+
+ + + + +
short tssStruct::es
+
+
+ +

+ +

+Definition at line 55 of file tss.h. +

+Referenced by _int8(), biosCall(), execFile(), execThread(), fork_copyProcess(), and idt_init(). +

+

+ +

+
+ + + + +
short tssStruct::es_reserved
+
+
+ +

+ +

+Definition at line 56 of file tss.h. +

+

+ +

+
+ + + + +
long tssStruct::esi
+
+
+ +

+ +

+Definition at line 53 of file tss.h. +

+Referenced by biosCall(), execFile(), execThread(), fork_copyProcess(), and idt_init(). +

+

+ +

+
+ + + + +
long tssStruct::esp
+
+
+ +

+ +

+Definition at line 51 of file tss.h. +

+Referenced by _int13(), _int8(), biosCall(), execFile(), execThread(), fork_copyProcess(), and idt_init(). +

+

+ +

+
+ + + + +
long tssStruct::esp0
+
+
+ +

+ +

+Definition at line 38 of file tss.h. +

+Referenced by biosCall(), execFile(), execThread(), fork_copyProcess(), idt_init(), and sysExec(). +

+

+ +

+
+ + + + +
long tssStruct::esp1
+
+
+ +

+ +

+Definition at line 41 of file tss.h. +

+Referenced by biosCall(), execFile(), execThread(), fork_copyProcess(), and idt_init(). +

+

+ +

+
+ + + + +
long tssStruct::esp2
+
+
+ +

+ +

+Definition at line 44 of file tss.h. +

+Referenced by biosCall(), execFile(), execThread(), fork_copyProcess(), and idt_init(). +

+

+ +

+
+ + + + +
short tssStruct::fs
+
+
+ +

+ +

+Definition at line 63 of file tss.h. +

+Referenced by _int8(), biosCall(), execFile(), execThread(), fork_copyProcess(), and idt_init(). +

+

+ +

+
+ + + + +
short tssStruct::fs_reserved
+
+
+ +

+ +

+Definition at line 64 of file tss.h. +

+

+ +

+
+ + + + +
short tssStruct::gs
+
+
+ +

+ +

+Definition at line 65 of file tss.h. +

+Referenced by _int8(), biosCall(), execFile(), execThread(), fork_copyProcess(), and idt_init(). +

+

+ +

+
+ + + + +
short tssStruct::gs_reserved
+
+
+ +

+ +

+Definition at line 66 of file tss.h. +

+

+ +

+
+ + + + +
short tssStruct::io_map
+
+
+ +

+ +

+Definition at line 70 of file tss.h. +

+Referenced by _int8(), biosCall(), execFile(), execThread(), fork_copyProcess(), and idt_init(). +

+

+ +

+
+ + + + +
char tssStruct::io_space[8192]
+
+
+ +

+ +

+Definition at line 71 of file tss.h. +

+

+ +

+
+ + + + +
short tssStruct::ldt
+
+
+ +

+ +

+Definition at line 67 of file tss.h. +

+Referenced by biosCall(), execFile(), execThread(), fork_copyProcess(), and idt_init(). +

+

+ +

+
+ + + + +
short tssStruct::ldt_reserved
+
+
+ +

+ +

+Definition at line 68 of file tss.h. +

+

+ +

+
+ + + + +
short tssStruct::ss
+
+
+ +

+ +

+Definition at line 59 of file tss.h. +

+Referenced by _int13(), _int8(), biosCall(), execFile(), execThread(), fork_copyProcess(), and idt_init(). +

+

+ +

+
+ + + + +
short tssStruct::ss0
+
+
+ +

+ +

+Definition at line 39 of file tss.h. +

+Referenced by biosCall(), execFile(), execThread(), fork_copyProcess(), and idt_init(). +

+

+ +

+
+ + + + +
short tssStruct::ss0_reserved
+
+
+ +

+ +

+Definition at line 40 of file tss.h. +

+

+ +

+
+ + + + +
short tssStruct::ss1
+
+
+ +

+ +

+Definition at line 42 of file tss.h. +

+Referenced by biosCall(), execFile(), execThread(), fork_copyProcess(), and idt_init(). +

+

+ +

+
+ + + + +
short tssStruct::ss1_reserved
+
+
+ +

+ +

+Definition at line 43 of file tss.h. +

+

+ +

+
+ + + + +
short tssStruct::ss2
+
+
+ +

+ +

+Definition at line 45 of file tss.h. +

+Referenced by biosCall(), execFile(), execThread(), fork_copyProcess(), and idt_init(). +

+

+ +

+
+ + + + +
short tssStruct::ss2_reserved
+
+
+ +

+ +

+Definition at line 46 of file tss.h. +

+

+ +

+
+ + + + +
short tssStruct::ss_reserved
+
+
+ +

+ +

+Definition at line 60 of file tss.h. +

+

+ +

+
+ + + + +
short tssStruct::trace_bitmap
+
+
+ +

+ +

+Definition at line 69 of file tss.h. +

+Referenced by biosCall(), execFile(), execThread(), fork_copyProcess(), and idt_init(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:15 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structtty__termNode.html b/doc/html/structtty__termNode.html new file mode 100644 index 0000000..6a98b15 --- /dev/null +++ b/doc/html/structtty__termNode.html @@ -0,0 +1,219 @@ + + +UbixOS V2: tty_termNode Struct Reference + + + + +
+
+
+
+

tty_termNode Struct Reference

#include <tty.h> +

+


Detailed Description

+ +

+ +

+Definition at line 37 of file tty.h. + + + + + + + + + + + + + + + + + + +

Data Fields

pidType owner
char stdin [512]
int stdinSize
char * tty_buffer
uInt8 tty_colour
char * tty_pointer
uInt16 tty_x
uInt16 tty_y
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 43 of file tty.h. +

+Referenced by execFile(), and fork_copyProcess(). +

+

+ +

+
+ + + + +
char tty_termNode::stdin[512]
+
+
+ +

+ +

+Definition at line 44 of file tty.h. +

+Referenced by getch(), and keyboardHandler(). +

+

+ +

+
+ + + + +
int tty_termNode::stdinSize
+
+
+ +

+ +

+Definition at line 45 of file tty.h. +

+Referenced by getch(), and keyboardHandler(). +

+

+ +

+
+ + + + +
char* tty_termNode::tty_buffer
+
+
+ +

+ +

+Definition at line 38 of file tty.h. +

+Referenced by tty_change(), and tty_init(). +

+

+ +

+ +
+ +

+ +

+Definition at line 40 of file tty.h. +

+Referenced by tty_init(), and tty_print(). +

+

+ +

+
+ + + + +
char* tty_termNode::tty_pointer
+
+
+ +

+ +

+Definition at line 39 of file tty.h. +

+Referenced by tty_change(), tty_init(), and tty_print(). +

+

+ +

+ +
+ +

+ +

+Definition at line 41 of file tty.h. +

+Referenced by backSpace(), tty_change(), tty_init(), and tty_print(). +

+

+ +

+ +
+ +

+ +

+Definition at line 42 of file tty.h. +

+Referenced by backSpace(), tty_change(), tty_init(), and tty_print(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:15 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structubixDiskLabel.html b/doc/html/structubixDiskLabel.html new file mode 100644 index 0000000..ae2ea62 --- /dev/null +++ b/doc/html/structubixDiskLabel.html @@ -0,0 +1,153 @@ + + +UbixOS V2: ubixDiskLabel Struct Reference + + + + +
+
+
+
+

ubixDiskLabel Struct Reference

#include <ubixfs.h> +

+


Detailed Description

+ +

+ +

+Definition at line 71 of file ubixfs.h. + + + + + + + + + + + + + + + +

Data Fields

uInt16 driveType
uInt32 magicNum
uInt32 magicNum2
uInt16 numPartitions
ubixDiskLabel::ubixPartitions partitions [MAXUBIXPARTITIONS]

Data Structures

struct  ubixPartitions
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 74 of file ubixfs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 72 of file ubixfs.h. +

+Referenced by ubixfs_initialize(). +

+

+ +

+ +
+ +

+ +

+Definition at line 73 of file ubixfs.h. +

+Referenced by ubixfs_initialize(). +

+

+ +

+ +
+ +

+ +

+Definition at line 75 of file ubixfs.h. +

+

+ +

+
+ + + + +
struct ubixDiskLabel::ubixPartitions ubixDiskLabel::partitions[MAXUBIXPARTITIONS]
+
+
+ +

+ +

+Referenced by syncBat(), ubixfs_initialize(), and ubixFSUnlink(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:15 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structubixDiskLabel_1_1ubixPartitions.html b/doc/html/structubixDiskLabel_1_1ubixPartitions.html new file mode 100644 index 0000000..bf6b01d --- /dev/null +++ b/doc/html/structubixDiskLabel_1_1ubixPartitions.html @@ -0,0 +1,169 @@ + + +UbixOS V2: ubixDiskLabel::ubixPartitions Struct Reference + + + + +
+
+
+
+ +

ubixDiskLabel::ubixPartitions Struct Reference

#include <ubixfs.h> +

+


Detailed Description

+ +

+ +

+Definition at line 76 of file ubixfs.h. + + + + + + + + + + + + + + +

Data Fields

uInt32 pBatSize
uInt8 pFrag
uInt32 pFsSize
uInt8 pFsType
uInt32 pOffset
uInt32 pSize
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 80 of file ubixfs.h. +

+Referenced by ubixfs_initialize(). +

+

+ +

+ +
+ +

+ +

+Definition at line 82 of file ubixfs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 79 of file ubixfs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 81 of file ubixfs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 78 of file ubixfs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 77 of file ubixfs.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:15 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structubixFSInfo.html b/doc/html/structubixFSInfo.html new file mode 100644 index 0000000..4df86cf --- /dev/null +++ b/doc/html/structubixFSInfo.html @@ -0,0 +1,135 @@ + + +UbixOS V2: ubixFSInfo Struct Reference + + + + +
+
+
+
+

ubixFSInfo Struct Reference

#include <ubixfs.h> +

+


Detailed Description

+ +

+ +

+Definition at line 130 of file ubixfs.h. + + + + + + + + + + +

Data Fields

uInt32 batEntries
blockAllocationTableEntryblockAllocationTable
cacheNodedirCache
uInt32 rootDir
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 133 of file ubixfs.h. +

+Referenced by getFreeBlocks(), and ubixfs_initialize(). +

+

+ +

+ + +

+ +

+
+ + + + +
struct cacheNode* ubixFSInfo::dirCache
+
+
+ +

+ +

+Definition at line 132 of file ubixfs.h. +

+Referenced by openFileUbixFS(), and ubixfs_initialize(). +

+

+ +

+ +
+ +

+ +

+Definition at line 134 of file ubixfs.h. +

+Referenced by ubixfs_initialize(), and ubixFSUnlink(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:15 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structubixfsInode.html b/doc/html/structubixfsInode.html new file mode 100644 index 0000000..3d5fb62 --- /dev/null +++ b/doc/html/structubixfsInode.html @@ -0,0 +1,425 @@ + + +UbixOS V2: ubixfsInode Struct Reference + + + + +
+
+
+
+

ubixfsInode Struct Reference

#include <ubixfs.h> +

+


Detailed Description

+ +

+ +

+Definition at line 110 of file ubixfs.h. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

char smallData[3200] __attribute__ ((packed))
uInt32 refCount __attribute__ ((packed))
dataStream blocks __attribute__ ((packed))
uPtr data __attribute__ ((packed))
uPtr prev __attribute__ ((packed))
uPtr next __attribute__ ((packed))
uPtr parent __attribute__ ((packed))
uInt32 inodeSize __attribute__ ((packed))
uInt32 type __attribute__ ((packed))
inodeAddr attributes __attribute__ ((packed))
int32 flags __attribute__ ((packed))
int32 mode __attribute__ ((packed))
gid_t gid __attribute__ ((packed))
uid_t uid __attribute__ ((packed))
char name[MAX_FILENAME_LENGTH] __attribute__ ((packed))
inodeAddr inodeNum __attribute__ ((packed))
int32 magic1 __attribute__ ((packed))
+


Member Function Documentation

+ +
+
+ + + + + + + + + +
char smallData [3200] ubixfsInode::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt32 refCount ubixfsInode::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
dataStream blocks ubixfsInode::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uPtr data ubixfsInode::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uPtr prev ubixfsInode::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uPtr next ubixfsInode::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uPtr parent ubixfsInode::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt32 inodeSize ubixfsInode::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt32 type ubixfsInode::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
inodeAddr attributes ubixfsInode::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
int32 flags ubixfsInode::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
int32 mode ubixfsInode::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
gid_t gid ubixfsInode::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uid_t uid ubixfsInode::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
char name [MAX_FILENAME_LENGTH] ubixfsInode::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
inodeAddr inodeNum ubixfsInode::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
int32 magic1 ubixfsInode::__attribute__ ((packed  ) 
+
+
+ +

+ +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:15 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structubthread.html b/doc/html/structubthread.html new file mode 100644 index 0000000..b8eebdf --- /dev/null +++ b/doc/html/structubthread.html @@ -0,0 +1,70 @@ + + +UbixOS V2: ubthread Struct Reference + + + + +
+
+
+
+

ubthread Struct Reference

#include <ubthread.h> +

+


Detailed Description

+ +

+ +

+Definition at line 46 of file ubthread.h. + + + + +

Data Fields

kTask_ttask
+


Field Documentation

+ +
+
+ + + + +
kTask_t* ubthread::task
+
+
+ +

+ +

+Definition at line 47 of file ubthread.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:15 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structubthread__cond.html b/doc/html/structubthread__cond.html new file mode 100644 index 0000000..d372855 --- /dev/null +++ b/doc/html/structubthread__cond.html @@ -0,0 +1,93 @@ + + +UbixOS V2: ubthread_cond Struct Reference + + + + +
+
+
+
+

ubthread_cond Struct Reference

#include <ubthread.h> +

+


Detailed Description

+ +

+ +

+Definition at line 50 of file ubthread.h. + + + + + + +

Data Fields

int id
uInt8 locked
+


Field Documentation

+ +
+
+ + + + +
int ubthread_cond::id
+
+
+ +

+ +

+Definition at line 51 of file ubthread.h. +

+Referenced by ubthread_cond_init(). +

+

+ +

+ +
+ +

+ +

+Definition at line 52 of file ubthread.h. +

+Referenced by ubthread_cond_init(), ubthread_cond_signal(), ubthread_cond_timedwait(), and ubthread_cond_wait(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:15 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structubthread__cond__list.html b/doc/html/structubthread__cond__list.html new file mode 100644 index 0000000..0d4966d --- /dev/null +++ b/doc/html/structubthread__cond__list.html @@ -0,0 +1,89 @@ + + +UbixOS V2: ubthread_cond_list Struct Reference + + + + +
+
+
+
+

ubthread_cond_list Struct Reference

#include <ubthread.h> +

+


Detailed Description

+ +

+ +

+Definition at line 66 of file ubthread.h. + + + + + + +

Data Fields

ubthread_cond_tcond
ubthread_cond_listnext
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 68 of file ubthread.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 67 of file ubthread.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:15 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structubthread__list.html b/doc/html/structubthread__list.html new file mode 100644 index 0000000..2ed7c69 --- /dev/null +++ b/doc/html/structubthread__list.html @@ -0,0 +1,89 @@ + + +UbixOS V2: ubthread_list Struct Reference + + + + +
+
+
+
+

ubthread_list Struct Reference

#include <ubthread.h> +

+


Detailed Description

+ +

+ +

+Definition at line 61 of file ubthread.h. + + + + + + +

Data Fields

ubthread_listnext
ubthread_t thread
+


Field Documentation

+ +
+
+ + + + +
struct ubthread_list* ubthread_list::next
+
+
+ +

+ +

+Definition at line 62 of file ubthread.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 63 of file ubthread.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:15 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structubthread__mutex.html b/doc/html/structubthread__mutex.html new file mode 100644 index 0000000..5d4631b --- /dev/null +++ b/doc/html/structubthread__mutex.html @@ -0,0 +1,114 @@ + + +UbixOS V2: ubthread_mutex Struct Reference + + + + +
+
+
+
+

ubthread_mutex Struct Reference

#include <ubthread.h> +

+


Detailed Description

+ +

+ +

+Definition at line 55 of file ubthread.h. + + + + + + + + +

Data Fields

int id
uInt8 locked
pidType pid
+


Field Documentation

+ +
+
+ + + + +
int ubthread_mutex::id
+
+
+ +

+ +

+Definition at line 56 of file ubthread.h. +

+Referenced by ubthread_mutex_init(). +

+

+ +

+ + +

+ +

+ +
+ +

+ +

+Definition at line 58 of file ubthread.h. +

+Referenced by ubthread_mutex_lock(), and ubthread_mutex_unlock(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:15 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structubthread__mutex__list.html b/doc/html/structubthread__mutex__list.html new file mode 100644 index 0000000..719cd38 --- /dev/null +++ b/doc/html/structubthread__mutex__list.html @@ -0,0 +1,89 @@ + + +UbixOS V2: ubthread_mutex_list Struct Reference + + + + +
+
+
+
+

ubthread_mutex_list Struct Reference

#include <ubthread.h> +

+


Detailed Description

+ +

+ +

+Definition at line 71 of file ubthread.h. + + + + + + +

Data Fields

ubthread_mutex_tmutex
ubthread_mutex_listnext
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 73 of file ubthread.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 72 of file ubthread.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:15 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structudp__hdr.html b/doc/html/structudp__hdr.html new file mode 100644 index 0000000..dcbf7d1 --- /dev/null +++ b/doc/html/structudp__hdr.html @@ -0,0 +1,139 @@ + + +UbixOS V2: udp_hdr Struct Reference + + + + +
+
+
+
+

udp_hdr Struct Reference

#include <udp.h> +

+


Detailed Description

+ +

+ +

+Definition at line 50 of file udp.h. + + + + + + + + + + +

Public Member Functions

 PACK_STRUCT_FIELD (uInt16 chksum)
 PACK_STRUCT_FIELD (uInt16 len)
 PACK_STRUCT_FIELD (uInt16 dest)
 PACK_STRUCT_FIELD (uInt16 src)
+


Member Function Documentation

+ +
+
+ + + + + + + + + +
udp_hdr::PACK_STRUCT_FIELD (uInt16  chksum  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
udp_hdr::PACK_STRUCT_FIELD (uInt16  len  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
udp_hdr::PACK_STRUCT_FIELD (uInt16  dest  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
udp_hdr::PACK_STRUCT_FIELD (uInt16  src  ) 
+
+
+ +

+ +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:15 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structudp__pcb.html b/doc/html/structudp__pcb.html new file mode 100644 index 0000000..4a3de9b --- /dev/null +++ b/doc/html/structudp__pcb.html @@ -0,0 +1,209 @@ + + +UbixOS V2: udp_pcb Struct Reference + + + + +
+
+
+
+

udp_pcb Struct Reference

#include <udp.h> +

+


Detailed Description

+ +

+ +

+Definition at line 60 of file udp.h. + + + + + + + + + + + + + + + + + + +

Data Fields

uInt16 chksum_len
uInt8 flags
uInt16 local_port
udp_pcbnext
void(* recv )(void *arg, struct udp_pcb *pcb, struct pbuf *p, struct ip_addr *addr, uInt16 port)
void * recv_arg
ip_addr local_ip remote_ip
uInt16 remote_port
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 67 of file udp.h. +

+

+ +

+
+ + + + +
uInt8 udp_pcb::flags
+
+
+ +

+ +

+Definition at line 66 of file udp.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 64 of file udp.h. +

+Referenced by netconn_addr(). +

+

+ +

+
+ + + + +
struct udp_pcb* udp_pcb::next
+
+
+ +

+ +

+Definition at line 61 of file udp.h. +

+

+ +

+
+ + + + +
void(* udp_pcb::recv)(void *arg, struct udp_pcb *pcb, struct pbuf *p, struct ip_addr *addr, uInt16 port)
+
+
+ +

+ +

+

+ +

+
+ + + + +
void* udp_pcb::recv_arg
+
+
+ +

+ +

+Definition at line 71 of file udp.h. +

+Referenced by do_delconn(). +

+

+ +

+
+ + + + +
struct ip_addr local_ip udp_pcb::remote_ip
+
+
+ +

+ +

+Definition at line 63 of file udp.h. +

+Referenced by netconn_peer(). +

+

+ +

+ +
+ +

+ +

+Definition at line 64 of file udp.h. +

+Referenced by netconn_peer(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:15 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structufs1__dinode.html b/doc/html/structufs1__dinode.html new file mode 100644 index 0000000..1fbb040 --- /dev/null +++ b/doc/html/structufs1__dinode.html @@ -0,0 +1,412 @@ + + +UbixOS V2: ufs1_dinode Struct Reference + + + + +
+
+
+
+

ufs1_dinode Struct Reference

#include <ufs.h> +

+


Detailed Description

+ +

+ +

+Definition at line 150 of file ufs.h. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Fields

int32_t di_atime
int32_t di_atimensec
int32_t di_blocks
int32_t di_ctime
int32_t di_ctimensec
ufs1_daddr_t di_db [NDADDR]
u_int32_t di_flags
int32_t di_gen
u_int32_t di_gid
ufs1_daddr_t di_ib [NIADDR]
u_int16_t di_mode
int32_t di_mtime
int32_t di_mtimensec
int16_t di_nlink
u_int64_t di_size
int32_t di_spare [2]
union {
   u_int16_t   oldids [2]
di_u
u_int32_t di_uid
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 157 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 158 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 166 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 161 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 162 of file ufs.h. +

+

+ +

+
+ + + + +
ufs1_daddr_t ufs1_dinode::di_db[NDADDR]
+
+
+ +

+ +

+Definition at line 163 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 165 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 167 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 169 of file ufs.h. +

+

+ +

+
+ + + + +
ufs1_daddr_t ufs1_dinode::di_ib[NIADDR]
+
+
+ +

+ +

+Definition at line 164 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 151 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 159 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 160 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 152 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 156 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 170 of file ufs.h. +

+

+ +

+
+ + + + +
union { ... } ufs1_dinode::di_u
+
+
+ +

+ +

+

+ +

+ +
+ +

+ +

+Definition at line 168 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 154 of file ufs.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:15 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structufs2__dinode.html b/doc/html/structufs2__dinode.html new file mode 100644 index 0000000..035758e --- /dev/null +++ b/doc/html/structufs2__dinode.html @@ -0,0 +1,494 @@ + + +UbixOS V2: ufs2_dinode Struct Reference + + + + +
+
+
+
+

ufs2_dinode Struct Reference

#include <ufs.h> +

+


Detailed Description

+ +

+ +

+Definition at line 124 of file ufs.h. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Fields

ufs_time_t di_atime
int32_t di_atimensec
int32_t di_birthnsec
ufs_time_t di_birthtime
u_int32_t di_blksize
u_int64_t di_blocks
ufs_time_t di_ctime
int32_t di_ctimensec
ufs2_daddr_t di_db [NDADDR]
ufs2_daddr_t di_extb [NXADDR]
int32_t di_extsize
u_int32_t di_flags
int32_t di_gen
u_int32_t di_gid
ufs2_daddr_t di_ib [NIADDR]
u_int32_t di_kernflags
u_int16_t di_mode
ufs_time_t di_mtime
int32_t di_mtimensec
int16_t di_nlink
u_int64_t di_size
int64_t di_spare [3]
u_int32_t di_uid
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 132 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 137 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 139 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 135 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 129 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 131 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 134 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 138 of file ufs.h. +

+

+ +

+
+ + + + +
ufs2_daddr_t ufs2_dinode::di_db[NDADDR]
+
+
+ +

+ +

+Definition at line 145 of file ufs.h. +

+Referenced by fsread(). +

+

+ +

+
+ + + + +
ufs2_daddr_t ufs2_dinode::di_extb[NXADDR]
+
+
+ +

+ +

+Definition at line 144 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 143 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 142 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 140 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 128 of file ufs.h. +

+

+ +

+
+ + + + +
ufs2_daddr_t ufs2_dinode::di_ib[NIADDR]
+
+
+ +

+ +

+Definition at line 146 of file ufs.h. +

+Referenced by fsread(). +

+

+ +

+ +
+ +

+ +

+Definition at line 141 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 125 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 133 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 136 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 126 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 130 of file ufs.h. +

+Referenced by fsread(). +

+

+ +

+ +
+ +

+ +

+Definition at line 147 of file ufs.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 127 of file ufs.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:15 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structuserFileDescriptorStruct.html b/doc/html/structuserFileDescriptorStruct.html new file mode 100644 index 0000000..577d201 --- /dev/null +++ b/doc/html/structuserFileDescriptorStruct.html @@ -0,0 +1,93 @@ + + +UbixOS V2: userFileDescriptorStruct Struct Reference + + + + +
+
+
+
+

userFileDescriptorStruct Struct Reference

#include <file.h> +

+


Detailed Description

+ +

+ +

+Definition at line 67 of file file.h. + + + + + + +

Data Fields

fileDescriptorStructfd
uInt32 fdSize
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 68 of file file.h. +

+Referenced by sysFclose(), sysFgetc(), sysFopen(), sysFread(), sysFseek(), and sysFwrite(). +

+

+ +

+ +
+ +

+ +

+Definition at line 69 of file file.h. +

+Referenced by sysFopen(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:15 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structvfs__mountPoint.html b/doc/html/structvfs__mountPoint.html new file mode 100644 index 0000000..0d0c594 --- /dev/null +++ b/doc/html/structvfs__mountPoint.html @@ -0,0 +1,240 @@ + + +UbixOS V2: vfs_mountPoint Struct Reference + + + + +
+
+
+
+

vfs_mountPoint Struct Reference

#include <mount.h> +

+


Detailed Description

+ +

+ +

+Definition at line 35 of file mount.h. + + + + + + + + + + + + + + + + + + + + +

Data Fields

device_nodedevice
ubixDiskLabeldiskLabel
fileSystemfs
void * fsInfo
char mountPoint [1024]
vfs_mountPointnext
int partition
char perms
vfs_mountPointprev
+


Field Documentation

+ +
+
+ + + + +
struct device_node* vfs_mountPoint::device
+
+
+ +

+ +

+Definition at line 39 of file mount.h. +

+Referenced by syncBat(), ubixfs_initialize(), ubixFSUnlink(), and vfs_mount(). +

+

+ +

+ +
+ +

+ +

+Definition at line 40 of file mount.h. +

+Referenced by syncBat(), ubixfs_initialize(), and ubixFSUnlink(). +

+

+ +

+
+ + + + +
struct fileSystem* vfs_mountPoint::fs
+
+
+ +

+ +

+Definition at line 38 of file mount.h. +

+Referenced by unlink(), and vfs_mount(). +

+

+ +

+
+ + + + +
void* vfs_mountPoint::fsInfo
+
+
+ +

+ +

+Definition at line 41 of file mount.h. +

+Referenced by devfs_initialize(), devfs_makeNode(), syncBat(), ubixfs_initialize(), and ubixFSUnlink(). +

+

+ +

+
+ + + + +
char vfs_mountPoint::mountPoint[1024]
+
+
+ +

+ +

+Definition at line 43 of file mount.h. +

+Referenced by vfs_findMount(), and vfs_mount(). +

+

+ +

+ +
+ +

+ +

+Definition at line 37 of file mount.h. +

+Referenced by vfs_addMount(), and vfs_findMount(). +

+

+ +

+
+ + + + +
int vfs_mountPoint::partition
+
+
+ +

+ +

+Definition at line 42 of file mount.h. +

+Referenced by syncBat(), ubixfs_initialize(), ubixFSUnlink(), and vfs_mount(). +

+

+ +

+
+ + + + +
char vfs_mountPoint::perms
+
+
+ +

+ +

+Definition at line 44 of file mount.h. +

+Referenced by vfs_mount(). +

+

+ +

+ +
+ +

+ +

+Definition at line 36 of file mount.h. +

+Referenced by vfs_addMount(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structvitalsStruct.html b/doc/html/structvitalsStruct.html new file mode 100644 index 0000000..4163dda --- /dev/null +++ b/doc/html/structvitalsStruct.html @@ -0,0 +1,320 @@ + + +UbixOS V2: vitalsStruct Struct Reference + + + + +
+
+
+
+

vitalsStruct Struct Reference

#include <vitals.h> +

+


Detailed Description

+ +

+ +

+Definition at line 38 of file vitals.h. + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Fields

uInt32 dQuantum
fileSystemfileSystems
void * font
uInt32 freePages
vfs_mountPoint_tmountPoints
uInt32 openFiles
char * packet
uInt32 packetLength
uInt32 quantum
void * screen
uInt32 sysTicks
uInt32 sysUptime
uInt32 timeStart
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 43 of file vitals.h. +

+Referenced by vitals_init(). +

+

+ +

+ +
+ +

+ +

+Definition at line 45 of file vitals.h. +

+Referenced by vfs_init(), vfsFindFS(), and vfsRegisterFS(). +

+

+ +

+
+ + + + +
void* vitalsStruct::font
+
+
+ +

+ +

+Definition at line 49 of file vitals.h. +

+Referenced by ogPrintf(). +

+

+ +

+ +
+ +

+ +

+Definition at line 44 of file vitals.h. +

+Referenced by adjustCowCounter(), freePage(), keyboardHandler(), kmain(), systemTask(), vmmFindFreePage(), and vmmFreeProcessPages(). +

+

+ +

+ +
+ +

+ +

+Definition at line 46 of file vitals.h. +

+Referenced by vfs_addMount(), and vfs_findMount(). +

+

+ +

+ +
+ +

+ +

+Definition at line 39 of file vitals.h. +

+Referenced by fclose(), and fopen(). +

+

+ +

+
+ + + + +
char* vitalsStruct::packet
+
+
+ +

+ +

+Definition at line 50 of file vitals.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 51 of file vitals.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 42 of file vitals.h. +

+Referenced by vitals_init(). +

+

+ +

+
+ + + + +
void* vitalsStruct::screen
+
+
+ +

+ +

+Definition at line 48 of file vitals.h. +

+Referenced by ogPrintf(). +

+

+ +

+ +
+ +

+ +

+Definition at line 40 of file vitals.h. +

+Referenced by sysGetUptime(), and systemTask(). +

+

+ +

+ +
+ +

+ +

+Definition at line 41 of file vitals.h. +

+Referenced by sysGetTime(), systemTask(), and ubthread_cond_timedwait(). +

+

+ +

+ +
+ +

+ +

+Definition at line 47 of file vitals.h. +

+Referenced by sysGetTime(), and time_init(). +

+

+


The documentation for this struct was generated from the following file: +
Generated on Fri Dec 1 14:04:32 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/structwrite__args.html b/doc/html/structwrite__args.html new file mode 100644 index 0000000..985e6dc --- /dev/null +++ b/doc/html/structwrite__args.html @@ -0,0 +1,228 @@ + + +UbixOS V2: write_args Struct Reference + + + + +
+
+
+
+

write_args Struct Reference

#include <sysproto.h> +

+


Detailed Description

+ +

+ +

+Definition at line 49 of file sysproto.h. + + + + + + + + + + + + + + + + + + + + +

Data Fields

const void * buf
char buf_l_ [PADL_(const void *)]
char buf_r_ [PADR_(const void *)]
int fd
char fd_l_ [PADL_(int)]
char fd_r_ [PADR_(int)]
size_t nbyte
char nbyte_l_ [PADL_(size_t)]
char nbyte_r_ [PADR_(size_t)]
+


Field Documentation

+ +
+
+ + + + +
const void* write_args::buf
+
+
+ +

+ +

+Definition at line 51 of file sysproto.h. +

+Referenced by sys_write(). +

+

+ +

+
+ + + + +
char write_args::buf_l_[PADL_(const void *)]
+
+
+ +

+ +

+Definition at line 51 of file sysproto.h. +

+

+ +

+
+ + + + +
char write_args::buf_r_[PADR_(const void *)]
+
+
+ +

+ +

+Definition at line 51 of file sysproto.h. +

+

+ +

+
+ + + + +
int write_args::fd
+
+
+ +

+ +

+Definition at line 50 of file sysproto.h. +

+Referenced by sys_write(). +

+

+ +

+
+ + + + +
char write_args::fd_l_[PADL_(int)]
+
+
+ +

+ +

+Definition at line 50 of file sysproto.h. +

+

+ +

+
+ + + + +
char write_args::fd_r_[PADR_(int)]
+
+
+ +

+ +

+Definition at line 50 of file sysproto.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 52 of file sysproto.h. +

+Referenced by sys_write(). +

+

+ +

+
+ + + + +
char write_args::nbyte_l_[PADL_(size_t)]
+
+
+ +

+ +

+Definition at line 52 of file sysproto.h. +

+

+ +

+
+ + + + +
char write_args::nbyte_r_[PADR_(size_t)]
+
+
+ +

+ +

+Definition at line 52 of file sysproto.h. +

+

+


The documentation for this struct was generated from the following file: +
Generated on Sun Dec 3 02:38:16 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/sys_8h-source.html b/doc/html/sys_8h-source.html new file mode 100644 index 0000000..c33a688 --- /dev/null +++ b/doc/html/sys_8h-source.html @@ -0,0 +1,131 @@ + + +UbixOS V2: src/sys/include/net/sys.h Source File + + + + +
+
+
+
+ +

sys.h

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 #ifndef __LWIP_SYS_H__
+00036 #define __LWIP_SYS_H__
+00037 
+00038 #include "arch/cc.h"
+00039 #include "arch/sys_arch.h"
+00040 
+00041 typedef void (* sys_timeout_handler)(void *arg);
+00042 
+00043 struct sys_timeout {
+00044   struct sys_timeout *next;
+00045   uInt16 time;
+00046   sys_timeout_handler h;
+00047   void *arg;
+00048 };
+00049 
+00050 struct sys_timeouts {
+00051   struct sys_timeout *next;
+00052 };
+00053 
+00054 /* sys_init() must be called before anthing else. */
+00055 void sys_init(void);
+00056 
+00057 /*
+00058  * sys_timeout():
+00059  *
+00060  * Schedule a timeout a specified amount of milliseconds in the
+00061  * future. When the timeout occurs, the specified timeout handler will
+00062  * be called. The handler will be passed the "arg" argument when
+00063  * called.
+00064  *
+00065  */
+00066 void sys_timeout(uInt16 msecs, sys_timeout_handler h, void *arg);
+00067 struct sys_timeouts *sys_arch_timeouts(void);
+00068 
+00069 /* Semaphore functions. */
+00070 sys_sem_t sys_sem_new(uInt8 count);
+00071 void sys_sem_signal(sys_sem_t sem);
+00072 uInt16 sys_arch_sem_wait(sys_sem_t sem, uInt16 timeout);
+00073 void sys_sem_free(sys_sem_t sem);
+00074 
+00075 void sys_sem_wait(sys_sem_t sem);
+00076 
+00077 /* Mailbox functions. */
+00078 sys_mbox_t sys_mbox_new(void);
+00079 void sys_mbox_post(sys_mbox_t mbox, void *msg);
+00080 uInt16 sys_arch_mbox_fetch(sys_mbox_t mbox, void **msg, uInt16 timeout);
+00081 void sys_mbox_free(sys_mbox_t mbox);
+00082 
+00083 void sys_mbox_fetch(sys_mbox_t mbox, void **msg);
+00084 
+00085 /* Thread functions. */
+00086 //void sys_thread_new(void (* thread)(void *arg), void *arg);
+00087 void sys_thread_new(void (* function)(void), void *arg);
+00088 
+00089 /* The following functions are used only in Unix code, and
+00090    can be omitted when porting the stack. */
+00091 /* Returns the current time in microseconds. */
+00092 unsigned long sys_now(void);
+00093 
+00094 #endif /* __LWIP_SYS_H__ */
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/sys_8h.html b/doc/html/sys_8h.html new file mode 100644 index 0000000..021b8ff --- /dev/null +++ b/doc/html/sys_8h.html @@ -0,0 +1,516 @@ + + +UbixOS V2: src/sys/include/net/sys.h File Reference + + + + +
+
+
+
+ +

sys.h File Reference

+

+#include "arch/cc.h"
+#include "arch/sys_arch.h"
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  sys_timeout
struct  sys_timeouts

Typedefs

typedef void(*) sys_timeout_handler (void *arg)

Functions

uInt16 sys_arch_mbox_fetch (sys_mbox_t mbox, void **msg, uInt16 timeout)
uInt16 sys_arch_sem_wait (sys_sem_t sem, uInt16 timeout)
sys_timeoutssys_arch_timeouts (void)
void sys_init (void)
void sys_mbox_fetch (sys_mbox_t mbox, void **msg)
void sys_mbox_free (sys_mbox_t mbox)
sys_mbox_t sys_mbox_new (void)
void sys_mbox_post (sys_mbox_t mbox, void *msg)
unsigned long sys_now (void)
void sys_sem_free (sys_sem_t sem)
sys_sem_t sys_sem_new (uInt8 count)
void sys_sem_signal (sys_sem_t sem)
void sys_sem_wait (sys_sem_t sem)
void sys_thread_new (void(*function)(void), void *arg)
void sys_timeout (uInt16 msecs, sys_timeout_handler h, void *arg)
+


Typedef Documentation

+ +
+
+ + + + +
typedef void(* ) sys_timeout_handler(void *arg)
+
+
+ +

+ +

+Definition at line 41 of file sys.h. +

+

+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
uInt16 sys_arch_mbox_fetch (sys_mbox_t  mbox,
void **  msg,
uInt16  timeout 
)
+
+
+ +

+ +

+Referenced by netconn_delete(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
uInt16 sys_arch_sem_wait (sys_sem_t  sem,
uInt16  timeout 
)
+
+
+ +

+ +

+Referenced by sys_arch_mbox_fetch(). +

+

+ +

+
+ + + + + + + + + +
struct sys_timeouts* sys_arch_timeouts (void   ) 
+
+
+ +

+ +

+Definition at line 409 of file sys_arch.c. +

+References current_thread(), and sys_thread::timeouts. +

+

+ +

+
+ + + + + + + + + +
void sys_init (void   ) 
+
+
+ +

+ +

+Definition at line 404 of file sys_arch.c. +

+References gettimeofday(), and starttime. +

+Referenced by net_init(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void sys_mbox_fetch (sys_mbox_t  mbox,
void **  msg 
)
+
+ +

+ +

+
+ + + + + + + + + +
void sys_mbox_free (sys_mbox_t  mbox  ) 
+
+
+ +

+ +

+Referenced by accept_function(), netconn_delete(), and netconn_recv(). +

+

+ +

+
+ + + + + + + + + +
sys_mbox_t sys_mbox_new (void   ) 
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
void sys_mbox_post (sys_mbox_t  mbox,
void *  msg 
)
+
+ +

+ +

+
+ + + + + + + + + +
unsigned long sys_now (void   ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
void sys_sem_free (sys_sem_t  sem  ) 
+
+
+ +

+ +

+Referenced by netconn_delete(), netconn_write(), and netMainThread(). +

+

+ +

+
+ + + + + + + + + +
sys_sem_t sys_sem_new (uInt8  count  ) 
+
+
+ +

+ +

+Definition at line 295 of file sys_arch.c. +

+References sys_sem_new_(). +

+Referenced by accept_function(), netconn_write(), and netMainThread(). +

+

+ +

+
+ + + + + + + + + +
void sys_sem_signal (sys_sem_t  sem  ) 
+
+ +

+ +

+
+ + + + + + + + + +
void sys_sem_wait (sys_sem_t  sem  ) 
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
void sys_thread_new (void(*)(void)  function,
void *  arg 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void sys_timeout (uInt16  msecs,
sys_timeout_handler  h,
void *  arg 
)
+
+ +

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/sys__arch_8c-source.html b/doc/html/sys__arch_8c-source.html new file mode 100644 index 0000000..5a264d7 --- /dev/null +++ b/doc/html/sys__arch_8c-source.html @@ -0,0 +1,454 @@ + + +UbixOS V2: src/sys/net/net/sys_arch.c Source File + + + + +
+
+
+
+ +

sys_arch.c

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author:     Adam Dunkels      <adam@sics.se>
+00032  * Sub Author: Christopher Olsen <colsen@domaintlantic.com>
+00033  *
+00034  * Notes:
+00035  *  Modified to work with the ubix operating system
+00036  *
+00037  * $Log$
+00038  * Revision 1.1.1.1  2006/06/01 12:46:16  reddawg
+00039  * ubix2
+00040  *
+00041  * Revision 1.2  2005/10/12 00:13:37  reddawg
+00042  * Removed
+00043  *
+00044  * Revision 1.1.1.1  2005/09/26 17:24:31  reddawg
+00045  * no message
+00046  *
+00047  * Revision 1.6  2004/09/11 21:30:37  apwillia
+00048  * Fix race conditions in net thread and scheduler
+00049  *
+00050  * Revision 1.5  2004/09/07 20:58:35  reddawg
+00051  * time to roll back i can't think straight by friday
+00052  *
+00053  * Revision 1.4  2004/05/25 22:49:29  reddawg
+00054  * Stupid Old CODE!!!
+00055  *
+00056  * Revision 1.3  2004/05/19 04:07:43  reddawg
+00057  * kmalloc(size,pid) no more it is no kmalloc(size); the way it should of been
+00058  *
+00059  * Revision 1.2  2004/05/19 03:35:02  reddawg
+00060  * Fixed A Few Ordering Issues In The Service Startup Routine
+00061  *
+00062  * Revision 1.1.1.1  2004/04/15 12:07:14  reddawg
+00063  * UbixOS v1.0
+00064  *
+00065  * Revision 1.13  2004/04/13 21:29:53  reddawg
+00066  * We now have sockets working. Lots of functionality to be added to continually
+00067  * improve on the existing layers now its clean up time to get things in a better
+00068  * working order.
+00069  *
+00070  * Revision 1.12  2004/04/13 16:08:07  reddawg
+00071  * Removed all of the old debug code the problem seems to be in ubthreads with
+00072  * ubthread_mutex_init
+00073  *
+00074  * Revision 1.11  2004/04/13 16:05:40  reddawg
+00075  * Function Renaming
+00076  *
+00077  *
+00078  *
+00079  * $Id$
+00080  */
+00081 
+00082 #include <ubixos/types.h>
+00083 #include <ubixos/sched.h>
+00084 #include <ubixos/ubthread.h>
+00085 #include <ubixos/kpanic.h>
+00086 #include <lib/kprintf.h>
+00087 #include <lib/kmalloc.h>
+00088 
+00089 #include "net/debug.h"
+00090 #include "net/sys.h"
+00091 #include "net/opt.h"
+00092 #include "net/stats.h"
+00093 
+00094 #include <ubixos/spinlock.h>
+00095 
+00096 #define UMAX(a, b)      ((a) > (b) ? (a) : (b))
+00097 
+00098 static struct sys_thread *threads = 0x0;
+00099 static spinLock_t netThreadSpinlock = SPIN_LOCK_INITIALIZER;
+00100 
+00101 struct sys_mbox_msg {
+00102   struct sys_mbox_msg *next;
+00103   void *msg;
+00104 };
+00105 
+00106 #define SYS_MBOX_SIZE 100
+00107 
+00108 struct sys_mbox {
+00109   uInt16 first, last;
+00110   void *msgs[SYS_MBOX_SIZE];
+00111   struct sys_sem *mail;
+00112   struct sys_sem *mutex;
+00113 };
+00114 
+00115 struct sys_sem {
+00116   unsigned int c;
+00117   ubthread_cond_t cond;
+00118   ubthread_mutex_t mutex;
+00119 };
+00120 
+00121 struct sys_thread {
+00122   struct sys_thread *next;
+00123   struct sys_timeouts timeouts;
+00124   kTask_t *ubthread;
+00125 };
+00126 
+00127 
+00128 static struct timeval starttime;
+00129 
+00130 static struct sys_sem *sys_sem_new_(uInt8 count);
+00131 static void sys_sem_free_(struct sys_sem *sem);
+00132 
+00133 static uInt16 cond_wait(ubthread_cond_t *cond, ubthread_mutex_t *mutex, uInt16 timeout);
+00134 
+00135 static struct sys_thread *current_thread(void) {
+00136   struct sys_thread *st;
+00137   kTask_t *pt;
+00138   pt = ubthread_self();
+00139   spinLock(&netThreadSpinlock);
+00140   for(st = threads; st != NULL; st = st->next) {
+00141     if(st->ubthread == pt) {
+00142       spinUnlock(&netThreadSpinlock);
+00143       return st;
+00144     }
+00145   }
+00146   spinUnlock(&netThreadSpinlock);
+00147   kprintf("sys: current_thread: could not find current thread!\n");
+00148   kprintf("This is due to a race condition in the LinuxThreads\n");
+00149   kprintf("ubthreads implementation. Start the program again.\n");
+00150   
+00151   kpanic("ABORT");
+00152   return(0x0);
+00153   }
+00154 
+00155 
+00156 struct thread_start_param {
+00157   struct sys_thread *thread;
+00158   void (* function)(void *);
+00159   void *arg;
+00160   };
+00161 
+00162 /*
+00163 static void *thread_start(void *arg) {
+00164   struct thread_start_param *tp = arg;
+00165   tp->thread->ubthread = ubthread_self();
+00166   tp->function(tp->arg);
+00167   kfree(tp);
+00168   return(NULL);
+00169   }
+00170 */
+00171 
+00172 void sys_thread_new(void (* function)(void), void *arg) {
+00173   struct sys_thread *thread = 0x0;
+00174   //struct thread_start_param *thread_param;
+00175   kprintf("sys_thread: [0x%X]\n",sizeof(struct sys_thread));
+00176   
+00177   thread = kmalloc(sizeof(struct sys_thread));
+00178   kprintf("THREAD: [0x%X]\n",thread);
+00179   spinLock(&netThreadSpinlock);
+00180   thread->next = threads;
+00181   thread->timeouts.next = NULL;
+00182   thread->ubthread = 0x0;
+00183   threads = thread;
+00184   spinUnlock(&netThreadSpinlock);
+00185   
+00186 
+00187   /*
+00188   thread_param = kmalloc(sizeof(struct thread_start_param));
+00189   
+00190   thread_param->function = function;
+00191   thread_param->arg = arg;
+00192   thread_param->thread = thread;
+00193   */
+00194   //execThread((void *)function,0x0,0x0);
+00195  
+00196   kprintf("thread->ubthread: [0x%X]\n",thread->ubthread);
+00197   if(ubthread_create(&thread->ubthread, 0x0,(void *)(function), arg) != 0x0) {
+00198     kpanic("sys_thread_new: ubthread_create");
+00199     }
+00200   kprintf("thread->ubthread: [0x%X]\n",thread->ubthread); 
+00201   
+00202   }
+00203 
+00204 struct sys_mbox *sys_mbox_new() {
+00205   struct sys_mbox *mbox;
+00206 
+00207   mbox = kmalloc(sizeof(struct sys_mbox));
+00208   mbox->first = mbox->last = 0;
+00209   mbox->mail = sys_sem_new_(0);
+00210   mbox->mutex = sys_sem_new_(1);
+00211   
+00212   return(mbox);
+00213   }
+00214 
+00215 void sys_mbox_free(struct sys_mbox *mbox) {
+00216   if (mbox != SYS_MBOX_NULL) {
+00217     sys_sem_wait(mbox->mutex);
+00218     
+00219     sys_sem_free_(mbox->mail);
+00220     sys_sem_free_(mbox->mutex);
+00221     mbox->mail = mbox->mutex = NULL;
+00222     //kprintf("sys_mbox_free: mbox 0x%lx\n", mbox);
+00223     kfree(mbox);
+00224     }
+00225   }
+00226 
+00227 void sys_mbox_post(struct sys_mbox *mbox, void *msg) {
+00228   uInt8 first;
+00229   
+00230   sys_sem_wait(mbox->mutex);
+00231   
+00232   //kprintf("sys_mbox_post: mbox %p msg %p\n", mbox, msg);
+00233 
+00234   mbox->msgs[mbox->last] = msg;
+00235 
+00236   if (mbox->last == mbox->first) {
+00237     first = 1;
+00238     }
+00239   else {
+00240     first = 0;
+00241     }
+00242   
+00243   mbox->last++;
+00244   if(mbox->last == SYS_MBOX_SIZE) {
+00245     mbox->last = 0;
+00246     }
+00247 
+00248   if(first) {
+00249     sys_sem_signal(mbox->mail);
+00250     }
+00251   sys_sem_signal(mbox->mutex);
+00252   }
+00253 
+00254 uInt16 sys_arch_mbox_fetch(struct sys_mbox *mbox, void **msg, uInt16 timeout) {
+00255   uInt16 time = 1;
+00256   
+00257   /* The mutex lock is quick so we don't bother with the timeout
+00258      stuff here. */
+00259   sys_arch_sem_wait(mbox->mutex, 0);
+00260   
+00261   while(mbox->first == mbox->last) {
+00262     sys_sem_signal(mbox->mutex);
+00263     
+00264     /* We block while waiting for a mail to arrive in the mailbox. We
+00265        must be prepared to timeout. */
+00266     if(timeout != 0) {
+00267       time = sys_arch_sem_wait(mbox->mail, timeout);
+00268       
+00269       /* If time == 0, the sem_wait timed out, and we return 0. */
+00270       if(time == 0) {
+00271         return 0;
+00272       }
+00273     } else {
+00274       sys_arch_sem_wait(mbox->mail, 0);
+00275     }
+00276     
+00277     sys_arch_sem_wait(mbox->mutex, 0);
+00278   }
+00279   
+00280   if(msg != NULL) {
+00281     //kprintf("sys_mbox_fetch: mbox %p msg %p\n", mbox, *msg);
+00282     *msg = mbox->msgs[mbox->first];
+00283   }
+00284   
+00285   mbox->first++;
+00286   if(mbox->first == SYS_MBOX_SIZE) {
+00287     mbox->first = 0;
+00288   }    
+00289   
+00290   sys_sem_signal(mbox->mutex);
+00291   
+00292   return(time);
+00293   }
+00294 
+00295 struct sys_sem *sys_sem_new(uInt8 count) {
+00296   return sys_sem_new_(count);
+00297   }
+00298 
+00299 static struct sys_sem *sys_sem_new_(uInt8 count) {
+00300   struct sys_sem *sem;
+00301   
+00302   sem = kmalloc(sizeof(struct sys_sem));
+00303   sem->c = count;
+00304   
+00305   ubthread_cond_init(&(sem->cond), NULL);
+00306   ubthread_mutex_init(&(sem->mutex), NULL);
+00307   
+00308   return sem;
+00309   }
+00310 
+00311 static uInt16 cond_wait(ubthread_cond_t *cond, ubthread_mutex_t *mutex, uInt16 timeout) {
+00312   unsigned int tdiff;
+00313   unsigned long sec, usec;
+00314   struct timeval rtime1, rtime2;
+00315   struct timespec ts;
+00316   struct timezone tz;
+00317   int retval;
+00318 
+00319   if (timeout > 0) {
+00320     /* Get a timestamp and add the timeout value. */
+00321     gettimeofday(&rtime1, &tz);
+00322     sec = rtime1.tv_sec;
+00323     usec = rtime1.tv_usec;
+00324     usec += timeout % 1000 * 1000;  
+00325     sec += (int)(timeout / 1000) + (int)(usec / 1000000);
+00326     usec = usec % 1000000;
+00327     ts.tv_nsec = usec * 1000;
+00328     ts.tv_sec = sec;
+00329     
+00330     retval = ubthread_cond_timedwait(cond, mutex, &ts);
+00331     if (retval == ETIMEDOUT) {
+00332       return 0;
+00333       }
+00334     else {
+00335       /* Calculate for how long we waited for the cond. */
+00336       gettimeofday(&rtime2, &tz);
+00337       tdiff = (rtime2.tv_sec - rtime1.tv_sec) * 1000 +  
+00338         (rtime2.tv_usec - rtime1.tv_usec) / 1000;
+00339       if (tdiff == 0) {
+00340         return 1;
+00341         }
+00342       return tdiff;
+00343       }
+00344     }
+00345   else {
+00346     ubthread_cond_wait(cond, mutex);
+00347     return 0;
+00348     }
+00349   }
+00350 
+00351 uInt16 sys_arch_sem_wait(struct sys_sem *sem, uInt16 timeout) {
+00352   uInt16 time = 1;
+00353   ubthread_mutex_lock(&(sem->mutex));
+00354   while(sem->c <= 0) {
+00355     if(timeout > 0) {
+00356       time = cond_wait(&(sem->cond), &(sem->mutex), timeout);
+00357       if(time == 0) {
+00358         ubthread_mutex_unlock(&(sem->mutex));
+00359         return 0;
+00360       }
+00361     } else {
+00362       cond_wait(&(sem->cond), &(sem->mutex), 0);
+00363     }
+00364   }
+00365   sem->c--;
+00366   ubthread_mutex_unlock(&(sem->mutex));
+00367   return(time);
+00368   }
+00369 
+00370 void sys_sem_signal(struct sys_sem *sem) {
+00371   ubthread_mutex_lock(&(sem->mutex));
+00372   sem->c++;
+00373   if(sem->c > 1)
+00374     sem->c = 1;
+00375   ubthread_cond_signal(&(sem->cond));
+00376   ubthread_mutex_unlock(&(sem->mutex));
+00377   }
+00378 
+00379 void sys_sem_free(struct sys_sem *sem) {
+00380   if(sem != SYS_SEM_NULL) {
+00381     sys_sem_free_(sem);
+00382     } 
+00383   }
+00384 
+00385 static void sys_sem_free_(struct sys_sem *sem) {
+00386   ubthread_cond_destroy(&(sem->cond));
+00387   ubthread_mutex_destroy(&(sem->mutex));
+00388   kfree(sem);
+00389   }
+00390 
+00391 unsigned long sys_unix_now() {
+00392   struct timeval tv;
+00393   struct timezone tz;
+00394   long sec, usec;
+00395   unsigned long msec;
+00396   gettimeofday(&tv, &tz);
+00397 
+00398   sec = tv.tv_sec - starttime.tv_sec;
+00399   usec = tv.tv_usec - starttime.tv_usec;
+00400   msec = sec * 1000 + usec / 1000;
+00401   return msec;
+00402   }
+00403 
+00404 void sys_init() {
+00405   struct timezone tz;
+00406   gettimeofday(&starttime, &tz);
+00407   }
+00408 
+00409 struct sys_timeouts *sys_arch_timeouts(void) {
+00410   struct sys_thread *thread;
+00411   thread = current_thread();
+00412   return(&thread->timeouts);
+00413   }
+00414 
+00415 /***
+00416  END
+00417  ***/
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/sys__arch_8c.html b/doc/html/sys__arch_8c.html new file mode 100644 index 0000000..3cb16e3 --- /dev/null +++ b/doc/html/sys__arch_8c.html @@ -0,0 +1,671 @@ + + +UbixOS V2: src/sys/net/net/sys_arch.c File Reference + + + + +
+
+
+
+ +

sys_arch.c File Reference

+

+#include <ubixos/types.h>
+#include <ubixos/sched.h>
+#include <ubixos/ubthread.h>
+#include <ubixos/kpanic.h>
+#include <lib/kprintf.h>
+#include <lib/kmalloc.h>
+#include "net/debug.h"
+#include "net/sys.h"
+#include "net/opt.h"
+#include "net/stats.h"
+#include <ubixos/spinlock.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  sys_mbox
struct  sys_mbox_msg
struct  sys_sem
struct  sys_thread
struct  thread_start_param

Defines

#define SYS_MBOX_SIZE   100
#define UMAX(a, b)   ((a) > (b) ? (a) : (b))

Functions

static uInt16 cond_wait (ubthread_cond_t *cond, ubthread_mutex_t *mutex, uInt16 timeout)
static struct sys_threadcurrent_thread (void)
uInt16 sys_arch_mbox_fetch (struct sys_mbox *mbox, void **msg, uInt16 timeout)
uInt16 sys_arch_sem_wait (struct sys_sem *sem, uInt16 timeout)
sys_timeoutssys_arch_timeouts (void)
void sys_init ()
void sys_mbox_free (struct sys_mbox *mbox)
sys_mboxsys_mbox_new ()
void sys_mbox_post (struct sys_mbox *mbox, void *msg)
void sys_sem_free (struct sys_sem *sem)
static void sys_sem_free_ (struct sys_sem *sem)
sys_semsys_sem_new (uInt8 count)
static struct sys_semsys_sem_new_ (uInt8 count)
void sys_sem_signal (struct sys_sem *sem)
void sys_thread_new (void(*function)(void), void *arg)
unsigned long sys_unix_now ()

Variables

static spinLock_t netThreadSpinlock = SPIN_LOCK_INITIALIZER
static struct timeval starttime
static struct sys_threadthreads = 0x0
+


Define Documentation

+ +
+
+ + + + +
#define SYS_MBOX_SIZE   100
+
+
+ +

+ +

+Definition at line 106 of file sys_arch.c. +

+Referenced by sys_arch_mbox_fetch(), and sys_mbox_post(). +

+

+ +

+
+ + + + + + + + + + + + +
#define UMAX (a,
 )    ((a) > (b) ? (a) : (b))
+
+
+ +

+ +

+Definition at line 96 of file sys_arch.c. +

+

+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
static uInt16 cond_wait (ubthread_cond_t cond,
ubthread_mutex_t mutex,
uInt16  timeout 
) [static]
+
+ +

+ +

+
+ + + + + + + + + +
static struct sys_thread* current_thread (void   )  [static]
+
+
+ +

+ +

+Definition at line 135 of file sys_arch.c. +

+References netThreadSpinlock, sys_thread::next, NULL, spinLock(), spinUnlock(), threads, sys_thread::ubthread, and ubthread_self(). +

+Referenced by sys_arch_timeouts(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
uInt16 sys_arch_mbox_fetch (struct sys_mbox mbox,
void **  msg,
uInt16  timeout 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
uInt16 sys_arch_sem_wait (struct sys_sem sem,
uInt16  timeout 
)
+
+
+ +

+ +

+Definition at line 351 of file sys_arch.c. +

+References sys_sem::c, sys_sem::cond, cond_wait(), sys_sem::mutex, ubthread_mutex_lock(), and ubthread_mutex_unlock(). +

+

+ +

+
+ + + + + + + + + +
struct sys_timeouts* sys_arch_timeouts (void   ) 
+
+
+ +

+ +

+Definition at line 409 of file sys_arch.c. +

+References current_thread(), and sys_thread::timeouts. +

+

+ +

+
+ + + + + + + + + +
void sys_init (void   ) 
+
+
+ +

+ +

+Definition at line 404 of file sys_arch.c. +

+References gettimeofday(), and starttime. +

+Referenced by net_init(). +

+

+ +

+
+ + + + + + + + + +
void sys_mbox_free (struct sys_mbox mbox  ) 
+
+
+ +

+ +

+Definition at line 215 of file sys_arch.c. +

+References kfree(), sys_mbox::mail, mbox, sys_mbox::mutex, NULL, SYS_MBOX_NULL, sys_sem_free_(), and sys_sem_wait(). +

+

+ +

+
+ + + + + + + + + +
struct sys_mbox* sys_mbox_new (void   ) 
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
void sys_mbox_post (struct sys_mbox mbox,
void *  msg 
)
+
+ +

+ +

+
+ + + + + + + + + +
void sys_sem_free (struct sys_sem sem  ) 
+
+
+ +

+ +

+Definition at line 379 of file sys_arch.c. +

+References sys_sem_free_(), and SYS_SEM_NULL. +

+

+ +

+
+ + + + + + + + + +
static void sys_sem_free_ (struct sys_sem sem  )  [static]
+
+
+ +

+ +

+Definition at line 385 of file sys_arch.c. +

+References sys_sem::cond, kfree(), sys_sem::mutex, ubthread_cond_destroy(), and ubthread_mutex_destroy(). +

+Referenced by sys_mbox_free(), and sys_sem_free(). +

+

+ +

+
+ + + + + + + + + +
struct sys_sem* sys_sem_new (uInt8  count  ) 
+
+
+ +

+ +

+Definition at line 295 of file sys_arch.c. +

+References sys_sem_new_(). +

+Referenced by accept_function(), netconn_write(), and netMainThread(). +

+

+ +

+
+ + + + + + + + + +
static struct sys_sem * sys_sem_new_ (uInt8  count  )  [static]
+
+
+ +

+ +

+Definition at line 299 of file sys_arch.c. +

+References sys_sem::c, sys_sem::cond, kmalloc(), sys_sem::mutex, NULL, ubthread_cond_init(), and ubthread_mutex_init(). +

+Referenced by sys_mbox_new(), and sys_sem_new(). +

+

+ +

+
+ + + + + + + + + +
void sys_sem_signal (struct sys_sem sem  ) 
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
void sys_thread_new (void(*)(void)  function,
void *  arg 
)
+
+ +

+ +

+
+ + + + + + + + +
unsigned long sys_unix_now (  ) 
+
+
+ +

+ +

+Definition at line 391 of file sys_arch.c. +

+References gettimeofday(), starttime, timeval::tv_sec, and timeval::tv_usec. +

+

+


Variable Documentation

+ +
+
+ + + + +
spinLock_t netThreadSpinlock = SPIN_LOCK_INITIALIZER [static]
+
+
+ +

+ +

+Definition at line 99 of file sys_arch.c. +

+Referenced by current_thread(), and sys_thread_new(). +

+

+ +

+
+ + + + +
struct timeval starttime [static]
+
+
+ +

+ +

+Definition at line 128 of file sys_arch.c. +

+Referenced by sys_init(), and sys_unix_now(). +

+

+ +

+
+ + + + +
struct sys_thread* threads = 0x0 [static]
+
+
+ +

+ +

+Definition at line 98 of file sys_arch.c. +

+Referenced by current_thread(), and sys_thread_new(). +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/sys__arch_8h-source.html b/doc/html/sys__arch_8h-source.html new file mode 100644 index 0000000..02b58e0 --- /dev/null +++ b/doc/html/sys__arch_8h-source.html @@ -0,0 +1,88 @@ + + +UbixOS V2: src/sys/include/net/arch/sys_arch.h Source File + + + + +
+
+
+
+ +

sys_arch.h

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 #ifndef __ARCH_SYS_ARCH_H__
+00036 #define __ARCH_SYS_ARCH_H__
+00037 
+00038 #define SYS_MBOX_NULL NULL
+00039 #define SYS_SEM_NULL  NULL
+00040 
+00041 struct sys_sem;
+00042 typedef struct sys_sem * sys_sem_t;
+00043 
+00044 struct sys_mbox;
+00045 typedef struct sys_mbox *sys_mbox_t;
+00046 
+00047 struct sys_thread;
+00048 typedef struct sys_thread * sys_thread_t;
+00049 
+00050 #endif /* __ARCH_SYS_ARCH_H__ */
+00051 
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/sys__arch_8h.html b/doc/html/sys__arch_8h.html new file mode 100644 index 0000000..b90e3af --- /dev/null +++ b/doc/html/sys__arch_8h.html @@ -0,0 +1,147 @@ + + +UbixOS V2: src/sys/include/net/arch/sys_arch.h File Reference + + + + +
+
+
+
+ +

sys_arch.h File Reference

+

+ +

+Go to the source code of this file. + + + + + + + + + + + + + +

Defines

#define SYS_MBOX_NULL   NULL
#define SYS_SEM_NULL   NULL

Typedefs

typedef sys_mboxsys_mbox_t
typedef sys_semsys_sem_t
typedef sys_threadsys_thread_t
+


Define Documentation

+ +
+
+ + + + +
#define SYS_MBOX_NULL   NULL
+
+ +

+ +

+
+ + + + +
#define SYS_SEM_NULL   NULL
+
+ +

+


Typedef Documentation

+ +
+
+ + + + +
typedef struct sys_mbox* sys_mbox_t
+
+
+ +

+ +

+Definition at line 45 of file sys_arch.h. +

+

+ +

+
+ + + + +
typedef struct sys_sem* sys_sem_t
+
+
+ +

+ +

+Definition at line 42 of file sys_arch.h. +

+

+ +

+
+ + + + +
typedef struct sys_thread* sys_thread_t
+
+
+ +

+ +

+Definition at line 48 of file sys_arch.h. +

+

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/sys__call_8S-source.html b/doc/html/sys__call_8S-source.html new file mode 100644 index 0000000..89e6488 --- /dev/null +++ b/doc/html/sys__call_8S-source.html @@ -0,0 +1,92 @@ + + +UbixOS V2: src/sys/kernel/sys_call.S Source File + + + + +
+
+
+
+ +

sys_call.S

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 .globl _sysCall
+00031 .text
+00032 .code32
+00033 _sysCall:
+00034   cmpl totalCalls,%eax   
+00035   jae invalidSysCall       
+00036 
+00037   cld
+00038   pushl %edx              
+00039   pushl %ecx               
+00040   pushl %ebx                
+00041   call *systemCalls(,%eax,4)
+00042   popl %ebx                  
+00043   popl %ecx                 
+00044   popl %edx /* Restore Registers */
+00045 
+00046   iret       
+00047              
+00048 invalidSysCall:
+00049   movl $-1,%eax
+00050   iret
+00051 
+00052 /***
+00053  END
+00054  ***/
+00055 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/sys__call_8S.html b/doc/html/sys__call_8S.html new file mode 100644 index 0000000..326bad6 --- /dev/null +++ b/doc/html/sys__call_8S.html @@ -0,0 +1,67 @@ + + +UbixOS V2: src/sys/kernel/sys_call.S File Reference + + + + +
+
+
+
+ +

sys_call.S File Reference

+

+ +

+Go to the source code of this file. + + + + +

Variables

globl _sysCall text code32 _sysCall
+


Variable Documentation

+ +
+
+ + + + +
globl _sysCall text code32 _sysCall
+
+
+ +

+ +

+Definition at line 34 of file sys_call.S. +

+Referenced by idt_init(). +

+

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/sys__call__new_8S-source.html b/doc/html/sys__call__new_8S-source.html new file mode 100644 index 0000000..d319795 --- /dev/null +++ b/doc/html/sys__call__new_8S-source.html @@ -0,0 +1,105 @@ + + +UbixOS V2: src/sys/kernel/sys_call_new.S Source File + + + + +
+
+
+
+ +

sys_call_new.S

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #define FAKE_MCOUNT(caller)     pushl caller ; call __mcount ; popl %ecx
+00031 
+00032 .globl _sysCall_new
+00033 .text
+00034 .code32
+00035 _sysCall_new:
+00036   pushl   $2                      /* sizeof "int 0x80" */
+00037   subl    $4,%esp                 /* skip over tf_trapno */
+00038   pushal
+00039   pushl   %ds
+00040   pushl   %es
+00041   pushl   %fs
+00042   /* switch to kernel segments */
+00043   movl    $0x10,%eax
+00044   movl    %eax,%ds
+00045   movl    %eax,%es
+00046   movl    %eax,%fs
+00047   //FAKE_MCOUNT(TF_EIP(%esp))
+00048   call    syscall
+00049   //MEXITCOUNT
+00050   //jmp     doreti
+00051   popl    %fs
+00052   popl    %es
+00053   popl    %ds
+00054   popal
+00055   addl    $8,%esp
+00056   iret       
+00057              
+00058 invalidSysCall:
+00059   push %eax
+00060   call invalidCall
+00061   pop %eax
+00062   movl $-1,%eax
+00063   iret
+00064 
+00065 /***
+00066  END
+00067  ***/
+00068 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/sys__call__new_8S.html b/doc/html/sys__call__new_8S.html new file mode 100644 index 0000000..a7b3dbe --- /dev/null +++ b/doc/html/sys__call__new_8S.html @@ -0,0 +1,226 @@ + + +UbixOS V2: src/sys/kernel/sys_call_new.S File Reference + + + + +
+
+
+
+ +

sys_call_new.S File Reference

+

+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + +

Defines

#define FAKE_MCOUNT(caller)   pushl caller ; call __mcount ; popl %ecx

Variables

globl _sysCall_new text code32 _sysCall_new
globl _sysCall_new text code32
+esp pushal pushl ds pushl
+es pushl fs movl eax movl
+ds movl es movl fs call syscall
+popl fs popl es popl ds popal 
addl
globl _sysCall_new text code32
+esp pushal pushl ds pushl
+es pushl fs movl eax movl
+ds movl es movl 
eax
globl _sysCall_new text code32
+esp pushal pushl ds pushl
+es pushl fs movl eax movl
+ds movl 
eax
globl _sysCall_new text code32
+esp pushal pushl ds pushl
+es pushl fs movl eax movl 
eax
globl _sysCall_new text code32
+esp pushal pushl ds pushl
+es pushl fs movl eax movl
+ds movl es movl fs call syscall
+popl fs popl es popl ds popal
+esp iret 
invalidSysCall
globl _sysCall_new text code32
+esp pushal pushl ds pushl
+es pushl fs movl 
x10
+


Define Documentation

+ +
+
+ + + + + + + + + +
#define FAKE_MCOUNT (caller   )    pushl caller ; call __mcount ; popl %ecx
+
+
+ +

+ +

+Definition at line 30 of file sys_call_new.S. +

+

+


Variable Documentation

+ +
+
+ + + + +
globl _sysCall_new text code32 _sysCall_new
+
+
+ +

+ +

+Definition at line 37 of file sys_call_new.S. +

+Referenced by idt_init(). +

+

+ +

+
+ + + + +
globl _sysCall_new text code32 esp pushal pushl ds pushl es pushl fs movl eax movl ds movl es movl fs call syscall popl fs popl es popl ds popal addl
+
+
+ +

+ +

+Definition at line 37 of file sys_call_new.S. +

+

+ +

+
+ + + + +
globl _sysCall_new text code32 esp pushal pushl ds pushl es pushl fs movl eax movl ds movl es movl eax
+
+
+ +

+ +

+Definition at line 37 of file sys_call_new.S. +

+

+ +

+
+ + + + +
globl _sysCall_new text code32 esp pushal pushl ds pushl es pushl fs movl eax movl ds movl eax
+
+
+ +

+ +

+Definition at line 37 of file sys_call_new.S. +

+

+ +

+
+ + + + +
globl _sysCall_new text code32 esp pushal pushl ds pushl es pushl fs movl eax movl eax
+
+
+ +

+ +

+Definition at line 37 of file sys_call_new.S. +

+

+ +

+
+ + + + +
globl _sysCall_new text code32 esp pushal pushl ds pushl es pushl fs movl eax movl ds movl es movl fs call syscall popl fs popl es popl ds popal esp iret invalidSysCall
+
+
+ +

+ +

+Definition at line 37 of file sys_call_new.S. +

+

+ +

+
+ + + + +
globl _sysCall_new text code32 esp pushal pushl ds pushl es pushl fs movl x10
+
+
+ +

+ +

+Definition at line 37 of file sys_call_new.S. +

+

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/syscall_8c-source.html b/doc/html/syscall_8c-source.html new file mode 100644 index 0000000..0138142 --- /dev/null +++ b/doc/html/syscall_8c-source.html @@ -0,0 +1,295 @@ + + +UbixOS V2: src/sys/kernel/syscall.c Source File + + + + +
+
+
+
+ +

syscall.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <ubixos/syscall.h>
+00031 #include <ubixos/syscalls.h>
+00032 #include <ubixos/sched.h>
+00033 #include <ubixos/types.h>
+00034 #include <ubixos/exec.h>
+00035 #include <ubixos/elf.h>
+00036 #include <ubixos/vitals.h>
+00037 #include <ubixos/endtask.h>
+00038 #include <sys/video.h>
+00039 #include <sys/trap.h>
+00040 #include <vfs/file.h>
+00041 #include <ubixfs/ubixfs.h>
+00042 #include <lib/string.h>
+00043 #include <lib/kprintf.h>
+00044 #include <lib/kmalloc.h>
+00045 /* #include <sde/sde.h> */
+00046 #include <mpi/mpi.h>
+00047 #include <vmm/vmm.h>
+00048 
+00049 long   fuword(const void *base);
+00050 
+00051 void sdeTestThread();
+00052 
+00053 asm(
+00054   ".globl _sysCallNew           \n"
+00055   "_sysCallNew:                 \n"
+00056   "  pusha                      \n"
+00057   "  push %ss                   \n"
+00058   "  push %ds                   \n"
+00059   "  push %es                   \n"
+00060   "  push %fs                   \n"
+00061   "  push %gs                   \n"
+00062   "  cmpl totalCalls,%eax       \n"
+00063   "  jae  invalidSysCallNew     \n"
+00064   "  mov  %esp,%ebx             \n"
+00065   "  add  $12,%ebx              \n"
+00066   "  push (%ebx)                \n"
+00067   "  call *systemCalls(,%eax,4) \n"
+00068   "  add  $4,%esp               \n"
+00069   "  jmp  doneNew               \n"
+00070   "invalidSysCallNew:           \n"
+00071   "  call InvalidSystemCall     \n"
+00072   "doneNew:                     \n"
+00073   "  pop %gs                    \n"
+00074   "  pop %fs                    \n" 
+00075   "  pop %es                    \n"
+00076   "  pop %ds                    \n"
+00077   "  pop %ss                    \n"
+00078   "  popa                       \n"
+00079   "  iret                       \n"
+00080   );
+00081 
+00082 void InvalidSystemCall()
+00083 {
+00084         kprintf("attempt was made to an invalid system call\n");
+00085         return;
+00086 }
+00087 
+00088 typedef struct _UbixUser UbixUser;
+00089 struct _UbixUser
+00090 {
+00091         char *username;
+00092         char *password;
+00093         int uid;
+00094         int gid;
+00095         char *home;
+00096         char *shell;
+00097 };
+00098 
+00099 void sysAuth(UbixUser *uu)
+00100 {
+00101         kprintf("authenticating user %s\n", uu->username);
+00102         if(uu->username == "root" && uu->password == "user")
+00103         {
+00104                 uu->uid = 0;
+00105                 uu->gid = 0;
+00106         }
+00107         uu->uid = -1;
+00108         uu->gid = -1;
+00109         return;
+00110 }
+00111 
+00112 void sysPasswd(char *passwd)
+00113 {
+00114         kprintf("changing user password for user %d\n", _current->uid);
+00115         return;
+00116 }
+00117 
+00118 void sysAddModule()
+00119 {
+00120         return;
+00121 }
+00122 
+00123 void sysRmModule()
+00124 {
+00125         return;
+00126 }
+00127 
+00128 void sysGetpid(int *pid)
+00129 {
+00130         if (pid)
+00131                 *pid = _current->id;
+00132                 return;
+00133 }
+00134 
+00135 void sysGetUid(int *uid) {
+00136   if (uid)
+00137     *uid = _current->uid;
+00138   return;
+00139   }
+00140 
+00141 void sysGetGid(int *gid) {
+00142   if (gid)
+00143     *gid = _current->gid;
+00144   return;
+00145   }
+00146 
+00147 void sysSetUid(int uid,int *status) {
+00148   if (_current->uid == 0x0) {
+00149     _current->uid = uid;
+00150     if (status)
+00151       *status = 0x0;
+00152     }
+00153   else {
+00154     if (status)
+00155       *status = 1;
+00156     }
+00157   return;
+00158   }
+00159 
+00160 void sysSetGid(int gid,int *status) {
+00161   if (_current->gid == 0x0) {
+00162     _current->gid = gid;
+00163     if (status)
+00164       *status = 0x0;
+00165     }
+00166   else {
+00167     if (status)
+00168       *status = 1;
+00169     }
+00170   return;
+00171   }  
+00172 
+00173 void sysExit(int status)
+00174 {
+00175         endTask(_current->id);
+00176 }
+00177 
+00178 void sysCheckPid(int pid,int *ptr)
+00179 {
+00180         kTask_t *tmpTask = schedFindTask(pid);
+00181         if ((tmpTask != 0x0) && (ptr != 0x0))
+00182                 *ptr = tmpTask->state;
+00183         else
+00184                 *ptr = 0x0;
+00185         return;
+00186 }
+00187 
+00188 /************************************************************************
+00189 
+00190 Function: void sysGetFreePage();
+00191 Description: Allocs A Page To The Users VM Space
+00192 Notes:
+00193 
+00194 ************************************************************************/  
+00195 void sysGetFreePage(long *ptr,int count,int type) {
+00196   if (ptr) {
+00197     if (type == 2)
+00198       *ptr = (long) vmmGetFreeVirtualPage(_current->id,count,VM_THRD);
+00199     else
+00200       *ptr = (long) vmmGetFreeVirtualPage(_current->id,count,VM_TASK);
+00201     }
+00202   return;
+00203   }
+00204 
+00205 void sysGetDrives(uInt32 *ptr)
+00206 {
+00207         if (ptr)
+00208                 *ptr = 0x0;//(uInt32)devices;
+00209         return;
+00210 }
+00211 
+00212 void sysGetUptime(uInt32 *ptr)
+00213 {
+00214         if (ptr)
+00215                 *ptr = systemVitals->sysTicks;
+00216         return;
+00217 }
+00218 
+00219 void sysGetTime(uInt32 *ptr)
+00220 {
+00221         if (ptr)
+00222                 *ptr = systemVitals->sysUptime + systemVitals->timeStart;
+00223         return;
+00224 }
+00225 
+00226 
+00227 void sysGetCwd(char *data,int len)
+00228 {
+00229         if (data)
+00230                 sprintf(data,"%s", _current->oInfo.cwd);
+00231         return;
+00232 }
+00233 
+00234 void sysSchedYield() {
+00235   sched_yield();
+00236   }
+00237 
+00238 void sysStartSDE() {
+00239   int i = 0x0;
+00240   for (i=0;i<1400;i++) {
+00241     asm("hlt");
+00242     }
+00243   //execThread(sdeThread,(uInt32)(kmalloc(0x2000)+0x2000),0x0);
+00244   for (i=0;i<1400;i++) {
+00245     asm("hlt");
+00246     }
+00247   return;
+00248   }
+00249 
+00250 void invalidCall(int sys_call) {
+00251   kprintf("Invalid System Call #[%i]\n",sys_call);
+00252   return;
+00253   }
+00254 
+00255 /***
+00256  END
+00257  ***/
+00258 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/syscall_8c.html b/doc/html/syscall_8c.html new file mode 100644 index 0000000..3886f0e --- /dev/null +++ b/doc/html/syscall_8c.html @@ -0,0 +1,737 @@ + + +UbixOS V2: src/sys/kernel/syscall.c File Reference + + + + +
+
+
+
+ +

syscall.c File Reference

+

+#include <ubixos/syscall.h>
+#include <ubixos/syscalls.h>
+#include <ubixos/sched.h>
+#include <ubixos/types.h>
+#include <ubixos/exec.h>
+#include <ubixos/elf.h>
+#include <ubixos/vitals.h>
+#include <ubixos/endtask.h>
+#include <sys/video.h>
+#include <sys/trap.h>
+#include <vfs/file.h>
+#include <ubixfs/ubixfs.h>
+#include <lib/string.h>
+#include <lib/kprintf.h>
+#include <lib/kmalloc.h>
+#include <mpi/mpi.h>
+#include <vmm/vmm.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  _UbixUser

Typedefs

typedef _UbixUser UbixUser

Functions

 asm (".globl _sysCallNew \n""_sysCallNew: \n"" pusha \n"" push %ss \n"" push %ds \n"" push %es \n"" push %fs \n"" push %gs \n"" cmpl totalCalls,%eax \n"" jae invalidSysCallNew \n"" mov %esp,%ebx \n"" add $12,%ebx \n"" push (%ebx) \n"" call *systemCalls(,%eax,4) \n"" add $4,%esp \n"" jmp doneNew \n""invalidSysCallNew: \n"" call InvalidSystemCall \n""doneNew: \n"" pop %gs \n"" pop %fs \n"" pop %es \n"" pop %ds \n"" pop %ss \n"" popa \n"" iret \n")
long fuword (const void *base)
void invalidCall (int sys_call)
void InvalidSystemCall ()
void sdeTestThread ()
void sysAddModule ()
void sysAuth (UbixUser *uu)
void sysCheckPid (int pid, int *ptr)
void sysExit (int status)
void sysGetCwd (char *data, int len)
void sysGetDrives (uInt32 *ptr)
void sysGetFreePage (long *ptr, int count, int type)
void sysGetGid (int *gid)
void sysGetpid (int *pid)
void sysGetTime (uInt32 *ptr)
void sysGetUid (int *uid)
void sysGetUptime (uInt32 *ptr)
void sysPasswd (char *passwd)
void sysRmModule ()
void sysSchedYield ()
void sysSetGid (int gid, int *status)
void sysSetUid (int uid, int *status)
void sysStartSDE ()
+


Typedef Documentation

+ +
+
+ + + + +
typedef struct _UbixUser UbixUser
+
+
+ +

+ +

+Definition at line 88 of file syscall.c. +

+

+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
asm (".globl _sysCallNew \n""_sysCallNew: \n"" pusha \n"" push %ss \n"" push %ds \n"" push %es \n"" push %fs \n"" push %gs \n"" cmpl   totalCalls,
%eax\n""jae invalidSysCallNew\n""mov esp,
%ebx\n""add $  12,
%ebx\n""push(%ebx)\n""call *systemCalls(,%eax, 4)\n""add $  4,
%esp\n""jmp doneNew\n""invalidSysCallNew:\n""call InvalidSystemCall\n""doneNew:\n""pop%gs\n""pop%fs\n""pop%es\n""pop%ds\n""pop%ss\n""popa\n""iret\n"  
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
long fuword (const void *  base  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
void invalidCall (int  sys_call  ) 
+
+
+ +

+ +

+Definition at line 250 of file syscall.c. +

+References kprintf(). +

+

+ +

+
+ + + + + + + + +
void InvalidSystemCall (  ) 
+
+
+ +

+ +

+Definition at line 82 of file syscall.c. +

+References kprintf(). +

+

+ +

+
+ + + + + + + + +
void sdeTestThread (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
void sysAddModule (  ) 
+
+
+ +

+ +

+Definition at line 118 of file syscall.c. +

+

+ +

+
+ + + + + + + + + +
void sysAuth (UbixUser uu  ) 
+
+
+ +

+ +

+Definition at line 99 of file syscall.c. +

+References _UbixUser::gid, kprintf(), _UbixUser::password, _UbixUser::uid, and _UbixUser::username. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void sysCheckPid (int  pid,
int *  ptr 
)
+
+
+ +

+ +

+Definition at line 178 of file syscall.c. +

+References schedFindTask(), and taskStruct::state. +

+

+ +

+
+ + + + + + + + + +
void sysExit (int  status  ) 
+
+
+ +

+ +

+Definition at line 173 of file syscall.c. +

+References _current, endTask(), and taskStruct::id. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void sysGetCwd (char *  data,
int  len 
)
+
+
+ +

+ +

+Definition at line 227 of file syscall.c. +

+References _current, osInfo::cwd, taskStruct::oInfo, and sprintf(). +

+

+ +

+
+ + + + + + + + + +
void sysGetDrives (uInt32 ptr  ) 
+
+
+ +

+ +

+Definition at line 205 of file syscall.c. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void sysGetFreePage (long *  ptr,
int  count,
int  type 
)
+
+
+ +

+ +

+Definition at line 195 of file syscall.c. +

+References _current, taskStruct::id, VM_TASK, VM_THRD, and vmmGetFreeVirtualPage(). +

+

+ +

+
+ + + + + + + + + +
void sysGetGid (int *  gid  ) 
+
+
+ +

+ +

+Definition at line 141 of file syscall.c. +

+References _current, and taskStruct::gid. +

+

+ +

+
+ + + + + + + + + +
void sysGetpid (int *  pid  ) 
+
+
+ +

+ +

+Definition at line 128 of file syscall.c. +

+References _current, and taskStruct::id. +

+

+ +

+
+ + + + + + + + + +
void sysGetTime (uInt32 ptr  ) 
+
+
+ +

+ +

+Definition at line 219 of file syscall.c. +

+References systemVitals. +

+

+ +

+
+ + + + + + + + + +
void sysGetUid (int *  uid  ) 
+
+
+ +

+ +

+Definition at line 135 of file syscall.c. +

+References _current, and taskStruct::uid. +

+

+ +

+
+ + + + + + + + + +
void sysGetUptime (uInt32 ptr  ) 
+
+
+ +

+ +

+Definition at line 212 of file syscall.c. +

+References systemVitals. +

+

+ +

+
+ + + + + + + + + +
void sysPasswd (char *  passwd  ) 
+
+
+ +

+ +

+Definition at line 112 of file syscall.c. +

+References _current, kprintf(), and taskStruct::uid. +

+

+ +

+
+ + + + + + + + +
void sysRmModule (  ) 
+
+
+ +

+ +

+Definition at line 123 of file syscall.c. +

+

+ +

+
+ + + + + + + + +
void sysSchedYield (  ) 
+
+
+ +

+ +

+Definition at line 234 of file syscall.c. +

+References sched_yield(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void sysSetGid (int  gid,
int *  status 
)
+
+
+ +

+ +

+Definition at line 160 of file syscall.c. +

+References _current, and taskStruct::gid. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void sysSetUid (int  uid,
int *  status 
)
+
+
+ +

+ +

+Definition at line 147 of file syscall.c. +

+References _current, and taskStruct::uid. +

+

+ +

+
+ + + + + + + + +
void sysStartSDE (  ) 
+
+
+ +

+ +

+Definition at line 238 of file syscall.c. +

+

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/syscall_8h-source.html b/doc/html/syscall_8h-source.html new file mode 100644 index 0000000..fffc5e7 --- /dev/null +++ b/doc/html/syscall_8h-source.html @@ -0,0 +1,100 @@ + + +UbixOS V2: src/sys/include/ubixos/syscall.h Source File + + + + +
+
+
+
+ +

syscall.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _SYSCALL_H
+00031 #define _SYSCALL_H
+00032 
+00033 #include <ubixos/types.h>
+00034 
+00035 void _sysCall();
+00036 void _sysCall_new();
+00037 void invalidCall();
+00038 
+00039 #endif
+00040 
+00041 /***
+00042  $Log$
+00043  Revision 1.2  2006/10/26 23:52:02  reddawg
+00044  Cleaned
+00045 
+00046  Revision 1.1.1.1  2006/06/01 12:46:14  reddawg
+00047  ubix2
+00048 
+00049  Revision 1.2  2005/10/12 00:13:37  reddawg
+00050  Removed
+00051 
+00052  Revision 1.1.1.1  2005/09/26 17:23:56  reddawg
+00053  no message
+00054 
+00055  Revision 1.3  2004/07/05 23:06:32  reddawg
+00056  Fixens
+00057 
+00058  Revision 1.2  2004/05/21 15:20:00  reddawg
+00059  Cleaned up
+00060 
+00061 
+00062  END
+00063  ***/
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/syscall_8h.html b/doc/html/syscall_8h.html new file mode 100644 index 0000000..5a105e6 --- /dev/null +++ b/doc/html/syscall_8h.html @@ -0,0 +1,110 @@ + + +UbixOS V2: src/sys/include/ubixos/syscall.h File Reference + + + + +
+
+
+
+ +

syscall.h File Reference

+

+#include <ubixos/types.h>
+ +

+Go to the source code of this file. + + + + + + + + +

Functions

void _sysCall ()
void _sysCall_new ()
void invalidCall ()
+


Function Documentation

+ +
+
+ + + + + + + + +
void _sysCall (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
void _sysCall_new (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
void invalidCall (  ) 
+
+
+ +

+ +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/syscall__new_8c-source.html b/doc/html/syscall__new_8c-source.html new file mode 100644 index 0000000..72c1368 --- /dev/null +++ b/doc/html/syscall__new_8c-source.html @@ -0,0 +1,131 @@ + + +UbixOS V2: src/sys/kernel/syscall_new.c Source File + + + + +
+
+
+
+ +

syscall_new.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <ubixos/syscalls_new.h>
+00031 #include <ubixos/sched.h>
+00032 #include <ubixos/types.h>
+00033 #include <ubixos/endtask.h>
+00034 #include <ubixos/spinlock.h>
+00035 #include <sys/trap.h>
+00036 #include <lib/string.h>
+00037 #include <lib/kprintf.h>
+00038 
+00039 spinLock_t Master = SPIN_LOCK_INITIALIZER;
+00040 
+00041 void syscall(struct trapframe frame) {
+00042   uInt32 code = 0x0;
+00043   caddr_t params;
+00044   struct thread *td = &_current->td;
+00045   int args[8];
+00046   int error = 0x0;
+00047 
+00048   params = (caddr_t)frame.tf_esp + sizeof(int);
+00049  
+00050   code = frame.tf_eax;
+00051   if (code == 198) {
+00052     memcpy(&code,params,sizeof(int));
+00053     params += sizeof(quad_t);
+00054     }
+00055 
+00056   if (code > totalCalls_new) {
+00057     kprintf("Invalid Call: [%i]\n",frame.tf_eax);
+00058     }
+00059   else if ((uInt32)systemCalls_new[code] == 0x0) {
+00060     kprintf("Invalid Call: [%i][0x%X]\n",code,(uInt32)systemCalls_new[code]);
+00061     frame.tf_eax = -1;
+00062     frame.tf_edx = 0x0;
+00063     }
+00064   else {
+00065     memcpy(args,params,8 * sizeof(int));
+00066     td->td_retval[0] = 0;
+00067     td->td_retval[1] = frame.tf_edx;
+00068 
+00069     error = (int)systemCalls_new[code](td,args);
+00070     switch (error) {
+00071       case 0:
+00072         frame.tf_eax = td->td_retval[0];
+00073         frame.tf_edx = td->td_retval[1];
+00074         frame.tf_eflags &= ~PSL_C;
+00075         break;
+00076       case ERESTART:
+00077         frame.tf_eip -= frame.tf_err;
+00078         break;
+00079       case EJUSTRETURN:
+00080         break;
+00081       default:
+00082         frame.tf_eax = error;
+00083         frame.tf_eflags |= PSL_C;
+00084         break;
+00085 
+00086       }
+00087     }
+00088   }
+00089 
+00090 
+00091 /***
+00092  END
+00093  ***/
+00094 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/syscall__new_8c.html b/doc/html/syscall__new_8c.html new file mode 100644 index 0000000..6c1474c --- /dev/null +++ b/doc/html/syscall__new_8c.html @@ -0,0 +1,103 @@ + + +UbixOS V2: src/sys/kernel/syscall_new.c File Reference + + + + +
+
+
+
+ +

syscall_new.c File Reference

+

+#include <ubixos/syscalls_new.h>
+#include <ubixos/sched.h>
+#include <ubixos/types.h>
+#include <ubixos/endtask.h>
+#include <ubixos/spinlock.h>
+#include <sys/trap.h>
+#include <lib/string.h>
+#include <lib/kprintf.h>
+ +

+Go to the source code of this file. + + + + + + + +

Functions

void syscall (struct trapframe frame)

Variables

spinLock_t Master = SPIN_LOCK_INITIALIZER
+


Function Documentation

+ +
+
+ + + + + + + + + +
void syscall (struct trapframe  frame  ) 
+
+ +

+


Variable Documentation

+ +
+
+ + + + +
spinLock_t Master = SPIN_LOCK_INITIALIZER
+
+
+ +

+ +

+Definition at line 39 of file syscall_new.c. +

+Referenced by __sysctl(). +

+

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/syscalls_8h-source.html b/doc/html/syscalls_8h-source.html new file mode 100644 index 0000000..a3fc1a2 --- /dev/null +++ b/doc/html/syscalls_8h-source.html @@ -0,0 +1,205 @@ + + +UbixOS V2: src/sys/include/ubixos/syscalls.h Source File + + + + +
+
+
+
+ +

syscalls.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _SYSCALLS_H
+00031 #define _SYSCALLS_H
+00032 
+00033 #include <ubixos/sched.h>
+00034 #include <vfs/file.h>
+00035 
+00036 void sysAuth();
+00037 void sysPasswd();
+00038 void sysAddModule();
+00039 void sysRmModule();
+00040 void sysGetpid();
+00041 void sysExit();
+00042 void sysExec();
+00043 void sysFork();
+00044 void sysCheckPid();
+00045 void sysGetFreePage();
+00046 
+00047 void sysFwrite();
+00048 void sysFgetc();
+00049 void sysFopen();
+00050 void sysFread();
+00051 void sysFclose();
+00052 void sysSchedYield();
+00053 void sysFseek();
+00054 void sysMkDir();
+00055 void sysRmDir();
+00056 void sysGetUid();
+00057 void sysGetGid();
+00058 void sysSetUid();
+00059 void sysSetGid();
+00060 void sysSDE();
+00061 void sysGetDrives();
+00062 void sysGetCwd();
+00063 void sysChDir();
+00064 void sysGetUptime();
+00065 void sysGetTime();
+00066 void sysStartSDE();
+00067 void sysUnlink();
+00068 void sysMpiCreateMbox();
+00069 void sysMpiDestroyMbox();
+00070 void sysMpiPostMessage();
+00071 void sysMpiFetchMessage();
+00072 void sysMpiSpam();
+00073 
+00074 typedef void (*functionPTR)();
+00075 
+00076 functionPTR systemCalls[] = {
+00077   invalidCall,      
+00078   sysGetpid,        
+00079   sysExit,          
+00080   sysExec,          
+00081   sysFork,          
+00082   sysFgetc,         
+00083   sysCheckPid,      
+00084   sysGetFreePage,   
+00085   sysFopen,         
+00086   invalidCall,      
+00087   sysFclose,        
+00088   sysSchedYield,    
+00089   invalidCall,      
+00090   invalidCall,      
+00091   invalidCall,      
+00092   invalidCall,      
+00093   invalidCall,      
+00094   invalidCall,      
+00095   invalidCall,      
+00096   invalidCall,      
+00097   sysFopen,         
+00098   sysFclose,        
+00099   sysFread,         
+00100   sysFwrite,        
+00101   sysMkDir,         
+00102   sysRmDir,         
+00103   sysGetCwd,        
+00104   sysFseek,         
+00105   sysChDir,         
+00106   sysMkDir,         
+00107   sysUnlink,        
+00108   sysGetUid,        
+00109   sysGetGid,        
+00110   sysSetUid,        
+00111   sysSetGid,        
+00112   sysAuth,          
+00113   sysPasswd,        
+00114   sysAddModule,     
+00115   sysRmModule,      
+00116   invalidCall,      
+00117   //sysSDE,           /**  40 SDE Kernel Interface    **/
+00118   invalidCall,      
+00119   invalidCall,      
+00120   invalidCall,      
+00121   invalidCall,      
+00122   invalidCall,      
+00123   sysGetDrives,     
+00124   sysGetUptime,     
+00125   sysGetTime,       
+00126   sysStartSDE,      
+00127   invalidCall,      
+00128   sysMpiCreateMbox,   
+00129   sysMpiDestroyMbox,  
+00130   sysMpiPostMessage,  
+00131   sysMpiFetchMessage, 
+00132   sysMpiSpam,         
+00133   };
+00134 
+00135 int totalCalls = sizeof(systemCalls)/sizeof(functionPTR);
+00136 
+00137 #endif
+00138 
+00139 /***
+00140  $Log$
+00141  Revision 1.2  2006/10/12 17:05:44  reddawg
+00142  Removing SDE
+00143 
+00144  Revision 1.1.1.1  2006/06/01 12:46:14  reddawg
+00145  ubix2
+00146 
+00147  Revision 1.2  2005/10/12 00:13:37  reddawg
+00148  Removed
+00149 
+00150  Revision 1.1.1.1  2005/09/26 17:23:56  reddawg
+00151  no message
+00152 
+00153  Revision 1.5  2005/08/04 22:48:39  fsdfs
+00154 
+00155  added 4 new syscalls: sysAuth(), sysPasswd(), sysAddModule(), sysRmModule()
+00156 
+00157  Revision 1.4  2004/05/26 15:39:22  reddawg
+00158  mpi: brought mpiDestroyMbox(char *name) in to the userland
+00159 
+00160  Revision 1.3  2004/05/25 15:42:19  reddawg
+00161  Enabled mpiSpam();
+00162 
+00163  Revision 1.2  2004/05/21 15:20:00  reddawg
+00164  Cleaned up
+00165 
+00166 
+00167  END
+00168  ***/
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/syscalls_8h.html b/doc/html/syscalls_8h.html new file mode 100644 index 0000000..6d43e7b --- /dev/null +++ b/doc/html/syscalls_8h.html @@ -0,0 +1,877 @@ + + +UbixOS V2: src/sys/include/ubixos/syscalls.h File Reference + + + + +
+
+
+
+ +

syscalls.h File Reference

+

+#include <ubixos/sched.h>
+#include <vfs/file.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Typedefs

typedef void(*) functionPTR ()

Functions

void sysAddModule ()
void sysAuth ()
void sysChDir ()
void sysCheckPid ()
void sysExec ()
void sysExit ()
void sysFclose ()
void sysFgetc ()
void sysFopen ()
void sysFork ()
void sysFread ()
void sysFseek ()
void sysFwrite ()
void sysGetCwd ()
void sysGetDrives ()
void sysGetFreePage ()
void sysGetGid ()
void sysGetpid ()
void sysGetTime ()
void sysGetUid ()
void sysGetUptime ()
void sysMkDir ()
void sysMpiCreateMbox ()
void sysMpiDestroyMbox ()
void sysMpiFetchMessage ()
void sysMpiPostMessage ()
void sysMpiSpam ()
void sysPasswd ()
void sysRmDir ()
void sysRmModule ()
void sysSchedYield ()
void sysSDE ()
void sysSetGid ()
void sysSetUid ()
void sysStartSDE ()
void sysUnlink ()

Variables

functionPTR systemCalls []
int totalCalls = sizeof(systemCalls)/sizeof(functionPTR)
+


Typedef Documentation

+ +
+
+ + + + +
typedef void(*) functionPTR()
+
+
+ +

+ +

+Definition at line 74 of file syscalls.h. +

+

+


Function Documentation

+ +
+
+ + + + + + + + +
void sysAddModule (  ) 
+
+
+ +

+ +

+Definition at line 118 of file syscall.c. +

+

+ +

+
+ + + + + + + + +
void sysAuth (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
void sysChDir (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
void sysCheckPid (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
void sysExec (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
void sysExit (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
void sysFclose (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
void sysFgetc (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
void sysFopen (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
void sysFork (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
void sysFread (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
void sysFseek (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
void sysFwrite (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
void sysGetCwd (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
void sysGetDrives (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
void sysGetFreePage (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
void sysGetGid (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
void sysGetpid (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
void sysGetTime (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
void sysGetUid (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
void sysGetUptime (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
void sysMkDir (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
void sysMpiCreateMbox (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
void sysMpiDestroyMbox (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
void sysMpiFetchMessage (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
void sysMpiPostMessage (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
void sysMpiSpam (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
void sysPasswd (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
void sysRmDir (  ) 
+
+
+ +

+ +

+Definition at line 88 of file file.c. +

+

+ +

+
+ + + + + + + + +
void sysRmModule (  ) 
+
+
+ +

+ +

+Definition at line 123 of file syscall.c. +

+

+ +

+
+ + + + + + + + +
void sysSchedYield (  ) 
+
+
+ +

+ +

+Definition at line 234 of file syscall.c. +

+References sched_yield(). +

+

+ +

+
+ + + + + + + + +
void sysSDE (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
void sysSetGid (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
void sysSetUid (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
void sysStartSDE (  ) 
+
+
+ +

+ +

+Definition at line 238 of file syscall.c. +

+

+ +

+
+ + + + + + + + +
void sysUnlink (  ) 
+
+
+ +

+ +

+

+


Variable Documentation

+ +
+
+ + + + +
functionPTR systemCalls[]
+
+
+ +

+ +

+Definition at line 76 of file syscalls.h. +

+

+ +

+
+ + + + +
int totalCalls = sizeof(systemCalls)/sizeof(functionPTR)
+
+
+ +

+ +

+Definition at line 135 of file syscalls.h. +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/syscalls__new_8h-source.html b/doc/html/syscalls__new_8h-source.html new file mode 100644 index 0000000..5c5869c --- /dev/null +++ b/doc/html/syscalls__new_8h-source.html @@ -0,0 +1,564 @@ + + +UbixOS V2: src/sys/include/ubixos/syscalls_new.h Source File + + + + +
+
+
+
+ +

syscalls_new.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _SYSCALLS_NEW_H
+00031 #define _SYSCALLS_NEW_H
+00032 
+00033 int sysExit();
+00034 int sys_write();
+00035 int getpid();
+00036 int fcntl();
+00037 int issetugid();
+00038 int __sysctl();
+00039 int pipe();
+00040 int readlink();
+00041 int getuid();
+00042 int getgid();
+00043 int close();
+00044 int mmap();
+00045 int obreak();
+00046 int sigaction();
+00047 int getdtablesize();
+00048 int munmap();
+00049 int sigprocmask();
+00050 int gettimeofday_new();
+00051 int fstat();
+00052 int ioctl();
+00053 
+00054 #define  invalid_call    0x0
+00055 #define  PSL_C           0x00000001      /* carry bit */
+00056 #define  EJUSTRETURN     (-2)            /* don't modify regs, just return */
+00057 #define  ERESTART        (-1)            /* restart syscall */
+00058 
+00059 typedef int (*functionPTR)();
+00060 
+00061 functionPTR systemCalls_new[] = {
+00062   invalid_call,         
+00063   sysExit,              
+00064   invalid_call,         
+00065   invalid_call,         
+00066   sys_write,            
+00067   invalid_call,         
+00068   close,                
+00069   invalid_call,         
+00070   invalid_call,         
+00071   invalid_call,         
+00072   invalid_call,         
+00073   invalid_call,         
+00074   invalid_call,         
+00075   invalid_call,         
+00076   invalid_call,         
+00077   invalid_call,         
+00078   invalid_call,         
+00079   obreak,               
+00080   invalid_call,         
+00081   invalid_call,         
+00082   getpid,               
+00083   invalid_call,         
+00084   invalid_call,         
+00085   invalid_call,         
+00086   getuid,               
+00087   invalid_call,         
+00088   invalid_call,         
+00089   invalid_call,         
+00090   invalid_call,         
+00091   invalid_call,         
+00092   invalid_call,         
+00093   invalid_call,         
+00094   invalid_call,         
+00095   invalid_call,         
+00096   invalid_call,         
+00097   invalid_call,         
+00098   invalid_call,         
+00099   invalid_call,         
+00100   invalid_call,         
+00101   invalid_call,         
+00102   invalid_call,         
+00103   invalid_call,         
+00104   pipe,                 
+00105   invalid_call,         
+00106   invalid_call,         
+00107   invalid_call,         
+00108   invalid_call,         
+00109   getgid,               
+00110   invalid_call,         
+00111   invalid_call,         
+00112   invalid_call,         
+00113   invalid_call,         
+00114   invalid_call,         
+00115   invalid_call,         
+00116   ioctl,                
+00117   invalid_call,         
+00118   invalid_call,         
+00119   invalid_call,         
+00120   readlink,             
+00121   invalid_call,         
+00122   invalid_call,         
+00123   invalid_call,         
+00124   invalid_call,         
+00125   invalid_call,         
+00126   invalid_call,         
+00127   invalid_call,         
+00128   invalid_call,         
+00129   invalid_call,         
+00130   invalid_call,         
+00131   invalid_call,         
+00132   invalid_call,         
+00133   invalid_call,         
+00134   invalid_call,         
+00135   munmap,               
+00136   invalid_call,         
+00137   invalid_call,         
+00138   invalid_call,         
+00139   invalid_call,         
+00140   invalid_call,         
+00141   invalid_call,         
+00142   invalid_call,         
+00143   invalid_call,         
+00144   invalid_call,         
+00145   invalid_call,         
+00146   invalid_call,         
+00147   invalid_call,         
+00148   invalid_call,         
+00149   invalid_call,         
+00150   invalid_call,         
+00151   getdtablesize,        
+00152   invalid_call,         
+00153   invalid_call,         
+00154   fcntl,                
+00155   invalid_call,         
+00156   invalid_call,         
+00157   invalid_call,         
+00158   invalid_call,         
+00159   invalid_call,         
+00160   invalid_call,         
+00161   invalid_call,         
+00162   invalid_call,         
+00163   invalid_call,         
+00164   invalid_call,         
+00165   invalid_call,         
+00166   invalid_call,         
+00167   invalid_call,         
+00168   invalid_call,         
+00169   invalid_call,         
+00170   invalid_call,         
+00171   invalid_call,         
+00172   invalid_call,         
+00173   invalid_call,         
+00174   invalid_call,         
+00175   invalid_call,         
+00176   invalid_call,         
+00177   invalid_call,         
+00178   gettimeofday_new,     
+00179   invalid_call,         
+00180   invalid_call,         
+00181   invalid_call,         
+00182   invalid_call,         
+00183   invalid_call,         
+00184   invalid_call,         
+00185   invalid_call,         
+00186   invalid_call,         
+00187   invalid_call,         
+00188   invalid_call,         
+00189   invalid_call,         
+00190   invalid_call,         
+00191   invalid_call,         
+00192   invalid_call,         
+00193   invalid_call,         
+00194   invalid_call,         
+00195   invalid_call,         
+00196   invalid_call,         
+00197   invalid_call,         
+00198   invalid_call,         
+00199   invalid_call,         
+00200   invalid_call,         
+00201   invalid_call,         
+00202   invalid_call,         
+00203   invalid_call,         
+00204   invalid_call,         
+00205   invalid_call,         
+00206   invalid_call,         
+00207   invalid_call,         
+00208   invalid_call,         
+00209   invalid_call,         
+00210   invalid_call,         
+00211   invalid_call,         
+00212   invalid_call,         
+00213   invalid_call,         
+00214   invalid_call,         
+00215   invalid_call,         
+00216   invalid_call,         
+00217   invalid_call,         
+00218   invalid_call,         
+00219   invalid_call,         
+00220   invalid_call,         
+00221   invalid_call,         
+00222   invalid_call,         
+00223   invalid_call,         
+00224   invalid_call,         
+00225   invalid_call,         
+00226   invalid_call,         
+00227   invalid_call,         
+00228   invalid_call,         
+00229   invalid_call,         
+00230   invalid_call,         
+00231   invalid_call,         
+00232   invalid_call,         
+00233   invalid_call,         
+00234   invalid_call,         
+00235   invalid_call,         
+00236   invalid_call,         
+00237   invalid_call,         
+00238   invalid_call,         
+00239   invalid_call,         
+00240   invalid_call,         
+00241   invalid_call,         
+00242   invalid_call,         
+00243   invalid_call,         
+00244   invalid_call,         
+00245   invalid_call,         
+00246   invalid_call,         
+00247   invalid_call,         
+00248   invalid_call,         
+00249   invalid_call,         
+00250   invalid_call,         
+00251   fstat,                
+00252   invalid_call,         
+00253   invalid_call,         
+00254   invalid_call,         
+00255   invalid_call,         
+00256   invalid_call,         
+00257   invalid_call,         
+00258   invalid_call,         
+00259   mmap,                 
+00260   invalid_call,         
+00261   invalid_call,         
+00262   invalid_call,         
+00263   invalid_call,         
+00264   __sysctl,             
+00265   invalid_call,         
+00266   invalid_call,         
+00267   invalid_call,         
+00268   invalid_call,         
+00269   invalid_call,         
+00270   invalid_call,         
+00271   invalid_call,         
+00272   invalid_call,         
+00273   invalid_call,         
+00274   invalid_call,         
+00275   invalid_call,         
+00276   invalid_call,         
+00277   invalid_call,         
+00278   invalid_call,         
+00279   invalid_call,         
+00280   invalid_call,         
+00281   invalid_call,         
+00282   invalid_call,         
+00283   invalid_call,         
+00284   invalid_call,         
+00285   invalid_call,         
+00286   invalid_call,         
+00287   invalid_call,         
+00288   invalid_call,         
+00289   invalid_call,         
+00290   invalid_call,         
+00291   invalid_call,         
+00292   invalid_call,         
+00293   invalid_call,         
+00294   invalid_call,         
+00295   invalid_call,         
+00296   invalid_call,         
+00297   invalid_call,         
+00298   invalid_call,         
+00299   invalid_call,         
+00300   invalid_call,         
+00301   invalid_call,         
+00302   invalid_call,         
+00303   invalid_call,         
+00304   invalid_call,         
+00305   invalid_call,         
+00306   invalid_call,         
+00307   invalid_call,         
+00308   invalid_call,         
+00309   invalid_call,         
+00310   invalid_call,         
+00311   invalid_call,         
+00312   invalid_call,         
+00313   invalid_call,         
+00314   invalid_call,         
+00315   issetugid,            
+00316   invalid_call,         
+00317   invalid_call,         
+00318   invalid_call,         
+00319   invalid_call,         
+00320   invalid_call,         
+00321   invalid_call,         
+00322   invalid_call,         
+00323   invalid_call,         
+00324   invalid_call,         
+00325   invalid_call,         
+00326   invalid_call,         
+00327   invalid_call,         
+00328   invalid_call,         
+00329   invalid_call,         
+00330   invalid_call,         
+00331   invalid_call,         
+00332   invalid_call,         
+00333   invalid_call,         
+00334   invalid_call,         
+00335   invalid_call,         
+00336   invalid_call,         
+00337   invalid_call,         
+00338   invalid_call,         
+00339   invalid_call,         
+00340   invalid_call,         
+00341   invalid_call,         
+00342   invalid_call,         
+00343   invalid_call,         
+00344   invalid_call,         
+00345   invalid_call,         
+00346   invalid_call,         
+00347   invalid_call,         
+00348   invalid_call,         
+00349   invalid_call,         
+00350   invalid_call,         
+00351   invalid_call,         
+00352   invalid_call,         
+00353   invalid_call,         
+00354   invalid_call,         
+00355   invalid_call,         
+00356   invalid_call,         
+00357   invalid_call,         
+00358   invalid_call,         
+00359   invalid_call,         
+00360   invalid_call,         
+00361   invalid_call,         
+00362   invalid_call,         
+00363   invalid_call,         
+00364   invalid_call,         
+00365   invalid_call,         
+00366   invalid_call,         
+00367   invalid_call,         
+00368   invalid_call,         
+00369   invalid_call,         
+00370   invalid_call,         
+00371   invalid_call,         
+00372   invalid_call,         
+00373   invalid_call,         
+00374   invalid_call,         
+00375   invalid_call,         
+00376   invalid_call,         
+00377   invalid_call,         
+00378   invalid_call,         
+00379   invalid_call,         
+00380   invalid_call,         
+00381   invalid_call,         
+00382   invalid_call,         
+00383   invalid_call,         
+00384   invalid_call,         
+00385   invalid_call,         
+00386   invalid_call,         
+00387   invalid_call,         
+00388   invalid_call,         
+00389   invalid_call,         
+00390   invalid_call,         
+00391   invalid_call,         
+00392   invalid_call,         
+00393   invalid_call,         
+00394   invalid_call,         
+00395   invalid_call,         
+00396   invalid_call,         
+00397   invalid_call,         
+00398   invalid_call,         
+00399   invalid_call,         
+00400   invalid_call,         
+00401   invalid_call,         
+00402   sigprocmask,          
+00403   invalid_call,         
+00404   invalid_call,         
+00405   invalid_call,         
+00406   invalid_call,         
+00407   invalid_call,         
+00408   invalid_call,         
+00409   invalid_call,         
+00410   invalid_call,         
+00411   invalid_call,         
+00412   invalid_call,         
+00413   invalid_call,         
+00414   invalid_call,         
+00415   invalid_call,         
+00416   invalid_call,         
+00417   invalid_call,         
+00418   invalid_call,         
+00419   invalid_call,         
+00420   invalid_call,         
+00421   invalid_call,         
+00422   invalid_call,         
+00423   invalid_call,         
+00424   invalid_call,         
+00425   invalid_call,         
+00426   invalid_call,         
+00427   invalid_call,         
+00428   invalid_call,         
+00429   invalid_call,         
+00430   invalid_call,         
+00431   invalid_call,         
+00432   invalid_call,         
+00433   invalid_call,         
+00434   invalid_call,         
+00435   invalid_call,         
+00436   invalid_call,         
+00437   invalid_call,         
+00438   invalid_call,         
+00439   invalid_call,         
+00440   invalid_call,         
+00441   invalid_call,         
+00442   invalid_call,         
+00443   invalid_call,         
+00444   invalid_call,         
+00445   invalid_call,         
+00446   invalid_call,         
+00447   invalid_call,         
+00448   invalid_call,         
+00449   invalid_call,         
+00450   invalid_call,         
+00451   invalid_call,         
+00452   invalid_call,         
+00453   invalid_call,         
+00454   invalid_call,         
+00455   invalid_call,         
+00456   invalid_call,         
+00457   invalid_call,         
+00458   invalid_call,         
+00459   invalid_call,         
+00460   invalid_call,         
+00461   invalid_call,         
+00462   invalid_call,         
+00463   invalid_call,         
+00464   invalid_call,         
+00465   invalid_call,         
+00466   invalid_call,         
+00467   invalid_call,         
+00468   invalid_call,         
+00469   invalid_call,         
+00470   invalid_call,         
+00471   invalid_call,         
+00472   invalid_call,         
+00473   invalid_call,         
+00474   invalid_call,         
+00475   invalid_call,         
+00476   invalid_call,         
+00477   invalid_call,         
+00478   sigaction,            
+00479   invalid_call,         
+00480   invalid_call,         
+00481   invalid_call,         
+00482   invalid_call,         
+00483   invalid_call,         
+00484   invalid_call,         
+00485   invalid_call,         
+00486   invalid_call,         
+00487   invalid_call,         
+00488   invalid_call,         
+00489   invalid_call,         
+00490   invalid_call,         
+00491   invalid_call,         
+00492   invalid_call,         
+00493   invalid_call,         
+00494   invalid_call,         
+00495   invalid_call,         
+00496   invalid_call,         
+00497   invalid_call,         
+00498   invalid_call,         
+00499   invalid_call,         
+00500   invalid_call,         
+00501   invalid_call,         
+00502   invalid_call,         
+00503   invalid_call,         
+00504   invalid_call,         
+00505   invalid_call,         
+00506   invalid_call,         
+00507   invalid_call,         
+00508   invalid_call,         
+00509   invalid_call,         
+00510   invalid_call,         
+00511   invalid_call,         
+00512   invalid_call,         
+00513   invalid_call,         
+00514   invalid_call,         
+00515   invalid_call,         
+00516   invalid_call,         
+00517   invalid_call,         
+00518   };
+00519 
+00520 int totalCalls_new = sizeof(systemCalls_new)/sizeof(functionPTR);
+00521 
+00522 #endif
+00523 
+00524 /***
+00525  END
+00526  ***/
+00527 
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/syscalls__new_8h.html b/doc/html/syscalls__new_8h.html new file mode 100644 index 0000000..8ce821c --- /dev/null +++ b/doc/html/syscalls__new_8h.html @@ -0,0 +1,615 @@ + + +UbixOS V2: src/sys/include/ubixos/syscalls_new.h File Reference + + + + +
+
+
+
+ +

syscalls_new.h File Reference

+

+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Defines

#define EJUSTRETURN   (-2)
#define ERESTART   (-1)
#define invalid_call   0x0
#define PSL_C   0x00000001

Typedefs

typedef int(*) functionPTR ()

Functions

int __sysctl ()
int close ()
int fcntl ()
int fstat ()
int getdtablesize ()
int getgid ()
int getpid ()
int gettimeofday_new ()
int getuid ()
int ioctl ()
int issetugid ()
int mmap ()
int munmap ()
int obreak ()
int pipe ()
int readlink ()
int sigaction ()
int sigprocmask ()
int sys_write ()
int sysExit ()

Variables

functionPTR systemCalls_new []
int totalCalls_new = sizeof(systemCalls_new)/sizeof(functionPTR)
+


Define Documentation

+ +
+
+ + + + +
#define EJUSTRETURN   (-2)
+
+
+ +

+ +

+Definition at line 56 of file syscalls_new.h. +

+Referenced by syscall(). +

+

+ +

+
+ + + + +
#define ERESTART   (-1)
+
+
+ +

+ +

+Definition at line 57 of file syscalls_new.h. +

+Referenced by syscall(). +

+

+ +

+
+ + + + +
#define invalid_call   0x0
+
+
+ +

+ +

+Definition at line 54 of file syscalls_new.h. +

+

+ +

+
+ + + + +
#define PSL_C   0x00000001
+
+
+ +

+ +

+Definition at line 55 of file syscalls_new.h. +

+Referenced by syscall(). +

+

+


Typedef Documentation

+ +
+
+ + + + +
typedef int(*) functionPTR()
+
+
+ +

+ +

+Definition at line 59 of file syscalls_new.h. +

+

+


Function Documentation

+ +
+
+ + + + + + + + +
int __sysctl (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
int close (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
int fcntl (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
int fstat (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
int getdtablesize (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
int getgid (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
int getpid (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
int gettimeofday_new (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
int getuid (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
int ioctl (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
int issetugid (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
int mmap (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
int munmap (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
int obreak (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
int pipe (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
int readlink (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
int sigaction (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
int sigprocmask (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
int sys_write (  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + +
int sysExit (  ) 
+
+
+ +

+ +

+

+


Variable Documentation

+ +
+ +
+ +

+ +

+Definition at line 61 of file syscalls_new.h. +

+Referenced by syscall(). +

+

+ +

+
+ + + + +
int totalCalls_new = sizeof(systemCalls_new)/sizeof(functionPTR)
+
+
+ +

+ +

+Definition at line 520 of file syscalls_new.h. +

+Referenced by syscall(). +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/sysproto_8h-source.html b/doc/html/sysproto_8h-source.html new file mode 100644 index 0000000..d79d2e5 --- /dev/null +++ b/doc/html/sysproto_8h-source.html @@ -0,0 +1,188 @@ + + +UbixOS V2: src/sys/include/sys/sysproto.h Source File + + + + +
+
+
+
+ +

sysproto.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _SYSPROTO_H
+00031 #define _SYSPROTO_H
+00032 
+00033 #include <sys/signal.h>
+00034 
+00035 typedef int register_t;
+00036 
+00037 #define PAD_(t) (sizeof(register_t) <= sizeof(t) ? \
+00038                 0 : sizeof(register_t) - sizeof(t))
+00039 
+00040 #if BYTE_ORDER == LITTLE_ENDIAN
+00041 #define PADL_(t)        0
+00042 #define PADR_(t)        PAD_(t)
+00043 #else
+00044 #define PADL_(t)        PAD_(t)
+00045 #define PADR_(t)        0
+00046 #endif
+00047 
+00048 
+00049 struct write_args {
+00050         char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
+00051         char buf_l_[PADL_(const void *)]; const void * buf; char buf_r_[PADR_(const void *)];
+00052         char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)];
+00053 };
+00054 
+00055 struct sysctl_args {
+00056         char name_l_[PADL_(int *)]; int * name; char name_r_[PADR_(int *)];
+00057         char namelen_l_[PADL_(u_int)]; u_int namelen; char namelen_r_[PADR_(u_int)];
+00058         char old_l_[PADL_(void *)]; void * old; char old_r_[PADR_(void *)];
+00059         char oldlenp_l_[PADL_(size_t *)]; size_t * oldlenp; char oldlenp_r_[PADR_(size_t *)];
+00060         char new_l_[PADL_(void *)]; void * new; char new_r_[PADR_(void *)];
+00061         char newlen_l_[PADL_(size_t)]; size_t newlen; char newlen_r_[PADR_(size_t)];
+00062 };
+00063 
+00064 struct getpid_args {
+00065         register_t dummy;
+00066 };
+00067 struct issetugid_args {
+00068         register_t dummy;
+00069 };
+00070 struct fcntl_args {
+00071         char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
+00072         char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)];
+00073         char arg_l_[PADL_(long)]; long arg; char arg_r_[PADR_(long)];
+00074 };
+00075 
+00076 struct pipe_args {
+00077   register_t dummy;
+00078   };
+00079 
+00080 struct readlink_args {
+00081         char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
+00082         char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)];
+00083         char count_l_[PADL_(int)]; int count; char count_r_[PADR_(int)];
+00084 };
+00085 
+00086 struct getuid_args {
+00087         register_t dummy;
+00088 };
+00089 
+00090 struct getgid_args {
+00091         register_t dummy;
+00092 };
+00093 struct close_args {
+00094         char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
+00095 };
+00096 
+00097 struct mmap_args {
+00098    char addr_l_[PADL_(caddr_t)]; caddr_t addr; char addr_r_[PADR_(caddr_t)];
+00099   char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)];
+00100   char prot_l_[PADL_(int)]; int prot; char prot_r_[PADR_(int)];
+00101   char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)];
+00102   char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
+00103   char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)];
+00104   char pos_l_[PADL_(off_t)]; off_t pos; char pos_r_[PADR_(off_t)];
+00105   };
+00106 
+00107 struct obreak_args {
+00108   char nsize_l_[PADL_(char *)];char * nsize;char nsize_r_[PADR_(char *)];
+00109   };
+00110 
+00111 struct sigaction_args {
+00112   char sig_l_[PADL_(int)]; int sig; char sig_r_[PADR_(int)];
+00113   char act_l_[PADL_(const struct sigaction *)]; const struct sigaction * act; char act_r_[PADR_(const struct sigaction *)];
+00114   char oact_l_[PADL_(struct sigaction *)]; struct sigaction * oact; char oact_r_[PADR_(struct sigaction *)];
+00115   };
+00116 
+00117 struct getdtablesize_args {
+00118         register_t dummy;
+00119 };
+00120 
+00121 struct munmap_args {
+00122         char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)];
+00123         char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)];
+00124 };
+00125 
+00126 struct sigprocmask_args {
+00127   char how_l_[PADL_(int)]; int how; char how_r_[PADR_(int)];
+00128   char set_l_[PADL_(const sigset_t *)]; const sigset_t * set; char set_r_[PADR_(const sigset_t *)];
+00129   char oset_l_[PADL_(sigset_t *)]; sigset_t * oset; char oset_r_[PADR_(sigset_t *)];
+00130   };
+00131 struct gettimeofday_args {
+00132   char tp_l_[PADL_(struct timeval *)]; struct timeval * tp; char tp_r_[PADR_(struct timeval *)];
+00133   char tzp_l_[PADL_(struct timezone *)]; struct timezone * tzp; char tzp_r_[PADR_(struct timezone *)];
+00134   };
+00135 struct fstat_args {
+00136         char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
+00137         char sb_l_[PADL_(struct stat *)]; struct stat * sb; char sb_r_[PADR_(struct stat *)];
+00138 };
+00139 struct ioctl_args {
+00140         char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
+00141         char com_l_[PADL_(u_long)]; u_long com; char com_r_[PADR_(u_long)];
+00142         char data_l_[PADL_(caddr_t)]; caddr_t data; char data_r_[PADR_(caddr_t)];
+00143 };
+00144 
+00145 
+00146 #endif
+00147 
+00148 /***
+00149  END
+00150  ***/
+00151 
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/sysproto_8h.html b/doc/html/sysproto_8h.html new file mode 100644 index 0000000..796b059 --- /dev/null +++ b/doc/html/sysproto_8h.html @@ -0,0 +1,181 @@ + + +UbixOS V2: src/sys/include/sys/sysproto.h File Reference + + + + +
+
+
+
+ +

sysproto.h File Reference

+

+#include <sys/signal.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  close_args
struct  fcntl_args
struct  fstat_args
struct  getdtablesize_args
struct  getgid_args
struct  getpid_args
struct  gettimeofday_args
struct  getuid_args
struct  ioctl_args
struct  issetugid_args
struct  mmap_args
struct  munmap_args
struct  obreak_args
struct  pipe_args
struct  readlink_args
struct  sigaction_args
struct  sigprocmask_args
struct  sysctl_args
struct  write_args

Defines

#define PAD_(t)
#define PADL_(t)   0
#define PADR_(t)   PAD_(t)

Typedefs

typedef int register_t
+


Define Documentation

+ +
+
+ + + + + + + + + +
#define PAD_ (  ) 
+
+
+ +

+Value:

(sizeof(register_t) <= sizeof(t) ? \
+                0 : sizeof(register_t) - sizeof(t))
+
+

+Definition at line 37 of file sysproto.h. +

+

+ +

+
+ + + + + + + + + +
#define PADL_ (  )    0
+
+
+ +

+ +

+Definition at line 41 of file sysproto.h. +

+

+ +

+
+ + + + + + + + + +
#define PADR_ (  )    PAD_(t)
+
+
+ +

+ +

+Definition at line 42 of file sysproto.h. +

+

+


Typedef Documentation

+ +
+
+ + + + +
typedef int register_t
+
+
+ +

+ +

+Definition at line 35 of file sysproto.h. +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/system_8c-source.html b/doc/html/system_8c-source.html new file mode 100644 index 0000000..cab5048 --- /dev/null +++ b/doc/html/system_8c-source.html @@ -0,0 +1,296 @@ + + +UbixOS V2: src/sys/mpi/system.c Source File + + + + +
+
+
+
+ +

system.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2005 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <mpi/mpi.h>
+00031 #include <lib/kmalloc.h>
+00032 #include <lib/string.h>
+00033 #include <ubixos/spinlock.h>
+00034 
+00035 static mpi_mbox_t  *mboxList    = 0x0;
+00036 static spinLock_t  mpiSpinLock = SPIN_LOCK_INITIALIZER;
+00037 
+00038 /*****************************************************************************************
+00039 
+00040  Function: static mpiMbox_t * mpiFindMbox(char *name)
+00041 
+00042  Description: This function will find a mail box that matches the supplied name
+00043 
+00044  Notes: This function is not task-safe!  Lock must be done before call.
+00045 
+00046 *****************************************************************************************/
+00047 static mpi_mbox_t * mpi_findMbox(char *name) {
+00048   mpi_mbox_t *mbox = 0x0;
+00049   
+00050   for (mbox = mboxList;mbox;mbox = mbox->next) {
+00051     if (!strcmp(mbox->name,name)) {
+00052        return(mbox);
+00053        }
+00054     }
+00055 
+00056   return(0x0);
+00057   }
+00058 
+00059 /*****************************************************************************************
+00060 
+00061  Function: int mpiCreateMbox(char *name)
+00062 
+00063  Description: This function will create a new mailbox if it fails it will return -1
+00064               otherwise it returns 0x0
+00065 
+00066  Notes:
+00067 
+00068 *****************************************************************************************/
+00069 int mpi_createMbox(char *name) {
+00070   mpi_mbox_t *mbox = 0x0;
+00071 
+00072   spinLock(&mpiSpinLock);
+00073   if (mpi_findMbox(name) != 0x0) {
+00074     spinUnlock(&mpiSpinLock);
+00075     return(-1);
+00076     }
+00077 
+00078   mbox = (mpi_mbox_t *)kmalloc(sizeof(mpi_mbox_t));
+00079 
+00080   sprintf(mbox->name,name);
+00081   mbox->pid = _current->id;
+00082 
+00083   if (mboxList == 0x0) {
+00084     mbox->prev = 0x0;
+00085     mbox->next = 0x0;
+00086     mboxList   = mbox;
+00087     }
+00088   else {
+00089     mbox->next     = mboxList;
+00090     mbox->prev     = 0x0;
+00091     mboxList->prev = mbox;
+00092     mboxList       = mbox;
+00093     }
+00094 
+00095   spinUnlock(&mpiSpinLock);
+00096   return(0x0);
+00097   }
+00098 
+00099 /*****************************************************************************************
+00100 
+00101  Function: int mpiSpam(uInt32 type,void *data)
+00102 
+00103  Description: This function will send a message to every mailbox
+00104 
+00105  Notes:
+00106 
+00107 *****************************************************************************************/
+00108 int mpi_spam(uInt32 type,void *data) {
+00109   mpi_mbox_t    *mbox    = 0x0;
+00110   mpi_message_t *message = 0x0;
+00111  
+00112   spinLock(&mpiSpinLock);
+00113 
+00114   for (mbox = mboxList;mbox;mbox = mbox->next) {
+00115     message = (mpi_message_t *)kmalloc(sizeof(mpi_message_t));
+00116 
+00117     message->header = type;
+00118     memcpy(message->data,data,MESSAGE_LENGTH);
+00119     message->next = 0x0;
+00120 
+00121     if (mbox->msg == 0x0) {
+00122       mbox->msg       = message;
+00123       }
+00124     else {
+00125       mbox->msgLast->next = message;
+00126       mbox->msgLast       = message;
+00127       }
+00128     }
+00129 
+00130   spinUnlock(&mpiSpinLock);
+00131   return(0x0);
+00132   }
+00133 
+00134 /*****************************************************************************************
+00135 
+00136  Function: int mpiPostMessage(char *name,uInt32 type,void *data)
+00137 
+00138  Description: This function will post a message to specified mailbox
+00139 
+00140  Notes:
+00141 
+00142 *****************************************************************************************/
+00143 int mpi_postMessage(char *name,uInt32 type,mpi_message_t *msg) {
+00144   mpi_mbox_t    *mbox    = 0x0;
+00145   mpi_message_t *message = 0x0;
+00146 
+00147   spinLock(&mpiSpinLock);
+00148 
+00149   mbox = mpi_findMbox(name);
+00150 
+00151   if (mbox == 0x0) {
+00152     spinUnlock(&mpiSpinLock);
+00153     return(0x1);
+00154     }
+00155 
+00156   message = (mpi_message_t *)kmalloc(sizeof(mpi_message_t));
+00157 
+00158   message->header = msg->header;
+00159   memcpy(message->data,msg->data,MESSAGE_LENGTH);
+00160   message->pid    = _current->id;
+00161   message->next = 0x0;
+00162 
+00163   if (mbox->msg == 0x0) {
+00164     mbox->msg       = message;
+00165     }
+00166   else {
+00167     mbox->msgLast->next = message;
+00168     mbox->msgLast       = message;
+00169     }
+00170 
+00171   spinUnlock(&mpiSpinLock);
+00172   
+00173   if (type == 0x2) {
+00174     while (mbox->msgLast != 0x0);
+00175     }
+00176     
+00177   return(0x0);
+00178   }
+00179 
+00180 /*****************************************************************************************
+00181 
+00182  Function: int mpiFetchMessage(char *name,mpiMessage_t *msg)
+00183 
+00184  Description: This function will fetch the next message out of the specified mailbox
+00185 
+00186  Notes:
+00187 
+00188 *****************************************************************************************/
+00189 int mpi_fetchMessage(char *name,mpi_message_t *msg) {
+00190   mpi_mbox_t    *mbox   = 0x0;
+00191   mpi_message_t *tmpMsg = 0x0;
+00192 
+00193   spinLock(&mpiSpinLock);
+00194 
+00195   mbox = mpi_findMbox(name);
+00196 
+00197   if (mbox == 0x0) {
+00198     spinUnlock(&mpiSpinLock);
+00199     return(-1);
+00200     }
+00201 
+00202   if (mbox->msg == 0x0) {
+00203     spinUnlock(&mpiSpinLock);
+00204     return(-1);
+00205     }
+00206 
+00207   if (mbox->pid != _current->id) {
+00208     spinUnlock(&mpiSpinLock);
+00209     return(-1);
+00210     }
+00211 
+00212   msg->header = mbox->msg->header;
+00213   memcpy(msg->data,mbox->msg->data,MESSAGE_LENGTH);
+00214   msg->pid    = mbox->msg->pid;
+00215 
+00216   tmpMsg    = mbox->msg;
+00217   mbox->msg = mbox->msg->next;
+00218   
+00219   kfree(tmpMsg);
+00220 
+00221   spinUnlock(&mpiSpinLock);
+00222   return(0x0);
+00223   }
+00224 
+00225 /*****************************************************************************************
+00226 
+00227  Function: int mpiDestroyMbox(char *name)
+00228 
+00229  Description: This function will fetch the next message out of the specified mailbox
+00230 
+00231  Notes:
+00232 
+00233 *****************************************************************************************/
+00234 int mpi_destroyMbox(char *name) {
+00235   mpi_mbox_t    *mbox   = 0x0;
+00236 
+00237   spinLock(&mpiSpinLock);
+00238 
+00239   for (mbox = mboxList;mbox;mbox=mbox->next) {
+00240     if (!strcmp(mbox->name,name)) {
+00241       if (mbox->pid != _current->id) {
+00242         spinUnlock(&mpiSpinLock);
+00243         return(-1);
+00244         }
+00245       mbox->prev->next = mbox->next;
+00246       mbox->next->prev = mbox->prev;
+00247       kfree(mbox);
+00248       spinUnlock(&mpiSpinLock);
+00249       return(0x0);
+00250       }
+00251     }
+00252 
+00253   spinUnlock(&mpiSpinLock);
+00254   return(-1);
+00255   }
+00256 
+00257 /***
+00258  END
+00259  ***/
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/system_8c.html b/doc/html/system_8c.html new file mode 100644 index 0000000..1542b20 --- /dev/null +++ b/doc/html/system_8c.html @@ -0,0 +1,295 @@ + + +UbixOS V2: src/sys/mpi/system.c File Reference + + + + +
+
+
+
+ +

system.c File Reference

+

+#include <mpi/mpi.h>
+#include <lib/kmalloc.h>
+#include <lib/string.h>
+#include <ubixos/spinlock.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + +

Functions

int mpi_createMbox (char *name)
int mpi_destroyMbox (char *name)
int mpi_fetchMessage (char *name, mpi_message_t *msg)
static mpi_mbox_tmpi_findMbox (char *name)
int mpi_postMessage (char *name, uInt32 type, mpi_message_t *msg)
int mpi_spam (uInt32 type, void *data)

Variables

static mpi_mbox_tmboxList = 0x0
static spinLock_t mpiSpinLock = SPIN_LOCK_INITIALIZER
+


Function Documentation

+ +
+
+ + + + + + + + + +
int mpi_createMbox (char *  name  ) 
+
+ +

+ +

+
+ + + + + + + + + +
int mpi_destroyMbox (char *  name  ) 
+
+
+ +

+ +

+Definition at line 234 of file system.c. +

+References _current, taskStruct::id, kfree(), mbox, mboxList, mpiSpinLock, spinLock(), spinUnlock(), and strcmp(). +

+Referenced by sysMpiDestroyMbox(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int mpi_fetchMessage (char *  name,
mpi_message_t msg 
)
+
+ +

+ +

+
+ + + + + + + + + +
static mpi_mbox_t* mpi_findMbox (char *  name  )  [static]
+
+
+ +

+ +

+Definition at line 47 of file system.c. +

+References mbox, mboxList, and strcmp(). +

+Referenced by mpi_createMbox(), mpi_fetchMessage(), and mpi_postMessage(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int mpi_postMessage (char *  name,
uInt32  type,
mpi_message_t msg 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
int mpi_spam (uInt32  type,
void *  data 
)
+
+ +

+


Variable Documentation

+ +
+
+ + + + +
mpi_mbox_t* mboxList = 0x0 [static]
+
+
+ +

+ +

+Definition at line 35 of file system.c. +

+Referenced by mpi_createMbox(), mpi_destroyMbox(), mpi_findMbox(), and mpi_spam(). +

+

+ +

+
+ + + + +
spinLock_t mpiSpinLock = SPIN_LOCK_INITIALIZER [static]
+
+
+ +

+ +

+Definition at line 36 of file system.c. +

+Referenced by mpi_createMbox(), mpi_destroyMbox(), mpi_fetchMessage(), mpi_postMessage(), and mpi_spam(). +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/systemtask_8c-source.html b/doc/html/systemtask_8c-source.html new file mode 100644 index 0000000..fdeec5a --- /dev/null +++ b/doc/html/systemtask_8c-source.html @@ -0,0 +1,160 @@ + + +UbixOS V2: src/sys/kernel/systemtask.c Source File + + + + +
+
+
+
+ +

systemtask.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <ubixos/systemtask.h>
+00031 #include <ubixos/kpanic.h>
+00032 #include <ubixos/vitals.h>
+00033 #include <ubixos/exec.h>
+00034 #include <ubixos/tty.h>
+00035 #include <ubixos/sched.h>
+00036 #include <lib/kmalloc.h>
+00037 #include <lib/kprintf.h>
+00038 #include <lib/bioscall.h>
+00039 #include <sde/sde.h>
+00040 #include <sys/io.h>
+00041 #include <vmm/vmm.h>
+00042 #include <mpi/mpi.h>
+00043 #include <string.h>
+00044 
+00045 static unsigned char  *videoBuffer = (char *)0xB8000;
+00046 
+00047 
+00048 void systemTask() {
+00049   mpi_message_t myMsg;
+00050   uInt32       counter  = 0x0;
+00051   int          i        = 0x0;
+00052   int          *x       = 0x0;
+00053   kTask_t      *tmpTask = 0x0;
+00054 
+00055   if (mpi_createMbox("system") != 0x0) {
+00056     kpanic("Error: Error creating mailbox: system\n");
+00057     }
+00058 
+00059   while(1) {
+00060     if (mpi_fetchMessage("system",&myMsg) == 0x0) {
+00061       kprintf("A");
+00062       switch(myMsg.header) {
+00063         case 0x69:
+00064           x = (int *)&myMsg.data;
+00065           kprintf("Switching to term: [%i][%i]\n",*x,myMsg.pid);
+00066           schedFindTask(myMsg.pid)->term = tty_find(*x);
+00067           break;
+00068         case 1000:
+00069           kprintf("Restarting the system in 5 seconds\n");
+00070           counter = systemVitals->sysUptime + 5;
+00071           while (systemVitals->sysUptime < counter) {
+00072             sched_yield();
+00073             }
+00074           kprintf("Rebooting NOW!!!\n");
+00075           while(inportByte(0x64) & 0x02);
+00076           outportByte(0x64, 0xFE);
+00077           break;
+00078         case 31337:
+00079            kprintf("system: backdoor opened\n");
+00080            break;       
+00081         case 0x80:
+00082            if (!strcmp(myMsg.data,"sdeStart")) {
+00083              kprintf("Starting SDE\n");
+00084              //execThread(sdeThread,(uInt32)(kmalloc(0x2000)+0x2000),0x0);
+00085              }
+00086            else if (!strcmp(myMsg.data,"freePage")) {
+00087              kprintf("Free Page: %i\n",systemVitals->freePages);
+00088              }
+00089            else if (!strcmp(myMsg.data,"sdeStop")) {
+00090              printOff = 0x0;
+00091              biosCall(0x10,0x3,0x0,0x0,0x0,0x0,0x0,0x0,0x0);
+00092              for (i=0x0;i<100;i++) asm("hlt");
+00093              }
+00094            break;
+00095         default:
+00096           kprintf("system: Received message %i:%s\n",myMsg.header,myMsg.data);
+00097           break;
+00098         }
+00099       }
+00100 
+00101     /*
+00102      Here we get the next task from the delete task queue 
+00103      we first check to see if it has an fd attached for the binary and after that 
+00104      we free the pages for the process and then free the task 
+00105     */
+00106     tmpTask = sched_getDelTask();    
+00107     if (tmpTask != 0x0) {
+00108       if (tmpTask->imageFd != 0x0)
+00109         fclose(tmpTask->imageFd);
+00110       vmmFreeProcessPages(tmpTask->id);
+00111       kfree(tmpTask);
+00112       }
+00113     videoBuffer[0] = systemVitals->sysTicks;     
+00114     sched_yield();
+00115     }    
+00116   
+00117   return;
+00118   }
+00119 
+00120 /***
+00121  END
+00122  ***/
+00123 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/systemtask_8c.html b/doc/html/systemtask_8c.html new file mode 100644 index 0000000..a100ea5 --- /dev/null +++ b/doc/html/systemtask_8c.html @@ -0,0 +1,110 @@ + + +UbixOS V2: src/sys/kernel/systemtask.c File Reference + + + + +
+
+
+
+ +

systemtask.c File Reference

+

+#include <ubixos/systemtask.h>
+#include <ubixos/kpanic.h>
+#include <ubixos/vitals.h>
+#include <ubixos/exec.h>
+#include <ubixos/tty.h>
+#include <ubixos/sched.h>
+#include <lib/kmalloc.h>
+#include <lib/kprintf.h>
+#include <lib/bioscall.h>
+#include <sde/sde.h>
+#include <sys/io.h>
+#include <vmm/vmm.h>
+#include <mpi/mpi.h>
+#include <string.h>
+ +

+Go to the source code of this file. + + + + + + + +

Functions

void systemTask ()

Variables

static unsigned char * videoBuffer = (char *)0xB8000
+


Function Documentation

+ +
+
+ + + + + + + + +
void systemTask (  ) 
+
+ +

+


Variable Documentation

+ +
+
+ + + + +
unsigned char* videoBuffer = (char *)0xB8000 [static]
+
+
+ +

+ +

+Definition at line 45 of file systemtask.c. +

+Referenced by backSpace(), clearScreen(), kprint(), and systemTask(). +

+

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/systemtask_8h-source.html b/doc/html/systemtask_8h-source.html new file mode 100644 index 0000000..3ced054 --- /dev/null +++ b/doc/html/systemtask_8h-source.html @@ -0,0 +1,98 @@ + + +UbixOS V2: src/sys/include/ubixos/systemtask.h Source File + + + + +
+
+
+
+ +

systemtask.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _SYSTEMTASK_H
+00031 #define _SYSTEMTASK_H
+00032 
+00033 #include <ubixos/types.h>
+00034 
+00035 void systemTask();
+00036 
+00037 #endif
+00038 
+00039 /***
+00040  $Log$
+00041  Revision 1.1.1.1  2006/06/01 12:46:14  reddawg
+00042  ubix2
+00043 
+00044  Revision 1.2  2005/10/12 00:13:37  reddawg
+00045  Removed
+00046 
+00047  Revision 1.1.1.1  2005/09/26 17:23:56  reddawg
+00048  no message
+00049 
+00050  Revision 1.2  2004/06/04 17:49:32  reddawg
+00051  Wont work with out the makefile updated
+00052 
+00053  Revision 1.1  2004/06/04 17:33:33  reddawg
+00054  Changed idle task to system task
+00055 
+00056  Revision 1.2  2004/05/21 15:20:00  reddawg
+00057  Cleaned up
+00058 
+00059 
+00060  END
+00061  ***/
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/systemtask_8h.html b/doc/html/systemtask_8h.html new file mode 100644 index 0000000..5a038a6 --- /dev/null +++ b/doc/html/systemtask_8h.html @@ -0,0 +1,74 @@ + + +UbixOS V2: src/sys/include/ubixos/systemtask.h File Reference + + + + +
+
+
+
+ +

systemtask.h File Reference

+

+#include <ubixos/types.h>
+ +

+Go to the source code of this file. + + + + +

Functions

void systemTask ()
+


Function Documentation

+ +
+
+ + + + + + + + +
void systemTask (  ) 
+
+ +

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/tcp_8h-source.html b/doc/html/tcp_8h-source.html new file mode 100644 index 0000000..c08316c --- /dev/null +++ b/doc/html/tcp_8h-source.html @@ -0,0 +1,438 @@ + + +UbixOS V2: src/sys/include/net/tcp.h Source File + + + + +
+
+
+
+ +

tcp.h

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 #ifndef __LWIP_TCP_H__
+00036 #define __LWIP_TCP_H__
+00037 
+00038 #include "net/sys.h"
+00039 #include "net/mem.h"
+00040 
+00041 #include "net/pbuf.h"
+00042 #include "net/opt.h"
+00043 //UBU
+00044 #include "net/ipv4/ip.h"
+00045 //UBU
+00046 #include "net/ipv4/icmp.h"
+00047 
+00048 #include "net/sys.h"
+00049 
+00050 #include "net/err.h"
+00051 
+00052 struct tcp_pcb;
+00053 
+00054 /* Functions for interfacing with TCP: */
+00055 
+00056 /* Lower layer interface to TCP: */
+00057 void             tcp_init    (void);  /* Must be called first to
+00058                                          initialize TCP. */
+00059 void             tcp_tmr     (void);  /* Must be called every
+00060                                          TCP_TMR_INTERVAL
+00061                                          ms. (Typically 100 ms). */
+00062 /* Application program's interface: */
+00063 struct tcp_pcb * tcp_new     (void);
+00064 
+00065 void             tcp_arg     (struct tcp_pcb *pcb, void *arg);
+00066 void             tcp_accept  (struct tcp_pcb *pcb,
+00067                               err_t (* accept)(void *arg, struct tcp_pcb *newpcb,
+00068                                                err_t err));
+00069 void             tcp_recv    (struct tcp_pcb *pcb,
+00070                               err_t (* recv)(void *arg, struct tcp_pcb *tpcb,
+00071                                   struct pbuf *p, err_t err));
+00072 void             tcp_sent    (struct tcp_pcb *pcb,
+00073                               err_t (* sent)(void *arg, struct tcp_pcb *tpcb,
+00074                                              uInt16 len));
+00075 void             tcp_poll    (struct tcp_pcb *pcb,
+00076                               err_t (* poll)(void *arg, struct tcp_pcb *tpcb),
+00077                               uInt8 interval);
+00078 void             tcp_err     (struct tcp_pcb *pcb,
+00079                               void (* err)(void *arg, err_t err));
+00080 
+00081 #define          tcp_sndbuf(pcb)   ((pcb)->snd_buf)
+00082 
+00083 void             tcp_recved  (struct tcp_pcb *pcb, uInt16 len);
+00084 err_t            tcp_bind    (struct tcp_pcb *pcb, struct ip_addr *ipaddr,
+00085                               uInt16 port);
+00086 err_t            tcp_connect (struct tcp_pcb *pcb, struct ip_addr *ipaddr,
+00087                               uInt16 port, err_t (* connected)(void *arg,
+00088                                                               struct tcp_pcb *tpcb,
+00089                                                               err_t err));
+00090 struct tcp_pcb * tcp_listen  (struct tcp_pcb *pcb);
+00091 void             tcp_abort   (struct tcp_pcb *pcb);
+00092 err_t            tcp_close   (struct tcp_pcb *pcb);
+00093 err_t            tcp_write   (struct tcp_pcb *pcb, const void *dataptr, uInt16 len,
+00094                               uInt8 copy);
+00095 
+00096 /* It is also possible to call these two functions at the right
+00097    intervals (instead of calling tcp_tmr()). */
+00098 void             tcp_slowtmr (void);
+00099 void             tcp_fasttmr (void);
+00100 
+00101 
+00102 /* Only used by IP to pass a TCP segment to TCP: */
+00103 void             tcp_input   (struct pbuf *p, struct netif *inp);
+00104 /* Used within the TCP code only: */
+00105 err_t            tcp_output  (struct tcp_pcb *pcb);
+00106 
+00107 
+00108 
+00109 
+00110 #define TCP_SEQ_LT(a,b)     ((Int32)((a)-(b)) < 0)
+00111 #define TCP_SEQ_LEQ(a,b)    ((Int32)((a)-(b)) <= 0)
+00112 #define TCP_SEQ_GT(a,b)     ((Int32)((a)-(b)) > 0)
+00113 #define TCP_SEQ_GEQ(a,b)    ((Int32)((a)-(b)) >= 0)
+00114 
+00115 #define TCP_FIN 0x01
+00116 #define TCP_SYN 0x02
+00117 #define TCP_RST 0x04
+00118 #define TCP_PSH 0x08
+00119 #define TCP_ACK 0x10
+00120 #define TCP_URG 0x20
+00121 
+00122 /* Length of the TCP header, excluding options. */
+00123 #define TCP_HLEN 20
+00124 
+00125 #define TCP_TMR_INTERVAL       100  /* The TCP timer interval in
+00126                                        milliseconds. */
+00127 
+00128 #define TCP_FAST_INTERVAL      200  /* the fine grained timeout in
+00129                                        milliseconds */
+00130 #define TCP_SLOW_INTERVAL      500  /* the coarse grained timeout in
+00131                                        milliseconds */
+00132 #define TCP_FIN_WAIT_TIMEOUT 20000 /* milliseconds */
+00133 #define TCP_SYN_RCVD_TIMEOUT 20000 /* milliseconds */
+00134 
+00135 #define TCP_OOSEQ_TIMEOUT        6 /* x RTO */
+00136 
+00137 #define TCP_MSL 60000  /* The maximum segment lifetime in microseconds */
+00138 
+00139 struct tcp_hdr {
+00140   PACK_STRUCT_FIELD(uInt16 src);
+00141   PACK_STRUCT_FIELD(uInt16 dest);
+00142   PACK_STRUCT_FIELD(uInt32 seqno);
+00143   PACK_STRUCT_FIELD(uInt32 ackno);
+00144   PACK_STRUCT_FIELD(uInt16 _offset_flags);
+00145   PACK_STRUCT_FIELD(uInt16 wnd);
+00146   PACK_STRUCT_FIELD(uInt16 chksum);
+00147   PACK_STRUCT_FIELD(uInt16 urgp);
+00148 } PACK_STRUCT_STRUCT;
+00149 
+00150 #define TCPH_OFFSET(hdr) (NTOHS((hdr)->_offset_flags) >> 8)
+00151 #define TCPH_FLAGS(hdr) (NTOHS((hdr)->_offset_flags) & 0xff)
+00152 
+00153 #define TCPH_OFFSET_SET(hdr, offset) (hdr)->_offset_flags = HTONS(((offset) << 8) | TCPH_FLAGS(hdr))
+00154 #define TCPH_FLAGS_SET(hdr, flags) (hdr)->_offset_flags = HTONS((TCPH_OFFSET(hdr) << 8) | (flags))
+00155 
+00156 #define TCP_TCPLEN(seg) ((seg)->len + ((TCPH_FLAGS((seg)->tcphdr) & TCP_FIN || \
+00157                                         TCPH_FLAGS((seg)->tcphdr) & TCP_SYN)? 1: 0))
+00158 
+00159 enum tcp_state {
+00160   CLOSED      = 0,
+00161   LISTEN      = 1,
+00162   SYN_SENT    = 2,
+00163   SYN_RCVD    = 3,
+00164   ESTABLISHED = 4,
+00165   FIN_WAIT_1  = 5,
+00166   FIN_WAIT_2  = 6,
+00167   CLOSE_WAIT  = 7,
+00168   CLOSING     = 8,
+00169   LAST_ACK    = 9,
+00170   TIME_WAIT   = 10
+00171 };
+00172 
+00173 
+00174 /* the TCP protocol control block */
+00175 struct tcp_pcb {
+00176   struct tcp_pcb *next;   /* for the linked list */
+00177 
+00178   enum tcp_state state;   /* TCP state */
+00179 
+00180   void *callback_arg;
+00181   
+00182   /* Function to call when a listener has been connected. */
+00183   err_t (* accept)(void *arg, struct tcp_pcb *newpcb, err_t err);
+00184 
+00185   struct ip_addr local_ip;
+00186   uInt16 local_port;
+00187   
+00188   struct ip_addr remote_ip;
+00189   uInt16 remote_port;
+00190   
+00191   /* receiver varables */
+00192   uInt32 rcv_nxt;   /* next seqno expected */
+00193   uInt16 rcv_wnd;   /* receiver window */
+00194 
+00195   /* Timers */
+00196   uInt16 tmr;
+00197 
+00198   /* Retransmission timer. */
+00199   uInt8 rtime;
+00200   
+00201   uInt16 mss;   /* maximum segment size */
+00202 
+00203   uInt8 flags;
+00204 #define TF_ACK_DELAY 0x01   /* Delayed ACK. */
+00205 #define TF_ACK_NOW   0x02   /* Immediate ACK. */
+00206 #define TF_INFR      0x04   /* In fast recovery. */
+00207 #define TF_RESET     0x08   /* Connection was reset. */
+00208 #define TF_CLOSED    0x10   /* Connection was sucessfully closed. */
+00209 #define TF_GOT_FIN   0x20   /* Connection was closed by the remote end. */
+00210   
+00211   /* RTT estimation variables. */
+00212   uInt16 rttest; /* RTT estimate in 500ms ticks */
+00213   uInt32 rtseq;  /* sequence number being timed */
+00214   Int32 sa, sv;
+00215 
+00216   uInt16 rto;    /* retransmission time-out */
+00217   uInt8 nrtx;    /* number of retransmissions */
+00218 
+00219   /* fast retransmit/recovery */
+00220   uInt32 lastack; /* Highest acknowledged seqno. */
+00221   uInt8 dupacks;
+00222   
+00223   /* congestion avoidance/control variables */
+00224   uInt16 cwnd;  
+00225   uInt16 ssthresh;
+00226 
+00227   /* sender variables */
+00228   uInt32 snd_nxt,       /* next seqno to be sent */
+00229     snd_max,       /* Highest seqno sent. */
+00230     snd_wnd,       /* sender window */
+00231     snd_wl1, snd_wl2,
+00232     snd_lbb;      
+00233 
+00234   uInt16 snd_buf;   /* Avaliable buffer space for sending. */
+00235   uInt8 snd_queuelen;
+00236 
+00237   /* Function to be called when more send buffer space is avaliable. */
+00238   err_t (* sent)(void *arg, struct tcp_pcb *pcb, uInt16 space);
+00239   uInt16 acked;
+00240   
+00241   /* Function to be called when (in-sequence) data has arrived. */
+00242   err_t (* recv)(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err);
+00243   struct pbuf *recv_data;
+00244 
+00245   /* Function to be called when a connection has been set up. */
+00246   err_t (* connected)(void *arg, struct tcp_pcb *pcb, err_t err);
+00247 
+00248   /* Function which is called periodically. */
+00249   err_t (* poll)(void *arg, struct tcp_pcb *pcb);
+00250 
+00251   /* Function to be called whenever a fatal error occurs. */
+00252   void (* errf)(void *arg, err_t err);
+00253   
+00254   uInt8 polltmr, pollinterval;
+00255   
+00256   /* These are ordered by sequence number: */
+00257   struct tcp_seg *unsent;   /* Unsent (queued) segments. */
+00258   struct tcp_seg *unacked;  /* Sent but unacknowledged segments. */
+00259 #if TCP_QUEUE_OOSEQ  
+00260   struct tcp_seg *ooseq;    /* Received out of sequence segments. */
+00261 #endif /* TCP_QUEUE_OOSEQ */
+00262 
+00263 };
+00264 
+00265 struct tcp_pcb_listen {  
+00266   struct tcp_pcb_listen *next;   /* for the linked list */
+00267   
+00268   enum tcp_state state;   /* TCP state */
+00269 
+00270   void *callback_arg;
+00271   
+00272   /* Function to call when a listener has been connected. */
+00273   void (* accept)(void *arg, struct tcp_pcb *newpcb);
+00274 
+00275   struct ip_addr local_ip;
+00276   uInt16 local_port;
+00277 };
+00278 
+00279 /* This structure is used to repressent TCP segments. */
+00280 struct tcp_seg {
+00281   struct tcp_seg *next;    /* used when putting segements on a queue */
+00282   struct pbuf *p;          /* buffer containing data + TCP header */
+00283   void *dataptr;           /* pointer to the TCP data in the pbuf */
+00284   uInt16 len;               /* the TCP length of this segment */
+00285   struct tcp_hdr *tcphdr;  /* the TCP header */
+00286 };
+00287 
+00288 /* Internal functions and global variables: */
+00289 struct tcp_pcb *tcp_pcb_copy(struct tcp_pcb *pcb);
+00290 void tcp_pcb_purge(struct tcp_pcb *pcb);
+00291 void tcp_pcb_remove(struct tcp_pcb **pcblist, struct tcp_pcb *pcb);
+00292 
+00293 uInt8 tcp_segs_free(struct tcp_seg *seg);
+00294 uInt8 tcp_seg_free(struct tcp_seg *seg);
+00295 struct tcp_seg *tcp_seg_copy(struct tcp_seg *seg);
+00296 
+00297 #define tcp_ack(pcb)     if((pcb)->flags & TF_ACK_DELAY) { \
+00298                             (pcb)->flags |= TF_ACK_NOW; \
+00299                             tcp_output(pcb); \
+00300                          } else { \
+00301                             (pcb)->flags |= TF_ACK_DELAY; \
+00302                          }
+00303 
+00304 #define tcp_ack_now(pcb) (pcb)->flags |= TF_ACK_NOW; \
+00305                          tcp_output(pcb)
+00306 
+00307 err_t tcp_send_ctrl(struct tcp_pcb *pcb, uInt8 flags);
+00308 err_t tcp_enqueue(struct tcp_pcb *pcb, void *dataptr, uInt16 len,
+00309                 uInt8 flags, uInt8 copy,
+00310                 uInt8 *optdata, uInt8 optlen);
+00311 
+00312 void tcp_rexmit_seg(struct tcp_pcb *pcb, struct tcp_seg *seg);
+00313 
+00314 void tcp_rst(uInt32 seqno, uInt32 ackno,
+00315              struct ip_addr *local_ip, struct ip_addr *remote_ip,
+00316              uInt16 local_port, uInt16 remote_port);
+00317 
+00318 uInt32 tcp_next_iss(void);
+00319 
+00320 extern uInt32 tcp_ticks;
+00321 
+00322 #if TCP_DEBUG || TCP_INPUT_DEBUG || TCP_OUTPUT_DEBUG
+00323 void tcp_debug_print(struct tcp_hdr *tcphdr);
+00324 void tcp_debug_print_flags(uInt8 flags);
+00325 void tcp_debug_print_state(enum tcp_state s);
+00326 void tcp_debug_print_pcbs(void);
+00327 int tcp_pcbs_sane(void);
+00328 #else
+00329 #define tcp_pcbs_sane() 1
+00330 #endif /* TCP_DEBUG */
+00331 
+00332 
+00333 /* The TCP PCB lists. */
+00334 extern struct tcp_pcb_listen *tcp_listen_pcbs;  /* List of all TCP PCBs in LISTEN state. */
+00335 extern struct tcp_pcb *tcp_active_pcbs;  /* List of all TCP PCBs that are in a
+00336                                             state in which they accept or send
+00337                                             data. */
+00338 extern struct tcp_pcb *tcp_tw_pcbs;      /* List of all TCP PCBs in TIME-WAIT. */
+00339 
+00340 extern struct tcp_pcb *tcp_tmp_pcb;      /* Only used for temporary storage. */
+00341 
+00342 /* Axoims about the above lists:   
+00343    1) Every TCP PCB that is not CLOSED is in one of the lists.
+00344    2) A PCB is only in one of the lists.
+00345    3) All PCBs in the tcp_listen_pcbs list is in LISTEN state.
+00346    4) All PCBs in the tcp_tw_pcbs list is in TIME-WAIT state.
+00347 */
+00348 
+00349 /* Define two macros, TCP_REG and TCP_RMV that registers a TCP PCB
+00350    with a PCB list or removes a PCB from a list, respectively. */
+00351 #ifdef LWIP_DEBUG
+00352 #define TCP_REG(pcbs, npcb) do {\
+00353                             DEBUGF(TCP_DEBUG, ("TCP_REG %p local port %d\n", npcb, npcb->local_port)); \
+00354                             for(tcp_tmp_pcb = *pcbs; \
+00355                                   tcp_tmp_pcb != NULL; \
+00356                                 tcp_tmp_pcb = tcp_tmp_pcb->next) { \
+00357                                 ASSERT("TCP_REG: already registered\n", tcp_tmp_pcb != npcb); \
+00358                             } \
+00359                             ASSERT("TCP_REG: pcb->state != CLOSED", npcb->state != CLOSED); \
+00360                             npcb->next = *pcbs; \
+00361                             ASSERT("TCP_REG: npcb->next != npcb", npcb->next != npcb); \
+00362                             *pcbs = npcb; \
+00363                             ASSERT("TCP_RMV: tcp_pcbs sane", tcp_pcbs_sane()); \
+00364                             } while(0)
+00365 #define TCP_RMV(pcbs, npcb) do { \
+00366                             ASSERT("TCP_RMV: pcbs != NULL", *pcbs != NULL); \
+00367                             DEBUGF(TCP_DEBUG, ("TCP_RMV: removing %p from %p\n", npcb, *pcbs)); \
+00368                             if(*pcbs == npcb) { \
+00369                                *pcbs = (*pcbs)->next; \
+00370                             } else for(tcp_tmp_pcb = *pcbs; tcp_tmp_pcb != NULL; tcp_tmp_pcb = tcp_tmp_pcb->next) { \
+00371                                if(tcp_tmp_pcb->next != NULL && tcp_tmp_pcb->next == npcb) { \
+00372                                   tcp_tmp_pcb->next = npcb->next; \
+00373                                   break; \
+00374                                } \
+00375                             } \
+00376                             npcb->next = NULL; \
+00377                             ASSERT("TCP_RMV: tcp_pcbs sane", tcp_pcbs_sane()); \
+00378                             DEBUGF(TCP_DEBUG, ("TCP_RMV: removed %p from %p\n", npcb, *pcbs)); \
+00379                             } while(0)
+00380 
+00381 #else /* LWIP_DEBUG */
+00382 #define TCP_REG(pcbs, npcb) do { \
+00383                             npcb->next = *pcbs; \
+00384                             *pcbs = npcb; \
+00385                             } while(0)
+00386 #define TCP_RMV(pcbs, npcb) do { \
+00387                             if(*pcbs == npcb) { \
+00388                                *pcbs = (*pcbs)->next; \
+00389                             } else for(tcp_tmp_pcb = *pcbs; tcp_tmp_pcb != NULL; tcp_tmp_pcb = tcp_tmp_pcb->next) { \
+00390                                if(tcp_tmp_pcb->next != NULL && tcp_tmp_pcb->next == npcb) { \
+00391                                   tcp_tmp_pcb->next = npcb->next; \
+00392                                   break; \
+00393                                } \
+00394                             } \
+00395                             npcb->next = NULL; \
+00396                             } while(0)
+00397 #endif /* LWIP_DEBUG */
+00398 #endif /* __LWIP_TCP_H__ */
+00399 
+00400 
+00401 
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/tcp_8h.html b/doc/html/tcp_8h.html new file mode 100644 index 0000000..18f3150 --- /dev/null +++ b/doc/html/tcp_8h.html @@ -0,0 +1,1973 @@ + + +UbixOS V2: src/sys/include/net/tcp.h File Reference + + + + +
+
+
+
+ +

tcp.h File Reference

+

+#include "net/sys.h"
+#include "net/mem.h"
+#include "net/pbuf.h"
+#include "net/opt.h"
+#include "net/ipv4/ip.h"
+#include "net/ipv4/icmp.h"
+#include "net/err.h"
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  tcp_hdr
struct  tcp_pcb
struct  tcp_pcb_listen
struct  tcp_seg

Defines

#define tcp_ack(pcb)
#define TCP_ACK   0x10
#define tcp_ack_now(pcb)
#define TCP_FAST_INTERVAL   200
#define TCP_FIN   0x01
#define TCP_FIN_WAIT_TIMEOUT   20000
#define TCP_HLEN   20
#define TCP_MSL   60000
#define TCP_OOSEQ_TIMEOUT   6
#define tcp_pcbs_sane()   1
#define TCP_PSH   0x08
#define TCP_REG(pcbs, npcb)
#define TCP_RMV(pcbs, npcb)
#define TCP_RST   0x04
#define TCP_SEQ_GEQ(a, b)   ((Int32)((a)-(b)) >= 0)
#define TCP_SEQ_GT(a, b)   ((Int32)((a)-(b)) > 0)
#define TCP_SEQ_LEQ(a, b)   ((Int32)((a)-(b)) <= 0)
#define TCP_SEQ_LT(a, b)   ((Int32)((a)-(b)) < 0)
#define TCP_SLOW_INTERVAL   500
#define tcp_sndbuf(pcb)   ((pcb)->snd_buf)
#define TCP_SYN   0x02
#define TCP_SYN_RCVD_TIMEOUT   20000
#define TCP_TCPLEN(seg)
#define TCP_TMR_INTERVAL   100
#define TCP_URG   0x20
#define TCPH_FLAGS(hdr)   (NTOHS((hdr)->_offset_flags) & 0xff)
#define TCPH_FLAGS_SET(hdr, flags)   (hdr)->_offset_flags = HTONS((TCPH_OFFSET(hdr) << 8) | (flags))
#define TCPH_OFFSET(hdr)   (NTOHS((hdr)->_offset_flags) >> 8)
#define TCPH_OFFSET_SET(hdr, offset)   (hdr)->_offset_flags = HTONS(((offset) << 8) | TCPH_FLAGS(hdr))
#define TF_ACK_DELAY   0x01
#define TF_ACK_NOW   0x02
#define TF_CLOSED   0x10
#define TF_GOT_FIN   0x20
#define TF_INFR   0x04
#define TF_RESET   0x08

Enumerations

enum  tcp_state {
+  CLOSED = 0, +LISTEN = 1, +SYN_SENT = 2, +SYN_RCVD = 3, +
+  ESTABLISHED = 4, +FIN_WAIT_1 = 5, +FIN_WAIT_2 = 6, +CLOSE_WAIT = 7, +
+  CLOSING = 8, +LAST_ACK = 9, +TIME_WAIT = 10 +
+ }

Functions

void tcp_abort (struct tcp_pcb *pcb)
void tcp_accept (struct tcp_pcb *pcb, err_t(*accept)(void *arg, struct tcp_pcb *newpcb, err_t err))
void tcp_arg (struct tcp_pcb *pcb, void *arg)
err_t tcp_bind (struct tcp_pcb *pcb, struct ip_addr *ipaddr, uInt16 port)
err_t tcp_close (struct tcp_pcb *pcb)
err_t tcp_connect (struct tcp_pcb *pcb, struct ip_addr *ipaddr, uInt16 port, err_t(*connected)(void *arg, struct tcp_pcb *tpcb, err_t err))
err_t tcp_enqueue (struct tcp_pcb *pcb, void *dataptr, uInt16 len, uInt8 flags, uInt8 copy, uInt8 *optdata, uInt8 optlen)
void tcp_err (struct tcp_pcb *pcb, void(*err)(void *arg, err_t err))
void tcp_fasttmr (void)
void tcp_init (void)
void tcp_input (struct pbuf *p, struct netif *inp)
tcp_pcbtcp_listen (struct tcp_pcb *pcb)
tcp_pcbtcp_new (void)
uInt32 tcp_next_iss (void)
err_t tcp_output (struct tcp_pcb *pcb)
tcp_pcbtcp_pcb_copy (struct tcp_pcb *pcb)
void tcp_pcb_purge (struct tcp_pcb *pcb)
void tcp_pcb_remove (struct tcp_pcb **pcblist, struct tcp_pcb *pcb)
void tcp_poll (struct tcp_pcb *pcb, err_t(*poll)(void *arg, struct tcp_pcb *tpcb), uInt8 interval)
void tcp_recv (struct tcp_pcb *pcb, err_t(*recv)(void *arg, struct tcp_pcb *tpcb, struct pbuf *p, err_t err))
void tcp_recved (struct tcp_pcb *pcb, uInt16 len)
void tcp_rexmit_seg (struct tcp_pcb *pcb, struct tcp_seg *seg)
void tcp_rst (uInt32 seqno, uInt32 ackno, struct ip_addr *local_ip, struct ip_addr *remote_ip, uInt16 local_port, uInt16 remote_port)
tcp_segtcp_seg_copy (struct tcp_seg *seg)
uInt8 tcp_seg_free (struct tcp_seg *seg)
uInt8 tcp_segs_free (struct tcp_seg *seg)
err_t tcp_send_ctrl (struct tcp_pcb *pcb, uInt8 flags)
void tcp_sent (struct tcp_pcb *pcb, err_t(*sent)(void *arg, struct tcp_pcb *tpcb, uInt16 len))
void tcp_slowtmr (void)
void tcp_tmr (void)
err_t tcp_write (struct tcp_pcb *pcb, const void *dataptr, uInt16 len, uInt8 copy)

Variables

tcp_hdr PACK_STRUCT_STRUCT
tcp_pcbtcp_active_pcbs
tcp_pcb_listentcp_listen_pcbs
uInt32 tcp_ticks
tcp_pcbtcp_tmp_pcb
tcp_pcbtcp_tw_pcbs
+


Define Documentation

+ +
+
+ + + + + + + + + +
#define tcp_ack (pcb   ) 
+
+
+ +

+Value:

if((pcb)->flags & TF_ACK_DELAY) { \
+                            (pcb)->flags |= TF_ACK_NOW; \
+                            tcp_output(pcb); \
+                         } else { \
+                            (pcb)->flags |= TF_ACK_DELAY; \
+                         }
+
+

+Definition at line 297 of file tcp.h. +

+

+ +

+
+ + + + +
#define TCP_ACK   0x10
+
+
+ +

+ +

+Definition at line 119 of file tcp.h. +

+

+ +

+
+ + + + + + + + + +
#define tcp_ack_now (pcb   ) 
+
+
+ +

+Value:

(pcb)->flags |= TF_ACK_NOW; \
+                         tcp_output(pcb)
+
+

+Definition at line 304 of file tcp.h. +

+

+ +

+
+ + + + +
#define TCP_FAST_INTERVAL   200
+
+
+ +

+ +

+Definition at line 128 of file tcp.h. +

+

+ +

+
+ + + + +
#define TCP_FIN   0x01
+
+
+ +

+ +

+Definition at line 115 of file tcp.h. +

+

+ +

+
+ + + + +
#define TCP_FIN_WAIT_TIMEOUT   20000
+
+
+ +

+ +

+Definition at line 132 of file tcp.h. +

+

+ +

+
+ + + + +
#define TCP_HLEN   20
+
+
+ +

+ +

+Definition at line 123 of file tcp.h. +

+

+ +

+
+ + + + +
#define TCP_MSL   60000
+
+
+ +

+ +

+Definition at line 137 of file tcp.h. +

+

+ +

+
+ + + + +
#define TCP_OOSEQ_TIMEOUT   6
+
+
+ +

+ +

+Definition at line 135 of file tcp.h. +

+

+ +

+
+ + + + +  + + + + +
#define tcp_pcbs_sane (  )    1
+
+
+ +

+ +

+Definition at line 329 of file tcp.h. +

+

+ +

+
+ + + + +
#define TCP_PSH   0x08
+
+
+ +

+ +

+Definition at line 118 of file tcp.h. +

+

+ +

+
+ + + + + + + + + + + + +
#define TCP_REG (pcbs,
npcb   ) 
+
+
+ +

+Value:

do { \
+                            npcb->next = *pcbs; \
+                            *pcbs = npcb; \
+                            } while(0)
+
+

+Definition at line 382 of file tcp.h. +

+

+ +

+
+ + + + + + + + + + + + +
#define TCP_RMV (pcbs,
npcb   ) 
+
+
+ +

+Value:

do { \
+                            if(*pcbs == npcb) { \
+                               *pcbs = (*pcbs)->next; \
+                            } else for(tcp_tmp_pcb = *pcbs; tcp_tmp_pcb != NULL; tcp_tmp_pcb = tcp_tmp_pcb->next) { \
+                               if(tcp_tmp_pcb->next != NULL && tcp_tmp_pcb->next == npcb) { \
+                                  tcp_tmp_pcb->next = npcb->next; \
+                                  break; \
+                               } \
+                            } \
+                            npcb->next = NULL; \
+                            } while(0)
+
+

+Definition at line 386 of file tcp.h. +

+

+ +

+
+ + + + +
#define TCP_RST   0x04
+
+
+ +

+ +

+Definition at line 117 of file tcp.h. +

+

+ +

+
+ + + + + + + + + + + + +
#define TCP_SEQ_GEQ (a,
 )    ((Int32)((a)-(b)) >= 0)
+
+
+ +

+ +

+Definition at line 113 of file tcp.h. +

+

+ +

+
+ + + + + + + + + + + + +
#define TCP_SEQ_GT (a,
 )    ((Int32)((a)-(b)) > 0)
+
+
+ +

+ +

+Definition at line 112 of file tcp.h. +

+

+ +

+
+ + + + + + + + + + + + +
#define TCP_SEQ_LEQ (a,
 )    ((Int32)((a)-(b)) <= 0)
+
+
+ +

+ +

+Definition at line 111 of file tcp.h. +

+

+ +

+
+ + + + + + + + + + + + +
#define TCP_SEQ_LT (a,
 )    ((Int32)((a)-(b)) < 0)
+
+
+ +

+ +

+Definition at line 110 of file tcp.h. +

+

+ +

+
+ + + + +
#define TCP_SLOW_INTERVAL   500
+
+
+ +

+ +

+Definition at line 130 of file tcp.h. +

+

+ +

+
+ + + + + + + + + +
#define tcp_sndbuf (pcb   )    ((pcb)->snd_buf)
+
+
+ +

+ +

+Definition at line 81 of file tcp.h. +

+Referenced by netconn_write(). +

+

+ +

+
+ + + + +
#define TCP_SYN   0x02
+
+
+ +

+ +

+Definition at line 116 of file tcp.h. +

+

+ +

+
+ + + + +
#define TCP_SYN_RCVD_TIMEOUT   20000
+
+
+ +

+ +

+Definition at line 133 of file tcp.h. +

+

+ +

+
+ + + + + + + + + +
#define TCP_TCPLEN (seg   ) 
+
+
+ +

+Value:

((seg)->len + ((TCPH_FLAGS((seg)->tcphdr) & TCP_FIN || \
+                                        TCPH_FLAGS((seg)->tcphdr) & TCP_SYN)? 1: 0))
+
+

+Definition at line 156 of file tcp.h. +

+

+ +

+
+ + + + +
#define TCP_TMR_INTERVAL   100
+
+
+ +

+ +

+Definition at line 125 of file tcp.h. +

+Referenced by tcpip_tcp_timer(), and tcpip_thread(). +

+

+ +

+
+ + + + +
#define TCP_URG   0x20
+
+
+ +

+ +

+Definition at line 120 of file tcp.h. +

+

+ +

+
+ + + + + + + + + +
#define TCPH_FLAGS (hdr   )    (NTOHS((hdr)->_offset_flags) & 0xff)
+
+
+ +

+ +

+Definition at line 151 of file tcp.h. +

+

+ +

+
+ + + + + + + + + + + + +
#define TCPH_FLAGS_SET (hdr,
flags   )    (hdr)->_offset_flags = HTONS((TCPH_OFFSET(hdr) << 8) | (flags))
+
+
+ +

+ +

+Definition at line 154 of file tcp.h. +

+

+ +

+
+ + + + + + + + + +
#define TCPH_OFFSET (hdr   )    (NTOHS((hdr)->_offset_flags) >> 8)
+
+
+ +

+ +

+Definition at line 150 of file tcp.h. +

+

+ +

+
+ + + + + + + + + + + + +
#define TCPH_OFFSET_SET (hdr,
offset   )    (hdr)->_offset_flags = HTONS(((offset) << 8) | TCPH_FLAGS(hdr))
+
+
+ +

+ +

+Definition at line 153 of file tcp.h. +

+

+ +

+
+ + + + +
#define TF_ACK_DELAY   0x01
+
+
+ +

+ +

+Definition at line 204 of file tcp.h. +

+

+ +

+
+ + + + +
#define TF_ACK_NOW   0x02
+
+
+ +

+ +

+Definition at line 205 of file tcp.h. +

+

+ +

+
+ + + + +
#define TF_CLOSED   0x10
+
+
+ +

+ +

+Definition at line 208 of file tcp.h. +

+

+ +

+
+ + + + +
#define TF_GOT_FIN   0x20
+
+
+ +

+ +

+Definition at line 209 of file tcp.h. +

+

+ +

+
+ + + + +
#define TF_INFR   0x04
+
+
+ +

+ +

+Definition at line 206 of file tcp.h. +

+

+ +

+
+ + + + +
#define TF_RESET   0x08
+
+
+ +

+ +

+Definition at line 207 of file tcp.h. +

+

+


Enumeration Type Documentation

+ +
+
+ + + + +
enum tcp_state
+
+
+ +

+

Enumerator:
+ + + + + + + + + + + + +
CLOSED  +
LISTEN  +
SYN_SENT  +
SYN_RCVD  +
ESTABLISHED  +
FIN_WAIT_1  +
FIN_WAIT_2  +
CLOSE_WAIT  +
CLOSING  +
LAST_ACK  +
TIME_WAIT  +
+
+ +

+Definition at line 159 of file tcp.h. +

+

+


Function Documentation

+ +
+
+ + + + + + + + + +
void tcp_abort (struct tcp_pcb pcb  ) 
+
+
+ +

+ +

+Referenced by do_delconn(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void tcp_accept (struct tcp_pcb pcb,
err_t(*)(void *arg, struct tcp_pcb *newpcb, err_t err)  accept 
)
+
+
+ +

+ +

+Referenced by do_delconn(), and do_listen(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void tcp_arg (struct tcp_pcb pcb,
void *  arg 
)
+
+
+ +

+ +

+Referenced by do_delconn(), do_listen(), and setup_tcp(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
err_t tcp_bind (struct tcp_pcb pcb,
struct ip_addr ipaddr,
uInt16  port 
)
+
+
+ +

+ +

+Referenced by do_bind(). +

+

+ +

+
+ + + + + + + + + +
err_t tcp_close (struct tcp_pcb pcb  ) 
+
+
+ +

+ +

+Referenced by do_close(), and do_delconn(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
err_t tcp_connect (struct tcp_pcb pcb,
struct ip_addr ipaddr,
uInt16  port,
err_t(*)(void *arg, struct tcp_pcb *tpcb, err_t err)  connected 
)
+
+
+ +

+ +

+Referenced by do_connect(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
err_t tcp_enqueue (struct tcp_pcb pcb,
void *  dataptr,
uInt16  len,
uInt8  flags,
uInt8  copy,
uInt8 optdata,
uInt8  optlen 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void tcp_err (struct tcp_pcb pcb,
void(*)(void *arg, err_t err)  err 
)
+
+
+ +

+ +

+Referenced by do_delconn(), and setup_tcp(). +

+

+ +

+
+ + + + + + + + + +
void tcp_fasttmr (void   ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
void tcp_init (void   ) 
+
+
+ +

+ +

+Referenced by tcpip_thread(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void tcp_input (struct pbuf p,
struct netif inp 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
struct tcp_pcb* tcp_listen (struct tcp_pcb pcb  ) 
+
+
+ +

+ +

+Referenced by do_listen(). +

+

+ +

+
+ + + + + + + + + +
struct tcp_pcb* tcp_new (void   ) 
+
+
+ +

+ +

+Referenced by do_bind(), and do_connect(). +

+

+ +

+
+ + + + + + + + + +
uInt32 tcp_next_iss (void   ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
err_t tcp_output (struct tcp_pcb pcb  ) 
+
+
+ +

+ +

+Referenced by do_write(). +

+

+ +

+
+ + + + + + + + + +
struct tcp_pcb* tcp_pcb_copy (struct tcp_pcb pcb  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
void tcp_pcb_purge (struct tcp_pcb pcb  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void tcp_pcb_remove (struct tcp_pcb **  pcblist,
struct tcp_pcb pcb 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void tcp_poll (struct tcp_pcb pcb,
err_t(*)(void *arg, struct tcp_pcb *tpcb)  poll,
uInt8  interval 
)
+
+
+ +

+ +

+Referenced by do_delconn(), and setup_tcp(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void tcp_recv (struct tcp_pcb pcb,
err_t(*)(void *arg, struct tcp_pcb *tpcb, struct pbuf *p, err_t err)  recv 
)
+
+
+ +

+ +

+Referenced by do_delconn(), and setup_tcp(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void tcp_recved (struct tcp_pcb pcb,
uInt16  len 
)
+
+
+ +

+ +

+Referenced by do_recv(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void tcp_rexmit_seg (struct tcp_pcb pcb,
struct tcp_seg seg 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void tcp_rst (uInt32  seqno,
uInt32  ackno,
struct ip_addr local_ip,
struct ip_addr remote_ip,
uInt16  local_port,
uInt16  remote_port 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
struct tcp_seg* tcp_seg_copy (struct tcp_seg seg  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 tcp_seg_free (struct tcp_seg seg  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
uInt8 tcp_segs_free (struct tcp_seg seg  ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
err_t tcp_send_ctrl (struct tcp_pcb pcb,
uInt8  flags 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void tcp_sent (struct tcp_pcb pcb,
err_t(*)(void *arg, struct tcp_pcb *tpcb, uInt16 len)  sent 
)
+
+
+ +

+ +

+Referenced by do_delconn(), and setup_tcp(). +

+

+ +

+
+ + + + + + + + + +
void tcp_slowtmr (void   ) 
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
void tcp_tmr (void   ) 
+
+
+ +

+ +

+Referenced by tcpip_tcp_timer(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
err_t tcp_write (struct tcp_pcb pcb,
const void *  dataptr,
uInt16  len,
uInt8  copy 
)
+
+
+ +

+ +

+Referenced by do_write(). +

+

+


Variable Documentation

+ +
+
+ + + + +
struct tcp_hdr PACK_STRUCT_STRUCT
+
+
+ +

+ +

+

+ +

+
+ + + + +
struct tcp_pcb* tcp_active_pcbs
+
+
+ +

+ +

+

+ +

+
+ + + + +
struct tcp_pcb_listen* tcp_listen_pcbs
+
+
+ +

+ +

+

+ +

+
+ + + + +
uInt32 tcp_ticks
+
+
+ +

+ +

+

+ +

+
+ + + + +
struct tcp_pcb* tcp_tmp_pcb
+
+
+ +

+ +

+

+ +

+
+ + + + +
struct tcp_pcb* tcp_tw_pcbs
+
+
+ +

+ +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/tcpdump_8c-source.html b/doc/html/tcpdump_8c-source.html new file mode 100644 index 0000000..6798cfa --- /dev/null +++ b/doc/html/tcpdump_8c-source.html @@ -0,0 +1,213 @@ + + +UbixOS V2: src/sys/net/netif/tcpdump.c Source File + + + + +
+
+
+
+ +

tcpdump.c

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 
+00036 #include <vfs/file.h>
+00037 #include <ubixos/kpanic.h>
+00038   
+00039 #include "netif/tcpdump.h"
+00040 #include "net/ipv4/ip.h"
+00041 #include "net/tcp.h"
+00042 #include "net/udp.h"
+00043 #include "net/ipv4/inet.h"
+00044 
+00045 fileDescriptor *file = NULL;
+00046 
+00047 void tcpdump_init(void) {
+00048   char *fname;
+00049 
+00050   fname = "tcpdump";
+00051   file = fopen(fname, "wb");
+00052   if(file == NULL) {
+00053     kpanic("tcpdump_init: fopen\n");
+00054     }
+00055   }
+00056 
+00057 void tcpdump(struct pbuf *p) {
+00058 /*
+00059   struct ip_hdr *iphdr;
+00060   struct tcp_hdr *tcphdr;
+00061   struct udp_hdr *udphdr;
+00062   char flags[5];
+00063   int i;
+00064   int len;
+00065   int offset;
+00066 */
+00067   if (file == NULL) {
+00068     return;
+00069     }
+00070   
+00071   /*
+00072   iphdr = p->payload;
+00073   switch(IPH_PROTO(iphdr)) {
+00074   case IP_PROTO_TCP:    
+00075     tcphdr = (struct tcp_hdr *)((char *)iphdr + IP_HLEN);
+00076     
+00077     pbuf_header(p, -IP_HLEN);
+00078     if(inet_chksum_pseudo(p, (struct ip_addr *)&(iphdr->src),
+00079                           (struct ip_addr *)&(iphdr->dest),
+00080                           IP_PROTO_TCP, p->tot_len) != 0) {
+00081       DEBUGF(TCPDUMP_DEBUG, ("tcpdump: IP checksum failed!\n"));
+00082       fprintf(file, "!chksum ");
+00083     }
+00084     
+00085     i = 0;
+00086     if(TCPH_FLAGS(tcphdr) & TCP_SYN) {
+00087       flags[i++] = 'S';
+00088     }
+00089     if(TCPH_FLAGS(tcphdr) & TCP_PSH) {
+00090       flags[i++] = 'P';
+00091     }
+00092     if(TCPH_FLAGS(tcphdr) & TCP_FIN) {
+00093       flags[i++] = 'F';
+00094     }
+00095     if(TCPH_FLAGS(tcphdr) & TCP_RST) {
+00096       flags[i++] = 'R';
+00097     }
+00098     if(i == 0) {
+00099       flags[i++] = '.';
+00100     }
+00101     flags[i++] = 0;    
+00102 
+00103     
+00104     
+00105     fprintf(file, "%d.%d.%d.%d.%u > %d.%d.%d.%d.%u: ",
+00106             (int)(ntohl(iphdr->src.addr) >> 24) & 0xff,
+00107             (int)(ntohl(iphdr->src.addr) >> 16) & 0xff,
+00108             (int)(ntohl(iphdr->src.addr) >> 8) & 0xff,
+00109             (int)(ntohl(iphdr->src.addr) >> 0) & 0xff,
+00110             ntohs(tcphdr->src),
+00111           (int)(ntohl(iphdr->dest.addr) >> 24) & 0xff,
+00112             (int)(ntohl(iphdr->dest.addr) >> 16) & 0xff,
+00113             (int)(ntohl(iphdr->dest.addr) >> 8) & 0xff,
+00114             (int)(ntohl(iphdr->dest.addr) >> 0) & 0xff,
+00115             ntohs(tcphdr->dest));
+00116     offset = TCPH_OFFSET(tcphdr) >> 4;
+00117     
+00118     len = ntohs(IPH_LEN(iphdr)) - offset * 4 - IP_HLEN;
+00119     if(len != 0 || flags[0] != '.') {
+00120       fprintf(file, "%s %lu:%lu(%u) ",
+00121               flags,
+00122               ntohl(tcphdr->seqno),
+00123               ntohl(tcphdr->seqno) + len,
+00124               len);
+00125     }
+00126     if(TCPH_FLAGS(tcphdr) & TCP_ACK) {
+00127       fprintf(file, "ack %lu ",
+00128               ntohl(tcphdr->ackno));
+00129     }
+00130     fprintf(file, "wnd %u\n",
+00131             ntohs(tcphdr->wnd));
+00132     
+00133     fflush(file);
+00134     
+00135     pbuf_header(p, IP_HLEN);
+00136     break;
+00137     
+00138   case IP_PROTO_UDP:    
+00139     udphdr = (struct udp_hdr *)((char *)iphdr + IP_HLEN);
+00140     
+00141     pbuf_header(p, -IP_HLEN);
+00142     if(inet_chksum_pseudo(p, (struct ip_addr *)&(iphdr->src),
+00143                           (struct ip_addr *)&(iphdr->dest),
+00144                           IP_PROTO_UDP, p->tot_len) != 0) {
+00145       kprintf("tcpdump: IP checksum failed!\n");
+00146       fprintf(file, "!chksum ");
+00147     }
+00148     
+00149     fprintf(file, "%d.%d.%d.%d.%u > %d.%d.%d.%d.%u: ",
+00150             (int)(ntohl(iphdr->src.addr) >> 24) & 0xff,
+00151             (int)(ntohl(iphdr->src.addr) >> 16) & 0xff,
+00152             (int)(ntohl(iphdr->src.addr) >> 8) & 0xff,
+00153             (int)(ntohl(iphdr->src.addr) >> 0) & 0xff,
+00154             ntohs(udphdr->src),
+00155           (int)(ntohl(iphdr->dest.addr) >> 24) & 0xff,
+00156             (int)(ntohl(iphdr->dest.addr) >> 16) & 0xff,
+00157             (int)(ntohl(iphdr->dest.addr) >> 8) & 0xff,
+00158             (int)(ntohl(iphdr->dest.addr) >> 0) & 0xff,
+00159             ntohs(udphdr->dest));
+00160     fprintf(file, "U ");
+00161     len = ntohs(IPH_LEN(iphdr)) - sizeof(struct udp_hdr) - IP_HLEN;
+00162     fprintf(file, " %d\n", len);
+00163     
+00164     fflush(file);
+00165     
+00166     pbuf_header(p, IP_HLEN);
+00167     break;
+00168 
+00169   }
+00170   */
+00171   }
+00172 
+00173 /***
+00174  END
+00175  ***/
+00176 
+

Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/tcpdump_8c.html b/doc/html/tcpdump_8c.html new file mode 100644 index 0000000..abe1b4b --- /dev/null +++ b/doc/html/tcpdump_8c.html @@ -0,0 +1,130 @@ + + +UbixOS V2: src/sys/net/netif/tcpdump.c File Reference + + + + +
+
+
+
+ +

tcpdump.c File Reference

+

+#include <vfs/file.h>
+#include <ubixos/kpanic.h>
+#include "netif/tcpdump.h"
+#include "net/ipv4/ip.h"
+#include "net/tcp.h"
+#include "net/udp.h"
+#include "net/ipv4/inet.h"
+ +

+Go to the source code of this file. + + + + + + + + + +

Functions

void tcpdump (struct pbuf *p)
void tcpdump_init (void)

Variables

fileDescriptorfile = NULL
+


Function Documentation

+ +
+
+ + + + + + + + + +
void tcpdump (struct pbuf p  ) 
+
+
+ +

+ +

+Definition at line 57 of file tcpdump.c. +

+References file, and NULL. +

+Referenced by loopif_output(). +

+

+ +

+
+ + + + + + + + + +
void tcpdump_init (void   ) 
+
+
+ +

+ +

+Definition at line 47 of file tcpdump.c. +

+References file, fopen(), kpanic(), and NULL. +

+

+


Variable Documentation

+ +
+
+ + + + +
fileDescriptor* file = NULL
+
+
+ +

+ +

+Definition at line 45 of file tcpdump.c. +

+Referenced by tcpdump(), and tcpdump_init(). +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/tcpdump_8h-source.html b/doc/html/tcpdump_8h-source.html new file mode 100644 index 0000000..ce64f8a --- /dev/null +++ b/doc/html/tcpdump_8h-source.html @@ -0,0 +1,80 @@ + + +UbixOS V2: src/sys/include/netif/tcpdump.h Source File + + + + +
+
+
+
+ +

tcpdump.h

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 #ifndef __NETIF_TCPDUMP_H__
+00036 #define __NETIF_TCPDUMP_H__
+00037 
+00038 #include "net/pbuf.h"
+00039 
+00040 void tcpdump_init(void);
+00041 void tcpdump(struct pbuf *p);
+00042 
+00043 #endif /* __NETIF_TCPDUMP_H__ */
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/tcpdump_8h.html b/doc/html/tcpdump_8h.html new file mode 100644 index 0000000..c4697c5 --- /dev/null +++ b/doc/html/tcpdump_8h.html @@ -0,0 +1,101 @@ + + +UbixOS V2: src/sys/include/netif/tcpdump.h File Reference + + + + +
+
+
+
+ +

tcpdump.h File Reference

+

+#include "net/pbuf.h"
+ +

+Go to the source code of this file. + + + + + + +

Functions

void tcpdump (struct pbuf *p)
void tcpdump_init (void)
+


Function Documentation

+ +
+
+ + + + + + + + + +
void tcpdump (struct pbuf p  ) 
+
+
+ +

+ +

+Definition at line 57 of file tcpdump.c. +

+References file, and NULL. +

+Referenced by loopif_output(). +

+

+ +

+
+ + + + + + + + + +
void tcpdump_init (void   ) 
+
+
+ +

+ +

+Definition at line 47 of file tcpdump.c. +

+References file, fopen(), kpanic(), and NULL. +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/tcpip_8c-source.html b/doc/html/tcpip_8c-source.html new file mode 100644 index 0000000..8e6f5c5 --- /dev/null +++ b/doc/html/tcpip_8c-source.html @@ -0,0 +1,182 @@ + + +UbixOS V2: src/sys/net/api/tcpip.c Source File + + + + +
+
+
+
+ +

tcpip.c

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 
+00036 #include <ubixos/exec.h>
+00037 #include <lib/kmalloc.h>
+00038 
+00039 #include "net/debug.h"
+00040 
+00041 #include "net/opt.h"
+00042 
+00043 #include "net/sys.h"
+00044 
+00045 #include "net/memp.h"
+00046 #include "net/pbuf.h"
+00047 
+00048 #include "net/ipv4/ip.h"
+00049 #include "net/udp.h"
+00050 #include "net/tcp.h"
+00051 
+00052 #include "net/tcpip.h"
+00053 
+00054 static void (* tcpip_init_done)(void *arg) = NULL;
+00055 static void *tcpip_init_done_arg;
+00056 static sys_mbox_t mbox;
+00057 
+00058 /*-----------------------------------------------------------------------------------*/
+00059 static void
+00060 tcpip_tcp_timer(void *arg)
+00061 {
+00062   tcp_tmr();
+00063   sys_timeout(TCP_TMR_INTERVAL, (sys_timeout_handler)tcpip_tcp_timer, NULL);
+00064 }
+00065 /*-----------------------------------------------------------------------------------*/
+00066 
+00067 static void
+00068 tcpip_thread(void *arg)
+00069 {
+00070   struct tcpip_msg *msg;
+00071 
+00072   ip_init();
+00073   udp_init();
+00074   tcp_init();
+00075 
+00076   sys_timeout(TCP_TMR_INTERVAL, (sys_timeout_handler)tcpip_tcp_timer, NULL);
+00077   
+00078   if(tcpip_init_done != NULL) {
+00079     tcpip_init_done(tcpip_init_done_arg);
+00080   }
+00081 
+00082   while(1) {                          /* MAIN Loop */
+00083     sys_mbox_fetch(mbox, (void *)&msg);
+00084     switch(msg->type) {
+00085     case TCPIP_MSG_API:
+00086       //kprintf("tcpip_thread: API message %p\n", msg);
+00087       api_msg_input(msg->msg.apimsg);
+00088       break;
+00089     case TCPIP_MSG_INPUT:
+00090       //kprintf("tcpip_thread: IP packet %p\n", msg);
+00091       ip_input(msg->msg.inp.p, msg->msg.inp.netif);
+00092       break;
+00093     default:
+00094       break;
+00095     }
+00096     memp_freep(MEMP_TCPIP_MSG, msg);
+00097   }
+00098 }
+00099 /*-----------------------------------------------------------------------------------*/
+00100 err_t
+00101 tcpip_input(struct pbuf *p, struct netif *inp)
+00102 {
+00103   struct tcpip_msg *msg;
+00104   
+00105   msg = memp_mallocp(MEMP_TCPIP_MSG);
+00106   if(msg == NULL) {
+00107     //kprintf("BAD MESSAGE!!!\n");
+00108     pbuf_free(p);    
+00109     return ERR_MEM;  
+00110   }
+00111   //kprintf("GOOD MESSAGE\n");
+00112   
+00113   msg->type = TCPIP_MSG_INPUT;
+00114   msg->msg.inp.p = p;
+00115   msg->msg.inp.netif = inp;
+00116   sys_mbox_post(mbox, msg);
+00117   return ERR_OK;
+00118 }
+00119 /*-----------------------------------------------------------------------------------*/
+00120 void
+00121 tcpip_apimsg(struct api_msg *apimsg)
+00122 {
+00123   struct tcpip_msg *msg;
+00124   msg = memp_mallocp(MEMP_TCPIP_MSG);
+00125   if(msg == NULL) {
+00126     memp_free(MEMP_TCPIP_MSG, apimsg);
+00127     return;
+00128   }
+00129   msg->type = TCPIP_MSG_API;
+00130   msg->msg.apimsg = apimsg;
+00131   sys_mbox_post(mbox, msg);
+00132 }
+00133 /*-----------------------------------------------------------------------------------*/
+00134 void
+00135 tcpip_init(void (* initfunc)(void *), void *arg)
+00136 {
+00137   tcpip_init_done = initfunc;
+00138   tcpip_init_done_arg = arg;
+00139   mbox = sys_mbox_new();
+00140   sys_thread_new((void *)tcpip_thread, NULL);
+00141 }
+00142 /*-----------------------------------------------------------------------------------*/
+00143 
+00144 
+00145 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/tcpip_8c.html b/doc/html/tcpip_8c.html new file mode 100644 index 0000000..570a9be --- /dev/null +++ b/doc/html/tcpip_8c.html @@ -0,0 +1,280 @@ + + +UbixOS V2: src/sys/net/api/tcpip.c File Reference + + + + +
+
+
+
+ +

tcpip.c File Reference

+

+#include <ubixos/exec.h>
+#include <lib/kmalloc.h>
+#include "net/debug.h"
+#include "net/opt.h"
+#include "net/sys.h"
+#include "net/memp.h"
+#include "net/pbuf.h"
+#include "net/ipv4/ip.h"
+#include "net/udp.h"
+#include "net/tcp.h"
+#include "net/tcpip.h"
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + +

Functions

void tcpip_apimsg (struct api_msg *apimsg)
void tcpip_init (void(*initfunc)(void *), void *arg)
err_t tcpip_input (struct pbuf *p, struct netif *inp)
static void tcpip_tcp_timer (void *arg)
static void tcpip_thread (void *arg)

Variables

static sys_mbox_t mbox
static void(*) tcpip_init_done (void *arg) = NULL
static void * tcpip_init_done_arg
+


Function Documentation

+ +
+
+ + + + + + + + + +
void tcpip_apimsg (struct api_msg apimsg  ) 
+
+
+ +

+ +

+Definition at line 121 of file tcpip.c. +

+References tcpip_msg::apimsg, mbox, memp_free(), memp_mallocp(), MEMP_TCPIP_MSG, tcpip_msg::msg, NULL, sys_mbox_post(), and TCPIP_MSG_API. +

+Referenced by api_msg_post(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void tcpip_init (void(*)(void *)  initfunc,
void *  arg 
)
+
+
+ +

+ +

+Definition at line 135 of file tcpip.c. +

+References mbox, NULL, sys_mbox_new(), sys_thread_new(), tcpip_init_done, tcpip_init_done_arg, and tcpip_thread(). +

+Referenced by netMainThread(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
err_t tcpip_input (struct pbuf p,
struct netif inp 
)
+
+ +

+ +

+
+ + + + + + + + + +
static void tcpip_tcp_timer (void *  arg  )  [static]
+
+
+ +

+ +

+Definition at line 60 of file tcpip.c. +

+References NULL, sys_timeout(), tcp_tmr(), and TCP_TMR_INTERVAL. +

+Referenced by tcpip_thread(). +

+

+ +

+
+ + + + + + + + + +
static void tcpip_thread (void *  arg  )  [static]
+
+ +

+


Variable Documentation

+ +
+
+ + + + +
sys_mbox_t mbox [static]
+
+ +

+ +

+
+ + + + +
void(* ) tcpip_init_done(void *arg) = NULL [static]
+
+
+ +

+ +

+Definition at line 54 of file tcpip.c. +

+Referenced by netMainThread(), tcpip_init(), and tcpip_thread(). +

+

+ +

+
+ + + + +
void* tcpip_init_done_arg [static]
+
+
+ +

+ +

+Definition at line 55 of file tcpip.c. +

+Referenced by tcpip_init(), and tcpip_thread(). +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/tcpip_8h-source.html b/doc/html/tcpip_8h-source.html new file mode 100644 index 0000000..c08e918 --- /dev/null +++ b/doc/html/tcpip_8h-source.html @@ -0,0 +1,100 @@ + + +UbixOS V2: src/sys/include/net/tcpip.h Source File + + + + +
+
+
+
+ +

tcpip.h

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 #ifndef __LWIP_TCPIP_H__
+00036 #define __LWIP_TCPIP_H__
+00037 
+00038 #include "net/api_msg.h"
+00039 #include "net/pbuf.h"
+00040 
+00041 void tcpip_init(void (* tcpip_init_done)(void *), void *arg);
+00042 void tcpip_apimsg(struct api_msg *apimsg);
+00043 err_t tcpip_input(struct pbuf *p, struct netif *inp);
+00044 
+00045 enum tcpip_msg_type {
+00046   TCPIP_MSG_API,
+00047   TCPIP_MSG_INPUT
+00048 };
+00049 
+00050 struct tcpip_msg {
+00051   enum tcpip_msg_type type;
+00052   sys_sem_t *sem;
+00053   union {
+00054     struct api_msg *apimsg;
+00055     struct {
+00056       struct pbuf *p;
+00057       struct netif *netif;
+00058     } inp;
+00059   } msg;
+00060 };
+00061 
+00062 
+00063 #endif /* __LWIP_TCPIP_H__ */
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/tcpip_8h.html b/doc/html/tcpip_8h.html new file mode 100644 index 0000000..e3542ad --- /dev/null +++ b/doc/html/tcpip_8h.html @@ -0,0 +1,184 @@ + + +UbixOS V2: src/sys/include/net/tcpip.h File Reference + + + + +
+
+
+
+ +

tcpip.h File Reference

+

+#include "net/api_msg.h"
+#include "net/pbuf.h"
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + +

Data Structures

struct  tcpip_msg

Enumerations

enum  tcpip_msg_type { TCPIP_MSG_API, +TCPIP_MSG_INPUT + }

Functions

void tcpip_apimsg (struct api_msg *apimsg)
void tcpip_init (void(*tcpip_init_done)(void *), void *arg)
err_t tcpip_input (struct pbuf *p, struct netif *inp)
+


Enumeration Type Documentation

+ +
+
+ + + + +
enum tcpip_msg_type
+
+
+ +

+

Enumerator:
+ + + +
TCPIP_MSG_API  +
TCPIP_MSG_INPUT  +
+
+ +

+Definition at line 45 of file tcpip.h. +

+

+


Function Documentation

+ +
+
+ + + + + + + + + +
void tcpip_apimsg (struct api_msg apimsg  ) 
+
+
+ +

+ +

+Definition at line 121 of file tcpip.c. +

+References tcpip_msg::apimsg, mbox, memp_free(), memp_mallocp(), MEMP_TCPIP_MSG, tcpip_msg::msg, NULL, sys_mbox_post(), and TCPIP_MSG_API. +

+Referenced by api_msg_post(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void tcpip_init (void(*)(void *)  tcpip_init_done,
void *  arg 
)
+
+
+ +

+ +

+Definition at line 135 of file tcpip.c. +

+References mbox, NULL, sys_mbox_new(), sys_thread_new(), tcpip_init_done, tcpip_init_done_arg, and tcpip_thread(). +

+Referenced by netMainThread(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
err_t tcpip_input (struct pbuf p,
struct netif inp 
)
+
+ +

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/thread_8c-source.html b/doc/html/thread_8c-source.html new file mode 100644 index 0000000..84d299f --- /dev/null +++ b/doc/html/thread_8c-source.html @@ -0,0 +1,121 @@ + + +UbixOS V2: src/sys/ubixfs/thread.c Source File + + + + +
+
+
+
+ +

thread.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <ubixfs/ubixfs.h>
+00031 #include <ubixos/kpanic.h>
+00032 #include <vfs/vfs.h>
+00033 #include <lib/kprintf.h>
+00034 
+00035 static struct {
+00036   int mounts;
+00037   } ubixFS_Info;
+00038 
+00039 void ubixfs_thread(vfs_mountPoint_t *mp) {
+00040   mpi_message_t myMsg;
+00041 
+00042   ubixFS_Info.mounts = 0;
+00043 
+00044   if (mp == 0x0)
+00045     kpanic("bah");
+00046 
+00047   if (mpi_createMbox("ubixfs") != 0x0) {
+00048     kpanic("Error: Error creating mailbox: ubixfs\n");
+00049     }
+00050   while (1) {
+00051     if (mpi_fetchMessage("ubixfs",&myMsg) == 0x0) {
+00052       switch(myMsg.header) {
+00053         default:
+00054           kprintf("Unhandled Message: %i\n",myMsg.header);
+00055           break;
+00056         }
+00057       }
+00058     }
+00059   }
+00060 
+00061 /***
+00062  $Log$
+00063  Revision 1.1.1.1  2006/06/01 12:46:17  reddawg
+00064  ubix2
+00065 
+00066  Revision 1.2  2005/10/12 00:13:37  reddawg
+00067  Removed
+00068 
+00069  Revision 1.1.1.1  2005/09/26 17:24:41  reddawg
+00070  no message
+00071 
+00072  Revision 1.3  2004/08/14 11:23:02  reddawg
+00073  Changes
+00074 
+00075  Revision 1.2  2004/07/23 09:10:06  reddawg
+00076  ubixfs: cleaned up some functions played with the caching a bit
+00077  vfs:    renamed a bunch of functions
+00078  cleaned up a few misc bugs
+00079 
+00080  Revision 1.1  2004/06/28 18:12:44  reddawg
+00081  We need these files
+00082 
+00083  END
+00084  ***/
+

Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/thread_8c.html b/doc/html/thread_8c.html new file mode 100644 index 0000000..6b01a01 --- /dev/null +++ b/doc/html/thread_8c.html @@ -0,0 +1,118 @@ + + +UbixOS V2: src/sys/ubixfs/thread.c File Reference + + + + +
+
+
+
+ +

thread.c File Reference

+

+#include <ubixfs/ubixfs.h>
+#include <ubixos/kpanic.h>
+#include <vfs/vfs.h>
+#include <lib/kprintf.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + +

Functions

void ubixfs_thread (vfs_mountPoint_t *mp)

Variables

struct {
   int   mounts
ubixFS_Info
+


Function Documentation

+ +
+
+ + + + + + + + + +
void ubixfs_thread (vfs_mountPoint_t mp  ) 
+
+
+ +

+ +

+Definition at line 39 of file thread.c. +

+References mpi_message::header, kpanic(), kprintf(), mpi_createMbox(), mpi_fetchMessage(), and ubixFS_Info. +

+

+


Variable Documentation

+ +
+
+ + + + +
int mounts
+
+
+ +

+ +

+Definition at line 36 of file thread.c. +

+

+ +

+
+ + + + +
struct { ... } ubixFS_Info [static]
+
+
+ +

+ +

+Referenced by ubixfs_thread(). +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/thread_8h-source.html b/doc/html/thread_8h-source.html new file mode 100644 index 0000000..069d319 --- /dev/null +++ b/doc/html/thread_8h-source.html @@ -0,0 +1,84 @@ + + +UbixOS V2: src/sys/include/sys/thread.h Source File + + + + +
+
+
+
+ +

thread.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _THREAD_H
+00031 #define _THREAD_H
+00032 
+00033 #include <ubixos/types.h>
+00034 
+00035 struct thread {
+00036   int      td_retval[2];
+00037   uInt32   o_files[64]; 
+00038   char *   vm_daddr;
+00039   int32_t  vm_dsize;
+00040   };
+00041 
+00042 #endif
+00043 
+00044 /***
+00045  END
+00046  ***/
+00047 
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/thread_8h.html b/doc/html/thread_8h.html new file mode 100644 index 0000000..af3696e --- /dev/null +++ b/doc/html/thread_8h.html @@ -0,0 +1,48 @@ + + +UbixOS V2: src/sys/include/sys/thread.h File Reference + + + + +
+
+
+
+ +

thread.h File Reference

+

+#include <ubixos/types.h>
+ +

+Go to the source code of this file. + + + + +

Data Structures

struct  thread
+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/time_8c-source.html b/doc/html/time_8c-source.html new file mode 100644 index 0000000..37b9854 --- /dev/null +++ b/doc/html/time_8c-source.html @@ -0,0 +1,157 @@ + + +UbixOS V2: src/sys/kernel/time.c Source File + + + + +
+
+
+
+ +

time.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <ubixos/types.h>
+00031 #include <ubixos/time.h>
+00032 #include <ubixos/vitals.h>
+00033 #include <lib/kprintf.h>
+00034 #include <assert.h>
+00035 
+00036 static int month[12] = {
+00037         0,
+00038         DAY*(31),
+00039         DAY*(31+29),
+00040         DAY*(31+29+31),
+00041         DAY*(31+29+31+30),
+00042         DAY*(31+29+31+30+31),
+00043         DAY*(31+29+31+30+31+30),
+00044         DAY*(31+29+31+30+31+30+31),
+00045         DAY*(31+29+31+30+31+30+31+31),
+00046         DAY*(31+29+31+30+31+30+31+31+30),
+00047         DAY*(31+29+31+30+31+30+31+31+30+31),
+00048         DAY*(31+29+31+30+31+30+31+31+30+31+30)
+00049 };
+00050 
+00051 static int timeCmosRead(int addr) {
+00052   outportByteP(0x70,addr);
+00053   return((int)inportByte(0x71));
+00054   }
+00055 
+00056 int time_init() {
+00057   int i;
+00058   struct timeStruct time;
+00059  
+00060   for (i = 0 ; i < 1000000 ; i++) {
+00061     if (!(timeCmosRead(10) & 0x80)) {
+00062       break;
+00063       }
+00064     }
+00065 
+00066   do {
+00067     time.sec = timeCmosRead(0);
+00068     time.min = timeCmosRead(2);
+00069     time.hour = timeCmosRead(4);
+00070     time.day = timeCmosRead(7);
+00071     time.mon = timeCmosRead(8);
+00072     time.year = timeCmosRead(9);
+00073     } while (time.sec != timeCmosRead(0));
+00074 
+00075   BCD_TO_BIN(time.sec);
+00076   BCD_TO_BIN(time.min);
+00077   BCD_TO_BIN(time.hour);
+00078   BCD_TO_BIN(time.day);
+00079   BCD_TO_BIN(time.mon);
+00080   BCD_TO_BIN(time.year);
+00081 
+00082   /* Set up our start time in seconds */
+00083   systemVitals->timeStart = timeMake(&time);
+00084 
+00085   kprintf("%i/%i/%i %i:%i.%i\n",time.mon,time.day,time.year,time.hour,time.min,time.sec);
+00086 
+00087   
+00088   /* Return so we know all went well */
+00089   return(0x0);
+00090   }
+00091 
+00092 uInt32 timeMake(struct timeStruct *time) {
+00093   uInt32 res;
+00094   int year;
+00095 
+00096   year = (time->year+100) - 70;
+00097   /* magic offsets (y+1) needed to get leapyears right.*/
+00098   res = YEAR*year + DAY*((year+1)/4);
+00099   res += month[time->mon];
+00100   /* and (y+2) here. If it wasn't a leap-year, we have to adjust */
+00101   if (time->mon>1 && ((year+2)%4))
+00102     res -= DAY;
+00103   res += DAY*(time->day-1);
+00104   res += HOUR*time->hour;
+00105   res += MINUTE*time->min;
+00106   res += time->sec;
+00107   return(res);
+00108   }
+00109 
+00110 int gettimeofday(struct timeval *tp,struct timezone *tzp) {
+00111   //tp->tv_sec  = systemVitals->timeStart + systemVitals->sysUptime;
+00112   tp->tv_sec    = 0x0;//systemVitals->sysUptime;
+00113   tp->tv_usec = 0x0;
+00114   return(0x0);
+00115   }
+00116 
+00117 /***
+00118  END
+00119  ***/
+00120 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/time_8c.html b/doc/html/time_8c.html new file mode 100644 index 0000000..60b50aa --- /dev/null +++ b/doc/html/time_8c.html @@ -0,0 +1,206 @@ + + +UbixOS V2: src/sys/kernel/time.c File Reference + + + + +
+
+
+
+ +

time.c File Reference

+

+#include <ubixos/types.h>
+#include <ubixos/time.h>
+#include <ubixos/vitals.h>
+#include <lib/kprintf.h>
+#include <assert.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + +

Functions

int gettimeofday (struct timeval *tp, struct timezone *tzp)
int time_init ()
static int timeCmosRead (int addr)
uInt32 timeMake (struct timeStruct *time)

Variables

static int month [12]
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
int gettimeofday (struct timeval tp,
struct timezone tzp 
)
+
+
+ +

+ +

+Definition at line 110 of file time.c. +

+References timeval::tv_sec, and timeval::tv_usec. +

+Referenced by cond_wait(), sys_init(), and sys_unix_now(). +

+

+ +

+
+ + + + + + + + +
int time_init (  ) 
+
+ +

+ +

+
+ + + + + + + + + +
static int timeCmosRead (int  addr  )  [static]
+
+
+ +

+ +

+Definition at line 51 of file time.c. +

+References inportByte(), and outportByteP(). +

+Referenced by time_init(). +

+

+ +

+
+ + + + + + + + + +
uInt32 timeMake (struct timeStruct time  ) 
+
+
+ +

+ +

+Definition at line 92 of file time.c. +

+References timeStruct::day, DAY, timeStruct::hour, HOUR, timeStruct::min, MINUTE, timeStruct::mon, month, timeStruct::sec, YEAR, and timeStruct::year. +

+Referenced by time_init(). +

+

+


Variable Documentation

+ +
+
+ + + + +
int month[12] [static]
+
+
+ +

+Initial value:

 {
+        0,
+        DAY*(31),
+        DAY*(31+29),
+        DAY*(31+29+31),
+        DAY*(31+29+31+30),
+        DAY*(31+29+31+30+31),
+        DAY*(31+29+31+30+31+30),
+        DAY*(31+29+31+30+31+30+31),
+        DAY*(31+29+31+30+31+30+31+31),
+        DAY*(31+29+31+30+31+30+31+31+30),
+        DAY*(31+29+31+30+31+30+31+31+30+31),
+        DAY*(31+29+31+30+31+30+31+31+30+31+30)
+}
+
+

+Definition at line 36 of file time.c. +

+Referenced by timeMake(). +

+

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/time_8h-source.html b/doc/html/time_8h-source.html new file mode 100644 index 0000000..ce34533 --- /dev/null +++ b/doc/html/time_8h-source.html @@ -0,0 +1,145 @@ + + +UbixOS V2: src/sys/include/ubixos/time.h Source File + + + + +
+
+
+
+ +

time.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _TIME_H
+00031 #define _TIME_H
+00032 
+00033 #include <ubixos/types.h>
+00034 #include <sys/io.h>
+00035 
+00036 typedef long suseconds_t;
+00037 
+00038 #define BCD_TO_BIN(val) ((val)=((val)&15) + ((val)>>4)*10)
+00039 
+00040 #define MINUTE 60
+00041 #define HOUR (60*MINUTE)
+00042 #define DAY (24*HOUR)
+00043 #define YEAR (365*DAY)
+00044 
+00045 #ifndef _TIME_T_DECLARED
+00046 typedef __time_t        time_t;
+00047 #define _TIME_T_DECLARED
+00048 #endif
+00049 
+00050 struct timespec {
+00051         time_t  tv_sec;         /* seconds */
+00052         long    tv_nsec;        /* and nanoseconds */
+00053 };
+00054 
+00055 
+00056 
+00057 struct timeStruct {
+00058   int sec;
+00059   int min;
+00060   int hour;
+00061   int day;
+00062   int mon;
+00063   int year;
+00064   };
+00065 
+00066 
+00067 struct timezone {
+00068   int     tz_minuteswest; /* minutes west of Greenwich */
+00069   int     tz_dsttime;     /* type of dst correction */
+00070   };
+00071 
+00072 struct timeval {
+00073   long            tv_sec;         /* seconds (XXX should be time_t) */
+00074   suseconds_t     tv_usec;        /* and microseconds */
+00075   };
+00076 
+00077 int gettimeofday(struct timeval *tp,struct timezone *tzp);
+00078 
+00079 
+00080 
+00081 int time_init();
+00082 uInt32 timeMake(struct timeStruct *time);
+00083 
+00084 #endif
+00085 
+00086 /***
+00087  $Log$
+00088  Revision 1.1.1.1  2006/06/01 12:46:14  reddawg
+00089  ubix2
+00090 
+00091  Revision 1.2  2005/10/12 00:13:37  reddawg
+00092  Removed
+00093 
+00094  Revision 1.1.1.1  2005/09/26 17:23:56  reddawg
+00095  no message
+00096 
+00097  Revision 1.4  2004/07/09 13:37:30  reddawg
+00098  time: timeInit to time_init
+00099  Adjusted initialization routines
+00100 
+00101  Revision 1.3  2004/06/29 11:41:44  reddawg
+00102  Fixed some global variables
+00103 
+00104  Revision 1.2  2004/05/21 15:20:00  reddawg
+00105  Cleaned up
+00106 
+00107  END
+00108  ***/
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/time_8h.html b/doc/html/time_8h.html new file mode 100644 index 0000000..ceadb26 --- /dev/null +++ b/doc/html/time_8h.html @@ -0,0 +1,299 @@ + + +UbixOS V2: src/sys/include/ubixos/time.h File Reference + + + + +
+
+
+
+ +

time.h File Reference

+

+#include <ubixos/types.h>
+#include <sys/io.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  timespec
struct  timeStruct
struct  timeval
struct  timezone

Defines

#define BCD_TO_BIN(val)   ((val)=((val)&15) + ((val)>>4)*10)
#define DAY   (24*HOUR)
#define HOUR   (60*MINUTE)
#define MINUTE   60
#define YEAR   (365*DAY)

Typedefs

typedef long suseconds_t
typedef __time_t time_t

Functions

int gettimeofday (struct timeval *tp, struct timezone *tzp)
int time_init ()
uInt32 timeMake (struct timeStruct *time)
+


Define Documentation

+ +
+
+ + + + + + + + + +
#define BCD_TO_BIN (val   )    ((val)=((val)&15) + ((val)>>4)*10)
+
+
+ +

+ +

+Definition at line 38 of file time.h. +

+Referenced by time_init(). +

+

+ +

+
+ + + + +
#define DAY   (24*HOUR)
+
+
+ +

+ +

+Definition at line 42 of file time.h. +

+Referenced by timeMake(). +

+

+ +

+
+ + + + +
#define HOUR   (60*MINUTE)
+
+
+ +

+ +

+Definition at line 41 of file time.h. +

+Referenced by timeMake(). +

+

+ +

+
+ + + + +
#define MINUTE   60
+
+
+ +

+ +

+Definition at line 40 of file time.h. +

+Referenced by timeMake(). +

+

+ +

+
+ + + + +
#define YEAR   (365*DAY)
+
+
+ +

+ +

+Definition at line 43 of file time.h. +

+Referenced by timeMake(). +

+

+


Typedef Documentation

+ +
+
+ + + + +
typedef long suseconds_t
+
+
+ +

+ +

+Definition at line 36 of file time.h. +

+

+ +

+
+ + + + +
typedef __time_t time_t
+
+
+ +

+ +

+Definition at line 46 of file time.h. +

+

+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
int gettimeofday (struct timeval tp,
struct timezone tzp 
)
+
+
+ +

+ +

+Definition at line 110 of file time.c. +

+References timeval::tv_sec, and timeval::tv_usec. +

+Referenced by cond_wait(), sys_init(), and sys_unix_now(). +

+

+ +

+
+ + + + + + + + +
int time_init (  ) 
+
+ +

+ +

+
+ + + + + + + + + +
uInt32 timeMake (struct timeStruct time  ) 
+
+
+ +

+ +

+Definition at line 92 of file time.c. +

+References DAY, timeStruct::day, HOUR, timeStruct::hour, timeStruct::min, MINUTE, timeStruct::mon, month, timeStruct::sec, timeStruct::year, and YEAR. +

+Referenced by time_init(). +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/timer_8S-source.html b/doc/html/timer_8S-source.html new file mode 100644 index 0000000..5be1f33 --- /dev/null +++ b/doc/html/timer_8S-source.html @@ -0,0 +1,99 @@ + + +UbixOS V2: src/sys/kernel/timer.S Source File + + + + +
+
+
+
+ +

timer.S

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 .globl timerInt
+00031 .text
+00032 .code32
+00033 timerInt:                 
+00034   pusha                    /* Save all of the registers                */
+00035   mov $0x20,%dx            /* The Following Sends Our EOI To The MPIC  */
+00036   mov $0x20,%ax           
+00037   outb %al,%dx
+00038   movl systemVitals,%ecx   /* Put Location Of System Vitals Into ECX   */
+00039   incl 4(%ecx)             /* Increment sysTicks our 1000ms counter    */                    
+00040   movl 4(%ecx),%eax        /* Increment our sysUptime by 1S if 1000MS  */
+00041   movl $200,%ebx           /* Have Passed                              */
+00042   xor %edx,%edx           
+00043   div %ebx               
+00044   test %edx,%edx          
+00045   jnz next                
+00046   incl 8(%ecx)            
+00047 next:                     
+00048   movl 4(%ecx),%eax        /* Test If quantum Has Passed If So Then    */
+00049   movl 12(%ecx),%ebx       /* We Can CALL sched                        */
+00050   xor %edx,%edx           
+00051   div %ebx                
+00052   test %edx,%edx          
+00053   jnz done                
+00054   call sched              
+00055 done:                     
+00056   popa                      /* Restore Registers                        */
+00057   iret                    
+00058 
+00059 /***
+00060  END
+00061  ***/
+00062 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/timer_8S.html b/doc/html/timer_8S.html new file mode 100644 index 0000000..fa17557 --- /dev/null +++ b/doc/html/timer_8S.html @@ -0,0 +1,217 @@ + + +UbixOS V2: src/sys/kernel/timer.S File Reference + + + + +
+
+
+
+ +

timer.S File Reference

+

+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + +

Functions

globl timerInt text code32
+dx mov ax outb dx movl ecx 
incl (%ecx) movl 4(%ecx)

Variables

globl timerInt text code32
+dx mov ax outb 
al
globl timerInt text code32
+dx mov ax outb dx movl ecx
+eax ebx xor edx div ebx test 
edx
globl timerInt text code32
+dx mov ax outb dx movl ecx
+eax ebx xor 
edx
globl timerInt text code32
+dx mov ax outb dx movl ecx
+eax 
movl
globl timerInt text code32
+dx mov ax outb dx movl 
systemVitals
globl timerInt text code32 timerInt
globl timerInt text code32
+dx mov 
x20
+


Function Documentation

+ +
+
+ + + + + + + + + +
globl timerInt text code32 dx mov ax outb dx movl ecx incl ( ecx  ) 
+
+
+ +

+ +

+

+


Variable Documentation

+ +
+
+ + + + +
globl timerInt text code32 dx mov ax outb al
+
+
+ +

+ +

+Definition at line 35 of file timer.S. +

+

+ +

+
+ + + + +
globl timerInt text code32 dx mov ax outb dx movl ecx eax ebx xor edx div ebx test edx
+
+
+ +

+ +

+Definition at line 41 of file timer.S. +

+

+ +

+
+ + + + +
globl timerInt text code32 dx mov ax outb dx movl ecx eax ebx xor edx
+
+
+ +

+ +

+Definition at line 41 of file timer.S. +

+

+ +

+
+ + + + +
globl _vmm_pageFault text code32 esp eax pushl ebx movl
+
+
+ +

+ +

+Definition at line 41 of file timer.S. +

+

+ +

+
+ + + + +
globl timerInt text code32 dx mov ax outb dx movl systemVitals
+
+ +

+ +

+
+ + + + +
globl timerInt text code32 timerInt
+
+
+ +

+ +

+Definition at line 35 of file timer.S. +

+Referenced by idt_init(). +

+

+ +

+
+ + + + +
globl timerInt text code32 dx mov x20
+
+
+ +

+ +

+Definition at line 35 of file timer.S. +

+

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/times_8h-source.html b/doc/html/times_8h-source.html new file mode 100644 index 0000000..3ca6e86 --- /dev/null +++ b/doc/html/times_8h-source.html @@ -0,0 +1,103 @@ + + +UbixOS V2: src/sys/include/ubixos/times.h Source File + + + + +
+
+
+
+ +

times.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _TIMES_H
+00031 #define _TIMES_H
+00032 
+00033 #include <ubixos/types.h>
+00034 #include <sys/_types.h>
+00035 
+00036 #ifndef _CLOCK_T_DECLARED
+00037 typedef __clock_t       clock_t;
+00038 #define _CLOCK_T_DECLARED
+00039 #endif
+00040 
+00041 struct tms {
+00042         clock_t tms_utime;      /* User CPU time */
+00043         clock_t tms_stime;      /* System CPU time */
+00044         clock_t tms_cutime;     /* User CPU time of terminated child procs */
+00045         clock_t tms_cstime;     /* System CPU time of terminated child procs */
+00046 };
+00047 
+00048 #endif
+00049 
+00050 /***
+00051  $Log$
+00052  Revision 1.1.1.1  2006/06/01 12:46:14  reddawg
+00053  ubix2
+00054 
+00055  Revision 1.2  2005/10/12 00:13:37  reddawg
+00056  Removed
+00057 
+00058  Revision 1.1.1.1  2005/09/26 17:23:57  reddawg
+00059  no message
+00060 
+00061  Revision 1.2  2004/05/21 15:20:00  reddawg
+00062  Cleaned up
+00063 
+00064 
+00065  END
+00066  ***/
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/times_8h.html b/doc/html/times_8h.html new file mode 100644 index 0000000..6d8f715 --- /dev/null +++ b/doc/html/times_8h.html @@ -0,0 +1,70 @@ + + +UbixOS V2: src/sys/include/ubixos/times.h File Reference + + + + +
+
+
+
+ +

times.h File Reference

+

+#include <ubixos/types.h>
+#include <sys/_types.h>
+ +

+Go to the source code of this file. + + + + + + + +

Data Structures

struct  tms

Typedefs

typedef __clock_t clock_t
+


Typedef Documentation

+ +
+
+ + + + +
typedef __clock_t clock_t
+
+
+ +

+ +

+Definition at line 37 of file times.h. +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/trap_8h-source.html b/doc/html/trap_8h-source.html new file mode 100644 index 0000000..e5ed390 --- /dev/null +++ b/doc/html/trap_8h-source.html @@ -0,0 +1,99 @@ + + +UbixOS V2: src/sys/include/sys/trap.h Source File + + + + +
+
+
+
+ +

trap.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _TRAP_H
+00031 #define _TRAP_H
+00032 
+00033 struct trapframe {
+00034         int     tf_fs;
+00035         int     tf_es;
+00036         int     tf_ds;
+00037         int     tf_edi;
+00038         int     tf_esi;
+00039         int     tf_ebp;
+00040         int     tf_isp;
+00041         int     tf_ebx;
+00042         int     tf_edx;
+00043         int     tf_ecx;
+00044         int     tf_eax;
+00045         int     tf_trapno;
+00046         /* below portion defined in 386 hardware */
+00047         int     tf_err;
+00048         int     tf_eip;
+00049         int     tf_cs;
+00050         int     tf_eflags;
+00051         /* below only when crossing rings (e.g. user to kernel) */
+00052         int     tf_esp;
+00053         int     tf_ss;
+00054 };
+00055 
+00056 
+00057 #endif
+00058 
+00059 /***
+00060  END
+00061  ***/
+00062 
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/trap_8h.html b/doc/html/trap_8h.html new file mode 100644 index 0000000..8083682 --- /dev/null +++ b/doc/html/trap_8h.html @@ -0,0 +1,47 @@ + + +UbixOS V2: src/sys/include/sys/trap.h File Reference + + + + +
+
+
+
+ +

trap.h File Reference

+

+ +

+Go to the source code of this file. + + + + +

Data Structures

struct  trapframe
+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/tree.html b/doc/html/tree.html new file mode 100644 index 0000000..4bc3aa0 --- /dev/null +++ b/doc/html/tree.html @@ -0,0 +1,1007 @@ + + + + + + + TreeView + + + + +
+

UbixOS V2

+
+

o+Data Structures

+
+

|o*__sigset

+

|o*__timespec

+

|o*_item_t

+

|o*_list_t

+

|o*_UbixUser

+

|o*api_msg

+

|o*api_msg_msg

+

|o*arp_entry

+

|o*arp_hdr

+

|o*arpcom

+

|o*blockAllocationTableEntry

+

|o*blockRun

+

|o*bNode

+

|o*bootSect

+

|o*bsd_disklabel

+

|o*bsd_disklabel::partition

+

|o*bTree

+

|o*bTreeHeader

+

|o*buf

+

|o*cacheNode

+

|o*close_args

+

|o*confadd

+

|o*cpuinfo_t

+

|o*csum

+

|o*csum_total

+

|o*dataStream

+

|o*descriptorTableUnion

+

|o*devfs_devices

+

|o*devfs_info

+

|o*device

+

|o*device_interface

+

|o*device_node

+

|o*device_resource

+

|o*device_t

+

|o*devMethodType

+

|o*directoryEntry

+

|o*directoryList

+

|o*dirent

+

|o*DiskFS

+

|o*diskSuperBlock

+

|o*dmadat

+

|o*dos_partition

+

|o*dp_rcvhdr

+

|o*driveInfo

+

|o*driverType

+

|o*DrvGeom

+

|o*ei_device

+

|o*elfDynamic

+

|o*elfDynSym

+

|o*elfHeader

+

|o*elfPltInfo

+

|o*elfProgramHeader

+

|o*elfSectionHeader

+

|o*eth_addr

+

|o*eth_hdr

+

|o*etheraddr

+

|o*ethernetif

+

|o*ethip_hdr

+

|o*fcntl_args

+

|o*file

+

|o*fileDescriptor

+

|o*fileDescriptorStruct

+

|o*fileSystem

+

|o*FileSystemAbstract

+

|o*fs

+

|o*fstat_args

+

|o*gdt_descr

+

|o*gdtDescriptor

+

|o*gdtGate

+

|o*getdtablesize_args

+

|o*getgid_args

+

|o*getpid_args

+

|o*gettimeofday_args

+

|o*getuid_args

+

|o*hostRingEntry

+

|o*i386_frame

+

|o*i387Struct

+

|o*icmp_dur_hdr

+

|o*icmp_echo_hdr

+

|o*icmp_te_hdr

+

|o*in_addr

+

|o*initBlock

+

|o*ioctl_args

+

|o*ip_addr

+

|o*ip_hdr

+

|o*issetugid_args

+

|o*kmod_struct

+

|o*lncInfo

+

|o*lwip_socket

+

|o*mds

+

|o*memDescriptor

+

|o*mMap

+

|o*mmap_args

+

|o*mpi_mbox

+

|o*mpi_message

+

|o*munmap_args

+

|o*net

+

|o*netbuf

+

|o*netconn

+

|o*netif

+

|o*nicBuffer

+

|o*nicInfo

+

|o*obreak_args

+

|o*ogDisplay_UbixOS

+

|o*ogDisplay_VESA

+

|o*ogModeInfo

+

|o*ogVESAInfo

+

|o*osInfo

+

|o*partitionInformation

+

|o*pbuf

+

|o*pciConfig

+

|o*pipe_args

+

|o*readlink_args

+

|o*sdeWindows

+

|o*sigaction_args

+

|o*sigprocmask_args

+

|o*sockaddr

+

|o*sockaddr_in

+

|o*stat

+

|o*sys_mbox

+

|o*sys_mbox_msg

+

|o*sys_sem

+

|o*sys_thread

+

|o*sys_timeout

+

|o*sys_timeouts

+

|o*sysctl_args

+

|o*sysctl_entry

+

|o*taskStruct

+

|o*tcp_hdr

+

|o*tcp_pcb

+

|o*tcp_pcb_listen

+

|o*tcp_seg

+

|o*tcpip_msg

+

|o*thread

+

|o*thread_start_param

+

|o*timespec

+

|o*timeStruct

+

|o*timeval

+

|o*timezone

+

|o*TMode_Rec

+

|o*tms

+

|o*trapframe

+

|o*tssStruct

+

|o*tty_termNode

+

|o*TVESA_Rec

+

|o*ubixDiskLabel

+

|o*ubixDiskLabel::ubixPartitions

+

|o*UbixFS

+

|o*ubixFSInfo

+

|o*ubixfsInode

+

|o*ubthread

+

|o*ubthread_cond

+

|o*ubthread_cond_list

+

|o*ubthread_list

+

|o*ubthread_mutex

+

|o*ubthread_mutex_list

+

|o*udp_hdr

+

|o*udp_pcb

+

|o*ufs1_dinode

+

|o*ufs2_dinode

+

|o*uPtr

+

|o*userFileDescriptorStruct

+

|o*vfs_abstract

+

|o*vfs_mountPoint

+

|\*write_args

+
+

o+Class Hierarchy

+
+

|o*__sigset

+

|o*__timespec

+

|o*_item_t

+

|o*_list_t

+

|o*_UbixUser

+

|o*api_msg

+

|o*api_msg_msg

+

|o*arp_entry

+

|o*arp_hdr

+

|o*arpcom

+

|o*blockAllocationTableEntry

+

|o*blockRun

+

|o*bNode

+

|o*bootSect

+

|o*bsd_disklabel

+

|o*bsd_disklabel::partition

+

|o*bTree

+

|o*bTreeHeader

+

|o*buf

+

|o*cacheNode

+

|o*close_args

+

|o*confadd

+

|o*cpuinfo_t

+

|o*csum

+

|o*csum_total

+

|o*dataStream

+

|o*descriptorTableUnion

+

|o*devfs_devices

+

|o*devfs_info

+

|o*device

+

|o*device_interface

+

|o*device_node

+

|o*device_resource

+

|o*device_t

+

|o*devMethodType

+

|o*directoryEntry

+

|o*directoryList

+

|o*dirent

+

|o*diskSuperBlock

+

|o*dmadat

+

|o*dos_partition

+

|o*dp_rcvhdr

+

|o*driveInfo

+

|o*driverType

+

|o*DrvGeom

+

|o*ei_device

+

|o*elfDynamic

+

|o*elfDynSym

+

|o*elfHeader

+

|o*elfPltInfo

+

|o*elfProgramHeader

+

|o*elfSectionHeader

+

|o*eth_addr

+

|o*eth_hdr

+

|o*etheraddr

+

|o*ethernetif

+

|o*ethip_hdr

+

|o*fcntl_args

+

|o*file

+

|o*fileDescriptor

+

|o*fileDescriptorStruct

+

|o*fileSystem

+

|o+FileSystemAbstract

+
+

||\*DiskFS

+
+

|o*fs

+

|o*fstat_args

+

|o*gdt_descr

+

|o*gdtDescriptor

+

|o*gdtGate

+

|o*getdtablesize_args

+

|o*getgid_args

+

|o*getpid_args

+

|o*gettimeofday_args

+

|o*getuid_args

+

|o*hostRingEntry

+

|o*i386_frame

+

|o*i387Struct

+

|o*icmp_dur_hdr

+

|o*icmp_echo_hdr

+

|o*icmp_te_hdr

+

|o*in_addr

+

|o*initBlock

+

|o*ioctl_args

+

|o*ip_addr

+

|o*ip_hdr

+

|o*issetugid_args

+

|o*kmod_struct

+

|o*lncInfo

+

|o*lwip_socket

+

|o*mds

+

|o*memDescriptor

+

|o*mMap

+

|o*mmap_args

+

|o*mpi_mbox

+

|o*mpi_message

+

|o*munmap_args

+

|o*net

+

|o*netbuf

+

|o*netconn

+

|o*netif

+

|o*nicBuffer

+

|o*nicInfo

+

|o*obreak_args

+

|o*ogDisplay_UbixOS

+

|o*ogDisplay_VESA

+

|o*ogModeInfo

+

|o*ogVESAInfo

+

|o*osInfo

+

|o*partitionInformation

+

|o*pbuf

+

|o*pciConfig

+

|o*pipe_args

+

|o*readlink_args

+

|o*sdeWindows

+

|o*sigaction_args

+

|o*sigprocmask_args

+

|o*sockaddr

+

|o*sockaddr_in

+

|o*stat

+

|o*sys_mbox

+

|o*sys_mbox_msg

+

|o*sys_sem

+

|o*sys_thread

+

|o*sys_timeout

+

|o*sys_timeouts

+

|o*sysctl_args

+

|o*sysctl_entry

+

|o*taskStruct

+

|o*tcp_hdr

+

|o*tcp_pcb

+

|o*tcp_pcb_listen

+

|o*tcp_seg

+

|o*tcpip_msg

+

|o*thread

+

|o*thread_start_param

+

|o*timespec

+

|o*timeStruct

+

|o*timeval

+

|o*timezone

+

|o*TMode_Rec

+

|o*tms

+

|o*trapframe

+

|o*tssStruct

+

|o*tty_termNode

+

|o*TVESA_Rec

+

|o*ubixDiskLabel

+

|o*ubixDiskLabel::ubixPartitions

+

|o*ubixFSInfo

+

|o*ubixfsInode

+

|o*ubthread

+

|o*ubthread_cond

+

|o*ubthread_cond_list

+

|o*ubthread_list

+

|o*ubthread_mutex

+

|o*ubthread_mutex_list

+

|o*udp_hdr

+

|o*udp_pcb

+

|o*ufs1_dinode

+

|o*ufs2_dinode

+

|o*uPtr

+

|o*userFileDescriptorStruct

+

|o+vfs_abstract

+
+

||\*UbixFS

+
+

|o*vfs_mountPoint

+

|\*write_args

+
+

o*Data Fields

+

o+Namespace List

+
+

|\*std

+
+

o+File List

+
+

|o*src/sys/Makefile.inc

+

|o*src/sys/compile/null.c

+

|o*src/sys/devfs/devfs.c

+

|o*src/sys/include/assert.h

+

|o*src/sys/include/math.h

+

|o*src/sys/include/stdarg.h

+

|o*src/sys/include/string.h

+

|o*src/sys/include/devfs/devfs.h

+

|o*src/sys/include/isa/8259.h

+

|o*src/sys/include/isa/atkbd.h

+

|o*src/sys/include/isa/fdc.h

+

|o*src/sys/include/isa/mouse.h

+

|o*src/sys/include/isa/ne2k.h

+

|o*src/sys/include/isa/pit.h

+

|o*src/sys/include/lib/bioscall.h

+

|o*src/sys/include/lib/kmalloc.h

+

|o*src/sys/include/lib/kprint.h

+

|o*src/sys/include/lib/kprintf.h

+

|o*src/sys/include/lib/libcpp.h

+

|o*src/sys/include/lib/string.h

+

|o*src/sys/include/mpi/mpi.h

+

|o*src/sys/include/net/api.h

+

|o*src/sys/include/net/api_msg.h

+

|o*src/sys/include/net/arch.h

+

|o*src/sys/include/net/debug.h

+

|o*src/sys/include/net/def.h

+

|o*src/sys/include/net/err.h

+

|o*src/sys/include/net/list.h

+

|o*src/sys/include/net/lwipopts.h

+

|o*src/sys/include/net/mem.h

+

|o*src/sys/include/net/memp.h

+

|o*src/sys/include/net/net.h

+

|o*src/sys/include/net/netif.h

+

|o*src/sys/include/net/opt.h

+

|o*src/sys/include/net/pbuf.h

+

|o*src/sys/include/net/sockets.h

+

|o*src/sys/include/net/stats.h

+

|o*src/sys/include/net/sys.h

+

|o*src/sys/include/net/tcp.h

+

|o*src/sys/include/net/tcpip.h

+

|o*src/sys/include/net/udp.h

+

|o*src/sys/include/net/arch/cc.h

+

|o*src/sys/include/net/arch/cpu.h

+

|o*src/sys/include/net/arch/init.h

+

|o*src/sys/include/net/arch/lib.h

+

|o*src/sys/include/net/arch/perf.h

+

|o*src/sys/include/net/arch/sys_arch.h

+

|o*src/sys/include/net/ipv4/icmp.h

+

|o*src/sys/include/net/ipv4/inet.h

+

|o*src/sys/include/net/ipv4/ip.h

+

|o*src/sys/include/net/ipv4/ip_addr.h

+

|o*src/sys/include/net/ipv6/icmp.h

+

|o*src/sys/include/net/ipv6/inet.h

+

|o*src/sys/include/net/ipv6/ip.h

+

|o*src/sys/include/net/ipv6/ip_addr.h

+

|o*src/sys/include/netif/arp.h

+

|o*src/sys/include/netif/ethernetif.h

+

|o*src/sys/include/netif/loopif.h

+

|o*src/sys/include/netif/tcpdump.h

+

|o*src/sys/include/objgfx/ogDisplay_VESA.h

+

|o*src/sys/include/pci/hd.h

+

|o*src/sys/include/pci/lnc.h

+

|o*src/sys/include/pci/pci.h

+

|o*src/sys/include/sde/ogDisplay_UbixOS.h

+

|o*src/sys/include/sde/sde.h

+

|o*src/sys/include/sys/_types.h

+

|o*src/sys/include/sys/buf.h

+

|o*src/sys/include/sys/cdefs.h

+

|o*src/sys/include/sys/device.h

+

|o*src/sys/include/sys/device.old.h

+

|o*src/sys/include/sys/dma.h

+

|o*src/sys/include/sys/driver.h

+

|o*src/sys/include/sys/gdt.h

+

|o*src/sys/include/sys/gen_calls.h

+

|o*src/sys/include/sys/idt.h

+

|o*src/sys/include/sys/io.h

+

|o*src/sys/include/sys/kern_descrip.h

+

|o*src/sys/include/sys/kern_sig.h

+

|o*src/sys/include/sys/kern_sysctl.h

+

|o*src/sys/include/sys/pipe.h

+

|o*src/sys/include/sys/signal.h

+

|o*src/sys/include/sys/sysproto.h

+

|o*src/sys/include/sys/thread.h

+

|o*src/sys/include/sys/trap.h

+

|o*src/sys/include/sys/tss.h

+

|o*src/sys/include/sys/video.h

+

|o*src/sys/include/ubixfs/dirCache.h

+

|o*src/sys/include/ubixfs/ubixfs.h

+

|o*src/sys/include/ubixos/elf.h

+

|o*src/sys/include/ubixos/endtask.h

+

|o*src/sys/include/ubixos/exec.h

+

|o*src/sys/include/ubixos/fork.h

+

|o*src/sys/include/ubixos/init.h

+

|o*src/sys/include/ubixos/kmod.h

+

|o*src/sys/include/ubixos/kpanic.h

+

|o*src/sys/include/ubixos/ld.h

+

|o*src/sys/include/ubixos/lists.h

+

|o*src/sys/include/ubixos/sched.h

+

|o*src/sys/include/ubixos/sem.h

+

|o*src/sys/include/ubixos/smp.h

+

|o*src/sys/include/ubixos/spinlock.h

+

|o*src/sys/include/ubixos/static.h

+

|o*src/sys/include/ubixos/syscall.h

+

|o*src/sys/include/ubixos/syscalls.h

+

|o*src/sys/include/ubixos/syscalls_new.h

+

|o*src/sys/include/ubixos/systemtask.h

+

|o*src/sys/include/ubixos/time.h

+

|o*src/sys/include/ubixos/times.h

+

|o*src/sys/include/ubixos/tty.h

+

|o*src/sys/include/ubixos/types.h

+

|o*src/sys/include/ubixos/ubthread.h

+

|o*src/sys/include/ufs/ffs.h

+

|o*src/sys/include/ufs/ufs.h

+

|o*src/sys/include/vfs/file.h

+

|o*src/sys/include/vfs/mount.h

+

|o*src/sys/include/vfs/vfs.h

+

|o*src/sys/include/vmm/paging.h

+

|o*src/sys/include/vmm/vmm.h

+

|o*src/sys/init/main.c

+

|o*src/sys/init/start.S

+

|o*src/sys/init/static.c

+

|o*src/sys/isa/8259.c

+

|o*src/sys/isa/atkbd.c

+

|o*src/sys/isa/fdc.c

+

|o*src/sys/isa/mouse.c

+

|o*src/sys/isa/ne2k.c

+

|o*src/sys/isa/pit.c

+

|o*src/sys/isa/rs232.c

+

|o*src/sys/kernel/ap-boot.S

+

|o*src/sys/kernel/bioscall.c

+

|o*src/sys/kernel/elf.c

+

|o*src/sys/kernel/endtask.c

+

|o*src/sys/kernel/exec.c

+

|o*src/sys/kernel/fork.c

+

|o*src/sys/kernel/gen_calls.c

+

|o*src/sys/kernel/kern_descrip.c

+

|o*src/sys/kernel/kern_sig.c

+

|o*src/sys/kernel/kern_sysctl.c

+

|o*src/sys/kernel/kpanic.c

+

|o*src/sys/kernel/ld.c

+

|o*src/sys/kernel/pipe.c

+

|o*src/sys/kernel/sched.c

+

|o*src/sys/kernel/schedyield.S

+

|o*src/sys/kernel/sem.c

+

|o*src/sys/kernel/smp.c

+

|o*src/sys/kernel/spinlock.c

+

|o*src/sys/kernel/sys_call.S

+

|o*src/sys/kernel/sys_call_new.S

+

|o*src/sys/kernel/syscall.c

+

|o*src/sys/kernel/syscall_new.c

+

|o*src/sys/kernel/systemtask.c

+

|o*src/sys/kernel/time.c

+

|o*src/sys/kernel/timer.S

+

|o*src/sys/kernel/tty.c

+

|o*src/sys/kernel/ubthread.c

+

|o*src/sys/kernel/vitals.c

+

|o*src/sys/kmods/kmod.c

+

|o*src/sys/lib/assert.c

+

|o*src/sys/lib/atan.c

+

|o*src/sys/lib/divdi3.c

+

|o*src/sys/lib/kmalloc.c

+

|o*src/sys/lib/kprintf.c

+

|o*src/sys/lib/libcpp.cc

+

|o*src/sys/lib/memset.c

+

|o*src/sys/lib/net.c

+

|o*src/sys/lib/ogprintf.cc

+

|o*src/sys/lib/sqrt.c

+

|o*src/sys/lib/string.c

+

|o*src/sys/lib/strtok.c

+

|o*src/sys/lib/strtol.c

+

|o*src/sys/lib/vsprintf.c

+

|o*src/sys/mpi/message.c

+

|o*src/sys/mpi/system.c

+

|o*src/sys/net/api/api_lib.c

+

|o*src/sys/net/api/api_msg.c

+

|o*src/sys/net/api/err.c

+

|o*src/sys/net/api/sockets.c

+

|o*src/sys/net/api/tcpip.c

+

|o*src/sys/net/net/bot.c

+

|o*src/sys/net/net/init.c

+

|o*src/sys/net/net/shell.c

+

|o*src/sys/net/net/shell.h

+

|o*src/sys/net/net/sys_arch.c

+

|o*src/sys/net/net/udpecho.c

+

|o*src/sys/net/net/udpecho.h

+

|o*src/sys/net/netif/arp.c

+

|o*src/sys/net/netif/ethernetif.c

+

|o*src/sys/net/netif/loopif.c

+

|o*src/sys/net/netif/tcpdump.c

+

|o*src/sys/pci/hd.c

+

|o*src/sys/pci/lnc.c

+

|o*src/sys/pci/pci.c

+

|o*src/sys/sys/device.c

+

|o*src/sys/sys/dma.c

+

|o*src/sys/sys/idt.c

+

|o*src/sys/sys/io.c

+

|o*src/sys/sys/video.c

+

|o*src/sys/ubixfs/block.c

+

|o*src/sys/ubixfs/dirCache.c

+

|o*src/sys/ubixfs/directory.c

+

|o*src/sys/ubixfs/thread.c

+

|o*src/sys/ubixfs/ubixfs.c

+

|o*src/sys/ubixfsv2/btree.cpp

+

|o*src/sys/ubixfsv2/btree.h

+

|o*src/sys/ubixfsv2/btreeheader.h

+

|o*src/sys/ubixfsv2/device.h

+

|o*src/sys/ubixfsv2/file.h

+

|o*src/sys/ubixfsv2/fsAbstract.h

+

|o*src/sys/ubixfsv2/main.cpp

+

|o*src/sys/ubixfsv2/ramdrive.cpp

+

|o*src/sys/ubixfsv2/ramdrive.h

+

|o*src/sys/ubixfsv2/types.h

+

|o*src/sys/ubixfsv2/ubixfs.cpp

+

|o*src/sys/ubixfsv2/ubixfs.h

+

|o*src/sys/ubixfsv2/vfs.cpp

+

|o*src/sys/ubixfsv2/vfs.h

+

|o*src/sys/ufs/ffs.c

+

|o*src/sys/ufs/ufs.c

+

|o*src/sys/vfs/file.c

+

|o*src/sys/vfs/mount.c

+

|o*src/sys/vfs/vfs.c

+

|o*src/sys/vmm/copyvirtualspace.c

+

|o*src/sys/vmm/createvirtualspace.c

+

|o*src/sys/vmm/getfreepage.c

+

|o*src/sys/vmm/getfreevirtualpage.c

+

|o*src/sys/vmm/getphysicaladdr.c

+

|o*src/sys/vmm/page_fault.S

+

|o*src/sys/vmm/pagefault.c

+

|o*src/sys/vmm/paging.c

+

|o*src/sys/vmm/setpageattributes.c

+

|o*src/sys/vmm/unmappage.c

+

|o*src/sys/vmm/vmm_init.c

+

|\*src/sys/vmm/vmm_memory.c

+
+

o+Directories

+
+

|\+src

+
+

| \+sys

+
+

|  o+compile

+
+

|  |\*null.c

+
+

|  o+devfs

+
+

|  |\*devfs.c

+
+

|  o+include

+ +

|  o+init

+ +

|  o+isa

+ +

|  o+kernel

+ +

|  o+kmods

+
+

|  |\*kmod.c

+
+

|  o+lib

+ +

|  o+mpi

+ +

|  o+net

+ +

|  o+pci

+
+

|  |o*hd.c

+

|  |o*lnc.c

+

|  |\*pci.c

+
+

|  o+sys

+ +

|  o+ubixfs

+ +

|  o+ubixfsv2

+ +

|  o+ufs

+
+

|  |o*ffs.c

+

|  |\*ufs.c

+
+

|  o+vfs

+
+

|  |o*file.c

+

|  |o*mount.c

+

|  |\*vfs.c

+
+

|  o+vmm

+ +

|  \*Makefile.inc

+
+
+
+

\*Globals

+
+
+ + diff --git a/doc/html/tss_8h-source.html b/doc/html/tss_8h-source.html new file mode 100644 index 0000000..49e3792 --- /dev/null +++ b/doc/html/tss_8h-source.html @@ -0,0 +1,177 @@ + + +UbixOS V2: src/sys/include/sys/tss.h Source File + + + + +
+
+
+
+ +

tss.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _TSS_H
+00031 #define _TSS_H
+00032 
+00033 #include <ubixos/types.h>
+00034 
+00035 struct tssStruct {
+00036   short back_link;
+00037   short back_link_reserved;
+00038   long  esp0;
+00039   short ss0;
+00040   short ss0_reserved;
+00041   long  esp1;
+00042   short ss1;
+00043   short ss1_reserved;
+00044   long  esp2;
+00045   short ss2;
+00046   short ss2_reserved;
+00047   long  cr3;
+00048   long  eip;
+00049   long  eflags;
+00050   long  eax,ecx,edx,ebx;
+00051   long  esp;
+00052   long  ebp;
+00053   long  esi;
+00054   long  edi;
+00055   short es;
+00056   short es_reserved;
+00057   short cs;
+00058   short cs_reserved;
+00059   short ss;
+00060   short ss_reserved;
+00061   short ds;
+00062   short ds_reserved;
+00063   short fs;
+00064   short fs_reserved;
+00065   short gs;
+00066   short gs_reserved;
+00067   short ldt;
+00068   short ldt_reserved;
+00069   short trace_bitmap;
+00070   short io_map;
+00071   char  io_space[8192];
+00072   };
+00073 
+00074 struct i387Struct {
+00075   long cwd;
+00076   long swd;
+00077   long twd;
+00078   long fip;
+00079   long fcs;
+00080   long foo;
+00081   long fos;
+00082   long st_space[20];   /* 8*10 bytes for each FP-reg = 80 bytes */
+00083   };
+00084 
+00085 struct i386_frame {
+00086   uInt32 gs;
+00087   uInt32 fs;
+00088   uInt32 es;
+00089   uInt32 ds;
+00090   uInt32 ss;
+00091   uInt32 edi;
+00092   uInt32 esi;
+00093   uInt32 ebp;
+00094   uInt32 esp;
+00095   uInt32 ebx;
+00096   uInt32 edx;
+00097   uInt32 ecx;
+00098   uInt32 eax;
+00099   /*
+00100   uInt32 vector;
+00101   uInt32 error_code;
+00102   */
+00103   uInt32 eip;
+00104   uInt32 cs;
+00105   uInt32 flags;
+00106   uInt32 user_esp;
+00107   uInt32 user_ss;
+00108   };
+00109 
+00110 #endif
+00111 
+00112 /***
+00113  $Log$
+00114  Revision 1.1.1.1  2006/06/01 12:46:15  reddawg
+00115  ubix2
+00116 
+00117  Revision 1.2  2005/10/12 00:13:37  reddawg
+00118  Removed
+00119 
+00120  Revision 1.1.1.1  2005/09/26 17:23:53  reddawg
+00121  no message
+00122 
+00123  Revision 1.6  2004/07/27 07:42:29  reddawg
+00124  *burp*
+00125 
+00126  Revision 1.5  2004/07/27 07:40:41  reddawg
+00127  does it compile now?
+00128 
+00129  Revision 1.4  2004/07/27 07:27:50  reddawg
+00130  chg: I was fooled thought we failed but it was a casting issue
+00131 
+00132  Revision 1.3  2004/07/22 20:53:07  reddawg
+00133  atkbd: fixed problem
+00134 
+00135  Revision 1.2  2004/05/21 15:12:17  reddawg
+00136  Cleaned up
+00137 
+00138 
+00139  END
+00140  ***/
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/tss_8h.html b/doc/html/tss_8h.html new file mode 100644 index 0000000..75e9de3 --- /dev/null +++ b/doc/html/tss_8h.html @@ -0,0 +1,52 @@ + + +UbixOS V2: src/sys/include/sys/tss.h File Reference + + + + +
+
+
+
+ +

tss.h File Reference

+

+#include <ubixos/types.h>
+ +

+Go to the source code of this file. + + + + + + + + +

Data Structures

struct  i386_frame
struct  i387Struct
struct  tssStruct
+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/tty_8c-source.html b/doc/html/tty_8c-source.html new file mode 100644 index 0000000..123fc1e --- /dev/null +++ b/doc/html/tty_8c-source.html @@ -0,0 +1,213 @@ + + +UbixOS V2: src/sys/kernel/tty.c Source File + + + + +
+
+
+
+ +

tty.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <ubixos/tty.h>
+00031 #include <ubixos/kpanic.h>
+00032 #include <ubixos/spinlock.h>
+00033 #include <lib/kprintf.h>
+00034 #include <lib/kmalloc.h>
+00035 #include <sys/io.h>
+00036 #include <string.h>
+00037 
+00038 static tty_term  *terms          = 0x0;
+00039 tty_term         *tty_foreground = 0x0;
+00040 static spinLock_t tty_spinLock   = SPIN_LOCK_INITIALIZER;
+00041 
+00042 int tty_init() {
+00043   int i = 0x0;
+00044 
+00045   /* Allocate memory for terminals */
+00046   terms = (tty_term *)kmalloc(sizeof(tty_term)*TTY_MAX_TERMS);
+00047   if (terms == 0x0)
+00048     kpanic("tty_init: Failed to allocate memory. File: %s, Line: %i\n",__FILE__,__LINE__);
+00049 
+00050   /* Set up all default terminal information */
+00051   for (i = 0;i < TTY_MAX_TERMS;i++) {
+00052     terms[i].tty_buffer = (char *)kmalloc(80*60*2);
+00053     if (terms[i].tty_buffer == 0x0)
+00054       kpanic("tty_init: Failed to allocate buffer memory. File: %s, Line: %i\n",__FILE__,__LINE__);
+00055 
+00056     terms[i].tty_pointer = terms[i].tty_buffer;   /* Set up tty pointer to internal buffer */
+00057     terms[i].tty_x       = 0x0;                   /* Set up default X position             */
+00058     terms[i].tty_y       = 0x0;                   /* Set up default Y position             */
+00059     terms[i].tty_colour  = 0x0A + i;              /* Set up default tty text colour        */
+00060     }
+00061 
+00062   /* Read tty0 current position (to migrate from kprintf). */
+00063   outportByte(0x3D4, 0x0e);
+00064   terms[0].tty_y = inportByte(0x3D5);
+00065   outportByte(0x3D4, 0x0f);
+00066   terms[0].tty_x = inportByte(0x3D5);
+00067 
+00068 
+00069   /* Set up pointer for the foreground tty */
+00070   tty_foreground = &terms[0];
+00071 
+00072   /* Set up the foreground ttys information */
+00073   tty_foreground->tty_pointer = (char *)0xB8000;
+00074 
+00075   /* Return to let kernel know initialization is complete */
+00076   kprintf("tty0 - Initialized\n");
+00077 
+00078   return(0x0);
+00079   }
+00080 
+00081 
+00082  /*
+00083   This will change the specified tty. It ultimately copies the screen
+00084   to the foreground buffer copies the new ttys buffer to the screen and
+00085   adjusts a couple pointers and we are good to go.
+00086  */
+00087 int tty_change(uInt16 tty) {
+00088 
+00089   if (tty > TTY_MAX_TERMS)
+00090     kpanic("Error: Changing to an invalid tty. File: %s, Line: %i\n",__FILE__,__LINE__);
+00091 
+00092   /* Copy display buffer to tty buffer */
+00093   memcpy(tty_foreground->tty_buffer,(char *)0xB8000,(80*60*2));
+00094 
+00095   /* Copy new tty buffer to display buffer */
+00096   memcpy((char *)0xB8000,terms[tty].tty_buffer,(80*60*2));
+00097 
+00098   /*
+00099    Set the tty_pointer to the internal buffer so I can continue 
+00100    writing to what it believes is the screen
+00101   */
+00102   tty_foreground->tty_pointer = tty_foreground->tty_buffer;
+00103 
+00104   terms[tty].tty_pointer = (char *)0xB8000;
+00105 
+00106   /* set new foreground tty */
+00107   tty_foreground = &terms[tty];
+00108 
+00109   /* Adjust cursor when we change consoles */
+00110   outportByte(0x3D4, 0x0F);
+00111   outportByte(0x3D5, tty_foreground->tty_x);
+00112   outportByte(0x3D4, 0x0E);
+00113   outportByte(0x3D5, tty_foreground->tty_y);
+00114 
+00115   return(0x0);
+00116   }
+00117 
+00118 int tty_print(char *string,tty_term *term) {
+00119   unsigned int    bufferOffset = 0x0, character = 0x0, i = 0x0;
+00120   spinLock(&tty_spinLock);
+00121 
+00122   /* We Need To Get The Y Position */
+00123   bufferOffset = term->tty_y;
+00124   bufferOffset <<= 8;
+00125 
+00126   /* Then We Need To Add The X Position */
+00127   bufferOffset += term->tty_x;
+00128   bufferOffset <<= 1;
+00129 
+00130   while ((character = *string++)) {
+00131     switch (character) {
+00132     case '\n':
+00133       bufferOffset = (bufferOffset / 160) * 160 + 160;
+00134       break;
+00135     default:
+00136       term->tty_pointer[bufferOffset++] = character;
+00137       term->tty_pointer[bufferOffset++] = term->tty_colour;
+00138       break;
+00139     }  /* switch */
+00140 
+00141     /* Check To See If We Are Out Of Bounds */
+00142     if (bufferOffset >= 160 * 25) {
+00143       for (i = 0; i < 160 * 24; i++) {
+00144         term->tty_pointer[i] = term->tty_pointer[i + 160];
+00145         }
+00146       for (i = 0; i < 80; i++) {
+00147         term->tty_pointer[(160 * 24) + (i * 2)] = 0x20;
+00148         term->tty_pointer[(160 * 24) + (i * 2) + 1] = term->tty_colour;
+00149         }
+00150       bufferOffset -= 160;
+00151       }
+00152     }
+00153 
+00154   bufferOffset >>= 1;  /* Set the new cursor position  */
+00155   term->tty_x = (bufferOffset &  0xFF);
+00156   term->tty_y = (bufferOffset >> 0x8);
+00157 
+00158   if (term == tty_foreground) {
+00159     outportByte(0x3D4, 0x0f);
+00160     outportByte(0x3D5, term->tty_x);
+00161     outportByte(0x3D4, 0x0e);
+00162     outportByte(0x3D5, term->tty_y);
+00163     }
+00164 
+00165   spinUnlock(&tty_spinLock);
+00166 
+00167   return(0x0);
+00168   }
+00169 
+00170 tty_term *tty_find(uInt16 tty) {
+00171   return(&terms[tty]);
+00172   }
+00173 
+00174 /***
+00175  END
+00176  ***/
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/tty_8c.html b/doc/html/tty_8c.html new file mode 100644 index 0000000..0c92981 --- /dev/null +++ b/doc/html/tty_8c.html @@ -0,0 +1,236 @@ + + +UbixOS V2: src/sys/kernel/tty.c File Reference + + + + +
+
+
+
+ +

tty.c File Reference

+

+#include <ubixos/tty.h>
+#include <ubixos/kpanic.h>
+#include <ubixos/spinlock.h>
+#include <lib/kprintf.h>
+#include <lib/kmalloc.h>
+#include <sys/io.h>
+#include <string.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + +

Functions

int tty_change (uInt16 tty)
tty_termtty_find (uInt16 tty)
int tty_init ()
int tty_print (char *string, tty_term *term)

Variables

static tty_termterms = 0x0
tty_termtty_foreground = 0x0
static spinLock_t tty_spinLock = SPIN_LOCK_INITIALIZER
+


Function Documentation

+ +
+
+ + + + + + + + + +
int tty_change (uInt16  tty  ) 
+
+ +

+ +

+
+ + + + + + + + + +
tty_term* tty_find (uInt16  tty  ) 
+
+
+ +

+ +

+Definition at line 170 of file tty.c. +

+References terms. +

+Referenced by execFile(), kprint(), and systemTask(). +

+

+ +

+
+ + + + + + + + +
int tty_init (  ) 
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
int tty_print (char *  string,
tty_term term 
)
+
+ +

+


Variable Documentation

+ +
+
+ + + + +
tty_term* terms = 0x0 [static]
+
+
+ +

+ +

+Definition at line 38 of file tty.c. +

+Referenced by tty_change(), tty_find(), and tty_init(). +

+

+ +

+
+ + + + +
tty_term* tty_foreground = 0x0
+
+
+ +

+ +

+Definition at line 39 of file tty.c. +

+Referenced by backSpace(), getch(), keyboardHandler(), kpanic(), kprint(), sysFgetc(), tty_change(), tty_init(), and tty_print(). +

+

+ +

+
+ + + + +
spinLock_t tty_spinLock = SPIN_LOCK_INITIALIZER [static]
+
+
+ +

+ +

+Definition at line 40 of file tty.c. +

+Referenced by tty_print(). +

+

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/tty_8h-source.html b/doc/html/tty_8h-source.html new file mode 100644 index 0000000..f2e28e9 --- /dev/null +++ b/doc/html/tty_8h-source.html @@ -0,0 +1,129 @@ + + +UbixOS V2: src/sys/include/ubixos/tty.h Source File + + + + +
+
+
+
+ +

tty.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _TTY_H
+00031 #define _TTY_H
+00032 
+00033 #include <ubixos/types.h>
+00034 
+00035 #define TTY_MAX_TERMS 5
+00036 
+00037 typedef struct tty_termNode {
+00038   char    *tty_buffer;
+00039   char    *tty_pointer;
+00040   uInt8    tty_colour;
+00041   uInt16   tty_x;
+00042   uInt16   tty_y;
+00043   pidType  owner;
+00044   char     stdin[512];
+00045   int      stdinSize;
+00046   } tty_term;
+00047 
+00048 int tty_init();
+00049 int tty_change(uInt16);
+00050 tty_term *tty_find(uInt16);
+00051 int tty_print(char *,tty_term *);
+00052 
+00053 extern tty_term *tty_foreground;
+00054 
+00055 #endif
+00056 
+00057 /***
+00058  $Log$
+00059  Revision 1.1.1.1  2006/06/01 12:46:14  reddawg
+00060  ubix2
+00061 
+00062  Revision 1.2  2005/10/12 00:13:37  reddawg
+00063  Removed
+00064 
+00065  Revision 1.1.1.1  2005/09/26 17:23:57  reddawg
+00066  no message
+00067 
+00068  Revision 1.8  2004/09/06 22:11:29  reddawg
+00069  tty: now each tty has a stdin....
+00070 
+00071  Revision 1.7  2004/08/14 11:23:02  reddawg
+00072  Changes
+00073 
+00074  Revision 1.6  2004/08/09 12:58:05  reddawg
+00075  let me know when you got the surce
+00076 
+00077  Revision 1.5  2004/08/09 05:40:31  reddawg
+00078  tty: removed current and made a foreground
+00079 
+00080  Revision 1.4  2004/08/06 22:32:16  reddawg
+00081  Ubix Works Again
+00082 
+00083  Revision 1.2  2004/08/04 08:17:57  reddawg
+00084  tty: we have primative ttys try f1-f5 so it is easier to use and debug
+00085       ubixos
+00086 
+00087  Revision 1.1  2004/08/03 21:44:24  reddawg
+00088  ttys
+00089 
+00090  END
+00091  ***/
+00092 
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/tty_8h.html b/doc/html/tty_8h.html new file mode 100644 index 0000000..c98f13b --- /dev/null +++ b/doc/html/tty_8h.html @@ -0,0 +1,233 @@ + + +UbixOS V2: src/sys/include/ubixos/tty.h File Reference + + + + +
+
+
+
+ +

tty.h File Reference

+

+#include <ubixos/types.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  tty_termNode

Defines

#define TTY_MAX_TERMS   5

Typedefs

typedef tty_termNode tty_term

Functions

int tty_change (uInt16)
tty_termtty_find (uInt16)
int tty_init ()
int tty_print (char *, tty_term *)

Variables

tty_termtty_foreground
+


Define Documentation

+ +
+
+ + + + +
#define TTY_MAX_TERMS   5
+
+
+ +

+ +

+Definition at line 35 of file tty.h. +

+Referenced by tty_change(), and tty_init(). +

+

+


Typedef Documentation

+ +
+
+ + + + +
typedef struct tty_termNode tty_term
+
+
+ +

+ +

+

+


Function Documentation

+ +
+
+ + + + + + + + + +
int tty_change (uInt16   ) 
+
+ +

+ +

+
+ + + + + + + + + +
tty_term* tty_find (uInt16   ) 
+
+
+ +

+ +

+Definition at line 170 of file tty.c. +

+References terms. +

+Referenced by execFile(), kprint(), and systemTask(). +

+

+ +

+
+ + + + + + + + +
int tty_init (  ) 
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
int tty_print (char * ,
tty_term 
)
+
+ +

+


Variable Documentation

+ +
+
+ + + + +
tty_term* tty_foreground
+
+
+ +

+ +

+Definition at line 39 of file tty.c. +

+Referenced by backSpace(), getch(), keyboardHandler(), kpanic(), kprint(), sysFgetc(), tty_change(), tty_init(), and tty_print(). +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ubixfs_8c-source.html b/doc/html/ubixfs_8c-source.html new file mode 100644 index 0000000..403c830 --- /dev/null +++ b/doc/html/ubixfs_8c-source.html @@ -0,0 +1,677 @@ + + +UbixOS V2: src/sys/ubixfs/ubixfs.c Source File + + + + +
+
+
+
+ +

ubixfs.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <ubixfs/ubixfs.h>
+00031 #include <ubixfs/dirCache.h>
+00032 #include <vfs/vfs.h>
+00033 #include <ubixos/types.h>
+00034 #include <ubixos/sched.h>
+00035 #include <ubixos/kpanic.h>
+00036 #include <ubixos/exec.h>
+00037 #include <lib/kmalloc.h>
+00038 #include <lib/string.h>
+00039 #include <lib/kprintf.h>
+00040 #include <assert.h>
+00041 
+00042 /* Static defines */
+00043 static int ubixfs_loadData(fileDescriptor *fd,char *data,uInt32 size,uInt32 batIndex);
+00044 
+00045   
+00046 static int openFileUbixFS(const char *file, fileDescriptor *fd) {
+00047   //int x = 0;
+00048 /* mji  struct directoryEntry *dirEntry = (struct directoryEntry *)kmalloc(0x4000); */
+00049   struct cacheNode * cacheNode = NULL;
+00050   //struct directoryEntry * dirEntry = NULL;
+00051   struct ubixFSInfo *fsInfo = fd->mp->fsInfo;
+00052   
+00053 
+00054   
+00055 /* kprintf("openFileUbixFS(%s), cwd: %s\n", file, _current->oInfo.cwd); */
+00056 
+00057 //if (fsInfo->dirCache == NULL) kprintf("dirCache is null!\n");
+00058   assert(fd);
+00059   assert(fd->mp);
+00060   assert(fd->mp->device);
+00061   assert(fd->mp->device->devInfo);
+00062   assert(fd->mp->device->devInfo->read);
+00063   assert(fsInfo);
+00064   assert(fsInfo->dirCache);
+00065   assert(file);
+00066   
+00067   if ((fd->mode & fileRead) == fileRead) {
+00068     do {
+00069       cacheNode = ubixfs_cacheFind(fsInfo->dirCache,(char *) file);
+00070       if (cacheNode == NULL) return 0;
+00071       if (cacheNode->present == 1) break;
+00072       assert(cacheNode->size);
+00073       if (*cacheNode->size != 0 && cacheNode->info == NULL) {
+00074         //kprintf("caching name(size): %s(%d)\n",cacheNode->name,*cacheNode->size);
+00075         cacheNode->info = kmalloc(UBIXFS_ALIGN(*cacheNode->size));
+00076         fd->size = *cacheNode->size; 
+00077         assert(cacheNode->startCluster);
+00078         ubixfs_loadData(fd,
+00079                         cacheNode->info,
+00080                         *cacheNode->size,
+00081                         *cacheNode->startCluster);
+00082         cacheNode->present = 1;
+00083       } /* if */
+00084     } while(1);
+00085 
+00086     assert(cacheNode);
+00087     if (cacheNode == NULL) return 0; /* this should be caught above */
+00088 
+00089     fd->start    = *cacheNode->startCluster;
+00090     fd->size     = *cacheNode->size;
+00091     fd->perms    = *cacheNode->permissions;
+00092     fd->cacheNode = cacheNode; /* Directory Start Sector */
+00093     /*
+00094     if (cacheNode->size != 0x0 && cacheNode->info == NULL) {
+00095       cacheNode->info = kmalloc(UBIXFS_ALIGN(*cacheNode->size));
+00096       ubixfs_loadData(fd,cacheNode->info,cacheNode->size,cacheNode->startCluster);
+00097       cacheNode->present = 0x1;
+00098       }
+00099      */
+00100     return(0x1);
+00101   } 
+00102   else 
+00103     if ((fd->mode & fileWrite) == fileWrite) {
+00104 kprintf("Ouch! in filewrite!\n");
+00105 #if 0
+00106       fd->start    = dirEntry->startCluster;
+00107       fd->size     = dirEntry->size;
+00108       fd->perms    = dirEntry->permissions;
+00109      // fd->dirBlock = 0x0; /* Directory Start Sector */
+00110 #endif
+00111       return(0x1);
+00112     }
+00113     
+00114   return 0;
+00115 
+00116   }
+00117 
+00118 int writeFileByte(int ch, fileDescriptor *fd, long offset) {
+00119 
+00120   int blockCount = 0x0,batIndex = 0x0,batIndexPrev = 0x0;
+00121   uInt32 i = 0x0;
+00122   struct directoryEntry *dirEntry = 0x0;
+00123   struct ubixFSInfo *fsInfo = NULL;
+00124 
+00125   assert(fd);
+00126   assert(fd->mp);
+00127   assert(fd->mp->diskLabel);
+00128 
+00129   batIndexPrev = fd->start;
+00130   fsInfo = fd->mp->fsInfo;
+00131 
+00132   /* Find Out How Many Blocks Long This File Is */
+00133   blockCount = (offset/4096);
+00134   
+00135   /* Find The Block If It Doesn't Exist We Will Have To Allocate One */
+00136   for (i=0x0; i <= fd->mp->diskLabel->partitions[fd->mp->partition].pBatSize;
+00137        i++) {
+00138     batIndex = fsInfo->blockAllocationTable[batIndexPrev].nextBlock;
+00139     if (batIndex == 0x0) {
+00140       break;
+00141       }
+00142     batIndexPrev = batIndex;
+00143     }
+00144 
+00145   if ((offset%4096 == 0) && (fd->status == fdRead)) {
+00146       fd->status = fdOpen;
+00147       }    
+00148 
+00149   /* If batIndex == 0x0 Then We Must Allocate A New Block */
+00150   if (batIndex == 0x0) {
+00151     for (i=1;i < fsInfo->batEntries;i++) {
+00152       if (fsInfo->blockAllocationTable[i].attributes == 0x0) {
+00153         fsInfo->blockAllocationTable[batIndexPrev].nextBlock = i;
+00154         fsInfo->blockAllocationTable[batIndex].nextBlock     = -1;
+00155         batIndex  = i;
+00156         fd->start = i;
+00157         break;
+00158         }
+00159       }
+00160     /* fd->mp->drive->read(fd->mp->drive->driveInfoStruct,diskLabel->partitions[0].pOffset+blockAllocationTable[batIndex].realSector,8,fd->buffer); */
+00161     fd->buffer[offset-(blockCount*4096)] = ch;
+00162     fd->mp->device->devInfo->write(fd->mp->device->devInfo->info,fd->buffer,fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[batIndex].realSector,8);
+00163     }
+00164   else {
+00165     if (fd->status != fdRead) {    
+00166       fd->mp->device->devInfo->read(fd->mp->device->devInfo->info,fd->buffer,fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[batIndex].realSector,8);
+00167       fd->status = fdRead;
+00168       }
+00169     fd->buffer[offset-(blockCount*4096)] = ch;
+00170     fd->mp->device->devInfo->write(fd->mp->device->devInfo->info,fd->buffer,fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[batIndex].realSector,8);
+00171     }    
+00172   if ((uInt32)offset > fd->size) {
+00173     fd->size = offset;
+00174     dirEntry = (struct directoryEntry *)kmalloc(4096);
+00175   /*
+00176     fd->mp->device->devInfo->read(fd->mp->device->devInfo->info,dirEntry,(fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[fd->dirBlock].realSector),8);
+00177   */
+00178     for (i=0x0;i<(4096/sizeof(struct directoryEntry));i++) {
+00179       if ((int)!strcmp(dirEntry[i].fileName,fd->fileName))
+00180         break;
+00181       }  
+00182     dirEntry[i].size = fd->size;
+00183 /*
+00184     fd->mp->device->devInfo->write(fd->mp->device->devInfo->info,dirEntry,(fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[fd->dirBlock].realSector),8);
+00185 */
+00186     kfree(dirEntry);
+00187     }
+00188   return(ch);
+00189   }
+00190 
+00191 /* Verified Functions */
+00192 
+00193     
+00194 int readUbixFS(fileDescriptor *fd,char *data,uInt32 offset,long size) {
+00195   int i = 0x0;
+00196   char *buffer = 0x0;
+00197   struct ubixFSInfo *fsInfo = NULL;
+00198 
+00199   assert(fd);
+00200   assert(fd->mp);
+00201   assert(fd->mp->fsInfo);
+00202 
+00203   fsInfo = fd->mp->fsInfo;
+00204   
+00205   if (fd->cacheNode->present != 1) 
+00206     kpanic("ERROR with cache node\n");
+00207     
+00208   buffer = (char *)fd->cacheNode->info;
+00209   
+00210   for (i=0x0; i<size; i++) {
+00211     if (offset > fd->size) {
+00212       /* Set File EOF If There Is Nothing To Do */
+00213       /* data[i] = '\0'; Is this safe? */
+00214       fd->status = fdEof;
+00215       return(size);
+00216       }
+00217     /* Copy Data From Buffer To Data */
+00218     data[i] = buffer[i + offset];
+00219     }
+00220   /* Return */
+00221   return(size);
+00222   }
+00223 
+00224 
+00225 /************************************************************************
+00226 
+00227 Function: int writeUbixFS(fileDescriptor *fd,char *data,long offset,long size)
+00228 Description: Write Data Into File
+00229 Notes:
+00230 
+00231 ************************************************************************/
+00232 int writeUbixFS(fileDescriptor *fd,char *data,long offset,long size) {
+00233   uInt32 blockOffset    = 0x0;
+00234   uInt32 blockIndex;
+00235   uInt32 blockIndexPrev;
+00236   uInt32 i              = 0x0;
+00237   struct ubixFSInfo *fsInfo = NULL;
+00238   struct directoryEntry *dirEntry = 0x0;
+00239 
+00240   assert(fd);
+00241   assert(fd->mp);
+00242   assert(fd->mp->fsInfo);
+00243   assert(fd->mp->device);
+00244   assert(fd->mp->device->devInfo);
+00245 
+00246   blockIndex = blockIndexPrev = fd->start;
+00247   fsInfo = fd->mp->fsInfo;
+00248 
+00249   blockOffset = (offset/0x1000);
+00250 
+00251   if (fd->size != 0x0) {
+00252     for (i = 0x0;i < blockOffset;i++) {
+00253       blockIndex = fsInfo->blockAllocationTable[blockIndexPrev].nextBlock;
+00254         if ((int)blockIndex == EOBC) {
+00255           blockIndex = getFreeBlocks(1,fd);
+00256           fsInfo->blockAllocationTable[blockIndexPrev].nextBlock = blockIndex;
+00257           fsInfo->blockAllocationTable[blockIndex].nextBlock = EOBC;
+00258           break;
+00259           }
+00260         blockIndexPrev = blockIndex;
+00261       }
+00262     }
+00263 
+00264   fd->mp->device->devInfo->read(fd->mp->device->devInfo->info,fd->buffer,fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[blockIndex].realSector,blockSize);
+00265   for (i = 0x0;i < (uInt32)size;i++) {
+00266 
+00267     fd->buffer[(offset- (blockOffset *0x1000))] = data[i];
+00268     offset++;
+00269 
+00270     if (offset%4096 == 0x0) {
+00271       blockOffset++;
+00272       fd->mp->device->devInfo->write(fd->mp->device->devInfo->info,fd->buffer,fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[blockIndex].realSector,blockSize);
+00273  
+00274       if (fsInfo->blockAllocationTable[blockIndex].nextBlock == EOBC) {
+00275         blockIndexPrev = blockIndex;
+00276         blockIndex = getFreeBlocks(1,fd);
+00277         fsInfo->blockAllocationTable[blockIndexPrev].nextBlock = blockIndex;
+00278         fsInfo->blockAllocationTable[blockIndex].nextBlock     = EOBC;
+00279         }
+00280       else {
+00281         blockIndex = fsInfo->blockAllocationTable[blockIndex].nextBlock;
+00282         fd->mp->device->devInfo->read(fd->mp->device->devInfo->info,fd->buffer,fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[blockIndex].realSector,blockSize);
+00283         }
+00284       }
+00285     }
+00286   fd->mp->device->devInfo->write(fd->mp->device->devInfo->info,fd->buffer,fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[blockIndex].realSector,blockSize);
+00287 
+00288   if ((uInt32)offset > fd->size) {
+00289     fd->size = offset;
+00290     dirEntry = (struct directoryEntry *)kmalloc(4096);
+00291 /*
+00292     fd->mp->device->devInfo->read(fd->mp->device->devInfo->info,dirEntry,(fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[fd->dirBlock].realSector),blockSize);
+00293 */
+00294     for (i=0x0;i<(4096/sizeof(struct directoryEntry));i++) {
+00295       if ((int)!strcmp(dirEntry[i].fileName,fd->fileName))
+00296         break;
+00297       }
+00298     dirEntry[i].size = fd->size;
+00299     dirEntry[i].startCluster = fd->start;
+00300 /*
+00301     fd->mp->device->devInfo->write(fd->mp->device->devInfo->info,dirEntry,(fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[fd->dirBlock].realSector),blockSize);
+00302 */
+00303     kfree(dirEntry);
+00304     }
+00305   /* Return */
+00306   return(size);
+00307   }
+00308 
+00309 void ubixFSUnlink(char *path,vfs_mountPoint_t *mp) {
+00310   int x=0;
+00311   struct directoryEntry *dirEntry = (struct directoryEntry *)kmalloc(0x1000);
+00312   struct ubixFSInfo *fsInfo = mp->fsInfo;
+00313   
+00314   mp->device->devInfo->read(mp->device->devInfo->info,dirEntry,(mp->diskLabel->partitions[mp->partition].pOffset+fsInfo->blockAllocationTable[fsInfo->rootDir].realSector),8);
+00315 
+00316   for (x=0;(uInt32)x<(4096/sizeof(struct directoryEntry));x++) {
+00317     if ((int)!strcmp(dirEntry[x].fileName,path)) {
+00318       dirEntry[x].attributes |= typeDeleted;
+00319       dirEntry[x].fileName[0] = '?';
+00320       mp->device->devInfo->write(mp->device->devInfo->info,dirEntry,(mp->diskLabel->partitions[mp->partition].pOffset+fsInfo->blockAllocationTable[fsInfo->rootDir].realSector),8);
+00321       return;
+00322       }
+00323     }
+00324   kprintf("File Not Found\n");
+00325   return;
+00326   }
+00327   
+00328   
+00329 /*****************************************************************************************
+00330 
+00331 Function: static
+00332           int ubixfs_loadData(fileDescriptor *fd,char *data,uInt32 size,uInt32 batIndex)
+00333 
+00334 Description: This will load the node data in from the disk
+00335 
+00336 Notes:
+00337   07/23/2004 - This loads complete blocks from disk so it is aligned to 0x1000 not the
+00338                actual file size
+00339 
+00340 *****************************************************************************************/    
+00341 static int ubixfs_loadData(fileDescriptor *fd,char *data,uInt32 size,uInt32 batIndex) {
+00342   uInt32 i = 0x0;
+00343 
+00344   struct ubixFSInfo *fsInfo = NULL;
+00345 
+00346   assert(fd);
+00347   assert(fd->mp);
+00348   assert(fd->mp->fsInfo);
+00349 
+00350   fsInfo = fd->mp->fsInfo;
+00351 
+00352   size = UBIXFS_ALIGN(size);
+00353   /* Loop by block size */
+00354   
+00355   for (i=0x0; i<size; i += (UBIXFS_BLOCKSIZE_BYTES)) {
+00356   /* Get next block if we are ready for it */
+00357     if (i != 0x0)
+00358       batIndex = fsInfo->blockAllocationTable[batIndex].nextBlock;
+00359   /* Read data in from media */
+00360     fd->mp->device->devInfo->read(fd->mp->device->devInfo->info,data+i,fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[batIndex].realSector,blockSize);
+00361     }
+00362   /* Return */
+00363   return(0x0);
+00364   }
+00365 
+00366 
+00367 /*****************************************************************************************
+00368 
+00369 Function: int ubixfs_initialize()
+00370 
+00371 Description: This will initialize a mount point it loads the BAT and Caches the rootDir
+00372 
+00373 Notes:
+00374 
+00375 *****************************************************************************************/  
+00376 int ubixfs_initialize(vfs_mountPoint_t *mp) {
+00377   struct ubixFSInfo *fsInfo = 0x0;
+00378 
+00379   assert(mp);
+00380   assert(mp->diskLabel);
+00381   assert(mp->diskLabel->partitions);
+00382 
+00383   mp->fsInfo = (struct ubixFSInfo *)kmalloc(sizeof(struct ubixFSInfo));
+00384   assert(mp->fsInfo);
+00385   
+00386   fsInfo = mp->fsInfo;
+00387   fsInfo->rootDir = 0x0; /* Root directory is always 0x0 on the UbixFS */
+00388   
+00389   /*
+00390    Check the disk label to ensure this is an UbixFS partition
+00391   */
+00392   if ((mp->diskLabel->magicNum == UBIXDISKMAGIC) &&  (mp->diskLabel->magicNum2 == UBIXDISKMAGIC)) {
+00393     
+00394     /* Allocate memory for BAT */
+00395     fsInfo->blockAllocationTable = (struct blockAllocationTableEntry *)kmalloc(mp->diskLabel->partitions[mp->partition].pBatSize * 512);
+00396     assert(fsInfo->blockAllocationTable);
+00397 
+00398     /* Set up the amount of BAT entries */
+00399     fsInfo->batEntries = (mp->diskLabel->partitions[mp->partition].pBatSize*512) / sizeof(struct blockAllocationTableEntry);
+00400 
+00401     /* Read the BAT to memory */
+00402     assert(mp->device->devInfo->read);
+00403     mp->device->devInfo->read(mp->device->devInfo->info, 
+00404                              fsInfo->blockAllocationTable,
+00405                              mp->diskLabel->partitions[mp->partition].pOffset,
+00406                              mp->diskLabel->partitions[mp->partition].pBatSize);
+00407     
+00408     /* Set up root directory cache */
+00409     fsInfo->dirCache = ubixfs_cacheNew("/");
+00410     assert(fsInfo->dirCache);
+00411     fsInfo->dirCache->info = (struct directoryEntry *)kmalloc(0x4000);  /* allocate root dir */
+00412     fsInfo->dirCache->present = 1;
+00413     fsInfo->dirCache->size = kmalloc(sizeof(fsInfo->dirCache->size));
+00414     fsInfo->dirCache->startCluster = kmalloc(sizeof(fsInfo->dirCache->startCluster));
+00415     fsInfo->dirCache->attributes = kmalloc(sizeof(fsInfo->dirCache->attributes));
+00416     fsInfo->dirCache->permissions = kmalloc(sizeof(fsInfo->dirCache->permissions));
+00417 
+00418     *fsInfo->dirCache->size = 0x4000;
+00419     *fsInfo->dirCache->startCluster = fsInfo->rootDir;
+00420     
+00421     assert(fsInfo->dirCache->info);
+00422     /* Read root dir in from disk it is always 0x4000 bytes long */
+00423     mp->device->devInfo->read(mp->device->devInfo->info,
+00424                               fsInfo->dirCache->info,
+00425                               (mp->diskLabel->partitions[mp->partition].pOffset+fsInfo->blockAllocationTable[fsInfo->rootDir].realSector),
+00426                               0x4000 / 512);
+00427 
+00428     /* Start our ubixfs_thread to manage the mount point */
+00429     /*
+00430     UBU disable for now
+00431     execThread(ubixfs_Thread,(uInt32)(kmalloc(0x2000)+0x2000),0x0);
+00432     */
+00433     kprintf("  Offset: [%i], Partition: [%i]\n",
+00434     mp->diskLabel->partitions[mp->partition].pOffset,mp->partition);
+00435     kprintf("UbixFS Initialized\n");
+00436     return(0x1);
+00437     }
+00438     
+00439   kprintf("Not a valid UbixFS disk.\n");
+00440   /* Return */
+00441   return(0x0);
+00442   }
+00443   
+00444 /*****************************************************************************************
+00445 
+00446 Function: int ubixfs_init()
+00447 
+00448 Description: This is the master initialization for the Ubix File System it will make the
+00449              OS UbixFS aware.
+00450              It does not in any way shape or form connect a mount point an medium that is
+00451              upto the ubixfs_initialize() function
+00452 
+00453 Notes:
+00454 
+00455 *****************************************************************************************/  
+00456 int ubixfs_init() {
+00457   /* Set up our file system structure */
+00458   struct fileSystem ubixFileSystem = 
+00459    {NULL,                         /* prev        */
+00460     NULL,                         /* next        */
+00461     (void *)ubixfs_initialize,    /* vfsInitFS   */
+00462     (void *)readUbixFS,           /* vfsRead     */
+00463     (void *)writeUbixFS,          /* vfsWrite    */
+00464     (void *)openFileUbixFS,       /* vfsOpenFile */
+00465     (void *)ubixFSUnlink,         /* vfsUnlink   */
+00466     (void *)ubixFSmkDir,          /* vfsMakeDir  */
+00467     NULL,                         /* vfsRemDir   */
+00468     NULL,                         /* vfsSync     */
+00469     0                             /* vfsType     */
+00470    }; /* ubixFileSystem */
+00471 
+00472   /* Add UbixFS */
+00473   if (vfsRegisterFS(ubixFileSystem) != 0x0) {
+00474     kpanic("Unable To Enable UbixFS");
+00475     return(0x1);
+00476     }
+00477 
+00478   /* Return */
+00479   return(0x0);
+00480   }
+00481 
+00482 /***
+00483  $Log$
+00484  Revision 1.1.1.1  2006/06/01 12:46:17  reddawg
+00485  ubix2
+00486 
+00487  Revision 1.2  2005/10/12 00:13:37  reddawg
+00488  Removed
+00489 
+00490  Revision 1.1.1.1  2005/09/26 17:24:42  reddawg
+00491  no message
+00492 
+00493  Revision 1.44  2004/08/26 22:51:19  reddawg
+00494  TCA touched me :( i think he likes men....
+00495 
+00496 
+00497  sched.h:        kTask_t added parentPid
+00498  endtask.c:     fixed term back to parentPid
+00499  exec.c:          cleaned warnings
+00500  fork.c:            fixed term to childPid
+00501  sched.c:         clean up for dead tasks
+00502  systemtask.c: clean up dead tasks
+00503  kmalloc.c:       cleaned up warnings
+00504  udp.c:            cleaned up warnings
+00505  bot.c:             cleaned up warnings
+00506  shell.c:           cleaned up warnings
+00507  tcpdump.c:     took a dump
+00508  hd.c:             cleaned up warnings
+00509  ubixfs.c:        stopped prning debug info
+00510 
+00511  Revision 1.43  2004/08/14 11:23:02  reddawg
+00512  Changes
+00513 
+00514  Revision 1.42  2004/08/09 12:58:05  reddawg
+00515  let me know when you got the surce
+00516 
+00517  Revision 1.41  2004/08/01 17:58:39  flameshadow
+00518  chg: fixed string allocation bug in ubixfs_cacheNew()
+00519 
+00520  Revision 1.40  2004/07/28 17:07:29  flameshadow
+00521  chg: re-added moving cached nodes to the front of the list when found
+00522  add: added an assert() in ubixfs.c
+00523 
+00524  Revision 1.39  2004/07/27 19:24:31  flameshadow
+00525  chg: reduced the number of debugging statements in the kernel.
+00526 
+00527  Revision 1.38  2004/07/27 12:02:01  reddawg
+00528  chg: fixed marks bug readFile did a lookup which is why it looked like it was loopping so much
+00529 
+00530  Revision 1.37  2004/07/27 09:05:43  flameshadow
+00531  chg: fixed file not found bug. Still can't find looping issue
+00532 
+00533  Revision 1.36  2004/07/27 04:05:20  flameshadow
+00534  chg: kinda fixed it. Added bunches of debug info
+00535 
+00536  Revision 1.35  2004/07/26 19:15:49  reddawg
+00537  test code, fixes and the like
+00538 
+00539  Revision 1.34  2004/07/24 23:04:44  reddawg
+00540  Changes... mark let me know if you fault at pid 185 when you type stress
+00541 
+00542  Revision 1.33  2004/07/23 09:10:06  reddawg
+00543  ubixfs: cleaned up some functions played with the caching a bit
+00544  vfs:    renamed a bunch of functions
+00545  cleaned up a few misc bugs
+00546 
+00547  Revision 1.32  2004/07/22 23:01:51  reddawg
+00548  Ok checking in before I sleep
+00549 
+00550  Revision 1.31  2004/07/22 22:37:03  reddawg
+00551  Caching is working now the FS is extremely fast but needs to be optimized to do 32bit copies over 8bit
+00552 
+00553  Revision 1.30  2004/07/22 19:01:59  flameshadow
+00554  chg: more directory and file caching
+00555 
+00556  Revision 1.29  2004/07/22 16:34:32  flameshadow
+00557  add: file and dir caching kinda work
+00558 
+00559  Revision 1.28  2004/07/21 22:07:18  flameshadow
+00560  chg: renamed caching functions (again)
+00561 
+00562  Revision 1.27  2004/07/21 21:08:05  flameshadow
+00563  add: added provisions for file caching
+00564 
+00565  Revision 1.26  2004/07/20 23:21:31  flameshadow
+00566  syncing
+00567 
+00568  Revision 1.25  2004/07/20 21:39:53  reddawg
+00569  ubixfs: does propper caching now problem was you did not seek realSector however the os starts but I am getting a segfault could be from anything haven't looked into it right quick
+00570 
+00571  Revision 1.24  2004/07/20 21:38:08  flameshadow
+00572  try now
+00573 
+00574 
+00575  Revision 1.23  2004/07/20 21:35:09  reddawg
+00576  Let me commit before we start to overlap
+00577 
+00578  Revision 1.22  2004/07/20 21:28:16  flameshadow
+00579  oops
+00580 
+00581  Revision 1.20  2004/07/20 19:36:49  reddawg
+00582  UBU Tags
+00583 
+00584  Revision 1.19  2004/07/20 18:09:37  flameshadow
+00585  add: directory caching related stuff
+00586 
+00587  Revision 1.18  2004/07/17 03:21:34  flameshadow
+00588  chg: cleaned up code; added assert() statements
+00589 
+00590  Revision 1.15  2004/07/14 12:21:49  reddawg
+00591  ubixfs: enableUbixFs to ubixfs_init
+00592  Changed Startup Routines
+00593 
+00594  Revision 1.14  2004/06/28 23:12:58  reddawg
+00595  file format now container:/path/to/file
+00596 
+00597  Revision 1.13  2004/06/28 18:12:44  reddawg
+00598  We need these files
+00599 
+00600  Revision 1.12  2004/06/28 11:57:58  reddawg
+00601  Fixing Up Filesystem
+00602 
+00603  Revision 1.10  2004/06/04 13:20:22  reddawg
+00604  ubixFSmkDir(): played with it a bit to see if it still worked
+00605 
+00606  Revision 1.9  2004/06/04 10:19:42  reddawg
+00607  notes: we compile again, thank g-d anyways i was about to cry
+00608 
+00609  Revision 1.8  2004/06/01 00:04:53  reddawg
+00610  Try now mark
+00611 
+00612  Revision 1.7  2004/05/19 15:20:06  reddawg
+00613  Fixed reference problems due to changes in drive subsystem
+00614 
+00615  Revision 1.6  2004/05/19 04:07:43  reddawg
+00616  kmalloc(size,pid) no more it is no kmalloc(size); the way it should of been
+00617 
+00618  Revision 1.5  2004/04/29 15:45:19  reddawg
+00619  Fixed some bugs so now the automade images will work correctly
+00620 
+00621  Revision 1.4  2004/04/28 21:10:40  reddawg
+00622  Lots Of changes to make it work with existing os
+00623 
+00624  Revision 1.3  2004/04/28 13:33:09  reddawg
+00625  Overhaul to ubixfs and boot loader and MBR to work well with our schema
+00626  now BAT and dir and file entries are all offset 64Sectors from the start of the partition
+00627 
+00628  Revision 1.2  2004/04/28 02:22:55  reddawg
+00629  This is a fiarly large commit but we are starting to use new driver model
+00630  all around
+00631 
+00632  Revision 1.1.1.1  2004/04/15 12:07:08  reddawg
+00633  UbixOS v1.0
+00634 
+00635  Revision 1.31  2004/04/13 16:36:34  reddawg
+00636  Changed our copyright, it is all now under a BSD-Style license
+00637 
+00638  END
+00639  ***/
+00640 
+

Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ubixfs_8c.html b/doc/html/ubixfs_8c.html new file mode 100644 index 0000000..8ac4091 --- /dev/null +++ b/doc/html/ubixfs_8c.html @@ -0,0 +1,370 @@ + + +UbixOS V2: src/sys/ubixfs/ubixfs.c File Reference + + + + +
+
+
+
+ +

ubixfs.c File Reference

+

+#include <ubixfs/ubixfs.h>
+#include <ubixfs/dirCache.h>
+#include <vfs/vfs.h>
+#include <ubixos/types.h>
+#include <ubixos/sched.h>
+#include <ubixos/kpanic.h>
+#include <ubixos/exec.h>
+#include <lib/kmalloc.h>
+#include <lib/string.h>
+#include <lib/kprintf.h>
+#include <assert.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + +

Functions

static int openFileUbixFS (const char *file, fileDescriptor *fd)
int readUbixFS (fileDescriptor *fd, char *data, uInt32 offset, long size)
int ubixfs_init ()
int ubixfs_initialize (vfs_mountPoint_t *mp)
static int ubixfs_loadData (fileDescriptor *fd, char *data, uInt32 size, uInt32 batIndex)
void ubixFSUnlink (char *path, vfs_mountPoint_t *mp)
int writeFileByte (int ch, fileDescriptor *fd, long offset)
int writeUbixFS (fileDescriptor *fd, char *data, long offset, long size)
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
static int openFileUbixFS (const char *  file,
fileDescriptor fd 
) [static]
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int readUbixFS (fileDescriptor fd,
char *  data,
uInt32  offset,
long  size 
)
+
+
+ +

+ +

+Definition at line 194 of file ubixfs.c. +

+References assert, buffer, fdEof, kpanic(), NULL, and fileDescriptor::size. +

+Referenced by addDirEntry(), and ubixfs_init(). +

+

+ +

+
+ + + + + + + + +
int ubixfs_init (  ) 
+
+ +

+ +

+
+ + + + + + + + + +
int ubixfs_initialize (vfs_mountPoint_t mp  ) 
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static int ubixfs_loadData (fileDescriptor fd,
char *  data,
uInt32  size,
uInt32  batIndex 
) [static]
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
void ubixFSUnlink (char *  path,
vfs_mountPoint_t mp 
)
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int writeFileByte (int  ch,
fileDescriptor fd,
long  offset 
)
+
+
+ +

+ +

+Definition at line 118 of file ubixfs.c. +

+References assert, ubixFSInfo::blockAllocationTable, fdOpen, fdRead, blockAllocationTableEntry::nextBlock, and NULL. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int writeUbixFS (fileDescriptor fd,
char *  data,
long  offset,
long  size 
)
+
+ +

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ubixfs_8cpp-source.html b/doc/html/ubixfs_8cpp-source.html new file mode 100644 index 0000000..a77f9aa --- /dev/null +++ b/doc/html/ubixfs_8cpp-source.html @@ -0,0 +1,1026 @@ + + +UbixOS V2: src/sys/ubixfsv2/ubixfs.cpp Source File + + + + +
+
+
+
+ +

ubixfs.cpp

Go to the documentation of this file.
00001 #include <stddef.h>
+00002 #include <stdlib.h>
+00003 #include <unistd.h>
+00004 #include <string.h>
+00005 #include <assert.h>
+00006 #include <iostream>
+00007 
+00008 #include "ubixfs.h"
+00009 #include "btree.h"
+00010 
+00011 using namespace std;
+00012 
+00013 UbixFS::UbixFS(void) { 
+00014   device = NULL;
+00015   freeBlockList = NULL;
+00016   superBlock = NULL;
+00017   root = NULL;
+00018 } // UbixFS::UbixFS
+00019 
+00020 
+00021 UbixFS::UbixFS(device_t * dev) {
+00022   device = dev;
+00023   freeBlockList = NULL;
+00024   superBlock = NULL;
+00025   root = NULL;
+00026 } // UbixFS::UbixFS
+00027 
+00028 void
+00029 UbixFS::printSuperBlock(void) {
+00030   printf("superBlock->name........... %s\n", superBlock->name);
+00031   printf("superBlock->magic1......... %X\n", superBlock->magic1);
+00032   printf("superBlock->fsByteOrder.... %d\n", superBlock->fsByteOrder);
+00033   printf("superBlock->blockSize...... %d\n", superBlock->blockSize);
+00034   printf("superBlock->blockShift..... %d\n", superBlock->blockShift);
+00035   printf("superBlock->numBlocks...... %lld\n", superBlock->numBlocks);
+00036   printf("superBlock->usedBlocks..... %lld\n", superBlock->usedBlocks);
+00037   printf("superBlock->batSectors..... %d\n", superBlock->batSectors);
+00038   printf("superBlock->inodeCount..... %d\n", superBlock->inodeCount);
+00039   printf("superBlock->magic2......... %X\n", superBlock->magic2);
+00040   printf("superBlock->blocksPerAG.... %d\n", superBlock->blocksPerAG);
+00041   printf("superBlock->AGShift........ %d\n", superBlock->AGShift);
+00042   printf("superBlock->numAGs......... %d\n", superBlock->numAGs);
+00043   printf("superBlock->lastUsedAG..... %d\n", superBlock->lastUsedAG);
+00044   printf("superBlock->flags.......... %X\n", superBlock->flags);
+00045   printf("superBlock->magic3......... %X\n", superBlock->magic3);
+00046   return;
+00047 } // UbixFS::printSuperBlock
+00048 
+00049 int 
+00050 UbixFS::vfs_init(void) {
+00051 assert(device);
+00052   size_t result;
+00053   cout << "vfs_init()" << endl;
+00054   assert(device);
+00055 
+00056   if (device == NULL) return -1;
+00057   if (superBlock != NULL) delete superBlock;
+00058   superBlock = new diskSuperBlock;
+00059 assert(superBlock);
+00060   if (superBlock == NULL) return -1;
+00061 
+00062   // read in the superBlock. It's always the last block on the partition 
+00063 cout << "reading in superBlock" << endl;
+00064   device->read(device, superBlock, device->sectors-1, 1);
+00065 cout << "done" << endl;
+00066 
+00067   assert(superBlock->magic1 == UBIXFS_MAGIC1);
+00068   assert(superBlock->magic2 == UBIXFS_MAGIC2);
+00069   assert(superBlock->magic3 == UBIXFS_MAGIC3);
+00070   assert(strcmp(superBlock->name, "UbixFS") == 0);
+00071   assert((1 << superBlock->blockShift) == superBlock->blockSize);
+00072   assert((unsigned)(1 << superBlock->AGShift) == superBlock->blocksPerAG);
+00073   assert(superBlock->flags == UBIXFS_CLEAN);
+00074 
+00075   if (freeBlockList != NULL) delete [] freeBlockList;
+00076   freeBlockList = new signed char[superBlock->batSectors*512];
+00077 assert(freeBlockList);
+00078   memset(freeBlockList, 0, superBlock->batSectors*512);
+00079 
+00080   device->read(device, 
+00081                freeBlockList, 
+00082                device->sectors - superBlock->batSectors-1,
+00083                superBlock->batSectors
+00084               ); // device->read()
+00085 
+00086   root = new fileDescriptor;
+00087   assert(root);
+00088   memset(root, 0, sizeof(fileDescriptor));
+00089 cout << "allocating root dir inode" << endl;
+00090   root->inode = new ubixfsInode;
+00091   memset(root->inode, 0, sizeof(ubixfsInode));
+00092 cout << "root dir inode starting sector: " << 
+00093                ((superBlock->rootDir.AG << superBlock->AGShift) 
+00094                + superBlock->rootDir.start) * (superBlock->blockSize / 512)
+00095      << endl;
+00096 
+00097 cout << "reading in root dir inode" << endl;
+00098   
+00099   device->read(device,
+00100                root->inode,
+00101                ((superBlock->rootDir.AG << superBlock->AGShift) 
+00102                  + superBlock->rootDir.start) * (superBlock->blockSize / 512),
+00103                sizeof(ubixfsInode) / 512
+00104               );
+00105 cout << "done" << endl;
+00106   ubixfsInode * rootInode = static_cast<ubixfsInode *>(root->inode);
+00107   assert(rootInode);
+00108 
+00109   /* the bTree constructor now loads in the header */
+00110 
+00111   rootInode->data.btPtr = new bTree(this, root);
+00112   rootInode->data.btPtr->Info();
+00113   printSuperBlock();
+00114   return 0;
+00115 } // UbixFS::init
+00116 
+00117 int
+00118 UbixFS::vfs_format(device_t * dev) {
+00119   cout << "vfs_format()" << endl;
+00120   char sector[512];
+00121   uInt32 blocks, batSect, batSize;
+00122   if (dev == NULL) return -1; 
+00123 
+00124   // zero out the sector
+00125   memset(&sector, 0x0, sizeof(sector));
+00126  
+00127   // fill the drive in with zeroed out sectors
+00128   cout << "dev->sectors: " << dev->sectors << endl;
+00129   cout << "clearing device...";
+00130 
+00131   for (unsigned int i = 0; i < dev->sectors; i++) {
+00132     dev->write(dev, &sector, i, 1);
+00133   } // for i
+00134 
+00135   cout << "done" << endl;
+00136 
+00137   // allocate a new superBlock and clear it
+00138 
+00139   diskSuperBlock *sb = new diskSuperBlock;
+00140   if (sb == NULL) return -1;
+00141   memset(sb, 0, sizeof(diskSuperBlock));
+00142 
+00143   // dev->sectors is the number of 512 byte sectors
+00144 
+00145   blocks = (dev->sectors-1) / 8;     // 4k blocks
+00146   batSize = (dev->sectors-1) % 8;    // remainder
+00147   
+00148   // compute the BAT size
+00149 
+00150   while ((batSize * 4096) < blocks) {
+00151     batSize += 8;
+00152     --blocks;
+00153   } // while
+00154  
+00155   // batSize is in sectors
+00156   batSect = blocks * 8;
+00157 
+00158   strcpy(sb->name, "UbixFS");
+00159   sb->magic1 = UBIXFS_MAGIC1;
+00160   sb->fsByteOrder = 0;
+00161   sb->blockSize = 4096;
+00162   sb->blockShift = 12;
+00163   sb->numBlocks = blocks;
+00164   sb->usedBlocks = 2;  // root dir takes two blocks (inode + bTree header)
+00165   sb->inodeCount = 1;
+00166   sb->inodeSize = 4096;
+00167   sb->magic2 = UBIXFS_MAGIC2;
+00168   sb->blocksPerAG = 2048;
+00169   sb->AGShift = 11;
+00170   sb->numAGs = (sb->numBlocks+2047) / 2048;
+00171   sb->lastUsedAG = 0;
+00172 
+00173   // the BAT exists outside our official block count, so no 
+00174   // entries in the BAT need to be set for it
+00175   sb->batSectors = batSize;
+00176 
+00177   sb->flags = 0x434C454E; // CLEN
+00178   sb->logBlocks.AG = 0;
+00179   sb->logBlocks.start = 0;
+00180   sb->logBlocks.len = 0;
+00181   sb->logStart = 0;
+00182   sb->logEnd = 0;
+00183   sb->magic3 = UBIXFS_MAGIC3;
+00184   sb->indicies.AG = 0;
+00185   sb->indicies.start = 0;
+00186   sb->indicies.len = 0;
+00187 
+00188   sb->rootDir.AG = 0;
+00189   sb->rootDir.start = 0;
+00190   sb->rootDir.len = 1;
+00191 
+00192   // write out the superBlock
+00193 
+00194   dev->write(dev, sb, dev->sectors-1, 1);
+00195 
+00196   // mark the first two 4k blocks used
+00197   memset(&sector, 0, sizeof(sector));
+00198   sector[0] = (1 << 7) | (1 << 6);
+00199 
+00200   // write out the first sector of the BAT 
+00201 
+00202   dev->write(dev, &sector, batSect, 1);
+00203   // clear the rest
+00204   sector[0] = 0;
+00205 
+00206   // write out the rest of the BAT
+00207 
+00208   for (unsigned int i = 1; i < batSize; i++) {
+00209     dev->write(dev, &sector, (batSect)+i, 1);
+00210   } // for i
+00211 
+00212   /* allocate part of the root dir */
+00213 
+00214   // sanity checks
+00215   assert(sb->blockSize);
+00216   assert((unsigned)sb->blockSize >= sizeof(bTreeHeader));
+00217 
+00218   bTreeHeader * bth = new bTreeHeader;
+00219   assert(bth);
+00220   memset(bth, 0, sizeof(bTreeHeader));
+00221 
+00222   bth->firstDeleted = -1;
+00223   bth->firstNodeOffset = -1;
+00224   bth->treeDepth = 1;
+00225   bth->treeWidth = 0;
+00226   bth->treeLeafCount = 0;
+00227 
+00228   /* create the root dir inode here */
+00229 
+00230   ubixfsInode * inode = new ubixfsInode;
+00231   assert(inode);
+00232   if (inode == NULL) return -1;
+00233   memset(inode, 0, sizeof(ubixfsInode));
+00234 
+00235   inode->magic1 = UBIXFS_INODE_MAGIC;
+00236 
+00237   // inodes point to themselves
+00238   inode->inodeNum.AG = 0;
+00239   inode->inodeNum.start = 0;
+00240   inode->inodeNum.len = 1;
+00241 
+00242   // root dir has no parent directory
+00243   inode->parent.iAddr.AG = 0;
+00244   inode->parent.iAddr.start = 0;
+00245   inode->parent.iAddr.len = 0;
+00246 
+00247   /* this is part of the root dir structure (the bTreeHeader) */
+00248   inode->blocks.direct[0].AG = 0;
+00249   inode->blocks.direct[0].start = 1;
+00250   inode->blocks.direct[0].len = 1;
+00251    
+00252   inode->blocks.maxDirectRange = sizeof(bTreeHeader);
+00253   inode->blocks.size = sizeof(bTreeHeader);
+00254 
+00255   strcpy(inode->name, "/");
+00256   inode->uid = getuid();
+00257   inode->gid = getgid();
+00258   // inode->mode
+00259   inode->flags = INODE_DIRECTORY;
+00260   // inode->createTime
+00261   // inode->lastModifiedTime
+00262   // inode->type
+00263 
+00264   inode->attributes.AG = 0;
+00265   inode->attributes.start = 0;
+00266   inode->attributes.len = 0;
+00267 
+00268   inode->inodeSize = sb->inodeSize;
+00269 
+00270   /*
+00271    * next and prev are used in memory to hold pointers to the next/prev
+00272    * inodes in this dir.  On disk they may have another value, but for
+00273    * now they should be set to null.
+00274    */
+00275 
+00276   inode->next.offset = 0;
+00277   inode->prev.offset = 0;
+00278 
+00279   // write out the "root" dir inode
+00280 
+00281   dev->write(dev, 
+00282              inode, 
+00283              ((inode->inodeNum.AG << sb->AGShift) +
+00284               inode->inodeNum.start) * (sb->blockSize / 512),
+00285              sb->inodeSize / 512
+00286             ); // dev->write
+00287 
+00288   // write out the "root" dir
+00289 
+00290   dev->write(dev, 
+00291              bth, 
+00292              ((inode->blocks.direct[0].AG << sb->AGShift) + 
+00293               inode->blocks.direct[0].start) * (sb->blockSize / 512),
+00294              sb->blockSize / 512
+00295             ); // dev->write
+00296 
+00297   delete inode;
+00298   delete bth;
+00299   delete sb;
+00300   cout << "format complete" << endl;
+00301   return 0;
+00302 } // UbixFS::vfs_format
+00303 
+00304 void *
+00305 UbixFS::vfs_mknod(const char *path, mode_t mode) {
+00306   return mknod(path, 0, mode);  // <- this probably isn't correct
+00307 } // UbixFS::vfs_mknod
+00308 
+00309 int
+00310 UbixFS::vfs_open(const char * filename, fileDescriptor * fd, int flags, ...) {
+00311   if (filename == NULL || fd == NULL) return -1;
+00312   flags = flags;
+00313   fd->inode = NULL;
+00314   fd->offset = 0;
+00315   fd->size = 0;
+00316   // look up the file here
+00317   return 0;
+00318 } // UbixFS::vfs_open
+00319 
+00320 size_t
+00321 UbixFS::vfs_read(fileDescriptor * fd, void * data, off_t offset, size_t size) {
+00322   
+00323   unsigned int i;
+00324   off_t sum, startingBlock;
+00325   size_t runSize, sectorCount, totalSize, bSize; // blockSize
+00326   ubixfsInode * inode = NULL;
+00327 
+00328   if (fd == NULL || data == NULL) return ~0;
+00329 
+00330   if (size == 0) return 0; // don't fail if size is 0?
+00331    
+00332   assert(device);
+00333   assert(superBlock);
+00334 
+00335   inode = static_cast<ubixfsInode *>(fd->inode);
+00336 
+00337   assert(inode);
+00338 
+00339   bSize = superBlock->blockSize;
+00340 
+00341   totalSize = sum = i = 0;
+00342   
+00343   while (size > 0) {
+00344 
+00345     /*
+00346      * place check here to see which set of blocks we're looking through
+00347      */
+00348 
+00349     // scan through direct blocks
+00350     do {
+00351       if (offset >= sum && offset < sum + inode->blocks.direct[i].len * bSize)          break;
+00352 
+00353       sum += inode->blocks.direct[i++].len * bSize;
+00354      
+00355     } while (i < NUM_DIRECT_BLOCKS);
+00356 
+00357     startingBlock = (inode->blocks.direct[i].AG << superBlock->AGShift) + 
+00358                      inode->blocks.direct[i].start + ((offset - sum) / bSize);
+00359 
+00360     runSize = inode->blocks.direct[i].len * bSize;
+00361 
+00362     // startingBlock is in 4k blocks
+00363     startingBlock *= (bSize / 512);
+00364     // startingBlock is now in sectors
+00365 
+00366     if (runSize >= size) {
+00367       runSize = size;
+00368       size = 0;
+00369     } else { 
+00370       size -= runSize;
+00371     } // else
+00372 
+00373     sectorCount = runSize / 512;
+00374   
+00375     cout << "device->read(device, data, " << startingBlock << ", ";
+00376     cout << sectorCount << ");" << endl; 
+00377 
+00378     device->read(device, data, startingBlock, sectorCount);
+00379 
+00380     (uInt8 *)data += runSize;
+00381     totalSize += runSize;
+00382   } // while  
+00383   return totalSize;
+00384 } // UbixFS::vfs_read
+00385 
+00386 size_t
+00387 UbixFS::vfs_write(fileDescriptor * fd, void * data, off_t offset, size_t size) {
+00388   // char * sector[512];  // used to pad
+00389   unsigned int i, whichBlocks;
+00390   off_t sum, startingBlock, EORPos, maxRange;
+00391   size_t runSize, runRemainder, sectorCount, totalSize, bSize; // blockSize
+00392   ubixfsInode * inode = NULL;
+00393   blockRun br;
+00394 
+00395   if (fd == NULL || data == NULL) return ~0;
+00396 
+00397   if (size == 0) return 0; // don't fail if size is 0?
+00398 
+00399   assert(device);
+00400   assert(superBlock);
+00401 
+00402   inode = static_cast<ubixfsInode *>(fd->inode);
+00403 
+00404   assert(inode);
+00405 
+00406   bSize = superBlock->blockSize;
+00407   assert(bSize != 0);
+00408 
+00409   totalSize = sum = i = whichBlocks = 0;
+00410 
+00411   EORPos = offset + size;  // compute End Of Run Position
+00412   maxRange = inode->blocks.maxDirectRange;
+00413 
+00414   if (inode->blocks.maxIndirectRange > maxRange) {
+00415     maxRange = inode->blocks.maxIndirectRange;
+00416     whichBlocks = 1;
+00417   }
+00418 
+00419   if (inode->blocks.maxDoubleIndirectRange > maxRange) {
+00420     maxRange = inode->blocks.maxDoubleIndirectRange;
+00421     whichBlocks = 2;
+00422   } 
+00423   
+00424   if (EORPos > maxRange) {
+00425     /* 
+00426      * The offset+size is greater than the size of the file, so we need to
+00427      * extend out the file. Scan through the direct blocks (FIX LATER)
+00428      * to find out where we need to extend
+00429      */
+00430     switch (whichBlocks) {
+00431       case 0:
+00432         while (i < NUM_DIRECT_BLOCKS && inode->blocks.direct[i].len != 0) ++i;
+00433         // i holds which direct block we're going to add to
+00434         break;
+00435       case 1:
+00436       case 2:
+00437         assert(false);  // UNFINISHED
+00438         break;
+00439       default:
+00440         assert(false);  // sanity check
+00441     } // switch
+00442 
+00443     /*
+00444      * NOTE: it's possible that if we scan through to find where the
+00445      * run goes, we might be able to extend the previous block extent.
+00446      * This will require that we set up br.start to be where we'd like to
+00447      * start looking through the free block list, and then modifying
+00448      * getFreeBlock() to honour that.
+00449      */
+00450 
+00451     br.AG = inode->inodeNum.AG;        // request a sane allocation group
+00452     br.start = 0;                      // getFreeBlock() will ignore this
+00453 
+00454     /*
+00455      * The length that we need is determined by how much extra slack we 
+00456      * already have in the pre-allocated blocks.
+00457      * e.g. (assumes 4k blocks)
+00458      * bSize = 4096
+00459      * maxRange = 4096
+00460      * size = 3000
+00461      * offset = 3000
+00462      * size = 4000
+00463      * [--- data block ---][--- data block ---]  <---- blocks on disk
+00464      * <-file data->                             <---- actual file size
+00465      *              <----->                      <---- slack
+00466      * [  data block size ]                      <---- maxRange
+00467      *              |                            <---- offset
+00468      *              *****************            <---- new data
+00469      *
+00470      * In the above example, you'd need at least one more block to write
+00471      * out the data.  
+00472      * ((offset + size) - maxRange + (bSize-1)) / bSize
+00473      * ((3000 + 4000) - 4096 + (4095)) / 4096 == 1 (rounded down)
+00474      * And then we expand it by a little extra so we don't have to keep 
+00475      * looking for more blocks. Currently we use 32k of slack (or 8 blocks)
+00476      */
+00477 
+00478     br.len = ((EORPos - maxRange + (bSize-1)) / bSize);
+00479 
+00480     if (br.len < 8) br.len = 8;  // we allocate 32k if the file needs to grow
+00481 
+00482     br = getFreeBlock(br);
+00483     assert(br.len > 0);
+00484     switch (whichBlocks) {
+00485       case 0:
+00486         inode->blocks.direct[i] = br;
+00487         inode->blocks.maxDirectRange += br.len * bSize;
+00488         break;
+00489       case 1:
+00490         assert(false); // UNFINISHED
+00491         inode->blocks.maxIndirectRange += br.len * bSize;
+00492         break;
+00493       case 2:
+00494         assert(false); // UNFINISHED
+00495         inode->blocks.maxDoubleIndirectRange += br.len * bSize;
+00496         break;
+00497       default:   
+00498         assert(false); // sanity check
+00499     } // switch
+00500 
+00501     inode->blocks.size = EORPos;
+00502   } // if
+00503 
+00504 
+00505   runRemainder = size % 512;
+00506   size -= runRemainder;
+00507 
+00508   totalSize = sum = i = 0;
+00509 
+00510   while (size > 0) {
+00511 
+00512     /*
+00513      * place check here to see which set of blocks we're looking through
+00514      */
+00515 
+00516     // scan through direct blocks
+00517     do {
+00518       if (offset >= sum && offset < sum + inode->blocks.direct[i].len * bSize)
+00519         break;
+00520 
+00521       sum += inode->blocks.direct[i++].len * bSize;
+00522 
+00523     } while (i < NUM_DIRECT_BLOCKS);
+00524 
+00525     startingBlock = (inode->blocks.direct[i].AG << superBlock->AGShift) +
+00526                      inode->blocks.direct[i].start + ((offset - sum) / bSize);
+00527 
+00528     runSize = inode->blocks.direct[i].len * bSize;
+00529 
+00530     // startingBlock is in 4k blocks
+00531     startingBlock *= (bSize / 512);
+00532     // startingBlock is now in sectors
+00533 
+00534     if (runSize >= size) {
+00535       runSize = size;
+00536       size = 0;
+00537     } else {
+00538       size -= runSize;
+00539     } // else
+00540 
+00541     sectorCount = runSize / 512;
+00542 
+00543     cout << "device->write(device, data, " << startingBlock << ", ";
+00544     cout << sectorCount << ");" << endl;
+00545 
+00546     device->write(device, data, startingBlock, sectorCount);
+00547 
+00548     (uInt8 *)data += runSize;
+00549     totalSize += runSize;
+00550   } // while
+00551 
+00552   assert(runRemainder != 0);  // UNFINISHED
+00553   return totalSize;
+00554 } // UbixFS::vfs_write
+00555 
+00556 int
+00557 UbixFS::vfs_stop(void) {
+00558   if (vfs_sync() != 0) return -1;
+00559 
+00560   // you must delete the root dir first, in case it needs to
+00561   // still write anything out
+00562 
+00563   if (root != NULL) {
+00564     ubixfsInode * rootInode = static_cast<ubixfsInode *>(root->inode);
+00565     delete rootInode->data.btPtr; 
+00566     delete rootInode;
+00567     root->inode = NULL;
+00568     
+00569   } // if
+00570 
+00571   delete root;
+00572   delete [] freeBlockList;
+00573   delete superBlock;
+00574 
+00575   freeBlockList = NULL;
+00576   superBlock = NULL; 
+00577   root = NULL;
+00578 
+00579   /* 
+00580    * The device isn't null at this point, allowing for people to restart
+00581    * the mount point. Or, alternatively, to blow things up.
+00582    */
+00583   
+00584   return 0;
+00585 } // UbixFS::vfs_stop
+00586 
+00587 int
+00588 UbixFS::vfs_sync(void) {
+00589   if (device == NULL || superBlock == NULL || freeBlockList == NULL) return -1;
+00590   device->write(device, 
+00591                 freeBlockList, 
+00592                 device->sectors - superBlock->batSectors - 1, 
+00593                 superBlock->batSectors
+00594                );
+00595   device->write(device, superBlock, device->sectors-1, 1);
+00596   return 0;
+00597 } // UbixFS::vfs_sync
+00598 
+00599 void
+00600 UbixFS::setFreeBlock(blockRun ibr) {
+00601   signed char * ptr;
+00602   
+00603   if (superBlock == NULL || freeBlockList == NULL) return;
+00604   if (ibr.len == 0) return;
+00605   ptr = freeBlockList + ((ibr.AG << superBlock->AGShift) >> 3);
+00606   ptr += ibr.start >> 3;
+00607 
+00608   if (ibr.start % 8 != 0) {
+00609     
+00610     ibr.len -= ibr.start % 8;
+00611   } // if
+00612 
+00613 } // UbixFS::setFreeBlock
+00614 
+00615 blockRun
+00616 UbixFS::getFreeBlock(blockRun ibr) {
+00617   signed char * ptr;
+00618   signed char * holdPtr;
+00619   int32 count, holdCount;
+00620 
+00621   blockRun obr = {0, 0, 0};  // output block run
+00622 
+00623   // Check to make sure none of these are null
+00624   if (device == NULL || freeBlockList == NULL || superBlock == NULL) return obr;
+00625 
+00626   if (ibr.len == 0) return obr;
+00627 
+00628   if (ibr.len > superBlock->numBlocks) return obr;
+00629 
+00630   if (ibr.len == 1) return getFreeBlock(ibr.AG);
+00631   /*
+00632    * count is the block from the base of the list.
+00633    * Since we're given a specific AG to look through, we start the count at
+00634    * AG << AGShift, where AGShift is the shift value of the number of blocks
+00635    * in an AG
+00636    */
+00637 
+00638   count = (ibr.AG << superBlock->AGShift);
+00639 
+00640   /*
+00641    * The freeBlockList is a bit map of the free/used blocks.
+00642    * Used = on bit
+00643    * Unused = off bit
+00644    * There are 8 bits per byte (hopefully) and so we have to divide the count
+00645    * by 8 to get our starting byte offset to look from
+00646    */
+00647 
+00648   ptr = freeBlockList + (count >> 3);
+00649 
+00650 rescan:
+00651   // look for the first free 8 blocks (this may create holes)
+00652   while (*ptr != 0) {
+00653     ++ptr;
+00654     count += 8;
+00655     if (count+8 > superBlock->numBlocks) {
+00656       ptr = freeBlockList;
+00657       count = 0;
+00658     } // if 
+00659   } // while *ptr != 0
+00660 
+00661   holdPtr = ptr;
+00662   holdCount = count;
+00663 
+00664   for (unsigned short i = 0; i < ((ibr.len+7) / 8); i++) {
+00665     ++ptr;
+00666     count += 8;
+00667     if (count+8 > superBlock->numBlocks) {
+00668       ptr = freeBlockList;
+00669       count = 0;
+00670       goto rescan;
+00671     } // if
+00672     if (*ptr != 0) goto rescan;
+00673   } // for i
+00674 
+00675   // we have found a range of blocks that work for us
+00676 
+00677   obr.AG = holdCount / superBlock->blocksPerAG;
+00678   obr.start = holdCount % superBlock->blocksPerAG;
+00679   obr.len = ibr.len;
+00680 
+00681   for (unsigned short i = 0; i < (ibr.len / 8); i++) {
+00682     *holdPtr = -1;
+00683     ++holdPtr;
+00684   } // for
+00685 
+00686   if (ibr.len % 8 != 0) *holdPtr = (-1 << (8-(ibr.len % 8)));
+00687 
+00688   superBlock->usedBlocks += ibr.len;   // increment the number of used blocks
+00689   return obr;
+00690 } // UbixFS::getFreeBlock
+00691 
+00692 blockRun
+00693 UbixFS::getFreeBlock(uInt32 AG) {
+00694   // AG == AllocationGroup
+00695   blockRun br;
+00696   signed char * ptr;
+00697   int32 count;
+00698   int32 subCount = 128;
+00699 
+00700   br.AG = 0;
+00701   br.start = 0;
+00702   br.len = 0;
+00703   // Check to make sure neither of these are null
+00704   if (device == NULL || freeBlockList == NULL || superBlock == NULL) return br;
+00705 
+00706   // Are there any blocks available?
+00707   if (superBlock->numBlocks == superBlock->usedBlocks) return br;
+00708 
+00709   /* 
+00710    * count is the block from the base of the list.
+00711    * Since we're given a specific AG to look through, we start the count at
+00712    * AG << AGShift, where AGShift is the shift value of the number of blocks
+00713    * in an AG 
+00714    */
+00715 
+00716   count = (AG << superBlock->AGShift);
+00717 
+00718   /*
+00719    * The freeBlockList is a bit map of the free/used blocks. 
+00720    * Used = on bit
+00721    * Unused = off bit
+00722    * There are 8 bits per byte (hopefully) and so we have to divide the count
+00723    * by 8 to get our starting byte offset to look from
+00724    */
+00725 
+00726   ptr = freeBlockList + (count >> 3);
+00727 
+00728   // Scan through the freeBlockList 
+00729 
+00730 rescan:
+00731   while (*ptr == -1) { 
+00732     ++ptr;
+00733     count += 8;
+00734     if (count+8 > superBlock->numBlocks) break;
+00735   } // while *ptr == -1
+00736 
+00737   subCount = 128;
+00738 
+00739   do {
+00740     if ((*ptr & subCount) == 0) break;
+00741     subCount >>= 1;
+00742     ++count;
+00743     if (count == superBlock->numBlocks) {
+00744       count = 0;
+00745       ptr = freeBlockList;
+00746       goto rescan;
+00747     } // if
+00748   } while(subCount > 1);
+00749 
+00750   *ptr |= subCount;           // mark this block as used
+00751   ++superBlock->usedBlocks;   // increment the number of used blocks
+00752 
+00753   br.AG = count / superBlock->blocksPerAG; 
+00754   br.start = count % superBlock->blocksPerAG;
+00755   br.len = 1;
+00756   return br;               // return the allocated block number
+00757 } // Ubixfs::getFreeBlock
+00758 
+00759 uInt32
+00760 UbixFS::getNextAG(void) {
+00761 
+00762   if (superBlock->lastUsedAG == superBlock->numAGs) 
+00763     superBlock->lastUsedAG = 0;
+00764   else
+00765     superBlock->lastUsedAG++;
+00766   return superBlock->lastUsedAG;
+00767 
+00768 } // UbixFS::getNextAG
+00769 
+00770 /*
+00771  * UbixFS::getFreeBlock(void)
+00772  * upon success returns a free block based on the next AG after the lastUsedAG
+00773  * failure returns -1
+00774  */
+00775 
+00776 blockRun
+00777 UbixFS::getFreeBlock(void) {
+00778   return getFreeBlock(getNextAG());
+00779 } // UbixFS::getFreeBlock
+00780 
+00781 blockRun
+00782 UbixFS::get8FreeBlocks(uInt32 AG) {
+00783   // AG == AllocationGroup
+00784   blockRun br;
+00785   signed char * ptr;
+00786   signed char * endPtr;
+00787   int32 count;
+00788 
+00789   br.AG = 0;
+00790   br.start = 0;
+00791   br.len = 0;
+00792 
+00793   if (device == NULL || freeBlockList == NULL || superBlock == NULL) return br;
+00794 
+00795   // Are there any blocks available?
+00796   if (superBlock->usedBlocks+8 > superBlock->numBlocks) return br;
+00797 
+00798   /*
+00799    * count is the block from the base of the list.
+00800    * Since we're given a specific AG to look through, we start the count at
+00801    * AG << AGShift, where AGShift is the shift value of the number of blocks
+00802    * in an AG
+00803    */
+00804 
+00805   count = (AG << superBlock->AGShift);
+00806 
+00807   ptr = freeBlockList + (count >> 3);
+00808   
+00809   endPtr = freeBlockList + (superBlock->numBlocks >> 3);
+00810 
+00811   bool secondTime = false;
+00812   while (*ptr != 0) {
+00813     ++ptr;
+00814     count += 8;
+00815     if (ptr == endPtr) {
+00816       if (secondTime) 
+00817         return br; 
+00818       else 
+00819         secondTime = true;
+00820 
+00821       count = 0;
+00822       ptr = freeBlockList;      
+00823     } // if
+00824   } // while 
+00825 
+00826   *ptr = -1;   // mark 8 blocks as taken
+00827 
+00828   br.AG = count / superBlock->blocksPerAG;
+00829   br.start = count % superBlock->blocksPerAG;
+00830   br.len = 8;
+00831   return br;
+00832 } // UbixFS::get8FreeBlocks
+00833 
+00834 void *
+00835 UbixFS::mknod(const char *filename, ubixfsInode * parent, mode_t mode) {
+00836   ubixfsInode * inode = NULL;
+00837 
+00838   inode = new ubixfsInode;
+00839   assert(inode);
+00840   if (inode == NULL) return NULL;
+00841   memset(inode, 0, sizeof(ubixfsInode));
+00842 
+00843   inode->magic1 = UBIXFS_INODE_MAGIC;
+00844 
+00845   /* 
+00846    * in retrospect.. I'm not sure why parent would be null.. only the
+00847    * root directory would have a null parent, but that's manually allocated
+00848    * in vfs_format()
+00849    */
+00850 
+00851   if (parent == NULL) {
+00852     inode->inodeNum = getFreeBlock();
+00853     inode->parent.iAddr.AG = 0;
+00854     inode->parent.iAddr.start = 0;
+00855     inode->parent.iAddr.len = 0;
+00856   } else {
+00857     inode->inodeNum = getFreeBlock(parent->inodeNum.AG);
+00858     inode->parent.iAddr = parent->inodeNum;
+00859   } // else
+00860    
+00861   strncpy(inode->name, filename, MAX_FILENAME_LENGTH);
+00862 
+00863   inode->uid = getuid();
+00864   inode->gid = getgid();
+00865   // inode->mode
+00866   inode->flags = mode;
+00867   // inode->createTime
+00868   // inode->lastModifiedTime
+00869   inode->inodeSize = superBlock->inodeSize;
+00870 
+00871   inode->attributes.AG = 0;
+00872   inode->attributes.start = 0;
+00873   inode->attributes.len = 0;
+00874 
+00875   // inode->type 
+00876 
+00877   /*
+00878    * next and prev are used in memory to hold pointers to the next/prev
+00879    * inodes in this dir.  On disk they may have another value, but for
+00880    * now they should be set to null.
+00881    */
+00882 
+00883   inode->next.offset = 0;
+00884   inode->prev.offset = 0;
+00885   inode->refCount = 0;
+00886   ++superBlock->inodeCount;
+00887   return inode;
+00888 } // UbixFS::mknod
+00889 
+00890 int
+00891 UbixFS::vfs_mkdir(const char * path, mode_t mode) {
+00892   char name[MAX_FILENAME_LENGTH];
+00893   unsigned int start, end, len, nameStart;
+00894   ubixfsInode * dir = static_cast<ubixfsInode *>(root->inode);
+00895   ubixfsInode * inode = NULL;
+00896 
+00897   assert(path);                     // bad input: vfs_mkdir(NULL);
+00898   assert(*path);                    // bad input: vfs_mkdir("");
+00899 
+00900   memset(&name, 0, sizeof(name));
+00901   // find the dir name
+00902   len = strlen(path);
+00903 
+00904   assert(path[0] == '/');           // bad input: vfs isn't doing its job
+00905   assert(len > 1);                  // bad input: mkdir /
+00906 
+00907   // remove trailing "/" if present
+00908   if (path[len-1] == '/') --len;
+00909 
+00910   assert(len > 1);                  // bad input: mkdir //
+00911 
+00912   nameStart = len-1;
+00913 
+00914   assert(path[nameStart] != '/');   // bad input: mkdir /a//
+00915 
+00916   /*
+00917    * we're guaranteed by the assert() above that there is 
+00918    * at least one "/" before our location. If you remove the assert 
+00919    * you might need to make sure nameStart stays above 0 in the following
+00920    * while
+00921    */
+00922 
+00923   while (path[nameStart] != '/') --nameStart;
+00924   ++nameStart;
+00925   assert(len - nameStart > 0);
+00926 
+00927   /* e.g.
+00928    *   v--------------------- start
+00929    *      v------------------ end
+00930    *                  v------ nameStart
+00931    *  /usr/local/data/dirname/  <--- ignores trailing /
+00932    *  <---------23----------> len
+00933    */
+00934 
+00935   start = end = 1;   // skip leading /
+00936   while (end < nameStart) {
+00937     do { ++end; } while(path[end] != '/');
+00938 
+00939     assert(end-start+1 < sizeof(name));
+00940     // this is probably wrong:
+00941     strncpy(name, &path[start], end-start+1);
+00942     cout << name << endl;
+00943     dir = dir->data.btPtr->Find(name);
+00944     assert(dir);
+00945     assert(dir->flags & INODE_DIRECTORY == INODE_DIRECTORY);
+00946     start = ++end;
+00947   }
+00948 
+00949   strncpy(name, &path[nameStart], len - nameStart);
+00950   inode = (ubixfsInode *)mknod(name, dir, mode | INODE_DIRECTORY);
+00951 
+00952   /* 
+00953    * keep in mind that the reason for passing in the name is because
+00954    * we thought about allowing key names to be different from inode 
+00955    * names. In retrospect, I don't think that's a good idea since a dir
+00956    * listing will print the actual dir name instead of . and ..
+00957    * Thus: the first parameter of btPtr->Insert() may go away.
+00958    */
+00959 
+00960   assert(dir->data.btPtr->Insert(inode->name, inode));
+00961 
+00962   return 0;
+00963 } // UbixFS::vfs_mkdir
+00964 
+00965 void 
+00966 UbixFS::printFreeBlockList(uInt32 AG) {
+00967   unsigned int j;
+00968   if (superBlock == NULL || freeBlockList == NULL) return;
+00969   printf("AG = %d\n", AG);
+00970   for (unsigned int i = 0; i < superBlock->blocksPerAG / 8; i++) {
+00971     j = 128;
+00972     signed char foo = freeBlockList[(AG << superBlock->AGShift)+i];
+00973     while (j > 0) {
+00974       if ((foo & j) == j) 
+00975         printf("1");
+00976       else
+00977         printf("0");    
+00978       j >>= 1;
+00979  
+00980     }
+00981   } // for i
+00982   printf("\n");
+00983   return;
+00984 } // UbixFS::printFreeBlockList
+00985 
+00986 UbixFS::~UbixFS(void) {
+00987   delete [] freeBlockList;
+00988   return;
+00989 }
+

Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ubixfs_8cpp.html b/doc/html/ubixfs_8cpp.html new file mode 100644 index 0000000..3e6769e --- /dev/null +++ b/doc/html/ubixfs_8cpp.html @@ -0,0 +1,52 @@ + + +UbixOS V2: src/sys/ubixfsv2/ubixfs.cpp File Reference + + + + +
+
+
+
+ +

ubixfs.cpp File Reference

+

+#include <stddef.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <assert.h>
+#include <iostream>
+#include "ubixfs.h"
+#include "btree.h"
+ +

+Go to the source code of this file. + +
+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ubixfsv2_2device_8h-source.html b/doc/html/ubixfsv2_2device_8h-source.html new file mode 100644 index 0000000..f84508f --- /dev/null +++ b/doc/html/ubixfsv2_2device_8h-source.html @@ -0,0 +1,181 @@ + + +UbixOS V2: src/sys/ubixfsv2/device.h Source File + + + + +
+
+
+
+ +

device.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _DEVICE_H
+00031 #define _DEVICE_H
+00032 
+00033 // #include <ubixos/types.h>
+00034 #include <sys/types.h>
+00035 #include "types.h"
+00036 
+00037 struct device_node {
+00038   struct device_node      *prev;
+00039   struct device_node      *next;
+00040   struct device_t            *devInfo;
+00041   struct device_resource  *devRec;
+00042   char                     type;
+00043   int                      minor;
+00044   };
+00045   
+00046 struct device_resource {
+00047   uInt8 irq;
+00048   };
+00049 
+00050 typedef struct device_t {
+00051   int    major;
+00052   void  *info;
+00053   uInt32 sectors;
+00054   int  (*read)(device_t *, void *, off_t, size_t);
+00055   int  (*write)(device_t *, void *, off_t, size_t);
+00056   int  (*reset)(void *);
+00057   int  (*init)(device_t *);
+00058   void (*ioctl)(void *);
+00059   void (*stop)(void *);
+00060   void (*start)(void *);
+00061   void (*standby)(void *);
+00062   };
+00063 
+00064 #endif
+00065 
+00066 /***
+00067  $Log$
+00068  Revision 1.1.1.1  2006/06/01 12:46:15  reddawg
+00069  ubix2
+00070 
+00071  Revision 1.2  2005/10/12 00:13:38  reddawg
+00072  Removed
+00073 
+00074  Revision 1.1.1.1  2005/09/26 17:24:44  reddawg
+00075  no message
+00076 
+00077  Revision 1.4  2004/09/20 00:53:04  flameshadow
+00078  chg: UbixFS::vfs_read() now works for direct block extents
+00079  chg: UbixFS::vfs_read() returns ~0 on error, or the size read in on success
+00080  chg: UbixFS::root member is now a fileDescriptor
+00081  chg: UbixFS::vfs_init() creates a file descriptor for the root dir
+00082  chg: UbixFS::vfs_format() now sets all values in the bTreeHeader before writing
+00083  chg: UbixFS::vfs_format() sets the inode magic number
+00084  chg: device_t::read(device_t *, void *, off_t, size_t)
+00085  chg: device_t::write(device_t *, void *, off_t, size_t)
+00086  chg: vfs_abstract::vfs_read(fileDescriptor *, void *, off_t, size_t)
+00087  chg: vfs_abstract::vfs_write(fileDescriptor *, void *, off_t, size_t)
+00088  chg: ramDrive_read(device_t *dev,void *ptr,off_t offset,size_t length)
+00089  chg: ramDrive_write(device_t *dev,void *ptr,off_t offset,size_t length)
+00090 
+00091  Revision 1.3  2004/09/13 15:21:26  flameshadow
+00092  add: ramdrive.h
+00093  chg: renamed device_t.size to sectors
+00094  chg: made #define for size of ramdisk
+00095  chg: calculated sectors of ramdisk and stored in the device_t struct
+00096 
+00097  Revision 1.2  2004/09/11 22:05:59  flameshadow
+00098  chg: modified UbixFS::vfs_format() to properly init the device
+00099  chg: modified UbixFS::vfs_init() to verify that it's a ubixfs partition
+00100  add: added BAT blockRun in the superBlock
+00101 
+00102  Revision 1.1  2004/09/11 12:43:42  flameshadow
+00103  add: device.h, types.h. Temporarily moved custom ubix typedefs to types.h
+00104       (<ubixos/types.h> supercedes this file when this code is included into
+00105       the kernel)
+00106  chg: changed dev_t to device_interface so as to not conflict with bsd/linux
+00107       definitions
+00108  chg: fixed up compiler warnings in btree.cpp
+00109 
+00110  Revision 1.14  2004/08/15 00:33:02  reddawg
+00111  Wow the ide driver works again
+00112 
+00113  Revision 1.13  2004/08/14 21:56:44  reddawg
+00114  Added initialized byte to the device system to make it easy to add child devices which use parent hardware.
+00115 
+00116  Revision 1.12  2004/07/21 10:02:09  reddawg
+00117  devfs: renamed functions
+00118  device system: renamed functions
+00119  fdc: fixed a few potential bugs and cleaned up some unused variables
+00120  strol: fixed definition
+00121  endtask: made it print out freepage debug info
+00122  kmalloc: fixed a huge memory leak we had some unhandled descriptor insertion so some descriptors were lost
+00123  ld: fixed a pointer conversion
+00124  file: cleaned up a few unused variables
+00125  sched: broke task deletion
+00126  kprintf: fixed ogPrintf definition
+00127 
+00128  Revision 1.11  2004/05/22 02:40:04  ionix
+00129 
+00130 
+00131  fixed typo in device.h and initialized previous in device.c :)
+00132 
+00133  Revision 1.10  2004/05/22 02:34:03  ionix
+00134 
+00135 
+00136  Added proto
+00137 
+00138  Revision 1.9  2004/05/21 15:12:17  reddawg
+00139  Cleaned up
+00140 
+00141 
+00142  END
+00143  ***/
+00144 
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ubixfsv2_2device_8h.html b/doc/html/ubixfsv2_2device_8h.html new file mode 100644 index 0000000..13d2315 --- /dev/null +++ b/doc/html/ubixfsv2_2device_8h.html @@ -0,0 +1,53 @@ + + +UbixOS V2: src/sys/ubixfsv2/device.h File Reference + + + + +
+
+
+
+ +

device.h File Reference

+

+#include <sys/types.h>
+#include "types.h"
+ +

+Go to the source code of this file. + + + + + + + + +

Data Structures

struct  device_node
struct  device_resource
struct  device_t
+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ubixfsv2_2file_8h-source.html b/doc/html/ubixfsv2_2file_8h-source.html new file mode 100644 index 0000000..ac31733 --- /dev/null +++ b/doc/html/ubixfsv2_2file_8h-source.html @@ -0,0 +1,51 @@ + + +UbixOS V2: src/sys/ubixfsv2/file.h Source File + + + + +
+
+
+
+ +

file.h

Go to the documentation of this file.
00001 #ifndef FILE_H
+00002 #define FILE_H
+00003 
+00004 #include "ubixfs.h"
+00005 
+00006 typedef struct fileDescriptor {
+00007   struct fileDescriptor * prev;
+00008   struct fileDescriptor * next;
+00009   void * inode;
+00010   off_t  offset;
+00011   size_t size;
+00012 } fileDescriptor;
+00013 
+00014 #endif /* !FILE_H */
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ubixfsv2_2file_8h.html b/doc/html/ubixfsv2_2file_8h.html new file mode 100644 index 0000000..9c77131 --- /dev/null +++ b/doc/html/ubixfsv2_2file_8h.html @@ -0,0 +1,48 @@ + + +UbixOS V2: src/sys/ubixfsv2/file.h File Reference + + + + +
+
+
+
+ +

file.h File Reference

+

+#include "ubixfs.h"
+ +

+Go to the source code of this file. + + + + +

Data Structures

struct  fileDescriptor
+


Generated on Sun Dec 3 02:38:08 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ubixfsv2_2types_8h-source.html b/doc/html/ubixfsv2_2types_8h-source.html new file mode 100644 index 0000000..b599bf1 --- /dev/null +++ b/doc/html/ubixfsv2_2types_8h-source.html @@ -0,0 +1,48 @@ + + +UbixOS V2: src/sys/ubixfsv2/types.h Source File + + + + +
+
+
+
+ +

types.h

Go to the documentation of this file.
00001 #ifndef TYPES_H
+00002 #define TYPES_H
+00003 
+00004 typedef signed char  int8;
+00005 typedef unsigned char uInt8;
+00006 typedef unsigned int        uInt32;
+00007 typedef int                 int32;
+00008 typedef unsigned long long  uInt64;
+00009 typedef signed long long    int64;
+00010 
+00011 #endif /* !TYPES_H */
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ubixfsv2_2types_8h.html b/doc/html/ubixfsv2_2types_8h.html new file mode 100644 index 0000000..c296b98 --- /dev/null +++ b/doc/html/ubixfsv2_2types_8h.html @@ -0,0 +1,160 @@ + + +UbixOS V2: src/sys/ubixfsv2/types.h File Reference + + + + +
+
+
+
+ +

types.h File Reference

+

+ +

+Go to the source code of this file. + + + + + + + + + + + + + + +

Typedefs

typedef int int32
typedef signed long long int64
typedef signed char int8
typedef unsigned int uInt32
typedef unsigned long long uInt64
typedef unsigned char uInt8
+


Typedef Documentation

+ +
+
+ + + + +
typedef int int32
+
+
+ +

+ +

+Definition at line 7 of file types.h. +

+

+ +

+
+ + + + +
typedef signed long long int64
+
+
+ +

+ +

+Definition at line 9 of file types.h. +

+

+ +

+
+ + + + +
typedef signed char int8
+
+
+ +

+ +

+Definition at line 4 of file types.h. +

+

+ +

+
+ + + + +
typedef unsigned int uInt32
+
+
+ +

+ +

+Definition at line 6 of file types.h. +

+

+ +

+
+ + + + +
typedef unsigned long long uInt64
+
+
+ +

+ +

+Definition at line 8 of file types.h. +

+

+ +

+
+ + + + +
typedef unsigned char uInt8
+
+
+ +

+ +

+Definition at line 5 of file types.h. +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ubixfsv2_2ubixfs_8h-source.html b/doc/html/ubixfsv2_2ubixfs_8h-source.html new file mode 100644 index 0000000..33fc202 --- /dev/null +++ b/doc/html/ubixfsv2_2ubixfs_8h-source.html @@ -0,0 +1,200 @@ + + +UbixOS V2: src/sys/ubixfsv2/ubixfs.h Source File + + + + +
+
+
+
+ +

ubixfs.h

Go to the documentation of this file.
00001 #ifndef UBIXFS_H
+00002 #define UBIXFS_H
+00003 
+00004 #include <sys/types.h>
+00005 #include <unistd.h>
+00006 #include "fsAbstract.h"
+00007 #include "types.h"
+00008 #include "file.h"
+00009 
+00010 #define INODE_IN_USE      0x00000001
+00011 #define INODE_DIRECTORY   0x00000002
+00012 #define ATTR_INODE        0x00000004
+00013 #define INODE_LOGGED      0x00000008
+00014 #define INODE_DELETED     0x00000010
+00015 #define PERMANENT_FLAGS   0x0000ffff
+00016 #define INODE_NO_CACHE    0x00010000
+00017 #define INODE_WAS_WRITTEN 0x00020000
+00018 #define NO_TRANSACTION    0x00040000
+00019 
+00020 #define NUM_DIRECT_BLOCKS 64
+00021 #define MAX_FILENAME_LENGTH 256
+00022 
+00023 #define UBIXFS_MAGIC1 0xA0A0A0A
+00024 #define UBIXFS_MAGIC2 0xB0B0B0B
+00025 #define UBIXFS_MAGIC3 0xC0C0C0C
+00026 #define UBIXFS_INODE_MAGIC 0x3bbe0ad9
+00027 
+00028 /* befs magic numbers
+00029 #define SUPER_BLOCK_MAGIC1 0x42465331 // BFS1
+00030 #define SUPER_BLOCK_MAGIC2 0xdd121031
+00031 #define SUPER_BLOCK_MAGIC3 0x15b6830e
+00032  */
+00033 #define UBIXFS_CLEAN 0x434C454E  // CLEN
+00034 #define UBIXFS_DIRTY 0x44495254  // DIRT
+00035 
+00036 
+00037 typedef struct blockRun {
+00038   int            AG               __attribute__ ((packed));
+00039   unsigned short start            __attribute__ ((packed));
+00040   unsigned short len              __attribute__ ((packed));
+00041 } inodeAddr;
+00042 
+00043 struct bNode;
+00044 struct ubixfsInode;
+00045 class bTree;
+00046 
+00047 typedef union uPtr {
+00048   inodeAddr iAddr;
+00049   bNode * bPtr;
+00050   bTree * btPtr;
+00051   ubixfsInode * iPtr;
+00052   void * vPtr;
+00053   off_t offset;
+00054 };
+00055 
+00056 typedef struct diskSuperBlock {
+00057   char      name[32]      __attribute__ ((packed));
+00058   int32     magic1        __attribute__ ((packed));
+00059   int32     fsByteOrder   __attribute__ ((packed));
+00060 
+00061 // blockSize on disk (4096 for UbixFS v2)
+00062   int32     blockSize     __attribute__ ((packed));
+00063 
+00064 // number of bits needed to shift a block number to get a byte address
+00065   uInt32     blockShift    __attribute__ ((packed));
+00066 
+00067   off_t     numBlocks     __attribute__ ((packed));
+00068   off_t     usedBlocks    __attribute__ ((packed));
+00069 
+00070 // BlockAllocationTable
+00071   uInt32    batSectors    __attribute__ ((packed));
+00072 
+00073   uInt32    inodeCount    __attribute__ ((packed));
+00074   uInt32    inodeSize     __attribute__ ((packed));
+00075   uInt32    magic2        __attribute__ ((packed));
+00076   uInt32    blocksPerAG   __attribute__ ((packed));
+00077   uInt32    AGShift       __attribute__ ((packed));
+00078   uInt32    numAGs        __attribute__ ((packed));
+00079   uInt32    lastUsedAG    __attribute__ ((packed));
+00080 // flags tells whether the FS is clean (0x434C454E) or dirty (0x44495954)
+00081   int32     flags         __attribute__ ((packed));
+00082 
+00083 // journal information
+00084   blockRun  logBlocks     __attribute__ ((packed));
+00085   off_t     logStart      __attribute__ ((packed));
+00086   off_t     logEnd        __attribute__ ((packed));
+00087 
+00088   int32     magic3        __attribute__ ((packed));
+00089 
+00090 // root dir of the SYS container
+00091   inodeAddr rootDir       __attribute__ ((packed));
+00092 
+00093 // indicies
+00094   inodeAddr indicies      __attribute__ ((packed));
+00095 
+00096   char      pad[368]      __attribute__ ((packed));
+00097 
+00098 } diskSuperBlock;
+00099 
+00100 typedef struct dataStream {
+00101   struct blockRun direct[NUM_DIRECT_BLOCKS] __attribute__ ((packed));
+00102   off_t           maxDirectRange            __attribute__ ((packed));
+00103   struct blockRun indirect                  __attribute__ ((packed));
+00104   off_t           maxIndirectRange          __attribute__ ((packed));
+00105   struct blockRun double_indirect           __attribute__ ((packed));
+00106   off_t           maxDoubleIndirectRange    __attribute__ ((packed));
+00107   off_t           size                      __attribute__ ((packed));
+00108 } dataStream;
+00109 
+00110 typedef struct ubixfsInode {
+00111   int32       magic1                     __attribute__ ((packed));
+00112   inodeAddr   inodeNum                   __attribute__ ((packed));
+00113   char        name[MAX_FILENAME_LENGTH]  __attribute__ ((packed));
+00114   uid_t       uid                        __attribute__ ((packed));
+00115   gid_t       gid                        __attribute__ ((packed));
+00116   int32       mode                       __attribute__ ((packed));
+00117   int32       flags                      __attribute__ ((packed));
+00118  // uInt64      createTime                 __attribute__ ((packed));
+00119  // uInt64      lastModifiedTime           __attribute__ (packed));
+00120   inodeAddr   attributes                 __attribute__ ((packed));
+00121   uInt32      type                       __attribute__ ((packed));
+00122   uInt32      inodeSize                  __attribute__ ((packed));
+00123   uPtr        parent                     __attribute__ ((packed));
+00124   uPtr        next                       __attribute__ ((packed));
+00125   uPtr        prev                       __attribute__ ((packed));
+00126   uPtr        data                       __attribute__ ((packed));
+00127   dataStream  blocks                     __attribute__ ((packed));
+00128   uInt32      refCount                   __attribute__ ((packed));
+00129   char        smallData[3200]            __attribute__ ((packed));
+00130 } ubixfsInode;
+00131 
+00132 class UbixFS : public vfs_abstract {
+00133  protected:
+00134   signed char *    freeBlockList;
+00135   diskSuperBlock * superBlock;
+00136   fileDescriptor * root;
+00137 
+00138   blockRun         getFreeBlock(blockRun);
+00139   blockRun         getFreeBlock(uInt32);
+00140   blockRun         getFreeBlock(void);
+00141   blockRun         get8FreeBlocks(uInt32);
+00142   uInt32           getNextAG(void);
+00143   void *           mknod(const char *, ubixfsInode *, mode_t);
+00144   void             printSuperBlock(void);
+00145   void             printFreeBlockList(uInt32);
+00146   void             setFreeBlock(blockRun);
+00147  public:
+00148                    UbixFS(void);
+00149                    UbixFS(device_t *);
+00150   virtual int      vfs_init(void);
+00151   virtual int      vfs_format(device_t *);
+00152   virtual void *   vfs_mknod(const char *, mode_t);
+00153   virtual int      vfs_mkdir(const char *, mode_t);
+00154   virtual int      vfs_open(const char *, fileDescriptor *, int, ...);
+00155   virtual size_t   vfs_read(fileDescriptor *, void *, off_t, size_t);
+00156   virtual size_t   vfs_write(fileDescriptor *, void *, off_t, size_t);
+00157   virtual int      vfs_sync(void);
+00158   virtual int      vfs_stop(void); 
+00159   virtual         ~UbixFS(void); 
+00160   friend class bTree;
+00161 }; // UbixFS
+00162 
+00163 #endif // !UBIXFS_H
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ubixfsv2_2ubixfs_8h.html b/doc/html/ubixfsv2_2ubixfs_8h.html new file mode 100644 index 0000000..ad5c8c1 --- /dev/null +++ b/doc/html/ubixfsv2_2ubixfs_8h.html @@ -0,0 +1,422 @@ + + +UbixOS V2: src/sys/ubixfsv2/ubixfs.h File Reference + + + + +
+
+
+
+ +

ubixfs.h File Reference

+

+#include <sys/types.h>
+#include <unistd.h>
+#include "fsAbstract.h"
+#include "types.h"
+#include "file.h"
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  blockRun
struct  dataStream
struct  diskSuperBlock
class  UbixFS
struct  ubixfsInode
union  uPtr

Defines

#define ATTR_INODE   0x00000004
#define INODE_DELETED   0x00000010
#define INODE_DIRECTORY   0x00000002
#define INODE_IN_USE   0x00000001
#define INODE_LOGGED   0x00000008
#define INODE_NO_CACHE   0x00010000
#define INODE_WAS_WRITTEN   0x00020000
#define MAX_FILENAME_LENGTH   256
#define NO_TRANSACTION   0x00040000
#define NUM_DIRECT_BLOCKS   64
#define PERMANENT_FLAGS   0x0000ffff
#define UBIXFS_CLEAN   0x434C454E
#define UBIXFS_DIRTY   0x44495254
#define UBIXFS_INODE_MAGIC   0x3bbe0ad9
#define UBIXFS_MAGIC1   0xA0A0A0A
#define UBIXFS_MAGIC2   0xB0B0B0B
#define UBIXFS_MAGIC3   0xC0C0C0C

Typedefs

typedef blockRun inodeAddr
+


Define Documentation

+ +
+
+ + + + +
#define ATTR_INODE   0x00000004
+
+
+ +

+ +

+Definition at line 12 of file ubixfs.h. +

+

+ +

+
+ + + + +
#define INODE_DELETED   0x00000010
+
+
+ +

+ +

+Definition at line 14 of file ubixfs.h. +

+

+ +

+
+ + + + +
#define INODE_DIRECTORY   0x00000002
+
+
+ +

+ +

+Definition at line 11 of file ubixfs.h. +

+Referenced by UbixFS::vfs_format(), and UbixFS::vfs_mkdir(). +

+

+ +

+
+ + + + +
#define INODE_IN_USE   0x00000001
+
+
+ +

+ +

+Definition at line 10 of file ubixfs.h. +

+

+ +

+
+ + + + +
#define INODE_LOGGED   0x00000008
+
+
+ +

+ +

+Definition at line 13 of file ubixfs.h. +

+

+ +

+
+ + + + +
#define INODE_NO_CACHE   0x00010000
+
+
+ +

+ +

+Definition at line 16 of file ubixfs.h. +

+

+ +

+
+ + + + +
#define INODE_WAS_WRITTEN   0x00020000
+
+
+ +

+ +

+Definition at line 17 of file ubixfs.h. +

+

+ +

+
+ + + + +
#define MAX_FILENAME_LENGTH   256
+
+
+ +

+ +

+Definition at line 21 of file ubixfs.h. +

+Referenced by UbixFS::mknod(), and UbixFS::vfs_mkdir(). +

+

+ +

+
+ + + + +
#define NO_TRANSACTION   0x00040000
+
+
+ +

+ +

+Definition at line 18 of file ubixfs.h. +

+

+ +

+
+ + + + +
#define NUM_DIRECT_BLOCKS   64
+
+
+ +

+ +

+Definition at line 20 of file ubixfs.h. +

+Referenced by UbixFS::vfs_read(), and UbixFS::vfs_write(). +

+

+ +

+
+ + + + +
#define PERMANENT_FLAGS   0x0000ffff
+
+
+ +

+ +

+Definition at line 15 of file ubixfs.h. +

+

+ +

+
+ + + + +
#define UBIXFS_CLEAN   0x434C454E
+
+
+ +

+ +

+Definition at line 33 of file ubixfs.h. +

+Referenced by UbixFS::vfs_init(). +

+

+ +

+
+ + + + +
#define UBIXFS_DIRTY   0x44495254
+
+
+ +

+ +

+Definition at line 34 of file ubixfs.h. +

+

+ +

+
+ + + + +
#define UBIXFS_INODE_MAGIC   0x3bbe0ad9
+
+
+ +

+ +

+Definition at line 26 of file ubixfs.h. +

+Referenced by UbixFS::mknod(), and UbixFS::vfs_format(). +

+

+ +

+
+ + + + +
#define UBIXFS_MAGIC1   0xA0A0A0A
+
+
+ +

+ +

+Definition at line 23 of file ubixfs.h. +

+Referenced by UbixFS::vfs_format(), and UbixFS::vfs_init(). +

+

+ +

+
+ + + + +
#define UBIXFS_MAGIC2   0xB0B0B0B
+
+
+ +

+ +

+Definition at line 24 of file ubixfs.h. +

+Referenced by UbixFS::vfs_format(), and UbixFS::vfs_init(). +

+

+ +

+
+ + + + +
#define UBIXFS_MAGIC3   0xC0C0C0C
+
+
+ +

+ +

+Definition at line 25 of file ubixfs.h. +

+Referenced by UbixFS::vfs_format(), and UbixFS::vfs_init(). +

+

+


Typedef Documentation

+ +
+
+ + + + +
typedef struct blockRun inodeAddr
+
+
+ +

+ +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ubixfsv2_2vfs_8h-source.html b/doc/html/ubixfsv2_2vfs_8h-source.html new file mode 100644 index 0000000..f469d09 --- /dev/null +++ b/doc/html/ubixfsv2_2vfs_8h-source.html @@ -0,0 +1,62 @@ + + +UbixOS V2: src/sys/ubixfsv2/vfs.h Source File + + + + +
+
+
+
+ +

vfs.h

Go to the documentation of this file.
00001 #ifndef VFS_H
+00002 #define VFS_H
+00003 
+00004 #include <stdlib.h>
+00005 #include <stdio.h>
+00006 
+00007 class FileSystemAbstract {
+00008  protected:
+00009  public: 
+00010   virtual   int read(char *, long, long) = 0;
+00011   virtual   int write(char *, long, long) = 0;
+00012   virtual  ~FileSystemAbstract(void) {};
+00013 }; // FileSystemAbstract
+00014 
+00015 class DiskFS : public FileSystemAbstract {
+00016  protected:
+00017    FILE * diskFile;
+00018  public:
+00019             DiskFS(const char *);
+00020   virtual   int write(const void *, long, long);
+00021   virtual   int read(void *, long, long);
+00022   virtual  ~DiskFS(void) { };
+00023 }; // DiskFS
+00024 
+00025 #endif // !VFS_H
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ubixfsv2_2vfs_8h.html b/doc/html/ubixfsv2_2vfs_8h.html new file mode 100644 index 0000000..f787564 --- /dev/null +++ b/doc/html/ubixfsv2_2vfs_8h.html @@ -0,0 +1,51 @@ + + +UbixOS V2: src/sys/ubixfsv2/vfs.h File Reference + + + + +
+
+
+
+ +

vfs.h File Reference

+

+#include <stdlib.h>
+#include <stdio.h>
+ +

+Go to the source code of this file. + + + + + + +

Data Structures

class  DiskFS
class  FileSystemAbstract
+


Generated on Sun Dec 3 02:38:08 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ubixos_2init_8h-source.html b/doc/html/ubixos_2init_8h-source.html new file mode 100644 index 0000000..6bdbc43 --- /dev/null +++ b/doc/html/ubixos_2init_8h-source.html @@ -0,0 +1,122 @@ + + +UbixOS V2: src/sys/include/ubixos/init.h Source File + + + + +
+
+
+
+ +

init.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _INIT_H
+00031 #define _INIT_H
+00032 
+00033 #include <vmm/vmm.h>
+00034 #include <ubixos/vitals.h>
+00035 #include <vfs/vfs.h>
+00036 #include <isa/8259.h>
+00037 #include <sys/idt.h>
+00038 #include <ubixos/sched.h>
+00039 #include <isa/pit.h>
+00040 #include <isa/atkbd.h>
+00041 #include <ubixos/time.h>
+00042 #include <net/net.h>
+00043 #include <isa/ne2k.h>
+00044 #include <devfs/devfs.h>
+00045 #include <pci/pci.h>
+00046 #include <ubixfs/ubixfs.h>
+00047 #include <isa/fdc.h>
+00048 #include <ubixos/tty.h>
+00049 #include <ufs/ufs.h>
+00050 #include <ubixos/static.h>
+00051 #include <pci/hd.h>
+00052 #include <sys/kern_sysctl.h>
+00053 
+00054 typedef int (*intFunctionPTR)(void);
+00055 
+00056 intFunctionPTR init_tasks[] = {
+00057   vmm_init,
+00058   static_constructors,
+00059   i8259_init,  
+00060   idt_init,
+00061   //vitals_init,
+00062   sysctl_init,
+00063   vfs_init,
+00064   sched_init,
+00065   pit_init,
+00066   atkbd_init,
+00067   time_init,
+00068   //net_init,
+00069   //ne2k_init,
+00070   devfs_init,
+00071   //pci_init,
+00072   ubixfs_init,
+00073   //fdc_init,
+00074   tty_init,
+00075   ufs_init,
+00076   initHardDisk,
+00077   };
+00078 
+00079 int init_tasksTotal = sizeof(init_tasks)/sizeof(intFunctionPTR);
+00080 
+00081 #endif
+00082 
+00083 /***
+00084  END
+00085  ***/
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ubixos_2init_8h.html b/doc/html/ubixos_2init_8h.html new file mode 100644 index 0000000..71760a7 --- /dev/null +++ b/doc/html/ubixos_2init_8h.html @@ -0,0 +1,151 @@ + + +UbixOS V2: src/sys/include/ubixos/init.h File Reference + + + + +
+
+
+
+ +

init.h File Reference

+

+#include <vmm/vmm.h>
+#include <ubixos/vitals.h>
+#include <vfs/vfs.h>
+#include <isa/8259.h>
+#include <sys/idt.h>
+#include <ubixos/sched.h>
+#include <isa/pit.h>
+#include <isa/atkbd.h>
+#include <ubixos/time.h>
+#include <net/net.h>
+#include <isa/ne2k.h>
+#include <devfs/devfs.h>
+#include <pci/pci.h>
+#include <ubixfs/ubixfs.h>
+#include <isa/fdc.h>
+#include <ubixos/tty.h>
+#include <ufs/ufs.h>
+#include <ubixos/static.h>
+#include <pci/hd.h>
+#include <sys/kern_sysctl.h>
+ +

+Go to the source code of this file. + + + + + + + + + +

Typedefs

typedef int(*) intFunctionPTR (void)

Variables

intFunctionPTR init_tasks []
int init_tasksTotal = sizeof(init_tasks)/sizeof(intFunctionPTR)
+


Typedef Documentation

+ +
+
+ + + + +
typedef int(*) intFunctionPTR(void)
+
+
+ +

+ +

+Definition at line 54 of file init.h. +

+

+


Variable Documentation

+ +
+
+ + + + +
intFunctionPTR init_tasks[]
+
+
+ +

+Initial value:

+

+Definition at line 56 of file init.h. +

+Referenced by kmain(). +

+

+ +

+
+ + + + +
int init_tasksTotal = sizeof(init_tasks)/sizeof(intFunctionPTR)
+
+
+ +

+ +

+Definition at line 79 of file init.h. +

+Referenced by kmain(). +

+

+


Generated on Sun Dec 3 02:38:06 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ubthread_8c-source.html b/doc/html/ubthread_8c-source.html new file mode 100644 index 0000000..4fd01ab --- /dev/null +++ b/doc/html/ubthread_8c-source.html @@ -0,0 +1,172 @@ + + +UbixOS V2: src/sys/kernel/ubthread.c Source File + + + + +
+
+
+
+ +

ubthread.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 /* All these must be converted to be done atomically */
+00031 
+00032 #include <ubixos/ubthread.h>
+00033 #include <ubixos/vitals.h>
+00034 #include <ubixos/exec.h>
+00035 #include <ubixos/sched.h>
+00036 #include <ubixos/vitals.h>
+00037 #include <ubixos/time.h>
+00038 #include <ubixos/spinlock.h>
+00039 #include <lib/kmalloc.h>
+00040 #include <lib/kprintf.h>
+00041 
+00042 struct ubthread_cond_list *conds = 0x0;
+00043 struct ubthread_mutex_list *mutex = 0x0;
+00044 
+00045 kTask_t *ubthread_self() {
+00046   return(_current);
+00047   }
+00048 
+00049 int ubthread_cond_init(ubthread_cond_t *cond,const uInt32 attr) { 
+00050   ubthread_cond_t  ubcond = kmalloc(sizeof(struct ubthread_cond));
+00051   ubcond->id     = (int)cond;
+00052   ubcond->locked = UNLOCKED;
+00053   *cond = ubcond;
+00054   return(0x0);
+00055   }
+00056 
+00057 int ubthread_mutex_init(ubthread_mutex_t *mutex,const uInt32 attr) { 
+00058   ubthread_mutex_t ubmutex = kmalloc(sizeof(struct ubthread_mutex));
+00059   ubmutex->id     = (int)mutex;
+00060   ubmutex->locked = UNLOCKED;
+00061   *mutex = ubmutex;
+00062   return(0x0);
+00063   }
+00064 
+00065 int ubthread_cond_destroy(ubthread_cond_t *cond) {
+00066   kfree(*cond);
+00067   *cond = 0x0;
+00068   return(0x0);
+00069   }
+00070 
+00071 int ubthread_mutex_destroy(ubthread_mutex_t *mutex) {
+00072   kfree(*mutex);
+00073   *mutex = 0x0;
+00074   return(0x0);
+00075   }
+00076 
+00077 int ubthread_create(kTask_t **thread,const uInt32 *attr,void (* tproc)(void), void *arg) {
+00078   *thread = (void *)execThread(tproc,(int)(kmalloc(0x2000)+0x2000),arg);
+00079   return(0x0);
+00080   }
+00081 
+00082 int ubthread_mutex_lock(ubthread_mutex_t *mutex) {
+00083   ubthread_mutex_t ubmutex = *mutex;
+00084   if (ubmutex->locked == LOCKED) {
+00085     kprintf("Mutex Already Lock By %x Trying To Be Relocked By %x\n",ubmutex->pid,_current->id);
+00086     while (ubmutex->locked == LOCKED);
+00087     }
+00088   ubmutex->locked = LOCKED;
+00089   ubmutex->pid    = _current->id;
+00090   return(0x0);
+00091   }
+00092 
+00093 int ubthread_mutex_unlock(ubthread_mutex_t *mutex) {
+00094   ubthread_mutex_t ubmutex = *mutex;
+00095  if (ubmutex->pid == _current->id) {
+00096     ubmutex->locked = UNLOCKED;
+00097     return(0x0);
+00098     }
+00099   else {
+00100     //kprintf("Trying To Unlock Mutex From No Locking Thread\n");
+00101     ubmutex->locked = UNLOCKED;
+00102     return(-1);
+00103     }
+00104   }
+00105 
+00106 int ubthread_cond_timedwait(ubthread_cond_t *cond, ubthread_mutex_t *mutex, const struct timespec *abstime) {
+00107   ubthread_cond_t  ubcond  = *cond;
+00108   ubthread_mutex_t ubmutex = *mutex;
+00109   uInt32 enterTime = systemVitals->sysUptime+20;
+00110   while (enterTime > systemVitals->sysUptime) {
+00111     if (ubcond->locked == UNLOCKED) break;
+00112     sched_yield();
+00113     }
+00114   ubmutex->locked = UNLOCKED;
+00115   return(0x0);
+00116   }
+00117 
+00118 int ubthread_cond_wait(ubthread_cond_t *cond, ubthread_mutex_t *mutex) {
+00119   ubthread_cond_t  ubcond  = *cond;
+00120   ubthread_mutex_t ubmutex = *mutex;
+00121   while (ubcond->locked == LOCKED) sched_yield();
+00122   ubmutex->locked = UNLOCKED;
+00123   return(0x0);
+00124   }
+00125 
+00126 int ubthread_cond_signal(ubthread_cond_t *cond) {
+00127   ubthread_cond_t ubcond = *cond;
+00128   ubcond->locked = UNLOCKED;
+00129   return(0x0);
+00130   }
+00131 
+00132 /***
+00133  END
+00134  ***/
+00135 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ubthread_8c.html b/doc/html/ubthread_8c.html new file mode 100644 index 0000000..99ec5a3 --- /dev/null +++ b/doc/html/ubthread_8c.html @@ -0,0 +1,466 @@ + + +UbixOS V2: src/sys/kernel/ubthread.c File Reference + + + + +
+
+
+
+ +

ubthread.c File Reference

+

+#include <ubixos/ubthread.h>
+#include <ubixos/vitals.h>
+#include <ubixos/exec.h>
+#include <ubixos/sched.h>
+#include <ubixos/time.h>
+#include <ubixos/spinlock.h>
+#include <lib/kmalloc.h>
+#include <lib/kprintf.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Functions

int ubthread_cond_destroy (ubthread_cond_t *cond)
int ubthread_cond_init (ubthread_cond_t *cond, const uInt32 attr)
int ubthread_cond_signal (ubthread_cond_t *cond)
int ubthread_cond_timedwait (ubthread_cond_t *cond, ubthread_mutex_t *mutex, const struct timespec *abstime)
int ubthread_cond_wait (ubthread_cond_t *cond, ubthread_mutex_t *mutex)
int ubthread_create (kTask_t **thread, const uInt32 *attr, void(*tproc)(void), void *arg)
int ubthread_mutex_destroy (ubthread_mutex_t *mutex)
int ubthread_mutex_init (ubthread_mutex_t *mutex, const uInt32 attr)
int ubthread_mutex_lock (ubthread_mutex_t *mutex)
int ubthread_mutex_unlock (ubthread_mutex_t *mutex)
kTask_tubthread_self ()

Variables

ubthread_cond_listconds = 0x0
ubthread_mutex_listmutex = 0x0
+


Function Documentation

+ +
+
+ + + + + + + + + +
int ubthread_cond_destroy (ubthread_cond_t cond  ) 
+
+
+ +

+ +

+Definition at line 65 of file ubthread.c. +

+References kfree(). +

+Referenced by sys_sem_free_(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int ubthread_cond_init (ubthread_cond_t cond,
const uInt32  attr 
)
+
+
+ +

+ +

+Definition at line 49 of file ubthread.c. +

+References ubthread_cond::id, kmalloc(), ubthread_cond::locked, and UNLOCKED. +

+Referenced by sys_sem_new_(). +

+

+ +

+
+ + + + + + + + + +
int ubthread_cond_signal (ubthread_cond_t cond  ) 
+
+
+ +

+ +

+Definition at line 126 of file ubthread.c. +

+References ubthread_cond::locked, and UNLOCKED. +

+Referenced by sys_sem_signal(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int ubthread_cond_timedwait (ubthread_cond_t cond,
ubthread_mutex_t mutex,
const struct timespec abstime 
)
+
+
+ +

+ +

+Definition at line 106 of file ubthread.c. +

+References ubthread_mutex::locked, ubthread_cond::locked, mutex, sched_yield(), systemVitals, and UNLOCKED. +

+Referenced by cond_wait(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int ubthread_cond_wait (ubthread_cond_t cond,
ubthread_mutex_t mutex 
)
+
+
+ +

+ +

+Definition at line 118 of file ubthread.c. +

+References ubthread_mutex::locked, LOCKED, ubthread_cond::locked, mutex, sched_yield(), and UNLOCKED. +

+Referenced by cond_wait(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int ubthread_create (kTask_t **  thread,
const uInt32 attr,
void(*)(void)  tproc,
void *  arg 
)
+
+
+ +

+ +

+Definition at line 77 of file ubthread.c. +

+References execThread(), kmalloc(), and x2000. +

+Referenced by sys_thread_new(). +

+

+ +

+
+ + + + + + + + + +
int ubthread_mutex_destroy (ubthread_mutex_t mutex  ) 
+
+
+ +

+ +

+Definition at line 71 of file ubthread.c. +

+References kfree(), and mutex. +

+Referenced by sys_sem_free_(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int ubthread_mutex_init (ubthread_mutex_t mutex,
const uInt32  attr 
)
+
+
+ +

+ +

+Definition at line 57 of file ubthread.c. +

+References ubthread_mutex::id, kmalloc(), ubthread_mutex::locked, mutex, and UNLOCKED. +

+Referenced by sys_sem_new_(). +

+

+ +

+
+ + + + + + + + + +
int ubthread_mutex_lock (ubthread_mutex_t mutex  ) 
+
+
+ +

+ +

+Definition at line 82 of file ubthread.c. +

+References _current, taskStruct::id, kprintf(), LOCKED, ubthread_mutex::locked, mutex, and ubthread_mutex::pid. +

+Referenced by sys_arch_sem_wait(), and sys_sem_signal(). +

+

+ +

+
+ + + + + + + + + +
int ubthread_mutex_unlock (ubthread_mutex_t mutex  ) 
+
+
+ +

+ +

+Definition at line 93 of file ubthread.c. +

+References _current, taskStruct::id, ubthread_mutex::locked, mutex, ubthread_mutex::pid, and UNLOCKED. +

+Referenced by sys_arch_sem_wait(), and sys_sem_signal(). +

+

+ +

+
+ + + + + + + + +
kTask_t* ubthread_self (  ) 
+
+
+ +

+ +

+Definition at line 45 of file ubthread.c. +

+References _current. +

+Referenced by current_thread(). +

+

+


Variable Documentation

+ +
+
+ + + + +
struct ubthread_cond_list* conds = 0x0
+
+
+ +

+ +

+Definition at line 42 of file ubthread.c. +

+

+ +

+
+ + + + +
struct ubthread_mutex_list* mutex = 0x0
+
+ +

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ubthread_8h-source.html b/doc/html/ubthread_8h-source.html new file mode 100644 index 0000000..2fa5f7e --- /dev/null +++ b/doc/html/ubthread_8h-source.html @@ -0,0 +1,147 @@ + + +UbixOS V2: src/sys/include/ubixos/ubthread.h Source File + + + + +
+
+
+
+ +

ubthread.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _UBTHREAD_H
+00031 #define _UBTHREAD_H
+00032 
+00033 #include <ubixos/types.h>
+00034 #include <ubixos/sched.h>
+00035 #include <ubixos/time.h>
+00036 
+00037 #define ETIMEDOUT -1
+00038 
+00039 #define LOCKED     1
+00040 #define UNLOCKED   0
+00041 
+00042 typedef struct ubthread       *ubthread_t;
+00043 typedef struct ubthread_cond  *ubthread_cond_t;
+00044 typedef struct ubthread_mutex *ubthread_mutex_t;
+00045 
+00046 struct ubthread {
+00047   kTask_t *task;
+00048   };
+00049 
+00050 struct ubthread_cond {
+00051   int   id;
+00052   uInt8 locked;
+00053   };
+00054 
+00055 struct ubthread_mutex {
+00056   int     id;
+00057   uInt8   locked;
+00058   pidType pid;
+00059   };
+00060 
+00061 struct ubthread_list {
+00062   struct ubthread_list *next;
+00063   ubthread_t           thread;
+00064   };
+00065 
+00066 struct ubthread_cond_list {
+00067   struct ubthread_cond_list *next;
+00068   ubthread_cond_t           *cond;
+00069   };
+00070 
+00071 struct ubthread_mutex_list {
+00072   struct ubthread_mutex_list *next;
+00073   ubthread_mutex_t           *mutex;
+00074   };
+00075 
+00076 
+00077 kTask_t *ubthread_self();
+00078 int ubthread_cond_init(ubthread_cond_t *cond,const uInt32 attr);
+00079 int ubthread_mutex_init(ubthread_mutex_t *mutex,const uInt32 attr);
+00080 int ubthread_cond_destroy(ubthread_cond_t *cond);
+00081 int ubthread_mutex_destroy(ubthread_mutex_t *mutex);
+00082 int ubthread_create(kTask_t **thread,const uInt32 *attr,void (* tproc)(void), void *arg);
+00083 int ubthread_mutex_lock(ubthread_mutex_t *mutex);
+00084 int ubthread_mutex_unlock(ubthread_mutex_t *mutex);
+00085 int ubthread_cond_timedwait(ubthread_cond_t *cond, ubthread_mutex_t *mutex, const struct timespec *abstime);
+00086 int ubthread_cond_wait(ubthread_cond_t *cond, ubthread_mutex_t *mutex);
+00087 int ubthread_cond_signal(ubthread_cond_t *cond);
+00088 
+00089 #endif
+00090 
+00091 /***
+00092  $Log$
+00093  Revision 1.1.1.1  2006/06/01 12:46:14  reddawg
+00094  ubix2
+00095 
+00096  Revision 1.2  2005/10/12 00:13:37  reddawg
+00097  Removed
+00098 
+00099  Revision 1.1.1.1  2005/09/26 17:23:57  reddawg
+00100  no message
+00101 
+00102  Revision 1.3  2004/09/07 20:58:35  reddawg
+00103  time to roll back i can't think straight by friday
+00104 
+00105  Revision 1.2  2004/05/21 15:20:00  reddawg
+00106  Cleaned up
+00107 
+00108 
+00109  END
+00110  ***/
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ubthread_8h.html b/doc/html/ubthread_8h.html new file mode 100644 index 0000000..2913b12 --- /dev/null +++ b/doc/html/ubthread_8h.html @@ -0,0 +1,556 @@ + + +UbixOS V2: src/sys/include/ubixos/ubthread.h File Reference + + + + +
+
+
+
+ +

ubthread.h File Reference

+

+#include <ubixos/types.h>
+#include <ubixos/sched.h>
+#include <ubixos/time.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  ubthread
struct  ubthread_cond
struct  ubthread_cond_list
struct  ubthread_list
struct  ubthread_mutex
struct  ubthread_mutex_list

Defines

#define ETIMEDOUT   -1
#define LOCKED   1
#define UNLOCKED   0

Typedefs

typedef ubthread_condubthread_cond_t
typedef ubthread_mutexubthread_mutex_t
typedef ubthreadubthread_t

Functions

int ubthread_cond_destroy (ubthread_cond_t *cond)
int ubthread_cond_init (ubthread_cond_t *cond, const uInt32 attr)
int ubthread_cond_signal (ubthread_cond_t *cond)
int ubthread_cond_timedwait (ubthread_cond_t *cond, ubthread_mutex_t *mutex, const struct timespec *abstime)
int ubthread_cond_wait (ubthread_cond_t *cond, ubthread_mutex_t *mutex)
int ubthread_create (kTask_t **thread, const uInt32 *attr, void(*tproc)(void), void *arg)
int ubthread_mutex_destroy (ubthread_mutex_t *mutex)
int ubthread_mutex_init (ubthread_mutex_t *mutex, const uInt32 attr)
int ubthread_mutex_lock (ubthread_mutex_t *mutex)
int ubthread_mutex_unlock (ubthread_mutex_t *mutex)
kTask_tubthread_self ()
+


Define Documentation

+ +
+
+ + + + +
#define ETIMEDOUT   -1
+
+
+ +

+ +

+Definition at line 37 of file ubthread.h. +

+Referenced by cond_wait(). +

+

+ +

+
+ + + + +
#define LOCKED   1
+
+
+ +

+ +

+Definition at line 39 of file ubthread.h. +

+Referenced by ubthread_cond_wait(), and ubthread_mutex_lock(). +

+

+ +

+
+ + + + +
#define UNLOCKED   0
+
+ +

+


Typedef Documentation

+ +
+
+ + + + +
typedef struct ubthread_cond* ubthread_cond_t
+
+
+ +

+ +

+Definition at line 43 of file ubthread.h. +

+

+ +

+
+ + + + +
typedef struct ubthread_mutex* ubthread_mutex_t
+
+
+ +

+ +

+Definition at line 44 of file ubthread.h. +

+

+ +

+
+ + + + +
typedef struct ubthread* ubthread_t
+
+
+ +

+ +

+Definition at line 42 of file ubthread.h. +

+

+


Function Documentation

+ +
+
+ + + + + + + + + +
int ubthread_cond_destroy (ubthread_cond_t cond  ) 
+
+
+ +

+ +

+Definition at line 65 of file ubthread.c. +

+References kfree(). +

+Referenced by sys_sem_free_(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int ubthread_cond_init (ubthread_cond_t cond,
const uInt32  attr 
)
+
+
+ +

+ +

+Definition at line 49 of file ubthread.c. +

+References ubthread_cond::id, kmalloc(), ubthread_cond::locked, and UNLOCKED. +

+Referenced by sys_sem_new_(). +

+

+ +

+
+ + + + + + + + + +
int ubthread_cond_signal (ubthread_cond_t cond  ) 
+
+
+ +

+ +

+Definition at line 126 of file ubthread.c. +

+References ubthread_cond::locked, and UNLOCKED. +

+Referenced by sys_sem_signal(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int ubthread_cond_timedwait (ubthread_cond_t cond,
ubthread_mutex_t mutex,
const struct timespec abstime 
)
+
+
+ +

+ +

+Definition at line 106 of file ubthread.c. +

+References ubthread_cond::locked, ubthread_mutex::locked, mutex, sched_yield(), systemVitals, and UNLOCKED. +

+Referenced by cond_wait(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int ubthread_cond_wait (ubthread_cond_t cond,
ubthread_mutex_t mutex 
)
+
+
+ +

+ +

+Definition at line 118 of file ubthread.c. +

+References ubthread_cond::locked, LOCKED, ubthread_mutex::locked, mutex, sched_yield(), and UNLOCKED. +

+Referenced by cond_wait(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int ubthread_create (kTask_t **  thread,
const uInt32 attr,
void(*)(void)  tproc,
void *  arg 
)
+
+
+ +

+ +

+Definition at line 77 of file ubthread.c. +

+References execThread(), kmalloc(), and x2000. +

+Referenced by sys_thread_new(). +

+

+ +

+
+ + + + + + + + + +
int ubthread_mutex_destroy (ubthread_mutex_t mutex  ) 
+
+
+ +

+ +

+Definition at line 71 of file ubthread.c. +

+References kfree(), and mutex. +

+Referenced by sys_sem_free_(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int ubthread_mutex_init (ubthread_mutex_t mutex,
const uInt32  attr 
)
+
+
+ +

+ +

+Definition at line 57 of file ubthread.c. +

+References ubthread_mutex::id, kmalloc(), ubthread_mutex::locked, mutex, and UNLOCKED. +

+Referenced by sys_sem_new_(). +

+

+ +

+
+ + + + + + + + + +
int ubthread_mutex_lock (ubthread_mutex_t mutex  ) 
+
+
+ +

+ +

+Definition at line 82 of file ubthread.c. +

+References _current, taskStruct::id, kprintf(), ubthread_mutex::locked, LOCKED, mutex, and ubthread_mutex::pid. +

+Referenced by sys_arch_sem_wait(), and sys_sem_signal(). +

+

+ +

+
+ + + + + + + + + +
int ubthread_mutex_unlock (ubthread_mutex_t mutex  ) 
+
+
+ +

+ +

+Definition at line 93 of file ubthread.c. +

+References _current, taskStruct::id, ubthread_mutex::locked, mutex, ubthread_mutex::pid, and UNLOCKED. +

+Referenced by sys_arch_sem_wait(), and sys_sem_signal(). +

+

+ +

+
+ + + + + + + + +
kTask_t* ubthread_self (  ) 
+
+
+ +

+ +

+Definition at line 45 of file ubthread.c. +

+References _current. +

+Referenced by current_thread(). +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/udp_8h-source.html b/doc/html/udp_8h-source.html new file mode 100644 index 0000000..415a9a9 --- /dev/null +++ b/doc/html/udp_8h-source.html @@ -0,0 +1,139 @@ + + +UbixOS V2: src/sys/include/net/udp.h Source File + + + + +
+
+
+
+ +

udp.h

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 #ifndef __LWIP_UDP_H__
+00036 #define __LWIP_UDP_H__
+00037 
+00038 #include "net/arch.h"
+00039 
+00040 #include "net/pbuf.h"
+00041 //UBU 
+00042 #include "net/ipv4/inet.h"
+00043 //UBU
+00044 #include "net/ipv4/ip.h"
+00045 
+00046 #include "net/err.h"
+00047 
+00048 #define UDP_HLEN 8
+00049 
+00050 struct udp_hdr {
+00051   PACK_STRUCT_FIELD(uInt16 src);
+00052   PACK_STRUCT_FIELD(uInt16 dest);  /* src/dest UDP ports */
+00053   PACK_STRUCT_FIELD(uInt16 len);
+00054   PACK_STRUCT_FIELD(uInt16 chksum);
+00055 } PACK_STRUCT_STRUCT;
+00056 
+00057 #define UDP_FLAGS_NOCHKSUM 0x01
+00058 #define UDP_FLAGS_UDPLITE  0x02
+00059 
+00060 struct udp_pcb {
+00061   struct udp_pcb *next;
+00062 
+00063   struct ip_addr local_ip, remote_ip;
+00064   uInt16 local_port, remote_port;
+00065   
+00066   uInt8 flags;
+00067   uInt16 chksum_len;
+00068   
+00069   void (* recv)(void *arg, struct udp_pcb *pcb, struct pbuf *p,
+00070                 struct ip_addr *addr, uInt16 port);
+00071   void *recv_arg;  
+00072 };
+00073 
+00074 /* The following functions is the application layer interface to the
+00075    UDP code. */
+00076 struct udp_pcb * udp_new        (void);
+00077 void             udp_remove     (struct udp_pcb *pcb);
+00078 err_t            udp_bind       (struct udp_pcb *pcb, struct ip_addr *ipaddr,
+00079                                  uInt16 port);
+00080 err_t            udp_connect    (struct udp_pcb *pcb, struct ip_addr *ipaddr,
+00081                                  uInt16 port);
+00082 void             udp_recv       (struct udp_pcb *pcb,
+00083                                  void (* recv)(void *arg, struct udp_pcb *upcb,
+00084                                                struct pbuf *p,
+00085                                                struct ip_addr *addr,
+00086                                                uInt16 port),
+00087                                  void *recv_arg);
+00088 err_t            udp_send       (struct udp_pcb *pcb, struct pbuf *p);
+00089 
+00090 #define          udp_flags(pcb)  ((pcb)->flags)
+00091 #define          udp_setflags(pcb, f)  ((pcb)->flags = (f))
+00092 
+00093 
+00094 /* The following functions is the lower layer interface to UDP. */
+00095 uInt8             udp_lookup     (struct ip_hdr *iphdr, struct netif *inp);
+00096 void             udp_input      (struct pbuf *p, struct netif *inp);
+00097 void             udp_init       (void);
+00098 
+00099 
+00100 #endif /* __LWIP_UDP_H__ */
+00101 
+00102 
+

Generated on Sun Dec 3 02:38:02 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/udp_8h.html b/doc/html/udp_8h.html new file mode 100644 index 0000000..7c053bb --- /dev/null +++ b/doc/html/udp_8h.html @@ -0,0 +1,475 @@ + + +UbixOS V2: src/sys/include/net/udp.h File Reference + + + + +
+
+
+
+ +

udp.h File Reference

+

+#include "net/arch.h"
+#include "net/pbuf.h"
+#include "net/ipv4/inet.h"
+#include "net/ipv4/ip.h"
+#include "net/err.h"
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  udp_hdr
struct  udp_pcb

Defines

#define udp_flags(pcb)   ((pcb)->flags)
#define UDP_FLAGS_NOCHKSUM   0x01
#define UDP_FLAGS_UDPLITE   0x02
#define UDP_HLEN   8
#define udp_setflags(pcb, f)   ((pcb)->flags = (f))

Functions

err_t udp_bind (struct udp_pcb *pcb, struct ip_addr *ipaddr, uInt16 port)
err_t udp_connect (struct udp_pcb *pcb, struct ip_addr *ipaddr, uInt16 port)
void udp_init (void)
void udp_input (struct pbuf *p, struct netif *inp)
uInt8 udp_lookup (struct ip_hdr *iphdr, struct netif *inp)
udp_pcbudp_new (void)
void udp_recv (struct udp_pcb *pcb, void(*recv)(void *arg, struct udp_pcb *upcb, struct pbuf *p, struct ip_addr *addr, uInt16 port), void *recv_arg)
void udp_remove (struct udp_pcb *pcb)
err_t udp_send (struct udp_pcb *pcb, struct pbuf *p)

Variables

udp_hdr PACK_STRUCT_STRUCT
+


Define Documentation

+ +
+
+ + + + + + + + + +
#define udp_flags (pcb   )    ((pcb)->flags)
+
+
+ +

+ +

+Definition at line 90 of file udp.h. +

+

+ +

+
+ + + + +
#define UDP_FLAGS_NOCHKSUM   0x01
+
+
+ +

+ +

+Definition at line 57 of file udp.h. +

+Referenced by do_bind(), and do_connect(). +

+

+ +

+
+ + + + +
#define UDP_FLAGS_UDPLITE   0x02
+
+
+ +

+ +

+Definition at line 58 of file udp.h. +

+Referenced by do_bind(), and do_connect(). +

+

+ +

+
+ + + + +
#define UDP_HLEN   8
+
+
+ +

+ +

+Definition at line 48 of file udp.h. +

+

+ +

+
+ + + + + + + + + + + + +
#define udp_setflags (pcb,
 )    ((pcb)->flags = (f))
+
+
+ +

+ +

+Definition at line 91 of file udp.h. +

+Referenced by do_bind(), and do_connect(). +

+

+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
err_t udp_bind (struct udp_pcb pcb,
struct ip_addr ipaddr,
uInt16  port 
)
+
+
+ +

+ +

+Referenced by do_bind(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
err_t udp_connect (struct udp_pcb pcb,
struct ip_addr ipaddr,
uInt16  port 
)
+
+
+ +

+ +

+Referenced by do_connect(). +

+

+ +

+
+ + + + + + + + + +
void udp_init (void   ) 
+
+
+ +

+ +

+Referenced by tcpip_thread(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void udp_input (struct pbuf p,
struct netif inp 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
uInt8 udp_lookup (struct ip_hdr iphdr,
struct netif inp 
)
+
+
+ +

+ +

+

+ +

+
+ + + + + + + + + +
struct udp_pcb* udp_new (void   ) 
+
+
+ +

+ +

+Referenced by do_bind(), and do_connect(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void udp_recv (struct udp_pcb pcb,
void(*)(void *arg, struct udp_pcb *upcb, struct pbuf *p, struct ip_addr *addr, uInt16 port)  recv,
void *  recv_arg 
)
+
+
+ +

+ +

+Referenced by do_bind(), and do_connect(). +

+

+ +

+
+ + + + + + + + + +
void udp_remove (struct udp_pcb pcb  ) 
+
+
+ +

+ +

+Referenced by do_delconn(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
err_t udp_send (struct udp_pcb pcb,
struct pbuf p 
)
+
+
+ +

+ +

+Referenced by do_send(). +

+

+


Variable Documentation

+ +
+
+ + + + +
struct udp_hdr PACK_STRUCT_STRUCT
+
+
+ +

+ +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/udpecho_8c-source.html b/doc/html/udpecho_8c-source.html new file mode 100644 index 0000000..a3417f3 --- /dev/null +++ b/doc/html/udpecho_8c-source.html @@ -0,0 +1,118 @@ + + +UbixOS V2: src/sys/net/net/udpecho.c Source File + + + + +
+
+
+
+ +

udpecho.c

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 
+00036 #include <ubixos/types.h>
+00037 #include <lib/kprintf.h>
+00038 
+00039 #include "net/api.h"
+00040 #include "net/sys.h"
+00041 
+00042 /*-----------------------------------------------------------------------------------*/
+00043 void 
+00044 udpecho_thread(void *arg)
+00045 {
+00046   static struct netconn *conn;
+00047   static struct netbuf *buf;
+00048   static struct ip_addr *addr;
+00049   static unsigned short port;
+00050   char buffer[4096];
+00051   
+00052   kprintf("1");
+00053   conn = netconn_new(NETCONN_UDP);
+00054   kprintf("2");
+00055   netconn_bind(conn, NULL, 7);
+00056   kprintf("3");
+00057 
+00058   while(1) {
+00059     kprintf("a");
+00060     buf = netconn_recv(conn);
+00061     kprintf("b");
+00062     addr = netbuf_fromaddr(buf);
+00063     kprintf("c");
+00064     port = netbuf_fromport(buf);
+00065     kprintf("d");
+00066     netconn_connect(conn, addr, port);
+00067     kprintf("e");
+00068     netconn_send(conn, buf);
+00069     kprintf("f");
+00070     netbuf_copy(buf, buffer, sizeof(buffer));
+00071     kprintf("got %s\n", buffer);
+00072     netbuf_delete(buf);
+00073     kprintf("g");
+00074   }
+00075 }
+00076 /*-----------------------------------------------------------------------------------*/
+00077 void
+00078 udpecho_init(void)
+00079 {
+00080   sys_thread_new(udpecho_thread, NULL);
+00081 }
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/udpecho_8c.html b/doc/html/udpecho_8c.html new file mode 100644 index 0000000..9434b9d --- /dev/null +++ b/doc/html/udpecho_8c.html @@ -0,0 +1,104 @@ + + +UbixOS V2: src/sys/net/net/udpecho.c File Reference + + + + +
+
+
+
+ +

udpecho.c File Reference

+

+#include <ubixos/types.h>
+#include <lib/kprintf.h>
+#include "net/api.h"
+#include "net/sys.h"
+ +

+Go to the source code of this file. + + + + + + +

Functions

void udpecho_init (void)
void udpecho_thread (void *arg)
+


Function Documentation

+ +
+
+ + + + + + + + + +
void udpecho_init (void   ) 
+
+
+ +

+ +

+Definition at line 78 of file udpecho.c. +

+References NULL, sys_thread_new(), and udpecho_thread(). +

+

+ +

+
+ + + + + + + + + +
void udpecho_thread (void *  arg  ) 
+
+ +

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/udpecho_8h-source.html b/doc/html/udpecho_8h-source.html new file mode 100644 index 0000000..fb06e26 --- /dev/null +++ b/doc/html/udpecho_8h-source.html @@ -0,0 +1,77 @@ + + +UbixOS V2: src/sys/net/net/udpecho.h Source File + + + + +
+
+
+
+ +

udpecho.h

Go to the documentation of this file.
00001 /*
+00002  * Copyright (c) 2001, Swedish Institute of Computer Science.
+00003  * All rights reserved. 
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without 
+00006  * modification, are permitted provided that the following conditions 
+00007  * are met: 
+00008  * 1. Redistributions of source code must retain the above copyright 
+00009  *    notice, this list of conditions and the following disclaimer. 
+00010  * 2. Redistributions in binary form must reproduce the above copyright 
+00011  *    notice, this list of conditions and the following disclaimer in the 
+00012  *    documentation and/or other materials provided with the distribution. 
+00013  * 3. Neither the name of the Institute nor the names of its contributors 
+00014  *    may be used to endorse or promote products derived from this software 
+00015  *    without specific prior written permission. 
+00016  *
+00017  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
+00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
+00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
+00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
+00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
+00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
+00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
+00027  * SUCH DAMAGE. 
+00028  *
+00029  * This file is part of the lwIP TCP/IP stack.
+00030  * 
+00031  * Author: Adam Dunkels <adam@sics.se>
+00032  *
+00033  * $Id$
+00034  */
+00035 #ifndef __UDPECHO_H__
+00036 #define __UDPECHO_H__
+00037 
+00038 void udpecho_init(void);
+00039 
+00040 #endif /* __UDPECHO_H__ */
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/udpecho_8h.html b/doc/html/udpecho_8h.html new file mode 100644 index 0000000..7242167 --- /dev/null +++ b/doc/html/udpecho_8h.html @@ -0,0 +1,72 @@ + + +UbixOS V2: src/sys/net/net/udpecho.h File Reference + + + + +
+
+
+
+ +

udpecho.h File Reference

+

+ +

+Go to the source code of this file. + + + + +

Functions

void udpecho_init (void)
+


Function Documentation

+ +
+
+ + + + + + + + + +
void udpecho_init (void   ) 
+
+
+ +

+ +

+Definition at line 78 of file udpecho.c. +

+References NULL, sys_thread_new(), and udpecho_thread(). +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ufs_8c-source.html b/doc/html/ufs_8c-source.html new file mode 100644 index 0000000..2ed4592 --- /dev/null +++ b/doc/html/ufs_8c-source.html @@ -0,0 +1,373 @@ + + +UbixOS V2: src/sys/ufs/ufs.c Source File + + + + +
+
+
+
+ +

ufs.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <vfs/vfs.h>
+00031 #include <ufs/ufs.h>
+00032 #include <ufs/ffs.h>
+00033 #include <lib/kprintf.h>
+00034 #include <lib/kmalloc.h>
+00035 #include <ubixos/kpanic.h>
+00036 #include <lib/string.h>
+00037 
+00038 #define VBLKSHIFT       12
+00039 #define VBLKSIZE        (1 << VBLKSHIFT)
+00040 #define VBLKMASK        (VBLKSIZE - 1)
+00041 #define DBPERVBLK       (VBLKSIZE / DEV_BSIZE)
+00042 #define INDIRPERVBLK(fs) (NINDIR(fs) / ((fs)->fs_bsize >> VBLKSHIFT))
+00043 #define IPERVBLK(fs)    (INOPB(fs) / ((fs)->fs_bsize >> VBLKSHIFT))
+00044 #define       INOPB(fs)       ((fs)->fs_inopb)
+00045 #define INO_TO_VBA(fs, ipervblk, x) \
+00046     (fsbtodb(fs, cgimin(fs, ino_to_cg(fs, x))) + \
+00047     (((x) % (fs)->fs_ipg) / (ipervblk) * DBPERVBLK))
+00048 #define INO_TO_VBO(ipervblk, x) ((x) % ipervblk)
+00049 
+00050 
+00051 static int dskread(void *buf, u_int64_t block,size_t count,fileDescriptor *fd) {
+00052   fd->mp->device->devInfo->read(fd->mp->device->devInfo->info,buf,block,count);
+00053   return(0x0);
+00054   }
+00055 
+00056 //struct dmadat {
+00057 //  char blkbuf[VBLKSIZE];  /* filesystem blocks */
+00058 //  char indbuf[VBLKSIZE];  /* indir blocks */
+00059 //  char sbbuf[SBLOCKSIZE]; /* superblock */
+00060 //  char secbuf[DEV_BSIZE]; /* for MBR/disklabel */
+00061 //  };
+00062 //static struct dmadat *dmadat;
+00063 
+00064 //static int ls,dsk_meta;
+00065 
+00066 static int sblock_try[] = SBLOCKSEARCH;
+00067 
+00068 #if defined(UFS2_ONLY)
+00069 #define DIP(field) dp2.field
+00070 #elif defined(UFS1_ONLY)
+00071 #define DIP(field) dp1.field
+00072 #else
+00073 #define DIP(field) fs->fs_magic == FS_UFS1_MAGIC ? dp1.field : dp2.field
+00074 #endif
+00075 
+00076 
+00077 static ssize_t fsread(ino_t inode, void *buf, size_t nbyte,fileDescriptor *fd) {
+00078 #ifndef UFS2_ONLY
+00079         static struct ufs1_dinode dp1;
+00080 #endif
+00081 #ifndef UFS1_ONLY
+00082         static struct ufs2_dinode dp2;
+00083 #endif
+00084         static ino_t inomap;
+00085         char *blkbuf;
+00086         void *indbuf;
+00087         struct fs *fs;
+00088         char *s;
+00089         size_t n, nb, size, off, vboff;
+00090         ufs_lbn_t lbn;
+00091         ufs2_daddr_t addr, vbaddr;
+00092         static ufs2_daddr_t blkmap, indmap;
+00093         u_int u;
+00094 
+00095         blkbuf = fd->dmadat->blkbuf;
+00096         indbuf = fd->dmadat->indbuf;
+00097         fs = (struct fs *)fd->dmadat->sbbuf;
+00098         if (!fd->dsk_meta) {
+00099                 inomap = 0;
+00100                 for (n = 0; sblock_try[n] != -1; n++) {
+00101                         if (dskread(fs, sblock_try[n] / DEV_BSIZE, 16,fd))
+00102                                 return -1;
+00103                         if ((
+00104 #if defined(UFS1_ONLY)
+00105                              fs->fs_magic == FS_UFS1_MAGIC
+00106 #elif defined(UFS2_ONLY)
+00107                             (fs->fs_magic == FS_UFS2_MAGIC &&
+00108                             fs->fs_sblockloc == sblock_try[n])
+00109 #else
+00110                              fs->fs_magic == FS_UFS1_MAGIC ||
+00111                             (fs->fs_magic == FS_UFS2_MAGIC &&
+00112                             fs->fs_sblockloc == sblock_try[n])
+00113 #endif
+00114                             ) &&
+00115                             fs->fs_bsize <= MAXBSIZE &&
+00116                             fs->fs_bsize >= sizeof(struct fs))
+00117                                 break;
+00118                 }
+00119                 if (sblock_try[n] == -1) {
+00120                         kprintf("Not ufs\n");
+00121                         return -1;
+00122                 }
+00123                 fd->dsk_meta++;
+00124         }
+00125         if (!inode)
+00126                 return 0;
+00127         if (inomap != inode) {
+00128                 n = IPERVBLK(fs);
+00129                 if (dskread(blkbuf, INO_TO_VBA(fs, n, inode), DBPERVBLK,fd))
+00130                         return -1;
+00131                 n = INO_TO_VBO(n, inode);
+00132 #if defined(UFS1_ONLY)
+00133                 dp1 = ((struct ufs1_dinode *)blkbuf)[n];
+00134 #elif defined(UFS2_ONLY)
+00135                 dp2 = ((struct ufs2_dinode *)blkbuf)[n];
+00136 #else
+00137                 if (fs->fs_magic == FS_UFS1_MAGIC)
+00138                         dp1 = ((struct ufs1_dinode *)blkbuf)[n];
+00139                 else
+00140                         dp2 = ((struct ufs2_dinode *)blkbuf)[n];
+00141 #endif
+00142                 inomap = inode;
+00143                 fd->offset = 0;
+00144                 blkmap = indmap = 0;
+00145         }
+00146         s = buf;
+00147         size = DIP(di_size);
+00148         fd->size = size;
+00149         //kprintf("Size: [%i]\n",size);
+00150         n = size - fd->offset;
+00151         if (nbyte > n)
+00152                 nbyte = n;
+00153         nb = nbyte;
+00154         while (nb) {
+00155                 lbn = lblkno(fs, fd->offset);
+00156                 off = blkoff(fs, fd->offset);
+00157                 if (lbn < NDADDR) {
+00158                         addr = DIP(di_db[lbn]);
+00159                 } else if (lbn < NDADDR + NINDIR(fs)) {
+00160                         n = INDIRPERVBLK(fs);
+00161                         addr = DIP(di_ib[0]);
+00162                         u = (u_int)(lbn - NDADDR) / (n * DBPERVBLK);
+00163                         vbaddr = fsbtodb(fs, addr) + u;
+00164                         if (indmap != vbaddr) {
+00165                                 if (dskread(indbuf, vbaddr, DBPERVBLK,fd))
+00166                                         return -1;
+00167                                 indmap = vbaddr;
+00168                         }
+00169                         n = (lbn - NDADDR) & (n - 1);
+00170 #if defined(UFS1_ONLY)
+00171                         addr = ((ufs1_daddr_t *)indbuf)[n];
+00172 #elif defined(UFS2_ONLY)
+00173                         addr = ((ufs2_daddr_t *)indbuf)[n];
+00174 #else
+00175                         if (fs->fs_magic == FS_UFS1_MAGIC)
+00176                                 addr = ((ufs1_daddr_t *)indbuf)[n];
+00177                         else
+00178                                 addr = ((ufs2_daddr_t *)indbuf)[n];
+00179 #endif
+00180                 } else {
+00181                         return -1;
+00182                 }
+00183                 vbaddr = fsbtodb(fs, addr) + (off >> VBLKSHIFT) * DBPERVBLK;
+00184                 vboff = off & VBLKMASK;
+00185                 n = sblksize(fs, size, lbn) - (off & ~VBLKMASK);
+00186                 if (n > VBLKSIZE)
+00187                         n = VBLKSIZE;
+00188                 if (blkmap != vbaddr) {
+00189                         if (dskread(blkbuf, vbaddr, n >> DEV_BSHIFT,fd))
+00190                                 return -1;
+00191                         blkmap = vbaddr;
+00192                 }
+00193                 n -= vboff;
+00194                 if (n > nb)
+00195                         n = nb;
+00196                 memcpy(s, blkbuf + vboff, n);
+00197                 s += n;
+00198                 fd->offset += n;
+00199                 nb -= n;
+00200         }
+00201         return nbyte;
+00202 }
+00203 
+00204 
+00205 
+00206 
+00207 static __inline int fsfind(const char *name, ino_t * ino,fileDescriptor *fd) {
+00208   char buf[DEV_BSIZE];
+00209   struct dirent *d;
+00210   char *s;
+00211   ssize_t n;
+00212 
+00213   fd->offset = 0;
+00214   while ((n = fsread(*ino, buf, DEV_BSIZE,fd)) > 0)
+00215     for (s = buf; s < buf + DEV_BSIZE;) {
+00216       d = (void *)s;
+00217       if (!strcmp(name, d->d_name)) {
+00218         *ino = d->d_fileno;
+00219         return d->d_type;
+00220         }
+00221       s += d->d_reclen;
+00222       }
+00223     //if (n != -1 && ls)
+00224     //kprintf("\n");
+00225     return 0;
+00226     }
+00227 
+00228 
+00229 static ino_t lookup(const char *path,fileDescriptor *fd) {
+00230   char name[MAXNAMLEN + 1];
+00231         const char *s;
+00232         ino_t ino;
+00233         ssize_t n;
+00234         int dt;
+00235 
+00236         ino = ROOTINO;
+00237         dt = DT_DIR;
+00238         name[0] = '/';
+00239         name[1] = '\0';
+00240         for (;;) {
+00241                 if (*path == '/')
+00242                         path++;
+00243                 if (!*path)
+00244                         break;
+00245                 for (s = path; *s && *s != '/'; s++);
+00246                 if ((n = s - path) > MAXNAMLEN)
+00247                         return 0;
+00248                 //ls = *path == '?' && n == 1 && !*s;
+00249                 memcpy(name, path, n);
+00250                 name[n] = 0;
+00251                 if (dt != DT_DIR) {
+00252                         kprintf("%s: not a directory.\n", name);
+00253                         return (0);
+00254                 }
+00255                 if ((dt = fsfind(name, &ino,fd)) <= 0)
+00256                         break;
+00257                 path = s;
+00258         }
+00259 
+00260 
+00261   return dt == DT_REG ? ino : 0;
+00262   }
+00263 
+00264 
+00265 static int ufs_openFile(const char *file, fileDescriptor *fd) {
+00266   char tmp[2];
+00267   int ino = 0;
+00268   fd->dmadat = (struct dmadat *)kmalloc(sizeof(struct dmadat));
+00269   ino = lookup(file,fd);
+00270   fd->offset = 0x0;
+00271   fd->ino = ino;
+00272   if (ino == 0x0) {
+00273     return(-1);
+00274     }
+00275 
+00276   /* Quick Hack for file size */
+00277   fsread(fd->ino,&tmp,1,fd);
+00278   fd->offset = 0;
+00279   /* Return */
+00280   fd->perms = 0x1;
+00281   return(0x1);
+00282   }
+00283 
+00284 int ufs_readFile(fileDescriptor *fd,char *data,uInt32 offset,long size) {
+00285   fsread(fd->ino,data,size,fd);
+00286   return(0x0);
+00287   }
+00288 
+00289 int ufs_writeFile(fileDescriptor *fd, char *data,uInt32 offset,long size) {
+00290   kprintf("Writing :)\n");
+00291   return(0x0);
+00292   }
+00293 
+00294 /*****************************************************************************************
+00295 
+00296 Function: int ufs_initialize()
+00297 
+00298 Description: This will initialize a mount point it loads the BAT and Caches the rootDir
+00299 
+00300 Notes:
+00301 
+00302 *****************************************************************************************/
+00303 int ufs_initialize(vfs_mountPoint_t *mp) {
+00304   /* Return */
+00305   return(0x1);
+00306   }
+00307 
+00308 int ufs_init() {
+00309   /* Build our ufs struct */
+00310   struct fileSystem ufs =
+00311    {NULL,                         /* prev        */
+00312     NULL,                         /* next        */
+00313     (void *)ufs_initialize,       /* vfsInitFS   */
+00314     (void *)ufs_readFile,         /* vfsRead     */
+00315     (void *)ufs_writeFile,        /* vfsWrite    */
+00316     (void *)ufs_openFile,         /* vfsOpenFile */
+00317     NULL,                         /* vfsUnlink   */
+00318     NULL,                         /* vfsMakeDir  */
+00319     NULL,                         /* vfsRemDir   */
+00320     NULL,                         /* vfsSync     */
+00321     0xAA,                         /* vfsType     */
+00322    }; /* UFS */
+00323 
+00324   if (vfsRegisterFS(ufs) != 0x0) {
+00325     kpanic("Unable To Enable UFS");
+00326     return(0x1);
+00327     }
+00328    //dmadat = (struct dmadat *)kmalloc(sizeof(struct dmadat)); 
+00329   /* Return */
+00330   return(0x0);
+00331   }
+00332 
+00333 /***
+00334  END
+00335  ***/
+00336 
+

Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ufs_8c.html b/doc/html/ufs_8c.html new file mode 100644 index 0000000..ff8b175 --- /dev/null +++ b/doc/html/ufs_8c.html @@ -0,0 +1,685 @@ + + +UbixOS V2: src/sys/ufs/ufs.c File Reference + + + + +
+
+
+
+ +

ufs.c File Reference

+

+#include <vfs/vfs.h>
+#include <ufs/ufs.h>
+#include <ufs/ffs.h>
+#include <lib/kprintf.h>
+#include <lib/kmalloc.h>
+#include <ubixos/kpanic.h>
+#include <lib/string.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Defines

#define DBPERVBLK   (VBLKSIZE / DEV_BSIZE)
#define DIP(field)   fs->fs_magic == FS_UFS1_MAGIC ? dp1.field : dp2.field
#define INDIRPERVBLK(fs)   (NINDIR(fs) / ((fs)->fs_bsize >> VBLKSHIFT))
#define INO_TO_VBA(fs, ipervblk, x)
#define INO_TO_VBO(ipervblk, x)   ((x) % ipervblk)
#define INOPB(fs)   ((fs)->fs_inopb)
#define IPERVBLK(fs)   (INOPB(fs) / ((fs)->fs_bsize >> VBLKSHIFT))
#define VBLKMASK   (VBLKSIZE - 1)
#define VBLKSHIFT   12
#define VBLKSIZE   (1 << VBLKSHIFT)

Functions

static int dskread (void *buf, u_int64_t block, size_t count, fileDescriptor *fd)
static __inline int fsfind (const char *name, ino_t *ino, fileDescriptor *fd)
static ssize_t fsread (ino_t inode, void *buf, size_t nbyte, fileDescriptor *fd)
static ino_t lookup (const char *path, fileDescriptor *fd)
int ufs_init ()
int ufs_initialize (vfs_mountPoint_t *mp)
static int ufs_openFile (const char *file, fileDescriptor *fd)
int ufs_readFile (fileDescriptor *fd, char *data, uInt32 offset, long size)
int ufs_writeFile (fileDescriptor *fd, char *data, uInt32 offset, long size)

Variables

static int sblock_try [] = SBLOCKSEARCH
+


Define Documentation

+ +
+
+ + + + +
#define DBPERVBLK   (VBLKSIZE / DEV_BSIZE)
+
+
+ +

+ +

+Definition at line 41 of file ufs.c. +

+Referenced by fsread(). +

+

+ +

+
+ + + + + + + + + +
#define DIP (field   )    fs->fs_magic == FS_UFS1_MAGIC ? dp1.field : dp2.field
+
+
+ +

+ +

+Definition at line 73 of file ufs.c. +

+Referenced by fsread(). +

+

+ +

+
+ + + + + + + + + +
#define INDIRPERVBLK (fs   )    (NINDIR(fs) / ((fs)->fs_bsize >> VBLKSHIFT))
+
+
+ +

+ +

+Definition at line 42 of file ufs.c. +

+Referenced by fsread(). +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define INO_TO_VBA (fs,
ipervblk,
 ) 
+
+
+ +

+Value:

(fsbtodb(fs, cgimin(fs, ino_to_cg(fs, x))) + \
+    (((x) % (fs)->fs_ipg) / (ipervblk) * DBPERVBLK))
+
+

+Definition at line 45 of file ufs.c. +

+Referenced by fsread(). +

+

+ +

+
+ + + + + + + + + + + + +
#define INO_TO_VBO (ipervblk,
 )    ((x) % ipervblk)
+
+
+ +

+ +

+Definition at line 48 of file ufs.c. +

+Referenced by fsread(). +

+

+ +

+
+ + + + + + + + + +
#define INOPB (fs   )    ((fs)->fs_inopb)
+
+
+ +

+ +

+Definition at line 44 of file ufs.c. +

+

+ +

+
+ + + + + + + + + +
#define IPERVBLK (fs   )    (INOPB(fs) / ((fs)->fs_bsize >> VBLKSHIFT))
+
+
+ +

+ +

+Definition at line 43 of file ufs.c. +

+Referenced by fsread(). +

+

+ +

+
+ + + + +
#define VBLKMASK   (VBLKSIZE - 1)
+
+
+ +

+ +

+Definition at line 40 of file ufs.c. +

+Referenced by fsread(). +

+

+ +

+
+ + + + +
#define VBLKSHIFT   12
+
+
+ +

+ +

+Definition at line 38 of file ufs.c. +

+

+ +

+
+ + + + +
#define VBLKSIZE   (1 << VBLKSHIFT)
+
+
+ +

+ +

+Definition at line 39 of file ufs.c. +

+

+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static int dskread (void *  buf,
u_int64_t  block,
size_t  count,
fileDescriptor fd 
) [static]
+
+
+ +

+ +

+Definition at line 51 of file ufs.c. +

+Referenced by fsread(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
static __inline int fsfind (const char *  name,
ino_t ino,
fileDescriptor fd 
) [static]
+
+
+ +

+ +

+Definition at line 207 of file ufs.c. +

+References dirent::d_fileno, dirent::d_name, dirent::d_reclen, dirent::d_type, DEV_BSIZE, fsread(), fileDescriptor::offset, and strcmp(). +

+Referenced by lookup(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static ssize_t fsread (ino_t  inode,
void *  buf,
size_t  nbyte,
fileDescriptor fd 
) [static]
+
+ +

+ +

+
+ + + + + + + + + + + + + + + + + + +
static ino_t lookup (const char *  path,
fileDescriptor fd 
) [static]
+
+
+ +

+ +

+Definition at line 229 of file ufs.c. +

+References DT_DIR, DT_REG, fsfind(), kprintf(), MAXNAMLEN, memcpy(), name, and ROOTINO. +

+Referenced by ufs_openFile(). +

+

+ +

+
+ + + + + + + + +
int ufs_init (  ) 
+
+
+ +

+ +

+Definition at line 308 of file ufs.c. +

+References kpanic(), NULL, ufs_initialize(), ufs_openFile(), ufs_readFile(), ufs_writeFile(), vfsRegisterFS(), and x1. +

+

+ +

+
+ + + + + + + + + +
int ufs_initialize (vfs_mountPoint_t mp  ) 
+
+
+ +

+ +

+Definition at line 303 of file ufs.c. +

+References x1. +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
static int ufs_openFile (const char *  file,
fileDescriptor fd 
) [static]
+
+
+ +

+ +

+Definition at line 265 of file ufs.c. +

+References fsread(), kmalloc(), lookup(), fileDescriptor::offset, and x1. +

+Referenced by ufs_init(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int ufs_readFile (fileDescriptor fd,
char *  data,
uInt32  offset,
long  size 
)
+
+
+ +

+ +

+Definition at line 284 of file ufs.c. +

+References fsread(). +

+Referenced by ufs_init(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int ufs_writeFile (fileDescriptor fd,
char *  data,
uInt32  offset,
long  size 
)
+
+
+ +

+ +

+Definition at line 289 of file ufs.c. +

+References kprintf(). +

+Referenced by ufs_init(). +

+

+


Variable Documentation

+ +
+
+ + + + +
int sblock_try[] = SBLOCKSEARCH [static]
+
+
+ +

+ +

+Definition at line 66 of file ufs.c. +

+Referenced by fsread(). +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ufs_8h-source.html b/doc/html/ufs_8h-source.html new file mode 100644 index 0000000..5ce42e0 --- /dev/null +++ b/doc/html/ufs_8h-source.html @@ -0,0 +1,338 @@ + + +UbixOS V2: src/sys/include/ufs/ufs.h Source File + + + + +
+
+
+
+ +

ufs.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _UFS_H
+00031 #define _UFS_H
+00032 
+00033 #include <ubixos/types.h>
+00034 #include <vfs/vfs.h>
+00035 #include <sys/device.h>
+00036 
+00037 
+00038 #define      DT_REG           8
+00039 #define      MAXNAMLEN       255
+00040 #define      ROOTINO ((ino_t)2)
+00041 #define      DT_DIR           4
+00042 #define      DEV_BSHIFT      9               /* log2(DEV_BSIZE) */
+00043 #define      DEV_BSIZE       (1<<DEV_BSHIFT)
+00044 #define SBLOCK_FLOPPY        0
+00045 #define SBLOCK_UFS1       8192
+00046 #define SBLOCK_UFS2      65536
+00047 #define SBLOCK_PIGGY    262144
+00048 #define SBLOCKSIZE      8192
+00049 #define SBLOCKSEARCH \
+00050         { SBLOCK_UFS2, SBLOCK_UFS1, SBLOCK_FLOPPY, SBLOCK_PIGGY, -1 }
+00051 #define FS_UFS1_MAGIC   0x011954        /* UFS1 fast filesystem magic number */
+00052 #define FS_UFS2_MAGIC   0x19540119      /* UFS2 fast filesystem magic number */
+00053 #define MAXMNTLEN       468
+00054 #define MAXVOLLEN       32
+00055 #define NOCSPTRS        ((128 / sizeof(void *)) - 4)
+00056 #define FSMAXSNAP 20
+00057 #define MAXBSIZE       65536
+00058 #define NINDIR(fs)      ((fs)->fs_nindir)
+00059 
+00060 /*
+00061  * Cylinder group macros to locate things in cylinder groups.
+00062  * They calc filesystem addresses of cylinder group data structures.
+00063  */
+00064 #define cgbase(fs, c)   (((ufs2_daddr_t)(fs)->fs_fpg) * (c))
+00065 #define cgdmin(fs, c)   (cgstart(fs, c) + (fs)->fs_dblkno)      /* 1st data */
+00066 #define cgimin(fs, c)   (cgstart(fs, c) + (fs)->fs_iblkno)      /* inode blk */
+00067 #define cgsblock(fs, c) (cgstart(fs, c) + (fs)->fs_sblkno)      /* super blk */
+00068 #define cgtod(fs, c)    (cgstart(fs, c) + (fs)->fs_cblkno)      /* cg block */
+00069 #define cgstart(fs, c)                                                  \
+00070        ((fs)->fs_magic == FS_UFS2_MAGIC ? cgbase(fs, c) :               \
+00071        (cgbase(fs, c) + (fs)->fs_old_cgoffset * ((c) & ~((fs)->fs_old_cgmask))))
+00072 
+00073 
+00074 #define       fsbtodb(fs, b)  ((daddr_t)(b) << (fs)->fs_fsbtodb)
+00075 #define       dbtofsb(fs, b)  ((b) >> (fs)->fs_fsbtodb)
+00076 
+00077 /*
+00078  * Macros for handling inode numbers:
+00079  *     inode number to filesystem block offset.
+00080  *     inode number to cylinder group number.
+00081  *     inode number to filesystem block address.
+00082  */
+00083 #define ino_to_cg(fs, x)        ((x) / (fs)->fs_ipg)
+00084 #define ino_to_fsba(fs, x)                                              \
+00085         ((ufs2_daddr_t)(cgimin(fs, ino_to_cg(fs, x)) +                  \
+00086             (blkstofrags((fs), (((x) % (fs)->fs_ipg) / INOPB(fs))))))
+00087 #define ino_to_fsbo(fs, x)      ((x) % INOPB(fs))
+00088 
+00089 
+00090 #define blkoff(fs, loc)         /* calculates (loc % fs->fs_bsize) */ \
+00091         ((loc) & (fs)->fs_qbmask)
+00092 #define lblkno(fs, loc)         /* calculates (loc / fs->fs_bsize) */ \
+00093         ((loc) >> (fs)->fs_bshift)
+00094 #define fragroundup(fs, size)   /* calculates roundup(size, fs->fs_fsize) */ \
+00095         (((size) + (fs)->fs_qfmask) & (fs)->fs_fmask)
+00096 
+00097 
+00098 #define sblksize(fs, size, lbn) \
+00099         (((lbn) >= NDADDR || (size) >= ((lbn) + 1) << (fs)->fs_bshift) \
+00100           ? (fs)->fs_bsize \
+00101           : (fragroundup(fs, blkoff(fs, (size)))))
+00102 
+00103 
+00104 
+00105 
+00106 typedef int32_t ufs1_daddr_t;
+00107 typedef int64_t ufs2_daddr_t;
+00108 typedef int64_t ufs_lbn_t;
+00109 typedef int64_t ufs_time_t;
+00110 typedef        __int64_t       daddr_t;
+00111 
+00112 struct dirent {
+00113   __uint32_t d_fileno;            /* file number of entry */
+00114   __uint16_t d_reclen;            /* length of this record */
+00115   __uint8_t  d_type;              /* file type, see below */
+00116   __uint8_t  d_namlen;            /* length of string in d_name */
+00117   char    d_name[MAXNAMLEN + 1];  /* name must be no longer than this */
+00118   };
+00119 
+00120 #define NXADDR  2                       /* External addresses in inode. */
+00121 #define NDADDR  12                      /* Direct addresses in inode. */
+00122 #define NIADDR  3                       /* Indirect addresses in inode. */
+00123 
+00124 struct ufs2_dinode {
+00125   u_int16_t       di_mode;        /*   0: IFMT, permissions; see below. */
+00126   int16_t         di_nlink;       /*   2: File link count. */
+00127   u_int32_t       di_uid;         /*   4: File owner. */
+00128   u_int32_t       di_gid;         /*   8: File group. */
+00129   u_int32_t       di_blksize;     /*  12: Inode blocksize. */
+00130   u_int64_t       di_size;        /*  16: File byte count. */
+00131   u_int64_t       di_blocks;      /*  24: Bytes actually held. */
+00132   ufs_time_t      di_atime;       /*  32: Last access time. */
+00133   ufs_time_t      di_mtime;       /*  40: Last modified time. */
+00134   ufs_time_t      di_ctime;       /*  48: Last inode change time. */
+00135   ufs_time_t      di_birthtime;   /*  56: Inode creation time. */
+00136   int32_t         di_mtimensec;   /*  64: Last modified time. */
+00137   int32_t         di_atimensec;   /*  68: Last access time. */
+00138   int32_t         di_ctimensec;   /*  72: Last inode change time. */
+00139   int32_t         di_birthnsec;   /*  76: Inode creation time. */
+00140   int32_t         di_gen;         /*  80: Generation number. */
+00141   u_int32_t       di_kernflags;   /*  84: Kernel flags. */
+00142   u_int32_t       di_flags;       /*  88: Status flags (chflags). */
+00143   int32_t         di_extsize;     /*  92: External attributes block. */
+00144   ufs2_daddr_t    di_extb[NXADDR];/*  96: External attributes block. */
+00145   ufs2_daddr_t    di_db[NDADDR];  /* 112: Direct disk blocks. */
+00146   ufs2_daddr_t    di_ib[NIADDR];  /* 208: Indirect disk blocks. */
+00147   int64_t         di_spare[3];    /* 232: Reserved; currently unused */
+00148   };
+00149 
+00150 struct ufs1_dinode {
+00151   u_int16_t       di_mode;        /*   0: IFMT, permissions; see below. */
+00152   int16_t         di_nlink;       /*   2: File link count. */
+00153   union {
+00154     u_int16_t oldids[2];    /*   4: Ffs: old user and group ids. */
+00155     } di_u;
+00156   u_int64_t       di_size;        /*   8: File byte count. */
+00157   int32_t         di_atime;       /*  16: Last access time. */
+00158   int32_t         di_atimensec;   /*  20: Last access time. */
+00159   int32_t         di_mtime;       /*  24: Last modified time. */
+00160   int32_t         di_mtimensec;   /*  28: Last modified time. */
+00161   int32_t         di_ctime;       /*  32: Last inode change time. */
+00162   int32_t         di_ctimensec;   /*  36: Last inode change time. */
+00163   ufs1_daddr_t    di_db[NDADDR];  /*  40: Direct disk blocks. */
+00164   ufs1_daddr_t    di_ib[NIADDR];  /*  88: Indirect disk blocks. */
+00165   u_int32_t       di_flags;       /* 100: Status flags (chflags). */
+00166   int32_t         di_blocks;      /* 104: Blocks actually held. */
+00167   int32_t         di_gen;         /* 108: Generation number. */
+00168   u_int32_t       di_uid;         /* 112: File owner. */
+00169   u_int32_t       di_gid;         /* 116: File group. */
+00170   int32_t         di_spare[2];    /* 120: Reserved; currently unused */
+00171   };
+00172 
+00173 struct csum {
+00174         int32_t cs_ndir;                /* number of directories */
+00175         int32_t cs_nbfree;              /* number of free blocks */
+00176         int32_t cs_nifree;              /* number of free inodes */
+00177         int32_t cs_nffree;              /* number of free frags */
+00178 };
+00179 struct csum_total {
+00180         int64_t cs_ndir;                /* number of directories */
+00181         int64_t cs_nbfree;              /* number of free blocks */
+00182         int64_t cs_nifree;              /* number of free inodes */
+00183         int64_t cs_nffree;              /* number of free frags */
+00184         int64_t cs_numclusters;         /* number of free clusters */
+00185         int64_t cs_spare[3];            /* future expansion */
+00186 };
+00187 
+00188 
+00189 struct fs {
+00190         int32_t  fs_firstfield;         /* historic filesystem linked list, */
+00191         int32_t  fs_unused_1;           /*     used for incore super blocks */
+00192         int32_t  fs_sblkno;             /* offset of super-block in filesys */
+00193         int32_t  fs_cblkno;             /* offset of cyl-block in filesys */
+00194         int32_t  fs_iblkno;             /* offset of inode-blocks in filesys */
+00195         int32_t  fs_dblkno;             /* offset of first data after cg */
+00196         int32_t  fs_old_cgoffset;       /* cylinder group offset in cylinder */
+00197         int32_t  fs_old_cgmask;         /* used to calc mod fs_ntrak */
+00198         int32_t  fs_old_time;           /* last time written */
+00199         int32_t  fs_old_size;           /* number of blocks in fs */
+00200         int32_t  fs_old_dsize;          /* number of data blocks in fs */
+00201         int32_t  fs_ncg;                /* number of cylinder groups */
+00202         int32_t  fs_bsize;              /* size of basic blocks in fs */
+00203         int32_t  fs_fsize;              /* size of frag blocks in fs */
+00204         int32_t  fs_frag;               /* number of frags in a block in fs */
+00205 /* these are configuration parameters */
+00206         int32_t  fs_minfree;            /* minimum percentage of free blocks */
+00207         int32_t  fs_old_rotdelay;       /* num of ms for optimal next block */
+00208         int32_t  fs_old_rps;            /* disk revolutions per second */
+00209 /* these fields can be computed from the others */
+00210         int32_t  fs_bmask;              /* ``blkoff'' calc of blk offsets */
+00211         int32_t  fs_fmask;              /* ``fragoff'' calc of frag offsets */
+00212         int32_t  fs_bshift;             /* ``lblkno'' calc of logical blkno */
+00213         int32_t  fs_fshift;             /* ``numfrags'' calc number of frags */
+00214 /* these are configuration parameters */
+00215         int32_t  fs_maxcontig;          /* max number of contiguous blks */
+00216         int32_t  fs_maxbpg;             /* max number of blks per cyl group */
+00217 /* these fields can be computed from the others */
+00218         int32_t  fs_fragshift;          /* block to frag shift */
+00219         int32_t  fs_fsbtodb;            /* fsbtodb and dbtofsb shift constant */
+00220         int32_t  fs_sbsize;             /* actual size of super block */
+00221         int32_t  fs_spare1[2];          /* old fs_csmask */
+00222                                         /* old fs_csshift */
+00223         int32_t  fs_nindir;             /* value of NINDIR */
+00224         int32_t  fs_inopb;              /* value of INOPB */
+00225         int32_t  fs_old_nspf;           /* value of NSPF */
+00226 /* yet another configuration parameter */
+00227         int32_t  fs_optim;              /* optimization preference, see below */
+00228         int32_t  fs_old_npsect;         /* # sectors/track including spares */
+00229         int32_t  fs_old_interleave;     /* hardware sector interleave */
+00230         int32_t  fs_old_trackskew;      /* sector 0 skew, per track */
+00231         int32_t  fs_id[2];              /* unique filesystem id */
+00232 /* sizes determined by number of cylinder groups and their sizes */
+00233         int32_t  fs_old_csaddr;         /* blk addr of cyl grp summary area */
+00234         int32_t  fs_cssize;             /* size of cyl grp summary area */
+00235         int32_t  fs_cgsize;             /* cylinder group size */
+00236         int32_t  fs_spare2;             /* old fs_ntrak */
+00237         int32_t  fs_old_nsect;          /* sectors per track */
+00238         int32_t  fs_old_spc;            /* sectors per cylinder */
+00239         int32_t  fs_old_ncyl;           /* cylinders in filesystem */
+00240         int32_t  fs_old_cpg;            /* cylinders per group */
+00241         int32_t  fs_ipg;                /* inodes per group */
+00242         int32_t  fs_fpg;                /* blocks per group * fs_frag */
+00243 /* this data must be re-computed after crashes */
+00244         struct  csum fs_old_cstotal;    /* cylinder summary information */
+00245 /* these fields are cleared at mount time */
+00246         int8_t   fs_fmod;               /* super block modified flag */
+00247         int8_t   fs_clean;              /* filesystem is clean flag */
+00248         int8_t   fs_ronly;              /* mounted read-only flag */
+00249         int8_t   fs_old_flags;          /* old FS_ flags */
+00250         u_char   fs_fsmnt[MAXMNTLEN];   /* name mounted on */
+00251         u_char   fs_volname[MAXVOLLEN]; /* volume name */
+00252         u_int64_t fs_swuid;             /* system-wide uid */
+00253         int32_t  fs_pad;                /* due to alignment of fs_swuid */
+00254 /* these fields retain the current block allocation info */
+00255         int32_t  fs_cgrotor;            /* last cg searched */
+00256         void    *fs_ocsp[NOCSPTRS];     /* padding; was list of fs_cs buffers */
+00257         u_int8_t *fs_contigdirs;        /* (u) # of contig. allocated dirs */
+00258         struct  csum *fs_csp;           /* (u) cg summary info buffer */
+00259         int32_t *fs_maxcluster;         /* (u) max cluster in each cyl group */
+00260         u_int   *fs_active;             /* (u) used by snapshots to track fs */
+00261         int32_t  fs_old_cpc;            /* cyl per cycle in postbl */
+00262         int32_t  fs_maxbsize;           /* maximum blocking factor permitted */
+00263         int64_t  fs_sparecon64[17];     /* old rotation block list head */
+00264         int64_t  fs_sblockloc;          /* byte offset of standard superblock */
+00265         struct  csum_total fs_cstotal;  /* (u) cylinder summary information */
+00266         ufs_time_t fs_time;             /* last time written */
+00267         int64_t  fs_size;               /* number of blocks in fs */
+00268         int64_t  fs_dsize;              /* number of data blocks in fs */
+00269         ufs2_daddr_t fs_csaddr;         /* blk addr of cyl grp summary area */
+00270         int64_t  fs_pendingblocks;      /* (u) blocks being freed */
+00271         int32_t  fs_pendinginodes;      /* (u) inodes being freed */
+00272         int32_t  fs_snapinum[FSMAXSNAP];/* list of snapshot inode numbers */
+00273         int32_t  fs_avgfilesize;        /* expected average file size */
+00274         int32_t  fs_avgfpdir;           /* expected # of files per directory */
+00275         int32_t  fs_save_cgsize;        /* save real cg size to use fs_bsize */
+00276         int32_t  fs_sparecon32[26];     /* reserved for future constants */
+00277         int32_t  fs_flags;              /* see FS_ flags below */
+00278         int32_t  fs_contigsumsize;      /* size of cluster summary array */
+00279         int32_t  fs_maxsymlinklen;      /* max length of an internal symlink */
+00280         int32_t  fs_old_inodefmt;       /* format of on-disk inodes */
+00281         u_int64_t fs_maxfilesize;       /* maximum representable file size */
+00282         int64_t  fs_qbmask;             /* ~fs_bmask for use with 64-bit size */
+00283         int64_t  fs_qfmask;             /* ~fs_fmask for use with 64-bit size */
+00284         int32_t  fs_state;              /* validate fs_clean field */
+00285         int32_t  fs_old_postblformat;   /* format of positional layout tables */
+00286         int32_t  fs_old_nrpos;          /* number of rotational positions */
+00287         int32_t  fs_spare5[2];          /* old fs_postbloff */
+00288                                         /* old fs_rotbloff */
+00289         int32_t  fs_magic;              /* magic number */
+00290 };
+00291 
+00292 
+00293 int ufs_init();
+00294 int  ufs_initialize();
+00295 
+00296 #endif
+00297 
+00298 /***
+00299  END
+00300  ***/
+00301 
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/ufs_8h.html b/doc/html/ufs_8h.html new file mode 100644 index 0000000..4675856 --- /dev/null +++ b/doc/html/ufs_8h.html @@ -0,0 +1,1102 @@ + + +UbixOS V2: src/sys/include/ufs/ufs.h File Reference + + + + +
+
+
+
+ +

ufs.h File Reference

+

+#include <ubixos/types.h>
+#include <vfs/vfs.h>
+#include <sys/device.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  csum
struct  csum_total
struct  dirent
struct  fs
struct  ufs1_dinode
struct  ufs2_dinode

Defines

#define blkoff(fs, loc)
#define cgbase(fs, c)   (((ufs2_daddr_t)(fs)->fs_fpg) * (c))
#define cgdmin(fs, c)   (cgstart(fs, c) + (fs)->fs_dblkno)
#define cgimin(fs, c)   (cgstart(fs, c) + (fs)->fs_iblkno)
#define cgsblock(fs, c)   (cgstart(fs, c) + (fs)->fs_sblkno)
#define cgstart(fs, c)
#define cgtod(fs, c)   (cgstart(fs, c) + (fs)->fs_cblkno)
#define dbtofsb(fs, b)   ((b) >> (fs)->fs_fsbtodb)
#define DEV_BSHIFT   9
#define DEV_BSIZE   (1<<DEV_BSHIFT)
#define DT_DIR   4
#define DT_REG   8
#define fragroundup(fs, size)
#define FS_UFS1_MAGIC   0x011954
#define FS_UFS2_MAGIC   0x19540119
#define fsbtodb(fs, b)   ((daddr_t)(b) << (fs)->fs_fsbtodb)
#define FSMAXSNAP   20
#define ino_to_cg(fs, x)   ((x) / (fs)->fs_ipg)
#define ino_to_fsba(fs, x)
#define ino_to_fsbo(fs, x)   ((x) % INOPB(fs))
#define lblkno(fs, loc)
#define MAXBSIZE   65536
#define MAXMNTLEN   468
#define MAXNAMLEN   255
#define MAXVOLLEN   32
#define NDADDR   12
#define NIADDR   3
#define NINDIR(fs)   ((fs)->fs_nindir)
#define NOCSPTRS   ((128 / sizeof(void *)) - 4)
#define NXADDR   2
#define ROOTINO   ((ino_t)2)
#define sblksize(fs, size, lbn)
#define SBLOCK_FLOPPY   0
#define SBLOCK_PIGGY   262144
#define SBLOCK_UFS1   8192
#define SBLOCK_UFS2   65536
#define SBLOCKSEARCH   { SBLOCK_UFS2, SBLOCK_UFS1, SBLOCK_FLOPPY, SBLOCK_PIGGY, -1 }
#define SBLOCKSIZE   8192

Typedefs

typedef __int64_t daddr_t
typedef int32_t ufs1_daddr_t
typedef int64_t ufs2_daddr_t
typedef int64_t ufs_lbn_t
typedef int64_t ufs_time_t

Functions

int ufs_init ()
int ufs_initialize ()
+


Define Documentation

+ +
+
+ + + + + + + + + + + + +
#define blkoff (fs,
loc   ) 
+
+
+ +

+Value:

/* calculates (loc % fs->fs_bsize) */ \
+        ((loc) & (fs)->fs_qbmask)
+
+

+Definition at line 90 of file ufs.h. +

+Referenced by fsread(). +

+

+ +

+
+ + + + + + + + + + + + +
#define cgbase (fs,
 )    (((ufs2_daddr_t)(fs)->fs_fpg) * (c))
+
+
+ +

+ +

+Definition at line 64 of file ufs.h. +

+

+ +

+
+ + + + + + + + + + + + +
#define cgdmin (fs,
 )    (cgstart(fs, c) + (fs)->fs_dblkno)
+
+
+ +

+ +

+Definition at line 65 of file ufs.h. +

+

+ +

+
+ + + + + + + + + + + + +
#define cgimin (fs,
 )    (cgstart(fs, c) + (fs)->fs_iblkno)
+
+
+ +

+ +

+Definition at line 66 of file ufs.h. +

+

+ +

+
+ + + + + + + + + + + + +
#define cgsblock (fs,
 )    (cgstart(fs, c) + (fs)->fs_sblkno)
+
+
+ +

+ +

+Definition at line 67 of file ufs.h. +

+

+ +

+
+ + + + + + + + + + + + +
#define cgstart (fs,
 ) 
+
+
+ +

+Value:

((fs)->fs_magic == FS_UFS2_MAGIC ? cgbase(fs, c) :               \
+       (cgbase(fs, c) + (fs)->fs_old_cgoffset * ((c) & ~((fs)->fs_old_cgmask))))
+
+

+Definition at line 69 of file ufs.h. +

+

+ +

+
+ + + + + + + + + + + + +
#define cgtod (fs,
 )    (cgstart(fs, c) + (fs)->fs_cblkno)
+
+
+ +

+ +

+Definition at line 68 of file ufs.h. +

+

+ +

+
+ + + + + + + + + + + + +
#define dbtofsb (fs,
 )    ((b) >> (fs)->fs_fsbtodb)
+
+
+ +

+ +

+Definition at line 75 of file ufs.h. +

+

+ +

+
+ + + + +
#define DEV_BSHIFT   9
+
+
+ +

+ +

+Definition at line 42 of file ufs.h. +

+Referenced by fsread(). +

+

+ +

+
+ + + + +
#define DEV_BSIZE   (1<<DEV_BSHIFT)
+
+
+ +

+ +

+Definition at line 43 of file ufs.h. +

+Referenced by fsfind(), and fsread(). +

+

+ +

+
+ + + + +
#define DT_DIR   4
+
+
+ +

+ +

+Definition at line 41 of file ufs.h. +

+Referenced by lookup(). +

+

+ +

+
+ + + + +
#define DT_REG   8
+
+
+ +

+ +

+Definition at line 38 of file ufs.h. +

+Referenced by lookup(). +

+

+ +

+
+ + + + + + + + + + + + +
#define fragroundup (fs,
size   ) 
+
+
+ +

+Value:

/* calculates roundup(size, fs->fs_fsize) */ \
+        (((size) + (fs)->fs_qfmask) & (fs)->fs_fmask)
+
+

+Definition at line 94 of file ufs.h. +

+

+ +

+
+ + + + +
#define FS_UFS1_MAGIC   0x011954
+
+
+ +

+ +

+Definition at line 51 of file ufs.h. +

+Referenced by fsread(). +

+

+ +

+
+ + + + +
#define FS_UFS2_MAGIC   0x19540119
+
+
+ +

+ +

+Definition at line 52 of file ufs.h. +

+Referenced by fsread(). +

+

+ +

+
+ + + + + + + + + + + + +
#define fsbtodb (fs,
 )    ((daddr_t)(b) << (fs)->fs_fsbtodb)
+
+
+ +

+ +

+Definition at line 74 of file ufs.h. +

+Referenced by fsread(). +

+

+ +

+
+ + + + +
#define FSMAXSNAP   20
+
+
+ +

+ +

+Definition at line 56 of file ufs.h. +

+

+ +

+
+ + + + + + + + + + + + +
#define ino_to_cg (fs,
 )    ((x) / (fs)->fs_ipg)
+
+
+ +

+ +

+Definition at line 83 of file ufs.h. +

+

+ +

+
+ + + + + + + + + + + + +
#define ino_to_fsba (fs,
 ) 
+
+
+ +

+Value:

((ufs2_daddr_t)(cgimin(fs, ino_to_cg(fs, x)) +                  \
+            (blkstofrags((fs), (((x) % (fs)->fs_ipg) / INOPB(fs))))))
+
+

+Definition at line 84 of file ufs.h. +

+

+ +

+
+ + + + + + + + + + + + +
#define ino_to_fsbo (fs,
 )    ((x) % INOPB(fs))
+
+
+ +

+ +

+Definition at line 87 of file ufs.h. +

+

+ +

+
+ + + + + + + + + + + + +
#define lblkno (fs,
loc   ) 
+
+
+ +

+Value:

/* calculates (loc / fs->fs_bsize) */ \
+        ((loc) >> (fs)->fs_bshift)
+
+

+Definition at line 92 of file ufs.h. +

+Referenced by fsread(). +

+

+ +

+
+ + + + +
#define MAXBSIZE   65536
+
+
+ +

+ +

+Definition at line 57 of file ufs.h. +

+Referenced by fsread(). +

+

+ +

+
+ + + + +
#define MAXMNTLEN   468
+
+
+ +

+ +

+Definition at line 53 of file ufs.h. +

+

+ +

+
+ + + + +
#define MAXNAMLEN   255
+
+
+ +

+ +

+Definition at line 39 of file ufs.h. +

+Referenced by lookup(). +

+

+ +

+
+ + + + +
#define MAXVOLLEN   32
+
+
+ +

+ +

+Definition at line 54 of file ufs.h. +

+

+ +

+
+ + + + +
#define NDADDR   12
+
+
+ +

+ +

+Definition at line 121 of file ufs.h. +

+Referenced by fsread(). +

+

+ +

+
+ + + + +
#define NIADDR   3
+
+
+ +

+ +

+Definition at line 122 of file ufs.h. +

+

+ +

+
+ + + + + + + + + +
#define NINDIR (fs   )    ((fs)->fs_nindir)
+
+
+ +

+ +

+Definition at line 58 of file ufs.h. +

+Referenced by fsread(). +

+

+ +

+
+ + + + +
#define NOCSPTRS   ((128 / sizeof(void *)) - 4)
+
+
+ +

+ +

+Definition at line 55 of file ufs.h. +

+

+ +

+
+ + + + +
#define NXADDR   2
+
+
+ +

+ +

+Definition at line 120 of file ufs.h. +

+

+ +

+
+ + + + +
#define ROOTINO   ((ino_t)2)
+
+
+ +

+ +

+Definition at line 40 of file ufs.h. +

+Referenced by lookup(). +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define sblksize (fs,
size,
lbn   ) 
+
+
+ +

+Value:

(((lbn) >= NDADDR || (size) >= ((lbn) + 1) << (fs)->fs_bshift) \
+          ? (fs)->fs_bsize \
+          : (fragroundup(fs, blkoff(fs, (size)))))
+
+

+Definition at line 98 of file ufs.h. +

+Referenced by fsread(). +

+

+ +

+
+ + + + +
#define SBLOCK_FLOPPY   0
+
+
+ +

+ +

+Definition at line 44 of file ufs.h. +

+

+ +

+
+ + + + +
#define SBLOCK_PIGGY   262144
+
+
+ +

+ +

+Definition at line 47 of file ufs.h. +

+

+ +

+
+ + + + +
#define SBLOCK_UFS1   8192
+
+
+ +

+ +

+Definition at line 45 of file ufs.h. +

+

+ +

+
+ + + + +
#define SBLOCK_UFS2   65536
+
+
+ +

+ +

+Definition at line 46 of file ufs.h. +

+

+ +

+
+ + + + +
#define SBLOCKSEARCH   { SBLOCK_UFS2, SBLOCK_UFS1, SBLOCK_FLOPPY, SBLOCK_PIGGY, -1 }
+
+
+ +

+ +

+Definition at line 49 of file ufs.h. +

+

+ +

+
+ + + + +
#define SBLOCKSIZE   8192
+
+
+ +

+ +

+Definition at line 48 of file ufs.h. +

+

+


Typedef Documentation

+ +
+
+ + + + +
typedef __int64_t daddr_t
+
+
+ +

+ +

+Definition at line 110 of file ufs.h. +

+

+ +

+
+ + + + +
typedef int32_t ufs1_daddr_t
+
+
+ +

+ +

+Definition at line 106 of file ufs.h. +

+

+ +

+
+ + + + +
typedef int64_t ufs2_daddr_t
+
+
+ +

+ +

+Definition at line 107 of file ufs.h. +

+

+ +

+
+ + + + +
typedef int64_t ufs_lbn_t
+
+
+ +

+ +

+Definition at line 108 of file ufs.h. +

+

+ +

+
+ + + + +
typedef int64_t ufs_time_t
+
+
+ +

+ +

+Definition at line 109 of file ufs.h. +

+

+


Function Documentation

+ +
+
+ + + + + + + + +
int ufs_init (  ) 
+
+
+ +

+ +

+Definition at line 308 of file ufs.c. +

+References kpanic(), NULL, ufs_initialize(), ufs_openFile(), ufs_readFile(), ufs_writeFile(), vfsRegisterFS(), and x1. +

+

+ +

+
+ + + + + + + + +
int ufs_initialize (  ) 
+
+
+ +

+ +

+Referenced by ufs_init(). +

+

+


Generated on Sun Dec 3 02:38:08 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/uniondescriptorTableUnion.html b/doc/html/uniondescriptorTableUnion.html new file mode 100644 index 0000000..f77f1b2 --- /dev/null +++ b/doc/html/uniondescriptorTableUnion.html @@ -0,0 +1,110 @@ + + +UbixOS V2: descriptorTableUnion Union Reference + + + + +
+
+
+
+

descriptorTableUnion Union Reference

#include <gdt.h> +

+


Detailed Description

+ +

+ +

+Definition at line 77 of file gdt.h. + + + + + + + + +

Data Fields

gdtDescriptor descriptor
unsigned long dummy
gdtGate gate
+


Field Documentation

+ +
+ +
+ +

+ +

+Definition at line 78 of file gdt.h. +

+

+ +

+
+ + + + +
unsigned long descriptorTableUnion::dummy
+
+
+ +

+ +

+Definition at line 80 of file gdt.h. +

+

+ +

+ +
+ +

+ +

+Definition at line 79 of file gdt.h. +

+Referenced by setTaskVector(), and setVector(). +

+

+


The documentation for this union was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/unionetheraddr.html b/doc/html/unionetheraddr.html new file mode 100644 index 0000000..4f9f58c --- /dev/null +++ b/doc/html/unionetheraddr.html @@ -0,0 +1,89 @@ + + +UbixOS V2: etheraddr Union Reference + + + + +
+
+
+
+

etheraddr Union Reference

#include <ne2k.h> +

+


Detailed Description

+ +

+ +

+Definition at line 45 of file ne2k.h. + + + + + + +

Data Fields

unsigned char bytes [6]
unsigned short shorts [3]
+


Field Documentation

+ +
+
+ + + + +
unsigned char etheraddr::bytes[6]
+
+
+ +

+ +

+Definition at line 46 of file ne2k.h. +

+

+ +

+
+ + + + +
unsigned short etheraddr::shorts[3]
+
+
+ +

+ +

+Definition at line 47 of file ne2k.h. +

+

+


The documentation for this union was generated from the following file: +
Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/unionuPtr.html b/doc/html/unionuPtr.html new file mode 100644 index 0000000..56aa24a --- /dev/null +++ b/doc/html/unionuPtr.html @@ -0,0 +1,165 @@ + + +UbixOS V2: uPtr Union Reference + + + + +
+
+
+
+

uPtr Union Reference

#include <ubixfs.h> +

+


Detailed Description

+ +

+ +

+Definition at line 47 of file ubixfs.h. + + + + + + + + + + + + + + +

Data Fields

bNodebPtr
bTreebtPtr
inodeAddr iAddr
ubixfsInodeiPtr
off_t offset
void * vPtr
+


Field Documentation

+ +
+
+ + + + +
bNode* uPtr::bPtr
+
+
+ +

+ +

+Definition at line 49 of file ubixfs.h. +

+

+ +

+
+ + + + +
bTree* uPtr::btPtr
+
+
+ +

+ +

+Definition at line 50 of file ubixfs.h. +

+

+ +

+
+ + + + +
inodeAddr uPtr::iAddr
+
+
+ +

+ +

+Definition at line 48 of file ubixfs.h. +

+

+ +

+
+ + + + +
ubixfsInode* uPtr::iPtr
+
+
+ +

+ +

+Definition at line 51 of file ubixfs.h. +

+

+ +

+
+ + + + +
off_t uPtr::offset
+
+
+ +

+ +

+Definition at line 53 of file ubixfs.h. +

+

+ +

+
+ + + + +
void* uPtr::vPtr
+
+
+ +

+ +

+Definition at line 52 of file ubixfs.h. +

+

+


The documentation for this union was generated from the following file: +
Generated on Sun Dec 3 02:38:15 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/unmappage_8c-source.html b/doc/html/unmappage_8c-source.html new file mode 100644 index 0000000..8c05908 --- /dev/null +++ b/doc/html/unmappage_8c-source.html @@ -0,0 +1,180 @@ + + +UbixOS V2: src/sys/vmm/unmappage.c Source File + + + + +
+
+
+
+ +

unmappage.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <vmm/vmm.h>
+00031 
+00032 /************************************************************************
+00033 
+00034 Function: void vmmUnmapPage(uInt32 pageAddr,int flags);
+00035 Description: This Function Will Unmap A Page From The Kernel VM Space
+00036              The Flags Variable Decides If Its To Free The Page Or Not
+00037              A Flag Of 0 Will Free It And A Flag Of 1 Will Keep It
+00038 Notes:
+00039 
+00040 07/30/02 - I Have Decided That This Should Free The Physical Page There
+00041            Is No Reason To Keep It Marked As Not Available
+00042 
+00043 07/30/02 - Ok A Found A Reason To Keep It Marked As Available I Admit
+00044            Even I Am Not Perfect Ok The Case Where You Wouldn't Want To
+00045            Free It Would Be On Something Like Where I Allocated A Page
+00046            To Create A New Virtual Space So Now It Has A Flag
+00047 
+00048 ************************************************************************/
+00049 void 
+00050 vmmUnmapPage(uInt32 pageAddr, int flags)
+00051 {
+00052   int             pageDirectoryIndex = 0, pageTableIndex = 0;
+00053   uInt32         *pageTable = 0x0;
+00054 
+00055   /* Get The Index To The Page Directory */
+00056   pageDirectoryIndex = (pageAddr >> 22);
+00057   
+00058   //Calculate The Page Table Index
+00059   pageTableIndex = ((pageAddr >> 12) & 0x3FF);
+00060 
+00061   /* Set pageTable To The Virtual Address Of Table */
+00062   pageTable = (uInt32 *) (tablesBaseAddress + (0x1000 * pageDirectoryIndex));
+00063   /* Free The Physical Page If Flags Is 0 */
+00064   if (flags == 0) {
+00065 
+00066     /*
+00067      * This is temp i think its still an issue clearVirtualPage(pageAddr);
+00068      * freePage((uInt32)(pageTable[pageTableIndex] & 0xFFFFF000));
+00069      */
+00070   }
+00071   /* Unmap The Page */
+00072   pageTable[pageTableIndex] = 0x0;
+00073   /* Rehash The Page Directory */
+00074   asm volatile(
+00075       "movl %cr3,%eax\n"
+00076       "movl %eax,%cr3\n"
+00077     );
+00078   /* Return */
+00079   return;
+00080 }
+00081 
+00082 
+00083 
+00084 /************************************************************************
+00085 
+00086 Function: void vmmUnmapPages(uInt32 pageAddr,int flags);
+00087 Description: This Function Will Unmap A Page From The Kernel VM Space
+00088              The Flags Variable Decides If Its To Free The Page Or Not
+00089              A Flag Of 0 Will Free It And A Flag Of 1 Will Keep It
+00090 Notes:
+00091 
+00092 07/30/02 - I Have Decided That This Should Free The Physical Page There
+00093            Is No Reason To Keep It Marked As Not Available
+00094 
+00095 07/30/02 - Ok A Found A Reason To Keep It Marked As Available I Admit
+00096            Even I Am Not Perfect Ok The Case Where You Wouldn't Want To
+00097            Free It Would Be On Something Like Where I Allocated A Page
+00098            To Create A New Virtual Space So Now It Has A Flag
+00099 
+00100 ************************************************************************/
+00101 void vmmUnmapPages(void *ptr,uInt32 size) {
+00102   uInt32 baseAddr = (uInt32)ptr & 0xFFFFF000;
+00103   uInt32 dI = 0x0,tI = 0x0;
+00104   uInt32 y = 0x0;
+00105   uInt32 *pageTable = 0x0;
+00106 
+00107   dI = (baseAddr/(1024*4096));
+00108   tI = ((baseAddr-(dI*(1024*4096)))/4096);
+00109   pageTable = (uInt32 *)(tablesBaseAddress + (4096*dI));
+00110   for (y=tI;y<(tI+((size+4095)/4096));y++) {
+00111     pageTable[y] = 0x0;
+00112     }
+00113   return;
+00114   }
+00115 
+00116 /***
+00117  $Log$
+00118  Revision 1.1.1.1  2006/06/01 12:46:13  reddawg
+00119  ubix2
+00120 
+00121  Revision 1.2  2005/10/12 00:13:38  reddawg
+00122  Removed
+00123 
+00124  Revision 1.1.1.1  2005/09/26 17:24:54  reddawg
+00125  no message
+00126 
+00127  Revision 1.4  2004/07/26 19:15:49  reddawg
+00128  test code, fixes and the like
+00129 
+00130  Revision 1.3  2004/06/15 12:35:05  reddawg
+00131  Cleaned Up
+00132 
+00133  Revision 1.2  2004/06/10 22:23:56  reddawg
+00134  Volatiles
+00135 
+00136  Revision 1.1.1.1  2004/04/15 12:06:53  reddawg
+00137  UbixOS v1.0
+00138 
+00139  Revision 1.7  2004/04/13 16:36:34  reddawg
+00140  Changed our copyright, it is all now under a BSD-Style license
+00141 
+00142  END
+00143  ***/
+

Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/unmappage_8c.html b/doc/html/unmappage_8c.html new file mode 100644 index 0000000..ecbac9d --- /dev/null +++ b/doc/html/unmappage_8c.html @@ -0,0 +1,119 @@ + + +UbixOS V2: src/sys/vmm/unmappage.c File Reference + + + + +
+
+
+
+ +

unmappage.c File Reference

+

+#include <vmm/vmm.h>
+ +

+Go to the source code of this file. + + + + + + +

Functions

void vmmUnmapPage (uInt32 pageAddr, int flags)
void vmmUnmapPages (void *ptr, uInt32 size)
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
void vmmUnmapPage (uInt32  pageAddr,
int  flags 
)
+
+
+ +

+ +

+Definition at line 50 of file unmappage.c. +

+References tablesBaseAddress, and x1000. +

+Referenced by vmm_pageFault(), vmmCopyVirtualSpace(), vmmCreateVirtualSpace(), and vmmMapFromTask(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void vmmUnmapPages (void *  ptr,
uInt32  size 
)
+
+
+ +

+ +

+Definition at line 101 of file unmappage.c. +

+References tablesBaseAddress. +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/vfs_8c-source.html b/doc/html/vfs_8c-source.html new file mode 100644 index 0000000..0595073 --- /dev/null +++ b/doc/html/vfs_8c-source.html @@ -0,0 +1,172 @@ + + +UbixOS V2: src/sys/vfs/vfs.c Source File + + + + +
+
+
+
+ +

vfs.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <vfs/vfs.h>
+00031 #include <ubixos/vitals.h>
+00032 #include <lib/kmalloc.h>
+00033 #include <lib/kprintf.h>
+00034 #include <lib/string.h>
+00035 
+00036 /************************************************************************
+00037 
+00038 Function: void vfs_init();
+00039 
+00040 Description: This Function Initializes The VFS Layer
+00041 
+00042 Notes:
+00043 
+00044 02/20/2004 - Approved for quality
+00045 
+00046 ************************************************************************/
+00047 int vfs_init() {
+00048   /* Set up default fileSystems list */
+00049   systemVitals->fileSystems = 0x0;
+00050 
+00051   /* Print information */
+00052   kprintf("vfs0: loaded at address: [0x%X]\n",systemVitals->fileSystems);
+00053 
+00054   /* Return so we know things went well */
+00055   return(0x0);
+00056   }
+00057 
+00058 struct fileSystem *vfsFindFS(int vfsType) {
+00059   struct fileSystem *tmp = 0x0;
+00060 
+00061   /* Search For File System */
+00062   for (tmp=systemVitals->fileSystems;tmp;tmp=tmp->next) {
+00063     /* If Found Return File System */
+00064     if (tmp->vfsType == vfsType) {
+00065       return(tmp);
+00066       }
+00067     }
+00068 
+00069   /* If FS Not Found Return NULL */
+00070   return(0x0);
+00071   }
+00072 
+00073 int vfsRegisterFS(struct fileSystem newFS) {
+00074 /*
+00075 int vfsType,
+00076 void *vfsInitFS,
+00077 void *vfsRead,
+00078 void *vfsWrite,
+00079 void *vfsOpenFile,
+00080 void *vfsUnlink,
+00081 void *vfsMakeDir,
+00082 void *vfsRemDir,
+00083 void *vfsSync) {
+00084  */
+00085   struct fileSystem *tmpFs = 0x0;
+00086 
+00087   if (vfsFindFS(newFS.vfsType) != 0x0) {
+00088     kprintf("FS Is already Registered\n"); 
+00089     return(0x1);
+00090     }
+00091 
+00092   /* Allocate Memory */
+00093   tmpFs = (struct fileSystem *)kmalloc(sizeof(struct fileSystem));
+00094   if (tmpFs == NULL) {
+00095         kprintf("vfsRegisterFS: memory allocation failed\n");
+00096     /* Memory Allocation Failed */
+00097     return(0x1);
+00098     }
+00099 
+00100   /* Set Up FS Defaults */
+00101 
+00102 /* 2004 7-16-2004 mji 
+00103  * Old method:
+00104  * tmpFs->vfsType       = newFS.vfsType;
+00105  * tmpFs->vfsInitFS     = newFS.vfsInitFS;
+00106  * tmpFs->vfsRead       = newFS.vfsRead;
+00107  * tmpFs->vfsWrite      = newFS.vfsWrite;
+00108  * tmpFs->vfsOpenFile   = newFS.vfsOpenFile;
+00109  * tmpFs->vfsUnlink     = newFS.vfsUnlink;
+00110  * tmpFs->vfsMakeDir    = newFS.vfsMakeDir;
+00111  * tmpFs->vfsRemDir     = newFS.vfsRemDir;
+00112  * tmpFs->vfsSync       = newFS.vfsSync;
+00113  */
+00114  /* new method: */
+00115 
+00116   memcpy(tmpFs, &newFS, sizeof(struct fileSystem)); 
+00117   if (!systemVitals->fileSystems) {
+00118     tmpFs->prev               = 0x0;
+00119     tmpFs->next               = 0x0;
+00120     systemVitals->fileSystems = tmpFs;
+00121     }
+00122   else {
+00123     tmpFs->prev                     = 0x0;
+00124     tmpFs->next                     = systemVitals->fileSystems;
+00125     systemVitals->fileSystems->prev = tmpFs;
+00126     systemVitals->fileSystems       = tmpFs;
+00127     }
+00128 
+00129   return(0x0);
+00130   }
+00131 
+00132 /***
+00133  END
+00134  ***/
+00135 
+

Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/vfs_8c.html b/doc/html/vfs_8c.html new file mode 100644 index 0000000..d495ecd --- /dev/null +++ b/doc/html/vfs_8c.html @@ -0,0 +1,132 @@ + + +UbixOS V2: src/sys/vfs/vfs.c File Reference + + + + +
+
+
+
+ +

vfs.c File Reference

+

+#include <vfs/vfs.h>
+#include <ubixos/vitals.h>
+#include <lib/kmalloc.h>
+#include <lib/kprintf.h>
+#include <lib/string.h>
+ +

+Go to the source code of this file. + + + + + + + + +

Functions

int vfs_init ()
fileSystemvfsFindFS (int vfsType)
int vfsRegisterFS (struct fileSystem newFS)
+


Function Documentation

+ +
+
+ + + + + + + + +
int vfs_init (  ) 
+
+
+ +

+ +

+Definition at line 47 of file vfs.c. +

+References kprintf(), and systemVitals. +

+

+ +

+
+ + + + + + + + + +
struct fileSystem* vfsFindFS (int  vfsType  ) 
+
+
+ +

+ +

+Definition at line 58 of file vfs.c. +

+References fileSystem::next, systemVitals, and fileSystem::vfsType. +

+Referenced by vfs_mount(), and vfsRegisterFS(). +

+

+ +

+
+ + + + + + + + + +
int vfsRegisterFS (struct fileSystem  newFS  ) 
+
+
+ +

+ +

+Definition at line 73 of file vfs.c. +

+References kmalloc(), kprintf(), memcpy(), fileSystem::next, NULL, fileSystem::prev, systemVitals, vfsFindFS(), fileSystem::vfsType, and x1. +

+Referenced by devfs_init(), ubixfs_init(), and ufs_init(). +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/vfs_8cpp-source.html b/doc/html/vfs_8cpp-source.html new file mode 100644 index 0000000..1907780 --- /dev/null +++ b/doc/html/vfs_8cpp-source.html @@ -0,0 +1,59 @@ + + +UbixOS V2: src/sys/ubixfsv2/vfs.cpp Source File + + + + +
+
+
+
+ +

vfs.cpp

Go to the documentation of this file.
00001 #include <stdio.h>
+00002 #include "vfs.h"
+00003 
+00004 DiskFS::DiskFS(const char * filename) {
+00005   diskFile = fopen(filename, "r+");
+00006 } // DiskFS::DiskFS
+00007 
+00008 int
+00009 DiskFS::write(const void * data, long offset, long size) {
+00010   if (diskFile == NULL) return 1;
+00011   fseek(diskFile, offset, SEEK_SET);
+00012   fwrite(data, size, 1, diskFile);
+00013   return 0;
+00014 } // DiskFS::write
+00015 
+00016 int
+00017 DiskFS::read(void * data, long offset, long size) {
+00018   if (diskFile == NULL) return 1;
+00019   fseek(diskFile, offset, SEEK_SET);
+00020   fread(data, size, 1, diskFile);
+00021   return 0;
+00022 } // DiskFS::read
+

Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/vfs_8cpp.html b/doc/html/vfs_8cpp.html new file mode 100644 index 0000000..89b83cc --- /dev/null +++ b/doc/html/vfs_8cpp.html @@ -0,0 +1,46 @@ + + +UbixOS V2: src/sys/ubixfsv2/vfs.cpp File Reference + + + + +
+
+
+
+ +

vfs.cpp File Reference

+

+#include <stdio.h>
+#include "vfs.h"
+ +

+Go to the source code of this file. + +
+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/video_8c-source.html b/doc/html/video_8c-source.html new file mode 100644 index 0000000..25288a3 --- /dev/null +++ b/doc/html/video_8c-source.html @@ -0,0 +1,167 @@ + + +UbixOS V2: src/sys/sys/video.c Source File + + + + +
+
+
+
+ +

video.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2005 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <sys/io.h>
+00031 #include <sys/video.h>
+00032 #include <ubixos/types.h>
+00033 #include <ubixos/spinlock.h>
+00034 #include <ubixos/tty.h>
+00035 
+00036 static unsigned char  *videoBuffer = (char *)0xB8000;
+00037 int                    printColor = defaultColor;
+00038 
+00039 
+00040 void backSpace() {
+00041   uInt32 bufferOffset = 0x0;
+00042   outportByte(0x3d4, 0x0e);
+00043   bufferOffset = inportByte(0x3d5);
+00044   bufferOffset <<= 0x8; /* Shift Address Left 8 Bits */
+00045   outportByte(0x3d4, 0x0f);
+00046   bufferOffset += inportByte(0x3d5);
+00047   bufferOffset <<= 0x1; /* Shift Address Left 1 Bits */
+00048   videoBuffer[bufferOffset--] = 0x20;
+00049   videoBuffer[bufferOffset--] = printColor;
+00050   videoBuffer[bufferOffset]   = 0x20;
+00051   bufferOffset >>= 0x1;
+00052   tty_foreground->tty_x = (bufferOffset &  0xFF);
+00053   tty_foreground->tty_y = (bufferOffset >> 0x8);
+00054   outportByte(0x3D4, 0x0f);
+00055   outportByte(0x3D5, tty_foreground->tty_x);
+00056   outportByte(0x3D4, 0x0e);
+00057   outportByte(0x3D5, tty_foreground->tty_y);
+00058   return;
+00059   }
+00060 
+00061 void 
+00062 kprint(char *string)
+00063 {
+00064 
+00065   unsigned int    bufferOffset = 0x0, character = 0x0, i = 0x0;
+00066 
+00067   /* Short circuit if we're in tty mode */
+00068   if (NULL != tty_foreground)
+00069   {
+00070       tty_print(string,tty_find(0));
+00071       return;
+00072   }
+00073 
+00074   /* We Need To Get The Y Position */
+00075   outportByte(0x3D4, 0x0e);
+00076   bufferOffset = inportByte(0x3D5);
+00077   bufferOffset <<= 8;           /* Shift Address Left 8 Bits */
+00078   /* Then We Need To Add The X Position */
+00079   outportByte(0x3D4, 0x0f);
+00080   bufferOffset += inportByte(0x3D5);
+00081   bufferOffset <<= 1;           /* Shift Address Left 1 Bits */
+00082 
+00083   while ((character = *string++)) {
+00084     switch (character) {
+00085     case '\n':
+00086       bufferOffset = (bufferOffset / 160) * 160 + 160;
+00087       break;
+00088     default:
+00089       videoBuffer[bufferOffset++] = character;
+00090       videoBuffer[bufferOffset++] = printColor;
+00091       break;
+00092     }                           /* switch */
+00093     /* Check To See If We Are Out Of Bounds */
+00094     if (bufferOffset >= 160 * 25) {
+00095       for (i = 0; i < 160 * 24; i++) {
+00096         videoBuffer[i] = videoBuffer[i + 160];
+00097       }                         /* for */
+00098       for (i = 0; i < 80; i++) {
+00099         videoBuffer[(160 * 24) + (i * 2)] = 0x20;
+00100         videoBuffer[(160 * 24) + (i * 2) + 1] = printColor;
+00101       }                         /* for */
+00102       bufferOffset -= 160;
+00103     }                           /* if */
+00104   }                             /* while */
+00105   bufferOffset >>= 1;           /* Set the new cursor position  */
+00106   outportByte(0x3D4, 0x0f);
+00107   outportByte(0x3D5, ((bufferOffset & 0x0ff) & 0xFF));
+00108   outportByte(0x3D4, 0x0e);
+00109   outportByte(0x3D5, ((bufferOffset >> 8) & 0xFF));
+00110 
+00111   return;
+00112 }
+00113 
+00114 /* Clears The Screen */
+00115 void clearScreen() {
+00116   short i = 0x0;
+00117 
+00118   for (i = 0x0; i < (80 * 25); i++) {
+00119     videoBuffer[i * 2] = 0x20;
+00120     videoBuffer[i * 2 + 1] = defaultColor;
+00121     }
+00122   outportByte(0x3D4, 0x0f);
+00123   outportByte(0x3D5, 0);
+00124   outportByte(0x3D4, 0x0e);
+00125   outportByte(0x3D5, 0);
+00126   }
+00127 
+00128 /***
+00129  END
+00130  ***/
+

Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/video_8c.html b/doc/html/video_8c.html new file mode 100644 index 0000000..07675a8 --- /dev/null +++ b/doc/html/video_8c.html @@ -0,0 +1,175 @@ + + +UbixOS V2: src/sys/sys/video.c File Reference + + + + +
+
+
+
+ +

video.c File Reference

+

+#include <sys/io.h>
+#include <sys/video.h>
+#include <ubixos/types.h>
+#include <ubixos/spinlock.h>
+#include <ubixos/tty.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + +

Functions

void backSpace ()
void clearScreen ()
void kprint (char *string)

Variables

int printColor = defaultColor
static unsigned char * videoBuffer = (char *)0xB8000
+


Function Documentation

+ +
+
+ + + + + + + + +
void backSpace (  ) 
+
+
+ +

+ +

+Definition at line 40 of file video.c. +

+References inportByte(), outportByte(), printColor, tty_foreground, tty_termNode::tty_x, tty_termNode::tty_y, and videoBuffer. +

+Referenced by keyboardHandler(). +

+

+ +

+
+ + + + + + + + +
void clearScreen (  ) 
+
+
+ +

+ +

+Definition at line 115 of file video.c. +

+References defaultColor, outportByte(), videoBuffer, and x20. +

+Referenced by kmain(). +

+

+ +

+
+ + + + + + + + + +
void kprint (char *  string  ) 
+
+
+ +

+ +

+Definition at line 62 of file video.c. +

+References inportByte(), NULL, outportByte(), printColor, tty_find(), tty_foreground, tty_print(), videoBuffer, and x20. +

+Referenced by fdcRw(), kmain(), and kprintf(). +

+

+


Variable Documentation

+ +
+
+ + + + +
int printColor = defaultColor
+
+
+ +

+ +

+Definition at line 37 of file video.c. +

+Referenced by backSpace(), and kprint(). +

+

+ +

+
+ + + + +
unsigned char* videoBuffer = (char *)0xB8000 [static]
+
+
+ +

+ +

+Definition at line 36 of file video.c. +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/video_8h-source.html b/doc/html/video_8h-source.html new file mode 100644 index 0000000..8331a80 --- /dev/null +++ b/doc/html/video_8h-source.html @@ -0,0 +1,98 @@ + + +UbixOS V2: src/sys/include/sys/video.h Source File + + + + +
+
+
+
+ +

video.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _VIDEO_H
+00031 #define _VIDEO_H
+00032 
+00033 #include <ubixos/types.h>
+00034 
+00035 #define defaultColor 0x0F
+00036 
+00037 extern int printColor;
+00038 
+00039 void clearScreen();
+00040 void kprint(char *string);
+00041 void backSpace();
+00042 
+00043 #endif
+00044 
+00045 /***
+00046  $Log$
+00047  Revision 1.1.1.1  2006/06/01 12:46:15  reddawg
+00048  ubix2
+00049 
+00050  Revision 1.2  2005/10/12 00:13:37  reddawg
+00051  Removed
+00052 
+00053  Revision 1.1.1.1  2005/09/26 17:23:53  reddawg
+00054  no message
+00055 
+00056  Revision 1.2  2004/05/21 15:12:17  reddawg
+00057  Cleaned up
+00058 
+00059 
+00060  END
+00061  ***/
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/video_8h.html b/doc/html/video_8h.html new file mode 100644 index 0000000..dc931c9 --- /dev/null +++ b/doc/html/video_8h.html @@ -0,0 +1,175 @@ + + +UbixOS V2: src/sys/include/sys/video.h File Reference + + + + +
+
+
+
+ +

video.h File Reference

+

+#include <ubixos/types.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + +

Defines

#define defaultColor   0x0F

Functions

void backSpace ()
void clearScreen ()
void kprint (char *string)

Variables

int printColor
+


Define Documentation

+ +
+
+ + + + +
#define defaultColor   0x0F
+
+
+ +

+ +

+Definition at line 35 of file video.h. +

+Referenced by clearScreen(). +

+

+


Function Documentation

+ +
+
+ + + + + + + + +
void backSpace (  ) 
+
+
+ +

+ +

+Definition at line 40 of file video.c. +

+References inportByte(), outportByte(), printColor, tty_foreground, tty_termNode::tty_x, tty_termNode::tty_y, and videoBuffer. +

+Referenced by keyboardHandler(). +

+

+ +

+
+ + + + + + + + +
void clearScreen (  ) 
+
+
+ +

+ +

+Definition at line 115 of file video.c. +

+References defaultColor, outportByte(), videoBuffer, and x20. +

+Referenced by kmain(). +

+

+ +

+
+ + + + + + + + + +
void kprint (char *  string  ) 
+
+
+ +

+ +

+Definition at line 62 of file video.c. +

+References inportByte(), NULL, outportByte(), printColor, tty_find(), tty_foreground, tty_print(), videoBuffer, and x20. +

+Referenced by fdcRw(), kmain(), and kprintf(). +

+

+


Variable Documentation

+ +
+
+ + + + +
int printColor
+
+
+ +

+ +

+Definition at line 37 of file video.c. +

+Referenced by backSpace(), and kprint(). +

+

+


Generated on Sun Dec 3 02:38:07 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/vitals_8c-source.html b/doc/html/vitals_8c-source.html new file mode 100644 index 0000000..423deea --- /dev/null +++ b/doc/html/vitals_8c-source.html @@ -0,0 +1,113 @@ + + +UbixOS V2: src/sys/kernel/vitals.c Source File + + + + +
+
+
+
+ +

vitals.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <ubixos/vitals.h>
+00031 #include <ubixos/kpanic.h>
+00032 #include <lib/kprintf.h>
+00033 #include <lib/kmalloc.h>
+00034 #include <string.h>
+00035 
+00036 vitalsNode *systemVitals = 0x0;
+00037 
+00038 /************************************************************************
+00039 
+00040 Function: vitals_init();
+00041 Description: This will enable the vitals subsystem for ubixos
+00042 
+00043 Notes:
+00044 
+00045 02/20/2004 - Approved Its Quality
+00046 
+00047 ************************************************************************/
+00048 int vitals_init() {
+00049         /* Initialize Memory For The System Vitals Node */
+00050         kprintf("A");
+00051         systemVitals = (vitalsNode *) kmalloc(sizeof(vitalsNode));
+00052         kprintf("B");
+00053 
+00054         /* If malloc Failed Then Error */
+00055         if (systemVitals == 0x0)
+00056         {
+00057                 kpanic("Error: kmalloc Failed In initVitals\n");
+00058         }
+00059 
+00060         /* Set all default values */
+00061         memset(systemVitals,0x0,sizeof(vitalsNode));
+00062   
+00063         systemVitals->quantum     = 8;
+00064         systemVitals->dQuantum    = 8;
+00065 
+00066         /* Print Out Info For Vitals: */
+00067         kprintf("vitals0 - Address: [0x%X]\n",systemVitals);
+00068 
+00069         /* Return so kernel knows that there is no problem */
+00070         return(0x0);
+00071 }
+00072 
+00073 /***
+00074  END
+00075  ***/
+00076 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/vitals_8c.html b/doc/html/vitals_8c.html new file mode 100644 index 0000000..ab7424d --- /dev/null +++ b/doc/html/vitals_8c.html @@ -0,0 +1,97 @@ + + +UbixOS V2: src/sys/kernel/vitals.c File Reference + + + + +
+
+
+
+ +

vitals.c File Reference

+

+#include <ubixos/vitals.h>
+#include <ubixos/kpanic.h>
+#include <lib/kprintf.h>
+#include <lib/kmalloc.h>
+#include <string.h>
+ +

+Go to the source code of this file. + + + + + + + +

Functions

int vitals_init ()

Variables

vitalsNode * systemVitals = 0x0
+


Function Documentation

+ +
+
+ + + + + + + + +
int vitals_init (  ) 
+
+
+ +

+ +

+Definition at line 48 of file vitals.c. +

+References kmalloc(), kpanic(), kprintf(), memset(), and systemVitals. +

+

+


Variable Documentation

+ +
+
+ + + + +
vitalsNode* systemVitals = 0x0
+
+
+ +

+ +

+Definition at line 36 of file vitals.c. +

+

+


Generated on Sun Dec 3 02:38:09 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/vitals_8h-source.html b/doc/html/vitals_8h-source.html new file mode 100644 index 0000000..72abc43 --- /dev/null +++ b/doc/html/vitals_8h-source.html @@ -0,0 +1,127 @@ + + +UbixOS V2: src/sys/include/ubixos/vitals.h Source File + + + + +
+
+
+
+ +

vitals.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _VITALS_H
+00031 #define _VITALS_H
+00032 
+00033 #include <ubixos/types.h>
+00034 #include <ubixos/ubthread.h>
+00035 #include <vfs/mount.h>
+00036 #include <vfs/vfs.h>
+00037 
+00038 typedef struct vitalsStruct {
+00039   uInt32                openFiles;
+00040   uInt32                sysTicks;
+00041   uInt32                sysUptime;
+00042   uInt32                quantum;
+00043   uInt32                dQuantum;
+00044   uInt32                freePages;
+00045   struct fileSystem    *fileSystems;
+00046   vfs_mountPoint_t     *mountPoints;
+00047   uInt32                timeStart;
+00048   void                 *screen;
+00049   void                 *font;
+00050   char                 *packet;
+00051   uInt32               packetLength;
+00052   } vitalsNode;
+00053 
+00054 extern vitalsNode *systemVitals;
+00055 
+00056 int vitals_init();
+00057 
+00058 #endif
+00059 
+00060 /***
+00061  $Log$
+00062  Revision 1.1.1.1  2006/06/01 12:46:14  reddawg
+00063  ubix2
+00064 
+00065  Revision 1.2  2005/10/12 00:13:37  reddawg
+00066  Removed
+00067 
+00068  Revision 1.1.1.1  2005/09/26 17:23:57  reddawg
+00069  no message
+00070 
+00071  Revision 1.6  2004/07/23 09:10:06  reddawg
+00072  ubixfs: cleaned up some functions played with the caching a bit
+00073  vfs:    renamed a bunch of functions
+00074  cleaned up a few misc bugs
+00075 
+00076  Revision 1.5  2004/07/09 13:03:50  reddawg
+00077  vitals: named vitalsInit to vitals_init
+00078  Adjusted Startup Routines
+00079 
+00080  Revision 1.4  2004/06/18 13:01:47  solar
+00081  Added nice and timeSlice members to the kTask_t type
+00082 
+00083  Revision 1.3  2004/06/16 12:04:18  reddawg
+00084  systemVitals->quantum = (1000/msPerQuantum)
+00085  The timer int now will call scheduler at the rate of the defined quantum
+00086 
+00087  Revision 1.2  2004/05/21 15:20:00  reddawg
+00088  Cleaned up
+00089  END
+00090  ***/
+

Generated on Fri Dec 1 14:04:27 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/vitals_8h.html b/doc/html/vitals_8h.html new file mode 100644 index 0000000..70d67fc --- /dev/null +++ b/doc/html/vitals_8h.html @@ -0,0 +1,120 @@ + + +UbixOS V2: src/sys/include/ubixos/vitals.h File Reference + + + + +
+
+
+
+ +

vitals.h File Reference

+

+#include <ubixos/types.h>
+#include <ubixos/ubthread.h>
+#include <vfs/mount.h>
+#include <vfs/vfs.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + +

Data Structures

struct  vitalsStruct

Typedefs

typedef vitalsStruct vitalsNode

Functions

int vitals_init ()

Variables

vitalsNodesystemVitals
+


Typedef Documentation

+ +
+
+ + + + +
typedef struct vitalsStruct vitalsNode
+
+
+ +

+ +

+

+


Function Documentation

+ +
+
+ + + + + + + + +
int vitals_init (  ) 
+
+
+ +

+ +

+Definition at line 48 of file vitals.c. +

+References vitalsStruct::dQuantum, kmalloc(), kpanic(), kprintf(), memset(), vitalsStruct::quantum, and systemVitals. +

+

+


Variable Documentation

+ +
+
+ + + + +
vitalsNode* systemVitals
+
+ +

+


Generated on Fri Dec 1 14:04:29 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/vmm_8h-source.html b/doc/html/vmm_8h-source.html new file mode 100644 index 0000000..cd14635 --- /dev/null +++ b/doc/html/vmm_8h-source.html @@ -0,0 +1,124 @@ + + +UbixOS V2: src/sys/include/vmm/vmm.h Source File + + + + +
+
+
+
+ +

vmm.h

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #ifndef _VMM_H
+00031 #define _VMM_H
+00032 
+00033 #include <vmm/paging.h>
+00034 #include <ubixos/types.h>
+00035 
+00036 #define memAvail     1
+00037 #define memNotavail  2
+00038 #define vmmID       -3
+00039 #define vmmMemoryMapAddr 0xE6667000
+00040 
+00041 typedef struct {
+00042   uInt32  pageAddr;
+00043   uInt16 status;
+00044   uInt16 reserved;
+00045   pid_t  pid;
+00046   int    cowCounter;
+00047   } mMap;
+00048 
+00049 extern int numPages;
+00050 extern mMap *vmmMemoryMap;
+00051 
+00052 int vmm_init();
+00053 int vmmMemMapInit();
+00054 int countMemory();
+00055 u_int32_t vmmFindFreePage(pidType pid);
+00056 int freePage(uInt32 pageAddr);
+00057 int adjustCowCounter(uInt32 baseAddr,int adjustment);
+00058 void vmmFreeProcessPages(pidType pid);
+00059 
+00060 #endif
+00061 
+00062 /***
+00063  $Log$
+00064  Revision 1.1.1.1  2006/06/01 12:46:13  reddawg
+00065  ubix2
+00066 
+00067  Revision 1.2  2005/10/12 00:13:37  reddawg
+00068  Removed
+00069 
+00070  Revision 1.1.1.1  2005/09/26 17:23:59  reddawg
+00071  no message
+00072 
+00073  Revision 1.6  2004/07/21 17:39:04  reddawg
+00074  removed device
+00075 
+00076  Revision 1.5  2004/07/19 02:08:28  reddawg
+00077  Cleaned out the rest of debuging code also temporarily disabled the ip stack to improve boot time
+00078 
+00079  Revision 1.4  2004/07/09 12:18:19  reddawg
+00080  Updating Initialization Procedures
+00081 
+00082  Revision 1.3  2004/05/21 15:21:04  reddawg
+00083  Cleaned up
+00084 
+00085 
+00086  END
+00087  ***/
+

Generated on Sun Dec 3 02:38:03 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/vmm_8h.html b/doc/html/vmm_8h.html new file mode 100644 index 0000000..feab3ff --- /dev/null +++ b/doc/html/vmm_8h.html @@ -0,0 +1,394 @@ + + +UbixOS V2: src/sys/include/vmm/vmm.h File Reference + + + + +
+
+
+
+ +

vmm.h File Reference

+

+#include <vmm/paging.h>
+#include <ubixos/types.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  mMap

Defines

#define memAvail   1
#define memNotavail   2
#define vmmID   -3
#define vmmMemoryMapAddr   0xE6667000

Functions

int adjustCowCounter (uInt32 baseAddr, int adjustment)
int countMemory ()
int freePage (uInt32 pageAddr)
int vmm_init ()
u_int32_t vmmFindFreePage (pidType pid)
void vmmFreeProcessPages (pidType pid)
int vmmMemMapInit ()

Variables

int numPages
mMapvmmMemoryMap
+


Define Documentation

+ +
+
+ + + + +
#define memAvail   1
+
+
+ +

+ +

+Definition at line 36 of file vmm.h. +

+Referenced by adjustCowCounter(), freePage(), vmmFindFreePage(), vmmFreeProcessPages(), and vmmMemMapInit(). +

+

+ +

+
+ + + + +
#define memNotavail   2
+
+
+ +

+ +

+Definition at line 37 of file vmm.h. +

+Referenced by vmmFindFreePage(), and vmmMemMapInit(). +

+

+ +

+
+ + + + +
#define vmmID   -3
+
+
+ +

+ +

+Definition at line 38 of file vmm.h. +

+Referenced by adjustCowCounter(), vmmFreeProcessPages(), and vmmMemMapInit(). +

+

+ +

+
+ + + + +
#define vmmMemoryMapAddr   0xE6667000
+
+
+ +

+ +

+Definition at line 39 of file vmm.h. +

+Referenced by vmm_pagingInit(). +

+

+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
int adjustCowCounter (uInt32  baseAddr,
int  adjustment 
)
+
+
+ +

+Function: int adjustCowCounter(uInt32 baseAddr,int adjustment);

+Description: This Adjust The COW Counter For Page At baseAddr It Will Error If The Count Goes Below 0

+Notes:

+08/01/02 - I Think If Counter Gets To 0 I Should Free The Page +

+Definition at line 270 of file vmm_memory.c. +

+References assert, mMap::cowCounter, freePages, memAvail, mMap::pid, spinLock(), spinUnlock(), mMap::status, systemVitals, vmmCowSpinLock, vmmID, and vmmMemoryMap. +

+Referenced by freePage(), vmm_pageFault(), vmmCopyVirtualSpace(), and vmmFreeProcessPages(). +

+

+ +

+
+ + + + + + + + +
int countMemory (  ) 
+
+
+ +

+Function: int countMemory(); Description: This Function Counts The Systems Physical Memory Notes:

+02/20/2004 - Inspect For Quality And Approved +

+Definition at line 107 of file vmm_memory.c. +

+References cr0, inportByte(), and outportByte(). +

+Referenced by vmmMemMapInit(). +

+

+ +

+
+ + + + + + + + + +
int freePage (uInt32  pageAddr  ) 
+
+
+ +

+Function: int freePage(uInt32 pageAddr);

+Description: This Function Marks The Page As Free

+Notes: +

+Definition at line 232 of file vmm_memory.c. +

+References adjustCowCounter(), assert, mMap::cowCounter, freePages, memAvail, mMap::pid, spinLock(), spinUnlock(), mMap::status, systemVitals, vmmMemoryMap, and vmmSpinLock. +

+Referenced by vmm_remapPage(). +

+

+ +

+
+ + + + + + + + +
int vmm_init (  ) 
+
+
+ +

+Function: int vmm_init()

+Description: Initializes the vmm subsystem

+Notes: +

+Definition at line 41 of file vmm_init.c. +

+References K_PANIC, vmm_pagingInit(), and vmmMemMapInit(). +

+

+ +

+
+ + + + + + + + + +
u_int32_t vmmFindFreePage (pidType  pid  ) 
+
+
+ +

+Function: uInt32 vmmFindFreePage(pid_t pid);

+Description: This Returns A Free Physical Page Address Then Marks It Not Available As Well As Setting The PID To The Proccess Allocating This Page Notes: +

+Definition at line 189 of file vmm_memory.c. +

+References freePages, kpanic(), memAvail, memNotavail, numPages, mMap::pid, spinLock(), spinUnlock(), status, sysctl_enabled, sysID, systemVitals, TRUE, vmmMemoryMap, and vmmSpinLock. +

+Referenced by execFile(), kmod_load(), ldEnable(), obreak(), sysExec(), vmm_getFreeMallocPage(), vmm_pageFault(), vmm_pagingInit(), vmm_remapPage(), vmmGetFreeKernelPage(), vmmGetFreePage(), and vmmGetFreeVirtualPage(). +

+

+ +

+
+ + + + + + + + + +
void vmmFreeProcessPages (pidType  pid  ) 
+
+
+ +

+Function: void vmmFreeProcessPages(pid_t pid);

+Description: This Function Will Free Up Memory For The Exiting Process

+Notes:

+08/04/02 - Added Checking For COW Pages First +

+Definition at line 300 of file vmm_memory.c. +

+References adjustCowCounter(), mMap::cowCounter, freePages, memAvail, numPages, PAGE_COW, pageEntries, parentPageDirAddr, mMap::pid, spinLock(), spinUnlock(), status, systemVitals, tablesBaseAddress, vmmID, vmmMemoryMap, vmmSpinLock, and x1000. +

+Referenced by systemTask(). +

+

+ +

+
+ + + + + + + + +
int vmmMemMapInit (  ) 
+
+
+ +

+Function: void vmmMemMapInit(); Description: This Function Initializes The Memory Map For the System Notes:

+02/20/2004 - Made It Report Real And Available Memory +

+Definition at line 60 of file vmm_memory.c. +

+References countMemory(), freePages, kprintf(), memAvail, memNotavail, numPages, mMap::pageAddr, mMap::pid, mMap::status, status, vmmID, vmmMemoryMap, and x1000. +

+Referenced by vmm_init(). +

+

+


Variable Documentation

+ +
+
+ + + + +
int numPages
+
+
+ +

+ +

+Definition at line 47 of file vmm_memory.c. +

+Referenced by vmm_pagingInit(), vmmFindFreePage(), vmmFreeProcessPages(), and vmmMemMapInit(). +

+

+ +

+
+ + + + +
mMap* vmmMemoryMap
+
+ +

+


Generated on Sun Dec 3 02:38:08 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/vmm__init_8c-source.html b/doc/html/vmm__init_8c-source.html new file mode 100644 index 0000000..8fdd4b6 --- /dev/null +++ b/doc/html/vmm__init_8c-source.html @@ -0,0 +1,83 @@ + + +UbixOS V2: src/sys/vmm/vmm_init.c Source File + + + + +
+
+
+
+ +

vmm_init.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <vmm/vmm.h>
+00031 #include <ubixos/kpanic.h>
+00032 
+00041 int vmm_init() {
+00042   if (vmmMemMapInit() != 0x0)
+00043     K_PANIC("Couldn't Initialize vmmMemMap");
+00044 
+00045   if (vmm_pagingInit() != 0x0)
+00046     K_PANIC("Couldn't Initialize paging system");
+00047 
+00048   return (0x0);
+00049   }
+00050 
+00051 /***
+00052  END
+00053  ***/
+00054 
+

Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/vmm__init_8c.html b/doc/html/vmm__init_8c.html new file mode 100644 index 0000000..2b90de3 --- /dev/null +++ b/doc/html/vmm__init_8c.html @@ -0,0 +1,75 @@ + + +UbixOS V2: src/sys/vmm/vmm_init.c File Reference + + + + +
+
+
+
+ +

vmm_init.c File Reference

+

+#include <vmm/vmm.h>
+#include <ubixos/kpanic.h>
+ +

+Go to the source code of this file. + + + + +

Functions

int vmm_init ()
+


Function Documentation

+ +
+
+ + + + + + + + +
int vmm_init (  ) 
+
+
+ +

+Function: int vmm_init()

+Description: Initializes the vmm subsystem

+Notes: +

+Definition at line 41 of file vmm_init.c. +

+References K_PANIC, vmm_pagingInit(), and vmmMemMapInit(). +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/vmm__memory_8c-source.html b/doc/html/vmm__memory_8c-source.html new file mode 100644 index 0000000..06f4726 --- /dev/null +++ b/doc/html/vmm__memory_8c-source.html @@ -0,0 +1,315 @@ + + +UbixOS V2: src/sys/vmm/vmm_memory.c Source File + + + + +
+
+
+
+ +

vmm_memory.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002-2004 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005  Redistribution and use in source and binary forms, with or without modification, are
+00006  permitted provided that the following conditions are met:
+00007 
+00008  Redistributions of source code must retain the above copyright notice, this list of
+00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010  form must reproduce the above copyright notice, this list of conditions, the following
+00011  disclaimer and the list of authors in the documentation and/or other materials provided
+00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013  contributors may be used to endorse or promote products derived from this software
+00014  without specific prior written permission.
+00015 
+00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Id$
+00027 
+00028 *****************************************************************************************/
+00029 
+00030 #include <vmm/vmm.h>
+00031 #include <sys/io.h>
+00032 #include <ubixos/kpanic.h>
+00033 #include <lib/kprintf.h>
+00034 #include <lib/kmalloc.h>
+00035 #include <sys/kern_sysctl.h>
+00036 #include <ubixos/spinlock.h>
+00037 #include <assert.h>
+00038 
+00042 static uInt32          freePages = 0;
+00043 static spinLock_t vmmSpinLock    = SPIN_LOCK_INITIALIZER;
+00044 static spinLock_t vmmCowSpinLock = SPIN_LOCK_INITIALIZER;
+00045 
+00046 
+00047 int             numPages = 0x0;
+00048 mMap           *vmmMemoryMap = (mMap *) 0x101000;
+00049 
+00050 
+00060 int vmmMemMapInit() {
+00061   int i        = 0x0;
+00062   int memStart = 0x0;
+00063 
+00064   /* Count System Memory */
+00065   numPages = countMemory();
+00066 
+00067   /* Set Memory Map To Point To First Physical Page That We Will Use */
+00068   vmmMemoryMap = (mMap *) 0x101000;
+00069 
+00070   /* Initialize Map Make All Pages Not Available */
+00071   for (i = 0x0; i < numPages; i++) {
+00072     vmmMemoryMap[i].cowCounter = 0x0;
+00073     vmmMemoryMap[i].status     = memNotavail;
+00074     vmmMemoryMap[i].pid        = vmmID;
+00075     vmmMemoryMap[i].pageAddr   = i * 4096;
+00076     }
+00077 
+00078   /* Calculate Start Of Free Memory */
+00079   memStart  = (0x101000 / 0x1000);
+00080   memStart += (((sizeof(mMap) * numPages) + (sizeof(mMap) - 1)) / 0x1000);
+00081 
+00082   /* Initialize All Free Pages To Available */
+00083   vmmMemoryMap[(0x100000 / 0x1000)].status = memAvail;
+00084   freePages++;
+00085   for (i = memStart; i < numPages; i++) {
+00086     vmmMemoryMap[i].status = memAvail;
+00087     freePages++;
+00088     }
+00089 
+00090   /* Print Out Amount Of Memory */
+00091   kprintf("Real Memory:      %iKB\n", numPages * 4);
+00092   kprintf("Available Memory: %iKB\n", freePages * 4);
+00093 
+00094   /* Return */
+00095   return (0);
+00096   }
+00097 
+00107 int countMemory() {
+00108   register uInt32 *mem = 0x0;
+00109   unsigned long    memCount = -1, tempMemory = 0x0;
+00110   unsigned short   memKb = 0;
+00111   unsigned char    irq1State, irq2State;
+00112   unsigned long    cr0 = 0x0;
+00113 
+00114   /*
+00115    * Save The States Of Both IRQ 1 And 2 So We Can Turn Them Off And Restore
+00116    * Them Later
+00117    */
+00118   irq1State = inportByte(0x21);
+00119   irq2State = inportByte(0xA1);
+00120 
+00121   /* Turn Off IRQ 1 And 2 To Prevent Chances Of Faults While Examining Memory */
+00122   outportByte(0x21, 0xFF);
+00123   outportByte(0xA1, 0xFF);
+00124 
+00125   /* Save The State Of Register CR0 */
+00126   asm volatile (
+00127     "movl %%cr0, %%ebx\n"
+00128     :               "=a" (cr0)
+00129     :
+00130     :               "ebx"
+00131     );
+00132 
+00133   asm volatile ("wbinvd");
+00134   asm volatile (
+00135     "movl %%ebx, %%cr0\n"
+00136     :
+00137     :               "a" (cr0 | 0x00000001 | 0x40000000 | 0x20000000)
+00138     :               "ebx"
+00139     );
+00140 
+00141   while (memKb < 4096 && memCount != 0) {
+00142     memKb++;
+00143     if (memCount == -1)
+00144       memCount = 0;
+00145     memCount += 1024 * 1024;
+00146     mem = (uInt32 *)memCount;
+00147     tempMemory = *mem;
+00148     *mem = 0x55AA55AA;
+00149     asm("": : :"memory");
+00150     if (*mem != 0x55AA55AA) {
+00151       memCount = 0;
+00152       }
+00153     else {
+00154       *mem = 0xAA55AA55;
+00155       asm("": : :"memory");
+00156       if (*mem != 0xAA55AA55) {
+00157         memCount = 0;
+00158         }
+00159       }
+00160     asm("": : :"memory");
+00161     *mem = tempMemory;
+00162     }
+00163 
+00164   asm volatile (
+00165     "movl %%ebx, %%cr0\n"
+00166     :
+00167     :               "a" (cr0)
+00168     :               "ebx"
+00169     );
+00170 
+00171   /* Restore States For Both IRQ 1 And 2 */
+00172   outportByte(0x21, irq1State);
+00173   outportByte(0xA1, irq2State);
+00174 
+00175   /* Return Amount Of Memory In Pages */
+00176   return ((memKb * 1024 * 1024) / 4096);
+00177   }
+00178 
+00189 uInt32 vmmFindFreePage(pidType pid) {
+00190   int i = 0x0;
+00191 
+00192   /* Lets Look For A Free Page */
+00193   if (pid < sysID)
+00194     kpanic("Error: invalid PID %i\n",pid);
+00195 
+00196   spinLock(&vmmSpinLock);
+00197 
+00198   for (i = 0; i <= numPages; i++) {
+00199 
+00200     /*
+00201      * If We Found A Free Page Set It To Not Available After That Set Its Own
+00202      * And Return The Address
+00203      */
+00204     if ((vmmMemoryMap[i].status == memAvail) && (vmmMemoryMap[i].cowCounter == 0)) {
+00205       vmmMemoryMap[i].status = memNotavail;
+00206       vmmMemoryMap[i].pid = pid;
+00207       freePages--;
+00208       if (sysctl_enabled == TRUE) {
+00209         systemVitals->freePages = freePages;
+00210         }
+00211 
+00212       spinUnlock(&vmmSpinLock);
+00213       return (vmmMemoryMap[i].pageAddr);
+00214       }
+00215     }
+00216 
+00217   /* If No Free Memory Is Found Return NULL */
+00218   kpanic("Out Of Memory!!!!");
+00219   return (0x0);
+00220   }
+00221 
+00222 
+00232 int freePage(uInt32 pageAddr) {
+00233   int pageIndex = 0x0;
+00234   assert((pageAddr & 0xFFF) == 0x0);
+00235   spinLock(&vmmSpinLock);
+00236 
+00237   /* Find The Page Index To The Memory Map */
+00238   pageIndex = (pageAddr / 4096);
+00239 
+00240   /* Check If Page COW Is Greater Then 0 If It Is Dec It If Not Free It */
+00241   if (vmmMemoryMap[pageIndex].cowCounter == 0) {
+00242     /* Set Page As Avail So It Can Be Used Again */
+00243     vmmMemoryMap[pageIndex].status = memAvail;
+00244     vmmMemoryMap[pageIndex].cowCounter = 0x0;
+00245     vmmMemoryMap[pageIndex].pid = -2;
+00246     freePages++;
+00247     systemVitals->freePages = freePages;
+00248     }
+00249   else {
+00250     /* Adjust The COW Counter */
+00251     adjustCowCounter(((uInt32) vmmMemoryMap[pageIndex].pageAddr), -1);
+00252     }
+00253   spinUnlock(&vmmSpinLock);
+00254   /* Return */
+00255   return (0);
+00256   }
+00257 
+00270 int adjustCowCounter(uInt32 baseAddr, int adjustment) {
+00271   int vmmMemoryMapIndex = (baseAddr / 4096);
+00272   assert((baseAddr & 0xFFF) == 0x0);
+00273   spinLock(&vmmCowSpinLock);
+00274   /* Adjust COW Counter */
+00275   vmmMemoryMap[vmmMemoryMapIndex].cowCounter += adjustment;
+00276 
+00277   if (vmmMemoryMap[vmmMemoryMapIndex].cowCounter == 0) {
+00278     vmmMemoryMap[vmmMemoryMapIndex].cowCounter = 0x0;
+00279     vmmMemoryMap[vmmMemoryMapIndex].pid = vmmID;
+00280     vmmMemoryMap[vmmMemoryMapIndex].status = memAvail;
+00281     freePages++;
+00282     systemVitals->freePages = freePages;
+00283     }
+00284   spinUnlock(&vmmCowSpinLock);
+00285   /* Return */
+00286   return (0);
+00287   }
+00288 
+00300 void vmmFreeProcessPages(pidType pid) {
+00301   int i=0,x=0;
+00302   uInt32 *tmpPageTable = 0x0;
+00303   uInt32 *tmpPageDir   = (uInt32 *)parentPageDirAddr;
+00304   spinLock(&vmmSpinLock);
+00305   /* Check Page Directory For An Avail Page Table */
+00306   for (i=0;i<=0x300;i++) {
+00307     if (tmpPageDir[i] != 0) {
+00308       /* Set Up Page Table Pointer */
+00309       tmpPageTable = (uInt32 *)(tablesBaseAddress + (i * 0x1000));
+00310       /* Check The Page Table For COW Pages */
+00311       for (x=0;x<pageEntries;x++) {
+00312         /* If The Page Is COW Adjust COW Counter */
+00313         if (((uInt32)tmpPageTable[x] & PAGE_COW) == PAGE_COW) {
+00314           adjustCowCounter(((uInt32)tmpPageTable[x] & 0xFFFFF000),-1);
+00315           }
+00316         }
+00317       }
+00318     }
+00319 
+00320   /* Loop Through Pages To Find Pages Owned By Process */
+00321   for (i=0;i<numPages;i++) {
+00322     if (vmmMemoryMap[i].pid == pid) {
+00323       /* Check To See If The cowCounter Is Zero If So We Can Ree It */
+00324       if (vmmMemoryMap[i].cowCounter == 0) {
+00325         vmmMemoryMap[i].status = memAvail;
+00326         vmmMemoryMap[i].cowCounter = 0x0;
+00327         vmmMemoryMap[i].pid = vmmID;
+00328         freePages++;
+00329         systemVitals->freePages = freePages;
+00330         }
+00331       }
+00332     }
+00333   /* Return */
+00334   spinUnlock(&vmmSpinLock);
+00335   return;
+00336   }
+00337 
+00338 /***
+00339  END
+00340  ***/
+00341 
+

Generated on Sun Dec 3 02:38:05 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/vmm__memory_8c.html b/doc/html/vmm__memory_8c.html new file mode 100644 index 0000000..e7acdbd --- /dev/null +++ b/doc/html/vmm__memory_8c.html @@ -0,0 +1,347 @@ + + +UbixOS V2: src/sys/vmm/vmm_memory.c File Reference + + + + +
+
+
+
+ +

vmm_memory.c File Reference

+

+#include <vmm/vmm.h>
+#include <sys/io.h>
+#include <ubixos/kpanic.h>
+#include <lib/kprintf.h>
+#include <lib/kmalloc.h>
+#include <sys/kern_sysctl.h>
+#include <ubixos/spinlock.h>
+#include <assert.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + +

Functions

int adjustCowCounter (uInt32 baseAddr, int adjustment)
int countMemory ()
int freePage (uInt32 pageAddr)
uInt32 vmmFindFreePage (pidType pid)
void vmmFreeProcessPages (pidType pid)
int vmmMemMapInit ()

Variables

static uInt32 freePages = 0
int numPages = 0x0
static spinLock_t vmmCowSpinLock = SPIN_LOCK_INITIALIZER
mMapvmmMemoryMap = (mMap *) 0x101000
static spinLock_t vmmSpinLock = SPIN_LOCK_INITIALIZER
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
int adjustCowCounter (uInt32  baseAddr,
int  adjustment 
)
+
+
+ +

+Function: int adjustCowCounter(uInt32 baseAddr,int adjustment);

+Description: This Adjust The COW Counter For Page At baseAddr It Will Error If The Count Goes Below 0

+Notes:

+08/01/02 - I Think If Counter Gets To 0 I Should Free The Page +

+Definition at line 270 of file vmm_memory.c. +

+References assert, mMap::cowCounter, freePages, memAvail, mMap::pid, spinLock(), spinUnlock(), mMap::status, systemVitals, vmmCowSpinLock, vmmID, and vmmMemoryMap. +

+Referenced by freePage(), vmm_pageFault(), vmmCopyVirtualSpace(), and vmmFreeProcessPages(). +

+

+ +

+
+ + + + + + + + +
int countMemory (  ) 
+
+
+ +

+Function: int countMemory(); Description: This Function Counts The Systems Physical Memory Notes:

+02/20/2004 - Inspect For Quality And Approved +

+Definition at line 107 of file vmm_memory.c. +

+References cr0, inportByte(), and outportByte(). +

+Referenced by vmmMemMapInit(). +

+

+ +

+
+ + + + + + + + + +
int freePage (uInt32  pageAddr  ) 
+
+
+ +

+Function: int freePage(uInt32 pageAddr);

+Description: This Function Marks The Page As Free

+Notes: +

+Definition at line 232 of file vmm_memory.c. +

+References adjustCowCounter(), assert, mMap::cowCounter, freePages, memAvail, mMap::pid, spinLock(), spinUnlock(), mMap::status, systemVitals, vmmMemoryMap, and vmmSpinLock. +

+Referenced by vmm_remapPage(). +

+

+ +

+
+ + + + + + + + + +
uInt32 vmmFindFreePage (pidType  pid  ) 
+
+
+ +

+Function: uInt32 vmmFindFreePage(pid_t pid);

+Description: This Returns A Free Physical Page Address Then Marks It Not Available As Well As Setting The PID To The Proccess Allocating This Page Notes: +

+Definition at line 189 of file vmm_memory.c. +

+References freePages, kpanic(), memAvail, memNotavail, numPages, mMap::pid, spinLock(), spinUnlock(), status, sysctl_enabled, sysID, systemVitals, TRUE, vmmMemoryMap, and vmmSpinLock. +

+Referenced by execFile(), kmod_load(), ldEnable(), obreak(), sysExec(), vmm_getFreeMallocPage(), vmm_pageFault(), vmm_pagingInit(), vmm_remapPage(), vmmGetFreeKernelPage(), vmmGetFreePage(), and vmmGetFreeVirtualPage(). +

+

+ +

+
+ + + + + + + + + +
void vmmFreeProcessPages (pidType  pid  ) 
+
+
+ +

+Function: void vmmFreeProcessPages(pid_t pid);

+Description: This Function Will Free Up Memory For The Exiting Process

+Notes:

+08/04/02 - Added Checking For COW Pages First +

+Definition at line 300 of file vmm_memory.c. +

+References adjustCowCounter(), mMap::cowCounter, freePages, memAvail, numPages, PAGE_COW, pageEntries, parentPageDirAddr, mMap::pid, spinLock(), spinUnlock(), status, systemVitals, tablesBaseAddress, vmmID, vmmMemoryMap, vmmSpinLock, and x1000. +

+Referenced by systemTask(). +

+

+ +

+
+ + + + + + + + +
int vmmMemMapInit (  ) 
+
+
+ +

+Function: void vmmMemMapInit(); Description: This Function Initializes The Memory Map For the System Notes:

+02/20/2004 - Made It Report Real And Available Memory +

+Definition at line 60 of file vmm_memory.c. +

+References countMemory(), freePages, kprintf(), memAvail, memNotavail, numPages, mMap::pageAddr, mMap::pid, status, mMap::status, vmmID, vmmMemoryMap, and x1000. +

+Referenced by vmm_init(). +

+

+


Variable Documentation

+ +
+
+ + + + +
uInt32 freePages = 0 [static]
+
+
+ +

+Internal variables +

+Definition at line 42 of file vmm_memory.c. +

+Referenced by adjustCowCounter(), freePage(), vmmFindFreePage(), vmmFreeProcessPages(), and vmmMemMapInit(). +

+

+ +

+
+ + + + +
int numPages = 0x0
+
+
+ +

+ +

+Definition at line 47 of file vmm_memory.c. +

+Referenced by vmm_pagingInit(), vmmFindFreePage(), vmmFreeProcessPages(), and vmmMemMapInit(). +

+

+ +

+
+ + + + +
spinLock_t vmmCowSpinLock = SPIN_LOCK_INITIALIZER [static]
+
+
+ +

+ +

+Definition at line 44 of file vmm_memory.c. +

+Referenced by adjustCowCounter(). +

+

+ +

+
+ + + + +
mMap* vmmMemoryMap = (mMap *) 0x101000
+
+ +

+ +

+
+ + + + +
spinLock_t vmmSpinLock = SPIN_LOCK_INITIALIZER [static]
+
+
+ +

+ +

+Definition at line 43 of file vmm_memory.c. +

+Referenced by freePage(), vmmFindFreePage(), and vmmFreeProcessPages(). +

+

+


Generated on Sun Dec 3 02:38:11 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/vsprintf_8c-source.html b/doc/html/vsprintf_8c-source.html new file mode 100644 index 0000000..e092cc5 --- /dev/null +++ b/doc/html/vsprintf_8c-source.html @@ -0,0 +1,322 @@ + + +UbixOS V2: src/sys/lib/vsprintf.c Source File + + + + +
+
+
+
+ +

vsprintf.c

Go to the documentation of this file.
00001 /*****************************************************************************************
+00002  Copyright (c) 2002 The UbixOS Project
+00003  All rights reserved.
+00004 
+00005 Redistribution and use in source and binary forms, with or without modification, are
+00006 permitted provided that the following conditions are met:
+00007 
+00008 Redistributions of source code must retain the above copyright notice, this list of
+00009 conditions, the following disclaimer and the list of authors.  Redistributions in binary
+00010 form must reproduce the above copyright notice, this list of conditions, the following
+00011 disclaimer and the list of authors in the documentation and/or other materials provided
+00012 with the distribution. Neither the name of the UbixOS Project nor the names of its
+00013 contributors may be used to endorse or promote products derived from this software
+00014 without specific prior written permission.
+00015 
+00016 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+00017 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+00018 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+00019 THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+00020 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+00021 OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+00022 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+00023 TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+00024 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+00025 
+00026  $Log$
+00027  Revision 1.1.1.1  2006/06/01 12:46:16  reddawg
+00028  ubix2
+00029 
+00030  Revision 1.2  2005/10/12 00:13:37  reddawg
+00031  Removed
+00032 
+00033  Revision 1.1.1.1  2005/09/26 17:24:14  reddawg
+00034  no message
+00035 
+00036  Revision 1.2  2004/06/28 23:12:58  reddawg
+00037  file format now container:/path/to/file
+00038 
+00039  Revision 1.1.1.1  2004/04/15 12:07:11  reddawg
+00040  UbixOS v1.0
+00041 
+00042  Revision 1.3  2004/04/13 16:36:33  reddawg
+00043  Changed our copyright, it is all now under a BSD-Style license
+00044 
+00045 
+00046 
+00047  $Id$
+00048 
+00049 *****************************************************************************************/
+00050 
+00051 /* vsprintf.c -- Lars Wirzenius & Linus Torvalds. */
+00052 /*
+00053  * Wirzenius wrote this portably, Torvalds fucked it up :-)
+00054  */
+00055 
+00056 #include <stdarg.h>
+00057 #include <lib/string.h>
+00058 
+00059 /* we use this so that we can do without the ctype library */
+00060 #define is_digit(c)     ((c) >= '0' && (c) <= '9')
+00061 
+00062 static int skip_atoi(const char **s)
+00063 {
+00064         int i=0;
+00065 
+00066         while (is_digit(**s))
+00067                 i = i*10 + *((*s)++) - '0';
+00068         return i;
+00069 }
+00070 
+00071 #define ZEROPAD 1               /* pad with zero */
+00072 #define SIGN    2               /* unsigned/signed long */
+00073 #define PLUS    4               /* show plus */
+00074 #define SPACE   8               /* space if plus */
+00075 #define LEFT    16              /* left justified */
+00076 #define SPECIAL 32              /* 0x */
+00077 #define SMALL   64              /* use 'abcdef' instead of 'ABCDEF' */
+00078 
+00079 #define do_div(n,base) ({ \
+00080 int __res; \
+00081 __asm__("divl %4":"=a" (n),"=d" (__res):"0" (n),"1" (0),"r" (base)); \
+00082 __res; })
+00083 
+00084 static char * number(char * str, int num, int base, int size, int precision
+00085         ,int type)
+00086 {
+00087         char c,sign,tmp[36];
+00088         const char *digits="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+00089         int i;
+00090 
+00091         if (type&SMALL) digits="0123456789abcdefghijklmnopqrstuvwxyz";
+00092         if (type&LEFT) type &= ~ZEROPAD;
+00093         if (base<2 || base>36)
+00094                 return 0;
+00095         c = (type & ZEROPAD) ? '0' : ' ' ;
+00096         if (type&SIGN && num<0) {
+00097                 sign='-';
+00098                 num = -num;
+00099         } else
+00100                 sign=(type&PLUS) ? '+' : ((type&SPACE) ? ' ' : 0);
+00101         if (sign) size--;
+00102         if (type&SPECIAL) {
+00103           if (base==16) { size -= 2; }
+00104                 else if (base==8) { size--; }
+00105           }
+00106         i=0;
+00107         if (num==0)
+00108                 tmp[i++]='0';
+00109         else while (num!=0)
+00110                 tmp[i++]=digits[do_div(num,base)];
+00111         if (i>precision) precision=i;
+00112         size -= precision;
+00113         if (!(type&(ZEROPAD+LEFT)))
+00114                 while(size-->0)
+00115                         *str++ = ' ';
+00116         if (sign)
+00117                 *str++ = sign;
+00118         if (type&SPECIAL) {
+00119           if (base==8) {
+00120             *str++ = '0';
+00121             }
+00122           else if (base==16) {
+00123                 *str++ = '0';
+00124                 *str++ = digits[33];
+00125                 }
+00126           }
+00127         if (!(type&LEFT))
+00128                 while(size-->0)
+00129                         *str++ = c;
+00130         while(i<precision--)
+00131                 *str++ = '0';
+00132         while(i-->0)
+00133                 *str++ = tmp[i];
+00134         while(size-->0)
+00135                 *str++ = ' ';
+00136         return str;
+00137 }
+00138 
+00139 int vsprintf(char *buf, const char *fmt, vaList args)
+00140 {
+00141         int len;
+00142         int i;
+00143         char * str;
+00144         char *s;
+00145         int *ip;
+00146 
+00147         int flags;              /* flags to number() */
+00148 
+00149         int field_width;        /* width of output field */
+00150         int precision;          /* min. # of digits for integers; max
+00151                                    number of chars for from string */
+00152         int qualifier;          /* 'h', 'l', or 'L' for integer fields */
+00153 
+00154         for (str=buf ; *fmt ; ++fmt) {
+00155                 if (*fmt != '%') {
+00156                         *str++ = *fmt;
+00157                         continue;
+00158                 }
+00159                         
+00160                 /* process flags */
+00161                 flags = 0;
+00162                 repeat:
+00163                         ++fmt;          /* this also skips first '%' */
+00164                         switch (*fmt) {
+00165                                 case '-': flags |= LEFT; goto repeat;
+00166                                 case '+': flags |= PLUS; goto repeat;
+00167                                 case ' ': flags |= SPACE; goto repeat;
+00168                                 case '#': flags |= SPECIAL; goto repeat;
+00169                                 case '0': flags |= ZEROPAD; goto repeat;
+00170                                 }
+00171                 
+00172                 /* get field width */
+00173                 field_width = -1;
+00174                 if (is_digit(*fmt))
+00175                         field_width = skip_atoi(&fmt);
+00176                 else if (*fmt == '*') {
+00177                         /* it's the next argument */
+00178                         field_width = vaArg(args, int);
+00179                         if (field_width < 0) {
+00180                                 field_width = -field_width;
+00181                                 flags |= LEFT;
+00182                         }
+00183                 }
+00184 
+00185                 /* get the precision */
+00186                 precision = -1;
+00187                 if (*fmt == '.') {
+00188                         ++fmt;  
+00189                         if (is_digit(*fmt))
+00190                                 precision = skip_atoi(&fmt);
+00191                         else if (*fmt == '*') {
+00192                                 /* it's the next argument */
+00193                                 precision = vaArg(args, int);
+00194                         }
+00195                         if (precision < 0)
+00196                                 precision = 0;
+00197                 }
+00198 
+00199                 /* get the conversion qualifier */
+00200                 qualifier = -1;
+00201                 if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L') {
+00202                         qualifier = *fmt;
+00203                         ++fmt;
+00204                 }
+00205 
+00206                 switch (*fmt) {
+00207                 case 'c':
+00208                         if (!(flags & LEFT))
+00209                                 while (--field_width > 0)
+00210                                         *str++ = ' ';
+00211                         *str++ = (unsigned char) vaArg(args, int);
+00212                         while (--field_width > 0)
+00213                                 *str++ = ' ';
+00214                         break;
+00215 
+00216                 case 's':
+00217                         s = vaArg(args, char *);
+00218                         len = strlen(s);
+00219                         if (precision < 0)
+00220                                 precision = len;
+00221                         else if (len > precision)
+00222                                 len = precision;
+00223 
+00224                         if (!(flags & LEFT))
+00225                                 while (len < field_width--)
+00226                                         *str++ = ' ';
+00227                         for (i = 0; i < len; ++i)
+00228                                 *str++ = *s++;
+00229                         while (len < field_width--)
+00230                                 *str++ = ' ';
+00231                         break;
+00232 
+00233                 case 'o':
+00234                         str = number(str, vaArg(args, unsigned long), 8,
+00235                                 field_width, precision, flags);
+00236                         break;
+00237 
+00238                 case 'p':
+00239                         if (field_width == -1) {
+00240                                 field_width = 8;
+00241                                 flags |= ZEROPAD;
+00242                         }
+00243                         str = number(str,
+00244                                 (unsigned long) vaArg(args, void *), 16,
+00245                                 field_width, precision, flags);
+00246                         break;
+00247 
+00248                 case 'x':
+00249                         flags |= SMALL;
+00250                 case 'X':
+00251                         str = number(str, vaArg(args, unsigned long), 16,
+00252                                 field_width, precision, flags);
+00253                         break;
+00254 
+00255                 case 'd':
+00256                 case 'i':
+00257                         flags |= SIGN;
+00258                 case 'u':
+00259                         str = number(str, vaArg(args, unsigned long), 10,
+00260                                 field_width, precision, flags);
+00261                         break;
+00262 
+00263                 case 'n':
+00264                         ip = vaArg(args, int *);
+00265                         *ip = (str - buf);
+00266                         break;
+00267 
+00268                 default:
+00269                         if (*fmt != '%')
+00270                                 *str++ = '%';
+00271                         if (*fmt)
+00272                                 *str++ = *fmt;
+00273                         else
+00274                                 --fmt;
+00275                         break;
+00276                 }
+00277         }
+00278         *str = '\0';
+00279         return str-buf;
+00280 }
+00281 
+00282 /***
+00283  END
+00284  ***/
+00285 
+

Generated on Sun Dec 3 02:38:04 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ + diff --git a/doc/html/vsprintf_8c.html b/doc/html/vsprintf_8c.html new file mode 100644 index 0000000..65282da --- /dev/null +++ b/doc/html/vsprintf_8c.html @@ -0,0 +1,388 @@ + + +UbixOS V2: src/sys/lib/vsprintf.c File Reference + + + + +
+
+
+
+ +

vsprintf.c File Reference

+

+#include <stdarg.h>
+#include <lib/string.h>
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Defines

#define do_div(n, base)
#define is_digit(c)   ((c) >= '0' && (c) <= '9')
#define LEFT   16
#define PLUS   4
#define SIGN   2
#define SMALL   64
#define SPACE   8
#define SPECIAL   32
#define ZEROPAD   1

Functions

static char * number (char *str, int num, int base, int size, int precision, int type)
static int skip_atoi (const char **s)
int vsprintf (char *buf, const char *fmt, vaList args)
+


Define Documentation

+ +
+
+ + + + + + + + + + + + +
#define do_div (n,
base   ) 
+
+
+ +

+Value:

({ \
+int __res; \
+__asm__("divl %4":"=a" (n),"=d" (__res):"0" (n),"1" (0),"r" (base)); \
+__res; })
+
+

+Definition at line 79 of file vsprintf.c. +

+Referenced by number(). +

+

+ +

+
+ + + + + + + + + +
#define is_digit (  )    ((c) >= '0' && (c) <= '9')
+
+
+ +

+ +

+Definition at line 60 of file vsprintf.c. +

+Referenced by skip_atoi(), and vsprintf(). +

+

+ +

+
+ + + + +
#define LEFT   16
+
+
+ +

+ +

+Definition at line 75 of file vsprintf.c. +

+Referenced by number(), and vsprintf(). +

+

+ +

+
+ + + + +
#define PLUS   4
+
+
+ +

+ +

+Definition at line 73 of file vsprintf.c. +

+Referenced by number(), and vsprintf(). +

+

+ +

+
+ + + + +
#define SIGN   2
+
+
+ +

+ +

+Definition at line 72 of file vsprintf.c. +

+Referenced by number(), and vsprintf(). +

+

+ +

+
+ + + + +
#define SMALL   64
+
+
+ +

+ +

+Definition at line 77 of file vsprintf.c. +

+Referenced by number(), and vsprintf(). +

+

+ +

+
+ + + + +
#define SPACE   8
+
+
+ +

+ +

+Definition at line 74 of file vsprintf.c. +

+Referenced by number(), and vsprintf(). +

+

+ +

+
+ + + + +
#define SPECIAL   32
+
+
+ +

+ +

+Definition at line 76 of file vsprintf.c. +

+Referenced by number(), and vsprintf(). +

+

+ +

+
+ + + + +
#define ZEROPAD   1
+
+
+ +

+ +

+Definition at line 71 of file vsprintf.c. +

+Referenced by number(), and vsprintf(). +

+

+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static char* number (char *  str,
int  num,
int  base,
int  size,
int  precision,
int  type 
) [static]
+
+
+ +

+ +

+Definition at line 84 of file vsprintf.c. +

+References do_div, LEFT, PLUS, SIGN, SMALL, SPACE, SPECIAL, and ZEROPAD. +

+Referenced by vsprintf(). +

+

+ +

+
+ + + + + + + + + +
static int skip_atoi (const char **  s  )  [static]
+
+
+ +

+ +

+Definition at line 62 of file vsprintf.c. +

+References is_digit. +

+Referenced by vsprintf(). +

+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int vsprintf (char *  buf,
const char *  fmt,
vaList  args 
)
+
+
+ +

+ +

+Definition at line 139 of file vsprintf.c. +

+References is_digit, LEFT, number(), PLUS, SIGN, skip_atoi(), SMALL, SPACE, SPECIAL, strlen(), vaArg, and ZEROPAD. +

+Referenced by kpanic(), kprintf(), and sprintf(). +

+

+


Generated on Sun Dec 3 02:38:10 2006 for UbixOS V2 by  + +doxygen 1.4.7
+ +