lkml.org 
[lkml]   [2013]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [regression, bisected] x86: efi: Pass boot services variable info to runtime code
On Wed, 29 May 2013, Russ Anderson wrote:

> > Yes, but this call is clearly happening way before ExitBootServices() --
> > see the surrounding code, see for example this in efi_main():
> >
> > [ ... snip ... ]
> > setup_efi_vars(boot_params);
> >
> > setup_efi_pci(boot_params);
> >
> > status = efi_call_phys3(sys_table->boottime->allocate_pool,
> > EFI_LOADER_DATA, sizeof(*gdt),
> > (void **)&gdt);
> > if (status != EFI_SUCCESS) {
> > efi_printk("Failed to alloc mem for gdt structure\n");
> > goto fail;
> > }
> > [ ... snip ... ]
>
> Yes. Note the failing call is sys_table->runtime while all the
> other calls are sys_table->boottime and seem to work. Not sure
> why the sys_table->runtime call has a problem but it may be
> a clue. Could something in the runtime path not be set up???

That was my original idea early today as well. My understanding of the
UEFI spec is admittedly limited, but afaics calling runtime method from
boot environment should be a valid thing to do ... ?

> > We are calling QueryVariableInfo() in setup_efi_vars(), and later on
> > AllocatePool is being called (through boot table).
>
> On my system the QueryVariableInfo() call fails, so AllocatePool()
> is not called in setup_efi_vars().

But it's being called later on coming back to efi_main(). That was just a
poor man's demonstration attempt why this code is running before
ExitBootServices() has been called.

--
Jiri Kosina
SUSE Labs


\
 
 \ /
  Last update: 2013-05-30 01:21    [W:0.093 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site