From nobody Wed Feb 09 17:40:36 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0D27B19BF60F; Wed, 9 Feb 2022 17:40:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Jv6bm5YRLz3kdD; Wed, 9 Feb 2022 17:40:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644428436; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j9qkoX7vkiBLWDvcrtdKHnhM/7jS1hP4m6mS++3//aY=; b=Fe7sF6NySvja39F0ON69VpIGpZzTLnJBLz/NE4Z2L8lP0h6Q2T9/IAx4pKWE0b7TyUgpD9 tsqajO07qbPDNtBNbjri7TcCY7UrE8DyUb17k8WZtBPXmPyKsfdGqSzAZlG0H4yBILvg7v 2AbcNQuWnGIIcplxkOr0/hLT7SSCimtNunQovE0/T9z5eBxwk2hrFmAASGY4Wln8u2EZD0 +DFiDKAkJC/i41r0hwgWeKZlYS6X1GvbosGEWJOKQd5PWRndbbp7RWOX8vz3ouihMHkVD3 MysbNhKJK098McFlOgnquwhY+qV12vE63nID+PKbVyZFeEY5zZtQpV1cYBN5ig== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 19B46113E4; Wed, 9 Feb 2022 17:40:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 219HeaPl041250; Wed, 9 Feb 2022 17:40:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 219HeaPX041249; Wed, 9 Feb 2022 17:40:36 GMT (envelope-from git) Date: Wed, 9 Feb 2022 17:40:36 GMT Message-Id: <202202091740.219HeaPX041249@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 23742427f3d3 - stable/13 - geom: Add HiFive boot partitions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 23742427f3d3d9b234ef017f3e950f094e1f1a48 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644428436; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j9qkoX7vkiBLWDvcrtdKHnhM/7jS1hP4m6mS++3//aY=; b=rzJJcpj27GBhaB3c3Eb+0hACEg66pUPBZCSvxfwBsUXby3fjzDCsuRPRB2X9umuBjg//0Z 5JsDdajDXipJa6zW55d8P8J7nZ8vpeu1EYk1xrqAwtJSMcWC1SVKo48M0TkBT7xh3Kx7ap moNonfHLxNosX/CcdViBF8RB7I77sf3KlxEuAKJhl9AeMEvOBJA4Ej/fjr0JkIhQnImP9+ UsW3ttaFGPW1BmWQaVYgrr3lrJVSBoftr32W6q5idFv58axOMI2gX3aicB2E85VS3eI3eE Nzbdocov9UP7fbb3nt15uHa3HhDepZwle4XPHI/7pKErGIDveVCgPVkDEJIXUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644428436; a=rsa-sha256; cv=none; b=K2VCjegHvZbmweQq2EjSyXVcbNnarcDiY9rN3WdWS03Mahy36VMwkLM7tZ6rNxJb68x3Xu /vaLnpqZB3wBN8afVABqUstO1XfKk3O8Djz4J1/QZUvLDR3VLslRYzH5Az9mWZFeAp65h3 an3VMYKL7thbSQ6dHFTxsRmchQLYZsXehfqGUXy+wDyenQ6KjOmD+3EHr220MKgnG9odRt GTifP+4i5B11Gcu6u3sxZpL69apt7mc8ERP9gcUpS+640H6eNhBJGjqbGVPZKADBNczOK8 eWZLTsWltJ81tlmT0Bsu3UAiTE/27jdeKpsE0/IeMdsngD4Vzw/ZWjXQQYhllQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=23742427f3d3d9b234ef017f3e950f094e1f1a48 commit 23742427f3d3d9b234ef017f3e950f094e1f1a48 Author: Ed Maste AuthorDate: 2021-10-12 18:51:24 +0000 Commit: Ed Maste CommitDate: 2022-02-09 17:39:50 +0000 geom: Add HiFive boot partitions As documented in the HiFive Unmatched Software Reference Manual. Reviewed by: imp, mhorne Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D34010 (cherry picked from commit 9c296a2105734c6928b4e4a9d75d6a17ff9b9bab) --- lib/geom/part/gpart.8 | 12 +++++++++++- sys/geom/part/g_part.c | 2 ++ sys/geom/part/g_part.h | 2 ++ sys/geom/part/g_part_gpt.c | 4 ++++ sys/sys/disk/gpt.h | 5 +++++ 5 files changed, 24 insertions(+), 1 deletion(-) diff --git a/lib/geom/part/gpart.8 b/lib/geom/part/gpart.8 index 4bad93bf1e13..ffb048e9abf5 100644 --- a/lib/geom/part/gpart.8 +++ b/lib/geom/part/gpart.8 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 17, 2020 +.Dd January 26, 2022 .Dt GPART 8 .Os .Sh NAME @@ -837,6 +837,16 @@ A partition that contains a FAT32 (LBA) filesystem. The scheme-specific type is .Qq Li "!12" for MBR. +.It Cm hifive-fsbl +A raw partition containing a HiFive first stage bootloader. +The scheme-specific type is +.Qq Li "!5b193300-fc78-40cd-8002-e86c45580b47" +for GPT. +.It Cm hifive-bbl +A raw partition containing a HiFive second stage bootloader. +The scheme-specific type is +.Qq Li "!2e54b353-1271-4842-806f-e436d6af6985" +for GPT. .It Cm linux-data A Linux partition that contains some filesystem with data. The scheme-specific types are diff --git a/sys/geom/part/g_part.c b/sys/geom/part/g_part.c index 57d45911c54d..a0981d89b042 100644 --- a/sys/geom/part/g_part.c +++ b/sys/geom/part/g_part.c @@ -103,6 +103,8 @@ struct g_part_alias_list { { "freebsd-ufs", G_PART_ALIAS_FREEBSD_UFS }, { "freebsd-vinum", G_PART_ALIAS_FREEBSD_VINUM }, { "freebsd-zfs", G_PART_ALIAS_FREEBSD_ZFS }, + { "hifive-fsbl", G_PART_ALIAS_HIFIVE_FSBL }, + { "hifive-bbl", G_PART_ALIAS_HIFIVE_BBL }, { "linux-data", G_PART_ALIAS_LINUX_DATA }, { "linux-lvm", G_PART_ALIAS_LINUX_LVM }, { "linux-raid", G_PART_ALIAS_LINUX_RAID }, diff --git a/sys/geom/part/g_part.h b/sys/geom/part/g_part.h index e9ac3052430c..c96cec264b87 100644 --- a/sys/geom/part/g_part.h +++ b/sys/geom/part/g_part.h @@ -72,6 +72,8 @@ enum g_part_alias { G_PART_ALIAS_FREEBSD_UFS, /* A UFS/UFS2 file system entry. */ G_PART_ALIAS_FREEBSD_VINUM, /* A Vinum partition entry. */ G_PART_ALIAS_FREEBSD_ZFS, /* A ZFS file system entry. */ + G_PART_ALIAS_HIFIVE_FSBL, /* HiFive First Stage Bootloader */ + G_PART_ALIAS_HIFIVE_BBL, /* HiFive Second Stage Bootloader */ G_PART_ALIAS_LINUX_DATA, /* A Linux data partition entry. */ G_PART_ALIAS_LINUX_LVM, /* A Linux LVM partition entry. */ G_PART_ALIAS_LINUX_RAID, /* A Linux RAID partition entry. */ diff --git a/sys/geom/part/g_part_gpt.c b/sys/geom/part/g_part_gpt.c index 89a92977dff6..26274c6ae43f 100644 --- a/sys/geom/part/g_part_gpt.c +++ b/sys/geom/part/g_part_gpt.c @@ -193,6 +193,8 @@ static struct uuid gpt_uuid_freebsd_swap = GPT_ENT_TYPE_FREEBSD_SWAP; static struct uuid gpt_uuid_freebsd_ufs = GPT_ENT_TYPE_FREEBSD_UFS; static struct uuid gpt_uuid_freebsd_vinum = GPT_ENT_TYPE_FREEBSD_VINUM; static struct uuid gpt_uuid_freebsd_zfs = GPT_ENT_TYPE_FREEBSD_ZFS; +static struct uuid gpt_uuid_hifive_fsbl = GPT_ENT_TYPE_HIFIVE_FSBL; +static struct uuid gpt_uuid_hifive_bbl = GPT_ENT_TYPE_HIFIVE_BBL; static struct uuid gpt_uuid_linux_data = GPT_ENT_TYPE_LINUX_DATA; static struct uuid gpt_uuid_linux_lvm = GPT_ENT_TYPE_LINUX_LVM; static struct uuid gpt_uuid_linux_raid = GPT_ENT_TYPE_LINUX_RAID; @@ -263,6 +265,8 @@ static struct g_part_uuid_alias { { &gpt_uuid_freebsd_ufs, G_PART_ALIAS_FREEBSD_UFS, 0 }, { &gpt_uuid_freebsd_vinum, G_PART_ALIAS_FREEBSD_VINUM, 0 }, { &gpt_uuid_freebsd_zfs, G_PART_ALIAS_FREEBSD_ZFS, 0 }, + { &gpt_uuid_hifive_fsbl, G_PART_ALIAS_HIFIVE_FSBL, 0 }, + { &gpt_uuid_hifive_bbl, G_PART_ALIAS_HIFIVE_BBL, 0 }, { &gpt_uuid_linux_data, G_PART_ALIAS_LINUX_DATA, 0x0b }, { &gpt_uuid_linux_lvm, G_PART_ALIAS_LINUX_LVM, 0 }, { &gpt_uuid_linux_raid, G_PART_ALIAS_LINUX_RAID, 0 }, diff --git a/sys/sys/disk/gpt.h b/sys/sys/disk/gpt.h index 3cb8d8e071e8..e4faef2c37fb 100644 --- a/sys/sys/disk/gpt.h +++ b/sys/sys/disk/gpt.h @@ -249,6 +249,11 @@ CTASSERT(sizeof(struct gpt_ent) == 128); #define GPT_ENT_TYPE_SOLARIS_RESERVED \ {0x6a945a3b,0x1dd2,0x11b2,0x99,0xa6,{0x08,0x00,0x20,0x73,0x66,0x31}} +#define GPT_ENT_TYPE_HIFIVE_FSBL \ + {0x5b193300,0xfc78,0x40cd,0x80,0x02,{0xe8,0x6c,0x45,0x58,0x0b,0x47}} +#define GPT_ENT_TYPE_HIFIVE_BBL \ + {0x2e54b353,0x1271,0x4842,0x80,0x6f,{0xe4,0x36,0xd6,0xaf,0x69,0x85}} + /* * Boot partition used by GRUB 2. */