Handle PLIC Interrupt in gem5

Thanks @odxa20 As @dconn suggests, there is a freedom-metal example at plic-interrupts.c

A nice general discussion is in the SiFive Interrupt Cookbook though when it comes to PLIC the discussion is a bit abstract.

I like to think about RISC-V interrupt procedural handling flow with the following picture. Peripherals shown are for the FE310 SoC but the diagram is general for all types of core.

You might also find these forum conversations helpful:
What is PLIC interrupt source start and end in interrupt source mapping? and Use of external interrupt in vectored mode.