summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitmodules3
-rw-r--r--Makefile6
-rw-r--r--arch/x86_64/hal/obj.h2
-rw-r--r--arch/x86_64/hal/serial_com.c4
m---------uacpi0
-rw-r--r--uacpi.abin0 -> 1305080 bytes
-rw-r--r--uacpi.mk20
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
diff --git a/Makefile b/Makefile
index 76c913b..3950cb3 100644
--- a/Makefile
+++ b/Makefile
@@ -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
diff --git a/uacpi.a b/uacpi.a
new file mode 100644
index 0000000..32212ea
--- /dev/null
+++ b/uacpi.a
Binary files differ
diff --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)
+
+