My Project
Loading...
Searching...
No Matches
kernel.h
Go to the documentation of this file.
1/*
2 * PROJECT: MatanelOS Kernel
3 * LICENSE: NONE
4 * PURPOSE: Core Kernel Includes, includes all core and necessary header files.
5 */
6
7#ifndef X86_KERNEL_H
8#define X86_KERNEL_H
9
10// Standard headers, required.
11#include <stddef.h>
12#include <stdbool.h>
13#include <stdint.h>
14#include <stdatomic.h>
15
16// forward declarations, i don't think i need them.
17
18typedef struct _BLOCK_DEVICE BLOCK_DEVICE;
19typedef struct _BOOT_INFO BOOT_INFO;
20
21__attribute__((noreturn))
22void __stack_chk_fail(void);
23
24// Standard globals
25extern bool isBugChecking;
26
27/* Definitions that change kernel behaviour below */
28
29/* Uncomment to trigger a bugcheck on entry */
31
32/* Uncomment to show all reminders in a static assertion */
34
35/* To define DEBUG globally, use a compiler flag. I removed this since I now transitioned each header to iself and others instead of relying on kernel.h that caused circular includes. */
36
37#define UNREFERENCED_PARAMETER(x) (void)(x)
38#include "includes/mtos.h"
39#include "assert.h"
40#include "intrinsics/intrin.h"
43#include "drivers/blk/block.h"
44#include "drivers/ahci/ahci.h"
45#include "drivers/gop/gop.h"
46#include "time.h"
47#include "filesystem/vfs/vfs.h"
48#include "includes/behavior.h"
49
50// Entry point in C
51void kernel_idle_checks(void);
52void kernel_main(BOOT_INFO* boot_info);
53// Function declarations.
54void copy_memory_map(BOOT_INFO* boot_info);
55void copy_gop(BOOT_INFO* boot_info);
56void init_boot_info(BOOT_INFO* boot_info);
57
58#define gop_printf_forced(color, fmt, ...) gop_printf(color, fmt, ##__VA_ARGS__)
59
60#endif // X86_KERNEL_H
struct _BLOCK_DEVICE BLOCK_DEVICE
bool isBugChecking
Definition kernel.c:19
struct _BOOT_INFO BOOT_INFO
void init_boot_info(BOOT_INFO *boot_info)
Definition kernel.c:72
void copy_memory_map(BOOT_INFO *boot_info)
Definition kernel.c:45
void kernel_main(BOOT_INFO *boot_info)
void copy_gop(BOOT_INFO *boot_info)
Definition kernel.c:61
void kernel_idle_checks(void)
Definition kernel.c:100
typedef __attribute__
Definition fat32.h:63