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.
This commit is contained in:
parent
b79ec07636
commit
81b925eea0
15 changed files with 341 additions and 20 deletions
|
|
@ -32,13 +32,21 @@
|
|||
|
||||
#define Z_INIT_BOOT_VMMO 0x31
|
||||
|
||||
// IPC Calls
|
||||
#define Z_CHANNEL_CREATE 0x40
|
||||
#define Z_CHANNEL_SEND 0x41
|
||||
#define Z_CHANNEL_RECV 0x42
|
||||
#define Z_CHANNEL_SENDRECV 0x43
|
||||
|
||||
// Debugging Calls.
|
||||
#define Z_DEBUG_PRINT 0x10000000
|
||||
|
||||
void ZProcessExit(uint64_t code);
|
||||
|
||||
[[nodiscard]] uint64_t ZProcessSpawn(uint64_t proc_cap, uint64_t* new_proc_cap,
|
||||
uint64_t* new_vmas_cap);
|
||||
[[nodiscard]] uint64_t ZProcessSpawn(uint64_t proc_cap, uint64_t bootstrap_cap,
|
||||
uint64_t* new_proc_cap,
|
||||
uint64_t* new_vmas_cap,
|
||||
uint64_t* new_bootstrap_cap);
|
||||
|
||||
// UNUSED for now, I think we can get away with just starting a thread.
|
||||
[[nodiscard]] uint64_t ZProcessStart(uint64_t proc_cap, uint64_t thread_cap,
|
||||
|
|
@ -56,4 +64,14 @@ void ZThreadExit();
|
|||
uint64_t vmmo_cap, uint64_t* vaddr);
|
||||
[[nodiscard]] uint64_t ZMemoryObjectCreate(uint64_t size, uint64_t* vmmo_cap);
|
||||
|
||||
[[nodiscard]] uint64_t ZChannelCreate(uint64_t* channel1, uint64_t* channel2);
|
||||
[[nodiscard]] uint64_t ZChannelSend(uint64_t chan_cap, uint64_t type,
|
||||
uint64_t num_bytes, const uint8_t* bytes,
|
||||
uint64_t num_caps, const uint64_t* caps);
|
||||
[[nodiscard]] uint64_t ZChannelRecv(uint64_t chan_cap, uint64_t num_bytes,
|
||||
uint8_t* bytes, uint64_t num_caps,
|
||||
uint64_t* caps, uint64_t* type,
|
||||
uint64_t* actual_bytes,
|
||||
uint64_t* actual_caps);
|
||||
|
||||
[[nodiscard]] uint64_t ZDebug(const char* message);
|
||||
|
|
|
|||
|
|
@ -5,3 +5,4 @@
|
|||
#define ZE_INVALID 0x2
|
||||
#define ZE_DENIED 0x4
|
||||
#define ZE_UNIMPLEMENTED 0x8
|
||||
#define ZE_BUFF_SIZE 0x10
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue