--- nono/vm/mpu.cpp 2026/04/29 17:04:32 1.1.1.2 +++ nono/vm/mpu.cpp 2026/04/29 17:04:42 1.1.1.4 @@ -1,6 +1,7 @@ // // nono -// Copyright (C) 2017 isaki@NetBSD.org +// Copyright (C) 2020 nono project +// Licensed under nono-license.txt // // MPU 共通部 @@ -14,9 +15,23 @@ MPUDevice::MPUDevice() { logname = "mpu"; devname = "MPU"; + + // リセット例外を起こすイベント + // ハンドラは MPU ごとに異なるので継承クラス側で用意している + reset_event.dev = this; + reset_event.time = 0; + reset_event.SetName("MPU Reset"); } // デストラクタ MPUDevice::~MPUDevice() { } + +// リセット +void +MPUDevice::ResetHard() +{ + // 0 サイクル後にリセット例外を起こす + reset_event.Start(); +}