We now have RNG!
- Implement ChaCha20-based cryptographically secure random number generator (CSPRNG) in `src/drivers/rand/random.c` and its header in `src/drivers/rand/random.h`.
- Modify VFS to support directory operations, including opening directories and reading directory entries.
- Update syscall interface to include new syscalls for directory handling: `SYS_OPEN_DIR` and `SYS_READ_ENTRIES`.
- Enhance file creation in EXT2 to allow specifying file modes.
- Refactor VFS file handling to accommodate new flags and modes.
- Update user-space application in `user/include/mlibc/helloworld.c` to demonstrate file operations including `touch`, `ls`, and `cat`.
- Clean up debug print statements in EXT2 file system code.
- Worked on proper error handling and return codes across VFS and syscall implementations.
It's only a small step but we're getting closer to making error codes standardized
We also setup SSE exactly as we should've the first time we introduced it in commit 9a9b91c
We have added it correctly to the user stack trampoline (hopefully), so there shouldn't be any issues now.
Signed-off-by: kaguya <vpshinomiya@protonmail.com>
Self explanatory, we finally have a working ish shell
Now we need to do some more stuff or something, probably work on a fork or something
Signed-off-by: kaguya <vpshinomiya@protonmail.com>
Co-authored-by: Copilot <copilot@github.com>
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>
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>
- 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>
- 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>