Commit Graph

376 Commits

Author SHA1 Message Date
Ashwin Naren
d2d1ba2cbf async unit testing 2026-02-19 09:56:59 -08:00
Ashwin Naren
a7e8f07686 unit testing 2026-02-18 22:23:40 -08:00
Ashwin Naren
a120732564 Merge pull request #219 from arihant2math/settime
Implement `clock_settime` syscall
2026-02-17 21:18:48 -08:00
Ashwin Naren
6e0d5ef43a implement clock_settime 2026-02-15 22:05:10 -08:00
Matthew Leach
ba0ff25b20 Merge pull request #203 from arihant2math/statfs
Implement `sys_statfs` and `sys_fstatfs`
2026-02-15 20:05:13 +00:00
Matthew Leach
d85fe47374 Merge pull request #209 from arihant2math/update-ext4
Update ext4-view fork
2026-02-15 19:52:07 +00:00
Matthew Leach
a1a15c70b2 Merge pull request #212 from arihant2math/lint-libkernel
Enable clippy lints for libkernel that were only enabled for moss
2026-02-15 19:50:26 +00:00
Ashwin Naren
ba88aa9d0a Merge pull request #214 from FeltMacaroon389/FeltMacaroon389-patch-1
minor changes in consistency and formatting of terms
2026-02-15 11:42:46 -08:00
Ashwin Naren
7567d148d8 Merge pull request #216 from andrewdavidmackenzie/fix-macos-scripts
Fix macos scripts
2026-02-15 11:08:27 -08:00
Andrew Mackenzie
f8a6c0c3d5 Small typo fix 2026-02-15 16:17:50 +01:00
Andrew Mackenzie
b4bdbc387e Add additional markup for command lines. This allows some editors/IDEs to be able to invoke it with a click on a run button beside the text 2026-02-15 16:17:03 +01:00
Andrew Mackenzie
af8ff3bfa5 Add < /dev/null at the end of debugfs invocations to ensure it exits and doesn't continue to read commands from stdin after completing commands from file 2026-02-15 15:55:19 +01:00
Andrew Mackenzie
dbeb4eab96 Add an explicit quit command at the end of the symlink commands for debugfs 2026-02-15 15:54:30 +01:00
Andrew Mackenzie
6154709539 Add additional macos dependencies required, and details of how to configure them. 2026-02-15 15:54:05 +01:00
Felt389
63d29794e3 minor changes in consistency and formatting of terms
Various terms are incorrectly written (e.g., "aarch64" instead of "AArch64" or "X86-64" instead of "x86_64"), as well as used inconsistently. This resolves most of that.

Additionally, there are some inconsistencies in other areas of text formatting, including utilizing colons or full stops before commands in some areas, while omitting them in other areas. This also attempts to clean up in that regard.

Finally, there's some clarifications in regard to general sentence formatting, to avoid inconsistency and any potential confusion.
2026-02-14 23:29:22 +01:00
Ashwin Naren
6aebef2168 enable clippy lints for libkernel 2026-02-13 10:24:13 -08:00
Matthew Leach
a55ecd1e33 Merge pull request #210 from hexagonal-sun/doc-fixes
Doc fixes
2026-02-13 12:19:38 +00:00
Matthew Leach
0b2391ffd5 doc: README: updates
Update readme and demo gif to show newer features.
2026-02-13 11:53:37 +00:00
Ashwin Naren
747da3324e Merge pull request #206 from arihant2math/settimeofdayfix
Fix `EFAULT` in settimeofday
2026-02-12 14:35:03 -08:00
Ashwin Naren
901a2b3303 update ext4-view fork 2026-02-12 14:18:39 -08:00
Ashwin Naren
6d0a4370fb fix efault in settimeofday 2026-02-11 09:47:44 -08:00
Ashwin Naren
3d33578533 Merge pull request #187 from arihant2math/cap-raise
prctl: implement `AmbientCapOp::Raise`
2026-02-09 23:24:52 -08:00
Matthew Leach
141fbf8a1b Merge pull request #202 from hexagonal-sun/slab-alloc-stress-test 2026-02-10 07:21:18 +00:00
Ashwin Naren
5408932bb9 fix fstatfs 2026-02-09 16:59:35 -08:00
Ashwin Naren
f1c0cba3b8 statfs 2026-02-09 16:59:15 -08:00
Ashwin Naren
2855ef7a51 Merge pull request #201 from arihant2math/hostname
Store hostname and allow for updates via `sys_sethostname`
2026-02-09 16:48:10 -08:00
Ashwin Naren
e65d51e48a address review 2026-02-09 16:40:53 -08:00
Ashwin Naren
eb84a1ec6d Merge pull request #198 from arihant2math/more-fnctl 2026-02-09 13:59:40 -08:00
Ashwin Naren
8281ea798f Merge pull request #197 from arihant2math/sysfs 2026-02-09 13:59:28 -08:00
Ashwin Naren
37c6217099 Merge pull request #192 from arihant2math/usertest-updates 2026-02-09 13:59:18 -08:00
Matthew Leach
9f21618058 libkernel: memory: slab: heap: new
Add a new module which implements the high-level heap logic (implements
`GlobalAlloc`) for the slab allocator.

Also implement a multi-threaded stress test of the heap ensuring
concurrent allocation is unique (doesn't corrupt other allocs) and all
memory is free'd back to the `FrameAllocator` when all caches are
purged.
2026-02-09 07:00:13 +00:00
Ashwin Naren
ef10631dc4 Merge pull request #195 from hexagonal-sun/slab-allocator
slab allocator
2026-02-08 16:51:29 -08:00
Ashwin Naren
c07dd2140c implement hostname properly 2026-02-08 00:39:55 -08:00
Ashwin Naren
75afc15bc7 fix typo 2026-02-07 18:26:28 -08:00
Ashwin Naren
479926f767 stub cgroup fs 2026-02-07 18:25:30 -08:00
Ashwin Naren
4c69c969e2 report and edit nlinks 2026-02-07 16:37:41 -08:00
Ashwin Naren
e9bcc1b10d implement fcntl F_SETFL 2026-02-07 13:53:34 -08:00
Ashwin Naren
157c29104f formatting 2026-02-07 00:31:23 -08:00
Ashwin Naren
ab93101a9f implement STATX_MNT_ID for sys_statx 2026-02-07 00:31:23 -08:00
Ashwin Naren
8046d746dd implement more of sys_power 2026-02-07 00:31:23 -08:00
Matthew Leach
1906f1be5e arch: arm64: memory: heap: new
Add a new heap module which integrates the per-cpu cache and
`SlabAllocator` into a usable `GlobalAlloc` for the kernel.
2026-02-07 08:26:35 +00:00
Matthew Leach
0f0febdad0 arch: arm64: exceptions: use SP_EL0 as scratch reg
When detecting stack overflow in the kernel exception handler, use
`SP_EL0`, rather than `TPIDR_EL1` as the scratch register.  This allows
us to use the `TPIDR_EL1` register as a CPU-banked register for other
purposes.

Use of `SP_EL0` is safe here since the stack overflow check occurs
during kernel exceptions and SP_EL0 will be restored by the user-space
context restore logic, overriding the clobber.
2026-02-07 08:26:35 +00:00
Matthew Leach
424d6b126e libkernel: memory: slab: cache: new
Add a new per-cpu slab cache for caching slab allocations on a given
CPU.
2026-02-07 08:26:35 +00:00
Matthew Leach
1bdaaef14a libkernel: memory: slab: allocator: new
Add a new slab allocator implementation. The `SlabAllocator` manages
lists of slabs for each size class.
2026-02-07 08:26:35 +00:00
Matthew Leach
a2f636cebb libkernel: memory: slab: slab: new
Add a new module for managing objects within a slab. The `Slab` struct
manages objects of a given set within a contiguous set of pages. It is
the handle to the underlying memory, allowing for objects to be
allocated, and free'd. It manages a free list of 'indexes' within the
object slots themselves.
2026-02-07 08:26:35 +00:00
Matthew Leach
c0ecac05f3 libkernel: memory: PageAllocGetter: return ref to allocator
Rather than returning a reference to the `OnceCell` wrapping the
allocator, return a static reference to the allocator itself. This
allows flexibility for how the allocator is wrapped.
2026-02-07 08:26:35 +00:00
Matthew Leach
1b8ef1bc88 libkernel: memory: allocs: move FrameList impl into frame
Move the FrameList logic out of the physical memory allocator into its
own module. This allows `FrameList` to be shared between the physical
memory allocator and the slab allocator.
2026-02-07 08:26:35 +00:00
Matthew Leach
972f023edc libkernel: memory: reorganise allocators
Create a new submodule within `memory`, `allocators` which contains all
memory allocators. Also split out the `Frame` struct from the `pg_alloc`
module, allowing it to be used by other modules.
2026-02-07 08:26:35 +00:00
Ashwin Naren
c394e18231 tmp 2026-02-07 00:20:37 -08:00
Ashwin Naren
ec0ffbfb25 formatting 2026-01-30 19:46:12 -08:00