Commit Graph

41 Commits

Author SHA1 Message Date
Drew Galbraith f9ce4a4a8e [Zion] Don't ignore DriverManager Register return code. 2023-11-25 13:06:14 -08:00
Drew Galbraith 838ef01a2a [Zion] Add a keyboard interrupt handler and a driver manager. 2023-11-25 11:14:30 -08:00
Drew Galbraith ba1b4df702 [Zion] Add more context to GPT faults in the interrupt handler. 2023-11-24 16:49:05 -08:00
Drew Galbraith 941d7c8d59 [Zion] Add a way to unwind the stack and recover from user-space faults. 2023-11-22 18:25:08 -08:00
Drew Galbraith a93aa3a426 [Zion] Add an invalid opcode handler. 2023-11-22 12:10:18 -08:00
Drew Galbraith 2a984a93ec [Zion] Add a shim Floating Point Exception handler. 2023-11-21 15:17:32 -08:00
Drew Galbraith c080c61398 [Denali] Reduce noise on AHCI interrupt. 2023-11-15 16:21:19 -08:00
Drew Galbraith 0b47e3b7fc [Zion] Track used vs free physical memory. 2023-11-15 14:53:05 -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 69aced2220 [Zion] Move to StrFormat for debug line. 2023-11-05 09:24:09 -08:00
Drew Galbraith d9df1212b7 [Zion] Pass data to message queue as IpcMessage obj. 2023-11-03 00:37:53 -07:00
Drew Galbraith 277b0d3ccc [Zion] Use the glacier ArrayView class for sending IPC msgs. 2023-11-02 23:31:08 -07:00
Drew Galbraith 2b27af5814 [Yellowstone] Move to yunq definition for yellowstone server. 2023-10-24 18:24:26 -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 259c64ef2a [zion] Check if scheduler exists in PF handler before trying to resolve 2023-08-01 23:10:20 -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 847d37addc [zion] Add info about APIC mapping 2023-08-01 11:19:48 -07:00
Drew Galbraith 9dd457391c [zion] Move IPC objects to share code 2023-06-21 23:47:45 -07:00
Drew Galbraith e1af79b975 [zion/glacier] Move RefPtr to glacier. 2023-06-21 15:07:40 -07:00
Drew Galbraith fe1641ac38 [zion] Create a message queue to be shared between the port and channel 2023-06-20 15:29:32 -07:00
Drew Galbraith b8b6576b7f Cleanup AHCI Ident a bit and reduce logging 2023-06-12 23:32:24 -07:00
Drew Galbraith 0f0e39d1e9 Further parse AHCI information.
Send an IDENTIFY command to each drive and set up a hook to handle
interrupts.
2023-06-12 19:20:51 -07:00
Drew Galbraith c35cef65fe Don't mistakenly mask interrupts in user space 2023-06-12 19:01:09 -07:00
Drew Galbraith bd32e85164 Fix race condition in page fault handler.
We enabled interrupts before getting the value of cr2 in the handler.
If the handler was preempted, cr2 could have been overriden by a page
fault in a separate thread or process.
2023-06-07 22:24:50 -07:00
Drew Galbraith 53ff49b265 Add preprocessor directives to supress logs per file.
Makes the output much cleaner by default but allows for getting more
infor if debugging in the future.
2023-06-07 13:51:13 -07:00
Drew Galbraith add533071b Use APIC for interrupts rather than PIC.
Still rely on the PIT for now rather than the local APIC timer.
2023-06-07 13:40:36 -07:00
Drew Galbraith eb04242a59 Add a debug mode for the KernelHeap. 2023-06-07 10:01:22 -07:00
Drew Galbraith 23895b5c6c Spawn Processes using memory primitives rather than and elf loader.
This allows us to remove the temporary syscall for that style of process
spawn.
2023-06-07 00:04:53 -07:00
Drew Galbraith b06c76e477 Create a MemoryObject class and use it to load programs. 2023-06-06 21:44:10 -07:00
Drew Galbraith de49dcc01a Move scheduler to new global class format. 2023-05-29 23:48:32 -07:00
Drew Galbraith b58186265e Split Yield and Preempt into separate scheduling functions.
This switch makes the logic for each much easier to parse.
2023-05-29 23:09:39 -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 9869d1022a Mask all interrupts on the master PIC except the timer.
This prevents us from getting a GP fault when an unhandled interrupt
arises.
2023-05-29 22:07:47 -07:00
Drew Galbraith a949055bce Flesh out the GP Fault hanlder slightly. 2023-05-29 22:01:06 -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 7a3b4d2d42 Add true page fault handler. 2023-05-18 13:56:09 -07:00
Drew Galbraith 747c2a4e17 Add a page fault handler 2023-05-18 10:59:45 -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