From owner-svn-src-all@FreeBSD.ORG Fri Sep 24 19:31:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1895D10656A3; Fri, 24 Sep 2010 19:31:09 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 085FE8FC0C; Fri, 24 Sep 2010 19:31:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8OJV8nh037348; Fri, 24 Sep 2010 19:31:08 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8OJV8B4037346; Fri, 24 Sep 2010 19:31:08 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201009241931.o8OJV8B4037346@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Fri, 24 Sep 2010 19:31:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213133 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Sep 2010 19:31:09 -0000 Author: pjd Date: Fri Sep 24 19:31:08 2010 New Revision: 213133 URL: http://svn.freebsd.org/changeset/base/213133 Log: Add three GPT attributes: GPT_ENT_ATTR_BOOTME - this is bootable partition GPT_ENT_ATTR_BOOTONCE - try to boot only once from this partition GPT_ENT_ATTR_BOOTFAILED - set this flag if we cannot boot from partition containing GPT_ENT_ATTR_BOOTONCE flag; note that if we cannot boot from partition that contains only GPT_ENT_ATTR_BOOTME flag, the GPT_ENT_ATTR_BOOTFAILED flag won't be set According to wikipedia Microsoft TechNet says that attributes are divided into two halves: the lower 4 bytes representing partition independent attributes, and the upper 4 bytes are partition type dependent. Microsoft is already using bits 60 (read-only), 62 (hidden) and 63 (do not automount) and I'd like to not collide with those, so we are using bit 59 (bootme), 58 (bootonce) and 57 (bootfailed). Reviewed by: arch (Message-ID: <20100917234542.GE1902@garage.freebsd.pl>) MFC after: 2 weeks Modified: head/sys/sys/gpt.h Modified: head/sys/sys/gpt.h ============================================================================== --- head/sys/sys/gpt.h Fri Sep 24 19:30:34 2010 (r213132) +++ head/sys/sys/gpt.h Fri Sep 24 19:31:08 2010 (r213133) @@ -65,6 +65,9 @@ struct gpt_ent { uint64_t ent_lba_end; uint64_t ent_attr; #define GPT_ENT_ATTR_PLATFORM (1ULL << 0) +#define GPT_ENT_ATTR_BOOTME (1ULL << 59) +#define GPT_ENT_ATTR_BOOTONCE (1ULL << 58) +#define GPT_ENT_ATTR_BOOTFAILED (1ULL << 57) uint16_t ent_name[36]; /* UTF-16. */ };