1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-06-17 22:57:35 +02:00

Acknowledge and log interrupt.

We should end it as well, but doing so results in a loop unless we first
clear the match.
This commit is contained in:
Andrew Walbran
2023-04-12 16:48:09 +01:00
parent 011fbb3f5c
commit e27755971a

View File

@ -12,7 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
use log::error;
use crate::gicv3::GicV3;
use log::{error, info, trace};
use psci::system_off;
#[no_mangle]
@ -23,8 +24,9 @@ extern "C" fn sync_exception_current(_elr: u64, _spsr: u64) {
#[no_mangle]
extern "C" fn irq_current(_elr: u64, _spsr: u64) {
error!("irq_current");
system_off().unwrap();
trace!("irq_current");
let intid = GicV3::get_and_acknowledge_interrupt().expect("No pending interrupt");
info!("IRQ {intid:?}");
}
#[no_mangle]