Commit Graph

1843 Commits

Author SHA1 Message Date
8542cf7cbf
libluna: Fix Vector::shallow_copy() 2023-06-19 12:23:39 +02:00
d50ea76bdc
libc: Make tmpfile() create files in /tmp's filesystem
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-19 11:52:38 +02:00
2edb0a3f3a
all: Update minor version number to 0.3.0 pre-release
All checks were successful
continuous-integration/drone/push Build is passing
Not a release yet, but we can give it the version number for it.
2023-06-19 11:41:10 +02:00
b4a6e4d56d
libluna/PathParser: Make dirname() and basename() static functions
All checks were successful
continuous-integration/drone/push Build is passing
This avoids creating a PathParser to use them, which allocates memory that won't be used.
2023-06-19 11:21:58 +02:00
f22689fcf5
libc: Add stubs for fflush() and ungetc()
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-19 10:48:02 +02:00
6bfc7483bc
libc: Add a definition for FILENAME_MAX 2023-06-19 10:47:43 +02:00
acfad51ac0
libc: Add freopen() 2023-06-19 10:46:08 +02:00
7efc3a6ea1
kernel: Show stack traces on page faults + crash the process instead of the whole system on GPFs 2023-06-19 10:45:08 +02:00
0b553cadc0
libluna: Do not fault if vstring_format() is called with buf=nullptr
Instead, just discard the output and return the number of bytes formatted, as mandated by the C standard.
2023-06-19 10:44:33 +02:00
ae01a31104
kernel: Make sure the stack is 16-byte aligned on program startup
This is required by the System V ABI and fixes some movaps-related GPFs in ndisasm.
2023-06-19 10:41:32 +02:00
795b0ca8d4
libc/scanf: Some refactoring
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-19 01:05:32 +02:00
21cc7e3729
libluna: Rename parse_length() to parse_type() in Format.cpp
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-19 01:00:05 +02:00
55d147841f
libc+tests: Add type modifiers and integer conversion specifiers to scanf() 2023-06-19 00:59:42 +02:00
a2c081f219
libluna: Allow passing a base to scan_(un)signed_integer() 2023-06-19 00:58:02 +02:00
8c2348c425
libc/scanf: Skip whitespace before %%
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-18 23:51:44 +02:00
25e9187826
libc+tests: Add basic support for the scanf family of functions
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-18 23:44:30 +02:00
36e6787415
kernel: Make sure addresses allocated by mmap() are ALWAYS page-aligned
All checks were successful
continuous-integration/drone/push Build is passing
Fixes a kernel crash. Thanks a lot, sysfuzz!
2023-06-18 20:29:32 +02:00
04322d9ff7
kernel: Add a customizable configuration file system
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-18 20:18:19 +02:00
b7bdec9ece
kernel: Add a bunch more config definitions and hide debug messages behind them 2023-06-18 20:18:00 +02:00
ec34937f14
tests: Add tests for libluna/CPath.h 2023-06-18 20:15:18 +02:00
08997007f2
libluna: Stop checking initialization status on every bitmap method call
All checks were successful
continuous-integration/drone/push Build is passing
Since our asserts (expect()) are enabled on release as well, this is kinda expensive.

It's up to the caller, if they receive a null pointer dereference it's
their fault for not initializing their bitmap :)

We do still assert out-of-range indexing and stuff like that.
2023-06-18 19:28:28 +02:00
148c1c7341
libluna: Add the clear_data() method to Vector and use it to optimize Base64::decode
All checks were successful
continuous-integration/drone/push Build is passing
This method clears the Vector's data without deallocating the
backing buffer, so that it can be reused without reallocation.
2023-06-18 19:24:26 +02:00
d45e9e2a8c
libluna: Simplify the API for Utf8StateDecoder by splitting it into multiple methods
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-18 18:38:01 +02:00
27d9cd0e87
kernel: Move TmpFS::*Inode into a separate file
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-18 11:33:40 +02:00
3a3473b9c2
kernel: Use memcpy() when cloning UserVM
All checks were successful
continuous-integration/drone/push Build is passing
This way, any future fields in VMRegion get copied automatically.
2023-06-18 01:54:29 +02:00
67ed18629d
kernel: Update the VM allocator for userspace to use a linked list
All checks were successful
continuous-integration/drone/push Build is passing
This can cover the entire address space at once in a more memory-efficient way.

Stress-tested using 'base64 /bin/ls' which allocates enough contiguous
virtual memory to store the entirety of /bin/ls :)

A couple of bugs and fixes later, here we are!
2023-06-18 01:48:48 +02:00
2f08e0f5b0
libos: Make long value arguments use '=' and make value arguments' values always required
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-17 20:58:54 +02:00
266fa4a0d4
kernel: Start counting partition numbers at 1
All checks were successful
continuous-integration/drone/push Build is passing
This makes more sense for the end user.
2023-06-17 19:50:58 +02:00
8ace83f2ae
tools: Create an ext2 partition with the sysroot data in the disk image
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-17 19:49:04 +02:00
7cace9a0d7
kernel: Provide more meaningful panic messages for critical failures 2023-06-17 19:43:25 +02:00
e79d4297ea
kernel: Make the root inode be a mountpoint as well + add pivot_root()
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-17 17:27:22 +02:00
a6330eaffc
libluna: Add a #pragma once to Types.h 2023-06-17 12:04:47 +02:00
b7a82fd895
kernel: Do not error out on zero-length reads/writes to bad addresses 2023-06-17 12:04:34 +02:00
592558d7ad
kernel: Add GUID partition table support 2023-06-17 12:03:37 +02:00
2be4880278
kernel: Name the scoped lock in ATADevice::read()
All checks were successful
continuous-integration/drone/push Build is passing
Is that supposed to work without a name? Looks like it did!
2023-06-17 09:46:28 +02:00
7a78609a85
kernel: Preserve kernel threads' page directories when they differ from the regular kernel page directory
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-17 00:49:31 +02:00
c2cdb861c9
kernel/ATA: Fix buffer overflow in ATADevice::read() with small sizes and unaligned offsets 2023-06-17 00:48:53 +02:00
27b26f389c
kernel: Lock ATADevice::read_lba() using ATA::Channel's KMutex
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-17 00:22:38 +02:00
4f86cd9f08
libluna: Add a so very basic HashMap
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-17 00:07:43 +02:00
32d2e0e6b7
kernel: Remove register_special_device()'s name parameter
All checks were successful
continuous-integration/drone/push Build is passing
This is now duplicate information that can be queried using device->device_path().
2023-06-16 21:46:51 +02:00
ba46399bbd
kernel/ATA: Remove debug messages
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-06-16 21:34:36 +02:00
738b218a49
kernel/ATA+MBR: Dynamically generate device names + create devices for MBR partitions
All checks were successful
continuous-integration/drone/pr Build is passing
2023-06-16 21:30:50 +02:00
72b8ebe02c
kernel: Make the MBR code read from a device instead of an inode
Some checks failed
continuous-integration/drone/pr Build is failing
2023-06-16 21:10:33 +02:00
72e798cedb
kernel: Do not automatically read the MBR partition table from /dev/cdrom
Since ff952cfe16 made /dev mounted from userspace, /dev/cdrom does not exist when ATA drives are scanned.
2023-06-16 21:10:33 +02:00
7593947c33
kernel/ATA: Route interrupts to the correct drive 2023-06-16 21:10:33 +02:00
93922932fa
kernel: Start reading the MBR partition table from the ATAPI drive 2023-06-16 21:10:33 +02:00
a3beaa4d53
ATA: Mark the CDROM as a block device 2023-06-16 21:10:33 +02:00
bb0db450b3
kernel/ATA: Pass extra information to DeviceRegistry
This is needed since merging e7d482e from main.
2023-06-16 21:10:33 +02:00
a0fa1f2cfd
kernel+init: Create a device node in /dev to access the CDROM from userspace!
Still using PIO, though.
2023-06-16 21:10:33 +02:00
2fa11a5ae3
kernel/ATA: Read the CDROM's first sector using ATAPI PIO!!
Sadly, for some reason, DMA is not working right now.
This is a problem, as PIO is inconvenient. But hey, it works for now!
2023-06-16 21:10:32 +02:00