[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

View file

@ -4,6 +4,7 @@
#include <zinit.h>
#include "mammoth/debug.h"
#include "mammoth/init.h"
namespace {
@ -16,7 +17,7 @@ extern "C" void thread_entry(Thread::Entry entry, void* arg1) {
} // namespace
Thread::Thread(Entry e, const void* arg1) {
check(ZThreadCreate(Z_INIT_PROC_SELF, &thread_cap_));
check(ZThreadCreate(gSelfProcCap, &thread_cap_));
check(ZThreadStart(thread_cap_, reinterpret_cast<uint64_t>(thread_entry),
reinterpret_cast<uint64_t>(e),
reinterpret_cast<uint64_t>(arg1)));