GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > PBC / V4-5-0

Constituent: pbc_bootshell     Tag: rad750


Interface   Data Structures   File List   Data Fields   Globals  

secondary.c File Reference

Secondary boot loader support. More...

#include "PBC/PBC.h"
#include "rom_defs.h"
#include "cmdtlm.h"
#include "asmFns.h"
#include "bootcomm.h"
#include "bootshell.h"
#include "pbc_sio.h"
#include "pbc_memmap.h"
#include "ZLIB/zlib.h"
#include "EE_boot.h"
#include "FILE/FILE_hdr.h"
#include "PBC/PBC_msgs.h"
#include "PBC/PBC_types.h"
#include "PBC/PBC_string.h"
#include "MSG/MSG_macdefs.h"

Include dependency graph for secondary.c:

Include dependency graph

Functions

int Pbc_InflateSecondary (void *source, const unsigned long sourceSize, void *dest, const unsigned long destSize)
 Inflate secondary boot file.

void Pbc_JumpToSecondary (void entry(int), int arg)
 Execute secondary boot.

unsigned int Pbc_CopySecondaryFromEeprom (const EE_Bank bank, void *dest, const unsigned int size)
 Copy secondary boot code file from EEPROM to RAM load area.

int Pbc_ExecuteSecondary (const int rtosArg, const unsigned long sbcFlags)
 Load, possibly inflate and execute secondary boot code.


Detailed Description

Secondary boot loader support.

  CVS $Id: secondary.c,v 1.22 2005/05/17 20:45:32 dmay Exp $
  

Secondary boot support


Function Documentation

unsigned int Pbc_CopySecondaryFromEeprom const EE_Bank  bank,
void *  dest,
const unsigned int  size
[static]
 

Copy secondary boot code file from EEPROM to RAM load area.

Parameters:
bank EEPROM Bank Selection.
dest Destination address for secondary file.
size Number of bytes allocated for secondary at dest address.
Returns:
MSG code.

int Pbc_ExecuteSecondary const int  rtosArg,
const unsigned long  sbcFlags
 

Load, possibly inflate and execute secondary boot code.

This function is a bit long.

It sets up secondary boot flags in boot diagnostics, copies the file out of EEPROM if needed, parses the file header, runs a checksum on the file, uncompresses if required, and if all of that succeeds, it jumps to the secondary.

Parameters:
rtosArg Argument to pass to to secondary boot
sbcFlags Secondary boot flags
Returns:
Will not return if successful.
Return values:
PBC_INFLERR on inflation error.
PBC_BHDRCHK on bad EEPROM bank header.
PBC_FILECHK on bad file checksum.
FILE_EHDRCKSM on bad file header checksum.

Here is the call graph for this function:

int Pbc_InflateSecondary void *  source,
const unsigned long  sourceSize,
void *  dest,
const unsigned long  destSize
[static]
 

Inflate secondary boot file.

Inflate compressed application code from temporary RAM storage to RAM where the application was linked. ZLIB inflate routines are used.

ZLIB requires a z_stream block to direct inflation. We inflate the entire block of compressed code as described by the parameters to the function.

If there is an inflation error, return failure.

Inflated code is not executed in function. Use PBC_JumpToSecondary() to execute secondary boot.

Return values:
PBC_SUCCESS if secondary boot is successfully inflated.
PBC_INFLERR on error.

void Pbc_JumpToSecondary void   entry(int),
int  arg
[static]
 

Execute secondary boot.

Run application code at the address specified by the argument entry. The argument arg is passed to the secondary code as the first argument.

If for some reason the secondary boot returns, we reboot with the panic argument.

Parameters:
entry Address of secondary boot code.
arg Argument to secondar boot code.

Here is the call graph for this function:


Generated on Fri Jul 22 20:17:52 2005 by doxygen 1.3.3