FreeBSD Bugzilla – Attachment 202095 Details for
Bug 235806
[PATCH] loader.efi won't load from embedded memory disk
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
fix loader.efi embedded md loading
loader.efi.md.patch (text/plain), 1.29 KB, created by
Dave Rush
on 2019-02-17 14:24:50 UTC
(
hide
)
Description:
fix loader.efi embedded md loading
Filename:
MIME Type:
Creator:
Dave Rush
Created:
2019-02-17 14:24:50 UTC
Size:
1.29 KB
patch
obsolete
>diff --git a/stand/efi/loader/conf.c b/stand/efi/loader/conf.c >index cea95b3db104..b11999620cbb 100644 >--- a/stand/efi/loader/conf.c >+++ b/stand/efi/loader/conf.c >@@ -35,7 +35,14 @@ __FBSDID("$FreeBSD$"); > #include <libzfs.h> > #endif > >+#ifdef MD_IMAGE_SIZE >+extern struct devsw md_dev; >+#endif >+ > struct devsw *devsw[] = { >+#ifdef MD_IMAGE_SIZE >+ &md_dev, >+#endif > &efipart_fddev, > &efipart_cddev, > &efipart_hddev, >diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c >index 1aa5fb9e765c..cd909a7a2d79 100644 >--- a/stand/efi/loader/main.c >+++ b/stand/efi/loader/main.c >@@ -257,6 +257,22 @@ probe_zfs_currdev(uint64_t guid) > } > #endif > >+#ifdef MD_IMAGE_SIZE >+static bool >+probe_md_currdev() >+{ >+ /* defined in md.c */ >+ extern struct devsw md_dev; >+ >+ char *devname; >+ struct devdesc currdev; >+ currdev.d_dev = &md_dev; >+ currdev.d_unit = 0; >+ set_currdev_devdesc(&currdev); >+ return (sanity_check_currdev()); >+} >+#endif >+ > static bool > try_as_currdev(pdinfo_t *hd, pdinfo_t *pp) > { >@@ -508,6 +524,11 @@ find_currdev(EFI_LOADED_IMAGE *img, bool do_bootmgr, bool is_last, > } > #endif /* EFI_ZFS_BOOT */ > >+#ifdef MD_IMAGE_SIZE >+ if (probe_md_currdev()) >+ return (0); >+#endif >+ > /* > * Try to find the block device by its handle based on the > * image we're booting. If we can't find a sane partition,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 235806
: 202095