Commit Graph

10 Commits

Author SHA1 Message Date
kaguya b28a6bcf29 major refactorings
Signed-off-by: kaguya3311 <kaguya3311@national.shitposting.agency>
2026-05-18 04:02:59 -04:00
kaguya 9a9b91c940 user: implement mlibc as the libc, finally.
It's finally done..

Signed-off-by: kaguya <vpshinomiya@protonmail.com>
2026-05-02 03:31:49 -04:00
kaguya 7d99745ff9 sched: Implement basic scheduling and signal handling system
Note: this is probably 25% broken, but it works right now as written, so I hope it all works.

- Added a new scheduler header file (scheduler.h) defining task structures, scheduling policies, and signal handling mechanisms.
- Integrated scheduling functions into the syscall interface, including SYS_GETPID, SYS_GETPPID, SYS_EXIT, SYS_SCHED_YIELD, SYS_NICE, SYS_KILL, SYS_SIGACTION, SYS_SIGPROCMASK, SYS_SCHED_GETSCHEDULER, and SYS_SCHED_SETSCHEDULER.
- Updated syscall handler to manage new scheduling-related syscalls and signal actions.

Signed-off-by: kaguya <vpshinomiya@protonmail.com>
2026-04-26 22:46:28 -04:00
kaguya 336af1c2ad chore: reorganize file directories
We have reorganized all the file directories that previously looked ugly as hell (cough cough arch/x86_64 cough)

Now it looks much cleaner

Signed-off-by: kaguya <vpshinomiya@protonmail.com>
2026-04-26 14:44:40 -04:00
kaguya e6e8b1209b sys: Refactor GDT initialization, enhance syscall handling, and improve user mode entry
Finally we got usermode working again, It took awhile but we got it done. A few things we did in this commit:

- Simplified GDT entry initialization in gdt.c for kernel and user segments.
- Fixed TSS structure for task switching.
- Implemented cr2 handling in a page fault.
- Enhanced user stack setup in usermode.c to return the correct RSP.
- Improved syscall implementation in syscall.c, including new syscall numbers.
- Updated syscall entry to correctly handle context switching and argument passing.
- Refactored init.c to demonstrate file operations using syscalls.
- Added new syscalls for file operations in syscalls.h.
- Modified VFS to handle leading slashes in paths correctly.

Signed-off-by: kaguya <vpshinomiya@protonmail.com>
2026-04-26 02:06:28 -04:00
kaguya 3b6e68bc16 sys: Implement LAPIC and IOAPIC support, add PS/2 keyboard driver
- Added LAPIC implementation in `apic.c` and `apic.h`, including initialization and basic operations.
- Introduced IOAPIC (I/O Advanced Programmable Interrupt Controller) support in `ioapic.c` and `ioapic.h`, parsing the ACPI MADT to locate IOAPICs and manage redirection entries.
- Implemented PS/2 keyboard driver in `ps2.c` and `ps2.h`, handling keyboard interrupts and translating scancodes to ASCII.
- Attempted to make usermode work again (it failed, coming soon)
- Cleaned up comments in `time.c` and `render.c` for clarity.

Signed-off-by: kaguya <vpshinomiya@protonmail.com>
2026-04-24 01:59:33 -04:00
kaguya 551eb00708 feat: partially implement PS/2 input subsystem with keyboard and mouse support
This implementation is incomplete, and doesn't work, but it will soon, to be determined, hopefully, uh, yknow.

Signed-off-by kaguya <vpshinomiya@protonmail.com>
2026-04-17 17:34:46 -04:00
kaguya bd77c7a2b9 sound: HDA support with PCM and wav playback
- Implemented HDA driver in src/sound/hda.c, providing initialization, codec enumeration, and playback functionality.
- Defined HDA register offsets and structures in src/sound/hda.h.
- Added WAV file parsing and playback capabilities in src/sound/pcm.c, supporting both WAV and raw PCM formats.
- Created header file src/sound/pcm.h for PCM playback functions and WAV header structures.
- Integrated memory management for DMA buffers during audio playback.

Yes we played Charlie Charlie Kirky as the first sound on KirkOS

Signed-off-by: kaguya <vpshinomiya@protonmail.com>
2026-04-16 00:08:56 -04:00
kaguya cc8351bf8d feat: implement PCI subsystem and integrate uACPI support
See previous commit

Signed-off-by: kaguya <vpshinomiya@protonmail.com>
2026-04-15 13:33:18 -04:00
kaguya 426ad76676 Initial Commit 2026-04-14 22:52:24 -04:00