[Zion][Yellowstone] First pass at adding PCI ioport access.

This commit is contained in:
Drew Galbraith 2025-05-07 01:44:09 -07:00
parent f2c2cff98a
commit b677633248
16 changed files with 337 additions and 199 deletions

View file

@ -8,6 +8,7 @@
#include "debug/debug.h"
#include "include/zcall.h"
#include "memory/paging_util.h"
#include "object/pci_port.h"
#include "object/process.h"
#include "object/thread.h"
#include "scheduler/process_manager.h"
@ -187,7 +188,9 @@ void LoadInitProgram() {
WriteFramebufferVmmo(port);
if (WritePciVmmo(port, Z_BOOT_PCI_VMMO) != glcr::OK) {
panic("Failed to provide PCI info to init.");
dbgln("Failed to find PCIe space, creating PCI IO Port Cap");
auto pci_port = PciPort::Create();
port->WriteKernel(Z_BOOT_PCI_VMMO, MakeRefCounted<Capability>(pci_port));
}
// Start process.