Commit Graph

53 Commits

Author SHA1 Message Date
Herman Polloni
41814dddbe Fix bash build on aarch64 host 2025-11-30 10:19:14 +00:00
Matthew Leach
8038a6c4e2 syscalls: sys_getrand: implement
Implement sys_getrand
2025-11-28 21:24:37 +00:00
Ashwin Naren
5f2c2491b8 implement fair scheduler 2025-11-28 21:06:07 +00:00
Bjorn Beishline
6d3af6a95d Update syscall doc with newly implemented methods 2025-11-28 20:46:45 +00:00
Bjorn Beishline
911a85e4ef Implement sys_set_robust_list and sys_gettid 2025-11-28 20:46:45 +00:00
Matthew Leach
fb405282cc syscalls: rseq: return ENOSYS
Return ENOSYS for sys_rseq
2025-11-28 20:09:05 +00:00
Matthew Leach
1741b036bb syscalls: getrlimit: return error
Return error for the moment for `sys_getrlimit`.
2025-11-28 20:09:05 +00:00
Matthew Leach
1ed714e47b libkernel: memory: region: remove breaking assert in expand
The `expand` function adds bytes size into the region; the check `size
>= self.size` isn't needed since this is an expanding function, not a
resizing one. To emphasise that, rename the function to `expand_by`.

Also include a bunch of unit tests to ensure that expansion by regions
with differing sizes works correctly.
2025-11-28 20:09:05 +00:00
Matthew Leach
6e988c3639 syscall: socket: return with error
Return with an error when calling socket()
2025-11-28 20:09:05 +00:00
Matthew Leach
6a029c340a syscall: gettimeofday: impement
Provide a dummy implementation of sys_gettimeofday
2025-11-28 20:09:05 +00:00
Matthew Leach
5f42f74c5c process: exec: add AT_PH aux vectors
libc uses the program headers to find the TLS pheader. Therefore, we
need to push these values into the aux vector when creating the
userspace mappings for the process.
2025-11-28 20:09:05 +00:00
Matthew Leach
28980c6725 uname: fudge the version of the kernel for libc
libc bringup checks the version of the kernel and it appears as though
it's not happy with `0.1.0`:

```
FATAL: kernel too old
```

For now, fudge the version to keep libc happy.
2025-11-28 20:09:05 +00:00
Matthew Leach
74b483dd22 exec: add a dummy AT_RANDOM aux vector value
Add a dummy value for AT_RANDOM as part of the aux vector. This is a
security hole and needs fixing once an entropy engine has been
implemented.
2025-11-28 20:09:05 +00:00
Matthew Leach
825b3d7547 libkernel: mem: brk: return non-aligned break
Determine whether the program break needs extending with aligned logic,
but always return the requested, non-aligned, address.

Use `brk_addr` in unit tests instead.
2025-11-28 20:09:05 +00:00
Ashwin Naren
de76e243a2 properly shutdown system 2025-11-28 20:02:12 +00:00
Ashwin Naren
504f7f01dc fix failing tests 2025-11-28 12:08:06 +00:00
Ashwin Naren
0c749d7ce8 Parse fat dates 2025-11-28 12:08:06 +00:00
Ashwin Naren
335412c441 include line/col info in kernel panic 2025-11-27 18:24:03 +00:00
Matthew Leach
58b903567d LICENSE: add MIT
Add MIT LICENSE

Fixes: #12
2025-11-27 15:17:59 +00:00
Ashwin Naren
eff3dad5c7 schedule tasks based on last run time 2025-11-27 14:09:14 +00:00
Matthew Leach
e9f3f8764d Merge pull request #13 from hardliner66/restructure_build 2025-11-26 06:28:58 +00:00
Steve Biedermann
e5c4ef7e74 restructure build scripts 2025-11-25 22:06:39 +01:00
Matthew Leach
b1ebd61763 Merge pull request #16 from hexagonal-sun/fat32-case-insensitive
libkernel: fs: fat32: make lookups case-insensitive
2025-11-24 21:35:38 +00:00
Matthew Leach
4735e7c59a Merge pull request #15 from hardliner66/fix_readme_link
Fix link in readme
2025-11-24 21:28:13 +00:00
Matthew Leach
606500ba8b libkernel: fs: fat32: make lookups case-insensitive
Fat32 is a case-insensitive filesystem, therefore when looking up a path
in a directory entry, convert all strings to lowercase before
comparison.
2025-11-24 21:25:51 +00:00
Steve Biedermann
bbdd96f953 fix link in readme 2025-11-24 21:18:40 +01:00
Matthew Leach
d09e7a9333 Merge pull request #14 from hardliner66/add_syscall_docs 2025-11-24 17:39:36 +00:00
Steve Biedermann
7005b692c3 add markdown file with all syscalls 2025-11-24 17:59:16 +01:00
Matthew Leach
cc13b7b866 Merge pull request #9 from Cloudwalk9/patch-1
main: change panic message to match Linux
2025-11-23 07:24:43 +00:00
Cloudwalk9
ea8cb7381d main: change panic message to match Linux
It is imperative for true Linux compatibility and for all of its quirkiness, that the kernel duly notify the user on fatal error conditions within the kernel that it is most definitely NOT SYNCING.
2025-11-22 16:48:45 -05:00
Matthew Leach
6bdc5fe403 Merge pull request #5 from hexagonal-sun/ci
github: ci: new
2025-11-22 12:48:41 +00:00
Matthew Leach
16fc3e47ff arm64: boot: secondary: add intermediate ptr cast
Fix warning regarding direct cast from function address to integer
value.
2025-11-22 12:47:02 +00:00
Matthew Leach
30eb4fc794 timer: supress clippy warnings for PartialOrd impl
Clippy is complaining about a non-canonical PartialOrd implementation
for Instant.  We do this so that the instant that is going to be fired
next is always at the top of the Heap.
2025-11-22 12:47:02 +00:00
Matthew Leach
6c804ce2a7 thread_group: builder: remove unused function
Remove unused function `with_umask`.
2025-11-22 12:47:02 +00:00
Matthew Leach
e51594a7eb arm64: boot: send ping after bringing up secondaries
Prove that the CPU messenger (IPIs) work by sening a `Ping` message to
another cpu after secondary bringup.
2025-11-22 12:47:02 +00:00
Matthew Leach
1931880504 github: ci: new
Add CI for checking & building the kernel.
2025-11-22 12:47:02 +00:00
Matthew Leach
c306da2d7d arch/arm64: boot: use /bin/sh as init 2025-11-21 23:04:27 +00:00
Matthew Leach
3fbbbb5151 syscalls: implement getcwd
Implement getcwd(2)
2025-11-21 23:03:14 +00:00
Matthew Leach
62a804e456 fmt: cleanup after rustfmt 2025-11-21 23:03:14 +00:00
Matthew Leach
2c942b9e84 syscalls: implement readlinkat
Implement readlinkat(2).
2025-11-21 23:03:14 +00:00
Matthew Leach
29f52efe13 syscalls: implement chdir
Implement chdir(2).
2025-11-21 23:03:14 +00:00
Matthew Leach
8abda6dd9c syscalls: umask: implement
implement umask(2).
2025-11-21 23:03:14 +00:00
Matthew Leach
c70e44c9c5 Merge pull request #2 from BjornTheProgrammer/master
Improve build system
2025-11-21 23:01:10 +00:00
Bjorn Beishline
7f68b0afca Remove sudo add check if test.img exists 2025-11-21 15:39:32 -07:00
Steve Biedermann
e98c6668ef fix build scripts and add additional pre-requesites to readme 2025-11-21 15:19:27 -07:00
Matthew Leach
9b82966f11 fops, pipe: fix deadlock
Fix deadlock when read/write{v,} is called with a size of zero.
2025-11-21 20:22:26 +00:00
Bjorn Beishline
71475803e3 Add generation of img file 2025-11-21 02:19:12 -07:00
Bjorn Beishline
d1807c72fa Add readme to include NixOS command 2025-11-21 02:19:12 -07:00
Bjorn Beishline
1ccd810de1 Add rust-toolchain.toml and add docs about prereqs 2025-11-21 02:19:12 -07:00
Matthew Leach
fae19e3cba main: remove unused unstable feature format_args_nl
The function that used this feature has been replaced and the feature is
no longer required.
2025-11-21 07:58:31 +00:00