summaryrefslogtreecommitdiff
path: root/arch/i386/include/kernel
AgeCommit message (Collapse)Author
2024-06-21arch: i386: pmem: refactor the physical memory managerDanny Holman
Refactor the physical memory manager to be more efficient and require fewer function calls from layers above. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-06-21arch: i386: paging: do the recursive paging trickDanny Holman
Map the page directory to the last page table. This allows the kernel to access every page table on the system from the address 0xFFC00000 plus an offset. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-05-29arch: i386: asm: make flush_gdt availableDanny Holman
Make the declaration of flush_gdt available to files including asm.h. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-05-29arch: i386: remove last refs to moved headersDanny Holman
Remove all the remaining references to headers that were moved into the libk. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-05-29arch: i386: fix several bugs in paging subsystemDanny Holman
Fix several triple-faulting bugs in the paging initialization routines. These include causing a page fault during physical memory manager initialization, causing a page fault during paging initialization and other double-faulting and triple-faulting bugs. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-05-27arch: i386: pmem: refactor the physical MMDanny Holman
Refactor the physical memory manager to be dramatically simpler. The new design uses only a single freelist, and only uses temporary mappings where needed. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-05-27arch: i386: update all files to use the new libkDanny Holman
Update all the files under arch to make use of the new libk implementation. Most of these changes are simply path changes in include directives. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-05-27arch: i386: add a spinlock implementationDanny Holman
Add two functions to control thread-local spinlocks. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-05-27arch: i386: pass entry page directory to entry funcDanny Holman
Add a third argument to i386_entry. This argument is the bootstrap page directory. Pages can be temporarily mapped in during the initialization of the paging system. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-05-27drivers: create a subdir just for driver codeDanny Holman
Create a subdirectory branching from the project root. This directory will contain nothing but driver and device code. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-03-28arch: i386: kernel: add mostly finished PFA and paging systemDanny Holman
Add the mostly finished physical memory allocator and expose its functions to the paging system. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-02-24arch: i386: cleanup everything and reorganizeDanny Holman
Clean up everything in the i386 arch directory. This code has been in dire need of refactoring for a long while. All the inline assembly functions and the data structures related to the architecture should be placed into their own header file. Now the scheduler can access registers and ISRs without having to deal with arch-specific code. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-02-16arch: i386: add basic keyboard driverDanny Holman
Add a basic driver for the PS/2 keyboard. This driver just prints whatever it receives back out to the framebuffer. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-02-16arch: i386: roll physical memory control into VMMDanny Holman
The VMM should control the physical memory as well as paging. This allows the VMM to grab frames as it sees fit. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-02-16arch: i386: move GDT definitions to their own headerDanny Holman
Move all the data structures required for operation of the GDT to their own header file. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-02-16arch: i386: move IRQ functions to PIC driverDanny Holman
Move all the functions that control IRQ lines to the PIC driver. This allows the IDT controller to handle only raw interrupts no matter where they come from. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-02-16arch: i386: move raw assembly calls to their own headerDanny Holman
Move simple assembly calls to their own header. All one or two line assembly calls should be defined in a single place. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-02-16arch: i386: syscall.c: add functions that dump dataDanny Holman
Add functions to the syscall handlers that dump registers and stack in case of catastrophic failure. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-02-16arch: i386: add operations to control PIT timerDanny Holman
Add a set of functions that control the programmable interrupt timer. This will be used as the primary means of preemption on this architecture. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-02-16arch: i386: put framebuffer ops in own fileDanny Holman
Move all operations related to the x86 framebuffer into its own set of files. This makes the TTY layer more architecture agnostic. Signed-off-by: Danny Holman <dholman@gymli.org>
2023-11-26arch: i386: paging: add a proper paging APIDanny Holman
Add a proper page control API. These functions allow the kernel to directly map and unmap pages in the logical address space. Signed-off-by: Danny Holman <dholman@gymli.org>
2023-11-26arch: i386: alloc: add a physical memory managerDanny Holman
Add a simple, bitmap-based physical memory management system. Signed-off-by: Danny Holman <dholman@gymli.org>
2023-11-26arch: i386: add multiboot supportDanny Holman
Add support for the multiboot specification. These files will allow the kernel to read the multiboot header information as well as the provided memory map. Signed-off-by: Danny Holman <dholman@gymli.org>
2023-11-26arch: i386: syscall.h: define some example system callsDanny Holman
Define a few standard Unix system calls. These may change based on future needs. Signed-off-by: Danny Holman <dholman@gymli.org>
2023-11-26arch: i386: pic.h: make register_irq_handler accessibleDanny Holman
Make the register_irq_function accessible from files including pic.h. Signed-off-by: Danny Holman <dholman@gymli.org>
2023-11-26arch: i386: pic.h: change all chars into uint8_tDanny Holman
Make all variables with char or char* type into uint8_t. This makes the system more consistent and issues fewer compiler warnings. Signed-off-by: Danny Holman <dholman@gymli.org>
2023-11-26arch: i386: idt.h: remove extern functionsDanny Holman
Remove references to extern functions. All the necessary functionality for this file is already contained. Signed-off-by: Danny Holman <dholman@gymli.org>
2022-03-22arch: i386: refactor the system call APIDanny Holman
The x86 system call/interrupt handlers should be refactored to be more readable. Signed-off-by: Danny Holman <dholman@gymli.org>
2022-01-21arch: i386: move non-critial files out of bootDanny Holman
Move all files not needed for the bootstrap process out of boot and into the main x86 source directory. Signed-off-by: Danny Holman <dholman@gymli.org>
2022-01-15arch: i386: fix coding style issueDanny Holman
Make the inline assembly calls consistent across different i386 files. Signed-off-by: Danny Holman <dholman@gymli.org>
2022-01-15arch: i386: add support for IRQs and system callsDanny Holman
Add support for rudementary system calls and IRQ interrupts. Signed-off-by: Danny Holman <dholman@gymli.org>
2022-01-15arch: i386: simplify IDT setupDanny Holman
Simplify the interrupt descriptor table setup and frame assembly. Signed-off-by: Danny Holman <dholman@gymli.org>
2021-10-09arch: i386: include more information in IDTDanny Holman
Include information about the current stack frame in the IDT handler(s). Signed-off-by: Danny Holman <dholman@gymli.xyz>
2021-09-28arch: i386: add PIC register supportDanny Holman
Add functions that let the OS read the internal state registers of the 8259 PIC. Signed-off-by: Danny Holman <dholman@gymli.xyz>
2021-09-28arch: i386: fix IDT exception handlerDanny Holman
Fix the i386's general exception handler to actually work. Fix provided by Jon Sanderson (jjs295356@gmail.com). Signed-off-by: Danny Holman <dholman@gymli.xyz>
2021-09-28arch: i386: add support for 8259 PICDanny Holman
Add support for the 8259 programmable interrupt controller. Signed-off-by: Danny Holman <dholman@gymli.xyz>