diff options
author | Dan McDonald <danmcd@joyent.com> | 2021-07-07 10:12:37 -0400 |
---|---|---|
committer | Dan McDonald <danmcd@joyent.com> | 2021-07-07 10:12:41 -0400 |
commit | d18a74b88693eb1597200dd2e5abe0727bc11ad9 (patch) | |
tree | 548750903500994239f19cd50b3cb7869c08bef4 /usr/src/grub | |
parent | 4b6776536738b147f6c57dadedcfcfc0ac0a3a9b (diff) | |
parent | ffc946bc87951cc850a82348f705c4081080f818 (diff) | |
download | illumos-joyent-d18a74b88693eb1597200dd2e5abe0727bc11ad9.tar.gz |
[illumos-gate merge]
commit ffc946bc87951cc850a82348f705c4081080f818
13900 Update Intel microcode to 20210608
commit afcdc73a9924f4ee06d1c0e75823ab1db7d742c3
13901 Incorrect calculation of Intel microcode extended patch signature checksum
commit b3d11974d0ef0679e47da102fafb125bb1d94470
13929 SMB encryption does not work with macOS 11.4
commit 74e12c43fe52f2c30f36e65a4d0fb0e8dfd7068a
3163 nss: need local netgroup implementation
commit 1a065e93eee983124652c3eb0cfdcb4776cd89ab
12782 GRUB should pass pool and vdev GUIDs in $ZFS-BOOTFS
commit 3a18338393f3485e50eae6288b6a9ab89e9f715a
13890 Some manual pages miss spaces next to formatting
commit 88e8a81ba29ce242b8e7eade29af1f3d301ac525
13889 ctfdump -c should sort output stably
commit 7781236b33d51a2eb1e29bf336bdba8ddfcfff6e
13884 dis(1) should pick stable names for symbols
commit 1e9e241fbdc7ae75a7b37c1e7afc8c96d2f43e1e
13905 zfs holds is quadratic
commit 6b641d7a35808436d7283b7057a01791e2e2a4e2
13861 bhyve apicv logic could take more care
Conflicts:
exception_lists/copyright
exception_lists/keywords
exception_lists/wscheck
manifest
Diffstat (limited to 'usr/src/grub')
-rw-r--r-- | usr/src/grub/capability | 3 | ||||
-rw-r--r-- | usr/src/grub/grub-0.97/stage2/builtins.c | 3 | ||||
-rw-r--r-- | usr/src/grub/grub-0.97/stage2/disk_io.c | 3 | ||||
-rw-r--r-- | usr/src/grub/grub-0.97/stage2/expand.c | 18 | ||||
-rw-r--r-- | usr/src/grub/grub-0.97/stage2/fsys_zfs.c | 19 | ||||
-rw-r--r-- | usr/src/grub/grub-0.97/stage2/shared.h | 3 |
6 files changed, 40 insertions, 9 deletions
diff --git a/usr/src/grub/capability b/usr/src/grub/capability index dd7c6018df..69b12a3b4e 100644 --- a/usr/src/grub/capability +++ b/usr/src/grub/capability @@ -22,6 +22,7 @@ # Copyright (c) 2013, 2015 by Delphix. All rights reserved. # Copyright 2013 Saso Kiselkov. All rights reserved. # Copyright 2016 Nexenta Systems, Inc. +# Copyright 2021 RackTop Systems, Inc. # # This file defines the current capabilities of GRUB over and above that # supported by the standard distribution @@ -31,7 +32,7 @@ # GRUB necessitating that the boot blocks be reinstalled for that fix or # enhancement to take effect. # -VERSION=28 +VERSION=29 dboot xVM zfs diff --git a/usr/src/grub/grub-0.97/stage2/builtins.c b/usr/src/grub/grub-0.97/stage2/builtins.c index 1c5d15ef2b..dfa2cb058e 100644 --- a/usr/src/grub/grub-0.97/stage2/builtins.c +++ b/usr/src/grub/grub-0.97/stage2/builtins.c @@ -2,6 +2,7 @@ /* * GRUB -- GRand Unified Bootloader * Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc. + * Copyright 2021 RackTop Systems, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -121,6 +122,8 @@ init_config (void) current_bootpath[0] = '\0'; current_bootfs_obj = 0; current_devid[0] = '\0'; + current_bootguid = 0; + current_bootvdev = 0; is_zfs_mount = 0; } diff --git a/usr/src/grub/grub-0.97/stage2/disk_io.c b/usr/src/grub/grub-0.97/stage2/disk_io.c index 1b07c23f7c..0b5bbf5f0e 100644 --- a/usr/src/grub/grub-0.97/stage2/disk_io.c +++ b/usr/src/grub/grub-0.97/stage2/disk_io.c @@ -2,6 +2,7 @@ /* * GRUB -- GRand Unified Bootloader * Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc. + * Copyright 2021 RackTop Systems, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -130,6 +131,8 @@ char current_bootfs[MAXNAMELEN]; uint64_t current_bootfs_obj; char current_bootpath[MAXPATHLEN]; char current_devid[MAXPATHLEN]; +uint64_t current_bootguid; +uint64_t current_bootvdev; int is_zfs_mount; unsigned long best_drive; unsigned long best_part; diff --git a/usr/src/grub/grub-0.97/stage2/expand.c b/usr/src/grub/grub-0.97/stage2/expand.c index ead71c6e6b..912ef78a16 100644 --- a/usr/src/grub/grub-0.97/stage2/expand.c +++ b/usr/src/grub/grub-0.97/stage2/expand.c @@ -2,6 +2,7 @@ * GRUB -- GRand Unified Bootloader * Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc. * Copyright (c) 2013 Joyent, Inc. All rights reserved. + * Copyright 2021 RackTop Systems, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -388,6 +389,15 @@ expand_string(const char *s, char *d, unsigned int len) if (current_devid[0] != '\0') vlen += 13 + strlen(current_devid); + if (current_bootguid != 0) { + vlen += grub_sprintf(NULL, + ",zfs-bootpool=\"%llu\"", current_bootguid); + } + if (current_bootvdev != 0) { + vlen += grub_sprintf(NULL, + ",zfs-bootvdev=\"%llu\"", current_bootvdev); + } + if (q + vlen >= d + len) return (ERR_WONT_FIT); @@ -406,6 +416,14 @@ expand_string(const char *s, char *d, unsigned int len) q += grub_sprintf(q, ",diskdevid=\"%s\"", current_devid); } + if (current_bootguid != 0) { + q += grub_sprintf(q, ",zfs-bootpool=\"%llu\"", + current_bootguid); + } + if (current_bootvdev != 0) { + q += grub_sprintf(q, ",zfs-bootvdev=\"%llu\"", + current_bootvdev); + } p += 11; /* $ZFS-BOOTFS */ continue; diff --git a/usr/src/grub/grub-0.97/stage2/fsys_zfs.c b/usr/src/grub/grub-0.97/stage2/fsys_zfs.c index ead5947ab5..ef51e0b4bd 100644 --- a/usr/src/grub/grub-0.97/stage2/fsys_zfs.c +++ b/usr/src/grub/grub-0.97/stage2/fsys_zfs.c @@ -1,6 +1,7 @@ /* * GRUB -- GRand Unified Bootloader * Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc. + * Copyright 2021 RackTop Systems, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -1525,13 +1526,13 @@ vdev_get_bootpath(char *nv, uint64_t inguid, char *devid, char *bootpath, * ERR_* - failure */ static int -check_pool_label(uint64_t sector, char *stack, char *outdevid, - char *outpath, uint64_t *outguid, uint64_t *outashift, uint64_t *outversion) +check_pool_label(uint64_t sector, char *stack, char *outdevid, char *outpath, + uint64_t *outguid, uint64_t *outdiskguid, uint64_t *outashift, + uint64_t *outversion) { vdev_phys_t *vdev; uint64_t pool_state, txg = 0; char *nvlist, *nv, *features; - uint64_t diskguid; sector += (VDEV_SKIP_SIZE >> SPA_MINBLOCKSHIFT); @@ -1572,13 +1573,13 @@ check_pool_label(uint64_t sector, char *stack, char *outdevid, if (nvlist_lookup_value(nvlist, ZPOOL_CONFIG_VDEV_TREE, &nv, DATA_TYPE_NVLIST, NULL)) return (ERR_FSYS_CORRUPT); - if (nvlist_lookup_value(nvlist, ZPOOL_CONFIG_GUID, &diskguid, + if (nvlist_lookup_value(nvlist, ZPOOL_CONFIG_GUID, outdiskguid, DATA_TYPE_UINT64, NULL)) return (ERR_FSYS_CORRUPT); if (nvlist_lookup_value(nv, ZPOOL_CONFIG_ASHIFT, outashift, DATA_TYPE_UINT64, NULL) != 0) return (ERR_FSYS_CORRUPT); - if (vdev_get_bootpath(nv, diskguid, outdevid, outpath, 0)) + if (vdev_get_bootpath(nv, *outdiskguid, outdevid, outpath, 0)) return (ERR_NO_BOOTPATH); if (nvlist_lookup_value(nvlist, ZPOOL_CONFIG_POOL_GUID, outguid, DATA_TYPE_UINT64, NULL)) @@ -1627,7 +1628,7 @@ zfs_mount(void) objset_phys_t *osp; char tmp_bootpath[MAXNAMELEN]; char tmp_devid[MAXNAMELEN]; - uint64_t tmp_guid, ashift, version; + uint64_t tmp_guid, tmp_vdev, ashift, version; uint64_t adjpl = (uint64_t)part_length << SPA_MINBLOCKSHIFT; int err = errnum; /* preserve previous errnum state */ @@ -1669,8 +1670,8 @@ zfs_mount(void) 0, VDEV_UBERBLOCK_RING, ub_array) == 0) continue; - if (check_pool_label(sector, stack, tmp_devid, - tmp_bootpath, &tmp_guid, &ashift, &version)) + if (check_pool_label(sector, stack, tmp_devid, tmp_bootpath, + &tmp_guid, &tmp_vdev, &ashift, &version)) continue; if (pool_guid == 0) @@ -1695,6 +1696,8 @@ zfs_mount(void) grub_memmove(¤t_uberblock, ubbest, sizeof (uberblock_t)); grub_memmove(current_bootpath, tmp_bootpath, MAXNAMELEN); grub_memmove(current_devid, tmp_devid, grub_strlen(tmp_devid)); + current_bootguid = tmp_guid; + current_bootvdev = tmp_vdev; is_zfs_mount = 1; return (1); } diff --git a/usr/src/grub/grub-0.97/stage2/shared.h b/usr/src/grub/grub-0.97/stage2/shared.h index 050e6335fe..74e74255c1 100644 --- a/usr/src/grub/grub-0.97/stage2/shared.h +++ b/usr/src/grub/grub-0.97/stage2/shared.h @@ -2,6 +2,7 @@ /* * GRUB -- GRand Unified Bootloader * Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc. + * Copyright 2021 RackTop Systems, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -682,6 +683,8 @@ extern char current_bootfs[MAXNAMELEN]; extern unsigned long long current_bootfs_obj; extern char current_bootpath[MAXPATHLEN]; extern char current_devid[MAXPATHLEN]; +extern unsigned long long current_bootguid; +extern unsigned long long current_bootvdev; extern int is_zfs_mount; extern unsigned long best_drive; extern unsigned long best_part; |