wiki:TBR/BSP/Mvme167

Version 5 (modified by JoelSherrill, on 02/05/09 at 17:19:57) (diff)

Add hardware description

Mvme167

{{Infobox BSP |BSP_name = mvme167 |Manufacturer = Motorola Computer Group now Emerson Network Power |image = MVME167-034B.gif |Architecture = M68K |CPU_model = MC68040 |Simulator = No }}

Hardware and Software Info

OK, so I (Till) pulled out an old mvme167 board and an mvme712 transition module. Joel Sherrill? thinks this sounds similar to the MVME167 we have in the RTEMS Lab. Our transition module has thick wire 10BaseT.

The MVME167 has the following hardware description:

  • 16, 25, or 33.33 MHz MC68030 enhanced 32-bit microprocessor
  • 16, 25, or 33.33 MHz MC68882 floating-point coprocessor
  • 4, 8, 16, or 32MB of shared DRAM, with programmable parity
  • 4K x 8 SRAM and time-of-day clock with battery
  • Four 28/32-pin ROM/PROM/EPROM/EEPROM sockets, 16-bits wide
  • A32/D32 VMEbus master/slave interface with system controller function
  • Four EIA-232-D serial communications ports
  • Centronics® compatible printer port
  • Two 16-bit timers and watchdog timer
  • SCSI bus interface with DMA
  • Ethernet transceiver interface
  • 4-level requester, 7-level interrupter, and 7-level interrupt handler for VMEbus
  • On-board debugger and diagnostic firmware. The MVME167 has 167Bug firmware in its PROMs.

Patches

While trying out rtems-4.9.1 (gcc-4.3.2) I encountered some problems that prevented me from using this BSP out of the box. For most of these I submitted PRs to the database. Download the associated patches and apply.

# The FPSP floating-point emulator uses some pretty bad (i.e., short and commonly-used) symbols which lead to linker errors (name clashes). PR#1369 addresses thishttps://www.rtems.org/bugzilla/show_bug.cgi?id=1369. Note that this patch touches a Makefile.am and configure.ac file so you have to have the autotools available and you must run 'bootstrap' after applying the patches. # The console driver uses some inline assembly which causes problems for the gcc-4.3.2 optimizer; PR#1370https://www.rtems.org/bugzilla/show_bug.cgi?id=1370 addresses this. The problem is also explained on the mailing listhttp://rtems.rtems.org/pipermail/rtems-users/2009-February/004877.html # The custom/mvme167.cfg snipped fails to convert the final ELF executable into a downloadable binary (167Bug requires a pure binary). PR#1371https://www.rtems.org/bugzilla/show_bug.cgi?id=1371 provides a fix. You can also use the 'm68k-rtems-objcopy -Obinary' command to do the conversion manually. # Finally, there are quite a few bugs in the networking driver. I didn't have the time to do proper analysis, fixing and testing so take PR#1372https://www.rtems.org/bugzilla/show_bug.cgi?id=1372 with a grain of salt - it may require more work.

RTEMS/BSP Configuration

In order to get the console to do what I want (the mvme712 transition board has one of the serial ports (port 0) labeled 'Console' and that's where 167Bug interacts with me and that's what I want RTEMS to use for the console. Unfortunately, by default RTEMS will use port 1 and not port 0 so you may not see anything on your terminal unless you either use a second terminal or provide different configuration settings. The console port and mode (IRQ-driven vs. polling, termios vs. non-termios) are configured at the time you say 'configure' but you pass the desired values on the commandline to configure. I use

configure CD2401_IO_MODE=1 CD2401_USE_TERMIOS=1 CONSOLE_MINOR=0 PRINTK_MINOR=0  <other configure options>

which chooses IRQ-driven mode (0 == polled), termios mode (0 == non-termios), and selects serial port 0 for console and printk output (use the desired serial port # here -- remember that this defaults to 1 if not set)

Firmware Setup

The mvme167 BSP by default (i.e., unless you tamper with the linkcmds) is linked at 0x00800000 and the firmware has to be properly configured so that loading and executing at that address is possible: # The board's RAM must be mapped starting at address 0x00800000 (and not zero as may seem more natural and which IIRC is 167Bug's default). ## Use 167Bug's 'env' command to set the 'Base Address of Local Memory' to 00800000. ## Use 167Bug's 'niot' command to set the download and execution address to 00800000. # By default, the 167Bug firmware uses the lowest 64k block of RAM it finds for internal data and this conflicts with RTEMS' needs. 167Bug won't allow you to download the RTEMS image to 0x00800000 unless you instruct 167Bug to use another area (e.g., static RAM) for it's internal data. ## Use 167Bug's 'env' command to set both, the 'Memory Search Starting Address' and 'Memory Search Ending Address' to zero. The 'search' area is the address-range that is scanned by 167Bug when it tries to find an area for it's internal data. If it finds no RAM (since start==end) then it uses static RAM and 00800000 and up can be used by RTEMS.

These are my 'env' settings:

MPU Clock Speed =25Mhz                                                          
                                                                                
167-Bug>env                                                                     
Bug or System environment [B/S] = B?                                            
Field Service Menu Enable [Y/N] = N?                                            
Remote Start Method Switch [G/M/B/N] = B?                                       
Probe System for Supported I/O Controllers [Y/N] = Y?                           
Negate VMEbus SYSFAIL* Always [Y/N] = N?                                        
Local SCSI Bus Reset on Debugger Startup [Y/N] = N?                             
Local SCSI Bus Negotiations Type [A/S/N]       = A?                             
Ignore CFGA Block on a Hard Disk Boot [Y/N]    = Y?                             
Auto Boot Enable [Y/N]   = N?                                                   
Auto Boot at power-up only [Y/N] = Y?                                           
Auto Boot Controller LUN = 00?                                                  
Auto Boot Device LUN     = 00?                                                  
Auto Boot Abort Delay    = 15?                                                  
Auto Boot Default String [NULL for a empty string] = ?                          
ROM Boot Enable [Y/N]            = N?                                           
ROM Boot at power-up only [Y/N]  = Y?                                           
ROM Boot Enable search of VMEbus [Y/N] = N?                                     
ROM Boot Abort Delay             = 0?                                           
ROM Boot Direct Starting Address = FF800000?                                    
ROM Boot Direct Ending Address   = FFBFFFFC?                                    
Network Auto Boot Enable [Y/N]   = N?                                           
Network Auto Boot at power-up only [Y/N] = Y?                                   
Network Auto Boot Controller LUN = 00?                                          
Network Auto Boot Device LUN     = 00?                                          
Network Auto Boot Abort Delay    = 5?                                           
Network Auto Boot Configuration Parameters Pointer (NVRAM) = FFFC0000?          
Memory Search Starting Address   = 00000000?                                    
Memory Search Ending Address     = 00000000?                                    
Memory Search Increment Size     = 00010000?                                    
Memory Search Delay Enable [Y/N] = N?                                           
Memory Search Delay Address      = FFFFCE0F?                                    
Memory Size Enable [Y/N]         = Y?                                           
Memory Size Starting Address     = 00000000?                                    
Memory Size Ending Address       = 01000000?                                    
Base Address of Local Memory     = 00800000?                                    
Size of Local Memory Board #0    = 00800000?                                    
Size of Local Memory Board #1    = 00000000?                                    
Slave Enable #1 [Y/N] = Y?                                                      
Slave Starting Address #1 = 00000000?                                           
Slave Ending Address #1   = 007FFFFF?                                           
Slave Address Translation Address #1 = 00000000?                                
Slave Address Translation Select #1  = FF800000?                                
Slave Control #1 = 00FF?                                                        
Slave Enable #2 [Y/N] = N?                                                      
Slave Starting Address #2 = FFE00000?                                           
Slave Ending Address #2   = FFE1FFFF?                                           
Slave Address Translation Address #2 = 00000000?                                
Slave Address Translation Select #2  = 00000000?                                
Slave Control #2 = 01EF?                                                        
Master Enable #1 [Y/N] = Y?                                                     
Master Starting Address #1 = 01000000?                                          
Master Ending Address #1   = EFFFFFFF?                                          
Master Control #1 = 0D?                                                         
Master Enable #2 [Y/N] = N?                                                     
Master Starting Address #2 = 00000000?                                          
Master Ending Address #2   = 00000000?                                          
Master Control #2 = 00?                                                         
Master Enable #3 [Y/N] = N?                                                     
Master Starting Address #3 = 00800000?                                          
Master Ending Address #3   = 00FFFFFF?                                          
Master Control #3 = 3D?                                                         
Master Enable #4 [Y/N] = N?                                                     
Master Starting Address #4 = 00000000?                                          
Master Ending Address #4   = 00000000?                                          
Master Address Translation Address #4 = 00000000?                               
Master Address Translation Select #4  = 00000000?                               
Master Control #4 = 00?                                                         
Short I/O (VMEbus A16) Enable [Y/N] = Y?                                        
Short I/O (VMEbus A16) Control      = 01?                                       
F-Page (VMEbus A24) Enable [Y/N]    = Y?                                        
F-Page (VMEbus A24) Control         = 02?                                       
ROM Speed Bank A Code         = 05?                                             
ROM Speed Bank B Code         = 05?                                             
Static RAM Speed Code         = 01?                                             
PCC2 Vector Base              = 05?                                             
VMEC2 Vector Base #1          = 06?                                             
VMEC2 Vector Base #2          = 07?                                             
VMEC2 GCSR Group Base Address = CC?                                             
VMEC2 GCSR Board Base Address = 00?                                             
VMEbus Global Time Out Code   = 01?                                             
Local Bus Time Out Code       = 00?                                             
VMEbus Access Time Out Code   = 02?                                             
167-Bug>                                               

And 'niot':

167-Bug>niot                                                                    
Controller LUN =00?                                                             
Device LUN     =00?                                                             
Node Control Memory Address =FFE10000?                                          
Client IP Address      =0.0.0.0?                                                
Server IP Address      =0.0.0.0?                                                
Subnet IP Address Mask =0.0.0.0?                                                
Broadcast IP Address   =0.0.0.0?                                                
Gateway IP Address     =0.0.0.0?                                                
Boot File Name ("NULL" for None)     =?                                         
Argument File Name ("NULL" for None) =?                                         
Boot File Load Address         =00800000?                                       
Boot File Execution Address    =00800000?                                       
Boot File Execution Delay      =00000000?                                       
Boot File Length               =00000000?                                       
Boot File Byte Offset          =00000000?                                       
BOOTP/RARP Request Retry       =00?                                             
TFTP/ARP Request Retry         =00?                                             
Trace Character Buffer Address =00000000?                                       
BOOTP/RARP Request Control: Always/When-Needed (A/W)=A?                         
BOOTP/RARP Reply Update Control: Yes/No (Y/N)       =Y?                         
167-Bug>

Booting

I use 'niot' to tell the box it should use BOOTP and set the download and entry point addresses as described above and then say 'nbo'.