[yellowstone] Recieve all caps via init port.

This commit is contained in:
Drew Galbraith 2023-06-17 00:17:43 -07:00
parent 2ea1f90690
commit 09ac87e6f5
6 changed files with 18 additions and 8 deletions

View file

@ -1,6 +1,7 @@
#include "hw/pcie.h"
#include <mammoth/debug.h>
#include <mammoth/init.h>
#include <zcall.h>
#include <zinit.h>
@ -92,7 +93,7 @@ void DumpPciEDevices() {
dbgln("Creating addr space");
uint64_t vaddr;
check(ZAddressSpaceMap(Z_INIT_VMAS_SELF, 0, vmmo_cap, &vaddr));
check(ZAddressSpaceMap(gSelfVmasCap, 0, vmmo_cap, &vaddr));
dbgln("Addr %lx", vaddr);
dbgln("Dumping PCI");

View file

@ -13,7 +13,7 @@ uint64_t main(uint64_t port_cap) {
check(ParseInitPort(port_cap));
uint64_t vaddr;
check(ZAddressSpaceMap(Z_INIT_VMAS_SELF, 0, gBootDenaliVmmoCap, &vaddr));
check(ZAddressSpaceMap(gSelfVmasCap, 0, gBootDenaliVmmoCap, &vaddr));
Channel local;
check(SpawnProcessFromElfRegion(vaddr, local));
@ -35,7 +35,7 @@ uint64_t main(uint64_t port_cap) {
dbgln("Resp: %u", type);
check(ZAddressSpaceMap(Z_INIT_VMAS_SELF, 0, mem_cap, &vaddr));
check(ZAddressSpaceMap(gSelfVmasCap, 0, mem_cap, &vaddr));
uint32_t* mbr = reinterpret_cast<uint32_t*>(vaddr + 0x1FE);
dbgln("MBR: %x", *mbr);