ootinnyoo
8f00af7587
implement sys_fchdir
2025-12-22 18:34:22 -05:00
Matthew Leach
1dd1811f34
Merge pull request #75 from arihant2math/fix-thread-join
2025-12-22 17:36:48 +00:00
Ashwin Naren
2cb93c0891
address review
2025-12-22 02:06:11 -08:00
Ashwin Naren
8bf0a72bce
fix futex based thread joining
2025-12-21 17:02:19 -08:00
Matthew Leach
e77742e029
aarch64: syscalls: clone: fix arg order
...
The clone syscal on aarch64 is the following:
```
SYS_clone, flags, stack, ptid, tls, ctid
x8, x0, x1, x2, x3, x4
```
which is a different order than listed on the man page. Fix the ordering
in the aarch64 syscall dispatch code.
2025-12-21 16:13:15 -08:00
Matthew Leach
3273d6451e
clone: implement CLONE_SETTLS
...
Set the TLS pointer when `CLONE_SETTLS` is set in `sys_clone`.
2025-12-21 16:13:15 -08:00
Matthew Leach
12076c7ad2
usertest: add test_rust_thread
...
Add a simple thread spawn test.
2025-12-21 16:13:15 -08:00
Matthew Leach
a7ebe8e214
threading: fix clone to spawn threads
...
Fix issues identify in `sys_clone` logic to enable basic threading.
2025-12-21 16:13:15 -08:00
Matthew Leach
eb2369f621
Merge pull request #57 from arihant2math/futex
2025-12-21 13:30:40 +00:00
Matthew Leach
03a400d2bd
Merge pull request #72 from some100/master
2025-12-21 13:30:05 +00:00
Ashwin Naren
637874620b
address review
2025-12-21 01:56:33 -08:00
Ashwin Naren
73b9afc2f0
remove redundant rust mutex test
2025-12-21 01:44:30 -08:00
Ashwin Naren
f004824bbd
make clippy happy
2025-12-21 01:43:54 -08:00
Ashwin Naren
b7e8e9edcc
add note
2025-12-21 01:43:54 -08:00
Ashwin Naren
a6efc75686
final fixes
2025-12-21 01:43:54 -08:00
Ashwin Naren
d60e70e397
add another usertest
...
Conflicts:
usertest/src/main.rs
2025-12-21 01:43:54 -08:00
Ashwin Naren
93df6b0ebc
get data w/ spinlock
2025-12-21 01:43:54 -08:00
Ashwin Naren
cb6dbdf5bb
futex impl
2025-12-21 01:43:54 -08:00
Ashwin Naren
3fbb56098c
futex impl
...
# Conflicts:
# usertest/src/main.rs
2025-12-21 01:43:54 -08:00
Ashwin Naren
cd6d830ae9
Initial proc fs ( #70 )
2025-12-21 01:37:14 -08:00
ootinnyoo
237ab737df
implement sys_chroot
2025-12-20 19:06:07 -05:00
Ashwin Naren
35a6caa541
Implement sys_sysinfo ( #71 )
2025-12-20 15:42:08 -08:00
Ashwin Naren
b98a54b928
Stub sys_madvise ( #67 )
2025-12-19 15:28:43 -08:00
Ashwin Naren
fd65436604
Add rust file/dir usertest ( #65 )
2025-12-18 16:19:42 -08:00
Ashwin Naren
781b9b5c3f
implement mkdir and unlink
...
rm, mkdir and rmdir now work in tmpfs
2025-12-18 15:35:09 +00:00
Ashwin Naren
b8ad29b4b1
update .gitignore
2025-12-17 20:07:53 -08:00
Matthew Leach
9db6162414
formatting
2025-12-17 20:04:31 -08:00
Matthew Leach
0a32eeaaa0
scripts: create /tmp
...
Create /tmp and modify the kernel command line to mount tmpfs on /tmp.
2025-12-17 20:04:31 -08:00
Matthew Leach
5511e28b72
syscalls: implement ftruncate
2025-12-17 20:04:31 -08:00
Matthew Leach
8bc271c266
fs: open: pass create mode parameter
...
Pass the `mode` parameter to the open VFS call, specifying the
permissions of the file when O_CREAT is specified.
2025-12-17 20:04:31 -08:00
Matthew Leach
236dd3aa84
fs: reg: implement write
...
For some reason, `write` is just a copy of the `read` code. Fix that by
implementing `write`.
2025-12-17 20:04:31 -08:00
Matthew Leach
bebee6d8f5
libkernel: address: ensure to_pfn can only be called on PA
...
calculating a PFN from a VA makes no sense since it could be mapped to
any address. Therefore, ensure that it can *only* be called on PAs.
2025-12-17 20:04:31 -08:00
Matthew Leach
264d603044
drivers: fs: tmpfs: new
...
Add tmpfs driver and register with the kernel driver's FS subsystem.
2025-12-17 20:04:31 -08:00
Matthew Leach
a867493fa7
page_alloc: make test fixture public
...
Having the ability to use the `FrameAlloctor`, simulating via the heap
is a very useful pattern when testing libkernel code. Make the test
fixture public for other modules to use.
2025-12-17 20:04:31 -08:00
Matthew Leach
54f2d683b8
libkernel: move ClaimedPage into libkernel crate
...
By moving `ClaimedPage` into libkernel we can utilise it in
arch-agonstic ode.
2025-12-17 20:04:31 -08:00
Matthew Leach
c1bea5ecbb
tmpfs: new
...
Add basic directory inode implementation and tmpfs filesystem
implementation.
2025-12-17 20:04:31 -08:00
Matthew Leach
ba7848fc8b
libkernel: CpuOps: add 'static trait bound
...
The CpuOps trait should never hold a reference to any other object. In
fact, it should be a singleton object which is constructed at kernel
boot and live for the entire lifetime of the system. Therefore, it's
safe to add the `'static` trait bound.
2025-12-17 20:04:31 -08:00
Ashwin Naren
5c8793675d
Initialize buffer as 1s to ensure it's written to.
2025-12-16 04:51:57 +00:00
Ashwin Naren
ebd459039e
test read syscall
2025-12-16 04:51:57 +00:00
Ashwin Naren
bc9676b696
Add stopped state
2025-12-15 16:49:04 -08:00
Ashwin Naren
f1d2d007bb
handle stop and continue
2025-12-15 16:49:04 -08:00
Ashwin Naren
f63ad250f4
implement restarting
2025-12-15 21:22:53 +00:00
Matthew Leach
b8edd4af68
fat32: downcase 8.3 filenames
...
Using mtools to prepare the initrd image results in an image that
exclusively uses 8.3 filenames; as per the spec, the 8.3 filenames are
stored uppercase. However, on most UNIX systems, people are used to
dealing with down-case names; therefore convert the strings to
lower-case before passing back to the user.
2025-12-14 06:38:42 +00:00
Matthew Leach
4cd9fab80b
scripts: deps: usertest: new
...
Add a script to build the userspace test program and include it in the
initramfs.
2025-12-13 19:21:22 -08:00
Matthew Leach
e2a9306037
build-deps: busybox: don't popd too many times
...
Fix the busybox deps script's dir stack underflow.
2025-12-13 19:21:22 -08:00
Ashwin Naren
a4e9cf9fd9
formatting
2025-12-11 20:09:47 +00:00
Ashwin Naren
6d967332b7
remove old todo
2025-12-11 20:09:47 +00:00
Ashwin Naren
76f7707e00
test writing
2025-12-11 20:09:47 +00:00
Ashwin Naren
b05c606a2a
testing
2025-12-11 20:09:47 +00:00
Ashwin Naren
e2534ffd9c
Implement /dev/zero
2025-12-10 14:37:59 -08:00