mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-10 19:14:58 -06:00
hw/misc: Add MPFS system reset support
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de> Acked-by: Alistair Francis <alistair.francis@wdc.com> Message-ID: <20250319061342.26435-2-sebastian.huber@embedded-brains.de> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
28c12c1f2f
commit
4c1a39eebc
1 changed files with 7 additions and 0 deletions
|
@ -27,7 +27,9 @@
|
||||||
#include "hw/irq.h"
|
#include "hw/irq.h"
|
||||||
#include "hw/sysbus.h"
|
#include "hw/sysbus.h"
|
||||||
#include "hw/misc/mchp_pfsoc_sysreg.h"
|
#include "hw/misc/mchp_pfsoc_sysreg.h"
|
||||||
|
#include "system/runstate.h"
|
||||||
|
|
||||||
|
#define MSS_RESET_CR 0x18
|
||||||
#define ENVM_CR 0xb8
|
#define ENVM_CR 0xb8
|
||||||
#define MESSAGE_INT 0x118c
|
#define MESSAGE_INT 0x118c
|
||||||
|
|
||||||
|
@ -56,6 +58,11 @@ static void mchp_pfsoc_sysreg_write(void *opaque, hwaddr offset,
|
||||||
{
|
{
|
||||||
MchpPfSoCSysregState *s = opaque;
|
MchpPfSoCSysregState *s = opaque;
|
||||||
switch (offset) {
|
switch (offset) {
|
||||||
|
case MSS_RESET_CR:
|
||||||
|
if (value == 0xdead) {
|
||||||
|
qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET);
|
||||||
|
}
|
||||||
|
break;
|
||||||
case MESSAGE_INT:
|
case MESSAGE_INT:
|
||||||
qemu_irq_lower(s->irq);
|
qemu_irq_lower(s->irq);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue