Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
7cbac9f
feat: create initial draft for async system
KaiNorberg Jan 16, 2026
376b8a9
refactor(kernel:request): rename task to request
KaiNorberg Jan 17, 2026
449330d
refactor(libstd:rings): use unix style verb names for async api
KaiNorberg Jan 17, 2026
3a7e31c
feat(kernel:async): first async nop
KaiNorberg Jan 17, 2026
5a1ade1
feat(libstd:rings): draft register system
KaiNorberg Jan 17, 2026
91213b5
feat(kernel:async): support multiple rings per process
KaiNorberg Jan 17, 2026
75b2809
feat(kernel:async): implement SQE_LINK
KaiNorberg Jan 17, 2026
45a119f
feat(kernel:request): implement request pool structure
KaiNorberg Jan 17, 2026
8e4fcf0
feat(kernel:async): implement register system
KaiNorberg Jan 17, 2026
da45c80
feat(kernel:async): add SQE_HARDLINK
KaiNorberg Jan 17, 2026
c14b8b4
feat(kernel:irp): implement I/O Request Packets
KaiNorberg Jan 19, 2026
9837728
feat(kernel:pmm): new pmm with reference counting
KaiNorberg Jan 20, 2026
5972b20
refactor: use Page Frame Numbers instead of void* for pages
KaiNorberg Jan 20, 2026
e2e5944
feat(kernel:irp): add enter and leave callbacks
KaiNorberg Jan 20, 2026
609889a
feat(kernel:mem_desc): implement memory descriptors; cleanup ring names
KaiNorberg Jan 20, 2026
a01160b
refactor: reorganize ring and IRP subsystems into an I/O subsystem
KaiNorberg Jan 21, 2026
bf997a2
refactor: move sys/io.h to sys/fs.h; add ioring archetype system
KaiNorberg Jan 21, 2026
74bafbc
feat(kernel:io): implement basic verb tables; rename mem_desc_t into …
KaiNorberg Jan 21, 2026
8b94721
feat(kernel:io): new verb table system
KaiNorberg Jan 22, 2026
fa40da8
refactor: change inode_t to vnode_t
KaiNorberg Jan 22, 2026
1e5d9e7
refactor: standardize sys/ioring.h names and move IRP arguments to ir…
KaiNorberg Jan 22, 2026
72e0516
feat(kernel:irp): implement IRP function numbers and vtable
KaiNorberg Jan 23, 2026
caff5df
refactor: flatten libstd include dir and merge kernel+module include …
KaiNorberg Jan 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 1 addition & 4 deletions Make.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ CFLAGS := \
-Wno-unused-but-set-parameter \
-Wno-unused-command-line-argument \
-isystem include \
-isystem include/libstd \
-Iinclude \
-Ilib \
-I$(SRCDIR) \
-D_PATCHWORK_OS_
Expand All @@ -46,7 +44,6 @@ ASFLAGS := \
-ffreestanding \
-fno-builtin \
-Iinclude \
-Iinclude/libstd \
-I$(SRCDIR) \
-D_PATCHWORK_OS_

Expand Down Expand Up @@ -94,7 +91,7 @@ ASFLAGS_MODULE := \
LDFLAGS_MODULE := \
-shared \
-fPIC \
-Tinclude/modules/linker.lds
-Tinclude/kernel/module.lds

define find_sources
$(shell find $(1) -name "*.c" -o -name "*.S" 2>/dev/null)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 18 additions & 0 deletions include/_libstd/fd_t.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#ifndef _INTERNAL_FD_T_H
#define _INTERNAL_FD_T_H 1

/**
* @addtogroup libstd
*
* @{
*/

typedef __UINT64_TYPE__ fd_t; ///< File descriptor type.

#define FD_NONE ((fd_t) - 1) ///< No file descriptor.

#define FD_CWD ((fd_t) - 2) ///< Use the current working directory.)

/** @} */

#endif
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion include/libstd/alloca.h → include/alloca.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ extern "C"
{
#endif

#include "_internal/config.h"
#include "_libstd/config.h"

#define alloca(size) __builtin_alloca(size)

Expand Down
2 changes: 1 addition & 1 deletion include/libstd/assert.h → include/assert.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ extern "C"
{
#endif

#include "_internal/config.h"
#include "_libstd/config.h"

_PUBLIC void _assert_99(const char* const, const char* const, const char* const);
_PUBLIC void _assert_89(const char* const);
Expand Down
6 changes: 3 additions & 3 deletions include/boot/boot_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <gnu-efi/inc/efi.h>

#include <_internal/MAX_NAME.h>
#include <_libstd/MAX_NAME.h>
#include <stdint.h>
#include <sys/defs.h>
#include <sys/elf.h>
Expand Down Expand Up @@ -41,7 +41,7 @@ static UNUSED_FUNC bool boot_is_mem_ram(EFI_MEMORY_TYPE type)
}
typedef struct
{
uint32_t* physAddr;
phys_addr_t physAddr;
uint32_t* virtAddr;
size_t size;
size_t width;
Expand Down Expand Up @@ -87,7 +87,7 @@ typedef struct boot_info boot_info_t;
typedef struct
{
Elf64_File elf;
void* physAddr;
phys_addr_t physAddr;
} boot_kernel_t;

typedef struct
Expand Down
4 changes: 2 additions & 2 deletions include/libstd/ctype.h → include/ctype.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ extern "C"
{
#endif

#include "_internal/ascii.h"
#include "_internal/config.h"
#include "_libstd/ascii.h"
#include "_libstd/config.h"

#define isalnum(c) ((int)(_asciiTable[(int)(c)].flags & (_ASCII_ALPHA | _ASCII_DIGIT)))

Expand Down
6 changes: 3 additions & 3 deletions include/libstd/errno.h → include/errno.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ extern "C"
{
#endif

#include "_internal/ERR.h"
#include "_internal/config.h"
#include "_libstd/ERR.h"
#include "_libstd/config.h"

int* _errno_get(void);

Expand Down Expand Up @@ -694,7 +694,7 @@ int* _errno_get(void);
/** @} */

#if _USE_ANNEX_K == 1
#include "_internal/errno_t.h"
#include "_libstd/errno_t.h"
#endif

#if defined(__cplusplus)
Expand Down
2 changes: 1 addition & 1 deletion include/libstd/float.h → include/float.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef _FLOAT_H
#define _FLOAT_H 1

#include "_internal/config.h"
#include "_libstd/config.h"

#define FLT_ROUNDS -1
#define FLT_EVAL_METHOD __FLT_EVAL_METHOD__
Expand Down
2 changes: 1 addition & 1 deletion include/libstd/inttypes.h → include/inttypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ extern "C"
{
#endif

#include "_internal/config.h"
#include "_libstd/config.h"

typedef __INTMAX_TYPE__ intmax_t;
typedef __UINTMAX_TYPE__ uintmax_t;
Expand Down
4 changes: 2 additions & 2 deletions include/modules/acpi/acpi.h → include/kernel/acpi/acpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

/**
* @brief Advanced Configuration and Power Interface
* @defgroup modules_acpi ACPI
* @ingroup modules
* @defgroup kernel_acpi ACPI
* @ingroup kernel
*
* We use version 6.6 of the ACPI specification, but it contains minor mistakes or deprecated features that we use other
* versions to straighten out. If the "ACPI specification" is ever sourced, without mentioning its version, assume
Expand Down
12 changes: 6 additions & 6 deletions include/modules/acpi/aml/aml.h → include/kernel/acpi/aml/aml.h
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
#pragma once

#include <kernel/sync/mutex.h>
#include <modules/acpi/aml/encoding/data.h>
#include <modules/acpi/aml/encoding/expression.h>
#include <modules/acpi/aml/encoding/name.h>
#include <modules/acpi/aml/encoding/named.h>
#include <kernel/acpi/aml/encoding/data.h>
#include <kernel/acpi/aml/encoding/expression.h>
#include <kernel/acpi/aml/encoding/name.h>
#include <kernel/acpi/aml/encoding/named.h>

#include <stdint.h>

/**
* @brief ACPI AML
* @defgroup modules_acpi_aml AML
* @ingroup modules_acpi
* @defgroup kernel_acpi_aml AML
* @ingroup kernel_acpi
*
* ACPI AML is a procedural turing complete bytecode language used to describe the hardware configuration of a computer
* system. A hardware manufacturer creates the bytecode to describe their hardware, and we, as the kernel, parse it. The
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#pragma once

#include <modules/acpi/aml/encoding/term.h>
#include <modules/acpi/aml/token.h>
#include <kernel/acpi/aml/encoding/term.h>
#include <kernel/acpi/aml/token.h>

/**
* @brief Debugging
* @defgroup modules_acpi_aml_debug Debugging
* @ingroup modules_acpi_aml
* @defgroup kernel_acpi_aml_debug Debugging
* @ingroup kernel_acpi_aml
*
* @{
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ typedef struct aml_term_list_ctx aml_term_list_ctx_t;

/**
* @brief Arg Objecs Encoding
* @defgroup modules_acpi_aml_encoding_args Args
* @ingroup modules_acpi_aml
* @defgroup kernel_acpi_aml_encoding_args Args
* @ingroup kernel_acpi_aml
*
* @see Section 20.2.6.1 of the ACPI specification.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <modules/acpi/aml/integer.h>
#include <kernel/acpi/aml/integer.h>

#include <stdbool.h>
#include <stdint.h>
Expand All @@ -11,8 +11,8 @@ typedef struct aml_term_list_ctx aml_term_list_ctx_t;

/**
* @brief Data Objects Encoding
* @defgroup modules_acpi_aml_encoding_data Data Objects
* @ingroup modules_acpi_aml
* @defgroup kernel_acpi_aml_encoding_data Data Objects
* @ingroup kernel_acpi_aml
*
* @see Section 20.2.3 of the ACPI specification for more details.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <stdint.h>

/**
* @addtogroup modules_acpi_aml_encoding_data
* @addtogroup kernel_acpi_aml_encoding_data
*
* @{
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ typedef struct aml_term_list_ctx aml_term_list_ctx_t;

/**
* @brief Debug Objects Encoding
* @defgroup modules_acpi_aml_encoding_debug Debug Objects
* @ingroup modules_acpi_aml
* @defgroup kernel_acpi_aml_encoding_debug Debug Objects
* @ingroup kernel_acpi_aml
*
* @{
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#pragma once

#include <modules/acpi/aml/encoding/arg.h>
#include <modules/acpi/aml/encoding/data.h>
#include <modules/acpi/aml/object.h>
#include <kernel/acpi/aml/encoding/arg.h>
#include <kernel/acpi/aml/encoding/data.h>
#include <kernel/acpi/aml/object.h>

typedef struct aml_object aml_object_t;
typedef struct aml_term_list_ctx aml_term_list_ctx_t;

/**
* @brief Expression Opcodes Encoding
* @defgroup modules_acpi_aml_encoding_expression Expression Opcodes
* @ingroup modules_acpi_aml
* @defgroup kernel_acpi_aml_encoding_expression Expression Opcodes
* @ingroup kernel_acpi_aml
*
* @see Section 20.2.5.4 of the ACPI specification for more details.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ typedef struct aml_term_list_ctx aml_term_list_ctx_t;

/**
* @brief Local Objecs Encoding
* @defgroup modules_acpi_aml_encoding_local Locals
* @ingroup modules_acpi_aml
* @defgroup kernel_acpi_aml_encoding_local Locals
* @ingroup kernel_acpi_aml
*
* @see Section 20.2.6.2 of the ACPI specification.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ typedef struct aml_term_list_ctx aml_term_list_ctx_t;

/**
* @brief Name Objects Encoding
* @defgroup modules_acpi_aml_encoding_name Name Objects
* @ingroup modules_acpi_aml
* @defgroup kernel_acpi_aml_encoding_name Name Objects
* @ingroup kernel_acpi_aml
*
* Not to be confused with "ACPI AML Named Objects Encoding".
*
Expand Down Expand Up @@ -81,14 +81,14 @@ typedef struct

/**
* @brief A NameString structure.
* @struct aml_name_string_t
* @struct aml_name_stioring_t
*/
typedef struct
{
aml_root_char_t rootChar;
aml_prefix_path_t prefixPath;
aml_name_path_t namePath;
} aml_name_string_t;
} aml_name_stioring_t;

/**
* @brief Reads the next data as a SegCount structure from the AML bytecode stream.
Expand Down Expand Up @@ -192,7 +192,7 @@ uint64_t aml_root_char_read(aml_term_list_ctx_t* ctx, aml_root_char_t* out);
* @param out Pointer to destination where the NameString will be stored.
* @return On success, `0`. On failure, `ERR` and `errno` is set.
*/
uint64_t aml_name_string_read(aml_term_list_ctx_t* ctx, aml_name_string_t* out);
uint64_t aml_name_string_read(aml_term_list_ctx_t* ctx, aml_name_stioring_t* out);

/**
* @brief Reads the next data as a NameString structure from the AML bytecode stream and resolves it to a object.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include <modules/acpi/aml/encoding/data_integers.h>
#include <modules/acpi/aml/integer.h>
#include <kernel/acpi/aml/encoding/data_integers.h>
#include <kernel/acpi/aml/integer.h>

#include <stdbool.h>

Expand All @@ -12,8 +12,8 @@ typedef struct aml_term_list_ctx aml_term_list_ctx_t;

/**
* @brief Named Objects Encoding
* @defgroup modules_acpi_aml_encoding_name Named Objects
* @ingroup modules_acpi_aml
* @defgroup kernel_acpi_aml_encoding_name Named Objects
* @ingroup kernel_acpi_aml
*
* Not to be confused with "ACPI AML Name Objects Encoding".
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ typedef struct aml_term_list_ctx aml_term_list_ctx_t;

/**
* @brief Namespace Modifier Objects Encoding
* @defgroup modules_acpi_aml_encoding_namespace_modifier Namespace Modifier Objects
* @ingroup modules_acpi_aml
* @defgroup kernel_acpi_aml_encoding_namespace_modifier Namespace Modifier Objects
* @ingroup kernel_acpi_aml
*
* @see Section 20.2.5.1 of the ACPI specification for more details.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ typedef struct aml_term_list_ctx aml_term_list_ctx_t;

/**
* @brief Package Length Encoding
* @defgroup modules_acpi_aml_encoding_package_length Package Length
* @ingroup modules_acpi_aml
* @defgroup kernel_acpi_aml_encoding_package_length Package Length
* @ingroup kernel_acpi_aml
*
* @see Section 20.2.4 of the ACPI specification.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <modules/acpi/aml/integer.h>
#include <kernel/acpi/aml/integer.h>

#include <stdint.h>

Expand All @@ -10,8 +10,8 @@ typedef struct aml_term_list_ctx aml_term_list_ctx_t;

/**
* @brief Statement Opcodes Encoding
* @defgroup modules_acpi_aml_encoding_statement Statement Opcodes
* @ingroup modules_acpi_aml
* @defgroup kernel_acpi_aml_encoding_statement Statement Opcodes
* @ingroup kernel_acpi_aml
*
* @see Section 20.2.5.3 of the ACPI specification for more details.
*
Expand Down
Loading