aboutsummaryrefslogtreecommitdiff
path: root/src/include/boucane.hpp
blob: fd75216f5bcd346b019cd1e088965008b8d0401a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#pragma once

#define VERSION_MAJOR 0
#define VERSION_MINOR 1
#define VERSION_PATH 0

#include "core/types.hpp"
#include "core/paging.hpp"
#include "libs/math.hpp"
#include "libs/stdio.hpp"
#include "libs/string.hpp"

/// @brief Various variables from the linker
extern u64 kvar_kernel_vma;
extern u64 kvar_stack_pma;
extern u64 kvar_userspace_pma;
extern u64 kvar_bss_start;
extern u64 kvar_bss_end;

/// @brief Binary references
extern u64 kvar_terminus_psf_start;
extern u64 kvar_terminus_psf_end;

// ---- Debug
#define DUMP(var) asm volatile("push $0xABC; push %0; push $0xABC; _%=:; jmp _%="::"r"(var))
#define DUMP2(var1,var2) asm volatile("push $0xABC; push %0; push %1; push $0xABC; _%=:; jmp _%="::"a"(var1),"b"(var2))