summaryrefslogtreecommitdiff
path: root/arch/i386/boot/boot.s
AgeCommit message (Collapse)Author
2024-06-24arch: i386: boot: zero ESP before calling i386_entryDanny Holman
Set the ESP register to NULL before calling any C code. This allows a stack trace to occur without overrunning the initial bootstrap stack. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-06-21libk: use a random value for the stack protectorDanny Holman
Don't hardcode the __stack_chk_guard value, generate a random value (using RDRAND on x86) before running any C code. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-06-21arch: boot: allocate a few pages at startupDanny Holman
Allocate a few pages at startup just to get the paging and physical memory manager up and running. 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-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-24kernel: string: add a strcpy functionDanny Holman
Add an implmentation of strcpy. This function is used in several places in the kernel to copy strings between memory addresses. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-02-24arch: i386: move jump_userspace to its own fileDanny Holman
Move the function that jumps to ring 3 to its own assembly file. 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>
2023-11-26arch: i386: boot.s: define functions for page managementDanny Holman
Define the load_page_dir and enable_paging functions in assembly. This allows normal C code to initialize the CR3 register and control paging without using inline assembler. Signed-off-by: Danny Holman <dholman@gymli.org>
2023-11-26arch: i386: boot.s: move C entry point to fileDanny Holman
Move the initial C entry-point to its own file. Call all the i386 specific initialization routines from the new i386_entry function. Signed-off-by: Danny Holman <dholman@gymli.org>
2023-11-26arch: i386: boot: boot.sDanny Holman
Fix several small bugs in assembler. 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: simplifiy GDT setupDanny Holman
Simplify the setup and definitions of GDT/TSS entries. Signed-off-by: Danny Holman <dholman@gymli.org>
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>
2021-08-30i386: create idt.c and isr.sDanny Holman
Create files that add IDT support for i386. Signed-off-by: Danny Holman <dholman@gymli.xyz>
2021-07-24arch: i386: add GDT setup routinesDanny Holman
Add a set of routines that setup the x86's global descriptor table. Signed-off-by: Danny Holman <dholman@gymli.xyz>
2021-07-20arch: i386: move the kernel to high memoryDanny Holman
Move the start of the kernel image to the "higher half" of memory. This also enables paging.
2021-01-24x86: reorganize the i386 directoryDanny Holman
Add structure to the internals of the x86 directory. Signed-off-by: Danny Holman <dholman@gymli.xyz>