On 10/8/26 07:43, Bin Meng wrote:
Hi Heinrich,

On Thu, Oct 8, 2026 at 3:09 AM Heinrich Schuchardt
<[email protected]> wrote:

Currently we only support reset but not poweroff on x86 QEMU.

Could we just add the poweroff functionality to the existing sysreset driver?

Hello Bin,

On x86 the implementation of shutdonwl seems to be chipset specific. In EDK II in OvmfPackage alone there are 3 drivers implementing ResetShutdown().

On real hardware this is abstracted away via ACPI.

To have a generic driver we would have to implement parsing the ACPI tables.


The new driver is missing EFI efi_reset_system() implementation,
causing EFI reboot failure.

Maybe we should just keep the poweroff part and keep the preexisting sysreset driver on QEMU? Which would match the PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c driver in EDK II.

Best regards

Heinrich



* Provide a new sysreset driver for qemu-x86 and qemu-x86_64.
* Add nodes for it to the qemu-x86_i440fx and qemu-x86_q35 device-trees.
* Use the driver by default.

Heinrich Schuchardt (3):
   sysreset: provide sysreset driver for qemu-x86(_64)
   x86: add qemu power controller to device-trees
   x86: use x86 QEMU sysreset driver by default

  arch/Kconfig                         |   2 +-
  arch/x86/dts/qemu-x86_i440fx.dts     |   3 +
  arch/x86/dts/qemu-x86_q35.dts        |   4 +
  board/emulation/qemu-x86/Kconfig     |   3 +
  drivers/sysreset/Kconfig             |   8 ++
  drivers/sysreset/Makefile            |   1 +
  drivers/sysreset/sysreset_qemu_x86.c | 155 +++++++++++++++++++++++++++
  7 files changed, 175 insertions(+), 1 deletion(-)
  create mode 100644 drivers/sysreset/sysreset_qemu_x86.c


Regards,
Bin

Reply via email to