From owner-svn-src-head@freebsd.org Wed Oct 25 15:30:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE7EDE4D6CB; Wed, 25 Oct 2017 15:30:21 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C0F971FA8; Wed, 25 Oct 2017 15:30:21 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v9PFUK8I018219; Wed, 25 Oct 2017 15:30:20 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v9PFUKoA018217; Wed, 25 Oct 2017 15:30:20 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201710251530.v9PFUKoA018217@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 25 Oct 2017 15:30:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r324983 - in head: lib/libc/sys sys/sys X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: lib/libc/sys sys/sys X-SVN-Commit-Revision: 324983 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Oct 2017 15:30:21 -0000 Author: imp Date: Wed Oct 25 15:30:20 2017 New Revision: 324983 URL: https://svnweb.freebsd.org/changeset/base/324983 Log: Define RB_POWERCYCLE RB_POWERCYCLE instructs the platform to power off and then power back on a short time later, if that's possible. Otherwise, degrade to the RB_POWEROFF behavior. Sponsored by: Netflix Modified: head/lib/libc/sys/reboot.2 head/sys/sys/reboot.h Modified: head/lib/libc/sys/reboot.2 ============================================================================== --- head/lib/libc/sys/reboot.2 Wed Oct 25 15:28:05 2017 (r324982) +++ head/lib/libc/sys/reboot.2 Wed Oct 25 15:30:20 2017 (r324983) @@ -28,7 +28,7 @@ .\" @(#)reboot.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd September 18, 2015 +.Dd October 24, 2017 .Dt REBOOT 2 .Os .Sh NAME @@ -84,6 +84,14 @@ for more information. .It Dv RB_HALT The processor is simply halted; no reboot takes place. This option should be used with caution. +.It Dv RB_POWERCYCLE +After halting, the shutdown code will do what it can to turn +off the power and then turn the power back on. +This requires hardware support, usually an auxiliary microprocessor +that can sequence the power supply. +At present only the +.Xr ipmi 4 +driver implements this feature. .It Dv RB_POWEROFF After halting, the shutdown code will do what it can to turn off the power. Modified: head/sys/sys/reboot.h ============================================================================== --- head/sys/sys/reboot.h Wed Oct 25 15:28:05 2017 (r324982) +++ head/sys/sys/reboot.h Wed Oct 25 15:30:20 2017 (r324983) @@ -60,6 +60,7 @@ #define RB_RESERVED2 0x80000 /* reserved for internal use of boot blocks */ #define RB_PAUSE 0x100000 /* pause after each output line during probe */ #define RB_REROOT 0x200000 /* unmount the rootfs and mount it again */ +#define RB_POWERCYCLE 0x400000 /* Power cycle if possible */ #define RB_MULTIPLE 0x20000000 /* use multiple consoles */ #define RB_BOOTINFO 0x80000000 /* have `struct bootinfo *' arg */