Add IRQ guards to critical IPMI response section

This resolves sporadic Zephyr crashes on Blackbird hosts
after the host enters skiboot.
parent 64543cf4
......@@ -1861,18 +1861,26 @@ static int process_host_to_bmc_ipmi_bt_transactions(void)
}
break;
case 3:
// Initialize pointer
response_ptr = (ipmi_response_message_t *)(HOSTLPCSLAVE_BASE + AQUILA_LPC_IPMI_BT_DATA_BLOCK_OFFSET);
{
// Deactivate interrupts on entering critical section
int key = irq_lock();
// Send response
// A full copy is done so as to ensure any potentially sensitive data stored
// in the IPMI BT buffer from a previous request is overwritten
*response_ptr = response;
// Initialize pointer
response_ptr = (ipmi_response_message_t *)(HOSTLPCSLAVE_BASE + AQUILA_LPC_IPMI_BT_DATA_BLOCK_OFFSET);
// Signal BMC data ready
dword = 0;
dword |= (1 << IPMI_BT_CTL_B2H_ATN_SHIFT);
write_aquila_register(HOSTLPCSLAVE_BASE, AQUILA_LPC_REG_IPMI_BT_STATUS, dword);
// Send response
// A full copy is done so as to ensure any potentially sensitive data stored
// in the IPMI BT buffer from a previous request is overwritten
*response_ptr = response;
// Signal BMC data ready
dword = 0;
dword |= (1 << IPMI_BT_CTL_B2H_ATN_SHIFT);
write_aquila_register(HOSTLPCSLAVE_BASE, AQUILA_LPC_REG_IPMI_BT_STATUS, dword);
// Re-activate interupts on exiting critical section
irq_unlock(key);
}
ipmi_bt_transaction_state = 4;
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment