diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-04-30 17:06:02 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-04-30 17:06:02 +0300 |
| commit | ea5ebe0809fb31b9f125ac0689f706cc5f3f078f (patch) | |
| tree | 17081bd689709a9bfe48467c458425dea876bddd /include | |
| parent | 8a5e4cf53d981e793fca90d9b51bd395265cf4db (diff) | |
| download | kmi-ea5ebe0809fb31b9f125ac0689f706cc5f3f078f.tar.gz kmi-ea5ebe0809fb31b9f125ac0689f706cc5f3f078f.zip | |
rename to kmi
Diffstat (limited to 'include')
| -rw-r--r-- | include/arch/arch.h | 8 | ||||
| -rw-r--r-- | include/arch/cpu.h | 10 | ||||
| -rw-r--r-- | include/arch/irq.h | 6 | ||||
| -rw-r--r-- | include/arch/lock.h | 6 | ||||
| -rw-r--r-- | include/arch/pmem.h | 10 | ||||
| -rw-r--r-- | include/arch/proc.h | 8 | ||||
| -rw-r--r-- | include/arch/tcb.h | 6 | ||||
| -rw-r--r-- | include/arch/timer.h | 8 | ||||
| -rw-r--r-- | include/arch/types.h | 8 | ||||
| -rw-r--r-- | include/arch/vmem.h | 8 | ||||
| -rw-r--r-- | include/fdt.h | 4 | ||||
| -rw-r--r-- | include/kmi/assert.h (renamed from include/apos/assert.h) | 12 | ||||
| -rw-r--r-- | include/kmi/atomic.h (renamed from include/apos/atomic.h) | 2 | ||||
| -rw-r--r-- | include/kmi/attrs.h (renamed from include/apos/attrs.h) | 6 | ||||
| -rw-r--r-- | include/kmi/bits.h (renamed from include/apos/bits.h) | 10 | ||||
| -rw-r--r-- | include/kmi/builtin.h (renamed from include/apos/builtin.h) | 6 | ||||
| -rw-r--r-- | include/kmi/canary.h (renamed from include/apos/canary.h) | 10 | ||||
| -rw-r--r-- | include/kmi/caps.h (renamed from include/apos/caps.h) | 8 | ||||
| -rw-r--r-- | include/kmi/conf.h (renamed from include/apos/conf.h) | 8 | ||||
| -rw-r--r-- | include/kmi/debug.h (renamed from include/apos/debug.h) | 12 | ||||
| -rw-r--r-- | include/kmi/dmem.h (renamed from include/apos/dmem.h) | 10 | ||||
| -rw-r--r-- | include/kmi/elf.h (renamed from include/apos/elf.h) | 14 | ||||
| -rw-r--r-- | include/kmi/initrd.h (renamed from include/apos/initrd.h) | 12 | ||||
| -rw-r--r-- | include/kmi/ipi.h (renamed from include/apos/ipi.h) | 12 | ||||
| -rw-r--r-- | include/kmi/lock.h (renamed from include/apos/lock.h) | 12 | ||||
| -rw-r--r-- | include/kmi/mem.h (renamed from include/apos/mem.h) | 10 | ||||
| -rw-r--r-- | include/kmi/mem_nodes.h (renamed from include/apos/mem_nodes.h) | 10 | ||||
| -rw-r--r-- | include/kmi/mem_regions.h (renamed from include/apos/mem_regions.h) | 12 | ||||
| -rw-r--r-- | include/kmi/nodes.h (renamed from include/apos/nodes.h) | 8 | ||||
| -rw-r--r-- | include/kmi/pmem.h (renamed from include/apos/pmem.h) | 10 | ||||
| -rw-r--r-- | include/kmi/power.h (renamed from include/apos/power.h) | 8 | ||||
| -rw-r--r-- | include/kmi/proc.h (renamed from include/apos/proc.h) | 12 | ||||
| -rw-r--r-- | include/kmi/sizes.h (renamed from include/apos/sizes.h) | 6 | ||||
| -rw-r--r-- | include/kmi/sp_tree.h (renamed from include/apos/sp_tree.h) | 2 | ||||
| -rw-r--r-- | include/kmi/string.h (renamed from include/apos/string.h) | 10 | ||||
| -rw-r--r-- | include/kmi/syscalls.h (renamed from include/apos/syscalls.h) | 6 | ||||
| -rw-r--r-- | include/kmi/tcb.h (renamed from include/apos/tcb.h) | 12 | ||||
| -rw-r--r-- | include/kmi/timer.h (renamed from include/apos/timer.h) | 8 | ||||
| -rw-r--r-- | include/kmi/types.h (renamed from include/apos/types.h) | 6 | ||||
| -rw-r--r-- | include/kmi/uapi.h (renamed from include/apos/uapi.h) | 10 | ||||
| -rw-r--r-- | include/kmi/unaligned.h (renamed from include/apos/unaligned.h) | 10 | ||||
| -rw-r--r-- | include/kmi/utils.h (renamed from include/apos/utils.h) | 10 | ||||
| -rw-r--r-- | include/kmi/vmem.h (renamed from include/apos/vmem.h) | 14 | ||||
| -rw-r--r-- | include/libfdt.h | 12 | ||||
| -rw-r--r-- | include/libfdt_env.h | 8 |
45 files changed, 200 insertions, 200 deletions
diff --git a/include/arch/arch.h b/include/arch/arch.h index ac3e25a..406a285 100644 --- a/include/arch/arch.h +++ b/include/arch/arch.h @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ /* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */ -#ifndef APOS_ARCH_H -#define APOS_ARCH_H +#ifndef KMI_ARCH_H +#define KMI_ARCH_H /** * @file arch.h @@ -10,7 +10,7 @@ * arch/whatever/kernel/main.c */ -#include <apos/types.h> +#include <kmi/types.h> #if defined(riscv64) #include "../../arch/riscv64/include/arch.h" @@ -29,4 +29,4 @@ */ stat_t setup_arch(void *fdt); -#endif /* APOS_ARCH_H */ +#endif /* KMI_ARCH_H */ diff --git a/include/arch/cpu.h b/include/arch/cpu.h index c5a83d5..d4bf435 100644 --- a/include/arch/cpu.h +++ b/include/arch/cpu.h @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ /* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */ -#ifndef APOS_CPU_H -#define APOS_CPU_H +#ifndef KMI_CPU_H +#define KMI_CPU_H /** * @file cpu.h @@ -10,8 +10,8 @@ * arch/whatever/kernel/cpu.c */ -#include <apos/types.h> -#include <apos/tcb.h> +#include <kmi/types.h> +#include <kmi/tcb.h> #if defined(riscv64) #include "../../arch/riscv64/include/cpu.h" @@ -43,4 +43,4 @@ void cpu_assign(struct tcb *t); */ void cpu_send_ipi(id_t cpu_id); -#endif /* APOS_CPU_H */ +#endif /* KMI_CPU_H */ diff --git a/include/arch/irq.h b/include/arch/irq.h index 99ebe35..b2dcd0a 100644 --- a/include/arch/irq.h +++ b/include/arch/irq.h @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ /* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */ -#ifndef APOS_IRQ_H -#define APOS_IRQ_H +#ifndef KMI_IRQ_H +#define KMI_IRQ_H /** * @file irq.h @@ -31,4 +31,4 @@ void enable_irq(); /** Disable IRQs. */ void disable_irq(); -#endif /* APOS_IRQ_H */ +#endif /* KMI_IRQ_H */ diff --git a/include/arch/lock.h b/include/arch/lock.h index a22ed21..13d010a 100644 --- a/include/arch/lock.h +++ b/include/arch/lock.h @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ /* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */ -#ifndef APOS_ARCH_LOCK_H -#define APOS_ARCH_LOCK_H +#ifndef KMI_ARCH_LOCK_H +#define KMI_ARCH_LOCK_H /** * @file lock.h @@ -15,4 +15,4 @@ #include "../../arch/riscv32/include/lock.h" #endif -#endif /* APOS_ARCH_LOCK_H */ +#endif /* KMI_ARCH_LOCK_H */ diff --git a/include/arch/pmem.h b/include/arch/pmem.h index 273ea4e..276d604 100644 --- a/include/arch/pmem.h +++ b/include/arch/pmem.h @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ /* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */ -#ifndef APOS_ARCH_PMEM_H -#define APOS_ARCH_PMEM_H +#ifndef KMI_ARCH_PMEM_H +#define KMI_ARCH_PMEM_H /** * @file pmem.h @@ -10,8 +10,8 @@ * arch/whatever/kernel/pmem.c */ -#include <apos/mem.h> /* NUM_ORDERS */ -#include <apos/types.h> +#include <kmi/mem.h> /* NUM_ORDERS */ +#include <kmi/types.h> #if defined(riscv64) #include "../../arch/riscv64/include/pmem.h" @@ -63,4 +63,4 @@ stat_t stat_pmem_conf(void *fdt, size_t *max_order, size_t *base_bits, size_t bits[NUM_ORDERS]); -#endif /* APOS_ARCH_PMEM_H */ +#endif /* KMI_ARCH_PMEM_H */ diff --git a/include/arch/proc.h b/include/arch/proc.h index 84954c0..4bd0e20 100644 --- a/include/arch/proc.h +++ b/include/arch/proc.h @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ /* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */ -#ifndef APOS_ARCH_PROC_H -#define APOS_ARCH_PROC_H +#ifndef KMI_ARCH_PROC_H +#define KMI_ARCH_PROC_H /** * @file proc.h @@ -15,7 +15,7 @@ #include "../../arch/riscv32/include/proc.h" #endif -#include <apos/uapi.h> +#include <kmi/uapi.h> /** * Attach argument data to thread. @@ -113,4 +113,4 @@ void adjust_syscall(struct tcb *t); */ __noreturn void run_init(struct tcb *t, void *fdt); -#endif /* APOS_ARCH_PROC_H */ +#endif /* KMI_ARCH_PROC_H */ diff --git a/include/arch/tcb.h b/include/arch/tcb.h index 4054e2a..c295d89 100644 --- a/include/arch/tcb.h +++ b/include/arch/tcb.h @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ /* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */ -#ifndef APOS_ARCH_TCB_H -#define APOS_ARCH_TCB_H +#ifndef KMI_ARCH_TCB_H +#define KMI_ARCH_TCB_H /** * @file lock.h @@ -15,4 +15,4 @@ #include "../../arch/riscv32/include/tcb.h" #endif -#endif /* APOS_ARCH_TCB_H */ +#endif /* KMI_ARCH_TCB_H */ diff --git a/include/arch/timer.h b/include/arch/timer.h index fa1647e..df8e242 100644 --- a/include/arch/timer.h +++ b/include/arch/timer.h @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ /* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */ -#ifndef APOS_ARCH_TIMER_H -#define APOS_ARCH_TIMER_H +#ifndef KMI_ARCH_TIMER_H +#define KMI_ARCH_TIMER_H /** * @file timer.h @@ -10,7 +10,7 @@ * arch/whatever/timer.c */ -#include <apos/timer.h> +#include <kmi/timer.h> #if defined(riscv64) #include "../../arch/riscv64/include/timer.h" @@ -41,4 +41,4 @@ void set_timer(ticks_t ticks); */ ticks_t current_ticks(); -#endif /* APOS_ARCH_TIMER_H */ +#endif /* KMI_ARCH_TIMER_H */ diff --git a/include/arch/types.h b/include/arch/types.h index 8732be2..58f9ef4 100644 --- a/include/arch/types.h +++ b/include/arch/types.h @@ -1,14 +1,14 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ /* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */ -#ifndef APOS_ARCH_TYPES_H -#define APOS_ARCH_TYPES_H +#ifndef KMI_ARCH_TYPES_H +#define KMI_ARCH_TYPES_H /** * @file types.h * Arch-specific types. * - * Doxygen thinks types.h if include/apos/types.h, but it's actually + * Doxygen thinks types.h if include/kmi/types.h, but it's actually * arch/whatever/include/types.h. Not sure how to fix that. * * \todo Fix incorrect include file reference in doxygen. @@ -20,4 +20,4 @@ #include "../../arch/riscv32/include/types.h" #endif -#endif /* APOS_ARCH_TYPES_H */ +#endif /* KMI_ARCH_TYPES_H */ diff --git a/include/arch/vmem.h b/include/arch/vmem.h index ce43a55..047c615 100644 --- a/include/arch/vmem.h +++ b/include/arch/vmem.h @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ /* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */ -#ifndef APOS_ARCH_PAGES_H -#define APOS_ARCH_PAGES_H +#ifndef KMI_ARCH_PAGES_H +#define KMI_ARCH_PAGES_H /** * @file vmem.h @@ -16,7 +16,7 @@ #include "../../arch/riscv32/include/vmem.h" #endif -#include <apos/types.h> +#include <kmi/types.h> /** * Map one virtual page to physical page. @@ -164,4 +164,4 @@ stat_t destroy_vmem(struct vmem *b); */ void clone_uvmem(struct vmem * restrict r, struct vmem * restrict b); -#endif /* APOS_ARCH_PAGES_H */ +#endif /* KMI_ARCH_PAGES_H */ diff --git a/include/fdt.h b/include/fdt.h index 6363b7d..b270fce 100644 --- a/include/fdt.h +++ b/include/fdt.h @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ /* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */ -#ifndef APOS_FDT_H -#define APOS_FDT_H +#ifndef KMI_FDT_H +#define KMI_FDT_H /** * @file fdt.h diff --git a/include/apos/assert.h b/include/kmi/assert.h index 09b9f13..aab8ef2 100644 --- a/include/apos/assert.h +++ b/include/kmi/assert.h @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ /* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */ -#ifndef APOS_ASSERT_H -#define APOS_ASSERT_H +#ifndef KMI_ASSERT_H +#define KMI_ASSERT_H /** * @file assert.h - * Assertions. Note that contrary to how assertios usually function, apos has + * Assertions. Note that contrary to how assertios usually function, kmi has * three different levels of assertions: Catastrophic, hard and soft. * * Soft assertions merely warn about something that might cause issues, but let @@ -18,8 +18,8 @@ * Catastrophic assertions warn about the assertion and crash the kernel. */ -#include <apos/debug.h> -#include <apos/utils.h> +#include <kmi/debug.h> +#include <kmi/utils.h> /** \todo should this exit or do something explosive like that? */ #if !defined(DNDEBUG) @@ -82,4 +82,4 @@ */ #define RETURN_VOID -#endif /* APOS_ASSERT_H */ +#endif /* KMI_ASSERT_H */ diff --git a/include/apos/atomic.h b/include/kmi/atomic.h index 2a1a621..41c06ad 100644 --- a/include/apos/atomic.h +++ b/include/kmi/atomic.h @@ -12,7 +12,7 @@ * this is probably good enough. */ -#include <apos/utils.h> /* GLUE */ +#include <kmi/utils.h> /* GLUE */ /** * Memory ordering modes. diff --git a/include/apos/attrs.h b/include/kmi/attrs.h index a2591af..48e4a07 100644 --- a/include/apos/attrs.h +++ b/include/kmi/attrs.h @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ /* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */ -#ifndef APOS_COMPILER_ATTRIBUTES_H -#define APOS_COMPILER_ATTRIBUTES_H +#ifndef KMI_COMPILER_ATTRIBUTES_H +#define KMI_COMPILER_ATTRIBUTES_H /** * @file attrs.h @@ -65,4 +65,4 @@ /** Entry point of kernel loader. */ #define __init __section(".init.start") __noinline -#endif /* APOS_COMPILER_ATTRIBUTES_H */ +#endif /* KMI_COMPILER_ATTRIBUTES_H */ diff --git a/include/apos/bits.h b/include/kmi/bits.h index adb8e85..128ac20 100644 --- a/include/apos/bits.h +++ b/include/kmi/bits.h @@ -1,16 +1,16 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ /* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */ -#ifndef APOS_BITS_H -#define APOS_BITS_H +#ifndef KMI_BITS_H +#define KMI_BITS_H /** * @file bits.h * Bit manipulations. */ -#include <apos/types.h> -#include <apos/builtin.h> +#include <kmi/types.h> +#include <kmi/builtin.h> /** @name Arithmetic integer bit manipulation. */ /** @{ */ @@ -361,4 +361,4 @@ uint64_t __bswap64(uint64_t u); #endif -#endif /* APOS_BITS_H */ +#endif /* KMI_BITS_H */ diff --git a/include/apos/builtin.h b/include/kmi/builtin.h index 6d7039e..c509b07 100644 --- a/include/apos/builtin.h +++ b/include/kmi/builtin.h @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ /* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */ -#ifndef APOS_BUILTIN_H -#define APOS_BUILTIN_H +#ifndef KMI_BUILTIN_H +#define KMI_BUILTIN_H /** * @file builtin.h @@ -25,4 +25,4 @@ #define __has_builtin(x) (0) #endif -#endif /* APOS_BUILTIN_H */ +#endif /* KMI_BUILTIN_H */ diff --git a/include/apos/canary.h b/include/kmi/canary.h index 30a3dd2..a763c74 100644 --- a/include/apos/canary.h +++ b/include/kmi/canary.h @@ -1,13 +1,13 @@ -#ifndef APOS_CANARY_H -#define APOS_CANARY_H +#ifndef KMI_CANARY_H +#define KMI_CANARY_H /** * @file canary.h * Kernel stack canary handling. */ -#include <apos/tcb.h> -#include <apos/types.h> +#include <kmi/tcb.h> +#include <kmi/types.h> /** * Place canary at end of kernel stack. @@ -24,4 +24,4 @@ void set_canary(struct tcb *t); */ bool check_canary(struct tcb *t); -#endif /* APOS_CANARY_H */ +#endif /* KMI_CANARY_H */ diff --git a/include/apos/caps.h b/include/kmi/caps.h index e762d0f..8cc879d 100644 --- a/include/apos/caps.h +++ b/include/kmi/caps.h @@ -1,5 +1,5 @@ -#ifndef APOS_CAPS_H -#define APOS_CAPS_H +#ifndef KMI_CAPS_H +#define KMI_CAPS_H /** * @file caps.h @@ -11,7 +11,7 @@ * If so, we can remove the offset nonsense. */ -#include <apos/bits.h> +#include <kmi/bits.h> /** Helper typedef for capabilities. */ typedef unsigned char capflags_t; @@ -85,4 +85,4 @@ enum { */ #define has_cap(x, c) (x & c) -#endif /* APOS_CAPS_H */ +#endif /* KMI_CAPS_H */ diff --git a/include/apos/conf.h b/include/kmi/conf.h index ef6a641..e4950c9 100644 --- a/include/apos/conf.h +++ b/include/kmi/conf.h @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ /* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */ -#ifndef APOS_CONF_H -#define APOS_CONF_H +#ifndef KMI_CONF_H +#define KMI_CONF_H /** * @file conf.h @@ -10,7 +10,7 @@ * parameters when they're implemented. */ -#include <apos/types.h> +#include <kmi/types.h> /** * Provides access to the runtime global parameter. @@ -49,4 +49,4 @@ extern size_t __rpc_stack_size; */ #define RPC_STACK_RATIO 4 -#endif /* APOS_CONF_H */ +#endif /* KMI_CONF_H */ diff --git a/include/apos/debug.h b/include/kmi/debug.h index 0d8ec26..e9e9cb8 100644 --- a/include/apos/debug.h +++ b/include/kmi/debug.h @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ /* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */ -#ifndef APOS_DEBUG_H -#define APOS_DEBUG_H +#ifndef KMI_DEBUG_H +#define KMI_DEBUG_H /** * @file debug.h @@ -12,8 +12,8 @@ * in the context of outputting integers. */ -#include <apos/attrs.h> -#include <apos/pmem.h> +#include <kmi/attrs.h> +#include <kmi/pmem.h> #include <arch/vmem.h> /** @name Internal. */ @@ -325,7 +325,7 @@ enum serial_dev { }; /** - * dbg, apos equivalent of printf. + * dbg, kmi equivalent of printf. * * @param fmt Format string. Integer subset of normal printf formatting. */ @@ -426,4 +426,4 @@ vm_t map_io_dbg(struct vmem *vmem); #endif /* DEBUG */ -#endif /* APOS_DEBUG_H */ +#endif /* KMI_DEBUG_H */ diff --git a/include/apos/dmem.h b/include/kmi/dmem.h index 00f4892..17348c3 100644 --- a/include/apos/dmem.h +++ b/include/kmi/dmem.h @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ /* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */ -#ifndef APOS_DEV_H -#define APOS_DEV_H +#ifndef KMI_DEV_H +#define KMI_DEV_H /** * @file dmem.h @@ -10,8 +10,8 @@ * \todo Make global parameters functions instead. */ -#include <apos/types.h> -#include <apos/vmem.h> +#include <kmi/types.h> +#include <kmi/vmem.h> /** Provides access to the global parameter. \global */ extern pm_t __pre_base; @@ -59,4 +59,4 @@ vm_t alloc_devmem(struct tcb *p, pm_t dev_start, size_t bytes, vmflags_t flags); */ stat_t free_devmem(struct tcb *p, vm_t dev_start); -#endif /* APOS_DEV_H */ +#endif /* KMI_DEV_H */ diff --git a/include/apos/elf.h b/include/kmi/elf.h index 5c97b80..21f44f9 100644 --- a/include/apos/elf.h +++ b/include/kmi/elf.h @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ /* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */ -#ifndef APOS_ELF_H -#define APOS_ELF_H +#ifndef KMI_ELF_H +#define KMI_ELF_H /** * @file elf.h @@ -11,9 +11,9 @@ * \todo Other file formats? */ -#include <apos/attrs.h> -#include <apos/types.h> -#include <apos/vmem.h> +#include <kmi/attrs.h> +#include <kmi/types.h> +#include <kmi/vmem.h> /** @name Magic. */ /** @{ */ @@ -53,7 +53,7 @@ /** * @name ELF ABIs. - * Missing apos, of course, not sure which of these I should use instead. Some + * Missing kmi, of course, not sure which of these I should use instead. Some * BSD? */ /** @{ */ @@ -623,4 +623,4 @@ struct __packed section64_header { */ vm_t load_elf(struct tcb *p, vm_t binary, vm_t interp); -#endif /* APOS_ELF_H */ +#endif /* KMI_ELF_H */ diff --git a/include/apos/initrd.h b/include/kmi/initrd.h index bd930d2..9a4e2c0 100644 --- a/include/apos/initrd.h +++ b/include/kmi/initrd.h @@ -1,17 +1,17 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ /* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */ -#ifndef APOS_INITRD_H -#define APOS_INITRD_H +#ifndef KMI_INITRD_H +#define KMI_INITRD_H /** * @file initrd.h * Initrd handling. */ -#include <apos/types.h> -#include <apos/pmem.h> -#include <apos/vmem.h> +#include <kmi/types.h> +#include <kmi/pmem.h> +#include <kmi/vmem.h> /** * Get \c init program size in bytes. @@ -54,4 +54,4 @@ pm_t get_initrdbase(const void *fdt); */ stat_t move_init(const void *fdt, void *target); -#endif /* APOS_INITRD_H */ +#endif /* KMI_INITRD_H */ diff --git a/include/apos/ipi.h b/include/kmi/ipi.h index c895d58..065c41f 100644 --- a/include/apos/ipi.h +++ b/include/kmi/ipi.h @@ -1,5 +1,5 @@ -#ifndef APOS_IPI_H -#define APOS_IPI_H +#ifndef KMI_IPI_H +#define KMI_IPI_H /** * @file ipi.h @@ -7,9 +7,9 @@ * IPI function definitions. */ -#include <apos/types.h> -#include <apos/uapi.h> -#include <apos/tcb.h> +#include <kmi/types.h> +#include <kmi/uapi.h> +#include <kmi/tcb.h> /** * Clear potential IPI in \p t, and return its value. @@ -34,4 +34,4 @@ void send_ipi(struct tcb *t); */ struct sys_ret handle_ipi(struct tcb *t); -#endif /* APOS_IPI_H */ +#endif /* KMI_IPI_H */ diff --git a/include/apos/lock.h b/include/kmi/lock.h index a841d4b..77c75ce 100644 --- a/include/apos/lock.h +++ b/include/kmi/lock.h @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ /* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */ -#ifndef APOS_LOCK_H -#define APOS_LOCK_H +#ifndef KMI_LOCK_H +#define KMI_LOCK_H /** * @file lock.h @@ -10,13 +10,13 @@ * probably overkill for this project. */ -#include <apos/atomic.h> -#include <apos/irq.h> +#include <kmi/atomic.h> +#include <kmi/irq.h> /** * Typedef for atomic_int. * - * In apos, spinlocks are implemented with compiler-intrinsic atomic integers, + * In kmi, spinlocks are implemented with compiler-intrinsic atomic integers, * that essentially just contain some flags. Currently all spinlocks * enable/disable irqs. * @@ -52,4 +52,4 @@ static inline void spin_unlock(spinlock_t *lck) enable_irq(); } -#endif /* APOS_LOCK_H */ +#endif /* KMI_LOCK_H */ diff --git a/include/apos/mem.h b/include/kmi/mem.h index ea61aba..3513c04 100644 --- a/include/apos/mem.h +++ b/include/kmi/mem.h @@ -1,16 +1,16 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ /* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */ -#ifndef APOS_MEM_H -#define APOS_MEM_H +#ifndef KMI_MEM_H +#define KMI_MEM_H /** * @file mem.h * Generic memory, common to both physical and virtual memory. */ -#include <apos/utils.h> -#include <apos/types.h> +#include <kmi/utils.h> +#include <kmi/types.h> /** * Convert physical memory address \c paddr to index of page order \c order. @@ -220,4 +220,4 @@ void init_mem(size_t max_order, size_t shifts[10], size_t page_shift); /** Base page order. */ #define BASE_PAGE (MM_O0) -#endif /* APOS_MEM_H */ +#endif /* KMI_MEM_H */ diff --git a/include/apos/mem_nodes.h b/include/kmi/mem_nodes.h index 164d04a..f44b6a4 100644 --- a/include/apos/mem_nodes.h +++ b/include/kmi/mem_nodes.h @@ -1,16 +1,16 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ /* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */ -#ifndef APOS_MM_NODES_H -#define APOS_MM_NODES_H +#ifndef KMI_MM_NODES_H +#define KMI_MM_NODES_H /** * @file mem_nodes.h * Memory node subsystem. Used by the memory region subsystem. */ -#include <apos/vmem.h> -#include <apos/nodes.h> +#include <kmi/vmem.h> +#include <kmi/nodes.h> /** * Initialize memory node subsystem. @@ -39,4 +39,4 @@ struct mem_region *get_mem_node(); */ void free_mem_node(struct mem_region *m); -#endif /* APOS_MM_NODES_H */ +#endif /* KMI_MM_NODES_H */ diff --git a/include/apos/mem_regions.h b/include/kmi/mem_regions.h index 6fdb5b4..c9b3ec0 100644 --- a/include/apos/mem_regions.h +++ b/include/kmi/mem_regions.h @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ /* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */ -#ifndef APOS_MEM_REGIONS_H -#define APOS_MEM_REGIONS_H +#ifndef KMI_MEM_REGIONS_H +#define KMI_MEM_REGIONS_H /** * @file mem_regions.h @@ -10,10 +10,10 @@ * user memory. */ -#include <apos/mem.h> +#include <kmi/mem.h> #include <arch/vmem.h> -#include <apos/types.h> -#include <apos/sp_tree.h> +#include <kmi/types.h> +#include <kmi/sp_tree.h> /** * Get \ref mem_region container of \c ptr. @@ -300,4 +300,4 @@ vm_t map_fill_region(struct vmem *vmem, region_callback_t *mem_handler, pm_t offset, vm_t start, size_t bytes, vmflags_t flags, void *data); -#endif /* APOS_MEM_REGIONS_H */ +#endif /* KMI_MEM_REGIONS_H */ diff --git a/include/apos/nodes.h b/include/kmi/nodes.h index f1d4501..574f545 100644 --- a/include/apos/nodes.h +++ b/include/kmi/nodes.h @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ /* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */ -#ifndef APOS_NODES_H -#define APOS_NODES_H +#ifndef KMI_NODES_H +#define KMI_NODES_H /** * @file nodes.h @@ -10,7 +10,7 @@ * of memory nodes smaller than memory pages. */ -#include <apos/types.h> +#include <kmi/types.h> /** Node slot status. */ enum node_status { @@ -91,4 +91,4 @@ void *get_node(struct node_root *r); */ void free_node(struct node_root *r, void *p); -#endif /* APOS_NODES_H */ +#endif /* KMI_NODES_H */ diff --git a/include/apos/pmem.h b/include/kmi/pmem.h index 6278b57..f69f7b0 100644 --- a/include/apos/pmem.h +++ b/include/kmi/pmem.h @@ -1,16 +1,16 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ /* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */ -#ifndef APOS_PMEM_H -#define APOS_PMEM_H +#ifndef KMI_PMEM_H +#define KMI_PMEM_H /** * @file pmem.h * Physical memory subsystem. Used to allocate and free physical memory pages. */ -#include <apos/mem.h> -#include <apos/types.h> +#include <kmi/mem.h> +#include <kmi/types.h> #include <arch/pmem.h> /** @@ -68,4 +68,4 @@ pm_t probe_pmap(size_t ram_size); */ void init_pmem(void *fdt); -#endif /* APOS_PMEM_H */ +#endif /* KMI_PMEM_H */ diff --git a/include/apos/power.h b/include/kmi/power.h index b239d5b..0cfec4b 100644 --- a/include/apos/power.h +++ b/include/kmi/power.h @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ /* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */ -#ifndef APOS_POWER_H -#define APOS_POWER_H +#ifndef KMI_POWER_H +#define KMI_POWER_H /** * @file power.h @@ -10,8 +10,8 @@ * host machines. */ -#include <apos/types.h> -#include <apos/attrs.h> +#include <kmi/types.h> +#include <kmi/attrs.h> /** Types of powering off. Still unclear what difference there is between warm * and cold reboot. */ diff --git a/include/apos/proc.h b/include/kmi/proc.h index cca7969..c69c5b4 100644 --- a/include/apos/proc.h +++ b/include/kmi/proc.h @@ -1,17 +1,17 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ /* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */ -#ifndef APOS_PROC_H -#define APOS_PROC_H +#ifndef KMI_PROC_H +#define KMI_PROC_H /** * @file proc.h * Process handling subsystem, should likely be merged into \ref - * include/apos/tcb.h. + * include/kmi/tcb.h. */ -#include <apos/tcb.h> -#include <apos/vmem.h> +#include <kmi/tcb.h> +#include <kmi/vmem.h> /** * Set up binary. Currently only supports ELF, not sure if other formats should @@ -34,4 +34,4 @@ stat_t prepare_proc(struct tcb *t, vm_t bin, vm_t interp); */ stat_t init_proc(void *fdt); -#endif /* APOS_PROC_H */ +#endif /* KMI_PROC_H */ diff --git a/include/apos/sizes.h b/include/kmi/sizes.h index 40c3590..f56435e 100644 --- a/include/apos/sizes.h +++ b/include/kmi/sizes.h @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ /* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */ -#ifndef APOS_SIZES_H -#define APOS_SIZES_H +#ifndef KMI_SIZES_H +#define KMI_SIZES_H /** * @file sizes.h @@ -217,4 +217,4 @@ #endif -#endif /* APOS_SIZES_H */ +#endif /* KMI_SIZES_H */ diff --git a/include/apos/sp_tree.h b/include/kmi/sp_tree.h index 7701f52..9a81270 100644 --- a/include/apos/sp_tree.h +++ b/include/kmi/sp_tree.h @@ -9,7 +9,7 @@ * sp_trees, a type of binary search trees. */ -#include <apos/types.h> +#include <kmi/types.h> /** * Get root of tree from \ref sp_root. diff --git a/include/apos/string.h b/include/kmi/string.h index 5e97444..d2ad529 100644 --- a/include/apos/string.h +++ b/include/kmi/string.h @@ -1,16 +1,16 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ /* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */ -#ifndef APOS_STRING_H -#define APOS_STRING_H +#ifndef KMI_STRING_H +#define KMI_STRING_H /** * @file string.h * String handling, similar to cstdlib's string.h. */ -#include <apos/types.h> -#include <apos/builtin.h> +#include <kmi/types.h> +#include <kmi/builtin.h> /* follow C library functions, drop location and error functions */ @@ -307,4 +307,4 @@ int memcmp(const void *ptr1, const void *ptr2, size_t num); #define strlen(s) __builtin_strlen(s) #endif -#endif /* APOS_STRING_H */ +#endif /* KMI_STRING_H */ diff --git a/include/apos/syscalls.h b/include/kmi/syscalls.h index 40e6504..de59965 100644 --- a/include/apos/syscalls.h +++ b/include/kmi/syscalls.h @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ /* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */ -#ifndef APOS_SYSCALLS_H -#define APOS_SYSCALLS_H +#ifndef KMI_SYSCALLS_H +#define KMI_SYSCALLS_H /** * @file syscalls.h @@ -139,4 +139,4 @@ enum { /* function declarations should be somewhere else, this file could be used in * userspace applications as well */ -#endif /* APOS_SYSCALLS_H */ +#endif /* KMI_SYSCALLS_H */ diff --git a/include/apos/tcb.h b/include/kmi/tcb.h index 8f3be3d..bb57b44 100644 --- a/include/apos/tcb.h +++ b/include/kmi/tcb.h @@ -1,17 +1,17 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ /* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */ -#ifndef APOS_TCB_H -#define APOS_TCB_H +#ifndef KMI_TCB_H +#define KMI_TCB_H /** * @file tcb.h * Process/thread handling. */ -#include <apos/mem_regions.h> -#include <apos/caps.h> -#include <apos/types.h> +#include <kmi/mem_regions.h> +#include <kmi/caps.h> +#include <kmi/types.h> #include <arch/tcb.h> /* arch-specific data */ /** @@ -414,4 +414,4 @@ void leave_rpc(struct tcb *t); */ bool enough_rpc_stack(struct tcb *t); -#endif /* APOS_TCB_H */ +#endif /* KMI_TCB_H */ diff --git a/include/apos/timer.h b/include/kmi/timer.h index 6f83d23..3bc2b3f 100644 --- a/include/apos/timer.h +++ b/include/kmi/timer.h @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ /* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */ -#ifndef APOS_TIMER_H -#define APOS_TIMER_H +#ifndef KMI_TIMER_H +#define KMI_TIMER_H /** * @file timer.h @@ -11,7 +11,7 @@ * \todo Document exceptions and return values better. */ -#include <apos/types.h> +#include <kmi/types.h> /** * ticks_t typedef, use unsigned 64bit integer on all platforms. @@ -133,4 +133,4 @@ static inline ticks_t secs_to_ticks(tunit_t secs) return msecs_to_ticks(secs * 1000); } -#endif /* APOS_TIMER_H */ +#endif /* KMI_TIMER_H */ diff --git a/include/apos/types.h b/include/kmi/types.h index 36e918e..c5730a9 100644 --- a/include/apos/types.h +++ b/include/kmi/types.h @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ /* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */ -#ifndef APOS_TYPES_H -#define APOS_TYPES_H +#ifndef KMI_TYPES_H +#define KMI_TYPES_H /** * @file types.h @@ -491,4 +491,4 @@ enum status_codes { #include <arch/types.h> /* arch-specific type definitions (pm_t/vm_t etc) */ -#endif /* APOS_TYPES_H */ +#endif /* KMI_TYPES_H */ diff --git a/include/apos/uapi.h b/include/kmi/uapi.h index fefd1bf..9c6c7be 100644 --- a/include/apos/uapi.h +++ b/include/kmi/uapi.h @@ -1,16 +1,16 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ /* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */ -#ifndef APOS_UAPI_H -#define APOS_UAPI_H +#ifndef KMI_UAPI_H +#define KMI_UAPI_H /** * @file uapi.h * Userspace api, syscall declarations. */ -#include <apos/syscalls.h> -#include <apos/vmem.h> +#include <kmi/syscalls.h> +#include <kmi/vmem.h> /** * Syscall function type. @@ -789,4 +789,4 @@ void handle_syscall(sys_arg_t syscall, sys_arg_t a, sys_arg_t b, #include <arch/proc.h> #define return_args(t, x) {set_args((t), (x)); return;} -#endif /* APOS_UAPI_H */ +#endif /* KMI_UAPI_H */ diff --git a/include/apos/unaligned.h b/include/kmi/unaligned.h index 316a5d4..3930b29 100644 --- a/include/apos/unaligned.h +++ b/include/kmi/unaligned.h @@ -1,16 +1,16 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ /* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */ -#ifndef APOS_UNALIGNED_H -#define APOS_UNALIGNED_H +#ifndef KMI_UNALIGNED_H +#define KMI_UNALIGNED_H /** * @file unaligned.h * Helpers for unaligned memory accesses. Largely lifted from Linux. */ -#include <apos/types.h> -#include <apos/attrs.h> +#include <kmi/types.h> +#include <kmi/attrs.h> /** * Get unaligned value. Type of value is deduced from pointer type. @@ -252,4 +252,4 @@ DEFINE_PUT(int64_t); #undef DEFINE_PUT -#endif /* APOS_UNALIGNED_H */ +#endif /* KMI_UNALIGNED_H */ diff --git a/include/apos/utils.h b/include/kmi/utils.h index 378f3a0..bd39f6a 100644 --- a/include/apos/utils.h +++ b/include/kmi/utils.h @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ /* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */ -#ifndef APOS_UTILS_H -#define APOS_UTILS_H +#ifndef KMI_UTILS_H +#define KMI_UTILS_H /** * @file utils.h @@ -139,7 +139,7 @@ */ #define MAYBE_UNUSED(x) UNUSED(x) -#include <apos/builtin.h> +#include <kmi/builtin.h> /** * Get offset of member inside structure. @@ -234,7 +234,7 @@ */ #define ptradd(x, y) (((vm_t)(x)) + ((vm_t)(y))) -#include <apos/types.h> +#include <kmi/types.h> /* clang-format doesn't like _Generic, but I guess that's fine. * Uncrustify just ignores it, as far as I can tell. */ @@ -668,4 +668,4 @@ static inline uintmax_t convnum(const char *c, size_t len, size_t base) return sum; } -#endif /* APOS_UTILS_H */ +#endif /* KMI_UTILS_H */ diff --git a/include/apos/vmem.h b/include/kmi/vmem.h index 5cbe7db..9fbbffc 100644 --- a/include/apos/vmem.h +++ b/include/kmi/vmem.h @@ -1,18 +1,18 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ /* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */ -#ifndef APOS_VMEM_H -#define APOS_VMEM_H +#ifndef KMI_VMEM_H +#define KMI_VMEM_H /** * @file vmem.h * Virtual memory handling. */ -#include <apos/tcb.h> -#include <apos/mem.h> -#include <apos/pmem.h> -#include <apos/sp_tree.h> +#include <kmi/tcb.h> +#include <kmi/mem.h> +#include <kmi/pmem.h> +#include <kmi/sp_tree.h> /** * Allocate user virtual memory. @@ -284,4 +284,4 @@ stat_t free_uvmem_wrapper(struct vmem *b, pm_t *offset, vm_t vaddr, */ #define vp_flags(x) ((x) & 0xff) -#endif /* APOS_VMEM_H */ +#endif /* KMI_VMEM_H */ diff --git a/include/libfdt.h b/include/libfdt.h index e9e59b6..3aeaa0f 100644 --- a/include/libfdt.h +++ b/include/libfdt.h @@ -1,19 +1,19 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ /* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */ -#ifndef APOS_LIBFDT_H -#define APOS_LIBFDT_H +#ifndef KMI_LIBFDT_H +#define KMI_LIBFDT_H /** * @file libfdt.h - * Main include file in apos for functions in libfdt. + * Main include file in kmi for functions in libfdt. */ #include "../dtc/libfdt/libfdt.h" -#include <apos/unaligned.h> -#include <apos/types.h> +#include <kmi/unaligned.h> +#include <kmi/types.h> -/* apos additions, implementation can be found in common/fdt.c */ +/* kmi additions, implementation can be found in common/fdt.c */ /** * FDT cell info. diff --git a/include/libfdt_env.h b/include/libfdt_env.h index 642e246..e4bfd55 100644 --- a/include/libfdt_env.h +++ b/include/libfdt_env.h @@ -7,12 +7,12 @@ /** * @file libfdt_env.h - * Set up apos environment for libfdt. + * Set up kmi environment for libfdt. */ -#include <apos/types.h> -#include <apos/string.h> -#include <apos/bits.h> +#include <kmi/types.h> +#include <kmi/string.h> +#include <kmi/bits.h> /** 16bit integer. */ typedef int16_t fdt16_t; |
