Commit Graph

4 Commits

Author SHA1 Message Date
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 016ee32987 feat: update .gitignore and enhance ext2 file timestamps
Added back g_Unixseconds to the ext2 driver

Signed-off-by: kaguya <vpshinomiya@protonmail.com>
2026-04-16 00:37:30 -04:00
kaguya 426ad76676 Initial Commit 2026-04-14 22:52:24 -04:00