d7e292a9f8
Kernel: Drop 32 bit userspace stack to 4 MiB
...
32 bit userspace only has 256 MiB reserved for stacks, so with 32 MiB
stacks it only allowed total of 7 threads. Now we can have up to 62
threads
2026-04-04 23:48:43 +03:00
9fce114e8e
Kernel: Don't clone entire kernel stack on fork
...
We only need to copy area between [ret_sp, stack_end]. This range is
always very small compared to the whole stack (64 KiB).
2026-04-04 23:48:43 +03:00
9d83424346
Kernel: Remove unnecessary stack pointer loading
...
Any time I started a thread I was loading the stack pointer which is
already correctly passed :D
2026-04-04 23:48:43 +03:00
a29681a524
Kernel: Fix signal generation
...
We need to have interrupts enabled when signal kills the process as
process does mutex locking. Also signals are now only checked when
returning to userspace in the same place where userspace segments are
loaded.
2026-04-04 23:48:43 +03:00
47d85eb281
Kernel: Pass the actual vaddr range to reserve pages
2026-04-04 23:48:43 +03:00
3f55be638d
Kernel: Allow reserve_free_page{,s} to fail
...
Apparently I was asserting here before :D
2026-04-04 23:48:43 +03:00
664c824bc0
Kernel: Keep fast page always reserved
...
There was a bug where 32 bit target's reserve_free_page was allocating
the fast page address
2026-04-04 23:48:43 +03:00
675c215e6a
Kernel: Add CoW support to MemoryBackedRegion
...
This speeds up fork by A LOT. Forking WindowServer took ~90 ms before
this and now its ~5 ms.
2026-04-03 01:54:59 +03:00
c09bca56f9
Kernel: Add fast write perm remove to page tables
2026-04-03 01:54:22 +03:00
7d8f7753d5
Kernel: Cleanup and fix page tables and better TLB shootdown
2026-04-03 01:53:30 +03:00
f77aa65dc5
Kernel: Cleanup accessing userspace memory
...
Instead of doing page validiation and loading manually we just do simple
memcpy and handle the possible page faults
2026-04-02 16:36:33 +03:00
9589b5984d
Kernel: Move USERSPACE_END to lower half
...
This allows calculating distance to USERSPACE_END from lower half
address
2026-04-02 16:34:47 +03:00
5647cf24d2
Kernel: Implement volume control to audio drivers
2026-04-02 15:14:27 +03:00
68506a789a
Kernel: Add support for volume control keys
2026-04-02 05:02:05 +03:00
5c20d5e291
Kernel: HDAudio hide unusable pins and cleanup path finding
2026-03-24 01:16:47 +02:00
f89d690716
Kernel: HDAudio only probe codecs in STATESTS
...
This removes unnecessary probing that lead to timeouts. Also cap codec
address at 14 instead of 15. My test laptop was duplicating codec 0 at
address 15 leading to duplicate devices.
2026-03-24 00:49:47 +02:00
dedeebbfbe
Kernel: Use ByteRingBuffer with audio buffers
2026-03-23 22:12:40 +02:00
ccb4d13a82
Kernel: Compile EventFD file
2026-03-23 18:25:18 +02:00
d18a0de879
Kernel: Fix mprotext for partial regions
...
if mprotected are did not contain the start of the region, mprotect
would exit early
2026-03-17 23:33:05 +02:00
cdc45935b5
Kernel: Don't allow chdir into non-directories
2026-03-17 22:57:17 +02:00
c1a424a635
Kernel: Implement linux's eventfd
2026-03-17 20:24:06 +02:00
1d07d8e08e
LibC/DynamicLoader: Add support for dynamically loaded TLS
...
Previously I failed to dlopen if any of the objects contained TLS
section
2026-03-17 20:01:51 +02:00
eeef945c25
Kernel: Make tty use the new byte ring buffer
2026-02-28 14:53:15 +02:00
a602753bda
Kernel: Add front/back/pop_back to ByteRingBuffer
2026-02-28 14:51:35 +02:00
812ae77cd7
Kernel: Make TCP sockets use the new ring buffer
...
Also fix race condition that sometimes prevented window updates not
being sent after zero window effectively hanging the whole socket
2026-02-28 14:22:08 +02:00
8b8af1a9d9
Kernel: Rewrite pipes using the new ring buffer
2026-02-28 14:20:52 +02:00
493b5cb9b1
Kernel: Implement byte ring buffer
...
This maps the ring twice right next to each other so we don't have to
care about wrapping around when doing memcpy or accessing the data
2026-02-28 14:18:23 +02:00
1ecd7cc2fe
Kernel: Allow protocol specific socket options
...
I had forgot to remove this condition on the syscall
2026-02-27 19:20:22 +02:00
5c38832456
Kernel: use wake_with_waketime in epoll
...
We already have the wake time so there is no reason to calculate the
timeout
2026-02-27 19:14:35 +02:00
d16f07a547
Kernel: Print thread id when writing to /dev/debug
2026-02-27 19:12:35 +02:00
54acb05131
Kernel: Don't print "./" prefix with debug functions
2026-02-27 19:10:51 +02:00
9ddf19f605
Kernel: Optimize networking code
...
Remove buffering from network layer and rework loopback interface.
loopback now has a separate recieve thread to allow concurrent sends and
prevent deadlocks
2026-02-27 19:08:08 +02:00
ff378e4538
Kernel: Cleanup and optimize TCP
...
We now only send enough data to fill other ends window, not past that.
Previous logic had a but that allowed sending too much data leading to
retransmissions.
When the target sends zero window and later updates window size,
immediately retransmit non-acknowledged bytes.
Don't validate packets through listeing socket twice. The actual socket
will already verify the checksum so the listening socket does not have
to.
2026-02-24 16:20:23 +02:00
2ea0a24795
Kernel: Fix TCP SYN option propagation
...
Listening socket now forwards TCP options to the newly created socket
2026-02-23 23:00:47 +02:00
acf28d8170
Kernel: Use ring buffers for TCP windows
...
This speeds up TCP networkign a ton as it doesnt have to do unnecessary
memmoves for each send/receive
2026-02-23 21:10:13 +02:00
666a7bb826
Kernel: Rework TCP window size reporting
...
We now report actually available window size when sending packets. If
the available window size grows significantly we send an ACK to reflect
this to the remote.
2026-02-23 21:10:13 +02:00
1ac20251cf
Kernel: Fix TCP stack crash on retransmission
2026-02-23 17:48:16 +02:00
9445332499
Kernel: Remove unnecessary interface lookup
...
This prevented connecting to local sockets listening on INADDR_ANY
2026-02-23 16:06:48 +02:00
8edd63d115
Kernel: Cleanup {set,get}sockopt debug prints
2026-02-23 16:06:48 +02:00
a0211d88e7
Kernel: Don't include TCP header in MSS
2026-02-08 19:44:30 +02:00
e216fc7798
Kernel: Fix port allocation endianness
2026-02-08 19:43:08 +02:00
c648ea12f2
Kernel: Cleanup and fix UNIX sockets
...
EPOLLOUT is now sent to the correct socket and buffer is now a ring
buffer to avoid unnecessary memmove on every packet
2026-02-08 19:38:28 +02:00
2e59373a1e
Kernel: Fix non blocking sockets blocking :D
2026-02-08 19:33:28 +02:00
a51a81b6cd
Kernel: Move {set,get}sockopt to sockets
...
Sockets can now actually implement socket options :D
2026-02-08 19:27:16 +02:00
aef536fff3
Kernel: Fix SharedMemoryObject cloning on deleted keys
2026-01-25 01:42:17 +02:00
d472e1ac0e
Kernel: Remove obsolete FIXMEs and null pointer checks
2026-01-24 22:42:18 +02:00
120c08fb75
Kernel: Implement fcntl based locks
2026-01-24 22:38:34 +02:00
ba6229b92d
Kernel: Fix TCP accept bind address
...
I was accidentally binding the new socket to the target address instead
of the listening socket's address
2026-01-24 00:33:05 +02:00
a08b9b82a6
Kernel: Fix yield stack pointer value
...
Stack pointer was pointing to value of return address on return instead
of past it. This did not affect anything as ig Processor::yield() didn't
use stack after calling the trampoline
2026-01-19 00:47:00 +02:00
5d62fa3f10
Kernel: Clenup stacktrace printing on exception
...
Start from current ip and bp. This removes kernel call stack to debug
printing function from the stack trace
2026-01-16 16:31:35 +02:00