summaryrefslogtreecommitdiffstats
path: root/sys/geom
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2014-09-15 17:49:46 +0000
committeremaste <emaste@FreeBSD.org>2014-09-15 17:49:46 +0000
commit37dd226a2e5a8eb6fbf87a2ae6343413e4596b7e (patch)
tree6ec3d0a2e44e9d444b5d48068aa88b7d15d4a4e1 /sys/geom
parent11d930cebb6b8779359f2502378057ee9a3dc214 (diff)
downloadFreeBSD-src-37dd226a2e5a8eb6fbf87a2ae6343413e4596b7e.zip
FreeBSD-src-37dd226a2e5a8eb6fbf87a2ae6343413e4596b7e.tar.gz
MFC EFI support for the installer
r264978 (nwhitehorn): Add EFI support to the installer. This requires that the kernel provide a sysctl to determine what firmware is in use. This sysctl does not exist yet, so the following blocks are in front of the wheels: - I've provisionally called this "hw.platform" after the equivalent thing on PPC - The logic to check the sysctl is short-circuited to always choose BIOS. There's a comment in the top of the file about how to turn this off. If IA64 acquired a boot1.efifat-like thing (probably with very few modifications), the same code could be adapted there. r265016 (nwhitehorn): Finish connecting up installer UEFI support. If the kernel was booted using EFI, set up the disks for an EFI system. If booted from BIOS/CSM, set up for BIOS. r268256 (nwhitehorn): After EFI support was added to the installer, it needed to allow boot partitions of types other than "freebsd-boot" (in particular, "efi"). This allows the removal of some nasty hacks for supporting PowerPC systems, in particular aliasing freebsd-boot to apple-boot on APM and an IBM-specific code on MBR. This changes the installer to use the correct names, which also breaks a degeneracy in the meaning of "freebsd-boot" that allows the addition of support for some newer IBM systems that can boot from GPT in addition to MBR. Since I have no idea how to detect which those systems are, leave the default on IBM PPC systems as MBR for now. Approved by: re PR: 193658 Relnotes: Yes
Diffstat (limited to 'sys/geom')
-rw-r--r--sys/geom/part/g_part.c1
-rw-r--r--sys/geom/part/g_part.h1
-rw-r--r--sys/geom/part/g_part_apm.c5
-rw-r--r--sys/geom/part/g_part_gpt.c2
-rw-r--r--sys/geom/part/g_part_mbr.c2
5 files changed, 5 insertions, 6 deletions
diff --git a/sys/geom/part/g_part.c b/sys/geom/part/g_part.c
index 8429fa0..096a6f5 100644
--- a/sys/geom/part/g_part.c
+++ b/sys/geom/part/g_part.c
@@ -117,6 +117,7 @@ struct g_part_alias_list {
{ "dragonfly-legacy", G_PART_ALIAS_DFBSD_LEGACY },
{ "dragonfly-hammer", G_PART_ALIAS_DFBSD_HAMMER },
{ "dragonfly-hammer2", G_PART_ALIAS_DFBSD_HAMMER2 },
+ { "prep-boot", G_PART_ALIAS_PREP_BOOT },
};
SYSCTL_DECL(_kern_geom);
diff --git a/sys/geom/part/g_part.h b/sys/geom/part/g_part.h
index 06522f5..d2c2d23 100644
--- a/sys/geom/part/g_part.h
+++ b/sys/geom/part/g_part.h
@@ -84,6 +84,7 @@ enum g_part_alias {
G_PART_ALIAS_DFBSD_LEGACY, /* A DfBSD legacy partition entry */
G_PART_ALIAS_DFBSD_HAMMER, /* A DfBSD HAMMER FS partition entry */
G_PART_ALIAS_DFBSD_HAMMER2, /* A DfBSD HAMMER2 FS partition entry */
+ G_PART_ALIAS_PREP_BOOT, /* A PREP/CHRP boot partition entry. */
/* Keep the following last */
G_PART_ALIAS_COUNT
};
diff --git a/sys/geom/part/g_part_apm.c b/sys/geom/part/g_part_apm.c
index bb79e56..90357cf 100644
--- a/sys/geom/part/g_part_apm.c
+++ b/sys/geom/part/g_part_apm.c
@@ -149,11 +149,6 @@ apm_parse_type(const char *type, char *buf, size_t bufsz)
strcpy(buf, APM_ENT_TYPE_APPLE_UFS);
return (0);
}
- alias = g_part_alias_name(G_PART_ALIAS_FREEBSD_BOOT);
- if (!strcasecmp(type, alias)) {
- strcpy(buf, APM_ENT_TYPE_APPLE_BOOT);
- return (0);
- }
alias = g_part_alias_name(G_PART_ALIAS_FREEBSD);
if (!strcasecmp(type, alias)) {
strcpy(buf, APM_ENT_TYPE_FREEBSD);
diff --git a/sys/geom/part/g_part_gpt.c b/sys/geom/part/g_part_gpt.c
index 46841f4..1b375e3 100644
--- a/sys/geom/part/g_part_gpt.c
+++ b/sys/geom/part/g_part_gpt.c
@@ -190,6 +190,7 @@ static struct uuid gpt_uuid_dfbsd_hammer = GPT_ENT_TYPE_DRAGONFLY_HAMMER;
static struct uuid gpt_uuid_dfbsd_hammer2 = GPT_ENT_TYPE_DRAGONFLY_HAMMER2;
static struct uuid gpt_uuid_dfbsd_label32 = GPT_ENT_TYPE_DRAGONFLY_LABEL32;
static struct uuid gpt_uuid_dfbsd_label64 = GPT_ENT_TYPE_DRAGONFLY_LABEL64;
+static struct uuid gpt_uuid_prep_boot = GPT_ENT_TYPE_PREP_BOOT;
static struct g_part_uuid_alias {
struct uuid *uuid;
@@ -240,6 +241,7 @@ static struct g_part_uuid_alias {
{ &gpt_uuid_dfbsd_hammer2, G_PART_ALIAS_DFBSD_HAMMER2, 0 },
{ &gpt_uuid_dfbsd_label32, G_PART_ALIAS_DFBSD, 0xa5 },
{ &gpt_uuid_dfbsd_label64, G_PART_ALIAS_DFBSD64, 0xa5 },
+ { &gpt_uuid_prep_boot, G_PART_ALIAS_PREP_BOOT, 0x41 },
{ NULL, 0, 0 }
};
diff --git a/sys/geom/part/g_part_mbr.c b/sys/geom/part/g_part_mbr.c
index fe61c3e..8b32778 100644
--- a/sys/geom/part/g_part_mbr.c
+++ b/sys/geom/part/g_part_mbr.c
@@ -135,7 +135,7 @@ static struct g_part_mbr_alias {
{ DOSPTYP_LINUX, G_PART_ALIAS_LINUX_DATA },
{ DOSPTYP_LINLVM, G_PART_ALIAS_LINUX_LVM },
{ DOSPTYP_LINRAID, G_PART_ALIAS_LINUX_RAID },
- { DOSPTYP_PPCBOOT, G_PART_ALIAS_FREEBSD_BOOT },
+ { DOSPTYP_PPCBOOT, G_PART_ALIAS_PREP_BOOT },
{ DOSPTYP_VMFS, G_PART_ALIAS_VMFS },
{ DOSPTYP_VMKDIAG, G_PART_ALIAS_VMKDIAG },
};
OpenPOWER on IntegriCloud