diff options
author | Borislav Petkov <[email protected]> | 2021-11-05 10:41:51 +0100 |
---|---|---|
committer | Borislav Petkov <[email protected]> | 2021-11-15 12:27:40 +0100 |
commit | 8d48bf8206f77aa8687f0e241e901e5197e52423 (patch) | |
tree | 4be3950c9aa06a209aa1e8dcb8c2ffde81afa6fd /lib/netdev-notifier-error-inject.c | |
parent | fa55b7dcdc43c1aa1ba12bca9d2dd4318c2a0dbf (diff) |
x86/boot: Pull up cmdline preparation and early param parsing
Dan reports that Anjaneya Chagam can no longer use the efi=nosoftreserve
kernel command line parameter to suppress "soft reservation" behavior.
This is due to the fact that the following call-chain happens at boot:
early_reserve_memory
|-> efi_memblock_x86_reserve_range
|-> efi_fake_memmap_early
which does
if (!efi_soft_reserve_enabled())
return;
and that would have set EFI_MEM_NO_SOFT_RESERVE after having parsed
"nosoftreserve".
However, parse_early_param() gets called *after* it, leading to the boot
cmdline not being taken into account.
Therefore, carve out the command line preparation into a separate
function which does the early param parsing too. So that it all goes
together.
And then call that function before early_reserve_memory() so that the
params would have been parsed by then.
Fixes: 8aa83e6395ce ("x86/setup: Call early_reserve_memory() earlier")
Reported-by: Dan Williams <[email protected]>
Reviewed-by: Dan Williams <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Tested-by: Anjaneya Chagam <[email protected]>
Cc: <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'lib/netdev-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions