diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/CHANGELOG ppc_diag/CHANGELOG --- ppc_diag-1.0.2/CHANGELOG Fri Feb 7 14:05:01 2003 +++ ppc_diag/CHANGELOG Mon May 12 16:01:56 2003 @@ -1,3 +1,23 @@ +Version 1.0.4 + +o Implemented general serial console support controlled by config defines + SERIAL_SMC = {1,2} or SERIAL_SCC = {1,2,3,4} to handle console on + SMC1, SMC2, SCC1, SCC2, SCC3, or SCC4 (tested with console on SMC1 and SCC1) + +o Allow an upper limit of memory size to be supplied to memory calculation + code, instead of defaulting to the constant 512MB + +o Fixed problem with timing loops when running without ppcboot + +o Added NAND flash tests + +o Added Red Box tests + +Version 1.0.3 + +o Moved the gendiags.sh variables into the Makefile to make them easy to + override if necessary. + Version 1.0.2 o Added instruction cache support. The instruction cache is disabled at diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/TODO ppc_diag/TODO --- ppc_diag-1.0.2/TODO Fri Feb 7 14:05:01 2003 +++ ppc_diag/TODO Thu May 1 11:31:26 2003 @@ -31,3 +31,6 @@ testing only after removing the ethernet cable, or after attaching a loopback connector (that's partly why this testing is not done during power-up). +- NAND code isn't ready to run with the icache on; the processor is slow + enough with caching disabled that certain delays were unnecessary. + diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/build/Makefile ppc_diag/build/Makefile --- ppc_diag-1.0.2/build/Makefile Fri Feb 7 14:45:13 2003 +++ ppc_diag/build/Makefile Thu May 1 11:31:26 2003 @@ -20,7 +20,7 @@ # MA 02111-1307 USA # -DIAG_VERSION = "Version 1.0.2" +DIAG_VERSION = "Version 1.0.4" COPYRIGHT = "(c) 2002, VCT Labs" VERSION_FILE = "../diag_ui/version.c" VERSION_OBJ = "../diag_ui/version.o" @@ -68,11 +68,13 @@ OBJDUMP = $(CROSS_COMPILE)objdump TFTPBASEDIR = /ppcboot +MKIMAGE = /usr/local/powerpc-linux/mkimage #GEN_DIAG = /usr/local/powerpc-linux/gendiags.sh $(TARGET) diags $(CODE_BASE_HEX) GEN_DIAG = ./gendiags.sh $(TARGET) diags $(CODE_BASE_HEX) $(TFTPBASEDIR) export VERSION CONFIG_SHELL HPATH HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \ - CPP AR NM STRIP OBJCOPY OBJDUMP MAKE MAKEFILES GENKSYMS MODFLAGS MKDEP + CPP AR NM STRIP OBJCOPY OBJDUMP MAKE MAKEFILES GENKSYMS MODFLAGS MKDEP \ + MKIMAGE # # standard CFLAGS @@ -100,9 +102,11 @@ fec \ led \ memory \ + nflash \ nvram \ greenbox_dpram \ greenbox_xilinx \ + redbox \ reg \ rtc \ scc_eth \ diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/build/gendiags.sh ppc_diag/build/gendiags.sh --- ppc_diag-1.0.2/build/gendiags.sh Thu Jan 9 16:27:46 2003 +++ ppc_diag/build/gendiags.sh Tue Feb 11 16:03:43 2003 @@ -21,9 +21,6 @@ # MA 02111-1307 USA # -MKIMAGEDIR=/usr/local/powerpc-linux -BINUTILSPATH=/usr/local/bin/powerpc-linux- - function usage() { echo "usage: $0 [LABEL] [ENTRY]" @@ -56,8 +53,8 @@ fi #### Test for boot to standalone program -${BINUTILSPATH}objcopy -O binary $FILE $FILE.raw; gzip $FILE.raw -$MKIMAGEDIR/mkimage -n "$LABEL" -A ppc -O ppcboot -T standalone -C gzip -a $ENTRY -e $ENTRY -d $FILE.raw.gz $FILE.img +${OBJCOPY} -O binary $FILE $FILE.raw; gzip $FILE.raw +${MKIMAGE} -n "$LABEL" -A ppc -O ppcboot -T standalone -C gzip -a $ENTRY -e $ENTRY -d $FILE.raw.gz $FILE.img #powerpc-linux-objcopy -I binary -O srec $FILE.img $FILE.srec cp -f $FILE.img $TFTPPATH diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/build/link.cmd ppc_diag/build/link.cmd --- ppc_diag-1.0.2/build/link.cmd Wed Dec 31 16:00:00 1969 +++ ppc_diag/build/link.cmd Mon May 12 14:52:26 2003 @@ -0,0 +1,94 @@ +/* Linker script +Mon May 12 14:52:26 PDT 2003 +automatically generated by "make link" */ +MEMORY +{ + text (rx) : ORIGIN = 0x2000, LENGTH = 504K + rodata (rwx) : ORIGIN = 0x00080000, LENGTH = 64K + data (rwx) : ORIGIN = 0x00090000, LENGTH = 192K + bss (rwx) : ORIGIN = 0x000C0000, LENGTH = 256K +} +SECTIONS +{ + .text : { *(.text) } >text + .rodata : { *(.rodata) } >rodata + .data : { *(.data) } >data + .bss : { *(.bss) } >bss +} +STARTUP(../entry/start.o) +INPUT(../console/serial.o) +INPUT(../diag_ui/version.o) +INPUT(../diag_ui/center.o) +INPUT(../diag_ui/clear_screen.o) +INPUT(../diag_ui/diag_menu.o) +INPUT(../diag_ui/system_log.o) +INPUT(../diag_ui/run_test.o) +INPUT(../diag_ui/input_hdlr.o) +INPUT(../diag_ui/option_input.o) +INPUT(../diag_ui/option_menu.o) +INPUT(../diag_ui/submenu_input.o) +INPUT(../diag_ui/sub_menu.o) +INPUT(../diag_ui/main_menu.o) +INPUT(../diag_ui/main_input.o) +INPUT(../diag_ui/power_up.o) +INPUT(../diag_ui/nv_journal.o) +INPUT(../entry/diag_init.o) +INPUT(../eth_tests/eth_fec_test.o) +INPUT(../eth_tests/eth_scc1_test.o) +INPUT(../eth_tests/eth_menu.o) +INPUT(../eth_tests/eth_err.o) +INPUT(../eth_tests/crossover.o) +INPUT(../fec/fec.o) +INPUT(../led/led_test.o) +INPUT(../led/led_menu.o) +INPUT(../led/led_err.o) +INPUT(../memory/mem_test.o) +INPUT(../memory/mem_menu.o) +INPUT(../memory/mem_err.o) +INPUT(../memory/mem_init.o) +INPUT(../memory/dma_test.o) +INPUT(../memory/mem_comp.o) +INPUT(../nflash/nandf_ops.o) +INPUT(../nflash/nflash_err.o) +INPUT(../nflash/nflash_menu.o) +INPUT(../nflash/nflash_init.o) +INPUT(../nflash/nflash_test.o) +INPUT(../nvram/nvram.o) +INPUT(../nvram/nvram_err.o) +INPUT(../nvram/nvram_menu.o) +INPUT(../greenbox_dpram/gb_dpram_menu.o) +INPUT(../greenbox_dpram/gb_dpram_err.o) +INPUT(../greenbox_dpram/gb_dpram_test.o) +INPUT(../greenbox_xilinx/gb_xilinx_menu.o) +INPUT(../greenbox_xilinx/gb_xilinx_err.o) +INPUT(../greenbox_xilinx/gb_xilinx_test.o) +INPUT(../greenbox_xilinx/gb_xilinx_intr.o) +INPUT(../redbox/redbox_test.o) +INPUT(../redbox/redbox_menu.o) +INPUT(../redbox/redbox_err.o) +INPUT(../redbox/xmit_buf.o) +INPUT(../reg/reg_test.o) +INPUT(../reg/reg_menu.o) +INPUT(../rtc/rtc.o) +INPUT(../rtc/date.o) +INPUT(../rtc/rtc_menu.o) +INPUT(../scc_eth/scc.o) +INPUT(../system/ticks.o) +INPUT(../system/cache.o) +INPUT(../system/ctype.o) +INPUT(../system/string.o) +INPUT(../system/vsprintf.o) +INPUT(../system/printf.o) +INPUT(../system/time.o) +INPUT(../system/cpu.o) +INPUT(../system/dboard_cfg.o) +INPUT(../system/timer.o) +INPUT(../system/interrupts.o) +INPUT(../util/speed.o) +INPUT(../util/mem_calc.o) +INPUT(../util/mem_display.o) +INPUT(../util/prandm.o) +INPUT(../util/pkt_stat.o) +INPUT(../util/detect_db.o) +ENTRY(start_here) +OUTPUT(ppc_diag) Binary files ppc_diag-1.0.2/build/ppc_diag.img and ppc_diag/build/ppc_diag.img differ diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/console/.cvsignore ppc_diag/console/.cvsignore --- ppc_diag-1.0.2/console/.cvsignore Fri Jan 3 10:40:06 2003 +++ ppc_diag/console/.cvsignore Thu May 1 11:31:26 2003 @@ -1 +1 @@ -Makefile .depend .*.swp *.out +Makefile .depend .*.swp *.out *.dmp diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/console/.depend ppc_diag/console/.depend --- ppc_diag-1.0.2/console/.depend Wed Dec 31 16:00:00 1969 +++ ppc_diag/console/.depend Mon May 12 14:51:51 2003 @@ -0,0 +1,4 @@ +serial.o: serial.c \ + /home/speedy1/build/ppc_diag/includes/ppcboot.h \ + commproc.h \ + serial.h diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/console/console.list ppc_diag/console/console.list --- ppc_diag-1.0.2/console/console.list Fri Jan 3 10:40:06 2003 +++ ppc_diag/console/console.list Thu May 1 11:31:26 2003 @@ -1,6 +1,6 @@ # list of console files -HEADERS="8xx_immap.h command.h commproc.h" +HEADERS="8xx_immap.h command.h commproc.h serial.h" AS_SOURCES= diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/console/serial.c ppc_diag/console/serial.c --- ppc_diag-1.0.2/console/serial.c Mon Jul 29 10:09:56 2002 +++ ppc_diag/console/serial.c Thu May 1 11:31:26 2003 @@ -23,11 +23,20 @@ #include "ppcboot.h" #include "commproc.h" +#include "serial.h" -#define SMC_INDEX 0 -#undef SCC_INDEX -#define PROFF_SMC PROFF_SMC1 -#define CPM_CR_CH_SMC CPM_CR_CH_SMC1 +static struct serial_port console_table[] = { + /* + * parameter irq port cpm port + * offset type channel num + */ + { PROFF_SMC1, CPMVEC_SMC1, SMC, CPM_CR_CH_SMC1, 0 }, /* SMC1 */ + { PROFF_SMC2, CPMVEC_SMC2, SMC, CPM_CR_CH_SMC2, 1 }, /* SMC2 */ + { PROFF_SCC1, CPMVEC_SCC1, SCC, CPM_CR_CH_SCC1, 0 }, /* SCC1 */ + { PROFF_SCC2, CPMVEC_SCC2, SCC, CPM_CR_CH_SCC2, 1 }, /* SCC2 */ + { PROFF_SCC3, CPMVEC_SCC3, SCC, CPM_CR_CH_SCC3, 2 }, /* SCC3 */ + { PROFF_SCC4, CPMVEC_SCC4, SCC, CPM_CR_CH_SCC4, 3 }, /* SCC4 */ +}; /* * Minimal serial functions needed to use one of the SMC ports @@ -38,11 +47,16 @@ serial_init (ulong cpu_clock, int baudrate) { volatile immap_t *im = (immap_t *)CFG_IMMR; - volatile smc_t *sp; + volatile smc_t *smcp; + volatile scc_t *sccp; volatile smc_uart_t *up; + volatile scc_uart_t *sup; volatile cbd_t *tbdf, *rbdf; - volatile cpm8xx_t *cp = &(im->im_cpm); + volatile cpm8xx_t *cpmp = &(im->im_cpm); uint dpaddr; + struct serial_port *port_info; + + port_info = &(console_table[SERIAL_INDEX]); /* * Reset CPM -- taken from cpu_init.c @@ -54,12 +68,47 @@ /* initialize pointers to SMC */ - sp = (smc_t *) &(cp->cp_smc[SMC_INDEX]); - up = (smc_uart_t *) &cp->cp_dparam[PROFF_SMC]; + if (port_info->type == SMC) + { + smcp = (smc_t *) &(cpmp->cp_smc[port_info->index]); + up = (smc_uart_t *) &cpmp->cp_dparam[port_info->param_offset]; + + /* Disable transmitter/receiver. + */ + smcp->smc_smcmr &= ~(SMCMR_REN | SMCMR_TEN); + + /* Use all relevant port B pins as SMC signals (not general IO) + */ + cpmp->cp_pbpar |= 0x00000cc0; + cpmp->cp_pbdir &= ~0x00000cc0; + cpmp->cp_pbodr &= ~0x00000cc0; + } + else + { + sccp = (scc_t *) &(cpmp->cp_scc[port_info->index]); + sup = (scc_uart_t *) &cpmp->cp_dparam[port_info->param_offset]; + + /* Disable transmitter/receiver. + */ + sccp->scc_sccm &= ~(SMCMR_REN | SMCMR_TEN); + sccp->scc_gsmrl &= ~(SCC_GSMRL_ENR | SCC_GSMRL_ENT); + + /* Use all relevant port A pins as SCC signals (not general IO) + */ + im->im_ioport.iop_papar |= 0x00ff; + im->im_ioport.iop_padir &= ~0x00ff; + im->im_ioport.iop_paodr &= ~0x00ff; + + /* Since we don't yet do modem control, connect the port C pins + * as general purpose I/O. This will assert CTS and CD for the + * SCC ports. + */ + im->im_ioport.iop_pcpar &= ~(0x30 << (2*port_info->index)); + im->im_ioport.iop_pcdir |= (0x30 << (2*port_info->index)); + im->im_ioport.iop_pcso &= ~(0x30 << (2*port_info->index)); + im->im_ioport.iop_pcdat &= ~(0x30 << (2*port_info->index)); - /* Disable transmitter/receiver. - */ - sp->smc_smcmr &= ~(SMCMR_REN | SMCMR_TEN); + } /* Enable SDMA. */ @@ -79,12 +128,6 @@ im->im_sdma.sdma_sdmr = 0x00; #endif - /* Use Port B for SMC1 instead of other functions. - */ - cp->cp_pbpar |= 0x000000c0; - cp->cp_pbdir &= ~0x000000c0; - cp->cp_pbodr &= ~0x000000c0; - /* Set the physical address of the host memory buffers in * the buffer descriptors. */ @@ -101,7 +144,7 @@ * damm: allocating space after the two buffers for rx/tx data */ - rbdf = (cbd_t *)&cp->cp_dpmem[dpaddr]; + rbdf = (cbd_t *)&cpmp->cp_dpmem[dpaddr]; rbdf->cbd_bufaddr = (uint) (rbdf+2); rbdf->cbd_sc = 0; tbdf = rbdf + 1; @@ -110,20 +153,48 @@ /* Set up the uart parameters in the parameter ram. */ - up->smc_rbase = dpaddr; - up->smc_tbase = dpaddr+sizeof(cbd_t); - up->smc_rfcr = SMC_EB; - up->smc_tfcr = SMC_EB; + if (port_info->type == SMC) + { + up->smc_rbase = dpaddr; + up->smc_tbase = dpaddr+sizeof(cbd_t); + up->smc_rfcr = SMC_EB; + up->smc_tfcr = SMC_EB; + } + else + { + sup->scc_genscc.scc_rbase = dpaddr; + sup->scc_genscc.scc_tbase = dpaddr+sizeof(cbd_t); + sup->scc_genscc.scc_rfcr = SMC_EB; + sup->scc_genscc.scc_tfcr = SMC_EB; + } /* Set UART mode, 8 bit, no parity, one stop. - * Enable receive and transmit. */ - sp->smc_smcmr = smcr_mk_clen(9) | SMCMR_SM_UART; + if (port_info->type == SMC) + { + smcp->smc_smcmr = smcr_mk_clen(9) | SMCMR_SM_UART; + } + else + { + sccp->scc_gsmrh = 0; + sccp->scc_gsmrl = + (SCC_GSMRL_MODE_UART | SCC_GSMRL_TDCR_16 | SCC_GSMRL_RDCR_16); + } /* Mask all interrupts and remove anything pending. */ - sp->smc_smcm = 0; - sp->smc_smce = 0xff; + if (port_info->type == SMC) + { + smcp->smc_smcm = 0; + smcp->smc_smce = 0xff; + } + else + { + sccp->scc_sccm = 0; + sccp->scc_scce = 0xffff; + sccp->scc_dsr = 0x7e7e; + sccp->scc_psmr = 0x3000; + } /* Set up the baud rate generator. */ @@ -136,23 +207,55 @@ /* Single character receive. */ - up->smc_mrblr = 1; - up->smc_maxidl = 0; + if (port_info->type == SMC) + { + up->smc_mrblr = 1; + up->smc_maxidl = 0; + } + else + { + sup->scc_genscc.scc_mrblr = 1; + sup->scc_maxidl = 0; + sup->scc_brkcr = 1; + sup->scc_parec = 0; + sup->scc_frmec = 0; + sup->scc_nosec = 0; + sup->scc_brkec = 0; + sup->scc_uaddr1 = 0; + sup->scc_uaddr2 = 0; + sup->scc_toseq = 0; + sup->scc_char1 = 0x8000; + sup->scc_char2 = 0x8000; + sup->scc_char3 = 0x8000; + sup->scc_char4 = 0x8000; + sup->scc_char5 = 0x8000; + sup->scc_char6 = 0x8000; + sup->scc_char7 = 0x8000; + sup->scc_char8 = 0x8000; + sup->scc_rccm = 0xc0ff; + } /* Initialize Tx/Rx parameters. */ - while (cp->cp_cpcr & CPM_CR_FLG) /* wait if cp is busy */ + while (cpmp->cp_cpcr & CPM_CR_FLG) /* wait if cp is busy */ ; - cp->cp_cpcr = mk_cr_cmd(CPM_CR_CH_SMC, CPM_CR_INIT_TRX) | CPM_CR_FLG; + cpmp->cp_cpcr = mk_cr_cmd(port_info->channel, CPM_CR_INIT_TRX) | CPM_CR_FLG; - while (cp->cp_cpcr & CPM_CR_FLG) /* wait if cp is busy */ + while (cpmp->cp_cpcr & CPM_CR_FLG) /* wait if cp is busy */ ; /* Enable transmitter/receiver. */ - sp->smc_smcmr |= SMCMR_REN | SMCMR_TEN; + if (port_info->type == SMC) + { + smcp->smc_smcmr |= SMCMR_REN | SMCMR_TEN; + } + else + { + sccp->scc_gsmrl |= (SCC_GSMRL_ENR | SCC_GSMRL_ENT); + } } @@ -160,17 +263,17 @@ serial_setbrg (ulong cpu_clock, int baudrate) { volatile immap_t *im = (immap_t *)CFG_IMMR; - volatile cpm8xx_t *cp = &(im->im_cpm); + volatile cpm8xx_t *cpmp = &(im->im_cpm); /* Set up the baud rate generator. * See 8xx_io/commproc.c for details. * - * Wire BRG1 to SMCx + * Wire BRG1 to SMCx and SCCx */ + cpmp->cp_simode = 0x00000000; + cpmp->cp_sicr = 0x00000000; - cp->cp_simode = 0x00000000; - - cp->cp_brgc1 = + cpmp->cp_brgc1 = (((cpu_clock / 16 / baudrate)-1) << 1) | CPM_BRG_EN; } @@ -181,15 +284,27 @@ volatile cbd_t *tbdf; volatile char *buf; volatile smc_uart_t *up; + volatile scc_uart_t *sup; volatile immap_t *im = (immap_t *)CFG_IMMR; volatile cpm8xx_t *cpmp = &(im->im_cpm); + struct serial_port *port_info; + + port_info = &(console_table[SERIAL_INDEX]); if (c == '\n') serial_putc ('\r'); - up = (smc_uart_t *)&cpmp->cp_dparam[PROFF_SMC]; + if (port_info->type == SMC) + { + up = (smc_uart_t *)&cpmp->cp_dparam[port_info->param_offset]; + tbdf = (cbd_t *)&cpmp->cp_dpmem[up->smc_tbase]; + } + else + { + sup = (scc_uart_t *) &cpmp->cp_dparam[port_info->param_offset]; + tbdf = (cbd_t *)&cpmp->cp_dpmem[sup->scc_genscc.scc_tbase]; + } - tbdf = (cbd_t *)&cpmp->cp_dpmem[up->smc_tbase]; /* Wait for last character to go. */ @@ -218,13 +333,24 @@ volatile cbd_t *rbdf; volatile unsigned char *buf; volatile smc_uart_t *up; + volatile scc_uart_t *sup; volatile immap_t *im = (immap_t *)CFG_IMMR; volatile cpm8xx_t *cpmp = &(im->im_cpm); unsigned char c; + struct serial_port *port_info; - up = (smc_uart_t *)&cpmp->cp_dparam[PROFF_SMC]; + port_info = &(console_table[SERIAL_INDEX]); - rbdf = (cbd_t *)&cpmp->cp_dpmem[up->smc_rbase]; + if (port_info->type == SMC) + { + up = (smc_uart_t *)&cpmp->cp_dparam[port_info->param_offset]; + rbdf = (cbd_t *)&cpmp->cp_dpmem[up->smc_rbase]; + } + else + { + sup = (scc_uart_t *) &cpmp->cp_dparam[port_info->param_offset]; + rbdf = (cbd_t *)&cpmp->cp_dpmem[sup->scc_genscc.scc_rbase]; + } /* Wait for character to show up. */ @@ -243,12 +369,23 @@ { volatile cbd_t *rbdf; volatile smc_uart_t *up; + volatile scc_uart_t *sup; volatile immap_t *im = (immap_t *)CFG_IMMR; volatile cpm8xx_t *cpmp = &(im->im_cpm); + struct serial_port *port_info; - up = (smc_uart_t *)&cpmp->cp_dparam[PROFF_SMC]; + port_info = &(console_table[SERIAL_INDEX]); - rbdf = (cbd_t *)&cpmp->cp_dpmem[up->smc_rbase]; + if (port_info->type == SMC) + { + up = (smc_uart_t *)&cpmp->cp_dparam[port_info->param_offset]; + rbdf = (cbd_t *)&cpmp->cp_dpmem[up->smc_rbase]; + } + else + { + sup = (scc_uart_t *) &cpmp->cp_dparam[port_info->param_offset]; + rbdf = (cbd_t *)&cpmp->cp_dpmem[sup->scc_genscc.scc_rbase]; + } return(!(rbdf->cbd_sc & BD_SC_EMPTY)); } diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/console/serial.h ppc_diag/console/serial.h --- ppc_diag-1.0.2/console/serial.h Wed Dec 31 16:00:00 1969 +++ ppc_diag/console/serial.h Thu May 1 11:31:26 2003 @@ -0,0 +1,54 @@ +/* + * (C) Copyright 2003 + * Stephanie Lockwood-Childs, VCT Labs, sjl@vctlabs.com. + * + * See file CREDITS for the list of contributors to this project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#ifndef __SERIAL_H +#define __SERIAL_H + +#include "diags.h" + +#ifdef SERIAL_SMC + #if !(SERIAL_SMC >= 1 && SERIAL_SMC <= 2) + #error "bad value for SERIAL_SMC (must be 1 or 2)" + #endif +#define SERIAL_INDEX (SERIAL_SMC - 1) +#elif defined(SERIAL_SCC) + #if !(SERIAL_SCC >= 1 && SERIAL_SCC <= 4) + #error "bad value for SERIAL_SCC (must be between 1 and 4)" + #endif +#define SERIAL_INDEX (SERIAL_SCC + 1) +#else +#error "no console serial port defined (define SERIAL_SMC or SERIAL_SCC)" +#endif + +struct serial_port +{ + int param_offset; + int irq; + int type; + int channel; + int index; +}; + +#define SMC 1 +#define SCC 2 + +#endif /* __SERIAL_H */ diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/diag_ui/.cvsignore ppc_diag/diag_ui/.cvsignore --- ppc_diag-1.0.2/diag_ui/.cvsignore Fri Jan 3 10:40:06 2003 +++ ppc_diag/diag_ui/.cvsignore Thu May 1 11:31:26 2003 @@ -1 +1 @@ -Makefile .depend version.c .*.swp *.out +Makefile .depend version.c .*.swp *.out *.dmp diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/diag_ui/.depend ppc_diag/diag_ui/.depend --- ppc_diag-1.0.2/diag_ui/.depend Wed Dec 31 16:00:00 1969 +++ ppc_diag/diag_ui/.depend Mon May 12 14:51:52 2003 @@ -0,0 +1,92 @@ +center.o: center.c \ + /home/speedy1/build/ppc_diag/includes/string.h \ + /home/speedy1/build/ppc_diag/includes/printf.h \ + center.h +clear_screen.o: clear_screen.c \ + /home/speedy1/build/ppc_diag/includes/printf.h \ + clear_screen.h +diag_menu.o: diag_menu.c \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + diag_menu.h +system_log.o: system_log.c \ + /home/speedy1/build/ppc_diag/includes/ppcboot.h \ + /home/speedy1/build/ppc_diag/includes/printf.h \ + /home/speedy1/build/ppc_diag/includes/string.h \ + /home/speedy1/build/ppc_diag/includes/date.h \ + system_log.h +run_test.o: run_test.c \ + /home/speedy1/build/ppc_diag/includes/ppcboot.h \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + /home/speedy1/build/ppc_diag/includes/printf.h \ + system_log.h \ + /home/speedy1/build/ppc_diag/includes/led_test.h \ + run_test.h +input_hdlr.o: input_hdlr.c \ + /home/speedy1/build/ppc_diag/includes/printf.h \ + /home/speedy1/build/ppc_diag/includes/string.h \ + input_hdlr.h +option_input.o: option_input.c \ + /home/speedy1/build/ppc_diag/includes/string.h \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + /home/speedy1/build/ppc_diag/includes/printf.h \ + diag_menu.h \ + input_hdlr.h \ + option_menu.h \ + option_input.h +option_menu.o: option_menu.c \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + /home/speedy1/build/ppc_diag/includes/printf.h \ + center.h \ + clear_screen.h \ + option_menu.h \ + option_input.h +submenu_input.o: submenu_input.c \ + /home/speedy1/build/ppc_diag/includes/string.h \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + /home/speedy1/build/ppc_diag/includes/printf.h \ + option_menu.h \ + run_test.h \ + input_hdlr.h \ + submenu_input.h +sub_menu.o: sub_menu.c \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + /home/speedy1/build/ppc_diag/includes/printf.h \ + /home/speedy1/build/ppc_diag/includes/date.h \ + sub_menu.h \ + center.h \ + clear_screen.h \ + submenu_input.h +main_menu.o: main_menu.c \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + /home/speedy1/build/ppc_diag/includes/string.h \ + /home/speedy1/build/ppc_diag/includes/printf.h \ + /home/speedy1/build/ppc_diag/includes/detect_db.h \ + /home/speedy1/build/ppc_diag/includes/date.h \ + center.h \ + clear_screen.h \ + diag_menu.h \ + main_input.h +main_input.o: main_input.c \ + /home/speedy1/build/ppc_diag/includes/string.h \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + /home/speedy1/build/ppc_diag/includes/printf.h \ + diag_menu.h \ + sub_menu.h \ + run_test.h \ + system_log.h \ + nv_journal.h \ + input_hdlr.h \ + main_input.h +power_up.o: power_up.c \ + /home/speedy1/build/ppc_diag/includes/string.h \ + /home/speedy1/build/ppc_diag/includes/printf.h \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + diag_menu.h \ + run_test.h +nv_journal.o: nv_journal.c \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + /home/speedy1/build/ppc_diag/includes/printf.h \ + /home/speedy1/build/ppc_diag/includes/string.h \ + input_hdlr.h \ + /home/speedy1/build/ppc_diag/includes/nvram.h \ + nv_journal.h diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/diag_ui/diag_menu.c ppc_diag/diag_ui/diag_menu.c --- ppc_diag-1.0.2/diag_ui/diag_menu.c Thu Jan 9 16:27:46 2003 +++ ppc_diag/diag_ui/diag_menu.c Thu May 1 11:31:26 2003 @@ -35,6 +35,9 @@ #ifdef ENABLE_NVRAM_SUPPORT extern test_submenu_package nvram_package; #endif +#ifdef ENABLE_NAND_FLASH_SUPPORT +extern test_submenu_package nflash_package; +#endif extern test_submenu_package memory_package; #ifdef ENABLE_FEC_SUPPORT extern test_submenu_package fec_ethernet_package; @@ -47,6 +50,9 @@ extern test_submenu_package gb_dpram_package; extern test_submenu_package gb_xilinx_package; #endif +#ifdef ENABLE_RED_BOX_SUPPORT +extern test_submenu_package redbox_package; +#endif void empty_function( void ); @@ -64,6 +70,9 @@ #ifdef ENABLE_NVRAM_SUPPORT &nvram_package, #endif +#ifdef ENABLE_NAND_FLASH_SUPPORT + &nflash_package, +#endif &memory_package, #ifdef ENABLE_FEC_SUPPORT &fec_ethernet_package, @@ -75,6 +84,9 @@ #ifdef ENABLE_GREEN_BOX_SUPPORT &gb_dpram_package, &gb_xilinx_package, +#endif +#ifdef ENABLE_RED_BOX_SUPPORT + &redbox_package, #endif }; diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/diag_ui/diag_menu.h ppc_diag/diag_ui/diag_menu.h --- ppc_diag-1.0.2/diag_ui/diag_menu.h Thu Jan 9 16:27:46 2003 +++ ppc_diag/diag_ui/diag_menu.h Thu May 1 11:31:26 2003 @@ -34,6 +34,9 @@ #ifdef ENABLE_NVRAM_SUPPORT NVRAMPackage, #endif +#ifdef ENABLE_NAND_FLASH_SUPPORT + nflashPackage, +#endif MemoryPackage, #ifdef ENABLE_FEC_SUPPORT FECEthernetPackage, @@ -45,6 +48,9 @@ #ifdef ENABLE_GREEN_BOX_SUPPORT GreenBoxDPRAMPackage, GreenBoxXilinxPackage, +#endif +#ifdef ENABLE_RED_BOX_SUPPORT + RedBoxPackage, #endif LastPackage } package_elements; diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/diag_ui/main_menu.c ppc_diag/diag_ui/main_menu.c --- ppc_diag-1.0.2/diag_ui/main_menu.c Mon Jan 13 15:53:53 2003 +++ ppc_diag/diag_ui/main_menu.c Thu May 1 11:31:26 2003 @@ -64,6 +64,9 @@ { /* disable green/red box submenus */ all_packages[GreenBoxDPRAMPackage]->pkg_enabled = DisableSubmenu; all_packages[GreenBoxXilinxPackage]->pkg_enabled = DisableSubmenu; +#ifdef ENABLE_RED_BOX_SUPPORT + all_packages[RedBoxPackage]->pkg_enabled = DisableSubmenu; +#endif } #endif /* ENABLE_GREEN_BOX_SUPPORT */ /* ^^^ end of run-time menu alterations ^^^ */ diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/diag_ui/version.c ppc_diag/diag_ui/version.c --- ppc_diag-1.0.2/diag_ui/version.c Fri Feb 7 18:14:15 2003 +++ ppc_diag/diag_ui/version.c Mon May 12 14:53:03 2003 @@ -1,2 +1,2 @@ -char diag_version[] = "Version 1.0.2"; +char diag_version[] = "Version 1.0.4"; char copyright[] = "(c) 2002, VCT Labs"; diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/documents/diag_developer_guide.lyx ppc_diag/documents/diag_developer_guide.lyx --- ppc_diag-1.0.2/documents/diag_developer_guide.lyx Fri Feb 7 14:44:23 2003 +++ ppc_diag/documents/diag_developer_guide.lyx Tue Feb 11 16:16:50 2003 @@ -437,6 +437,11 @@ . This should be the same directory where the tftp server application looks when sending files to a tftp client. +\layout Itemize + +MKIMAGE - Points to the mkimage program built during the PPCBoot build process. + The 'make standalone' make target uses this program to convert the ppc_diag + elf executable into an image file loadable by PPCBoot. \layout Standard The following sections describe the available make @@ -529,9 +534,9 @@ target that will convert the diagnostics elf file into a .img file (a format usable by PPCBoot), and place it into the TFTPBASEDIR path specified in the Makefile. - For this to work properly, make sure that MKIMAGEDIR in gendiags.sh points - to PPCBoot's mkimage program, and that BINUTILSPATH in gendiags.sh points - to the path for the target's version of objcopy. + For this to work properly, make sure that MKIMAGE in the Makefile points + to PPCBoot's mkimage program, and that OBJCOPY in the Makefile points to + the path for the target's version of objcopy. \layout Chapter Diagnostics Code Walkthrough diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/documents/diag_developer_guide.ps ppc_diag/documents/diag_developer_guide.ps --- ppc_diag-1.0.2/documents/diag_developer_guide.ps Fri Feb 7 14:58:19 2003 +++ ppc_diag/documents/diag_developer_guide.ps Mon May 12 15:26:49 2003 @@ -9,7 +9,7 @@ %DVIPSCommandLine: dvips -t letter -o diag_developer_guide.ps %+ diag_developer_guide.dvi %DVIPSParameters: dpi=600, compressed -%DVIPSSource: TeX output 2003.02.07:1458 +%DVIPSSource: TeX output 2003.05.12:1526 %%BeginProcSet: texc.pro %! /TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S @@ -1764,52 +1764,40 @@ 03D81FF8EB07F8000FEC1FF06CB4EBFFE06C90B55AC692CFFC6D13FC011F13F001011380 69857CDB72>121 D E %EndDVIPSBitmapFont -%DVIPSBitmapFont: Fq ecrm1200 12 13 -/Fq 13 122 df<14FF010713E090381F81F890383E007C01FC133F4848EB1F8049130F48 +%DVIPSBitmapFont: Fq ecrm1200 12 9 +/Fq 9 122 df<14FF010713E090381F81F890383E007C01FC133F4848EB1F8049130F48 48EB07C04848EB03E0A2000F15F0491301001F15F8A2003F15FCA390C8FC4815FEA54815 FFB3A46C15FEA56D1301003F15FCA3001F15F8A26C6CEB03F0A36C6CEB07E0000315C06D 130F6C6CEB1F806C6CEB3F00013E137C90381F81F8903807FFE0010090C7FC28447CC131 ->48 D50 D<49B4FC010F13E0013F13FC -9038FE01FE3A01F0007F80D803C0EB3FC048C7EA1FE0120EED0FF0EA0FE0486C14F8A215 -077F5BA26C48130FEA03C0C813F0A3ED1FE0A2ED3FC01680ED7F0015FE4A5AEC03F0EC1F -C0D90FFFC7FC15F090380001FCEC007FED3F80ED1FC0ED0FE016F0ED07F816FC150316FE -A2150116FFA3121EEA7F80487EA416FE491303A2007EC713FC00701407003015F8003814 -0F6C15F06CEC1FE06C6CEB3FC0D803E0EB7F803A01FE01FE0039007FFFF8010F13E00101 -90C7FC28447CC131>I<121CA2EA1F8090B712C0A3481680A217005E0038C8120C003015 -1C00705D0060153016705E5E4814014B5A4BC7FCC81206150E5D151815385D156015E04A -5AA24A5A140792C8FC5CA25C141E143EA2147E147CA214FCA21301A3495AA41307A6130F -AA6D5AEB01C02A457BC231>55 D70 +>48 D<143014F013011303131F13FFB5FC13E713071200B3B3B0497E497E007FB6FCA320 +4278C131>II<49B4FC010F13E0013F +13FC9038FE01FE3A01F0007F80D803C0EB3FC048C7EA1FE0120EED0FF0EA0FE0486C14F8 +A215077F5BA26C48130FEA03C0C813F0A3ED1FE0A2ED3FC01680ED7F0015FE4A5AEC03F0 +EC1FC0D90FFFC7FC15F090380001FCEC007FED3F80ED1FC0ED0FE016F0ED07F816FC1503 +16FEA2150116FFA3121EEA7F80487EA416FE491303A2007EC713FC00701407003015F800 +38140F6C15F06CEC1FE06C6CEB3FC0D803E0EB7F803A01FE01FE0039007FFFF8010F13E0 +010190C7FC28447CC131>I77 D97 -DI101 D104 D<3903F803F000FFEB1FFCEC3C3EEC70 -7F0007EBE0FF3803F9C000015B13FBEC007E153C01FF13005BA45BB3A748B4FCB512FEA3 -202C7DAB26>114 D<1306A5130EA4131EA3133E137EA213FE12011207001FB512F0B6FC -A2C648C7FCB3A4150CAA017E131C017F1318A26D133890381F8030ECC070903807E0E090 -3801FFC09038007F001E3E7EBC26>116 DI121 -D E +D104 D<1306A5130EA4131EA3133E137EA213FE12011207001FB512F0B6FCA2C648C7 +FCB3A4150CAA017E131C017F1318A26D133890381F8030ECC070903807E0E0903801FFC0 +9038007F001E3E7EBC26>116 D121 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fr ecrm1728 17.28 18 /Fr 18 119 df<120FEA3FC0EA7FE0EAFFF0A213F8A313FC127FEA3FDCEA0F1C1200A713 @@ -1903,8 +1891,8 @@ %%EndSetup %%Page: 1 1 -1 0 bop 1054 2143 a Fr(Diagnostics)47 b(Dev)l(elop)t(er's)f(Guide)1558 -2749 y Fq(7th)32 b(F)-8 b(ebruary)33 b(2003)p eop +1 0 bop 1054 2143 a Fr(Diagnostics)47 b(Dev)l(elop)t(er's)f(Guide)1632 +2749 y Fq(12th)32 b(Ma)m(y)h(2003)p eop %%Page: 1 2 1 1 bop 0 997 a Fp(Con)-6 b(ten)g(ts)0 1512 y Fo(1)77 b(In)m(tro)s(duction)3201 b(3)0 1694 y(2)77 b(Diagnostics)30 @@ -1985,7 +1973,7 @@ 3986 y(2.3.3)94 b(mak)n(e)27 b(dep)r(end)60 b(.)42 b(.)g(.)f(.)h(.)f(.) h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f (.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.) -134 b(7)315 4085 y(2.3.4)94 b(default)28 b(mak)n(e)f(target)f(\(mak)n +134 b(8)315 4085 y(2.3.4)94 b(default)28 b(mak)n(e)f(target)f(\(mak)n (e)h(with)h(no)g(argumen)n(ts\))60 b(.)42 b(.)f(.)h(.)f(.)h(.)g(.)f(.)h (.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)134 b(8)315 4185 y(2.3.5)94 b(mak)n(e)27 b(standalone)61 @@ -2291,64 +2279,70 @@ 2757 y(\020mak)n(e)i(standalone\021.)52 b(This)32 b(should)h(b)r(e)g (the)h(same)e(directory)f(where)i(the)g(tftp)h(serv)n(er)d(application) h(lo)r(oks)g(when)208 2857 y(sending)27 b(\034les)g(to)h(a)f(tftp)i -(clien)n(t.)0 3039 y(The)f(follo)n(wing)e(sections)h(describ)r(e)g(the) -h(a)n(v)-5 b(ailable)26 b(mak)n(e)1826 3009 y Fi(6)1890 -3039 y Fn(targets.)0 3272 y Fh(2.3.1)112 b(mak)m(e)38 -b(sub_mak)m(e)0 3425 y Fn(If)27 b(building)f(from)h(the)f(CVS)h(rep)r -(ository)-7 b(,)25 b(this)i(creates)e(all)h(the)h(Mak)n(e\034le)f -(links)g(in)g(the)h(source)e(directories,)h(whic)n(h)g(p)r(oin)n(t)0 -3524 y(to)g(build/mo)r(dule.mak.)36 b(If)26 b(the)g(diagnostics)e(are)h +(clien)n(t.)125 3023 y Fj(\017)41 b Fn(MKIMA)n(GE)34 +b(-)f(P)n(oin)n(ts)h(to)f(the)h(mkimage)f(program)f(built)i(during)f +(the)i(PPCBo)r(ot)f(build)g(pro)r(cess.)54 b(The)34 b('mak)n(e)208 +3122 y(standalone')c(mak)n(e)h(target)f(uses)h(this)h(program)d(to)j +(con)n(v)n(ert)e(the)h(pp)r(c_diag)g(elf)h(executable)f(in)n(to)g(an)g +(image)g(\034le)208 3222 y(loadable)26 b(b)n(y)h(PPCBo)r(ot.)0 +3404 y(The)h(follo)n(wing)e(sections)h(describ)r(e)g(the)h(a)n(v)-5 +b(ailable)26 b(mak)n(e)1826 3374 y Fi(6)1890 3404 y Fn(targets.)0 +3637 y Fh(2.3.1)112 b(mak)m(e)38 b(sub_mak)m(e)0 3790 +y Fn(If)27 b(building)f(from)h(the)f(CVS)h(rep)r(ository)-7 +b(,)25 b(this)i(creates)e(all)h(the)h(Mak)n(e\034le)f(links)g(in)g(the) +h(source)e(directories,)h(whic)n(h)g(p)r(oin)n(t)0 3890 +y(to)g(build/mo)r(dule.mak.)36 b(If)26 b(the)g(diagnostics)e(are)h (unpac)n(k)n(ed)g(from)g(a)h(tar.gz,)f(these)h(links)f(should)h -(already)e(b)r(e)i(a)n(v)-5 b(ailable.)0 3757 y Fh(2.3.2)112 -b(mak)m(e)38 b(h\034les)0 3910 y Fn(As)26 b(for)f(the)g(sub_mak)n(e)g +(already)e(b)r(e)i(a)n(v)-5 b(ailable.)0 4122 y Fh(2.3.2)112 +b(mak)m(e)38 b(h\034les)0 4275 y Fn(As)26 b(for)f(the)g(sub_mak)n(e)g (target,)g(this)g(is)h(merely)f(for)g(con)n(v)n(enience)f(for)h(CVS)h (c)n(hec)n(k)n(outs)d(of)j(the)g(diagnostics.)35 b(This)25 -b(mak)n(e)0 4010 y(target)j(places)f(links)i(to)f(all)g(the)h(.h)g +b(mak)n(e)0 4375 y(target)j(places)f(links)i(to)f(all)g(the)h(.h)g (\034les)f(in)n(to)g(the)h(includes/)f(sub)r(directory)-7 b(.)39 b(Once)28 b(again,)g(if)h(unpac)n(k)n(ed)e(from)h(a)g(tar.gz,)0 -4109 y(these)g(links)f(should)g(already)f(exist.)0 4342 -y Fh(2.3.3)112 b(mak)m(e)38 b(dep)s(end)0 4495 y Fn(Similar)28 -b(to)h(the)g(\020dep\021)35 b(mak)n(e)27 b(target)h(when)h(building)f -(a)h(lin)n(ux)f(k)n(ernel,)g(the)h(mak)n(e)f(dep)r(end)h(stage)f -(creates)f(.dep)r(end)i(\034les)0 4594 y(in)h(eac)n(h)f(source)f -(directory)h(so)g(that)g(the)i(mak)n(e)d(pro)r(cess)h(kno)n(ws)f(whic)n -(h)i(\034les)g(dep)r(end)g(on)f(eac)n(h)g(other.)43 b(This)29 -b(sp)r(eeds)h(up)0 4694 y(the)c(mak)n(e)f(pro)r(cess)g(since)g(only)h -(c)n(hanged)f(\034les,)h(and)f(those)h(that)g(dep)r(end)h(on)e(them,)i -(get)e(recompiled.)36 b(F)-7 b(or)25 b(this)h(stage)f(to)0 -4794 y(w)n(ork)k(prop)r(erly)-7 b(,)31 b(set)g(the)g(MKDEP)h(constan)n -(t)e(in)h(the)h(Mak)n(e\034le)e(to)g(the)h(lo)r(cation)g(on)f(y)n(our)g -(system)g(where)h(mkdep)g(has)0 4893 y(b)r(een)d(built)g(in)g(the)g -(lin)n(ux)g(k)n(ernel)e(source)g(tree.)p 0 4947 1560 -4 v 92 5000 a Fg(6)127 5023 y Ff(Under)31 b(Lin)n(ux,)g(the)g +4475 y(these)g(links)f(should)g(already)f(exist.)p 0 +4544 1560 4 v 92 4597 a Fg(6)127 4621 y Ff(Under)31 b(Lin)n(ux,)g(the)g (\020info\021)j(utilit)n(y)c(has)h(excellen)n(t)g(do)r(cumen)n(tation)g (for)f(the)h(\020mak)n(e\021)k(command)28 b(-)i(try)h(\020info)e(mak)n -(e\021.)49 b(There)31 b(are)g(also)0 5102 y(en)n(tries)25 +(e\021.)49 b(There)31 b(are)g(also)0 4700 y(en)n(tries)25 b(for)f(gcc)g(and)g(bin)n(utils)g(\(if)f(running)h(Debian,)g(mak)n(e)f (sure)i(the)f(gcc-2.95-do)r(c)h(and)f(bin)n(utils-do)r(c)f(pac)n(k)l (ages)j(are)f(installed\))p eop %%Page: 8 9 8 8 bop 0 100 a Fm(CHAPTER)29 b(2.)64 b(DIA)n(GNOSTICS)28 -b(BUILD)g(ENVIR)n(ONMENT)1724 b Fn(8)0 333 y Fh(2.3.4)112 +b(BUILD)g(ENVIR)n(ONMENT)1724 b Fn(8)0 333 y Fh(2.3.3)112 +b(mak)m(e)38 b(dep)s(end)0 486 y Fn(Similar)28 b(to)h(the)g +(\020dep\021)35 b(mak)n(e)27 b(target)h(when)h(building)f(a)h(lin)n(ux) +f(k)n(ernel,)g(the)h(mak)n(e)f(dep)r(end)h(stage)f(creates)f(.dep)r +(end)i(\034les)0 586 y(in)h(eac)n(h)f(source)f(directory)h(so)g(that)g +(the)i(mak)n(e)d(pro)r(cess)h(kno)n(ws)f(whic)n(h)i(\034les)g(dep)r +(end)g(on)f(eac)n(h)g(other.)43 b(This)29 b(sp)r(eeds)h(up)0 +685 y(the)c(mak)n(e)f(pro)r(cess)g(since)g(only)h(c)n(hanged)f +(\034les,)h(and)f(those)h(that)g(dep)r(end)h(on)e(them,)i(get)e +(recompiled.)36 b(F)-7 b(or)25 b(this)h(stage)f(to)0 +785 y(w)n(ork)k(prop)r(erly)-7 b(,)31 b(set)g(the)g(MKDEP)h(constan)n +(t)e(in)h(the)h(Mak)n(e\034le)e(to)g(the)h(lo)r(cation)g(on)f(y)n(our)g +(system)g(where)h(mkdep)g(has)0 884 y(b)r(een)d(built)g(in)g(the)g(lin) +n(ux)g(k)n(ernel)e(source)g(tree.)0 1117 y Fh(2.3.4)112 b(default)38 b(mak)m(e)f(target)g(\(mak)m(e)g(with)f(no)i(argumen)m -(ts\))0 486 y Fn(The)26 b(default)h(mak)n(e)e(target)g(compiles)h(all)g -(the)g(source)f(co)r(de,)h(outputs)h(a)f(link)n(er)f(script,)h(and)g -(links)g(the)h(diagnostics)d(co)r(de)0 586 y(in)n(to)j(a)g(single)g(ob) -5 b(ject)28 b(\034le)g(that)f(can)h(b)r(e)g(copied)f(in)n(to)g(the)h -(target)f(system's)g(memory)f(and)i(executed.)0 818 y -Fh(2.3.5)112 b(mak)m(e)38 b(standalone)0 971 y Fn(F)-7 +(ts\))0 1270 y Fn(The)26 b(default)h(mak)n(e)e(target)g(compiles)h(all) +g(the)g(source)f(co)r(de,)h(outputs)h(a)f(link)n(er)f(script,)h(and)g +(links)g(the)h(diagnostics)d(co)r(de)0 1370 y(in)n(to)j(a)g(single)g +(ob)5 b(ject)28 b(\034le)g(that)f(can)h(b)r(e)g(copied)f(in)n(to)g(the) +h(target)f(system's)g(memory)f(and)i(executed.)0 1602 +y Fh(2.3.5)112 b(mak)m(e)38 b(standalone)0 1755 y Fn(F)-7 b(or)29 b(em)n(b)r(edded)h(b)r(oards)f(that)h(use)f(PPCBo)r(ot)h(for)g (the)g(b)r(o)r(ot)g(loader,)f(this)h(is)f(a)h(con)n(v)n(enience)e -(target)h(that)h(will)g(con)n(v)n(ert)0 1071 y(the)d(diagnostics)e(elf) +(target)h(that)h(will)g(con)n(v)n(ert)0 1855 y(the)d(diagnostics)e(elf) i(\034le)f(in)n(to)g(a)h(.img)f(\034le)g(\(a)h(format)f(usable)g(b)n(y) g(PPCBo)r(ot\),)h(and)f(place)g(it)h(in)n(to)f(the)h(TFTPBASEDIR)0 -1170 y(path)34 b(sp)r(eci\034ed)h(in)f(the)h(Mak)n(e\034le.)56 -b(F)-7 b(or)33 b(this)i(to)f(w)n(ork)f(prop)r(erly)-7 -b(,)35 b(mak)n(e)e(sure)h(that)g(MKIMA)n(GEDIR)h(in)g(gendiags.sh)0 -1270 y(p)r(oin)n(ts)24 b(to)g(PPCBo)r(ot's)g(mkimage)f(program,)f(and)i -(that)g(BINUTILSP)-7 b(A)g(TH)25 b(in)f(gendiags.sh)f(p)r(oin)n(ts)g -(to)h(the)g(path)g(for)g(the)0 1370 y(target's)i(v)n(ersion)g(of)i(ob)5 -b(jcop)n(y)-7 b(.)p eop +1954 y(path)g(sp)r(eci\034ed)g(in)g(the)g(Mak)n(e\034le.)35 +b(F)-7 b(or)27 b(this)g(to)f(w)n(ork)f(prop)r(erly)-7 +b(,)26 b(mak)n(e)g(sure)g(that)h(MKIMA)n(GE)g(in)g(the)g(Mak)n(e\034le) +f(p)r(oin)n(ts)0 2054 y(to)32 b(PPCBo)r(ot's)h(mkimage)f(program,)f +(and)i(that)f(OBJCOPY)g(in)h(the)g(Mak)n(e\034le)e(p)r(oin)n(ts)i(to)f +(the)h(path)f(for)g(the)h(target's)0 2154 y(v)n(ersion)26 +b(of)i(ob)5 b(jcop)n(y)-7 b(.)p eop %%Page: 9 10 9 9 bop 0 955 a Fl(Chapter)61 b(3)0 1370 y Fp(Diagnostics)73 b(Co)6 b(de)73 b(W)-18 b(alkthrough)0 1813 y Fn(This)24 diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/documents/diag_developer_guide.txt ppc_diag/documents/diag_developer_guide.txt --- ppc_diag-1.0.2/documents/diag_developer_guide.txt Fri Feb 7 14:58:09 2003 +++ ppc_diag/documents/diag_developer_guide.txt Mon May 12 15:26:33 2003 @@ -290,6 +290,11 @@ where the tftp server application looks when sending files to a tftp client. +* MKIMAGE - Points to the mkimage program built during the + PPCBoot build process. The 'make standalone' make target + uses this program to convert the ppc_diag elf executable + into an image file loadable by PPCBoot. + The following sections describe the available make([footnote] Under Linux, the "info" utility has excellent documentation for the "make" command - try "info make". There are also entries for gcc and binutils (if @@ -336,10 +341,10 @@ this is a convenience target that will convert the diagnostics elf file into a .img file (a format usable by PPCBoot), and place it into the TFTPBASEDIR path specified in the -Makefile. For this to work properly, make sure that MKIMAGEDIR -in gendiags.sh points to PPCBoot's mkimage program, and -that BINUTILSPATH in gendiags.sh points to the path for -the target's version of objcopy. +Makefile. For this to work properly, make sure that MKIMAGE +in the Makefile points to PPCBoot's mkimage program, and +that OBJCOPY in the Makefile points to the path for the +target's version of objcopy. Diagnostics Code Walkthrough diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/documents/diag_guide.lyx ppc_diag/documents/diag_guide.lyx --- ppc_diag-1.0.2/documents/diag_guide.lyx Fri Feb 7 14:44:23 2003 +++ ppc_diag/documents/diag_guide.lyx Mon May 12 14:29:12 2003 @@ -549,14 +549,14 @@ The test descriptions follow the format: \layout Standard -3.1 Submenu name +3.X Submenu name \layout Standard -3.1.1 Description of submenu's purpose (may include figures, screen shots, +3.X.1 Description of submenu's purpose (may include figures, screen shots, tables, etc.) \layout Standard -3.1.2 Description of options available (possible values, with default values +3.X.2 Description of options available (possible values, with default values in \series bold bold @@ -564,7 +564,7 @@ ) \layout Standard -3.1.3 Test Descriptions +3.X.3 Test Descriptions \layout Standard Test Name @@ -1442,6 +1442,448 @@ None. \layout Section +NAND Flash +\layout Subsection + +Submenu Descriptions +\layout Standard + +The tests in this menu exercise read, write, and erase operations on a NAND + flash device (specifically the 8- and 16-MB Toshiba devices). + Note that different makes and models of NAND flash recommend different + methods for discovering bad blocks; check the NAND flash device's data + sheet before attempting potentially destructive operations. + For instance, some devices recommend searching for bad blocks by ensuring + that all bits are '1' before ever performing any write or erase operations. +\layout Subsection + +Submenu Options +\layout List +\labelwidthstring 00.00.0000 + +Debug\SpecialChar ~ +level: View diagnostics software debug information. + Four levels of debugging are available: ( +\series bold +0 = none +\series default +, 1 = terse, 2 = verbose, 3 = massive screen scroll). +\layout List +\labelwidthstring 00.00.0000 + +Page\SpecialChar ~ +size: Set the number of bytes per page. + If the device ID is recognized, this value will be set automatically. +\layout List +\labelwidthstring 00.00.0000 + +Pages\SpecialChar ~ +per\SpecialChar ~ +block: Set the number of pages per block. + If the device ID is recognized, this value will be set automatically. +\layout List +\labelwidthstring 00.00.0000 + +Capacity: Set the total number of pages in the device. + If the device ID is recognized, this value will be set automatically. +\layout List +\labelwidthstring 00.00.0000 + +NAND\SpecialChar ~ +device\SpecialChar ~ +ID: The NAND flash menu initialization executes the device ID + read command automatically and fills in this field. + If the initialization code recognizes the device ID, the other fields will + be initialized as well. +\layout List +\labelwidthstring 00.00.0000 + +Page\SpecialChar ~ +number: For the Dump\SpecialChar ~ +NAND\SpecialChar ~ +Flash\SpecialChar ~ +Page test, selects which page to view. +\layout List +\labelwidthstring 00.00.0000 + +Block\SpecialChar ~ +number: For block-based operations (write and erase), selects which + block to operate on. + The value 0xFFFFFFFF indicates all blocks. +\layout List +\labelwidthstring 00.00.0000 + +Mem\SpecialChar ~ +copy\SpecialChar ~ +start: Used only for the Dump\SpecialChar ~ +NAND\SpecialChar ~ +Flash\SpecialChar ~ +Page test. + The contents of the NAND flash page will be copied to the RAM starting + at the address specified here before being printed. +\layout Subsection + +Test Descriptions +\layout Subsubsection + +Test: Reset NAND Flash +\layout Description + +Test\SpecialChar ~ +Description: +\series medium +This test sends the reset command to the NAND flash. +\layout Description + +Test\SpecialChar ~ +Modes: +\series medium +All test modes +\layout Description + +Test\SpecialChar ~ +Options: - +\newline +Debug level: If set to a value other than '0', displays the code returned + by the NAND flash device. +\layout Description + +Test\SpecialChar ~ +Failures: - +\newline + +\series bold +NAND Flash did not reset!: +\series default +The NAND device did not return the correct response for the reset command. +\layout Subsubsection + +Test: Check For Bad Blocks +\layout Description + +Test\SpecialChar ~ +Description: This test is intended for NAND flash devices that recommend + the erase, write 01010101b, erase, write 10101010b, erase sequence for + finding bad blocks on the device. + Do not use this test for devices that recommend searching for bits that + are not '1' when received from the factory for determining bad blocks. + See the Verify\SpecialChar ~ +Erase/New\SpecialChar ~ +Device test description, below, for these devices. + This test will erase all data contained on the flash device. + Also, the bad block information will only be printed, not stored on the + NAND flash. +\layout Description + +Test\SpecialChar ~ +Modes: Custom test +\layout Description + +Test\SpecialChar ~ +Options: - +\newline +Page\SpecialChar ~ +size: Set the number of bytes per page. + Usually pre-set by the menu initialization code, if the NAND flash device + is recognized. +\newline +Pages\SpecialChar ~ +per\SpecialChar ~ +block: Set the number of pages contained within a flash block. + Usually pre-set by the menu initialization code, if the NAND flash device + is recognized. +\newline +Capacity: Set the total number of pages contained by the flash device. + Usually pre-set by the menu initialization code, if the NAND flash device + is recognized. +\newline +Block\SpecialChar ~ +number: Set which block number to test. + If set to the value 0xFFFFFFFF, all flash blocks will be tested, from block + 0 up to the value Capacity / Pages\SpecialChar ~ +per\SpecialChar ~ +block. +\layout Description + +Test\SpecialChar ~ +Failures: - +\newline +This test doesn't fail, it only prints a list of bad locations on the NAND + flash. +\layout Subsubsection + +Test: Erase Blocks +\layout Description + +Test\SpecialChar ~ +Description: Erase a given NAND flash block, or all flash blocks. +\layout Description + +Test\SpecialChar ~ +Modes: Custom test +\layout Description + +Test\SpecialChar ~ +Options: - +\newline +Page\SpecialChar ~ +size: Set the number of bytes per page. + Usually pre-set by the menu initialization code, if the NAND flash device + is recognized. +\newline +Pages\SpecialChar ~ +per\SpecialChar ~ +block: Set the number of pages contained within a flash block. + Usually pre-set by the menu initialization code, if the NAND flash device + is recognized. +\newline +Capacity: Set the total number of pages contained by the flash device. + Usually pre-set by the menu initialization code, if the NAND flash device + is recognized. +\newline +Block\SpecialChar ~ +number: Indicate which block to erase. + The value 0xFFFFFFFF for this option will erase all blocks. +\layout Description + +Test\SpecialChar ~ +Failures: - +\newline + +\series bold +Specified block # out of range: +\series default + Double-check the Block\SpecialChar ~ +number option. + It should be within the range 0 to (Capacity / Pages\SpecialChar ~ +per\SpecialChar ~ +block). +\newline + +\series bold +NAND device reports erase failure in block: +\series default + The NAND status read indicated that the previous erase command failed. +\newline + +\series bold +Erase error in page: +\series default + (Unlikely) The NAND status read did not indicate a failure, but the contents + of the block contained one or more '0' bits. +\layout Subsubsection + +Test: Write Test Ptn 1 +\layout Description + +Test\SpecialChar ~ +Description: Writes the binary pattern 01010101b to each byte in the + given block, or all flash blocks. + Make sure the blocks selected in the Block\SpecialChar ~ +number option have been erased. +\layout Description + +Test\SpecialChar ~ +Modes: Custom test +\layout Description + +Test\SpecialChar ~ +Options: - +\newline +Page\SpecialChar ~ +size: Set the number of bytes per page. + Usually pre-set by the menu initialization code, if the NAND flash device + is recognized. +\newline +Pages\SpecialChar ~ +per\SpecialChar ~ +block: Set the number of pages contained within a flash block. + Usually pre-set by the menu initialization code, if the NAND flash device + is recognized. +\newline +Capacity: Set the total number of pages contained by the flash device. + Usually pre-set by the menu initialization code, if the NAND flash device + is recognized. +\newline +Block\SpecialChar ~ +number: Indicate which block to write. + The value 0xFFFFFFFF indicates all blocks. +\layout Description + +Test\SpecialChar ~ +Failures: - +\newline + +\series bold +NAND device reports program failure in page: +\series default + The NAND status read indicated that the previous page write command failed. + It's possible the blocks selected for the test pattern weren't erased; + try erasing the blocks and run this test again. +\newline + +\series bold +Program error in page: +\series default + (Unlikely) The NAND status read did not indicate a failure, but when read + back, the contents of one or more bytes was other than 01010101b. +\layout Subsubsection + +Test: Write Test Ptn 2 +\layout Description + +Test\SpecialChar ~ +Description: Writes the binary pattern 10101010b to each byte in the + given block, or all flash blocks. + Make sure the blocks selected in the Block\SpecialChar ~ +number option have been erased. +\layout Description + +Test\SpecialChar ~ +Modes: Custom test +\layout Description + +Test\SpecialChar ~ +Options: - +\newline +Page\SpecialChar ~ +size: Set the number of bytes per page. + Usually pre-set by the menu initialization code, if the NAND flash device + is recognized. +\newline +Pages\SpecialChar ~ +per\SpecialChar ~ +block: Set the number of pages contained within a flash block. + Usually pre-set by the menu initialization code, if the NAND flash device + is recognized. +\newline +Capacity: Set the total number of pages contained by the flash device. + Usually pre-set by the menu initialization code, if the NAND flash device + is recognized. +\newline +Block\SpecialChar ~ +number: Indicate which block to write. + The value 0xFFFFFFFF indicates all blocks. +\layout Description + +Test\SpecialChar ~ +Failures: - +\newline + +\series bold +NAND device reports program failure in page: +\series default + The NAND status read indicated that the previous page write command failed. + It's possible the blocks selected for the test pattern weren't erased; + try erasing the blocks and run this test again. +\newline + +\series bold +Program error in page: +\series default + (Unlikely) The NAND status read did not indicate a failure, but when read + back, the contents of one or more bytes was other than 10101010b. +\layout Subsubsection + +Test: Get NAND Flash ID +\layout Description + +Test\SpecialChar ~ +Description: Send the Read ID command to the NAND flash, and display + the device code read back from the device. +\layout Description + +Test\SpecialChar ~ +Modes: Custom test +\layout Description + +Test\SpecialChar ~ +Options: - +\newline +None. +\layout Description + +Test\SpecialChar ~ +Failures: - +\newline +None. +\layout Subsubsection + +Test: Dump NAND Flash Page +\layout Description + +Test\SpecialChar ~ +Description: Display the contents of a given NAND flash page. +\layout Description + +Test\SpecialChar ~ +Modes: Custom test +\layout Description + +Test\SpecialChar ~ +Options: - +\newline +Page\SpecialChar ~ +size: Set the number of bytes per page. + Usually pre-set by the menu initialization code, if the NAND flash device + is recognized. +\newline +Page\SpecialChar ~ +number: Select which page to display. +\newline +Mem\SpecialChar ~ +copy\SpecialChar ~ +start: Select where in SDRAM to copy the NAND flash page for the + memory dump. +\layout Description + +Test\SpecialChar ~ +Failures: - +\newline +None. +\layout Subsubsection + +Test: Verify Erase/New Device +\layout Description + +Test\SpecialChar ~ +Description: Read every byte in the NAND flash and make sure there are + no '0' bits. + This test is recommended for devices such as the Toshiba TC58V64BFT. + When received from the factory, this device should have no '0' bits. + Any '0' bits in the flash indicate a bad block. +\layout Description + +Test\SpecialChar ~ +Modes: Custom test +\layout Description + +Test\SpecialChar ~ +Options: - +\newline +Page\SpecialChar ~ +size: Set the number of bytes per page. + Usually pre-set by the menu initialization code, if the NAND flash device + is recognized. +\newline +Capacity: Set the total number of pages contained by the flash device. + Usually pre-set by the menu initialization code, if the NAND flash device + is recognized. +\layout Description +\added_space_bottom medskip +Test\SpecialChar ~ +Failures: - +\newline +For the purposes of error logging, this test does not fail, it only prints + the first error it finds in the flash. +\newline + +\series bold +Bit error in byte: +\series default + A '0' bit was found within a flash block. +\layout Section + Memory \layout Subsection @@ -3876,9 +4318,123 @@ \newline None. \layout Description - +\added_space_bottom medskip Test\SpecialChar ~ Failures: - \newline None. +\layout Section + +Red Box +\layout Subsection + +Submenu description +\layout Standard + +The tests in this menu verify the HDB-10 transmission capability of the + Red Box. +\layout Subsection + +Submenu options +\layout List +\labelwidthstring 00.00.0000 + +Debug\SpecialChar ~ +level: Selects level of debugging output. + Available levels are: ( +\series bold +0 = none +\series default +, 1 = terse, 2 = verbose, 3 = massive screen scroll) +\layout List +\labelwidthstring 00.00.0000 + +1st\SpecialChar ~ +buffer\SpecialChar ~ +base\SpecialChar ~ +address: Unused +\layout List +\labelwidthstring 00.00.0000 + +Buffer\SpecialChar ~ +size: Number of bytes to transmit. + Limited to 64kB +\layout List +\labelwidthstring 00.00.0000 + +Xmit\SpecialChar ~ +pattern: Select a pattern to transmit. + Available patterns are: (0=all 0's, 1 = all 1's, 2 = 01010101b, 3 = 10101010b, + +\series bold +4 = Pseudo-Random +\series default +, 5 = user-defined (see User\SpecialChar ~ +pattern option), 6 = Summa test data, 7 = increment + by 4 pattern) +\layout List +\labelwidthstring 00.00.0000 + +User\SpecialChar ~ +pattern: Set the 2-byte pattern to be transmitted, if the Xmit\SpecialChar ~ +pattern + option has been set to user-defined. +\layout List +\labelwidthstring 00.00.0000 + +Test\SpecialChar ~ +time: Unused +\layout Subsection + +Test descriptions +\layout Subsubsection + +Test: Transmit Test +\layout Description + +Test\SpecialChar ~ +Description: This test transmits data via the HDB-10 interface, then + examines the receive buffer to make sure that it matches the transmit buffer. +\layout Description + +Test\SpecialChar ~ +Modes: Basic and burn-in modes. +\layout Description + +Test\SpecialChar ~ +Options: - +\newline +Buffer\SpecialChar ~ +size: Selects how many bytes to transmit (must be divisible by 4) +\newline +Xmit\SpecialChar ~ +pattern: Selects which pattern to transmit +\newline +User\SpecialChar ~ +pattern: If Xmit\SpecialChar ~ +pattern equals 5, set this to the desired 2-byte pattern +\layout Description + +Test\SpecialChar ~ +Failures: - +\newline + +\series bold +Failed to transmit test buffer: +\series default + The Xilinx status register did not indicate a transmit interrupt within + the timeout period. +\newline + +\series bold +Failed to receive test buffer: +\series default + The Xilinx status register did not indicate a receive interrupt within + the timeout period. +\newline + +\series bold +Comparison failure in xmit word: +\series default + The two buffers were compared (disregarding the sync bit) and did not match. \the_end diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/documents/diag_guide.ps ppc_diag/documents/diag_guide.ps --- ppc_diag-1.0.2/documents/diag_guide.ps Fri Feb 7 14:58:49 2003 +++ ppc_diag/documents/diag_guide.ps Mon May 12 15:25:44 2003 @@ -1,14 +1,14 @@ %!PS-Adobe-2.0 %%Creator: dvips(k) 5.86e Copyright 2001 Radical Eye Software %%Title: diag_guide.dvi -%%Pages: 36 +%%Pages: 40 %%PageOrder: Ascend %%BoundingBox: 0 0 612 792 %%EndComments %DVIPSWebPage: (www.radicaleye.com) %DVIPSCommandLine: dvips -t letter -o diag_guide.ps diag_guide.dvi %DVIPSParameters: dpi=600, compressed -%DVIPSSource: TeX output 2003.02.07:1458 +%DVIPSSource: TeX output 2003.05.12:1525 %%BeginProcSet: texc.pro %! /TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S @@ -307,8 +307,8 @@ C7FC15C05E6DEBE01E163E6D143CEDF07C027F1378EDF8F8023F5B15FD021F5B15FF6E5B A36E5BA26E90C8FCA26E5AA26E5AA21578362C7EAB3B>I E %EndDVIPSBitmapFont -%DVIPSBitmapFont: Fe ecbx1440 14.4 48 -/Fe 48 122 df45 D45 DI<913803FF80023F13F849B6FC010715C049 01017F903A3FFC007FF8D97FF0EB1FFC49486D7E48496D7E4A7F4817804890C76C13C0A2 48486E13E0A2001F17F0A3003F17F8A249157FA2007F17FCA600FF17FEB3A5007F17FCA6 @@ -462,52 +462,52 @@ >103 DI<133FEBFFC0487F487FA2487FA66C5BA26C5B6C5B013FC7 -FC90C8FCAEEB1FF8B5FCA512017EB3B3A6B612F0A51C547CD324>I109 DI<913801FFC0023F13FE91B67E010315E0010F018013F8903A -3FFC001FFED97FF0EB07FF49486D7F48496D7F48496D7F91C8127F4883488349153F001F -83A2003F8349151FA2007F83A400FF1880AC007F1800A3003F5F6D153FA2001F5FA26C6C -4B5AA26C6D4A5A6C5F6C6D495B6C6D495B6D6C4990C7FCD93FFCEB1FFE6DB46CB45A0107 -90B512F0010115C0D9003F49C8FC020313E039387CB642>II<90393FF001FCB590380FFF804B13E0 -037F13F09238FE1FF89138F1F83F00019138F07FFC6CEBF3E015C0ECF780A2ECFF00EE3F -F84AEB1FF0EE0FE093C7FC5CA45CB3ABB612FEA52E367DB535>114 -D<903903FFC00E011FEBFC1E90B6127E000315FE3907FE003FD80FF0130F484813034848 -1301491300127F90C8127EA248153EA27FA27F01F091C7FC13FCEBFF806C13FEECFFF06C -14FE6F7E6C15E06C816C15FC6C81C681133F010F15801301D9000F14C0EC003F030713E0 -150100F880167F6C153FA2161F7EA217C07E6D143F17807F6DEC7F0001F85C6DEB03FE90 -39FF801FFC486CB512F0D8F81F14C0D8F00791C7FC39E0007FF02B387CB634>I<147CA6 -14FCA41301A31303A21307A2130F131F133F137F13FF1203000F90B512FEB7FCA426007F -FCC8FCB3A9EE0F80ABEE1F006D7EA2011F143E806D6D5A6DEBC1F86DEBFFF001005C023F -1380DA03FEC7FC294D7ECB33>IIIIII E +FC90C8FCAEEB1FF8B5FCA512017EB3B3A6B612F0A51C547CD324>I108 DI +I<913801FFC0023F13FE91B67E010315E0010F018013F8903A3FFC001FFED97FF0EB07FF +49486D7F48496D7F48496D7F91C8127F4883488349153F001F83A2003F8349151FA2007F +83A400FF1880AC007F1800A3003F5F6D153FA2001F5FA26C6C4B5AA26C6D4A5A6C5F6C6D +495B6C6D495B6D6C4990C7FCD93FFCEB1FFE6DB46CB45A010790B512F0010115C0D9003F +49C8FC020313E039387CB642>II<90393FF001FCB590380FFF804B13E0037F13F09238FE1FF89138 +F1F83F00019138F07FFC6CEBF3E015C0ECF780A2ECFF00EE3FF84AEB1FF0EE0FE093C7FC +5CA45CB3ABB612FEA52E367DB535>114 D<903903FFC00E011FEBFC1E90B6127E000315 +FE3907FE003FD80FF0130F4848130348481301491300127F90C8127EA248153EA27FA27F +01F091C7FC13FCEBFF806C13FEECFFF06C14FE6F7E6C15E06C816C15FC6C81C681133F01 +0F15801301D9000F14C0EC003F030713E0150100F880167F6C153FA2161F7EA217C07E6D +143F17807F6DEC7F0001F85C6DEB03FE9039FF801FFC486CB512F0D8F81F14C0D8F00791 +C7FC39E0007FF02B387CB634>I<147CA614FCA41301A31303A21307A2130F131F133F13 +7F13FF1203000F90B512FEB7FCA426007FFCC8FCB3A9EE0F80ABEE1F006D7EA2011F143E +806D6D5A6DEBC1F86DEBFFF001005C023F1380DA03FEC7FC294D7ECB33>IIIIII E %EndDVIPSBitmapFont %DVIPSBitmapFont: Ff ecbx2074 20.74 10 /Ff 10 117 dfI E %EndDVIPSBitmapFont -%DVIPSBitmapFont: Fi ecbx1000 10 69 -/Fi 69 123 df<913A03FF8007FE027F9039F07FFF800103B500FDB512E0010F903A00FF +%DVIPSBitmapFont: Fi ecbx1000 10 72 +/Fi 72 123 df<913A03FF8007FE027F9039F07FFF800103B500FDB512E0010F903A00FF FE0FF0D93FF8ECF81F90267FE0019038F03FF849485A4816E014804816C00200ED1FF081 F007C06F91C7FCA8B912E0A4000390C701C0C7FCB3ABB5D8FC3FEBFF80A43D3A7EB938> -27 D<913903FFC7C0027F13FF0103B6FC010F130090383FF80190387FE003EBFFC05A14 -805A4A7EA281A9B8FCA4000390C7FCB3ABB5D8FC3F13FFA4303A7EB935>29 -D33 +27 D<913803FFC0027F13F00103B512FC010FEB00FED93FF8133FD97FE0EBFF8049485A +5A1480484A13C04A6C1380A36F1300167E93C7FCA592383FFFC0B8FCA4000390C7FCB3AB +B5D8FC3F13FFA4303A7EB935>I<913903FFC7C0027F13FF0103B6FC010F130090383FF8 +0190387FE003EBFFC05A14805A4A7EA281A9B8FCA4000390C7FCB3ABB5D8FC3F13FFA430 +3A7EB935>I33 D<0470EB01C0A304F013034C5CA2030114074C91C7FCA203035C4C130EA30307141E93C7 121CA24B143C030E1438A2031E1478031C1470A3033C14F003385CA2007FBA12F0BB12F8 A2C72801E0000780C7FC4B91C8FCA302035C4B130EA30207141E92C7121CA34A143C020E @@ -903,35 +905,39 @@ 16537BBD25>I43 DIII<49B4 -FC011F13F0017F13FC9038FF83FE4848C67E4848EB7F804848EB3FC04848EB1FE0A2001F -15F0A24848EB0FF8A3007F15FCA400FF15FEB3007F15FCA5003F15F86D131FA2001F15F0 -A26C6CEB3FE0000715C06C6CEB7F806C6CEBFF003900FF83FE6DB45A011F13F0010190C7 -FC27377CB530>48 D<141E143E14FE1307137FB5FCA3138FEA000FB3B3A5007FB61280A4 -213679B530>II< -EB03FF011F13F0017F13FC3901FC07FF2603F003138048486C13C0496C13E0EA0FF86D14 -F0487EA66C4814E06C5A6C485AC714C04A138016004A5A4A5AEC3FF090380FFFC05D15F0 -90380007FE913801FF806E13C016E0ED7FF016F8ED3FFCA216FEEA1FC0487E487E487EA4 -16FCA249137F007F15F801C0EBFFF06C5A6C6C4813E0260FFC0713806CB61200000114FC -6C6C13F0010790C7FC27377CB530>II<001C15C0D81F80130701 -F8137F90B61280A216005D5D15F05D15804AC7FC14F090C9FCA7EB03FE90381FFFE0017F -13F89038FE07FC9038F003FFD9C0011380496C13C090C7FC000E15E0C8127F16F0A216F8 -A3121FEA3FC0487E12FF7FA316F05B15FFD87F8014E0007EC713C0003E5B003F4913806C -6C481300390FF01FFE6CB512F8000114E06C6C1380D90FF8C7FC25377BB530>II57 +9620>II<1618 +163816781670A216F016E0150116C015031680A2150716005D150E151E151CA2153C1538 +1578157015F05DA214015D14035D140792C7FCA25C140E141E141C143C1438A214781470 +14F05CA213015C13035C130791C8FCA25B130E131E131C133C1338A21378137013F05B12 +015BA212035B120790C9FC5A120EA2121E121C123C123812781270A212F05AA225537BBD +30>I<49B4FC011F13F0017F13FC9038FF83FE4848C67E4848EB7F804848EB3FC04848EB +1FE0A2001F15F0A24848EB0FF8A3007F15FCA400FF15FEB3007F15FCA5003F15F86D131F +A2001F15F0A26C6CEB3FE0000715C06C6CEB7F806C6CEBFF003900FF83FE6DB45A011F13 +F0010190C7FC27377CB530>I<141E143E14FE1307137FB5FCA3138FEA000FB3B3A5007F +B61280A4213679B530>IIII<001C15C0D81F +80130701F8137F90B61280A216005D5D15F05D15804AC7FC14F090C9FCA7EB03FE90381F +FFE0017F13F89038FE07FC9038F003FFD9C0011380496C13C090C7FC000E15E0C8127F16 +F0A216F8A3121FEA3FC0487E12FF7FA316F05B15FFD87F8014E0007EC713C0003E5B003F +4913806C6C481300390FF01FFE6CB512F8000114E06C6C1380D90FF8C7FC25377BB530> +II57 DI<007FB912FCBA12FEA2CDFCB1BA 12FEA26C18FC3F177B9F4A>61 DII73 D<010FB612C0A4D90001EBE000B3B3EA -0F80EA3FE0EA7FF0A2EAFFF8A35E5C13F0007F495BD83FE091C7FC391F800FFE390FF03F -FC6CB512F0000114C026003FFCC8FC2A3A7FB831>I76 -DI< -B500FC0203B512F0A28080C66C6D90390003F0006F6E5A81017B7F13798101787F6E7E6E -7E6E7F6E7FA26E7F6E7F6E7F6E7F6F7E153F826F13806F13C06F13E06F13F06F13F88117 -FCEE7FFEEE3FFF7013817013C17013E18218F17013F97013FDEF7FFF8383A28383838383 -187FA2183F181F01FC160FB500FC150718031801A244397DB84B>IIII -II<003F -B91280A4D9F800EBF003D87FC09238007FC049161F007EC7150FA2007C1707A200781703 -A400F818E0481701A4C892C7FCB3AE010FB7FCA43B387DB742>IIII<007F -B5D8F803B512F8A4C66C48C7D80FF0C7FC6D6C5D6D5E6F495A6D6D49C8FC7F6D6D137E6F -5B6DEBF8016D5D6F485A6E6C485A023F130FDA1FFF5BEE9F806E01FFC9FC805E6E5B6E5B -80826F7E153F826F7F5D4B7F92B57EA2DA01F97FDA03F17F03F07F913807E07FDA0FC07F -021F6D7E4B7E4A486C7F027E8102FE6D7F4A7F49488149486D7F0107804A6E7E49488149 -486E7E013F81017F83B60107B61280A441397DB848>I<003FB712FEA4913980007FFC01 -FCC7EAFFF801F05B01C015F0494913E090C75A4816C0007E4A13805D007C16004B5A157F -00785D4B5A5C5EC7485B5C5E5C4A5B93C7FC5C4A5A5D14FF495B5D5B495B4B131E5B5D49 -90C7FC5B5C4948143E13FF5C485B48167E4A147C484914FC5A4A13014890C7120348150F -49143F4848EB01FFB8FCA42F397BB83A>90 DI93 -D97 D<13FFB5FCA412077EAF4AB47E020F13F0023F13FC9138FE03FFDAF000 -13804AEB7FC00280EB3FE091C713F0EE1FF8A217FC160FA217FEAA17FCA3EE1FF8A217F0 -6E133F6EEB7FE06E14C0903AFDF001FF80903AF8FC07FE009039F03FFFF8D9E00F13E0D9 -C00390C7FC2F3A7EB935>I<903801FFC0010F13FC017F13FFD9FF8013802603FE0013C0 -48485AEA0FF8121F13F0123F6E13804848EB7F00151C92C7FC12FFA9127FA27F123FED01 -E06C7E15036C6CEB07C06C6C14806C6C131FC69038C07E006DB45A010F13F00101138023 -257DA42A>I -I<903803FF80011F13F0017F13FC3901FF83FE3A03FE007F804848133F484814C0001FEC -1FE05B003FEC0FF0A2485A16F8150712FFA290B6FCA301E0C8FCA4127FA36C7E1678121F -6C6C14F86D14F000071403D801FFEB0FE06C9038C07FC06DB51200010F13FC010113E025 -257DA42C>II<161FD907FEEBFFC090387FFFE348B6EAEFE02607FE07138F260FF801131F48486C13 -8F003F15CF4990387FC7C0EEC000007F81A6003F5DA26D13FF001F5D6C6C4890C7FC3907 -FE07FE48B512F86D13E0261E07FEC8FC90CAFCA2123E123F7F6C7E90B512F8EDFF8016E0 -6C15F86C816C815A001F81393FC0000F48C8138048157F5A163FA36C157F6C16006D5C6C -6C495AD81FF0EB07FCD807FEEB3FF00001B612C06C6C91C7FC010713F02B377DA530>I< -13FFB5FCA412077EAFED7FC0913803FFF8020F13FE91381F03FFDA3C01138014784A7E4A -14C05CA25CA291C7FCB3A3B5D8FC3F13FFA4303A7DB935>II<13FFB5 -FCA412077EAF92380FFFE0A4923803FC0016F0ED0FE0ED1F804BC7FC157E5DEC03F8EC07 -E04A5A141FEC7FE04A7E8181A2ECCFFEEC0FFF496C7F806E7F6E7F82157F6F7E6F7E8215 -0F82B5D8F83F13F8A42D3A7EB932>107 D<13FFB5FCA412077EB3B3ACB512FCA4163A7D -B91B>I<01FED97FE0EB0FFC00FF902601FFFC90383FFF80020701FF90B512E0DA1F8190 -3983F03FF0DA3C00903887801F000749DACF007F00034914DE6D48D97FFC6D7E4A5CA24A -5CA291C75BB3A3B5D8FC1FB50083B512F0A44C257DA451>I<01FEEB7FC000FF903803FF -F8020F13FE91381F03FFDA3C011380000713780003497E6D4814C05CA25CA291C7FCB3A3 -B5D8FC3F13FFA430257DA435>I<903801FFC0010F13F8017F13FFD9FF807F3A03FE003F -E048486D7E48486D7E48486D7EA2003F81491303007F81A300FF1680A9007F1600A3003F -5D6D1307001F5DA26C6C495A6C6C495A6C6C495A6C6C6CB45A6C6CB5C7FC011F13FC0101 -13C029257DA430>I<9039FF01FF80B5000F13F0023F13FC9138FE07FFDAF00113800003 -496C13C00280EB7FE091C713F0EE3FF8A2EE1FFCA3EE0FFEAA17FC161FA217F8163F17F0 -6E137F6E14E06EEBFFC0DAF00313809139FC07FE0091383FFFF8020F13E0020390C7FC91 -C9FCACB512FCA42F357EA435>I<49B4EB0780010FEBE00F013FEBF81F9039FFC07C3F00 -03EB803E3A07FE000F7F4848EB07FF121F497F123F497F127FA25B12FFAA6C7EA36C7E5D -6C7E000F5C6C6C5B6C6C133F6CEBC0FD39007FFFF1011F13C10101130190C7FCAC037F13 -FEA42F357DA432>I<9038FE03F000FFEB0FFEEC3FFF91387C7F809138F8FFC000075B6C -6C5A5CA29138807F80ED3F00150C92C7FC91C8FCB3A2B512FEA422257EA427>I<90383F -F0383903FFFEF8000F13FF381FC00F383F0003007E1301007C130012FC15787E7E6D1300 -13FCEBFFE06C13FCECFF806C14C06C14F06C14F81203C614FC131F9038007FFE140700F0 -130114007E157E7E157C6C14FC6C14F8EB80019038F007F090B512C000F8140038E01FF8 -1F257DA426>I<130FA55BA45BA25B5BA25A1207001FEBFFE0B6FCA3000390C7FCB21578 -A815F86CEB80F014816CEBC3E090383FFFC06D1380903803FE001D357EB425>I<01FFEC -3FC0B5EB3FFFA4000714016C80B3A35DA25DA26C5C6E4813E06CD9C03E13FF90387FFFFC -011F13F00103138030257DA435>IIIII<003FB612C0A3D9F0031380EB800749481300003E5C003C495A007C133F5D00 -78495A14FF5D495B5BC6485B92C7FC495A131F5C495A017FEB03C0EBFFF014E04813C05A -EC80074813005A49EB0F80485A003F141F4848133F9038F001FFB7FCA322257DA42A>I -E +1501150791B5FCA4ECF80715011500A21678A693C8FCADB7FCA434397DB83C>II73 D<010FB612C0A4D90001EBE000B3B3EA0F80EA3FE0EA7FF0A2EAFF +F8A35E5C13F0007F495BD83FE091C7FC391F800FFE390FF03FFC6CB512F0000114C02600 +3FFCC8FC2A3A7FB831>I76 DIIIIIII<003FB91280A4D9F800EBF003D87FC09238007FC0 +49161F007EC7150FA2007C1707A200781703A400F818E0481701A4C892C7FCB3AE010FB7 +FCA43B387DB742>IIII<007FB5D8F803B512F8A4C66C48C7D80FF0C7FC6D +6C5D6D5E6F495A6D6D49C8FC7F6D6D137E6F5B6DEBF8016D5D6F485A6E6C485A023F130F +DA1FFF5BEE9F806E01FFC9FC805E6E5B6E5B80826F7E153F826F7F5D4B7F92B57EA2DA01 +F97FDA03F17F03F07F913807E07FDA0FC07F021F6D7E4B7E4A486C7F027E8102FE6D7F4A +7F49488149486D7F0107804A6E7E49488149486E7E013F81017F83B60107B61280A44139 +7DB848>I<003FB712FEA4913980007FFC01FCC7EAFFF801F05B01C015F0494913E090C7 +5A4816C0007E4A13805D007C16004B5A157F00785D4B5A5C5EC7485B5C5E5C4A5B93C7FC +5C4A5A5D14FF495B5D5B495B4B131E5B5D4990C7FC5B5C4948143E13FF5C485B48167E4A +147C484914FC5A4A13014890C7120348150F49143F4848EB01FFB8FCA42F397BB83A>90 +DI93 D97 D<13FFB5FCA412077EAF4AB47E020F13F0023F13 +FC9138FE03FFDAF00013804AEB7FC00280EB3FE091C713F0EE1FF8A217FC160FA217FEAA +17FCA3EE1FF8A217F06E133F6EEB7FE06E14C0903AFDF001FF80903AF8FC07FE009039F0 +3FFFF8D9E00F13E0D9C00390C7FC2F3A7EB935>I<903801FFC0010F13FC017F13FFD9FF +8013802603FE0013C048485AEA0FF8121F13F0123F6E13804848EB7F00151C92C7FC12FF +A9127FA27F123FED01E06C7E15036C6CEB07C06C6C14806C6C131FC69038C07E006DB45A +010F13F00101138023257DA42A>II<903803FF80011F13F0017F13FC3901FF83FE3A03FE007F804848 +133F484814C0001FEC1FE05B003FEC0FF0A2485A16F8150712FFA290B6FCA301E0C8FCA4 +127FA36C7E1678121F6C6C14F86D14F000071403D801FFEB0FE06C9038C07FC06DB51200 +010F13FC010113E025257DA42C>II<161FD907FEEBFFC090387FFFE348B6EAEFE02607FE07138F26 +0FF801131F48486C138F003F15CF4990387FC7C0EEC000007F81A6003F5DA26D13FF001F +5D6C6C4890C7FC3907FE07FE48B512F86D13E0261E07FEC8FC90CAFCA2123E123F7F6C7E +90B512F8EDFF8016E06C15F86C816C815A001F81393FC0000F48C8138048157F5A163FA3 +6C157F6C16006D5C6C6C495AD81FF0EB07FCD807FEEB3FF00001B612C06C6C91C7FC0107 +13F02B377DA530>I<13FFB5FCA412077EAFED7FC0913803FFF8020F13FE91381F03FFDA +3C01138014784A7E4A14C05CA25CA291C7FCB3A3B5D8FC3F13FFA4303A7DB935>II<13FFB5FCA412077EAF92380FFFE0A4923803FC0016F0ED0FE0ED1F804BC7 +FC157E5DEC03F8EC07E04A5A141FEC7FE04A7E8181A2ECCFFEEC0FFF496C7F806E7F6E7F +82157F6F7E6F7E82150F82B5D8F83F13F8A42D3A7EB932>107 D<13FFB5FCA412077EB3 +B3ACB512FCA4163A7DB91B>I<01FED97FE0EB0FFC00FF902601FFFC90383FFF80020701 +FF90B512E0DA1F81903983F03FF0DA3C00903887801F000749DACF007F00034914DE6D48 +D97FFC6D7E4A5CA24A5CA291C75BB3A3B5D8FC1FB50083B512F0A44C257DA451>I<01FE +EB7FC000FF903803FFF8020F13FE91381F03FFDA3C011380000713780003497E6D4814C0 +5CA25CA291C7FCB3A3B5D8FC3F13FFA430257DA435>I<903801FFC0010F13F8017F13FF +D9FF807F3A03FE003FE048486D7E48486D7E48486D7EA2003F81491303007F81A300FF16 +80A9007F1600A3003F5D6D1307001F5DA26C6C495A6C6C495A6C6C495A6C6C6CB45A6C6C +B5C7FC011F13FC010113C029257DA430>I<9039FF01FF80B5000F13F0023F13FC9138FE +07FFDAF00113800003496C13C00280EB7FE091C713F0EE3FF8A2EE1FFCA3EE0FFEAA17FC +161FA217F8163F17F06E137F6E14E06EEBFFC0DAF00313809139FC07FE0091383FFFF802 +0F13E0020390C7FC91C9FCACB512FCA42F357EA435>I<49B4EB0780010FEBE00F013FEB +F81F9039FFC07C3F0003EB803E3A07FE000F7F4848EB07FF121F497F123F497F127FA25B +12FFAA6C7EA36C7E5D6C7E000F5C6C6C5B6C6C133F6CEBC0FD39007FFFF1011F13C10101 +130190C7FCAC037F13FEA42F357DA432>I<9038FE03F000FFEB0FFEEC3FFF91387C7F80 +9138F8FFC000075B6C6C5A5CA29138807F80ED3F00150C92C7FC91C8FCB3A2B512FEA422 +257EA427>I<90383FF0383903FFFEF8000F13FF381FC00F383F0003007E1301007C1300 +12FC15787E7E6D130013FCEBFFE06C13FCECFF806C14C06C14F06C14F81203C614FC131F +9038007FFE140700F0130114007E157E7E157C6C14FC6C14F8EB80019038F007F090B512 +C000F8140038E01FF81F257DA426>I<130FA55BA45BA25B5BA25A1207001FEBFFE0B6FC +A3000390C7FCB21578A815F86CEB80F014816CEBC3E090383FFFC06D1380903803FE001D +357EB425>I<01FFEC3FC0B5EB3FFFA4000714016C80B3A35DA25DA26C5C6E4813E06CD9 +C03E13FF90387FFFFC011F13F00103138030257DA435>IIIII<003FB612C0A3D9F0031380EB800749481300003E5C00 +3C495A007C133F5D0078495A14FF5D495B5BC6485B92C7FC495A131F5C495A017FEB03C0 +EBFFF014E04813C05AEC80074813005A49EB0F80485A003F141F4848133F9038F001FFB7 +FCA322257DA42A>I E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fj ecbx2488 24.88 22 /Fj 22 118 df[<97263FFFE017E0071FB616010603B700F01503063F04FC15074DB96C @@ -1211,52 +1221,40 @@ 9139E001FF006E91B512FC033F5D030715E0030092C7FC040701F804E0C7FC6B5E79DC78 >I E %EndDVIPSBitmapFont -%DVIPSBitmapFont: Fk ecrm1200 12 13 -/Fk 13 122 df<14FF010713E090381F81F890383E007C01FC133F4848EB1F8049130F48 +%DVIPSBitmapFont: Fk ecrm1200 12 9 +/Fk 9 122 df<14FF010713E090381F81F890383E007C01FC133F4848EB1F8049130F48 48EB07C04848EB03E0A2000F15F0491301001F15F8A2003F15FCA390C8FC4815FEA54815 FFB3A46C15FEA56D1301003F15FCA3001F15F8A26C6CEB03F0A36C6CEB07E0000315C06D 130F6C6CEB1F806C6CEB3F00013E137C90381F81F8903807FFE0010090C7FC28447CC131 ->48 D50 D<49B4FC010F13E0013F13FC -9038FE01FE3A01F0007F80D803C0EB3FC048C7EA1FE0120EED0FF0EA0FE0486C14F8A215 -077F5BA26C48130FEA03C0C813F0A3ED1FE0A2ED3FC01680ED7F0015FE4A5AEC03F0EC1F -C0D90FFFC7FC15F090380001FCEC007FED3F80ED1FC0ED0FE016F0ED07F816FC150316FE -A2150116FFA3121EEA7F80487EA416FE491303A2007EC713FC00701407003015F8003814 -0F6C15F06CEC1FE06C6CEB3FC0D803E0EB7F803A01FE01FE0039007FFFF8010F13E00101 -90C7FC28447CC131>I<121CA2EA1F8090B712C0A3481680A217005E0038C8120C003015 -1C00705D0060153016705E5E4814014B5A4BC7FCC81206150E5D151815385D156015E04A -5AA24A5A140792C8FC5CA25C141E143EA2147E147CA214FCA21301A3495AA41307A6130F -AA6D5AEB01C02A457BC231>55 D70 +>48 D<143014F013011303131F13FFB5FC13E713071200B3B3B0497E497E007FB6FCA320 +4278C131>II<49B4FC010F13E0013F +13FC9038FE01FE3A01F0007F80D803C0EB3FC048C7EA1FE0120EED0FF0EA0FE0486C14F8 +A215077F5BA26C48130FEA03C0C813F0A3ED1FE0A2ED3FC01680ED7F0015FE4A5AEC03F0 +EC1FC0D90FFFC7FC15F090380001FCEC007FED3F80ED1FC0ED0FE016F0ED07F816FC1503 +16FEA2150116FFA3121EEA7F80487EA416FE491303A2007EC713FC00701407003015F800 +38140F6C15F06CEC1FE06C6CEB3FC0D803E0EB7F803A01FE01FE0039007FFFF8010F13E0 +010190C7FC28447CC131>I77 D97 -DI101 D104 D<3903F803F000FFEB1FFCEC3C3EEC70 -7F0007EBE0FF3803F9C000015B13FBEC007E153C01FF13005BA45BB3A748B4FCB512FEA3 -202C7DAB26>114 D<1306A5130EA4131EA3133E137EA213FE12011207001FB512F0B6FC -A2C648C7FCB3A4150CAA017E131C017F1318A26D133890381F8030ECC070903807E0E090 -3801FFC09038007F001E3E7EBC26>116 DI121 -D E +D104 D<1306A5130EA4131EA3133E137EA213FE12011207001FB512F0B6FCA2C648C7 +FCB3A4150CAA017E131C017F1318A26D133890381F8030ECC070903807E0E0903801FFC0 +9038007F001E3E7EBC26>116 D121 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fl ecrm1728 17.28 17 /Fl 17 118 dfSubmenu options +3.10.2 Submenu options Debug level: Selects level of debugging output. Available levels are: (0 = none, 1 = terse, 2 = verbose, 3 = massive @@ -1751,7 +2008,7 @@ to use when dumping memory via the Display Memory custom test. The only supported size is: 4 = longword. -3.9.3 Test descriptions +3.10.3 Test descriptions Test: Bank Aliasing @@ -2009,14 +2266,14 @@ Test Failures: - None. -3.10 Green Box XILINX +3.11 Green Box XILINX -3.10.1 Submenu description +3.11.1 Submenu description The tests in this menu verify the operation of the XILINX registers and the Green Box data capture ability. -3.10.2 Submenu options +3.11.2 Submenu options Debug level: Selects level of debugging output. Available levels are: (0 = none, 1 = terse, 2 = verbose, 3 = massive @@ -2033,7 +2290,7 @@ should write to a DPRAM bank before switching to another bank. -3.10.3 Test Descriptions +3.11.3 Test Descriptions Test: Registers @@ -2120,3 +2377,58 @@ Test Failures: - None. + +3.12 Red Box + +3.12.1 Submenu description + +The tests in this menu verify the HDB-10 transmission capability +of the Red Box. + +3.12.2 Submenu options + +Debug level: Selects level of debugging output. Available +levels are: (0 = none, 1 = terse, 2 = verbose, 3 = massive +screen scroll) + +1st buffer base address: Unused + +Buffer size: Number of bytes to transmit. Limited to +64kB + +Xmit pattern: Select a pattern to transmit. Available +patterns are: (0=all 0's, 1 = all 1's, 2 = 01010101b, 3 += 10101010b, 4 = Pseudo-Random, 5 = user-defined (see User pattern +option), 6 = Summa test data, 7 = increment by 4 pattern) + +User pattern: Set the 2-byte pattern to be transmitted, +if the Xmit pattern option has been set to user-defined. + +Test time: Unused + +3.12.3 Test descriptions + + Test: Transmit Test + +Test Description: This test transmits data via the + HDB-10 interface, then examines the receive buffer to + make sure that it matches the transmit buffer. + +Test Modes: Basic and burn-in modes. + +Test Options: - + Buffer size: Selects how many bytes to transmit + (must be divisible by 4) + Xmit pattern: Selects which pattern to transmit + User pattern: If Xmit pattern + equals 5, set this to the desired 2-byte pattern + +Test Failures: - + Failed to transmit test buffer: The Xilinx status register + did not indicate a transmit interrupt within the timeout + period. + Failed to receive test buffer: The Xilinx status register + did not indicate a receive interrupt within the timeout + period. + Comparison failure in xmit word: The two buffers were compared + (disregarding the sync bit) and did not match. diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/entry/.cvsignore ppc_diag/entry/.cvsignore --- ppc_diag-1.0.2/entry/.cvsignore Fri Jan 3 10:40:06 2003 +++ ppc_diag/entry/.cvsignore Thu May 1 11:31:26 2003 @@ -1 +1 @@ -Makefile .depend .*.swp *.out +Makefile .depend .*.swp *.out *.dmp diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/entry/.depend ppc_diag/entry/.depend --- ppc_diag-1.0.2/entry/.depend Wed Dec 31 16:00:00 1969 +++ ppc_diag/entry/.depend Mon May 12 14:51:52 2003 @@ -0,0 +1,16 @@ +diag_init.o: diag_init.c \ + /home/speedy1/build/ppc_diag/includes/ppcboot.h \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + /home/speedy1/build/ppc_diag/includes/interrupts.h \ + /home/speedy1/build/ppc_diag/includes/mem_calc.h \ + /home/speedy1/build/ppc_diag/includes/system_log.h \ + /home/speedy1/build/ppc_diag/includes/main_menu.h \ + /home/speedy1/build/ppc_diag/includes/net.h \ + /home/speedy1/build/ppc_diag/includes/power_up.h \ + /home/speedy1/build/ppc_diag/includes/speed.h \ + /home/speedy1/build/ppc_diag/includes/rtc.h \ + /home/speedy1/build/ppc_diag/includes/led_test.h \ + /home/speedy1/build/ppc_diag/includes/detect_db.h +start.o: start.S \ + /home/speedy1/build/ppc_diag/includes/ppc_asm.tmpl \ + /home/speedy1/build/ppc_diag/includes/config.h diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/entry/diag_init.c ppc_diag/entry/diag_init.c --- ppc_diag-1.0.2/entry/diag_init.c Fri Feb 7 14:11:43 2003 +++ ppc_diag/entry/diag_init.c Mon May 12 14:12:45 2003 @@ -42,9 +42,12 @@ int diag_debug_mode = 0; int diag_mode = BASIC_TEST; +ulong cpu_speed = 0; led_reg_size led_shadow; +extern int green_box_present; + int diag_init() { int i = 0; @@ -53,14 +56,19 @@ ulong argc = reg_table[6]; char *argv_s1, *argv_s2; volatile ulong msr_val; - ulong calc_speed = 0; int skip_mem_counter = 0; LEDS_OFF; /* turn all LEDs off */ init_interrupts(); init_timebase(); /* start up the timebase register */ - calc_speed = get_gclk_freq(); - serial_init( CPU_CLOCK_RATE, BAUD_RATE ); +#ifdef CPU_CLOCK_RATE + /* override caculated clock freq if PIT/RTC has no 32.768KHz input */ + cpu_speed = CPU_CLOCK_RATE; + printf("Forcing CPU speed to %ld\n", cpu_speed); +#else + cpu_speed = get_gclk_freq(); +#endif + serial_init( cpu_speed, BAUD_RATE ); serial_puts( "\n\n" ); /* disable interrupts; interrupt base addr at 0x0 */ @@ -70,13 +78,14 @@ /* @@@@@ enable instruction cache (?) */ - printf("Calculated CPU speed: %ld\n", calc_speed); + printf("Calculated CPU speed: %ld\n", cpu_speed); #if defined(ENABLE_DALLAS_RTC_SUPPORT) && defined(ENABLE_PPC_RTC_SUPPORT) /* copy the Dallas RTC time into the ppc RTC */ copy_dallas_to_ppc_rtc(); #endif #ifdef ENABLE_GREEN_BOX_SUPPORT - detect_green_box(); + detect_green_box(); + green_box_present = 1; /* force present until the id reg is back in */ #endif if (argc >= 2) { /* 2nd argument indicates power-up mode */ @@ -127,9 +136,9 @@ printf("MSR set to: %08lx\n", msr_val); diag_mode = BASIC_TEST; if (skip_mem_counter == 1) - calculate_memory_size( 0 ); + calculate_memory_size( 16, 0 ); else - calculate_memory_size( 1 ); + calculate_memory_size( 16, 1 ); init_error_log(); display_main_menu(); for (counter = 0; counter < 0xffffffff; counter++) diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/eth_tests/.cvsignore ppc_diag/eth_tests/.cvsignore --- ppc_diag-1.0.2/eth_tests/.cvsignore Fri Jan 3 10:40:06 2003 +++ ppc_diag/eth_tests/.cvsignore Thu May 1 11:31:26 2003 @@ -1 +1 @@ -Makefile .depend .*.swp *.out +Makefile .depend .*.swp *.out *.dmp diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/eth_tests/.depend ppc_diag/eth_tests/.depend --- ppc_diag-1.0.2/eth_tests/.depend Wed Dec 31 16:00:00 1969 +++ ppc_diag/eth_tests/.depend Mon May 12 14:51:52 2003 @@ -0,0 +1,45 @@ +eth_fec_test.o: eth_fec_test.c \ + /home/speedy1/build/ppc_diag/includes/ppcboot.h \ + /home/speedy1/build/ppc_diag/includes/commproc.h \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + /home/speedy1/build/ppc_diag/includes/printf.h \ + eth_menu.h \ + net.h \ + /home/speedy1/build/ppc_diag/includes/mem_display.h \ + /home/speedy1/build/ppc_diag/includes/pkt_stat.h \ + eth_err.h \ + /home/speedy1/build/ppc_diag/includes/fec.h +eth_scc1_test.o: eth_scc1_test.c \ + /home/speedy1/build/ppc_diag/includes/ppcboot.h \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + /home/speedy1/build/ppc_diag/includes/printf.h \ + eth_menu.h \ + net.h \ + /home/speedy1/build/ppc_diag/includes/mem_display.h \ + eth_err.h \ + /home/speedy1/build/ppc_diag/includes/scc.h +eth_menu.o: eth_menu.c \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + eth_fec_test.h \ + eth_scc1_test.h \ + eth_menu.h \ + eth_err.h \ + crossover.h +eth_err.o: eth_err.c \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + /home/speedy1/build/ppc_diag/includes/printf.h \ + eth_menu.h \ + eth_err.h +crossover.o: crossover.c \ + /home/speedy1/build/ppc_diag/includes/ppcboot.h \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + /home/speedy1/build/ppc_diag/includes/printf.h \ + eth_menu.h \ + net.h \ + /home/speedy1/build/ppc_diag/includes/mem_display.h \ + /home/speedy1/build/ppc_diag/includes/pkt_stat.h \ + /home/speedy1/build/ppc_diag/includes/fec.h \ + /home/speedy1/build/ppc_diag/includes/scc.h \ + crossover.h \ + eth_menu.h \ + eth_err.h diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/eth_tests/crossover.c ppc_diag/eth_tests/crossover.c --- ppc_diag-1.0.2/eth_tests/crossover.c Fri Feb 7 14:31:30 2003 +++ ppc_diag/eth_tests/crossover.c Fri May 9 17:52:01 2003 @@ -44,6 +44,8 @@ typedef enum { SCCtoFEC, FECtoSCC } test_direction; +extern ulong cpu_speed; + #define DBFN "eth_xover_init()" void eth_xover_init(void) { @@ -435,8 +437,10 @@ getc(); } /* setup ethernet ports */ - fec_init( BUS_CLOCK_RATE, fec_eth, 3 /* no loopback */, speed, debug ); - scc_init( BUS_CLOCK_RATE, scc_eth, 3 /* no loopback */, debug ); + fec_init( cpu_speed * BUS_CLOCK_RATIO, fec_eth, 3 /* no loopback */, speed, + debug ); + scc_init( cpu_speed * BUS_CLOCK_RATIO, scc_eth, 3 /* no loopback */, + debug ); /* check fec link status before running test */ if (wait_for_fec_link( 20 ) != 0) { diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/eth_tests/eth_fec_test.c ppc_diag/eth_tests/eth_fec_test.c --- ppc_diag-1.0.2/eth_tests/eth_fec_test.c Fri Feb 7 14:31:30 2003 +++ ppc_diag/eth_tests/eth_fec_test.c Fri May 9 17:52:01 2003 @@ -45,6 +45,8 @@ extern uint rxIdx; extern uint txIdx; +extern ulong cpu_speed; + #define DBFN "eth_fec_init()" void eth_fec_init(void) { @@ -162,7 +164,7 @@ NetFECTxPackets[i] = (unsigned char *)(xmit_buffer + (i * 1520)); } /* setup fec ethernet port */ - fec_init( BUS_CLOCK_RATE, src_eth, loopback, speed, debug ); + fec_init( cpu_speed * BUS_CLOCK_RATIO, src_eth, loopback, speed, debug ); /* check link status before running test */ if ((loopback > 0) && !((loopback == 1) && (speed == 0))) { @@ -459,10 +461,11 @@ } /* setup fec ethernet port */ if ((chainaddr == 0) || (chainlen == 0)) - fec_init( BUS_CLOCK_RATE, src_eth, loopback, speed, debug ); + fec_init( cpu_speed * BUS_CLOCK_RATIO, src_eth, loopback, speed, + debug ); else - fec_init_chain( BUS_CLOCK_RATE, src_eth, loopback, chainlen, - (cbd_t *)chainaddr, speed ); + fec_init_chain( cpu_speed * BUS_CLOCK_RATIO, src_eth, loopback, + chainlen, (cbd_t *)chainaddr, speed ); /* check link status before running test */ if (loopback > 0) { @@ -620,7 +623,7 @@ NetFECTxPackets[i] = (unsigned char *)(xmit_buffer + (i * 1520)); } /* setup fec ethernet port */ - fec_init( BUS_CLOCK_RATE, src_eth, loopback, speed, debug ); + fec_init( cpu_speed * BUS_CLOCK_RATIO, src_eth, loopback, speed, debug ); /* check link status before running test */ if ((loopback > 0) && !((loopback == 1) && (speed == 0))) { diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/eth_tests/eth_scc1_test.c ppc_diag/eth_tests/eth_scc1_test.c --- ppc_diag-1.0.2/eth_tests/eth_scc1_test.c Fri Feb 7 14:31:30 2003 +++ ppc_diag/eth_tests/eth_scc1_test.c Fri May 9 17:52:01 2003 @@ -43,6 +43,8 @@ extern uint rxIdx; extern uint txIdx; +extern ulong cpu_speed; + #define DBFN "eth_scc_init()" void eth_scc_init(void) { @@ -161,7 +163,7 @@ NetSCCTxPackets[i] = (unsigned char *)(xmit_buffer + (i * 1520)); } /* setup scc1 ethernet port */ - scc_init( BUS_CLOCK_RATE, src_eth, loopback, debug ); + scc_init( cpu_speed * BUS_CLOCK_RATIO, src_eth, loopback, debug ); /* can't detect link signal from xcvr! */ if (debug > 1) { /* display SCC registers */ @@ -292,7 +294,7 @@ NetSCCTxPackets[i] = (unsigned char *)(xmit_buffer + (i * 1520)); } /* setup scc1 ethernet port */ - scc_init( BUS_CLOCK_RATE, src_eth, loopback, debug ); + scc_init( cpu_speed * BUS_CLOCK_RATIO, src_eth, loopback, debug ); /* can't check for link on 10 Mb port! */ if (debug > 1) { /* display scc registers */ diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/fec/.cvsignore ppc_diag/fec/.cvsignore --- ppc_diag-1.0.2/fec/.cvsignore Fri Jan 3 10:40:06 2003 +++ ppc_diag/fec/.cvsignore Thu May 1 11:31:26 2003 @@ -1 +1 @@ -Makefile .depend .*.swp *.out +Makefile .depend .*.swp *.out *.dmp diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/fec/.depend ppc_diag/fec/.depend --- ppc_diag-1.0.2/fec/.depend Wed Dec 31 16:00:00 1969 +++ ppc_diag/fec/.depend Mon May 12 14:51:52 2003 @@ -0,0 +1,10 @@ +fec.o: fec.c \ + /home/speedy1/build/ppc_diag/includes/ppcboot.h \ + /home/speedy1/build/ppc_diag/includes/commproc.h \ + /home/speedy1/build/ppc_diag/includes/command.h \ + /home/speedy1/build/ppc_diag/includes/net.h \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + /home/speedy1/build/ppc_diag/includes/printf.h \ + /home/speedy1/build/ppc_diag/includes/mem_display.h \ + /home/speedy1/build/ppc_diag/includes/eth_menu.h \ + fec.h diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/greenbox_dpram/.cvsignore ppc_diag/greenbox_dpram/.cvsignore --- ppc_diag-1.0.2/greenbox_dpram/.cvsignore Fri Jan 3 11:07:22 2003 +++ ppc_diag/greenbox_dpram/.cvsignore Thu May 1 11:31:26 2003 @@ -1 +1 @@ -Makefile .depend .*.swp *.out +Makefile .depend .*.swp *.out *.dmp diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/greenbox_dpram/.depend ppc_diag/greenbox_dpram/.depend --- ppc_diag-1.0.2/greenbox_dpram/.depend Wed Dec 31 16:00:00 1969 +++ ppc_diag/greenbox_dpram/.depend Mon May 12 14:51:53 2003 @@ -0,0 +1,24 @@ +gb_dpram_menu.o: gb_dpram_menu.c \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + /home/speedy1/build/ppc_diag/includes/mem_test.h \ + /home/speedy1/build/ppc_diag/includes/gb_xilinx_test.h \ + gb_dpram_err.h \ + gb_dpram_test.h \ + gb_dpram_menu.h +gb_dpram_err.o: gb_dpram_err.c \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + /home/speedy1/build/ppc_diag/includes/printf.h \ + /home/speedy1/build/ppc_diag/includes/mem_test.h \ + /home/speedy1/build/ppc_diag/includes/dma_test.h \ + gb_dpram_test.h \ + gb_dpram_menu.h \ + gb_dpram_err.h +gb_dpram_test.o: gb_dpram_test.c \ + /home/speedy1/build/ppc_diag/includes/ppcboot.h \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + /home/speedy1/build/ppc_diag/includes/printf.h \ + /home/speedy1/build/ppc_diag/includes/mem_test.h \ + /home/speedy1/build/ppc_diag/includes/dma_test.h \ + /home/speedy1/build/ppc_diag/includes/gb_xilinx_test.h \ + gb_dpram_menu.h \ + gb_dpram_test.h diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/greenbox_dpram/gb_dpram_test.c ppc_diag/greenbox_dpram/gb_dpram_test.c --- ppc_diag-1.0.2/greenbox_dpram/gb_dpram_test.c Thu Jan 9 16:27:47 2003 +++ ppc_diag/greenbox_dpram/gb_dpram_test.c Thu May 1 11:31:26 2003 @@ -33,6 +33,7 @@ #include "gb_dpram_menu.h" #include "gb_dpram_test.h" +#ifdef ENABLE_GREEN_BOX_SUPPORT extern int diag_mode; extern test_option gb_dpram_options[LastOption]; @@ -48,23 +49,11 @@ { unsigned long *xilinx_ctrl = (unsigned long *)XILINX_BASE_ADDR; - bank_num &= 0xF; /* only 16 banks (for now) */ + bank_num &= 0x8; /* only 16 banks (for now) */ if (bank_num & 0x8) *xilinx_ctrl |= XIL_CNTRL_LP_ADR_A17; else *xilinx_ctrl &= ~(XIL_CNTRL_LP_ADR_A17); - if (bank_num & 0x4) - *xilinx_ctrl |= XIL_CNTRL_LP_ADR_A16; - else - *xilinx_ctrl &= ~(XIL_CNTRL_LP_ADR_A16); - if (bank_num & 0x2) - *xilinx_ctrl |= XIL_CNTRL_LP_ADR_A15; - else - *xilinx_ctrl &= ~(XIL_CNTRL_LP_ADR_A15); - if (bank_num & 0x1) - *xilinx_ctrl |= XIL_CNTRL_LP_ADR_A14; - else - *xilinx_ctrl &= ~(XIL_CNTRL_LP_ADR_A14); } int dpram_bank_alias_test( test_option *t_opts, unsigned int *results ) @@ -547,4 +536,6 @@ t_opts[DPRAMTestSize].init_value = LongWord; return 0; } + +#endif diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/greenbox_xilinx/.cvsignore ppc_diag/greenbox_xilinx/.cvsignore --- ppc_diag-1.0.2/greenbox_xilinx/.cvsignore Fri Jan 3 11:07:22 2003 +++ ppc_diag/greenbox_xilinx/.cvsignore Thu May 1 11:31:26 2003 @@ -1 +1 @@ -Makefile .depend .*.swp *.out +Makefile .depend .*.swp *.out *.dmp diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/greenbox_xilinx/.depend ppc_diag/greenbox_xilinx/.depend --- ppc_diag-1.0.2/greenbox_xilinx/.depend Wed Dec 31 16:00:00 1969 +++ ppc_diag/greenbox_xilinx/.depend Mon May 12 14:51:53 2003 @@ -0,0 +1,37 @@ +gb_xilinx_menu.o: gb_xilinx_menu.c \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + /home/speedy1/build/ppc_diag/includes/mem_test.h \ + gb_xilinx_test.h \ + gb_xilinx_err.h \ + gb_xilinx_menu.h +gb_xilinx_err.o: gb_xilinx_err.c \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + /home/speedy1/build/ppc_diag/includes/printf.h \ + /home/speedy1/build/ppc_diag/includes/reg_err.h \ + gb_xilinx_menu.h \ + gb_xilinx_err.h +gb_xilinx_test.o: gb_xilinx_test.c \ + /home/speedy1/build/ppc_diag/includes/ppcboot.h \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + /home/speedy1/build/ppc_diag/includes/printf.h \ + /home/speedy1/build/ppc_diag/includes/interrupts.h \ + /home/speedy1/build/ppc_diag/includes/dma_test.h \ + /home/speedy1/build/ppc_diag/includes/prandm.h \ + /home/speedy1/build/ppc_diag/includes/timer.h \ + /home/speedy1/build/ppc_diag/includes/reg_test.h \ + /home/speedy1/build/ppc_diag/includes/reg_err.h \ + /home/speedy1/build/ppc_diag/includes/gb_dpram_test.h \ + gb_xilinx_menu.h \ + gb_xilinx_err.h \ + gb_xilinx_intr.h \ + gb_xilinx_test.h +gb_xilinx_intr.o: gb_xilinx_intr.c \ + /home/speedy1/build/ppc_diag/includes/ppcboot.h \ + /home/speedy1/build/ppc_diag/includes/interrupts.h \ + /home/speedy1/build/ppc_diag/includes/printf.h \ + /home/speedy1/build/ppc_diag/includes/dma_test.h \ + /home/speedy1/build/ppc_diag/includes/timer.h \ + /home/speedy1/build/ppc_diag/includes/gb_dpram_test.h \ + gb_xilinx_menu.h \ + gb_xilinx_test.h \ + gb_xilinx_intr.h diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/greenbox_xilinx/gb_xilinx_intr.c ppc_diag/greenbox_xilinx/gb_xilinx_intr.c --- ppc_diag-1.0.2/greenbox_xilinx/gb_xilinx_intr.c Thu Jan 9 16:27:47 2003 +++ ppc_diag/greenbox_xilinx/gb_xilinx_intr.c Fri May 9 18:32:16 2003 @@ -34,6 +34,8 @@ #include "gb_xilinx_test.h" #include "gb_xilinx_intr.h" +#ifdef ENABLE_GREEN_BOX_SUPPORT + extern int xilinx_recv_bank_number; extern int xilinx_xmit_bank_number; extern int dma_recv_bank_number; @@ -52,10 +54,6 @@ volatile int dma_transfer_counter = 0; volatile int xilinx_xmit_stalled = 0; volatile int both_buffs_initd = 0; -/* error counters */ -static volatile int overflow_counter = 0; -static volatile int collision_counter = 0; -static volatile int manchester_error_counter = 0; void simple_recv_intr_handler() { @@ -99,7 +97,7 @@ { xilinx_recv_bank_number = -1; /* disable xilinx interrupts */ - UFE_receive_test_cleanup(); + UFE_test_cleanup(); } if ((dma_recv_bank_number == xilinx_recv_bank_number) && (dma_recv_bank_number != -1)) @@ -205,33 +203,6 @@ xilinx_xmit_intr_handler(); } #endif /* NOT_YET */ - if (xilinx_status & XIL_STAT_INT_RECV_OVF) - { - *xilinx_control_reg &= ~(XIL_CNTRL_ENA_ROVF_INTR); - // *xilinx_control_reg |= XIL_CNTRL_ENA_ROVF_INTR; -#ifdef SIMULATE_GREEN_BOX - *xilinx_status_reg &= ~(XIL_STAT_INT_RECV_OVF); -#endif /* SIMULATE_GREEN_BOX */ - overflow_counter++; - } - if (xilinx_status & XIL_STAT_INT_XMIT_COLSN) - { - *xilinx_control_reg &= ~(XIL_CNTRL_ENA_COLSN_INTR); - // *xilinx_control_reg |= XIL_CNTRL_ENA_COLSN_INTR; -#ifdef SIMULATE_GREEN_BOX - *xilinx_status_reg &= ~(XIL_STAT_INT_XMIT_COLSN); -#endif /* SIMULATE_GREEN_BOX */ - collision_counter++; - } - if (xilinx_status & XIL_STAT_INT_PAR_ERR) - { - *xilinx_control_reg &= ~(XIL_CNTRL_ENA_PAR_INTR); - // *xilinx_control_reg |= XIL_CNTRL_ENA_PAR_INTR; -#ifdef SIMULATE_GREEN_BOX - *xilinx_status_reg &= ~(XIL_STAT_INT_PAR_ERR); -#endif /* SIMULATE_GREEN_BOX */ - manchester_error_counter++; - } #ifdef XILINX_INTR_DEBUG printf("Received XILINX interrupt on PC4.\n"); #endif /* XILINX_INTR_DEBUG */ @@ -306,4 +277,6 @@ } #endif /* DEBUG_DMA_ENGINE */ } + +#endif diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/greenbox_xilinx/gb_xilinx_test.c ppc_diag/greenbox_xilinx/gb_xilinx_test.c --- ppc_diag-1.0.2/greenbox_xilinx/gb_xilinx_test.c Fri Feb 7 14:38:59 2003 +++ ppc_diag/greenbox_xilinx/gb_xilinx_test.c Fri May 9 18:33:43 2003 @@ -25,6 +25,7 @@ */ #include "ppcboot.h" +#include "diags.h" #include "printf.h" #include "interrupts.h" #include "dma_test.h" @@ -38,29 +39,24 @@ #include "gb_xilinx_intr.h" #include "gb_xilinx_test.h" +#ifdef ENABLE_GREEN_BOX_SUPPORT + extern volatile int dma_intr_counter; extern volatile int xilinx_intr_count; extern volatile int dma_transfer_counter; -extern volatile int xilinx_xmit_stalled; int xilinx_recv_bank_number = -1; -int xilinx_xmit_bank_number = -1; int dma_recv_bank_number = -1; -int xmit_bank_number = -1; recv_xilinx_buf_q_entry *recv_buf_ready_q_head = NULL; recv_xilinx_buf_q_entry *recv_buf_ready_q_tail = NULL; -xmit_xilinx_buf_q_entry *xmit_buf_ready_q_head = NULL; -xmit_xilinx_buf_q_entry *xmit_buf_ready_q_tail = NULL; int xilinx_free_buffer = -1; int dma_recv_entry_counter = 0; -int xmit_entry_counter = 0; unsigned long sdram_buffer_base = 0; unsigned long recv_buffer_size = 0; recv_xilinx_buf_q_entry xilinx_recv_buf_q_array[MAX_RECV_QUEUE_LENGTH]; -xmit_xilinx_buf_q_entry xilinx_xmit_buf_q_array[MAX_XMIT_QUEUE_LENGTH]; -reg_test_info xilinx_reg_test_settings[16] = +reg_test_info xilinx_reg_test_settings[12] = { { "Control Register", ControlReg * 4, XIL_CNTRL_MASK, (0x11111111L & XIL_CNTRL_MASK), 3, 1, 0 }, @@ -86,19 +82,13 @@ 0, 0, 0, 0 }, { "Token ID", TokenID * 4, 0x000000FF, (0x77777777 & 0x000000FF), 3, 1, 0 }, - { "Token Assign Rand #", TokenAssignRand * 4, 0x000000FF, - (0x88888888 & 0x000000FF), 3, 1, 0 }, - { "BTO Count", BTOCnt * 4, 0xFFFFFFFF, - (0x99999999 & 0xFFFFFFFF), 3, 1, 0 }, - { "BTO Time Interval", BTOTimeInt * 4, 0xFFFFFFFF, - (0xAAAAAAAA & 0xFFFFFFFF), 3, 1, 0 }, }; reg_set_info xilinx_reg_set = { XILINX_BASE_ADDR, 4, - 15, + 12, xilinx_reg_test_settings }; @@ -213,38 +203,7 @@ xilinx_intr_count = 0; immr->im_cpic.cpic_cimr |= CPM_CIPR_PC4; /* enable xmit interrupt in the ctrl register */ - *xilinx_ctrl_reg |= (XIL_CNTRL_ENA_XMIT_INTR | XIL_CNTRL_ENA_MNC_XMIT1); -} - -int sync_on_rgat() -{ - int timeout = 110; /* RGAT should go active every second */ - unsigned long *xilinx_stat_reg = (unsigned long*)(XILINX_BASE_ADDR + - (StatusReg * 4)); - - while (timeout > 0) - { - if ((*xilinx_stat_reg & XIL_STAT_RGAT) != 0) - { - break; - } - msdelay( 10 ); - timeout--; - } - if (timeout != 0) - { - timeout = 110; - while (timeout > 0) - { - if ((*xilinx_stat_reg & XIL_STAT_RGAT) == 0) - { - return 0; - } - msdelay( 10 ); - timeout--; - } - } - return 1; + *xilinx_ctrl_reg |= (XIL_CNTRL_ENA_XMIT_INTR); } int gb_intr_test( test_option *t_opts, unsigned int *results ) @@ -268,7 +227,7 @@ allow_cpm_intr(); enable_interrupts(); if (simulated_intr) - sim_xilinx_intr( XIL_STAT_INT_PEND ); + sim_xilinx_intr( XIL_STAT_INT_RBUFF1_DONE ); else { /* setup a receive buffer and enable receive to trigger an interrupt */ *xilinx_recv1_reg = 0; @@ -334,13 +293,13 @@ select_lp_bank( 0 ); } -void UFE_receive_test_cleanup( void ) +void UFE_test_cleanup( void ) { unsigned long *xilinx_ctrl_reg = (unsigned long*)(XILINX_BASE_ADDR + ControlReg); *xilinx_ctrl_reg &= ~(XIL_CNTRL_ENA_RBUFF1_INTR | - XIL_CNTRL_ENA_RBUFF2_INTR ); + XIL_CNTRL_ENA_RBUFF2_INTR | XIL_CNTRL_ENA_XMIT_INTR ); *xilinx_ctrl_reg &= ~(XIL_CNTRL_ENA_RECV); *xilinx_ctrl_reg &= ~(XIL_CNTRL_ENA_XMIT_NOW); } @@ -582,7 +541,7 @@ timeout--; if (timeout == 0) { - UFE_receive_test_cleanup(); + UFE_test_cleanup(); stop_dma(); disable_interrupts(); mask_cpm_intr(); @@ -598,7 +557,7 @@ } msdelay( 100 ); } - UFE_receive_test_cleanup(); + UFE_test_cleanup(); stop_dma(); disable_interrupts(); mask_cpm_intr(); @@ -618,62 +577,6 @@ return 0; } -#define DBFN "append_xilinx_xmit_DMA_entry()" -void append_xilinx_xmit_DMA_entry( unsigned int buffer_base, int byte_count ) -{ - unsigned int dpram_address = GB_DPRAM_BASE_ADDR; - - if (recv_buf_ready_q_head == NULL) - { /* need a new queue */ - xmit_buf_ready_q_head = &(xilinx_xmit_buf_q_array[0]); - xmit_buf_ready_q_tail = &(xilinx_xmit_buf_q_array[0]); - xmit_buf_ready_q_head->next = &(xilinx_xmit_buf_q_array[0]); - xmit_buf_ready_q_head->prev = &(xilinx_xmit_buf_q_array[0]); - } - else if (xmit_buf_ready_q_tail == xmit_buf_ready_q_head) - { /* only one item in the buffer */ - xmit_buf_ready_q_tail++; /* increment to next array element */ - /* array bounds checking */ - if (xmit_buf_ready_q_tail >= - &xilinx_xmit_buf_q_array[MAX_RECV_QUEUE_LENGTH]) - xmit_buf_ready_q_tail = &(xilinx_xmit_buf_q_array[0]); - xmit_buf_ready_q_head->next = xmit_buf_ready_q_tail; - xmit_buf_ready_q_head->prev = xmit_buf_ready_q_tail; - xmit_buf_ready_q_tail->next = xmit_buf_ready_q_head; - xmit_buf_ready_q_tail->prev = xmit_buf_ready_q_head; - } - else if (xmit_entry_counter >= MAX_XMIT_QUEUE_LENGTH) - { - printf("Out of buffers in %s! Aborting DMA xmit queue entry..\n", - DBFN); - return; - } - else - { - xmit_buf_ready_q_tail->next = - xmit_buf_ready_q_tail + 1; /* pointer arithmetic */ - /* array bounds checking */ - if (xmit_buf_ready_q_tail->next >= - &xilinx_xmit_buf_q_array[MAX_XMIT_QUEUE_LENGTH]) - xmit_buf_ready_q_tail->next = &(xilinx_xmit_buf_q_array[0]); - xmit_buf_ready_q_tail->next->prev = xmit_buf_ready_q_tail; - xmit_buf_ready_q_tail = xmit_buf_ready_q_tail->next; - xmit_buf_ready_q_tail->next = xmit_buf_ready_q_head; - xmit_buf_ready_q_head->prev = xmit_buf_ready_q_tail; - } - /* only need to know the byte count and buffer base address. - * The transmit interrupt will calculate the DPRAM base address */ - xmit_buf_ready_q_tail->sdram_base_address = buffer_base; - xmit_buf_ready_q_tail->byte_count = byte_count; - xmit_entry_counter++; - - /* check to see if the XILINX transmission has stalled */ - if (xilinx_xmit_stalled) - { - } -} -#undef DBFN - void copy_buffer_to_dpram( int bank_number, unsigned long buffer_base, int nbytes ) { @@ -688,31 +591,6 @@ } } -/* only 1 DMA channel available; use memory copy for xmit */ -void UFE_transmit_test_setup( void ) -{ - unsigned long *xilinx_ctrl_reg = (unsigned long*)(XILINX_BASE_ADDR + - ControlReg); - unsigned long *xilinx_buf_size_reg = - (unsigned long*)(XILINX_BASE_ADDR + XmitBuffSize); - - xilinx_xmit_bank_number = 0; - xmit_bank_number = -1; - xmit_buf_ready_q_head = NULL; - xmit_buf_ready_q_tail = NULL; - xmit_entry_counter = 0; - - memset( (void*)xilinx_xmit_buf_q_array, 0, - sizeof( xmit_xilinx_buf_q_entry ) * - MAX_XMIT_QUEUE_LENGTH ); - /* @@@@ init the xmit bus # in the XILINX ctrl register ? */ - *xilinx_ctrl_reg = XIL_CNTRL_ENA_XMIT_NOW; - /* init the interrupt generation bits in the XILINX ctrl register */ - *xilinx_ctrl_reg |= (XIL_CNTRL_ENA_XMIT_INTR); - /* init the recv buffer size register in the XILINX */ - *xilinx_buf_size_reg = BUFFER_SIZE; -} - int dump_xilinx_regs( test_option *t_opts, unsigned int *results ) { unsigned long *xil_reg = (unsigned long*)(XILINX_BASE_ADDR + ControlReg); @@ -725,4 +603,6 @@ } return 0; } + +#endif diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/greenbox_xilinx/gb_xilinx_test.h ppc_diag/greenbox_xilinx/gb_xilinx_test.h --- ppc_diag-1.0.2/greenbox_xilinx/gb_xilinx_test.h Thu Jan 9 16:27:47 2003 +++ ppc_diag/greenbox_xilinx/gb_xilinx_test.h Mon May 12 14:12:45 2003 @@ -74,72 +74,39 @@ { ControlReg, StatusReg, RecvBuff1Base, RecvBuff2Base, XmitBuffBase, RecvBuffSize, XmitBuffSize, ActRecvBuffAdr, ActRecvBuffCnt, - ActXmitBuffAdr, ActXmitBuffCnt, TokenID, TokenAssignRand, - BTOCnt, BTOTimeInt, XILVersions + ActXmitBuffAdr, ActXmitBuffCnt, TokenID } xilinx_reg_names; /* Xilinx control register bits */ #define XIL_CNTRL_LP_ADR_A17 0x80000000L #define XIL_CNTRL_ENA_RECV 0x40000000L -#define XIL_CNTRL_RESERVED1 0x20000000L -#define XIL_CNTRL_ENA_XMIT_NOW 0x10000000L -#define XIL_CNTRL_ENA_XMIT_TOK 0x08000000L -#define XIL_CNTRL_ENA_TOK 0x04000000L -#define XIL_CNTRL_ENA_TOK_ID_ASN 0x02000000L -#define XIL_CNTRL_ENA_TOK_ID_ADJ 0x01000000L -#define XIL_CNTRL_RP_ADR_A17 0x00800000L -#define XIL_CNTRL_RP_ADR_A16 0x00400000L -#define XIL_CNTRL_LP_ADR_A16 0x00200000L -#define XIL_CNTRL_LP_ADR_A15 0x00100000L -#define XIL_CNTRL_LP_ADR_A14 0x00080000L -#define XIL_CNTRL_PAR_ERR_LED 0x00002000L -#define XIL_CNTRL_MNC_ERR_LED 0x00001000L -#define XIL_CNTRL_COLSN_ERR_LED 0x00000800L -#define XIL_CNTRL_SEL_XMIT_PAR 0x00000400L -#define XIL_CNTRL_ENA_BTO_INTR 0x00000200L -#define XIL_CNTRL_ENA_PAR_INTR 0x00000100L -#define XIL_CNTRL_ENA_COLSN_INTR 0x00000080L -#define XIL_CNTRL_ENA_RBUFF1_INTR 0x00000040L -#define XIL_CNTRL_ENA_RBUFF2_INTR 0x00000020L -#define XIL_CNTRL_ENA_ROVF_INTR 0x00000010L -#define XIL_CNTRL_ENA_XMIT_INTR 0x00000008L -#define XIL_CNTRL_SEL_MNC_RECV 0x00000004L -#define XIL_CNTRL_ENA_MNC_XMIT1 0x00000002L -#define XIL_CNTRL_ENA_MNC_XMIT2 0x00000001L -#define XIL_CNTRL_MASK 0xDFF83FFFL -#define XIL_CNTRL_QUIET_MASK 0x5F0003FFL +#define XIL_CNTRL_ENA_XMIT_NOW 0x20000000L +#define XIL_CNTRL_ENA_XMIT 0x10000000L +#define XIL_CNTRL_RP_ADR_A17 0x08000000L +#define XIL_CNTRL_RP_ADR_A16 0x04000000L +#define XIL_CNTRL_ENA_RBUFF1_INTR 0x00000004L +#define XIL_CNTRL_ENA_RBUFF2_INTR 0x00000002L +#define XIL_CNTRL_ENA_XMIT_INTR 0x00000001L +#define XIL_CNTRL_MASK 0xFC000007L +#define XIL_CNTRL_QUIET_MASK 0x70000000L /* Xilinx status register bits */ -#define XIL_STAT_ILL_CNTRL 0x80000000L -#define XIL_STAT_RBUFF1_ACT 0x40000000L -#define XIL_STAT_RBUFF2_ACT 0x20000000L -#define XIL_STAT_XBUFF_ACT 0x10000000L -#define XIL_STAT_RBUFF1_DONE 0x08000000L -#define XIL_STAT_RBUFF2_DONE 0x04000000L -#define XIL_STAT_XBUFF_DONE 0x02000000L -#define XIL_STAT_RECV_OVF 0x01000000L -#define XIL_STAT_XMIT_COLSN 0x00800000L -#define XIL_STAT_MNC_SIG_ERR 0x00400000L -#define XIL_STAT_PAR_ERR 0x00200000L -#define XIL_STAT_INT_PEND 0x00100000L -#define XIL_STAT_RUNNING 0x00010000L -#define XIL_STAT_RGAT 0x00008000L -#define XIL_STAT_WATV 0x00004000L -#define XIL_STAT_INT_PAR_ERR 0x00000100L -#define XIL_STAT_INT_XMIT_COLSN 0x00000080L -#define XIL_STAT_INT_RBUFF1_DONE 0x00000040L -#define XIL_STAT_INT_RBUFF2_DONE 0x00000020L -#define XIL_STAT_INT_RECV_OVF 0x00000010L -#define XIL_STAT_INT_XBUFF_DONE 0x00000008L -#define XIL_STAT_MASK 0xFFF00001L -#define XIL_STAT_INT_MASK 0x000001F8L +#define XIL_STAT_ILL_CNTRL 0x00008000L +#define XIL_STAT_RBUFF1_ACT 0x00004000L +#define XIL_STAT_RBUFF2_ACT 0x00002000L +#define XIL_STAT_XBUFF_ACT 0x00001000L +#define XIL_STAT_INT_RBUFF1_DONE 0x00000004L +#define XIL_STAT_INT_RBUFF2_DONE 0x00000002L +#define XIL_STAT_INT_XBUFF_DONE 0x00000001L +#define XIL_STAT_MASK 0x0000F007L +#define XIL_STAT_INT_MASK 0x00000007L +#define XIL_STAT_FPGA_REV 0xFFFF0000L /* XILINX revision constants */ -#define GREEN_BOX_ID 0x77000000 -#define GREEN_BOX_ID_MASK 0xFF000000 -#define HXCTL_REV_MASK 0x00FFF000 -#define XMAN_REV_MASK 0x00000FFF -#define HXCTL_REV_SHIFT 12 +#define GREEN_BOX_ID 0x80000000 +#define GREEN_BOX_ID_MASK 0xF0000000 +#define HXCTL_REV_MASK 0x00FF0000 +#define HXCTL_REV_SHIFT 16 #define BUFFER_MASK 0x0003FFFFL @@ -186,5 +153,5 @@ void append_xilinx_recv_DMA_entry( int bank_number ); void copy_buffer_to_dpram( int bank_number, unsigned long buffer_base, int nbytes ); -void UFE_receive_test_cleanup( void ); +void UFE_test_cleanup( void ); diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/led/.cvsignore ppc_diag/led/.cvsignore --- ppc_diag-1.0.2/led/.cvsignore Fri Jan 3 10:40:06 2003 +++ ppc_diag/led/.cvsignore Thu May 1 11:31:26 2003 @@ -1 +1 @@ -Makefile .depend .*.swp *.out +Makefile .depend .*.swp *.out *.dmp diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/led/.depend ppc_diag/led/.depend --- ppc_diag-1.0.2/led/.depend Wed Dec 31 16:00:00 1969 +++ ppc_diag/led/.depend Mon May 12 14:51:52 2003 @@ -0,0 +1,16 @@ +led_test.o: led_test.c \ + /home/speedy1/build/ppc_diag/includes/ppcboot.h \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + led_menu.h \ + led_test.h +led_menu.o: led_menu.c \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + led_test.h \ + led_err.h \ + led_menu.h +led_err.o: led_err.c \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + /home/speedy1/build/ppc_diag/includes/printf.h \ + led_menu.h \ + led_err.h \ + led_test.h diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/memory/.cvsignore ppc_diag/memory/.cvsignore --- ppc_diag-1.0.2/memory/.cvsignore Fri Jan 3 10:40:06 2003 +++ ppc_diag/memory/.cvsignore Thu May 1 11:31:26 2003 @@ -1 +1 @@ -Makefile .depend .*.swp *.out +Makefile .depend .*.swp *.out *.dmp diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/memory/.depend ppc_diag/memory/.depend --- ppc_diag-1.0.2/memory/.depend Wed Dec 31 16:00:00 1969 +++ ppc_diag/memory/.depend Mon May 12 14:51:53 2003 @@ -0,0 +1,39 @@ +mem_test.o: mem_test.c \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + /home/speedy1/build/ppc_diag/includes/cache.h \ + /home/speedy1/build/ppc_diag/includes/printf.h \ + /home/speedy1/build/ppc_diag/includes/system_log.h \ + /home/speedy1/build/ppc_diag/includes/prandm.h \ + /home/speedy1/build/ppc_diag/includes/led_test.h \ + mem_menu.h \ + /home/speedy1/build/ppc_diag/includes/mem_display.h \ + mem_test.h +mem_menu.o: mem_menu.c \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + mem_test.h \ + dma_test.h \ + mem_err.h \ + mem_init.h \ + mem_menu.h +mem_err.o: mem_err.c \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + /home/speedy1/build/ppc_diag/includes/printf.h \ + mem_menu.h \ + mem_test.h \ + dma_test.h \ + mem_err.h +mem_init.o: mem_init.c \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + mem_menu.h +dma_test.o: dma_test.c \ + /home/speedy1/build/ppc_diag/includes/ppcboot.h \ + /home/speedy1/build/ppc_diag/includes/interrupts.h \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + /home/speedy1/build/ppc_diag/includes/timer.h \ + /home/speedy1/build/ppc_diag/includes/printf.h \ + /home/speedy1/build/ppc_diag/includes/system_log.h \ + /home/speedy1/build/ppc_diag/includes/prandm.h \ + mem_menu.h \ + mem_comp.h \ + mem_test.h \ + dma_test.h diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/memory/dma_test.c ppc_diag/memory/dma_test.c --- ppc_diag-1.0.2/memory/dma_test.c Fri Feb 7 14:25:09 2003 +++ ppc_diag/memory/dma_test.c Thu May 1 11:31:26 2003 @@ -36,6 +36,8 @@ #include "mem_test.h" #include "dma_test.h" +#ifdef ENABLE_PPC_IDMA0_SUPPORT + volatile int dma_intr_counter = 0; void dma_init( int intr_enable, int debug ) @@ -330,4 +332,6 @@ stop_dma(); return failed; } + +#endif diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/nflash/.cvsignore ppc_diag/nflash/.cvsignore --- ppc_diag-1.0.2/nflash/.cvsignore Wed Dec 31 16:00:00 1969 +++ ppc_diag/nflash/.cvsignore Thu May 1 11:31:26 2003 @@ -0,0 +1 @@ +Makefile .depend .*.swp *.out *.dmp diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/nflash/.depend ppc_diag/nflash/.depend --- ppc_diag-1.0.2/nflash/.depend Wed Dec 31 16:00:00 1969 +++ ppc_diag/nflash/.depend Mon May 12 14:51:53 2003 @@ -0,0 +1,33 @@ +nandf_ops.o: nandf_ops.c \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + /home/speedy1/build/ppc_diag/includes/ppcboot.h \ + /home/speedy1/build/ppc_diag/includes/printf.h \ + /home/speedy1/build/ppc_diag/includes/mem_display.h \ + nandf.h \ + nandf_ops.h +nflash_err.o: nflash_err.c \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + /home/speedy1/build/ppc_diag/includes/printf.h \ + nflash_menu.h \ + nflash_err.h \ + nflash_test.h +nflash_menu.o: nflash_menu.c \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + nflash_init.h \ + nflash_test.h \ + nflash_err.h \ + nflash_menu.h +nflash_init.o: nflash_init.c \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + /home/speedy1/build/ppc_diag/includes/ppcboot.h \ + nandf.h \ + nandf_ops.h \ + nflash_menu.h \ + nflash_init.h +nflash_test.o: nflash_test.c \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + /home/speedy1/build/ppc_diag/includes/printf.h \ + nandf.h \ + nandf_ops.h \ + nflash_menu.h \ + nflash_test.h diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/nflash/Makefile ppc_diag/nflash/Makefile --- ppc_diag-1.0.2/nflash/Makefile Wed Dec 31 16:00:00 1969 +++ ppc_diag/nflash/Makefile Fri Jan 31 12:45:34 2003 @@ -0,0 +1,65 @@ +# +# (C) Copyright 2002 +# Ron Lockwood-Childs, VCT Labs, rchilds@vctlabs.com. +# +# See file CREDITS for the list of contributors to this project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +MODULENAME = $(shell env ruby -e "puts File.basename Dir.getwd" ) + +ifeq ($(MODULENAME).list,$(wildcard $(MODULENAME).list)) +include $(MODULENAME).list +endif + +ifneq (.depend,$(wildcard .depend)) +DOTHIS = depend +else +include .depend +endif + +all: $(DOTHIS) compile + +O = $(subst ",,$(OBJECTS)) +compile: $(O) + +depend: + echo $(HPATH) + eval SRCC='$(C_SOURCES)' ; \ + eval SRCA='$(AS_SOURCES)' ; \ + $(MKDEP) -- $$SRCC $$SRCA > .depend + +hfiles: + ruby -e 'Dir.chdir "$(INCLUDES)"; hs = $(HEADERS); \ + mn = "$(MODULENAME)"; \ + if hs.length > 0 then hs.split.each { |hf| \ + system "ln", "-s", "../#{mn.to_s}/#{hf.to_s}" } end' + +prep_output: + ruby -e 'ss = $(C_SOURCES); if ss.length > 0 then ss.split.each { |sf| \ + system "/usr/bin/cpp", "-P", "-I$(INCLUDES)", "-I$(PPCBOOT_INCLUDES)", \ + "#{sf}", "#{sf}pp"; \ + system %Q{/bin/grep "[^ \n\t]" #{sf}pp > #{sf}pp.out}; \ + system "rm", "-f", "#{sf}pp"; } end' + +clean: + rm -f *.o + +distclean: + rm -f .depend + +.PHONY: depend compile hfiles clean distclean prep_output diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/nflash/nandf.h ppc_diag/nflash/nandf.h --- ppc_diag-1.0.2/nflash/nandf.h Wed Dec 31 16:00:00 1969 +++ ppc_diag/nflash/nandf.h Thu May 1 11:31:26 2003 @@ -0,0 +1,55 @@ +/* + * (C) Copyright 2003 + * Ron Lockwood-Childs, VCT Labs, rchilds@vctlabs.com. + * + * See file CREDITS for the list of contributors to this project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +/* nandf.h + * common constants and macros for the NAND flash tests + */ + +#include "diags.h" + +/* flash commands */ + +#define NFLASH_CMD_SER_DAT_IN 0x80 +#define NFLASH_CMD_READ1 0x00 +#define NFLASH_CMD_READ2 0x01 +#define NFLASH_CMD_READ3 0x50 +#define NFLASH_CMD_RESET 0xFF +#define NFLASH_CMD_AUTO_B_PROG 0x10 +#define NFLASH_CMD_AUTO_B_ERASE 0x60 +#define NFLASH_CMD_STAT_READ 0x70 +#define NFLASH_CMD_ID_READ 0x90 +#define NFLASH_CMD_ERASE_CNFRM 0xD0 + +#define NFLASH_BUSY_IRQ 0x02000000 + +#define WRITE_NFLASH_REG(x) (*((volatile unsigned char *)(NFLASH_CTRL_ADDR)) = \ + (x)) +/* flash status */ +#define NFLASH_STAT_FAIL 0x01 +#define NFLASH_STAT_READY 0x40 +#define NFLASH_STAT_UNPROT 0x80 + +#define WRITE_NFLASH_DATA(x) \ + (*((volatile unsigned char *)(NFLASH_IO_ADDR)) = (x)) +#define READ_NFLASH_DATA() \ + (*((volatile unsigned char *)(NFLASH_IO_ADDR))) + diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/nflash/nandf_ops.c ppc_diag/nflash/nandf_ops.c --- ppc_diag-1.0.2/nflash/nandf_ops.c Wed Dec 31 16:00:00 1969 +++ ppc_diag/nflash/nandf_ops.c Fri May 9 18:36:15 2003 @@ -0,0 +1,389 @@ +/* + * (C) Copyright 2003 + * Ron Lockwood-Childs, VCT Labs, rchilds@vctlabs.com. + * + * See file CREDITS for the list of contributors to this project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +/* nandf_ops.c + * functions for manipulating nand flash + */ + +#include "diags.h" +#include "ppcboot.h" +#include "printf.h" +#include "mem_display.h" +#include "nandf.h" +#include "nandf_ops.h" + +static volatile unsigned char nand_reg_mirror = 0; + +void command_nflash( unsigned char command, int debug ) +{ + if (debug > 2) + printf("Command phase..\n"); + NFLASH_SETCE( nand_reg_mirror ); + NFLASH_SETCLE( nand_reg_mirror ); + WRITE_NFLASH_REG( nand_reg_mirror ); + if (debug > 2) + printf("Wrote %02x to ctrl\n", nand_reg_mirror); + WRITE_NFLASH_DATA( command ); + if (debug > 2) + printf("Wrote command %02x\n", command); + NFLASH_CLRCLE( nand_reg_mirror ); + WRITE_NFLASH_REG( nand_reg_mirror ); + if (debug > 2) + printf("Wrote %02x to ctrl\n", nand_reg_mirror); +} + +void address_nflash( unsigned char column, int page, int debug ) +{ + if (debug > 2) + printf("Address phase..\n"); + NFLASH_SETALE( nand_reg_mirror ); + WRITE_NFLASH_REG( nand_reg_mirror ); + if (debug > 2) + printf("Wrote %02x to ctrl.\n", nand_reg_mirror); + WRITE_NFLASH_DATA( column ); + if (debug > 2) + printf("Wrote column address %02x\n", column); + if (page != -1) + { + WRITE_NFLASH_DATA( page & 0xFF ); + if (debug > 2) + printf("Address bytes: %02x", page & 0xFF); + WRITE_NFLASH_DATA( (page & 0xFF00) >> 8 ); + if (debug > 2) + printf(" %02x", (page & 0xFF00) >> 8); + WRITE_NFLASH_DATA( (page & 0xFF0000) >> 16 ); + if (debug > 2) + printf(" %02x written during address cycle.\n", + (page & 0xFF0000) >> 16); + } + NFLASH_CLRALE( nand_reg_mirror ); + WRITE_NFLASH_REG( nand_reg_mirror ); + if (debug > 2) + printf("Wrote %02x to ctrl\n", nand_reg_mirror); +} + +int busy_wait_nflash( unsigned int us_delay, unsigned int us_timeout, + int debug ) +{ + int busy = 1; + unsigned int us_elapsed = us_delay; + volatile immap_t *immr = (immap_t *)CFG_IMMR; + + udelay( us_delay ); + while (busy == 1) + { + if ((immr->im_siu_conf.sc_sipend & NFLASH_BUSY_IRQ) != 0) + busy = 0; + udelay( us_delay ); + us_elapsed += us_delay; + if (us_elapsed > us_timeout) + return 1; + } + return 0; +} + +int reset_nflash( int debug ) +{ + command_nflash( NFLASH_CMD_RESET, debug ); + if (busy_wait_nflash( 10, 600, debug ) != 0) + { + printf("NAND Flash did not reset!\n"); + return 1; + } + return 0; +} + +int get_status_nflash( int debug ) +{ + command_nflash( NFLASH_CMD_STAT_READ, debug ); + return (READ_NFLASH_DATA()); +} + +int get_id_nflash( int debug ) +{ + unsigned char id_bytes[2]; + + command_nflash( NFLASH_CMD_ID_READ, debug ); + address_nflash( 0x00, -1, debug ); + /* Because of device timing set on the chip select (c.f. OR/BR settings) + * nothing happens faster than a usec. Therefore the 100ns delay before + * reading the id has already been taken care of + */ + id_bytes[0] = READ_NFLASH_DATA(); + if (debug) + printf("Got %02x\n", id_bytes[0]); + id_bytes[1] = READ_NFLASH_DATA(); + if (debug) + printf("Got %02x\n", id_bytes[1]); + udelay( 20 ); + NFLASH_CLRCE( nand_reg_mirror ); + WRITE_NFLASH_REG( nand_reg_mirror ); + if (debug > 1) + printf("Wrote %02x to ctrl\n", nand_reg_mirror); + return ((id_bytes[0] << 8) | id_bytes[1]); +} + +int verify_erase_nflash( int capacity, int page_size, unsigned int *results, + int debug ) +{ + int byte_n = 0; + int failed = 0; + int still_going_ind = capacity / 128; + unsigned char nflash_byte = 0; + + /* make space for still-alive indicator */ + if (debug == 0) + printf(" "); + command_nflash( NFLASH_CMD_READ1, debug ); + address_nflash( 0x00, 0x00, debug ); + for (byte_n = 0; byte_n < (capacity * page_size); byte_n++) + { + if ((byte_n % page_size) == 0) + { + if (debug == 0) + if (((byte_n / page_size) % still_going_ind) == 0) + still_alive(); + busy_wait_nflash( 1, 550, debug ); + } + nflash_byte = READ_NFLASH_DATA(); + if (nflash_byte != 0xff) + { + int block_size = (capacity / 1024); + + printf("Bit error in byte %08x - %08x, page %d, block %d:\n", + byte_n, byte_n + 3, byte_n / page_size, + (byte_n / page_size) / block_size ); + printf("Expected 0xff, read %02x\n", nflash_byte); + results[2] = byte_n; + results[3] = byte_n / page_size; + results[4] = (byte_n / page_size) / block_size; + results[5] = nflash_byte; + failed = 1; + } + } + udelay( 20 ); + NFLASH_CLRCE( nand_reg_mirror ); + WRITE_NFLASH_REG( nand_reg_mirror ); + if (debug > 1) + printf("Wrote %02x to ctrl\n", nand_reg_mirror); + if (debug == 0) + printf("\b"); + return failed; +} + +int verify_byte_pattern( int page_no, int page_size, block_test_types patn, + unsigned int *results, int debug ) +{ + int n_byte = 0; + unsigned char r_byte; + int cb_patn; + int failed = 0; + + if (patn == CheckerBoardA) + cb_patn = 0x55; + else if (patn == CheckerBoardB) + cb_patn = 0xAA; + else + cb_patn = 0xFF; + command_nflash( NFLASH_CMD_READ1, debug ); + address_nflash( 0x00, page_no, debug ); + busy_wait_nflash( 1, 550, debug ); + for (n_byte = 0; n_byte < page_size; n_byte++) + { + r_byte = READ_NFLASH_DATA(); + if (r_byte != cb_patn) + { + printf("Data error in page %d, byte (column) %d:\n", + page_no, n_byte); + printf("\tExpected %02x, read %02x\n", cb_patn, r_byte); + results[2] = page_no; + results[3] = n_byte; + results[4] = cb_patn; + results[5] = r_byte; + failed = 1; + return !(failed); + } + } + return !(failed); +} + +int test_cb_pattern( int page_no, int page_size, block_test_types patn, + unsigned int *results, int debug ) +{ + int n_byte = 0; + int cb_patn; + int failed = 0; + int dev_status = 0; + + if (patn == CheckerBoardA) + cb_patn = 0x55; + else if (patn == CheckerBoardB) + cb_patn = 0xAA; + NFLASH_WPOFF( nand_reg_mirror ); /* disable write protect */ + WRITE_NFLASH_REG( nand_reg_mirror ); + command_nflash( NFLASH_CMD_SER_DAT_IN, debug ); + address_nflash( 0x00, page_no, debug ); + busy_wait_nflash( 1, 10, debug ); + for (n_byte = 0; n_byte < page_size; n_byte++) + { /* clock in the test data: binary 01010101 */ + WRITE_NFLASH_DATA( cb_patn ); + } + /* start auto-program */ + command_nflash( NFLASH_CMD_AUTO_B_PROG, debug ); + /* wait.. */ + busy_wait_nflash( 100, 1100, debug ); + /* check the programming status */ + dev_status = get_status_nflash( debug ); + if (debug) + printf("\nStatus: %x\n", dev_status); + if ((dev_status & NFLASH_STAT_FAIL) != 0) + { + results[2] = 0xffffffff; + results[3] = page_no; + printf("NAND device reports programming failure on page %d.\n", + page_no); + failed = 1; + } + /* read the page data in and verify it */ + if (!verify_byte_pattern( page_no, page_size, patn, results, debug )) + { + if (patn == CheckerBoardA) + printf("Checkerboard test A failed.\n"); + else + printf("Checkerboard test B failed.\n"); + failed = 1; + } + udelay( 20 ); + NFLASH_WPON( nand_reg_mirror ); /* enable write protect */ + NFLASH_CLRCE( nand_reg_mirror ); + WRITE_NFLASH_REG( nand_reg_mirror ); + return failed; +} + +int verify_block_erase( int block, int page_size, int pgs_per_block, + int capacity, int *results, int debug ) +{ + int n_block, n_page; + int start_block, end_block; + int failed = 0; + + if (block == 0xffffffff) + { + start_block = 0; + end_block = (capacity / pgs_per_block); + } + for (n_block = start_block; n_block <= end_block; n_block++) + { + for (n_page = (block * pgs_per_block); + n_page < ((block+1) * pgs_per_block); n_page++) + { + if (!verify_byte_pattern( n_page, page_size, BlockErasePatn, + results, debug )) + { + printf("Failed erase test of block %d.\n", n_block); + failed = 1; + break; + } + } + } + return !(failed); +} + +int erase_block_nflash( int block_no, int pgs_per_block, int capacity, + int page_size, int *results, int debug ) +{ + unsigned int block_page_base; + int dev_status = 0; + int failed = 0; + + block_page_base = (block_no * pgs_per_block); + + results[1] = 0; + if (block_page_base > capacity) + { + printf("Specified block # %d out of range.\n", block_no); + results[1] = 1; + return 1; + } + NFLASH_WPOFF( nand_reg_mirror ); /* disable write protect */ + command_nflash( NFLASH_CMD_AUTO_B_ERASE, debug ); + NFLASH_SETALE( nand_reg_mirror ); + WRITE_NFLASH_REG( nand_reg_mirror ); + if (debug > 2) + printf("Wrote %02x to ctrl.\n", nand_reg_mirror); + WRITE_NFLASH_DATA( (block_page_base & 0x00F0) ); + if (debug > 2) + printf(" %02x", (block_page_base & 0x00F0) ); + WRITE_NFLASH_DATA( (block_page_base & 0xFF00) >> 8 ); + if (debug > 2) + printf(" %02x", (block_page_base & 0xFF00) >> 8); + if (block_page_base > 0xffff) + { + WRITE_NFLASH_DATA( (block_page_base & 0xFF0000) >> 16 ); + if (debug > 2) + printf(" %02x", (block_page_base & 0xFF0000) >> 16); + } + if (debug > 2) + printf(" written during block address cycle.\n"); + NFLASH_CLRALE( nand_reg_mirror ); + command_nflash( NFLASH_CMD_ERASE_CNFRM, debug ); + busy_wait_nflash( 2000, 11000, debug ); + dev_status = get_status_nflash( debug ); + if (debug) + printf("\nStatus: %x\n", dev_status); + if ((dev_status & NFLASH_STAT_FAIL) != 0) + { + printf("NAND device reports erase failure in block %d.\n", block_no); + results[2] = 0xffffffff; + results[3] = block_no; + failed = 1; + } + else if (!verify_block_erase( block_no, page_size, pgs_per_block, capacity, + results, debug )) + { + failed = 1; + } + udelay(20); + NFLASH_WPON( nand_reg_mirror ); /* enable write protect */ + NFLASH_CLRCE( nand_reg_mirror ); + WRITE_NFLASH_REG( nand_reg_mirror ); + return failed; +} + +void dump_page_nflash( unsigned int mem_copy_base, int page_no, int page_size, + int debug ) +{ + int n_byte = 0; + + command_nflash( NFLASH_CMD_READ1, debug ); + address_nflash( 0x00, page_no, debug ); + busy_wait_nflash( 1, 550, debug ); + for (n_byte = 0; n_byte < page_size; n_byte++) + { + *(unsigned char*)(mem_copy_base + n_byte) = READ_NFLASH_DATA(); + } + udelay( 20 ); + NFLASH_CLRCE( nand_reg_mirror ); + WRITE_NFLASH_REG( nand_reg_mirror ); + mem_display( mem_copy_base, (mem_copy_base + page_size), 1 ); +} + diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/nflash/nandf_ops.h ppc_diag/nflash/nandf_ops.h --- ppc_diag-1.0.2/nflash/nandf_ops.h Wed Dec 31 16:00:00 1969 +++ ppc_diag/nflash/nandf_ops.h Fri May 2 11:16:50 2003 @@ -0,0 +1,42 @@ +/* + * (C) Copyright 2003 + * Ron Lockwood-Childs, VCT Labs, rchilds@vctlabs.com. + * + * See file CREDITS for the list of contributors to this project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +/* nandf_ops.h + * constants, macros, and declarations for nand flash operations + */ + +typedef enum { CheckerBoardA, CheckerBoardB, BlockErasePatn } block_test_types; + +void command_nflash( unsigned char command, int debug ); +int busy_wait_nflash( unsigned int us_delay, unsigned int us_timeout, + int debug ); +int reset_nflash( int debug ); +int get_id_nflash( int debug ); +int verify_erase_nflash( int capacity, int page_size, unsigned int *results, + int debug ); +int test_cb_pattern( int page_no, int page_size, block_test_types patn, + unsigned int *results, int debug ); +void dump_page_nflash( unsigned int mem_copy_base, int page_no, int page_size, + int debug ); +int erase_block_nflash( int block_no, int pgs_per_block, int capacity, + int page_size, int *results, int debug ); + diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/nflash/nflash.list ppc_diag/nflash/nflash.list --- ppc_diag-1.0.2/nflash/nflash.list Wed Dec 31 16:00:00 1969 +++ ppc_diag/nflash/nflash.list Thu May 1 11:31:26 2003 @@ -0,0 +1,12 @@ +# list of nand flash test files + +HEADERS="nandf.h nandf_ops.h nflash_err.h nflash_menu.h nflash_init.h \ +nflash_test.h" + +AS_SOURCES= + +C_SOURCES="nandf_ops.c nflash_err.c nflash_menu.c nflash_init.c nflash_test.c" + +OBJECTS="nandf_ops.o nflash_err.o nflash_menu.o nflash_init.o nflash_test.o" + +export HEADERS AS_SOURCES C_SOURCES OBJECTS diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/nflash/nflash_err.c ppc_diag/nflash/nflash_err.c --- ppc_diag-1.0.2/nflash/nflash_err.c Wed Dec 31 16:00:00 1969 +++ ppc_diag/nflash/nflash_err.c Fri May 9 18:36:15 2003 @@ -0,0 +1,118 @@ +/* + * (C) Copyright 2003 + * Ron Lockwood-Childs, VCT Labs, rchilds@vctlabs.com. + * + * See file CREDITS for the list of contributors to this project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +/* nflash_err.c + * pretty-printer for nflash error messages + */ + +#include "diags.h" +#include "printf.h" +#include "nflash_menu.h" +#include "nflash_err.h" +#include "nflash_test.h" + +unsigned int nflash_err( unsigned int *results, unsigned int loopnum ) +{ + char str_temp[255]; + int line_num = 0; + + sprintf(str_temp, "ERROR: In NAND Flash Menu -> "); + switch (results[0]) + { + case ResetTest: + printf("%sReset NAND Flash: ", str_temp); + break; + case BBlockTest: + printf("%sCheck for bad blocks: ", str_temp); + break; + case EraseBlock: + printf("%sErase blocks: ", str_temp); + break; + case WritePatnA: + printf("%sWrite test ptn 1: ", str_temp); + break; + case WritePatnB: + printf("%sWrite test ptn 2: ", str_temp); + break; + default: + printf("%sUnknown: ", str_temp); + } + if (loopnum > 0) + printf("(Loop %d)", loopnum); + printf("\n"); + ++line_num; + switch (results[0]) + { + case ResetTest: + printf("\tNAND part failed to acknowledge reset.\n"); + ++line_num; + break; + case EraseBlock: + if (results[1] != 0) + { + printf("Specified erase block out of range.\n"); + ++line_num; + } + if (results[2] == 0xffffffff) + { + printf("NAND device reports erase failure in block %s%d%s.\n", + VT100_FAULT_SEQ, results[3], VT100_END_SEQ); + ++line_num; + } + else + { + printf("Erase error in page %s%d%s, byte (column) %s%d%s:\n", + VT100_FAULT_SEQ, results[2], VT100_END_SEQ, + VT100_FAULT_SEQ, results[3], VT100_END_SEQ); + ++line_num; + printf("\tExpected %s%02x%s, read %s%02x%s\n", + VT100_FAULT_SEQ, results[4], VT100_END_SEQ, + VT100_FAULT_SEQ, results[5], VT100_END_SEQ); + ++line_num; + } + break; + case WritePatnA: + case WritePatnB: + printf("After programming NAND flash page with test pattern %d:\n", + results[0] == WritePatnA ? 1 : 2); + ++line_num; + if (results[2] == 0xffffffff) + { + printf("NAND device reports program failure in page %s%d%s.\n", + VT100_FAULT_SEQ, results[3], VT100_END_SEQ); + ++line_num; + } + else + { + printf("Program error in page %s%d%s, byte (column) %s%d%s:\n", + VT100_FAULT_SEQ, results[2], VT100_END_SEQ, + VT100_FAULT_SEQ, results[3], VT100_END_SEQ); + ++line_num; + printf("\tExpected %s%02x%s, read %s%02x%s\n", + VT100_FAULT_SEQ, results[4], VT100_END_SEQ, + VT100_FAULT_SEQ, results[5], VT100_END_SEQ); + ++line_num; + } + } + return line_num; +} + diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/nflash/nflash_err.h ppc_diag/nflash/nflash_err.h --- ppc_diag-1.0.2/nflash/nflash_err.h Wed Dec 31 16:00:00 1969 +++ ppc_diag/nflash/nflash_err.h Thu May 1 11:31:26 2003 @@ -0,0 +1,28 @@ +/* + * (C) Copyright 2003 + * Ron Lockwood-Childs, VCT Labs, rchilds@vctlabs.com. + * + * See file CREDITS for the list of contributors to this project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +/* nflash_err.h + * declaration for nflash error printing routine nflash_err() + */ + +unsigned int nflash_err( unsigned int *results, unsigned int loopnum ); + diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/nflash/nflash_init.c ppc_diag/nflash/nflash_init.c --- ppc_diag-1.0.2/nflash/nflash_init.c Wed Dec 31 16:00:00 1969 +++ ppc_diag/nflash/nflash_init.c Thu May 1 11:31:26 2003 @@ -0,0 +1,78 @@ +/* nflash_init.c + * configure port bit for IRQ 3 as an input (NAND flash ready/busy signal) + */ + +#include "diags.h" +#include +#include "ppcboot.h" +#include "nandf.h" +#include "nandf_ops.h" +#include "nflash_menu.h" +#include "nflash_init.h" + +extern test_option nflash_options[LastOption]; + +nflash_id_stats tc58v64aft = +{ + 0x98e6, + 528, + 16384, + 16 +}; + +nflash_id_stats tc58v128aft = +{ + 0x9873, + 528, + 32768, + 32 +}; + +nflash_id_stats *nflash_id_stat_list[] = +{ + &tc58v64aft, + &tc58v128aft, + NULL +}; + +void nflash_init() +{ + int dev_id = 0; + int dev_found = 0; + nflash_id_stats *nflash_dev_ptr = NULL; + + volatile immap_t *immr = (immap_t *)CFG_IMMR; + /* Set SIEL to enable edge-triggered interrupt on IRQ3 */ + immr->im_siu_conf.sc_siel &= ~(0x02000000); + + /* reset the device in case it was in the middle of something */ + reset_nflash( 0 ); + /* get the device ID, and use it to determine device statistics */ + dev_id = get_id_nflash( 0 ); + for( nflash_dev_ptr = nflash_id_stat_list[0]; + nflash_dev_ptr != NULL; + nflash_dev_ptr++ ) + { + if (dev_id == nflash_dev_ptr->dev_id) + { + printf("Found device id %x in table.\n", dev_id); + dev_found = 1; + nflash_options[ID].init_value = nflash_dev_ptr->dev_id; + nflash_options[PageSize].init_value = nflash_dev_ptr->page_size; + nflash_options[Capacity].init_value = + nflash_dev_ptr->capacity_in_pages; + nflash_options[PagesPerBlock].init_value = + nflash_dev_ptr->pages_per_block; + break; + } + } + if (dev_found == 0) + { + printf("Device ID %x not found, using default values..\n", dev_id); + nflash_options[ID].init_value = dev_id; + nflash_options[PageSize].init_value = tc58v64aft.page_size; + nflash_options[Capacity].init_value = tc58v64aft.capacity_in_pages; + nflash_options[PagesPerBlock].init_value = tc58v64aft.pages_per_block; + } +} + diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/nflash/nflash_init.h ppc_diag/nflash/nflash_init.h --- ppc_diag-1.0.2/nflash/nflash_init.h Wed Dec 31 16:00:00 1969 +++ ppc_diag/nflash/nflash_init.h Thu May 1 11:31:26 2003 @@ -0,0 +1,20 @@ +/* nflash_init.h + * declaration for NAND flash init routine nflash_init() + */ + +#ifndef __NFLASH_INIT_H__ +#define __NFLASH_INIT_H__ + +#include "diags.h" + +typedef struct nand_id_stat_list { + unsigned int dev_id; + unsigned int page_size; + unsigned int capacity_in_pages; + int pages_per_block; +} nflash_id_stats; + +void nflash_init( void ); + +#endif /* __NFLASH_INIT_H__ */ + diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/nflash/nflash_menu.c ppc_diag/nflash/nflash_menu.c --- ppc_diag-1.0.2/nflash/nflash_menu.c Wed Dec 31 16:00:00 1969 +++ ppc_diag/nflash/nflash_menu.c Fri May 9 18:36:15 2003 @@ -0,0 +1,82 @@ +/* + * (C) Copyright 2003 + * Ron Lockwood-Childs, VCT Labs, rchilds@vctlabs.com. + * + * See file CREDITS for the list of contributors to this project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +/* nflash_menu.c + * submenu package definition + */ + +#include "diags.h" +#include "nflash_init.h" +#include "nflash_test.h" +#include "nflash_err.h" +#include "nflash_menu.h" + +extern void empty_function(); + +test_submenu nflash_submenus[LastTest] = +{ + { "Reset NAND Flash", "(Test reset command)", + nand_reset, MINOR, BASIC_TEST }, + /* ^^^^^ basic tests above this line ^^^^^ */ + /* vvvvv custom tests below this line vvvvv */ + { "Check For Bad Blocks", "(Write/Read/Erase -- destructive!)", + nand_bad_blocks, MINOR, CUSTOM_TEST }, + { "Erase Blocks", "(destructive!)", + nand_erase_blocks, MINOR, CUSTOM_TEST }, + { "Write Test Ptn 1", "(Write 0x55 to all bytes in block)", + nand_block_write_cb_patna, MINOR, CUSTOM_TEST }, + { "Write Test Ptn 2", "(Write 0xAA to all bytes in block)", + nand_block_write_cb_patnb, MINOR, CUSTOM_TEST }, + { "Get NAND Flash ID", "(Get NAND maker & device codes)", + nand_id, MINOR, CUSTOM_TEST }, + { "Dump NAND Flash Page", "(View a particular NAND flash page)", + nand_dump_page, MINOR, CUSTOM_TEST }, + { "Verify Erase/New Device", "(Make sure all bits are 1)", + nand_verify_erase, MINOR, CUSTOM_TEST } +}; + +test_option nflash_options[LastOption] = +{ + { "Debug level", 0, "(0=none, !0=print debug statements)" }, + { "Page size", 0, "(NAND flash's page size in bytes)" }, + { "Pages per block", 0, "(Number of pages in a flash block)" }, + { "Capacity", 0, "(NAND storage size, in # pages)" }, + { "NAND device ID", 0, "(2-byte device identifier)" }, + { "Page number", 0, "(Page to dump [0 - Capacity])" }, + { "Block number", 0x0, "(flash block [0xffffffff: all])" }, + { "Mem copy start", 0x00300000, "(Temp storage for verify erase)" }, +}; + +test_submenu_package nflash_package = +{ + "NAND Flash", + "(Test NAND Flash)", + EnableSubmenu, + LastTest, /* total number of tests */ + LastOption, /* total number of options */ + nflash_init, /* no init function */ + nflash_submenus, /* pointer to array of test_submenus */ + nflash_options, /* pointer to array of test_options */ + nflash_err, /* pretty-print errors function */ + empty_function /* no clean-up routine necessary */ +}; + diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/nflash/nflash_menu.h ppc_diag/nflash/nflash_menu.h --- ppc_diag-1.0.2/nflash/nflash_menu.h Wed Dec 31 16:00:00 1969 +++ ppc_diag/nflash/nflash_menu.h Thu May 1 11:31:26 2003 @@ -0,0 +1,43 @@ +/* + * (C) Copyright 2003 + * Ron Lockwood-Childs, VCT Labs, rchilds@vctlabs.com. + * + * See file CREDITS for the list of contributors to this project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +/* nflash_menu.h + * types and constants meant for the reg test menu + */ + +#ifndef __NFLASH_MENU_H__ +#define __NFLASH_MENU_H__ + +typedef enum +{ + ResetTest, BBlockTest, EraseBlock, WritePatnA, WritePatnB, IDTest, + DumpPage, DumpAll, LastTest +} nflash_test_names; + +typedef enum +{ + Debug, PageSize, PagesPerBlock, Capacity, ID, PageNo, BlockNo, MemCopyBase, + LastOption +} nflash_option_names; + +#endif /* __NFLASH_MENU_H__ */ + diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/nflash/nflash_test.c ppc_diag/nflash/nflash_test.c --- ppc_diag-1.0.2/nflash/nflash_test.c Wed Dec 31 16:00:00 1969 +++ ppc_diag/nflash/nflash_test.c Fri May 2 11:16:50 2003 @@ -0,0 +1,309 @@ +/* + * (C) Copyright 2003 + * Ron Lockwood-Childs, VCT Labs, rchilds@vctlabs.com. + * + * See file CREDITS for the list of contributors to this project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +/* nflash_test.c + * NAND flash test suite + */ + +#include "diags.h" +#include "printf.h" +#include "nandf.h" +#include "nandf_ops.h" +#include "nflash_menu.h" +#include "nflash_test.h" + +int nand_reset( test_option *t_opts, unsigned int *results ) +{ + int debug = t_opts[Debug].init_value; + + results[0] = ResetTest; + if (reset_nflash( debug ) != 0) + return 1; + return 0; +} + +int nand_id( test_option *t_opts, unsigned int *results ) +{ + int debug = t_opts[Debug].init_value; + + printf(" %x", get_id_nflash( debug )); + return 0; +} + +int nand_verify_erase( test_option *t_opts, unsigned int *results ) +{ + unsigned int page_size = t_opts[PageSize].init_value; + unsigned int capacity = t_opts[Capacity].init_value; + int debug = t_opts[Debug].init_value; + + verify_erase_nflash( capacity, page_size, results, debug ); + return 0; +} + +int nand_bad_blocks( test_option *t_opts, unsigned int *results ) +{ + int block_no = t_opts[BlockNo].init_value; + int capacity = t_opts[Capacity].init_value; + unsigned int page_size = t_opts[PageSize].init_value; + int pgs_per_block = t_opts[PagesPerBlock].init_value; + int debug = t_opts[Debug].init_value; + int n_block, start_block, end_block; + int n_page; + int failed = 0; + + if (block_no == 0xffffffff) + { + start_block = 0; + end_block = (capacity / pgs_per_block) - 1; + } + else + { + start_block = block_no; + end_block = block_no; + } + if (debug) + { + printf("Testing blocks %d to %d.", start_block, end_block); + printf(" Page size: %d bytes, pages/block: %d\n", page_size, + pgs_per_block); + } + /* make space for still-alive indicator */ + if ((debug == 0) && (end_block > start_block)) + printf(" "); + for (n_block = start_block; n_block <= end_block; n_block++) + { + if (debug) + printf("Checkerboard, part 1, testing block %d..\n", n_block); + if ((debug == 0) && ((n_block % 8) == 0)) + still_alive(); + failed = 0; + for (n_page = (n_block * pgs_per_block); + n_page < ((n_block + 1) * pgs_per_block); + n_page++) + { + if (debug > 1) + printf("Testing page %d, in block %d..\n", n_page, n_block); + if (test_cb_pattern( n_page, page_size, CheckerBoardA, results, + debug )) + { + printf("Failed cb test part 1, page %d, in block %d.\n", + n_page, n_block); + failed = 1; + break; + } + } + if (failed != 0) + continue; /* skip to the next block */ + if (debug) + printf("Erase testing block %d..\n", n_block); + if (erase_block_nflash( n_block, pgs_per_block, capacity, page_size, + results, debug )) + { + printf("Failed to erase cb pattern 1 in block %d.\n", + n_block); + failed = 1; + } + if (failed != 0) + continue; /* skip to the next block */ + for (n_page = (n_block * pgs_per_block); + n_page < ((n_block + 1) * pgs_per_block); + n_page++) + { + if (debug > 1) + printf("Testing page %d, in block %d..\n", n_page, n_block); + if (test_cb_pattern( n_page, page_size, CheckerBoardB, results, + debug )) + { + printf("Failed cb test part 2, page %d, in block %d.\n", + n_page, n_block); + failed = 1; + break; + } + } + if (failed != 0) + continue; /* skip to the next block */ + if (erase_block_nflash( n_block, pgs_per_block, capacity, page_size, + results, debug )) + { + printf("Failed to erase cb pattern 2 in block %d.\n", + n_block); + } + } + if (debug == 0) /* write over still-alive indication */ + printf("\b"); + return 0; +} + +int nand_erase_blocks( test_option *t_opts, unsigned int *results ) +{ + int block_no = t_opts[BlockNo].init_value; + int capacity = t_opts[Capacity].init_value; + int page_size = t_opts[PageSize].init_value; + int pgs_per_block = t_opts[PagesPerBlock].init_value; + int debug = t_opts[Debug].init_value; + int n_block, start_block, end_block; + int failed = 0; + + results[0] = EraseBlock; + if (block_no == 0xffffffff) + { + start_block = 0; + end_block = (capacity / pgs_per_block) - 1; + } + else + { + start_block = block_no; + end_block = block_no; + } + /* make space for still-alive indicator */ + if ((debug == 0) && (end_block > start_block)) + printf(" "); + for (n_block = start_block; n_block <= end_block; n_block++) + { + if (debug > 1) + printf("Erasing block %d..\n", n_block); + if (debug == 0) + if ((end_block > start_block) && ((n_block % 16) == 0)) + still_alive(); + if (erase_block_nflash( n_block, pgs_per_block, capacity, page_size, + results, debug )) + { + failed = 1; + break; + } + } + if ((debug == 0) && (end_block > start_block)) + printf("\b"); + return failed; +} + +int nand_block_write_cb_patna( test_option *t_opts, unsigned int *results ) +{ + int page_size = t_opts[PageSize].init_value; + int capacity = t_opts[Capacity].init_value; + int pgs_per_block = t_opts[PagesPerBlock].init_value; + int block_no = t_opts[BlockNo].init_value; + int debug = t_opts[Debug].init_value; + int n_page; + int n_block, start_block, end_block; + int failed = 0; + + results[0] = WritePatnA; + if (block_no == 0xffffffff) + { + start_block = 0; + end_block = (capacity / pgs_per_block); + } + else + { + start_block = block_no; + end_block = block_no; + } + /* make space for still-alive indicator */ + if ((debug == 0) && (end_block > start_block)) + printf(" "); + for (n_block = start_block; n_block <= end_block; n_block++) + { + if (debug == 0) + if ((end_block > start_block) && ((n_block % 16) == 0)) + still_alive(); + for (n_page = (n_block * pgs_per_block); + n_page < ((n_block+1) * pgs_per_block); n_page++) + { + if (test_cb_pattern( n_page, page_size, CheckerBoardA, results, + debug )) + { + if (results[2] == 0xffffffff) + results[3] = n_block; + failed = 1; + goto cb_patna_done; + } + } + } +cb_patna_done: + if ((debug == 0) && (end_block > start_block)) + printf("\b"); + return failed; +} + +int nand_block_write_cb_patnb( test_option *t_opts, unsigned int *results ) +{ + int page_size = t_opts[PageSize].init_value; + int capacity = t_opts[Capacity].init_value; + int pgs_per_block = t_opts[PagesPerBlock].init_value; + int block_no = t_opts[BlockNo].init_value; + int debug = t_opts[Debug].init_value; + int n_page; + int n_block, start_block, end_block; + int failed = 0; + + results[0] = WritePatnB; + if (block_no == 0xffffffff) + { + start_block = 0; + end_block = (capacity / pgs_per_block); + } + else + { + start_block = block_no; + end_block = block_no; + } + /* make space for still-alive indicator */ + if ((debug == 0) && (end_block > start_block)) + printf(" "); + for (n_block = start_block; n_block <= end_block; n_block++) + { + if (debug == 0) + if ((end_block > start_block) && ((n_block % 16) == 0)) + still_alive(); + for (n_page = (n_block * pgs_per_block); + n_page < ((n_block+1) * pgs_per_block); n_page++) + { + if (test_cb_pattern( n_page, page_size, CheckerBoardB, results, + debug )) + { + if (results[2] == 0xffffffff) + results[3] = n_block; + failed = 1; + goto cb_patnb_done; + } + } + } +cb_patnb_done: + if ((debug == 0) && (end_block > start_block)) + printf("\b"); + return failed; +} + +int nand_dump_page( test_option *t_opts, unsigned int *results ) +{ + unsigned int mem_base = t_opts[MemCopyBase].init_value; + int page_no = t_opts[PageNo].init_value; + unsigned int page_size = t_opts[PageSize].init_value; + int debug = t_opts[Debug].init_value; + + printf("Dump of NAND flash page %d..\n", page_no); + dump_page_nflash( mem_base, page_no, page_size, debug ); + printf("Completed dump of NAND flash page %d.\n", page_no); + return 0; +} + diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/nflash/nflash_test.h ppc_diag/nflash/nflash_test.h --- ppc_diag-1.0.2/nflash/nflash_test.h Wed Dec 31 16:00:00 1969 +++ ppc_diag/nflash/nflash_test.h Thu May 1 11:31:27 2003 @@ -0,0 +1,37 @@ +/* + * (C) Copyright 2003 + * Ron Lockwood-Childs, VCT Labs, rchilds@vctlabs.com. + * + * See file CREDITS for the list of contributors to this project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +/* nflash_test.h + * declarations for the NAND flash test functions + */ + +#include "diags.h" + +int nand_reset( test_option *t_opts, unsigned int *results ); +int nand_id( test_option *t_opts, unsigned int *results ); +int nand_verify_erase( test_option *t_opts, unsigned int *results ); +int nand_bad_blocks( test_option *t_opts, unsigned int *results ); +int nand_erase_blocks( test_option *t_opts, unsigned int *results ); +int nand_block_write_cb_patna( test_option *t_opts, unsigned int *results ); +int nand_block_write_cb_patnb( test_option *t_opts, unsigned int *results ); +int nand_dump_page( test_option *t_opts, unsigned int *results ); + diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/nvram/.cvsignore ppc_diag/nvram/.cvsignore --- ppc_diag-1.0.2/nvram/.cvsignore Fri Jan 3 10:40:06 2003 +++ ppc_diag/nvram/.cvsignore Thu May 1 11:31:27 2003 @@ -1 +1 @@ -Makefile .depend .*.swp *.out +Makefile .depend .*.swp *.out *.dmp diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/nvram/.depend ppc_diag/nvram/.depend --- ppc_diag-1.0.2/nvram/.depend Wed Dec 31 16:00:00 1969 +++ ppc_diag/nvram/.depend Mon May 12 14:51:53 2003 @@ -0,0 +1,19 @@ +nvram.o: nvram.c \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + /home/speedy1/build/ppc_diag/includes/printf.h \ + /home/speedy1/build/ppc_diag/includes/mem_test.h \ + nvram_menu.h \ + nvram.h +nvram_err.o: nvram_err.c \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + /home/speedy1/build/ppc_diag/includes/printf.h \ + /home/speedy1/build/ppc_diag/includes/mem_test.h \ + nvram_menu.h \ + nvram.h \ + nvram_err.h +nvram_menu.o: nvram_menu.c \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + /home/speedy1/build/ppc_diag/includes/mem_test.h \ + nvram.h \ + nvram_err.h \ + nvram_menu.h diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/redbox/.cvsignore ppc_diag/redbox/.cvsignore --- ppc_diag-1.0.2/redbox/.cvsignore Wed Dec 31 16:00:00 1969 +++ ppc_diag/redbox/.cvsignore Thu May 1 11:31:27 2003 @@ -0,0 +1 @@ +Makefile .depend .*.swp *.out *.dmp diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/redbox/.depend ppc_diag/redbox/.depend --- ppc_diag-1.0.2/redbox/.depend Wed Dec 31 16:00:00 1969 +++ ppc_diag/redbox/.depend Mon May 12 14:51:54 2003 @@ -0,0 +1,22 @@ +redbox_test.o: redbox_test.c \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + /home/speedy1/build/ppc_diag/includes/ppcboot.h \ + /home/speedy1/build/ppc_diag/includes/prandm.h \ + /home/speedy1/build/ppc_diag/includes/gb_dpram_test.h \ + /home/speedy1/build/ppc_diag/includes/gb_xilinx_test.h \ + redbox_menu.h \ + redbox_test.h +redbox_menu.o: redbox_menu.c \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + /home/speedy1/build/ppc_diag/includes/mem_test.h \ + redbox_test.h \ + redbox_err.h \ + redbox_menu.h +redbox_err.o: redbox_err.c \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + /home/speedy1/build/ppc_diag/includes/printf.h \ + redbox_menu.h \ + redbox_err.h \ + redbox_test.h +xmit_buf.o: xmit_buf.c \ + /home/speedy1/build/ppc_diag/includes/diags.h diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/redbox/Makefile ppc_diag/redbox/Makefile --- ppc_diag-1.0.2/redbox/Makefile Wed Dec 31 16:00:00 1969 +++ ppc_diag/redbox/Makefile Fri Jan 31 12:45:34 2003 @@ -0,0 +1,65 @@ +# +# (C) Copyright 2002 +# Ron Lockwood-Childs, VCT Labs, rchilds@vctlabs.com. +# +# See file CREDITS for the list of contributors to this project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +MODULENAME = $(shell env ruby -e "puts File.basename Dir.getwd" ) + +ifeq ($(MODULENAME).list,$(wildcard $(MODULENAME).list)) +include $(MODULENAME).list +endif + +ifneq (.depend,$(wildcard .depend)) +DOTHIS = depend +else +include .depend +endif + +all: $(DOTHIS) compile + +O = $(subst ",,$(OBJECTS)) +compile: $(O) + +depend: + echo $(HPATH) + eval SRCC='$(C_SOURCES)' ; \ + eval SRCA='$(AS_SOURCES)' ; \ + $(MKDEP) -- $$SRCC $$SRCA > .depend + +hfiles: + ruby -e 'Dir.chdir "$(INCLUDES)"; hs = $(HEADERS); \ + mn = "$(MODULENAME)"; \ + if hs.length > 0 then hs.split.each { |hf| \ + system "ln", "-s", "../#{mn.to_s}/#{hf.to_s}" } end' + +prep_output: + ruby -e 'ss = $(C_SOURCES); if ss.length > 0 then ss.split.each { |sf| \ + system "/usr/bin/cpp", "-P", "-I$(INCLUDES)", "-I$(PPCBOOT_INCLUDES)", \ + "#{sf}", "#{sf}pp"; \ + system %Q{/bin/grep "[^ \n\t]" #{sf}pp > #{sf}pp.out}; \ + system "rm", "-f", "#{sf}pp"; } end' + +clean: + rm -f *.o + +distclean: + rm -f .depend + +.PHONY: depend compile hfiles clean distclean prep_output diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/redbox/redbox.list ppc_diag/redbox/redbox.list --- ppc_diag-1.0.2/redbox/redbox.list Wed Dec 31 16:00:00 1969 +++ ppc_diag/redbox/redbox.list Fri May 9 18:44:40 2003 @@ -0,0 +1,11 @@ +# list of redbox test files + +HEADERS="redbox_test.h redbox_menu.h redbox_err.h" + +AS_SOURCES= + +C_SOURCES="redbox_test.c redbox_menu.c redbox_err.c xmit_buf.c" + +OBJECTS="redbox_test.o redbox_menu.o redbox_err.o xmit_buf.o" + +export HEADERS AS_SOURCES C_SOURCES OBJECTS diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/redbox/redbox_err.c ppc_diag/redbox/redbox_err.c --- ppc_diag-1.0.2/redbox/redbox_err.c Wed Dec 31 16:00:00 1969 +++ ppc_diag/redbox/redbox_err.c Fri May 9 18:40:02 2003 @@ -0,0 +1,80 @@ +/* + * (C) Copyright 2003 + * Ron Lockwood-Childs, VCT Labs, rchilds@vctlabs.com. + * + * See file CREDITS for the list of contributors to this project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +/* redbox_err.c + * pretty-printer for red box error messages + */ + +#include "diags.h" +#include "printf.h" +#include "redbox_menu.h" +#include "redbox_err.h" +#include "redbox_test.h" + +unsigned int redbox_err( unsigned int *results, unsigned int loopnum ) +{ + int line_num = 0; + + printf("ERROR: In Red Box Menu -> "); + switch (results[0]) + { + case RedBoxXmit: + printf("Transmit Test "); + break; + default: + printf("Unknown Red Box test %d ", results[0]); + } + if (loopnum > 0) + printf("(Loop %d)", loopnum); + printf("\n"); + ++line_num; + if (results[0] == RedBoxXmit) + { + switch (results[1]) + { + case 0: + printf("Failed to transmit test buffer.\n"); + ++line_num; + break; + case 1: + printf("Failed to receive test buffer.\n"); + ++line_num; + break; + case 2: + printf("Comparison failure in xmit word %s%08x%s,", + VT100_FAULT_SEQ, results[2], VT100_END_SEQ); + printf(" recv word %s%08x%s:\n", + VT100_FAULT_SEQ, results[3], VT100_END_SEQ); + ++line_num; + printf("\tExpected %s%08x%s, read %s%08x%s\n", + VT100_FAULT_SEQ, results[4], VT100_END_SEQ, + VT100_FAULT_SEQ, results[5], VT100_END_SEQ); + ++line_num; + break; + default: + printf("Unknown error %d\n", results[1]); + ++line_num; + } + } + return line_num; +} + diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/redbox/redbox_err.h ppc_diag/redbox/redbox_err.h --- ppc_diag-1.0.2/redbox/redbox_err.h Wed Dec 31 16:00:00 1969 +++ ppc_diag/redbox/redbox_err.h Fri May 9 18:40:02 2003 @@ -0,0 +1,28 @@ +/* + * (C) Copyright 2003 + * Ron Lockwood-Childs, VCT Labs, rchilds@vctlabs.com. + * + * See file CREDITS for the list of contributors to this project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +/* redbox_err.h + * declaration for the redbox_err() routine + */ + +unsigned int redbox_err( unsigned int *results, unsigned int loopnum ); + diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/redbox/redbox_menu.c ppc_diag/redbox/redbox_menu.c --- ppc_diag-1.0.2/redbox/redbox_menu.c Wed Dec 31 16:00:00 1969 +++ ppc_diag/redbox/redbox_menu.c Fri May 9 18:41:41 2003 @@ -0,0 +1,74 @@ +/* + * (C) Copyright 2003 + * Ron Lockwood-Childs, VCT Labs, rchilds@vctlabs.com. + * + * See file CREDITS for the list of contributors to this project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +/* redbox_menu.c + * submenu package definition + */ + +#include "diags.h" +#include "mem_test.h" +#include "redbox_test.h" +#include "redbox_err.h" +#include "redbox_menu.h" + +#ifdef ENABLE_RED_BOX_SUPPORT + +extern void empty_function(); + +test_submenu redbox_submenus[LastTest] = +{ + { "Transmit Test", "(Test UFE data reception)", redbox_xmit_test, + SEVERE, (BASIC_TEST | BURN_IN_TEST) }, + /* ^^^^^ basic tests above this line ^^^^^ */ + /* vvvvv custom tests below this line vvvvv */ + { "Bank Address Conflicts", "(Check for bank addressing errors)", + multibank_read, + MINOR, CUSTOM_TEST }, +}; + +test_option redbox_options[LastOption] = +{ + { "Debug level", 0, "(0=none, !0=print debug statements)" }, + { "1st buffer base address", DMA_BUFFER_ADDR, "(xmit buf 0 goes here)" }, + { "Buffer size", 0x2000, "(number of bytes in xmit buffer)" }, + { "Xmit pattern", PRandom, "(0=0s,1=Fs,2=As,3=5s,4=prand,5=user)" }, + { "User pattern", 0x1234, "(instead of simple patterns)" }, + { "Test time", 10, "(number of secs to xmit data)" }, +}; + +test_submenu_package redbox_package = +{ + "Red Box", + "(Test HDB-10 transmission)", + EnableSubmenu, + LastTest, /* total number of tests */ + LastOption, /* total number of options */ + empty_function, /* no init function */ + redbox_submenus,/* pointer to array of test_submenus */ + redbox_options, /* pointer to array of test_options */ +// redbox_err, /* pretty-print errors function */ + empty_function, /* pretty-print errors function */ + empty_function /* no clean-up routine necessary */ +}; + +#endif + diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/redbox/redbox_menu.h ppc_diag/redbox/redbox_menu.h --- ppc_diag-1.0.2/redbox/redbox_menu.h Wed Dec 31 16:00:00 1969 +++ ppc_diag/redbox/redbox_menu.h Fri May 9 18:41:41 2003 @@ -0,0 +1,37 @@ +/* + * (C) Copyright 2003 + * Ron Lockwood-Childs, VCT Labs, rchilds@vctlabs.com. + * + * See file CREDITS for the list of contributors to this project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +/* redbox_menu.h + * types and constants meant for the red box test menu + */ + +typedef enum +{ + RedBoxXmit, BankAddrConflict, LastTest +} redbox_test_names; + +typedef enum +{ + Debug, FirstBufferBase, BufferSize, XmitPattern, UserPattern, TestTime, + LastOption +} redbox_option_names; + diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/redbox/redbox_test.c ppc_diag/redbox/redbox_test.c --- ppc_diag-1.0.2/redbox/redbox_test.c Wed Dec 31 16:00:00 1969 +++ ppc_diag/redbox/redbox_test.c Fri May 9 18:44:40 2003 @@ -0,0 +1,411 @@ +/* + * (C) Copyright 2003 + * Ron Lockwood-Childs, VCT Labs, rchilds@vctlabs.com. + * + * See file CREDITS for the list of contributors to this project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +/* redbox_test.c + * Various HDB-10 transmission tests for diagnosing the redbox + */ + +#include "diags.h" +#include "ppcboot.h" +#include "prandm.h" +#include "gb_dpram_test.h" +#include "gb_xilinx_test.h" +#include "redbox_menu.h" +#include "redbox_test.h" + +#ifdef ENABLE_RED_BOX_SUPPORT +extern volatile int xilinx_xmit_stalled; + +int xilinx_xmit_bank_number = -1; +int xmit_bank_number = -1; +int xmit_entry_counter = 0; +xmit_xilinx_buf_q_entry *xmit_buf_ready_q_head = NULL; +xmit_xilinx_buf_q_entry *xmit_buf_ready_q_tail = NULL; + +xmit_xilinx_buf_q_entry xilinx_xmit_buf_q_array[MAX_XMIT_QUEUE_LENGTH]; + +extern unsigned long *typical_xmit_buf; +extern unsigned long typical_xmit_buf_len; + +#define DBFN "append_xilinx_xmit_DMA_entry()" +void append_xilinx_xmit_DMA_entry( unsigned int buffer_base, int byte_count ) +{ + unsigned int dpram_address = GB_DPRAM_BASE_ADDR; + + if (xmit_buf_ready_q_head == NULL) + { /* need a new queue */ + xmit_buf_ready_q_head = &(xilinx_xmit_buf_q_array[0]); + xmit_buf_ready_q_tail = &(xilinx_xmit_buf_q_array[0]); + xmit_buf_ready_q_head->next = &(xilinx_xmit_buf_q_array[0]); + xmit_buf_ready_q_head->prev = &(xilinx_xmit_buf_q_array[0]); + } + else if (xmit_buf_ready_q_tail == xmit_buf_ready_q_head) + { /* only one item in the buffer */ + xmit_buf_ready_q_tail++; /* increment to next array element */ + /* array bounds checking */ + if (xmit_buf_ready_q_tail >= + &xilinx_xmit_buf_q_array[MAX_RECV_QUEUE_LENGTH]) + xmit_buf_ready_q_tail = &(xilinx_xmit_buf_q_array[0]); + xmit_buf_ready_q_head->next = xmit_buf_ready_q_tail; + xmit_buf_ready_q_head->prev = xmit_buf_ready_q_tail; + xmit_buf_ready_q_tail->next = xmit_buf_ready_q_head; + xmit_buf_ready_q_tail->prev = xmit_buf_ready_q_head; + } + else if (xmit_entry_counter >= MAX_XMIT_QUEUE_LENGTH) + { + printf("Out of buffers in %s! Aborting DMA xmit queue entry..\n", + DBFN); + return; + } + else + { + xmit_buf_ready_q_tail->next = + xmit_buf_ready_q_tail + 1; /* pointer arithmetic */ + /* array bounds checking */ + if (xmit_buf_ready_q_tail->next >= + &xilinx_xmit_buf_q_array[MAX_XMIT_QUEUE_LENGTH]) + xmit_buf_ready_q_tail->next = &(xilinx_xmit_buf_q_array[0]); + xmit_buf_ready_q_tail->next->prev = xmit_buf_ready_q_tail; + xmit_buf_ready_q_tail = xmit_buf_ready_q_tail->next; + xmit_buf_ready_q_tail->next = xmit_buf_ready_q_head; + xmit_buf_ready_q_head->prev = xmit_buf_ready_q_tail; + } + /* only need to know the byte count and buffer base address. + * The transmit interrupt will calculate the DPRAM base address */ + xmit_buf_ready_q_tail->sdram_base_address = buffer_base; + xmit_buf_ready_q_tail->byte_count = byte_count; + xmit_entry_counter++; + + /* check to see if the XILINX transmission has stalled */ + if (xilinx_xmit_stalled) + { + } +} +#undef DBFN + +void init_xmit_pattern( int bank, xmitpatn pattern, int word_count, + unsigned int userpatn ) +{ + unsigned long data = 0; + unsigned long *data_p = 0; + int i; + int count1s = 0, num1s = 0; + + switch (pattern) + { + case Zeroes: + num1s = 0; + break; + case Ones: + data = 0xffff; + num1s = 16; + break; + case OneZero: + case ZeroOne: + data = (pattern == OneZero) ? 0xaaaa : 0x5555; + num1s = 8; + break; + case PRandom: + num1s = 0; + sprand( 0 ); /* re-seed pseudo-random number generator */ + break; + case UserDef: + num1s = 0; + data = (userpatn & 0xffff); + for (count1s = 0; count1s < 16; count1s++) + { + if ((userpatn & (1 << count1s)) != 0) + num1s++; + } + if (num1s & 0x1) + data |= UFE_PARITY; + break; + case Typical: + data_p = (unsigned long*)&typical_xmit_buf; + break; + case OwnAddr: + data = 0xFFFFFFFC; + break; + default: + num1s = 0; + } + + select_lp_bank( bank ); + for (i = 0; i < word_count; i+=4) + { + if (pattern == PRandom) + { + num1s = 0; + data = (unsigned long)(prand() >> 16); + for (count1s = 0; count1s < 16; count1s++) + { + if ((data & (1 << count1s)) != 0) + num1s++; + } + if (num1s & 0x1) + data |= UFE_PARITY; + if ((data & 0x8000) == (data & 0x1)) + data |= UFE_SYNC; + } + else if (pattern == Typical) + { + data = *data_p; + data_p++; + num1s = 0; + for (count1s = 0; count1s < 16; count1s++) + { + if ((data & (1 << count1s)) != 0) + num1s++; + } + if (num1s & 0x1) + data |= UFE_PARITY; + } + else if (pattern == OwnAddr) + { + data += 4; + num1s = 0; + for (count1s = 0; count1s < 16; count1s++) + { + if ((data & (1 << count1s)) != 0) + num1s++; + } + if (num1s & 0x1) + data |= UFE_PARITY; + else + data &= ~(UFE_PARITY); + } + *(unsigned long*)(GB_DPRAM_BASE_ADDR + (bank * DPRAM_BANK_SIZE) + i) = + data; + } +} + +void UFE_transmit_test_setup( void ) +{ + unsigned long *xilinx_ctrl_reg = (unsigned long*)(XILINX_BASE_ADDR + + ControlReg); + + xilinx_xmit_bank_number = 0; + xmit_bank_number = -1; + xmit_buf_ready_q_head = NULL; + xmit_buf_ready_q_tail = NULL; + xmit_entry_counter = 0; + memset( (void*)xilinx_xmit_buf_q_array, 0, + sizeof( xmit_xilinx_buf_q_entry ) * + MAX_XMIT_QUEUE_LENGTH ); + /* init the interrupt generation bits in the XILINX ctrl register */ + *xilinx_ctrl_reg = (XIL_CNTRL_ENA_XMIT_INTR); +} + +int compare_rcv_to_xmit( int xmit_bank, int xmit_size, int recv_bank, + unsigned int *results ) +{ + unsigned int xmit_base_addr = GB_DPRAM_BASE_ADDR + + (DPRAM_BANK_SIZE * xmit_bank); + unsigned int recv1_base_addr = GB_DPRAM_BASE_ADDR + + (DPRAM_BANK_SIZE * recv_bank); + int i; + volatile unsigned long *recv_effective_addr_p = 0; + volatile unsigned long *xmit_effective_addr_p = 0; + int failed = 0; + + for (i = 0; i < xmit_size; i += 4) + { + recv_effective_addr_p = (unsigned long*)(recv1_base_addr + i); + xmit_effective_addr_p = (unsigned long*)(xmit_base_addr + i); + if ((*xmit_effective_addr_p & 0x1FFFF) != + (*recv_effective_addr_p & 0x1FFFF)) + { + printf("Comparison failure in xmit word %p, recv word %p:\n", + xmit_effective_addr_p, recv_effective_addr_p); + printf("\tExpected %08lx, read %08lx\n", + *xmit_effective_addr_p, + *recv_effective_addr_p); + results[2] = (unsigned long)xmit_effective_addr_p; + results[3] = (unsigned long)recv_effective_addr_p; + results[4] = *xmit_effective_addr_p; + results[5] = *recv_effective_addr_p; + failed = 1; + break; + } + } + return failed; +} + +int redbox_xmit_test( test_option *t_opts, unsigned int *results ) +{ + unsigned long *xilinx_ctrl_reg = (unsigned long*)(XILINX_BASE_ADDR + + ControlReg); + unsigned long *xilinx_xmit_size_reg = + (unsigned long*)(XILINX_BASE_ADDR + (XmitBuffSize*4)); + unsigned long *xilinx_xmit_base_reg = (unsigned long*)(XILINX_BASE_ADDR + + (XmitBuffBase*4)); + unsigned long *xilinx_status_reg = (unsigned long*)(XILINX_BASE_ADDR + + (StatusReg*4)); + unsigned long *xilinx_recv1_reg = (unsigned long*)(XILINX_BASE_ADDR + (RecvBuff1Base*4)); + unsigned long *xilinx_recv2_reg = (unsigned long*)(XILINX_BASE_ADDR + (RecvBuff2Base*4)); + unsigned long *xilinx_recv_size_reg = (unsigned long*)(XILINX_BASE_ADDR + (RecvBuffSize*4)); + int debug = t_opts[Debug].init_value; + int xmit_size = t_opts[BufferSize].init_value; + xmitpatn pattern = t_opts[XmitPattern].init_value; + unsigned int user_pattern = t_opts[UserPattern].init_value; + int delay_in_ms = 100; + int test_result = 0; + + results[0] = RedBoxXmit; + /* initialize xilinx transmit registers, flags, queues, and buffers */ + UFE_transmit_test_setup(); + /* use given buffer size for pre-defined data */ + if (pattern == Typical) + { + xmit_size = typical_xmit_buf_len * 4; + printf("\nLoading Summa data set, size = %d longwords.\n", + (xmit_size / 4)); + } + /* initialize DPRAM bank with transmit data */ + init_xmit_pattern( 2, pattern, xmit_size, user_pattern ); + /* set up RBUFF 1 and RBUFF 2 base addresses */ + *xilinx_recv1_reg = 0; + *xilinx_recv2_reg = (DPRAM_BANK_SIZE >> 2); + *xilinx_recv_size_reg = xmit_size >> 2; + if (debug) + { + printf("\nr1 %08lx size %08lx\n",*xilinx_recv1_reg, + *xilinx_recv_size_reg); + } + if (debug) + { + printf("ctrl reg: %08lx\n", *xilinx_ctrl_reg); + } + /* init the interrupt generation bits in the XILINX ctrl register */ + *xilinx_ctrl_reg |= XIL_CNTRL_ENA_RBUFF1_INTR; + *xilinx_ctrl_reg |= XIL_CNTRL_ENA_RECV; + /* init the xmit buffer size register in the XILINX */ + *xilinx_xmit_size_reg = (xmit_size) >> 2; + *xilinx_xmit_base_reg = ((DPRAM_BANK_SIZE * 2) >> 2); /* xmit from bank 2 */ + if (debug) + { + printf("x %08lx size %08lx\n",*xilinx_xmit_base_reg, + *xilinx_xmit_size_reg); + } + __asm__ ("eieio"); + /* kick off buffer xmit */ + *xilinx_ctrl_reg |= XIL_CNTRL_ENA_XMIT_NOW; + if (debug) + { + printf("recv & xmit enabled in ctrl reg: %08lx\n", *xilinx_ctrl_reg); + } + /* wait for xmit interrupt */ + for (delay_in_ms = 100; delay_in_ms > 0; delay_in_ms--) + { + msdelay( 100 ); + if (*xilinx_status_reg & (XIL_STAT_INT_XBUFF_DONE)) + break; + } + if (delay_in_ms <= 0) + { + printf("Failed to transmit test buffer.\n"); + results[1] = 0; + test_result = 1; + } + else + { + if (debug) + printf("Status register: %08lx\n", *xilinx_status_reg); + for (delay_in_ms = 100; delay_in_ms > 0; delay_in_ms--) + { + msdelay( 100 ); + if (*xilinx_status_reg & XIL_STAT_INT_RBUFF1_DONE) + break; + } + /* clean up */ + UFE_test_cleanup(); + if (delay_in_ms <= 0) + { + printf("Failed to receive test buffer.\n"); + printf("Status register: %08lx\n", *xilinx_status_reg); + results[1] = 1; + test_result = 1; + } + else + { + if (compare_rcv_to_xmit( 2, xmit_size, 0, results ) != 0) + { + results[1] = 2; + test_result = 1; + } + } + } + return test_result; +} + +int multibank_read( test_option *t_opts, unsigned int *results ) +{ + int bank_pattern = t_opts[XmitPattern].init_value; + int repeats = t_opts[UserPattern].init_value; + int i, j, banks = 0; + unsigned int bank_addrs[16], bank_data[16]; + + memset( (void*)bank_addrs, 0, sizeof( bank_addrs ) ); + for (i = 0; i < 16; i++) + { + if (bank_pattern & (1 << i)) + { + bank_addrs[banks] = GB_DPRAM_BASE_ADDR + (i * DPRAM_BANK_SIZE); + banks++; + } + } + printf("\n"); + for (i = 0; i < repeats; i++) + { + bank_data[0] = *(unsigned long*)bank_addrs[0]; + bank_data[1] = *(unsigned long*)bank_addrs[1]; + bank_data[2] = *(unsigned long*)bank_addrs[2]; + bank_data[3] = *(unsigned long*)bank_addrs[3]; + bank_data[4] = *(unsigned long*)bank_addrs[4]; + bank_data[5] = *(unsigned long*)bank_addrs[5]; + bank_data[6] = *(unsigned long*)bank_addrs[6]; + bank_data[7] = *(unsigned long*)bank_addrs[7]; + bank_data[8] = *(unsigned long*)bank_addrs[8]; + bank_data[9] = *(unsigned long*)bank_addrs[9]; + bank_data[10] = *(unsigned long*)bank_addrs[10]; + bank_data[11] = *(unsigned long*)bank_addrs[11]; + bank_data[12] = *(unsigned long*)bank_addrs[12]; + bank_data[13] = *(unsigned long*)bank_addrs[13]; + bank_data[14] = *(unsigned long*)bank_addrs[14]; + bank_data[15] = *(unsigned long*)bank_addrs[15]; + printf("%02d) ", i); + for (j = 0; j < banks; j+=2) + { + if (j > 0) + printf(" "); + printf("%08x: %08x\t%08x: %08x\n", + bank_addrs[j], bank_data[j], + bank_addrs[j+1], bank_data[j+1]); + } + for (j = 0; j < 16; j++) + bank_addrs[j] += 4; + } + return 0; +} + +#endif + diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/redbox/redbox_test.h ppc_diag/redbox/redbox_test.h --- ppc_diag-1.0.2/redbox/redbox_test.h Wed Dec 31 16:00:00 1969 +++ ppc_diag/redbox/redbox_test.h Fri May 9 18:44:40 2003 @@ -0,0 +1,31 @@ +/* + * (C) Copyright 2003 + * Ron Lockwood-Childs, VCT Labs, rchilds@vctlabs.com. + * + * See file CREDITS for the list of contributors to this project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +typedef enum +{ + Zeroes, Ones, OneZero, ZeroOne, PRandom, UserDef, Typical, OwnAddr, + LastPattern +} xmitpatn; + +int redbox_xmit_test( test_option *t_opts, unsigned int *results ); +int multibank_read( test_option *t_opts, unsigned int *results ); + diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/redbox/xmit_buf.c ppc_diag/redbox/xmit_buf.c --- ppc_diag-1.0.2/redbox/xmit_buf.c Wed Dec 31 16:00:00 1969 +++ ppc_diag/redbox/xmit_buf.c Mon May 12 14:12:45 2003 @@ -0,0 +1,1011 @@ +/* xmit_buf.c + * Summa-developed message buffer for transmission + */ + +#include "diags.h" + +#ifdef ENABLE_RED_BOX_SUPPORT + +#define SUMMA_HEADER_WORDS 3970 + +unsigned long typical_xmit_buf[SUMMA_HEADER_WORDS] = +{ + 0x00085f78, 0x0000444f, 0x00003045, 0x00003332, + 0x0000aa25, 0x00001498, 0x00000001, 0x0000004f, + 0x00004140, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x000010a2, 0x0000e200, 0x00003000, + 0x00002f37, 0x00003530, 0x0000392f, 0x00003132, + 0x00003a33, 0x00003432, 0x0000343a, 0x00001c35, + 0x00004169, 0x00005850, 0x00003832, 0x00002036, + 0x00005953, 0x00005453, 0x00004d45, 0x00004220, + 0x00004955, 0x0000444c, 0x00005245, 0x0000202c, + 0x00003356, 0x0000322e, 0x00002020, 0x00002020, + 0x00002020, 0x00002020, 0x00002020, 0x00002020, + 0x00001e37, 0x00002df0, 0x00000020, 0x000007f7, + 0x000025f0, 0x00000020, 0x00000b20, 0x00000060, + 0x00000000, 0x000050fe, 0x0000000a, 0x000095b2, + 0x00000014, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00005740, 0x00002c20, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00009800, 0x0000000d, + 0x00000020, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x0000db00, 0x00006006, 0x00007001, 0x0000db01, + 0x00003006, 0x0000100b, 0x00002057, 0x0000002c, + 0x00000000, 0x00000000, 0x00000034, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000544, + 0x00002200, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x000006cb, 0x00000032, 0x00000042, + 0x000006cb, 0x00000b50, 0x000056e0, 0x00002c20, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00009800, + 0x0000000d, 0x00000002, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x0000db00, 0x00006006, 0x00007001, + 0x0000db01, 0x00000006, 0x0000b000, 0x00002056, + 0x0000002c, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00002200, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x000005b0, 0x000005a8, + 0x000005b8, 0x000005b0, 0x00000b70, 0x00005680, + 0x00002c20, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000022, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00009800, 0x00009005, + 0x0000a005, 0x00009805, 0x00009005, 0x0000500b, + 0x00002056, 0x0000002c, 0x00000000, 0x00000000, + 0x0000004c, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00002200, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x0000003f, + 0x00000046, 0x00000036, 0x0000003f, 0x00000bb0, + 0x00005620, 0x00002c20, 0x00000000, 0x00000000, + 0x00004c00, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000022, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00003f00, + 0x00004600, 0x00003600, 0x00003f00, 0x0000d000, + 0x0000f00b, 0x00002055, 0x0000002c, 0x00000000, + 0x00000000, 0x0000004c, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00002200, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x0000003f, 0x00000046, 0x00000036, 0x0000003f, + 0x00000bf0, 0x000055c0, 0x00002c20, 0x00000000, + 0x00000000, 0x00004c00, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000022, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00003f00, 0x00004600, 0x00003600, 0x00003f00, + 0x00001000, 0x0000900c, 0x00002055, 0x0000002c, + 0x00000000, 0x00000000, 0x0000004c, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00002200, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x0000003f, 0x00000036, 0x00000046, + 0x0000003f, 0x00000c30, 0x00005560, 0x00002c20, + 0x00000000, 0x00000000, 0x00004c00, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000022, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00003f00, 0x00004600, 0x00003600, + 0x00003f00, 0x00005000, 0x0000300c, 0x00002055, + 0x0000002c, 0x00000000, 0x00000000, 0x0000004c, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00002200, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x0000003f, 0x00000046, + 0x00000036, 0x0000003f, 0x00000c70, 0x00005500, + 0x00002c20, 0x00000000, 0x00000000, 0x00004c00, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000022, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00003f00, 0x00003600, + 0x00004600, 0x00003f00, 0x00009000, 0x0000d00c, + 0x00002054, 0x0000002c, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00002200, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x0000003f, + 0x00000044, 0x00000034, 0x0000003f, 0x00000cb0, + 0x000054a0, 0x00002c20, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000022, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00003f00, + 0x00004400, 0x00003400, 0x00003f00, 0x0000d000, + 0x0000700c, 0x00002054, 0x0000002c, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00002200, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x0000003f, 0x00000044, 0x00000034, 0x0000003f, + 0x00000cf0, 0x00005440, 0x00002c20, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000022, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00003f00, 0x00004400, 0x00003400, 0x00003f00, + 0x00001000, 0x0000100d, 0x00002054, 0x0000002c, + 0x00000000, 0x00000000, 0x0000004c, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00002200, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x0000003f, 0x00000046, 0x00000036, + 0x0000003f, 0x00000d30, 0x000053e0, 0x00002c20, + 0x00000000, 0x00000000, 0x00004c00, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00001000, + 0x00000000, 0x00000022, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00008200, 0x00007a07, 0x00008a07, + 0x00008207, 0x00005007, 0x0000b00d, 0x00002053, + 0x0000002c, 0x00000000, 0x00000000, 0x0000004c, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x0000094a, 0x00002200, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x0000076a, 0x00000762, + 0x00000772, 0x0000076a, 0x00000d70, 0x00005380, + 0x00002c20, 0x00000000, 0x00000000, 0x00004c00, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000022, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000b00, 0x00000208, + 0x00004608, 0x00000b00, 0x00009008, 0x0000500d, + 0x00002053, 0x0000002c, 0x00000000, 0x00000000, + 0x0000004c, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00002200, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x0000003f, + 0x00000036, 0x00000046, 0x0000003f, 0x00000db0, + 0x00005320, 0x00002c20, 0x00000000, 0x00000000, + 0x00004c00, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000022, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00003f00, + 0x00004600, 0x00003600, 0x00003f00, 0x0000d000, + 0x0000f00d, 0x00002052, 0x0000002c, 0x00000000, + 0x00000000, 0x0000004c, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00002200, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x0000003f, 0x00000036, 0x00000046, 0x0000003f, + 0x00000df0, 0x000052c0, 0x00002c20, 0x00000000, + 0x00000000, 0x00004c00, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000022, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00003f00, 0x00003600, 0x00004600, 0x00003f00, + 0x00001000, 0x0000900e, 0x00002052, 0x0000002c, + 0x00000000, 0x00000000, 0x0000004c, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00002200, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x0000003f, 0x00000046, 0x00000036, + 0x0000003f, 0x00000e30, 0x00005260, 0x00002c20, + 0x00000000, 0x00000000, 0x00004c00, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000022, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00003f00, 0x00004600, 0x00003600, + 0x00003f00, 0x00005000, 0x0000300e, 0x00002052, + 0x0000002c, 0x00000000, 0x00000000, 0x0000004c, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00002200, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x0000081b, 0x00000812, + 0x00000046, 0x0000081b, 0x00000e70, 0x00005200, + 0x00002c20, 0x00000000, 0x00000000, 0x00004c00, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00002800, 0x00000000, 0x00000022, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00003f00, 0x00003600, + 0x00004600, 0x00003f00, 0x00009000, 0x0000d00e, + 0x00002051, 0x0000002c, 0x00000000, 0x00000000, + 0x0000004c, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00002200, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x0000082b, + 0x00000822, 0x00000046, 0x0000082b, 0x00000eb0, + 0x000051a0, 0x00002c20, 0x00000000, 0x00000000, + 0x00004c00, 0x00000000, 0x00000000, 0x00000000, + 0x00005600, 0x00000000, 0x00000000, 0x00000022, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00004300, + 0x00003b08, 0x00004708, 0x00004300, 0x0000d008, + 0x0000700e, 0x00002051, 0x0000002c, 0x00000000, + 0x00000000, 0x0000004c, 0x00000000, 0x00000000, + 0x00000000, 0x00000056, 0x00000000, 0x00002200, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x0000003f, 0x00000037, 0x00000047, 0x0000003f, + 0x00000ef0, 0x00005140, 0x00002c20, 0x00000000, + 0x00000000, 0x00004c00, 0x00000000, 0x00000000, + 0x00000000, 0x00005600, 0x00000000, 0x00000000, + 0x00000022, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00003f00, 0x00003700, 0x00004700, 0x00003f00, + 0x00001000, 0x0000100f, 0x00002051, 0x0000002c, + 0x00000000, 0x00000000, 0x0000004c, 0x00000000, + 0x00000000, 0x00000000, 0x00000056, 0x00000000, + 0x00002200, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x0000003f, 0x00000037, 0x00000047, + 0x0000003f, 0x00000f30, 0x000050e0, 0x00002c20, + 0x00000000, 0x00000000, 0x00004c00, 0x00000000, + 0x00000000, 0x00000000, 0x00005600, 0x00000000, + 0x00000000, 0x00000022, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00003f00, 0x00003700, 0x00004700, + 0x00003f00, 0x00005000, 0x0000b00f, 0x00002050, + 0x0000002c, 0x00000000, 0x00000000, 0x0000004c, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00002200, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x0000003f, 0x00000036, + 0x00000046, 0x0000003f, 0x00000f70, 0x00005080, + 0x00002c20, 0x00000000, 0x00000000, 0x00004c00, + 0x00000000, 0x00000000, 0x00000000, 0x00005600, + 0x00000000, 0x00000000, 0x00000022, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00003f00, 0x00003700, + 0x00004700, 0x00003f00, 0x00009000, 0x0000500f, + 0x00002050, 0x0000002c, 0x00000000, 0x00000000, + 0x0000004c, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00002200, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x0000003f, + 0x00000046, 0x00000036, 0x0000003f, 0x00000fb0, + 0x00005020, 0x00002c20, 0x00000000, 0x00000000, + 0x00004c00, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000022, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x0000f300, + 0x0000ea08, 0x00004608, 0x0000f300, 0x0000d008, + 0x0000f00f, 0x0000204f, 0x0000002c, 0x00000000, + 0x00000000, 0x0000004c, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00002200, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x0000003f, 0x00000046, 0x00000036, 0x0000003f, + 0x00000ff0, 0x00004fc0, 0x00002c20, 0x00000000, + 0x00000000, 0x00004c00, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000022, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00003f00, 0x00004600, 0x00003600, 0x00003f00, + 0x00001000, 0x00009010, 0x0000204f, 0x0000002c, + 0x00000000, 0x00000000, 0x0000004c, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00002200, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000903, 0x000008fa, 0x00000046, + 0x00000903, 0x00001030, 0x00004f60, 0x00002c20, + 0x00000000, 0x00000000, 0x00004c00, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000022, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00008300, 0x00007a08, 0x00004608, + 0x00008300, 0x00005008, 0x00003010, 0x0000204f, + 0x0000002c, 0x00000000, 0x00000000, 0x0000004c, + 0x00000000, 0x00000000, 0x00000000, 0x00000056, + 0x00000000, 0x00002200, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x0000003f, 0x00000037, + 0x00000047, 0x0000003f, 0x00001070, 0x00004f00, + 0x00002c20, 0x00000000, 0x00000000, 0x00004c00, + 0x00000000, 0x00000000, 0x00000000, 0x00005600, + 0x00000000, 0x00000000, 0x00000022, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x0000ab00, 0x00003708, + 0x00004700, 0x0000ab00, 0x00009008, 0x0000d010, + 0x0000204e, 0x0000002c, 0x00000000, 0x00000000, + 0x0000004c, 0x00000000, 0x00000000, 0x00000000, + 0x00000056, 0x00000000, 0x00002200, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x000008bb, + 0x00000037, 0x00000047, 0x000008bb, 0x000010b0, + 0x00004ea0, 0x00002c20, 0x00000000, 0x00000000, + 0x00004c00, 0x00000000, 0x00000000, 0x00000000, + 0x00005600, 0x00000000, 0x00000000, 0x00000022, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x0000b300, + 0x00003708, 0x00004700, 0x0000b300, 0x0000d008, + 0x00007010, 0x0000204e, 0x0000002c, 0x00000000, + 0x00000000, 0x0000004c, 0x00000000, 0x00000000, + 0x00000000, 0x00000056, 0x00000000, 0x00002200, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x0000003f, 0x00000037, 0x00000047, 0x0000003f, + 0x000010f0, 0x00004e40, 0x00002c20, 0x00000000, + 0x00000000, 0x00004c00, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000022, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x0000cb00, 0x0000c208, 0x00004608, 0x0000cb00, + 0x00001008, 0x00001011, 0x0000204e, 0x0000002c, + 0x00000000, 0x00000000, 0x0000004c, 0x00000000, + 0x00000000, 0x00000000, 0x00000056, 0x00000000, + 0x00002200, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x0000003f, 0x00000037, 0x00000047, + 0x0000003f, 0x00001130, 0x00004de0, 0x00002c20, + 0x00000000, 0x00000000, 0x00004c00, 0x00000000, + 0x00000000, 0x00000000, 0x00005600, 0x00000000, + 0x00000000, 0x00000022, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00003f00, 0x00003700, 0x00004700, + 0x00003f00, 0x00005000, 0x0000b011, 0x0000204d, + 0x0000002c, 0x00000000, 0x00000000, 0x0000004c, + 0x00000000, 0x00000000, 0x00000000, 0x00000056, + 0x00000000, 0x00002200, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x0000003f, 0x00000037, + 0x00000047, 0x0000003f, 0x00001170, 0x00004d80, + 0x00002c20, 0x00000000, 0x00000000, 0x00004c00, + 0x00000000, 0x00000000, 0x00000000, 0x00005600, + 0x00000000, 0x00000000, 0x00000022, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00003f00, 0x00003700, + 0x00004700, 0x00003f00, 0x00009000, 0x00005011, + 0x0000204d, 0x0000002c, 0x00000000, 0x00000000, + 0x0000004c, 0x00000000, 0x00000000, 0x00000000, + 0x00000056, 0x00000000, 0x00002200, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x0000003f, + 0x00000037, 0x00000047, 0x0000003f, 0x000011b0, + 0x00004d20, 0x00002c20, 0x00000000, 0x00000000, + 0x00004c00, 0x00000000, 0x00000000, 0x00000000, + 0x00005600, 0x00000000, 0x00000000, 0x00000022, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00003f00, + 0x00004700, 0x00003700, 0x00003f00, 0x0000d000, + 0x0000f011, 0x0000204c, 0x0000002c, 0x00000000, + 0x00000000, 0x0000004c, 0x00000000, 0x00000000, + 0x00000000, 0x00000056, 0x00000000, 0x00002200, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x0000003f, 0x00000047, 0x00000037, 0x0000003f, + 0x000011f0, 0x00004cc0, 0x00002c20, 0x00000000, + 0x00000000, 0x00004c00, 0x00000000, 0x00000000, + 0x00000000, 0x00005600, 0x00000000, 0x00000000, + 0x00000022, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00003f00, 0x00004700, 0x00003700, 0x00003f00, + 0x00001000, 0x00009012, 0x0000204c, 0x0000002c, + 0x00000000, 0x00000000, 0x0000004c, 0x00000000, + 0x00000000, 0x00000000, 0x00000056, 0x00000000, + 0x00002200, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x0000003f, 0x00000037, 0x00000047, + 0x0000003f, 0x00001230, 0x00004c60, 0x00002c20, + 0x00000000, 0x00000000, 0x00004c00, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000800, + 0x00000000, 0x00000022, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00003f00, 0x00003600, 0x00004600, + 0x00003f00, 0x00005000, 0x00003012, 0x0000204c, + 0x0000002c, 0x00000000, 0x00000000, 0x0000004c, + 0x00000000, 0x00000000, 0x00000000, 0x00000056, + 0x00000000, 0x00002200, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x0000003f, 0x00000037, + 0x00000047, 0x0000003f, 0x00001270, 0x00002df0, + 0x00003820, 0x0000001e, 0x00000000, 0x00000000, + 0x00000000, 0x00003700, 0x0000f01e, 0x0000202d, + 0x00000092, 0x0000f700, 0x0000f007, 0x00002025, + 0x00000092, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00002b00, 0x0000e000, 0x00002056, + 0x00000081, 0x00009800, 0x0000107e, 0x00002d34, + 0x000000da, 0x00003200, 0x0000d08c, 0x00002ca7, + 0x000000f2, 0x00009100, 0x0000d0f8, 0x00002ba7, + 0x000000d6, 0x00000200, 0x0000e000, 0x00002bf9, + 0x000000fa, 0x00001500, 0x00000000, 0x00000780, + 0x000000f2, 0x0000c900, 0x00001001, 0x00002bf8, + 0x000000f0, 0x00000200, 0x00000000, 0x00002bf8, + 0x000000fa, 0x00008200, 0x00007000, 0x00002bf7, + 0x000000f2, 0x00000200, 0x00006000, 0x00002bf7, + 0x000000fa, 0x00008200, 0x0000d000, 0x00002bf6, + 0x000000f2, 0x00000200, 0x0000c000, 0x00002bf6, + 0x000000fa, 0x00008200, 0x00003000, 0x00002bf6, + 0x000000f2, 0x00000200, 0x00002000, 0x00002bf6, + 0x000000fa, 0x00008200, 0x00009000, 0x00002bf5, + 0x000000f2, 0x00000200, 0x00008000, 0x00002bf5, + 0x000000fa, 0x00008200, 0x0000f000, 0x00002bf4, + 0x000000f2, 0x00000200, 0x0000e000, 0x00002bf4, + 0x000000fa, 0x00008200, 0x00005000, 0x00002bf4, + 0x000000f2, 0x00000200, 0x00004000, 0x00002bf4, + 0x000000fa, 0x00001c00, 0x0000404a, 0x00002c56, + 0x000000f2, 0x00000200, 0x00003000, 0x00002bf4, + 0x000000fa, 0x00008000, 0x00008000, 0x00000700, + 0x000000f2, 0x00000200, 0x00002000, 0x00002bf4, + 0x000000fa, 0x00008000, 0x00000000, 0x0000e004, + 0x000000f2, 0x00000200, 0x00001000, 0x00002bf4, + 0x000000fa, 0x00001a00, 0x00000000, 0x0000e015, + 0x000000f2, 0x00000200, 0x00000000, 0x00002bf4, + 0x000000fa, 0x00004000, 0x00000000, 0x0000e014, + 0x000000f2, 0x00000200, 0x0000f000, 0x00002bf3, + 0x000000fa, 0x00000000, 0x00000004, 0x0000e010, + 0x000000f2, 0x00000200, 0x0000e000, 0x00002bf3, + 0x000000fa, 0x00000000, 0x00000002, 0x0000e00c, + 0x000000f2, 0x00000200, 0x0000d000, 0x00002bf3, + 0x000000fa, 0x00000200, 0x0000fe00, 0x0000e1ff, + 0x000000f2, 0x00000200, 0x0000c000, 0x00002bf3, + 0x000000fa, 0x00000000, 0x00000004, 0x0000e008, + 0x000000f2, 0x00002c00, 0x0000ca00, 0x0000bfff, + 0x000000f2, 0x00002400, 0x00000000, 0x00004182, + 0x000000f2, 0x00007200, 0x0000401f, 0x00002dc6, + 0x0000009a, 0x00008000, 0x0000b013, 0x00002db2, + 0x000000f2, 0x00001b00, 0x0000f0fb, 0x00002aff, + 0x00000096, 0x00004b00, 0x0000b000, 0x00002bfa, + 0x0000009a, 0x00008b00, 0x00002000, 0x00002bfa, + 0x0000009a, 0x0000d400, 0x000020ff, 0x00002afa, + 0x000000f6, 0x00009600, 0x0000d807, 0x00000205, + 0x000000e4, 0x0000e000, 0x0000d807, 0x00000005, + 0x000000e4, 0x00008e00, 0x0000d800, 0x00000405, + 0x000000e4, 0x00007e00, 0x0000d804, 0x00000105, + 0x000000e4, 0x00008c00, 0x0000d805, 0x00000105, + 0x000000e4, 0x00000c00, 0x0000d803, 0x00000305, + 0x000000e4, 0x00001a00, 0x00003203, 0x00000100, + 0x000000e4, 0x0000b400, 0x00003202, 0x00000000, + 0x000000e4, 0x00009e00, 0x00003201, 0x00000100, + 0x000000e4, 0x0000ee00, 0x0000600b, 0x00000501, + 0x000000e4, 0x00003600, 0x00006012, 0x00000101, + 0x000000e4, 0x00006600, 0x00006010, 0x00000101, + 0x000000e4, 0x00008600, 0x0000600e, 0x00000101, + 0x000000e4, 0x0000e200, 0x0000601c, 0x00000101, + 0x000000e4, 0x00003400, 0x00006002, 0x00000501, + 0x000000e4, 0x00000000, 0x0000e000, 0x00000206, + 0x000000e4, 0x00000000, 0x0000e800, 0x00000206, + 0x000000e4, 0x00006a00, 0x0000600f, 0x00000101, + 0x000000e4, 0x00005600, 0x00006003, 0x00000101, + 0x000000e4, 0x00000400, 0x00006011, 0x00000001, + 0x000000e4, 0x0000c800, 0x0000601b, 0x00000201, + 0x000000e4, 0x0000a200, 0x00006003, 0x00000201, + 0x000000e4, 0x0000d200, 0x00006003, 0x00000501, + 0x000000e4, 0x0000fc00, 0x0000600f, 0x00000001, + 0x000000e4, 0x00006a00, 0x00006000, 0x00000901, + 0x000000e4, 0x00001800, 0x00006011, 0x00000001, + 0x000000e4, 0x00000e00, 0x00006014, 0x00000601, + 0x000000e4, 0x0000aa00, 0x00006006, 0x00000301, + 0x000000e4, 0x00003a00, 0x00006013, 0x00000001, + 0x000000e4, 0x00002800, 0x00006011, 0x00000101, + 0x000000e4, 0x0000b000, 0x00006015, 0x00000501, + 0x000000e4, 0x00002e00, 0x00006007, 0x00000201, + 0x000000e4, 0x0000f200, 0x00006007, 0x00000201, + 0x000000e4, 0x00001200, 0x0000601c, 0x00000201, + 0x000000e4, 0x0000a600, 0x00006011, 0x00000101, + 0x000000e4, 0x00001600, 0x0000601e, 0x00000101, + 0x000000e4, 0x0000d600, 0x00006002, 0x00000601, + 0x000000e4, 0x00000a00, 0x0000600f, 0x00000201, + 0x000000e4, 0x00004200, 0x00006006, 0x00000101, + 0x000000e4, 0x0000d400, 0x00006019, 0x00000001, + 0x000000e4, 0x0000f200, 0x00006019, 0x00000501, + 0x000000e4, 0x00004000, 0x0000601d, 0x00000201, + 0x000000e4, 0x0000f000, 0x0000601a, 0x00000001, + 0x000000e4, 0x00003600, 0x00006004, 0x00000501, + 0x000000c4, 0x0000b400, 0x00006004, 0x00000501, + 0x000000c4, 0x00000e00, 0x00006013, 0x00000101, + 0x000000c4, 0x00007e00, 0x0000600a, 0x00000401, + 0x000000c4, 0x00005200, 0x0000600a, 0x00000001, + 0x000000c4, 0x00001800, 0x0000600a, 0x00000001, + 0x000000c4, 0x0000c400, 0x00006008, 0x00000001, + 0x000000c4, 0x00000000, 0x00003200, 0x00000000, + 0x000000c4, 0x0000b200, 0x0000f201, 0x00000106, + 0x000000c4, 0x0000be00, 0x00005003, 0x00000207, + 0x000000e4, 0x00003a00, 0x00005003, 0x00000407, + 0x000000e4, 0x00000000, 0x00005000, 0x00000407, + 0x000000e4, 0x00003000, 0x00005006, 0x00000407, + 0x000000e4, 0x00009000, 0x00005002, 0x00000407, + 0x000000e4, 0x00009200, 0x00005000, 0x00000407, + 0x000000e4, 0x0000a800, 0x00005001, 0x00000407, + 0x000000e4, 0x00007200, 0x00005000, 0x00000507, + 0x000000e4, 0x0000ea00, 0x00005002, 0x00000107, + 0x000000e4, 0x0000a800, 0x00005005, 0x00000207, + 0x000000e4, 0x00002200, 0x00005005, 0x00000407, + 0x000000e4, 0x0000a000, 0x00005004, 0x00000407, + 0x000000e4, 0x00004800, 0x00005800, 0x00000007, + 0x000000e4, 0x00000000, 0x00005800, 0x00000007, + 0x000000e4, 0x00000000, 0x0000f200, 0x00000306, + 0x000000e4, 0x0000ca00, 0x00005006, 0x00000c07, + 0x000000e4, 0x00008a00, 0x0000500f, 0x00000707, + 0x000000e4, 0x00008c00, 0x00005006, 0x00000307, + 0x000000e4, 0x00000000, 0x00004200, 0x00000407, + 0x000000e4, 0x00008600, 0x00004200, 0x00000607, + 0x000000e4, 0x00001a00, 0x00007a58, 0x00000407, + 0x000000e4, 0x00007200, 0x00007a74, 0x00000907, + 0x000000e4, 0x00009200, 0x00007a1b, 0x00000307, + 0x000000e4, 0x0000fa00, 0x00007a2c, 0x00000507, + 0x000000e4, 0x00007e00, 0x00007a52, 0x00000707, + 0x000000e4, 0x0000ae00, 0x00007a31, 0x00000207, + 0x000000e4, 0x0000ee00, 0x00007a48, 0x00000007, + 0x000000e4, 0x0000ea00, 0x00007a6e, 0x00000207, + 0x000000e4, 0x0000e600, 0x00007a26, 0x00000307, + 0x000000e4, 0x00007000, 0x00007a6a, 0x00000307, + 0x000000e4, 0x00001a00, 0x00007a26, 0x00000307, + 0x000000e4, 0x00005400, 0x00007a4f, 0x00000107, + 0x000000e4, 0x0000fe00, 0x00007a18, 0x00000107, + 0x000000e4, 0x00009600, 0x00007a44, 0x00000307, + 0x000000e4, 0x00001600, 0x00007a45, 0x00000207, + 0x000000e4, 0x00004e00, 0x00007a2e, 0x00000207, + 0x000000e4, 0x00001e00, 0x00007a30, 0x00000407, + 0x000000e4, 0x00004400, 0x00007a2f, 0x00000507, + 0x000000e4, 0x0000ae00, 0x00006204, 0x00000307, + 0x000000e4, 0x00001c00, 0x00006201, 0x00000507, + 0x000000e4, 0x00005e00, 0x00006207, 0x00000307, + 0x000000e4, 0x0000c800, 0x00006205, 0x00000307, + 0x000000e4, 0x00007200, 0x00006200, 0x00000107, + 0x000000e4, 0x0000f000, 0x00007a50, 0x00000507, + 0x000000e4, 0x0000fe00, 0x00007a51, 0x00000007, + 0x000000e4, 0x0000fc00, 0x00007a15, 0x00000307, + 0x000000e4, 0x00009600, 0x00007a05, 0x00000707, + 0x000000e4, 0x00000000, 0x00009200, 0x00000208, + 0x000000e4, 0x00009a00, 0x00002202, 0x00000108, + 0x000000e4, 0x00001e00, 0x00002206, 0x00000008, + 0x000000e4, 0x00009600, 0x00009200, 0x00000508, + 0x000000e4, 0x00000000, 0x0000d200, 0x00000208, + 0x000000e4, 0x0000a000, 0x0000221c, 0x00000208, + 0x000000e4, 0x00003600, 0x00002228, 0x00000108, + 0x000000e4, 0x0000b400, 0x0000222a, 0x00000008, + 0x000000e4, 0x00003e00, 0x0000d20d, 0x00000408, + 0x000000e4, 0x0000ae00, 0x00000208, 0x00000108, + 0x000000e4, 0x00007400, 0x00009201, 0x00000008, + 0x000000e4, 0x00007200, 0x0000020e, 0x00000008, + 0x000000e4, 0x00005800, 0x00000216, 0x00000108, + 0x000000e4, 0x00004a00, 0x0000d221, 0x00000508, + 0x000000e4, 0x0000d800, 0x0000d221, 0x00000208, + 0x000000e4, 0x0000e200, 0x0000d222, 0x00000508, + 0x000000e4, 0x00009000, 0x0000d223, 0x00000208, + 0x000000e4, 0x0000e000, 0x0000d202, 0x00000208, + 0x000000e4, 0x00005e00, 0x0000d207, 0x00000408, + 0x000000e4, 0x00000600, 0x0000d20b, 0x00000708, + 0x000000e4, 0x0000bc00, 0x00009201, 0x00000008, + 0x000000e4, 0x00002a00, 0x0000d21f, 0x00000308, + 0x000000e4, 0x0000da00, 0x0000d20d, 0x00000308, + 0x000000e4, 0x00009000, 0x0000d225, 0x00000208, + 0x000000e4, 0x00006c00, 0x0000d226, 0x00000208, + 0x000000e4, 0x0000d000, 0x0000c200, 0x00000008, + 0x000000e4, 0x00009200, 0x0000c207, 0x00000208, + 0x000000e4, 0x00000c00, 0x0000d224, 0x00000308, + 0x000000e4, 0x00008c00, 0x0000d224, 0x00000208, + 0x000000e4, 0x0000e000, 0x00007002, 0x00002bc5, + 0x0000009a, 0x00006600, 0x00000000, 0x00002bc5, + 0x00000092, 0x0000c100, 0x000000fe, 0x00002ac5, + 0x00000096, 0x00003400, 0x0000d001, 0x00002bc9, + 0x0000009a, 0x00002000, 0x0000a000, 0x00002bc9, + 0x00000092, 0x0000c100, 0x0000a0fe, 0x00002ac9, + 0x00000096, 0x00003400, 0x00000056, 0x00002c00, + 0x0000009a, 0x0000b200, 0x00007014, 0x00002ba2, + 0x00000092, 0x0000fd00, 0x000040fc, 0x000026fe, + 0x00000096, 0x00001000, 0x00005008, 0x00002b9a, + 0x0000009a, 0x00006600, 0x0000c000, 0x000027fa, + 0x000000f2, 0x00008100, 0x0000c0ff, 0x000026fa, + 0x00000096, 0x0000c900, 0x00001001, 0x00002bf8, + 0x000000f0, 0x00009b00, 0x000040ff, 0x00002abe, + 0x000000d6, 0x00000100, 0x0000c000, 0x00002bbd, + 0x000000d2, 0x00000700, 0x0000b000, 0x00002bbd, + 0x000000da, 0x00001500, 0x00000000, 0x00000780, + 0x000000f2, 0x00009b00, 0x0000c0ff, 0x00002abc, + 0x000000d6, 0x00000100, 0x00004000, 0x00002bbc, + 0x000000d2, 0x00000700, 0x00003000, 0x00002bbc, + 0x000000da, 0x00001c00, 0x0000404a, 0x00002c56, + 0x000000f2, 0x00008200, 0x00005000, 0x00002bf4, + 0x000000f2, 0x00008200, 0x0000f000, 0x00002bf4, + 0x000000f2, 0x00008200, 0x00009000, 0x00002bf5, + 0x000000f2, 0x00008200, 0x00003000, 0x00002bf6, + 0x000000f2, 0x00008200, 0x0000d000, 0x00002bf6, + 0x000000f2, 0x00008200, 0x00007000, 0x00002bf7, + 0x000000f2, 0x00002400, 0x00000000, 0x00004182, + 0x000000f2, 0x00000000, 0x00000004, 0x0000e008, + 0x000000f2, 0x00008000, 0x00000000, 0x0000e004, + 0x000000f2, 0x00000200, 0x0000fe00, 0x0000e1ff, + 0x000000f2, 0x00000000, 0x00000002, 0x0000e00c, + 0x000000f2, 0x00000000, 0x00000004, 0x0000e010, + 0x000000f2, 0x00004000, 0x00000000, 0x0000e014, + 0x000000f2, 0x00001a00, 0x00000000, 0x0000e015, + 0x000000f2, 0x00009b00, 0x0000d0ff, 0x000026fe, + 0x000000d6, 0x00000100, 0x00005000, 0x000027fe, + 0x000000d2, 0x00000700, 0x00004000, 0x000027fe, + 0x000000da, 0x00002c00, 0x0000ca00, 0x0000bfff, + 0x000000f2, 0x00003200, 0x0000d08c, 0x00002ca7, + 0x000000f2, 0x00008000, 0x00008000, 0x00000700, + 0x000000f2, 0x00008000, 0x0000b013, 0x00002db2, + 0x000000f2, 0x00008b00, 0x00002000, 0x00002bfa, + 0x0000009a, 0x00004b00, 0x0000b000, 0x00002bfa, + 0x0000009a, 0x0000fc00, 0x00001003, 0x00002bd7, + 0x000000da, 0x0000c000, 0x00004001, 0x00002bd5, + 0x000000f2, 0x0000c500, 0x000040ff, 0x00002ad5, + 0x000000d6, 0x0000de00, 0x0000f002, 0x00000329, + 0x0000009a, 0x00002e00, 0x0000c001, 0x00000328, + 0x000000f2, 0x0000c300, 0x0000c0ff, 0x00000228, + 0x00000096, 0x00002400, 0x00009011, 0x00002be2, + 0x0000009a, 0x00006400, 0x00002001, 0x00002be1, + 0x000000d2, 0x0000f300, 0x000020fd, 0x00002ae1, + 0x000000d6, 0x00005d00, 0x0000b000, 0x00002bde, + 0x0000009a, 0x0000ba00, 0x0000f002, 0x00002bdb, + 0x000000da, 0x0000dc00, 0x00001000, 0x00002bdb, + 0x000000d2, 0x00002400, 0x00009011, 0x00002be2, + 0x0000009a, 0x00005d00, 0x0000b000, 0x00002bde, + 0x0000009a, 0x00002c00, 0x0000700a, 0x000027ea, + 0x000000da, 0x00009e00, 0x0000d000, 0x000027e9, + 0x000000d2, 0x00005500, 0x0000d0fe, 0x000026e9, + 0x000000d6, 0x00003400, 0x0000108f, 0x00002b0b, + 0x000000da, 0x00009f00, 0x00007016, 0x00002af4, + 0x000000d2, 0x00007d00, 0x000030fa, 0x000026fa, + 0x000000d6, 0x00000b00, 0x00006021, 0x00002ad3, + 0x000000da, 0x00007200, 0x0000e049, 0x00002a89, + 0x000000d2, 0x0000f500, 0x000020fe, 0x000026e8, + 0x000000d6, 0x00000000, 0x0000d0f0, 0x00002999, + 0x000000d2, 0x00001600, 0x0000d092, 0x0000b66d, + 0x000000d2, 0x00000000, 0x0000c0f0, 0x0000b57d, + 0x000000d2, 0x00009200, 0x0000100f, 0x0000a17e, + 0x000000d2, 0x00004c00, 0x0000c000, 0x0000a17d, + 0x000000d2, 0x00000e00, 0x0000b002, 0x0000a17b, + 0x000000d2, 0x00008000, 0x00008000, 0x00000700, + 0x000000d2, 0x00000000, 0x00000080, 0x00004100, + 0x000000d2, 0x00000400, 0x00003000, 0x000027fa, + 0x000000d2, 0x00002000, 0x00002400, 0x00004182, + 0x000000f2, 0x0000ea00, 0x0000009c, 0x0000a000, + 0x000000f2, 0x0000a800, 0x00009019, 0x00002789, + 0x000000da, 0x0000c800, 0x00000086, 0x00002800, + 0x000000f2, 0x0000a500, 0x00009011, 0x00002776, + 0x000000da, 0x0000d600, 0x0000b034, 0x00002741, + 0x000000f2, 0x00002600, 0x00001038, 0x000028e7, + 0x000000da, 0x00003e00, 0x0000d060, 0x00002886, + 0x000000f2, 0x00008c00, 0x000070d2, 0x000024ed, + 0x000000f2, 0x0000d300, 0x0000801d, 0x00002722, + 0x000000fa, 0x00008200, 0x0000f086, 0x0000269b, + 0x000000f2, 0x00004200, 0x000000da, 0x000025c0, + 0x000000f2, 0x00000000, 0x000000c0, 0x00002400, + 0x000000f2, 0x00000000, 0x000070c0, 0x000022a7, + 0x000000f2, 0x00000000, 0x000060c0, 0x000021e7, + 0x000000f2, 0x00000000, 0x000050c0, 0x00002127, + 0x000000f2, 0x00000000, 0x000040c0, 0x00002067, + 0x000000f2, 0x00003900, 0x00002010, 0x0000a16a, + 0x000000da, 0x0000ed00, 0x00003022, 0x0000a147, + 0x000000f2, 0x00002200, 0x0000f000, 0x000027a9, + 0x000000f2, 0x00009e00, 0x0000a003, 0x00002063, + 0x000000da, 0x00009200, 0x0000000b, 0x00002058, + 0x000000f2, 0x00007b00, 0x000000ff, 0x00001f58, + 0x000000d6, 0x00000c00, 0x0000f002, 0x000027de, + 0x000000f2, 0x0000c000, 0x0000901a, 0x000027ba, + 0x000000f2, 0x00001c00, 0x00009001, 0x000027b6, + 0x000000f2, 0x0000f400, 0x0000d026, 0x00002972, + 0x000000da, 0x00008200, 0x00004053, 0x0000291f, + 0x000000f2, 0x00009300, 0x0000a02d, 0x0000237a, + 0x000000da, 0x00004e00, 0x00005010, 0x0000236a, + 0x000000f2, 0x00003d00, 0x000050fd, 0x0000226a, + 0x000000d6, 0x0000a400, 0x0000e014, 0x0000a12e, + 0x000000da, 0x00002300, 0x0000b08f, 0x0000a09f, + 0x000000f2, 0x00007600, 0x0000401b, 0x0000b562, + 0x000000da, 0x00003700, 0x00000062, 0x0000b500, + 0x000000f2, 0x0000f200, 0x00001015, 0x000024c0, + 0x000000fa, 0x00008000, 0x00007043, 0x000023ab, + 0x000000f2, 0x0000a700, 0x000070ff, 0x000022ab, + 0x000000f6, 0x00008a00, 0x00003001, 0x000023f0, + 0x000000da, 0x00007100, 0x0000b000, 0x000023ef, + 0x000000f2, 0x0000eb00, 0x0000b0ff, 0x000022ef, + 0x000000d6, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00002f00, 0x00004000, 0x00002057, + 0x00000081, 0x00002f00, 0x00004000, 0x00002057, + 0x00000092, 0x00003f00, 0x0000b000, 0x00002025, + 0x00000082, 0x00005f00, 0x0000b000, 0x00002025, + 0x00000092, 0x00002f00, 0x00001000, 0x00002057, + 0x00000081, 0x00002f00, 0x00001000, 0x00002057, + 0x00000092, 0x00004700, 0x00006000, 0x00002025, + 0x00000082, 0x00004700, 0x00006000, 0x00002025, + 0x00000092, 0x00002f00, 0x0000b000, 0x00002056, + 0x00000081, 0x00002f00, 0x0000b000, 0x00002056, + 0x00000092, 0x00005f00, 0x00000000, 0x00002025, + 0x00000082, 0x00005f00, 0x00000000, 0x00002025, + 0x00000092, 0x00002f00, 0x00008000, 0x00002056, + 0x00000081, 0x00002f00, 0x00008000, 0x00002056, + 0x00000092, 0x00005f00, 0x0000a000, 0x00002024, + 0x00000082, 0x00005f00, 0x0000a000, 0x00002024, + 0x00000092, 0x00002f00, 0x00005000, 0x00002056, + 0x00000081, 0x00002f00, 0x00005000, 0x00002056, + 0x00000092, 0x00005f00, 0x00004000, 0x00002024, + 0x00000082, 0x00005f00, 0x00004000, 0x00002024, + 0x00000092, 0x00002f00, 0x00002000, 0x00002056, + 0x00000081, 0x00002f00, 0x00002000, 0x00002056, + 0x00000092, 0x00005f00, 0x0000e000, 0x00002023, + 0x00000082, 0x00005f00, 0x0000e000, 0x00002023, + 0x00000092, 0x00002f00, 0x0000f000, 0x00002055, + 0x00000081, 0x00002f00, 0x0000f000, 0x00002055, + 0x00000092, 0x00005f00, 0x00008000, 0x00002023, + 0x00000082, 0x00005f00, 0x00008000, 0x00002023, + 0x00000092, 0x00002f00, 0x0000c000, 0x00002055, + 0x00000081, 0x00002f00, 0x0000c000, 0x00002055, + 0x00000092, 0x00005f00, 0x00002000, 0x00002023, + 0x00000082, 0x00005f00, 0x00002000, 0x00002023, + 0x00000092, 0x00002f00, 0x00009000, 0x00002055, + 0x00000081, 0x00002f00, 0x00009000, 0x00002055, + 0x00000092, 0x00005f00, 0x0000c000, 0x00002022, + 0x00000082, 0x00005f00, 0x0000c000, 0x00002022, + 0x00000092, 0x00002f00, 0x00006000, 0x00002055, + 0x00000081, 0x00002f00, 0x00006000, 0x00002055, + 0x00000092, 0x00005f00, 0x00006000, 0x00002022, + 0x00000082, 0x00005f00, 0x00006000, 0x00002022, + 0x00000092, 0x00002f00, 0x00003000, 0x00002055, + 0x00000081, 0x00002f00, 0x00003000, 0x00002055, + 0x00000092, 0x00005f00, 0x00000000, 0x00002022, + 0x00000082, 0x00005f00, 0x00000000, 0x00002022, + 0x00000092, 0x00002f00, 0x00000000, 0x00002055, + 0x00000081, 0x00002f00, 0x00000000, 0x00002055, + 0x00000092, 0x00005f00, 0x0000a000, 0x00002021, + 0x00000082, 0x00005f00, 0x0000a000, 0x00002021, + 0x00000092, 0x00002f00, 0x0000d000, 0x00002054, + 0x00000081, 0x00002f00, 0x0000d000, 0x00002054, + 0x00000092, 0x00005f00, 0x00004000, 0x00002021, + 0x00000082, 0x00005f00, 0x00004000, 0x00002021, + 0x00000092, 0x00002f00, 0x0000a000, 0x00002054, + 0x00000081, 0x00002f00, 0x0000a000, 0x00002054, + 0x00000092, 0x00005f00, 0x0000e000, 0x00002020, + 0x00000082, 0x00005f00, 0x0000e000, 0x00002020, + 0x00000092, 0x00002f00, 0x00007000, 0x00002054, + 0x00000081, 0x00002f00, 0x00007000, 0x00002054, + 0x00000092, 0x00005f00, 0x00008000, 0x00002020, + 0x00000082, 0x00005f00, 0x00008000, 0x00002020, + 0x00000092, 0x00002f00, 0x00004000, 0x00002054, + 0x00000081, 0x00002f00, 0x00004000, 0x00002054, + 0x00000092, 0x00005f00, 0x00002000, 0x00002020, + 0x00000082, 0x00005f00, 0x00002000, 0x00002020, + 0x00000092, 0x00002f00, 0x00001000, 0x00002054, + 0x00000081, 0x00002f00, 0x00001000, 0x00002054, + 0x00000092, 0x00005f00, 0x0000c000, 0x0000201f, + 0x00000082, 0x00005f00, 0x0000c000, 0x0000201f, + 0x00000092, 0x00002f00, 0x0000e000, 0x00002053, + 0x00000081, 0x00002f00, 0x0000e000, 0x00002053, + 0x00000092, 0x00005f00, 0x00006000, 0x0000201f, + 0x00000082, 0x00005f00, 0x00006000, 0x0000201f, + 0x00000092, 0x00002f00, 0x0000b000, 0x00002053, + 0x00000081, 0x00002f00, 0x0000b000, 0x00002053, + 0x00000092, 0x00005f00, 0x00000000, 0x0000201f, + 0x00000082, 0x00005f00, 0x00000000, 0x0000201f, + 0x00000092, 0x00002f00, 0x00008000, 0x00002053, + 0x00000081, 0x00002f00, 0x00008000, 0x00002053, + 0x00000092, 0x00005f00, 0x0000a000, 0x0000201e, + 0x00000082, 0x00005f00, 0x0000a000, 0x0000201e, + 0x00000092, 0x00002f00, 0x00005000, 0x00002053, + 0x00000081, 0x00002f00, 0x00005000, 0x00002053, + 0x00000092, 0x00005f00, 0x00004000, 0x0000201e, + 0x00000082, 0x00005f00, 0x00004000, 0x0000201e, + 0x00000092, 0x00002f00, 0x00002000, 0x00002053, + 0x00000081, 0x00002f00, 0x00002000, 0x00002053, + 0x00000092, 0x00005f00, 0x0000e000, 0x0000201d, + 0x00000082, 0x00005f00, 0x0000e000, 0x0000201d, + 0x00000092, 0x00002f00, 0x0000f000, 0x00002052, + 0x00000081, 0x00002f00, 0x0000f000, 0x00002052, + 0x00000092, 0x00005f00, 0x00008000, 0x0000201d, + 0x00000082, 0x00005f00, 0x00008000, 0x0000201d, + 0x00000092, 0x00002f00, 0x0000c000, 0x00002052, + 0x00000081, 0x00002f00, 0x0000c000, 0x00002052, + 0x00000092, 0x00005f00, 0x00002000, 0x0000201d, + 0x00000082, 0x00005f00, 0x00002000, 0x0000201d, + 0x00000092, 0x00002f00, 0x00009000, 0x00002052, + 0x00000081, 0x00002f00, 0x00009000, 0x00002052, + 0x00000092, 0x00005f00, 0x0000c000, 0x0000201c, + 0x00000082, 0x00005f00, 0x0000c000, 0x0000201c, + 0x00000092, 0x00002f00, 0x00006000, 0x00002052, + 0x00000081, 0x00002f00, 0x00006000, 0x00002052, + 0x00000092, 0x00005f00, 0x00006000, 0x0000201c, + 0x00000082, 0x00005f00, 0x00006000, 0x0000201c, + 0x00000092, 0x00002f00, 0x00003000, 0x00002052, + 0x00000081, 0x00002f00, 0x00003000, 0x00002052, + 0x00000092, 0x00005f00, 0x00000000, 0x0000201c, + 0x00000082, 0x00005f00, 0x00000000, 0x0000201c, + 0x00000092, 0x00002f00, 0x00000000, 0x00002052, + 0x00000081, 0x00002f00, 0x00000000, 0x00002052, + 0x00000092, 0x00005f00, 0x0000a000, 0x0000201b, + 0x00000082, 0x00005f00, 0x0000a000, 0x0000201b, + 0x00000092, 0x00002f00, 0x0000d000, 0x00002051, + 0x00000081, 0x00002f00, 0x0000d000, 0x00002051, + 0x00000092, 0x00005f00, 0x00004000, 0x0000201b, + 0x00000082, 0x00005f00, 0x00004000, 0x0000201b, + 0x00000092, 0x00002f00, 0x0000a000, 0x00002051, + 0x00000081, 0x00002f00, 0x0000a000, 0x00002051, + 0x00000092, 0x00005f00, 0x0000e000, 0x0000201a, + 0x00000082, 0x00005f00, 0x0000e000, 0x0000201a, + 0x00000092, 0x00002f00, 0x00007000, 0x00002051, + 0x00000081, 0x00002f00, 0x00007000, 0x00002051, + 0x00000092, 0x00005f00, 0x00008000, 0x0000201a, + 0x00000082, 0x00005f00, 0x00008000, 0x0000201a, + 0x00000092, 0x00002f00, 0x00004000, 0x00002051, + 0x00000081, 0x00002f00, 0x00004000, 0x00002051, + 0x00000092, 0x00005f00, 0x00002000, 0x0000201a, + 0x00000082, 0x00005f00, 0x00002000, 0x0000201a, + 0x00000092, 0x00002f00, 0x00001000, 0x00002051, + 0x00000081, 0x00002f00, 0x00001000, 0x00002051, + 0x00000092, 0x00005f00, 0x0000c000, 0x00002019, + 0x00000082, 0x00005f00, 0x0000c000, 0x00002019, + 0x00000092, 0x00002f00, 0x0000e000, 0x00002050, + 0x00000081, 0x00002f00, 0x0000e000, 0x00002050, + 0x00000092, 0x00005f00, 0x00006000, 0x00002019, + 0x00000082, 0x00005f00, 0x00006000, 0x00002019, + 0x00000092, 0x00002f00, 0x0000b000, 0x00002050, + 0x00000081, 0x00002f00, 0x0000b000, 0x00002050, + 0x00000092, 0x00005f00, 0x00000000, 0x00002019, + 0x00000082, 0x00005f00, 0x00000000, 0x00002019, + 0x00000092, 0x00002f00, 0x00008000, 0x00002050, + 0x00000081, 0x00002f00, 0x00008000, 0x00002050, + 0x00000092, 0x00005f00, 0x0000a000, 0x00002018, + 0x00000082, 0x00005f00, 0x0000a000, 0x00002018, + 0x00000092, 0x00002f00, 0x00005000, 0x00002050, + 0x00000081, 0x00002f00, 0x00005000, 0x00002050, + 0x00000092, 0x00005f00, 0x00004000, 0x00002018, + 0x00000082, 0x00005f00, 0x00004000, 0x00002018, + 0x00000092, 0x00002f00, 0x00002000, 0x00002050, + 0x00000081, 0x00002f00, 0x00002000, 0x00002050, + 0x00000092, 0x00005f00, 0x0000e000, 0x00002017, + 0x00000082, 0x00005f00, 0x0000e000, 0x00002017, + 0x00000092, 0x00002f00, 0x0000f000, 0x0000204f, + 0x00000081, 0x00002f00, 0x0000f000, 0x0000204f, + 0x00000092, 0x00005f00, 0x00008000, 0x00002017, + 0x00000082, 0x00005f00, 0x00008000, 0x00002017, + 0x00000092, 0x00002f00, 0x0000c000, 0x0000204f, + 0x00000081, 0x00002f00, 0x0000c000, 0x0000204f, + 0x00000092, 0x00005f00, 0x00002000, 0x00002017, + 0x00000082, 0x00005f00, 0x00002000, 0x00002017, + 0x00000092, 0x00002f00, 0x00009000, 0x0000204f, + 0x00000081, 0x00002f00, 0x00009000, 0x0000204f, + 0x00000092, 0x00005f00, 0x0000c000, 0x00002016, + 0x00000082, 0x00005f00, 0x0000c000, 0x00002016, + 0x00000092, 0x00002f00, 0x00006000, 0x0000204f, + 0x00000081, 0x00002f00, 0x00006000, 0x0000204f, + 0x00000092, 0x00005f00, 0x00006000, 0x00002016, + 0x00000082, 0x00005f00, 0x00006000, 0x00002016, + 0x00000092, 0x00002f00, 0x00003000, 0x0000204f, + 0x00000081, 0x00002f00, 0x00003000, 0x0000204f, + 0x00000092, 0x00005f00, 0x00000000, 0x00002016, + 0x00000082, 0x00005f00, 0x00000000, 0x00002016, + 0x00000092, 0x00002f00, 0x00000000, 0x0000204f, + 0x00000081, 0x00002f00, 0x00000000, 0x0000204f, + 0x00000092, 0x00005f00, 0x0000a000, 0x00002015, + 0x00000082, 0x00005f00, 0x0000a000, 0x00002015, + 0x00000092, 0x00002f00, 0x0000d000, 0x0000204e, + 0x00000081, 0x00002f00, 0x0000d000, 0x0000204e, + 0x00000092, 0x00005f00, 0x00004000, 0x00002015, + 0x00000082, 0x00005f00, 0x00004000, 0x00002015, + 0x00000092, 0x00002f00, 0x0000a000, 0x0000204e, + 0x00000081, 0x00002f00, 0x0000a000, 0x0000204e, + 0x00000092, 0x00005f00, 0x0000e000, 0x00002014, + 0x00000082, 0x00005f00, 0x0000e000, 0x00002014, + 0x00000092, 0x00002f00, 0x00007000, 0x0000204e, + 0x00000081, 0x00002f00, 0x00007000, 0x0000204e, + 0x00000092, 0x00005f00, 0x00008000, 0x00002014, + 0x00000082, 0x00005f00, 0x00008000, 0x00002014, + 0x00000092, 0x00002f00, 0x00004000, 0x0000204e, + 0x00000081, 0x00002f00, 0x00004000, 0x0000204e, + 0x00000092, 0x00005f00, 0x00002000, 0x00002014, + 0x00000082, 0x00005f00, 0x00002000, 0x00002014, + 0x00000092, 0x00002f00, 0x00001000, 0x0000204e, + 0x00000081, 0x00002f00, 0x00001000, 0x0000204e, + 0x00000092, 0x00005f00, 0x0000c000, 0x00002013, + 0x00000082, 0x00005f00, 0x0000c000, 0x00002013, + 0x00000092, 0x00002f00, 0x0000e000, 0x0000204d, + 0x00000081, 0x00002f00, 0x0000e000, 0x0000204d, + 0x00000092, 0x00005f00, 0x00006000, 0x00002013, + 0x00000082, 0x00005f00, 0x00006000, 0x00002013, + 0x00000092, 0x00002f00, 0x0000b000, 0x0000204d, + 0x00000081, 0x00002f00, 0x0000b000, 0x0000204d, + 0x00000092, 0x00005f00, 0x00000000, 0x00002013, + 0x00000082, 0x00005f00, 0x00000000, 0x00002013, + 0x00000092, 0x00002f00, 0x00008000, 0x0000204d, + 0x00000081, 0x00002f00, 0x00008000, 0x0000204d, + 0x00000092, 0x00005f00, 0x0000a000, 0x00002012, + 0x00000082, 0x00005f00, 0x0000a000, 0x00002012, + 0x00000092, 0x00002f00, 0x00005000, 0x0000204d, + 0x00000081, 0x00002f00, 0x00005000, 0x0000204d, + 0x00000092, 0x00005f00, 0x00004000, 0x00002012, + 0x00000082, 0x00005f00, 0x00004000, 0x00002012, + 0x00000092, 0x00002f00, 0x00002000, 0x0000204d, + 0x00000081, 0x00002f00, 0x00002000, 0x0000204d, + 0x00000092, 0x00005f00, 0x0000e000, 0x00002011, + 0x00000082, 0x00005f00, 0x0000e000, 0x00002011, + 0x00000092, 0x00002f00, 0x0000f000, 0x0000204c, + 0x00000081, 0x00002f00, 0x0000f000, 0x0000204c, + 0x00000092, 0x00005f00, 0x00008000, 0x00002011, + 0x00000082, 0x00005f00, 0x00008000, 0x00002011, + 0x00000092, 0x00002f00, 0x0000c000, 0x0000204c, + 0x00000081, 0x00002f00, 0x0000c000, 0x0000204c, + 0x00000092, 0x00005f00, 0x00002000, 0x00002011, + 0x00000082, 0x00005f00, 0x00002000, 0x00002011, + 0x00000092, 0x00088001 +}; + +unsigned long typical_xmit_buf_len = SUMMA_HEADER_WORDS; + +#endif + diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/reg/.cvsignore ppc_diag/reg/.cvsignore --- ppc_diag-1.0.2/reg/.cvsignore Fri Jan 3 10:40:06 2003 +++ ppc_diag/reg/.cvsignore Thu May 1 11:31:27 2003 @@ -1 +1 @@ -Makefile .depend .*.swp *.out +Makefile .depend .*.swp *.out *.dmp diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/reg/.depend ppc_diag/reg/.depend --- ppc_diag-1.0.2/reg/.depend Wed Dec 31 16:00:00 1969 +++ ppc_diag/reg/.depend Mon May 12 14:51:54 2003 @@ -0,0 +1,8 @@ +reg_test.o: reg_test.c \ + /home/speedy1/build/ppc_diag/includes/printf.h \ + reg_err.h \ + reg_test.h +reg_menu.o: reg_menu.c \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + /home/speedy1/build/ppc_diag/includes/printf.h \ + reg_menu.h diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/reg/reg_test.c ppc_diag/reg/reg_test.c --- ppc_diag-1.0.2/reg/reg_test.c Thu Jan 9 16:27:47 2003 +++ ppc_diag/reg/reg_test.c Thu May 1 11:31:27 2003 @@ -385,3 +385,26 @@ return rc; } +void dump_regs( reg_set_info *rsi ) +{ + unsigned long reg_address = 0; + int i; + + for (i = 0; i < rsi->num_regs; i++) + { + reg_address = rsi->addr_base + rsi->rti_array[i].addr_offset; + printf("[%08lx] %-40s: ", reg_address, rsi->rti_array[i].reg_name); + switch (rsi->addr_size) + { + case 1: + printf("%02x\n", *(volatile unsigned char*)reg_address); + break; + case 2: + printf("%04x\n", *(volatile unsigned short*)reg_address); + break; + default: + printf("%08lx\n", *(volatile unsigned long*)reg_address); + } + } +} + diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/reg/reg_test.h ppc_diag/reg/reg_test.h --- ppc_diag-1.0.2/reg/reg_test.h Thu Jan 9 16:27:47 2003 +++ ppc_diag/reg/reg_test.h Thu May 1 11:31:27 2003 @@ -47,4 +47,5 @@ } reg_set_info; int reg_test( unsigned int *results, reg_set_info *rsi, int debug ); +void dump_regs( reg_set_info *rsi ); diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/rtc/.cvsignore ppc_diag/rtc/.cvsignore --- ppc_diag-1.0.2/rtc/.cvsignore Fri Jan 3 10:40:06 2003 +++ ppc_diag/rtc/.cvsignore Thu May 1 11:31:27 2003 @@ -1 +1 @@ -Makefile .depend .*.swp *.out +Makefile .depend .*.swp *.out *.dmp diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/rtc/.depend ppc_diag/rtc/.depend --- ppc_diag-1.0.2/rtc/.depend Wed Dec 31 16:00:00 1969 +++ ppc_diag/rtc/.depend Mon May 12 14:51:54 2003 @@ -0,0 +1,16 @@ +rtc.o: rtc.c \ + /home/speedy1/build/ppc_diag/includes/ppcboot.h \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + /home/speedy1/build/ppc_diag/includes/printf.h \ + date.h \ + rtc_menu.h \ + rtc.h +date.o: date.c \ + /home/speedy1/build/ppc_diag/includes/ppcboot.h \ + rtc.h \ + date.h +rtc_menu.o: rtc_menu.c \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + /home/speedy1/build/ppc_diag/includes/printf.h \ + rtc.h \ + rtc_menu.h diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/scc_eth/.cvsignore ppc_diag/scc_eth/.cvsignore --- ppc_diag-1.0.2/scc_eth/.cvsignore Fri Jan 3 11:07:23 2003 +++ ppc_diag/scc_eth/.cvsignore Thu May 1 11:31:27 2003 @@ -1 +1 @@ -Makefile .depend .*.swp *.out +Makefile .depend .*.swp *.out *.dmp diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/scc_eth/.depend ppc_diag/scc_eth/.depend --- ppc_diag-1.0.2/scc_eth/.depend Wed Dec 31 16:00:00 1969 +++ ppc_diag/scc_eth/.depend Mon May 12 14:51:54 2003 @@ -0,0 +1,7 @@ +scc.o: scc.c \ + /home/speedy1/build/ppc_diag/includes/ppcboot.h \ + /home/speedy1/build/ppc_diag/includes/commproc.h \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + /home/speedy1/build/ppc_diag/includes/net.h \ + scc.h \ + $(wildcard /home/speedy1/build/ppc_diag/includes/config/scc/enet/no/broadcast.h) diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/system/.cvsignore ppc_diag/system/.cvsignore --- ppc_diag-1.0.2/system/.cvsignore Fri Jan 3 10:40:06 2003 +++ ppc_diag/system/.cvsignore Thu May 1 11:31:27 2003 @@ -1 +1 @@ -Makefile .depend .*.swp *.out +Makefile .depend .*.swp *.out *.dmp diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/system/.depend ppc_diag/system/.depend --- ppc_diag-1.0.2/system/.depend Wed Dec 31 16:00:00 1969 +++ ppc_diag/system/.depend Mon May 12 14:51:55 2003 @@ -0,0 +1,36 @@ +string.o: string.c \ + string.h +vsprintf.o: vsprintf.c \ + stdarg.h \ + string.h \ + /home/speedy1/build/ppc_diag/includes/limits.h \ + kernel.h \ + div64.h +printf.o: printf.c \ + stdarg.h \ + string.h \ + ppcboot.h \ + printf.h +time.o: time.c \ + ppcboot.h +cpu.o: cpu.c \ + ppcboot.h \ + mpc8xx.h +dboard_cfg.o: dboard_cfg.c \ + ppcboot.h \ + dboard_cfg.h +timer.o: timer.c \ + ppcboot.h \ + timer.h +interrupts.o: interrupts.c \ + ppcboot.h \ + /home/speedy1/build/ppc_diag/includes/commproc.h \ + printf.h \ + opcodes.h \ + interrupts.h +ticks.o: ticks.S \ + /home/speedy1/build/ppc_diag/includes/ppc_asm.tmpl +cache.o: cache.S \ + /home/speedy1/build/ppc_diag/includes/ppc_asm.tmpl \ + mmu.h \ + cache.h diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/system/config.h ppc_diag/system/config.h --- ppc_diag-1.0.2/system/config.h Fri Feb 7 14:42:05 2003 +++ ppc_diag/system/config.h Fri May 9 18:46:31 2003 @@ -42,6 +42,9 @@ /* enable testing and use of an external NVRAM */ #define ENABLE_NVRAM_SUPPORT +/* enable testing of a NAND flash device */ +#define ENABLE_NAND_FLASH_SUPPORT + /* keep a system journal in NVRAM */ #ifdef ENABLE_NVRAM_SUPPORT # define ENABLE_NVRAM_JOURNAL @@ -63,6 +66,21 @@ /* COMMON BOARD CONSTANTS */ /* ========================================================================== */ +/* Uncomment the following #define for systems w/o PIT/RTC 32.768 KHz input */ +/* +#define CPU_CLOCK_RATE 50000000L +*/ + +/* Ratio of bus speed to CPU speed (used for ethernet initialization) */ +#define BUS_CLOCK_RATIO 1 + +/* Serial port is on SMC1 */ +#define SERIAL_SMC 1 +/* For a board with SCC serial, uncomment the following #define, set the SCC #, + * and comment out the #define SERIAL_SMC line above +#define SERIAL_SCC 1 +*/ + /* LED base address */ #define LED_BASE_ADDR 0xd1380000 @@ -121,11 +139,35 @@ /* daughterboard containing FPGAs and DPRAM */ #define ENABLE_GREEN_BOX_SUPPORT +/* Green Box with transmit capability */ +#define ENABLE_RED_BOX_SUPPORT + /* RTC base address (in our case, same as NVRAM) */ #define RTC_BASE_ADDR 0xD1000000 /* Location in the Dallas RTC to find the clock */ #define RTC_TIME_BASE_ADDR 0xD1007ff8 + +/* Control signal register for the NAND flash (shared with LED register) */ +#define NFLASH_CTRL_ADDR 0xd1380000 + +/* I/O address for the NAND flash */ +#define NFLASH_IO_ADDR 0xd1100000 + +/* NAND flash control signals */ +#define NFLASH_CE (1 << 7) +#define NFLASH_WP (1 << 6) +#define NFLASH_CLE (1 << 5) +#define NFLASH_ALE (1 << 4) + +#define NFLASH_SETCE(mirror) mirror |= NFLASH_CE +#define NFLASH_CLRCE(mirror) mirror &= ~(NFLASH_CE) +#define NFLASH_SETCLE(mirror) mirror |= NFLASH_CLE +#define NFLASH_CLRCLE(mirror) mirror &= ~(NFLASH_CLE) +#define NFLASH_SETALE(mirror) mirror |= NFLASH_ALE +#define NFLASH_CLRALE(mirror) mirror &= ~(NFLASH_ALE) +#define NFLASH_WPON(mirror) mirror &= ~(NFLASH_WP) +#define NFLASH_WPOFF(mirror) mirror |= NFLASH_WP /* Base address to the daughterboard dual-port RAM */ #define GB_DPRAM_BASE_ADDR 0xA0000000 diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/system/cpu.c ppc_diag/system/cpu.c --- ppc_diag-1.0.2/system/cpu.c Mon Sep 9 12:34:30 2002 +++ ppc_diag/system/cpu.c Thu May 1 11:31:27 2003 @@ -37,6 +37,8 @@ #include "mpc8xx.h" #define CFG_RESET_ADDRESS 0xFFFFFFFF + +extern ulong cpu_speed; /* from entry/diag_init.c */ /* ------------------------------------------------------------------------- */ int do_reset () @@ -77,12 +79,12 @@ ulong oscclk, factor; if (immr->im_clkrst.car_sccr & SCCR_TBS) { - return (idata->cpu_clk / 16); + return (cpu_speed / 16); } factor = (((CFG_PLPRCR) & PLPRCR_MF_MSK) >> PLPRCR_MF_SHIFT) + 1; - oscclk = idata->cpu_clk / factor; + oscclk = cpu_speed / factor; if ((immr->im_clkrst.car_sccr & SCCR_RTSEL) == 0 || factor > 2) { return (oscclk / 4); diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/system/diags.h ppc_diag/system/diags.h --- ppc_diag-1.0.2/system/diags.h Fri Feb 7 14:25:09 2003 +++ ppc_diag/system/diags.h Fri May 9 18:48:05 2003 @@ -46,9 +46,6 @@ #define ONE_MEG 0x0100000L -#define CPU_CLOCK_RATE 50000000L -#define BUS_CLOCK_RATE CPU_CLOCK_RATE - #define ALL_TESTS 0 #define POWER_UP_TEST 0x1 #define BASIC_TEST 0x2 diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/util/.cvsignore ppc_diag/util/.cvsignore --- ppc_diag-1.0.2/util/.cvsignore Fri Jan 3 10:40:06 2003 +++ ppc_diag/util/.cvsignore Thu May 1 11:31:27 2003 @@ -1 +1 @@ -Makefile .depend .*.swp *.out +Makefile .depend .*.swp *.out *.dmp diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/util/.depend ppc_diag/util/.depend --- ppc_diag-1.0.2/util/.depend Wed Dec 31 16:00:00 1969 +++ ppc_diag/util/.depend Mon May 12 14:51:55 2003 @@ -0,0 +1,23 @@ +speed.o: speed.c \ + /home/speedy1/build/ppc_diag/includes/ppcboot.h \ + /home/speedy1/build/ppc_diag/includes/mpc8xx.h \ + speed.h +mem_calc.o: mem_calc.c \ + /home/speedy1/build/ppc_diag/includes/ppcboot.h \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + /home/speedy1/build/ppc_diag/includes/printf.h \ + mem_calc.h +mem_display.o: mem_display.c \ + /home/speedy1/build/ppc_diag/includes/printf.h \ + /home/speedy1/build/ppc_diag/includes/string.h +prandm.o: prandm.c \ + prandm.h +pkt_stat.o: pkt_stat.c \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + /home/speedy1/build/ppc_diag/includes/printf.h +detect_db.o: detect_db.c \ + /home/speedy1/build/ppc_diag/includes/diags.h \ + /home/speedy1/build/ppc_diag/includes/printf.h \ + /home/speedy1/build/ppc_diag/includes/center.h \ + /home/speedy1/build/ppc_diag/includes/gb_xilinx_test.h \ + detect_db.h diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/util/detect_db.c ppc_diag/util/detect_db.c --- ppc_diag-1.0.2/util/detect_db.c Thu Jan 9 16:27:48 2003 +++ ppc_diag/util/detect_db.c Mon May 12 14:12:45 2003 @@ -36,22 +36,21 @@ void display_green_box_info() { unsigned long *xil_version_reg = (unsigned long*)(XILINX_BASE_ADDR + - (XILVersions*4)); + (StatusReg*4)); char one_line[81]; - int hxctl_ver = 0, xman_ver = 0; + int hxctl_ver = 0; hxctl_ver = ((*xil_version_reg & HXCTL_REV_MASK) >> HXCTL_REV_SHIFT); - xman_ver = (*xil_version_reg & XMAN_REV_MASK); snprintf( one_line, 81, - "HDB-10 interface attached. hxctl rev.: %03x, xman rev.: %03x\n", - hxctl_ver, xman_ver ); + "HDB-10 interface attached. hxctl rev.: %02x\n", + hxctl_ver ); center_string( one_line ); } void detect_green_box() { unsigned long *xil_version_reg = (unsigned long*)(XILINX_BASE_ADDR + - (XILVersions*4)); + (StatusReg*4)); if ((*xil_version_reg & GREEN_BOX_ID_MASK) == GREEN_BOX_ID) green_box_present = 1; diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/util/mem_calc.c ppc_diag/util/mem_calc.c --- ppc_diag-1.0.2/util/mem_calc.c Thu Jan 9 16:27:48 2003 +++ ppc_diag/util/mem_calc.c Thu May 1 11:31:27 2003 @@ -33,7 +33,7 @@ /* simple-minded memory sizing routine: keep writing up one megabyte at a * time until it wraps back around to the base address */ -ulong calculate_memory_size( int display ) +ulong calculate_memory_size( int max_in_mb, int display ) { ulong memory_location = 0; ulong temp0 = 0, temp = 0; @@ -51,7 +51,7 @@ temp0 = *(ulong *)SDRAM_BASE_ADDR; /* keep what's living at address 0 */ *(ulong *)SDRAM_BASE_ADDR = 0xdeadbeef; /* unlikely to match */ for (memory_location = SDRAM_BASE_ADDR + ONE_MEG; - memory_location < (SDRAM_BASE_ADDR + (512 * ONE_MEG)); + memory_location < (SDRAM_BASE_ADDR + (max_in_mb * ONE_MEG)); memory_location += ONE_MEG ) { /* save the previous contents at this location */ diff --exclude=includes --exclude=CVS -urN ppc_diag-1.0.2/util/mem_calc.h ppc_diag/util/mem_calc.h --- ppc_diag-1.0.2/util/mem_calc.h Thu Jan 9 16:27:48 2003 +++ ppc_diag/util/mem_calc.h Thu May 1 11:31:27 2003 @@ -24,5 +24,5 @@ * declaration for calculate_memory_size() */ -ulong calculate_memory_size( int display ); +ulong calculate_memory_size( int max_in_mb, int display );