Bananymous
82fd57af9e
Kernel: Use local labels in assembly
2026-08-22 11:57:19 +03:00
Bananymous
2f25bfb2db
Kernel: Use min heap for scheduler block list
...
This makes insertion to block list O(log n) instead of O(n) when
blocking with wake time. This is more heavy and currently slower than
the previous implementation, but that is just because we don't really
have too many threads running at any given time. This will be more
scalable in the future and even allows implementing priorities if I ever
wish so
2026-08-19 21:32:36 +03:00
Bananymous
7f12e5aaf3
Kernel: Report actual hw volume from AC97
2026-08-19 21:32:36 +03:00
Bananymous
78e40ca353
AudioServer: Add software volume control
2026-08-19 21:32:36 +03:00
Bananymous
1231b16cc3
Kernel: Add mixer support to IHDA
...
This has not been tested as I don't have any hardware with mixers on
output paths :P
2026-08-19 21:32:36 +03:00
Bananymous
6cd3638a85
Kernel: Send set channel count on IHDA
2026-08-19 21:32:36 +03:00
Bananymous
4aead25970
Kernel: Cleanup IHDA volume control and report the actual volume
2026-08-19 21:32:36 +03:00
Bananymous
36b34b0df0
Kernel: Don't store copy of palette in virtual TTY
...
It can be just queried from the terminal driver
2026-08-19 21:32:36 +03:00
Bananymous
bf0bd19289
Kernel: Refactor includes to reduce include dependencies
...
Now modifying Scheduler.h or Thread.h doesnt trigger practically a full
kernel rebuild. This required moving Mutex and RWLock of of line but
that should be fine :^)
2026-08-19 21:32:36 +03:00
Bananymous
8cd9e6dfa8
Kernel: Keep track of thread user and system time separately
2026-08-19 21:32:36 +03:00
Bananymous
f0a114f4e5
Kernel: Fix shm object freeing and track lpid
...
I was deleting based on the key instead of the id which of course does
not work :D
2026-08-19 21:32:36 +03:00
Bananymous
ac99bf128b
LibAudio: Rename AudioLoader -> AudioStream
2026-08-19 21:32:36 +03:00
Bananymous
2c66de888f
BuildSystem: Add option to generate an ISO file
...
This creates ISO file with compressed initrd and grub files that can be
live booted easily
2026-08-19 21:32:36 +03:00
Bananymous
8f4db57ed8
WindowServer: Mark old window area as damaged on resize
2026-08-17 04:58:35 +03:00
Bananymous
b6f922895f
AudioServer: Queue more than 4k bytes per write
...
Before this I was writing audio data to kernel in ~20 ms chuncks. This
feels like way too many syscalls, so now we allow sending upto 1 second
per syscall :D
2026-08-17 04:44:15 +03:00
Bananymous
7aa8eb1778
Kernel: Use 64 bit write on HPET on x86_64
2026-08-17 04:33:20 +03:00
Bananymous
1128e440d2
Kernel: Fix typos and fix power button status clear
2026-08-17 04:32:26 +03:00
Bananymous
ac052fe1c1
Kernel: Program missing entries from redirection entries
...
This wasnt an issue but could be in the future
2026-08-17 04:23:04 +03:00
Bananymous
c915c064e8
BuildSystem: Compile cross gcc with optimizations
...
I guess because I now pass explicit CXXFLAGS, gcc did not add the
default optimization flags
2026-08-11 18:26:06 +03:00
Bananymous
895c586736
LibC: Add uchar.h
...
This was added in POSIX issue 8 and some ports end up with very weird
compile errors if this does not exist :D
2026-08-08 05:43:34 +03:00
Bananymous
04b8f9d7a3
LibC: Fix stdc++ requirement in getpagesize
2026-08-08 03:44:27 +03:00
Bananymous
6e99eed541
WindowServer: Cleanup damaged areas
2026-08-08 01:53:07 +03:00
Bananymous
fc40820150
Kernel/Userspace: Replace my custom SHM system with SysV shm
...
This allows xbanan to use shm!
2026-08-08 01:52:12 +03:00
Bananymous
2c4fee4a82
Kernel: Expose Inode::can_access as static member
2026-08-08 01:41:48 +03:00
Bananymous
2be915a1df
ports: Update xbanan
2026-08-08 01:30:09 +03:00
Bananymous
1a8351eae0
LibC: Cache page size in getpagesize
2026-08-05 05:41:31 +03:00
Bananymous
328771ae29
Kernel: Fix AC97 issues
...
Set last entry bit on the last entry :D
Verify that allocated DMA buffer fits in a 32 bit integer
2026-07-20 11:30:06 +03:00
Bananymous
0b53fba991
Kernel: Fix PCI PIN interrupt allocation and handling
...
We now use the correct PIN interrupt from the interrupt line field
instead of writing to it, this had no effect :D
PIN interrupts are now mapped as shared and level triggered, this
properly allows PIN interrupt sharing with multiple devices
2026-07-20 10:45:32 +03:00
Bananymous
0d390e2246
Kernel: Send EOI after handling the interrupt
...
There is no need to send it prior to handling. This required us to not
yield from HPET/PIT irq so that the EOI actually gets sent
2026-07-20 10:43:50 +03:00
Bananymous
a3b7a758eb
Kernel: Allow allocating shared interrupts and setting trigger mode
2026-07-20 10:28:18 +03:00
Bananymous
d46d7a5123
Kernel: Cleanup entering acpi mode
...
There is no need to pass the current mode as an argument as ACPI has
access to that info either way.
Only route INTx objects when using ACPI, they won't be used otherwise
2026-07-20 09:02:18 +03:00
Bananymous
b611c3fe48
LibC: Support in-place realloc for mmap backed allocations
...
When shrinking a mmap based allocation, we can just unmap the trailing
pages that will no longer be needed. When extending an allocation we try
to MMAP_FIXED_NOREPLACE the need extra data to avoid memcpy between old
and new allocation. I'm not sure if the extension logic is really worth
it but it is just 15 lines of code to avoid possibly very large memcpys.
2026-07-20 06:58:30 +03:00
Bananymous
8c6e402ee8
LibC: page align mmap backed malloc sizes
...
This will make reallocations cleaner
2026-07-20 06:58:30 +03:00
Bananymous
bd5be982e9
LibC: Don't memset 0 mmap'd callocs
...
There is no reason to page everything in and the kernel already
guarantees that the memory is zeroed in mmap
2026-07-20 06:58:30 +03:00
Bananymous
33f941f2fd
LibC: Unmap unused pages in aligned mallocs
2026-07-20 06:58:30 +03:00
Bananymous
8368dec30b
LibC: Fix posix_memalign return value
...
I was returning -1 with errno instead of the error code :P
2026-07-20 06:58:30 +03:00
Bananymous
7f25350c62
LibC: Fix malloc mmap byte tracking
...
I was incrementing instead of decrementing when freeing mmap allocs
2026-07-20 06:58:30 +03:00
Bananymous
64523b6c70
LibC: Fix futex return value handling
2026-07-20 06:58:30 +03:00
Bananymous
a9cf0134b7
Kernel: Don't block thread if the wake time has already passed
2026-07-20 06:58:30 +03:00
Bananymous
2e8239fefa
Kernel: Fix thread block timeout
...
I was comparint ms against ns making timeouts practically never wake up
:)
2026-07-20 06:58:30 +03:00
Bananymous
f2bf406db7
ports: Add ccleste port
2026-07-20 06:58:30 +03:00
Bananymous
63a8f40e67
ports/quake2: Clenaup build script and patches
2026-07-20 06:58:30 +03:00
Bananymous
2ddee7016e
Kernel: Fix another scheduler bug :^)
2026-07-20 06:58:30 +03:00
Bananymous
bc622c8b51
LibC: Fix pthread default guard size and name
2026-07-20 06:58:30 +03:00
Bananymous
6ebd3a8aca
Kernel: Rewrite the AHCI driver
...
There was a lot of stuff wrong with this driver and it was only getting
speeds of ~2.5 MB/s. Now 4K blocks get ~17 MB/s which is not good but
definitely better. I'm pretty sure the issue is qemu's emulation as 85%
of time is spent between sending the command and it to complete.
Large blocks are now supported too, qemu with block size 1M gets around
600 MB/s read speeds.
2026-07-20 06:58:30 +03:00
Bananymous
96e5779182
Kernel: Fix out of bounds reads on storage devices
2026-07-20 04:07:23 +03:00
Bananymous
02f05436fc
Kernel: Fix zero sized reads from a partition
2026-07-20 04:07:23 +03:00
Bananymous
51251e492e
Kernel: Fix fallback PS/2 interrupt numbers
...
I haven't used the fallbacks in so long that I didn't realize they were
wrong :D
2026-07-20 04:07:23 +03:00
Bananymous
20e36125c8
Kernel: Cleanup very old AHCI code
2026-07-20 04:07:23 +03:00
Bananymous
19c228362b
Kernel: Make ext2 block buffers page aligned
2026-07-20 04:07:23 +03:00