1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-08-15 19:40:19 +02:00

rpmc: add rpmc commands feature

Added optional support for all the commands specified in JESD260.
Added a new optional dependency to openssls libcrypto.
Added parsing for the rpmc parameter sfdp table.
Added necessary rpmc parameter information to flashchips struct and the
flash hardening feature to enable rpmc commands.

Enables future use of these commands in the cli_client and also
libflashrom.

Change-Id: I6ab3d0446e9fd674b20550fdbfaf499b8d4a9b38
Signed-off-by: Matti Finder <matti.finder@gmail.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/84934
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Matti Finder
2024-10-30 16:55:10 +01:00
committed by Anastasia Klimchuk
parent 40d1c25c00
commit 52f062f67a
7 changed files with 819 additions and 10 deletions

View File

@@ -164,6 +164,7 @@ libpci = dependency('libpci', required : group_pci, version : '>=2.2.0',
libusb1 = dependency('libusb-1.0', required : group_usb)
libftdi1 = dependency('libftdi1', required : group_ftdi)
libjaylink = dependency('libjaylink', required : group_jlink, version : '>=0.3.0')
libcrypto = dependency('libcrypto', required : get_option('rpmc'), version : '>=3.0.0')
# ECAM is supported in libpci after 3.13.0
if libpci.version().version_compare('>=3.13.0')
@@ -172,6 +173,13 @@ else
add_project_arguments('-DCONFIG_USE_LIBPCI_ECAM=0', language: 'c')
endif
# Support additional rpmc commands if libcrypto is installed
if (get_option('rpmc').auto() or get_option('rpmc').enabled()) and libcrypto.found()
add_project_arguments('-DCONFIG_RPMC_ENABLED=1', language : 'c')
srcs += 'rpmc.c'
deps += libcrypto
endif
if host_machine.system() == 'windows'
# Specifying an include_path that doesn't exist is an error,
# but we only use this if the library is found in the same directory.