Commit Graph

135 Commits

Author SHA1 Message Date
409725f9d4 kernel: implementing mapping and execution of bsp executable 2026-02-08 13:13:03 +00:00
1c74291b99 kernel: add a temporary syscall dispatch system 2026-02-08 13:12:24 +00:00
5d28955dc6 vm: update vm-page documentation 2026-02-08 13:11:41 +00:00
ee82097017 sched: implement user-mode task and thread creation 2026-02-08 13:11:17 +00:00
d2f303680d sched: add root vm-region and handle table to struct task 2026-02-08 13:10:54 +00:00
27bed1a3d3 sched: all kernel-mode tasks now have negative task ids 2026-02-08 13:09:29 +00:00
18a5325fa7 sched: add PID_MAX definition 2026-02-08 13:07:14 +00:00
7eaad64969 pmap: declare fault handler function and flags 2026-02-08 13:06:19 +00:00
883b5ac9e2 vm: add vm-region to manage userspace virtual memory address spaces
vm-region supports creating nested regions of virtual memory, each with their
own memory protection restrictions.

vm-objects can be mapped into a vm-region, making the underlying memory
accessible. all mappings are lazy: page tables are not updated until the
mapped memory is accessed.
2026-02-08 12:59:08 +00:00
b8ccffd2d4 vm: add vm-object to represent non-contiguous physical memory allocations
vm-object can be used to demand-allocate non-contiguous physical memory, and
will provide an api for userspace programs to do the same. unless a vm-object
is created in-place (i.e. to represent a specific area of physical memory),
its memory pages are only allocated when the object is mapped AND someone
attempts to access the memory.
2026-02-08 12:58:31 +00:00
14ebcd4875 kernel: implement object handle tables 2026-02-08 12:55:47 +00:00
6950850f5b object: add a macro to define object lock/unlock functions 2026-02-08 12:55:13 +00:00
d94a6ec7cb kernel: add generic FATAL_ERROR status code 2026-02-08 12:48:59 +00:00
0d73196b4b printk: add macro for conditional trace-level printk statements 2026-02-08 12:48:33 +00:00
4de1463e7c object: add functions to track handle allocation 2026-02-08 12:37:08 +00:00
5304e5be00 object: rename deref to unref 2026-02-08 12:36:32 +00:00
0853cff56b vm: remove vm_region; add vm_page_get_size_bytes 2026-02-08 12:33:36 +00:00
aaa76ff197 memblock: make virt_to_phys pointer param const 2026-02-08 12:33:03 +00:00
0490541dc9 kernel: adjust formatting 2026-02-08 12:32:48 +00:00
49a75a1bbe pmap: change pmap_add* virtual pointer parameter to virt_addr_t 2026-02-08 12:08:26 +00:00
34f614b881 libc: move fill_random to kernel/util 2026-02-08 12:06:50 +00:00
129e782e99 kernel: add functions to get/set the bsp boot module location 2026-02-08 11:38:50 +00:00
a56d69e260 kernel: add a type to represent boot modules 2026-02-08 11:02:35 +00:00
8811016b7d kernel: remove redundant header files 2025-05-20 23:14:33 +01:00
62ec4c93ab meta: rename 2024-11-02 11:31:51 +00:00
ef05233dcf sched: allocate and assign ids to each thread 2024-09-17 17:49:05 +01:00
3f992d84fb kernel: remove everything that is related to device/fs management
this is now a microkernel.
2024-09-17 17:47:50 +01:00
b0c021d4e9 kernel: add kernel.early-console and kernel.console boot args
kernel.early-console is used to specify which output device the
kernel boot log should be written to. the first thing the kernel
does on boot after initialising the bootstrap processor is initialise
the early console, making it useful for debugging problems that
occur early in the boot process. this arg accepts a list of hard-coded
values for output devices, such as tty0 for the display or ttyS0
for the serial port. the exact values supported will depend on the
platform.

once all drivers are loaded, the kernel switches to the device specified
by kernel.console for output. unlike kernel.early-console, this arg
specifies the name of a tty device in /dev/tty. this means that, not
only are more devices supported (any device provided by a tty driver),
but the kernel can also get input from the user using this console too
(not used by the kernel itself, but will be used by the user to interact
with userspace programs, like the shell).
2023-12-30 09:09:18 +00:00
53e756eca0 kernel: add boot argument parsing 2023-12-27 17:34:59 +00:00
b8934d220c vm: increase the number of sparse memory sectors that can be created 2023-12-24 09:43:57 +00:00
63b69d8d85 util: fix absdiff64() always over/underflowing 2023-12-24 09:36:41 +00:00
e9e73bc027 dev: removed internal spinlock from bcache
bcaches must now have an explicit external lock to protect them from
concurrent access (i.e. a lock belonging to their parent block device)
2023-07-11 21:28:02 +01:00
3233169f25 dev: implement reading from block devices
reading from block devices is done using the block cache (bcache).
This cache stores sectors from a block device in pages of memory
marked as 'cached', which will allow them to be reclaimed when
memory pressure is high (TODO).

while block device drivers implement callbacks allowing reading/writing
at block-granularity, the device subsystem uses the block cache to
implement reading/writing at byte-granularity in a driver-agnostic way.

block drivers can disable the block cache for their devices, but this
will require that any clients communicate with the devices at
block-granularity.

also added an offset parameter to device and object read/write functions/callbacks.
2023-07-09 21:58:40 +01:00
53440653f2 kernel: remove static qualifier from functions generated by btree convenience macros 2023-07-09 21:57:04 +01:00
49f50859b5 dev: block device IO callbacks now use iovec 2023-07-09 09:06:36 +01:00
8463423c10 kernel: add endian conversion functions 2023-07-08 22:14:31 +01:00
db992a0994 kernel: add status codes for device IO 2023-07-08 15:55:56 +01:00
d9b9c0d4e7 dev: implement block device registration 2023-07-08 15:55:43 +01:00
71dbdf21a2 dev: allow devices to specify human-readable model names 2023-07-08 15:53:59 +01:00
d96c549f17 vm: allow pages to be mapped as no-cache 2023-07-08 15:53:06 +01:00
65db7cfbda kernel: add filesystem model definitions 2023-06-25 11:03:44 +01:00
1c20efc36e dev: add function to ref/deref device objects 2023-06-14 21:44:47 +01:00
2656696757 tty: reading input from a tty is now handled by the line discipline 2023-06-14 17:38:11 +01:00
4a1c6cae69 sched: add support for scheduling functions to be executed later 2023-06-14 17:36:45 +01:00
cdb9fef36c tty: remove tty event queues 2023-06-11 19:00:55 +01:00
a7c28e983c kernel: tty: implement tty input using line disciplines 2023-06-11 16:47:33 +01:00
7308fd98fb dev: implement input event hooks 2023-06-11 16:46:58 +01:00
3cc72f1f24 kernel: tty: support printing output from printk() 2023-06-11 14:55:47 +01:00
abe4af093e tty: implement read/write support 2023-06-11 09:23:57 +01:00
d09ad5838e kernel: implement tty driver system 2023-06-10 21:41:07 +01:00