Device Tables (DT) for IP alert_handler and top earlgrey. More...
Go to the source code of this file.
Macros | |
#define | OPENTITAN_ALERT_HANDLER_HAS_ALERT_OBSERVE 1 |
List of supported hardware features. | |
#define | OPENTITAN_ALERT_HANDLER_HAS_ALERT_INTERRUPT 1 |
#define | OPENTITAN_ALERT_HANDLER_HAS_ALERT_ESCALATE 1 |
#define | OPENTITAN_ALERT_HANDLER_HAS_PING_TIMER 1 |
#define | OPENTITAN_ALERT_HANDLER_HAS_ESCALATION_COUNT 1 |
#define | OPENTITAN_ALERT_HANDLER_HAS_ESCALATION_TIMEOUT 1 |
#define | OPENTITAN_ALERT_HANDLER_HAS_ESCALATION_PHASES 1 |
#define | OPENTITAN_ALERT_HANDLER_HAS_CRASH_DUMP 1 |
Typedefs | |
typedef enum dt_alert_handler | dt_alert_handler_t |
List of instances. | |
typedef enum dt_alert_handler_reg_block | dt_alert_handler_reg_block_t |
List of register blocks. | |
typedef enum dt_alert_handler_irq | dt_alert_handler_irq_t |
List of IRQs. | |
typedef enum dt_alert_handler_clock | dt_alert_handler_clock_t |
List of clock ports. | |
typedef enum dt_alert_handler_reset | dt_alert_handler_reset_t |
List of reset ports. | |
Enumerations | |
enum | dt_alert_handler { kDtAlertHandler = 0 , kDtAlertHandlerFirst = 0 , kDtAlertHandlerCount = 1 } |
List of instances. More... | |
enum | dt_alert_handler_reg_block { kDtAlertHandlerRegBlockCore = 0 , kDtAlertHandlerRegBlockCount = 1 } |
List of register blocks. More... | |
enum | dt_alert_handler_irq { kDtAlertHandlerIrqClassa = 0 , kDtAlertHandlerIrqClassb = 1 , kDtAlertHandlerIrqClassc = 2 , kDtAlertHandlerIrqClassd = 3 , kDtAlertHandlerIrqCount = 4 } |
List of IRQs. More... | |
enum | dt_alert_handler_clock { kDtAlertHandlerClockClk = 0 , kDtAlertHandlerClockEdn = 1 , kDtAlertHandlerClockCount = 2 } |
List of clock ports. More... | |
enum | dt_alert_handler_reset { kDtAlertHandlerResetRst = 0 , kDtAlertHandlerResetEdn = 1 , kDtAlertHandlerResetCount = 2 } |
List of reset ports. More... | |
Device Tables (DT) for IP alert_handler and top earlgrey.
This file contains the type definitions and global functions of the alert_handler.
Definition in file dt_alert_handler.h.
#define OPENTITAN_ALERT_HANDLER_HAS_ALERT_ESCALATE 1 |
Definition at line 82 of file dt_alert_handler.h.
#define OPENTITAN_ALERT_HANDLER_HAS_ALERT_INTERRUPT 1 |
Definition at line 81 of file dt_alert_handler.h.
#define OPENTITAN_ALERT_HANDLER_HAS_ALERT_OBSERVE 1 |
List of supported hardware features.
Definition at line 80 of file dt_alert_handler.h.
#define OPENTITAN_ALERT_HANDLER_HAS_CRASH_DUMP 1 |
Definition at line 87 of file dt_alert_handler.h.
#define OPENTITAN_ALERT_HANDLER_HAS_ESCALATION_COUNT 1 |
Definition at line 84 of file dt_alert_handler.h.
#define OPENTITAN_ALERT_HANDLER_HAS_ESCALATION_PHASES 1 |
Definition at line 86 of file dt_alert_handler.h.
#define OPENTITAN_ALERT_HANDLER_HAS_ESCALATION_TIMEOUT 1 |
Definition at line 85 of file dt_alert_handler.h.
#define OPENTITAN_ALERT_HANDLER_HAS_PING_TIMER 1 |
Definition at line 83 of file dt_alert_handler.h.
typedef enum dt_alert_handler_clock dt_alert_handler_clock_t |
List of clock ports.
Clock ports are guaranteed to be numbered consecutively from 0.
typedef enum dt_alert_handler_irq dt_alert_handler_irq_t |
List of IRQs.
IRQs are guaranteed to be numbered consecutively from 0.
typedef enum dt_alert_handler_reg_block dt_alert_handler_reg_block_t |
List of register blocks.
Register blocks are guaranteed to start at 0 and to be consecutively numbered.
typedef enum dt_alert_handler_reset dt_alert_handler_reset_t |
List of reset ports.
Reset ports are guaranteed to be numbered consecutively from 0.
enum dt_alert_handler |
List of instances.
Enumerator | |
---|---|
kDtAlertHandler | alert_handler |
Definition at line 23 of file dt_alert_handler.h.
List of clock ports.
Clock ports are guaranteed to be numbered consecutively from 0.
Enumerator | |
---|---|
kDtAlertHandlerClockClk | Clock port clk_i. |
kDtAlertHandlerClockEdn | Clock port clk_edn_i. |
Definition at line 60 of file dt_alert_handler.h.
enum dt_alert_handler_irq |
List of IRQs.
IRQs are guaranteed to be numbered consecutively from 0.
Definition at line 47 of file dt_alert_handler.h.
List of register blocks.
Register blocks are guaranteed to start at 0 and to be consecutively numbered.
Definition at line 34 of file dt_alert_handler.h.
List of reset ports.
Reset ports are guaranteed to be numbered consecutively from 0.
Enumerator | |
---|---|
kDtAlertHandlerResetRst | Reset port rst_ni. |
kDtAlertHandlerResetEdn | Reset port rst_edn_ni. |
Definition at line 71 of file dt_alert_handler.h.
Get the clock signal connected to a clock port of an instance.
dt | Instance of alert_handler. |
clk | Clock port. |
Definition at line 106 of file dt_alert_handler.c.
dt_alert_handler_t dt_alert_handler_from_instance_id | ( | dt_instance_id_t | inst_id | ) |
Get the alert_handler instance from an instance ID.
For example, dt_uart_from_instance_id(kDtInstanceIdUart3) == kDtUart3
.
inst_id | Instance ID. |
Note: This function only makes sense if the instance ID has device type alert_handler, otherwise the returned value is unspecified.
Definition at line 60 of file dt_alert_handler.c.
dt_instance_id_t dt_alert_handler_instance_id | ( | dt_alert_handler_t | dt | ) |
Get the instance ID of an instance.
dt | Instance of alert_handler. |
Definition at line 67 of file dt_alert_handler.c.
dt_alert_handler_irq_t dt_alert_handler_irq_from_plic_id | ( | dt_alert_handler_t | dt, |
dt_plic_irq_id_t | irq ) |
Convert a global IRQ ID to a local alert_handler IRQ type.
dt | Instance of alert_handler. |
irq | A PLIC ID that belongs to this instance. |
kDtAlertHandlerIrqCount
.Note: This function assumes that the PLIC ID belongs to the instance of alert_handler passed in parameter. In other words, it must be the case that dt_alert_handler_instance_id(dt) == dt_plic_id_to_instance_id(irq)
. Otherwise, this function will return kDtAlertHandlerIrqCount
.
Definition at line 89 of file dt_alert_handler.c.
dt_plic_irq_id_t dt_alert_handler_irq_to_plic_id | ( | dt_alert_handler_t | dt, |
dt_alert_handler_irq_t | irq ) |
Get the PLIC ID of a alert_handler IRQ for a given instance.
If the instance is not connected to the PLIC, this function will return kDtPlicIrqIdNone
.
dt | Instance of alert_handler. |
irq | A alert_handler IRQ. |
Definition at line 79 of file dt_alert_handler.c.
uint32_t dt_alert_handler_reg_block | ( | dt_alert_handler_t | dt, |
dt_alert_handler_reg_block_t | reg_block ) |
Get the register base address of an instance.
dt | Instance of alert_handler. |
reg_block | The register block requested. |
Definition at line 72 of file dt_alert_handler.c.
Get the reset signal connected to a reset port of an instance.
dt | Instance of alert_handler. |
rst | Reset port. |
Definition at line 113 of file dt_alert_handler.c.