amdfwtool: Add ISH header support for A/B recovery layout

Image Slot Header (ISH) is a new feature.
The rom layout for A/B recovery with ISH:
EFS -> PSP L1 0x48 -> ISH A -> PSP L2 A -> BIOS L2 A
              0x4A -> ISH B -> PSP L2 B -> BIOS L2 B

The newer 55758 will updated about the boot priority and update retry
in ISH header.

Change-Id: Ib0690cde1dce949514c7aacebe13096b7814ceff
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57747
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
This commit is contained in:
Zheng Bao
2021-09-17 13:30:08 +08:00
committed by Felix Held
parent 5f18bb75fb
commit fdd47ef1e6
4 changed files with 62 additions and 12 deletions

View File

@@ -235,6 +235,18 @@ typedef struct _amd_bios_entry {
int level;
} amd_bios_entry;
typedef struct _ish_directory_table {
uint32_t checksum;
uint32_t boot_priority;
uint32_t update_retry_count;
uint8_t glitch_retry_count;
uint8_t glitch_higherbits_reserved[3];
uint32_t pl2_location;
uint32_t psp_id;
uint32_t slot_max_size;
uint32_t reserved;
} __attribute__((packed)) ish_directory_table;
#define EMBEDDED_FW_SIGNATURE 0x55aa55aa
#define PSP_COOKIE 0x50535024 /* 'PSP$' */
#define PSPL2_COOKIE 0x324c5024 /* '2LP$' */
@@ -265,6 +277,7 @@ typedef struct _amd_cb_config {
bool s0i3;
bool have_mb_spl;
bool recovery_ab;
bool need_ish;
} amd_cb_config;
void register_fw_fuse(char *str);