Attention is currently required from: Anil Kumar K, Subrata Banik, Paul Menzel, Himanshu Sahdev.
Sridhar Siricilla has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/74577 )
Change subject: soc/intel/cse_lite: Back up PSR data during CSE FW downgrade ......................................................................
Patch Set 30:
(7 comments)
File src/soc/intel/common/block/cse/cse_lite.c:
https://review.coreboot.org/c/coreboot/+/74577/comment/63e83b70_a286b86a PS30, Line 155: heci_send_receive Please do check command prerequisites here?
https://review.coreboot.org/c/coreboot/+/74577/comment/7fdd82f9_79c54aa7 PS30, Line 157: backup PSR command erro nit: PSR_HECI_FW_DOWNGRADE_BKUP command send failure?
https://review.coreboot.org/c/coreboot/+/74577/comment/c1a8917a_da170fbc PS30, Line 776: if (cse_boot_to_rw(cse_bp_info) == CB_SUCCESS) { Please add a comment like this command requires CSE must boot from RW partition. if CSE boots from RO, there will be GLOBAL RESET, so it is better we log message which tell PSR Back sequence is triggered. This will be helpful decoding CB logs.
https://review.coreboot.org/c/coreboot/+/74577/comment/771ecb23_24ccff53 PS30, Line 781: return; This is command send failure case, what is the error recovery path here? Do you want to consider trigger ChromeOS recovery?
https://review.coreboot.org/c/coreboot/+/74577/comment/b6b5a08d_c6b4e177 PS30, Line 784: Log Update?
https://review.coreboot.org/c/coreboot/+/74577/comment/acb041bd_e8ef1acc PS30, Line 786: cmos_write(PSR_BACKUP_DONE, PSR_BACKUP_STATUS_CMOS_OFFSET); It is better we log an event in the event log.
https://review.coreboot.org/c/coreboot/+/74577/comment/a4e0f5c7_e7675416 PS30, Line 788: if (backup_psr_resp.status != PSR_STATUS_SUCCESS) : printk(BIOS_DEBUG, "cse_lite: backup PSR command returned %d\n", : (int)backup_psr_resp.status); Can you handle the condition in the command handler itself? BTW, don't you want to consider retry sending command again if this failure shown?
What is the error recovery path here? Do you want to consider trigger ChromeOS recovery?