View | Details | Raw Unified | Return to bug 254637
Collapse All | Expand All

(-)b/stand/efi/loader/main.c (-1 / +18 lines)
Lines 869-874 main(int argc, CHAR16 *argv[]) Link Here
869
	char boot_info[4096];
869
	char boot_info[4096];
870
	char buf[32];
870
	char buf[32];
871
	bool uefi_boot_mgr;
871
	bool uefi_boot_mgr;
872
	char geom_eli_passphrase[256];
873
	UINTN geom_eli_bufsz;
872
874
873
	archsw.arch_autoload = efi_autoload;
875
	archsw.arch_autoload = efi_autoload;
874
	archsw.arch_getdev = efi_getdev;
876
	archsw.arch_getdev = efi_getdev;
Lines 902-907 main(int argc, CHAR16 *argv[]) Link Here
902
	 */
904
	 */
903
	bcache_init(32768, 512);
905
	bcache_init(32768, 512);
904
906
907
	/*
908
	 * Read kern.geom.eli.passphrase from the EFI environment under the
909
	 * FreeBSD EFI GUID namespace (efi_freebsd_getenv).  Read before scanning
910
	 * block IO media so that it's available when probing.
911
	 */
912
	geom_eli_bufsz = sizeof(geom_eli_passphrase);
913
	bzero(geom_eli_passphrase, geom_eli_bufsz);
914
	rv = efi_freebsd_getenv("kern.geom.eli.passphrase", geom_eli_passphrase,
915
	    &geom_eli_bufsz);
916
	if (rv == EFI_SUCCESS) {
917
		printf("kern.geom.eli.phassphrase read from EFI env\n");
918
		env_setenv("kern.geom.eli.passphrase", EV_VOLATILE,
919
		    &geom_eli_passphrase, env_noset, env_nounset);
920
		bzero(geom_eli_passphrase, geom_eli_bufsz);
921
	}
922
905
	/*
923
	/*
906
	 * Scan the BLOCK IO MEDIA handles then
924
	 * Scan the BLOCK IO MEDIA handles then
907
	 * march through the device switch probing for things.
925
	 * march through the device switch probing for things.
908
- 

Return to bug 254637