aboutsummaryrefslogtreecommitdiff
path: root/mirai/asm
AgeCommit message (Collapse)AuthorFilesLines
2026-03-27refactor: streamline interrupt and exception handler implementationsBobby2-4/+54
2026-03-27Refactor and implement interrupt handling and PIT driverBobby9-20/+104
- Refactored CPU context structure for better readability. - Enhanced corpse and exception structures with clearer formatting. - Improved frame structure for consistency. - Added interrupt flag operations for enabling and disabling interrupts. - Implemented IDT (Interrupt Descriptor Table) operations including loading and setting gates. - Created PIC (Programmable Interrupt Controller) initialization and masking functions. - Developed PIT (Programmable Interval Timer) driver with initialization and handler functions. - Established common interrupt handler structure and exception handling stubs. - Added hardware IRQ handling for IRQs 0-15. - Introduced IDT entry and gate descriptor types for better organization. - Ensured proper handling of interrupt and exception vectors.
2026-03-20Implement exception handling framework with hardware, software, and resource ↵Bobby5-0/+215
exception raising - Added `hardware.zig` for raising hardware exceptions from vectors and interrupts. - Introduced `raise.zig` to consolidate exception raising functions. - Created `resource.zig` for raising resource-related exceptions (memory, CPU, file limits). - Developed `software.zig` for raising software exceptions (assertions, aborts, user-defined). - Implemented `actions.zig` for parsing and encoding reply actions. - Added `catch.zig` for handling received exceptions. - Created `reply.zig` for constructing and sending exception replies. - Developed `recover` module for managing recovery operations (resume, skip, terminate). - Implemented rendering modules for displaying exception and context information. - Established global state management in `state.zig` for tracking exceptions. - Defined various types (context, exception, frame, identity, port) in `types` directory.
2026-02-25Add Global Descriptor Table (GDT) and Task State Segment (TSS) implementationBobby4-0/+127
- Introduced GDT constants, including selectors, access rights, and flags. - Created GDT entry structures for kernel and user segments, along with TSS descriptors. - Implemented GDT initialization and loading functions. - Developed boot sequence phases for CPU and memory initialization. - Added boot information structure to manage memory regions and kernel details. - Implemented TSS management, including core-specific TSS setup and stack allocation. - Established state management for boot sequence phases and TSS.
2026-02-25feat: Add common constants, errors, and serial driver functionalityBobby6-0/+197
2026-02-24Bunch of stuff moved as .old for new arch changeBobby10-741/+0
2026-02-23feat: Enhance Kata memory management with stack growth support and ↵Bobby1-2/+2
additional user stack properties
2026-02-20feat: Implement CMOS/RTC and CPUID operations, add PIT driver, and enhance ↵Bobby2-0/+114
AFS with disk info retrieval
2026-02-15Refactor I/O operations and update driver importsBobby1-13/+6
- Renamed I/O port functions for clarity: `write_port_byte` to `out_byte`, `read_port_byte` to `in_byte`, `write_port_word` to `out_word`, `read_port_word` to `in_word`, `write_port_long` to `out_long`, and `read_port_long` to `in_long`. - Updated import paths for serial, ahci, ata, gpt, keyboard, terminal, and other drivers to reflect new directory structure. - Replaced instances of `read_file_by_path` with `view_unit_at` in various files for consistency. - Added new utility functions for AHCI FIS setup and defined types for AHCI and PCI. - Introduced string copy utilities for handling strings from Kata pointers.
2026-02-15feat: Add various invocations for file system and I/O operationsBobby1-2/+2
- Implemented `viewstack` invocation to list contents of a stack. - Created `attach` invocation for opening attachments with device and unit handling. - Added `getkeychar` invocation to read a single character from the keyboard. - Developed `mark` invocation to write to attachments with color support. - Introduced `seal` invocation to close attachments. - Implemented `view` invocation to read from attachments. - Added `wipe` invocation to clear the terminal screen. - Created `exit` invocation to dissolve a Kata and seal attachments. - Implemented `postman` invocation for letter passing between parent and child Katas. - Added `spawn` invocation to create new Katas from executables. - Implemented `wait` invocation to wait for child Katas to dissolve. - Added `yield` invocation to voluntarily give up CPU time to Sensei. - Introduced utility functions for location resolution and path handling. - Added memory copy and slice utilities for efficient data manipulation. - Implemented random number generation utilities. - Added string comparison utilities for easier string handling. - Introduced integer and pointer conversion utilities for type safety. - Implemented result handling utilities for invocation results.
2026-02-13Refactor and enhance filesystem navigation and communication between KatasBobby1-16/+18
- Updated `mi.zig` to default target path to an empty string. - Improved context switching in `context.zig` by restoring registers from the context struct. - Enhanced `loader.zig` to inherit current location from the parent Kata. - Simplified `getkeychar.zig` by removing unnecessary serial import and error handling. - Added new invocations: `getlocation.zig` for retrieving current stack location and `postman.zig` for letter passing between Katas. - Introduced `setlocation.zig` to change current stack location with path resolution. - Created `nav.zig` for navigating the filesystem with commands to print current location or change it. - Added `nav.zon` for binary metadata. - Updated `limits.zig` to define maximum letter length. - Enhanced `ash.zig` to process navigation letters and improved command execution flow. - Updated syscall interface in `sys.zig` to handle variable arguments for invocations.
2026-02-13Refactor interrupt handling and syscall entryBobby4-0/+453
- Moved ISR and IRQ handler definitions to a new assembly file (isr.zig). - Simplified IDT setup by using ISR and IRQ handlers from isr.zig. - Replaced inline assembly for IRQ handlers with calls to new ISR functions. - Introduced a new context switching mechanism in context.zig for Kata execution. - Updated syscall entry handling in entry.zig to streamline context saving and restoring. - Removed redundant context structures and functions from shift.zig. - Improved clarity and organization of syscall and interrupt handling code.
2026-01-29refactor: Consolidate syscall handling by replacing individual syscall ↵Bobby2-6/+3
functions with a unified syscall interface
2026-01-28feat: Add CPU control, I/O port, memory management, MSR, and syscall operationsBobby5-0/+182