Changeset 378

Show
Ignore:
Timestamp:
05/01/08 13:14:39 (7 months ago)
Author:
mwhitworth
Message:

Add beginning of module support for kernel.

Location:
Whitix/branches/hybrid
Files:
5 added
8 modified

Legend:

Unmodified
Added
Removed
  • Whitix/branches/hybrid/Makefile

    r376 r378  
    1818 
    1919all: cd  
    20         mkdir -p CdRoot CdRoot/Applications CdRoot/Mount CdRoot/System/Devices CdRoot/System/Include CdRoot/System/Runtime CdRoot/System/Runtime/C 
     20        mkdir -p CdRoot CdRoot/Applications CdRoot/Mount CdRoot/System/Devices CdRoot/System/Include CdRoot/System/Runtime CdRoot/System/Runtime/C CdRoot/System/Modules 
    2121        make -C user install 
    2222        mkisofs -o cd.iso -b Boot/isoboot -no-emul-boot -c Boot/boot.cat -boot-load-size 4 -boot-info-table -iso-level 3 -l CdRoot 
  • Whitix/branches/hybrid/include/elf.h

    r7 r378  
    4848 
    4949/* ELF file types */ 
    50 #define ELF_EXEC 2 
    51 #define ELF_DYN 3 
     50#define ELF_REL         1 
     51#define ELF_EXEC        2 
     52#define ELF_DYN         3 
    5253 
    5354/* ELF segment types */ 
     
    6061 
    6162/* ElfCheckHeader - sanity checks the ELF header */ 
    62 #define ElfCheckHeader(header,type) \ 
     63#define ElfCheckHeader(header, type) \ 
    6364        (!ELF_HEAD_CHECK(header) || !((header)->fileType & (type)) || header->phEntrySize != sizeof(struct ElfSegmentHeader)) 
    6465 
  • Whitix/branches/hybrid/include/sys.h

    r229 r378  
    9292int SysSocketClose(int fd); 
    9393 
     94/* Module */ 
     95int SysModuleAdd(void* data, unsigned long length); 
     96int SysModuleRemove(const char* name); 
     97 
    9498/* Miscellaneous */ 
    9599int SysShutdown(int type); 
  • Whitix/branches/hybrid/kernel/Makefile

    r1 r378  
    22include ../make.inc 
    33 
    4 OBJS = main.o sched.o sys.o load.o reboot.o timer.o panic.o wait.o 
     4OBJS = main.o sched.o sys.o load.o reboot.o timer.o panic.o wait.o module.o 
    55 
    66build: $(OBJS) 
  • Whitix/branches/hybrid/kernel/sys.c

    r192 r378  
    8383        (DWORD)&SysSocketClose, 
    8484 
     85        /* Module syscalls */ 
     86        (DWORD)&SysModuleAdd, 
     87        (DWORD)&SysModuleRemove, 
     88 
    8589        /* Other syscalls */ 
    8690        (DWORD)&SysShutdown, 
  • Whitix/branches/hybrid/user/Makefile

    r284 r378  
    77        make -C posix 
    88        make -C sdk 
     9        make -C system 
    910 
    1011        #Applications 
     
    4849        make -C sdk install 
    4950        make -C posix install 
     51        make -C system install 
    5052 
    5153        #Applications 
     
    6668        make -C sdk clean 
    6769        make -C xynth clean 
     70        make -C system clean 
    6871        make ports_clean 
  • Whitix/branches/hybrid/user/librtl/sysdefs.h

    r230 r378  
    6060SYSCALL(50,int,SysSocketClose,4,(int fd)); 
    6161 
     62/* Module syscalls */ 
     63SYSCALL(51, int, SysModuleAdd, 8, (void* data, unsigned int length)); 
     64SYSCALL(52, int, SysModuleRemove, 4, (const char* name)); 
     65 
    6266/* Miscellaenous syscalls */ 
    63 SYSCALL(51,int,SysShutdown,4,(int)); 
    64 SYSCALL(52,int,SysIoAccess,4,(int on)); 
     67SYSCALL(53,int,SysShutdown,4,(int)); 
     68SYSCALL(54,int,SysIoAccess,4,(int on));