Countdown to PowerPC

From EDM2
Jump to: navigation, search

by Scott L. Winters

From the first time that IBM briefed OS/2 customers and the trade press on the content and function of what has become known as OS/2 for the PowerPC, it was stated that one major goal was source compatibility of existing 32-bit OS/2 applications. This meant that any 32-bit application currently running on OS/2 2.x or OS/2 Warp Version 3 could be recompiled into PowerPC RISC objects, bound into an ELF+ .EXE format, and run on the PowerPC platform. This is the story of how we made that goal a reality.

Two Weeks to Go

About two weeks before Fall COMDEX '94, the Alpha-level driver of OS/2 for the PowerPC began to come together in a robust manner. However, we still had our problems. For example, the Workplace Shell had not yet really come online, and we had only the beginnings of Multimedia. We did have some icons on the desktop, but we were having trouble with getting resources from the extended attributes in the file system name space. Although we were able to cut a hole in a presentation space and play an Ultimotion movie, it was without sound. The business audio driver was 100% new and was not reliable yet.

However, the Presentation Manager (PM) subsystem was quite robust and ahead of schedule - with our test teams running 60% of all PM test cases with a 40% success ratio. The OS/2 Server that exports the DOSCALLS.DLL was also starting to work quite well. (This subsystem also is 100% new code and is hosted by the IBM Microkernel.) With all code paths leading down into DOS calls, it became obvious that the brand new OS/2 Server and IBM Microkernel could be the home of many bugs in our Alpha-level system.

The bottom line was that the system was showing promise. The long months of bootstrapping IBM's newest operating system were about to be over.

Intel to PowerPC in a Week!

With less than two weeks to go to COMDEX, we knew that we had enough to demonstrate on the show floor pedestals. We had been able to port simple applets such as text editors and file browsers from OS/2 2.1 on Intel to OS/2 running on the PowerPC. These ports generally took less than one hour and required no code changes. We also had the OS/2 game applets of Klondike, Chess, and Mahjongg in the mill being ported, with rapid success.

Now it was time to really put our system to the test! The development group teamed up with marketing and we invited a small group of ISVs and IBM internals to join us in Boca Raton for a weeklong port-a-thon. This group consisted of six external and three internal teams.

Initially we floundered. Getting the ISVs set up was hard and required an initial level of technical help that we didn't anticipate. Each ISV was given an IBM ValuePoint machine running OS/2 to build and develop on and an IBM PowerPC also running OS/2 as the target machine. The systems were connected on a token-ring network for remote debugging using a new version of IPMD. A serial cable allowed the PowerPC to be monitored during code execution. The ISVs spent about a day looking, feeling, and playing with the new systems in front of them, basically getting comfortable with the hardware and software frontier that they were about to enter. The system was changing on a daily basis. The subsystems that export Dosxxx, Gpixxx, and Winxxx had known problems, and it required close and careful communication between the ISVs and the OS/2 development team for everyone to keep current with the changing content of the driver. For those ISVs bringing up applications, it meant that they needed to do a little detective work as they went along.

There was a code-construction strategy that each ISV had to come up with, based on the type of code that they had to recompile. The toolkits available were based on the MetaWare High C/C++ compiler and linker cross-development environment. With code written to straight ANSI C syntax, few problems would be encountered at compile time. But at runtime, alignment values used as constants are troublesome, since PowerPC hardware differs from Intel in how word alignment exceptions are handled. Almost all of the startup problems existed in the makefiles - where knowledge of the MetaWare options for the compiler and linker had to be understood.

The builds took about one day. The ISVs broke their code up into small, manageable pieces and attempted their first successes at running PowerPC user-level code. These initial runs required OS/2 development team support because they exposed new system bugs. Over the next three days, these bugs were fixed, and the system solidified. This allowed the ISVs to see their applications running side-by-side on OS/2 on Intel and OS/2 for the PowerPC.

By the end of the week, all ISVs who had stayed had their applications up and running - with the average ISV porting up to 300 thousand lines of code spread over hundreds of files. These successful ISVs included Athena, BocaSoft, Footprint, Pinnacle, and Sundial.

There was a sort-of competition in the area of who was running first and other friendly things of the same nature. Of the original external group that came to Boca Raton, four experienced porting success. One of them was Dr. Randell Flint of Sundial Corporation. He ported his time and information management application, Relish. In fact, he said that this was the simplest port that he had ever done - not really a port, but just a recompile.

During the same time frame, the OS/2 development team was working to port all the system level servers (OS/2, MVM, File, and the Event Window Manager) to a new version of the IBM Microkernel. This new microkernel had many fixes and interface changes in it, and the move had been coordinated carefully for over a month. Two main changes necessitated the move before COMDEX. First was the performance gains that would be realized due to a new implementation for Remote Procedure Call (RPC/IPC), which is the main interface in which a service call is made into and out of the microkernel. Second was the need for an object record format change from a Table of Contents (TOC) designed record to a Global Offset Table (GOT) mechanism.

With each new build of OS/2 for PowerPC the system got faster and application performance became snappy, and thus more usable. Then, the Workplace Shell came up for the first time. The system started to take on the look and feel of OS/2 Warp on Intel!

The Big Show

At COMDEX, OS/2 for the PowerPC was on sixteen pedestals at multiple locations in the show. The AIM Pavilion (Apple-IBM-Motorola) hosted ten of those pedestals. Nine had OS/2 applications featured and one showed the Workplace Shell. The AIM Pavilion attracted an estimated 30,000+ visitors in the first three days of the show, with a very large crowd of press attendees at the Monday night reception. Our ISVs enjoyed the heavy traffic and got a chance to boast of being the first to run on the new platform. Most were interviewed by the press; some appeared on COMDEX TV and in the COMDEX newspaper during the show week.

The success stories of our ISVs porting their applications so quickly, with so few changes, was a terrific public first step for OS/2 for the PowerPC!

Reprint Courtesy of International Business Machines Corporation, © International Business Machines Corporation