diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/fbos/compiler.h | 9 | ||||
| -rw-r--r-- | include/fbos/init.h | 8 | ||||
| -rw-r--r-- | include/fbos/mm.h | 16 |
3 files changed, 33 insertions, 0 deletions
diff --git a/include/fbos/compiler.h b/include/fbos/compiler.h new file mode 100644 index 0000000..edf24d1 --- /dev/null +++ b/include/fbos/compiler.h @@ -0,0 +1,9 @@ +#ifndef __FBOS_COMPILER_H +#define __FBOS_COMPILER_H + +#define __noreturn __attribute__((__noreturn__)) + +#define __section(s) __attribute__((__section__(s))) +#define __kernel __section(".text.kernel") + +#endif /* __FBOS_COMPILER_H */ diff --git a/include/fbos/init.h b/include/fbos/init.h new file mode 100644 index 0000000..1eeb33a --- /dev/null +++ b/include/fbos/init.h @@ -0,0 +1,8 @@ +#ifndef FBOS_INIT_H +#define FBOS_INIT_H + +#include <fbos/compiler.h> + +extern __noreturn __kernel void start_kernel(void); + +#endif /* FBOS_INIT_H */ diff --git a/include/fbos/mm.h b/include/fbos/mm.h new file mode 100644 index 0000000..2b80076 --- /dev/null +++ b/include/fbos/mm.h @@ -0,0 +1,16 @@ +#ifndef FBOS_MM_H +#define FBOS_MM_H + +/* + * Page = 4KB. + */ +#define PAGE_SIZE 0x1000 + +/* + * The code will be linked to start at the first page, which will have a given + * offset. + */ +#define PAGE_OFFSET 0x80200000 +#define LINK_ADDR PAGE_OFFSET + +#endif /* FBOS_MM_H */ |
