Drew Galbraith
838ef01a2a
[Zion] Add a keyboard interrupt handler and a driver manager.
2023-11-25 11:14:30 -08:00
Drew Galbraith
cb590c96b8
[Zion] Add a proc/thread cleanup thread for future use.
2023-11-24 15:04:03 -08:00
Drew Galbraith
a1e1e1c2d8
[Zion] Enable SSE instructions at the start of boot.
...
These aren't ready to be used yet as we need to save them on task
switch.
2023-11-20 16:40:07 -08:00
Drew Galbraith
46d02e5eae
[Zion] Remove sleeping messages.
2023-11-15 16:27:09 -08:00
Drew Galbraith
07e6e3028d
[Zion] Access the KernelStackManager through the VMM.
2023-11-15 15:38:25 -08:00
Drew Galbraith
c5b9d20c7e
[Zion] Remove early_dbgln since dbgln no longer allocs.
2023-11-15 15:19:02 -08:00
Drew Galbraith
20d6d2aaaf
[Zion] Introduce the Kernel VMM to centralize allocs.
2023-11-15 15:15:31 -08:00
Drew Galbraith
cc16210e90
[Zion] Use slab allocators immediately during heap init.
2023-11-15 13:02:34 -08:00
Drew Galbraith
659f122c9e
[Zion] Free memory that was allocated with the slab allocator.
...
This reduces the number of active allocs by ~ 200.
Size 8: 142 -> 2
Size 16: 319 > 313
Size 32: 364-> 312
2023-11-15 12:53:14 -08:00
Drew Galbraith
6d27ee5dc5
[Zion] Add more debug information about kernel heap usage.
...
This will be helpful as we work to improve it.
Without deallocations, we currently stand at the following alloc numbers
8 - 142
16 - 319
32 - 364
unsized - 305
total page usage including slabs is 12.
2023-11-15 12:36:18 -08:00
Drew Galbraith
d71d543b2a
[Zion] Move to a kernel slab allocator that will allow easier dealloc.
2023-11-15 12:04:35 -08:00
Drew Galbraith
a745f45b5d
[Zion] Add a method to dump the bootloader memory regions.
2023-11-08 08:07:57 -08:00
Drew Galbraith
4af19d010f
[Zion] Add an early debug method without allocations.
2023-11-05 08:48:41 -08:00
Drew Galbraith
ee603b7478
[zion] Add a basic slab allocator to the kernel.
...
Don't free from the slab allocator yet but allocations appear to work.
2023-08-02 00:54:39 -07:00
Drew Galbraith
e3a425e274
[zion] Use a separate stack for PF and GP faults in the kernel.
2023-08-01 23:11:12 -07:00
Drew Galbraith
35b1844862
[zion] Move all APIC functions into a global class.
2023-08-01 22:38:40 -07:00
Drew Galbraith
f8de60e2dd
[zion] Move more initialization into the ApicTimer class.
2023-08-01 21:48:20 -07:00
Drew Galbraith
d99624daf6
[zion] Move to using the LAPIC timer over the PIT.
2023-08-01 20:18:47 -07:00
Drew Galbraith
3e1e37bf03
Probe RSDP for PCIe Config
2023-06-07 16:24:13 -07:00
Drew Galbraith
eb04242a59
Add a debug mode for the KernelHeap.
2023-06-07 10:01:22 -07:00
Drew Galbraith
f22dd66c8d
Manage KernelStacks separately rather than just allocing bytes.
...
Create a global KernelStackManager that will handle the relevant allocs.
2023-05-30 21:28:44 -07:00
Drew Galbraith
f6609983d2
Move away from using recursive mapping for page tables.
...
Having the HHDM-based mapping allows us to more easily map data into
non-resident processes.
2023-05-30 01:06:01 -07:00
Drew Galbraith
de49dcc01a
Move scheduler to new global class format.
2023-05-29 23:48:32 -07:00
Drew Galbraith
7fe6c24aa5
Add a ProcessManager class to store Process objects.
...
Trying out a new method for exposing global objects directly via a
variable.
2023-05-29 23:35:44 -07:00
Drew Galbraith
656687b183
Schedule on PIC timer raise.
...
This causes a page fault because we don't properly handle the sleep
case.
2023-05-29 22:32:50 -07:00
Drew Galbraith
496dfeaef9
Update the timer to a more reasonable time slice of 50ms
2023-05-29 22:17:56 -07:00
Drew Galbraith
629dca278b
Enable the PIC and add a timer.
...
This causes a GP fault after the timer runs for some time.
2023-05-29 21:52:01 -07:00
Drew Galbraith
aefb4f082b
Add a kernel ELF module and load it in a new process.
...
Don't yet jump to userspace.
2023-05-29 00:32:54 -07:00
Drew Galbraith
f86bbe6ea9
Wireframe for syscalls in place
2023-05-18 16:03:09 -07:00
Drew Galbraith
d3024211a7
Cycle through multiple tasks in multiple processes
2023-05-18 13:56:54 -07:00
Drew Galbraith
0d275c72a1
Have processes enqueue their own threads
2023-05-18 13:28:22 -07:00
Drew Galbraith
cb41953354
Scheduler with working threads.
...
Currently only one process but it is a start.
2023-05-18 13:24:02 -07:00
Drew Galbraith
960cbf9519
Add Scheduler wireframe.
...
Right now does nothing but has containing classes for process and thread
information.
2023-05-18 12:43:53 -07:00
Drew Galbraith
fa2bb4df89
Added a PhysicalMemoryManager class.
...
Stores a linkedlist of free blocks of PhysicalMemory.
2023-05-18 11:34:45 -07:00
Drew Galbraith
2d719d0443
Add a bootstrap physical memory manager.
...
This will allow the real physical memory manager to use allocations.
2023-05-18 11:00:05 -07:00
Drew Galbraith
0b7e667368
Add a basic kernel heap object.
...
Currently allocation always fails because we don't
have a way to allocate a physical page.
2023-05-18 10:59:39 -07:00
Drew Galbraith
45b5817a36
Recursively map the PML4
2023-05-18 02:00:01 -07:00
Drew Galbraith
b3f8cb9003
Dump the memory map from limine.
...
Also adds the ability to print formatted messages.
2023-05-18 01:16:53 -07:00
Drew Galbraith
9fc1aa15ef
Add an interrupt descriptor table.
...
Set up a very basic handler for divide by zero and
general protection faults.
2023-05-17 22:54:37 -07:00
Drew Galbraith
03fe4d8c2e
Load our own GDT.
...
Replace the GDT from limine with our own.
2023-05-17 21:41:08 -07:00
Drew Galbraith
872e6f3392
Add a debug output utility.
2023-05-17 20:42:59 -07:00
Drew Galbraith
91b52f1872
Move IO Port Function to a separate file
2023-05-17 20:26:51 -07:00
Drew Galbraith
e9705f7579
Barebones Kernel Commit
...
Uses limine to boot off of a disk.
Outputs a character to the debug port.
2023-05-17 20:20:53 -07:00