📄 eribld_aq.c
字号:
os_std(SCM.gpr3, OS$gen_long, DD$aqbi_gpr3_10); case 0x1b: case 0x1c: case 0x1d: os_std(SCM.gpr3, OS$gen_long, DD$aqbi_gpr3_11); } os_std(SCM.sp[8], OS$gen_cntvecl, DD$aqbi_sp); os_std(SCM.scccsr, OS$gen_long, DD$aqbi_scccsr); os_std(SCM.scccsr, OS$gen_long, DD$sum_scccsr); os_std(SCM.clkctl, OS$gen_long, DD$aqbi_clkctl); os_std(SCM.clkctl, OS$gen_long, DD$sum_clkctl); os_std(SCM.dcsr, OS$gen_long, DD$aqbi_dcsr); os_std(SCM.dmao, OS$gen_long, DD$aqbi_dmao); os_std(SCM.dmai, OS$gen_long, DD$aqbi_dmai); os_std(SCM.dmam, OS$gen_long, DD$aqbi_dmam); os_std(SCM.dmae, OS$gen_long, DD$aqbi_dmae); os_std(SCM.dyrc, OS$gen_long, DD$aqbi_dyrc); os_std(SCM.dyrc, OS$gen_long, DD$sum_dyrc); os_std(SCM.bci3csr, OS$gen_long, DD$bci3_csr); os_std(SCM.bci3dm, OS$gen_long, DD$aqbi_bci3dm); os_std(SCM.bci3bi, OS$gen_long, DD$aqbi_bci3bi); os_std(SCM.bci3ii, OS$gen_long, DD$aqbi_bci3ii); os_std(SCM.bci3ev, OS$gen_long, DD$aqbi_bci3ev); os_std(SCM.last_error, OS$gen_long, DD$aqbi_lasterror); os_std(SCM.uintcsr, OS$gen_long, DD$aqbi_uintcsr); os_std(SCM.intrdes, OS$gen_long, DD$aqbi_intrdes); } if( status == EI$FAIL ) return(EI$FAIL); else return(EI$SUCC);}int v9000_bld_clk(eis_ptr,dis_ptr,cds_ptr,sds_ptr,ads_ptr,sis_ptr,elrp)EIS *eis_ptr;DIS *dis_ptr;CDS *cds_ptr;SDS *sds_ptr;ADS *ads_ptr;SIS *sis_ptr;struct el_rec *elrp;{ int status; cds_ptr->subtype = DD$AQCLK_CDS; if (ini_seg(cds_ptr) == EI$FAIL) status = EI$FAIL; sis_ptr->subtype = DD$AQ_CLK_SIS; if (ini_seg(sis_ptr) == EI$FAIL) status = EI$FAIL;#define CLK &elrp->el_body.el_aqclk os_std(CLK.ccr0, OS$gen_long, DD$aqclk_ccr0); os_std(CLK.freq, OS$gen_long, DD$aqclk_freq); os_std(CLK.burst, OS$gen_long, DD$aqclk_burst); os_std(CLK.interval, OS$gen_long, DD$aqclk_interval); os_std(CLK.ccr1, OS$gen_long, DD$aqclk_ccr1); os_std(CLK.ccr1, OS$gen_long, DD$sum_ccr1); os_std(CLK.position, OS$gen_long, DD$aqclk_position); os_std(CLK.divider, OS$gen_long, DD$aqclk_divider); if( status == EI$FAIL ) return(EI$FAIL); else return(EI$SUCC);}int v9000_bld_scan(eis_ptr,dis_ptr,cds_ptr,sds_ptr,ads_ptr,sis_ptr,elrp_old)EIS *eis_ptr;DIS *dis_ptr;CDS *cds_ptr;SDS *sds_ptr;ADS *ads_ptr;SIS *sis_ptr;struct el_rec *elrp_old;{ int status; struct el_rec_new *elrp = (struct el_rec_new *)elrp_old;#define SCANS &elrp->el_body.el_aqscan.cpuscu.scu if( elrp->el_body.el_aqscan.recovery_status&1 ) { /* scan scu entry */ cds_ptr->subtype = DD$AQSCAN_SCU_CDS; if (ini_seg(cds_ptr) == EI$FAIL) status = EI$FAIL; os_std(&elrp->el_body.el_aqscan.recovery_status, OS$gen_long, DD$aqscan_recovery_sts_scu ); os_std(SCANS.ele_number, OS$gen_long, DD$aqscan_ele_number ); os_std(SCANS.mchkid, OS$gen_long, DD$aqscan_mchkid ); os_std(SCANS.cpu0_scan_num, OS$gen_long, DD$aqscan_cpu0_scan_num ); os_std(SCANS.cpu1_scan_num, OS$gen_long, DD$aqscan_cpu1_scan_num ); os_std(SCANS.cpu2_scan_num, OS$gen_long, DD$aqscan_cpu2_scan_num ); os_std(SCANS.cpu3_scan_num, OS$gen_long, DD$aqscan_cpu3_scan_num ); os_std(SCANS.mcu_reg, OS$gen_long, DD$aqscan_mcu_reg ); os_std(SCANS.cdc_reg, OS$gen_long, DD$aqscan_cdc_reg ); os_std(SCANS.sync_reg0, OS$gen_long, DD$aqscan_sync_reg0 ); os_std(SCANS.sync_reg1, OS$gen_long, DD$aqscan_sync_reg1 ); os_std(SCANS.scu_err_sum, OS$gen_long, DD$aqscan_scu_err_sum ); os_std(SCANS.cpu_cnf, OS$gen_long, DD$aqscan_cpu_cnf ); os_std(SCANS.scu_cnfg, OS$gen_long, DD$aqscan_scu_cnfg ); os_std(SCANS.tag_cnfg0, OS$gen_long, DD$aqscan_tag_cnfg0 ); os_std(SCANS.tag_cnfg1, OS$gen_long, DD$aqscan_tag_cnfg1 ); os_std(SCANS.jbox_reg0, OS$gen_long, DD$aqscan_j_reg0 ); os_std(SCANS.jbox_reg1, OS$gen_long, DD$aqscan_j_reg1 ); os_std(SCANS.jbox_reg2, OS$gen_long, DD$aqscan_j_reg2 ); os_std(SCANS.jbox_reg3, OS$gen_long, DD$aqscan_j_reg3 ); os_std(SCANS.jbox_reg4, OS$gen_long, DD$aqscan_j_reg4 ); os_std(SCANS.jbox_reg5, OS$gen_long, DD$aqscan_j_reg5 ); os_std(SCANS.jbox_reg6, OS$gen_long, DD$aqscan_j_reg6 ); os_std(SCANS.jbox_reg7, OS$gen_long, DD$aqscan_j_reg7 ); os_std(SCANS.jbox_reg8, OS$gen_long, DD$aqscan_j_reg8 ); os_std(SCANS.jbox_reg9, OS$gen_long, DD$aqscan_j_reg9 ); os_std(SCANS.jbox_rega, OS$gen_long, DD$aqscan_j_rega ); os_std(SCANS.jbox_regb, OS$gen_long, DD$aqscan_j_regb ); os_std(SCANS.icu0_reg0, OS$gen_long, DD$aqscan_icu0_reg0 ); os_std(SCANS.icu0_reg1, OS$gen_long, DD$aqscan_icu0_reg1 ); os_std(SCANS.icu0_reg2, OS$gen_long, DD$aqscan_icu0_reg2 ); os_std(SCANS.icu1_reg0, OS$gen_long, DD$aqscan_icu1_reg0 ); os_std(SCANS.icu1_reg1, OS$gen_long, DD$aqscan_icu1_reg1 ); os_std(SCANS.icu1_reg2, OS$gen_long, DD$aqscan_icu1_reg2 ); os_std(SCANS.acu0_reg0, OS$gen_long, DD$aqscan_acu0_reg0 ); os_std(SCANS.acu0_reg1, OS$gen_long, DD$aqscan_acu0_reg1 ); os_std(SCANS.acu1_reg0, OS$gen_long, DD$aqscan_acu1_reg0 ); os_std(SCANS.acu1_reg1, OS$gen_long, DD$aqscan_acu1_reg1 ); os_std(SCANS.ser80, OS$gen_long, DD$aqscan_ser80 ); os_std(SCANS.ser81, OS$gen_long, DD$aqscan_ser81 ); os_std(SCANS.ser82, OS$gen_long, DD$aqscan_ser82 ); os_std(SCANS.ser83, OS$gen_long, DD$aqscan_ser83 ); os_std(SCANS.ser84, OS$gen_long, DD$aqscan_ser84 ); os_std(SCANS.ser85, OS$gen_long, DD$aqscan_ser85 ); os_std(SCANS.ser86, OS$gen_long, DD$aqscan_ser86 ); os_std(SCANS.ser87, OS$gen_long, DD$aqscan_ser87 ); os_std(SCANS.ser88, OS$gen_long, DD$aqscan_ser88 ); os_std(SCANS.ser89, OS$gen_long, DD$aqscan_ser89 ); os_std(SCANS.ser8a, OS$gen_long, DD$aqscan_ser8a ); } else { /* scan cpu entry */ cds_ptr->subtype = DD$AQSCAN_CPU_CDS; if (ini_seg(cds_ptr) == EI$FAIL) status = EI$FAIL;#define SCANC &elrp->el_body.el_aqscan.cpuscu.cpu ads_ptr->subtype = DD$AQSCAN_EBOX_ADS; if (ini_seg(ads_ptr) == EI$FAIL) status = EI$FAIL; os_std(&elrp->el_body.el_aqscan.recovery_status, OS$gen_long, DD$aqscan_recovery_sts_cpu ); os_std(SCANC.ele_number, OS$gen_long, DD$aqscan_ele_number); os_std(SCANC.mchkid, OS$gen_long, DD$aqscan_mchkid); os_std(SCANC.rev_reg0, OS$gen_long, DD$aqscan_rev_reg0); os_std(SCANC.rev_reg1, OS$gen_long, DD$aqscan_rev_reg1); os_std(SCANC.cdc_reg0, OS$gen_long, DD$aqscan_cdc_reg0); os_std(SCANC.cdc_reg1, OS$gen_long, DD$aqscan_cdc_reg1); os_std(SCANC.sync_reg0, OS$gen_long, DD$aqscan_sync_reg0); os_std(SCANC.sync_reg1, OS$gen_long, DD$aqscan_sync_reg1); os_std(SCANC.sync_reg2, OS$gen_long, DD$aqscan_sync_reg2); os_std(SCANC.e_errsum_reg, OS$gen_long, DD$aqscan_e_errsum_reg); os_std(SCANC.e_ctl_reg1, OS$gen_long, DD$aqscan_e_ctl_reg1); os_std(SCANC.e_ctl_reg2, OS$gen_long, DD$aqscan_e_ctl_reg2); os_std(SCANC.e_distr_reg, OS$gen_long, DD$aqscan_e_distr_reg); os_std(SCANC.e_retire, OS$gen_long, DD$aqscan_e_retire); os_std(SCANC.e_func_1, OS$gen_long, DD$aqscan_e_func_1); os_std(SCANC.e_func_2, OS$gen_long, DD$aqscan_e_func_2); os_std(SCANC.e_errdat_reg1, OS$gen_long, DD$aqscan_e_errdat_reg1); os_std(SCANC.e_errdat_reg2, OS$gen_long, DD$aqscan_e_errdat_reg2); os_std(SCANC.e_sts_reg1, OS$gen_long, DD$aqscan_e_sts_reg1); os_std(SCANC.e_sts_reg2, OS$gen_long, DD$aqscan_e_sts_reg2); scan_ads_num = 1; /* start cycling through the scan ads segs */ } if( status == EI$FAIL ) return(EI$FAIL); else return(EI$SUCC);}int v9000_bld_config(eis_ptr,dis_ptr,cds_ptr,sds_ptr,ads_ptr,sis_ptr,elrp)EIS *eis_ptr;DIS *dis_ptr;CDS *cds_ptr;SDS *sds_ptr;ADS *ads_ptr;SIS *sis_ptr;struct el_rec *elrp;{ int status; int component_type, loc;#define AQL 35 static char location_str[AQL+2]; static char type_str[AQL+2];#define CONFIG elrp->el_body.el_aqconfig cds_ptr->subtype = DD$AQCONFIG_CDS; if (ini_seg(cds_ptr) == EI$FAIL) status = EI$FAIL; component_type = CONFIG.type; /* Re: Rod Payne, informs me the following */ /* are bi adapter types. */ /* SPM==20, SCM==21, AIO==22, AIE==23 */ if(component_type >= 20 && component_type <=23) os_std(&CONFIG.dtype, OS$gen_long, DD$bidevreg); /* The follwing are XMI types */ /* XJA==30, XCD==31, XNA==32, XBI==33, KDM==34 */ else if(component_type >= 30 && component_type <=34) os_std(&CONFIG.dtype, OS$gen_long, DD$xdev); os_std(&CONFIG.type, OS$gen_tiny, DD$aqconfig_type); os_std(&CONFIG.location, OS$gen_short, DD$aqconfig_location); sprintf(type_str, "UNKNOWN"); sprintf(location_str, ""); loc = CONFIG.location; switch(CONFIG.type){ case 0: case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9: case 12: case 13: case 14: case 15: sprintf(type_str, "RESERVED"); break; case 1: sprintf(type_str, "OS REVISION"); break; case 10: sprintf(type_str, "UNKNOWN SPU-BI DEVICE"); sprintf(location_str, "NODE = 0x%x", loc); break; case 11: sprintf(type_str, "UNKNOWN XMI DEVICE"); sprintf(location_str, "XMI = 0x%x, SLOT = 0x%x", loc/16, loc%16); break; case 16: sprintf(type_str, "KERNEL (SID REGISTER)"); break; case 17: sprintf(type_str, "SPU MEDIA"); break; case 18: sprintf(type_str, "MCU"); sprintf(location_str, "MCU SEL = 0x%x, UNIT = 0x%x", loc>>8&0xff, loc&0xff); break; case 19: sprintf(type_str, "PLANAR MODULE"); sprintf(location_str, "UNIT = 0x%x", loc); break; case 20: sprintf(type_str, "SPM (T2051)"); sprintf(location_str, "NODE = 0x%x", loc); break; case 21: sprintf(type_str, "SCM (T2050)"); sprintf(location_str, "NODE = 0x%x", loc); break; case 22: sprintf(type_str, "AIO (KFBTA)"); sprintf(location_str, "NODE = 0x%x", loc); break; case 23: sprintf(type_str, "AIE (DEBNT)"); sprintf(location_str, "NODE = 0x%x", loc); break; case 24: sprintf(type_str, "PEM (T1060)"); break; case 25: sprintf(type_str, "CPU RIC (H7388)"); sprintf(location_str, "RIC = 0x%x", loc); break; case 26: sprintf(type_str, "IO RIC (H7389)"); sprintf(location_str, "RIC = 0x%x", loc); break; case 27: sprintf(type_str, "MASTER CLOCK MODULE"); break; case 28: sprintf(type_str, "MEMORY ARRAY CARDS"); sprintf(location_str, "MAC = 0x%x", loc); break; case 29: sprintf(type_str, "DAUGHTER ARRAY CARDS"); sprintf(location_str, "DAC = 0x%x", loc); break; case 30: sprintf(type_str, "XJA ADAPTER (T1061)"); sprintf(location_str, "XMI = 0x%x, SLOT = 0x%x", loc/16, loc%16); break; case 31: sprintf(type_str, "XCD ADAPTER (CIXCD)"); sprintf(location_str, "XMI = 0x%x, SLOT = 0x%x", loc/16, loc%16); break; case 32: sprintf(type_str, "XNA ADAPTER (DEMNA)"); sprintf(location_str, "XMI = 0x%x, SLOT = 0x%x", loc/16, loc%16); break; case 33: sprintf(type_str, "XBI ADAPTER (DWMBB)"); sprintf(location_str, "XMI = 0x%x, SLOT = 0x%x", loc/16, loc%16); break; case 34: sprintf(type_str, "KDM ADAPTER (KDM70)"); sprintf(location_str, "XMI = 0x%x, SLOT = 0x%x", loc/16, loc%16); break; } os_std(type_str, OS$gen_asc_52, DD$aqconfig_type_str); os_std(location_str, OS$gen_asc_52, DD$aqconfig_location_str); os_std(&CONFIG.status, OS$gen_short, DD$aqconfig_status); os_std(&CONFIG.serialno[0], OS$gen_bv_16, DD$aqconfig_serialno); os_std(&CONFIG.partid[0], OS$gen_bv_16, DD$aqconfig_partid); if( status == EI$FAIL ) return(EI$FAIL); else return(EI$SUCC);}int v9000_bld_cte(eis_ptr,dis_ptr,cds_ptr,sds_ptr,ads_ptr,sis_ptr,elrp)EIS *eis_ptr;DIS *dis_ptr;CDS *cds_ptr;SDS *sds_ptr;ADS *ads_ptr;SIS *sis_ptr;struct el_rec *elrp;{ int status; if( status == EI$FAIL ) return(EI$FAIL); else return(EI$SUCC);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -