Re: [PATCH] efi/arm64: store Runtime Services revision

2014-08-14 Thread Ard Biesheuvel
On 14 August 2014 16:55, Semen Protsenko wrote: > "efi" global data structure contains "runtime_version" field which must > be assigned in order to use it later in Runtime Services virtual calls > (virt_efi_* functions). > > Before this patch "runtime_version" was unassigned (0), so each > Runtime

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

2014-08-14 Thread Ulf Winkelvos
> On August 13, 2014 at 7:56 PM Matt Fleming wrote: > > > On Thu, 10 Jul, at 02:12:41AM, u...@winkelvos.de wrote: > > @@ -1376,7 +1376,10 @@ struct boot_params *efi_main(struct efi_config *c, > > > > setup_graphics(boot_params); > > > > - setup_efi_pci(boot_params); > > + status = setu

[PATCH] efi/arm64: store Runtime Services revision

2014-08-14 Thread Semen Protsenko
"efi" global data structure contains "runtime_version" field which must be assigned in order to use it later in Runtime Services virtual calls (virt_efi_* functions). Before this patch "runtime_version" was unassigned (0), so each Runtime Service virtual call that checks revision would fail. Runt

Re: [PATCH 4/7] arm64/efi: uefi_init error handling fix

2014-08-14 Thread Mark Salter
On Thu, 2014-08-14 at 17:15 +0800, Dave Young wrote: > There's one early memmap leak in uefi_init error path, fix it and slightly > tune > the error handling code. > > Signed-off-by: Dave Young > --- > arch/arm64/kernel/efi.c | 7 --- > 1 file changed, 4 insertions(+), 3 deletions(-) Acked

Re: [PATCH v2 3/3] arm64/efi: efistub: don't abort if base of DRAM is occupied

2014-08-14 Thread Mark Rutland
On Wed, Jul 30, 2014 at 11:59:04AM +0100, Ard Biesheuvel wrote: > If we cannot relocate the kernel Image to its preferred offset of base of DRAM > plus TEXT_OFFSET, instead relocate it to the lowest available 2 MB boundary > plus > TEXT_OFFSET. We may lose a bit of memory at the low end, but we ca

Re: [PATCH v2 2/3] arm64/efi: efistub: cover entire static mem footprint in PE/COFF .text

2014-08-14 Thread Mark Rutland
On Wed, Jul 30, 2014 at 11:59:03AM +0100, Ard Biesheuvel wrote: > The static memory footprint of a kernel Image at boot is larger than the > Image file itself. Things like .bss data and initial page tables are allocated > statically but populated dynamically so their content is not contained in the

Re: [PATCH 1/7] efi: move noefi early param code out of x86 arch code

2014-08-14 Thread Dave Young
Hi, I addressed several comments from Matt, Randy and Will in this post. Also rewrote the patch for efi=noruntime with using a generic param handling function. CCed Xen and SGI people, removed rtc list in cc for [1-6]/7 patches Thanks Dave -- To unsubscribe from this list: send the line "unsubs

[PATCH 7/7] efi_rtc: probe function error out in case no efi runtime enabled

2014-08-14 Thread Dave Young
efi rtc depends on efi runtime services, so if efi runtime services are not usable it should error out. Without this patch rtc-efi will panic with 'noefi' boot Signed-off-by: Dave Young --- drivers/rtc/rtc-efi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/rtc/rtc-efi.c b/driv

[PATCH 6/7] x86/efi: clear EFI_RUNTIME_SERVICES bit in case failures while entering virtual mode

2014-08-14 Thread Dave Young
If enter virtual mode failed due to some reason other than the efi call the EFI_RUNTIME_SERVICES bit in efi.flags should be cleared thus users of efi runtime services can check the bit and handle the case instead of assume efi runtime is ok. Per Matt, if efi call SetVirtualAddressMap fails we will

[PATCH 3/7] efi: add kernel param efi=noruntime

2014-08-14 Thread Dave Young
noefi kernel param means actually disabling efi runtime, Per suggestion from Leif Lindholm efi=noruntime should be better. But since noefi is already used in X86 thus just adding another param efi=noruntime for same purpose. Signed-off-by: Dave Young --- Documentation/kernel-parameters.txt | 3 +

[PATCH 4/7] arm64/efi: uefi_init error handling fix

2014-08-14 Thread Dave Young
There's one early memmap leak in uefi_init error path, fix it and slightly tune the error handling code. Signed-off-by: Dave Young --- arch/arm64/kernel/efi.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/arm64/kernel/efi.c b/arch/arm64/kernel/efi.c index e72f31

[PATCH 1/7] efi: move noefi early param code out of x86 arch code

2014-08-14 Thread Dave Young
noefi param can be used for arches other than X86 later, thus move it out of x86 platform code. Signed-off-by: Dave Young --- Documentation/kernel-parameters.txt | 2 +- arch/x86/platform/efi/efi.c | 10 +- drivers/firmware/efi/efi.c | 13 + include/linux/ef

[PATCH 5/7] arm64/efi: do not enter virtual mode in case booting with efi=noruntime or noefi

2014-08-14 Thread Dave Young
In case efi runtime disabled via noefi kernel cmdline arm64_enter_virtual_mode should error out. At the same time move early_memunmap(memmap.map, mapsize) to the beginning of the function or it will leak early mem. Signed-off-by: Dave Young --- arch/arm64/kernel/efi.c | 9 +++-- 1 file chan

[PATCH 2/7] Add a generic cmdline parse function parse_option_str

2014-08-14 Thread Dave Young
There should be a generic function to parse params like a=b,c Adding parse_option_str in lib/cmdline.c which will return true if there's specified option set in the params. Also updated efi=old_map parsing code to use the new function Signed-off-by: Dave Young --- arch/x86/platform/efi/efi.c |

Re: [PATCH v2] firmware: Do not use WARN_ON(!spin_is_locked())

2014-08-14 Thread Matt Fleming
On Wed, 13 Aug, at 11:21:34AM, Guenter Roeck wrote: > spin_is_locked() always returns false for uniprocessor configurations > in several architectures, so do not use WARN_ON with it. > Use lockdep_assert_held() instead to also reduce overhead in > non-debug kernels. > > Cc: Matt Fleming > Signed-