Software APIs
dif_rv_core_ibex_autogen.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
6
7#ifndef OPENTITAN_SW_DEVICE_LIB_DIF_AUTOGEN_DIF_RV_CORE_IBEX_AUTOGEN_H_
8#define OPENTITAN_SW_DEVICE_LIB_DIF_AUTOGEN_DIF_RV_CORE_IBEX_AUTOGEN_H_
9
10// THIS FILE HAS BEEN GENERATED, DO NOT EDIT MANUALLY. COMMAND:
11// util/autogen_dif.py -i
12// hw/top_earlgrey/ip_autogen/rv_core_ibex/data/rv_core_ibex.hjson -o
13// bazel-out/k8-fastbuild/bin/sw/device/lib/dif/autogen
14
15
16/**
17 * @file
18 * @brief <a href="/book/hw/ip/rv_core_ibex/">RV_CORE_IBEX</a> Device Interface Functions
19 */
20
21#include <stdbool.h>
22#include <stdint.h>
23
27#include "hw/top/dt/rv_core_ibex.h" // Generated.
28
29#ifdef __cplusplus
30extern "C" {
31#endif // __cplusplus
32
33/**
34 * A handle to rv_core_ibex.
35 *
36 * This type should be treated as opaque by users.
37 */
38typedef struct dif_rv_core_ibex {
39 /**
40 * The base address for the rv_core_ibex hardware registers.
41 */
43 /**
44 * The instance, set to `kDtRvCoreIbexCount` if not initialized
45 * through `dif_rv_core_ibex_init_from_dt`.
46 */
49
50/**
51 * Creates a new handle for a(n) rv_core_ibex peripheral.
52 *
53 * This function does not actuate the hardware.
54 *
55 * @param base_addr The MMIO base address of the rv_core_ibex peripheral.
56 * @param[out] rv_core_ibex Out param for the initialized handle.
57 * @return The result of the operation.
58 *
59 * DEPRECATED This function exists solely for the transition to
60 * dt-based DIFs and will be removed in the future.
61 */
64 mmio_region_t base_addr,
65 dif_rv_core_ibex_t *rv_core_ibex);
66
67/**
68 * Creates a new handle for a(n) rv_core_ibex peripheral.
69 *
70 * This function does not actuate the hardware.
71 *
72 * @param dt The devicetable description of the device.
73 * @param[out] rv_core_ibex Out param for the initialized handle.
74 * @return The result of the operation.
75 */
79 dif_rv_core_ibex_t *rv_core_ibex);
80
81/**
82 * Get the DT handle from this DIF.
83 *
84 * If this DIF was initialized by `dif_rv_core_ibex_init_from_dt(dt, ..)`
85 * then this function will return `dt`. Otherwise it will return an error.
86 *
87 * @param rv_core_ibex A rv_core_ibex handle.
88 * @param[out] dt DT handle.
89 * @return `kDifBadArg` if the DIF has no DT information, `kDifOk` otherwise.
90 */
93 const dif_rv_core_ibex_t *rv_core_ibex,
95
96 /**
97 * A rv_core_ibex alert type.
98 */
100 /**
101 * Software triggered alert for fatal faults
102 */
104 /**
105 * Software triggered Alert for recoverable faults
106 */
108 /**
109 * Triggered when - Ibex raises `alert_major_internal_o` - Ibex raises `alert_major_bus_o` - A double fault is seen (Ibex raises `double_fault_seen_o`) - A bus integrity error is seen
110 */
112 /**
113 * Triggered when Ibex raises `alert_minor_o`
114 */
117
118 /**
119 * Forces a particular alert, causing it to be escalated as if the hardware
120 * had raised it.
121 *
122 * @param rv_core_ibex A rv_core_ibex handle.
123 * @param alert The alert to force.
124 * @return The result of the operation.
125 */
128 const dif_rv_core_ibex_t *rv_core_ibex,
130
131
132#ifdef __cplusplus
133} // extern "C"
134#endif // __cplusplus
135
136#endif // OPENTITAN_SW_DEVICE_LIB_DIF_AUTOGEN_DIF_RV_CORE_IBEX_AUTOGEN_H_