Section 1
System Firmware

1.1 Introduction

The firmware on the PowerPC 604 SMP reference design handles three major functions:


Section 1.2 briefly discusses the power on system test function.

Section 1.3 details a structure for boot records which can be loaded by the system firmware.

Section 1.4 describes the system configuration utility.

To obtain a copy of the commented source code of the firmware on diskette, contact your IBM representative. This material is available free of charge with a signed license agreement.

1.2 Power On System Test

The Power On System Test (POST) code tests those subsystems of the reference board which are required for configuration and boot to ensure minimum operability. Tests also assure validity of the firmware image and of the stored system configuration.

1.3 Boot Record Format

The firmware will attempt to boot an executable image from devices specified by the user. See section 1.4 for details on specifying boot devices and order.

The PowerPC Reference Platform Specification details a structure for boot records which can be loaded by the system firmware. This specification is described in the following sections.

1.3.1 Boot Record

The format of the boot record is an extension of the PC environment. The boot record is composed of a PC compatibility block and a partition table. To support media interchange, the PC compatibility block may contain an x86-type program. The entries in the partition table identify the PowerPC Reference Platform boot partition and its location in the media.

The layout of the boot record must be designed as shown in Figure 1. The first 446 bytes of the boot record contain a PC compatibility block, the next four 16-byte entries make up a partition table totalling 64 bytes, and the last 2 bytes contain a signature.



1.3.1.1 PC Partition Table Entry

To support media interchange with the PC, the PowerPC Reference Platform defines the format of the partition table entry based on that for the PC. This section describes the format of the PC partition table entry, which is shown in Figure 2.



S Partition Begin The beginning address of the partition in head, sector, cylinder notation.

S Partition End The end address of the partition in cylinder, head, sector notation.

S Beginning Sector The number of sectors preceding the partition on the disk. That is, the zero-based relative block address of the first sector of the partition.

S Number of Sectors The number of sectors allocated to the partition.


The subfields of a partition table entry are defined as follows:

S Boot Ind Boot Indicator. This byte indicates whether the partition is active. If the byte contains 0x00, then the partition is not active and is not considered bootable. If the byte contains 0x80, then the partition is considered active.

S Head An eight-bit value, zero-based.

S Sector A six-bit value, one-based. The low-order six bits are the sector value. The high-order two bits are the high-order bits of the 10-bit cylinder value.

S Cyl Cylinder. The low-order eight-bit component of the 10-bit cylinder value (zero-based). The high-order two bits of the cylinder value are found in the sector field.

S Sys Ind System Indicator. This byte defines the type of the partition. There are numerous partition types defined. For example, the following list shows several:

0x00 Available partition
0x01 DOS, 12-bit FAT
0x04 DOS, 16-bit FAT
0x05 DOS extended partition
0x41 PowerPC Reference Platform partition.

1.3.1.2 Extended DOS Partition

The extended DOS partition is used to allow more than four partitions in a device. The boot record in the extended DOS partition has a partition table with two entries but does not contain the code section. The first entry describes the location, size and type of the partition. The second entry points to the next partition in the chained list of partitions. The last partition in the list is indicated with a system indicator value of zero in the second entry of its partition table.

Because of the DOS format limitations for a device partition, a partition which starts at a location beyond the first 1 gigabyte is located by using an enhanced format shown in Figure 3.



1.3.1.3 PowerPC Reference Platform Partition Table Entry

The Power PC Reference Platform partition table entry (see Figure 4) is identified by the 0x41 value in the system indicator field. All other fields are ignored by the firmware except for the Beginning Sector and Number of Sectors fields. The CV (Compatible Value-not shown) fields must contain PC-compatible values (i.e. acceptable to DOS) to avoid confusing PC software. The CV fields, however, are ignored by the firmware.



The 32-bit start RBA is zero-based. The 32-bit count RBA is one-based and indicates the number of 512-byte blocks. The count is always specified in 512-byte blocks even if the physical sectoring of the target devices is not in 512-byte sectors.

1.3.2 Loading the Load Image

This section describes the layout of the PowerPC 0x41 type partition and the process of loading the load image.



The layout for the 0x41 type partition is shown in Figure 5. The PC compatibility block in the boot partition may contain an x86-type program. When executed on an x86 machine, this program displays a message indicating that this partition is not applicable to the current system environment.

The second relative block in the boot partition contains the entry point offset, load image length, flag field, operating system ID field, ASCII partition name field, and the reserved1 area. The 32-bit entry point offset (little-endian) is the offset (into the image) of the entry point of the PowerPC Reference Platform boot program. The entry point offset is used to allocate the Reserved1 space. The reserved1 area from offset 554 to Entry Point 1 is reserved for implementation specific data and future expansion.

The 32-bit load image length (little-endian) is the length in bytes of the load image. The load image length specifies the size of the data physically copied into the system RAM by the firmware.

The flag field is 8 bits wide. The MSb in the field is allocated for the Open Firmware flag. If this bit is set to 1, the loader requires Open Firmware services to continue loading the operating system.

The second MSb is the endian mode bit. If the mode bit is 0, the code in the section is in big-endian mode. Otherwise, the codes is in little-endian mode. The implication of the endian mode bit is different depending on the Open Firmware flag. If the Open Firmware flag is set to 1, the mode bit indicates the endian mode of the code section pointed to by the load image offset, and the firmware has to establish the hardware endian mode according to this bit. Otherwise, this bit is just an informative field for firmware.

The OS_ID field and partition name field are used to identify the operating system located in the partition. The OS_ID field has the numeric identification value of the operating system located in the partition. The 32 byes of partition name field must have the ASCII notation of the partition name. The name and OS_ID can be used to provide to a user the identification of the boot partition during the manual boot process.

Once the boot partition is identified by the PowerPC Reference Platform boot partition table entry, the firmware:

The load image must be fully relocatable, as it may be placed anywhere in memory by the system firmware. Once loaded, the load image may relocate itself anywhere within system RAM.

1.4 System Configuration

This section describes the utilities in the system firmware which allow the system to be customized. These utilities allow viewing of the system configuration and changing of I/O device configurations, console selection, boot devices, and the date and time. These functions are described in the following sections.

1.4.1 System Console

The system console can be either a screen-oriented video display or a line-oriented serial terminal. The example screens in this section show the S3 video/keyboard interface. When using a serial terminal, the configuration utilities will prompt for numeric input for each prompt instead of using the arrow keys. All choices and options are the same as for the screen-oriented menus.

The configuration of the reference board as shipped is set for S3 video/keyboard console. In the case where either the video adapter or the keyboard fails the power-on test, the system console will default to serial port 1. The baud rate for the serial console is specified in the configuration menus. The value as shipped is 9600 baud.

1.4.2 System Initialization

The logo screen, shown in Figure 6, is displayed at power-on. The logo screen is active while the system initializes and tests memory and performs a scan of the SCSI bus to determine what SCSI devices are installed.




While the logo screen is displayed, pressing the 'C' key on the console will enter the system configuration utility. The configuration menu will also be entered if there is no bootable device present, or if the configuration stored in the system non-volatile RAM is not initialized or is corrupt.

1.4.3 Main Menu

Figure 7 shows the Main Menu for the system configuration utility. Selections on the menu are highlighted by using the up and down arrow keys on the keyboard, and are chosen with the Enter key. Each choice is detailed in the following sections.



1.4.3.1 System Configuration Menu

Figure 8 shows the System Configuration Menu, which has choices to display and change the default state of the reference board on boot. Each menu item is discussed in the following sections.



  1. System Information
The System Configuration option shows the hardware configuration of the system at power-up-including processor, installed options, and firmware revision level. A sample screen is shown in Figure 9.



  1. Configure I/O Devices
The configure I/O devices option allows the customization of system I/O ports and the system console. The menu is shown in Figure 10. Options are highlighted by using the up and down arrow keys on the keyboard and are changed with the left and right arrow keys. Options on the menu are discussed below.




Any changes made in I/O device configuration are saved when the Save and Exit option on the main menu is selected. Exiting the system configuration utility in any other manner will cause device configuration changes to be lost.

  1. Select Console Device
The console selection box allows the selection of an option for the system console.

S Serial Port 1 or 2 Console input and output will be transmitted and received through a serial port on an adapter card. Console input and output will be transmitted and received at the baud rate selected with Serial Port Speed.

S S3 Video/Keyboard Console output will be displayed on a video monitor connected to an S3 PCI video adapter; console input will be received from a keyboard connected to the keyboard connector on the reference board.

  1. Serial Port 1 or 2 Address
Each of the two serial ports on the Reference Board can be accessed at any one of ten different base addresses. The serial port address selection box allows the user to specify which base address to use for each port. The selection boxes enforce the restriction that base addresses for the serial ports must not conflict. Changing the base address for a serial port does not affect its use as the system console. This option may also be used to disable either or both serial ports.

  1. Serial Port 1 or 2 Speed
The serial port speed selection box sets the speed of each serial port. Baud rates for the two serial ports are independent. If a serial port is used as the system console, set this value to match the baud rate of the terminal.

  1. Parallel Port Address
The parallel port address selection box sets the base address of the Reference Board's parallel port to any of three predefined addresses. This option may also be used to disable the parallel port.

  1. View SCSI Devices
The SCSI Devices screen shows the devices found on the SCSI bus during power-on initialization. The string shown is the SCSI device's response to the SCSI inquiry command. According to the SCSI specification, this data comprises the manufacturer's ID, device model number, and device revision level. A sample screen is shown in Figure 11.



  1. Set Boot Devices
The Boot Device Selection menu allows the user to select which devices are queried for boot images and in what order they are selected for boot. Allowable selections are one of the two floppy disk drives, any of six SCSI drive ID numbers, either of two IDE disk drives, or no device selected. The default configuration is shown in Figure 12. In this configuration, the system will attempt to find a boot image on the first floppy disk drive. If this fails, the system will attempt to boot from the SCSI device programmed to SCSI ID 6. If this fails, the system will attempt to boot fro IDE drive zero (master).



If the system fails to find a valid boot image (as discussed in section 1.3) on any of the selected boot devices, or if no boot device is selected, the user will be prompted to enter the configuration menu to select a valid boot device.

Any changes made in boot device selection is saved when the Save and Exit option on the main menu is selected. Exiting the system configuration utility in any other manner will cause boot device changes to be lost.

  1. Set Date and Time
The Set Date and Time screen allows the date and time stored in the battery-backed real time clock to be updated. The screen is shown in Figure 13. To change the time, the left and right arrow keys are used to select the digit to modify, and the digit is then typed over with the number keys. The date or time will be updated when Enter or either the up or down arrow is pressed. Changing the date or time is immediate, and is not affected by either the Save and Exit or Exit Without Saving options on the main menu.



1.4.3.2 Run a Program

The Run a Program option on the main menu loads and executes a program from a FAT (DOS) disk or from a CD-ROM in ISO-9660 format. The program is loaded at location 0x00400000 (4 M), and control is passed with a branch to the first address.

All boot devices specified in the Boot Devices Menu will be searched in order for FAT and CD-ROM file systems, and the first matching file on a boot device will be loaded.

The Run a Program screen is shown in Figure 14. To run a program, enter the file name in the Specify Program Filename field and select the Run the Program option.



1.4.3.3 Reprogram Flash Memory

The PowerPC 604 SMP reference board stores its system firmware in a reprogrammable flash memory on the system board. The Reprogram Flash Memory option on the main menu allows the reprogramming of the flash device with a DOS-formatted diskette. This allows future revisions of the system firmware to be provided on diskette without the need for removal of the device from the board.

If done improperly, reprogramming the flash memory can cause the system to become unusable until external means are available to reprogram the device. Use this option with care.

All boot devices specified in the Boot Devices Menu will be searched in order for FAT and CD-ROM file systems, and the first matching file on a boot device will be loaded.

The Reprogram Flash Memory screen is shown in Figure 15. To reprogram the flash, enter the file name in the Image Filename field and select the Reprogram the Memory option.



1.4.3.4 Exit Options

The two exit options at the bottom of the main menu leave the system configuration utility. The two options are:

S Save and Exit Saves any changes made in the Configure I/O Devices and Set Boot Devices screens, and restarts the system.

S Exit without Saving Proceeds with the boot process as if the configuration utility had not been entered. Any changes made in Configure I/O Devices or Set Boot Devices are lost.

1.4.4 Default Configuration Values

When the PowerPC 604 SMP reference board is shipped from the factory, it has the following default configuration:

S Console Device S3 Video/Keyboard

S Serial Port 1 Address Serial 1-3F8h, 9600 Baud

S Serial Port 2 Address Serial 2-2F8h, 9600 Baud

S Parallel Port Parallel 1-3BCh

S Boot Devices Device 1 - Floppy 1
Device 2 - SCSI ID 6
Device 3 - IDE Drive 0

These default values also take effect whenever the system configuration in system nonvolatile RAM becomes corrupted.