Home

Motorola Built-In Test (MBIT) Diagnostic Software User`s Manual

image

Contents

1. CL FUNK S ER our D 7 3129255 Ethernet Testing EEOAE D 9 VME Location Monitor Window Setup 22200080 11 D 12 APPENDIX E Known Issues Bas Oe oSubtest Ress ape le te pO RID DIO BN MEME E 1 APPENDIX Related Documentation Motorola Computer Group 1 Manuiactmets Re w n GSRS X PM F 2 qe re near F 3 xii List of Tables Table 3 Device Deseriptor DEY DESC osse deret cierta eit eed e eve 3 25 Table 3 2 Address Information ADDR INFO eee 3 28 Tube 3 3 Address Type ADDR 3 31 Table 3 4 Device Type DEV 3 33 Table MBIT Pault 5 1 Table 3 2 MBIT Fanlig ror rentre 5 4 Table F 1 Motorola Computer Group Documents eee F 1 Table P 3 Mati tacturers F 2 xiii About This Manual This manual explains how to install and use the Motorola Built In Test MBIT 1 01 diagnostic software for 51 family boards running the Wind River Systems Inc VxWorks real time operating system MBIT also depends on the use of the Tornado 2 1 devel
2. ERNO ERVAAR 2 11 petBit Nube SUB EESEBE i 2 11 getBu Number OI DE HU UA MUR ERIS 2 12 ju xls tror s ao OR STIL IT rtr P p 2 12 gerBi Max TestE1StEnt les peret 2 12 Terminate MBIT eneidiaa 2 13 Cerne BIU Wi eee eee 2 13 Example Usint MBIT ier tm 2 13 CHAPTER 3 Integrating Custom Diagnostics RER ree ere E AT 3 1 Diagnostic Integration Methods 223 eret rr rete R 3 1 adii Nc A eM ANE E E OO 3 2 ndabi evic edeni eee 3 2 ial xs dif RE t Doo S 3 3 PER MR FRE IRE M IRI UP 3 3 3 4 SU DEOR IETIDE AST ooi Prae 3 5 perBiiNumbertytASSOQIQBOD iiu iei ie aite pit ob EE 3 6 Implementing SUDESTE e 3 6 A DEOS Lus uti a oM a MEHR RUE Eu HUNE MM UR ER ARR LA D MADE 3 6 Example subtest SUDO R 3 8 Parameters iie cie diea eI EN THEME MD HORE MIS pea HO ED AR D EpL a MO 3 8 Example Subtest Parameter Configuration eser t i deletis 3 9 aubtest GO IEEE eoe
3. 1 END LOAD FUNC END LOAD STRING END BUFF LOAN NULL endif INCLUDE SECONDARY 0 END TBL END NULL 0 NULL FALSE New END TBL ENTRY endDevTbl 0 END LOAD FUNC END LOAD STRING END BUFF LOAN NULL RUE ifdef INCLUDE SECONDARY ENET 1 END LOAD FUNC END LOAD STRING END BUFF LOAN NULL RUE endif INCLUDE SECONDARY ENET 0 END TBL END NULL 0 NULL FALSE 10 Computer Group Literature Center Web Site GD82559ER Ethernet Testing To start the Ethernet interfaces after testing code similar to the following with appropriate changes to the network mask and IP address may be used include lt vxWorks h gt include lt end h gt include lt config h gt void startEthernet void int d extern END TBL ENTRY endDevTbl for i 0 endDevTbl i endLoadFunc END TBL END i endDevTbl i processed FALSE usrEndLibInit ipAttach 0 er ifMaskSet er0 Oxffffff00 ifAddrSet er0 192 168 0 3 ifdef INCLUDE ECONDARY_ENET ipAttach 1 er ifMaskSet erl Oxffffff00 ifAddrSet er1 192 168 1 3 fendif http www motorola com computer l
4. Parameters subtest is the current subtest device is the device to operate on Description This method finds the associated driver routine based on the subtest and logical device passed in This method looks up the device descriptor based on the logical device passed in The associated device driver routine is then called This method must be called before the drvDeinstall is called Return Values NO FAULT DETECTED no fault detected successful SUBTEST NOT SUPPORTED selected subtest is not supported on this device DEVICE NOT SUPPORTED device is not supported INSTALL NOT DEFINED device installation is not configured Refer to Chapter 5 MBIT Faults for more faults B 22 Computer Group Literature Center Web Site drvRead drvRead Name drvRead finds the associated driver routine based on the subtest and logical device passed in Synopsis include lt api bitGenericDriver h gt BIT_FAULT drvRead BIT_SUBTEST subtest BIT LOGICAL DEVICE device unsigned int bufferSize char buffer unsigned int bytesRead Parameters subtest is the current subtest device is the device to operate on bufferSize is the size of buffer in bytes buffer is the buffer to place data in bytesRead is a pointer to the number of bytes read Description This method finds the associated driver routine based on the subtest and logical devi
5. 35 Tnterupt Utility Methods T C 36 POMEL AGI NAR eee aeeat ee VENIR MIR UR MERO KHRUAR C 37 dto a M rper HT C 38 IntFoscelntLaloole E aestate extiterit iex ed oreste C 39 dpa s saone C 40 C 42 ALU Rss EMCEE Rie econ erie mer C 43 PCM ALES AN EE E EE ee wae C 44 E E E A C 45 Time Methods mp 45 LG DIE JEU MEET E T ETT C 46 bitis Del SC eiae ohana C 47 APPENDIXD Installing MBIT with Tornado 2 1 and VxWorks Installing MEAT from the CD ROM senioaren D 1 Installing MBIT on a Microsoft Windows Platform D 1 Creauns a VxWorks Image with the MBIT D 2 8 VxWorks SEE tesa akons MSIE VERAM E AEN AR RA DH D 2 Building a Va Works VME Slave Nee Ru Ca ERI D 5 Lon onn e Tanet ey go ios sigs eel Epp ep D 6 D 6 Modifying th P YX D 6 Modifying the MY MESI BSP D 7 xi Flash Memory
6. 3 10 23 irc acie rre at Lr AERE E EE 3 10 aDESsSt Install RETO oou ce ies are REESE EL eee REPAIR 3 11 Addition of Subtest Specific MBIT Faults 3 11 Example Subtest Watt iouis torio rhe e BUREAU AERE iaiia 3 11 Implementing ag MBIT Device Driver EIE erbe Hae toeqe te Hao idea 3 12 Device Dryer Interface aces eite traite i Ene des 3 12 dey install 3 13 oera cn iot 3 14 Mick c np 3 14 vi ases terre ees 3 15 M 3 15 ausser ER PEN EIRUNIR AS 3 16 GETOS 3 16 Device Driver IMENSE t 3 17 o oT 3 18 XA Dental I uc DAR RUNE N 3 19 SP 3 19 VASE soccer asics even erence eee 3 20 uc dudum 3 20 eu EAT aa sacan ears NAR eae 3 21 ud P d cei p 3 22 Installing a Device Driver into MBIT Environment s 3 23 Initializing the DB Vices ce ubt ER o 3 24 Initialization Method UC CERRAR URL 3 24 Device Descriptor
7. Meena AM DIU AUS 1 6 Spb Envelope TISE pq emm 1 7 Device Dala Dase 1 7 CHAPTER2 Using MBIT n m E 2 1 MBIT fc 2 2 nj p fee EA E E E D E S ETT E NOT 2 2 org ONE Dum c 2 3 IS boot caa OP STEN os peek Rape VIT MESE tenn KREY 2 3 Execuung Subtests n MBETI mE tiq bL eda 2 3 EXON DTE CS EH HRS TEE UR edhe 2 4 bunldbDetautt lestLast 2 5 2 6 rom 2 6 21 ases EAR PL LIP I RE Rp pr rA 2 7 laeisjulccg tT 2 7 DDR Vi NIE T uua 2 8 femen 2 8 T hE a ENNA E 2 8 MOTTE ani EIE DEC raea N 2 9 Obtains Faults an MBIT rtp ebd dra 2 9 sic saccnee P 2 9 Obtaining String Descriptions in MBIT corr 2 10 D E EA O E E E AA AN 2 10 getBuDevies Desc i oe 2 10 ccs cdcsotsumeadecerasanee hones 2 11 Obtaining Counts qn MBIT
8. DEY DIES 3 25 Device Address Table Array part of DEV DESC 3 27 Generic Device Address Table Structure part of DESC 3 30 Address Type ADDR 3 31 Deuce Type DEV TYPE icone teu e beo Ente RU orto ESAE BAUER Rd Utd 3 33 Device Read and Write Utility Methods oerte 3 33 Creating a Device Initialization Method 3 40 Creatine Diagnostic Associations 3 43 Using the Diagnostic Configuration Method 3 43 Example Diagnostic Configuration Method 3 45 CHAPTER 4 Utility Methods Tite ceti AR E ERREUR ERR e IRR AERE EER 4 1 Cache Unity EGS T 4 1 EE 4 2 ata BOM TEC seco rdi E intet ute ebd ME FRE RUM 4 3 ues cce ette trees EERE S 4 3 Eti ae e E es tes MH 4 3 IniDaraCaeheFhushInvalidatet recte Feet 4 4 ata ache aus corpse e DERE e pta DOREM DIES 4 4 incinie wife M 4 5 foveal sche 1 en ei apes poe oS 4 5 pe pean 4 5 iini Serdirdboro ll aerosani a a a ara a RA ERIRE SAREREA 4 6 ache
9. 400 MHz MPC7400 Commercial Models MVMES101 013x 400 MHz MPC7400 64MB ECC SDRAM 17MB Flash and 1MB L2 cache MVMES101 016x 400 MHz MPC7400 512MB ECC SDRAM 17MB Flash and 1MB L2 cache MVMES101 213x 400 MHz MPC7400 64MB ECC SDRAM 17MB Flash and 2MB L2 cache MVMES101 214x 400 MHz MPC7400 128MB ECC SDRAM 17MB Flash and 2MB L2 cache MVMES101 216x 400 MHz MPC7400 512MB ECC SDRAM 17MB Flash and 2MB L2 cache 400 and 500 MHz MPC7410 Commercial Models MVMES110 213x 400 MHz MPC7410 64MB ECC SDRAM and 2MB L2 cache MVMES110 214x 400 MHz MPC7410 128MB ECC SDRAM and 2 L2 cache MVMES110 215x 400 MHz MPC7410 256MB ECC SDRAM and 2MB L2 cache MVMES110 216x 400 MHz MPC7410 512MB ECC SDRAM and 2MB L2 cache MVMES110 223x 500 MHz MPC7410 64MB ECC SDRAM and 2MB L2 cache MVMES110 224x 500 MHz MPC7410 128MB ECC SDRAM and 2 L2 cache MVMES110 225x 500 MHz MPC7410 256MB ECC SDRAM and 2MB 1 2 cache MVMES110 226x 500 MHz MPC7410 512MB ECC SDRAM and2MB L2 cache Model Number Description 500 MHz MPC7410 Extended Temperature Models MVMES107 214x 500 MHz MPC7410 128MB ECC SDRAM and 2MB L2 cache MVMES107 215x 500 MHz MPC7410 256MB ECC SDRAM and 2MBL2 cache MVMES107 216x 500 MHz MPC7410 512MB ECC SDRAM and 2MB L2 cache Overview of Contents This manual is divided into the f
10. Generic Device Address Table Structure part of DEV_DESC Address Type ADDR Device Type TYPE Device Read and Write Utility Methods Computer Group Literature Center Web Site Device Initialization Method Device Descriptor Structure DEV_DESC The device descriptor structure describes the device to MBIT and Table 3 1 provides a description of each field All types and enumerations are located in utilities bitDeviceUtils h Table 3 1 Device Descriptor DEV_DESC Field logicalDev Description The logical device number This value is a BIT_LOGICAL_DEVICE representing the device devType General device descriptor information Valid values are described in the DEV_TYPE structure devName The device class name that the logical device belongs to pei The dev Vend method contains the PCI device and vendor ID defined by the PCI INFO structure The device initialization method must initialize dev Vend for PCI devices devVend should be initialized as device lt lt 16 vendor All other structure elements are initialized internally by MBIT reg A pointer to the address table structure This array defines each hardware address for a device genReg A pointer to the generic table structure This structure provides an association between generic register names and specific registers for a particular class of devices The members of the generic addre
11. A 16 Computer Group Literature Center Web Site abortBitTests A abortBitTests Name abortBitTests aborts any subtest in progress Synopsis include lt api bitApi h gt BIT_FAULT abortBitTests void Parameters No input parameters are required by this method Description This method terminates current test list processing and aborts any subtest in progress This method has no effect if a subtest is not executing or has already completed Tests with protected critical sections will not be aborted until the critical section is exited Test results for those tests already complete are made available in response to the submitted test list For each successfully submitted test list a single test results list is placed in the response queue Return Values BIT_NO_FAULT_DETECTED no fault detected successful BIT_INIT_NOT_PERFORMED MBIT initialization was already performed BIT_MESSAGE_QUEUE_ERROR could not queue MBIT message Refer to Chapter 5 MBIT Faults for more faults http www motorola com computer literature A 17 A API Method s Reference Pages getBitDeviceFault Name getBitDeviceFault obtains fault information for a specific logical device Synopsis include config bitCommonDefs h BIT_FAULT getBitDeviceFault BIT_LOGICAL_DEVICE device BIT_FAULT deviceFault Parameters device is the logical device for which fault data is being requested device
12. REG RDWR CLRS BITS Register read write reading or writing clears bits REG RD SIDE EFFECT Register read only reading adversely effects device REG WR SIDE EFFECT Register write only writing adversely effects device REG RDWR SIDE EFFECT Register read write reading or writing adversely effects device REG RD VISIBLE TEST Register read only location designated for read visibility testing REG WR VISIBLE TEST Register write only location designated for write visibility testing REG RDWR VISIBLE TEST Register read write location designated for read write visibility testing Memory Hardware Address Types MEM RD ONLY Memory read only MEM WR ONLY Memory write only http www motorola com computer literature Integrating Custom Diagnostics Table 3 3 Address Type ADDR_TYPE continued Field MEM_RDWR Description Memory read write MEM_RD_VISIBLE_TEST Memory read only location designated for read visibility testing MEM_WR_VISIBLE_TEST Memory write only location designated for write visibility testing MEM_RDWR_VISIBLE_TEST Memory read write location designated for read write visibility testing Serial ROM Hardware Address Types SROM_RD_ONLY Serial ROM read only SROM_WR_ONLY Serial ROM write only SROM_RDWR_ONLY Serial ROM read write SROM_RD_VISIBLE_TEST Serial ROM read only location
13. Upon successful completion getBitFaultDesc returns a string containing the fault description If it fails it returns No description supplied for fault Refer to Chapter 5 MBIT Faults for more return values Obtaining Counts in MBIT getBitNumberOfSubtests getBitNumberOfDevices getBitNumberOfFaults and getBitMaxTestListEntries return a count of subtests devices faults and test list entries getBitNumberOfSubtests getBitNumberOfSubtests returns the number of subtests Here s a synopsis of the getBitNumberOfSubtests method finclude lt api bitApi h gt int getBitNumberOfSubtests void http www motorola com computer literature 2 11 Using MBIT Upon successful completion getBitNumberOfSubtests returns the number of MBIT configured subtests Refer to Chapter 5 MBIT Faults for more return values getBitNumberOfDevices getBitNumberOfDevices returns the number of devices Here s a synopsis of the getBitNumberOfDevices method include lt api bitApi h gt int getBitNumberOfDevices void Upon successful completion getBitNumberOfDevices returns the number of MBIT configured devices Refer to Chapter 5 MBIT Faults for more return values getBitNumberOfFaults getBitNumberOfFaults returns the number of faults Here s a synopsis of the getBitNumberOfFaults method include lt api bitApi h gt int getBitNumberOfFaults void Upon successful completion getBitNumberOfFaults
14. H BIT VPD CRC FAUIT VPD CRC did not equal the calculated CRC H CLOCK RTC clock read fault H BIT RTC CLOCK SET FAULT RTC clock set fault H BIT RTC CLOCK ACCURACY FAUIT RTC clock accuracy fault 5 4 Computer Group Literature Center Web Site Pre Defined MBIT Faults Table 5 2 Pre Defined MBIT Faults continued Type MBIT Fault String Description H BIT_RTC_ALARM_FAULT RTC alarm timer fault H BIT_RTC_ALARM_ACCURACY_FAULT RTC alarm time accuracy fault H BIT_RTC_WATCHDOG_FAULT RTC watchdog timer fault H BIT_RTC_WATCHDOG_EARLY_FAULT RTC watchdog timer early fault H BIT_SERIAL_REGISTER_FAULT Serial register test fault H BIT_SERIAL_RECV_FAULT Serial receiver fault parity frame overrun H BIT_PARALLEL_REGISTER_FAULT Parallel register test fault H BIT_PARALLEL_FIFO_FAULT Parallel FIFO test fault H BIT_MPIC_INTERRUPT_FAULT MPIC interrupt controller fault H BIT_ISA_INTERRUPT_FAULT ISA interrupt controller fault H BIT_MPIC_INTERRUPT_MARGINAL MPIC interrupt controller marginal H BIT_ISA_INTERRUPT_MARGINAL ISA interrupt controller marginal H BIT_SCSI_SELECTION_FAULT SCSI target selection failed H BIT_SCSI_FIFO_CLEAR_FAULT SCSI and or DMA FIFOs failed to clear H BIT_SCSI_ARBITRATE_FAULT SCSI target arbitration fault H SCSI TIMER FAULT SCSI bus timer s indication of timeout failed H SCSI BMOVE TI
15. M n C 8 lucos rie p e UO C 9 butbataCacheUnlocEUE 2iuiisecice rea ib Hara bm AE bees C 10 BOG y aciei n Hout oru late C 11 12 bit ist acheisbndbledi sarsarak th Ep C 13 14 e M 15 lon Bdeviteiea S amm C 16 but AC seheb sable apt rc iHe part at e i MARRE CA Et ac bl y Ee pet C 17 EL d E C 18 MISI See eee net Re Pe Ree es E 19 ded M LN UEM T TTE C 20 Intl 26 dolis SBROBIGON Lecce REIR FEREBIR Cord Riz FAEERE APER UMANE FERE DARAN C 21 ELE oL MR o RES C 22 isti va DOT Fico etd ot a ad dba C 23 Earl 20 sc C 24 Lo Be LOCK er S C 25 Ear C sc Be DOE RO osi pe poteet tp OU er C 26 bog kabet I Deme DORUM ERE DOR C 27 PRLE Ia RM C 28 butL2tachels iue esses ete terr FERE EARS SEVERE AREE C 30 Diagnostic Device Methods aec debated ite a C 30 iip 31 Ce OGY get t LETT C 32 but CK CBEST sj cake wear C 33 db Rt cT C 34 A S e fee MR eee
16. access to the device then bitProbeOut8 bitProbeOut16 bitProbeOut32 should be used Return Values This method always returns 0 Refer to Chapter 5 MBIT Faults for more faults B 46 Computer Group Literature Center Web Site bitInSwap 16 320 bitlnSwap16 32 Name bitInSwap16 32 reads and byte swaps 16 32 bit data from the designated address Synopsis include utilities bitDeviceUtils h STATUS bitInSwap16 ULONG addr UINT32 pdata STATUS bitInSwap32 ULONG addr UINT32 pdata Parameters addr is the address to read data from pdata is the pointer to a 32 bit location to store data Description This method reads and byte swaps 16 32 bit data from the designated address The data is read as little big endian and loaded as big little endian into a 32 bit memory location This method requires a 32 bit memory location for storing the data because it is used by the device utility methods bitIn bitOut These methods store the location s contents in the 32 bit value field of the ADDR INFO structure The MBIT exception handler is not enabled during the data read If the MBIT exception handler is needed to catch exceptions caused by the access to the device then bitProbeInSwap16 bitProbeInS wap32 should be used Return Values This method always returns 0 Refer to Chapter 5 MBIT Faults for more faults http www motorola com computer literature B 47 Integrating
17. unsigned int bytesRead BIT FAULT drvWrite DEV DESC devDescPtr unsigned int bufferSize char buffer unsigned int bytesWritten FAULT drvlIoctl DEV DESC devDescPtr int function int argument Parameters drvInstall is the driver install entry point Also refer to devXXXInstall on page B 29 drvDeinstall is the driver deinstall entry point Also refer to devXXXDeinstall on page B 31 drvOpen is the driver open entry point Also refer to devXXXOpen on page B 33 B 10 Computer Group Literature Center Web Site installBitDriver drvClose is the driver close entry point Also refer to devXXXClose on page B 34 drv Read is the driver read entry point Also refer to devXXXRead on page B 35 drv Write is the driver write entry point Also refer to devXXXWrite on page B 37 drvloctl is the driver ioctl entry point Also refer to devXXXlIoctl on page B 39 Description This method installs the driver entry points When you add a driver you must implement all of the driver entry points Return Values DRV_DESC pointer to the driver descriptor NULL an error occurred Refer to Chapter 5 MBIT Faults for more faults http www motorola com computer literature B 11 Integrating Custom Diagnostics Reference Pages installBitSubtestEntries Name installBitSubtestEntries installs the required subtest entry points and sets the default parameters
18. Chapter 5 MBIT Faults bitInstCacheEnable This method invalidates and then enables the L1 instruction cache Here s a synopsis of the bitInstCacheEnable method lt utilities bitCacheUtils h gt BIT_FAULT bitInstCacheEnable void Upon successful completion this method returns BIT_NO_FAULT_DETECTED otherwise it may return any of the return values listed in Appendix C Utility Methods Reference Pages and Chapter 5 MBIT Faults http www motorola com computer literature 4 5 Utility Methods bitInstCacheDisable This method disables the L1 instruction cache Here s a synopsis of the bitInstCacheDisable method lt utilities bitCacheUtils h gt BIT_FAULT bitInstCacheDisable void Upon successful completion this method returns BIT_NO_FAULT_DETECTED otherwise it may return any of the return values listed in Appendix C Utility Methods Reference Pages and Chapter 5 MBIT Faults bitInstCachelsEnabled This method returns the boolean enable state of the L1 instruction cache Here s a synopsis of the bitInstCacheIsEnabled method lt utilities bitCacheUtils h gt BOOL bitInstCacheIsEnabled void Upon successful completion this method returns TRUE if the L1 instruction cache is enabled or FALSE if the L1 instruction cache is not enabled Refer to Chapter 5 MBIT Faults for more faults bitlnstCacheLock This method locks the L1 instruction cache Here s a synopsis of the bitInstC
19. Name getBitDeviceDesc obtains a string describing a logical device Synopsis include config bitCommonDefs h const char getBitDeviceDesc BIT LOGICAL DEVICE devicelId Parameters deviceld is an ID specifying a unique device Description This method returns a string describing the logical device Return Values Upon successful completion getBitDeviceDesc returns a string containing the device description If it fails it returns an empty string Refer to Chapter 5 MBIT Faults for more faults A 20 Computer Group Literature Center Web Site getBitFaultDesc A getBitFaultDesc Name getBitFaultDesc obtains a string describing a subtest fault Synopsis include lt config bitCommonDefs h gt const char getBitFaultDesc BIT FAULT faultId Parameters is an ID specifying a unique fault Description This method returns a string describing the subtest fault Return Values Upon successful completion getBitFaultDesc returns a string containing the fault description If it fails it returns No description supplied for fault Refer to Chapter 5 MBIT Faults for more faults http www motorola com computer literature A 21 API Method s Reference Pages A getBitSubtestldByNamer Name getBitSubtestIdByName Treturns subtest string identifier ID Synopsis include config bitCommonDefs h BIT SUBTEST getBitSubtestIdByName co
20. Parameters No input parameters are required by this method Description This method invalidates and then enables the L1 instruction cache Return Values BIT_NO_FAULT_DETECTED no fault detected success BIT_PROCESSOR_NOT_SUPPORTED unknown processor type BIT_CACHE_ROUTINE_NOT_SUPPORTED cache routine is not supported Refer to Chapter 5 MBIT Faults for more faults http www motorola com computer literature C 11 Utility Methods Reference Pages bitInstCacheDisable Name bitInstCacheDisable disables the L1 instruction cache Synopsis utilities bitCacheUtils h BIT FAULT bitInstCacheDisable void Parameters No input parameters are required by this method Description This method disables the L1 instruction cache Return Values NO FAULT fault detected success BIT PROCESSOR NOT SUPPORTED unknown processor type CACHE ROUTINE NOT SUPPORTED cache routine is not supported BIT CACHE NOT ENABLED cache must be enabled before calling cache function Refer to Chapter 5 MBIT Faults for more faults C 12 Computer Group Literature Center Web Site bitInstCacheIsEnabled bitInstCachelsEnabled Name bitInstCacheIsEnabled gives the enabled state of the L1 instruction cache Synopsis lt utilities bitCacheUtils h gt BOOL bitInstCacheIsEnabled void Parameters No input parameters are required by this method Descript
21. Synopsis include lt config bitTestUtils h gt BIT FAULT installBitSubtestEntries BIT SUBTEST subtest installTest BIT_SUBTEST subtest BIT_LOGICAL_DEVICE device E void testParamPtr BIT_FAUL deinstallTest BIT_SUBTEST subtest BIT_LOGICAL_DEVICE device void testParamPtr BIT_FAUL runTest BIT_SUBTEST subtest BIT_LOGICAL_DEVICE device void testParamPtr int interations int duration BIT_TEST_CONTROL control BIT_FAUL freeParamPtr BIT_SUBTEST subtest void testParamPtr BIT_FAUL initParamPtr BIT_SUBTEST subtest void testParamPtr int paramSize Parameters subtest is the subtest ID the methods and default parameters are associated with installTest is the subtest installation method B 12 Computer Group Literature Center Web Site installBitSubtestEntries deinstallTest is the subtest de installation method runTest is the actual test method iterations is the default number of times to run the test duration is the default maximum number of milliseconds the test is allowed to run control is the default test control to halt on the first error detected or to run until test completion if possible freeParamPtr is the pointer to the free parameter method This method is responsible for memory de allocation of the par
22. Utility Methods Reference Pages and Chapter 5 MBIT Faults bitDataCachelnvalidate This method invalidates the L1 data cache for a range of memory Here s a synopsis of the bitDataCacheInvalidate method lt utilities bitCacheUtils h gt BIT_FAULT bitDataCacheInvalidate void address UINT bytes where address is the virtual address to begin invalidation and bytes is the number of bytes to invalidate Upon successful completion this method returns BIT NO FAULT DETECTED otherwise it may return any of the return values listed in Appendix C Utility Methods Reference Pages and Chapter 5 MBIT Faults 4 4 Computer Group Literature Center Web Site bitDataCacheLock bitDataCacheLock This method locks the L1 data cache Here s a synopsis of the bitDataCacheLock method lt utilities bitCacheUtils h gt BIT FAULT bitDataCacheLock void Upon successful completion this method returns BIT NO FAULT DETECTED otherwise it may return any of the return values listed in Appendix C Utility Methods Reference Pages and Chapter 5 MBIT Faults bitDataCacheUnlock This method unlocks the L1 data cache Here s a synopsis of the bitDataCacheUnlock method lt utilities bitCacheUtils h gt BIT_FAULT bitDataCacheUnlock void Upon successful completion this method returns BIT_NO_FAULT_DETECTED otherwise it may return any of the return values listed in Appendix C Utility Methods Reference Pages and
23. addBitSubtestident Name addBitSubtestIdent adds a subtest entry Synopsis include lt config bitTestUtils h gt BIT_FAULT addBitSubtestIdent const char subtest const char description BIT SUBTEST id Parameters subtest is the unique subtest name description is the description of the subtest name id is the unique ID being returned that represents the subtest Description This method adds a subtest entry with the provided identifier and description B 2 Computer Group Literature Center Web Site addBitSubtestIdent Return Values NO FAULT fault detected successful INIT ALREADY PERFORMED MBIT initialization was already performed INIT ALLOCATION ERROR required resources for initialization are unavailable INVALID TEST PARAM invalid parameter was supplied DUPLICATE IDENT name of the identifier already exists RESOURCE MGMT FAULT memory management error occurred INVALID LIST CONTENT content of list is invalid Refer to Chapter 5 MBIT Faults for more faults http www motorola com computer literature B 3 Integrating Custom Diagnostics Reference Pages addBitDeviceldent Name addBitDeviceIdent adds a device entry Synopsis include lt config bitTestUtils h gt BIT FAULT addBitDeviceIdent const char device const char description BIT LOGICAL DEVICE id Parameters d
24. bufferAddr points to the first element of the data buffer that the driver stores the data that is read from the device The caller must provide a data buffer sufficiently large enough to accept the requested number of bytes defined in the buffer size parameter bytesRead points to the variable that the driver returns as the number of bytes read In the event of an error the byte count should reflect the actual byte count of the received data The return values for this method are determined by the developer dev XXXWrite devXXXWrite allows the driver to write information to the device It receives a pointer to the device descriptor of the device being tested the requested buffer size a pointer to the buffer address and a pointer to a variable that holds the number of bytes written The developer should also update the variable pointed to by the bytesWritten parameter before returning to the caller Refer to Appendix B Integrating Custom Diagnostics Reference Pages for more information on this method http www motorola com computer literature 3 21 Integrating Custom Diagnostics Here s a synopsis of the devXXXWrite method devxxxWrite DEV_DESC pDevDesc UINT32 bufferSize INT8 bufferAddr UINT32 bytesWritten where pDevDesc bufferSize bufferAddr and bytesWritten are the input parameters pDevDesc is a pointer to a structure that contains all of the registers that are needed to perform
25. device The test entry must be allocated before this method is called Return Values BIT_NO_FAULT_DETECTED no fault detected successful BIT_INIT_NOT_PERFORMED MBIT initialization was already performed INVALID TEST PARAM invalid parameter was supplied Refer to Chapter 5 MBIT Faults for more faults http www motorola com computer literature A 13 A A API Method s Reference Pages getBitResponse Name getBitResponse obtains a list of test results Synopsis include lt api bitApi h gt BIT_FAULT getBitResponse TEST_RESULTS_ENTRYtestResults unsigned int numberOfResults Parameters testResults is a user allocated array for the test results numberOfResults receives the number of entries in the test results list If the number of results exceeds the value returned by getBitMaxTestListEntries an error is returned The number of testResults entries allocated must be greater than or equal to the number of test entries submitted with executeBitTests The number of testResults returned will be less than or equal to the number of test entries submitted with executeBitTests Description This method obtains the results of a test list submitted by invoking executeBitTests This method blocks until the executing test list completes times out or aborts If this method is called when no tests are executing it blocks the viewing of test results until a call is made to
26. refer to Address Type ADDR dev An integer ID representing the device associated with the hardware address This must match logicalDev from the DEV DESC containing the ADDR INFO changes A structure keeps track of bits toggled when accessing the hardware address through bitInQ bitOut If a device s addressable memory is not continuous the offset is multiplied by an address interval to get to the address needed for example address base address offset address interval 3 28 Computer Group Literature Center Web Site Device Initialization Method Devices that support auto configuration of the base address specified by BIT AUTO BASE ADDR will only require the offset for each hardware address Run time initialization code will calculate the complete base address by adding the address offset to the base address for each hardware address PCI devices are the only devices that support BIT AUTO BASE ADDR Devices that map different register sets using different base addresses may require several address tables Each address table for the device will be combined into the same array and only the names and address calculations will differ This is specifically useful for PCI devices that map different registers using different PCI base address registers that is BARO BARI etc Below is an example of the device address table C structure typedef struct BAR 0 I O ma
27. tatus buildBitDefaultTestEntry subtest device test tatus executeBitTests HALT ON ERROR 1 test tatus getBitResponse testResults amp numResults S S S S tatus terminateBit 2 14 Computer Group Literature Center Web Site Integrating Custom Diagnostics Introduction This chapter explains integrating custom diagnostics for a developer The diagnostic integration methods are used for configuring devices and subtests and are used throughout this chapter Diagnostic Integration Methods MBIT provides the following methods for integrating diagnostics Method Description addBitSubtestIdent Adds a subtest entry addBitDeviceldent Adds a device entry addBitFaultIdent Adds a fault entry createBitTestAssociations Creates an association between a device subtest and a driver installBitDriver Installs the methods for the driver installBitSubtestEntries Installs the methods for the test and sets the test defaults getBitNumberOfAssociations Obtains the number of associations These methods may only be used during the initialization of MBIT with the exception of getBitNumberOfAssociations These methods are used by the configuration methods that setup devices and or subtests and may not be called during the diagnostic test 3 1 Integrating Custom Diagnostics addBitSubtestident This method ad
28. 0 If an exception occurs is returned Refer to Chapter 5 MBIT Faults for more faults B 42 Computer Group Literature Center Web Site bitProbeInSwap 16 320 bitProbelnSwap16 32 Name bitProbeInS wap16 32 Treads and byte swaps 16 32 bit data from designated address Synopsis include utilities bitDeviceUtils h STATUS bitProbeInSwapl6 ULONG addr UINT32 pdata STATUS bitProbeInSwap32 ULONG addr UINT32 pdata Parameters addr is the address to read data from pdata is the pointer to a 32 bit location to store data Description This method reads and byte swaps 16 32 bit data from the designated address The data is read as little big endian and loaded as big little endian into a 32 bit memory location This method requires a 32 bit memory location for storing the data because it is used by the device utility methods bitIn bitOut These methods store the location s contents in the 32 bit value field of the ADDR INFO structure The MBIT exception handler is enabled during the data read If the MBIT exception handler is not necessary to catch exceptions caused by the access to the device then bitInSwap16 bitInSwap32 should be used Return Values Upon successful completion this method returns 0 If an exception occurs is returned Refer to Chapter 5 MBIT Faults for more faults http www motorola com computer literature B 43 Integrating Custom D
29. 1 and VxWorks Creating a VxWorks Image with the MBIT API To create a VxWorks image with MBIT included and the necessary kernel extensions for MBIT do the following Note These instructions assume C Tornado is the Tornado 1 installation directory Create a directory for the project The following instructions assume the directory created is D BIT Copy the C Tornado target config mv5100 configNet h C Tornado target src MBIT mv5100 50BIT VME slave cdf C Tornado target src MBIT mv5100 50MVME5100 512MB Memory cdf C Tornado target src MBIT mv5100 60M VME5100 cdf C Tornado target src MBIT mv5100 65MBIT cdf C Tornado target src MBIT mv5100 67BITBSPPA RAMS cdf and C Tornado target src MBIT mv5100 70BIT cdf files to D BIT Edit configNet h as described in GD62559ER Ethernet Testing on page D 9 Building a VxWorks Image To build a VxWorks image complete the following steps 1 2 3 Start Tornado Select File New Project Select Create a bootable VxWorks image custom configured Choose OK Enter project name description and workspace as desired Enter project location as D BIT the cdf files must be in the same directory as the project file Choose Next Select A BSP D 2 Computer Group Literature Center Web Site Building a VxWorks Image 10 11 12 13 14 15 16 17 18 19 20 21 Select mv5100 from the drop down list next to the
30. 19 drvInstall 3 13 B 17 drvloctl 3 16 B 27 drvOpen 3 14 B 21 drvRead 3 15 B 23 drvWrite 3 16 B 25 E Ethernet testing D 9 examples create device initialization method 3 40 device address table C structure 3 29 diagnostic configuration method 3 45 generic device address table C structure 3 30 installBitDriver 3 23 subtest configuration 3 11 subtest parameter configuration 3 9 subtest structure 3 8 using MBIT 2 13 executeBitTests 2 4 3 8 A 7 executing a test 1 7 executing test lists 2 5 F fault database 1 7 fault entry add 3 3 faults built in 5 1 http www motorola com computer literature IN 3 lt moz xXmoz pre defined 5 4 faults obtain number of 2 12 features MBIT 1 3 Flash memory testing D 7 G generic device address table 3 30 generic device driver interface 3 12 generic device driver methods B 15 drvClose 3 15 B 22 drvDeinstall 3 14 B 19 drvInstall 3 13 B 17 drvloctl 3 16 B 27 drvOpen 3 14 B 21 drvRead 3 15 B 23 drvWrite 3 16 B 25 getBitDeviceDesc 2 10 A 20 getBitDeviceFault 1 7 2 9 A 18 getBitDeviceldByName 2 8 A 23 getBitFaultDesc 2 11 A 21 getBitFaultIdByName 2 9 A 24 getBitMaxTestListEntries 2 12 A 28 getBitNumberOfAssociations 3 1 3 6 B 15 getBitNumberOfDevices 2 12 A 26 getBitNumberOfFaults 2 12 A 27 getBitNumberOfSubtests 2 11 3 10 A 25 getBitResponse 2 6 A 14 getBitSubtestDes
31. ADDR_INFO ramBankE ADDR_INFO ramBankF ADDR_INFO ramBankG ADDR_INFO ramBankH BIT RAM GENREG T This structure is accessed through the device descriptor member genReg The members of the generic address table are ADDR INFO structure pointers The generic register references must point to hardware addresses with the same format for all devices the developer designs the code to support Also the generic device address table structure must be allocated by the device initialization method This structure is free d by MBIT during termination 3 30 Computer Group Literature Center Web Site Device Initialization Method Address Type ADDR_TYPE The address type provides MBIT with additional information about the hardware address This type may indicate a register memory or a serial ROM hardware address In addition the behavior that is readable writeable etc of the hardware address may be described Table 3 3 Address Type ADDR_TYPE Field Description Register Hardware Address Types REG_RD_ONLY Register read only REG_WR_ONLY Register write only REG_RDWR Register read write REG_RD_ONLY_CLRS_BITS Register read only reading clears bits REG_WR_ONLY_CLRS_BITS Register write only writing clears bits REG_RDWR_RD_CLRS_BITS Register read write reading clears bits REG_RDWR_WR_CLRS_BITS Register read write writing clears bits
32. Allows MBIT to prepare the driver for subsequent access of the device devXXXDelnstall Allows the user to terminate the use of the driver devXXXOpen Allows the user to prepare the device for testing devXXXClose Allows the user to close the device in preparation for terminating use of the device devXXXRead Allows the user to read information from the device devXXXWrite Allows the driver to write information to the device devXXXloctl Allows the driver to perform special operations with the device dev XXXlnstall devX XXInstall allows MBIT to prepare the driver for subsequent access of the device The driver should save all of the necessary device registers for restoration when the test is complete This method receives a pointer to the device descriptor of the device being tested All of the necessary device registers are contained in this structure The driver should use these register definitions to interface with the correct device This method is responsible for allocating required resources that is buffers semaphores etc and saving the state of the device It is also responsible for installing any required interrupt service methods This method may also disable the device driver supplied by the underlying OS if such a capability is supported Refer to Appendix B Integrating Custom Diagnostics Reference Pages for more information on this method Here s a synopsis of the devXX XInsta
33. C 15 bitInSwap16 32 3 38 B 47 bitIntConnect 4 17 C 40 bitIntDisable 4 19 45 bitIntEnable 4 19 C 44 bitIntLock 4 16 C 37 bitIntUnlock 4 17 C 38 bitIntVectorSet 4 18 C 43 bitL2CacheDisable 4 8 C 18 bitL2CacheEnable 4 7 C 17 bitL2CacheFill 4 12 C 28 bitL2CacheFlush 4 9 C 22 bitL2CacheFlushInvalidate 4 10 C 23 bitL2CacheInvalidate 4 10 C 24 bitL2CacheIsEnabled 4 9 C 21 xXmoz bitL2CacheIsLockable 4 11 C 27 bitL2CacheIsWritebackCapable 4 12 C 30 bitL2CacheLock 4 11 C 25 bitL2CacheOff 4 9 C 20 bitL2CacheOn 4 8 C 19 bitL2CacheSizeGet 4 7 C 16 bitL2CacheUnlock 4 11 C 26 bitMsDelay 4 20 C 47 bitOut 4 15 C 35 bitOut8 16 32 3 37 B 46 bitOutSwap16 32 3 39 B 48 bitPciRead32 3 40 B 50 bitPciWrite32 3 39 B 49 bitProbeIn8 16 32 3 34 B 41 bitProbeInSwap16 32 3 35 B 43 bitProbeOut8 16 32 3 35 B 42 bitProbeOutSwap16 32 3 36 B 44 bitTrackChanges 4 14 C 33 bitUsDelay 4 20 C 46 board level MBIT 1 1 boot the target D 6 build VxWorks image D 2 build VxWorks VME slave image D 5 buildBitDefaultTestEntry 2 6 A 13 buildBitDefaultTestList 2 5 A 11 built in faults 5 1 C cache utility methods 4 1 C 1 bitDataCacheDisable 4 3 C 4 bitDataCacheEnable 4 2 C 3 bitDataCacheFlush 4 3 C 6 bitDataCacheFlushInvalidate 4 4 C 7 bitDataCacheInvalidate 4 4 C 8 bitDataCacheIsEnabled 4 3 C 5 bitDataCacheLock 4 5 C 9 bitDataCache
34. Custom Diagnostics Reference Pages bitOutSwap16 32 Name bitOutSwap16 32 writes and byte swaps 16 32 bit data to the designated address Synopsis include lt utilities bitDeviceUtils h gt STATUS bitOutSwap16 ULONG addr UINT16 data STATUS bitOutSwap32 ULONG addr UINT32 data Parameters addr is the address to write data to data is the data to write out Description This method byte swaps and writes 16 32 bit data to the designated address The big little endian data is written into a 16 32 bit data location as little big endian The MBIT exception handler is enabled during the data read If the MBIT exception handler is not necessary to catch exceptions caused by the access to the device then bitProbeOutSwap16 bitProbeOutS wap32 should be used Return Values This method always returns 0 Refer to Chapter 5 MBIT Faults for more faults B 48 Computer Group Literature Center Web Site bitPciWrite32 bitPciWrite32 Name bitPciWrite32 writes 32 bit data to PCI I O or memory space in little endian mode Synopsis include utilities bitDeviceUtils h void bitPciWrite32 ULONG addr UINT32 data Parameters addr is the address to write data to data is the data to write out Description This method writes 32 bit data to PCI I O or memory space in little endian mode Return Values This method has no return values Refer to Chapter 5
35. Description This method reads 8 16 32 bit data from the designated address The data read is written into a 32 bit memory location This method requires a 32 bit memory location for storing the data because it is used by the device utility methods bitIn bitOut These methods store the location s contents in the 32 bit value field of the ADDR INFO structure The MBIT exception handler is not enabled during the data read If the MBIT exception handler is needed to catch exceptions caused by the access to the device then bitProbeIn8 bitProbeIn16 bitProbeIn32 should be used Return Values This method always returns 0 Refer to Chapter 5 MBIT Faults for more faults http www motorola com computer literature B 45 Integrating Custom Diagnostics Reference Pages bitOut8 16 32 Name bitOut8 16 320Q writes 8 16 32 bit data to the designated address Synopsis include lt utilities bitDeviceUtils h gt STATUS bitOut8 ULONG addr UINT8 data STATUS bitOut16 ULONG addr UINT16 data STATUS bitOut32 ULONG addr UINT32 data Parameters addr is the address to write data to data is the data to write out Description This method writes 8 16 32 bit data to the designated address The data is written into an 8 16 32 bit memory location The MBIT exception handler is not enabled during the data write If the MBIT exception handler is needed to catch exceptions caused by the
36. Group Literature Center Web Site Example Diagnostic Configuration Method Example Diagnostic Configuration Method The steps below show an example of the diagnostic configuration method This example configures a diagnostic with two subtests two fault one device and one driver BIT_FAULT xxxLoopbackConfigTest 1 Declare and initialize local variables BIT_FAULT faultCode NO_FAULT_DETECTED int loopbackSubtests 2 int loopbackDevices 1 int loopbackFaults 2 DRV DESC pDrvDesc 2 Add the fault and subtest identifiers faultCode addBitFaultIdent LOOPBACK_FAULT_ONE Loopback fault number one BIT_HARDWARE_FAULT amp loopbackFaults 0 faultCode addBitFaultIdent LOOPBACK FAULT TWO Loopback fault number two BIT_HARDWARE_FAULT amp loopbackFaults 1 faultCode addBitSubtestIdent LOOPBACK SUBTEST ONE Loopback subtest number one amp loopSubtests 0 faultCode addBitSubtestIdent LOOPBACK SUBTEST TWO Loopback subtest number two amp loopSubtests 1 http www motorola com computer literature 3 45 Integrating Custom Diagnostics 3 Install each of the subtests faultCode installBitSubtestEntries loopbackSubtest 0 installLoopbackOneTest deinstallLoopbackOneTest runLoopbackOneTest 1 1000 RUN TILL COMPLETION freeLoopbackParams initLoopbackParams sizeof XXX LOOPBACK PA
37. MBIT Faults for more faults http www motorola com computer literature B 49 Integrating Custom Diagnostics Reference Pages bitPciRead32 Name bitPciRead32 reads 32 bit data to PCI I O or memory space Synopsis include lt utilities bitDeviceUtils h gt void bitPciRead32 ULONG addr UINT32 pdata Parameters addr is the address to read data from pdata is the pointer to a 32 bit location to store data Description This method reads 32 bit data from PCI I O or memory space Return Values This method has no return values Refer to Chapter 5 MBIT Faults for more faults B 50 Computer Group Literature Center Web Site Utility Methods Reference Pages This appendix provides detailed information about the utility methods mentioned in Chapter 4 Utility Methods Cache Utility Methods Diagnostic Device Utility Methods Interrupt Utility Methods Time Utility Methods Cache Utility Methods MBIT provides the following cache utility methods bitDataCacheEnable bitDataCacheDisable bitDataCachelsEnabled bitDataCacheFlush bitDataCacheF lushInvalidate bitDataCachelnvalidate bitDataCacheLock bitDataCache Unlock bitInstCacheEnable bitInstCacheDisable bitInstCachelsEnabled bitInstCacheLock bitInstCacheUnlock C 1 Utility Methods Reference Pages bitL2 CacheSizeGet bitL2CacheEnable bitL2CacheDisable bitL2CacheOn bitL2CacheOf bi
38. Name bitIntLock locks out all interrupts Synopsis lt utilities bitExceptionUtils h gt void bitIntLock void Parameters No input parameters are required by this method Description This methods increments an interrupts locked reference count and if interrupts are not locked it locks all interrupts Return Values No return values Refer to Chapter 5 MBIT Faults for more faults http www motorola com computer literature C 37 Utility Methods Reference Pages bitIntUnlock Name bitIntUnlock Tre enables interrupts Synopsis lt utilities bitExceptionUtils h gt void bitIntUnlock void Parameters No input parameters are required by this method Description This method decrements the interrupts locked reference count incremented by bitIntLock and if the reference count is 0 it unlocks all interrupts Return Values No return values Refer to Chapter 5 MBIT Faults for more faults C 38 Computer Group Literature Center Web Site bitForceIntUnlock bitForcelntUnlock Name bitForceIntUnlock forces the re enable of interrupts Synopsis utilities bitExceptionUtils h void bitForceIntUnlock void Parameters No input parameters are required by this method Description This method sets the interrupts locked reference count to 0 and unlocks all the interrupts locked by bitIntLock Return Values No return values Refer to Chapter 5
39. Refer to Chapter 5 MBIT Faults for more faults B 20 Computer Group Literature Center Web Site drvOpen drvOpen Name drvOpen finds the associated driver routine based on the subtest and logical device passed in Synopsis include lt api bitGenericDriver h gt BIT_FAULT drvOpen BIT_SUBTEST subtest BIT LOGICAL DEVICE device Parameters subtest is the current subtest device is the device to operate on Description This method finds the associated driver routine based on the subtest and logical device passed in This method looks up the device descriptor based on the logical device passed in The associated device driver routine is then called Return Values NO FAULT DETECTED o fault detected successful SUBTEST NOT SUPPORTED selected subtest is not supported on this device DEVICE NOT SUPPORTED device is not supported DRIVER SEQUENCE ERROR 4driver methods invoked out of order INSTALL NOT DEFINED 4device installation is not configured Refer to Chapter 5 MBIT Faults for more faults http www motorola com computer literature B 21 Integrating Custom Diagnostics Reference Pages B drvClose Name drvClose finds the associated driver routine based on the subtest and logical device passed in Synopsis include lt api bitGenericDriver h gt BIT_FAULT drvClose BIT_SUBTEST subtest BIT LOGICAL DEVICE device
40. UINT32 pdata where addr is the PCI address to read data from and pdata is the pointer to store data to This method has no return values Refer to Appendix B Integrating Custom Diagnostics Reference Pages and Chapter 5 MBIT Faults for more information Creating a Device Initialization Method This section provides an example of the required steps to create a device initialization method The method is responsible for adding the device to the device list and setting device default information The method begins by making a call to addBitDeviceIdent to add the device A call to the getDevTablePtr method is then made to get a pointer to the device descriptor associated with the added device The device descriptor is used to fill in all the data for that particular device Refer to Device Descriptor Structure DEV DESC on page 3 25 for a description of the device descriptor structure 3 40 Computer Group Literature Center Web Site Creating a Device Initialization Method The following is an outline of a device initialization method for a device on MVMES1xx board The device being added is the system memory tMemoryController void Used to ca tch the return controller SMC BIT FAULT ini BIT_FAULT faultCode BIT_LOGICAL_DEVICE memDev from addBitDeviceIdent EV D ESC pDevDesc Device descriptor pointer Optional Declare and allocate the gen
41. a write operation on the device Using the register definitions in the device descriptor guarantees that the correct device is being accessed bufferSize contains the number of bytes that the user expects to write to the device If the device supports transfers wider than a byte the driver should adjust the count appropriately bufferAddr points to the first element of the data buffer that the driver reads data that is to be written to the device The caller should provide a data buffer sufficiently large enough to reflect the requested number of bytes defined in the bufferSize parameter bytesWritten points to the variable that the driver returns as the number of bytes written In the event of an error the bytesWritten variable should reflect the actual byte count of the output data The return values for this method are determined by the developer devXXXloctl devXXXlIoctl allows the driver to perform special operations with the device It receives a pointer to the device descriptor of the device being tested the requested function and an argument Refer to Appendix B Integrating Custom Diagnostics Reference Pages for more information on this method 3 22 Computer Group Literature Center Web Site Installing a Device Driver into the MBIT Environment Here s a synopsis of the devXXXToctl method devXXXIoctl DEV DESC pDevDesc INT32 function INT32 argument where pDevDesc function and ar
42. after executing tests As a result the fault database clears and the Fail LED extinguishes Return Values NO FAULT DETECTED no fault detected successful INIT NOT PERFORMED MBIT initialization was already performed OPERATION IN PROGRESS MBIT test or abort in progress MESSAGE QUEUE ERROR could not queue MBIT message Refer to Chapter 5 MBIT Faults for more faults http www motorola com computer literature 5 API Method s Reference Pages A isBitlnitializationComplete Name isBitInitializationComplete Treturns the MBIT initialization status Synopsis include lt api bitApi h gt BOOLEAN isBitInitializationComplete void Parameters No input parameters are required by this method Description This method returns the MBIT initialization status Return Values TRUE MBIT initialization is complete FALSE MBIT initialization is not complete Refer to Chapter 5 MBIT Faults for more faults A 6 Computer Group Literature Center Web Site executeBitTests executeBitTests Name executeBitTests submits and executes a list of subtests Synopsis include lt api bitApi h gt FAULT executeBitTests TEST CONTROL listControl unsigned int testCount TEST ENTRY testList Parameters listControl specifies HALT ON ERROR or RUN TILL COMPLETION see config bitCommonDefs h testCount is the number of
43. cache is lockable or FALSE if the L2 cache is not lockable Refer to Chapter 5 MBIT Faults for more faults http www motorola com computer literature 4 11 Utility Methods bitL2CacheFill This method fills the specified number of 32 bit words in the L2 cache with the specified pattern The pattern is incremented by the modifier after every write Here s a synopsis of the bitL2CacheFill method utilities bitCacheUtils h BIT FAULT bitL2CacheFill UINT bufPtr UINT castOutBuf UINT wordCount UINT pattern int modifier where bufPtr is a pointer to a cacheable buffer to fill castOutBuf is a pointer to a cacheable buffer to fill that causes data to be cast out from the L1 data cache wordCount is the number of 32 bit words to fill pattern is the pattern to fill the buffer with and modifier is the value with which to modify the pattern after each write to the buffer Upon successful completion this method returns BIT NO FAULT DETECTED otherwise it may return any of the return values listed in Appendix C Utility Methods Reference Pages and Chapter 5 MBIT Faults bitL2CachelsWritebackCapable This method returns the boolean write back capability of the L2 cache Here s a synopsis of the bitL2CacheIsWritebackCapable method utilities bitCacheUtils h BOOL bitL2CacheIsWritebackCapable void Upon successful completion this method returns TRUE if the L2 cache supports write back or FALSE if t
44. close operation on the device Using the register definitions in the device descriptor guarantees that the correct device is being accessed The return values for this method are determined by the developer devXXXRead devXXXRead allows the user to read information from the device It receives a pointer to the device descriptor of the device being tested the requested buffer size a pointer to the buffer address and a pointer to a variable that holds the number of bytes read The developer should also update the variable pointed to by the bytesRead parameter before returning to the caller Refer to Appendix B Integrating Custom Diagnostics Reference Pages for more information on this method 3 20 Computer Group Literature Center Web Site Device Driver Interface Here s a synopsis of the devXXXRead method devXXXRead DEV DESC pDevDesc UINT32 bufferSize INT8 bufferAddr UINT32 bytesRead where pDevDesc bufferSize bufferAddr and bytesRead are the input parameters pDevDesc is a pointer to a structure that contains all of the registers that are needed to perform a read operation on the device Using the register definitions in the device descriptor guarantees that the correct device is being accessed bufferSize contains the number of bytes that the user expects to read from the device If the device supports transfers wider than a byte the driver should adjust the count appropriately
45. configured subtest repeatedly based on the iteration count Upon completion of all required test iterations a summary of the results is placed in the results message and is then queued to the subtest control task The test execution task then exits Device Fault Database The device fault database contains the results of subtest execution for each supported device The results of subtest execution begin to accumulate in the fault database after API initialization The results may indicate unexecuted tests on the device If there are executed tests on the device the result indicates either success or the first fault detected for the device The user s application can obtain fault information for logical devices by invoking the getBitDeviceFault method see Chapter 2 Using MBIT or Appendix A API Method s Reference Pages for details on this method Note The device fault database clears when the reinitBit method is invoked http www motorola com computer literature 1 7 Using MBIT Using MBIT The MBIT software provides the methods contained in the MBIT API These methods which are listed below initialize the software control subtest execution and sequencing terminate the software and perform several other functions necessary for a diagnostic application Appendix A API Method s Reference Pages describes each of these methods in greater detail Method Description initBit Initiates the MBIT software re
46. endian The MBIT exception handler is enabled during the data read If the MBIT exception handler is not necessary to catch exceptions caused by the access to the device then bitProbeOutS wap16 bitProbeOutSwap32 should be used Here s a synopsis of the bitOutSwap16 32 method include lt utilities bitDeviceUtils h gt STATUS bitOutSwap16 ULONG addr UINT16 data STATUS bitOutSwap32 ULONG addr UINT32 data where addr is the address to write data to and data is the data to write out This method always returns 0 Refer to Appendix B Integrating Custom Diagnostics Reference Pages and Chapter 5 MBIT Faults for more information bitPciWrite32 bitPciWrite32 writes 32 bit data to PCI I O or memory space in little endian mode Here s a synopsis of the bitPciWrite32 method include lt utilities bitDeviceUtils h gt void bitPciWrite32 ULONG addr UINT32 data where addr is the PCI address to write data to and data is the data to write out This method has no return values Refer to Appendix B Integrating Custom Diagnostics Reference Pages and Chapter 5 MBIT Faults for more information http www motorola com computer literature 3 39 Integrating Custom Diagnostics bitPciRead32 bitPciRead32 reads 32 bit data from PCI I O or memory space Here s a synopsis of the bitPciRead32 method include lt utilities bitDeviceUtils h gt void bitPciRead32 ULONG addr
47. http www motorola com computer literature C 31 Utility Methods Reference Pages getDevTablePtr Name getDevTablePtr eturns a pointer to the device descriptor Synopsis utilities bitDeviceUtils h DEV DESC getDevTablePtr BIT LOGICAL DEVICE device Parameters device is the logical device to retrieve Description This method takes a logical device number and returns a pointer to the device descriptor The device descriptor contains all the information needed to interface with the device This routine should only be used by routines initializing device descriptors Return Values DESC a pointer to the device descriptor NULL the device descriptor is invalid Refer to Chapter 5 MBIT Faults for more faults C 32 Computer Group Literature Center Web Site bitTrackChanges bitTrackChanges Name bitTrackChanges turns register bit change tracking on or off Synopsis lt utilities bitDeviceUtils h gt BIT_FAULT bitTrackChanges ADDR_INFO reg UINT on Parameters reg is the pointer to the location s ADDR_INFO structure on is a boolean value to indicate starting or stopping changes tracking TRUE starts tracking FALSE stops tracking Description This method starts or stops tracking register bits changes during hardware access Return Values BIT_NO_FAULT_DETECTED no fault detected success INVALID TEST PARAM invalid test paramet
48. intVec NONE CONFIG pDevDesc intLvl NONE CONFIG pDevDesc baseAddr HAWK BASE ADDR Setup the generic hardware addresses if applicable genReg sdramEnSzA amp smc sdramEnSzA genReg sdramEnSzB amp smc sdramEnSzB genReg sdramEnSzC amp smc sdramEnSzC genReg sdramEnSzD amp smc sdramEnSzD genReg sdramEnSzE amp smc sdramEnSzE genReg sdramEnSzF amp smc sdramEnSzF za BEC Setup the hardware addresses smc venDevId addr pDevDesc baseAddr 0x00 addrInterval smc venDevId mask 0x00000000 smc venDevId size 4 smc venDevId type REG RD ONLY smc venDevId dev memDev smc revlIdGcr addr pDevDesc gt baseAddr 0x08 addrInterval smc revlIdGcr mask 0x01000100 smc revlIdGcr size 4 smc revlIdGcr type REG RDWR smc revlIdGcr dev memDev Assign pointer to address table and generic address table structures in the device descriptor The structures must be cast to void pointers pDevDesc genReg void genReg pDevDesc reg void amp smc 3 42 Computer Group Literature Center Web Site Creating Diagnostic Associations 14 Non PCI devices only If setup was successful indicate device descriptor initialization is complete pDevDesc initStat INIT return faultCode end of the routine Creating Diagnostic Associations T
49. literature B 39 Integrating Custom Diagnostics Reference Pages Return Values The return values for this method are determined by the developer Device Read and Write Utility Methods The device read and write utility methods provided by MBIT are added to the device descriptor during device initialization These are then used by bitIn bitOut to access the device hardware addresses MBIT provides the following device read and write utility methods bitProbeIn amp 16 32 on page B 41 bitProbeOut8 16 32 on page B 42 bitProbeInSwap16 32 on page B 43 bitProbeOutSwap106 32 on page B 44 bitIn8 16 32 on page B 45 bitOut8 16 32 on page B 46 bitInSwap16 32 on page B 47 bitOutSwap16 32 page B 48 bitPciWrite32 on page B 49 bitPciRead32 on page B 50 B 40 Computer Group Literature Center Web Site bitProbeIn8 16 32 bitProbeln8 16 32 Name bitProbeIn8 16 32 treads 8 16 32 bit data from the designated address Synopsis include lt utilities bitDeviceUtils h gt STATUS bitProbeIn8 ULONG addr UINT32 pdata STATUS bitProbeIn16 ULONG addr UINT32 pdata STATUS bitProbeIn32 ULONG addr UINT32 pdata Parameters addr is the address to read data from pdata is the pointer to a 32 bit location to store data Description The data read is written into a 8 16 32 bit memory location This method requires a 32 bit memory location for storing the data because it is
50. logical device passed in This method looks up the device descriptor based on the logical device passed in The associated device driver routine is then called http www motorola com computer literature B 25 Integrating Custom Diagnostics Reference Pages This method must be called after drvOpen has been called Return Values BIT_NO_FAULT_DETECTED no fault detected successful SUBTEST NOT SUPPORTED selected subtest is not supported on this device DEVICE NOT SUPPORTED device is not supported DRIVER SEQUENCE methods invoked out of order INVALID DEVICE DESC device descriptor has invalid field configuration error Refer to Chapter 5 MBIT Faults for more faults B 26 Computer Group Literature Center Web Site drvIoctl drvloctl Name drvIoctl finds the associated driver routine based on the subtest and logical device passed in Synopsis include lt api bitGenericDriver h gt FAULT drvlIoctl BIT SUBTEST subtest BIT LOGICAL DEVICE device int function int argument Parameters subtest is the current subtest device is the device to operate on function is the driver specific operation to perform on the device or driver argument is a driver specific argument for the function Description This method finds the associated driver routine based on the subtest and logical device passed in This method looks up the de
51. method utilities bitCacheUtils h BIT FAULT bitL2CacheInvalidate void Upon successful completion this method returns BIT NO FAULT DETECTED otherwise it may return any of the return values listed in Appendix C Utility Methods Reference Pages and Chapter 5 MBIT Faults 4 10 Computer Group Literature Center Web Site bitL2CacheLock bitL2CacheLock This method locks the L2 cache if the L2 cache supports it Here s a synopsis of the bitL2CacheLock method lt utilities bitCacheUtils h gt BIT_FAULT bitL2CacheLock void Upon successful completion this method returns BIT_NO_FAULT_DETECTED otherwise it may return any of the return values listed in Appendix Utility Methods Reference Pages and Chapter 5 MBIT Faults bitL2CacheUnlock This method unlocks the L2 cache if the L2 cache supports it Here s a synopsis of the bitL2CacheUnlock method lt utilities bitCacheUtils h gt BIT_FAULT bitL2CacheUnlock void Upon successful completion this method returns BIT_NO_FAULT_DETECTED otherwise it may return any of the return values listed in Appendix C Utility Methods Reference Pages and Chapter 5 MBIT Faults bitL2CachelsLockable This method returns the boolean lock capability of the L2 cache Here s a synopsis of the bitL2CacheIsLockable method lt utilities bitCacheUtils h gt BOOL bitL2CacheIsLockable void Upon successful completion this method returns TRUE if the L2
52. numSubtestlds is the number of subtest IDs deviceld is an array of device IDs numDevicelds is the number of device IDs and pDriveDesc is the pointer to the driver being associated with the subtests and devices Upon successful completion this method returns BIT NO FAULT DETECTED otherwise it may return any of the return values listed in Appendix B ntegrating Custom Diagnostics Reference Pages and Chapter 5 MBIT Faults installBitDriver This method installs the driver entry points When you add a driver you must implement all of the driver entry points Here s a synopsis of the installBitDriver method include lt config bitTestUtils h gt DRV_DESC installBitDriver BIT_FAUL drvinstall DEV DESC devDescPtr BIT FAUL drvDeinstall DEV DESC devDescPtr BIT FAUL drvOpen DEV DESC devDescPtr BIT FAUL drvClose DEV DESC devDescPtr BIT FAUL drvRead DEV DESC devDescPtr unsigned int bufferSize char buffer unsigned int bytesRead BIT FAULT drvWrite DEV DESC devDescPtr unsigned int bufferSize char buffer unsigned int bytesWritten FAULT drvlIoctl DESC devDescPtr int function int argument where drvInstall is the driver install entry point drvDeinstall is the driver deinstall entry point drvOpen is the driver open entry point drvClose is
53. own re initialization prior to returning status Once the test executes the required number of times the results return to test control and invoke the test de installation method A subtest has two options for control when it runs The subtest can use RUN_TILL_COMPLETION or HALT_ON_ERROR as the control If the test uses RUN_TILL_COMPLETION the test may run till the end even if a fault occurs If HALT_ON_ERROR is the control parameter then the subtest allows the execution to halt after the first fault occurs and returns to the API For clarification the following paragraph is an example of a test that uses both types of control as the control parameter Example a subtest wants to test a list of five different bit patterns for reading and writing to a register If the subtest uses HALT_ON_ERROR for its control parameter the test returns when one of the patterns receives an error during reading or writing The test does not continue to read or write the other patterns If the subtest uses RUN_TILL_COMPLETION for its control parameter the test runs all of the bit patterns even if an error occurs during the reading or writing to the register In addition to the parameters already described many subtests allow additional control over the nature of the testing For example memory tests allow the user to specify the patterns to be used and the memory locations to be tested To determine if a subtest allows additional parameters reference the Moto
54. target proj vmeslave Note It is not necessary to complete step 2 of Creating a VxWorks Image with the MBIT API on page D 2 prior to building this slave kernel To build a VxWorks VME slave image complete the following steps 1 10 After extracting the objects tar file mkdir C Tornado target proj vmeslave copy C Tornado target src MBIT mv5100 50BIT VME slave cdf C Tornado target src MBIT mv5100 65MBIT cdf and C Tornado target src MBIT mv5100 67BITBSPPA RAMS cdf to C Tornado target proj vmeslave Start Tornado 2 1 Select the New tab in the Create Project in New Existing Workspace dialog box Select Create a bootable VxWorks image custom configured in the New tab area Choose OK In the Create a bootable Vx Works image custom configured step 1 dialog box change the location to C Tornado target config proj vmeslave Choose Next In the Create a bootable VxWorks image custom configured step 2 dialog box select the A BSP radio button Select mv5100 from the drop down list Choose Next In the Create a bootable VxWorks image custom configured step 2 dialog box choose Finish In the Workspace dialog box select the VxWorks tab Using the controls navigate to and select hardware buses Special BIT VME Slave Memory Configuration Right click on Special BIT VME Slave Memory Configuration http www motorola com computer literature D 5 Installing MBIT with Tornado 2 1 and V
55. that the correct device is being accessed The return values for this method are determined by the developer dev XXXOpen devXXXOpen allows the user to prepare the device for testing It receives a pointer to the device descriptor of the device being tested Also driver variables may be initialized in preparation for subsequent driver use Refer to Appendix B Integrating Custom Diagnostics Reference Pages for more information on this method Here s a synopsis of the devXXXOpen method devXXXOpen DEV DESC pDevDesc http www motorola com computer literature 3 19 Integrating Custom Diagnostics where pDevDesc is a pointer to a structure that contains all of the registers that are needed to perform an open operation on the device Using the register definitions in the device descriptor guarantees that the correct device is being accessed The return values for this method are determined by the developer devXXXClose devXXXClose allows the user to close the device in preparation for terminating use of the device It receives a pointer to the device descriptor of the device being tested Refer to Appendix B Integrating Custom Diagnostics Reference Pages for more information on this method Here s a synopsis of the devXXXClose method devXXXClose DEV DESC pDevDesc where pDevDesc is a pointer to a structure that contains all of the registers that are needed to perform a
56. the return values listed in Appendix A API Method s Reference Pages and Chapter 5 MBIT Faults isBitlnitializationComplete isBitInitializationComplete returns the MBIT initialization status Here s a synopsis of the isBitInitializationComplete method include lt api bitApi h gt BOOLEAN isBitInitializationComplete void This method returns TRUE if the MBIT initialization is complete FALSE if it is not Executing Subtests in MBIT Executing subtests begins with creating test lists and submitting them for execution by calling executeBitTests Follow this method up with getBitResponse which returns test results abortBitTests allows aborting test execution any time outside critical sections during tests See the section on subtest attributes in the Test Reference Guide for a list of subtests with protected critical sections A user may obtain a test list filled with default test entries for a given device by calling either buildBitDefaultTestList or buildBitDefaultTestEntry An MBIT application may occupy two threads of execution All API methods except getBitResponse must be called from the thread http www motorola com computer literature 2 3 Using MBIT is called from getBitResponse may be called from another thread executeBitTests executeBitTests submits and executes a list of subtests The test list processing task buffers the test list and processes it in the backgr
57. the ID representing the subtest string identifier Here s a synopsis of the getBitSubtestIdByName method include lt api bitApi h gt SUBTEST getBitSubtestIdByName const char const subtest where subtest is a string identifier specifying the subtest Upon successful completion SUBTEST is returned which is an ID representing the subtest identifier Otherwise 1 is returned if the subtest is not found Refer to Chapter 5 MBIT Faults for more return values getBitDeviceldByName getBitDeviceldByName returns the ID representing the device string identifier 2 8 Computer Group Literature Center Web Site Obtaining Faults in MBIT Here s a synopsis of getBitDeviceldByName method finclude lt api bitApi h gt BIT LOGICAL DEVICE getBitDeviceIdByName const char const device where device is a string identifier specifying the device Upon successful completion a LOGICAL DEVICE is returned which is an ID representing the device identifier Otherwise 1 is returned if the device is not found Refer to Chapter 5 MBIT Faults for more return values getBitFaultldByNamer getBitFaultIdByNamew returns the ID representing the fault string identifier Here s a synopsis of the getBitFaultIdByName method finclude lt api bitApi h gt BIT FAULT getBitFaultIdByName const char const fault where fault is a string identifier specifying the fault Upon s
58. the complete set of MBIT subtests Modifications must be made to Flash Memory Testing and GD62559ER Ethernet Testing Flash Memory Testing Access to each block of Flash memory is software programmable by three software programmable control register bits an overall enable a write enable and a reset vector enable refer to the MVME5100 Single Board Computer Programmer s Reference Guide At reset the default access settings enable the first IMB of Flash A to FF000000 SFF100000 and Flash B to FF400000 FF500000 In addition Flash B is enabled at SFFF00000 SFFFFFFFF Since the visibility test does not modify the settings of these register bits the MV5100 BSP needs modification to reflect the default settings for each block of Flash The following changes need to be made to Tornado target config mv5100 mv5100 h Note An exclamation point indicates where changes need to be made Original define HAWK_PHB_BASE_ADRS Oxfeff0000 define HAWK_PHB_REG_SIZE 0x00010000 define FLASH BASE ADRS OxF 4000000 define FLASH MEM SIZE 0x01000000 MPIC configuration defines Modify and Add define HAWK PHB BASE ADRS Oxfeff0000 define HAWK PHB REG SIZE 0x00010000 define FLASH BASE ADRS OxFF000000 http www motorola com computer literature D 7 Installing MBIT with Tornado 2 1 and VxWorks define FLAS
59. the driver close entry point drvRead is the driver read entry point drvWrite is the driver write entry point and drv octl is the driver ioctl entry point Refer to the Device Driver Interface section for more information on the device driver methods 3 4 Computer Group Literature Center Web Site installBitSubtestEntries Upon successful completion DRV_DESC is returned which is the pointer to the driver descriptor If an error occurs NULL is returned Refer to Appendix B Integrating Custom Diagnostics Reference Pages and Chapter 5 MBIT Faults for more return values installBitSubtestEntries This method installs the required subtest entry points and sets the default parameters which are used by buildBitDefaultTestList and buildBitDefaultTestEntry Here s a synopsis of the installBitSubtestEntries method include lt config bitTestUtils h gt BIT FAULT installBitSubtestEntries BIT SUBTEST subtest FAUL installTest SUBTEST subtest BIT LOGICAL DEVICE device void testParamPtr FAUL deinstallTest BIT SUBTEST subtest BIT LOGICAL DEVICE device void testParamPtr BIT FAULT runTest BIT_SUBTEST subtest BIT LOGICAL DEVICE device void testParamPtr int interations int durations BIT TEST CONTROL control BIT_FAUL freeParamPtr BIT_SUBTEST subtest void testParamPtr BIT_FAU
60. used by the device utility methods bitIn bitOut These methods store the location s contents in the 32 bit value field of the ADDR INFO structure The MBIT exception handler is enabled during the data read If the MBIT exception handler is not necessary to catch exceptions caused by the access to the device then bitIn8 bitIn16 bitIn32 should be used Return Values Upon successful completion this method returns 0 If an exception occurs is returned Refer to Chapter 5 MBIT Faults for more faults http www motorola com computer literature B 41 Integrating Custom Diagnostics Reference Pages bitProbeOut8 16 32 Name bitProbeOu8 16 32 writes 8 16 32 bit data to the designated address Synopsis include lt utilities bitDeviceUtils h gt STATUS bitProbeOut8 ULONG addr UINT8 data STATUS bitProbeOut16 ULONG addr UINT16 data STATUS bitProbeOut32 ULONG addr UINT32 data Parameters addr is the address to write data to data is the data to write out Description This method writes 8 16 32 bit data to the designated address The data is written into an 8 16 32 bit memory location The MBIT exception handler is enabled during the data write If the MBIT exception handler is not necessary to catch exceptions caused by the access to the device then bitOut8 bitOut16 bitOut32 should be used Return Values Upon successful completion this method returns
61. utilities bitCacheUtils h BIT FAULT bitL2CacheOn void Upon successful completion this method returns BIT NO FAULT DETECTED otherwise it may return any of the return values listed in Appendix C Utility Methods Reference Pages and Chapter 5 MBIT Faults 4 8 Computer Group Literature Center Web Site bitL2CacheOff bitL2CacheOff This method disables the L2 cache without any flushing or invalidation Here s a synopsis of the bitL2CacheOff method utilities bitCacheUtils h BIT FAULT bitL2CacheOff void Upon successful completion this method returns BIT NO FAULT DETECTED otherwise it may return any of the return values listed in Appendix C Utility Methods Reference Pages and Chapter 5 MBIT Faults bitL2CachelsEnabled This method returns the boolean enable state of the L2 cache Here s a synopsis of the bitL2CacheIsEnabled method lt utilities bitCacheUtils h gt BOOL bitL2CacheIsEnabled void Upon successful completion this method returns TRUE if the L2 cache is enabled or FALSE if the L2 cache is not enabled Refer to Chapter 5 MBIT Faults for more faults bitL2CacheFlush This method flushes the entire L2 cache If a NULL buffer is provided then a local buffer is allocated for use and free d before return If the size of a given non NULL buffer is not equal to twice the L2 cache size or is not naturally aligned then no action is taken by the method Here s a synopsis of th
62. void Upon successful completion this method returns BIT_NO_FAULT_DETECTED otherwise it may return any of the return values listed in Appendix C Utility Methods Reference Pages and Chapter 5 MBIT Faults bitDataCachelsEnabled This method returns the boolean enable state of the L1 data cache Here s a synopsis of the bitDataCacheIsEnabled method utilities bitCacheUtils h BOOL bitDataCacheIsEnabled void Upon successful completion this method returns TRUE if the L1 data cache is enabled or FALSE if the L1 data cache is not enabled Refer to Chapter 5 MBIT Faults for more faults bitDataCacheFlush This method flushes the entire L1 data cache Here s a synopsis of the bitDataCacheFlush method utilities bitCacheUtils h BIT FAULT bitDataCacheFlush void http www motorola com computer literature 4 3 Utility Methods Upon successful completion this method returns BIT_NO_FAULT_DETECTED otherwise it may return any of the return values listed in Appendix C Utility Methods Reference Pages and Chapter 5 MBIT Faults bitDataCacheFlushlnvalidate This method flushes and invalidates the entire L1 data cache Here s a synopsis of the bitDataCacheFlushInvalidate method utilities bitCacheUtils h FAULT bitDataCacheFlushInvalidate void Upon successful completion this method returns BIT NO FAULT DETECTED otherwise it may return any of the return values listed in Appendix C
63. 26 27 28 29 30 31 32 33 34 35 36 37 Optional For VME location monitor testing setup a VME location monitor window as described in VME Location Monitor Window Setup on page D 12 Select the Builds tab in the workspace window Click the next to project name to display the default build Select the default build Right click in the workspace window and select Properties from the pop up menu Select the C C compiler tab and add DINCLUDE_I8250_SIO and IC Tornado target h MBIT to the list of compiler options Click on Apply Select the Assembler tab and add IC Tornado target h MBIT to the list of compiler options Click on Apply and OK Select the Files tab in the workspace window Right click on the new project and select Add Files Browse to C Tornado target src MBIT mv5100 and select kernelExceptionUtilsAsm s in the Add Source File to dialog box Choose Add Right click on the new project and select Dependencies Choose OK Wait for the dependency building to complete Right click on the new project and select ReBuild All VxWorks This produces default vx Works under the new project directory D 4 Computer Group Literature Center Web Site Building a VxWorks VME Slave Image Building a VxWorks VME Slave Image The following instructions assume Tornado 2 1 is installed on Windows NT in C Tornado and the project for the VME slave image is in C Tornado
64. 3 19 B 33 devXXXRead 3 20 B 35 devXXXWrite 3 21 B 37 device entry add 3 2 device fault database 1 7 device hardware address 3 27 device initialization method 3 24 an outline of 3 41 create 3 40 device read write utility methods 3 33 B 40 bitIn8 16 32 3 37 B 45 bitInSwap16 32 3 38 B 47 bitOut8 16 32 3 37 B 46 bitOutSwap16 32 3 39 B 48 bitPciRead32 3 40 B 50 bitPciWrite32 3 39 B 49 bitProbeIn8 16 32 3 34 B 41 bitProbeInSwap16 32 3 35 B 43 bitProbeOut8 16 32 3 35 B 42 bitProbeOutSwap16 32 3 36 B 44 device types 3 33 devices obtain number of 2 12 devXXXClose 3 20 B 34 devXXXDeinstall 3 19 B 31 devXXXInstall 3 18 B 29 devXXXIoctl 3 22 B 39 devXXXOpen 3 19 B 33 devXXXRead 3 20 B 35 devXXXWrite 3 21 B 37 diagnostic configuration method 3 43 example 3 45 diagnostic device utility methods 4 13 C 30 bitInQ 4 15 C 34 bitOutQ 4 15 C 35 bitTrackChanges 4 14 C 33 getDeviceDescriptor 4 13 C 31 getDevTablePtr 4 14 C 32 diagnostic integration methods 3 1 B 1 addBitDeviceldent 3 2 B 4 addBitFaultIdent 3 3 B 6 addBitSubtestIdent 3 2 B 2 createBitTestAssociations 3 3 B 8 getBitNumberOfAssociations 3 1 3 6 B 15 installBitDriver 3 4 B 10 installBitSubtestEntries 3 5 B 12 documentation related F 1 driver entry points 3 23 driver methods generic 3 13 DRV DESC 3 5 3 24 3 25 3 44 drvClose 3 15 B 22 drvDeinstall 3 14 B
65. A BSP radio button Choose Next and then Finish Select the VxWorks tab in the workspace window Select the next to the new project to display the project options Display development tool components WDB agent components select WDB connection using the controls Right click on WDB END driver connection and select Exclude WDB END driver connection Choose OK Display development tool components WDB agent components select WDB mode using the controls Right click on WDB system debugging and select Exclude WDB system debugging Choose OK Display development tool components WDB agent components WDB agent services using the controls Right click on WDB system agent hardware fpp support and select Exclude WDB system agent hardware fpp support Choose OK Display development tool components WDB agent components select WDB connection using the controls Right click on WDB network connection and select Include WDB network connection Choose OK Display hardware Diagnostics BIT Diagnostics BIT API Install Selection using the controls Right click on BIT API Install and select Include Install Choose OK Display hardware Diagnostics BIT Diagnostics BIT API Selection using the controls Right click on BIT API and select Include BIT API Choose OK http www motorola com computer literature D 3 Installing MBIT with Tornado 2 1 and VxWorks 22 23 24 25
66. Appendix B Integrating Custom Diagnostics Reference Pages and Chapter 5 MBIT Faults for more information bitProbelnSwap16 32 bitProbeInS wap16 32 reads and byte swaps 16 32 bit data from the designated address The data is read as little big endian and loaded as big little endian into a 32 bit memory location This method requires a 32 bit memory location for storing the data because it is used by the device utility methods bitIn bitOut These methods store the location s contents in the 32 bit value field of the ADDR INFO structure The MBIT exception handler is enabled during the data read If the MBIT exception handler is not necessary to catch exceptions caused by the access to the device then bitInSwap16 bitInSwap32 should be used http www motorola com computer literature 3 35 Integrating Custom Diagnostics Here s a synopsis of the bitProbeInSwap16 32 method include lt utilities bitDeviceUtils h gt STATUS bitProbeInSwap16 ULONG addr UINT32 pdata STATUS bitProbeInSwap32 ULONG addr UINT32 pdata where addr is the address to read data from and pdata is the pointer to a 32 bit location to store data Upon successful completion this method returns 0 If an exception occurs 1 is returned Refer to Appendix B Integrating Custom Diagnostics Reference Pages and Chapter 5 MBIT Faults for more information bitProbeOutSwap16 32 bitProbeOutSwap16 32 writes and
67. BIT Faults addBitFaultldent This method adds a fault entry with the provided identifier and description Here s a synopsis of the addBitFaultIdent method include lt config bitTestUtils h gt BIT_FAULT addBitFaultIdent const char fault const char description BIT_FAULT_TYPE type BIT FAULT id where fault is the unique fault name description is the description of the fault type is the type of fault for example hardware software see config bit CommonDefs h and id is the unique ID being returned that represents the fault Upon successful completion this method returns BIT NO FAULT DETECTED and places a new unique ID in id otherwise it may return any of the return values listed in Appendix B Integrating Custom Diagnostics Reference Pages and Chapter 5 MBIT Faults createBitTestAssociations This method creates an association between subtests devices and a driver If a driver 1s not available for the associated subtest and device the pDriveDesc parameter should be NULL Here s a synopsis of the createBitTestAssociations method include lt config bitTestUtils h gt FAULT createBitTestAssociations SUBTEST subtestId int numSubtestIds LOGICAL DEVICE deviceId int numDevicelds DRV DESC pDriveDesc http www motorola com computer literature 3 3 Integrating Custom Diagnostics where subtestId is an array of subtest IDs
68. BIT TEST CONTROL 3 7 DEV DESC 3 28 4 13 DEV TYPE 3 33 DRV DESC 3 5 3 24 3 25 3 44 INIT STAT 3 25 TEST ENTRY 3 8 submitting tests for execution 2 5 subtest addition 3 10 configuration 3 10 example 3 11 http www motorola com computer literature IN 5 lt moz lt moz control 1 6 implementing 3 6 installation 3 11 parameters 3 8 parameters example 3 9 structure 3 6 3 7 structure example 3 8 subtest entry points install 3 5 subtest entry add 3 2 subtest envelope task 1 7 subtests obtain number of 2 11 subtest specific faults 3 11 suggestions submitting xviii system level MBIT 1 2 system requirements 1 3 T target booting D 6 target configuration D 6 terminate MBIT 2 13 terminate tests 2 7 terminateBit 2 13 A 29 test list results 2 6 test list results obtain number of 2 7 test list execute 2 5 test lists create 2 4 test time 1 6 TEST ENTRY 3 8 time utility methods 4 20 C 45 bitMsDelay 4 20 C 47 bitUsDelay 4 20 C 46 typeface meaning of xix U URLs uniform resource locators F 3 using MBIT 2 1 utility methods 4 1 C 1 cache 4 1 C 1 device read write 3 33 B 40 diagnostic device 4 13 C 30 interrupt 4 16 C 36 reference pages C 1 time 4 20 C 45 V VME LOCMON testing D 12 VxWorks image build D 2 VxWorks image create D 2 VxWorks VME slave image build D 5 IN 6 Computer Group Literature Center Web Site
69. BitDriver Q call drvPtr installBitDriver installFuncPtr deinstallFuncPtr openFuncPtr closeFuncPtr readFuncPtr writeFuncPtr ioctlFuncPtr http www motorola com computer literature 3 23 Integrating Custom Diagnostics Upon successful installation the returned value will be a pointer to a driver descriptor A driver descriptor is defined by the DRV_DESC structure located in api bitGenericDriver h If the install fails NULL is returned Refer to Using the Diagnostic Configuration Method on page 3 43 for more information Once configured the developer may use the generic driver interface to access the diagnostic device driver Initializing the Diagnostic Devices Initialization of diagnostic devices requires adding the device to MBIT and setting up a default device descriptor for the device A device initialization method is created for each unique device A diagnostic may support multiple instances of a device and each instance of a device does not require a separate device initialization method Device Initialization Method The device initialization method is a configuration method passed to initBit Its purpose is to add the device and setup default device descriptor values A device initialization method describes the hardware including register and device types by providing the following categories of information Device Descriptor Structure DEV_DESC Device Address Table Array part of DEV DESC
70. Cache Utility Methods MBIT provides the following L1 and L2 cache utility methods The header file utilities bitCacheUtils h provides the prototypes for these methods Method Description bitDataCacheEnable Invalidates and then enables the L1 data cache bitDataCacheDisable Flushes and then disables the L1 data cache bitDataCachelIsEnabled Returns the boolean enable state of L1 data cache bitDataCacheFlush Flushes the entire L1 data cache bitDataCacheFlushInvalidate Flushes and invalidates the entire L1 data cache bitDataCachelInvalidate Invalidates the L1 data cache for a range of memory bitDataCacheLock Locks the L1 data cache bitDataCacheUnlock Unlocks the L1 data cache Utility Methods Method bitInstCacheEnable Description Invalidates and then enables the L1 instruction cache bitInstCacheDisable Disables the L1 instruction cache bitInstCachelIsEnabled Returns the boolean enable state of the L1 instruction cache bitInstCacheLock Locks the L1 instruction cache bitInstCacheUnlock Unlocks the L1 instruction cache bitL2CacheSizeGet Returns the size of the L2 cache configured by the hardware bitL2CacheEnable Enables the L2 cache bitL2CacheDisable Flushes invalidates and then disables the L2 cache bitL2CacheOn Enables the L2 cache without any flushing or invalidation bitL2CacheOf
71. Distribution Center for Motorola Telephone 1 800 441 2447 FAX 602 994 6430 or 303 675 2150 Web Site http e www motorola com webapp DesignCenter E mail Idcformotorola hibbertco com OR IBM Microelectronics Programming Environment Manual Web Site http www chips ibm com techlib products powerpc manuals Publication Number MPCFPE AD G522 0290 01 Dallas Semiconductor http www dalsemi com LSIS53C895A PCI to Ultra2 SCSI Controller Technical Manual v2 1 LSI Logic Corporation http www lsilogic com techlib techdocs storage_stand_prod PCISCS ICont Chips 895a pdf DS1621 Thermometer Data Sheet DS1621 F 2 Computer Group Literature Center Web Site URLs URLs The following URLs uniform resource locators may provide helpful sources of additional information about this product related services and development tools Please note that while these URLs have been verified they are subject to change without notice Motorola Computer Group http www motorola com computer L Motorola Computer Group OEM Services http www motorola com computer support L Wind River Systems Inc http www windriver com http www motorola com computer literature F 3 Index A abortBitTests 2 7 A 17 addBitDeviceldent 3 2 B 4 addBitFaultIdent 3 3 3 11 B 6 addBitSubtestIdent 3 2 3 10 B 2 ADDR INFO 3 25 to 3 38 4 13 to 4 15 ADDR TYPE 3 31 address and d
72. E VM STATE VALID VM STATE WRITABLE VM STATE NO t d ct ll ri 5 int sysPhysMemDescNumE ENTS sysPhysMemDesc GD82559ER Ethernet Testing The GD82559ER Ethernet tests require they be run before the VxWorks Ethernet driver is started One way to accomplish this is to prevent the drivers from starting during boot and then starting them after completing the Ethernet testing 65MBIT cdf redefines the INCLUDE END component to remove the INIT_RTN of usrEndLibInit In addition endDevTbl in target config mv5100 configNet h must be modified to set the processed field of the entries for the GD82559ER instances to TRUE so they are skipped during boot After booting and running the GD82559ER tests the VxWorks driver may be started by setting the processed field to FALSE and executing usrEndLibInit then attaching and configuring the interface http www motorola com computer literature D 9 Installing MBIT with Tornado 2 1 and VxWorks To modify endDevTbl copy target config mv5100 configNet h to the project directory and edit it as follows Note exclamation point indicates where changes need to be made Original END TBL ENTRY endDevTbl 0 END LOAD FUNC END LOAD STRING END BUFF LOAN NULL ifdef INCLUDE SECONDARY ENET
73. ED Function call is not supported H BIT INTERRUPT FAULT Initialization of interrupt failed H BIT TEST TIMED OUT The test timed out prior to completion H DATA MISCOMPARE Data miscompare on write and read sequence 5 BIT_INVALID_SUBTEST_ID The subtest ID is invalid 5 BIT_INVALID_DEVICE_ID The device ID is invalid 5 BIT_INVALID_FAULT_ID The fault ID is invalid 5 BIT_DUPLICATE_ASSOCIATION The association already exists 5 BIT_INVALID_LIST_CONTENT Data in the list is invalid 5 2 Computer Group Literature Center Web Site Built In MBIT Faults Table 5 1 Built In MBIT Faults continued Type MBIT Fault String Description 5 BIT_ADD_IDENT_ERROR An error occurred while adding identifier S BIT_DUPLICATE_IDENT The identifier has already been added to the list 5 BIT_DEVICE_NOT_ASSOCIATED The device is not associated with any tests S BIT CACHE ROUTINE NOT Cache routine is not defined or SUPPORTED supported S BIT PROCESSOR NOT SUPPORTED Processor type is unknown and not supported H BIT DATA CACHE NOT ENABLED Data cache must be enabled before calling a function H BIT CACHE NOT ENABLED Cache must be enabled before calling a cache function BIT CACHE LOCK NOT SUPPORTED Cache locking is not supported BIT SPD CHECKSUM FAULT SPD checksum fault BIT SPD SROM FAULT SPD access fault BIT VPD SROM FAULT VPD error accessing the VPD SROM BIT VPD C
74. Fault is the fault code Description This method obtains the fault data for the device specified by the input device value The first fault detected for the specified logical device returns to the caller Invoking reinitBit clears the collected fault data and places MBIT in an initial state This action also extinguishes the Fail LED when it illuminates from the detection of a fault by a previous test Return Values BIT_NO_FAULT_DETECTED no fault detected successful BIT RESOURCE MGMT FAULT memory management error occurred INVALID TEST PARAM invalid parameter was supplied Refer to Chapter 5 MBIT Faults for more faults A 18 Computer Group Literature Center Web Site getBitSubtestDesc A getBitSubtestDesc Name getBitSubtestDesc obtains a string describing a subtest Synopsis include config bitCommonDefs h const char getBitSubtestDesc BIT SUBTEST subtestId Parameters subtestld is an ID specifying a unique subtest Description This method returns a string describing the subtest The string descriptions returned should not be modified or free d Return Values Upon successful completion getBitSubtestDesc returns a string containing the subtest description If it fails it returns an empty string Refer to Chapter 5 MBIT Faults for more faults http www motorola com computer literature A 19 API Method s Reference Pages A getBitDeviceDesc
75. H MEM SIZE 0x00100000 define FLASHB BASE ADRS OxFF400000 define FLASHB MEM SIZE 0x00100000 define FLASH IO BASE ADRS OxFFF00000 define FLASH IO MEM SIZFE 0x00100000 MPIC configuration defines The following changes need to be made to NNTornadoNtargetNconfigNmv5100NsysLib c Original FLASH MEM SIZE VM STATE MASK VALID VM STATE MASK WRITABLI VM STATE MASK CACHEABLE VM_STATE_VALID VM_STATE_WRITABLE VM STATE CACHEABLE NOT ll z 4 int sysPhysMemDescNumEnt EMENTS sysPhysMemDesc Modify and Add FLASH SIZE VM_STATE_MASK_VALID VM_STATE_MASK_WRITABL VM_STATE_MASK_CACHEABLE Gl VM_STATE_VALID VM_STATE_WRITABLE VM_STATE_CACHEABLE_NOT 5 1 void FLASHB BASE ADRS void FLASHB BASE ADRS D 8 Computer Group Literature Center Web Site GD82559ER Ethernet Testing FLASHB MEM SIZE VM STATE MASK VALID VM STATE MASK WRITABLE VM STATE MASK CACHEABLE VM_STATE_VALID VM_STATE_WRITABLE VM_STATE_CACHEABLE_NO void FLASH IO BASE ADRS void FLASH IO BASE ADRS FLASH IO MEM SIZE VM STATE MASK VALID VM STATE MASK WRITABLE VM STATE MASK CACHEABL
76. L initParamPtr BIT_SUBTEST subtest void testParamPtr int paramSize where subtest is the subtest ID the methods and default parameters are associated with installTest is the subtest installation method deinstallTest is the subtest de installation method runTest is the actual test method iterations 1s the default number of times to run the test duration is the default maximum number of milliseconds the test is allowed to run control is the default test control to halt on the first error detected or to run until test completion freeParamPtr is the pointer to the free parameter method http www motorola com computer literature 3 5 Integrating Custom Diagnostics initParamPtr is the pointer to the method that initializes the default parameter structure and paramSize is the size of the parameter structure used by the subtest Upon successful completion this method returns BIT_NO_FAULT_DETECTED otherwise it may return any of the return values listed in Appendix B Integrating Custom Diagnostics Reference Pages and Chapter 5 MBIT Faults getBitNumberOfAssociations This method returns the number of associations and should only be used after initializing MBIT If called during initialization this method will return an invalid number of associations Here s a synopsis of the getBitNumberOfAssociations method include lt config bitTestUtils h gt int getBitNumberOfAss
77. LT DETECTED otherwise it may return any of the return values listed in Appendix C Utility Methods Reference Pages and Chapter 5 MBIT Faults 4 14 Computer Group Literature Center Web Site bitIn bitIn This method reads from the location described by the ADDR_INFO structure passed to the method If an exception is caused by the read BUS ERROR is returned to indicate an exception occurred If a device is not enabled and enable disable methods are defined then the device is enabled written to and then disabled The value read from the location is put into the val field of the ADDR INFO structure passed to the method Here s a synopsis of the bitIn method lt utilities bitCacheUtils h gt BIT_FAULT bitIn ADDR_INFO reg where reg is the pointer to the location s ADDR_INFO structure Upon successful completion this method returns BIT_NO_FAULT_DETECTED otherwise it may return any of the return values listed in Appendix C Utility Methods Reference Pages and Chapter 5 MBIT Faults bitOut This method writes to the location described by the ADDR_INFO structure passed to the method If an exception is caused by the write BIT_BUS_ERROR is returned to indicate an exception occurred If a device is not enabled and enable disable methods are defined then the device is enabled written to and then disabled The value actually written to the location is the value in the val field of the ADDR_INFO structur
78. MBIT Faults for more faults http www motorola com computer literature C 39 Utility Methods Reference Pages bitIntConnect Name bitIntConnect connects an MBIT interrupt handler to the MBIT interrupt table Synopsis lt kernel kernelExceptionUtils h gt STATUS bitIntConnect VOIDFUNCPTR vector VOIDFUNCPTR routine int param Parameters vector is the interrupt vector to connect routine is the routine to connect to the specified vector param is the parameter provided to the specified routine when an interrupt occurs Description This method connects an MBIT interrupt handler to the MBIT interrupt table In software there may be up to 256 interrupts connected however hardware may limit the actual number available This method only connects one handler to any interrupt vector at any one time All interrupt handlers not connected and use this method remain as they were installed by the operating system chained handlers remain chained To disconnect the handler from the vector use bitIntVectorSet with a NULL entry C 40 Computer Group Literature Center Web Site bitIntConnect Return Values fault detected success 1 not successful vector lt 0 or gt Oxff Refer to Chapter 5 MBIT Faults for more faults http www motorola com computer literature C 41 Utility Methods Reference Pages isBitIntEnabled Name isBitIntEnabled checks if interrup
79. MBIT provides PowerPC architecture compatible single board computers with an API that allows the user s application to control subtest execution and sequencing The following list summarizes general features and functions of the API and associated diagnostic 1 The user s application controls diagnostic execution and sequencing The application dictates the execution of each diagnostic 1 Theuser s application can extend MBIT to add custom diagnostics in the system level product 1 The user s application can invoke lists of diagnostics 1 Each diagnostic executes independently of all other diagnostic http www motorola com computer literature 1 3 MBIT Overview Each diagnostic provides its own initialization resource allocation and resource de allocation The diagnostic application can control whether a subtest halts on the first error detected or runs until subtest completion The diagnostic application can clear the results of previously executed subtests The diagnostic application can halt a subtest in progress MBIT uses a time out mechanism on diagnostics to prevent them from waiting for an event that may never occur due to a hardware malfunction Exception handling mechanisms help prevent the diagnostic application from failing due to hardware faults during subtest execution MBIT reports the status for each executed subtest MBIT diagnostics cover 95 percent of stuck at faults for board add
80. MEOUT SCSI block move timed out H SCSI PARITY FAULT SCSI parity error interrupt H SCSI NO PARITY SCSI parity error interrupt failed to assert H SCSI ILLEGAL FAULT SCSI illegal instruction interrupt H SCSI NO ILLEGAL FAULT SCSI illegal instruction interrupt failed to assert H PCI BUS FAULT PCI bus fault indicated H NO PCI BUS FAULT PCI bus fault not indicated http www motorola com computer literature 5 5 MBIT Faults Table 5 2 Pre Defined MBIT Faults continued Type MBIT Fault String Description H BIT_SCSIINTERRUPT_TIMEOUT SCSI timeout interrupt received H BIT_SCSILINTERRUPT_FAULT SCSI interrupt failed to assert H BIT_SCSI_INIT_ERROR SCSI bus not free for initialization H BIT SCSI CONTROL LINE FAULT SCSI bus control lines contain bad data H SCSI DATA LINE FAULT SCSI bus data lines contain bad data H USER DATA SROM FAULT SROM user configuration data access error H BIT VME REGISTER IO FAULT VME bridge register write read access fault H BIT VME REGISTER DATA FAULT VME bridge register write read data miscompare H BIT VME REGISTER VALUE FAULT VME bridge register read value fault H BIT VME RW TARGET IO FAULT VME write read target access fault H BIT_VME_RW_TARGET_DATA_FAULT VME write read target data miscompare H BIT_VME_RW_TARGET_INT_FAULT VME write
81. METER REGISTER Thermometer register fault FAULT H THERMOMETER ALARM FAUIT Thermometer thermal alarm fault H BIT THERMOMETER RANGE FAULT Thermometer thermal range fault H BIT THERMOMETER I2C RW FAULT Thermometer read write fault H BIT_THERMOMETER_ACTIVE_FAULT Thermometer active alarm fault H BIT THERMOMETER INACTIVE Thermometer inactive alarm fault FAULT http www motorola com computer literature API Method s Reference Pages This appendix provides detailed information about the MBIT API methods mentioned in Chapter 2 Using MBIT initBit on page A 3 reinitBit on page A 5 isBitInitializationComplete on page A 6 executeBitTests on page A 7 buildBitDefaultTestList on page A 11 buildBitDefaultTestEntry on page A 13 getBitResponse on page A 14 getNumBitResponses on page A 16 abortBitTests on page A 17 getBitDeviceFault on page A 18 getBitSubtestDesc on page A 19 getBitDeviceDesc on page A 20 getBitFaultDesc on page A 21 getBitSubtestldByName on page A 22 getBitDeviceldByName on page A 23 getBitFaultldByName on page A 24 getBitNumberOfSubtests on page A 25 getBitNumberOfDevices on page A 26 getBitNumberOfFaults on page A 27 API Method s Reference Pages A getBitMaxTestListEntries on page A 28 terminateBit on page A 29 A 2 Computer Group Literature Center Web Site initBit initBit Name initBit initializes the MBIT
82. Motorola Built In Test MBIT Diagnostic Software User s Manual MBITA UM1 June 2002 Edition Copyright 2002 Motorola Inc All rights reserved Printed in the United States of America Motorola and the Motorola symbol are registered trademarks of Motorola Inc Tornado and VxWorks are registered trademarks of Wind River Systems Inc Windows is a registered trademark of Microsoft in the U S and other countries All other product or service names mentioned in this document are trademarks or registered trademarks of their respective holders Notice While reasonable efforts have been made to assure the accuracy of this document Motorola Inc assumes no liability resulting from any omissions in this document or from the use of the information obtained therein Motorola reserves the right to revise this document and to make changes from time to time in the content hereof without obligation of Motorola to notify any person of such revision or changes Electronic versions of this material may be read online downloaded for personal use or referenced in another document as a URL to the Motorola Computer Group Web site The text itself may not be published commercially in print or electronic form edited translated or otherwise altered without the permission of Motorola Inc It is possible that this publication may contain reference to or information about Motorola products machines and programs programming or services that
83. NumberOfFaults void Parameters No input parameters are required by this method Description This method returns the number of faults Return Values Upon successful completion getBitNumberOfFaults returns the number of MBIT configured faults Refer to Chapter 5 MBIT Faults for more faults http www motorola com computer literature A 27 API Method s Reference Pages A getBitMaxTestListEntries Name getBitMaxTestListEntries Treturns the maximum number of test list entries Synopsis include config bitCommonDefs h int getBitMaxTestListEntries void Parameters No input parameters are required by this method Description This method returns the maximum number of test list entries Return Values Upon successful completion getBitMaxTestListEntries returns the maximum number of MBIT configured test list entries Refer to Chapter 5 MBIT Faults for more faults A 28 Computer Group Literature Center Web Site terminateBit A terminateBit Name terminateBit terminates the MBIT software Synopsis include lt api bitApi h gt BIT_FAULT terminateBit void Parameters No input parameters are required by this method Description This method performs an orderly termination of the MBIT software including releasing allocated resources and the termination of all spawned child tasks After invoking terminateBit you may call There are n
84. ONTAINS NO CRC VPD contains no valid CRC packet BIT VPD HEADER INVALID VPD header is invalid mo oy oy co mp umm BIT_VPD_DATA_INVALID VPD data is invalid http www motorola com computer literature MBIT Faults Pre Defined MBIT Faults The pre defined faults may only be used once initialization of MBIT has successfully completed and prior to termination H hardware and S software Table 5 2 Pre Defined MBIT Faults Type MBIT Fault String Description H BIT_ECC_DETECT_ERROR Memory error correction failed H BIT_BATTERY_LOW_POWER NVRAM battery power is low Replace battery H BIT_CPU_ALU_FAULT CPU arithmetic logic unit fault H BIT_CPU_SCIU_FAULT CPU single cycle integer unit fault H BIT_CPU_MCIU_FAULT CPU multi cycle integer unit fault H BIT_CPU_FPU_FAULT CPU floating point unit fault H BIT_CPU_LSU_FAULT CPU load store unit fault H BIT_CPU_BIU_FAULT CPU bus interface unit fault H BIT_CPU_BPU_FAULT CPU branch processing unit fault H BIT_CPU_MMU_FAULT CPU memory management unit fault H BIT_CPU_VPU_FAULT CPU vector processing unit fault H BIT_VISIBILITY_FAULT Device failed visibility test H BIT_NO_VISIBILITY_LOCATION No location on device designated for visibility testing H BIT DEVICE ENABLE FAULT Failed to enable a disabled device H BIT DEVICE DISABLE FAULT Failed to disable an enabled device
85. OR_NOT_SUPPORTED unknown processor type BIT_CACHE_ROUTINE_NOT_SUPPORTED cache routine is not supported Refer to Chapter 5 MBIT Faults for more faults http www motorola com computer literature C 19 Utility Methods Reference Pages bitL2CacheOff Name bitL2CacheOff disables L2 cache without other actions Synopsis utilities bitCacheUtils h BIT FAULT bitL2CacheOff void Parameters No input parameters are required by this method Description This method disables the L2 cache without any flushing or invalidation Return Values NO FAULT fault detected success BIT PROCESSOR NOT SUPPORTED unknown processor type CACHE ROUTINE NOT SUPPORTED cache routine is not supported BIT CACHE NOT ENABLED cache must be enabled before calling cache function Refer to Chapter 5 MBIT Faults for more faults C 20 Computer Group Literature Center Web Site bitL2CacheIsEnabled bitL2CachelsEnabled Name bitL2CacheIsEnabled gives the enabled state of the L2 cache Synopsis lt utilities bitCacheUtils h gt BOOL bitL2CacheIsEnabled void Parameters No input parameters are required by this method Description This method returns the boolean enable state of L2 cache Return Values TRUE the L2 cache is enabled FALSE the L2 cache is not enabled Refer to Chapter 5 MBIT Faults for more faults http www motorola com com
86. OT PRESENT Device is not present S BIT DEVICE NOT SUPPORTED Device is not supported S BIT SUBTEST NOT SUPPORTED Selected subtest is not supported on this device S BIT INVALID TEST PARAM Invalid test parameter was supplied S BIT TEST NOT EXECUTED No results available for this test S BIT TEST ABORTED The test was aborted by the operator 5 1 MBIT Faults Table 5 1 Built In MBIT Faults continued Type MBIT Fault String Description 5 OPERATION PROGRESS A previous operation test or abort is in progress S BIT INVALID MSG ERROR An invalid message was received S BIT MESSAGE QUEUE ERROR Unable to queue or de queue a message S BIT RESOURCE MGMT FAULT A memory management error occurred 5 BIT_INSTALL_TEST_FAILED Test installation failed 5 BIT_INSTALL_DEV_FAILED Device installation failed S BIT SYS RESTORE FAILED Unable to restore pre test system state 5 BIT_TEST_SEQUENCE_ERROR Tests in list completed out of order 5 BIT_DRIVER_SEQUENCE_ERROR Driver methods invoked out of order 5 BIT_TESTING_TERMINATED Testing terminated 5 BIT_INVALID_DEVICE_DESC Device descriptor has invalid field configuration error H BIT DEVICE ENABLE FAULT Failed to enable a disabled device H BIT DEVICE DISABLE FAULT Failed to disable an enabled device H BIT BUS ERROR Device did not respond to transfer S BIT FUNCTION NOT SUPPORT
87. R is specified processing of the test list terminates with the detection of the first failed test Otherwise all tests in the test list execute without stopping for failed tests Value Definition HALT ON ERROR Test list terminates with the detection of the first failed test RUN TILL COMPLETION Test list executes without stopping for failed tests A count of the subtests contained in the test list must be supplied along with the address of an array of test entries The TEST ENTRY definition is contained in the configuration file config bitCommonDefs h Each test entry specifies a test to execute the logical device to be tested a test duration an iteration count and a test control specifying one of the values HALT ON ERROR or RUN TILL COMPLETION The test duration parameter determines the maximum allowable time in which a test must complete If the test does not complete within the specified time it aborts and a failure is declared The test duration may be affected by optional test parameters A 8 Computer Group Literature Center Web Site executeBitTests The test iteration count determines the number of times the test executes in succession The test duration parameter is automatically multiplied by the iteration count to determine total allowable execution time Required driver installation exception handler installation and test initialization are performed only once the test must provide its
88. RAMS faultCode installBitSubtestEntries installLoobackTwoTest deinstallLoopbackTwoTest runLoopbackTwoTest 1 5000 HALT ON ERROR freeLoopbackParams initLoopbackParams sizeof XXX_LOOPBACK_PARAMS 4 Install the diagnostic device drivers loopbackSubtest 1 pDrvDesc installBitDriver loopbackDrvInstall loopbackDrvDeinstall loopbackDrvOpen loopbackDrvClose loopbackDrvRead loopbackDrvWrite loopbackDrvIoctl 5 Get the device IDs to use when creating an association to the device loopbackDevices 0 getBitDeviceIldByName LOOPBACK D EVIC ON E 3 46 Computer Group Literature Center Web Site Example Diagnostic Configuration Method 6 Create an association between the subtests devices and diagnostic device drivers status createBitTestAssociations loopbackSubtests 2 loopbackDevices 1 pDrvDesc return status http www motorola com computer literature 3 47 Utility Methods Introduction MBIT provides methods to complete various activities while integrating custom diagnostics These methods are grouped into the following categories Cache Utility Methods on page 4 1 Diagnostic Device Utility Methods on page 4 13 Interrupt Utility Methods on page 4 16 Time Utility Methods on page 4 20 Refer to Appendix C Utility Methods Reference Pages for more information on these methods
89. T has not been initialized it returns 0 Refer to Chapter 5 MBIT Faults for more faults Generic Device Driver Methods MBIT provides the following generic device driver methods drvInstall on page B 17 drvDeinstall on page B 19 drvOpen on page B 21 drvClose on page B 22 drvRead on page B 23 http www motorola com computer literature B 15 Integrating Custom Diagnostics Reference Pages drvWrite on page B 25 drvloctl on page B 27 B 16 Computer Group Literature Center Web Site drvInstall drvinstall Name drvInstall finds the associated driver routine based on the subtest and logical device passed in Synopsis include lt api bitGenericDriver h gt FAULT drvInstall BIT_SUBTEST subtest LOGICAL DEVICE device Parameters subtest is the current subtest device is the device to operate on Description This method finds the associated driver routine based on the subtest and logical device passed in This method looks up the device descriptor based on the logical device passed in The associated device driver routine is then called It is suggested that this method be invoked by the install test method for the specified subtest http www motorola com computer literature B 17 Integrating Custom Diagnostics Reference Pages Return Values BIT_NO_FAULT_DETECTED no fault detected successful SUBTEST NOT SUPPORTED C se
90. TED otherwise it may return any of the return values listed in Appendix B Integrating Custom Diagnostics Reference Pages and Chapter 5 MBIT Faults drvOpen finds the associated driver method based on the subtest and logical device passed in This method looks up the device descriptor based on the logical device passed in The associated device driver method is then called Here s a synopsis of the drvOpen method include lt api bitGenericDriver h gt BIT_FAULT drvOpen BIT_SUBTEST subtest BIT LOGICAL DEVICE device where subtest is the current subtest and device is the device to operate on Upon successful completion this method returns BIT NO FAULT DETECTED otherwise it may return any of the return values listed in Appendix B ntegrating Custom Diagnostics Reference Pages and Chapter 5 MBIT Faults Computer Group Literature Center Web Site Generic Device Driver Interface drvClose drvRead drvClose finds the associated driver method based on the subtest and logical device passed in This method looks up the device descriptor based on the logical device passed in The associated device driver method is then called This method must be called before the drvDeinstall is called Here s a synopsis of the drvClose method include lt api bitGenericDriver h gt BIT_FAULT drvClose BIT_SUBTEST subtest BIT LOGICAL DEVICE device where subtest is the current subte
91. Unlock 4 5 C 10 bitInstCacheDisable 4 6 C 12 bitInstCacheEnable 4 5 C 11 bitInstCacheIsEnabled 4 6 C 13 bitInstCacheLock 4 6 C 14 bitInstCacheUnlock 4 7 C 15 bitL2CacheDisable 4 8 C 18 bitL2CacheEnable 4 7 C 17 bitL2CacheFill Q 4 12 C 28 bitL2CacheFlush 4 9 C 22 bitL2CacheFlushInvalidate 4 10 C 23 bitL2CacheInvalidate 4 10 C 24 bitL2CacheIsEnabled 4 9 C 21 bitL2CacheIsLockable 4 11 C 27 bitL2CacheIsWritebackCapable 4 12 C 30 bitL2CacheLock 4 11 C 25 bitL2CacheOff 4 9 C 20 bitL2CacheOn 4 8 C 19 bitL2CacheSizeGet 4 7 C 16 bitL2CacheUnlock 4 11 C 26 clearing the fault database 1 7 comments sending xviii configure the target D 6 conventions used in the manual xix create associations 3 3 3 43 B 8 create test lists 2 4 create VxWorks image D 2 createBitTestAssociations 3 3 3 43 B 8 D data and address nodes 1 4 default device descriptor values setup 3 24 default parameters set 3 5 default test entries 2 5 default test entry single 2 6 DESC 3 28 4 13 DEV TYPE 3 33 device address table 3 27 device descriptor fields 3 25 device descriptor structure 3 25 device driver implementing 3 12 interface 3 17 device driver interface generic 3 12 device driver methods 3 18 B 28 IN 2 Computer Group Literature Center Web Site devXXXClose 3 20 B 34 devXXXDeinstall 3 19 B 31 devXXXInstall 3 18 B 29 devXXXloctl 3 22 B 39 devXXXOpen
92. a miscompare on write and read sequence for test 6 The test plan indicates that the expected result should be Operation succeeded Test successful The parameter verification for the Ethernet External Loopback subtest on Ethernet device 2 reports Data miscompare on write and read sequence for tests 2 and 6 The test plan indicates the expected result should be Operation succeeded Test successful Known Issues 3 For the MVMES101 5107 5110 models For the SCSI subtests with fault level 3 all tests report the correct expected results but additional VxWorks output indicates interrupt MPIC Spurious Interrupt Only MBIT test results are expected any additional VxWorks output indicates an error condition For the L2 Cache Lock subtest with fault level 3 the test reports Operation succeeded Test successful The test plan indicates that the expected result should be Data miscompare on write and read sequence For the MVMES100 5101 5106 5107 5110 models For the L2 Cache Invalidate test with fault level 3 test reports Operation succeeded Test successful The test plan indicates that the expected result should be Data miscompare on write and read sequence For the Serial Port 3 tests the monitored output from the device was incomplete E 2 Computer Group Literature Center Web Site Related Documentation Motorola Computer Group Documents The Motorola publications list
93. acheLock method utilities bitCacheUtils h BIT FAULT bitInstCacheLock void Upon successful completion this method returns BIT NO FAULT DETECTED otherwise it may return any of the return values listed in Appendix C Utility Methods Reference Pages and Chapter 5 MBIT Faults 4 6 Computer Group Literature Center Web Site bitInstCacheUnlock bitlnstCacheUnlock This method unlocks the L1 instruction cache Here s a synopsis of the bitInstCacheUnlock method utilities bitCacheUtils h BIT FAULT bitInstCacheUnlock void Upon successful completion this method returns BIT NO FAULT DETECTED otherwise it may return any of the return values listed in Appendix C Utility Methods Reference Pages and Chapter 5 MBIT Faults bitL2CacheSizeGet This method returns the size in bytes of the L2 cache configured by the hardware the L2 cache controller Here s a synopsis of the bitLZCacheSizeGet method lt utilities bitCacheUtils h gt UINT bitL2CacheSizeGet void Upon successful completion this method returns numBytes L2 cache size in bytes or 0 if the size cannot be determined Refer to Chapter 5 MBIT Faults for more faults bitL2CacheEnable This method enables the L2 cache Here s a synopsis of the bitL2CacheEnable method lt utilities bitCacheUtils h gt BIT_FAULT bitL2CacheEnable void Upon successful completion this method returns BIT_NO_FAULT_DETECTED otherwise it m
94. ame bitMsDelay delays for a requested number of milliseconds Synopsis lt utilities bitTimeUtils h gt void bitMsDelay UINT32 milli Parameters milli is the number of milliseconds to delay Description This method delays for milli number of milliseconds Return Values No return values Refer to Chapter 5 MBIT Faults for more faults http www motorola com computer literature C 47 Installing MBIT with Tornado 2 1 and VxWorks This chapter provides instructions on how to install the board and system level versions of MBIT with the Tornado 2 1 development system It also explains how to modify your MVMES5100 board support package BSP get the full use out of your new diagnostic software Installing MBIT from the CD ROM The MBIT CD ROM contains four files README txt MBITLicense txt VDD html and objects tar 1 Please read the license agreement in MBITLicense txt You must accept this agreement before installing MBIT 2 Extract objects tar in your Tornado 2 1 installation directory Installing MBIT on a Microsoft Windows Platform If you are installing MBIT on a Microsoft Windows platform for VxWorks development and using the Winzip program to extract the object tar file change the Winzip configuration as follows 1 2 3 4 Select Options Configuration Select the Miscellaneous tab Under Other uncheck TAR file smart CR LF conversion Select OK Installing MBIT with Tornado 2
95. ameter structure initParamPtr is the pointer to the method that initializes the default parameter structure This method is responsible for any memory allocation and initialization of the default parameter structure paramSize is the size of the parameter structure used by the subtest Description This method installs the required subtest entry points and sets the default parameters which are used by buildBitDefaultTestList and buildBitDefaultTestEntry http www motorola com computer literature B 13 Integrating Custom Diagnostics Reference Pages Return Values BIT_NO_FAULT_DETECTED no fault detected successful BIT_INIT_ALREADY_PERFORMED MBIT initialization was already performed INIT ALLOCATION ERROR required resources for initialization are unavailable BIT INVALID TEST PARAM invalid parameter was supplied RESOURCE MGMT FAULT memory management error occurred Refer to Chapter 5 MBIT Faults for more faults B 14 Computer Group Literature Center Web Site getBitNumberOfAssociations getBitNumberOfAssociations Name getBitNumberOfAssociations obtains the number of associations Synopsis include lt config bitTestUtils h gt int getBitNumberOfAssociations void Parameters None Description This method returns the number of associations Return Values Upon successful completion getBitNumberOfAssociations returns the number of associations If MBI
96. are not available in your country Such references or information must not be construed to mean that Motorola intends to announce such Motorola products programming or services in your country Limited and Restricted Rights Legend If the documentation contained herein is supplied directly or indirectly to the U S Government the following notice shall apply unless otherwise agreed to in writing by Motorola Inc Use duplication or disclosure by the Government is subject to restrictions as set forth in subparagraph b 3 of the Rights in Technical Data clause at DFARS 252 227 7013 Nov 1995 and of the Rights in Noncommercial Computer Software and Documentation clause at DFARS 252 227 7014 Jun 1995 Motorola Inc Computer Group 2900 South Diablo Way Tempe Arizona 85282 Contents About This Manual CHeIS TEMPI AL Ges cin Loo tdi ee ERREUR EARUM xvii C mments and df xviii Conventions Used im This Mantal ues thc war E Seo S xix CHAPTER 1 Overview TREMOR E C X 1 1 e Per EO 1 3 luc lr deeem 1 3 MET eet ACRI QURE 1 3 MELT PEIGBSS rais Herb EHE EUIS EE 1 5 PSEC Fe CRN e C 1 6 Test Laist Frocessine TUS 1 6 DUDIGBE LOM PRSE ood EE FREE
97. ata nodes 1 4 address information 3 28 address types 3 31 analysis process 1 4 API methods 2 1 A 1 abortBitTests 2 7 A 17 buildBitDefaultTestEntry 2 6 A 13 buildBitDefaultTestList 2 5 A 11 executeBitTests 2 4 A 7 getBitDeviceDesc 2 10 A 20 getBitDeviceFault 1 7 2 9 A 18 getBitDeviceldByName 2 8 A 23 getBitFaultDesc 2 11 A 21 getBitFaultIdByName 2 9 A 24 getBitMaxTestListEntries 2 12 A 28 getBitNumberOfDevices 2 12 A 26 getBitNumberOfFaults 2 12 A 27 getBitNumberOfSubtests 2 11 A 25 getBitResponse 2 6 A 14 getBitSubtestDesc 2 10 A 19 getBitSubtestIdByName 2 8 A 22 getNumBitResponses 2 7 A 16 initBit 2 2 2 13 A 3 isBitInitializationComplete 2 3 A 6 reinitBit 1 7 2 3 2 9 A 5 A 18 terminateBit 2 13 A 29 application programming interface API 1 6 associations create 3 3 3 43 8 obtain number of 3 6 B 15 B BIT AUTO BASE ADDR 3 29 3 33 BIT PCI INFO 3 25 BIT TEST CONTROL 3 7 bitDataCacheDisable 4 3 C 4 bitDataCacheEnable 4 2 C 3 bitDataCacheFlush 4 3 C 6 bitDataCacheFlushInvalidate 4 4 C 7 bitDataCacheInvalidate 4 4 C 8 bitDataCacheIsEnabled 4 3 C 5 bitDataCacheLock 4 5 C 9 bitDataCacheUnlock 4 5 C 10 bitForceIntUnlock 4 17 C 39 bitInQ 4 15 C 34 bitIn8 16 32 3 37 B 45 bitInstCacheDisable 4 6 C 12 bitInstCacheEnable 4 5 C 11 bitInstCacheIsEnabled 4 6 C 13 bitInstCacheLock 4 6 C 14 bitInstCacheUnlock 4 7
98. ataCacheFlushIinvalidate Name bitDataCacheFlushInvalidate flushes and invalidates the L1 data cache Synopsis lt utilities bitCacheUtils h gt BIT_FAULT bitDataCacheFlushInvalidate void Parameters No input parameters are required by this method Description This method flushes and invalidates the entire L1 data cache Return Values BIT_NO_FAULT_DETECTED no fault detected success BIT_PROCESSOR_NOT_SUPPORTED unknown processor type CACHE ROUTINE NOT SUPPORTED cache routine is not supported DATA CACHE NOT ENABLED data cache must be enabled before calling cache function Refer to Chapter 5 MBIT Faults for more faults http www motorola com computer literature C 7 Utility Methods Reference Pages bitDataCachelnvalidate Name bitDataCacheInvalidate invalidates the L1 data cache for a range of memory Synopsis lt utilities bitCacheUtils h gt BIT_FAULT bitDataCacheInvalidate void address UINT bytes Parameters address is the virtual address to begin invalidation bytes is the number of bytes to invalidate Description This method invalidates the L1 data cache for a range of memory Return Values FAULT fault detected success PROCESSOR NOT SUPPORTED unknown processor type CACHE ROUTINE NOT SUPPORTED cache routine is not supported Refer to Chapter 5 MBIT Faults for more faults C 8 Computer Gro
99. ay return any of the return values listed in Appendix C Utility Methods Reference Pages and Chapter 5 MBIT Faults http www motorola com computer literature 4 7 Utility Methods bitL2CacheDisable This method flushes invalidates and then disables the L2 cache If a NULL buffer is provided then a local buffer is allocated for use and free d before return If the size of a given non NULL buffer is not equal to twice the L2 cache size or is not naturally aligned then no action is taken by the method Here s a synopsis of the bitL2CacheDisable method lt utilities bitCacheUtils h gt BIT FAULT bitL2CacheDisable void pFlushBuffer int buffSize where pFlushBuffer and buffSize are the input parameters pFlushBuffer is a pointer to a cacheable memory block twice the size of the L2 cache and aligned naturally If NULL a local buffer is used and buffSize is ignored The local buffer will not be guaranteed to be cacheable if BATs or page tables have been altered prior to calling buffSize is the size of the flush buffer in bytes It must be equal to twice the L2 cache size Upon successful completion this method returns BIT NO FAULT DETECTED otherwise it may return any of the return values listed in Appendix C Utility Methods Reference Pages and Chapter 5 MBIT Faults bitL2CacheOn This method enables the L2 cache without any flushing or invalidation Here s a synopsis of the bitL2CacheOn method
100. be enabled before calling cache function Refer to Chapter 5 MBIT Faults for more faults C 4 Computer Group Literature Center Web Site bitDataCacheIsEnabled bitDataCachelsEnabled Name bitDataCacheIsEnabled gives the enabled state of the L1 data cache Synopsis lt utilities bitCacheUtils h gt BOOL bitDataCacheIsEnabled void Parameters No input parameters are required by this method Description This method returns the boolean enable state of L1 data cache Return Values TRUE the L1 data cache is enabled FALSE the L1 data cache is not enabled Refer to Chapter 5 MBIT Faults for more faults http www motorola com computer literature C 5 Utility Methods Reference Pages bitDataCacheFlush Name bitDataCacheFlush flushes the L1 data cache Synopsis utilities bitCacheUtils h BIT FAULT bitDataCacheFlush void Parameters No input parameters are required by this method Description This method flushes the entire L1 data cache Return Values NO FAULT fault detected success BIT PROCESSOR NOT SUPPORTED unknown processor type BIT CACHE ROUTINE NOT SUPPORTED cache routine is not supported DATA CACHE NOT ENABLED 4data cache must be enabled before calling cache function Refer to Chapter 5 MBIT Faults for more faults C 6 Computer Group Literature Center Web Site bitDataCacheFlushInvalidate bitD
101. btest is the current subtest device is the device to operate on function is the driver specific operation to perform on the device or driver and argument is a driver specific argument for the function Upon successful completion this method returns BIT NO FAULT DETECTED otherwise it may return any of the return values listed in Appendix B Integrating Custom Diagnostics Reference Pages and Chapter 5 MBIT Faults Device Driver Interface The MBIT device driver interface is similar to most device driver implementations However there are certain differences that the developer should observe to ensure a successful implementation with the MBIT environment To integrate a device driver with the MBIT application the developer must provide seven driver methods when the driver is configured with installBitDriver These driver methods provide the capability of communicating between the MBIT application and the device The driver must provide the standard install deinstall open close read write and ioctl methods to implement the necessary interface There may be cases when a device does not need to implement one of these driver methods In this case the developer can stub the driver method by simply providing a method that returns a successful status http www motorola com computer literature 3 17 Integrating Custom Diagnostics MBIT provides the following driver methods Method Description devXXXInstall
102. btest parameters 1 Declare the parameter structure used by the diagnostics typedef struct int length int data XXX LOOPBACK PARAMS 2 Create the method to initialize parameter defaults BIT FAULT initLoopbackParams BIT SUBTEST subtest void testParamPtr BIT FAULT faultCode XXX LOOPBACK PARAMS loopParams int defaultLength 10 loopParams malloc sizeof XXX LOOPBACK PARAMS loopParams length defaultLength loopParams data malloc defaultLength sizeof int for i 0 i lt defaultLength i data i OxFFOOFFO00 testParamPtr loopParams return getBitFaultIdByName BIT_NO_FAULT_DETECTED http www motorola com computer literature 3 9 Integrating Custom Diagnostics 3 Create the method to free parameter defaults Any memory allocated during initialization is free d and the parameter pointer is set to NULL BIT_FAULT freeLoopbackParams BIT_SUBTEST subtest void testParamPtr XXX_LOOPBACK_PARAMS loopParams XXX LOOPBACK PARAMS testParamPtr free loopParams data loopParams data NULL free loopParams loopParams NULL testParamPtr NULL return getBitFaultIdByName NO FAULT DETECTED Subtest Configuration A subtest is integrated using a configuration method that includes the following 1 Subtest Addition 2 Subtest Installation 3 Addition of Subtest Specifi
103. byte swaps 16 32 bit data to the designated address The big little endian data is written into a 16 32 bit data location as little big endian The MBIT exception handler is enabled during the data read If the MBIT exception handler is not necessary to catch exceptions caused by the access to the device then bitOutSwap16 bitOutSwap32 should be used Here s a synopsis of the bitProbeOutSwap16 32 method include utilities bitDeviceUtils h STATUS bitProbeOutSwapl6 ULONG addr UINT16 data STATUS bitProbeOutSwap32 ULONG addr UINT32 data where addr is the address to write data to and data is the data to write out Upon successful completion this method returns 0 If an exception occurs is returned Refer to Appendix B Integrating Custom Diagnostics Reference Pages and Chapter 5 MBIT Faults for more information Computer Group Literature Center Web Site Device Initialization Method bitIn8 16 32 bitIn8 16 32 reads 8 16 32 bit data from the designated address The data read is written into a 32 bit memory location This method requires a 32 bit memory location for storing the data because it is used by the device utility methods bitIn bitOut These methods store the location s contents in the 32 bit value field of the ADDR_INFO structure The MBIT exception handler is not enabled during the data read If the MBIT exception handler is needed to catch exceptions caused b
104. c 2 10 A 19 getBitSubtestIdByName 2 8 A 22 getDeviceDescriptor 4 13 C 31 getDevTablePtr 4 14 C 32 getNumBitResponses 2 7 A 16 H HALT ON ERROR 2 5 A 8 hardware address information 3 28 address types 3 31 image modification D 6 implementing a device driver 3 12 INIT STAT 3 25 initBit 2 2 2 13 A 3 initialization status 2 3 initializing diagnostic devices 3 24 initializing MBIT 2 2 installBitDriver 3 4 3 13 B 10 installBitSubtestEntries 3 5 3 8 3 11 B 12 installing a device driver 3 23 installing MBIT D 1 on a Microsoft Windows platform D 1 integrating custom diagnostics B 1 interrupt utility methods 4 16 C 36 bitForceIntUnlock 4 17 C 39 bitIntConnect 4 17 C 40 bitIntDisable 4 19 C 45 bitIntEnable 4 19 C 44 bitIntLock 4 16 C 37 bitIntUnlock 4 17 C 38 bitIntVectorSet 4 18 C 43 isBitIntEnabled 4 18 C 42 isBitInitializationComplete 2 3 A 6 isBitIntEnabled 4 18 C 42 issues known E 1 K known issues E 1 installation E 1 subtest results E 1 L list control HALT ON ERROR 2 5 RUN TILL COMPLETION 2 5 LOCMON testing D 12 M man pages API methods A 1 cache utility methods C 1 device driver methods B 28 IN 4 Computer Group Literature Center Web Site device read write utility methods B 40 diagnostic device utility methods C 30 diagnostic integration methods B 1 generic device driver methods B 15 interrupt utility methods C 36 time utili
105. c MBIT Faults Subtest Addition Subtests are added by providing a name and description to addBitSubtestIdent The number of subtests is obtained by calling getBitNumberOfSubtests 3 10 Computer Group Literature Center Web Site Subtest Configuration Subtest Installation Subtest installation is performed with a call installBitSubtestEntries for each subtest added to the MBIT system This method associates the subtest methods that 1s installation execution and de installation with the subtest and sets the default values See the Motorola Built In Test MBIT Diagnostic Software Test Reference Guide for each subtest s default values Addition of Subtest Specific MBIT Faults A fault identifier is added by providing a name description and fault type to addBitFaultIdent The fault type is used to specify whether the fault is a system or hardware fault System faults are not saved in the device fault database Example Subtest Configuration faultCode addBitSubtestIdent LOOPBACK SUBTEST ONE Loopback subtest number one amp loopSubtests 0 faultCode installBitSubtestEntries loopbackSubtest 0 installLoopbackOneTest deinstallLoopbackOneTest runLoopbackOneTest 1 1000 RUN TILL COMPLETION freeLoopbackParams initLoopbackParams sizeof LOOPBACK PARAMS http www motorola com computer literature 3 11 Integrating Custom Diagnostics Implementing a
106. ce passed in This method looks up the device descriptor based on the logical device passed in The associated device driver routine is then called http www motorola com computer literature B 23 Integrating Custom Diagnostics Reference Pages This method must be called after the drvOpen has been called Return Values BIT_NO_FAULT_DETECTED no fault detected successful SUBTEST NOT SUPPORTED selected subtest is not supported on this device DEVICE NOT SUPPORTED device is not supported DRIVER SEQUENCE ERROR 4river methods invoked out of order INVALID DEVICE DESC device descriptor has invalid field configuration error Refer to Chapter 5 MBIT Faults for more faults B 24 Computer Group Literature Center Web Site drvWrite drvWrite Name drvWrite finds the associated driver routine based on the subtest and logical device passed in Synopsis include lt api bitGenericDriver h gt BIT_FAULT drvWrite BIT_SUBTEST subtest BIT LOGICAL DEVICE device unsigned int bufferSize char buffer unsigned int bytesWritten Parameters subtest is the current subtest device is the device to operate on bufferSize is the number of bytes from buffer to write buffer is the buffer to write data from bytes Written is the pointer to the number of bytes written Description This method finds the associated driver routine based on the subtest and
107. cks until a call is made to executeBitTests and all subtests in the list complete execution getBitResponse returns a single test results list and removes it from the response queue Here s a synopsis of the getBitResponse method finclude lt api bitApi h gt FAULT getBitResponse TEST RESULTS ENTRY testResults unsigned int numberOfResults where testResults is a user allocated array for the test results and numberOfResults will receive the number of entries in the test results list 2 6 Computer Group Literature Center Web Site Executing Subtests in MBIT If the number of results exceeds the value returned by getBitMaxTestListEntries an error is returned The number of testResults entries allocated must be greater than or equal to the number of test entries submitted with executeBitTests The number of testResults returned will be less than or equal to the number of test entries submitted with executeBitTests Upon successful completion this method returns BIT_NO_FAULT_DETECTED otherwise it may return any of the return values listed in Appendix A API Method s Reference Pages and Chapter 5 MBIT Faults getNumBitResponses getNumBitResponses provides the number of MBIT test results lists in the MBIT response queue Here s a synopsis of the getNumBitResponses method include lt api bitApi h gt BIT FAULT getNumBitResponses int msgCount where msgCount will conta
108. designated for read visibility testing SROM_WR_VISIBLE_TEST Serial ROM write only location designated for write visibility testing SROM_RDWR_VISIBLE_TEST Serial ROM read write location designated for read write visibility testing Computer Group Literature Center Web Site Device Initialization Method Device Type DEV_TYPE The device type provides MBIT with a general description of the device MBIT currently supports PCI ISA memory and general device types PCI device hardware addresses are configured internally by MBIT during initialization if baseAddr is set to AUTO BASE ADDR MBIT does not perform any additional device type configurations for other supported device types Table 3 4 Device Type DEV TYPE Field TYPE NONE Description Device type invalid DEV TYPE PCI Device type PCI DEV TYPE ISA Device type ISA DEV TYPE MEM Device type memory DEV TYPE GEN Device type general Device Read and Write Utility Methods The device read and write utility methods provided by MBIT are added to the device descriptor during device initialization These are then used by bitIn bitOut to access the device hardware addresses MBIT provides the following device read and write utility methods Method bitProbeIn amp 16 32 Description Reads 8 16 32 bit data from the designated address bitProbeOut8 16 32 bitPr
109. devXXXWrite DEV DESC pDevDesc UINT32 bufferSize INT8 bufferAddr UINT32 bytesWritten Parameters pDevDesc is a pointer to a structure that contains all of the registers that are needed to perform a write operation on the device Using the register definitions in the device descriptor guarantees that the correct device is being accessed bufferSize contains the number of bytes that the user expects to write to the device If the device supports transfers wider than a byte the driver should adjust the count appropriately bufferAddr points to the first element of the data buffer that the driver reads data that is to be written to the device The caller should provide a data buffer sufficiently large enough to reflect the requested number of bytes defined in the bufferSize parameter bytesWritten points to the variable that the driver returns as the number of bytes written In the event of an error the bytesWritten variable should reflect the actual byte count of the output data http www motorola com computer literature B 37 Integrating Custom Diagnostics Reference Pages Description This method allows the driver to write information to the device It receives a pointer to the device descriptor of the device being tested the requested buffer size a pointer to the buffer address and a pointer to a variable that holds the number of bytes written The developer should also update the variable po
110. ds a subtest entry with the provided identifier and description Here s a synopsis of the addBitSubtestIdent method include lt config bitTestUtils h gt BIT_FAULT addBitSubtestIdent const char subtest const char description BIT SUBTEST id where subtest is the unique subtest name description is the description of the subtest name and id is the unique ID being returned that represents the subtest Upon successful completion this method returns BIT NO FAULT DETECTED and places a new unique ID in id otherwise it may return any of the return values listed in Appendix B Integrating Custom Diagnostics Reference Pages and Chapter 5 MBIT Faults addBitDeviceldent This method adds a device entry with the provided identifier and description Here s a synopsis of the addBitDeviceIdent method include lt config bitTestUtils h gt BIT FAULT addBitDeviceIdent const char device const char description BIT LOGICAL DEVICE id where device is the unique device name description is the description of the device name and id is the unique ID being returned that represents the device Upon successful completion this method returns BIT NO FAULT DETECTED and places a new unique ID in id otherwise it may return any of the return values listed in Appendix B Computer Group Literature Center Web Site addBitFaultIdent Integrating Custom Diagnostics Reference Pages and Chapter 5 M
111. e Description This method fills in a test list with default test entries for each subtest associated with the given device The list of test entries must be allocated before this method is called The maximum number of test entries returned is no more than the value returned by the getBitMaxTestListEntries method Refer to the Motorola Built In Test MBIT Diagnostic Software Test Reference Guide for a list of subtests and the associated devices http www motorola com computer literature A 11 A API Method s Reference Pages A Return Values BIT_NO_FAULT_DETECTED no fault detected successful BIT_INIT_NOT_PERFORMED MBIT initialization was already performed BIT INVALID TEST PARAM invalid parameter was supplied Refer to Chapter 5 MBIT Faults for more faults A 12 Computer Group Literature Center Web Site buildBitDefaultTestEntry buildBitDefaultTestEntry Name buildBitDefaultTestEntry fills in a single default test entry Synopsis include lt config testDefaults h gt BIT FAULT buildBitDefaultTestEntry BIT_SUBTEST subtestId BIT LOGICAL DEVICE deviceld TEST ENTRY testEntry Parameters subtestId is an ID specifying a unique subtest deviceld is an ID specifying a unique device testEntry is a test entry being returned for the associated subtest and device Description This method fills in a single default test entry for the associated subtest and
112. e passed to the method Here s a synopsis of the bitOut method lt utilities bitCacheUtils h gt BIT_FAULT bitOut ADDR_INFO reg where reg is the pointer to the location s ADDR_INFO structure Upon successful completion this method returns BIT_NO_FAULT_DETECTED otherwise it may return any of the http www motorola com computer literature 4 15 Utility Methods return values listed in Appendix C Utility Methods Reference Pages and Chapter 5 MBIT Faults Interrupt Utility Methods MBIT provides methods to lock unlock interrupts and to connect methods to exceptions interrupts for use during diagnostics The header file utilities bitCacheUtils h provides the prototypes for these methods Method Description bitIntLock Has the capability to lock all interrupts bitIntUnlock Has the capability to unlock all interrupts bitForceIntUnlock Has the capability to unlock all interrupts bitIntConnect Connects an MBIT interrupt handler to the MBIT interrupt table isBitIntEnabled Checks if an interrupt is enabled on a specified interrupt level bitIntVectorSet Sets a vector entry in the MBIT interrupt table bitIntEnable Enables the interrupt level bitIntDisable Disables the interrupt level bitIntLock This method increments an interrupts locked reference count and if interrupts are not locked it locks all interrupts Here s a synopsis of the bitI
113. e A er OO 4 18 E T TET 4 18 DIME NODIGT T 4 19 aT 4 19 Time CORE MIO E asrni bisce 4 20 PUS 4 20 4 20 CHAPTER 5 MBIT Faults Balta MBIT FAES iouis oto po iP PEE ESPRIT RR NAR 5 1 Ege 5 4 viii APPENDIX Method s Reference Pages TN I AEE E EE AE PA nance AU MEH AMD E Ac ut A 3 T ED D EE A 5 isBitlpibalizatont omplete eunana ana Ran kaia Neta REAA A 6 7 11 Tes ENUY 13 Pid jp A 14 A 16 RIEN E A A A EE EIS M MES A 17 Bessere QURE E apos E T ET AE fret rrr AE M ERR DR A 18 Pole StD c g eem cU m A 19 sapie AES AREAS Or A 20 ge M T A 21 HEEPAESODEESEEDD S ODE cuscuisca epa bp BiU LU p MA CRANE FIRES pO RUMP A 22 Piast
114. e bitL2CacheFlush method lt utilities bitCacheUtils h gt BIT_FAULT bitL2CacheFlush void pFlushBuffer int buffSize where pFlushBuffer and buffSize are the input parameters http www motorola com computer literature 4 9 Utility Methods pFlushBuffer is a pointer to a cacheable memory block twice the size of the L2 cache and aligned naturally If NULL a local buffer is used and buffSize is ignored The local buffer will not be guaranteed to be cacheable if BATs or page tables have been altered prior to calling buffSize is the size of the flush buffer in bytes It must be equal to twice the L2 cache size Upon successful completion this method returns BIT_NO_FAULT_DETECTED otherwise it may return any of the return values listed in Appendix C Utility Methods Reference Pages and Chapter 5 MBIT Faults bitL2CacheFlushinvalidate This method flushes and invalidates the entire L2 cache Here s a synopsis of the bitL2CacheFlushInvalidate method lt utilities bitCacheUtils h gt BIT_FAULT bitL2CacheFlushInvalidate void Upon successful completion this method returns BIT_NO_FAULT_DETECTED otherwise it may return any of the return values listed in Appendix C Utility Methods Reference Pages and Chapter 5 MBIT Faults bitL2Cachelnvalidate This method invalidates the entire L2 cache Any modified data in the L2 cache is lost unless it is flushed first Here s a synopsis of the bitL2CacheInvalidate
115. e descriptor based on the logical device passed in The associated device driver method is then called Itis suggested that this method be invoked by the install test method for the specified subtest Here s a synopsis of the drvInstall method finclude api bitGenericDriver h FAULT 11 SUBTEST subtest BIT LOGICAL DEVICE device where subtest is the current subtest and device is the device to operate on Upon successful completion this method returns BIT NO FAULT DETECTED otherwise it may return any of the return values listed in Appendix B Integrating Custom Diagnostics Reference Pages and Chapter 5 MBIT Faults http www motorola com computer literature 3 13 Integrating Custom Diagnostics drvDeinstall drvOpen drvDeinstall finds the associated driver method based on the subtest and logical device passed in This method looks up the device descriptor based on the logical device passed in The associated device driver method is then called This method must be invoked by the de install test method for the specified subtest Here s a synopsis of the drvDeinstall method include lt api bitGenericDriver h gt BIT FAULT drvDeinstall BIT SUBTEST subtest BIT LOGICAL DEVICE device where subtest is the current subtest and device is the device to operate on Upon successful completion this method returns BIT NO FAULT DETEC
116. e is not lockable Refer to Chapter 5 MBIT Faults for more faults http www motorola com computer literature C 27 Utility Methods Reference Pages bitL2CacheFill Name bitL2CacheFill fills the L2 cache with the specified pattern Synopsis utilities bitCacheUtils h FAULT bitL2CacheFill UINT bufPtr UINT castOutBuf UINT wordCount UINT pattern int modifier Parameters bufPtr is a pointer to a cacheable buffer to fill castOutBuf is a pointer to a cacheable buffer to fill that causes data to be cast out from the L1 data cache This may be necessary depending on the L1 L2 cache controller design victim caches wordCount is the number of 32 bit words to fill pattern is the pattern to fill the buffer with modifier is the value with which to modify the pattern after each write to the buffer Description This method fills the specified number of 32 bit words in the L2 cache with the specified pattern The pattern is incremented by the modifier after every write C 28 Computer Group Literature Center Web Site bitL2CacheFill Return Values BIT_NO_FAULT_DETECTED no fault detected success BIT_PROCESSOR_NOT_SUPPORTED unknown processor type BIT INVALID TEST PARAM invalid test parameter was supplied CACHE NOT ENABLED cache must be enabled before calling cache function Refer to Chapter 5 MBIT Faults for more faults http www motorola com computer lit
117. ed below are referenced in this manual You can obtain paper or electronic copies of Motorola Computer Group publications by 21 Contacting your local Motorola sales office 1 Visiting Motorola Computer Group s World Wide Web literature site http www motorola com computer literature Table F 1 Motorola Computer Group Documents Document Title Motorola Publication Number Motorola Built In Test MBIT Diagnostic MBITA RM Software Test Reference Guide MVMES100 Single Board Computer Installation V5100A IH and Use MVMES100 Single Board Computer V5100A PG Programmer s Reference Guide IPMC712 761 Module Installation and Use VIPMCA IH MVME712M Transition Module Installation and MVE712MA IH Use MVME761 Transition Module Installation and Use VME761A IH To obtain the most up to date product information in PDF or HTML format visit http www motorola com computer literature Related Documentation Manufacturers Documents For additional information refer to the following table for manufacturers data sheets or user s manuals As an additional help a source for the listed document is provided Please note that while these sources have been verified the information is subject to change without notice Table F 2 Manufacturers Documents Document Title and Source PowerPCTM Microprocessor Family The Programming Environment for 32 Bit Microprocessors Literature
118. eger at numTests and the test entries for the device are placed in the buffer starting at testEntryList Upon successful completion this method returns BIT NO FAULT DETECTED otherwise it may return any of the http www motorola com computer literature 2 5 Using MBIT return values listed in Appendix A API Method s Reference Pages and Chapter 5 MBIT Faults buildBitDefaultTestEntry buildBitDefaultTestEntry fills in a single default test entry for the associated subtest and device The test entry must be allocated before this method is called Here s a synopsis of the buildBitDefaultTestEntry method include api bitApi h FAULT buildBitDefaultTestEntry SUBTEST subtestId BIT LOGICAL DEVICE deviceld TEST ENTRY testEntry where subtestId is an ID specifying a unique subtest deviceID is an ID specifying a unique device and the test entry for subtest and device is placed in the TEST ENTRY as testEntry Upon successful completion this method returns BIT NO FAULT DETECTED otherwise it may return any of the return values listed in Appendix A API Method s Reference Pages and Chapter 5 MBIT Faults getBitResponse getBitResponse provides the results of a test list submitted by invoking executeBitTests getBitResponse blocks until the executing subtest completes times out or aborts If this method is called when no subtests are executing it blo
119. entries in the test list testList is an array of tests to execute Description Executing subtests begins with creating test lists and submitting them for execution by calling executeBitTests Follow this method up with getBitResponse which returns test results abortBitTests allows aborting test execution any time outside critical sections during tests See the section on subtest attributes in the Test Reference Guide for a list of subtests with protected critical sections An MBIT application may occupy two threads of execution All API methods except getBitResponse must be called from the thread initBit is called from getBitResponse may be called from another thread http www motorola com computer literature A 7 A A API Method s Reference Pages Note A user may submit a test list filled with default test entries for a given device by calling either buildBitDefaultTestList or buildBitDefaultTestEntry This method submits and executes MBIT tests In creating a test list the following applies 1 Any subtest can be included in a single test list and a test list may contain a single entry L The number of subtest entries in a test list is limited to the getBitMaxTestListEntrie s method L Only one subtest is executed at any one time To execute a test list specify the listControl parameter with one of the available values HALT ON RUN TILL COMPLETION If HALT ON ERRO
120. epresenting the fault identifier 1 the fault is not found Refer to Chapter 5 MBIT Faults for more faults A 24 Computer Group Literature Center Web Site getBitNumberOfSubtests A getBitNumberOfSubtests Name getBitNumberOfSubtests Treturns the number of subtests Synopsis include config bitCommonDefs h int getBitNumberOfSubtests void Parameters No input parameters are required by this method Description This method returns the number of subtests Return Values Upon successful completion getBitNumberOfSubtests returns the number of MBIT configured subtests Refer to Chapter 5 MBIT Faults for more faults http www motorola com computer literature A 25 API Method s Reference Pages A getBitNumberOfDevices Name getBitNumberOfDevices Treturns the number of devices Synopsis include config bitCommonDefs h int getBitNumberOfDevices void Parameters No input parameters are required by this method Description This method returns the number of devices Return Values Upon successful completion getBitNumberOfDevices returns the number of MBIT configured devices Refer to Chapter 5 MBIT Faults for more faults A 26 Computer Group Literature Center Web Site getBitNumberOfFaults A getBitNumberOfFaults Name getBitNumberOfFaults returns the number of faults Synopsis include config bitCommonDefs h int getBit
121. er Web Site bitIntEnable bitiIntEnable This method enables the interrupt level Here s a synopsis of the bitIntEnable method lt utilities bitCacheUtils h gt INT32 bitIntEnable INT32 level where level is the interrupt level to enable Upon successful completion this method returns OK if no fault is detected or 1 if the interrupt level could not be resolved Refer to Appendix C Utility Methods Reference Pages and Chapter 5 MBIT Faults for more information bitiIntDisable This method disables the interrupt level Here s a synopsis of the bitIntDisable method lt utilities bitCacheUtils h gt INT32 bitIntDisable INT32 level where evel is the interrupt level to be disabled Upon successful completion this method returns OK if no fault is detected or 1 if the interrupt level could not be resolved Refer to Appendix C Utility Methods Reference Pages and Chapter 5 MBIT Faults for more information http www motorola com computer literature 4 19 Utility Methods Time Utility Methods MBIT provides two time related utility methods The header file utilities bitCacheUtils h provides the prototypes for these methods Method Description bitUsDelay Delays micro number of microseconds bitMsDelay Delays for milli number of milliseconds bitUsDelay This method delays micro number of microseconds Note that the resolution may be more than a microsecond so th
122. er was supplied Refer to Chapter 5 MBIT Faults for more faults http www motorola com computer literature C 33 Utility Methods Reference Pages bitin bitInQ teads from the location described by the ADDR_INFO structure Synopsis utilities bitDeviceUtils h BIT FAULT bitIn ADDR INFO reg Parameters reg is the pointer to the location s ADDR INFO structure Description This method reads from the location described by the ADDR INFO structure passed to the method If an exception is caused by the read BIT BUS ERROR is returned to indicate an exception occurred If a device is not enabled and enable disable methods are defined then the device is enabled written to and then disabled The value read from the location is put into the va field of the ADDR INFO structure passed to the method Return Values FAULT DETECTED no fault detected success BUS ERROR 4device did not respond to transfer DEVICE ENABLE FAULT failed to enable a disabled device BIT DEVICE DISABLE FAULT failed to disable an enabled device BIT INVALID TEST PARAM invalid test parameter was supplied INVALID DEVICE 8 descriptor has invalid field configuration error Refer to Chapter 5 MBIT Faults for more faults Computer Group Literature Center Web Site bitOut bitOut Name bitOut writes to the location described by the ADDR INFO structure Synopsis
123. erature C 29 Utility Methods Reference Pages bitL2CachelsWritebackCapable Name bitL2CachelsWritebackCapable gives the write back capability of the L2 cache Synopsis utilities bitCacheUtils h BOOL bitL2CacheIsWritebackCapable void Parameters No input parameters are required by this method Description This method returns the boolean write back capability of the L2 cache Return Values TRUE the L2 cache supports write back FALSE the L2 cache does not support write back Refer to Chapter 5 MBIT Faults for more faults Diagnostic Device Utility Methods MBIT provides the following diagnostic device utility methods getDeviceDescriptor getDevTablePtr bitTrackChanges bitIn bitOut C 30 Computer Group Literature Center Web Site getDeviceDescriptor getDeviceDescriptor Name getDeviceDescriptor returns a pointer to the device descriptor Synopsis lt utilities bitDeviceUtils h gt DEV DESC getDeviceDescriptor BIT LOGICAL DEVICE device Parameters device is the logical device to retrieve Description This method takes a logical device number and returns a pointer to the device descriptor The device descriptor contains all the information needed to interface with the device Return Values DEV_DESC a pointer to the device descriptor NULL the device descriptor is invalid Refer to Chapter 5 MBIT Faults for more faults
124. eric device address table structure structure is free d during termination of MBIT BIT SMC G malloc sizeof BIT_SMC_G ENR EG_T genReg ENR Declare static device address table structure static BIT_HAWK_SMC_REG_T smc Add the device to the device list faultCode addBitDeviceIdent BIT MEMORY CONTROLLER Memory Controller amp memDev Set the logical device to return from addBitDeviceldent pDevDesc logicalDev memDev Get the device descriptor for this device pDevDesc getDevTablePtr memIdent Set the default initialization status pDevDesc initStat INIT NOT INITIALIZED Set the default 8 16 and 32 bit read and write methods pDevDesc inReg8 INREG8 FUNCPTR bitProbeIn8 pDevDesc outReg8 OUTREG8 FUNCPTR bitProbeOut8 pDevDesc inReg16 INREG16 FUNCPTR bitProbeInl6 pDevDesc outReg16 OUTREG16 FUNCPTR bitProbeOutl16 pDevDesc inReg32 INREG32 FUNCPTR bitProbeIn32 pDevDesc outReg32 OUTREG32 FUNCPTR bitProbeOut32 http www motorola com computer literature 3 41 Integrating Custom Diagnostics 10 11 12 13 Set the device type pDevDesc devType GEN Set the device class pDevDesc devName HAWK Set the interrupt level and vector pDevDesc
125. es that the correct device is being accessed bufferSize contains the number of bytes that the user expects to read from the device If the device supports transfers wider than a byte the driver should adjust the count appropriately bufferAddr points to the first element of the data buffer that the driver stores the data that is read from the device The caller must provide a data buffer sufficiently large enough to accept the requested number of bytes defined in the buffer size parameter bytesRead points to the variable that the driver returns as the number of bytes read In the event of an error the byte count should reflect the actual byte count of the received data http www motorola com computer literature B 35 Integrating Custom Diagnostics Reference Pages Description This method allows the user to read information from the device It receives a pointer to the device descriptor of the device being tested the requested buffer size a pointer to the buffer address and a pointer to a variable that holds the number of bytes read The developer should also update the variable pointed to by the bytesRead parameter before returning to the caller Return Values The return values for this method are determined by the developer B 36 Computer Group Literature Center Web Site devXXXWrite dev XXXWrite Name devXXX Write allow the driver to write information to the device Synopsis
126. ess Table Array part of DEV_DESC The address table array defines each hardware address for a device The hardware addresses are the complete addresses which are calculated by adding the address offset with the base address of the device The address information structure contains the information for one particular device hardware address The structure is used by bitIn bitOut see Chapter 4 Utility Methods when accessing a http www motorola com computer literature 3 27 Integrating Custom Diagnostics hardware address In addition it provides a means to keep track of bits toggled during read and or write accesses to the hardware address Table 3 2 Address Information ADDR_INFO Field Description addr A hardware address on a device The address is calculated by adding the device base address with the offset of the hardware address refer to the Device Address Table Array part of DEV_DESC mask A mask used to mark read write bits A mask of OxOF for an 8 bit hardware address indicates the four high order bits are read only val A value used to store data read from or written to a hardware address To write the data to a hardware address assign the data to this field and then use bitOut to write the value save The location to allow a developer to save a value read from the hardware address size The number of addressable bytes at the hardware address type A type of hardware address
127. est custom hardware and or system components Chapter 3 Integrating Custom Diagnostics Chapter 4 Utility Methods Appendix B Integrating Custom Diagnostics Reference Pages and Appendix C Utility Methods Reference Pages are specifically for the system level version of MBIT Application Analysis Software Diagnostic API VxWorks MBIT Test Interface MBIT Test Driver Interface MBIT OS System API Abstraction Custom Tests Custom Driver Motorola Board Before using the MBIT diagnostic software connect and configure the board and other hardware according to the respective installation guide System Hardware Control 1 2 Computer Group Literature Center Web Site System Requirements System Requirements In order to successfully install and use this diagnostic software you need the following items V Wind River Systems Inc Tornado 2 1 development environment V Wind River Systems Inc VxWorks real time operating system Y Motorola s MVMES51xx VME processor module 4 Wind River Systems Inc board support package BSP for Motorola s MVMES51xx VME processor module PN TDK 14498 ZC Refer to the Help pull down menu in your Tornado 2 1 environment for more information on system requirements Installation Refer to Appendix D Installing MBIT with Tornado 2 1 and VxWorks for instructions on how to install the MBIT diagnostic software MBIT Features
128. ethods getBitSubtestIdByName getBitDeviceIdByName and getBitFaultIdByName The string descriptions returned should not be modified or freed getBitSubtestDesc getBitSubtestDesc returns a string describing the subtest Here s a synopsis of the getBitSubtestDesc method include lt api bitApi h gt const char getBitSubtestDesc BIT SUBTEST subtestId where subtestld is an ID specifying a unique subtest Upon successful completion getBitSubtestDesc returns a string containing the subtest description If it fails it returns an empty string Refer to Chapter 5 MBIT Faults for more return values getBitDeviceDesc getBitDeviceDesc returns a string describing the logical device Computer Group Literature Center Web Site Obtaining Counts in MBIT Here s a synopsis of the getBitDeviceDesc method include lt api bitApi h gt const char getBitDeviceDesc LOGICAL DEVICE deviceld where deviceld is an ID specifying a unique device Upon successful completion getBitDeviceDesc returns a string containing the device description If it fails it returns an empty string Refer to Chapter 5 MBIT Faults for more return values getBitFaultDesc getBitFaultDesc returns a string describing the fault Here s a synopsis of the getBitFaultDesc method include lt api bitApi h gt const char getBitFaultDesc BIT FAULT faultId where faultId is an ID specifying a unique fault
129. etween subtests devices and a driver If a driver is not available for the associated subtest and device the pDriveDesc parameter should be NULL 8 Computer Group Literature Center Web Site createBitTestAssociations Return Values BIT_NO_FAULT_DETECTED no fault detected successful INIT ALREADY PERFORMED MBIT initialization was already performed INIT ALLOCATION ERROR required resources for initialization are unavailable INVALID TEST PARAM invalid parameter was supplied INVALID SUBTEST ID subtest ID is invalid INVALID DEVICE ID device ID is invalid BIT_DUPLICATE_ASSOCIATION association has already been created BIT_RESOURCE_MGMT_FAULT memory management error occurred Refer to Chapter 5 MBIT Faults for more faults http www motorola com computer literature B 9 Integrating Custom Diagnostics Reference Pages installBitDriver Name installBitDriver installs the driver entry points Synopsis include lt api bitGenericDriver h gt DRV DESC installBitDriver BIT FAUL drvliInstall DESC devDescPtr BIT FAUL drvDeinstall DEV DESC devDescPtr BIT FAUL drvOpen DEV DESC devDescPtr BIT FAUL drvClose DEV DESC devDescPtr BIT FAUL drvRead DEV DESC devDescPtr unsigned int bufferSize char buffer
130. evice is the unique device name description is the description of the device name id is the unique ID being returned that represents the device Description This method adds a device entry with the provided identifier and description B 4 Computer Group Literature Center Web Site addBitDeviceldent Return Values BIT_NO_FAULT_DETECTED no fault detected successful BIT_INIT_ALREADY_PERFORMED MBIT initialization was already performed INIT ALLOCATION ERROR required resources for initialization are unavailable INVALID TEST PARAM invalid parameter was supplied DUPLICATE IDENT name of the identifier already exists RESOURCE MGMT FAULT memory management error occurred INVALID LIST CONTENT content of list is invalid Refer to Chapter 5 MBIT Faults for more faults http www motorola com computer literature B 5 Integrating Custom Diagnostics Reference Pages addBitFaultldent Name addBitFaultIdent adds a fault entry Synopsis include lt config bitTestUtils h gt BIT_FAULT addBitFaultIdent const char fault const char description BIT_FAULT_TYPE type BIT_FAULT id Parameters fault is the unique fault name description is the description of the fault type is the type of fault for example hardware software see config bitCommonDefs h id is the unique ID being returned that represents the fault Descriptio
131. executeBitTests and all tests in the list complete execution getBitResponse returns a single test results list and removes it from the response queue A 14 Computer Group Literature Center Web Site getBitResponse A Return Values BIT_NO_FAULT_DETECTED no fault detected successful INVALID TEST PARAM invalid parameter was supplied BIT INIT NOT PERFORMED MBIT initialization was already performed MESSAGE QUEUE ERROR could not queue MBIT message BIT_INVALID_MSG_ERROR invalid message was received Refer to Chapter 5 MBIT Faults for more faults http www motorola com computer literature A 15 A API Method s Reference Pages getNumBitResponses Name getNumBitResponses provides the number of MBIT test results lists Synopsis include lt api bitApi h gt BIT_FAULT getNumBitResponses int msgCount Parameters msgCount will contain the number of test results lists in the MBIT response queue Description This method provides the number of MBIT test results lists in the MBIT response queue Return Values BIT_NO_FAULT_DETECTED no fault detected successful INVALID TEST PARAM invalid parameter was supplied INIT NOT PERFORMED MBIT initialization was already performed MESSAGE QUEUE ERROR could not queue MBIT message RESOURCE MGMT FAULT memory management error occurred Refer to Chapter 5 MBIT Faults for more faults
132. ft Disables the L2 cache without any flushing or invalidation bitL2CachelsEnabled Returns the boolean enable state of the L2 cache bitL2CacheFlush Flushes the entire L2 cache bitL2CacheFlushInvalidate Flushes and invalidates the entire L2 cache bitL2CacheInvalidate Invalidates the entire L2 cache bitL2CacheLock Locks the L2 cache if the L2 cache supports it bitL2CacheUnlock Unlocks the L2 cache if the L2 cache supports it bitL2CachelIsLockable Returns the boolean lock capability of the L2 cache bitL2CacheFill Fills the specified number of 32 bit words in the L2 cache with the specified pattern bitL2 CachelsWritebackCapable Returns the boolean write back capability of the L2 cache bitDataCacheEnable This method invalidates and then enables the L1 data cache Here s a synopsis of the bitDataCacheEnable method lt utilities bitCacheUtils h gt BIT_FAULT bitDataCacheEnable void Computer Group Literature Center Web Site bitDataCacheDisable Upon successful completion this method returns BIT_NO_FAULT_DETECTED otherwise it may return any of the return values listed in Appendix Utility Methods Reference Pages and Chapter 5 MBIT Faults bitDataCacheDisable This method flushes and then disables the L1 data cache Here s a synopsis of the bitDataCacheDisable method lt utilities bitCacheUtils h gt BIT_FAULT bitDataCacheDisable
133. gument are the input parameters pDevDesc is a pointer to a structure that contains all of the registers that are needed to perform an ioctl operation on the device Using the register definitions in the device descriptor guarantees that the correct device is being accessed function contains the special operation that is to be performed The actual function value and implementation is device specific argument contains special information that is required by the method being performed The actual value of the argument is method and device specific It should be noted that the user is not limited to an integer value as an argument The argument can be a pointer that is cast as an integer when the method is called Being a pointer the user can pass a large amount of information to the ioctl method The return values for this method are determined by the developer Installing a Device Driver into the MBIT Environment Before a device driver can be used it must be installed in the MBIT environment To accomplish this the developer must call the method installBitDriver The driver entry points are the install deinstall open close read write and ioctl operations A device driver may support multiple devices and or subtests To associate the devices and subtests that the driver supports the developer makes a separate call to createBitTestA ssociations from within a diagnostic configuration method Here s one example of the install
134. hInvalidate void Parameters No input parameters are required by this method Description This method flushes and invalidates the entire L2 cache Return Values BIT_NO_FAULT_DETECTED no fault detected success BIT_PROCESSOR_NOT_SUPPORTED unknown processor type BIT_CACHE_ROUTINE_NOT_SUPPORTED cache routine is not supported Refer to Chapter 5 MBIT Faults for more faults http www motorola com computer literature C 23 Utility Methods Reference Pages bitL2Cachelnvalidate Name bitL2CacheInvalidate invalidates the L2 cache Synopsis lt utilities bitCacheUtils h gt BIT_FAULT bitL2CacheInvalidate void Parameters No input parameters are required by this method Description This method invalidates the entire L2 cache Any modified data in the L2 cache is lost unless it is flushed first Return Values BIT_NO_FAULT_DETECTED no fault detected success BIT_PROCESSOR_NOT_SUPPORTED unknown processor type CACHE ROUTINE NOT SUPPORTED cache routine is not supported Refer to Chapter 5 MBIT Faults for more faults C 24 Computer Group Literature Center Web Site bitL2CacheLock bitL2CacheLock Name bitL2CacheLock locks the L2 cache Synopsis lt utilities bitCacheUtils h gt BIT_FAULT bitL2CacheLock void Parameters No input parameters are required by this method Description This method locks the L2 cache if the L2 cache supports it Return Val
135. he L2 cache does not support write back Refer to Chapter 5 MBIT Faults for more faults 4 12 Computer Group Literature Center Web Site Diagnostic Device Utility Methods Diagnostic Device Utility Methods MBIT provides the following methods to obtain device descriptors access devices and monitor what each device accesses The utility methods bitIn and bitOut may read write hardware locations defined by ADDR INFO structures The header file utilities bitDeviceUtils h provides the prototypes for these methods Method Description getDeviceDescriptor Takes a logical device number and returns a pointer to the device descriptor getDevTablePtr Takes a logical device number and returns a pointer to the device descriptor bitTrackChanges Starts or stops tracking register bit changes during hardware access bitIn Reads from the location described by the ADDR_INFO structure passed to the method bitOut Writes to the location described by the ADDR_INFO structure passed to the method getDeviceDescriptor This method takes a logical device number and returns a pointer to the device descriptor The device descriptor contains all the information needed to interface with the device Here s a synopsis of the getDeviceDescriptor method utilities bitCacheUtils h DEV DESC getDeviceDescriptor BIT LOGICAL DEVICE device where device is the logica
136. iagnostics Reference Pages bitProbeOutSwap 1 6 32 Name bitProbeOutSwap16 32 writes and byte swaps 16 32 bit data to the designated address Synopsis include utilities bitDeviceUtils h STATUS bitProbeOutSwap16 ULONG addr UINT16 data STATUS bitProbeOutSwap32 ULONG addr UINT32 data Parameters addr is the address to write data to data is the data to write out Description This method byte swaps and writes 16 32 bit data to the designated address The big little endian data is written into a 16 32 bit data location as little big endian The MBIT exception handler is enabled during the data read If the MBIT exception handler is not necessary to catch exceptions caused by the access to the device then bitOutSwap16 bitOutSwap32 should be used Return Values Upon successful completion this method returns 0 If an exception occurs 1 is returned Refer to Chapter 5 MBIT Faults for more faults B 44 Computer Group Literature Center Web Site bitIn8 16 32 bitIn8 16 32 Name bitIn8 16 32 reads 8 16 32 bit data from the designated address Synopsis include lt utilities bitDeviceUtils h gt STATUS bitIn8 ULONG addr UINT32 pdata STATUS bitIn16 ULONG addr UINT32 pdata STATUS bitIn32 ULONG addr UINT32 pdata Parameters addr is the address to read data from pdata is the pointer to a 32 bit location to store data
137. ic Application The diagnostic application submits a test list for execution via the API A test list contains a set of subtests and only a single list can be submitted at any one time Further test list requests are ignored until the current test list is processed Once a test list is submitted a message is queued to the Test List Processing Task and the API returns control to the user s application to await future commands The MBIT API methods are described in greater detail in Chapter 2 Using MBIT and in Appendix A API Method s Reference Pages Test List Processing Task Upon receipt of the test list message the test list processing task buffers the test list and queues a subtest for processing by the Subtest Control Task A subtest is sent and the test list processing task waits for test completion Upon receipt of the test results the test list processing task buffers the completion data in a test list results message which returns to the diagnostic application upon completion of all subtests contained in the test list message The next subtest in the test list is then queued to the subtest control task The results are returned through a response message queue Subtest Control Task Upon receipt of a subtest response message the subtest control task calls the configured subtest installation method A task is spawned to run the configured subtest execution method A timer is set to limit execution time and the subtest control ta
138. in the number of test results lists in the MBIT response queue Upon successful completion this method returns BIT NO FAULT DETECTED otherwise it may return any of the return values listed in Appendix A API Method s Reference Pages and Chapter 5 MBIT Faults abortBitTests abortBitTests terminates current test list processing and aborts any subtest in progress This method has no effect if a subtest is not executing or has already completed Tests with protected critical sections are not aborted until the critical section is exited Test results for those tests already complete are made available in response to the submitted test list For each successfully submitted test list a single test results list is placed in the response queue http www motorola com computer literature 2 7 Using MBIT Invoking abortBitTests then reinitBit is sufficient to place MBIT an initial state Here s a synopsis of the abortBitTests method include lt api bitApi h gt BIT_FAULT abortBitTests void Upon successful completion this method returns BIT_NO_FAULT_DETECTED otherwise it may return any of the return values listed in Appendix A API Method s Reference Pages and Chapter 5 MBIT Faults Obtaining IDs in MBIT The getBitSubtestIdByName getBitDevicelIdByName and getBitFaultIdByName methods return an ID representing the string identifier getBitSubtestldByName getBitSubtestIdByName returns
139. information the structure should also identify the interrupt level and vector that the device uses The driver should use these definitions when using interrupts This ensures that the driver s interrupt processing affects the correct device http www motorola com computer literature B 31 Integrating Custom Diagnostics Reference Pages Return Values The return values for this method are determined by the developer B 32 Computer Group Literature Center Web Site devXXXOpen dev XXXOpen Name devXXX Open allows the user to prepare the device for testing Synopsis devXXXOpen DESC pDevDesc Parameters pDevDesc is a pointer to a structure that contains all of the registers that are needed to perform an open operation on the device Using the register definitions in the device descriptor guarantees that the correct device is being accessed Description This method allows the user to prepare the device for testing It receives a pointer to the device descriptor of the device being tested Also driver variables may be initialized in preparation for subsequent driver use All of the necessary device registers are contained in this structure The driver should use these register definitions to interface with the correct device Return Values The return values for this method are determined by the developer http www motorola com computer literature B 33 Integrating Cust
140. initBit Clears the device fault database isBitInitializationComplete Returns the MBIT initialization status execute BitTests Executes a list of subtests buildBitDefaultTestList Fills in a test list with default test entries for each subtest associated with the given device buildBitDefaultTestEntry Fills in a test list with a single default test entry for the associated subtest and device getBitResponse Obtains a list of test results getNumBitResponses Provides the number of MBIT test results lists in the response queue abortBitTests Aborts a subtest or group of subtests getBitDevice Fault Gets a fault for the specified logical device from the device fault database getBitSubtestDesc Gets a subtest description getBitDeviceDesc Gets a logical device description getBitFaultDesc Gets a fault description getBitSubtestldByName Gets the subtest ID for the corresponding subtest name 2 1 Using MBIT Method Description getBitDeviceldByName Gets the device ID for the corresponding device name getBitFaultldByName Gets the fault ID for the corresponding fault name getBitNumberOfSubtests Gets the number of subtests getBitNumberOfDevices Gets the number of devices getBitNumberOfFaults Gets the number of faults getBitMaxlestListEntries Gets the maximum number of test list entries suppo
141. inted to by the bytesWritten parameter before returning to the caller Return Values The return values for this method are determined by the developer B 38 Computer Group Literature Center Web Site devXXXlIoctl dev XXXloctl Name devXX XIoctl allows the driver to perform special operations with the device Synopsis devXXXIoctl DEV DESC pDevDesc INT32 function INT32 argument Parameters pDevDesc is a pointer to a structure that contains all of the registers that are needed to perform an ioctl operation on the device Using the register definitions in the device descriptor guarantees that the correct device is being accessed function contains the special operation that is to be performed The actual function value and implementation is device specific argument contains special information that is required by the method being performed The actual value of the argument is method and device specific It should be noted that the user is not limited to an integer value as an argument The argument can be a pointer that is cast as an integer when the method is called Being a pointer the user can pass a large amount of information to ioctl method Description This method allows the driver to perform special operations with the device It receives a pointer to the device descriptor of the device being tested the requested function and an argument http www motorola com computer
142. interrupt level could not be resolved level 0 level gt ERR INTERRUPT BASE Refer to Chapter 5 MBIT Faults for more faults C 44 Computer Group Literature Center Web Site bitIntDisable bitiIntDisable Name bitIntDisable disables an interrupt level Synopsis lt kernel kernelExceptionUtils h gt INT32 bitIntDisable INT32 level Parameters level is the interrupt level to disable Description This function disables the interrupt level Return Values fault detected success 1 interrupt level could not be resolved level 0 level gt ERR INTERRUPT BASE Refer to Chapter 5 MBIT Faults for more faults Time Utility Methods This section contains the following time related methods bitUsDelay bitMsDelay http www motorola com computer literature C 45 Utility Methods Reference Pages bitUsDelay Name bitUsDelay delays for a requested number of microseconds Synopsis lt utilities bitTimeUtils h gt void bitUsDelay UINT32 micro Parameters micro is the number of microseconds to delay Description This method delays micro number of microseconds Note that the resolution may be more than a microsecond so this call gives the smallest time out possible in those cases Return Values No return values Refer to Chapter 5 MBIT Faults for more faults C 46 Computer Group Literature Center Web Site bitMsDelay bitMsDelay N
143. ion This method returns the boolean enable state of the L1 instruction cache Return Values TRUE the L1 instruction cache is enabled FALSE the L1 instruction cache is not enabled Refer to Chapter 5 MBIT Faults for more faults http www motorola com computer literature C 13 Utility Methods Reference Pages bitlnstCacheLock Name bitInstCacheLock locks the L1 instruction cache Synopsis lt utilities bitCacheUtils h gt BIT_FAULT bitInstCacheLock void Parameters No input parameters are required by this method Description This method locks the L1 instruction cache Return Values BIT_NO_FAULT_DETECTED no fault detected success BIT_PROCESSOR_NOT_SUPPORTED unknown processor type BIT_CACHE_ROUTINE_NOT_SUPPORTED cache routine is not supported Refer to Chapter 5 MBIT Faults for more faults C 14 Computer Group Literature Center Web Site bitInstCacheUnlock bitlnstCacheUnlock Name bitInstCacheUnlock unlocks the L1 instruction cache Synopsis lt utilities bitCacheUtils h gt BIT_FAULT bitInstCacheUnlock void Parameters No input parameters are required by this method Description This method unlocks the L1 instruction cache s Return Values BIT_NO_FAULT_DETECTED no fault detected success BIT_PROCESSOR_NOT_SUPPORTED unknown processor type BIT_CACHE_ROUTINE_NOT_SUPPORTED cache routine is not supported Refer to Chapter 5 MBIT Faults f
144. is call gives the smallest timeout possible in those cases Here s a synopsis of the bitUsDelay method lt utilities bitCacheUtils h gt void bitUsDelay UINT32 micro where micro is the number of microseconds to delay There are no return values for this method bitMsDelay This method delays for milli number of milliseconds Here s a synopsis of the bitMsDelay method lt utilities bitCacheUtils h gt void bitMsDelay UINT32 milli where milli is the number of milliseconds to delay There are no return values for this method 4 20 Computer Group Literature Center Web Site MBIT Faults The following tables list the faults that are either built into the MBIT API or pre defined by the MVME5 xx diagnostics Built In MBIT Faults The built in faults may be used during any stage from initialization to termination of the MBIT API H hardware and S software Table 5 1 Built In MBIT Faults Type MBIT Fault String Description H BIT_NO_FAULT_DETECTED No fault detected successful 5 BIT INIT NOT PERFORMED MBIT initialization was already performed S BIT INIT ALLOCATION ERROR Required resources for initialization are unavailable S BIT INIT ALREADY PERFORMED Attempted to perform initialization twice S BIT DEV INSTALL NOT DEFINED Device installation is not configured S BIT TST INSTALL NOT DEFINED Test installation is not configured S BIT DEVICE N
145. iterature D 11 Installing MBIT with Tornado 2 1 and VxWorks VME Location Monitor Window Setup Complete the steps in this section to set up a VME location monitor window to allow testing of the VME location monitor The optional steps below that is 5 6 and 7 are only required if a VME location monitor window has not been previously configured for the user application The optional steps require adding code to sysPhysMemDesc in sysLib c to configure the location monitor window The VME location monitor window is described by the following parameters BIT VME LM SLV SIZE VME location monitor slave size default 2 0x00001000 BIT VME LM MSTR SIZE VME location monitor master size default 2 0x00001000 LM LOCAL VME location monitor master local address default RAI MSTR_LOCAL VME_RAI_MSTR_ SIZE BIT VME LM MSTR BUS VME location monitor master bus address default RAI MSTR BUS VME RAI SIZE To configure the location monitor window complete the following steps 1 Display hardware Diagnostics using the controls 2 Right click on BIT VME Location Monitor Window Description Parameters and select Properties 3 Select the Params tab in the Properties window 4 Modify the parameters described above to configure the location monitor window Choose OK Note Ifa VME location monitor has not been configured the defaults may be used Otherwise modif
146. l Ena bled ERR 4 6 vii ici E 4 6 Ds aene UCI 4 7 PEC dl accitus eu 4 7 S ee eee en AR ne 4 7 Kun ne 4 8 lp ge ur eU 4 8 jo be do rar Bir 4 9 PZ ache IS EDABIGHD rbd goi lora 4 9 bur 26 SChePDISDO tnn EFE 4 9 Scale cd er o o mST 4 10 jouera nura b p 4 10 prre CMS bin NT DH EU 4 11 lie tei meee 4 1 preneur Eie d DT o mU 4 11 joi dens 21118 tT 4 12 buESC achels Ww rue Dac ECCapabIet sirsenis 4 12 Diagnostic Device Utility Methods pesce bes 4 13 ucdRolaBc ano M M 4 13 perDevTable PUL iuuenes ote QR neem 4 14 Dodd pte rm 4 14 n 4 15 pnm er phates 4 15 Interrapt Unity Methods tres rr tr raram re pen rd cire 4 16 DE T 4 16 dd NR TE E E 4 17 4 17 o dirus p mr rre 4 17 er
147. l device to retrieve Upon successful completion this method returns DESC a pointer to the device descriptor or NULL if the device descriptor is invalid Refer to Chapter 5 MBIT Faults for more faults http www motorola com computer literature 4 13 Utility Methods getDevTablePtr This method takes a logical device number and returns a pointer to the device descriptor The device descriptor contains all the information needed to interface with the device This method should only be used by methods initializing device descriptors Here s a synopsis of the getDevTablePtr method lt utilities bitCacheUtils h gt DEV_DESC getDevTablePtr BIT_LOGICAL_DEVICE device where device is the logical device to retrieve Upon successful completion this method returns DEV_DESC a pointer to the device descriptor or NULL if the device descriptor is invalid Refer to Chapter 5 MBIT Faults for more faults bitTrackChanges This method starts or stops tracking register bit changes during hardware access Here s a synopsis of the bitTrackChanges method lt utilities bitCacheUtils h gt BIT FAULT bitTrackChanges ADDR INFO reg UINT on where reg is the pointer to the location s ADDR INFO structure and on is a boolean value to indicate starting or stopping change tracking TRUE starts tracking FALSE stops tracking Upon successful completion this method returns BIT NO FAU
148. lected subtest is not supported on this device DEVICE NOT SUPPORTED device is not supported DRIVER SEQUENCE methods invoked out of order INSTALL NOT DEFINED device installation is not configured Refer to Chapter 5 MBIT Faults for more faults B 18 Computer Group Literature Center Web Site drvDeinstall drvDeinstall Name drvDeinstall finds the associated driver routine based on the subtest and logical device passed in Synopsis include lt api bitGenericDriver h gt BIT FAULT drvDeinstall BIT SUBTEST subtest BIT LOGICAL DEVICE device Parameters subtest is the current subtest device is the device to operate on Description This method finds the associated driver routine based on the subtest and logical device passed in This method looks up the device descriptor based on the logical device passed in The associated device driver routine is then called This method must be invoked by the de install test method for the specified subtest http www motorola com computer literature B 19 Integrating Custom Diagnostics Reference Pages Return Values BIT_NO_FAULT_DETECTED no fault detected successful SUBTEST NOT SUPPORTED C selected subtest is not supported on this device DEVICE NOT SUPPORTED device is not supported INSTALL NOT DEFINED device installation is not configured
149. ll method devXXXInstall DEV DESC pDevDesc where pDevDesc is a pointer to a structure that contains all of the registers that are needed to perform an install operation on the device Using the Computer Group Literature Center Web Site Device Driver Interface register definitions in the device descriptor guarantees that the correct device is being accessed The return values for this method are determined by the developer dev XXXDelnstall devXXXDeinstall allows the user to terminate the use of the driver The driver de installation method is responsible for resource reclamation restoring the device state and de installing the interrupt service methods The driver should restore all of the device registers that were saved when the driver was installed This method receives a pointer to a device descriptor of the device being tested All of the necessary device registers are contained in this structure The driver should use these register definitions to interface with the correct device Refer to Appendix B Integrating Custom Diagnostics Reference Pages for more information on this method Here s a synopsis of the devXXXDeinstall method devXXXDeinstall DEV DESC pDevDesc where pDevDesc is a pointer to a structure that contains all of the registers that are needed to perform a de install operation on the device Using the register definitions in the device descriptor guarantees
150. method fills a test list with a single subtest associated with a given device These test lists may then be submitted to the executeBitTests method for processing Executing a Test List To execute a test list the user must specify a list control with one of the values HALT_ON_ERROR or RUN_TILL_COMPLETION If HALT_ON_ERROR is specified processing of the test list terminates with the detection of the first failed subtest Otherwise all subtests in the test list are executed If a subtest fails the board fail LED illuminates For more information on executing a test list refer to Appendix A API Method s Reference Pages buildBitDefaultTestList buildBitDefaultTestList fills in a test list with default test entries for each subtest associated with the given device The list of test entries must be allocated before this method is called The maximum number of test entries returned is no more than the value returned by the getBitMaxTestListEntries method Refer to the Motorola Built In Test MBIT Diagnostic Software Test Reference Guide for a list of subtests and the associated devices Here s a synopsis of the buildBitDefaultTestList method include lt api bitApi h gt BIT_FAULT buildBitDefaultTestList BIT LOGICAL DEVICE deviceld unsigned int numTests TEST ENTRY testEntryList where deviceld is an ID specifying a unique device The number of test entries returned is placed in the int
151. n This method adds a fault entry with the provided identifier and description B 6 Computer Group Literature Center Web Site addBitFaultIdent Return Values BIT_NO_FAULT_DETECTED no fault detected successful BIT_INIT_ALREADY_PERFORMED MBIT initialization was already performed INIT ALLOCATION ERROR required resources for initialization are unavailable INVALID TEST PARAM invalid parameter was supplied DUPLICATE IDENT name of the identifier already exists RESOURCE MGMT FAULT memory management error occurred INVALID LIST CONTENT content of list is invalid Refer to Chapter 5 MBIT Faults for more faults http www motorola com computer literature B 7 Integrating Custom Diagnostics Reference Pages createBitTestAssociations Name createBitTestAssociations creates an association between devices subtests and a driver Synopsis include config bitTestUtils h FAULT createBitTestAssociations BIT_SUBTEST subtestId int numSubtestIds LOGICAL DEVICE deviceId int numDevicelds DRV DESC pDriveDesc Parameters subtestId is an array of subtest IDs numSubtestlds is the number of subtest IDs deviceld is an array of device IDs numDevicelds is the number of device IDs pDriveDesc is the pointer to the driver being associated with the subtests and devices Description This method creates an association b
152. n MBIT Device Driver The MBIT system utilizes its own device drivers to increase functionality and enhance operating system OS independence However MBIT software does not preclude the use of the drivers supplied by a given OS MBIT drivers operate independently and do not use the OS supplied I O system If a generic driver method is called by a configured subtest the associated device driver method is located and called The generic driver method also looks up the device descriptor for the logical device passed in and passes it to the device s driver method The drvInstall method must be called before any other generic driver methods can be accessed After drvDeinstall is called by a configured subtest method the generic driver methods listed in Generic Device Driver Interface can no longer be called Note The generic device driver methods in this section are in the api bitGenericDriver h header file and are also described later in this section Generic Device Driver Interface The MBIT generic driver interface utilizes subtest and logical device input parameters to select and install the appropriate device driver methods Such a scheme allows different drivers to be used for different tests on the same device Each application s call to a generic driver must provide a subtest and a device The subtest and device are mapped to an appropriate device descriptor which is provided to the driver This re mapping occurs for all of
153. ned in config bitCommonDefs h The faults returned may either be pre defined refer to Chapter 5 MBIT Faults or added during subtest configuration Each method passes in a logical device and a subtest which are BIT_LOGICAL_DEVICE and BIT_SUBTEST The test execution method contains a control which directs the test to halt on the first error detected or to run until test completion if possible The BIT_TEST_CONTROL definition is located in bitCommonDefs h The last parameter is passed to all methods and is a pointer to a structure containing test parameters This parameter structure is unique to the subtest and contains items to control test execution such as patterns buffer sizes etc http www motorola com computer literature 3 7 Integrating Custom Diagnostics Example Subtest Structure The following is an example of a subtest implementing the three public test methods BIT FAULT installL2CacheTest BIT_LOGICAL DEVICE device BIT_SUBTEST subtest void parameters return getBitFaultIdByName NO FAULT DETECTED FAULT runL2CacheTest LOGICAL DEVICE device BIT SUBTEST subtest BIT SUBTEST CONTROL control void parameters return getBitFaultIdByName BIT NO FAULT DETECTED BIT FAULT deinstallL2CacheTest BIT LOGICAL DEVICE device BIT SUBTEST subtest void parameters ret
154. nostics Reference Pages and Chapter 5 MBIT Faults for more information bitlnSwap16 32 bitInSwap16 32 reads and byte swaps 16 32 bit data from the designated address The data is read as little big endian and loaded as big little endian into a 32 bit memory location This method requires a 32 bit memory location for storing the data because it is used by the device utility methods bitIn bitOut These methods store the location s contents in the 32 bit value field of the ADDR INFO structure The MBIT exception handler is not enabled during the data read If the MBIT exception handler is needed to catch exceptions caused by the access to the device then bitProbeInSwap16 bitProbeInSwap32 should be used Here s a synopsis of the bitInSwap16 32 method include lt utilities bitDeviceUtils h gt STATUS bitInSwap16 ULONG addr UINT32 pdata STATUS bitInSwap32 ULONG addr UINT32 pdata where addr is the address to read data from and pdata is the pointer to a 32 bit location to store data This method always returns 0 Refer to Appendix B Integrating Custom Diagnostics Reference Pages and Chapter 5 MBIT Faults for more information Computer Group Literature Center Web Site Device Initialization Method bitOutSwap16 32 bitOutSwap16 32 writes and byte swaps 16 32 bit data to the designated address The big little endian data is written into a 16 32 bit data location as little big
155. nst char const subtest Parameters subtest is a string identifier specifying the subtest Description This method returns the ID representing the subtest string identifier Return Values BIT_SUBTEST an ID representing the subtest identifier or 1 the subtest is not found Refer to Chapter 5 MBIT Faults for more faults A 22 Computer Group Literature Center Web Site getBitDeviceIdByName A getBitDeviceldByName Name getBitDeviceldByName teturns the device string identifier ID Synopsis include config bitCommonDefs h LOGICAL DEVICE getBitDeviceIdByName const char const device Parameters device is a string identifier specifying the device Description This method returns the ID representing the device string identifier Return Values BIT_LOGICAL_DEVICE an ID representing the device identifier 1 the device is not found Refer to Chapter 5 MBIT Faults for more faults http www motorola com computer literature A 23 A API Method s Reference Pages getBitFaultlIdByName Name getBitFaultIdByName returns the device string identifier ID Synopsis include config bitCommonDefs h BIT_FAULT getBitFaultIdByName const char const fault Parameters fault is a string identifier specifying the fault Description This method returns the ID representing the fault string identifier Return Values BIT_FAULT an ID r
156. nt buffSize Parameters pFlushBuffer is a pointer to a cacheable memory block twice the size of the L2 cache If NULL a local buffer is used and buffSize is ignored The local buffer will not be guaranteed to be cacheable if BATs or page tables have been altered prior to calling buffSize is the size of the flush buffer in bytes It must be equal to twice the L2 cache size Description This method flushes invalidates and then disables the L2 cache If a NULL buffer is provided then a local buffer is allocated for use and freed before return If the size of a given non NULL buffer is not equal to twice the L2 cache size then no action is taken by the method Return Values BIT_NO_FAULT_DETECTED no fault detected success BIT_PROCESSOR_NOT_SUPPORTED unknown processor type BIT_CACHE_ROUTINE_NOT_SUPPORTED cache routine is not supported BIT_CACHE_NOT_ENABLED cache must be enabled before calling cache function Refer to Chapter 5 MBIT Faults for more faults C 18 Computer Group Literature Center Web Site bitL2CacheOn bitL2CacheOn Name bitL2CacheOn enables the L2 cache without other actions Synopsis lt utilities bitCacheUtils h gt BIT_FAULT bitL2CacheOn void Parameters No input parameters are required by this method Description This method enables the L2 cache without any flushing or invalidation Return Values BIT_NO_FAULT_DETECTED no fault detected success BIT_PROCESS
157. ntLock method lt utilities bitCacheUtils h gt void bitIntLock void There are no return values for this method 4 16 Computer Group Literature Center Web Site bitIntUnlock bitIntUnlock This method decrements the interrupts locked reference count incremented by bitIntLock and if the reference count is 0 it unlocks all interrupts Here s a synopsis of the bitIntUnlock method lt utilities bitCacheUtils h gt void bitIntUnlock void There are no return values for this method bitForcelntUnlock This method sets the interrupts locked reference count to 0 and unlocks all the interrupts locked by bitIntLock Here s a synopsis of the bitForceIntUnlock method utilities bitCacheUtils h void bitForceIntUnlock void There are no return values for this method bitlntConnect This method connects an MBIT interrupt handler to the MBIT interrupt table In software there may be up to 256 interrupts connected however hardware may limit the actual number available This method only connects one handler to any interrupt vector at any one time All interrupt handlers not connected that use this method remain as they were installed by the operating system chained handlers remain chained To disconnect the handler from the vector use bitIntVectorSet with a NULL entry Here s a synopsis of the bitIntConnect method utilities bitCacheUtils h STATUS bitIntConnect VOIDFUNCPTR vecto
158. o restrictions placed on the number of times you can call initBit and terminateBit as long as each call to initBit is followed by a call to terminateBit prior to the next invocation of initBit Note Calling initBit and terminateBit an excessive number of times may cause memory fragmentation Return Values NO FAULT DETECTED o fault detected successful BIT INIT NOT PERFORMED MBIT initialization was already performed MESSAGE QUEUE ERROR could not queue MBIT message RESOURCE MGMT FAULT memory management error occurred Refer to Chapter 5 MBIT Faults for more faults http www motorola com computer literature A 29 Integrating Custom Diagnostics Reference Pages This appendix provides detailed information about the methods mentioned in Chapter 3 Integrating Custom Diagnostics These methods are categorized into the following four sections Diagnostic Integration Methods Generic Device Driver Methods Device Driver Methods Device Read and Write Utility Methods Diagnostic Integration Methods MBIT provides the following methods for integrating diagnostics addBitSubtestIdent on page B 2 addBitDeviceldent on page B 4 adaBitFaultIdent on page B 6 createBitTestAssociations on page B 8 installBitDriver on page B 10 installBitSubtestEntries on page B 12 getBitNumberOfAssociations on page B 15 B 1 Integrating Custom Diagnostics Reference Pages
159. o bring the elements that is subtests devices and drivers of a diagnostic together an association must be made between the related elements The elements of a diagnostic are associated by invoking the method createBitTestAssociations The method creates an association for each subtest and device provided If a driver is also provided each subtest and device association will include an association to the driver With multiple subtests and devices several calls to createBitTestA ssociations may be required to achieve the desired result For example if a particular device is not supported by all subtests an additional call to createBitTestA ssociations is required If for example a driver supports loopback on two logical devices but only supports modem controls on one multiple calls to createBitTestAssociations may be required Otherwise the API may indicate a subtest requiring modem controls can be run on a device that does not support them A properly configured system should return an error indicating that the test was not supported Calls to the createBitTestAssociations method are placed in the diagnostic configuration method refer to Using the Diagnostic Configuration Method Using the Diagnostic Configuration Method A diagnostic is configured into MBIT using a diagnostic configuration method The configuration method contains all of the necessary calls to integrate custom diagnostics This configuration method is pa
160. obeInSwap 16 32 Writes 8 16 32 bit data to the designated address Reads and byte swaps 16 32 bit data from the designated address bitProbeOutSwap16 32 Writes and byte swaps 32 bit data to the designated address http www motorola com computer literature Integrating Custom Diagnostics Method Description bitIn8 16 32 Reads 8 16 32 bit data from the designated address bitOutS 16 32 Writes 8 16 32 bit data to the designated address bitInSwap16 32 Reads and byte swaps 16 32 bit data from the designated address bitOutSwap 16 32 Writes and byte swaps 16 32 bit data to the designated address bitPciWrite32 Writes 32 bit data to PCI I O or memory space in little endian mode bitPciRead32 Reads 32 bit data from PCI I O or memory space bitProbeln8 16 32 bitProbeIn8 16 32 reads 8 16 32 bit data from the designated address The data read is written into a 8 16 32 bit memory location This method requires a 32 bit memory location for storing the data because it is used by the device utility methods bitInQ bitOut These methods store the location s contents in the 32 bit value field of the ADDR_INFO structure The MBIT exception handler is enabled during the data read If the MBIT exception handler is not necessary to catch exceptions caused by the access to the device then bitIn8 bitIn16 bitIn32 should be used Here s a synopsis of
161. ociations void Upon successful completion getBitNumberOfAssociations returns the number of associations If MBIT has not been initialized it returns 0 Implementing Subtests The MBIT API provides a method that allows the operator to abort an executing subtest This is achieved by providing a separate thread of execution for the subtest and a method of terminating this thread of execution Any resource allocation must be viewed as a critical region During execution of such a critical region termination must not be allowed to take place or resources may not be capable of being reclaimed These public methods are installed in installBitSubtestEntries Subtest Structure MBIT requires that each subtest implements the following public methods test installation test execution and test de installation These methods 3 6 Computer Group Literature Center Web Site Subtest Structure must perform all the resource allocation and de allocation required by the subtest including a device driver installation and any memory allocation Test Method Definition Test installation Allows resource allocation and driver installation Test execution Implements the bulk of the test and is subject to unexpected termination Resource allocation is discouraged Test de installation Allows removing drivers freeing allocated resources and placing the device in a known state All methods return a BIT_FAULT as defi
162. ollowing chapters and appendices Chapter 1 MBIT Overview provides a high level overview of the system level and board level versions of MBIT Chapter 2 Using MBIT provides the MBIT application programming interface as well as an example of how to use MBIT Chapter 3 Integrating Custom Diagnostics provides instructions on how to integrate custom diagnostics available with the system level version of MBIT Chapter 4 Utility Methods provides methods to complete various activities while integrating custom diagnostics in the system level version of MBIT Chapter 5 MBIT Faults provides the faults built into the MBIT API or pre defined by the MVMES1xx diagnostics Appendix A API Method s Reference Pages provides detailed information about the MBIT API methods mentioned in Chapter 2 Using MBIT Appendix B Integrating Custom Diagnostics Reference Pages provides detailed information about the diagnostic integration methods generic device driver methods device driver methods and the device read write utility methods mentioned in Chapter 3 Integrating Custom Diagnostics xvii Appendix C Utility Methods Reference Pages provides detailed information about the utility methods mentioned in Chapter 4 Utility Methods Appendix D Installing MBIT with Tornado 2 1 and VxWorks provides instructions on how to install MBIT with the Tornado 2 1 development system Appendix E Known Issues provides known issues
163. om Diagnostics Reference Pages dev XXXClose Name devX XX Close allows the user to close the device in preparation for terminating use of the device Synopsis devXXXClose DEV DESC pDevDesc Parameters pDevDesc is a pointer to a structure that contains all of the registers that are needed to perform a close operation on the device Using the register definitions in the device descriptor guarantees that the correct device is being accessed Description This method allows the user to close the device in preparation for terminating use of the device It receives a pointer to the device descriptor of the device being tested Typically a device driver does not need to do processing to close the driver in the MBIT environment The important device control and resource allocation release should be performed in the devXXXDeinstall driver method Return Values The return values for this method are determined by the developer B 34 Computer Group Literature Center Web Site devXXXRead dev XXXRead Name devXXXRead allows the user to read information from the device Synopsis devXXXRead DEV DESC pDevDesc UINT32 bufferSize INT8 bufferAddr UINT32 bytesRead Parameters pDevDesc is a pointer to a structure that contains all of the registers that are needed to perform a read operation on the device Using the register definitions in the device descriptor guarante
164. opment environment This manual is a companion to the Motorola Built In Test MBIT Diagnostic Software Test Reference Guide listed in Appendix F Related Documentation The Test Reference Guide identifies and describes the supported devices and subtests needed to create test lists as part of a diagnostic application This User s Manual supports both the board level version of MBIT PN MBIT BRD 51XX and the system level version of MBIT PN MBIT SYS 51XX Refer to Chapter 1 MBIT Overview for a description of each version This manual is intended for use by software programmers or individuals with experience in the C programming language As of the printing date of this manual MBIT supports the MVME5 1xx models listed below Model Number Description All models of the MVMES xx are available with either a VME Scanbe front panel xxx1 or a IEEE 1101 compatible front panel xxx3 450 MHz MPC750 Class Commercial Models MVMES100 013x 450 MHz MPC750 class 64MB ECC SDRAM 17MB Flash and 1MB L2 cache MVMES100 016x 450 MHz MPC750 class 512MB ECC SDRAM 17 Flash and 1MB L2 cache 400 MHz MPC755 Class Extended Temperature Models MVMES106 114x 400 MHz MPC755 class 128MB ECC SDRAM and 1MB L2 cache XV Model Number MVME5106 115x Description 400 MHz MPC755 class 256MB ECC SDRAM and 1MB L2 cache MVMES106 116x 400 MHz MPC755 class 512MB ECC SDRAM and 1MB L2 cache
165. or is built correctly Return Values The return values for this method are determined by the developer B 30 Computer Group Literature Center Web Site devXXXDeinstall dev XXXDeinstall Name devXXXDeinstall allows the user to terminate the use of the driver Synopsis devXXXDeinstall DEV DESC pDevDesc Parameters pDevDesc is a pointer to a structure that contains all of the registers that are needed to perform a de install operation on the device Using the register definitions in the device descriptor guarantees that the correct device is being accessed Description This method allows the user to terminate the use of the driver The driver de installation method is responsible for resource reclamation restoring the device state and de installing the interrupt service methods The driver should restore all of the device registers that were saved when the driver was installed This method receives a pointer to a device descriptor of the device being tested All of the necessary device registers are contained in this structure The driver should use these register definitions to interface with the correct device The devXX XDeinstall method receives a pointer to a device descriptor of the device being tested All of the necessary device registers are contained in this structure The driver should use these register definitions to interface with the correct device In addition to the register
166. or more faults http www motorola com computer literature C 15 Utility Methods Reference Pages bitL2CacheSizeGet Name bitL2CacheSizeGet Treturns the size in bytes of L2 cache Synopsis lt utilities bitCacheUtils h gt UINT bitL2CacheSizeGet void Parameters No input parameters are required by this method Description This method returns the size in bytes of the L2 cache configured by the hardware the L2 cache controller Return Values numBytes L2 cache size in bytes 0 size cannot be determined Refer to Chapter 5 MBIT Faults for more faults C 16 Computer Group Literature Center Web Site bitL2CacheEnable bitL2CacheEnable Name bitL2CacheEnable enables the L2 cache Synopsis lt utilities bitCacheUtils h gt BIT_FAULT bitL2CacheEnable void Parameters No input parameters are required by this method Description This method enables the L2 cache Return Values BIT_NO_FAULT_DETECTED no fault detected success BIT_PROCESSOR_NOT_SUPPORTED unknown processor type BIT_CACHE_ROUTINE_NOT_SUPPORTED cache routine is not supported Refer to Chapter 5 MBIT Faults for more faults http www motorola com computer literature C 17 Utility Methods Reference Pages bitL2CacheDisable Name bitL2CacheDisable disables the L2 cache Synopsis lt utilities bitCacheUtils h gt FAULT bitL2CacheDisable void pFlushBuffer i
167. ound Here s a synopsis of the executeBitTests method include lt api bitApi h gt BIT FAULT executeBitTests TEST CONTROL listControl unsigned int testCount TEST ENTRY testList where listControl specifies HALT ON ERROR or RUN TILL COMPLETION see config bitCommonDefs h testCount is the number of entries in the test list and testList is an array of tests to execute For each successfully submitted test list MBIT places a single test results list in the response queue Upon successful completion this method returns BIT NO FAULT DETECTED otherwise it may return any of the return values listed in Appendix A API Method s Reference Pages and Chapter 5 MBIT Faults Creating Test Lists In creating a test list the following applies L Any subtest can be included in a single test list and a test list may contain a single entry 1 The number of subtest entries a test list is limited to the number of entries returned by the getBitMaxTestListEntries method LI Only one subtest is executed at any one time MBIT provides two methods to create test lists with default test entries These methods can be used as a starting point for configuring subtest parameters The buildBitDefaultTestList method fills a test 2 4 Computer Group Literature Center Web Site Executing Subtests in MBIT list with subtests associated with a given device The buildBitDefaultTestEntry
168. pped register set DDR INFO ioscntl0 DDR INFO ioscntll DDR INFO ioscid DDR INFO iosxfer poppe BAR 1 MEMORY mapped register set DDR INFO memscnt10 DDR INFO memsocentl1 DDR INFO memscid DDR INFO memsxfer pp Pe PN BAR 2 SCRIPTS RAM ADDR_INFO scriptsRam BIT SYM895A REG T This structure is accessed through the device descriptor member reg The members of the address table are ADDR INFO structures The device address table structure must remain accessible throughout the execution of MBIT This structure is not free d by MBIT during termination http www motorola com computer literature 3 29 Integrating Custom Diagnostics Generic Device Address Table Structure part of DEV_DESC The generic device address table structure provides a method of associating generic register names with specific registers for a particular class of devices For example all memory controllers have registers that define and enable banks of SDRAM However there is no standard for these registers By using a generic register name and generic register bit masks software can be written to determine if a bank is enabled and the size of the bank Example Generic Device Address Table C Structure Below is an example of the generic device address table C structure typedef struct ADDR_INFO allRam ADDR_INFO ramBankA ADDR_INFO ramBankB ADDR_INFO ramBankC ADDR_INFO ramBankD
169. puter literature C 21 Utility Methods Reference Pages bitL2CacheFlush Name bitL2CacheFlush flushes the L2 cache Synopsis lt utilities bitCacheUtils h gt FAULT bitL2CacheFlush void pFlushBuffer int buffSize Parameters pFlushBuffer is a pointer to a cacheable memory block twice the size of the L2 cache If NULL a local buffer is used and buffSize is ignored The local buffer will not be guaranteed to be cacheable if BATs or page tables have been altered prior to calling buffSize is the size of the flush buffer in bytes It must be equal to twice the L2 cache size Description This method flushes the entire L2 cache If a NULL buffer is provided then a local buffer is allocated for use and freed before return If the size of a given non NULL buffer is not equal to twice the L2 cache size then no action is taken by the routine Return Values BIT_NO_FAULT_DETECTED no fault detected success BIT_PROCESSOR_NOT_SUPPORTED unknown processor type BIT_CACHE_ROUTINE_NOT_SUPPORTED cache routine is not supported BIT_CACHE_NOT_ENABLED cache must be enabled before calling cache function Refer to Chapter 5 MBIT Faults for more faults C 22 Computer Group Literature Center Web Site bitL2CacheFlushInvalidate bitL2CacheFlushInvalidate Name bitL2CacheFlushInvalidate flushes and invalidates the L2 cache Synopsis lt utilities bitCacheUtils h gt BIT_FAULT bitL2CacheFlus
170. r VOIDFUNCPTR routine int param http www motorola com computer literature 4 17 Utility Methods where vector is the interrupt vector to connect routine is the routine to connect to the specified vector and param is the parameter provided to the specified routine when an interrupt occurs Upon successful completion this method returns OK if no fault is detected otherwise it may return any of the return values listed in Appendix C Utility Methods Reference Pages and Chapter 5 MBIT Faults isBitIntEnabled This method checks if an interrupt is enabled on a specified interrupt level Here s a synopsis of the isBitIntEnabled method lt utilities bitCacheUtils h gt STATUS isBitIntEnabled int level where level is the interrupt level to be tested Upon successful completion this method returns TRUE if enabled FALSE if not enabled and 1 if the interrupt level could not be resolved Refer to Appendix C Utility Methods Reference Pages and Chapter 5 MBIT Faults for more information bitIntVectorSet This method sets a vector entry in the MBIT interrupt table Here s a synopsis of the bitIntVectorSet method lt utilities bitCacheUtils h gt STATUS bitIntVectorSet VOIDFUNCPTR vector INT32 entry where vector is the interrupt vector to connect and entry is the method to connect to the specified vector There are no return values for this method 4 18 Computer Group Literature Cent
171. re irr o ee e E P A 23 BpetbribaultldBy NADIE uias occ to enim Duns Eau Uie YR RES EFLFE EUER ER FUROR A 24 petBiuNDmberO Su DISSI PROUD celi A 25 26 Pici A 27 A 28 POPES A NA A Ge dol secu ha A 29 APPENDIXB Integrating Custom Diagnostics Reference Pages Inteptcabion ERE btES P eE e B 1 acdbirtsubtesticle Bi ea rece qui eU DI ETE PE RE RC DRE B 2 sicud rH estes nbl coe iacere tiatepG Et S ERE EHE EEUTH EONEUT HIA PEUPLE ERI DEPO RERO B 4 add ES TEP AUD eB e B 6 create Bit TESTA SSGOIBEDODS 250 B 8 melli ELT B 10 12 getibtNumberO PA SSOCTHEIGDS EE UE e B 15 teneo Device Driver Methods 2e ttr o EHE REIR REL HARDER IRAE iiiki B 15 Nw dl jme m 17 PREV E p mt B 19 Ng Pic Q 21 uibs o Mer 22 did dd ud E EM UE B 23 encanta IL E eee B 25 a dic er cio I EE B 27 De
172. read target interrupt fault H NO TARGET RW IO FAUIT VME target write read to non existent address succeeded H BIT VME LOCMON FAULT VME bridge location monitor mailbox interrupt fault H LOCMON IO VME bridge location monitor mailbox access fault H BIT ETHERNET SROM ACCESS An error occurred while accessing the ERROR Serial EEPROM SROM connected to the Ethernet device H ETHERNET SROM CHECKSUM The checksum of the Serial EEPROM FAULT SROM does not match the calculated value 5 6 Computer Group Literature Center Web Site Pre Defined MBIT Faults Table 5 2 Pre Defined MBIT Faults continued Type MBIT Fault String Description H BIT ETHERNET SROM VERIFY The contents of the Serial EEPROM FAULT SROM do not make sense or do not match the expected values H ETHERNET REGISTER An error occurred while accessing the ACCESS FAULT Ethernet device registers H ETHERNET LOOPBACK DATA The transmitted and received data sent FAULT in loopback do not match H BIT ETHERNET DRIVER FAULT A driver fault occurred H BIT ETHERNET TRANSMIT ERROR An error occurred during transmission H BIT ETHERNET TRANSMIT BLOCK The transmission would block H FLASH STUCK ERROR Possible stuck bit was detected or insufficient variability in Flash data H BIT FLASH FLOAT ERROR Possible floating bit was detected H THERMO
173. ress and data nodes Total subtest execution time for all built in subtests on all devices with the exception of the memory subtests does not exceed five minutes The MBIT diagnostics cover more than 95 percent of address and data nodes 5 1 family boards alone and in combination with an attached IPMC712 To calculate the coverage the analysis process classified each node on the board a trace connecting one or more components as an address data control or other For each node classified as address or data the analysis process verified that each diagnostic could detect stuck at zero or stuck at one faults This coverage calculation assumes executing diagnostics for each device executing all the subtests for a device and using the default parameters for the subtests 1 4 Computer Group Literature Center Web Site MBIT Process MBIT Process The MBIT diagnostic software is explained in a five part process ending with a summary of subtest results The process executes in four separate threads and communicates by message passing 1 Diagnostic Application Test List Processing Task Subtest Control Task Subtest Envelope Task N Device Fault Database Test Results Test List List Fault Device Subtest Results Subtest Request Spawn Subtest Results http www motorola com computer literature 1 5 MBIT Overview Diagnost
174. returns the number of MBIT configured faults Refer to Chapter 5 MBIT Faults for more return values getBitMaxTestListEntries getBitMaxTestListEntries returns the maximum number of test list entries Here s a synopsis of the getBitMaxTestListEntries method finclude lt api bitApi h gt int getBitMaxTestListEntries void Upon successful completion getBitMaxTestListEntries returns the maximum number of MBIT configured test list entries Refer to Chapter 5 MBIT Faults for more return values 2 12 Computer Group Literature Center Web Site Terminating MBIT Terminating MBIT The terminateBit method performs an orderly termination of MBIT and releases all allocated resources terminateBit terminateBit terminates MBIT including releasing allocated resources and the termination of all spawned child tasks After invoking terminateBit you may call There are no restrictions placed on the number of times you can call initBit and terminateBit as long as each call to initBit is followed by a call to terminateBit prior to the next invocation of initBit Note Calling initBitQ and terminateBit an excessive number of times may cause memory fragmentation Here s a synopsis of the terminateBit method include lt api bitApi h gt BIT_FAULT terminateBit void Upon successful completion this method returns BIT_NO_FAULT_DETECTED otherwise it may return any of the return value
175. rola Built In Test MBIT Diagnostic Software Test Reference Guide listed in Appendix F Related Documentation and the associated include file for the package that implements the test To support such controls a pointer to a user supplied structure passes to the subtest upon invocation The pointer is set to NULL if the test does not support subtest specific controls http www motorola com computer literature A 9 API Method s Reference Pages A Return Values BIT_NO_FAULT_DETECTED no fault detected successful BIT_INIT_NOT_PERFORMED MBIT initialization was already performed BIT_OPERATION_IN_PROGRESS MBIT test or abort in progress BIT INVALID TEST PARAM invalid parameter was supplied TST INSTALL NOT DEFINED test installation is not configured MESSAGE QUEUE ERROR could not queue MBIT message Refer to Chapter 5 MBIT Faults for more faults A 10 Computer Group Literature Center Web Site buildBitDefaultTestList buildBitDefaultTestList Name buildBitDefaultTestList fills in a list of default test entries Synopsis include config testDefaults h BIT FAULT buildBitDefaultTestList BIT LOGICAL DEVICE deviceld unsigned int numTests TEST ENTRY testEntryList Parameters deviceld is an ID specifying a unique device numTests is the number of test entries being returned testEntryList is the list of test entries being returned for a given devic
176. rted by executeBitTests and getBitResponse terminateBit Terminates the MBIT software Initializing MBIT initBit The initBit method initializes MBIT reinitBit clears the device fault database and terminateBit terminates MBIT The isBitInitializationComplete method returns TRUE or FALSE depending on whether or not the MBIT initialization is complete initBit performs MBIT initialization and must be invoked prior to any other method This method creates the test list processing task and the subtest control task Here s a synopsis of the initBit method include lt api bitApi h gt BIT FAULT initBit BIT FAULT pConfigRoutines int numConfigRoutines where pConfigRoutines is an array of function pointers to custom subtest and device configuration methods and numConfigRoutines is the number of custom configuration methods Upon successful completion this method returns BIT NO FAULT DETECTED otherwise it may return any of the return values listed in Appendix A API Method s Reference Pages and Chapter 5 MBIT Faults Computer Group Literature Center Web Site Executing Subtests in MBIT reinitBit reinitBit clears the device fault database and extinguishes the Fail LED Here s a synopsis of the reinitBit method include lt api bitApi h gt BIT_FAULT reinitBit void Upon successful completion this method returns BIT_NO_FAULT_DETECTED otherwise it may return any of
177. s listed in Appendix A API Method s Reference Pages and Chapter 5 MBIT Faults Example Using MBIT The following is a simplified example or sample application of how to use MBIT The example includes how to initialize MBIT run a test and then terminate the software http www motorola com computer literature 2 13 Using MBIT include lt vxWorks h gt include lt stdio h gt include lt stdlib h gt include lt api bitApi h gt include lt config testDefaults h gt include config bitCommonDefs h bitSampleApplication Calling this routine will initialize bit run a test and then terminate bit when the test is finished There is no error checking performed in this application void bitSampleApplication void BIT_FAULT status BIT_SUBTEST subtest BIT_LOGICAL_DEVICE device EST_ENTRY test 1 EST RESULTS ENTRY testResults 1 unsigned int numResults Run initBit so that all of MBIT is initialized This needs to be done before running a subtest oF status initBit NULL 0 subtest getBitSubtestIdByName RAM WALK device getBitDeviceIdByName ECC SDRAM To pass parameters to the test use the testParamPtr field in the TEST_ENTRY test structure Then pass the test to the buildBitDefaultTestEntry Otherwise pass nothing in the test field and the defaults will be used x
178. sk waits for subtest completion Refer to the Motorola Built In Test MBIT Diagnostic Software Test Reference Guide listed in Appendix F Related Documentation for default subtest time limits Upon receipt of the subtest completion message the subtest control task stores the completion data for the logical device being tested in the results message and device fault database The subtest control task also invokes the subtest de installation method and forwards the results message to the test list processing task Subtest installation and de installation methods are responsible for allocating and freeing resources required by the subtest Computer Group Literature Center Web Site Subtest Envelope Task If the test results are not received before the timer expires it is assumed the subtest is unable to complete its testing In such a case the spawned subtest task is deleted a time out indication is stored in the fault database and the time out indication is queued to the test list processing task If subtest control receives an abort directive while a test list is executing the spawned subtest task is deleted The value BIT_TEST_ABORTED is placed in a subtest result message which is then queued to the test list processing task The fault database is not updated since an operator abort directive does not represent a device failure Subtest Envelope Task The test execution task initializes a subtest results message and calls the
179. software Synopsis include lt api bit Api h gt FAULT initBit BIT FAULT pConfigRoutines int numConfigRoutines Parameters pConfigRoutines is an array of function pointers to custom subtest and device configuration methods numConfigRoutines is the number of custom configuration methods Description This method performs MBIT system initialization and must be invoked prior to any other method in MBIT This method creates the test list processing task and the subtest control task refer to Chapter 1 MBIT Overview http www motorola com computer literature A 3 A API Method s Reference Pages A Return Values BIT_NO_FAULT_DETECTED no fault detected successful BIT_INIT_ALREADY_PERFORMED MBIT initialization was already performed INIT ALLOCATION ERROR required resources for initialization are unavailable BIT INIT NOT PERFORMED MBIT initialization was already performed OPERATION IN PROGRESS MBIT test or abort in progress MESSAGE QUEUE ERROR could not queue MBIT message Refer to Chapter 5 MBIT Faults for more faults A 4 Computer Group Literature Center Web Site reinitBit A reinitBit Name reinitBit clears the device fault database Synopsis include lt api bitApi h gt BIT_FAULT reinitBit void Parameters No input parameters are required by this method Description This method places the MBIT API in an initial state
180. ss table are ADDR_INFO pointers initStat Device specific initialization status Valid values are described in the NIT STAT structure totalRegCnt Total number of device addresses This is the actual address count not the number of bytes barRegCnt Number of registers per BAR MBIT supports up to six BARs The barRegCnt contains one field for each BAR supported by MBIT that is barRegCnt 0 barRegCnt 5 Each field is initialized to the number of hardware addresses for the BAR Ifthe BAR does not contain any hardware addresses the barRegCnt should be set to 0 http www motorola com computer literature 3 25 Integrating Custom Diagnostics Table 3 1 Device Descriptor DEV_DESC continued Field Description intVec The interrupt vector may be the actual vector value BIT_AUTO_CONFIG or BIT_NONE_CONFIG BIT_AUTO_CONFIG causes the device descriptor initialization to assign a vector at run time BIT_NONE_CONFIG indicates that the device does not use interrupts intLvl The interrupt level may be the actual level value AUTO CONFIG or NONE CONFIG BIT AUTO CONFIG and BIT NONE CONFIG behave similarly to IntVec above baseAddr For PCI devices BIT AUTO BASE ADDR causes the base address to be configured at run time The first three items listed below are method pointers to methods that enable disable or check enable status for the device Devices tha
181. ssed to initBit and then called during MBIT initialization http www motorola com computer literature 3 43 Integrating Custom Diagnostics The following steps demonstrate the methods involved in configuring diagnostics and the suggested order of their use 1 Make a call to the addBitFaultIdent method for each subtest specific MBIT fault Make a call to the addBitSubtestIdent method for each subtest being configured The subtest ID returned identifies the subtest to all methods with a BIT SUBTEST parameter Make a call to installBitSubtestEntries for each subtest that was added This method uses the subtest ID returned by addBitSubtestIdent as its BIT SUBTEST parameter Makea call to installBitDrivers and pass the driver entry points for the driver being installed This method returns a driver descriptor pointer DRV DESC which is used when creating an association to a driver with the method createBitTestAssociations Make a call to getBitDeviceIdByName for each device that is associated with the installed subtests Use the return value from each call to getBitDeviceIdByName to provide as a parameter to the method createBitTestAssociations Make a call to createBitTestAssociations using the subtest IDs device IDs and a driver descriptor pointer This call may be made several times to create different associations for specific diagnostic configurations 3 44 Computer
182. st and device is the device to operate on Upon successful completion this method returns BIT NO FAULT DETECTED otherwise it may return any of the return values listed in Appendix B Integrating Custom Diagnostics Reference Pages and Chapter 5 MBIT Faults drvRead finds the associated driver method based on the subtest and logical device passed in This method looks up the device descriptor based on the logical device passed in The associated device driver method is then called This method must be called after the drvOpen has been called Here s a synopsis of the drvRead method include lt api bitGenericDriver h gt BIT_FAULT drvRead BIT_SUBTEST subtest BIT LOGICAL DEVICE device unsigned int bufferSize char buffer unsigned int bytesRead where subtest is the current subtest device is the device to operate on bufferSize is the size of buffer in bytes buffer is the buffer to place data in and bytesRead is a pointer to the number of bytes read http www motorola com computer literature 3 15 Integrating Custom Diagnostics drvWrite drvloctl Upon successful completion this method returns BIT NO FAULT DETECTED otherwise it may return any of the return values listed in Appendix B Integrating Custom Diagnostics Reference Pages and Chapter 5 MBIT Faults drvWrite finds the associated driver method based on the subtest and logical device passed in This method looks up
183. t device is being accessed Description This method allows MBIT to prepare the driver for subsequent access of the device The driver should save all of the necessary device registers for restoration when the test is complete This method receives a pointer to the device descriptor of the device being tested All of the necessary device registers are contained in this structure The driver should use these register definitions to interface with the correct device This method is responsible for allocating required resources that is buffers semaphores etc and saving the state of the device It is also responsible for installing any required interrupt service methods This method may also disable the device driver supplied by the underlying OS if such a capability is supported The devXXXInstall method receives a pointer to the device descriptor of the device being tested All of the necessary device registers are contained in this structure The driver should use these register definitions to interface with the correct device http www motorola com computer literature B 29 Integrating Custom Diagnostics Reference Pages In addition to the register information the structure should also identify the interrupt level and vector that the device uses The driver should use these definitions when using interrupts This ensures that the driver s interrupt processing is connected to the right device assuming the device descript
184. t must be enabled before reading or writing require these methods If the device does not need to be enabled set each method pointer to NULL isEnabled A method to check if the device is enabled The method should return TRUE if enabled FALSE otherwise enableDev A method to enable the device This method is responsible for enabling read and or write accesses to the device disableDev A method to disable the device This method is responsible for disabling read and or write accesses to the device data Device instance data This is a general purpose element that may be used by the developer to contain additional device specific data The following are method pointers for reading and writing registers refer to Device Read and Write Utility Methods on page 3 33 Utility Method Parameters Parameter 1 32 bit address to access Parameter 2 Output Data to write to the address Input Address to store the data read from Parameter 1 above inReg8 A method to read an 8 bit address 3 26 Computer Group Literature Center Web Site Device Initialization Method Table 3 1 Device Descriptor DEV_DESC continued Field Description outReg8 A method to write an 8 bit address inReg16 A method to read a 16 bit address outReg16 A method to write a 16 bit address inReg32 A method to read a 32 bit address outReg32 A method to write a 32 bit address Device Addr
185. tL2 CachelsEnabled bitL2CacheFlush bitL2 CacheFlushInvalidate bitL2CachelInvalidate bitL2 CacheLock bitL2CacheUnlock bitL2CachelIsLockable bitL2CacheFill bitL2CachelsWritebackCapable C 2 Computer Group Literature Center Web Site bitDataCacheEnable bitDataCacheEnable Name bitDataCacheEnable enables the L1 data cache Synopsis lt utilities bitCacheUtils h gt BIT_FAULT bitDataCacheEnable void Parameters No input parameters are required by this method Description This method invalidates and then enables the L1 data cache Return Values BIT_NO_FAULT_DETECTED no fault detected successful BIT_PROCESSOR_NOT_SUPPORTED unknown processor type BIT_CACHE_ROUTINE_NOT_SUPPORTED cache routine is not supported Refer to Chapter 5 MBIT Faults for more faults http www motorola com computer literature C 3 Utility Methods Reference Pages bitDataCacheDisable Name bitDataCacheDisable disables the L1 data cache Synopsis lt utilities bitCacheUtils h gt BIT_FAULT bitDataCacheDisable void Parameters No input parameters are required by this method Description This method flushes and then disables the L1 data cache Return Values BIT_NO_FAULT_DETECTED no fault detected success BIT_PROCESSOR_NOT_SUPPORTED unknown processor type BIT_CACHE_ROUTINE_NOT_SUPPORTED cache routine is not supported DATA CACHE NOT ENABLED 4data cache must
186. the bitProbeIn8 16 32 method include lt utilities bitDeviceUtils h gt STATUS bitProbeIn8 ULONG addr UINT32 pdata STATUS bitProbeIn16 ULONG addr UINT32 pdata STATUS bitProbeIn32 ULONG addr UINT32 pdata where addr is the address to read data from and pdata is the pointer to the 32 bit location to store data Upon successful completion this method returns 0 If an exception occurs is returned Computer Group Literature Center Web Site Device Initialization Method Refer to Appendix B Integrating Custom Diagnostics Reference Pages and Chapter 5 MBIT Faults for more information bitProbeOut8 16 32 bitProbeOut8 16 32 writes 8 16 32 bit data to the designated address The data is written into an 8 16 32 bit memory location The MBIT exception handler is enabled during the data write If the MBIT exception handler is not necessary to catch exceptions caused by the access to the device then bitOut8 bitOut16 bitOut32 should be used Here s a synopsis of the bitProbeOut8 16 32 method include lt utilities bitDeviceUtils h gt STATUS bitProbeOut8 ULONG addr UINT8 data STATUS bitProbeOut16 ULONG addr UINT16 data STATUS bitProbeOut32 ULONG addr UINT32 data where addr is the address to write data to and data is the data to write out Upon successful completion this method returns 0 If an exception occurs 1 is returned Refer to
187. the carriage return or Enter key Ctrl represents the Control key Execute control characters by pressing the Ctrl key and the letter simultaneously for example Ctrl d MBIT Overview Introduction MBIT is an off the shelf software infrastructure designed to verify the correct operation of Motorola Computer Group hardware MBIT is available in two versions board level MBIT and system level MBIT Board level PN MBIT BRD 51XX a comprehensive diagnostic software package designed to verify the correct operation of board mounted logical devices All tests can execute at boot up and selected tests can run continuously in the background of user applications An application programming interface API is included to provide access to test results and to control the operation of device tests Chapter 2 Using MBIT and Appendix A API Method s Reference Pages are specifically for the board level version of MBIT ww OEM Application Analysis Software MBIT Board Level API VxWorks MBIT MBIT Diagnostic Diagnostic MBIT OS Interface Driver Abstraction Interface Motorola Board System Hardware Control 1 1 MBIT Overview 0 System level MBIT PN MBIT SYS 51XX includes all of the functionality and API function calls of the board level version and enables system wide testing It provides a framework and additional API methods to support the inclusion of software designed to t
188. the device descriptor based on the logical device passed in The associated device driver method is then called This method must be called after drvOpen has been called Here s a synopsis of the drvWrite method include lt api bitGenericDriver h gt BIT FAULT drvWrite BIT SUBTEST subtest BIT LOGICAL DEVICE device unsigned int bufferSize char buffer unsigned int bytesWritten where subtest is the current subtest device is the device to operate on bufferSize is the number of bytes from buffer to write buffer is the buffer to write data from and bytesWritten is the pointer to the number of bytes written Upon successful completion this method returns BIT NO FAULT DETECTED otherwise it may return any of the return values listed in Appendix B ntegrating Custom Diagnostics Reference Pages and Chapter 5 MBIT Faults drvlIoctl finds the associated driver method based on the subtest and logical device passed in This method looks up the device descriptor based on the logical device passed in The associated device driver method is then called This method must be called after the drvOpen has been called Computer Group Literature Center Web Site Device Driver Interface Here s a synopsis of the drvloctl method include lt api bitGenericDriver h gt FAULT drvIoct1 BIT_SUBTEST subtest BIT LOGICAL DEVICE device int function int argument where su
189. the generic driver methods Depending on the application s generic driver call additional information may be passed to the driver For instance in the case of a read or write operation the driver receives a pointer to the buffer address the buffer length and a pointer for returning the number of bytes that are transferred The generic interface allows a single method to use different drivers to test different logical devices A single driver can be installed to support many separate logical devices For example a given driver may support all serial Computer Group Literature Center Web Site Generic Device Driver Interface drvinstall devices on a given board or separate drivers may be required for some serial devices Use installBitDriver to specify all of the methods supported by the driver Refer to Creating Diagnostic Associations on page 3 43 on how to associate the driver with supported subtests and devices MBIT provides the following generic driver methods Method Description drvInstall Installs a device driver drvDeinstall Removes an installed device driver drvOpen Opens a device for I O operations drvClose Closes a device drvRead Reads data from a device drvWrite Writes data to a device drvloctl Controls the operation of a device drvInstall finds the associated driver method based on the subtest and logical device passed in This method looks up the devic
190. ts are enabled on a level Synopsis lt kernel kernelExceptionUtils h gt STATUS isBitIntEnabled int level Parameters level is the interrupt level to be tested Description This method checks if an interrupt is enabled on a specified interrupt level Return Values TRUE enabled FALSE not enabled 1 interrupt level could not be resolved level lt 0 level gt ERR_INTERRUPT_BASE Refer to Chapter 5 MBIT Faults for more faults C 42 Computer Group Literature Center Web Site bitIntVectorSet bitIntVectorSet Name bitInt VectorSet saves a vector entry in the MBIT interrupt table Synopsis lt kernel kernelExceptionUtils h gt STATUS bitIntVectorSet VOIDFUNCPTR vector INT32 entry Parameters vector is the interrupt vector to connect entry is the method to connect to the specified vector Description This method sets a vector entry in the MBIT interrupt table Return Values No return values Refer to Chapter 5 MBIT Faults for more faults http www motorola com computer literature C 43 Utility Methods Reference Pages bitiIntEnable Name bitIntEnable enables an interrupt level Synopsis lt kernel kernelExceptionUtils h gt INT32 bitIntEnable INT32 level Parameters level is the interrupt level to enable Description This function enables the interrupt level Return Values fault detected success 1
191. ty methods C 45 manual conventions xix manufacturers documents F 2 maximum test entries 2 12 MBIT API reference pages 1 board level description 1 1 executing subtests 2 3 faults 5 1 features 1 3 initialization status 2 3 initializing 2 2 overview of MBIT 1 1 re initializing 2 3 system level description 1 2 terminate 2 13 use 2 1 use example 2 13 memory testing D 7 message passing 1 5 modify the image D 6 modify the VME5100 BSP D 7 N number of test list results 2 7 obtain faults in MBIT 2 9 obtain IDs in MBIT 2 8 obtain number counts in MBIT 2 11 obtain string descriptions in MBIT 2 10 operating system 3 12 overview 1 1 pre defined faults 5 4 process MBIT explanation of 1 5 processing test list 1 6 public methods test de installation 3 7 test execution 3 7 test installation 3 7 R reference pages API methods 1 cache utility methods 1 device driver methods B 28 device read write utility methods B 40 diagnostic device utility methods C 30 diagnostic integration methods B 1 generic device driver methods B 15 interrupt utility methods C 36 time utility methods C 45 reinitBit 1 7 2 3 2 9 A 5 18 related documentation F 1 requirements system 1 3 results test list requests 2 6 RUN TILL COMPLETION 2 5 A 8 S set default parameters 3 5 setup default device descriptor values 3 24 special operations 3 22 structures ADDR INFO 3 25 to 3 38 4 13 to 4 15 BIT PCI INFO 3 25
192. uccessful completion a BIT FAULT is returned which is an ID representing the fault identifier Otherwise 1 is returned if the fault is not found Refer to Chapter 5 MBIT Faults for more return values Obtaining Faults in MBIT The getBitDeviceFault method obtains fault information for a specified logical device getBitDeviceFault getBitDeviceFault obtains the fault data for the device specified by the input device enumeration value The first fault detected for the specified logical device returns to the caller Invoking reinitBit clears the collected fault data http www motorola com computer literature 2 9 Using MBIT Here s a synopsis of the getBitDeviceFault method include lt api bitApi h gt FAULT getBitDeviceFault LOGICAL DEVICE device BIT FAULT deviceFault where device is the logical device for the requested fault data and the returned fault code will be place in the BIT FAULT as deviceFault Upon successful completion this method returns BIT NO FAULT DETECTED otherwise it may return any of the return values listed in Appendix A API Method s Reference Pages and Chapter 5 MBIT Faults Obtaining String Descriptions in MBIT The getBitSubtestDesc getBitDeviceDesc and getBitFaultDesc methods obtain strings describing subtests logical devices and diagnostic faults respectively The IDs mentioned in these methods are obtained from the corresponding m
193. ues BIT_NO_FAULT_DETECTED no fault detected success BIT_PROCESSOR_NOT_SUPPORTED unknown processor type BIT_CACHE_ROUTINE_NOT_SUPPORTED cache routine is not supported BIT_CACHE_LOCK_NOT_SUPPORTED cache locking is not supported Refer to Chapter 5 MBIT Faults for more faults http www motorola com computer literature C 25 Utility Methods Reference Pages bitL2CacheUnlock Name bitL2CacheUnlock unlocks the L2 cache Synopsis lt utilities bitCacheUtils h gt BIT_FAULT bitL2CacheUnlock void Parameters No input parameters are required by this method Description This method unlocks the L2 cache if the L2 cache supports it Return Values BIT_NO_FAULT_DETECTED no fault detected success BIT_PROCESSOR_NOT_SUPPORTED unknown processor type BIT_CACHE_ROUTINE_NOT_SUPPORTED cache routine is not supported BIT_CACHE_LOCK_NOT_SUPPORTED cache locking is not supported Refer to Chapter 5 MBIT Faults for more faults C 26 Computer Group Literature Center Web Site bitL2CacheIsLockable bitL2CachelsLockable Name bitL2CacheIsLockable gives the lock capability of the L2 cache Synopsis lt utilities bitCacheUtils h gt BOOL bitL2CacheIsLockable void Parameters No input parameters are required by this method Description This method returns the boolean lock capability of the L2 cache Return Values L2 cache is lockable FALSE the L2 cach
194. up Literature Center Web Site bitDataCacheLock bitDataCacheLock Name bitDataCacheLock locks the L1 data cache Synopsis lt utilities bitCacheUtils h gt BIT FAULT bitDataCacheLock void Parameters No input parameters are required by this method Description This method locks the L1 data cache Return Values NO FAULT fault detected success PROCESSOR NOT SUPPORTED unknown processor type CACHE ROUTINE NOT SUPPORTED cache routine is not supported Refer to Chapter 5 MBIT Faults for more faults http www motorola com computer literature C 9 Utility Methods Reference Pages bitDataCacheUnlock Name bitDataCacheUnlock unlocks the L1 data cache Synopsis lt utilities bitCacheUtils h gt BIT_FAULT bitDataCacheUnlock void Parameters No input parameters are required by this method Description This method unlocks the L1 data cache Return Values BIT_NO_FAULT_DETECTED no fault detected success BIT_PROCESSOR_NOT_SUPPORTED unknown processor type BIT_CACHE_ROUTINE_NOT_SUPPORTED cache routine is not supported Refer to Chapter 5 MBIT Faults for more faults C 10 Computer Group Literature Center Web Site bitInstCacheEnable bitInstCacheEnable Name bitInstCacheEnable invalidates and enables the L1 instruction cache Synopsis lt utilities bitCacheUtils h gt BIT_FAULT bitInstCacheEnable void
195. urn getBitFaultIdByName BIT NO FAULT DETECTED Subtest Parameters Each diagnostic method includes a void pointer parameter This parameter allows passing a subtest specific parameter structure to the diagnostic methods The parameter structure is optional and if used an initialization and free method must be provided to installBitSubtestEntries See Example Subtest Parameter Configuration for steps on how to configure the optional parameter structure If the subtest allows parameters the allocation for the default parameter structure takes place after executeBitTests is called The parameter initialization methods are called if the parameter pointer testParamPtr in the TEST ENTRY structure is set to NULL These are the two methods setup by installBitSubtestEntries during the diagnostic configuration method The de allocation of the parameter structure occurs after the test runs Also if the user wants to pass in his own parameters for the subtests 3 8 Computer Group Literature Center Web Site Subtest Parameters the testParamPtr field in the TEST ENTRY structure holds this information Once executeBitTests is called the parameter pointer is copied over to an internal MBIT buffer so that the user does not have to keep the pointer around The parameter structure does not get returned back to the API Example Subtest Parameter Configuration The steps below outline the method to configure new su
196. utilities bitDeviceUtils h FAULT bitOut ADDR INFO reg Parameters reg is the pointer to the location s ADDR INFO structure Description This method writes to the location described by the ADDR INFO structure passed to the method If an exception is caused by the write BIT BUS ERROR is returned to indicate an exception occurred If a device is not enabled and enable disable methods are defined then the device is enabled written to and then disabled The value actually written to the location is the value in the val field of the ADDR INFO structure passed to the method Return Values NO FAULT fault detected success BUS ERROR device did not respond to transfer DEVICE ENABLE FAULT failed to enable a disabled device DEVICE DISABLE FAULT failed to disable an enabled device INVALID TEST PARAM invalid test parameter was supplied INVALID DEVICE DESC 4device descriptor has invalid field configuration error Refer to Chapter 5 MBIT Faults for more faults http www motorola com computer literature C 35 Utility Methods Reference Pages Interrupt Utility Methods MBIT provides the following interrupt utility methods bitIntLock bitIntUnlock bitForceIntUnlock bitIntConnect isBitIntEnabled bitIntVectorSet bitIntEnable bitIntDisable C 36 Computer Group Literature Center Web Site bitIntLock bitlntLock
197. vice Diver Teds ee A B 28 np e dn rigent mS B 29 dex x X XD t8llC VERSER AR NUR B 31 SW OSN Met TTC B 33 nig NE 34 ener eee 35 n S d e wp B 37 SS oe uid p frr i AE E E B 39 Device Read and Write Utility Methods treten eere B 40 F Coen ae eee epee icu EA st uias B 41 LOAD T MC cient eee B 42 y gb WA GIS BEY E B 43 buprobeOutS wapl6 32 sacar rr B 44 RR TE 45 buit 46 PRS cioe ee B 47 o di ril obo me n B 48 daro MR RR 49 ene 50 APPENDIX C Utility Methods Reference Pages Cach Utility Methods ssc E AA C 1 Bieta C 3 4 biit stat dehelsBrdbIgelU iius np dtp ord ERR HMM ia inna ki ioina C 5 ache qe C 6 bitDataCachePlIushinvalicdatel cs user p C 7 Ben bn dpi
198. vice descriptor based on the logical device passed in The associated device driver routine is then called This routine must be called after the drvOpen has been called http www motorola com computer literature B 27 Integrating Custom Diagnostics Reference Pages Return Values BIT_NO_FAULT_DETECTED no fault detected successful SUBTEST NOT SUPPORTED C selected subtest is not supported on this device DEVICE NOT SUPPORTED device is not supported DRIVER SEQUENCE methods invoked out of order INVALID DEVICE DESC 4device descriptor has invalid field configuration error Refer to Chapter 5 MBIT Faults for more faults Device Driver Methods MBIT provides the following device driver methods devXXXInstall on page B 29 devXXXDeinstall on page B 31 devXXXOpen on page B 33 devXXXClose on page B 34 devXXXRead on page B 35 devXXXWrite on page B 37 devXXXloctl on page B 39 B 28 Computer Group Literature Center Web Site devXXXInstall dev XXXinstall Name devXX XInstall allows MBIT to prepare the driver for subsequent access of the device Synopsis devXXXInstall DEV DESC pDevDesc Parameters pDevDesc is a pointer to a structure that contains all of the registers that are needed to perform an install operation on the device Using the register definitions in the device descriptor guarantees that the correc
199. with the MBIT diagnostic software Appendix F Related Documentation provides a list of related documentation for the MBIT software Comments and Suggestions Motorola welcomes and appreciates your comments on its documentation We want to know what you think about our manuals and how we can make them better Mail comments to Motorola Computer Group Reader Comments DW 164 2900 S Diablo Way Tempe Arizona 85282 You can also submit comments to the following e mail address reader comments mcg mot com In all your correspondence please list your name position and company Be sure to include the title and part number of the manual and tell how you used it Then tell us your feelings about its strengths and weaknesses and any recommendations for improvements Conventions Used in This Manual The following typographical conventions are used in this document bold is used for user input that you type just as it appears it is also used for commands options and arguments to commands and names of programs directories and files italic is used for names of variables to which you assign values for function parameters and for structure names and fields Italic is also used for comments in screen displays and examples and to introduce new terms courier is used for system output for example screen displays reports examples and system prompts lt Enter gt lt Return gt or lt CR gt represents
200. xWorks 11 12 13 14 15 16 17 18 In the pop up menu select Include Special BIT VME Slave Memory Configuration In the Include Component s dialog box choose OK In the Workspace dialog box choose the Builds tab Using the controls navigate to and select the default build for the new project Right click in the Workspace window In the pop up menu choose Dependencies In the Dependencies dialog box choose OK Right click in the Workspace window In the pop up menu select Rebuild all vxWorks In the Dependencies dialog box choose OK Configuring the Target This information is in the VxWorks documentation and target config mv5100 target nr from the MVME5100 BSP Booting the Target This information is in the VxWorks documentation and target config mv5100 target nr from the MVME5100 BSP Modifying the Image The file kernelExceptionUtils c in the kernel directory needs to be compiled into the VxWorks image This is required because the Vx Works image files cannot be compiled with the mlongcall option In other words the Tornado distribution CD ROM contains only objects for the required files and a source is not available for the exception handling functions D 6 Computer Group Literature Center Web Site Modifying the 5100 BSP Modifying the MVME5100 BSP After installing MBIT some modifications to the MVMES5100 BSP are required to run
201. y parameters to match existing VME location monitor window Computer Group Literature Center Web Site VME Location Monitor Window Setup 5 Edit Tornado target config mv5100 sysLib c to add the following to sysPhysMemDesc void BIT VME LM MSTR LOCAL void BIT VME LM MSTR LOCAL BIT VME LM MSTR SIZE VM STATE MASK VALID VM STATI VM STATE MASK CACHEABLE VM STATE VALID VM STATE WRITABLE VM STATE CACHEABLE NO 6 Display hardware Diagnostics using the controls E MASK WRITABLE 7 Right click on BIT VME Location Monitor Window Setup and select Include VME Location Monitor Window Setup Choose OK http www motorola com computer literature Known Issues This release of the MBIT diagnostic software 1 01 has the following known issues Installation Please refer to Appendix D Installing MBIT with Tornado 2 1 and VxWorks for the most up to date installation instructions Your CD ROM may not have the latest installation updates Subtest Results 1 For the MVME5110 models only The interrupt controller test list reports MPIC interrupt controller marginal for test 1 The test plan indicates that the expected result should be Operation succeeded Test successful 2 For the MVMES106 models only The Ethernet test list for Ethernet device 2 reports Dat
202. y the access to the device then bitProbeIn8 bitProbeIn16 bitProbeIn32 should be used Here s a synopsis of the bitIn8 16 32 method finclude lt utilities bitDeviceUtils h gt STATUS bitIn8 ULONG addr UINT32 pdata STATUS bitIn16 ULONG addr UINT32 pdata STATUS bitIn32 ULONG addr UINT32 pdata where addr is the address to read data from and pdata is the pointer to a 32 bit location to store data This method always returns 0 Refer to Appendix B Integrating Custom Diagnostics Reference Pages and Chapter 5 MBIT Faults for more information bitOut8 16 32 bitOut8 16 32 writes 8 16 32 bit data to the designated address The data is written into an 8 16 32 bit memory location The MBIT exception handler is not enabled during the data write If the MBIT exception handler is needed to catch exceptions caused by the access to the device then bitProbeOut8 bitProbeOut16 bitProbeOut32 should be used http www motorola com computer literature 3 37 Integrating Custom Diagnostics Here s a synopsis of the bitOut8 16 32 method include lt utilities bitDeviceUtils h gt STATUS bitOut8 ULONG addr UINT8 data STATUS bitOut16 ULONG addr UINT16 data STATUS bitOut32 ULONG addr UINT32 data where addr is the address to write data to and data is the data to write out This method always returns 0 Refer to Appendix B Integrating Custom Diag

Download Pdf Manuals

image

Related Search

Related Contents

S-7200C 取扱説明書  manuel d`utilisation  PVS-17 Perfil PVC-Longitudinal  Fiche emploi - La Littorale  Whirlpool RS310PXE User's Manual  Utiliser des listes préférées  

Copyright © All rights reserved.
Failed to retrieve file