From bb9615202a4842efc368568e808f9917527e46c5 Mon Sep 17 00:00:00 2001 From: david-on-debian Date: Sun, 6 Jul 2025 15:01:38 -0500 Subject: [PATCH 01/10] Delete include/panic.h --- include/panic.h | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 include/panic.h diff --git a/include/panic.h b/include/panic.h deleted file mode 100644 index f96cda6..0000000 --- a/include/panic.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef _KERNEL_PANIC_H -#define _KERNEL_PANIC_H - -#include -#include - -void panic(const char* arr) -{ - - uint8_t color = 0x1F; - uint8_t blank = 0xFF; - - for (size_t y = 0; y < VGA_HEIGHT; y++) - { - for (size_t x = 0; x < VGA_WIDTH; x++) - { - const size_t index = y * VGA_WIDTH + x; - VGA_MEMORY[index] = (uint16_t) ' ' | (uint16_t) blank << 8; - } - } - - int i; - for (i = 0; i < 75; i += 2) - { - VGA_MEMORY[i] = arr[i]; - VGA_MEMORY[i + 1] = color; - } -} - -#endif From 967bb381da167ce3b5f103841fdfd1cd9d847a38 Mon Sep 17 00:00:00 2001 From: david-on-debian Date: Sun, 6 Jul 2025 15:01:53 -0500 Subject: [PATCH 02/10] Delete include/syscall.h --- include/syscall.h | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 include/syscall.h diff --git a/include/syscall.h b/include/syscall.h deleted file mode 100644 index e3f9d1a..0000000 --- a/include/syscall.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _SYSCALL_H -#define _SYSCALL_H - - - -#endif From ce0771825abfca64613d2c1adf16bf5df5dbe55a Mon Sep 17 00:00:00 2001 From: david-on-debian Date: Sun, 6 Jul 2025 16:16:28 -0500 Subject: [PATCH 03/10] Add arch/x86/new_intrin.c --- arch/x86/new_intrin.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 arch/x86/new_intrin.c diff --git a/arch/x86/new_intrin.c b/arch/x86/new_intrin.c new file mode 100644 index 0000000..6777eec --- /dev/null +++ b/arch/x86/new_intrin.c @@ -0,0 +1,17 @@ +#include + +#ifdef __NEW_INTRINSICS_ + +bool cpu_supports_sse2(void) +{ + int k = __buildin_cpu_supports("sse2"); + + return k > 0 ? true : false +} + +bool cpu_supports_sse(void) +{ + return __buildin_cpu_supports("sse") > 0 ? true : false; +} + +#endif \ No newline at end of file From 332fcf89dc22eec601b0e02599a81783b3d915a5 Mon Sep 17 00:00:00 2001 From: david-on-debian Date: Sun, 6 Jul 2025 20:34:13 -0500 Subject: [PATCH 04/10] Add include/kincl.h --- include/kincl.h | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 include/kincl.h diff --git a/include/kincl.h b/include/kincl.h new file mode 100644 index 0000000..fa2d396 --- /dev/null +++ b/include/kincl.h @@ -0,0 +1,6 @@ +#ifndef _KERNEL_INCLUDES_H +#define _KERNEL_INCLUDES_H + +#define KERNEL_VERSION "0.0.1e" + +#endif \ No newline at end of file From b8f48fd21205b82ede6829751d1fd78d97b37c35 Mon Sep 17 00:00:00 2001 From: david-on-debian Date: Sun, 6 Jul 2025 20:42:04 -0500 Subject: [PATCH 05/10] Update lib/mm/paging.c --- lib/mm/paging.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mm/paging.c b/lib/mm/paging.c index 6e45cf5..c20d73f 100644 --- a/lib/mm/paging.c +++ b/lib/mm/paging.c @@ -23,7 +23,7 @@ void paging_init(void) page_directory = (page_directory_entry_t*)alloc_page(); memset(page_directory, 0, PAGE_SIZE); - /* Allocate and set up the first identity-mapped page table (0–4MB) */ + /* Allocate and set up the first identity-mapped page table (0-4MB) */ page_tables[0] = (page_table_entry_t*)alloc_page(); memset(page_tables[0], 0, PAGE_SIZE); for (uint32_t i = 0; i < PAGE_TABLE_ENTRIES; i++) From b0b459781b0891579adb5dc163a024d2bf4442d3 Mon Sep 17 00:00:00 2001 From: david-on-debian Date: Sun, 6 Jul 2025 20:59:14 -0500 Subject: [PATCH 06/10] Add README.md --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..f923b5d --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +Espresso + + +Espresso is a simple operating system built with C and i686(IA32) assembler. + + +== BUILDING == +First, you need a cross-compiler and toolchain built, see https://wiki.osdev.org/GCC_Cross-Compiler +for instructions. + +then, `cd` into the directory with the code (you should see the `kernel`, `include`, and `lib` directories if you're in the right place.) and type `make build`. this will also run the OS. type `make clean` after every change to rebuild everything. \ No newline at end of file From 90cbd31903fb0657b1422097c8582656eb11f26f Mon Sep 17 00:00:00 2001 From: david-on-debian Date: Sun, 6 Jul 2025 20:59:53 -0500 Subject: [PATCH 07/10] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f923b5d..abea9c5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Espresso +<--- Espresso. ---> Espresso is a simple operating system built with C and i686(IA32) assembler. From 9b8bdc26b83b6ce4a6b55b8a1ef38199b9edcee2 Mon Sep 17 00:00:00 2001 From: david-on-debian Date: Sun, 6 Jul 2025 21:00:32 -0500 Subject: [PATCH 08/10] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index abea9c5..45f4fa2 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Espresso is a simple operating system built with C and i686(IA32) assembler. -== BUILDING == +== BUILDING ==\n First, you need a cross-compiler and toolchain built, see https://wiki.osdev.org/GCC_Cross-Compiler for instructions. From bfe4eb383cf8cde98dd3a6b32659064a576f41e2 Mon Sep 17 00:00:00 2001 From: david-on-debian Date: Sun, 6 Jul 2025 21:00:46 -0500 Subject: [PATCH 09/10] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 45f4fa2..abea9c5 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Espresso is a simple operating system built with C and i686(IA32) assembler. -== BUILDING ==\n +== BUILDING == First, you need a cross-compiler and toolchain built, see https://wiki.osdev.org/GCC_Cross-Compiler for instructions. From 8c1d41e8813dc394b28f3ff6bd098b9b67e8376c Mon Sep 17 00:00:00 2001 From: david-on-debian Date: Sun, 6 Jul 2025 23:23:21 -0500 Subject: [PATCH 10/10] Update include/kernel/kconfig.h --- include/kernel/kconfig.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/kernel/kconfig.h b/include/kernel/kconfig.h index 435af3c..9214da2 100644 --- a/include/kernel/kconfig.h +++ b/include/kernel/kconfig.h @@ -13,6 +13,13 @@ extern "C" { //#define ENABLE_USB //#define ENABLE_NETWORK +typedef struct { + bool enable_debug; + bool enable_fs; + bool enable_ide; + bool enable_usb; + bool enable_networking; +} kconf_t; static inline kconf_t get_kconfig(void) {