Attention is currently required from: Subrata Banik, Sridhar Siricilla, Angel Pons, Werner Zeh, Patrick Rudolph, EricR Lai. Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/61519 )
Change subject: soc/intel/common/cse: Add `cse_send_end_of_post()` as a public function ......................................................................
Patch Set 9: Code-Review+2
(1 comment)
File src/soc/intel/common/block/cse/cse_eop.c:
https://review.coreboot.org/c/coreboot/+/61519/comment/8ce4c89e_f7eacfde PS9, Line 188: static void set_cse_end_of_post(void *unused) : { : static bool eop_sent = false; : /* : * If CSE is already hidden then accessing CSE registers would be wrong and will : * receive junk, hence, return as CSE is already disabled. : */ : if (!is_cse_enabled()) { : printk(BIOS_DEBUG, "CSE is disabled, cannot send End-of-Post (EOP) message\n"); : return; : } : : if (eop_sent) { : printk(BIOS_ERR, "EOP already sent\n"); : return; : } : : set_cse_device_state(PCH_DEVFN_CSE, DEV_ACTIVE); : : timestamp_add_now(TS_ME_BEFORE_END_OF_POST); : handle_cse_eop_result(cse_send_eop()); : timestamp_add_now(TS_ME_AFTER_END_OF_POST); : : set_cse_device_state(PCH_DEVFN_CSE, DEV_IDLE); : : eop_sent = true; : } : : void cse_send_end_of_post(void) : { : return set_cse_end_of_post(NULL); : } really minor nit, but the call to set_cSE-send_of_post with the NULL is bugging me a little, does this work?
``` static void do_send_end_of_post(void) { static bool eop_sent = false;
if (eop_sent) { printk(BIOS_ERR, "EOP already sent\n"); return; }
/* * If CSE is already hidden then accessing CSE registers would be wrong and will * receive junk, hence, return as CSE is already disabled. */ if (!is_cse_enabled()) { printk(BIOS_DEBUG, "CSE is disabled, cannot send End-of-Post (EOP) message\n"); return; }
set_cse_device_state(PCH_DEVFN_CSE, DEV_ACTIVE);
timestamp_add_now(TS_ME_BEFORE_END_OF_POST); handle_cse_eop_result(cse_send_eop()); timestamp_add_now(TS_ME_AFTER_END_OF_POST);
set_cse_device_state(PCH_DEVFN_CSE, DEV_IDLE);
eop_sent = true; }
void cse_send_end_of_post(void) { do_send_end_of_post(); }
static void set_cse_end_of_post(void *unused) { do_send_end_of_post(); } ... BOOT_STATE_INIT_ENTRY(...set_cse_end_of_post); ```