Commit Graph

263 Commits

Author SHA1 Message Date
Drew Galbraith cd1304beae [Denali] Add back accidentally deleted files. 2024-01-17 14:12:46 -08:00
Drew Galbraith fecaa387b0 [Yunq] Add a basic yunq test into libyunq. 2024-01-16 18:58:03 -08:00
Drew Galbraith 8a711266ef [Zion] Fix init program loader debugging. 2024-01-11 19:02:15 -08:00
Drew Galbraith 5eb72da9c8 Move glcr::Array & glcr::ArrayView loops to range-based. 2024-01-11 17:39:55 -08:00
Drew Galbraith b2354ae341 Move many loops over glcr::Vector to range-based loops. 2024-01-11 17:13:35 -08:00
Drew Galbraith d7c1022b7f [Zion] Print RBP on GP Fault. 2023-12-08 14:30:24 -08:00
Drew Galbraith 8adde27d9b [Zion] Add a thread sleep call.
For now this can only sleep in increments of the scheduler quantum
(currently 50ms). It also uses a somewhat ineffecient way of tracking
the sleeping threads - it will scale linearly with the number of
sleeping threads.
2023-12-07 00:20:03 -08:00
Drew Galbraith 067da8709c Update TODOs 2023-12-05 16:16:42 -08:00
Drew Galbraith 815a603c1c [Zion] Mark pages as not present before calling invlpg. 2023-12-05 16:11:37 -08:00
Drew Galbraith 1f8085f791 [Zion] Call invlpg when unmapping memory. 2023-12-05 15:53:42 -08:00
Drew Galbraith d9a4be6555 [Zion] Add a ProcessWait syscall. 2023-12-01 11:36:27 -08:00
Drew Galbraith 642fc4d80d [Zion/Mammoth] Move init cap decls to mammoth.
They no longer need to be independent now that we have removed the libc.
2023-12-01 10:42:26 -08:00
Drew Galbraith 6d108f6965 [Zion] Compile kernel with -Wall -Werror. 2023-11-26 22:07:52 -08:00
Drew Galbraith 4ee4f9cb87 [Zion] Fix thread start checks and add logging. 2023-11-25 13:06:50 -08:00
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 46ae5de30a [Zion] Free paging structures after process exit. 2023-11-24 17:19:32 -08:00
Drew Galbraith 39ac0216dd [Zion] Free all user space mappings when exitting a process. 2023-11-24 17:08:37 -08:00
Drew Galbraith e50d3f8abc [Zion] Remove all capabilities on process cleanup. 2023-11-24 17:05:11 -08:00
Drew Galbraith 430dc36728 [Zion] Add TODO to separate user stacks for safety. 2023-11-24 16:57:00 -08:00
Drew Galbraith 85b701ce31 [Zion] Clarify kernel stack reuse in a comment. 2023-11-24 16:55:45 -08:00
Drew Galbraith 2dd69f5844 [Zion] Map user stacks in as regular MemoryObjects.
This allows us to easily track the physical memory so it
can be freed when the thread exits. It also simplifies the page fault
handler as it just needs to check regular mappings to find a user stack.
2023-11-24 16:51:35 -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 7695396980 [Zion] Add released User Stacks to pool for reuse. 2023-11-24 16:16:25 -08:00
Drew Galbraith d1ace374b6 [Zion] Return freed kernel stacks to pool. 2023-11-24 16:04:40 -08:00
Drew Galbraith 8fb5b7c03c [Zion] Move existing proc/thread cleanup calls to the cleanup thread. 2023-11-24 15:40:44 -08:00
Drew Galbraith 8bedc80caf [Zion] Add a max depth to stack unwinds. 2023-11-24 15:04:19 -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 d44be91099 [Zion] Add an argument to memory align a mapping. 2023-11-23 18:52:28 -08:00
Drew Galbraith c8931a01c8 [Zion] Fix physical page usage tracking. 2023-11-23 07:20:11 -08:00
Drew Galbraith 84e1b4cdb4 [Zion] Plumb user stack to free function on thread exit. 2023-11-23 07:12:23 -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 9f0e87b51d [Glacier] Add proper string formatting for ErrorCodes. 2023-11-22 12:17:10 -08:00
Drew Galbraith a93aa3a426 [Zion] Add an invalid opcode handler. 2023-11-22 12:10:18 -08:00
Drew Galbraith 76fd3fc176 Update TODOs to reflect completed tasks. 2023-11-22 11:00:21 -08:00
Drew Galbraith da3901e104 [Zion] Add a semaphore primitive with related syscalls. 2023-11-22 10:19:56 -08:00
Drew Galbraith 96063126cb [Zion] Add task switching for SSE registers and enable them in userspace. 2023-11-21 15:52:17 -08:00
Drew Galbraith 2a984a93ec [Zion] Add a shim Floating Point Exception handler. 2023-11-21 15:17:32 -08:00
Drew Galbraith 0b8e2d8268 [Zion] Modify the alignement of the initial user stack pointer. 2023-11-21 14:53:59 -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 9b43d615a9 [Zion] Split free physical memory into two lists.
Allow partitioning create requests so for large continuous requests
we don't have to iterate past a bunch of single free pages.
2023-11-20 10:02:27 -08:00
Drew Galbraith 12ca4e4e89 [Zion] Separate Memory "Views" to a separate MemoryObject. 2023-11-19 23:22:56 -08:00
Drew Galbraith a8ad225cf1 [Zion] Make the base MemoryObject pure abstract. 2023-11-19 23:17:12 -08:00
Drew Galbraith 4d1846a7d5 [Zion] Actually free memory pages when a MemoryObject goes out of scope 2023-11-19 21:37:30 -08:00
Drew Galbraith 8e827a5dfb [Mammoth] Move all callers of FromCapability to OwnedMemoryObject. 2023-11-19 20:33:15 -08:00
Drew Galbraith 337126cabb [Glacier] Update String to be non-copyable by default. 2023-11-19 19:14:37 -08:00
Drew Galbraith 2e4a12661d [Zion] Add a syscall to get a memory object's length. 2023-11-19 19:02:55 -08:00
Drew Galbraith 30b6511467 [Zion] Add a AddressSpaceUnmap syscall to free memory. 2023-11-19 18:55:44 -08:00
Drew Galbraith e668428d9d [Zion] Move Memory Mappings to a dedicated tree impl. 2023-11-19 18:45:13 -08:00
Drew Galbraith 7d48dd2b8b [Zion] Add the ability to delete a capability. 2023-11-19 17:53:56 -08:00