kernel
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/* 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. */
28
29#define UNREFERENCED_PARAMETER(x) (void)(x)
30#include "includes/mtos.h"
31#include "assert.h"
32#include "intrinsics/intrin.h"
35#include "drivers/blk/block.h"
36#include "drivers/ahci/ahci.h"
37#include "drivers/gop/gop.h"
38#include "time.h"
39#include "includes/behavior.h"
40
41// Entry point in C
42void kernel_idle_checks(void);
43void kernel_main(BOOT_INFO* boot_info);
44// Function declarations.
45void copy_memory_map(BOOT_INFO* boot_info);
46void copy_gop(BOOT_INFO* boot_info);
47void init_boot_info(BOOT_INFO* boot_info);
48
49#define gop_printf_forced(color, fmt, ...) gop_printf(color, fmt, ##__VA_ARGS__)
50
51#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:64