[PATCH V4] multiboot2: Implement quirk-modules-after-kernel

2020-04-07 Thread Zide Chen
In contrast to Mulitboot, in Mulitboot2, there is currently no way to control where to load the modules to. This could be a problem, e.g., the OS loaded by Multiboot2 needs to reserve low address for some particular purposes and not for loading modules. This patch implements the quirk quirk-module

RE: [PATCH V3] multiboot2: Implement quirk-modules-after-kernel

2020-04-07 Thread Chen, Zide
Hi Lukasz, > From: Lukasz Hawrylko > Sent: Tuesday, April 7, 2020 2:20 AM > To: The development of GNU GRUB > Cc: Chen, Zide > Subject: Re: [PATCH V3] multiboot2: Implement quirk-modules-after-kernel > > On Mon, 2020-04-06 at 23:30 -0700, Zide Chen wrote: > > @@ -392,11 +395,9 @@ grub_cmd_modu

RE: [PATCHv2] multiboot2: enable quirk-modules-after-kernel

2020-04-07 Thread Chen, Zide
Hi Paul, I installed VMWare ESXi, but realized that it's not booted by GRUB. I have tested on a KabyLake NUC, using Multiboot2 to load ACRN hypervisor, and confirmed that either the OS kernel is an ELF or raw binary, with this patch, grub_cmd_module () calculates the lowest_addr correctly and a

[PATCH 2/2] json: Update jsmn library to get rid of casts

2020-04-07 Thread Patrick Steinhardt
Update our embedded version of the jsmn library to upstream commit 053d3cd (Merge pull request #175 from pks-t/pks/struct-type, 2020-04-02). The update adds a name for the `jsmntok` struct, which allows us to add a forward declaration for the struct's typedef. As a result, we can now convert the `v

[PATCH 0/2] LUKS2 cleanups

2020-04-07 Thread Patrick Steinhardt
Hi, here's two small improvements for LUKS2 support: - The first patch introduces better error reporting, as I've noticed it's quite hard to determine why decryption failed in case there's any misconfiguration. - The second is a result of my upstream pull request in jsmn, which got accepte

[PATCH 1/2] luks2: Improve error reporting when decrypting/verifying key

2020-04-07 Thread Patrick Steinhardt
While we already set up error messages in both `luks2_verify_key()` and `luks2_decrypt_key()`, we do not ever print them. This makes it really hard to discover why a given key actually failed to decrypt a disk. Improve this by including the error message in the user-visible output. --- grub-core/

[PATCH v2] templates: Output a menu entry for firmware setup on UEFI FastBoot systems

2020-04-07 Thread Javier Martinez Canillas
From: Steve Langasek The fwsetup command allows to reboot into the EFI firmware setup menu, add a template to include a menu entry on EFI systems that makes use of that command to reboot into the EFI firmware settings. This is useful for users since the hotkey to enter into the EFI setup menu ma

Re: [PATCH v2 2/4] configure: Enforce gnu99 C language standard

2020-04-07 Thread Javier Martinez Canillas
On 4/7/20 12:41 PM, Daniel Kiper wrote: > On Tue, Apr 07, 2020 at 11:38:16AM +0200, Javier Martinez Canillas wrote: >> On 4/3/20 2:45 PM, Daniel Kiper wrote: >>> Commit d5a32255d (misc: Make grub_strtol() "end" pointers have safer >>> const qualifiers) introduced "restrict" keyword into some functi

Re: [PATCH v2 2/4] configure: Enforce gnu99 C language standard

2020-04-07 Thread Leif Lindholm
On Tue, Apr 07, 2020 at 12:41:20 +0200, Daniel Kiper wrote: > On Tue, Apr 07, 2020 at 11:38:16AM +0200, Javier Martinez Canillas wrote: > > On 4/3/20 2:45 PM, Daniel Kiper wrote: > > > Commit d5a32255d (misc: Make grub_strtol() "end" pointers have safer > > > const qualifiers) introduced "restrict"

Re: [PATCH v2 3/4] INSTALL/configure: Update install doc and configure comment

2020-04-07 Thread Leif Lindholm
On Fri, Apr 03, 2020 at 14:45:02 +0200, Daniel Kiper wrote: > ..to reflect the GRUB build reality in them. > > Additionally, fix ./configure command example formatting in INSTALL file. > > Signed-off-by: Daniel Kiper > --- > INSTALL | 51 +++

Re: [PATCH] cmdline: pass kernel command line as verbatim

2020-04-07 Thread Daniel Kiper
On Mon, Apr 06, 2020 at 04:55:52PM +0800, Michael Chang wrote: > On Mon, Apr 06, 2020 at 09:18:26AM +0200, Olaf Hering wrote: > > Am Sat, 4 Apr 2020 13:31:40 +0800 > > schrieb Michael Chang : > > > > > 7 files changed, 229 insertions(+), 2 deletions(-) > > > > A lot of churn. It is called 'verbati

Re: [PATCH v2 2/4] configure: Enforce gnu99 C language standard

2020-04-07 Thread Leif Lindholm
On Fri, Apr 03, 2020 at 14:45:01 +0200, Daniel Kiper wrote: > Commit d5a32255d (misc: Make grub_strtol() "end" pointers have safer > const qualifiers) introduced "restrict" keyword into some functions > definitions. This keyword was introduced in C99 standard. However, some > compilers by default m

Re: [PATCH v2 2/4] configure: Enforce gnu99 C language standard

2020-04-07 Thread Daniel Kiper
On Tue, Apr 07, 2020 at 11:38:16AM +0200, Javier Martinez Canillas wrote: > On 4/3/20 2:45 PM, Daniel Kiper wrote: > > Commit d5a32255d (misc: Make grub_strtol() "end" pointers have safer > > const qualifiers) introduced "restrict" keyword into some functions > > definitions. This keyword was intro

Re: [PATCH v2 4/4] autogen: Replace -iname with -ipath in find command

2020-04-07 Thread Javier Martinez Canillas
On 4/3/20 2:45 PM, Daniel Kiper wrote: > ..because -iname cannot be used to match paths. > > Signed-off-by: Daniel Kiper > --- Reviewed-by: Javier Martinez Canillas Best regards, -- Javier Martinez Canillas Software Engineer - Desktop Hardware Enablement Red Hat

Re: [PATCH v2 3/4] INSTALL/configure: Update install doc and configure comment

2020-04-07 Thread Javier Martinez Canillas
On 4/3/20 2:45 PM, Daniel Kiper wrote: > ..to reflect the GRUB build reality in them. > > Additionally, fix ./configure command example formatting in INSTALL file. > > Signed-off-by: Daniel Kiper > --- > INSTALL | 51 +++ > configure.ac | 10

Re: [PATCH v2 2/4] configure: Enforce gnu99 C language standard

2020-04-07 Thread Javier Martinez Canillas
On 4/3/20 2:45 PM, Daniel Kiper wrote: > Commit d5a32255d (misc: Make grub_strtol() "end" pointers have safer > const qualifiers) introduced "restrict" keyword into some functions > definitions. This keyword was introduced in C99 standard. However, some > compilers by default may use C89 or somethi

Re: [PATCH v2 1/4] configure: Drop unneeded TARGET_CFLAGS expansion

2020-04-07 Thread Javier Martinez Canillas
On 4/3/20 2:45 PM, Daniel Kiper wrote: > Signed-off-by: Daniel Kiper > --- > configure.ac | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/configure.ac b/configure.ac > index 88c0adbae..b2576b013 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -77,7 +77,7 @@ grub_TR

Re: [PATCH V3] multiboot2: Implement quirk-modules-after-kernel

2020-04-07 Thread Lukasz Hawrylko
On Mon, 2020-04-06 at 23:30 -0700, Zide Chen wrote: > @@ -392,11 +395,9 @@ grub_cmd_module (grub_command_t cmd __attribute__ > ((unused)), >if (! file) > return grub_errno; > > -#ifndef GRUB_USE_MULTIBOOT2 >lowest_addr = 0x10; > - if (grub_multiboot_quirks & GRUB_MULTIBOOT_QUIR

[PATCH v2 0/6] Improvements to EFI console and terminal drivers for Flicker Free Boot

2020-04-07 Thread Javier Martinez Canillas
Hello, This patch series was split from a previously posted patch-set [0]. It contains improvements for the EFI console and terminal drivers that allows to avoid the switch to text-mode until is needed. This is part of the patches we have in Fedora to support the Flicker Free Boot feature [1], wh

[PATCH v2 1/6] efi/console: Move grub_console_set{colorstate, cursor} higher in the file

2020-04-07 Thread Javier Martinez Canillas
This is just a preparatory patch to move the functions higher in the file, since these will be called by the grub_prepare_for_text_output() function that will be introduced in a later patch. The logic is unchanged by this patch. Functions definitions are just moved to avoid a forward declaration i

[PATCH v2 6/6] kern/term: Accept ESC, F4 and holding SHIFT as user interrupt keys

2020-04-07 Thread Javier Martinez Canillas
From: Hans de Goede On some devices the ESC key is the hotkey to enter the BIOS/EFI setup screen, making it really hard to time pressing it right. Besides that ESC is also pretty hard to discover for a user who does not know it will unhide the menu. This commit makes F4, which was chosen because

[PATCH v2 5/6] efi/console: Do not set text-mode until we actually need it

2020-04-07 Thread Javier Martinez Canillas
From: Hans de Goede If we're running with a hidden menu we may never need text mode, so do not change the video-mode to text until we actually need it. This allows to boot a machine without unnecessary graphical transitions and provide a seamless boot experience to users. Signed-off-by: Hans de

[PATCH v2 4/6] efi/console: Implement getkeystatus() support

2020-04-07 Thread Javier Martinez Canillas
From: Hans de Goede Implement getkeystatus() support in the EFI console driver. This is needed because the logic to determine if a key was pressed to make the menu countdown stop will be changed by a later patch to also take into account the SHIFT key being held down. For this reason the EFI co

[PATCH v2 3/6] efi/console: Add grub_console_read_key_stroke() helper function

2020-04-07 Thread Javier Martinez Canillas
From: Hans de Goede This is a preparatory patch for adding getkeystatus() support to the EFI console driver. We can get modifier status through the simple_text_input read_key_stroke method, but if a non-modifier key is (also) pressed the read_key_stroke call will consume that key from the firmwa

[PATCH v2 2/6] kern/term: Make grub_getkeystatus helper function available everywhere

2020-04-07 Thread Javier Martinez Canillas
From: Hans de Goede Move grub_getkeystatushelper function from grub-core/commands/keystatus.c to grub-core/kern/term.c and export it so that it can be used outside of the keystatus command code too. There's no logic change in this patch. The function definition is moved so it can be called from