[denali] Get all caps from the init port.

This allows us to remove the bootstrap capabilities for good woo hoo!
This commit is contained in:
Drew Galbraith 2023-06-17 01:30:47 -07:00
parent 6e86ce67f0
commit 7dcbbd671e
11 changed files with 62 additions and 28 deletions

10
zion/include/zglobal.h Normal file
View file

@ -0,0 +1,10 @@
#pragma once
#include <stdint.h>
extern uint64_t gSelfProcCap;
extern uint64_t gSelfVmasCap;
extern uint64_t gInitChannelCap;
extern uint64_t gBootDenaliVmmoCap;

View file

@ -1,9 +1,8 @@
#pragma once
#define Z_INIT_PROC_SELF 0x00
#define Z_INIT_VMAS_SELF 0x01
#define Z_INIT_SELF_PROC 0x100
#define Z_INIT_SELF_VMAS 0x101
#define Z_INIT_CHANNEL 0x200
#define Z_BOOT_DENALI_VMMO 0x1000

View file

@ -21,13 +21,7 @@ RefPtr<Process> Process::RootProcess() {
return proc;
}
RefPtr<Process> Process::Create() {
auto proc = MakeRefCounted<Process>();
proc->AddNewCapabilityWithId(Z_INIT_PROC_SELF, proc,
ZC_PROC_SPAWN_PROC | ZC_PROC_SPAWN_THREAD);
proc->AddNewCapabilityWithId(Z_INIT_VMAS_SELF, proc->vmas(), ZC_WRITE);
return proc;
}
RefPtr<Process> Process::Create() { return MakeRefCounted<Process>(); }
Process::Process()
: id_(gNextId++), vmas_(MakeRefCounted<AddressSpace>()), state_(RUNNING) {}