| // Copyright 2022 Google Inc. |
| // Licensed under the Apache License, Version 2.0, see LICENSE for details. |
| // SPDX-License-Identifier: Apache-2.0 |
| |
| #include "hw/top_matcha/sw/autogen/top_matcha.h" |
| |
| /** |
| * PLIC Interrupt Source to Peripheral Map |
| * |
| * This array is a mapping from `top_matcha_plic_irq_id_t` to |
| * `top_matcha_plic_peripheral_t`. |
| */ |
| const top_matcha_plic_peripheral_t |
| top_matcha_plic_interrupt_for_peripheral[190] = { |
| [kTopMatchaPlicIrqIdNone] = kTopMatchaPlicPeripheralUnknown, |
| [kTopMatchaPlicIrqIdUart0TxWatermark] = kTopMatchaPlicPeripheralUart0, |
| [kTopMatchaPlicIrqIdUart0RxWatermark] = kTopMatchaPlicPeripheralUart0, |
| [kTopMatchaPlicIrqIdUart0TxEmpty] = kTopMatchaPlicPeripheralUart0, |
| [kTopMatchaPlicIrqIdUart0RxOverflow] = kTopMatchaPlicPeripheralUart0, |
| [kTopMatchaPlicIrqIdUart0RxFrameErr] = kTopMatchaPlicPeripheralUart0, |
| [kTopMatchaPlicIrqIdUart0RxBreakErr] = kTopMatchaPlicPeripheralUart0, |
| [kTopMatchaPlicIrqIdUart0RxTimeout] = kTopMatchaPlicPeripheralUart0, |
| [kTopMatchaPlicIrqIdUart0RxParityErr] = kTopMatchaPlicPeripheralUart0, |
| [kTopMatchaPlicIrqIdUart1TxWatermark] = kTopMatchaPlicPeripheralUart1, |
| [kTopMatchaPlicIrqIdUart1RxWatermark] = kTopMatchaPlicPeripheralUart1, |
| [kTopMatchaPlicIrqIdUart1TxEmpty] = kTopMatchaPlicPeripheralUart1, |
| [kTopMatchaPlicIrqIdUart1RxOverflow] = kTopMatchaPlicPeripheralUart1, |
| [kTopMatchaPlicIrqIdUart1RxFrameErr] = kTopMatchaPlicPeripheralUart1, |
| [kTopMatchaPlicIrqIdUart1RxBreakErr] = kTopMatchaPlicPeripheralUart1, |
| [kTopMatchaPlicIrqIdUart1RxTimeout] = kTopMatchaPlicPeripheralUart1, |
| [kTopMatchaPlicIrqIdUart1RxParityErr] = kTopMatchaPlicPeripheralUart1, |
| [kTopMatchaPlicIrqIdUart2TxWatermark] = kTopMatchaPlicPeripheralUart2, |
| [kTopMatchaPlicIrqIdUart2RxWatermark] = kTopMatchaPlicPeripheralUart2, |
| [kTopMatchaPlicIrqIdUart2TxEmpty] = kTopMatchaPlicPeripheralUart2, |
| [kTopMatchaPlicIrqIdUart2RxOverflow] = kTopMatchaPlicPeripheralUart2, |
| [kTopMatchaPlicIrqIdUart2RxFrameErr] = kTopMatchaPlicPeripheralUart2, |
| [kTopMatchaPlicIrqIdUart2RxBreakErr] = kTopMatchaPlicPeripheralUart2, |
| [kTopMatchaPlicIrqIdUart2RxTimeout] = kTopMatchaPlicPeripheralUart2, |
| [kTopMatchaPlicIrqIdUart2RxParityErr] = kTopMatchaPlicPeripheralUart2, |
| [kTopMatchaPlicIrqIdUart3TxWatermark] = kTopMatchaPlicPeripheralUart3, |
| [kTopMatchaPlicIrqIdUart3RxWatermark] = kTopMatchaPlicPeripheralUart3, |
| [kTopMatchaPlicIrqIdUart3TxEmpty] = kTopMatchaPlicPeripheralUart3, |
| [kTopMatchaPlicIrqIdUart3RxOverflow] = kTopMatchaPlicPeripheralUart3, |
| [kTopMatchaPlicIrqIdUart3RxFrameErr] = kTopMatchaPlicPeripheralUart3, |
| [kTopMatchaPlicIrqIdUart3RxBreakErr] = kTopMatchaPlicPeripheralUart3, |
| [kTopMatchaPlicIrqIdUart3RxTimeout] = kTopMatchaPlicPeripheralUart3, |
| [kTopMatchaPlicIrqIdUart3RxParityErr] = kTopMatchaPlicPeripheralUart3, |
| [kTopMatchaPlicIrqIdGpioGpio0] = kTopMatchaPlicPeripheralGpio, |
| [kTopMatchaPlicIrqIdGpioGpio1] = kTopMatchaPlicPeripheralGpio, |
| [kTopMatchaPlicIrqIdGpioGpio2] = kTopMatchaPlicPeripheralGpio, |
| [kTopMatchaPlicIrqIdGpioGpio3] = kTopMatchaPlicPeripheralGpio, |
| [kTopMatchaPlicIrqIdGpioGpio4] = kTopMatchaPlicPeripheralGpio, |
| [kTopMatchaPlicIrqIdGpioGpio5] = kTopMatchaPlicPeripheralGpio, |
| [kTopMatchaPlicIrqIdGpioGpio6] = kTopMatchaPlicPeripheralGpio, |
| [kTopMatchaPlicIrqIdGpioGpio7] = kTopMatchaPlicPeripheralGpio, |
| [kTopMatchaPlicIrqIdGpioGpio8] = kTopMatchaPlicPeripheralGpio, |
| [kTopMatchaPlicIrqIdGpioGpio9] = kTopMatchaPlicPeripheralGpio, |
| [kTopMatchaPlicIrqIdGpioGpio10] = kTopMatchaPlicPeripheralGpio, |
| [kTopMatchaPlicIrqIdGpioGpio11] = kTopMatchaPlicPeripheralGpio, |
| [kTopMatchaPlicIrqIdGpioGpio12] = kTopMatchaPlicPeripheralGpio, |
| [kTopMatchaPlicIrqIdGpioGpio13] = kTopMatchaPlicPeripheralGpio, |
| [kTopMatchaPlicIrqIdGpioGpio14] = kTopMatchaPlicPeripheralGpio, |
| [kTopMatchaPlicIrqIdGpioGpio15] = kTopMatchaPlicPeripheralGpio, |
| [kTopMatchaPlicIrqIdGpioGpio16] = kTopMatchaPlicPeripheralGpio, |
| [kTopMatchaPlicIrqIdGpioGpio17] = kTopMatchaPlicPeripheralGpio, |
| [kTopMatchaPlicIrqIdGpioGpio18] = kTopMatchaPlicPeripheralGpio, |
| [kTopMatchaPlicIrqIdGpioGpio19] = kTopMatchaPlicPeripheralGpio, |
| [kTopMatchaPlicIrqIdGpioGpio20] = kTopMatchaPlicPeripheralGpio, |
| [kTopMatchaPlicIrqIdGpioGpio21] = kTopMatchaPlicPeripheralGpio, |
| [kTopMatchaPlicIrqIdGpioGpio22] = kTopMatchaPlicPeripheralGpio, |
| [kTopMatchaPlicIrqIdGpioGpio23] = kTopMatchaPlicPeripheralGpio, |
| [kTopMatchaPlicIrqIdGpioGpio24] = kTopMatchaPlicPeripheralGpio, |
| [kTopMatchaPlicIrqIdGpioGpio25] = kTopMatchaPlicPeripheralGpio, |
| [kTopMatchaPlicIrqIdGpioGpio26] = kTopMatchaPlicPeripheralGpio, |
| [kTopMatchaPlicIrqIdGpioGpio27] = kTopMatchaPlicPeripheralGpio, |
| [kTopMatchaPlicIrqIdGpioGpio28] = kTopMatchaPlicPeripheralGpio, |
| [kTopMatchaPlicIrqIdGpioGpio29] = kTopMatchaPlicPeripheralGpio, |
| [kTopMatchaPlicIrqIdGpioGpio30] = kTopMatchaPlicPeripheralGpio, |
| [kTopMatchaPlicIrqIdGpioGpio31] = kTopMatchaPlicPeripheralGpio, |
| [kTopMatchaPlicIrqIdSpiDeviceGenericRxFull] = kTopMatchaPlicPeripheralSpiDevice, |
| [kTopMatchaPlicIrqIdSpiDeviceGenericRxWatermark] = kTopMatchaPlicPeripheralSpiDevice, |
| [kTopMatchaPlicIrqIdSpiDeviceGenericTxWatermark] = kTopMatchaPlicPeripheralSpiDevice, |
| [kTopMatchaPlicIrqIdSpiDeviceGenericRxError] = kTopMatchaPlicPeripheralSpiDevice, |
| [kTopMatchaPlicIrqIdSpiDeviceGenericRxOverflow] = kTopMatchaPlicPeripheralSpiDevice, |
| [kTopMatchaPlicIrqIdSpiDeviceGenericTxUnderflow] = kTopMatchaPlicPeripheralSpiDevice, |
| [kTopMatchaPlicIrqIdSpiDeviceUploadCmdfifoNotEmpty] = kTopMatchaPlicPeripheralSpiDevice, |
| [kTopMatchaPlicIrqIdSpiDeviceUploadPayloadNotEmpty] = kTopMatchaPlicPeripheralSpiDevice, |
| [kTopMatchaPlicIrqIdSpiDeviceUploadPayloadOverflow] = kTopMatchaPlicPeripheralSpiDevice, |
| [kTopMatchaPlicIrqIdSpiDeviceReadbufWatermark] = kTopMatchaPlicPeripheralSpiDevice, |
| [kTopMatchaPlicIrqIdSpiDeviceReadbufFlip] = kTopMatchaPlicPeripheralSpiDevice, |
| [kTopMatchaPlicIrqIdSpiDeviceTpmHeaderNotEmpty] = kTopMatchaPlicPeripheralSpiDevice, |
| [kTopMatchaPlicIrqIdI2c0FmtThreshold] = kTopMatchaPlicPeripheralI2c0, |
| [kTopMatchaPlicIrqIdI2c0RxThreshold] = kTopMatchaPlicPeripheralI2c0, |
| [kTopMatchaPlicIrqIdI2c0FmtOverflow] = kTopMatchaPlicPeripheralI2c0, |
| [kTopMatchaPlicIrqIdI2c0RxOverflow] = kTopMatchaPlicPeripheralI2c0, |
| [kTopMatchaPlicIrqIdI2c0Nak] = kTopMatchaPlicPeripheralI2c0, |
| [kTopMatchaPlicIrqIdI2c0SclInterference] = kTopMatchaPlicPeripheralI2c0, |
| [kTopMatchaPlicIrqIdI2c0SdaInterference] = kTopMatchaPlicPeripheralI2c0, |
| [kTopMatchaPlicIrqIdI2c0StretchTimeout] = kTopMatchaPlicPeripheralI2c0, |
| [kTopMatchaPlicIrqIdI2c0SdaUnstable] = kTopMatchaPlicPeripheralI2c0, |
| [kTopMatchaPlicIrqIdI2c0CmdComplete] = kTopMatchaPlicPeripheralI2c0, |
| [kTopMatchaPlicIrqIdI2c0TxStretch] = kTopMatchaPlicPeripheralI2c0, |
| [kTopMatchaPlicIrqIdI2c0TxOverflow] = kTopMatchaPlicPeripheralI2c0, |
| [kTopMatchaPlicIrqIdI2c0AcqFull] = kTopMatchaPlicPeripheralI2c0, |
| [kTopMatchaPlicIrqIdI2c0UnexpStop] = kTopMatchaPlicPeripheralI2c0, |
| [kTopMatchaPlicIrqIdI2c0HostTimeout] = kTopMatchaPlicPeripheralI2c0, |
| [kTopMatchaPlicIrqIdI2c1FmtThreshold] = kTopMatchaPlicPeripheralI2c1, |
| [kTopMatchaPlicIrqIdI2c1RxThreshold] = kTopMatchaPlicPeripheralI2c1, |
| [kTopMatchaPlicIrqIdI2c1FmtOverflow] = kTopMatchaPlicPeripheralI2c1, |
| [kTopMatchaPlicIrqIdI2c1RxOverflow] = kTopMatchaPlicPeripheralI2c1, |
| [kTopMatchaPlicIrqIdI2c1Nak] = kTopMatchaPlicPeripheralI2c1, |
| [kTopMatchaPlicIrqIdI2c1SclInterference] = kTopMatchaPlicPeripheralI2c1, |
| [kTopMatchaPlicIrqIdI2c1SdaInterference] = kTopMatchaPlicPeripheralI2c1, |
| [kTopMatchaPlicIrqIdI2c1StretchTimeout] = kTopMatchaPlicPeripheralI2c1, |
| [kTopMatchaPlicIrqIdI2c1SdaUnstable] = kTopMatchaPlicPeripheralI2c1, |
| [kTopMatchaPlicIrqIdI2c1CmdComplete] = kTopMatchaPlicPeripheralI2c1, |
| [kTopMatchaPlicIrqIdI2c1TxStretch] = kTopMatchaPlicPeripheralI2c1, |
| [kTopMatchaPlicIrqIdI2c1TxOverflow] = kTopMatchaPlicPeripheralI2c1, |
| [kTopMatchaPlicIrqIdI2c1AcqFull] = kTopMatchaPlicPeripheralI2c1, |
| [kTopMatchaPlicIrqIdI2c1UnexpStop] = kTopMatchaPlicPeripheralI2c1, |
| [kTopMatchaPlicIrqIdI2c1HostTimeout] = kTopMatchaPlicPeripheralI2c1, |
| [kTopMatchaPlicIrqIdI2c2FmtThreshold] = kTopMatchaPlicPeripheralI2c2, |
| [kTopMatchaPlicIrqIdI2c2RxThreshold] = kTopMatchaPlicPeripheralI2c2, |
| [kTopMatchaPlicIrqIdI2c2FmtOverflow] = kTopMatchaPlicPeripheralI2c2, |
| [kTopMatchaPlicIrqIdI2c2RxOverflow] = kTopMatchaPlicPeripheralI2c2, |
| [kTopMatchaPlicIrqIdI2c2Nak] = kTopMatchaPlicPeripheralI2c2, |
| [kTopMatchaPlicIrqIdI2c2SclInterference] = kTopMatchaPlicPeripheralI2c2, |
| [kTopMatchaPlicIrqIdI2c2SdaInterference] = kTopMatchaPlicPeripheralI2c2, |
| [kTopMatchaPlicIrqIdI2c2StretchTimeout] = kTopMatchaPlicPeripheralI2c2, |
| [kTopMatchaPlicIrqIdI2c2SdaUnstable] = kTopMatchaPlicPeripheralI2c2, |
| [kTopMatchaPlicIrqIdI2c2CmdComplete] = kTopMatchaPlicPeripheralI2c2, |
| [kTopMatchaPlicIrqIdI2c2TxStretch] = kTopMatchaPlicPeripheralI2c2, |
| [kTopMatchaPlicIrqIdI2c2TxOverflow] = kTopMatchaPlicPeripheralI2c2, |
| [kTopMatchaPlicIrqIdI2c2AcqFull] = kTopMatchaPlicPeripheralI2c2, |
| [kTopMatchaPlicIrqIdI2c2UnexpStop] = kTopMatchaPlicPeripheralI2c2, |
| [kTopMatchaPlicIrqIdI2c2HostTimeout] = kTopMatchaPlicPeripheralI2c2, |
| [kTopMatchaPlicIrqIdPattgenDoneCh0] = kTopMatchaPlicPeripheralPattgen, |
| [kTopMatchaPlicIrqIdPattgenDoneCh1] = kTopMatchaPlicPeripheralPattgen, |
| [kTopMatchaPlicIrqIdRvTimerTimerExpiredHart0Timer0] = kTopMatchaPlicPeripheralRvTimer, |
| [kTopMatchaPlicIrqIdOtpCtrlOtpOperationDone] = kTopMatchaPlicPeripheralOtpCtrl, |
| [kTopMatchaPlicIrqIdOtpCtrlOtpError] = kTopMatchaPlicPeripheralOtpCtrl, |
| [kTopMatchaPlicIrqIdAlertHandlerClassa] = kTopMatchaPlicPeripheralAlertHandler, |
| [kTopMatchaPlicIrqIdAlertHandlerClassb] = kTopMatchaPlicPeripheralAlertHandler, |
| [kTopMatchaPlicIrqIdAlertHandlerClassc] = kTopMatchaPlicPeripheralAlertHandler, |
| [kTopMatchaPlicIrqIdAlertHandlerClassd] = kTopMatchaPlicPeripheralAlertHandler, |
| [kTopMatchaPlicIrqIdSpiHost0Error] = kTopMatchaPlicPeripheralSpiHost0, |
| [kTopMatchaPlicIrqIdSpiHost0SpiEvent] = kTopMatchaPlicPeripheralSpiHost0, |
| [kTopMatchaPlicIrqIdSpiHost1Error] = kTopMatchaPlicPeripheralSpiHost1, |
| [kTopMatchaPlicIrqIdSpiHost1SpiEvent] = kTopMatchaPlicPeripheralSpiHost1, |
| [kTopMatchaPlicIrqIdUsbdevPktReceived] = kTopMatchaPlicPeripheralUsbdev, |
| [kTopMatchaPlicIrqIdUsbdevPktSent] = kTopMatchaPlicPeripheralUsbdev, |
| [kTopMatchaPlicIrqIdUsbdevDisconnected] = kTopMatchaPlicPeripheralUsbdev, |
| [kTopMatchaPlicIrqIdUsbdevHostLost] = kTopMatchaPlicPeripheralUsbdev, |
| [kTopMatchaPlicIrqIdUsbdevLinkReset] = kTopMatchaPlicPeripheralUsbdev, |
| [kTopMatchaPlicIrqIdUsbdevLinkSuspend] = kTopMatchaPlicPeripheralUsbdev, |
| [kTopMatchaPlicIrqIdUsbdevLinkResume] = kTopMatchaPlicPeripheralUsbdev, |
| [kTopMatchaPlicIrqIdUsbdevAvEmpty] = kTopMatchaPlicPeripheralUsbdev, |
| [kTopMatchaPlicIrqIdUsbdevRxFull] = kTopMatchaPlicPeripheralUsbdev, |
| [kTopMatchaPlicIrqIdUsbdevAvOverflow] = kTopMatchaPlicPeripheralUsbdev, |
| [kTopMatchaPlicIrqIdUsbdevLinkInErr] = kTopMatchaPlicPeripheralUsbdev, |
| [kTopMatchaPlicIrqIdUsbdevRxCrcErr] = kTopMatchaPlicPeripheralUsbdev, |
| [kTopMatchaPlicIrqIdUsbdevRxPidErr] = kTopMatchaPlicPeripheralUsbdev, |
| [kTopMatchaPlicIrqIdUsbdevRxBitstuffErr] = kTopMatchaPlicPeripheralUsbdev, |
| [kTopMatchaPlicIrqIdUsbdevFrame] = kTopMatchaPlicPeripheralUsbdev, |
| [kTopMatchaPlicIrqIdUsbdevPowered] = kTopMatchaPlicPeripheralUsbdev, |
| [kTopMatchaPlicIrqIdUsbdevLinkOutErr] = kTopMatchaPlicPeripheralUsbdev, |
| [kTopMatchaPlicIrqIdPwrmgrAonWakeup] = kTopMatchaPlicPeripheralPwrmgrAon, |
| [kTopMatchaPlicIrqIdSysrstCtrlAonEventDetected] = kTopMatchaPlicPeripheralSysrstCtrlAon, |
| [kTopMatchaPlicIrqIdAdcCtrlAonMatchDone] = kTopMatchaPlicPeripheralAdcCtrlAon, |
| [kTopMatchaPlicIrqIdAonTimerAonWkupTimerExpired] = kTopMatchaPlicPeripheralAonTimerAon, |
| [kTopMatchaPlicIrqIdAonTimerAonWdogTimerBark] = kTopMatchaPlicPeripheralAonTimerAon, |
| [kTopMatchaPlicIrqIdSensorCtrlIoStatusChange] = kTopMatchaPlicPeripheralSensorCtrl, |
| [kTopMatchaPlicIrqIdSensorCtrlInitStatusChange] = kTopMatchaPlicPeripheralSensorCtrl, |
| [kTopMatchaPlicIrqIdFlashCtrlProgEmpty] = kTopMatchaPlicPeripheralFlashCtrl, |
| [kTopMatchaPlicIrqIdFlashCtrlProgLvl] = kTopMatchaPlicPeripheralFlashCtrl, |
| [kTopMatchaPlicIrqIdFlashCtrlRdFull] = kTopMatchaPlicPeripheralFlashCtrl, |
| [kTopMatchaPlicIrqIdFlashCtrlRdLvl] = kTopMatchaPlicPeripheralFlashCtrl, |
| [kTopMatchaPlicIrqIdFlashCtrlOpDone] = kTopMatchaPlicPeripheralFlashCtrl, |
| [kTopMatchaPlicIrqIdFlashCtrlCorrErr] = kTopMatchaPlicPeripheralFlashCtrl, |
| [kTopMatchaPlicIrqIdHmacHmacDone] = kTopMatchaPlicPeripheralHmac, |
| [kTopMatchaPlicIrqIdHmacFifoEmpty] = kTopMatchaPlicPeripheralHmac, |
| [kTopMatchaPlicIrqIdHmacHmacErr] = kTopMatchaPlicPeripheralHmac, |
| [kTopMatchaPlicIrqIdKmacKmacDone] = kTopMatchaPlicPeripheralKmac, |
| [kTopMatchaPlicIrqIdKmacFifoEmpty] = kTopMatchaPlicPeripheralKmac, |
| [kTopMatchaPlicIrqIdKmacKmacErr] = kTopMatchaPlicPeripheralKmac, |
| [kTopMatchaPlicIrqIdOtbnDone] = kTopMatchaPlicPeripheralOtbn, |
| [kTopMatchaPlicIrqIdKeymgrOpDone] = kTopMatchaPlicPeripheralKeymgr, |
| [kTopMatchaPlicIrqIdCsrngCsCmdReqDone] = kTopMatchaPlicPeripheralCsrng, |
| [kTopMatchaPlicIrqIdCsrngCsEntropyReq] = kTopMatchaPlicPeripheralCsrng, |
| [kTopMatchaPlicIrqIdCsrngCsHwInstExc] = kTopMatchaPlicPeripheralCsrng, |
| [kTopMatchaPlicIrqIdCsrngCsFatalErr] = kTopMatchaPlicPeripheralCsrng, |
| [kTopMatchaPlicIrqIdEntropySrcEsEntropyValid] = kTopMatchaPlicPeripheralEntropySrc, |
| [kTopMatchaPlicIrqIdEntropySrcEsHealthTestFailed] = kTopMatchaPlicPeripheralEntropySrc, |
| [kTopMatchaPlicIrqIdEntropySrcEsObserveFifoReady] = kTopMatchaPlicPeripheralEntropySrc, |
| [kTopMatchaPlicIrqIdEntropySrcEsFatalErr] = kTopMatchaPlicPeripheralEntropySrc, |
| [kTopMatchaPlicIrqIdEdn0EdnCmdReqDone] = kTopMatchaPlicPeripheralEdn0, |
| [kTopMatchaPlicIrqIdEdn0EdnFatalErr] = kTopMatchaPlicPeripheralEdn0, |
| [kTopMatchaPlicIrqIdEdn1EdnCmdReqDone] = kTopMatchaPlicPeripheralEdn1, |
| [kTopMatchaPlicIrqIdEdn1EdnFatalErr] = kTopMatchaPlicPeripheralEdn1, |
| [kTopMatchaPlicIrqIdDma0WriterDone] = kTopMatchaPlicPeripheralDma0, |
| [kTopMatchaPlicIrqIdDma0ReaderDone] = kTopMatchaPlicPeripheralDma0, |
| [kTopMatchaPlicIrqIdTlulMailboxSecWtirq] = kTopMatchaPlicPeripheralTlulMailboxSec, |
| [kTopMatchaPlicIrqIdTlulMailboxSecRtirq] = kTopMatchaPlicPeripheralTlulMailboxSec, |
| [kTopMatchaPlicIrqIdTlulMailboxSecEirq] = kTopMatchaPlicPeripheralTlulMailboxSec, |
| }; |
| |
| const top_matcha_plic_peripheral_smc_t |
| top_matcha_plic_interrupt_for_peripheral_smc[43] = { |
| [kTopMatchaPlicIrqIdNoneSmc] = kTopMatchaPlicPeripheralUnknownSmc, |
| [kTopMatchaPlicIrqIdSmcUartTxWatermark] = kTopMatchaPlicPeripheralSmcUart, |
| [kTopMatchaPlicIrqIdSmcUartRxWatermark] = kTopMatchaPlicPeripheralSmcUart, |
| [kTopMatchaPlicIrqIdSmcUartTxEmpty] = kTopMatchaPlicPeripheralSmcUart, |
| [kTopMatchaPlicIrqIdSmcUartRxOverflow] = kTopMatchaPlicPeripheralSmcUart, |
| [kTopMatchaPlicIrqIdSmcUartRxFrameErr] = kTopMatchaPlicPeripheralSmcUart, |
| [kTopMatchaPlicIrqIdSmcUartRxBreakErr] = kTopMatchaPlicPeripheralSmcUart, |
| [kTopMatchaPlicIrqIdSmcUartRxTimeout] = kTopMatchaPlicPeripheralSmcUart, |
| [kTopMatchaPlicIrqIdSmcUartRxParityErr] = kTopMatchaPlicPeripheralSmcUart, |
| [kTopMatchaPlicIrqIdRvTimerSmcTimerExpiredHart0Timer0] = kTopMatchaPlicPeripheralRvTimerSmc, |
| [kTopMatchaPlicIrqIdCamI2cFmtThreshold] = kTopMatchaPlicPeripheralCamI2c, |
| [kTopMatchaPlicIrqIdCamI2cRxThreshold] = kTopMatchaPlicPeripheralCamI2c, |
| [kTopMatchaPlicIrqIdCamI2cFmtOverflow] = kTopMatchaPlicPeripheralCamI2c, |
| [kTopMatchaPlicIrqIdCamI2cRxOverflow] = kTopMatchaPlicPeripheralCamI2c, |
| [kTopMatchaPlicIrqIdCamI2cNak] = kTopMatchaPlicPeripheralCamI2c, |
| [kTopMatchaPlicIrqIdCamI2cSclInterference] = kTopMatchaPlicPeripheralCamI2c, |
| [kTopMatchaPlicIrqIdCamI2cSdaInterference] = kTopMatchaPlicPeripheralCamI2c, |
| [kTopMatchaPlicIrqIdCamI2cStretchTimeout] = kTopMatchaPlicPeripheralCamI2c, |
| [kTopMatchaPlicIrqIdCamI2cSdaUnstable] = kTopMatchaPlicPeripheralCamI2c, |
| [kTopMatchaPlicIrqIdCamI2cCmdComplete] = kTopMatchaPlicPeripheralCamI2c, |
| [kTopMatchaPlicIrqIdCamI2cTxStretch] = kTopMatchaPlicPeripheralCamI2c, |
| [kTopMatchaPlicIrqIdCamI2cTxOverflow] = kTopMatchaPlicPeripheralCamI2c, |
| [kTopMatchaPlicIrqIdCamI2cAcqFull] = kTopMatchaPlicPeripheralCamI2c, |
| [kTopMatchaPlicIrqIdCamI2cUnexpStop] = kTopMatchaPlicPeripheralCamI2c, |
| [kTopMatchaPlicIrqIdCamI2cHostTimeout] = kTopMatchaPlicPeripheralCamI2c, |
| [kTopMatchaPlicIrqIdCamCtrlCamMotionDetect] = kTopMatchaPlicPeripheralCamCtrl, |
| [kTopMatchaPlicIrqIdIspWrapperIsp] = kTopMatchaPlicPeripheralIspWrapper, |
| [kTopMatchaPlicIrqIdIspWrapperMi] = kTopMatchaPlicPeripheralIspWrapper, |
| [kTopMatchaPlicIrqIdDmaSmcWriterDone] = kTopMatchaPlicPeripheralDmaSmc, |
| [kTopMatchaPlicIrqIdDmaSmcReaderDone] = kTopMatchaPlicPeripheralDmaSmc, |
| [kTopMatchaPlicIrqIdTlulMailboxSmcWtirq] = kTopMatchaPlicPeripheralTlulMailboxSmc, |
| [kTopMatchaPlicIrqIdTlulMailboxSmcRtirq] = kTopMatchaPlicPeripheralTlulMailboxSmc, |
| [kTopMatchaPlicIrqIdTlulMailboxSmcEirq] = kTopMatchaPlicPeripheralTlulMailboxSmc, |
| [kTopMatchaPlicIrqIdMlTopHostReq] = kTopMatchaPlicPeripheralMlTop, |
| [kTopMatchaPlicIrqIdMlTopFinish] = kTopMatchaPlicPeripheralMlTop, |
| [kTopMatchaPlicIrqIdMlTopFault] = kTopMatchaPlicPeripheralMlTop, |
| [kTopMatchaPlicIrqIdSpiHost2Error] = kTopMatchaPlicPeripheralSpiHost2, |
| [kTopMatchaPlicIrqIdSpiHost2SpiEvent] = kTopMatchaPlicPeripheralSpiHost2, |
| [kTopMatchaPlicIrqIdRvTimerSmc2TimerExpiredHart0Timer0] = kTopMatchaPlicPeripheralRvTimerSmc2, |
| [kTopMatchaPlicIrqIdI2s0TxWatermark] = kTopMatchaPlicPeripheralI2s0, |
| [kTopMatchaPlicIrqIdI2s0RxWatermark] = kTopMatchaPlicPeripheralI2s0, |
| [kTopMatchaPlicIrqIdI2s0TxEmpty] = kTopMatchaPlicPeripheralI2s0, |
| [kTopMatchaPlicIrqIdI2s0RxOverflow] = kTopMatchaPlicPeripheralI2s0, |
| }; |
| |
| |
| /** |
| * Alert Handler Alert Source to Peripheral Map |
| * |
| * This array is a mapping from `top_matcha_alert_id_t` to |
| * `top_matcha_alert_peripheral_t`. |
| */ |
| const top_matcha_alert_peripheral_t |
| top_matcha_alert_for_peripheral[75] = { |
| [kTopMatchaAlertIdUart0FatalFault] = kTopMatchaAlertPeripheralUart0, |
| [kTopMatchaAlertIdUart1FatalFault] = kTopMatchaAlertPeripheralUart1, |
| [kTopMatchaAlertIdUart2FatalFault] = kTopMatchaAlertPeripheralUart2, |
| [kTopMatchaAlertIdUart3FatalFault] = kTopMatchaAlertPeripheralUart3, |
| [kTopMatchaAlertIdGpioFatalFault] = kTopMatchaAlertPeripheralGpio, |
| [kTopMatchaAlertIdSpiDeviceFatalFault] = kTopMatchaAlertPeripheralSpiDevice, |
| [kTopMatchaAlertIdI2c0FatalFault] = kTopMatchaAlertPeripheralI2c0, |
| [kTopMatchaAlertIdI2c1FatalFault] = kTopMatchaAlertPeripheralI2c1, |
| [kTopMatchaAlertIdI2c2FatalFault] = kTopMatchaAlertPeripheralI2c2, |
| [kTopMatchaAlertIdPattgenFatalFault] = kTopMatchaAlertPeripheralPattgen, |
| [kTopMatchaAlertIdRvTimerFatalFault] = kTopMatchaAlertPeripheralRvTimer, |
| [kTopMatchaAlertIdOtpCtrlFatalMacroError] = kTopMatchaAlertPeripheralOtpCtrl, |
| [kTopMatchaAlertIdOtpCtrlFatalCheckError] = kTopMatchaAlertPeripheralOtpCtrl, |
| [kTopMatchaAlertIdOtpCtrlFatalBusIntegError] = kTopMatchaAlertPeripheralOtpCtrl, |
| [kTopMatchaAlertIdOtpCtrlFatalPrimOtpAlert] = kTopMatchaAlertPeripheralOtpCtrl, |
| [kTopMatchaAlertIdOtpCtrlRecovPrimOtpAlert] = kTopMatchaAlertPeripheralOtpCtrl, |
| [kTopMatchaAlertIdLcCtrlFatalProgError] = kTopMatchaAlertPeripheralLcCtrl, |
| [kTopMatchaAlertIdLcCtrlFatalStateError] = kTopMatchaAlertPeripheralLcCtrl, |
| [kTopMatchaAlertIdLcCtrlFatalBusIntegError] = kTopMatchaAlertPeripheralLcCtrl, |
| [kTopMatchaAlertIdSpiHost0FatalFault] = kTopMatchaAlertPeripheralSpiHost0, |
| [kTopMatchaAlertIdSpiHost1FatalFault] = kTopMatchaAlertPeripheralSpiHost1, |
| [kTopMatchaAlertIdUsbdevFatalFault] = kTopMatchaAlertPeripheralUsbdev, |
| [kTopMatchaAlertIdPwrmgrAonFatalFault] = kTopMatchaAlertPeripheralPwrmgrAon, |
| [kTopMatchaAlertIdRstmgrAonFatalFault] = kTopMatchaAlertPeripheralRstmgrAon, |
| [kTopMatchaAlertIdRstmgrAonFatalCnstyFault] = kTopMatchaAlertPeripheralRstmgrAon, |
| [kTopMatchaAlertIdClkmgrAonRecovFault] = kTopMatchaAlertPeripheralClkmgrAon, |
| [kTopMatchaAlertIdClkmgrAonFatalFault] = kTopMatchaAlertPeripheralClkmgrAon, |
| [kTopMatchaAlertIdSysrstCtrlAonFatalFault] = kTopMatchaAlertPeripheralSysrstCtrlAon, |
| [kTopMatchaAlertIdAdcCtrlAonFatalFault] = kTopMatchaAlertPeripheralAdcCtrlAon, |
| [kTopMatchaAlertIdPwmAonFatalFault] = kTopMatchaAlertPeripheralPwmAon, |
| [kTopMatchaAlertIdPinmuxAonFatalFault] = kTopMatchaAlertPeripheralPinmuxAon, |
| [kTopMatchaAlertIdAonTimerAonFatalFault] = kTopMatchaAlertPeripheralAonTimerAon, |
| [kTopMatchaAlertIdSensorCtrlRecovAlert] = kTopMatchaAlertPeripheralSensorCtrl, |
| [kTopMatchaAlertIdSensorCtrlFatalAlert] = kTopMatchaAlertPeripheralSensorCtrl, |
| [kTopMatchaAlertIdSramCtrlRetAonFatalError] = kTopMatchaAlertPeripheralSramCtrlRetAon, |
| [kTopMatchaAlertIdFlashCtrlRecovErr] = kTopMatchaAlertPeripheralFlashCtrl, |
| [kTopMatchaAlertIdFlashCtrlFatalStdErr] = kTopMatchaAlertPeripheralFlashCtrl, |
| [kTopMatchaAlertIdFlashCtrlFatalErr] = kTopMatchaAlertPeripheralFlashCtrl, |
| [kTopMatchaAlertIdFlashCtrlFatalPrimFlashAlert] = kTopMatchaAlertPeripheralFlashCtrl, |
| [kTopMatchaAlertIdFlashCtrlRecovPrimFlashAlert] = kTopMatchaAlertPeripheralFlashCtrl, |
| [kTopMatchaAlertIdRvDmFatalFault] = kTopMatchaAlertPeripheralRvDm, |
| [kTopMatchaAlertIdRvPlicFatalFault] = kTopMatchaAlertPeripheralRvPlic, |
| [kTopMatchaAlertIdAesRecovCtrlUpdateErr] = kTopMatchaAlertPeripheralAes, |
| [kTopMatchaAlertIdAesFatalFault] = kTopMatchaAlertPeripheralAes, |
| [kTopMatchaAlertIdHmacFatalFault] = kTopMatchaAlertPeripheralHmac, |
| [kTopMatchaAlertIdKmacRecovOperationErr] = kTopMatchaAlertPeripheralKmac, |
| [kTopMatchaAlertIdKmacFatalFaultErr] = kTopMatchaAlertPeripheralKmac, |
| [kTopMatchaAlertIdOtbnFatal] = kTopMatchaAlertPeripheralOtbn, |
| [kTopMatchaAlertIdOtbnRecov] = kTopMatchaAlertPeripheralOtbn, |
| [kTopMatchaAlertIdKeymgrRecovOperationErr] = kTopMatchaAlertPeripheralKeymgr, |
| [kTopMatchaAlertIdKeymgrFatalFaultErr] = kTopMatchaAlertPeripheralKeymgr, |
| [kTopMatchaAlertIdCsrngRecovAlert] = kTopMatchaAlertPeripheralCsrng, |
| [kTopMatchaAlertIdCsrngFatalAlert] = kTopMatchaAlertPeripheralCsrng, |
| [kTopMatchaAlertIdEntropySrcRecovAlert] = kTopMatchaAlertPeripheralEntropySrc, |
| [kTopMatchaAlertIdEntropySrcFatalAlert] = kTopMatchaAlertPeripheralEntropySrc, |
| [kTopMatchaAlertIdEdn0RecovAlert] = kTopMatchaAlertPeripheralEdn0, |
| [kTopMatchaAlertIdEdn0FatalAlert] = kTopMatchaAlertPeripheralEdn0, |
| [kTopMatchaAlertIdEdn1RecovAlert] = kTopMatchaAlertPeripheralEdn1, |
| [kTopMatchaAlertIdEdn1FatalAlert] = kTopMatchaAlertPeripheralEdn1, |
| [kTopMatchaAlertIdSramCtrlMainFatalError] = kTopMatchaAlertPeripheralSramCtrlMain, |
| [kTopMatchaAlertIdRomCtrlFatal] = kTopMatchaAlertPeripheralRomCtrl, |
| [kTopMatchaAlertIdRvCoreIbexSecFatalSwErr] = kTopMatchaAlertPeripheralRvCoreIbexSec, |
| [kTopMatchaAlertIdRvCoreIbexSecRecovSwErr] = kTopMatchaAlertPeripheralRvCoreIbexSec, |
| [kTopMatchaAlertIdRvCoreIbexSecFatalHwErr] = kTopMatchaAlertPeripheralRvCoreIbexSec, |
| [kTopMatchaAlertIdRvCoreIbexSecRecovHwErr] = kTopMatchaAlertPeripheralRvCoreIbexSec, |
| [kTopMatchaAlertIdSmcUartFatalFault] = kTopMatchaAlertPeripheralSmcUart, |
| [kTopMatchaAlertIdRvTimerSmcFatalFault] = kTopMatchaAlertPeripheralRvTimerSmc, |
| [kTopMatchaAlertIdCamI2cFatalFault] = kTopMatchaAlertPeripheralCamI2c, |
| [kTopMatchaAlertIdRvPlicSmcFatalFault] = kTopMatchaAlertPeripheralRvPlicSmc, |
| [kTopMatchaAlertIdSpiHost2FatalFault] = kTopMatchaAlertPeripheralSpiHost2, |
| [kTopMatchaAlertIdRvTimerSmc2FatalFault] = kTopMatchaAlertPeripheralRvTimerSmc2, |
| [kTopMatchaAlertIdRvCoreIbexSmcFatalSwErr] = kTopMatchaAlertPeripheralRvCoreIbexSmc, |
| [kTopMatchaAlertIdRvCoreIbexSmcRecovSwErr] = kTopMatchaAlertPeripheralRvCoreIbexSmc, |
| [kTopMatchaAlertIdRvCoreIbexSmcFatalHwErr] = kTopMatchaAlertPeripheralRvCoreIbexSmc, |
| [kTopMatchaAlertIdRvCoreIbexSmcRecovHwErr] = kTopMatchaAlertPeripheralRvCoreIbexSmc, |
| }; |
| |