Commit Graph

14 Commits

Author SHA1 Message Date
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
910203e0c2 syscalls: mprotect: implement
Implement the `mprotect` syscall. Including a bunch of tests for
ensuring proper VMA functionality regarding splitting and merging via
`mprotect`.
2025-11-30 20:13:36 +00:00
Matthew Leach
baf98c452f libkernel: vmarea: shrink_to: implement
Implement a `shrink_to` function for a VMA. This shrinks the VMA's
region to the specified region, while recalculating file offsets and
size if the VMA is file-backed.
2025-11-30 20:13:36 +00:00
Matthew Leach
3e3a9ad0c5 libkernel: region: add punch_hole
Add a function for calculating the set difference when punching one
region out of another.
2025-11-30 20:13:36 +00:00
Matthew Leach
1b95049159 libkernel: memory: VMArea: page align on from_pheader
Page align any non-aligned program headers, fixing up the file offset
and filesz accordingly.
2025-11-30 20:13:36 +00:00
Matthew Leach
fb405282cc syscalls: rseq: return ENOSYS
Return ENOSYS for sys_rseq
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
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
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
Matthew Leach
ca6fdd0da5 Initial Commit
Initial commit of arm64 bring-up code, kernel core (libkernel) and build
infrastructure.
2025-11-16 20:15:01 +00:00