From 90a6065691beee52bf5309916fba98f7580d27be Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Sat, 3 Feb 2024 00:50:07 -0500 Subject: refactor, new arch dirs, (wip) page alloc on write, hsv screen (convert to userspace later), other fixes --- include/bochs.h | 11 +++++++++++ include/fb.h | 5 ----- include/screen.h | 13 +++++++++++++ include/shim.h | 15 ++++++++------- 4 files changed, 32 insertions(+), 12 deletions(-) create mode 100644 include/bochs.h delete mode 100644 include/fb.h create mode 100644 include/screen.h (limited to 'include') diff --git a/include/bochs.h b/include/bochs.h new file mode 100644 index 0000000..4aa933e --- /dev/null +++ b/include/bochs.h @@ -0,0 +1,11 @@ +#pragma once + +#include +#include + +/** + * Loads the framebuffer + * @param width - the width of the screen + * @param height - the height of the screen + */ +uint32_t *bochs_init(uint16_t w, uint16_t h, uint8_t b); diff --git a/include/fb.h b/include/fb.h deleted file mode 100644 index 2c5ea13..0000000 --- a/include/fb.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -#include - -int fb_init(uint16_t res_x, uint16_t res_y); diff --git a/include/screen.h b/include/screen.h new file mode 100644 index 0000000..296be31 --- /dev/null +++ b/include/screen.h @@ -0,0 +1,13 @@ +#pragma once + +#include + +/** + * Initalizes the screen and framebuffer + */ +void screen_init(void); + +/** + * Redraws the screen + */ +void screen_redraw(void); diff --git a/include/shim.h b/include/shim.h index 498de92..e445765 100644 --- a/include/shim.h +++ b/include/shim.h @@ -15,16 +15,17 @@ struct memory_map { struct memory_segment entries[MMAP_MAX_ENTRY]; }; -//struct framebuffer { -// uint64_t addr; -// uint32_t pitch; -// uint32_t width; -// uint32_t height; -// uint8_t bit_depth; -//}; +struct framebuffer { + uint64_t addr; + uint32_t pitch; + uint32_t width; + uint32_t height; + uint8_t bit_depth; +}; struct boot_info { struct memory_map map; + struct framebuffer fb; void *symbol_table; void *acpi_table; char cmdline[CMDLINE_MAX]; -- cgit v1.2.3-freya