GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LFS / V1-12-3 > lfs_lcp / rad750


Interface   Data Structures   File List   Data Fields   Globals  

LFS_lcp_boot.c.vx-ppc-cpci File Reference

Routines to manuipulate boot files in the TFFS boot partition. More...

#include <vxWorks.h>
#include <string.h>
#include <errno.h>
#include <tffs/tffsDrv.h>
#include <Memmap.h>
#include <MSG/MSG_pubdefs.h>
#include <PBS/MBA.h>
#include <FBS/FBS_pubrtos.h>
#include <CCSDS/CCSDS_pkt.h>
#include <ZLIB/zlib.h>
#include <QLFS/QLFS.h>
#include <LSF/LSF_ids.h>
#include <LFS/LFS_msg.h>
#include <LFS/LFS_tlmdefs.h>
#include <LFS_lcp_private.h>

Defines

#define NUM_BOOT_FILE   9
#define FILE_NUM_RAM_RTOS   0
#define FILE_NUM_RAM_SBC_0   1
#define FILE_NUM_RAM_SBC_1   2
#define FILE_NUM_EE0_RTOS   3
#define FILE_NUM_EE0_SBC_0   4
#define FILE_NUM_EE0_SBC_1   5
#define FILE_NUM_EE1_RTOS   6
#define FILE_NUM_EE1_SBC_0   7
#define FILE_NUM_EE1_SBC_1   8
#define RTOS_RAM_ADRS   0x00080000

Functions

static unsigned int LFS_bootDumpEntry (LFS_Control *ctl, int drv, unsigned int hdrOffset, unsigned int fileNum, unsigned int cpu, unsigned int xactId)
static unsigned int LFS_bootDumpRam (LFS_Control *ctl, unsigned int fileNum, unsigned int cpu, unsigned int xactId)
static unsigned int LFS_bootDumpRamSSR (LFS_Control *ctl, unsigned int fileNum, unsigned int cpu, unsigned int xactId)
unsigned int LFS_bootDumpFile (LFS_Control *ctl, unsigned int cpu, unsigned int fileNum, unsigned int xactId)
 Dump a TFFS boot partition file to the CTDB interface.
unsigned int LFS_bootDumpFileSSR (LFS_Control *ctl, unsigned int cpu, unsigned int fileNum, unsigned int xactId)
 Dump a TFFS boot partition file to the SSR interface.
unsigned int LFS_bootDumpDir (LFS_Control *ctl, unsigned int cpu, unsigned int xactId)
 Dump a TFFS boot directory.

Variables

static const int bootFileMap [NUM_BOOT_FILE]


Detailed Description

Routines to manuipulate boot files in the TFFS boot partition.

Author:
D.L. Wood

Define Documentation

#define FILE_NUM_EE0_RTOS   3

The file ID number of the lower bank RTOS boot file.

Referenced by LFS_bootDumpDir(), LFS_bootDumpFile(), and LFS_bootDumpFileSSR().

#define FILE_NUM_EE0_SBC_0   4

The file ID number of the lower bank SBC0 boot file.

Referenced by LFS_bootDumpDir(), LFS_bootDumpFile(), and LFS_bootDumpFileSSR().

#define FILE_NUM_EE0_SBC_1   5

The file ID number of the lower bank SBC1 boot file.

Referenced by LFS_bootDumpDir(), LFS_bootDumpFile(), and LFS_bootDumpFileSSR().

#define FILE_NUM_EE1_RTOS   6

The file ID number of the lower bank RTOS boot file.

Referenced by LFS_bootDumpDir(), LFS_bootDumpFile(), and LFS_bootDumpFileSSR().

#define FILE_NUM_EE1_SBC_0   7

The file ID number of the lower bank SBC0 boot file.

Referenced by LFS_bootDumpDir(), LFS_bootDumpFile(), and LFS_bootDumpFileSSR().

#define FILE_NUM_EE1_SBC_1   8

The file ID number of the lower bank SBC1 boot file.

Referenced by LFS_bootDumpDir(), LFS_bootDumpFile(), and LFS_bootDumpFileSSR().

#define FILE_NUM_RAM_RTOS   0

The file ID number of the RAM RTOS boot file.

Referenced by LFS_bootDumpRam(), and LFS_bootDumpRamSSR().

#define FILE_NUM_RAM_SBC_0   1

The file ID number of the RAM SBC0 boot file.

Referenced by LFS_bootDumpRam(), and LFS_bootDumpRamSSR().

#define FILE_NUM_RAM_SBC_1   2

The file ID number of the RAM SBC1 boot file.

Referenced by LFS_bootDumpRam(), and LFS_bootDumpRamSSR().

#define NUM_BOOT_FILE   9

The number of boot file designations.

Referenced by LFS_bootDumpFile(), and LFS_bootDumpFileSSR().

#define RTOS_RAM_ADRS   0x00080000

The address in RAM where the PBC stores an RTOS file upload.

Referenced by LFS_bootDumpRam(), and LFS_bootDumpRamSSR().


Function Documentation

unsigned int LFS_bootDumpDir ( LFS_Control ctl,
unsigned int  cpu,
unsigned int  xactId 
)

Dump a TFFS boot directory.

Dumps the contents of a boot partition. For each valid file found in a TFFS boot partition (and PBC RAM buffers for RAD750 targets), one LLFSDIRLIST telemetry packet is sent to the CTDB interface.

Parameters:
ctl LFS control structure.
cpu The LAT CPU unit number.
xactId The transaction ID.
Returns:
A LFS MSG code.

References _LFS_Control::bnk_buf, FILE_NUM_EE0_RTOS, FILE_NUM_EE0_SBC_0, FILE_NUM_EE0_SBC_1, FILE_NUM_EE1_RTOS, FILE_NUM_EE1_SBC_0, FILE_NUM_EE1_SBC_1, and LFS_bootDumpEntry().

Referenced by LFS_DirDump().

static unsigned int LFS_bootDumpEntry ( LFS_Control ctl,
int  drv,
unsigned int  hdrOffset,
unsigned int  fileNum,
unsigned int  cpu,
unsigned int  xactId 
) [static]

Dumps one directory entry in a boot partition, using one LLFSDIRLIST telemetry packet is sent to the CTDB interface.

Parameters:
ctl LFS control structure.
drv The TFFS drive number (0 or 1) of the file bank.
hdrOffset Bank header offset of file address.
fileNum The FILE number of the file to dump.
cpu The LAT CPU unit number.
xactId The transaction ID.
Returns:
A LFS MSG code.

References _LFS_FILESTFLAGS::bf, _LFS_DUMPSTFLAGS::bf, _LFS_Control::bnk_buf, _LFS_LLFSDIRLIST_Tlm::dmpFlags, _LFS_LLFSDIRLIST_Tlm::fileBlocks, _LFS_LLFSDIRLIST_Tlm::fileFlags, _LFS_LLFSDIRLIST_Tlm::fileHdr, _LFS_LLFSDIRLIST_Tlm::fileId, _LFS_LLFSDIRLIST_Tlm::fileSize, _LFS_LLFSDIRLIST_Tlm::fileTime, _LFS_Control::hdr_buf, _LFS_Control::itc_hdr_size, LFS_freeTelem(), LFS_LLFSDIRLIST_TLM_APID, _LFS_Control::node_id, _LFS_Control::telem_buf, _LFS_Control::telem_hdr_size, _LFS_Control::telem_pool, _LFS_Control::telem_sem, _LFS_FILESTID::ui, _LFS_FILESTFLAGS::us, and _LFS_DUMPSTFLAGS::us.

Referenced by LFS_bootDumpDir().

unsigned int LFS_bootDumpFile ( LFS_Control ctl,
unsigned int  cpu,
unsigned int  fileNum,
unsigned int  xactId 
)

Dump a TFFS boot partition file to the CTDB interface.

Dumps the contents of a boot partition file. If the file header for the file storage location is valid, a series of LLFSDUMPCTDB telemetry packets containing the file data is sent to the CTDB interface.

Parameters:
ctl LFS control structure.
cpu The LAT CPU unit number.
fileNum The boot file number.
xactId The transaction ID.
Returns:
A LFS MSG code.

References _LFS_DUMPSTFLAGS::bf, _LFS_Control::bnk_buf, bootFileMap, _LFS_Control::config, _LFS_LLFSDUMPCTDB_Tlm::dmpFlags, _LFS_LLFSDUMPCTDB_Tlm::dmpSize, FILE_NUM_EE0_RTOS, FILE_NUM_EE0_SBC_0, FILE_NUM_EE0_SBC_1, FILE_NUM_EE1_RTOS, FILE_NUM_EE1_SBC_0, FILE_NUM_EE1_SBC_1, _LFS_LLFSDUMPCTDB_Tlm::fileData, _LFS_LLFSDUMPCTDB_Tlm::fileId, _LFS_LLFSDUMPCTDB_Tlm::fileOffset, _LFS_Control::hdr_buf, _LFS_Control::itc_hdr_size, LFS_bootDumpRam(), LFS_FILE_DUMP_PARAM_SIZE, LFS_freeTelem(), LFS_LLFSDUMPCTDB_TLM_APID, _LFS_Control::node_id, NUM_BOOT_FILE, _LFS_Control::telem_buf, _LFS_Control::telem_hdr_size, _LFS_Control::telem_pool, _LFS_Control::telem_sem, _LFS_FILESTID::ui, and _LFS_DUMPSTFLAGS::us.

Referenced by LFS_FileDumpCTDB().

unsigned int LFS_bootDumpFileSSR ( LFS_Control ctl,
unsigned int  cpu,
unsigned int  fileNum,
unsigned int  xactId 
)

Dump a TFFS boot partition file to the SSR interface.

Dumps the contents of a boot partition file. If the file header for the file storage location is valid, a series of QLFS datagrams embedded in telemetry packets containing the file data is sent to the SSR interface.

Parameters:
ctl LFS control structure.
cpu The LAT CPU unit number.
fileNum The boot file number.
xactId The transaction ID.
Returns:
A LFS MSG code.

References _LFS_Control::bnk_buf, bootFileMap, _LFS_Control::config, FILE_NUM_EE0_RTOS, FILE_NUM_EE0_SBC_0, FILE_NUM_EE0_SBC_1, FILE_NUM_EE1_RTOS, FILE_NUM_EE1_SBC_0, FILE_NUM_EE1_SBC_1, _LFS_Control::hdr_buf, _LFS_Control::itc_hdr_size, LFS_apidMap(), LFS_bootDumpRamSSR(), LFS_freeTelemSSR(), _LFS_Control::node_id, NUM_BOOT_FILE, _LFS_Control::telem_buf, _LFS_Control::telem_hdr_size, _LFS_Control::telem_pool, and _LFS_Control::telem_sem.

Referenced by LFS_FileDumpSSR().

unsigned int LFS_bootDumpRam ( LFS_Control ctl,
unsigned int  cpu,
unsigned int  fileNum,
unsigned int  xactId 
) [static]

Dumps the contents of a boot partition RAM file. If the file header for the file storage location is valid, a series of LLFSDUMPCTDB telemetry packets containing the file data is sent to the CTDB interface.

Parameters:
ctl LFS control structure.
cpu The LAT CPU unit number.
fileNum The boot file number.
xactId The transaction ID.
Returns:
A LFS MSG code.

References _LFS_DUMPSTFLAGS::bf, _LFS_Control::config, _LFS_LLFSDUMPCTDB_Tlm::dmpFlags, _LFS_LLFSDUMPCTDB_Tlm::dmpSize, FILE_NUM_RAM_RTOS, FILE_NUM_RAM_SBC_0, FILE_NUM_RAM_SBC_1, _LFS_LLFSDUMPCTDB_Tlm::fileData, _LFS_LLFSDUMPCTDB_Tlm::fileId, _LFS_LLFSDUMPCTDB_Tlm::fileOffset, _LFS_Control::hdr_buf, _LFS_Control::itc_hdr_size, LFS_FILE_DUMP_PARAM_SIZE, LFS_freeTelem(), LFS_LLFSDUMPCTDB_TLM_APID, _LFS_Control::node_id, RTOS_RAM_ADRS, _LFS_Control::telem_buf, _LFS_Control::telem_hdr_size, _LFS_Control::telem_pool, _LFS_Control::telem_sem, _LFS_FILESTID::ui, and _LFS_DUMPSTFLAGS::us.

Referenced by LFS_bootDumpFile().

unsigned int LFS_bootDumpRamSSR ( LFS_Control ctl,
unsigned int  cpu,
unsigned int  fileNum,
unsigned int  xactId 
) [static]

Dumps the contents of a boot partition RAM file. If the file header for the file storage location is valid, a series of QLFS datagrams embedded in telemetry packets containing the file data is sent to the SSR interface.

Parameters:
ctl LFS control structure.
cpu The LAT CPU unit number.
fileNum The boot file number.
xactId The transaction ID.
Returns:
A LFS MSG code.

References _LFS_Control::config, FILE_NUM_RAM_RTOS, FILE_NUM_RAM_SBC_0, FILE_NUM_RAM_SBC_1, _LFS_Control::hdr_buf, _LFS_Control::itc_hdr_size, LFS_apidMap(), LFS_freeTelemSSR(), RTOS_RAM_ADRS, _LFS_Control::telem_buf, _LFS_Control::telem_hdr_size, and _LFS_Control::telem_sem.

Referenced by LFS_bootDumpFileSSR().


Variable Documentation

bootFileMap [static]

Initial value:

 
{
        -1, -1, -1, 0, 0, 0, 1, 1, 1
}
An array mapping boot file numbers to TFFS driver numbers.

Referenced by LFS_bootDumpFile(), and LFS_bootDumpFileSSR().


Generated on Wed Nov 21 21:50:00 2012 by  doxygen 1.5.8