Lines Matching +full:0 +full:x1e00
53 #define APLIC_DOMAINCFG 0x0000
56 #define DOMAINCFG_BE (1 << 0) /* Big-Endian. */
57 #define APLIC_SOURCECFG(x) (0x0004 + ((x) - 1) * 4)
59 /* If D == 0. */
60 #define SOURCECFG_SM_S (0)
61 #define SOURCECFG_SM_M (0x7 << SOURCECFG_SM_S)
62 #define SOURCECFG_SM_INACTIVE (0) /* Not delegated. */
71 #define SOURCECFG_CHILD_INDEX_S (0)
72 #define SOURCECFG_CHILD_INDEX_M (0x3ff << SOURCECFG_CHILD_INDEX_S)
73 #define APLIC_SETIP 0x1c00
74 #define APLIC_SETIPNUM 0x1cdc
75 #define APLIC_CLRIP 0x1d00
76 #define APLIC_CLRIPNUM 0x1ddc
77 #define APLIC_SETIE 0x1e00
78 #define APLIC_SETIENUM 0x1edc
79 #define APLIC_CLRIE 0x1f00
80 #define APLIC_CLRIENUM 0x1fdc
81 #define APLIC_GENMSI 0x3000
82 #define APLIC_TARGET(x) (0x3004 + ((x) - 1) * 4)
84 #define TARGET_HART_M 0x3fff
85 #define APLIC_IDC(x) (0x4000 + (x) * 32)
86 #define IDC_IDELIVERY(x) (APLIC_IDC(x) + 0x0)
87 #define IDC_IFORCE(x) (APLIC_IDC(x) + 0x4)
88 #define IDC_ITHRESHOLD(x) (APLIC_IDC(x) + 0x8)
89 #define IDC_TOPI(x) (APLIC_IDC(x) + 0x18)
90 #define IDC_CLAIMI(x) (APLIC_IDC(x) + 0x1C)
92 #define CLAIMI_IRQ_M (0x3ff << CLAIMI_IRQ_S)
93 #define CLAIMI_PRIO_S (0)
94 #define CLAIMI_PRIO_M (0xff << CLAIMI_PRIO_S)
101 #define APLIC_IRQ_STATE_PENDING (1 << 0)
122 if (i <= 0 || i > aplic->nirqs) in aplic_handle_sourcecfg()
133 return (0); in aplic_handle_sourcecfg()
143 *val = 0; in aplic_set_enabled()
144 return (0); in aplic_set_enabled()
148 if (i <= 0 || i > aplic->nirqs) in aplic_set_enabled()
162 return (0); in aplic_set_enabled()
173 *val = 0; in aplic_set_enabled_word()
181 for (i = 0; i < 32; i++) in aplic_set_enabled_word()
202 return (0); in aplic_handle_target()
220 for (i = 0; i < aplic->nirqs; i++) { in aplic_handle_idc_claimi()
225 *val = (i << CLAIMI_IRQ_S) | (0 << CLAIMI_PRIO_S); in aplic_handle_idc_claimi()
234 *val = 0; in aplic_handle_idc_claimi()
236 return (0); in aplic_handle_idc_claimi()
245 switch (reg + APLIC_IDC(0)) { in aplic_handle_idc()
246 case IDC_IDELIVERY(0): in aplic_handle_idc()
247 case IDC_IFORCE(0): in aplic_handle_idc()
248 case IDC_ITHRESHOLD(0): in aplic_handle_idc()
249 case IDC_TOPI(0): in aplic_handle_idc()
250 error = 0; in aplic_handle_idc()
252 case IDC_CLAIMI(0): in aplic_handle_idc()
286 if ((reg >= APLIC_IDC(0)) && (reg < APLIC_IDC(mp_ncpus))) { in aplic_mmio_access()
287 cpu = (reg - APLIC_IDC(0)) >> 5; in aplic_mmio_access()
288 r = (reg - APLIC_IDC(0)) % 32; in aplic_mmio_access()
296 return (0); in aplic_mmio_access()
307 error = 0; in aplic_mmio_access()
347 if (error == 0) in mem_read()
429 return (0); in aplic_attach_to_vm()
459 if ((aplic->domaincfg & DOMAINCFG_IE) == 0) { in aplic_check_pending()
461 return (0); in aplic_check_pending()
464 for (i = 0; i < aplic->nirqs; i++) { in aplic_check_pending()
477 return (0); in aplic_check_pending()
491 error = 0; in aplic_inject_irq()
494 if ((aplic->domaincfg & DOMAINCFG_IE) == 0) { in aplic_inject_irq()