qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PULL 04/21] acpi: ged: add control regs


From: Gerd Hoffmann
Subject: Re: [PULL 04/21] acpi: ged: add control regs
Date: Thu, 24 Jun 2021 11:42:24 +0200

  Hi,

> > +    switch (addr) {
> > +    case ACPI_GED_REG_SLEEP_CTL:
> > +        slp_typ = (data >> 2) & 0x07;
> > +        slp_en  = (data >> 5) & 0x01;
> > +        if (slp_en && slp_typ == 5) {
> > +            qemu_system_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN);
> > +        }
> > +        return;
> > +    case ACPI_GED_REG_SLEEP_STS:
> > +        return;
> > +    case ACPI_GED_REG_RESET:
> > +        if (data == ACPI_GED_RESET_VALUE) {
> > +            qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN);
> 
> Here we call qemu_system_reset_request(), but we pass it a cause
> value of GUEST_SHUTDOWN. Is this trying to do a reset (in which
> case it should probably be SHUTDOWN_CAUSE_GUEST_RESET) or a shutdown
> (in which case it needs to call qemu_system_shutdown_request()) ?

It is reset (shutdown is a few lines above and the cause was probably
just copy & pasted ...).

take care,
  Gerd




reply via email to

[Prev in Thread] Current Thread [Next in Thread]