All of lore.kernel.org
 help / color / mirror / Atom feed
* uefi boot hang (bisected)
@ 2013-07-10  6:36 Dave Young
  2013-07-10 12:36 ` Matt Fleming
  0 siblings, 1 reply; 3+ messages in thread
From: Dave Young @ 2013-07-10  6:36 UTC (permalink / raw)
  To: lkml; +Cc: Matthew Garrett, matt.fleming

Hi,

latest linus tree kernel hangs on my Thinkpad T420.

I bisected this issue, culprit commit is below:

commit 1acba98f810a14b1255e34bc620594f83de37e36
Author: Matthew Garrett <matthew.garrett@nebula.com>
Date:   Sun Jun 2 18:12:25 2013 -0400

    UEFI: Don't pass boot services regions to SetVirtualAddressMap()

    We need to map boot services regions during startup in order to avoid
    firmware bugs, but we shouldn't be passing those regions to
    SetVirtualAddressMap(). Ensure that we're only passing regions that are
    marked as being mapped at runtime.

    Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
    Signed-off-by: Matt Fleming <matt.fleming@intel.com>


Reverting this patch, the kernel boot just fine.

Another problem is: With this patch applied I tried noefi boot, but
kernel paniced, looks like efivar_init depends on efi runtime. Below
patches works for me about noefi boot though I'm not sure if it's a
right fix, please review.

--- linux-2.6.orig/drivers/firmware/efi/vars.c
+++ linux-2.6/drivers/firmware/efi/vars.c
@@ -370,6 +370,8 @@ int efivar_init(int (*func)(efi_char16_t
 	efi_guid_t vendor_guid;
 	int err = 0;

+	if (! efi_enabled(EFI_RUNTIME_SERVICES))
+		return -ENODEV;
 	variable_name = kzalloc(variable_name_size, GFP_KERNEL);
 	if (!variable_name) {
 		printk(KERN_ERR "efivars: Memory allocation failed.\n");



-- 
Thanks
Dave


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: uefi boot hang (bisected)
  2013-07-10  6:36 uefi boot hang (bisected) Dave Young
@ 2013-07-10 12:36 ` Matt Fleming
  2013-07-11  1:57   ` Dave Young
  0 siblings, 1 reply; 3+ messages in thread
From: Matt Fleming @ 2013-07-10 12:36 UTC (permalink / raw)
  To: Dave Young; +Cc: lkml, Matthew Garrett

On 10/07/13 07:36, Dave Young wrote:
> Another problem is: With this patch applied I tried noefi boot, but
> kernel paniced, looks like efivar_init depends on efi runtime. Below
> patches works for me about noefi boot though I'm not sure if it's a
> right fix, please review.

It makes more sense to check in efivars.c, since none of that file can
function without runtime serivces.

Could you try the following patch?

---

diff --git a/drivers/firmware/efi/efivars.c b/drivers/firmware/efi/efivars.c
index 8bd1bb6..8a7432a 100644
--- a/drivers/firmware/efi/efivars.c
+++ b/drivers/firmware/efi/efivars.c
@@ -583,6 +583,9 @@ int efivars_sysfs_init(void)
 	struct kobject *parent_kobj = efivars_kobject();
 	int error = 0;
 
+	if (!efi_enabled(EFI_RUNTIME_SERVICES))
+		return -ENODEV;
+
 	/* No efivars has been registered yet */
 	if (!parent_kobj)
 		return 0;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: uefi boot hang (bisected)
  2013-07-10 12:36 ` Matt Fleming
@ 2013-07-11  1:57   ` Dave Young
  0 siblings, 0 replies; 3+ messages in thread
From: Dave Young @ 2013-07-11  1:57 UTC (permalink / raw)
  To: Matt Fleming; +Cc: lkml, Matthew Garrett

On 07/10/2013 08:36 PM, Matt Fleming wrote:
> On 10/07/13 07:36, Dave Young wrote:
>> Another problem is: With this patch applied I tried noefi boot, but
>> kernel paniced, looks like efivar_init depends on efi runtime. Below
>> patches works for me about noefi boot though I'm not sure if it's a
>> right fix, please review.
> 
> It makes more sense to check in efivars.c, since none of that file can
> function without runtime serivces.
> 
> Could you try the following patch?

It works, thanks for the patch.

Tested-by: Dave Young <dyoung@redhat.com>

> 
> ---
> 
> diff --git a/drivers/firmware/efi/efivars.c b/drivers/firmware/efi/efivars.c
> index 8bd1bb6..8a7432a 100644
> --- a/drivers/firmware/efi/efivars.c
> +++ b/drivers/firmware/efi/efivars.c
> @@ -583,6 +583,9 @@ int efivars_sysfs_init(void)
>  	struct kobject *parent_kobj = efivars_kobject();
>  	int error = 0;
>  
> +	if (!efi_enabled(EFI_RUNTIME_SERVICES))
> +		return -ENODEV;
> +
>  	/* No efivars has been registered yet */
>  	if (!parent_kobj)
>  		return 0;
> 


-- 
Thanks
Dave



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-07-11  1:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-10  6:36 uefi boot hang (bisected) Dave Young
2013-07-10 12:36 ` Matt Fleming
2013-07-11  1:57   ` Dave Young

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.