9os

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 263c76dd4e6d88a782da01346f9e5b146d08b2e8
parent 99cfd9068c53ef246f7f08a1573d03ce89c3fcf0
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sun,  8 Nov 2020 18:33:41 +0100

os9/amd64: Update amd64-linux support

Change-Id: Ie1a1999f208d01d76709341ad3f755ac1c246815

Diffstat:
Minclude/bits/amd64/arch/types.h | 19++++++++++++++++---
Msrc/os9/cfg/9hosted | 2--
Msrc/os9/hosted/Makefile | 11+++--------
Asrc/os9/hosted/mmu.c | 19+++++++++++++++++++
4 files changed, 38 insertions(+), 13 deletions(-)

diff --git a/include/bits/amd64/arch/types.h b/include/bits/amd64/arch/types.h @@ -1,8 +1,21 @@ -struct context { - unsigned long long regs[1]; -}; +/* TODO: Move these bits to other place */ + +#define MAXTID 32767 +#define NR_TASKS 16 +#define NR_WINS 32 + +#define NR_MPOINTS 4 +#define NR_CHANS 20 typedef int atomic_t; typedef unsigned long mutex_t; typedef unsigned long long phyaddr_t; typedef struct context Context; + +struct ptable { + int assid; +}; + +struct context { + unsigned long long regs[1]; +}; diff --git a/src/os9/cfg/9hosted b/src/os9/cfg/9hosted @@ -4,8 +4,6 @@ dev dummyuart base=0x1c0c0000,clk=24000000,cfg=b115200 l8 #t0 dummyuart base=0x1c0c0100,clk=24000000 #t1 cons - blk - dummyblk ar proc end diff --git a/src/os9/hosted/Makefile b/src/os9/hosted/Makefile @@ -4,6 +4,7 @@ include $(PROJECTDIR)/scripts/rules.mk OBJS =\ arch.o\ + mmu.o\ lock.o\ main.o\ $(LIBDIR)/crt.o\ @@ -11,16 +12,10 @@ OBJS =\ TARGET = $(BINDIR)/os9.elf -all: $(TARGET) $(BINDIR)/blkfile +all: $(TARGET) $(DIRS): FORCE cd $@ && $(MAKE) $(BINDIR)/os9.elf: $(OBJS) $(LIBDEP) - $(LD) $(PROJ_LDFLAGS) $(OBJS) $(PROJ_LDLIBS) -o $@ - -$(BINDIR)/blkfile: - dd bs=512 count=2 if=/dev/zero of=$(BINDIR)/blkfile - -clean: - rm -f $(BINDIR)/blkfile + $(LD) $(PROJ_LDFLAGS) $(OBJS) $(PROJ_LDLIBS) -lk -lc -o $@ diff --git a/src/os9/hosted/mmu.c b/src/os9/hosted/mmu.c @@ -0,0 +1,19 @@ +#include <os9/os9.h> + +int +vmap(phyaddr_t pa, uintptr_t va, int flags) +{ + return -1; +} + +Ptable * +initptable(Task *tp) +{ + return NULL; +} + +Map * +newstack(Task *tp) +{ + return NULL; +}