diff options
| author | Jon Santmyer <jon@jonsantmyer.com> | 2026-09-11 11:39:21 -0400 |
|---|---|---|
| committer | Jon Santmyer <jon@jonsantmyer.com> | 2026-09-11 11:39:21 -0400 |
| commit | feba4522d1ac41cd04083fe05410b6e90b54bda2 (patch) | |
| tree | 867c58ba68c705bdb77ca4283ad21ce74cd3ec51 | |
| parent | bb08472a04127c994d3ea5a2cbc195f7116a03b8 (diff) | |
| download | jove-kernel-feba4522d1ac41cd04083fe05410b6e90b54bda2.tar.gz jove-kernel-feba4522d1ac41cd04083fe05410b6e90b54bda2.tar.bz2 jove-kernel-feba4522d1ac41cd04083fe05410b6e90b54bda2.zip | |
begin adding uacpi - working build target
| -rw-r--r-- | .gitmodules | 3 | ||||
| -rw-r--r-- | Makefile | 6 | ||||
| -rw-r--r-- | arch/x86_64/hal/obj.h | 2 | ||||
| -rw-r--r-- | arch/x86_64/hal/serial_com.c | 4 | ||||
| m--------- | uacpi | 0 | ||||
| -rw-r--r-- | uacpi.a | bin | 0 -> 1305080 bytes | |||
| -rw-r--r-- | uacpi.mk | 20 |
7 files changed, 31 insertions, 4 deletions
diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..5a019d9 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "uacpi"] + path = uacpi + url = https://github.com/uACPI/uACPI @@ -16,14 +16,18 @@ SFILES += $(foreach dir, $(CDIRS), $(wildcard arch/$(TARGET_MACHINE)/$(dir)/*.s) OBJFILES := $(patsubst %.c,%.o,$(CFILES)) OBJFILES += $(patsubst %.s,%.o,$(SFILES)) +OBJFILES += uacpi.a DEPFILES := $(patsubst %.c,%.d,$(CFILES)) +CLEAN_DEPENDS = BIN := jove.elf INCDIR := $(OUT)/usr/include/kernel all: $(BIN) +include uacpi.mk + headers: mkdir -p $(INCDIR) -$(foreach dir,$(CDIRS),$$(mkdir -p $(INCDIR)/$(dir) $(INCDIR)/arch/$(dir)/)) @@ -32,7 +36,7 @@ headers: -$(foreach dir,$(CDIRS),$$(cp arch/$(TARGET_MACHINE)/$(dir)/*.h $(INCDIR)/arch/$(dir)/)) .PHONY: clean -clean: +clean: $(CLEAN_DEPENDS) -rm $(OBJFILES) -rm $(DEPFILES) -rm $(BIN) diff --git a/arch/x86_64/hal/obj.h b/arch/x86_64/hal/obj.h index fcb7506..51f2d6a 100644 --- a/arch/x86_64/hal/obj.h +++ b/arch/x86_64/hal/obj.h @@ -7,7 +7,7 @@ enum { - JOVE_OBJ_SERIAL_COM = 0x40, + JOVE_OBJ_SERIAL_COM = 0x80, }; /*Represents a locked kernel object pointer inside of a object directory.*/ diff --git a/arch/x86_64/hal/serial_com.c b/arch/x86_64/hal/serial_com.c index 22682fd..5d7de24 100644 --- a/arch/x86_64/hal/serial_com.c +++ b/arch/x86_64/hal/serial_com.c @@ -82,11 +82,11 @@ serial_com_write( jove_owned_obj_t *obj, const char *s, size_t len) { - if(obj->type != JOVE_OBJ_SERIAL_COM) { + if(obj_gettype(obj) != JOVE_OBJ_SERIAL_COM) { reterr(EBADOBJ); } for(size_t i = 0; i < len; i++) { - serial_com_putc((uint16_t)obj->value, s[i]); + serial_com_putc((uint16_t)obj_getvalue(obj), s[i]); } return len; } diff --git a/uacpi b/uacpi new file mode 160000 +Subproject f5f6cc29f85dd5db0dd79c47700c8f3ebce18be Binary files differdiff --git a/uacpi.mk b/uacpi.mk new file mode 100644 index 0000000..58e08c6 --- /dev/null +++ b/uacpi.mk @@ -0,0 +1,20 @@ +UACPI_DIR := uacpi +UACPI_CDIR := $(UACPI_DIR)/source +UACPI_IDIR := $(UACPI_DIR)/include + +UACPI_CFILES := $(wildcard $(UACPI_CDIR)/*.c) +UACPI_OFILES := $(patsubst %.c,%.o,$(UACPI_CFILES)) + +CFLAGS += -I$(UACPI_IDIR) + +DEPFILES += $(patsubst %.c,%.d,$(UACPI_CFILES)) +CLEAN_DEPENDS += uacpi_clean + +uacpi.a: ${UACPI_OFILES} + ar rcs $@ $^ + +.PHONY: uacpi_clean +uacpi_clean: + -rm $(UACPI_OFILES) + + |
