From d592abd8ccc4026c51e196777031eb65c4acc4de Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sun, 7 Jul 2024 14:34:39 +0300 Subject: 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. --- arch/riscv64/include/mem.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 arch/riscv64/include/mem.h (limited to 'arch/riscv64/include/mem.h') diff --git a/arch/riscv64/include/mem.h b/arch/riscv64/include/mem.h new file mode 100644 index 0000000..410a428 --- /dev/null +++ b/arch/riscv64/include/mem.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: copyleft-next-0.3.1 */ +/* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */ + +#ifndef KMI_RISCV_MEM_H +#define KMI_RISCV_MEM_H +/** + * @file pmem.h + * riscv64-specific general memory stuff. + */ + +/** Base page size is always 4K, use a constant for better optimizations here + * and there */ +#define BASE_PAGE_SIZE 4096 + +#endif /* KMI_RISCV_MEM_H */ -- cgit v1.3