1 /* SPDX-License-Identifier: BSD-2-Clause */ 2 /* 3 * Copyright (c) 2025 Beijing Institute of Open Source Chip (BOSC) 4 */ 5 6 #ifndef __DRIVERS_APLIC_H 7 #define __DRIVERS_APLIC_H 8 9 #include <types_ext.h> 10 11 /* 12 * The aplic_init() function initializes the struct aplic_data which 13 * is then used by other functions. This function also initializes 14 * the APLIC and should only be called from the primary boot hart. 15 */ 16 void aplic_init(paddr_t aplic_base_pa); 17 18 /* 19 * Does per-hart specific APLIC initialization, should be called by all 20 * secondary harts when booting. 21 */ 22 void aplic_init_per_hart(void); 23 24 /* Handle external interrupts */ 25 void aplic_it_handle(void); 26 27 /* Print APLIC state to console */ 28 void aplic_dump_state(void); 29 30 #endif /*__DRIVERS_APLIC_H*/ 31