diff options
| author | Nic Gaffney <gaffney_nic@protonmail.com> | 2024-02-28 06:46:04 -0600 |
|---|---|---|
| committer | Nic Gaffney <gaffney_nic@protonmail.com> | 2024-02-28 06:46:04 -0600 |
| commit | 2d54f6f129cedad272084f4cfe3731309f4c462e (patch) | |
| tree | 0459fc1d595b251ea8a8eb19b17105ae4c200faf /src/include | |
| parent | 67e379966c657eccb3086508fa9bff38b831fbde (diff) | |
| download | gftos-2d54f6f129cedad272084f4cfe3731309f4c462e.tar.gz | |
Enabled paging
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/exceptions.h | 2 | ||||
| -rw-r--r-- | src/include/paging.h | 13 | ||||
| -rw-r--r-- | src/include/print.h | 2 |
3 files changed, 16 insertions, 1 deletions
diff --git a/src/include/exceptions.h b/src/include/exceptions.h index 1da8348..fddc66e 100644 --- a/src/include/exceptions.h +++ b/src/include/exceptions.h @@ -1,2 +1,2 @@ #pragma once -__attribute__((noreturn)) void panic(const char *msg); +__attribute__((noreturn)) void panic(const char *msg, ...); diff --git a/src/include/paging.h b/src/include/paging.h new file mode 100644 index 0000000..11578c2 --- /dev/null +++ b/src/include/paging.h @@ -0,0 +1,13 @@ +#ifndef __PAGING_H +#define __PAGING_H +#include <stdint.h> +typedef uint32_t Page_Directory; +typedef uint32_t Page_Table; + +Page_Directory make_pagedir(Page_Table *addr, uint8_t flags); +Page_Directory make_pagetable(uint32_t addr, uint8_t flags); +void *get_physaddr(void *virtualaddr); +void map_page(void *physaddr, void *virtualaddr, uint8_t flags); +void genDirs(); +void *kalloc_init(); +#endif // !__PAGING_H diff --git a/src/include/print.h b/src/include/print.h index 7ef7fa3..63f5724 100644 --- a/src/include/print.h +++ b/src/include/print.h @@ -1,5 +1,6 @@ #pragma once +#include <stdarg.h> #include <stdint.h> // Define colors for printing @@ -30,3 +31,4 @@ void print_char(char); int print_str(char *); void print_set_color(uint8_t, uint8_t); int printf(const char *, ...); +int printf_logic(const char *, va_list args); |
