diff options
| author | Jon Santmyer <jon@jonsantmyer.com> | 2026-09-04 11:31:40 -0400 |
|---|---|---|
| committer | Jon Santmyer <jon@jonsantmyer.com> | 2026-09-04 11:31:40 -0400 |
| commit | 8251da342161767fe203627223ccd4a7026701c6 (patch) | |
| tree | af2db0f11b0ea8ad35f88663a855bab39a80f679 /hal | |
| download | jove-kernel-8251da342161767fe203627223ccd4a7026701c6.tar.gz jove-kernel-8251da342161767fe203627223ccd4a7026701c6.tar.bz2 jove-kernel-8251da342161767fe203627223ccd4a7026701c6.zip | |
initial commit. working on tasking
Diffstat (limited to 'hal')
| -rw-r--r-- | hal/framebuffer.h | 14 | ||||
| -rw-r--r-- | hal/memory.h | 16 | ||||
| -rw-r--r-- | hal/obj.h | 22 | ||||
| -rw-r--r-- | hal/smp.h | 10 |
4 files changed, 62 insertions, 0 deletions
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 <stddef.h> +#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 <stddef.h> +#include <stdint.h> + +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 <stddef.h> + +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 |
