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
This commit is contained in:
Ed Maste 2021-10-12 14:51:24 -04:00
parent 3524dead81
commit 9c296a2105
5 changed files with 24 additions and 1 deletions

View file

@ -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

View file

@ -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 },

View file

@ -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. */

View file

@ -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 },

View file

@ -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.
*/