]> xenbits.xensource.com Git - people/royger/freebsd.git/commitdiff
Permit loading of efirt module even when there's no EFI to call. The
authorimp <imp@FreeBSD.org>
Fri, 9 Dec 2016 23:37:11 +0000 (23:37 +0000)
committerimp <imp@FreeBSD.org>
Fri, 9 Dec 2016 23:37:11 +0000 (23:37 +0000)
module loading is successful, but attempts to use it will not be
successful. This is similar to what we do (did?) with ACPI on non-ACPI
systems. We succeed if we can't find the necessary information to hook
into EFI, but still fail if we're unable to allocate resources if we
do find EFI.

Not Objected to by: kib@
MFC Afer: 3 days

sys/amd64/amd64/efirt.c

index 4540625d2d7476c01f2da689ceab4c2407f00542..db40cdf8f813c71215981d36c965a9322c880ce5 100644 (file)
@@ -355,14 +355,14 @@ efi_init(void)
        if (efi_systbl_phys == 0) {
                if (bootverbose)
                        printf("EFI systbl not available\n");
-               return (ENXIO);
+               return (0);
        }
        efi_systbl = (struct efi_systbl *)PHYS_TO_DMAP(efi_systbl_phys);
        if (efi_systbl->st_hdr.th_sig != EFI_SYSTBL_SIG) {
                efi_systbl = NULL;
                if (bootverbose)
                        printf("EFI systbl signature invalid\n");
-               return (ENXIO);
+               return (0);
        }
        efi_cfgtbl = (efi_systbl->st_cfgtbl == 0) ? NULL :
            (struct efi_cfgtbl *)efi_systbl->st_cfgtbl;
@@ -379,7 +379,7 @@ efi_init(void)
        if (efihdr == NULL) {
                if (bootverbose)
                        printf("EFI map is not present\n");
-               return (ENXIO);
+               return (0);
        }
        efisz = (sizeof(struct efi_map_header) + 0xf) & ~0xf;
        map = (struct efi_md *)((uint8_t *)efihdr + efisz);