RE: [PATCH 2/2] drivers: firmware: efi: install new fdt in configuration table

2018-04-29 Thread Pankaj Bansal
> -Original Message- > From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org] > Sent: Thursday, April 26, 2018 2:12 PM > To: Grant Likely > Cc: Udit Kumar ; Leif Lindholm > ; Pankaj Bansal ; >

[PATCH v4 2/4] efi: align efi_pci_io_protocol typedefs to type naming convention

2018-04-29 Thread Ard Biesheuvel
In order to use the helper macros that perform type mangling with the EFI PCI I/O protocol struct typedefs, align their Linux typenames with the convention we use for definitionns that originate in the UEFI spec, and add the trailing _t to each. Signed-off-by: Ard Biesheuvel

[PATCH v4 4/4] efi/x86: Ignore unrealistically large option roms

2018-04-29 Thread Ard Biesheuvel
From: Hans de Goede setup_efi_pci() tries to save a copy of each PCI option ROM as this may be necessary for the device driver for the PCI device to have access too. On some systems the efi_pci_io_protocol's romimage and romsize fields contain invalid data, which looks a

[PATCH v4 3/4] efi/x86: fold __setup_efi_pci32 and __setup_efi_pci64 into one

2018-04-29 Thread Ard Biesheuvel
As suggested by Lukas, use his efi_call_proto() and efi_table_attr() macros to merge __setup_efi_pci32() and __setup_efi_pci64() into a single function, removing the need to duplicate changes made in subsequent patches across both. Cc: Lukas Wunner Signed-off-by: Ard Biesheuvel

[PATCH v4 0/4] Ignore unrealistically large option roms in EFI stub code

2018-04-29 Thread Ard Biesheuvel
This is a continuation of Hans's work [0] to ignore bogus romimage/romsize values in the EFI PCI I/O protocol instances exposed by some UEFI firmwares on x86. I have only build tested this, both on 32 and 64 bit x86. Changes in v4: - Deduplicate the 32 and 64 bit code paths so that the actual

[PATCH v4 1/4] efi: fix efi_pci_io_protocol32 prototype for mixed mode

2018-04-29 Thread Ard Biesheuvel
Mixed mode allows a kernel built for x86_64 to interact with 32-bit EFI firmware, but requires us to define all struct definitions carefully when it comes to pointer sizes. efi_pci_io_protocol32 currently uses a void* for the 'romimage' field, which will be interpreted as a 64-bit field on such

Re: [PATCH v3] efi: Ignore unrealistically large option roms

2018-04-29 Thread Ard Biesheuvel
On 29 April 2018 at 12:00, Ard Biesheuvel wrote: > On 29 April 2018 at 11:08, Hans de Goede wrote: >> Hi, >> >> >> On 29-04-18 11:07, Ard Biesheuvel wrote: >>> >>> On 29 April 2018 at 10:40, Hans de Goede wrote: Hi,

Re: [PATCH v3] efi: Ignore unrealistically large option roms

2018-04-29 Thread Ard Biesheuvel
On 29 April 2018 at 11:08, Hans de Goede wrote: > Hi, > > > On 29-04-18 11:07, Ard Biesheuvel wrote: >> >> On 29 April 2018 at 10:40, Hans de Goede wrote: >>> >>> Hi, >>> >>> >>> On 29-04-18 09:43, Ingo Molnar wrote: * Hans de Goede

[PATCH v5 1/5] efi: Export boot-services code and data as debugfs-blobs

2018-04-29 Thread Hans de Goede
Sometimes it is useful to be able to dump the efi boot-services code and data. This commit adds these as debugfs-blobs to /sys/kernel/debug/efi, but only if efi=debug is passed on the kernel-commandline as this requires not freeing those memory-regions, which costs 20+ MB of RAM. Reviewed-by:

[PATCH v5 2/5] efi: Add embedded peripheral firmware support

2018-04-29 Thread Hans de Goede
Just like with PCI options ROMs, which we save in the setup_efi_pci* functions from arch/x86/boot/compressed/eboot.c, the EFI code / ROM itself sometimes may contain data which is useful/necessary for peripheral drivers to have access to. Specifically the EFI code may contain an embedded copy of

[PATCH v5 5/5] platform/x86: touchscreen_dmi: Add info for the Chuwi Vi8 Plus tablet

2018-04-29 Thread Hans de Goede
Add touchscreen info for the Chuwi Vi8 Plus tablet. This tablet uses a Chipone ICN8505 touchscreen controller, with the firmware used by the touchscreen embedded in the EFI firmware. Acked-by: Andy Shevchenko Acked-by: Ard Biesheuvel

[PATCH v5 4/5] platform/x86: touchscreen_dmi: Add EFI embedded firmware info support

2018-04-29 Thread Hans de Goede
Sofar we have been unable to get permission from the vendors to put the firmware for touchscreens listed in touchscreen_dmi in linux-firmware. Some of the tablets with such a touchscreen have a touchscreen driver, and thus a copy of the firmware, as part of their EFI code. This commit adds the

[PATCH v5 0/5] efi/firmware/platform-x86: Add EFI embedded fw support

2018-04-29 Thread Hans de Goede
Hi All, Here is v5 of my patch-set to add support for EFI embedded fw to the kernel. Changes since v4: -Rename the EFI_BOOT_SERVICES flag to EFI_PRESERVE_BS_REGIONS So I think this patch-set is getting close to ready for merging, which brings us to the question of how to merge this, I think

Re: [PATCH v3] efi: Ignore unrealistically large option roms

2018-04-29 Thread Hans de Goede
Hi, On 29-04-18 11:07, Ard Biesheuvel wrote: On 29 April 2018 at 10:40, Hans de Goede wrote: Hi, On 29-04-18 09:43, Ingo Molnar wrote: * Hans de Goede wrote: diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c

Re: [PATCH v3] efi: Ignore unrealistically large option roms

2018-04-29 Thread Ard Biesheuvel
On 29 April 2018 at 10:40, Hans de Goede wrote: > Hi, > > > On 29-04-18 09:43, Ingo Molnar wrote: >> >> >> * Hans de Goede wrote: >> >>> diff --git a/arch/x86/boot/compressed/eboot.c >>> b/arch/x86/boot/compressed/eboot.c >>> index

Re: [PATCH v3] efi: Ignore unrealistically large option roms

2018-04-29 Thread Hans de Goede
Hi, On 29-04-18 09:43, Ingo Molnar wrote: * Hans de Goede wrote: diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c index 47d3efff6805..8650ab268ee7 100644 --- a/arch/x86/boot/compressed/eboot.c +++ b/arch/x86/boot/compressed/eboot.c @@

Re: [PATCH v3] efi: Ignore unrealistically large option roms

2018-04-29 Thread Lukas Wunner
On Sun, Apr 29, 2018 at 09:43:18AM +0200, Ingo Molnar wrote: > * Hans de Goede wrote: > > diff --git a/arch/x86/boot/compressed/eboot.c > > b/arch/x86/boot/compressed/eboot.c > > index 47d3efff6805..8650ab268ee7 100644 > > --- a/arch/x86/boot/compressed/eboot.c > > +++

Re: [PATCH v3] efi: Ignore unrealistically large option roms

2018-04-29 Thread Ingo Molnar
* Hans de Goede wrote: > diff --git a/arch/x86/boot/compressed/eboot.c > b/arch/x86/boot/compressed/eboot.c > index 47d3efff6805..8650ab268ee7 100644 > --- a/arch/x86/boot/compressed/eboot.c > +++ b/arch/x86/boot/compressed/eboot.c > @@ -122,7 +122,14 @@