Attention is currently required from: Felix Singer, Tim Wawrzynczak, Angel Pons, Nick Vaccaro, Andrey Petrov, Patrick Rudolph, EricR Lai. Subrata Banik has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/60402 )
Change subject: drivers/intel/fsp2_0: Make FSP Notify Phase APIs optional ......................................................................
Patch Set 6:
(2 comments)
File src/drivers/intel/fsp2_0/notify.c:
https://review.coreboot.org/c/coreboot/+/60402/comment/843c6b64_99be6dd5 PS6, Line 12: if (phase == AFTER_PCI_ENUM && CONFIG(SKIP_FSP_NOTIFY_PHASE_AFTER_PCI_ENUM)) : return false; : else if (phase == READY_TO_BOOT && CONFIG(SKIP_FSP_NOTIFY_PHASE_READY_TO_BOOT)) : return false; : else if (phase == END_OF_FIRMWARE && CONFIG(SKIP_FSP_NOTIFY_PHASE_END_OF_FIRMWARE)) : return false; : else : return true;
Idea: Use a switch statement? […]
Ack
https://review.coreboot.org/c/coreboot/+/60402/comment/d5f3b95a_1ce2c1bd PS6, Line 41: timestamp_add_now(TS_FSP_BEFORE_ENUMERATE); : post_code(POST_FSP_NOTIFY_BEFORE_ENUMERATE);
Maybe we could have a struct to store the per-phase information. I'll try to do something.
this is good idea and then you can pass the structure variable to the below function call as below?
struct fsp_notify_info { unsigned int phase; unsigned int ts; unsigned int post_code } info[] = { { .phase = AFTER_PCI_ENUM, .ts = TS_FSP_BEFORE_FINALIZE, .post_code = POST_FSP_NOTIFY_BEFORE_FINALIZE, }, { .phase = READY_TO_BOOT, .ts = TS_FSP_BEFORE_ENUMERATE, .post_code = POST_FSP_NOTIFY_BEFORE_ENUMERATE, }, { .phase = END_OF_FIRMWARE, .ts = TS_FSP_BEFORE_END_OF_FIRMWARE, .post_code = POST_FSP_NOTIFY_BEFORE_END_OF_FIRMWARE, } }
for (int i = 0; i < ARRAY_SIZE(info); i++) { if (phase == info[i].phase) { timestamp_add_now(info[i].ts); post_code(info[i].post_code); } }