Device Tables (DT) for IP cheriot_mem_sys and top earlgrey. More...
#include "hw/top/dt/api.h"#include <stdint.h>Go to the source code of this file.
Macros | |
| #define | OPENTITAN_CHERIOT_MEM_SYS_HAS_TAG_SPLIT 1 |
| List of supported hardware features. | |
| #define | OPENTITAN_CHERIOT_MEM_SYS_HAS_TAG_READ 1 |
| #define | OPENTITAN_CHERIOT_MEM_SYS_HAS_TAG_WRITE_RMW 1 |
| #define | OPENTITAN_CHERIOT_MEM_SYS_HAS_TAG_CLEAR_ON_DATA_WRITE 1 |
| #define | OPENTITAN_CHERIOT_MEM_SYS_HAS_REVOCATION_BITMAP 1 |
| #define | OPENTITAN_CHERIOT_MEM_SYS_HAS_ACCESS_CHECK 1 |
| #define | OPENTITAN_CHERIOT_MEM_SYS_HAS_MODE_GATING 1 |
| #define | OPENTITAN_CHERIOT_MEM_SYS_HAS_TBRE_SWEEP 1 |
| #define | OPENTITAN_CHERIOT_MEM_SYS_HAS_TBRE_CORE_WRITE_SNOOP 1 |
| #define | OPENTITAN_CHERIOT_MEM_SYS_HAS_TBRE_STATUS 1 |
Typedefs | |
| typedef enum dt_cheriot_mem_sys | dt_cheriot_mem_sys_t |
| List of instances. | |
| typedef enum dt_cheriot_mem_sys_reg_block | dt_cheriot_mem_sys_reg_block_t |
| List of register blocks. | |
| typedef enum dt_cheriot_mem_sys_memory | dt_cheriot_mem_sys_memory_t |
| List of memories. | |
| typedef enum dt_cheriot_mem_sys_irq | dt_cheriot_mem_sys_irq_t |
| List of IRQs. | |
| typedef enum dt_cheriot_mem_sys_alert | dt_cheriot_mem_sys_alert_t |
| List of Alerts. | |
| typedef enum dt_cheriot_mem_sys_clock | dt_cheriot_mem_sys_clock_t |
| List of clock ports. | |
| typedef enum dt_cheriot_mem_sys_reset | dt_cheriot_mem_sys_reset_t |
| List of reset ports. | |
Enumerations | |
| enum | dt_cheriot_mem_sys { kDtCheriotMemSysFirst = 0 , kDtCheriotMemSys = 0 } |
| List of instances. More... | |
| enum | { kDtCheriotMemSysCount = 1 } |
| enum | dt_cheriot_mem_sys_reg_block { kDtCheriotMemSysRegBlockRegs = 0 } |
| List of register blocks. More... | |
| enum | { kDtCheriotMemSysRegBlockCount = 1 } |
| enum | dt_cheriot_mem_sys_memory { kDtCheriotMemSysMemoryRevbm = 0 } |
| List of memories. More... | |
| enum | { kDtCheriotMemSysMemoryCount = 1 } |
| enum | dt_cheriot_mem_sys_irq { kDtCheriotMemSysIrqTbreDone = 0 } |
| List of IRQs. More... | |
| enum | { kDtCheriotMemSysIrqCount = 1 } |
| enum | dt_cheriot_mem_sys_alert { kDtCheriotMemSysAlertFatalFault = 0 } |
| List of Alerts. More... | |
| enum | { kDtCheriotMemSysAlertCount = 1 } |
| enum | dt_cheriot_mem_sys_clock { kDtCheriotMemSysClockClk = 0 } |
| List of clock ports. More... | |
| enum | { kDtCheriotMemSysClockCount = 1 } |
| enum | dt_cheriot_mem_sys_reset { kDtCheriotMemSysResetRst = 0 } |
| List of reset ports. More... | |
| enum | { kDtCheriotMemSysResetCount = 1 } |
Device Tables (DT) for IP cheriot_mem_sys and top earlgrey.
This file contains the type definitions and global functions of the cheriot_mem_sys.
Definition in file cheriot_mem_sys.h.
| #define OPENTITAN_CHERIOT_MEM_SYS_HAS_ACCESS_CHECK 1 |
Definition at line 137 of file cheriot_mem_sys.h.
| #define OPENTITAN_CHERIOT_MEM_SYS_HAS_MODE_GATING 1 |
Definition at line 138 of file cheriot_mem_sys.h.
| #define OPENTITAN_CHERIOT_MEM_SYS_HAS_REVOCATION_BITMAP 1 |
Definition at line 136 of file cheriot_mem_sys.h.
| #define OPENTITAN_CHERIOT_MEM_SYS_HAS_TAG_CLEAR_ON_DATA_WRITE 1 |
Definition at line 135 of file cheriot_mem_sys.h.
| #define OPENTITAN_CHERIOT_MEM_SYS_HAS_TAG_READ 1 |
Definition at line 133 of file cheriot_mem_sys.h.
| #define OPENTITAN_CHERIOT_MEM_SYS_HAS_TAG_SPLIT 1 |
List of supported hardware features.
Definition at line 132 of file cheriot_mem_sys.h.
| #define OPENTITAN_CHERIOT_MEM_SYS_HAS_TAG_WRITE_RMW 1 |
Definition at line 134 of file cheriot_mem_sys.h.
| #define OPENTITAN_CHERIOT_MEM_SYS_HAS_TBRE_CORE_WRITE_SNOOP 1 |
Definition at line 140 of file cheriot_mem_sys.h.
| #define OPENTITAN_CHERIOT_MEM_SYS_HAS_TBRE_STATUS 1 |
Definition at line 141 of file cheriot_mem_sys.h.
| #define OPENTITAN_CHERIOT_MEM_SYS_HAS_TBRE_SWEEP 1 |
Definition at line 139 of file cheriot_mem_sys.h.
| typedef enum dt_cheriot_mem_sys_alert dt_cheriot_mem_sys_alert_t |
List of Alerts.
Alerts are guaranteed to be numbered consecutively from 0.
| typedef enum dt_cheriot_mem_sys_clock dt_cheriot_mem_sys_clock_t |
List of clock ports.
Clock ports are guaranteed to be numbered consecutively from 0.
| typedef enum dt_cheriot_mem_sys_irq dt_cheriot_mem_sys_irq_t |
List of IRQs.
IRQs are guaranteed to be numbered consecutively from 0.
| typedef enum dt_cheriot_mem_sys_memory dt_cheriot_mem_sys_memory_t |
List of memories.
Memories are guaranteed to start at 0 and to be consecutively numbered.
List of register blocks.
Register blocks are guaranteed to start at 0 and to be consecutively numbered.
| typedef enum dt_cheriot_mem_sys_reset dt_cheriot_mem_sys_reset_t |
List of reset ports.
Reset ports are guaranteed to be numbered consecutively from 0.
| anonymous enum |
| Enumerator | |
|---|---|
| kDtCheriotMemSysIrqCount | Number of IRQs. |
Definition at line 79 of file cheriot_mem_sys.h.
| anonymous enum |
| Enumerator | |
|---|---|
| kDtCheriotMemSysAlertCount | Number of Alerts. |
Definition at line 96 of file cheriot_mem_sys.h.
| anonymous enum |
| Enumerator | |
|---|---|
| kDtCheriotMemSysCount | Number of instances. |
Definition at line 34 of file cheriot_mem_sys.h.
| anonymous enum |
| Enumerator | |
|---|---|
| kDtCheriotMemSysMemoryCount | Number of memories. |
Definition at line 65 of file cheriot_mem_sys.h.
| anonymous enum |
| Enumerator | |
|---|---|
| kDtCheriotMemSysClockCount | Number of clock ports. |
Definition at line 110 of file cheriot_mem_sys.h.
| anonymous enum |
| Enumerator | |
|---|---|
| kDtCheriotMemSysRegBlockCount | Number of register blocks. |
Definition at line 48 of file cheriot_mem_sys.h.
| anonymous enum |
| Enumerator | |
|---|---|
| kDtCheriotMemSysResetCount | Number of reset ports. |
Definition at line 124 of file cheriot_mem_sys.h.
| enum dt_cheriot_mem_sys |
List of instances.
| Enumerator | |
|---|---|
| kDtCheriotMemSysFirst | First instance. |
| kDtCheriotMemSys | cheriot_mem_sys |
Definition at line 29 of file cheriot_mem_sys.h.
List of Alerts.
Alerts are guaranteed to be numbered consecutively from 0.
Definition at line 89 of file cheriot_mem_sys.h.
List of clock ports.
Clock ports are guaranteed to be numbered consecutively from 0.
| Enumerator | |
|---|---|
| kDtCheriotMemSysClockClk | Clock port clk_i. |
Definition at line 106 of file cheriot_mem_sys.h.
List of IRQs.
IRQs are guaranteed to be numbered consecutively from 0.
| Enumerator | |
|---|---|
| kDtCheriotMemSysIrqTbreDone | Raised when the revocation engine has resolved every capability of a sweep. |
Definition at line 75 of file cheriot_mem_sys.h.
List of memories.
Memories are guaranteed to start at 0 and to be consecutively numbered.
Definition at line 61 of file cheriot_mem_sys.h.
List of register blocks.
Register blocks are guaranteed to start at 0 and to be consecutively numbered.
Definition at line 44 of file cheriot_mem_sys.h.
List of reset ports.
Reset ports are guaranteed to be numbered consecutively from 0.
| Enumerator | |
|---|---|
| kDtCheriotMemSysResetRst | Reset port rst_ni. |
Definition at line 120 of file cheriot_mem_sys.h.
| dt_cheriot_mem_sys_alert_t dt_cheriot_mem_sys_alert_from_alert_id | ( | dt_cheriot_mem_sys_t | dt, |
| dt_alert_id_t | alert ) |
Convert a global alert ID to a local cheriot_mem_sys alert type.
| dt | Instance of cheriot_mem_sys. |
| alert | A global alert ID that belongs to this instance. |
kDtCheriotMemSysAlertCount.Note: This function assumes that the global alert ID belongs to the instance of cheriot_mem_sys passed in parameter. In other words, it must be the case that dt_cheriot_mem_sys_instance_id(dt) == dt_alert_id_to_instance_id(alert). Otherwise, this function will return kDtCheriotMemSysAlertCount.
Definition at line 137 of file cheriot_mem_sys.c.
| dt_alert_id_t dt_cheriot_mem_sys_alert_to_alert_id | ( | dt_cheriot_mem_sys_t | dt, |
| dt_cheriot_mem_sys_alert_t | alert ) |
Get the alert ID of a cheriot_mem_sys alert for a given instance.
Note: This function only makes sense if the instance is connected to the Alert Handler. For any instances where the instance is not connected, the return value is unspecified.
| dt | Instance of cheriot_mem_sys. |
| alert | A cheriot_mem_sys alert. |
Definition at line 131 of file cheriot_mem_sys.c.
Get the clock signal connected to a clock port of an instance.
| dt | Instance of cheriot_mem_sys. |
| clk | Clock port. |
Definition at line 149 of file cheriot_mem_sys.c.
| dt_cheriot_mem_sys_t dt_cheriot_mem_sys_from_instance_id | ( | dt_instance_id_t | inst_id | ) |
Get the cheriot_mem_sys 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 cheriot_mem_sys, otherwise the returned value is unspecified.
Definition at line 73 of file cheriot_mem_sys.c.
| dt_instance_id_t dt_cheriot_mem_sys_instance_id | ( | dt_cheriot_mem_sys_t | dt | ) |
Get the instance ID of an instance.
| dt | Instance of cheriot_mem_sys. |
Definition at line 80 of file cheriot_mem_sys.c.
| dt_cheriot_mem_sys_irq_t dt_cheriot_mem_sys_irq_from_plic_id | ( | dt_cheriot_mem_sys_t | dt, |
| dt_plic_irq_id_t | irq ) |
Convert a global IRQ ID to a local cheriot_mem_sys IRQ type.
| dt | Instance of cheriot_mem_sys. |
| irq | A PLIC ID that belongs to this instance. |
kDtCheriotMemSysIrqCount.Note: This function assumes that the PLIC ID belongs to the instance of cheriot_mem_sys passed in parameter. In other words, it must be the case that dt_cheriot_mem_sys_instance_id(dt) == dt_plic_id_to_instance_id(irq). Otherwise, this function will return kDtCheriotMemSysIrqCount.
Definition at line 116 of file cheriot_mem_sys.c.
| dt_plic_irq_id_t dt_cheriot_mem_sys_irq_to_plic_id | ( | dt_cheriot_mem_sys_t | dt, |
| dt_cheriot_mem_sys_irq_t | irq ) |
Get the PLIC ID of a cheriot_mem_sys IRQ for a given instance.
If the instance is not connected to the PLIC, this function will return kDtPlicIrqIdNone.
| dt | Instance of cheriot_mem_sys. |
| irq | A cheriot_mem_sys IRQ. |
Definition at line 106 of file cheriot_mem_sys.c.
| uint32_t dt_cheriot_mem_sys_memory_base | ( | dt_cheriot_mem_sys_t | dt, |
| dt_cheriot_mem_sys_memory_t | mem ) |
Get the base address of a memory.
| dt | Instance of cheriot_mem_sys. |
| mem | The memory requested. |
Definition at line 92 of file cheriot_mem_sys.c.
| uint32_t dt_cheriot_mem_sys_memory_size | ( | dt_cheriot_mem_sys_t | dt, |
| dt_cheriot_mem_sys_memory_t | mem ) |
Get the size of a memory.
| dt | Instance of cheriot_mem_sys. |
| mem | The memory requested. |
Definition at line 99 of file cheriot_mem_sys.c.
| uint32_t dt_cheriot_mem_sys_reg_block | ( | dt_cheriot_mem_sys_t | dt, |
| dt_cheriot_mem_sys_reg_block_t | reg_block ) |
Get the register base address of an instance.
| dt | Instance of cheriot_mem_sys. |
| reg_block | The register block requested. |
Definition at line 85 of file cheriot_mem_sys.c.
Get the reset signal connected to a reset port of an instance.
| dt | Instance of cheriot_mem_sys. |
| rst | Reset port. |
Definition at line 156 of file cheriot_mem_sys.c.