浏览代码

[acpi] Allow time for ACPI power off to take effect

The ACPI power off sequence may not take effect immediately.  Delay
for one second, to eliminate potentially confusing log messages such
as "Could not power off: Error 0x43902001 (http://ipx".

Reported-by: Leonid Vasetsky <leonidv@velostrata.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 8 年前
父节点
当前提交
df85901768
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6
    0
      src/arch/x86/interface/pcbios/acpipwr.c

+ 6
- 0
src/arch/x86/interface/pcbios/acpipwr.c 查看文件

@@ -23,6 +23,7 @@
23 23
 
24 24
 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
25 25
 
26
+#include <unistd.h>
26 27
 #include <errno.h>
27 28
 #include <byteswap.h>
28 29
 #include <realmode.h>
@@ -111,6 +112,11 @@ int acpi_poweroff ( void ) {
111 112
 			 ACPI_PM1_CNT_SLP_EN ), pm1b_cnt );
112 113
 	}
113 114
 
115
+	/* On some systems, execution will continue briefly.  Delay to
116
+	 * avoid potentially confusing log messages.
117
+	 */
118
+	mdelay ( 1000 );
119
+
114 120
 	DBGC ( colour, "ACPI power off failed\n" );
115 121
 	return -EPROTO;
116 122
 }

正在加载...
取消
保存