From 8251da342161767fe203627223ccd4a7026701c6 Mon Sep 17 00:00:00 2001 From: Jon Santmyer Date: Fri, 4 Sep 2026 11:31:40 -0400 Subject: initial commit. working on tasking --- hal/framebuffer.h | 14 ++++++++++++++ hal/memory.h | 16 ++++++++++++++++ hal/obj.h | 22 ++++++++++++++++++++++ hal/smp.h | 10 ++++++++++ 4 files changed, 62 insertions(+) create mode 100644 hal/framebuffer.h create mode 100644 hal/memory.h create mode 100644 hal/obj.h create mode 100644 hal/smp.h (limited to 'hal') diff --git a/hal/framebuffer.h b/hal/framebuffer.h new file mode 100644 index 0000000..e070889 --- /dev/null +++ b/hal/framebuffer.h @@ -0,0 +1,14 @@ +#ifndef _JOVE_HAL_FRAMEBUFFER_H +#define _JOVE_HAL_FRAMEBUFFER_H 1 + +#include +#include "hal/obj.h" + +size_t fb_width(jove_owned_obj_t *fb); +size_t fb_height(jove_owned_obj_t *fb); +int fb_blit(jove_owned_obj_t *obj, uint32_t *data, size_t x, size_t y, size_t width, size_t height); + +void *fb_remap(uintptr_t fb_address, size_t fb_size); +void fb_init(void); + +#endif diff --git a/hal/memory.h b/hal/memory.h new file mode 100644 index 0000000..4d866d0 --- /dev/null +++ b/hal/memory.h @@ -0,0 +1,16 @@ +#ifndef _JOVE_HAL_MEMORY_H +#define _JOVE_HAL_MEMORY_H 1 + +#include +#include + +typedef struct jove_obj_untyped +{ + size_t limit; +} jove_untyped_t; + +void mem_setup_untyped(void); + +void *phys_tovirt(uintptr_t phys); + +#endif diff --git a/hal/obj.h b/hal/obj.h new file mode 100644 index 0000000..c0b2a4d --- /dev/null +++ b/hal/obj.h @@ -0,0 +1,22 @@ +#ifndef _JOVE_HAL_OBJ_H +#define _JOVE_HAL_OBJ_H 1 + +#include + +enum +{ + JOVE_OBJ_NONE = 0, + JOVE_OBJ_UNTYPED, + JOVE_OBJ_OBJDIR, + JOVE_OBJ_PROCESSOR, + JOVE_OBJ_PROCESS, + JOVE_OBJ_INITRD_FILE, + JOVE_OBJ_FRAMEBUFFER, + JOVE_OBJ_VIRTTERM +}; + +#ifdef __x86_64__ +#include "arch/x86_64/hal/obj.h" +#endif + +#endif diff --git a/hal/smp.h b/hal/smp.h new file mode 100644 index 0000000..3718f46 --- /dev/null +++ b/hal/smp.h @@ -0,0 +1,10 @@ +#ifndef _JOVE_HAL_SMP_H +#define _JOVE_HAL_SMP_H 1 + +#include "obj.h" + +void *processor_current(void); + +jove_obj_t *processor_objdir(void *processor); + +#endif -- cgit v1.2.3