diff options
| author | magh <magh@maghmogh.com> | 2023-03-06 18:44:55 -0600 |
|---|---|---|
| committer | magh <magh@maghmogh.com> | 2023-03-06 18:44:55 -0600 |
| commit | e80d9d8871b325a04b18f90a9ea4bb7fd148fb25 (patch) | |
| tree | 79dbdb8506b7ff1e92549188d1b94cfc0b3503ae /tools/src/aic.h | |
Diffstat (limited to 'tools/src/aic.h')
| -rw-r--r-- | tools/src/aic.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/tools/src/aic.h b/tools/src/aic.h new file mode 100644 index 0000000..1f401b1 --- /dev/null +++ b/tools/src/aic.h @@ -0,0 +1,40 @@ +/* SPDX-License-Identifier: MIT */ + +#ifndef AIC_H +#define AIC_H + +#include "types.h" + +#define AIC_MAX_DIES 4 + +struct aic_regs { + uint64_t reg_size; + uint64_t event; + uint64_t tgt_cpu; + uint64_t config; + uint64_t sw_set; + uint64_t sw_clr; + uint64_t mask_set; + uint64_t mask_clr; +}; + +struct aic { + uint64_t base; + uint32_t version; + + uint32_t nr_irq; + uint32_t nr_die; + uint32_t max_irq; + uint32_t max_die; + uint32_t die_stride; + + struct aic_regs regs; +}; + +extern struct aic *aic; + +void aic_init(void); +void aic_set_sw(int irq, bool active); +uint32_t aic_ack(void); + +#endif |
