From 2bb35dc6136ab2c890eb2c27f130839248fb708a Mon Sep 17 00:00:00 2001 From: Rairii <2650838+Wack0@users.noreply.github.com> Date: Fri, 23 Aug 2024 01:31:35 -0700 Subject: [PATCH] pcihost: Add machine check exception. A machine check exception happens when attempting to read from an unmapped I/O address. --- devices/common/pci/pcihost.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/devices/common/pci/pcihost.cpp b/devices/common/pci/pcihost.cpp index 6df4b8f..2a47520 100644 --- a/devices/common/pci/pcihost.cpp +++ b/devices/common/pci/pcihost.cpp @@ -30,6 +30,7 @@ along with this program. If not, see . #include #include +#include bool PCIHost::pci_register_device(int dev_fun_num, PCIBase* dev_instance) { @@ -227,7 +228,8 @@ uint32_t PCIHost::pci_io_read_broadcast(uint32_t offset, int size) hwc ? hwc->get_name().c_str() : "PCIHost", offset, SIZE_ARG(size) ); - // FIXME: add machine check exception (DEFAULT CATCH!, code=FFF00200) + // machine check exception (DEFAULT CATCH!, code=FFF00200) + ppc_exception_handler(Except_Type::EXC_MACHINE_CHECK, 0); return 0; }