futility: update: Use ifdtool to unlock ME

Currently the unlock_csme_nissa quirk only applies to nissa.
Specifically the GPR0 offset is hardcoded to the ADL value.

Change it to use ifdtool for unlocking FLMSTRs and disabling GPR0
instead. Support for disabling GPR0 was added to ifdtool in CB:79788.

It can now be used on all recent Intel platforms, specifically CML
onwards since older platforms did not have GPR0. Since it's no longer
nissa-specific, rename the quirk to unlock_csme.

ifdtool requires the platform to be passed as an argument. This is
determined by reading CONFIG_IFD_CHIPSET from the config file in CBFS.
However, listing all Kconfigs in the file was only added in CB:69710,
which is not currently included on the nissa firmware branch. So for
nissa use a fallback of checking for 'nissa' in CONFIG_IFD_BIN_PATH.

BRANCH=None
BUG=b:270275115
TEST=Run `futility update --mode=output --unlock_me -i image.bin` on
nissa images from both ToT (with CONFIG_IFD_CHIPSET) and the FW branch
(without CONFIG_IFD_CHIPSET).

Change-Id: Ib3dc4dda693f3709c5649671dcb0c739e8828f20
Signed-off-by: Reka Norman <rekanorman@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/5191650
Commit-Queue: Tzu-Min Sun <jimmysun@chromium.org>
Tested-by: Kenny Pan <kennypan@google.com>
Auto-Submit: Kenny Pan <kennypan@google.com>
Reviewed-by: Tzu-Min Sun <jimmysun@chromium.org>
9 files changed