Software APIs
isr_testutils.h
Go to the documentation of this file.
1// Copyright lowRISC contributors (OpenTitan project).
2// Licensed under the Apache License, Version 2.0, see LICENSE for details.
3// SPDX-License-Identifier: Apache-2.0
4
5#ifndef OPENTITAN_SW_DEVICE_LIB_TESTING_AUTOGEN_ISR_TESTUTILS_H_
6#define OPENTITAN_SW_DEVICE_LIB_TESTING_AUTOGEN_ISR_TESTUTILS_H_
7
8// THIS FILE HAS BEEN GENERATED, DO NOT EDIT MANUALLY. COMMAND:
9// util/autogen_testutils.py
10
11/**
12 * @file
13 * @brief Default ISRs for each IP
14 */
15
17#include "sw/device/lib/dif/autogen/dif_alert_handler_autogen.h"
18#include "sw/device/lib/dif/autogen/dif_aon_timer_autogen.h"
19#include "sw/device/lib/dif/autogen/dif_csrng_autogen.h"
20#include "sw/device/lib/dif/autogen/dif_edn_autogen.h"
21#include "sw/device/lib/dif/autogen/dif_entropy_src_autogen.h"
22#include "sw/device/lib/dif/autogen/dif_flash_ctrl_autogen.h"
23#include "sw/device/lib/dif/autogen/dif_gpio_autogen.h"
24#include "sw/device/lib/dif/autogen/dif_hmac_autogen.h"
25#include "sw/device/lib/dif/autogen/dif_i2c_autogen.h"
27#include "sw/device/lib/dif/autogen/dif_kmac_autogen.h"
28#include "sw/device/lib/dif/autogen/dif_otbn_autogen.h"
29#include "sw/device/lib/dif/autogen/dif_otp_ctrl_autogen.h"
30#include "sw/device/lib/dif/autogen/dif_pwrmgr_autogen.h"
31#include "sw/device/lib/dif/autogen/dif_rv_timer_autogen.h"
33#include "sw/device/lib/dif/autogen/dif_spi_device_autogen.h"
34#include "sw/device/lib/dif/autogen/dif_spi_host_autogen.h"
36#include "sw/device/lib/dif/autogen/dif_uart_autogen.h"
37#include "sw/device/lib/dif/autogen/dif_usbdev_autogen.h"
39
40#include "hw/top_earlgrey/sw/autogen/top_earlgrey.h" // Generated.
41
42/**
43 * A handle to a PLIC ISR context struct.
44 */
45typedef struct plic_isr_ctx {
46 /**
47 * A handle to a rv_plic.
48 */
50 /**
51 * The HART ID associated with the PLIC (correspond to a PLIC "target").
52 */
53 uint32_t hart_id;
55
56/**
57 * A handle to a adc_ctrl ISR context struct.
58 */
59typedef struct adc_ctrl_isr_ctx {
60 /**
61 * A handle to a adc_ctrl.
62 */
64 /**
65 * The PLIC IRQ ID where this adc_ctrl instance's IRQs start.
66 */
68 /**
69 * The adc_ctrl IRQ that is expected to be encountered in the ISR.
70 */
71 dif_adc_ctrl_irq_t expected_irq;
72 /**
73 * Whether or not a single IRQ is expected to be encountered in the ISR.
74 */
77
78/**
79 * A handle to a alert_handler ISR context struct.
80 */
81typedef struct alert_handler_isr_ctx {
82 /**
83 * A handle to a alert_handler.
84 */
86 /**
87 * The PLIC IRQ ID where this alert_handler instance's IRQs start.
88 */
90 /**
91 * The alert_handler IRQ that is expected to be encountered in the ISR.
92 */
93 dif_alert_handler_irq_t expected_irq;
94 /**
95 * Whether or not a single IRQ is expected to be encountered in the ISR.
96 */
99
100/**
101 * A handle to a aon_timer ISR context struct.
102 */
103typedef struct aon_timer_isr_ctx {
104 /**
105 * A handle to a aon_timer.
106 */
108 /**
109 * The PLIC IRQ ID where this aon_timer instance's IRQs start.
110 */
112 /**
113 * The aon_timer IRQ that is expected to be encountered in the ISR.
114 */
115 dif_aon_timer_irq_t expected_irq;
116 /**
117 * Whether or not a single IRQ is expected to be encountered in the ISR.
118 */
121
122/**
123 * A handle to a csrng ISR context struct.
124 */
125typedef struct csrng_isr_ctx {
126 /**
127 * A handle to a csrng.
128 */
130 /**
131 * The PLIC IRQ ID where this csrng instance's IRQs start.
132 */
134 /**
135 * The csrng IRQ that is expected to be encountered in the ISR.
136 */
137 dif_csrng_irq_t expected_irq;
138 /**
139 * Whether or not a single IRQ is expected to be encountered in the ISR.
140 */
143
144/**
145 * A handle to a edn ISR context struct.
146 */
147typedef struct edn_isr_ctx {
148 /**
149 * A handle to a edn.
150 */
152 /**
153 * The PLIC IRQ ID where this edn instance's IRQs start.
154 */
156 /**
157 * The edn IRQ that is expected to be encountered in the ISR.
158 */
159 dif_edn_irq_t expected_irq;
160 /**
161 * Whether or not a single IRQ is expected to be encountered in the ISR.
162 */
165
166/**
167 * A handle to a entropy_src ISR context struct.
168 */
169typedef struct entropy_src_isr_ctx {
170 /**
171 * A handle to a entropy_src.
172 */
174 /**
175 * The PLIC IRQ ID where this entropy_src instance's IRQs start.
176 */
178 /**
179 * The entropy_src IRQ that is expected to be encountered in the ISR.
180 */
181 dif_entropy_src_irq_t expected_irq;
182 /**
183 * Whether or not a single IRQ is expected to be encountered in the ISR.
184 */
187
188/**
189 * A handle to a flash_ctrl ISR context struct.
190 */
191typedef struct flash_ctrl_isr_ctx {
192 /**
193 * A handle to a flash_ctrl.
194 */
196 /**
197 * The PLIC IRQ ID where this flash_ctrl instance's IRQs start.
198 */
200 /**
201 * The flash_ctrl IRQ that is expected to be encountered in the ISR.
202 */
203 dif_flash_ctrl_irq_t expected_irq;
204 /**
205 * Whether or not a single IRQ is expected to be encountered in the ISR.
206 */
209
210/**
211 * A handle to a gpio ISR context struct.
212 */
213typedef struct gpio_isr_ctx {
214 /**
215 * A handle to a gpio.
216 */
218 /**
219 * The PLIC IRQ ID where this gpio instance's IRQs start.
220 */
222 /**
223 * The gpio IRQ that is expected to be encountered in the ISR.
224 */
225 dif_gpio_irq_t expected_irq;
226 /**
227 * Whether or not a single IRQ is expected to be encountered in the ISR.
228 */
231
232/**
233 * A handle to a hmac ISR context struct.
234 */
235typedef struct hmac_isr_ctx {
236 /**
237 * A handle to a hmac.
238 */
240 /**
241 * The PLIC IRQ ID where this hmac instance's IRQs start.
242 */
244 /**
245 * The hmac IRQ that is expected to be encountered in the ISR.
246 */
247 dif_hmac_irq_t expected_irq;
248 /**
249 * Whether or not a single IRQ is expected to be encountered in the ISR.
250 */
253
254/**
255 * A handle to a i2c ISR context struct.
256 */
257typedef struct i2c_isr_ctx {
258 /**
259 * A handle to a i2c.
260 */
262 /**
263 * The PLIC IRQ ID where this i2c instance's IRQs start.
264 */
266 /**
267 * The i2c IRQ that is expected to be encountered in the ISR.
268 */
269 dif_i2c_irq_t expected_irq;
270 /**
271 * Whether or not a single IRQ is expected to be encountered in the ISR.
272 */
275
276/**
277 * A handle to a keymgr ISR context struct.
278 */
279typedef struct keymgr_isr_ctx {
280 /**
281 * A handle to a keymgr.
282 */
284 /**
285 * The PLIC IRQ ID where this keymgr instance's IRQs start.
286 */
288 /**
289 * The keymgr IRQ that is expected to be encountered in the ISR.
290 */
291 dif_keymgr_irq_t expected_irq;
292 /**
293 * Whether or not a single IRQ is expected to be encountered in the ISR.
294 */
297
298/**
299 * A handle to a kmac ISR context struct.
300 */
301typedef struct kmac_isr_ctx {
302 /**
303 * A handle to a kmac.
304 */
306 /**
307 * The PLIC IRQ ID where this kmac instance's IRQs start.
308 */
310 /**
311 * The kmac IRQ that is expected to be encountered in the ISR.
312 */
313 dif_kmac_irq_t expected_irq;
314 /**
315 * Whether or not a single IRQ is expected to be encountered in the ISR.
316 */
319
320/**
321 * A handle to a otbn ISR context struct.
322 */
323typedef struct otbn_isr_ctx {
324 /**
325 * A handle to a otbn.
326 */
328 /**
329 * The PLIC IRQ ID where this otbn instance's IRQs start.
330 */
332 /**
333 * The otbn IRQ that is expected to be encountered in the ISR.
334 */
335 dif_otbn_irq_t expected_irq;
336 /**
337 * Whether or not a single IRQ is expected to be encountered in the ISR.
338 */
341
342/**
343 * A handle to a otp_ctrl ISR context struct.
344 */
345typedef struct otp_ctrl_isr_ctx {
346 /**
347 * A handle to a otp_ctrl.
348 */
350 /**
351 * The PLIC IRQ ID where this otp_ctrl instance's IRQs start.
352 */
354 /**
355 * The otp_ctrl IRQ that is expected to be encountered in the ISR.
356 */
357 dif_otp_ctrl_irq_t expected_irq;
358 /**
359 * Whether or not a single IRQ is expected to be encountered in the ISR.
360 */
363
364/**
365 * A handle to a pwrmgr ISR context struct.
366 */
367typedef struct pwrmgr_isr_ctx {
368 /**
369 * A handle to a pwrmgr.
370 */
372 /**
373 * The PLIC IRQ ID where this pwrmgr instance's IRQs start.
374 */
376 /**
377 * The pwrmgr IRQ that is expected to be encountered in the ISR.
378 */
379 dif_pwrmgr_irq_t expected_irq;
380 /**
381 * Whether or not a single IRQ is expected to be encountered in the ISR.
382 */
385
386/**
387 * A handle to a rv_timer ISR context struct.
388 */
389typedef struct rv_timer_isr_ctx {
390 /**
391 * A handle to a rv_timer.
392 */
394 /**
395 * The PLIC IRQ ID where this rv_timer instance's IRQs start.
396 */
398 /**
399 * The rv_timer IRQ that is expected to be encountered in the ISR.
400 */
401 dif_rv_timer_irq_t expected_irq;
402 /**
403 * Whether or not a single IRQ is expected to be encountered in the ISR.
404 */
407
408/**
409 * A handle to a sensor_ctrl ISR context struct.
410 */
411typedef struct sensor_ctrl_isr_ctx {
412 /**
413 * A handle to a sensor_ctrl.
414 */
416 /**
417 * The PLIC IRQ ID where this sensor_ctrl instance's IRQs start.
418 */
420 /**
421 * The sensor_ctrl IRQ that is expected to be encountered in the ISR.
422 */
423 dif_sensor_ctrl_irq_t expected_irq;
424 /**
425 * Whether or not a single IRQ is expected to be encountered in the ISR.
426 */
429
430/**
431 * A handle to a spi_device ISR context struct.
432 */
433typedef struct spi_device_isr_ctx {
434 /**
435 * A handle to a spi_device.
436 */
438 /**
439 * The PLIC IRQ ID where this spi_device instance's IRQs start.
440 */
442 /**
443 * The spi_device IRQ that is expected to be encountered in the ISR.
444 */
445 dif_spi_device_irq_t expected_irq;
446 /**
447 * Whether or not a single IRQ is expected to be encountered in the ISR.
448 */
451
452/**
453 * A handle to a spi_host ISR context struct.
454 */
455typedef struct spi_host_isr_ctx {
456 /**
457 * A handle to a spi_host.
458 */
460 /**
461 * The PLIC IRQ ID where this spi_host instance's IRQs start.
462 */
464 /**
465 * The spi_host IRQ that is expected to be encountered in the ISR.
466 */
467 dif_spi_host_irq_t expected_irq;
468 /**
469 * Whether or not a single IRQ is expected to be encountered in the ISR.
470 */
473
474/**
475 * A handle to a sysrst_ctrl ISR context struct.
476 */
477typedef struct sysrst_ctrl_isr_ctx {
478 /**
479 * A handle to a sysrst_ctrl.
480 */
482 /**
483 * The PLIC IRQ ID where this sysrst_ctrl instance's IRQs start.
484 */
486 /**
487 * The sysrst_ctrl IRQ that is expected to be encountered in the ISR.
488 */
489 dif_sysrst_ctrl_irq_t expected_irq;
490 /**
491 * Whether or not a single IRQ is expected to be encountered in the ISR.
492 */
495
496/**
497 * A handle to a uart ISR context struct.
498 */
499typedef struct uart_isr_ctx {
500 /**
501 * A handle to a uart.
502 */
504 /**
505 * The PLIC IRQ ID where this uart instance's IRQs start.
506 */
508 /**
509 * The uart IRQ that is expected to be encountered in the ISR.
510 */
511 dif_uart_irq_t expected_irq;
512 /**
513 * Whether or not a single IRQ is expected to be encountered in the ISR.
514 */
517
518/**
519 * A handle to a usbdev ISR context struct.
520 */
521typedef struct usbdev_isr_ctx {
522 /**
523 * A handle to a usbdev.
524 */
526 /**
527 * The PLIC IRQ ID where this usbdev instance's IRQs start.
528 */
530 /**
531 * The usbdev IRQ that is expected to be encountered in the ISR.
532 */
533 dif_usbdev_irq_t expected_irq;
534 /**
535 * Whether or not a single IRQ is expected to be encountered in the ISR.
536 */
539
540/**
541 * Services an adc_ctrl IRQ.
542 *
543 * @param plic_ctx A PLIC ISR context handle.
544 * @param adc_ctrl_ctx A(n) adc_ctrl ISR context handle.
545 * @param mute_status_irq set to true to disable the serviced status type IRQ.
546 * @param[out] peripheral_serviced Out param for the peripheral that was
547 * serviced.
548 * @param[out] irq_serviced Out param for the IRQ that was serviced.
549 */
551 plic_isr_ctx_t plic_ctx, adc_ctrl_isr_ctx_t adc_ctrl_ctx,
552 bool mute_status_irq, top_earlgrey_plic_peripheral_t *peripheral_serviced,
553 dif_adc_ctrl_irq_t *irq_serviced);
554
555/**
556 * Services an alert_handler IRQ.
557 *
558 * @param plic_ctx A PLIC ISR context handle.
559 * @param alert_handler_ctx A(n) alert_handler ISR context handle.
560 * @param[out] peripheral_serviced Out param for the peripheral that was
561 * serviced.
562 * @param[out] irq_serviced Out param for the IRQ that was serviced.
563 */
565 plic_isr_ctx_t plic_ctx, alert_handler_isr_ctx_t alert_handler_ctx,
566 top_earlgrey_plic_peripheral_t *peripheral_serviced,
567 dif_alert_handler_irq_t *irq_serviced);
568
569/**
570 * Services an aon_timer IRQ.
571 *
572 * @param plic_ctx A PLIC ISR context handle.
573 * @param aon_timer_ctx A(n) aon_timer ISR context handle.
574 * @param[out] peripheral_serviced Out param for the peripheral that was
575 * serviced.
576 * @param[out] irq_serviced Out param for the IRQ that was serviced.
577 */
579 plic_isr_ctx_t plic_ctx, aon_timer_isr_ctx_t aon_timer_ctx,
580 top_earlgrey_plic_peripheral_t *peripheral_serviced,
581 dif_aon_timer_irq_t *irq_serviced);
582
583/**
584 * Services an csrng IRQ.
585 *
586 * @param plic_ctx A PLIC ISR context handle.
587 * @param csrng_ctx A(n) csrng ISR context handle.
588 * @param[out] peripheral_serviced Out param for the peripheral that was
589 * serviced.
590 * @param[out] irq_serviced Out param for the IRQ that was serviced.
591 */
593 plic_isr_ctx_t plic_ctx, csrng_isr_ctx_t csrng_ctx,
594 top_earlgrey_plic_peripheral_t *peripheral_serviced,
595 dif_csrng_irq_t *irq_serviced);
596
597/**
598 * Services an edn IRQ.
599 *
600 * @param plic_ctx A PLIC ISR context handle.
601 * @param edn_ctx A(n) edn ISR context handle.
602 * @param[out] peripheral_serviced Out param for the peripheral that was
603 * serviced.
604 * @param[out] irq_serviced Out param for the IRQ that was serviced.
605 */
607 top_earlgrey_plic_peripheral_t *peripheral_serviced,
608 dif_edn_irq_t *irq_serviced);
609
610/**
611 * Services an entropy_src IRQ.
612 *
613 * @param plic_ctx A PLIC ISR context handle.
614 * @param entropy_src_ctx A(n) entropy_src ISR context handle.
615 * @param[out] peripheral_serviced Out param for the peripheral that was
616 * serviced.
617 * @param[out] irq_serviced Out param for the IRQ that was serviced.
618 */
620 plic_isr_ctx_t plic_ctx, entropy_src_isr_ctx_t entropy_src_ctx,
621 top_earlgrey_plic_peripheral_t *peripheral_serviced,
622 dif_entropy_src_irq_t *irq_serviced);
623
624/**
625 * Services an flash_ctrl IRQ.
626 *
627 * @param plic_ctx A PLIC ISR context handle.
628 * @param flash_ctrl_ctx A(n) flash_ctrl ISR context handle.
629 * @param mute_status_irq set to true to disable the serviced status type IRQ.
630 * @param[out] peripheral_serviced Out param for the peripheral that was
631 * serviced.
632 * @param[out] irq_serviced Out param for the IRQ that was serviced.
633 */
635 plic_isr_ctx_t plic_ctx, flash_ctrl_isr_ctx_t flash_ctrl_ctx,
636 bool mute_status_irq, top_earlgrey_plic_peripheral_t *peripheral_serviced,
637 dif_flash_ctrl_irq_t *irq_serviced);
638
639/**
640 * Services an gpio IRQ.
641 *
642 * @param plic_ctx A PLIC ISR context handle.
643 * @param gpio_ctx A(n) gpio ISR context handle.
644 * @param[out] peripheral_serviced Out param for the peripheral that was
645 * serviced.
646 * @param[out] irq_serviced Out param for the IRQ that was serviced.
647 */
649 top_earlgrey_plic_peripheral_t *peripheral_serviced,
650 dif_gpio_irq_t *irq_serviced);
651
652/**
653 * Services an hmac IRQ.
654 *
655 * @param plic_ctx A PLIC ISR context handle.
656 * @param hmac_ctx A(n) hmac ISR context handle.
657 * @param mute_status_irq set to true to disable the serviced status type IRQ.
658 * @param[out] peripheral_serviced Out param for the peripheral that was
659 * serviced.
660 * @param[out] irq_serviced Out param for the IRQ that was serviced.
661 */
663 bool mute_status_irq,
664 top_earlgrey_plic_peripheral_t *peripheral_serviced,
665 dif_hmac_irq_t *irq_serviced);
666
667/**
668 * Services an i2c IRQ.
669 *
670 * @param plic_ctx A PLIC ISR context handle.
671 * @param i2c_ctx A(n) i2c ISR context handle.
672 * @param mute_status_irq set to true to disable the serviced status type IRQ.
673 * @param[out] peripheral_serviced Out param for the peripheral that was
674 * serviced.
675 * @param[out] irq_serviced Out param for the IRQ that was serviced.
676 */
678 bool mute_status_irq,
679 top_earlgrey_plic_peripheral_t *peripheral_serviced,
680 dif_i2c_irq_t *irq_serviced);
681
682/**
683 * Services an keymgr IRQ.
684 *
685 * @param plic_ctx A PLIC ISR context handle.
686 * @param keymgr_ctx A(n) keymgr ISR context handle.
687 * @param[out] peripheral_serviced Out param for the peripheral that was
688 * serviced.
689 * @param[out] irq_serviced Out param for the IRQ that was serviced.
690 */
692 plic_isr_ctx_t plic_ctx, keymgr_isr_ctx_t keymgr_ctx,
693 top_earlgrey_plic_peripheral_t *peripheral_serviced,
694 dif_keymgr_irq_t *irq_serviced);
695
696/**
697 * Services an kmac IRQ.
698 *
699 * @param plic_ctx A PLIC ISR context handle.
700 * @param kmac_ctx A(n) kmac ISR context handle.
701 * @param mute_status_irq set to true to disable the serviced status type IRQ.
702 * @param[out] peripheral_serviced Out param for the peripheral that was
703 * serviced.
704 * @param[out] irq_serviced Out param for the IRQ that was serviced.
705 */
707 bool mute_status_irq,
708 top_earlgrey_plic_peripheral_t *peripheral_serviced,
709 dif_kmac_irq_t *irq_serviced);
710
711/**
712 * Services an otbn IRQ.
713 *
714 * @param plic_ctx A PLIC ISR context handle.
715 * @param otbn_ctx A(n) otbn ISR context handle.
716 * @param[out] peripheral_serviced Out param for the peripheral that was
717 * serviced.
718 * @param[out] irq_serviced Out param for the IRQ that was serviced.
719 */
721 top_earlgrey_plic_peripheral_t *peripheral_serviced,
722 dif_otbn_irq_t *irq_serviced);
723
724/**
725 * Services an otp_ctrl IRQ.
726 *
727 * @param plic_ctx A PLIC ISR context handle.
728 * @param otp_ctrl_ctx A(n) otp_ctrl ISR context handle.
729 * @param[out] peripheral_serviced Out param for the peripheral that was
730 * serviced.
731 * @param[out] irq_serviced Out param for the IRQ that was serviced.
732 */
734 plic_isr_ctx_t plic_ctx, otp_ctrl_isr_ctx_t otp_ctrl_ctx,
735 top_earlgrey_plic_peripheral_t *peripheral_serviced,
736 dif_otp_ctrl_irq_t *irq_serviced);
737
738/**
739 * Services an pwrmgr IRQ.
740 *
741 * @param plic_ctx A PLIC ISR context handle.
742 * @param pwrmgr_ctx A(n) pwrmgr ISR context handle.
743 * @param[out] peripheral_serviced Out param for the peripheral that was
744 * serviced.
745 * @param[out] irq_serviced Out param for the IRQ that was serviced.
746 */
748 plic_isr_ctx_t plic_ctx, pwrmgr_isr_ctx_t pwrmgr_ctx,
749 top_earlgrey_plic_peripheral_t *peripheral_serviced,
750 dif_pwrmgr_irq_t *irq_serviced);
751
752/**
753 * Services an rv_timer IRQ.
754 *
755 * @param plic_ctx A PLIC ISR context handle.
756 * @param rv_timer_ctx A(n) rv_timer ISR context handle.
757 * @param[out] peripheral_serviced Out param for the peripheral that was
758 * serviced.
759 * @param[out] irq_serviced Out param for the IRQ that was serviced.
760 */
762 plic_isr_ctx_t plic_ctx, rv_timer_isr_ctx_t rv_timer_ctx,
763 top_earlgrey_plic_peripheral_t *peripheral_serviced,
764 dif_rv_timer_irq_t *irq_serviced);
765
766/**
767 * Services an sensor_ctrl IRQ.
768 *
769 * @param plic_ctx A PLIC ISR context handle.
770 * @param sensor_ctrl_ctx A(n) sensor_ctrl ISR context handle.
771 * @param[out] peripheral_serviced Out param for the peripheral that was
772 * serviced.
773 * @param[out] irq_serviced Out param for the IRQ that was serviced.
774 */
776 plic_isr_ctx_t plic_ctx, sensor_ctrl_isr_ctx_t sensor_ctrl_ctx,
777 top_earlgrey_plic_peripheral_t *peripheral_serviced,
778 dif_sensor_ctrl_irq_t *irq_serviced);
779
780/**
781 * Services an spi_device IRQ.
782 *
783 * @param plic_ctx A PLIC ISR context handle.
784 * @param spi_device_ctx A(n) spi_device ISR context handle.
785 * @param mute_status_irq set to true to disable the serviced status type IRQ.
786 * @param[out] peripheral_serviced Out param for the peripheral that was
787 * serviced.
788 * @param[out] irq_serviced Out param for the IRQ that was serviced.
789 */
791 plic_isr_ctx_t plic_ctx, spi_device_isr_ctx_t spi_device_ctx,
792 bool mute_status_irq, top_earlgrey_plic_peripheral_t *peripheral_serviced,
793 dif_spi_device_irq_t *irq_serviced);
794
795/**
796 * Services an spi_host IRQ.
797 *
798 * @param plic_ctx A PLIC ISR context handle.
799 * @param spi_host_ctx A(n) spi_host ISR context handle.
800 * @param mute_status_irq set to true to disable the serviced status type IRQ.
801 * @param[out] peripheral_serviced Out param for the peripheral that was
802 * serviced.
803 * @param[out] irq_serviced Out param for the IRQ that was serviced.
804 */
806 plic_isr_ctx_t plic_ctx, spi_host_isr_ctx_t spi_host_ctx,
807 bool mute_status_irq, top_earlgrey_plic_peripheral_t *peripheral_serviced,
808 dif_spi_host_irq_t *irq_serviced);
809
810/**
811 * Services an sysrst_ctrl IRQ.
812 *
813 * @param plic_ctx A PLIC ISR context handle.
814 * @param sysrst_ctrl_ctx A(n) sysrst_ctrl ISR context handle.
815 * @param mute_status_irq set to true to disable the serviced status type IRQ.
816 * @param[out] peripheral_serviced Out param for the peripheral that was
817 * serviced.
818 * @param[out] irq_serviced Out param for the IRQ that was serviced.
819 */
821 plic_isr_ctx_t plic_ctx, sysrst_ctrl_isr_ctx_t sysrst_ctrl_ctx,
822 bool mute_status_irq, top_earlgrey_plic_peripheral_t *peripheral_serviced,
823 dif_sysrst_ctrl_irq_t *irq_serviced);
824
825/**
826 * Services an uart IRQ.
827 *
828 * @param plic_ctx A PLIC ISR context handle.
829 * @param uart_ctx A(n) uart ISR context handle.
830 * @param mute_status_irq set to true to disable the serviced status type IRQ.
831 * @param[out] peripheral_serviced Out param for the peripheral that was
832 * serviced.
833 * @param[out] irq_serviced Out param for the IRQ that was serviced.
834 */
836 bool mute_status_irq,
837 top_earlgrey_plic_peripheral_t *peripheral_serviced,
838 dif_uart_irq_t *irq_serviced);
839
840/**
841 * Services an usbdev IRQ.
842 *
843 * @param plic_ctx A PLIC ISR context handle.
844 * @param usbdev_ctx A(n) usbdev ISR context handle.
845 * @param mute_status_irq set to true to disable the serviced status type IRQ.
846 * @param[out] peripheral_serviced Out param for the peripheral that was
847 * serviced.
848 * @param[out] irq_serviced Out param for the IRQ that was serviced.
849 */
851 plic_isr_ctx_t plic_ctx, usbdev_isr_ctx_t usbdev_ctx, bool mute_status_irq,
852 top_earlgrey_plic_peripheral_t *peripheral_serviced,
853 dif_usbdev_irq_t *irq_serviced);
854
855#endif // OPENTITAN_SW_DEVICE_LIB_TESTING_AUTOGEN_ISR_TESTUTILS_H_