Patch 200801224-1 - Rational Apex Embedded (LynxOS) 4.0 for Sun Solaris->PowerPC ----------------------------------------------------------- To install this patch, download these 3 files and run the install script: install_sol_200801224_1 sol.patch.200801224-1.inventory sol.patch.200801224-1.tar.Z Description IMPORTANT NOTE: When installing this patch, you must also install the LynxOS 3.1.0a patch that addresses LynxOS Reference Numbers 16705 and 16727. For the LynxOS gen1 BSP, this is patch level 27. If the patch is not currently available for your target's BSP, DO NOT INSTALL THIS PATCH. Without the correct patch to LynxOS, your program will likely core dump whenever a predefined exception is raised. Contact LynuxWorks to get the correct patch. REQUIRED PATCH SERIES IDs: Starting with Apex 4.0.0, most 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 RATLC00151031: The Applied Micro Circuits Corporation (AMCC) 440EP variant of the PowerPC processor has an instruction set similar to the PowerPC 603 supported by Rational Ada Embedded Developer. However, it does not implement recording floating point instructions such as fadd. (note the '.' in the mnemonic, which is what distinguishes this from the non-recording fadd). The Apex PowerPC code generator makes extensive use of recording operations to simplify floating point code. This patch contains Rational Ada Developer 4.0.0 for LynxOS PowerPC runtime libraries compiled with a code generator that avoids the use of recording floating point instructions and can be executed on the PowerPC 440EP. This code is also compatible with the PowerPC 603 and equivalent processors, though it is somewhat less efficient than unrestricted code. ---------------------------------------------------------- The following were fixed in earlier patches. The fixes are included in this patch as well. These runtimes are crated with the most recent sources used to build Apex 4.0.0 for LynxOS, from with the corresponding source release was taken. Defect PEBU00005886: The LynxOS ps command can be used to display threads as well as processes. By default, the path name displayed for a thread is the same as that of the parent process. This makes it difficult to associate the information provided about threads implementing Ada tasks with the corresponding Ada source code, information that can be useful in the debugging of Ada tasks. To aid in identifying Ada tasks in the output of the ps command, the Rational Apex Embedded Ada to PowerPC for LynxOS runtimes have been modified to use the LynxOS st_name() operation to associate a compiler generated task name with the corresponding thread. This name is the same string returned by the Ada.Task_Identification.Image function. Note that the ps command may not display all of this name, as LynxOS places a limit on thread name length. Defect PEBU00007427: In the Rational Apex 4.0 Embedded Solaris to PowerPC for LynxOS product, 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. Note, to obtain the complete fix for this defect you must also install a tools series patch numbered 20010709 or later. Defect PEBU00007434: In the Rational Apex 4.0 Embedded Solaris to PowerPC for LynxOS product, child processes created by Posix_Unsafe_Process_Primitives may fail during program exit. Program exit requires runtime information recorded using the P1003.5c thread-specific data feature, and thread specific data does not appear to be duplicated in child processes. This patch works around this problem by avoiding some program cleanup in child processes when running over a threads-based runtime. This cleanup is needed in some Apex products, but in this case the eventual termination of the process is sufficient. Defect PEBU00007483: This defect number represents the same defect as #5886 listed above. Defect PEBU00007629: This patch adds support for trap-based coverage for Apex Embedded for LynxOS for TestMate tests. Defect PEBU00007640: When a predefined exception occurs, the current values of the non-volatile floating point registers are not preserved when entering the exception handler. Defect PEBU00007660: In Apex 4.0.0, 64 bit integer division incorrectly raises Constraint_Error for arguments less than or equal to (-2**31)*(2**32). This occurs when the division routine attempts to convert this to a positive number prior to performing the actual division. This involves negating the upper 32 bits, -2**31; since 2**31 cannot be represented as an integer, overflow is detected and Constraint_Error is raised. This has been fixed by using 32 bit modular types to hold the result of the negation. Since 32 bit modular types can represent 2**31, no overflow occurs. Apex uses 64 bit integer types to represent Time and Time_Span values, so this change affects arithmetic on these types. Defect PEBU00007673: The Apex runtime now handles modular addition for modulus values greater than integer'last. Defect PEBU00007682: A recent patch to LynxOS 3.1.0a (included in patch set 40) upgrades the interface to localtime_r() to be compliant with POSIX 1003.1c. The Apex implementation of Ada.Calendar, in particular Year, Month, Day, Seconds, and Split subprograms, are dependent on the older POSIX 1003.4 draft 9 interface for this function provided by LynxOS prior to the patch. Consequently, use of these subprograms on LynxOS versions with the new interface will have unpredictable effects. This patch to Apex provides a modified implementation of Ada.Calendar that uses a binding to localtime_r() tolerant of both calling conventions. Note that this binding is internal to the Ada.Calendar implementation; the application visible binding Ptime.Localtime_R in rational.ss is still incorrect and should not be used. Defect PEBU00007729: The Apex threaded runtime does not handle the EAGAIN error return from POSIX operations correctly. In most cases, EAGAIN will result in a runtime panic which prints an error message and terminates the program. Since EAGAIN indicates that a system resource is temporarily unavailable, operations returning it should be retried. This patch provides runtime archives that retries POSIX operations until they return something other than EAGAIN. This affects the threaded models of all Apex self compilation products as well as Rational Apex Embedded SPARC Solaris to PowerPC Family for LynxOS. Defect PEBU00007772: The Apex Apex Multiprocessor runtime implements Ada semantics over the POSIX 1003.1c standard API. It assumes that the underlying OS implementation complies with this standard. In particular, it does not necessarily respond to error codes returned by OS calls that, according to the standard, should never be returned or should only be returned under conditions avoided by the runtime system. As a result, problems caused by non-compliant OS error returns result in obscure Apex runtime behavior, making it difficult to track down the source of the problem. This patch provides enhanced POSIX error return reporting from the Apex runtime. In some cases, unexpected error returns now result in a message indicating the error and a kernel panic, terminating the application to prevent it from continuing execution in an undefined environment. There are other cases were error messages detected in the POSIX based Ada kernel are reported to higher software layers for processing. In these cases kernel panics cannot be used, and even an error message might constitute behavior not permitted by Ada. To provide visibility to these errors, the Kernel_Debug flag has been added to the runtime configuration package V_Usr_Conf in the usr_conf.ss subsystem. In the default configuration, this flag is initialized to False in V_Usr_Conf.V_Init_Usr_Data. To get visibility to these additional error returns, create a configuration subsystem as described in 'Using the Ada Runtime' in the 'Configuring the User Library' chapter, modifying V_Init_Usr_Data to set this flag to True. Note that an application will continue to run after the resulting messages. Since these messages do not necessarily constitute an Ada error, this flag should never be set in production software. Note, to obtain the complete fix for this defect you must also install a views series patch whos patchID starts with 20010905 or later. Enhancement #1: This patch adds support for LynxOS 3.1.1 in addition to 3.1.0a. Apex Embedded for LynxOS can now run on platforms that have Altivec-enabled PowerPCs. Using Apex with LynxOS 3.1.1 requires patches from LynuxWorks that address issues 16705 and 38340. Apex Embedded 4.0.0 has been tested against LynxOS 3.1.1 on the Dy4 SMVE/DMV-179 with PowerPC 7400. ---------------------------------------------------------- It is suggested that all users install this patch.