Version 3 (modified by Strauman, on Feb 5, 2009 at 4:33:54 AM) (diff)

/* RTEMS/BSP Configuration */


Hardware and Software Info

OK, so I pulled out an old mvme167 board and an mvme712 transition module. The 167 has 167Bug firmware in its PROMs.


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 this Note that this patch touches a and 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#1370 addresses this. The problem is also explained on the mailing list # The custom/mvme167.cfg snipped fails to convert the final ELF executable into a downloadable binary (167Bug requires a pure binary). PR#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#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                                                          
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?                                             

And 'niot':

Controller LUN =00?                                                             
Device LUN     =00?                                                             
Node Control Memory Address =FFE10000?                                          
Client IP Address      =                                                
Server IP Address      =                                                
Subnet IP Address Mask =                                                
Broadcast IP Address   =                                                
Gateway IP Address     =                                                
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?                         


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'.