diff options
| author | czjstmax <jstmaxlol@disroot.org> | 2026-02-23 23:18:48 +0100 |
|---|---|---|
| committer | czjstmax <jstmaxlol@disroot.org> | 2026-02-23 23:18:48 +0100 |
| commit | 2420e3f52b62580af9cdd661fb441733e437daf9 (patch) | |
| tree | a2854d70e7297e9bff879c5dc358dfb95d263fab /src/kernel/main.c | |
| parent | 6fc0fd2fd64388e32c4ec1cefa2ad8e1e43fdb5a (diff) | |
lots of changes. restructured repository. switched to limine.
Signed-off-by: czjstmax <jstmaxlol@disroot.org>
Diffstat (limited to 'src/kernel/main.c')
| -rw-r--r-- | src/kernel/main.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/kernel/main.c b/src/kernel/main.c new file mode 100644 index 0000000..7584827 --- /dev/null +++ b/src/kernel/main.c @@ -0,0 +1,42 @@ +#ifndef MÜLL_KERN +#define MÜLL_KERN + +/* + * müll_kernel + */ + +// C includes +#include <stddef.h> + +// external includes +#include "limine.h" + +// API includes +#include "api/io.h" + +__attribute__((used, section(".limine_requests"))) +static volatile LIMINE_BASE_REVISION(2); + +static volatile struct limine_framebuffer_request fb_request = { + .id = LIMINE_FRAMEBUFFER_REQUEST, + .revision = 0 +}; + +void kmain(void) __attribute__((noreturn)); +void _start(void) { + if (!fb_request.response) { + for (;;) __asm__("hlt"); + } + + struct limine_framebuffer *fb = + fb_request.response->framebuffers[0]; + + uint32_t *pix = fb->address; + pix[0] = 0x00FFFFFF; // white pixel + + //return kernel_main(); + for (;;) __asm__("hlt"); +} + +#endif + |