#ifndef __INTER_MSG_REG_H__ #define __INTER_MSG_REG_H__ #define FUN_IRQ_MAX_NUM 512 #define IRQ_MAX_NUM 32 #define IRQ_SYS_MASK_NUM 16 typedef unsigned int uint32_t; typedef unsigned int UINT32; typedef void (*irq_handler)(); typedef enum { all_irq, fun_s, fun_e, // clear_cnt_error, // irq_check_error }irq_cnt_type_t; typedef unsigned int uint32_t; typedef unsigned short uint16_t; typedef unsigned char uint8_t; typedef signed int int32_t; typedef struct { uint32_t reg_irq_cnt; //0x00 uint32_t reg_irq_val[IRQ_MAX_NUM]; //0x04-0x80 uint32_t reg_irq_cpu_id; //0x84 uint32_t irq_cnt; //0x88 uint32_t fun_start_cnt_all; //0x8c uint32_t fun_end_cnt_all; //0x90 uint32_t fun_run_cnt[FUN_IRQ_MAX_NUM]; //0x94-0x890 uint32_t last_irq_num; //0x8a4 uint32_t irq_sys_mask[IRQ_SYS_MASK_NUM]; //0x8a8 -0x8e4 uint32_t irq_sys_status[IRQ_SYS_MASK_NUM]; //0x8e8 -0x924 uint32_t apc_csu_allpendevent0; //0x928 uint32_t apc_csu_intmaskl; //0x92c // uint32_t event_mask_l; }irq_debug_t; /* ????:smart_irq_request ????:vector ??? ????:func ????????? ????:int ??? : ??0 ???? ???: ??0 ???? ????:???? */ extern int smart_irq_request(uint32_t vector,irq_handler func); /* ????:smart_irq_enable ????:vector ??? ????:int ??? : ??0 ???? ???: ??0 ???? ????:?????? */ extern int smart_irq_enable(uint32_t vector); /* ????:smart_irq_disable ????:vector ??? ????:int ??? : ??0 ???? ???: ??0 ???? ????:?????? */ extern int smart_irq_disable(uint32_t vector); /* ????:smart_irq_debug_init ????:debug_base_addr ??buf ??? ????:len_bytes ??buf ?? ????:int ??? : ??0 ???? ???: ??0 ???? ????:????????? */ extern int smart_irq_debug_init(uint32_t debug_base_addr, uint32_t len_bytes); /* ????:smart_irq_get_type_cnt ????:num_type ????:???? irq_cnt_type_t typedef enum { all_irq, fun_s, fun_e, clear_cnt_error, irq_check_error }irq_cnt_type_t; ????:uint32_t ??? : ??0 ???? ???: ??0 ???? ????:????????? */ extern uint32_t smart_irq_get_type_cnt(irq_cnt_type_t num_type); /* ????:smart_irq_get_run_cnt ????:irqnum ????:int ???: ??0 ???? ????:?????????? */ extern int smart_irq_get_run_cnt(uint32_t irqnum); /* ????:smart_get_cpuid ????:int ??? : ??0 ???? ???: ??0 ???? ????:????cpuid */ extern int smart_get_cpuid(); /* ????:smart_irq_init ????:cpuid ????:int ??? : ??0 ???? ???: 0 ???? ????:????cpuid */ extern int smart_irq_init(int cpuid); #endif