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>
The typos got in the way of grepping for output lines and reporting
errors as numbers is not very helpful.
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
The text field between the list of files and option to create files or
directories was a selectable empty string with no functionality. When
moving through the menu one had to press the arrow one extra time to
navigate to the files. As it is confusing, change the text field to
subtitle so it is not selectable anymore.
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
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>
For NVC laptops it is required to issue KBEN command only to get
the keyboard working on coldboot paths with Windows. This commmit
will be squashed with previous commits once it is verified to work
on MSI desktops.
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
After the minimal KBC initialization is done on fast boot path, we still
need to issue KBEN command. This is a workaround for NVC EC implementation
of KBC which enables keyboard scanning on KBEN command. It has been
verified that Windows does not issue this command, os it is required to get
the keyboard working on cold boot paths on NovaCustom laptops. Verfied that
this command did not need to be issued on MSI desktops.
TEST=Boot NovaCustom V560TNX after shutdown from Windows without AC
connected and confirm the internal keyboard still works.
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
One seconds seems a bit too excessive to detect the keyboard. Lower the
detection timeout to half a second.
TEST=Verify PS/2 keyboard is initialized properly on MSI Z690-A DDR4 with
Media-Tech MT122K PS/2 keyboard and NovaCustom V540TND.
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
On fast boot path the i8042 controller was not being initialized at all if
Windows was being booted. This resulted in the keyboard not working after
shutdown and even after reset from Windows. It only worked when the keyboard
was initialized earlier properly and no shutdown occurred. On Linux boot
path, GRUB was calling ReadKeyStroke which triggered connecting consoles and
performing a full PS/2 initialization.
On fast boot path, add minimal i8042 controller initialization without
actual keyboard initialization and extended verification. It is sufficient
for both Linux and Windows to set up the PS/2 keyboard properly.
Also move setting the FastPs2Detection PCD to the Ps2KeyboardDxe, as it
caused most of the i8042 controller initialization to be skipped. Once the
controller is initialized on module start, the extra initialization may be
skipped later on fast boot path.
TEST=PS/2 keyboard works in both Ubuntu Linux and Windows after shutdown and
restart on NovaCustom V540TND.
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Returning an error from this function can disable useful functionality
like capsule updates because progress bar treats such errors as fatal...
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
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>
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>
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>
Prevent debugging on serial port (whether physical or cbmem console) at
runtime by not doing anything after boot services are exited. It will
stop calling SerialPortWrite if EFI switches to runtime and avoid access
to cbmem CONSOLE buffer which is neither marked as runtime code nor data.
If serial debugging will be necessary, actually mark coreboot's CONSOLE
buffer as runtime data (it's location and size are known).
Solves the issue with Xen backtrace on EFI reset system runtime service:
https://github.com/Dasharo/dasharo-issues/issues/488#issuecomment-1772758851
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
There is an assumption in `IsPciDeviceRejected()` (at least for I/O)
that a BAR with all read-write bits set is invalid. However, this is not
the case: when a resource is size-aligned down from the top, this may
also be the case.
This code causes the rejection of the iGPU (and therefore, display) in
some cases with the DasharoPayloadPkg, when the coreboot
ESOURCE_ALLOCATION_TOP_DOWN config is enabled. It remains to be seen
whether this code addresses some other issue.
Signed-off-by: Benjamin Doron <benjamin.doron@9elements.com>