Commit graph

497 commits

Author SHA1 Message Date
Drew Galbraith
45cf2115da [denali] Add a stub client for denali 2023-06-19 22:57:08 -07:00
Drew Galbraith
a202bf2371 Have yellowstone dump the MBR/GPT tables 2023-06-19 21:54:40 -07:00
Drew Galbraith
0aa38ac4a4 [denali] Make denali less noisy on interrupt 2023-06-19 21:51:53 -07:00
Drew Galbraith
1cebe547c0 [zion] Allow the sleep thread to be preempted.
We can't yield it when the next thread is unblocked for now because it
may still be holding a lock that the prempted thread is waiting on.
2023-06-19 21:47:37 -07:00
Drew Galbraith
ec915338dc Add struct reading from channels 2023-06-19 21:47:23 -07:00
Drew Galbraith
a15ab24d9b [libc] Add %s to sprintf 2023-06-19 21:46:02 -07:00
Drew Galbraith
27f540e9ae Move ipc calls to take a void* 2023-06-19 18:39:46 -07:00
Drew Galbraith
685070d65e Get rid of the type field on zmessage 2023-06-17 02:01:21 -07:00
Drew Galbraith
7bd6aa42b0 [zion] Declare z_cap_t and start replacing existing types 2023-06-17 01:53:19 -07:00
Drew Galbraith
5e99dbf7d1 Refactor all Zion decls into one header 2023-06-17 01:45:53 -07:00
Drew Galbraith
7dcbbd671e [denali] Get all caps from the init port.
This allows us to remove the bootstrap capabilities for good woo hoo!
2023-06-17 01:30:47 -07:00
Drew Galbraith
6e86ce67f0 [zion] Fix capability permission issues 2023-06-17 01:24:07 -07:00
Drew Galbraith
424b032146 [zion] Remove old debug messages 2023-06-17 01:09:48 -07:00
Drew Galbraith
bbc31a0d2b [zion] Return proper code from PortCreate 2023-06-17 01:05:51 -07:00
Drew Galbraith
857b7fae03 [zion] Add a port send syscall 2023-06-17 01:05:10 -07:00
Drew Galbraith
cc191cd6bb [zion] Add a syscall to duplicate capabilities 2023-06-17 00:59:44 -07:00
Drew Galbraith
378ced6b6c [zion] Add a port create syscall 2023-06-17 00:31:02 -07:00
Drew Galbraith
09ac87e6f5 [yellowstone] Recieve all caps via init port. 2023-06-17 00:17:43 -07:00
Drew Galbraith
2ea1f90690 [zion] Add a direct port write for the kernel 2023-06-17 00:07:58 -07:00
Drew Galbraith
0a909eae0e Print exit codes in hex 2023-06-17 00:03:09 -07:00
Drew Galbraith
528723e490 [mammoth] Create a method for getting initial caps. 2023-06-16 23:51:49 -07:00
Drew Galbraith
4c936623b5 Specify our target in .ccls 2023-06-16 23:15:41 -07:00
Drew Galbraith
35f24e7c77 Add a Port poll operation 2023-06-16 23:15:28 -07:00
Drew Galbraith
21b73b5b92 [zion] [yellowstone] Pass the denali VMMO by port as a POC.
Preparing to bootsrap via port write rather than hard coding capability
ids.
2023-06-16 15:58:50 -07:00
Drew Galbraith
75b1f2d21c [zion] Store capability ids on the CapabilityTable.
This is preferable to storing it in the capability itself since the id
is really just an index for the containing process.
2023-06-16 15:27:09 -07:00
Drew Galbraith
b27672d5de [zion] Update LinkedList iterator semantics. 2023-06-16 15:24:38 -07:00
Drew Galbraith
242a18ae3c [zion] Finish cleaning up process capability interface.
Make all functions generic and specify existing/vs new cap.
2023-06-16 15:09:15 -07:00
Drew Galbraith
fc94bc5bf5 [zion] Update process interface to simplify capability insertion.
Take a templated KernelObject with explicit permissions.
2023-06-16 15:04:33 -07:00
Drew Galbraith
a47bac9966 [zion] Dynamically check Capability type.
Instead of passing an enum with the capability when creating it, relying
on polymorphism and a template struct tag to determine the object type
at runtime.

This is cleaner and avoids errors where we pass the wrong capability
type with the cap and do a bad cast at runtime.
2023-06-16 14:53:57 -07:00
Drew Galbraith
b4902a79ef [zion] Add per-process CapabilityTable object
Store this information in it's own object to make the API clearer.
2023-06-16 14:25:54 -07:00
Drew Galbraith
be12fa9a19 Add mutex fixme 2023-06-16 14:25:23 -07:00
Drew Galbraith
4e328c2f7a Set RSP0 on context switch
Previously we only set it on thread init which caused interrupts to
stomp on the stack of the most recently started thread, potentially
overwriting their cr3 and other variables and causing a crash.
2023-06-16 01:52:59 -07:00
Drew Galbraith
e5da93757a Working AHCI DMA IPC from yellowstone to denali.
We have a weird bug in context switching where a process's rsp0 ends up
pointing at the wrong value sometimes which crashes the OS.
2023-06-16 01:31:23 -07:00
Drew Galbraith
ccfe1b15ab Compile with -fno-rtti 2023-06-16 01:30:31 -07:00
Drew Galbraith
f154d11626 Add deletion functions 2023-06-16 01:30:08 -07:00
Drew Galbraith
6e20e5a610 Add more accessors to mammoth classes 2023-06-16 01:29:49 -07:00
Drew Galbraith
71e51730b7 Mark unblocked threads as runnable before enqueueing them 2023-06-16 01:29:00 -07:00
Drew Galbraith
ffa2d97a64 First iteration of denali server 2023-06-15 16:20:29 -07:00
drew
82b1a5c4db Build GCC/Binutils toolchain in tree. (#1)
Adds a x86_64-pc-acadia target triple.

Co-authored-by: Drew Galbraith <dgalbraith33@gmail.com>
Reviewed-on: https://gitea.tiramisu.one/drew/acadia/pulls/1
2023-06-15 18:39:14 -04:00
Drew Galbraith
b8b6576b7f Cleanup AHCI Ident a bit and reduce logging 2023-06-12 23:32:24 -07:00
Drew Galbraith
72885190e9 Resolved page faults from user stacks 2023-06-12 23:28:23 -07:00
Drew Galbraith
6c13fdc801 Add a memory region type to mammoth 2023-06-12 23:24:05 -07:00
Drew Galbraith
6986f534f8 Add a method for blocking threads on ports.
Additionally add the first lock class since we are becoming more
concurrent.
2023-06-12 20:56:25 -07:00
Drew Galbraith
b6735d3175 [zion] Fix an over-allocation bug when creating a memory object 2023-06-12 20:55:53 -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
4e1888bd24 Set eflags properly for jump to userspace 2023-06-12 19:20:42 -07:00
Drew Galbraith
8ac5366882 [zion] Add ability to dump MADT (APIC) tables 2023-06-12 19:17:00 -07:00
Drew Galbraith
7cf54c0dd2 [mammoth] Fix accidental switch fall through in crash 2023-06-12 19:14:30 -07:00
Drew Galbraith
832d2f6961 Allow default constructing mammoth threads 2023-06-12 19:13:55 -07:00
Drew Galbraith
f907c189bb Add a memcpy utility to libc 2023-06-12 19:13:16 -07:00