35 alert_idx = MBX_ALERT_TEST_FATAL_FAULT_BIT;
38 alert_idx = MBX_ALERT_TEST_RECOV_FAULT_BIT;
45 mmio_region_write32(mbx->
base_addr, (ptrdiff_t)MBX_ALERT_TEST_REG_OFFSET,
58 *index_out = MBX_INTR_COMMON_MBX_READY_BIT;
61 *index_out = MBX_INTR_COMMON_MBX_ABORT_BIT;
64 *index_out = MBX_INTR_COMMON_MBX_ERROR_BIT;
86 *type = irq_types[irq];
94 if (mbx == NULL || snapshot == NULL) {
99 mmio_region_read32(mbx->
base_addr, (ptrdiff_t)MBX_INTR_STATE_REG_OFFSET);
111 mmio_region_write32(mbx->
base_addr, (ptrdiff_t)MBX_INTR_STATE_REG_OFFSET,
120 if (mbx == NULL || is_pending == NULL) {
125 if (!mbx_get_irq_bit_index(irq, &index)) {
129 uint32_t intr_state_reg =
130 mmio_region_read32(mbx->
base_addr, (ptrdiff_t)MBX_INTR_STATE_REG_OFFSET);
144 mmio_region_write32(mbx->
base_addr, (ptrdiff_t)MBX_INTR_STATE_REG_OFFSET,
157 if (!mbx_get_irq_bit_index(irq, &index)) {
163 mmio_region_write32(mbx->
base_addr, (ptrdiff_t)MBX_INTR_STATE_REG_OFFSET,
177 if (!mbx_get_irq_bit_index(irq, &index)) {
182 mmio_region_write32(mbx->
base_addr, (ptrdiff_t)MBX_INTR_TEST_REG_OFFSET,
191 if (mbx == NULL || state == NULL) {
196 if (!mbx_get_irq_bit_index(irq, &index)) {
200 uint32_t intr_enable_reg =
201 mmio_region_read32(mbx->
base_addr, (ptrdiff_t)MBX_INTR_ENABLE_REG_OFFSET);
217 if (!mbx_get_irq_bit_index(irq, &index)) {
221 uint32_t intr_enable_reg =
222 mmio_region_read32(mbx->
base_addr, (ptrdiff_t)MBX_INTR_ENABLE_REG_OFFSET);
226 mmio_region_write32(mbx->
base_addr, (ptrdiff_t)MBX_INTR_ENABLE_REG_OFFSET,
240 if (snapshot != NULL) {
241 *snapshot = mmio_region_read32(mbx->
base_addr,
242 (ptrdiff_t)MBX_INTR_ENABLE_REG_OFFSET);
246 mmio_region_write32(mbx->
base_addr, (ptrdiff_t)MBX_INTR_ENABLE_REG_OFFSET,
255 if (mbx == NULL || snapshot == NULL) {
259 mmio_region_write32(mbx->
base_addr, (ptrdiff_t)MBX_INTR_ENABLE_REG_OFFSET,