Table of Contents Previous Chapter

3.2.11 Post-launch Software Replacement

3.2.11.1 Purpose

In order to enhance the ACIS software, or work around problems discovered after delivery, ACIS shall maintain an on-board list of software changes. These changes are applied upon each ROM reboot. The changes are specified using the equivalent of a series of write memory commands which are executed upon start-up of the ACIS software. This form of a "write memory" command is known as a patch.

3.2.11.2 Scenario

To install a set of software changes, the maintainer issues a series of "Add Patch" commands to ACIS. ACIS then just records the patch in its internal patch list, to be applied upon the next commanded reboot from ROM. Once the maintainer is satisfied that all of the patches needed for the changes are installed, a command is issued to restart the ACIS software. After reloading its core image from ROM, the ACIS start-up code installs each of the patches specified in the patch list. Patches are not installed if the reset was caused by the watchdog timer.

To remove previously installed patches, the maintainer issues a series of "Remove Patch" commands to ACIS. ACIS then removes the specified patches from its list. Once the maintainer has removed the old changes, a command is issued to restart the ACIS software. After reloading its core image from ROM (effectively undoing the selected patches), the ACIS start-up code installs whatever patches are remaining.

In the event a badly conceived patch prevents the maintainer from removing the patch (such as a bad patch to the code which removes patches), the maintainer has the following options:

3.2.11.3 Functional Requirements
3.2.11.3.1 Add Patch Command

ACIS shall provide a command which allows the maintainer to add a change to the software. Table 71 illustrates this command.

TABLE 71. Add Patch Command Packet (Continued)

----------------------------------------------------------------------------------------------------
Req     Field Name                 Description                                                        
----------------------------------------------------------------------------------------------------
 71-1   Packet Word Length         This indicates the total number of 16-bit words in the command     
                                   packet                                                             
 71-2   Packet Identifier          This identifies the command packet in a series.                    
 71-3   Command Opcode             "Add Patch" command opcode. This instructs the ACIS soft           
                                   ware to add a patch to its list.                                   
 71-4   Patch Id                   This identifies the patch within the patch list.                   
 71-5   Virtual Address to Write   32-bit Back End Processor Virtual Address to start writing to.     
        To                         This address must be long word aligned (i.e. evenly divisible by   
                                   4).                                                                
 71-6   Data to Write              The array of 32-bit data values to write. The number of 32-bit     
                                   words to write is determined by the Packet Length.                 
----------------------------------------------------------------------------------------------------

Upon receipt of an "Add Patch" command, ACIS shall store the patch information contained in the command. When the software restarts, the ACIS start-up software shall reload ROM to undo all previous patches, and then proceed to install all patches specified in the list.

Since normal data writes to virtual addresses mapped to the Instruction Cache result in writes to the physical Data Cache RAM, the ACIS software shall recognize Instruction Cache addresses and provide the necessary code to write to the Instruction Cache RAM.

NOTE: A method for indicating the patch revision at start-up is to include a patch which modifies the software version number sent in the start-up message (see Section 3.2.9.3.5).

3.2.11.3.2 Remove Patch Command

ACIS shall provide a command which allows the maintainer to remove a change from the software. Table 72 illustrates this command.

TABLE 72. Remove Patch Command Packet (Continued)

-------------------------------------------------------------------------------------------
Req     Field Name          Description                                                      
-------------------------------------------------------------------------------------------
 72-1   Packet Word Length  This indicates the total number of 16-bit words in the command   
                            packet                                                           
 72-2   Packet Identifier   This identifies the command packet in a series.                  
 72-3   Command Opcode      "Remove Patch" command opcode. This instructs the ACIS soft      
                            ware to remove the patch specified by "Patch Id."                
 72-4   Patch Id            This identifies the patch within the patch list to remove        
                                                                                             
-------------------------------------------------------------------------------------------

Upon receipt of a "Remove Patch" command, ACIS shall remove the specified patch from its internal list. The effect of the patch will not be eliminated until the ACIS software restarts.

3.2.11.3.3 Dump Patch list

ACIS shall provide a command to dump the contents of its patch list into the telemetry stream. This is accomplished via a "Dump Patch List" command. This command will have the form as shown in Table 73.

TABLE 73. Dump Patch List Command Packet

--------------------------------------------------------------------
Req     Item               Description                                
--------------------------------------------------------------------
 73-1   Packet Length      Length of command packet in 16-bit words   
 73-2   Packet Identifier  This is used to identify the command       
 73-3   Command Opcode     Dump_Patch_List_Command opcode             
                                                                      
--------------------------------------------------------------------

The one or more telemetry packets resulting from this command will contain the information described in Table 74. This requirement may be implemented using a Read Back End Memory Command (see Section 3.2.8.3.1 on page 106) or may be implemented using a customized telemetry representation. If implemented using a Read Back End Memory, the organization of the telemetered patch list data will follow the internal orgnazation used by the instrument, and may require all telemetry packets to be interpretable.

TABLE 74. Dumped Patch List Telemetry Content

-------------------------------------------------------------------------------------------------------------
Req     Item                          Description                                                              
-------------------------------------------------------------------------------------------------------------
 74-1   Packet Synch                  This field marks the start of the ACIS packet within the teleme          
                                      try stream.                                                              
 74-2   Packet Word Length            This field indicates the number of 32-bit words in the packet.           
 74-3   Format Tag                    This field indicates the type of data contained in the telemetry         
                                      packet, in this case a Patch List Dump packet.                           
 74-4   Packet Sequence Number        This field is used to sequentially number all ACIS telemetry             
                                      packets.                                                                 
 74-5   Command Packet Identifier     This is the Packet Identifier of the command causing the dump            
                                      being performed. This allows the ground to associate the com             
                                      mand and the resulting telemetry packets.                                
        The remainder of the packet shall contain a series of patch list entries. Each entry specifies the     
        following:                                                                                             
 74-6   Patch Id                      This identifies the patch.                                               
 74-7   Virtual Address to Write To   32-bit Back End Processor Virtual Address to start writing to.           
                                      This address must be long word aligned (i.e. evenly divisible            
                                      by 4).                                                                   
 74-8   Number of words to write      This is the number of words to write in the patch                        
 74-9   Data to Write                 The array of 32-bit data values to write.                                
                                                                                                               
-------------------------------------------------------------------------------------------------------------

Upon receipt of a Dump Patch List Command, the ACIS Back End software shall form and send one or more telemetry packet containing the contents of the current patch list.

 

Table of Contents Next Chapter