Changeset b419162 in mainline


Ignore:
Timestamp:
2006-03-13T19:37:24Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7fc78da
Parents:
a3aa1e1
Message:

Added very basic IPC userspace stuff.

Files:
3 added
8 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    ra3aa1e1 rb419162  
    3434DIRS = \
    3535        libc \
     36        libipc \
    3637        init \
    3738        softfloat
  • init/Makefile

    ra3aa1e1 rb419162  
    3131
    3232LIBC_PREFIX = ../libc
     33LIBIPC_PREFIX = ../libipc
    3334include $(LIBC_PREFIX)/Makefile.toolchain
     35
     36CFLAGS += -I../libipc/include
    3437
    3538## Sources
     
    5659
    5760$(OUTPUT): $(OBJECTS)
    58         $(LD) -T $(LIBC_PREFIX)/arch/$(ARCH)/_link.ld $(LFLAGS) $(OBJECTS) $(LIBC_PREFIX)/libc.a -o $@ -Map $(OUTPUT).map
     61        $(LD) -T $(LIBC_PREFIX)/arch/$(ARCH)/_link.ld $(LFLAGS) $(OBJECTS) $(LIBC_PREFIX)/libc.a $(LIBIPC_PREFIX)/libipc.a -o $@ -Map $(OUTPUT).map
    5962
    6063disasm:
  • init/init.c

    ra3aa1e1 rb419162  
    2828
    2929#include "version.h"
     30#include <ipc.h>
    3031
    3132int main(int argc, char *argv[])
    3233{
    3334        version_print();
     35
     36        ipc_call_sync(0, 1, 2);
     37
    3438        return 0;
    3539}
  • libc/Makefile

    ra3aa1e1 rb419162  
    5050ARCH_OBJECTS := $(addsuffix .o,$(basename $(ARCH_SOURCES)))
    5151
    52 .PHONY: all clean depend
     52.PHONY: all clean depend kerninc
    5353
    54 all: libc.a arch/$(ARCH)/_link.ld
     54all: kerninc libc.a arch/$(ARCH)/_link.ld
     55
     56kerninc:
     57        ln -sf ../../../kernel/generic/include include/kernel
    5558
    5659-include Makefile.depend
    5760
    5861clean:
    59         -rm -f libc.a arch/$(ARCH)/_link.ld Makefile.depend
     62        -rm -f include/kernel libc.a arch/$(ARCH)/_link.ld Makefile.depend
    6063        find generic/ arch/$(ARCH)/ -name '*.o' -follow -exec rm \{\} \;
    6164
  • libc/arch/mips32/src/syscall.c

    ra3aa1e1 rb419162  
    2929#include <libc.h>
    3030
    31 sysarg_t __syscall(const syscall_t id, const sysarg_t p1, const sysarg_t p2, const sysarg_t p3)
     31sysarg_t __syscall(const sysarg_t p1, const sysarg_t p2,
     32                   const sysarg_t p3, const syscall_t id)
    3233{
    3334        register sysarg_t __mips_reg_a0 asm("$4") = p1;
  • libc/generic/io.c

    ra3aa1e1 rb419162  
    4848ssize_t write(int fd, const void * buf, size_t count)
    4949{
    50         return (ssize_t) __syscall(SYS_IO, (sysarg_t) fd, (sysarg_t) buf, (sysarg_t) count);
     50        return (ssize_t) __SYSCALL3(SYS_IO, (sysarg_t) fd, (sysarg_t) buf, (sysarg_t) count);
    5151}
  • libc/include/libc.h

    ra3aa1e1 rb419162  
    3232#include <types.h>
    3333
     34#include <kernel/syscall/syscall.h>
    3435
    35 #define __SYSCALL0(id) __syscall(id, 0, 0, 0)
    36 #define __SYSCALL1(id, p1) __syscall(id, p1, 0, 0)
    37 #define __SYSCALL2(id, p1, p2) __syscall(id, p1, p2, 0)
    38 
    39 
    40 typedef enum {
    41         SYS_CTL = 0,
    42         SYS_IO  = 1
    43 } syscall_t;
    44 
     36#define __SYSCALL0(id) __syscall(0, 0, 0, id)
     37#define __SYSCALL1(id, p1) __syscall(p1, 0, 0, id)
     38#define __SYSCALL2(id, p1, p2) __syscall(p1, p2, 0, id)
     39#define __SYSCALL3(id, p1, p2, p3) __syscall(p1,p2,p3,id)
    4540
    4641extern void __main(void);
    4742extern void __exit(void);
    48 extern sysarg_t __syscall(const syscall_t id, const sysarg_t p1, const sysarg_t p2, const sysarg_t p3);
     43extern sysarg_t __syscall(const sysarg_t p1, const sysarg_t p2,
     44                          const sysarg_t p3, const syscall_t id);
    4945
    5046
  • uspace.config

    ra3aa1e1 rb419162  
    33# Architecture
    44@ "ia32" Intel IA-32
     5@ "amd64" AMD64/Intel EM64T
    56@ "ia64" Intel IA-64
    6 @ "amd64" AMD64/Intel EM64T
    77@ "mips32" MIPS 32-bit Little Endian
    88@ "mips32eb" MIPS 32-bit Big Endian
Note: See TracChangeset for help on using the changeset viewer.