mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-02 14:33:18 +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:

committed by
Anastasia Klimchuk

parent
40d1c25c00
commit
52f062f67a
@ -172,6 +172,11 @@ enum write_granularity {
|
||||
/* Whether chip has configuration register (RDCR/WRSR_EXT2 commands) */
|
||||
#define FEATURE_CFGR (1 << 25)
|
||||
|
||||
/*
|
||||
* Whether the chip supports serial flash hardening specified in JESD260
|
||||
*/
|
||||
#define FEATURE_FLASH_HARDENING (1 << 26)
|
||||
|
||||
#define ERASED_VALUE(flash) (((flash)->chip->feature_bits & FEATURE_ERASED_ZERO) ? 0x00 : 0xff)
|
||||
#define UNERASED_VALUE(flash) (((flash)->chip->feature_bits & FEATURE_ERASED_ZERO) ? 0xff : 0x00)
|
||||
|
||||
@ -543,6 +548,32 @@ struct flashchip {
|
||||
* and determines what protection range they select.
|
||||
*/
|
||||
enum decode_range_func decode_range;
|
||||
|
||||
struct rpmc_config {
|
||||
uint8_t op1_opcode;
|
||||
uint8_t op2_opcode;
|
||||
|
||||
unsigned int num_counters;
|
||||
|
||||
/*
|
||||
* Busy Polling Method :
|
||||
* ‘0’: Poll for OP1 busy using OP2 Extended Status[0].
|
||||
* No OP1 Suspended State Support.
|
||||
* ‘1’: Poll for OP1 busy using Read Status (05H).
|
||||
* Suspended State is supported.
|
||||
*/
|
||||
enum busy_polling_methods {
|
||||
POLL_OP2_EXTENDED_STATUS = 0,
|
||||
POLL_READ_STATUS = 1
|
||||
} busy_polling_method;
|
||||
|
||||
unsigned int update_rate;
|
||||
|
||||
/* All times in microsecond (us) */
|
||||
unsigned int polling_delay_read_counter_us;
|
||||
unsigned int polling_short_delay_write_counter_us;
|
||||
unsigned int polling_long_delay_write_counter_us;
|
||||
} rpmc_ctx;
|
||||
};
|
||||
|
||||
typedef int (*chip_restore_fn_cb_t)(struct flashctx *flash, void *data);
|
||||
|
Reference in New Issue
Block a user