Commit Graph

2887 Commits

Author SHA1 Message Date
Sergii Dmytruk b828f7bf3e MdeModulePkg: support "immediate" on-disk capsules
That is loading and processing on-disk capsules during the same boot
without relocating the capsules to a dedicated non-volatile storage on
ESP or loading them as in-RAM capsules and then rebooting.

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2026-01-08 01:05:01 +02:00
Michał Żygowski 4fdc0917b6 MdeModulePkg/Universal/DisplayEngineDxe: Do not highlight empty strings
Hightlighting empty strings or strings containing a single SPACE character
resulted in drawing a confusing single-character-wide black rectangle.

Skip highlighting those mepty strings. it may be useful in forms where
no entry should be highlighted by default. It can be done by defining
a text field with empty prompt and help string as first menu entry.

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2025-07-07 16:46:05 +03:00
Michał Żygowski 0961f9f31f Add PCDs to control quiet and fast boot in the project
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2025-03-10 20:16:34 +02:00
Michał Żygowski 2bec454154 Handle quiet and fast boot
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2025-03-10 20:16:32 +02:00
Sergii Dmytruk 96a094d553 MdeModulePkg/Universal/CapsuleRuntimeDxe: Reject capsules unless ME is HAP-disabled
HAP-disabled ME doesn't do anything, including writing to system flash,
which is what we need for a firmware update that relies on a warm reset.
coreboot assumes that HECI/soft-disabled state of ME isn't as good as
HMRFPO and switches to HMRFPO doing a global reset which loses in-RAM
capsules.

Checking variable's value should be enough, if somebody manually set it to
an invalid value, the update there will be a reboot without a capsule
update.  A more reliable solution would be to pass this information from
coreboot.

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2025-03-10 20:16:31 +02:00
Sergii Dmytruk fadd1de95a MdeModulePkg/Universal/CapsuleRuntimeDxe: Enable FUM on reset for capsule update
This should ensure that various protection mechanisms are off and won't
get in the way of firmware flashing.

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2025-03-10 20:16:30 +02:00
Sergii Dmytruk 2893daee26 MdeModulePkg: Add PcdCapsuleFmpSupport to set EFI_OS_INDICATIONS_FMP_CAPSULE_SUPPORTED
Don't know why EDK never sets this bit (there is only definition with no
uses), maybe nothing actually checks its value.  Whatever the reason is,
it seems like a good idea to make setting it possible.

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2025-03-10 20:16:30 +02:00
Michał Kopeć 59b194cae9 SetupBrowserDxe/Setup.c: set browser action scope to system level
Set the browser action scope to system level to make the F9 (Reset to
defaults) hotkey work globally.

TEST=Boot on NovaCustom NV4x TGL, change some options in Dasharo System
Features and Boot Maintenance Manager, then go to the User Password
Management form and press F9 to reset to defaults. Verify that changes
in Dasharo System Features and Boot Maintenance Manager are reverted.

Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
2025-03-10 20:16:25 +02:00
Filip Lewiński 2a43c70a52 MdeModulePkg: reject negative autoboot timeout
Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>
2025-03-10 20:16:24 +02:00
Michał Żygowski 010254be40 Ensure the PcdPlatformBootTimeOut is not updated to make it the default value
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2025-03-10 20:16:23 +02:00
Michał Żygowski c07d620d1c Add option to control serial console
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2025-03-10 20:16:22 +02:00
Michał Kopeć 5680842156 MdeModulePkg/Universal/Acpi/AcpiTableDxe: copy XFirmwareCtl unconditionally
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
2025-03-10 20:16:22 +02:00
Michał Żygowski 77f0bde968 MdeModulePkg: Ensure boot timeout is taken from Timeout EFI variable
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2025-03-10 20:16:22 +02:00
Michał Żygowski b0a0733940 MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c: always use standard 80x25 mode
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2025-03-10 19:43:48 +02:00
Sergii Dmytruk d5d52c1b41 DasharoPayloadPkg,MdeModulePkg: inform user via popup if in recovery boot
MdeModulePkg changes
--------------------

Allow reusing functions by other packages, specifically by
DasharoPayloadPkg.

 * Move GetStringWidth() to CustomizedDisplayLib.

 * Move CreateMultiStringPopUp() to CustomizedDisplayLib
   CreateSharedPopUp() is an implementation of it and is moved as well
   (not used for anything else).

DasharoPayloadPkg changes
----------------------

Parse coreboot information about recovery boot and display a dialog
using functions moved to CustomizedDisplayLib library of MdeModulePkg.

 * Add ParseVBootWorkbuf() function
   Extracts information about vboot recovery from coreboot table.
   Ignore minor version of cb_vboot_workbuf_v2 while parsing because it
   doesn't seem to affect data layout and therefore shouldn't be the
   reason for aborting parsing of the structure.

 * Inform user via popup if in recovery boot.
   The popup explains what happened along with possible reasons.
   It disappears automatically after a timeout of 30 seconds or
   when user presses Enter.

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2025-03-10 01:25:43 +02:00
Michał Żygowski 248ecc5152 MdeModulePkg/Universal/BdsDxe: fix setting autoboot timeout
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2025-03-10 01:25:42 +02:00
Longhaox Lee fbe0805b20 MdeModulePkg/HiiDatabaseDxe: Remove buffer error for string default.
Remove efivarstore IFR buffer error when string load default.
In the case of varstore type IFR, it will be NULL,
just break into next opcode process.

Resolve issue from commit cbe8a09dba
varstore type IFR string might return status error
while execute ExtractConfig function.

Signed-off-by: Longhao Lee <longhaox.lee@intel.com>
2025-02-21 08:50:36 +08:00
Oliver Smith-Denny efbf5ed08c MdePkg: Move StackCheckLibStaticInit to StackCheckLib
This commit oves StackCheckLib from a NULL lib to an instance of
StackCheckLib. This requires every entry point to add a library
dependency on StackCheckLib. It also requires every SEC module
to have a dependency on StackCheckLib because there is no
standard SEC entry point.

It allows for greater flexibility for a platform to apply stack
cookies and simplifies DSC logic.

Continuous-integration-options: PatchCheck.ignore-multi-package

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2025-02-07 02:23:11 +00:00
Longhaox Lee cbe8a09dba MdeModulePkg/HiiDatabaseDxe: Add string question load default support.
Add string question load default support.
load default data from PCD PcdNvStoreDefaultValueBuffer.

Signed-off-by: Longhao Lee <longhaox.lee@intel.com>
2025-01-14 18:00:29 +08:00
Yang Gang e02c7848af MdeModulePkg SmbiosMeasurementDxe: Release TableAddress after use
Signed-off-by: Yang Gang <yanggang@byosoft.com.cn>
2024-12-11 09:51:45 +08:00
Yang Gang 58c7517228 MdeModulePkg DriverHealthManagerDxe: Display HealthStatus as TextTwo
When PcdBrowserGrayOutTextStatement is TRUE, TextOpCode will be GrayOut.
HealthStatus cannot be displayed in help area, use TextTwo to display it.

Signed-off-by: Yang Gang <yanggang@byosoft.com.cn>
2024-12-11 09:02:08 +08:00
Mike Maslenkin f6422011e5 MdeModulePkg/PlatformDriOverrideDxe: fix HiiOpCodeHandle leak
Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com>
2024-12-06 17:13:17 +00:00
Dandan Bi 9112fb0ecc MdeModulePkg/HiiDatabase: Return default value for BIT VarStore as UNIT32
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4874

Question CheckBox, OneOf and Numeric can refer to Bit EFI VarStore.
CheckBox: data type is Boolean (1 byte),
Numeric/Oneof: data type is always UNIT32 for BIT VarStore,
When get default value for BIT VarStore, should return default value
with sizeof (UINT32) rather than the byte the bit width occupied.
Or incorrect default value will be used due to the size mismatch.

Signed-off-by: Dandan Bi <dandan.bi@intel.com>
2024-12-02 13:38:48 +00:00
nikhil p sheshagiri acce74762b MdeModulePkg: Adding support for authenticated variable
storage data format

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4857

NVS needs to support both authenticated and non-authenticated
header for NV region. PcdNvStoreDefaultValueBuffer can have
variables with data format of the type Authenticated variable storage
and this change provides the support to differentiate between
the normal variable storage and authenticated variable storage
for the hii database to consume and update the setup variables
accordingly

Signed-off-by: nikhil p sheshagiri <nikhil.p.sheshagiri@intel.com>
2024-10-30 03:36:56 +00:00
Hua Ma 1a3d4b33b6 MdeModulePkg/TerminalDxe: Return success if device not support SetControl
Some serial device may not support SetControl. Ignore the error from
SetControl if EFI_UNSUPPORTED is return.

Signed-off-by: Hua Ma <hua.ma@intel.com>
2024-10-28 04:18:53 +00:00