Don't set PcdDebugPropertyMask for release builds, and properly set it
for debug builds based on SOURCE_DEBUG_ENABLE.
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Tianocore currently reads/writes a lot of NVRAM variables that
don't actually need to be saved. Occasionally some, specifically
related to the graphical/serial consoles, can become corrupted,
leading to a bricked device. To avoid this, temporarily restrict
the reading/writing of variables to Bootorder related ones
(starting with 'Boot') until a better solution can be found.
Test: build/boot google/eve, inject "bad" NVRAM data, observe
device boots normally instead of hanging with no display detected.
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
update compiled driver with one that doesn't hang on systems
built without CONFIG_SMMSTORE=y in coreboot.
Test: build/boot google/kahlee with and w.o SMMSTORE enabled
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Add support for Bayhub eMMC controller found on AMD
Stoneyridge Chromebooks.
Test: build/boot various google/kahlee-based devices
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Add/use System76 firmware-smmstore driver, to compact
the smmstore NVRAM variables. Helps prevent corruption
of NVRAM variables leading to boot hang.
Compiled from system76/firmware-smmstore commit 2e94590
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Make it possible to delete a variable by appending it with
size 0. Also ignore keysizes of 0 when reading variables.
Signed-off-by: Jeremy Soller <jeremy@system76.com>
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
For Baytrail devices, coreboot leaves the eMMC/SD in PCI mode to enable
detection by Tianocore, so put into ACPI mode before OS boots.
Fixes booting on Baytrail devices.
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Check SMM store return code and return on error.
Fixes significant boot delay in case no SMM store is present.
This can happend quite often if the tianocore payload is build standalone
and patched into a coreboot ROM.
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Add entries for Aleena, Barla, Careena, Kasumi, Liara.
Remove unused entry for Purism Librem 13v2 since not a
Google device.
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Some USB keyboards, like the Aspeed BMC HID keyboard,
require the SetIdle command to be issued before interrupt
transfers can be enabled. Add a quirk handler so any similar
devices can make use of same function by the addition of the
USB vendor/device IDs.
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
No need to check the interface protocol then conditionally setting,
just set it to BOOT_PROTOCOL and check for error.
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
The endpoint selected by the driver needs to not
only be an interrupt type, but have direction IN
as required to set up an asynchronous interrupt transfer.
Currently, the driver assumes that the first INT endpoint
will be of type IN, but that is not true of all devices,
and will silently fail on devices which have the OUT endpoint
before the IN. Adjust the endpoint selection loop to explictly
check for direction IN.
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
The endpoint selected by the driver needs to not
only be an interrupt type, but have direction IN
as required to set up an asynchronous interrupt transfer.
Currently, the driver assumes that the first INT endpoint
will be of type IN, but that is not true of all devices,
and will silently fail on devices which have the OUT endpoint
before the IN. Adjust the endpoint selection loop to explictly
check for direction IN.
Test: detachable keyboard on Google Pixel Slate now works.
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Fixes some device name strings not being copied due to
exceeding max size (but not size of buffer passed in)
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Query boot devices and obtain make/model info if
available. Prefix description with device type
for better identification.
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Copy BmBootDescription from MdeModulePkg/UefiBootManagerLib,
removing appending of serial # since it makes descriptions
unweildy.
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
- center device name; left-justify other info
- remove Language and Device Manager options
- rename 'Continue' to 'Default Boot'
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
With Boot Manager now renamed, rename BMM as well.
Also clean up and simplify menu to eliminate unused/non-
functional items.
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Unlike the InstallMultipleProtocolInterfaces() boot service, which takes
an (EFI_HANDLE*) as first parameter, the
UninstallMultipleProtocolInterfaces() boot service takes an EFI_HANDLE as
first parameter.
These are actual bugs. They must have remained hidden until now because
they are on error paths. Fix the UninstallMultipleProtocolInterfaces()
calls.
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Until now, during the USB device enumeration when its PortState
USB_PORT_STAT_CONNECTION bit was not set, the stack was not informed
that the device is not present. Fix that by returning appropriate
error code.
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Add support for allocating aligned pages at an alignment higher
than 4K. The new function allocated memory taking into account
the padding required and then frees up unused pages before mapping
it.
Signed-off-by: Ashish Singhal <ashishsingha@nvidia.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
While allocating pages aligned at an alignment higher than
4K, allocate memory taking into consideration the padding
required for that alignment. The calls to free pages takes
care of this already.
Signed-off-by: Ashish Singhal <ashishsingha@nvidia.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Fix an assertion that prevented the boot menu to show up when the coreboot
string is very long.
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1621
According to Intel SDM as below, the BIT0 should be treated as
lock bit, and BIT1 should be treated as disable(1)/enable(0) bit.
"11b: AES instructions are not available until next
RESET.
Otherwise, AES instructions are available.
If the configuration is not 01b, AES
instructions can be mis-configured if a privileged agent
unintentionally writes 11b"
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Chandana Kumar <chandana.c.kumar@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Microsoft user experience specifications recommend the boot logo is drawn 38.2%
from the top of the screen. This is also where operating systems like Fedora
expect the logo to be drawn.
Signed-off-by: James Ye <jye836@gmail.com>
No reason to hardcode the image size into the
positon calculations. Keep shift to upper 2/3
of screen.
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
BMP files by tools other than MS paint can have a
variable number of padding bytes, which results in
the DataSize being less than (ImageSize - HeaderSize).
Fix the check to be less stringent.
Test: use BMP created by/saved by Photoshop
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
CorebootModulePkg version is buggy and unmaintained, switching
to MdeModulePkg version fixes channel count / drive detection
issue on some KBL Chromeboxes
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
changed: buffer size from 64k to 256k
Change-Id: I7f443b9f36612f79787e1b4b1075176a91107686
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>