GNU 64-bit PL8 compiler: Toward an open standard environment for firmware development, The

IBM Journal of Research and Development, May-Jul 2004 by Gellerich, W, Hendel, T, Land, R, Lehmann, H, Et al

For two decades, large parts of zSeries� firmware have been written in the PL8 programming language. The existence of a large amount of mature zSeries firmware source code and our excellent experience with PL8 for system programming suggest keeping this language. However, the firmware address space of today's zSeries servers may exceed 2 GB, raising the need for a new 64-bit PL8 compiler, since the original implementation, developed at the IBM Thomas J. Watson Research Center, Yorktown Heights, New York, supports only 32-bit platforms. The GNU compiler collection (GCC) (GNU is a freeware UNIX�-like operating system) has been used to translate those parts of firmware written in C for some years and has also proved successful in compiling Linux(TM) for zSeries. This fact, combined with the highly modular GCC design, suggested reimplementing PL8 within the GCC framework. In this paper, we report on the extension of PL8 to support 64-bit addressing, its implementation as a GCC front end, and the validation of the new compiler. We also evaluate PL8 as a language for highly reliable low-level programming and give some performance data. The paper documents the high level of quality achieved by the GCC open-source project and how such software fits into the traditional IBM software development processes.

Introduction and overview

zSeries* firmware is the software layer between the operating system (OS) and hardware. Its development is characterized by two elements: a very high demand for correct behavior, because firmware bugs could crash any application program running on any OS, and the fact that it requires low-level programming, i.e., accessing specific addresses and dealing with individual bits. Firmware has many interfaces to hardware registers and to assemblerwritten routines implementing low-level services.

The next section of this paper gives an overview and some background information concerning zSeries firmware development and puts the GNU PL8 ' compiler project into a larger context. We then discuss PL8 in more detail, giving an overview of its features, its history, and a more detailed discussion of its advantages for reliable low-level programming. The section that follows is'about the project itself and gives details about the GNU compiler collection (GCC), and in particular the PL8 compiler front end. The important task of validating correctness and performance of the new compiler is addressed in the next section. The last section is about process issues, describing when and how new versions of the compiler were released during its development. This topic was of particular importance, since the new compiler and the firmware being compiled by it were developed in parallel.

zSeries firmware development and the role of PL8

The high-level programming language pl.8 was first used for developing the firmware of the 9377 Enterprise Server, an S/370* machine, in the early 1980s. At that time almost all firmware was written as horizontal microcode using special assemblers. The idea of using high-level languages and compilers for microcode resulted, as a matter of course, in many complaints about performance degradation.

Firmware performs the instruction interpretation of the very complex z/Architecture* instructions. While RISC-style instructions are directly implemented in processor hardware, the next level of firmware, called millicode [1], implements the medium-level instructions that occur frequently and are highly performance-critical. The internal 390 (i390) firmware layer performs the I/O redundant path management, I/O load balancing, recovery from hardware and firmware errors, and the system management functions in zSeries. These functions in other computer systems are typically implemented in operatingsystem layers. The interpretation of the control blocks associated with I/O instructions and system management functions requires precise control over the data layout in records and unions. Recovery functions provided by the i390 firmware layer perform many low-level hardware register accesses mainly in the hierarchical structure of the I/O hardware paths. They also require precise bit positioning in data structures, including arrays of bitstrings smaller than a byte.

The superior optimization and instruction scheduling of the Yorktown pl.8 compiler [2, 3] and the tremendous enhancements in productivity accompanying the use of a high-level language confirmed the validity of using a high-level language for firmware implementation. Two decades of using pi.8 to develop firmware demonstrated that this high-level language could successfully handle bit-precise data structure layout and provide reliability, both by detecting errors at compile time and by reporting defects such as array bounds violations at run time. Coupled with achieving excellent performance, this proved that choosing the pi.8 language back in the 1980s was the right decision then and remains so today.

The z900, predecessor of the z990, provides a true 64-bit z/Architecture for the hypervisor and the OS running in the logical partitions. The i390 firmware on the z900 uses the 32-bit instruction set, compatibility features built into the z/Architecture, and some special hardware support in the processing unit to provide the 64-bit z/Architecture.


 

BNET TalkbackShare your ideas and expertise on this topic

Please add your comment:

  1. You are currently: a Guest |
  2.  

Basic HTML tags that work in comments are: bold (<b></b>), italic (<i></i>), underline (<u></u>), and hyperlink (<a href></a)

advertisement
advertisement
  • Click Here
  • Click Here
  • Click Here
advertisement
Click Here

Content provided in partnership with ProQuest