Re: [PATCH] arm64/efi: fix variable 'si' set but not used

2019-07-31 Thread Catalin Marinas
On Tue, Jul 30, 2019 at 05:23:48PM -0400, Qian Cai wrote: > GCC throws out this warning on arm64. > > drivers/firmware/efi/libstub/arm-stub.c: In function 'efi_entry': > drivers/firmware/efi/libstub/arm-stub.c:132:22: warning: variable 'si' > set but not used [-Wunused-but-set-variable] > > Fix

Re: [PATCH -next] efi/arm64: return zero from ptdump_init()

2019-02-05 Thread Catalin Marinas
On Mon, Feb 04, 2019 at 04:01:01PM -0500, Qian Cai wrote: > The commit e2a2e56e4082 ("arm64: dump: no need to check return value of > debugfs_create functions") converted ptdump_debugfs_register() from > void, but forgot to fix the efi version of ptdump_init(). > >

Re: [RESEND PATCH] efi: let kmemleak ignore false positives

2018-12-06 Thread Catalin Marinas
= kmalloc(sizeof(*rsv), GFP_ATOMIC); > > Kmemleak has a known limitation that can only track pointers in the kernel > virtual space. Hence, it will report false positives due to "rsv" will only > reference to other physical addresses, > > rsv->next = efi_memreserve_root->next; > efi_memreserve_root->next = __pa(rsv); > > Signed-off-by: Qian Cai Acked-by: Catalin Marinas

Re: [PATCH v2 1/6] arm64: memblock: don't permit memblock resizing until linear mapping is up

2018-11-08 Thread Catalin Marinas
On Wed, Nov 07, 2018 at 03:16:06PM +0100, Ard Biesheuvel wrote: > Bhupesh reports that having numerous memblock reservations at early > boot may result in the following crash: > > Unable to handle kernel paging request at virtual address 80003ffe > ... > Call trace: >

Re: [PATCH] efi/libstub: arm/arm64: don't use TASK_SIZE when randomising the RT space

2017-04-10 Thread Catalin Marinas
TASK_SIZE on ARM, both of which > are compile time constants. Also, change the 'headroom' variable to > static const to force an error if this changes in the future. > > Cc: James Morse <james.mo...@arm.com> > Cc: Mark Rutland <mark.rutl...@arm.com> > Cc: Catalin Marina

Re: [PATCH 12/12] ef/libstub: arm/arm64: Randomize the base of the UEFI rt services region

2017-04-07 Thread Catalin Marinas
Hi Ard, On 4 April 2017 at 17:09, Ard Biesheuvel wrote: > Update the allocation logic for the virtual mapping of the UEFI runtime > services to start from a randomized base address if KASLR is in effect, > and if the UEFI firmware exposes an implementation of

Re: [PATCH V14 00/10] Add UEFI 2.6 and ACPI 6.1 updates for RAS on ARM64

2017-04-06 Thread Catalin Marinas
Hi Rafael, On Tue, Mar 28, 2017 at 01:30:30PM -0600, Tyler Baicar wrote: > Tyler Baicar (9): > acpi: apei: read ack upon ghes record consumption > ras: acpi/apei: cper: generic error data entry v3 per ACPI 6.1 > efi: parse ARM processor error > arm64: exception: handle Synchronous

Re: [PATCH V13 10/10] arm/arm64: KVM: add guest SEA support

2017-03-23 Thread Catalin Marinas
/include/asm/system_misc.h | 2 ++ > arch/arm64/mm/fault.c| 19 +++-- > drivers/acpi/apei/ghes.c | 13 ++-- > include/acpi/ghes.h | 2 +- > 8 files changed, 86 insertions(+), 16 deletions(-) For arm64: Acked-by: Catali

Re: [PATCH V13 05/10] acpi: apei: handle SEA notification type for ARMv8

2017-03-23 Thread Catalin Marinas
> include/acpi/ghes.h | 7 + > 5 files changed, 101 insertions(+), 6 deletions(-) For the arch/arm64 part in here: Acked-by: Catalin Marinas <catalin.mari...@arm.com> -- To unsubscribe from this list: send the line "unsubscribe linux-efi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH V13 04/10] arm64: exception: handle Synchronous External Abort

2017-03-23 Thread Catalin Marinas
t; Reviewed-by: James Morse <james.mo...@arm.com> > --- > arch/arm64/include/asm/esr.h | 1 + > arch/arm64/mm/fault.c | 43 +++++-- Acked-by: Catalin Marinas <catalin.mari...@arm.com> -- To unsubscribe from this list: send the line "un

Re: [PATCH v3 0/6] arm64 UEFI early FDT handling

2015-11-16 Thread Catalin Marinas
On Mon, Nov 16, 2015 at 10:43:52AM +, Will Deacon wrote: > On Tue, Sep 29, 2015 at 08:38:57AM +0100, Ard Biesheuvel wrote: > > On 22 September 2015 at 02:21, Ard Biesheuvel > > wrote: > > > This is a followup to the "arm64: update/clarify/relax Image and FDT > > >

Re: [PATCH] arm64/efi: move arm64 specific stub C code to libstub

2015-10-30 Thread Catalin Marinas
On Fri, Oct 30, 2015 at 12:57:48PM +0100, Ard Biesheuvel wrote: > On 29 October 2015 at 19:39, Catalin Marinas <catalin.mari...@arm.com> wrote: > > On Fri, Oct 23, 2015 at 04:48:14PM +0200, Ard Biesheuvel wrote: > >> Now that we added special handling to the C files in li

Re: [PATCH v4 3/3] arm64/efi: isolate EFI stub from the kernel proper

2015-10-30 Thread Catalin Marinas
On Fri, Oct 30, 2015 at 01:17:24PM +0100, Ard Biesheuvel wrote: > On 27 October 2015 at 23:44, Jeremy Linton wrote: > > On 10/26/2015 09:20 PM, Ard Biesheuvel wrote: > >> > >> Thanks for the report. The following patch should fix it > > > > > > Ard, > > > > Thanks, it does

Re: [PATCH] arm64/efi: move arm64 specific stub C code to libstub

2015-10-29 Thread Catalin Marinas
On Fri, Oct 23, 2015 at 04:48:14PM +0200, Ard Biesheuvel wrote: > Now that we added special handling to the C files in libstub, move > the one remaining arm64 specific EFI stub C file to libstub as > well, so that it gets the same treatment. This should prevent future > changes from resulting in

Re: [PATCH v4 0/3] arm64: EFI stub isolation

2015-10-12 Thread Catalin Marinas
On Sat, Oct 10, 2015 at 11:40:51PM +0100, Matt Fleming wrote: > On Thu, 08 Oct, at 08:02:01PM, Ard Biesheuvel wrote: > > We need to ensure that the EFI stub only uses parts of the kernel proper > > that are safe to use when the kernel virtual mapping is not active yet. > > > > So move all C code

Re: [PATCH v6 0/6] KASAN for arm64

2015-10-08 Thread Catalin Marinas
;>> 2015-10-07 13:04 GMT+03:00 Catalin Marinas <catalin.mari...@arm.com>: > >>>> On Thu, Sep 17, 2015 at 12:38:06PM +0300, Andrey Ryabinin wrote: > >>>>> As usual patches available in git > >>>>> git://github.com/aryabinin/

Re: [PATCH v3 0/3] arm64: EFI stub isolation

2015-10-08 Thread Catalin Marinas
On Tue, Oct 06, 2015 at 12:03:41PM +0100, Ard Biesheuvel wrote: > We need to ensure that the EFI stub only uses parts of the kernel proper > that are safe to use when the kernel virtual mapping is not active yet. > > So move all C code dependencies to the libstub, and do a verification pass > to

Re: [PATCH] arm64/efi: map the entire UEFI vendor string before reading it

2015-07-27 Thread Catalin Marinas
On Sun, Jul 26, 2015 at 02:59:00PM +0200, Ard Biesheuvel wrote: At boot, the UTF-16 UEFI vendor string is copied from the system table into a char array with a size of 100 bytes. However, this size of 100 bytes is also used for memremapping() the source, which may not be sufficient if the

Re: [PATCH 1/8] of/fdt: split off FDT self reservation from memreserve processing

2015-05-22 Thread Catalin Marinas
-by: Rob Herring r...@kernel.org Acked-by: Mark Rutland mark.rutl...@arm.com Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org For the arm64 part: Acked-by: Catalin Marinas catalin.mari...@arm.com -- To unsubscribe from this list: send the line unsubscribe linux-efi in the body of a message

Re: [PATCH v2] efi/arm64: use UEFI for system reset and poweroff

2015-03-14 Thread Catalin Marinas
On Tue, Mar 10, 2015 at 02:48:57PM +, Matt Fleming wrote: On Fri, 06 Mar, at 03:49:24PM, Ard Biesheuvel wrote: If UEFI Runtime Services are available, they are preferred over direct PSCI calls or other methods to reset the system. For the reset case, we need to hook into

Re: [PATCH] arm64/efi: move virtmap init to early initcall

2015-01-22 Thread Catalin Marinas
On Thu, Jan 22, 2015 at 05:37:58PM +, Ard Biesheuvel wrote: On 22 January 2015 at 15:59, Catalin Marinas catalin.mari...@arm.com wrote: On Thu, Jan 22, 2015 at 10:01:40AM +, Ard Biesheuvel wrote: Now that the create_mapping() code in mm/mmu.c is able to support setting up kernel

Re: [PATCH] arm64/efi: handle potential failure to remap memory map

2015-01-16 Thread Catalin Marinas
On Thu, Jan 15, 2015 at 04:40:11PM +, Mark Rutland wrote: On Thu, Jan 15, 2015 at 12:01:06PM +, Ard Biesheuvel wrote: When remapping the UEFI memory map using ioremap_cache(), we have to deal with potential failure. Note that, even if the common case is for ioremap_cache() to return

Re: [PATCH] arm64/efi: set PE/COFF file alignment to 512 bytes

2014-10-16 Thread Catalin Marinas
. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- Another one from the PE/COFF rabbit hole. I will follow up next week and repost as a coherent series, once I have collected all the feedback. If Matt is taking more patches in this series, here's my ack: Acked-by: Catalin Marinas

Re: [PATCH 32/44] arm64: psci: Register with kernel poweroff handler

2014-10-09 Thread Catalin Marinas
On Tue, Oct 07, 2014 at 06:28:34AM +0100, Guenter Roeck wrote: Register with kernel poweroff handler instead of setting pm_power_off directly. Cc: Catalin Marinas catalin.mari...@arm.com Cc: Will Deacon will.dea...@arm.com Signed-off-by: Guenter Roeck li...@roeck-us.net --- arch/arm64

Re: EFI_STUB fails to boot non-EFI on arm64

2014-07-08 Thread Catalin Marinas
I forgot about this thread. I think we need it sorted in some way. On Fri, May 23, 2014 at 04:03:31PM +0100, Leif Lindholm wrote: On Fri, May 23, 2014 at 02:47:20PM +0100, Catalin Marinas wrote: Can we add another of detecting whether it's an EFI application and avoid calling efi_init()? I

[PATCH] efi: fdt: Do not report an error during boot if UEFI is not available

2014-07-08 Thread Catalin Marinas
Currently, fdt_find_uefi_params() reports an error if no EFI parameters are found in the DT. This is however a valid case for non-UEFI kernel booting. This patch checks changes the error reporting to a pr_info(UEFI not found) when no EFI parameters are found in the DT. Signed-off-by: Catalin

Re: [PATCH v3] efi/arm64: handle missing virtual mapping for UEFI System Table

2014-07-05 Thread Catalin Marinas
On 4 Jul 2014, at 18:19, Ard Biesheuvel ard.biesheu...@linaro.org wrote: On 4 July 2014 19:01, Catalin Marinas catalin.mari...@arm.com wrote: On Fri, Jul 04, 2014 at 05:52:36PM +0100, Mark Salter wrote: On Fri, 2014-07-04 at 17:25 +0200, Ard Biesheuvel wrote: If we cannot resolve the virtual

Re: [PATCH 1/2] efi/arm64: fix potential NULL dereference of efi.systab

2014-07-04 Thread Catalin Marinas
On Wed, Jul 02, 2014 at 11:10:01AM +0100, Ard Biesheuvel wrote: We assign efi.systab using efi_lookup_mapped_addr(), and test for !NULL, but then go on an dereference it anyway. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org Thanks. I applied this one (the other patch needs to go in

Re: [PATCH 1/2] efi/arm64: fix potential NULL dereference of efi.systab

2014-07-04 Thread Catalin Marinas
On Fri, Jul 04, 2014 at 02:54:19PM +0100, Ard Biesheuvel wrote: On 4 July 2014 15:38, Catalin Marinas catalin.mari...@arm.com wrote: On Wed, Jul 02, 2014 at 11:10:01AM +0100, Ard Biesheuvel wrote: We assign efi.systab using efi_lookup_mapped_addr(), and test for !NULL, but then go

Re: [PATCH v2 2/2] efi/arm64: preserve FP/SIMD registers on UEFI runtime services calls

2014-07-04 Thread Catalin Marinas
On Thu, Jun 26, 2014 at 11:09:06AM +0100, Ard Biesheuvel wrote: According to the UEFI spec section 2.3.6.4, the use of FP/SIMD instructions is allowed, and should adhere to the AAPCS64 calling convention, which states that 'only the bottom 64 bits of each value stored in registers v8-v15 need

Re: [PATCH v2 2/2] efi/arm64: preserve FP/SIMD registers on UEFI runtime services calls

2014-07-04 Thread Catalin Marinas
On Fri, Jul 04, 2014 at 04:51:31PM +0100, Ard Biesheuvel wrote: On 4 July 2014 17:45, Catalin Marinas catalin.mari...@arm.com wrote: On Thu, Jun 26, 2014 at 11:09:06AM +0100, Ard Biesheuvel wrote: According to the UEFI spec section 2.3.6.4, the use of FP/SIMD instructions is allowed

Re: [PATCH v3] efi/arm64: handle missing virtual mapping for UEFI System Table

2014-07-04 Thread Catalin Marinas
to push? If the latter: Acked-by: Catalin Marinas catalin.mari...@arm.com -- To unsubscribe from this list: send the line unsubscribe linux-efi in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [GIT PULL] EFI urgent fix

2014-06-20 Thread Catalin Marinas
On Fri, Jun 20, 2014 at 10:00:08AM +0100, Matt Fleming wrote: Please pull the following compiler warning fix. Sorry, I've been pretty slow in getting this pull request sent. Multiple people have reported hitting it and I've now received 4 patches for the same warning, BTW, one of them is not

[PATCH] efi: Fix compiler warnings (unused, const, type)

2014-06-02 Thread Catalin Marinas
of ‘of_get_flat_dt_prop’ from incompatible pointer type [enabled by default] drivers/firmware/efi/efi.c|368 col 8| warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default] Signed-off-by: Catalin Marinas catalin.mari...@arm.com --- Matt, Unless you have fixed

EFI_STUB fails to boot non-EFI on arm64

2014-05-23 Thread Catalin Marinas
Hi, As the EFI_STUB for arm64 got into tip and soon into -next, I thought about giving it a try (tip/arm64/efi). Using my boot-wrapper (non-EFI) is still supposed to work but I get the trace below. It looks like memmap.map is NULL but the code still assumes the kernel was started as an EFI app.

Re: EFI_STUB fails to boot non-EFI on arm64

2014-05-23 Thread Catalin Marinas
+333,9 @@ void __init efi_init(void) void __init efi_idmap_init(void) { + if (!efi_enabled(EFI_BOOT)) + return; + That's a first (possibly temporary) step and I think it's fine: Acked-by: Catalin Marinas catalin.mari...@arm.com But we need some further tweaking

Re: [GIT PULL] EFI changes for arm64

2014-05-20 Thread Catalin Marinas
On Mon, May 19, 2014 at 11:50:42AM +0100, Matt Fleming wrote: On Wed, 30 Apr, at 09:03:32PM, Matt Fleming wrote: I pulled the arm64 EFI changes into the following topic branch. Catalin was happy for this to go through tip, which definitely makes things easier for the next merge window

Re: [PATCH v2 00/10] arm64: UEFI support

2014-04-29 Thread Catalin Marinas
On Tue, Apr 29, 2014 at 12:43:56PM +0100, Matt Fleming wrote: (Pulling in Peter and Stephen) On Tue, 29 Apr, at 11:28:17AM, Catalin Marinas wrote: The patches look fine to me, they've been through several rounds of review already. How do we propose these get merged as the series

Re: [PATCH v2 11/15] arm64: add EFI stub

2014-03-19 Thread Catalin Marinas
On Tue, Mar 18, 2014 at 10:21:05PM +, Jason Gunthorpe wrote: On Tue, Mar 18, 2014 at 02:48:30PM -0700, Roy Franz wrote: It isn't clear to me if UEFI does cache flushing at ExitBootServices time, but even so, at least stack use will get cached between then and the kernel entry

Re: [PATCH v2 11/15] arm64: add EFI stub

2014-03-19 Thread Catalin Marinas
On Wed, Mar 19, 2014 at 03:13:18PM +, Mark Salter wrote: On Wed, 2014-03-19 at 10:57 +, Catalin Marinas wrote: On Tue, Mar 18, 2014 at 09:40:31PM +, Mark Salter wrote: On Tue, 2014-03-18 at 18:28 +, Catalin Marinas wrote: If UEFI doesn't handle the caches, the only thing

Re: [PATCH v2 11/15] arm64: add EFI stub

2014-03-18 Thread Catalin Marinas
On Thu, Mar 13, 2014 at 10:47:04PM +, Leif Lindholm wrote: --- /dev/null +++ b/arch/arm64/kernel/efi-entry.S @@ -0,0 +1,93 @@ +/* + * EFI entry point. + * + * Copyright (C) 2013 Red Hat, Inc. + * Author: Mark Salter msal...@redhat.com + * + * This program is free software; you can

Re: [PATCH v2 13/15] arm64: add EFI runtime services

2014-03-18 Thread Catalin Marinas
On Thu, Mar 13, 2014 at 10:47:06PM +, Leif Lindholm wrote: --- /dev/null +++ b/arch/arm64/kernel/efi.c [...] +/* + * Called from setup_arch with interrupts disabled. + */ +void __init efi_enter_virtual_mode(void) [...] --- a/init/main.c +++ b/init/main.c @@ -902,6 +902,10 @@ static

Re: [PATCH v2 13/15] arm64: add EFI runtime services

2014-03-18 Thread Catalin Marinas
On Tue, Mar 18, 2014 at 02:16:49PM +, Mark Salter wrote: On Tue, 2014-03-18 at 12:34 +, Catalin Marinas wrote: On Thu, Mar 13, 2014 at 10:47:06PM +, Leif Lindholm wrote: --- /dev/null +++ b/arch/arm64/kernel/efi.c [...] +/* + * Called from setup_arch with interrupts

Re: [PATCH v2 11/15] arm64: add EFI stub

2014-03-18 Thread Catalin Marinas
On Tue, Mar 18, 2014 at 02:40:29PM +, Mark Salter wrote: On Tue, 2014-03-18 at 12:09 +, Catalin Marinas wrote: On Thu, Mar 13, 2014 at 10:47:04PM +, Leif Lindholm wrote: --- /dev/null +++ b/arch/arm64/kernel/efi-entry.S @@ -0,0 +1,93 @@ +/* + * EFI entry point

Re: [PATCH 16/22] arm64: Add function to create identity mappings

2014-02-14 Thread Catalin Marinas
On Wed, Feb 05, 2014 at 05:04:07PM +, Leif Lindholm wrote: +void __init create_id_mapping(phys_addr_t addr, phys_addr_t size, int map_io) +{ + pgd_t *pgd = idmap_pg_dir[pgd_index(addr)]; + + if (pgd = idmap_pg_dir[ARRAY_SIZE(idmap_pg_dir)]) { + pr_warn(BUG: not

Re: [PATCH 6/6] arm64: add EFI runtime services

2014-01-23 Thread Catalin Marinas
On Fri, Jan 10, 2014 at 10:29:10PM +, Mark Salter wrote: diff --git a/arch/arm64/include/asm/efi.h b/arch/arm64/include/asm/efi.h new file mode 100644 index 000..a835b2c --- /dev/null +++ b/arch/arm64/include/asm/efi.h @@ -0,0 +1,12 @@ +#ifndef _ASM_ARM64_EFI_H +#define

Re: [PATCH 2/6] arm64: Add function to create identity mappings

2014-01-22 Thread Catalin Marinas
On Fri, Jan 10, 2014 at 10:29:06PM +, Mark Salter wrote: +void __init create_id_mapping(phys_addr_t addr, phys_addr_t size) +{ + pgd_t *pgd = idmap_pg_dir[pgd_index(addr)]; + + if (pgd = idmap_pg_dir[ARRAY_SIZE(idmap_pg_dir)]) { + pr_warn(BUG: not creating id mapping

Re: [PATCH 1/3] arm64: add EFI stub

2013-12-16 Thread Catalin Marinas
On Fri, Dec 06, 2013 at 02:55:54PM +, Mark Salter wrote: On Thu, 2013-12-05 at 14:18 +, Catalin Marinas wrote: On Fri, Nov 29, 2013 at 10:05:10PM +, Mark Salter wrote: + add x2, sp, 16 + str x8, [x2] + bl efi_entry + cmn x0, #1

Re: [PATCH 1/3] arm64: add EFI stub

2013-12-05 Thread Catalin Marinas
Hi Mark, On Fri, Nov 29, 2013 at 10:05:10PM +, Mark Salter wrote: This patch adds PE/COFF header fields to the start of the Image so that it appears as an EFI application to EFI firmware. An EFI stub is included to allow direct booting of the kernel Image. Due to EFI firmware limitations,

Re: [PATCH 3/3] arm64: add EFI runtime services

2013-12-05 Thread Catalin Marinas
On Fri, Nov 29, 2013 at 10:05:12PM +, Mark Salter wrote: diff --git a/arch/arm64/include/asm/efi.h b/arch/arm64/include/asm/efi.h new file mode 100644 index 000..7384048 --- /dev/null +++ b/arch/arm64/include/asm/efi.h @@ -0,0 +1,18 @@ +#ifndef _ASM_ARM64_EFI_H +#define

Re: [PATCH 1/3] arm64: add EFI stub

2013-12-05 Thread Catalin Marinas
On Thu, Dec 05, 2013 at 02:43:23PM +, Mark Salter wrote: On Thu, 2013-12-05 at 14:18 +, Catalin Marinas wrote: On Fri, Nov 29, 2013 at 10:05:10PM +, Mark Salter wrote: This patch adds PE/COFF header fields to the start of the Image so that it appears as an EFI application

Re: [PATCH 3/3] arm64: add EFI runtime services

2013-12-05 Thread Catalin Marinas
On Thu, Dec 05, 2013 at 03:52:41PM +, Mark Salter wrote: On Thu, 2013-12-05 at 15:25 +, Catalin Marinas wrote: I lost track of the early_ioremap status for arm/arm64? Was there more progress since October (I think)? See the two patch series: https://lkml.org/lkml/2013/11/25/474