diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-07-07 14:34:39 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-07-07 14:34:39 +0300 |
| commit | d592abd8ccc4026c51e196777031eb65c4acc4de (patch) | |
| tree | bfcffec608ede13653a21a56a5b731a4178ecda3 /include/arch | |
| parent | d1c5e2700add7627e22c49a6021f200f03e8a62b (diff) | |
| download | kmi-d592abd8ccc4026c51e196777031eb65c4acc4de.tar.gz kmi-d592abd8ccc4026c51e196777031eb65c4acc4de.zip | |
misc fixes
+ Align kernel to 2MiB boundary in u-boot
+ Optimize alignment functions a little bit, should still have to check
on real hardware but 'feels' more clean
+ Add early boot debugging
+ Put extra cores we aren't ready to account for to sleep if/when they
boot.
+ Make BASE_PAGE_SIZE constant on riscv64/32, helps the compiler with
some alignment checks among other things.
Diffstat (limited to 'include/arch')
| -rw-r--r-- | include/arch/mem.h | 21 | ||||
| -rw-r--r-- | include/arch/pmem.h | 3 |
2 files changed, 23 insertions, 1 deletions
diff --git a/include/arch/mem.h b/include/arch/mem.h new file mode 100644 index 0000000..a70637c --- /dev/null +++ b/include/arch/mem.h @@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: copyleft-next-0.3.1 */ +/* Copyright 2024, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */ + +#ifndef KMI_ARCH_MEM_H +#define KMI_ARCH_MEM_H + +/** + * @file mem.h + * + * Arch-specific stuff generic to all memory. + */ + +#if defined(__riscv) +# if __riscv_xlen == 64 +#include "../../arch/riscv64/include/pmem.h" +# else +#include "../../arch/riscv32/include/pmem.h" +# endif +#endif + +#endif /* KMI_ARCH_MEM_H */ diff --git a/include/arch/pmem.h b/include/arch/pmem.h index 6a17449..9abbe8b 100644 --- a/include/arch/pmem.h +++ b/include/arch/pmem.h @@ -10,8 +10,8 @@ * arch/whatever/kernel/pmem.c */ -#include <kmi/mem.h> /* NUM_ORDERS */ #include <kmi/types.h> +#include <kmi/mem.h> /* NUM_ORDERS */ #if defined(__riscv) # if __riscv_xlen == 64 @@ -21,6 +21,7 @@ # endif #endif + /** * Get physical memory parameters. * |
