Skip to content

Commit

Permalink
pcihost: Add machine check exception.
Browse files Browse the repository at this point in the history
A machine check exception happens when attempting to read from an unmapped I/O address.
  • Loading branch information
Wack0 authored and dingusdev committed Nov 29, 2024
1 parent 26aa452 commit 2bb35dc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion devices/common/pci/pcihost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
#include <loguru.hpp>

#include <cinttypes>
#include <cpu/ppc/ppcemu.h>

bool PCIHost::pci_register_device(int dev_fun_num, PCIBase* dev_instance)
{
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 2bb35dc

Please sign in to comment.