Software APIs
dif_soc_dbg_ctrl_autogen.h File Reference

SOC_DBG_CTRL Device Interface Functions More...

#include <stdbool.h>
#include <stdint.h>
#include "sw/device/lib/base/macros.h"
#include "sw/device/lib/base/mmio.h"
#include "sw/device/lib/dif/dif_base.h"
#include "dt/dt_soc_dbg_ctrl.h"

Go to the source code of this file.

Data Structures

struct  dif_soc_dbg_ctrl
 A handle to soc_dbg_ctrl. More...
 

Typedefs

typedef struct dif_soc_dbg_ctrl dif_soc_dbg_ctrl_t
 A handle to soc_dbg_ctrl.
 
typedef enum dif_soc_dbg_ctrl_alert dif_soc_dbg_ctrl_alert_t
 A soc_dbg_ctrl alert type.
 

Enumerations

enum  dif_soc_dbg_ctrl_alert {
  kDifSocDbgCtrlAlertFatalFault = 0 ,
  kDifSocDbgCtrlAlertRecovCtrlUpdateErr = 1
}
 A soc_dbg_ctrl alert type. More...
 

Functions

OT_WARN_UNUSED_RESULT dif_result_t dif_soc_dbg_ctrl_init (mmio_region_t base_addr, dif_soc_dbg_ctrl_t *soc_dbg_ctrl)
 Creates a new handle for a(n) soc_dbg_ctrl peripheral.
 
OT_WARN_UNUSED_RESULT dif_result_t dif_soc_dbg_ctrl_init_from_dt (dt_soc_dbg_ctrl_t dt, dif_soc_dbg_ctrl_t *soc_dbg_ctrl)
 Creates a new handle for a(n) soc_dbg_ctrl peripheral.
 
OT_WARN_UNUSED_RESULT dif_result_t dif_soc_dbg_ctrl_get_dt (const dif_soc_dbg_ctrl_t *soc_dbg_ctrl, dt_soc_dbg_ctrl_t *dt)
 Get the DT handle from this DIF.
 
OT_WARN_UNUSED_RESULT dif_result_t dif_soc_dbg_ctrl_alert_force (const dif_soc_dbg_ctrl_t *soc_dbg_ctrl, dif_soc_dbg_ctrl_alert_t alert)
 Forces a particular alert, causing it to be escalated as if the hardware had raised it.
 

Detailed Description

SOC_DBG_CTRL Device Interface Functions

Definition in file dif_soc_dbg_ctrl_autogen.h.


Data Structure Documentation

◆ dif_soc_dbg_ctrl

struct dif_soc_dbg_ctrl

A handle to soc_dbg_ctrl.

This type should be treated as opaque by users.

Definition at line 37 of file dif_soc_dbg_ctrl_autogen.h.

Data Fields
mmio_region_t base_addr The base address for the soc_dbg_ctrl hardware registers.
dt_soc_dbg_ctrl_t dt The instance, set to kDtSocDbgCtrlCount if not initialized through dif_soc_dbg_ctrl_init_from_dt.

Typedef Documentation

◆ dif_soc_dbg_ctrl_t

A handle to soc_dbg_ctrl.

This type should be treated as opaque by users.

Enumeration Type Documentation

◆ dif_soc_dbg_ctrl_alert

A soc_dbg_ctrl alert type.

Enumerator
kDifSocDbgCtrlAlertFatalFault 

This fatal alert is triggered when a fatal TL-UL bus integrity fault is detected.

kDifSocDbgCtrlAlertRecovCtrlUpdateErr 

This recoverable alert is triggered upon detecting an update error in the shadowed Control Register.

Definition at line 98 of file dif_soc_dbg_ctrl_autogen.h.

Function Documentation

◆ dif_soc_dbg_ctrl_alert_force()

OT_WARN_UNUSED_RESULT dif_result_t dif_soc_dbg_ctrl_alert_force ( const dif_soc_dbg_ctrl_t * soc_dbg_ctrl,
dif_soc_dbg_ctrl_alert_t alert )

Forces a particular alert, causing it to be escalated as if the hardware had raised it.

Parameters
soc_dbg_ctrlA soc_dbg_ctrl handle.
alertThe alert to force.
Returns
The result of the operation.

Definition at line 62 of file dif_soc_dbg_ctrl_autogen.c.

◆ dif_soc_dbg_ctrl_get_dt()

OT_WARN_UNUSED_RESULT dif_result_t dif_soc_dbg_ctrl_get_dt ( const dif_soc_dbg_ctrl_t * soc_dbg_ctrl,
dt_soc_dbg_ctrl_t * dt )

Get the DT handle from this DIF.

If this DIF was initialized by dif_soc_dbg_ctrl_init_from_dt(dt, ..) then this function will return dt. Otherwise it will return an error.

Parameters
soc_dbg_ctrlA soc_dbg_ctrl handle.
[out]dtDT handle.
Returns
kDifBadArg if the DIF has no DT information, kDifOk otherwise.

Definition at line 52 of file dif_soc_dbg_ctrl_autogen.c.

◆ dif_soc_dbg_ctrl_init()

OT_WARN_UNUSED_RESULT dif_result_t dif_soc_dbg_ctrl_init ( mmio_region_t base_addr,
dif_soc_dbg_ctrl_t * soc_dbg_ctrl )

Creates a new handle for a(n) soc_dbg_ctrl peripheral.

This function does not actuate the hardware.

Parameters
base_addrThe MMIO base address of the soc_dbg_ctrl peripheral.
[out]soc_dbg_ctrlOut param for the initialized handle.
Returns
The result of the operation.

DEPRECATED This function exists solely for the transition to dt-based DIFs and will be removed in the future.

Definition at line 25 of file dif_soc_dbg_ctrl_autogen.c.

◆ dif_soc_dbg_ctrl_init_from_dt()

OT_WARN_UNUSED_RESULT dif_result_t dif_soc_dbg_ctrl_init_from_dt ( dt_soc_dbg_ctrl_t dt,
dif_soc_dbg_ctrl_t * soc_dbg_ctrl )

Creates a new handle for a(n) soc_dbg_ctrl peripheral.

This function does not actuate the hardware.

Parameters
dtThe devicetable description of the device.
[out]soc_dbg_ctrlOut param for the initialized handle.
Returns
The result of the operation.

Definition at line 39 of file dif_soc_dbg_ctrl_autogen.c.