Commit Graph

212 Commits

Author SHA1 Message Date
Drew Galbraith 322502fcee [Denali] Zero out uninitialized devices. 2023-11-19 22:54:01 -08:00
Drew Galbraith a0a673ee16 [Yellowstone] Free Teton file cap after spawning process. 2023-11-19 21:38:04 -08:00
Drew Galbraith 344e84c313 [Mammoth] Get rid of last uses of MappedMemoryRegion. 2023-11-19 20:48:23 -08:00
Drew Galbraith d41a565721 [Mammoth] Add an OwnedMemoryRegion for ContiguousPhysical. 2023-11-19 20:42:38 -08:00
Drew Galbraith deb2e708cd [Mammoth] Add a helper method for duplicating memory capabilities. 2023-11-19 20:35:55 -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 3e9923f227 [Mammoth] Add an owned memory capability that cleans itself up. 2023-11-19 17:54:28 -08:00
Drew Galbraith fb458e6fd4 [Teton] Draw a green square into the framebuffer. 2023-11-15 19:20:52 -08:00
Drew Galbraith 84d3caaba5 [Teton] Get framebuffer info from yellowstone. 2023-11-15 16:42:00 -08:00
Drew Galbraith 1ccbf5e12e [Yellowstone] Disable most log messages in yellowstone. 2023-11-15 16:26:15 -08:00
Drew Galbraith c080c61398 [Denali] Reduce noise on AHCI interrupt. 2023-11-15 16:21:19 -08:00
Drew Galbraith 7c105c8a31 [Sys] Successfully spin up a new process from disk. 2023-11-15 09:47:32 -08:00
Drew Galbraith 0e99189dba [Yellowstone] Try to spawn the teton process from disk. 2023-11-09 12:55:44 -08:00
Drew Galbraith 9e05b3b3dd [Yellowstone] Add a method to get the framebuffer info from yellowstone. 2023-11-09 11:33:32 -08:00
Drew Galbraith fa6a5949b2 [Zion] Pass the framebuffer info to yellowstone init process. 2023-11-09 11:20:41 -08:00
Drew Galbraith 17ed4ca1f6 Fix remainder of formats in userland. 2023-11-05 09:25:11 -08:00
Drew Galbraith 26b61db021 Move userspace to a templated StrFormat. 2023-11-03 02:48:21 -07:00
Drew Galbraith f31652b981 Add a way to restrict permissions on cap duplication. 2023-11-02 22:12:55 -07:00
Drew Galbraith e66706d381 [Glacier] Convert ErrorCode into an Enum. 2023-11-02 21:55:12 -07:00
Drew Galbraith bcd9cf09bc [VictoriaFalls] Add the file size to VFS.OpenFile 2023-11-02 21:02:56 -07:00
Drew Galbraith d7050ff19f [VictoriaFalls] Implement Read File. 2023-11-02 20:57:28 -07:00
Drew Galbraith abf09d8fce [VictoriaFalls] Split the path when opening a file. 2023-11-02 20:24:33 -07:00
Drew Galbraith b6c220a350 [Yellowstone] Attempt to read a test file from the system root. 2023-11-02 19:28:27 -07:00
Drew Galbraith 38fb6ca170 [VictoriaFalls] Register VFS endpoint with yellowstone. 2023-11-02 18:55:05 -07:00
Drew Galbraith 48c7721b0f [VictoriaFalls] Add a VFS yunq stub and register it. 2023-10-25 23:08:45 -07:00
Drew Galbraith c8dcc07d7d Update CMakeLists to autogen yunq files. 2023-10-25 21:53:55 -07:00
Drew Galbraith 0dbafbfa66 [Yunq] Reset cap buffers between server uses. 2023-10-25 20:46:36 -07:00
Drew Galbraith b85af8d0f8 [Yunq] Fix bug in logging reply errors. 2023-10-25 20:40:39 -07:00
Drew Galbraith 3e4fdfee84 [Denali] Move denali server to yunq. 2023-10-25 20:28:28 -07:00
Drew Galbraith acfaf26391 [Denali] Use mutexes to synchronize the AHCI responses.
This is a temporary solution to allow denali to migrate to the
yunq framework until we have a good async solution.
2023-10-25 19:39:09 -07:00
Drew Galbraith adfffdd3c3 [Yellowstone] Use mutex to wait for denali to spawn VFS.
Kind of a hacky way to pass a signal between threads but works as
a POC for thread synchronization.
2023-10-25 19:08:00 -07:00
Drew Galbraith 4c2237fa72 [Yellowstone] Move yellowstone yunq def to yellowstone/lib/ 2023-10-24 23:49:42 -07:00
Drew Galbraith af0852a5fa [yellowstone] Update TODO. 2023-10-24 23:43:57 -07:00
Drew Galbraith 05e12aaa7d [Yellowstone] Move registration service to the main yellowstone service 2023-10-24 23:42:49 -07:00
Drew Galbraith b516087922 [Zion] Add the ability to pass capabilities via endpoint call. 2023-10-24 23:32:05 -07:00
Drew Galbraith 5b781bb394 Update READMEs and TODOs 2023-10-24 22:56:45 -07:00
Drew Galbraith 2b27af5814 [Yellowstone] Move to yunq definition for yellowstone server. 2023-10-24 18:24:26 -07:00
Drew Galbraith 48c6e5b3a4 [zion] Add a method for duplicating and scoping down VMMOs.
Use the AHCI section of the PCI config as an example POC of this.

We can now pass a memory capability instead of just the physical
address.
2023-08-01 17:46:26 -07:00
Drew Galbraith 8f84f8c3ca [zion] Remove temp PCI Memory Object create function.
Pass the PCI memory space to the yellowstone init process instead.
2023-08-01 17:13:19 -07:00
Drew Galbraith c70b5b0753 [mammoth] Run EndpointServer in its own thread. 2023-08-01 16:08:34 -07:00
Drew Galbraith caccb08e16 Generalize the EndpointServer to require less boilerplate.
Classes can now inherit from the EndpointServer and just implement the
HandleRequest function.
2023-08-01 15:52:08 -07:00
Drew Galbraith 083ed52ddd [Victoria Falls] Print only the root directory information.
Move the InodeTable creating to the Init function which (somewhat)
requires us to stop taking the Ext2BlockReader as a reference (the reference
from the Init function goes out of scope). Make the Ext2BlockReader Init
function return a shared ptr by default.
2023-08-01 10:39:26 -07:00
Drew Galbraith bed685af65 [Victoria Falls] Clean up directory probe debug printing 2023-07-31 23:54:41 -07:00
Drew Galbraith 3dce058562 [Victoria Falls] Fix DirEntry member size 2023-07-31 23:42:52 -07:00
Drew Galbraith 2ff4334bea [victoriafalls] Begin traversing the root inode. 2023-07-06 10:40:55 -07:00
Drew Galbraith 150bfd2fd4 [victoriafalls] Move a superblock-based calculations to the block reader 2023-07-06 09:58:26 -07:00
Drew Galbraith 52b4b273b7 [victoriafalls] Add InodeTable class to cache Inode info 2023-07-06 09:39:17 -07:00
Drew Galbraith 21c1a001ea [victoriafalls] Move the block to lba translation to a small wrapper.
Abstract this away into a thin wrapper over the denali client such that
it can be called from other helper classes.
2023-07-05 23:19:25 -07:00
Drew Galbraith a49d13f1d1 [victoriafalls] Add an Ext2Driver class which probes the superblock. 2023-07-05 22:56:08 -07:00
Drew Galbraith 0274339cc9 [victoriafalls] Read some of the ext2 superblock as a POC 2023-07-05 17:17:39 -07:00
Drew Galbraith 29d9923f5a [yellowstone] Add a way to retrieve to denali client from yellowstone 2023-07-05 16:03:20 -07:00
Drew Galbraith c057da88ad [yellowstone] Add registration to yellowstone stub. 2023-07-05 15:01:29 -07:00
Drew Galbraith 72483a3437 Add a yellowstone stub and partially migrate denali 2023-07-05 14:51:24 -07:00
Drew Galbraith 318356e54c [yellowstone] Log a line when MBR is incorrect 2023-07-05 14:33:00 -07:00
Drew Galbraith a8db218204 [denali] Relocate AHCI structures to memory we control 2023-07-05 14:32:19 -07:00
Drew Galbraith 1412c5b73e [denali] Factory construct the AHCI Driver 2023-06-26 17:35:51 -07:00
Drew Galbraith 16dd675828 [denali] Get Ahci device address from yellowstone. 2023-06-26 17:01:59 -07:00
Drew Galbraith 08abe776a4 [yellowstone] Rename yellowstonestub to yellowstone_stub. 2023-06-26 11:59:29 -07:00
Drew Galbraith 3c62ad8719 [denali] Rename libdenali to denali_stub 2023-06-26 11:58:29 -07:00
Drew Galbraith 380953937f [mammoth] Rename cmake target to remove _lib 2023-06-26 11:56:09 -07:00
Drew Galbraith 90f33f31c5 [mammoth] Move EndpointClient to move-only semantics. 2023-06-26 11:54:36 -07:00
Drew Galbraith 2e89aee5a3 [mammoth] Update EndpointServer to have move-only semantics. 2023-06-26 11:38:17 -07:00
Drew Galbraith b7a962cc26 [mammoth] Finish separating PortServer and PortClient. 2023-06-26 08:59:28 -07:00
Drew Galbraith 5fb9fa6ae6 [mammoth] Move port server operations to their own class. 2023-06-26 08:41:44 -07:00
Drew Galbraith 7989c9d616 Remove libcxx stub library and move operator new to mammoth. 2023-06-26 08:29:14 -07:00
Drew Galbraith a46694d0f7 [yellowstone] Add yellowstone server for endpoint registration. 2023-06-22 02:19:16 -07:00
Drew Galbraith f0e8ce14a4 [victoria] Create and start VictoriaFalls process 2023-06-22 00:22:59 -07:00
Drew Galbraith c064af5fa7 Endpoint syscalls implemented 2023-06-21 23:14:42 -07:00
Drew Galbraith 69501bfe01 [all] Add stub for new Endpoint kernel object 2023-06-21 21:43:27 -07:00
Drew Galbraith 1f7a15eed4 [mammoth] Return ErrorOr when creating a process 2023-06-21 20:58:08 -07:00
Drew Galbraith 3a3ab8717b [denali] Use glcr::ErrorOr as a POC. 2023-06-21 18:38:11 -07:00
Drew Galbraith 0b86a94f14 Migrate to error constants in glacier 2023-06-21 18:28:54 -07:00
Drew Galbraith bd431b94ce [zion] Move port calls to new syscall process. 2023-06-20 14:55:54 -07:00
Drew Galbraith 77bb3acfb4 [zion] Move channel syscalls to new format. 2023-06-20 14:41:44 -07:00
Drew Galbraith 36a83b142b [yellowstone] Use denali client to parse GPT 2023-06-19 22:58:00 -07:00
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 685070d65e Get rid of the type field on zmessage 2023-06-17 02:01:21 -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 09ac87e6f5 [yellowstone] Recieve all caps via init port. 2023-06-17 00:17:43 -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 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 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 ffa2d97a64 First iteration of denali server 2023-06-15 16:20:29 -07:00
Drew Galbraith b8b6576b7f Cleanup AHCI Ident a bit and reduce logging 2023-06-12 23:32:24 -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 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 30bb10207e Add the Denali disk driver.
Begin enumerating information from the PCI structure and HBA AHCI
structures.

Currently the PCI structure address is hardcoded but it should be
passed via a capability from the init process in the future.
2023-06-08 02:36:59 -07:00
Drew Galbraith 50201fe6df Updated PCIe walk to be recursive and dump the offset of the sata drive 2023-06-08 00:24:50 -07:00
Drew Galbraith 56789400d7 Allow mapping the PCI Config so Yellowstone can map it.
This is a temp system call. Evemtually we should probably supply the
root process with all of the system physical memory objects.
2023-06-07 22:45:42 -07:00
Drew Galbraith 7c9d1075eb Move sys/test to Yellowstone init process. 2023-06-07 11:18:35 -07:00
Drew Galbraith 6f81520918 Refactor compile flags 2023-06-07 11:09:27 -07:00
Drew Galbraith 010e261dc7 Add a libcxx with a new operator 2023-06-07 10:48:59 -07:00
Drew Galbraith dcc05f2741 Add a libc skeleton with a primitive malloc. 2023-06-07 10:33:10 -07:00
Drew Galbraith 40b21d9c75 [Mammoth] Add Channel object for simple IPC messages 2023-06-07 09:37:16 -07:00
Drew Galbraith 65439c163a Compile sys libraries without exceptions. 2023-06-07 09:36:14 -07:00
Drew Galbraith 81b925eea0 Add a basic IPC setup with Channel Object.
Pass a process a channel endpoint on startup that it will use to
get it's initial capabilities.
2023-06-07 08:24:10 -07:00
Drew Galbraith 6c10c57bfa Mass rename memory object variables.
Use shorthand:
AddressSpace -> vmas
MemoryObject -> vmmo

The VM prefix makes these a little more distinguishable in code.
2023-06-07 00:30:26 -07:00
Drew Galbraith e246f28d9c Get the second process elf from a MemoryObject instead of hardcoding.
Allows us to delete the CopyIntoNonResidentProcess function and simply
rely on the MemoryObject copy functions.
2023-06-07 00:19:15 -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 41d25a7b46 Reformat includes 2023-06-06 17:12:08 -07:00
Drew Galbraith 174d4b10fb Move threading calls into a basic user space library. 2023-06-06 16:56:19 -07:00
Drew Galbraith ef8eb5d993 Add a threading syscall API. 2023-06-06 16:24:03 -07:00
Drew Galbraith a092a57483 Begin defining the process/thread api 2023-06-06 15:01:31 -07:00
Drew Galbraith 69b5cd001f Add a skeleton framework for capabilities.
Use the first capability to spawn a child process.
2023-05-30 23:55:42 -07:00
Drew Galbraith 3c3341a90f Add a process spawn syscall and use it to start a proc.
Also add a skeleton VirtualMemory manager to be used per process.
2023-05-30 20:55:03 -07:00
Drew Galbraith 5bcf1f4e4a Add a second process to be loaded by the bootloader. 2023-05-30 20:54:37 -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