aboutsummaryrefslogtreecommitdiff
path: root/mirai
AgeCommit message (Collapse)AuthorFilesLines
2026-03-30refactor: reorganize kernel structure and implement memory management zonesHEADmainBobby14-225/+613
2026-03-27refactor: streamline interrupt and exception handler implementationsBobby4-86/+102
2026-03-27Refactor and implement interrupt handling and PIT driverBobby45-85/+946
- 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 ↵Bobby78-0/+2719
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) implementationBobby46-49/+1301
- 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: Implement Kagami page table abstraction with allocation, mapping, and ↵Bobby19-0/+866
protection functionalities
2026-02-25feat: Implement Physical Memory Manager with allocation and deallocation ↵Bobby18-0/+582
functionality
2026-02-25feat: Add common constants, errors, and serial driver functionalityBobby12-2/+333
2026-02-24feat: Implement Mirai kernel with boot parameter handling and framebuffer ↵Bobby2-0/+225
support
2026-02-24Bunch of stuff moved as .old for new arch changeBobby155-9074/+0
2026-02-24commit for arch changeBobby16-55/+418
2026-02-23feat: Enhance Kata state management with new states and deferred cleanup for ↵Bobby10-34/+124
page tables
2026-02-23fix: Prevent crash by skipping destruction of current kata's page table in ↵Bobby2-8/+27
cleanup
2026-02-23feat: Enhance Kata memory management with stack growth support and ↵Bobby8-13/+78
additional user stack properties
2026-02-23refactor: dynamic allocation for letter data in Kata invocationsBobby4-9/+38
2026-02-23fix: dynamic attachments in kataBobby11-39/+82
2026-02-23fix: Update MAX_LOCATION_LENGTH to 128 and adjust limits for Katas and ↵Bobby2-11/+8
Attachments
2026-02-23refactor: Simplify memory cleanup logic in Kata managementBobby3-30/+1
2026-02-23feat: Implement memory cleanup for dissolved Katas and enhance page table ↵Bobby3-0/+101
destruction logic
2026-02-20fix: Update memory section start address in linker script to 512MBBobby1-4/+4
2026-02-20fix: Correct KERNEL_MAP_END value and update MAX_LOCATION_LENGTH documentationBobby3-9/+9
2026-02-20feat: Refactor path handling to use location utilities and update related ↵Bobby17-129/+157
structures - Replaced path references with location in various modules for consistency. - Updated attachment management to use location instead of path. - Enhanced I/O operations to handle location parameters. - Removed deprecated path utilities and integrated location utilities. - Adjusted limits and parameters for kata and attachment management.
2026-02-20feat: Remove deprecated system constants and limits modulesBobby3-401/+0
2026-02-20feat: Add used_clusters tracking in AFS and update disk info retrievalBobby5-42/+22
2026-02-20feat: Enhance diskinfo invocation with interrupt handling for safe disk ↵Bobby1-0/+5
reads and update version to v1.0.0
2026-02-20feat: Implement CMOS/RTC and CPUID operations, add PIT driver, and enhance ↵Bobby13-11/+258
AFS with disk info retrieval
2026-02-20feat: Add OS information invocations for CPU, memory, disk, uptime, and timeBobby6-0/+184
2026-02-20refactor: Update resource management in Makefile and adjust font pathsBobby1-1/+1
2026-02-15refactor: Modularize memory management constants and improve structureBobby6-256/+147
2026-02-15refactor: Modularize IDT and PIC handling, improve structure and organizationBobby6-74/+107
2026-02-15Refactor Kata Memory Management and SchedulerBobby30-760/+680
- Updated memory management in `memory.zig` to improve virtual buffer allocation and deallocation. - Removed `sensei.zig` and refactored scheduling logic into new files: `queue.zig`, `sensei.zig`, and `waker.zig`. - Introduced `attachment.zig` for managing attachments with new constants and limits. - Created `pool.zig` for managing the Kata pool, including creation and dissolution of Katas. - Enhanced `types.zig` to define new structures and enums for Katas and their states. - Improved context switching in `shift.zig` to streamline Kata execution state management. - Updated file references and imports across the codebase to reflect new structure.
2026-02-15refactor: Restructure ELF and Akiba format handling, modularize componentsBobby13-318/+299
2026-02-15Refactor Crimson Panic Handler and Exception ManagementBobby12-594/+488
- Renamed panic.zig to crimson.zig for clarity and restructured panic handling functions. - Moved exception handling logic from exceptions.zig to a new exception.zig file. - Updated imports across the codebase to reflect the new file structure. - Introduced a new types.zig file to define Context and ExceptionFrame structures. - Added formatting utilities in format.zig for better register and stack frame representation. - Implemented screen rendering functions in render.zig for displaying error messages and system state during panic. - Consolidated color definitions in colors.zig and added new constants for better readability. - Removed obsolete exception handling code and integrated it into the new structure.
2026-02-15Refactor Multiboot Integration and Enhance Terminal FunctionalityBobby31-730/+674
- Updated multiboot imports to use the new directory structure. - Refactored font handling to utilize new PSF constants and terminal limits. - Improved terminal implementation by integrating ASCII and color constants. - Introduced a new GDT implementation with proper segment definitions. - Added framebuffer and memory parsing for multiboot protocol. - Enhanced boot sequence with structured message handling and error reporting. - Established constants for terminal dimensions and boot limits. - Created a dedicated TSS implementation for task management.
2026-02-15refactor: Update stack entry structure and improve type handling in integer ↵Bobby5-24/+38
utilities
2026-02-15Refactor I/O operations and update driver importsBobby35-85/+257
- 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-15refactor: Simplify comments and remove redundant descriptions in constants filesBobby12-301/+15
2026-02-15Add drivers and constants for ATA, AHCI, PCI, Keyboard, Serial, and VGABobby26-965/+970
- Introduced ATA constants and limits for commands, status registers, and device signatures. - Added keyboard constants and limits for scancodes and buffer size. - Implemented PCI configuration constants and limits for device enumeration. - Created I/O port constants for serial communication and keyboard interaction. - Developed AHCI driver for SATA devices, including port operations and command handling. - Implemented ATA PIO block device driver for reading sectors. - Added PS/2 keyboard driver with scancode handling and input buffering. - Created serial port driver for outputting data and formatted printing. - Developed VGA text mode driver for character display and screen management.
2026-02-15Refactor AFS and GPT Filesystem ImplementationBobby14-801/+828
- Removed the old GPT partition table parser and replaced it with a new implementation in `mirai/fs/gpt/gpt.zig` that adheres to the latest standards. - Introduced a new AFS (Akiba File System) driver in `mirai/fs/afs/afs.zig`, including operations for reading, writing, and managing clusters and entries. - Added utilities for handling AFS locations, clusters, and cache operations in `mirai/fs/afs/location.zig`, `mirai/fs/afs/cluster.zig`, and `mirai/fs/afs/cache.zig`. - Implemented read and write operations for AFS in `mirai/fs/afs/read.zig` and `mirai/fs/afs/write.zig`, including functions for managing unit sizes and stack entries. - Introduced type definitions for AFS structures in `mirai/fs/afs/types.zig` and updated the existing types in `mirai/fs/gpt/types.zig`. - Added endian conversion utilities in `mirai/utils/bytes/endian.zig` to facilitate byte order handling. - Enhanced utility functions for converting integer types in `mirai/utils/types/int.zig`.
2026-02-15Refactor terminal graphics and video handlingBobby12-626/+467
- Updated terminal.zig to improve console output management with cursor and scrolling functionality. - Introduced new graphics constants in graphics.zig for better color and terminal configuration management. - Simplified framebuffer operations in video.zig by utilizing pixel utilities for pixel manipulation. - Removed obsolete file descriptor and location utilities to streamline the codebase. - Added pixel utilities for efficient pixel and framebuffer operations, including filling and clearing rectangles. - Enhanced character rendering and line management in terminal graphics.
2026-02-15feat: Add various invocations for file system and I/O operationsBobby63-1531/+1804
- 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-15feat: Add 'wipe' command for clearing the terminal screenBobby2-0/+11
2026-02-13Refactor and enhance filesystem navigation and communication between KatasBobby11-41/+469
- 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: Improve stack viewing and argument handling with enhanced error ↵Bobby3-32/+80
reporting and alignment
2026-02-13refactor: Enhance process spawning with argument support and streamline ↵Bobby2-8/+115
entry points
2026-02-13Refactor interrupt handling and syscall entryBobby10-661/+677
- 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-29refactor: Standardize memory import naming and replace inline memory access ↵Bobby5-81/+22
with function calls
2026-01-28refactor: Replace inline assembly with CPU and I/O functions across multiple ↵Bobby13-90/+57
modules
2026-01-28refactor: Replace inline assembly with I/O functions in ATA, keyboard, and ↵Bobby3-84/+20
PCI drivers