Re: [PATCH 1/1] arch/x86: Add better error logging to efi main

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matt Fleming <matt@...> writes:
> 
> On Thu, 10 Jul, at 02:12:41AM, ulf@... wrote:
> >  <at>  <at>  -1376,7 +1376,10  <at>  <at>  struct boot_params *efi_main(struct efi_config *c,
> > 
> >     setup_graphics(boot_params);
> > 
> > -   setup_efi_pci(boot_params);
> > +   status = setup_efi_pci(boot_params);
> > +   if (status != EFI_SUCCESS) {
> > +           efi_printk(sys_table, "setup_efi_pci() failed!\n");
> > +   }
> 
> Actually, it turns out that a lot of people are seeing this error
> message in what would be an otherwise quiet boot,
> 
>   https://bugzilla.kernel.org/show_bug.cgi?id=81891
> 
> Maybe we should distinguish between EFI_PCI_IO_PROTOCOL_GUID not being
> found and all other errors, i.e. memory allocation failure. We obviously
> do want to know if we failed to allocate memory, but we're less bothered
> if we've no PCI devices.
> 
> Something like below? Folks on Cc, could you apply this snippet and see
> whether you're still seeing the error message?
> 

With a Thinkpad T420 (pre-2.0 EFI), I do run into the failure condition for another reason:

setup_efi_pci64 gets called,
the loop therein is executed nr_pci=11 (!?) times.
The second call run calls into __setup_efi_pci64 successfully, the memcpy takes place; the free_struct: path is not used. Back in setup_efi_pci64, the non-data path is walked.

For all the other 10 runs of the loop, __setup_efi_pci64 fails at
if (!pci->romimage || !pci->romsize)
        return EFI_INVALID_PARAMETER;
so that is the status here for any run but the second.

So here, I can work around the message by accepting the EFI_INVALID_PARAMETER condition. 
Also, I can work around that by adding break; to the end of the loop in setup_efi_pci64, as it only gets to the end in the successful case. But I guess other machines require to loop successfully through this more than once?

Regards,
Andre Müller
--
To unsubscribe from this list: send the line "unsubscribe linux-efi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux