Patch 200202131-1 - Rational Apex Embedded for Rational Exec 4.0 for Solaris->PowerPC ------------------------------------------------------------------------------------- To install this patch, download these 3 files and run the install script: install_sol_200202131_1 sol.patch.200202131-1.inventory sol.patch.200202131-1.tar.Z Description REQUIRED PATCH SERIES IDs: Starting with Apex 4.0.0, Native and Embedded patches have a SeriesID associated with them. Specifying a SeriesID as a prerequisite for installation as opposed to a PatchID prevents prerequisites from becoming obsolete as new patches are created. SeriesIDs are text strings -- eg runtimes, views, etc -- and are listed next to the PatchIDs at ftp://ftp.rational.com/patch_info/index.html Before installing this patch, you must install a patch from the following product-series: Apex Native: series sun4_solaris2 [patchID 20010710 or later]. ---------------------------------------------------------- It is suggested that all users install this patch. ---------------------------------------------------------- This patch fixes the following: Defect PEBU00008168: This patch fixes an error in the kernel where, upon a task switch, the VEC bit in the MSR register would get reset to 0. Subsequently, this would cause the AltiVec unit to become unavailable. This only affects users who are working with PowerPC chips which contain an AltiVec (SIMD) unit, e.g. MPC7400. The kernel must be relinked for this change to take affect. As an additional note to those who are using a chip with an AltiVec unit: if your user program uses both Ada tasking and the AltiVec unit, you must enable the AltiVec unit in every task which plans to use it, because the VEC bit in the MSR is maintained on a per-task basis. Also, as is stated in the runtime guide, you must figure out some mechanism for sharing the AltiVec register set if more than one task is going to access it. ---------------------------------------------------------- The following were fixed in earlier patches. The fixes are included in this patch as well. Defect PEBU00007209: The creation of an Ada task by the Apex runtime involves the allocation of several resources. One of these, the Ada Task Control Block (ATCB) is used by the runtime to keep track of the state of the task, and as such must exist while the task is still visible, even after it has been terminated. The ATCB is used, for example, to supply the value of the 'Terminated attribute. Because of this, Apex does not deallocate the ATCB until the corresponding master completes. In particular, Unchecked_Deallocation of tasks created dynamically using Ada allocators will not deallocate the ATCB; it will not be deallocated until and unless the corresponding access type's master completes. For library level access types, this will not happen until program completion. This can cause applications using Unchecked_Deallocation on objects containing tasks to leak memory. This patch provides an implementation of Unchecked_Deallocation that will deallocated the ATCB of a terminated task. Note that the task has to be terminated at the time of the deallocation; if not, the ATCB will not be deallocated when the task terminates, but when the master completes, as before. Defect PEBU00007389: A coding error in translating the TestMate coverage harness to Ada95 prevented reading of the events information. This patch supplies a corrected harness archive. This affects TestMate users only. Defect PEBU00007427: In the Rational Apex 4.0 Embedded Solaris to PowerPC products, for loops may fail to terminate in certain situations. Bcopy, an subprogram internal to the runtime, does not preserve the value of the CTR register, which is used in optimized for loops. Calls to Bcopy are generated by the compiler to copy large objects, e.g. for record or array assignment. If one of these calls is made in the body of an optimized for loop, it may zero CTR, which prevents the loop from terminating. This patch provides a new Power PC code generator that recognizes the volatility of CTR, avoiding its use to implement loops containing subprogram calls that may modify it. Since the libraries in the released product were compiled with the original code generator, a version of Bcopy that preserves the value of CTR is also included. Defect PEBU00007453: The runtime archives use V_I_Alloc.Aa_No_Exception_Global_New to allocate runtime structures, in particular the Ada Task Control Block (ATCB) associated with each task. As the name implies, this operation should not raise exceptions since the runtime cannot catch them. A bug in Apex Embedded for Rational Exec causes this operation to raise Storage_Error if there is insufficient storage to honor the requested allocation. When allocating an ATCB, the runtime mutex protecting operations on task masters is held; since the runtime can't catch the exception, it is propagated into the application without releasing the mutex. The next attempt to lock this mutex, usually at the completion of the master of the task whose creation failed for lack of storage, will result in deadlock. This has been addressed by modifying Aa_No_Exception_Global_New to return null to indicate insufficient storage, as expected by the runtime system. Defect PEBU00007962: The Rational Apex 4.0.0 non-tasking runtime, libada.ts0.a, fails to unlock an interrupt-level protected object when waiting on one of its entries. This results in the interrupts (signals on native platforms) handled by this object, and possibly other interrupts as well, remaining blocked while the task waits. Since the non-tasking runtime is linked into applications with only an environment task, it is the only task that could be waiting, and only a protected procedure interrupt handler would be available to open the barrier and allow it to proceed. Since interrupts are blocked, the application deadlocks. This patch provides a libada.ts0.a archive that unlocks a protected object before waiting on one of its entries. Defect PEBU00007980: In Rational Apex Embedded to Power PC for Rational Exec, asynchronous context switches can occasionally cause a kernel panic. In particular, this can happen when a protected procedure interrupt handler waking a suspended task by opening an entry barrier (LRM C.3). This typically results in the program being terminated with the message: Error in kernel:: Task context saved twice This is a rare condition dependent on uninitialized runtime data. This patch provides a runtime kernel archive that fixes this problem. All Power PC Rational Exec kernels should be relinked after the patch has been installed; see 'Configuration Guide for Rational Exec Contents' for details. IMPORTANT NOTE: As part of fixing defect PEBU00007980, krn_conf.ss views will be cleaned and recoded and the kernel(s) in them will be re-linked. Output from these commands will go to stdout. You may want to capture this output to a file. You can do that by invoking the /bin/script command before installing the patch. Enhancement #1: This patch adds support for the PowerPC AltiVec. It includes changes to: . System.Machine_Code to support the AltiVec instructions . the compiler and code generator to generate AltiVec instructions . the debugger to disassemble AltiVec instructions . TDM to support displaying the AltiVec register set . the documentation to describe how to use the AltiVec unit It also includes an example BSP for the Motorola MVME5100 board which contains an MPC7400 (which is an AltiVec-enhanced processor). Note, to fully install this new feature, you must also install a patch from the 'views' series numbered 200106261-1 or higher. ---------------------------------------------------------- It is suggested that all users install this patch.