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>
The CPU throttling used an excessive number of variables. The allowed
range of values should be fixed at build, saving it as a NV variable
makes no sense.
Simplify the logic of the CPU throttling range, gaining a better UX
than some error popups. Instead of setting the temperature, set the
offset which has a fixed allowed range. Display the current threshold
temperatue as grayed out fields instead.
Also add PCD to control the default value of the throttling offset.
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
DasharoModulePkg/DasharoVariablesLib got an API for measuring Dasharo
variables which is invoked by Tcg[2]Dxe.
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
From now on default values are maintained only in DasharoVariablesLib
and can be queried from it to avoid code duplication and bugs which
arise from it.
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Create a separate library for managing values of variables and create
them in the constructor of the new library. This gets rid of the
defaults in Library/DasharoSystemFeaturesUiLib/DasharoSystemFeatures.c
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
To have all of them collected in one place and have no need to reach
into HII-related header from unrelated parts of the code.
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
This is somewhat then using string literals as making a typo in a macro
name will cause a compilation error.
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>