GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LCM / dev > lcm_epu / linux-gcc


Interface   Data Structures   File List   Data Fields   Globals  

LCM_prvdefs.h File Reference

Private definitions for the LCM package. More...

#include <IMM/FPM_pubdefs.h>
#include <IMM/RBM_pubdefs.h>
#include <ITC/ITC_pubdefs.h>
#include <LCM_DB/LCM_DB_schema.h>
#include <PBS/FORK.h>
#include <PBS/MTX.h>
#include <PBS/RW.h>
#include <PBS/SEM.h>
#include <PBS/WUT.h>
#include <PBS/WCT.h>
#include <LCM/LCM_cmddefs.h>

Classes

struct  _CPUStatus
struct  _LCM_ScrubStatus
 Status of the memory scrubbing machine. More...
struct  _LCM_ConfigPID_bf
 Structure to capture PID bits (only on rad750). More...
union  _LCM_ConfigPID
 Union of representations of PID bits. More...
struct  _LCM_ConfigTHS_bf
 Structure to capture THS simulation status bits. More...
union  _LCM_ConfigTHS
 Union of representations of THS simulation bits. More...
struct  _LCM_FileStatus
 Status of the file upload state machine. More...
struct  _LCM_MemoryStatus
 Status of the memory load/dump state machines. More...
struct  _LCM_Record
 Structure to put a standard header on CPU to CPU records. More...
struct  _LCM_Packet
 An anonymous housekeeping packet (nearly). More...
struct  _LHK_LpaCfgSiu_Tlm
 A single capture packet for an LPA (filter) configuration record. More...
struct  _LCM_Database
 Database in which to prepare housekeeping packets. More...
struct  _LCM_Tickle
 A wake-up message for capturing assorted CPU records/packets. More...
struct  _LCM_ScrubSuromSegment
 Memory error statistics for a SUROM memory segment. More...
struct  _LCM_ImageHeader
 Structure to save telemetry meta-information on limit table dumps. More...
struct  _LCM_ImageModule
 Structure to save telemetry meta-information on limit table dumps. More...
struct  _LCM_ImageTask
 Structure to save telemetry meta-information on limit table dumps. More...
struct  _LCM_ImageControl
 Structure to hold the LCM image control block. More...
struct  _LCM_TurboControl
 Structure to synchronize a turbo reset. More...
struct  _LCM_HouseControl
 Structure to handle CPU housekeeping. More...
struct  _LCM_Control
 Structure to hold the LCM control block. More...

Defines

#define LCM_HW_CONFIG_CMD_APID   (0x694)
#define LCM_SW_CONFIG_CMD_APID   (0x695)
#define LCM_TASK_LIST_SIZE   (64)
#define LCM_MSG_SSR_TEXT_SIZE   (2048)
#define LCM_SCRUB_INITIAL_PERIOD   (5)
#define LCM_TELEM_PKT_SIZE   (512)
#define LCM_TURBO_FRAME   (0xd8eddeed)
#define LCM_L_IMAGE_MODULE   (0x100)
#define LCM_L_IMAGE_TASK   (0x40)
#define LCM_L_IMAGE_STRING   (0x4000)
#define LCM_L_IMAGE_TELEM   (0x8000)
#define LCM_LSF_DGM_TYP_IMAGE   (0)
#define LCM_LSF_DGM_VER_IMAGE   (0)
#define LCM_L_RECORD_TYPES   (3)
 Number of records types.

Typedefs

typedef enum _LCM_DumpRequestSource LCM_DumpRequestSource
 Typedef for enum _LCM_DumpRequestSource.
typedef enum _LCM_ControlState LCM_ControlState
 Typedef for enum _LCM_ControlState.
typedef enum _LCM_RecordType LCM_RecordType
 Typedef for enum _LCM_RecordType.
typedef struct _CPUStatus LCM_CPUStatus
 Typedef for telemetry structure _LCM_CPUStatus.
typedef struct _LCM_ScrubStatus LCM_ScrubStatus
 Typedef for telemetry structure _LCM_ScrubStatus.
typedef struct _LCM_ConfigPID_bf LCM_ConfigPID_bf
 Typedef for struct _LCM_ConfigPID_bf.
typedef union _LCM_ConfigPID LCM_ConfigPID
 Typedef for union _LCM_ConfigPID.
typedef struct _LCM_ConfigTHS_bf LCM_ConfigTHS_bf
 Typedef for struct _LCM_ConfigTHS_bf.
typedef union _LCM_ConfigTHS LCM_ConfigTHS
 Typedef for union _LCM_ConfigTHS.
typedef struct _LCM_FileStatus LCM_FileStatus
 Typedef for telemetry structure _LCM_FileStatus.
typedef struct _LCM_MemoryStatus LCM_MemoryStatus
 Typedef for telemetry structure _LCM_MemoryStatus.
typedef struct _LCM_Record LCM_Record
 Typedef for struct _LCM_Record.
typedef struct _LCM_Packet LCM_Packet
 Typedef for struct _LCM_Packet.
typedef struct _LHK_LpaCfgSiu_Tlm LHK_LpaCfgSiu_Tlm
 Typedef for struct _LHK_LpaCfgSiu_Tlm.
typedef struct _LCM_Database LCM_Database
 Typedef for struct _LCM_Database.
typedef struct _LCM_Tickle LCM_Tickle
 Typedef for struct _LCM_Tickle.
typedef struct
_LCM_ScrubSuromSegment 
LCM_ScrubSuromSegment
 Typedef for telemetry structure _LCM_ScrubSuromSegment.
typedef struct _LCM_ImageHeader LCM_ImageHeader
 Typedef for struct _LCM_ImageHeader.
typedef struct _LCM_ImageModule LCM_ImageModule
 Typedef for struct _LCM_ImageModule.
typedef struct _LCM_ImageTask LCM_ImageTask
 Typedef for struct _LCM_ImageTask.
typedef struct _LCM_ImageControl LCM_ImageControl
 Typedef for struct _LCM_ImageControl.
typedef struct _LCM_TurboControl LCM_TurboControl
 Typedef for struct _LCM_TurboControl.
typedef struct _LCM_HouseControl LCM_HouseControl
 Typedef for struct _LCM_TurboControl.
typedef struct _LCM_Control LCM_Control
 Typedef for struct _LCM_Control.

Enumerations

enum  _LCM_DumpRequestSource {
  LCM_K_SRC_COMMAND = 0,
  LCM_K_SRC_INTERNAL = 1
}
 Enumeration of hardware moitoring facility states. More...
enum  _LCM_ControlState {
  LCM_CTL_UNKNOWN = -1,
  LCM_CTL_UNINITIALIZED = 0,
  LCM_CTL_PARTIAL = 1,
  LCM_CTL_INITIALIZED = 2,
  LCM_CTL_STARTING = 3,
  LCM_CTL_RUNNING = 4,
  LCM_CTL_STOPPING = 5,
  LCM_CTL_BROKEN = 6
}
 Enumeration of LCM control states. More...
enum  _LCM_RecordType {
  LCM_HSK_RECORD_CPU = 0,
  LCM_HSK_RECORD_ITC = 1,
  LCM_HSK_RECORD_LPA = 2
}
 Enumeration of housekeeping record types. More...

Functions

unsigned int LCM_CmdResponse_common (void *prm, const ITC_QueueItem *qitem, void *pay, unsigned int len)
unsigned int LCM_CpuReset_common (void *prm, const ITC_QueueItem *qitem, void *pay, unsigned int len)
void LCM_freeTelem (ITC_QueueItem *qitem, unsigned int status, LCM_Control *ctl, void *prm1, void *prm2)
 Free memory after sending ITC telemetry packets.
unsigned int LCM_houseInitialize (LCM_Control *ctl)
 Initialize the housekeeping function (common to all CPUs).
unsigned int LCM_houseInitializeSIU (LCM_Control *ctl)
unsigned int LCM_houseSendCPU (unsigned int report)
 Acquire and send CPU metric information.
unsigned int LCM_houseSendITC (unsigned int report)
 Acquire and send ITC configuration information.
unsigned int LCM_houseSendLPA (unsigned int report)
 Acquire and send LPA (filter) configuration information.
unsigned int LCM_houseTaskInitialize (LCM_Control *ctl)
 One-time call in LCM task context to start housekeeping sub-function.
unsigned int LCM_imageInitialize (LCM_Control *ctl)
 Initialize the LCM module/task image dump subsystem (all CPUs).
unsigned int LCM_imageInitializeEPU (LCM_Control *ctl)
 Initialize the LCM module/task image dump subsystem (EPU specific).
unsigned int LCM_imageInitializeSIU (LCM_Control *ctl)
unsigned int LCM_messageInitialize (LCM_Control *ctl)
 Initialize the LCM message handling subsystem.
unsigned int LCM_messageInitializeEPU (LCM_Control *ctl)
 Initialize the LCM message handling subsystem (EPU specific).
unsigned int LCM_messageInitializeSIU (LCM_Control *ctl)
unsigned int LCM_MsgOutCfg_common (void *prm, const ITC_QueueItem *qitem, void *pay, unsigned int len)
unsigned int LCM_MsgResponse_common (void *prm, const ITC_QueueItem *qitem, void *pay, unsigned int len)
unsigned int LCM_Noop_common (void *prm, const ITC_QueueItem *qitem, void *pay, unsigned int len)
unsigned int LCM_resetCPU (LCM_Control *ctl, LCM_LCMPRIMARY pbf, LCM_LCMSECONDARY sbf)
unsigned int LCM_scrubInitialize (LCM_Control *ctl)
 Initialize the LCM memory scrubbing subsystem.
void LCM_scrubMemAuto (LCM_Control *ctl)
 Architecture specific implementation of LLCMSCRUBRUN command.
unsigned int LCM_scrubTaskInitialize (LCM_Control *ctl)
 One-time call in LCM task context to start the scrub sub-function.
WUT_cb_status LCM_scrubTimer (LCM_Control *ctl, WUT_tmr *timer)
 Callback for the memory scrub timer.
unsigned int LCM_SMONInitialize (LCM_Control *ctl)
 Initialize the LCM SMON subsystem.
unsigned int LCM_SMONTaskInitialize (LCM_Control *ctl)
 One-time call in LCM task context to start SMON sub-function.
unsigned int LCM_Stats_common (void *prm, const ITC_QueueItem *qitem, void *pay, unsigned int len)
unsigned int LCM_taskInitialize (LCM_Control *ctl)
 Initialize the LCM task (elements common to all CPUs).
unsigned int LCM_taskTaskInitialize (LCM_Control *ctl)
 One-time call in LCM task context to start the task.
void LCM_turboApplication (unsigned int cpu, unsigned int rst)
unsigned int LCM_turboInitializeSIU (LCM_Control *ctl)
void LCM_turboPrimary (unsigned int cpu)
 Use EPU primary boot telemetry in turbo reset synchronization.

Variables

LCM_ControlLCM_lcb
 Control block for LCM facility.


Detailed Description

Private definitions for the LCM package.

CVS $Id: LCM_prvdefs.h,v 1.32 2011/03/29 21:59:34 apw Exp $
Author:
A.P.Waite

Define Documentation

#define LCM_MSG_SSR_TEXT_SIZE   (2048)

The maximum size in bytes of a SSR MSG output text string.

Referenced by LCM_messageInitialize(), and LCM_msgOutputSSR().

#define LCM_SCRUB_INITIAL_PERIOD   (5)

The initial period in minutes for the RAD750 memory scrubber.

Referenced by LCM_scrubTaskInitialize().

#define LCM_TASK_LIST_SIZE   (64)

The number of task ID's allowed for LLCMTASKDUMP telecommand.


Enumeration Type Documentation

Enumeration of LCM control states.

Enumerator:
LCM_CTL_UNKNOWN  Unknown (guard value)
LCM_CTL_UNINITIALIZED  Uninitialized
LCM_CTL_PARTIAL  Partially initialized
LCM_CTL_INITIALIZED  Initialized
LCM_CTL_STARTING  Starting
LCM_CTL_RUNNING  Successfully started
LCM_CTL_STOPPING  Stopping
LCM_CTL_BROKEN  Fatal error

Enumeration of hardware moitoring facility states.

Enumerator:
LCM_K_SRC_COMMAND  Dump initiated by command
LCM_K_SRC_INTERNAL  Dump initiated internally

Enumeration of housekeeping record types.

Enumerator:
LCM_HSK_RECORD_CPU  A CPU metrics record
LCM_HSK_RECORD_ITC  An ITC configuration record
LCM_HSK_RECORD_LPA  An ITC configuration record


Function Documentation

void LCM_freeTelem ( ITC_QueueItem *  qitem,
unsigned int  status,
LCM_Control ctl,
void *  prm1,
void *  prm2 
)

Free memory after sending ITC telemetry packets.

Parameters:
qitem (in) The memory buffer.
status (in) Status of telemetry.
ctl (in) LCM control structure.
prm1 (in) Completion callback parameter 1.
prm2 (in) Completion callback parameter 2.

References _LCM_Control::config, _LCM_Control::image, LCM_telemDelay(), _LCM_ImageControl::telem_sem, and _LCM_ImageControl::telem_timer.

Referenced by LCM_ModuleDump().

unsigned int LCM_houseInitialize ( LCM_Control ctl  ) 

Initialize the housekeeping function (common to all CPUs).

Parameters:
ctl (in) LCM control block
LCM_houseInitialize() builds up the CPU common elements for providing housekeeping information.

References _LCM_Tickle::delta, _LCM_Tickle::fpa, _LCM_Control::house, _LCM_Control::itc, _LCM_Control::itc_hdr_size, LCM_HSK_RECORD_CPU, LCM_L_RECORD_TYPES, LCM_PIDCONFIG, _LCM_HouseControl::ptux, _LCM_HouseControl::timx, _LCM_HouseControl::tkl, and _LCM_Tickle::tmr.

Referenced by LCM_initialize().

unsigned int LCM_houseSendCPU ( unsigned int  report  ) 

unsigned int LCM_houseSendITC ( unsigned int  report  ) 

Acquire and send ITC configuration information.

Parameters:
report (in) Force a diagnostic packet on the SIU
LCM_houseSendITC() does an immediate acquisition and send of ITC configuration information to the SIU.

References _LCM_Tickle::fpa, fpa_free_cb(), _LCM_Control::house, LCM_HSK_RECORD_ITC, LCM_lcb, _LCM_Control::msg_level_ctdb, _LCM_Control::msg_level_ssr, _LCM_Record::node, _LCM_Control::node_id, _LCM_Record::report, _LCM_Tickle::seq, _LCM_Record::seq, _LCM_HouseControl::tkl, and _LCM_Record::type.

Referenced by forkTickle().

unsigned int LCM_houseSendLPA ( unsigned int  report  ) 

Acquire and send LPA (filter) configuration information.

Parameters:
report (in) Force a diagnostic packet on the SIU
LCM_houseSendLPA() does an immediate acquisition and send of LPA (filter) configuration information to the SIU.

References _LCM_Tickle::fpa, fpa_free_cb(), _LHK_LpaCfgSiu_Tlm::hdr, _LCM_Control::house, LCM_HSK_RECORD_LPA, LCM_lcb, _LCM_Record::node, _LCM_Control::node_id, _LCM_Record::report, _LCM_Tickle::seq, _LCM_Record::seq, _LCM_HouseControl::tkl, and _LCM_Record::type.

Referenced by forkTickle().

unsigned int LCM_houseTaskInitialize ( LCM_Control ctl  ) 

One-time call in LCM task context to start housekeeping sub-function.

Parameters:
ctl (in) LCM control block
LCM_houseTaskInitialize() performs any initialization required by the house- keeping subfunction which must be performed in the context of the LCM task.

References expireTickle(), _LCM_Control::house, LCM_L_RECORD_TYPES, _LCM_Tickle::sav, _LCM_HouseControl::tkl, and _LCM_Tickle::tmr.

Referenced by taskStartOnce().

unsigned int LCM_imageInitialize ( LCM_Control ctl  ) 

Initialize the LCM module/task image dump subsystem (all CPUs).

Parameters:
ctl (in) LCM control block
LCM_imageInitialize() builds up the dump module and task dump facilities common to all CPUs.

References _LCM_Control::image, _LCM_ImageControl::itlm, _LCM_ImageControl::lock, _LCM_ImageControl::mtbl, _LCM_ImageControl::once, _LCM_ImageControl::scur, _LCM_ImageControl::stbl, and _LCM_ImageControl::ttbl.

Referenced by LCM_initialize().

unsigned int LCM_imageInitializeEPU ( LCM_Control ctl  ) 

Initialize the LCM module/task image dump subsystem (EPU specific).

Parameters:
ctl (in) LCM control block
LCM_imageInitializeEPU() builds up the EPU specific facilities to dump module and task decriptions.

References _LCM_Control::image, _LCM_ImageControl::telem_buf, _LCM_ImageControl::telem_sem, and _LCM_ImageControl::telem_timer.

Referenced by LCM_initializeEPU().

unsigned int LCM_messageInitialize ( LCM_Control ctl  ) 

Initialize the LCM message handling subsystem.

Parameters:
ctl (in) LCM control block
LCM_messageInitialize() builds up the CPU common facilities for sending messages to CTDB/SSR.

References _LCM_Control::config, _LCM_Control::itc_hdr_size, LCM_LCMMSGLEVEL_MSGLVLDISABLE, LCM_LCMMSGLEVEL_MSGLVLINFO, LCM_MSG_SSR_TEXT_SIZE, _LCM_Control::msg_buf, _LCM_Control::msg_level_ctdb, _LCM_Control::msg_level_ssr, _LCM_Control::msg_sem, and _LCM_Control::telem_hdr_size.

Referenced by LCM_initialize().

unsigned int LCM_messageInitializeEPU ( LCM_Control ctl  ) 

Initialize the LCM message handling subsystem (EPU specific).

Parameters:
ctl (in) LCM control block
LCM_messageInitializeEPU() builds up the EPU specific facilities for sending messages to CTDB/SSR.

References _LCM_Control::msg_timer.

Referenced by LCM_initializeEPU().

unsigned int LCM_scrubInitialize ( LCM_Control ctl  ) 

Initialize the LCM memory scrubbing subsystem.

Parameters:
ctl (in) LCM control block
Return values:
LCM_ALOCFAIL Memory allocation failed
LCM_FPAINIT FPA initialization failed
LCM_SCRTIMFL Timer allocation failed
LCM_SUCCESS Success
LCM_scrubInitialize() builds up the CPU common facilities to run the memory scrubber and handle memory/PCI exceptions.

References LCM_L_MEMERR_PKT, LCM_L_PCIERR_PKT, LCM_LCMERRLEVEL_LCMLEVDIA, _LCM_Control::mem, _LCM_Control::memc_err_count, memPacketInit(), _LCM_Control::memu_err_count, _LCM_Control::pci, _LCM_Control::pci_err_count, _LCM_Control::pci_err_level, pciPacketInit(), and _LCM_Control::scrub_timer.

Referenced by LCM_initialize().

void LCM_scrubMemAuto ( LCM_Control ctl  ) 

Architecture specific implementation of LLCMSCRUBRUN command.

LCM_scrubMemAuto() implements the LLCMSCRUBRUN command for non-rad750.

References _LCM_Control::scrub_end, and _LCM_Control::scrub_start.

Referenced by LCM_ScrubRun(), LCM_scrubTaskInitialize(), and LCM_scrubTimer().

unsigned int LCM_scrubTaskInitialize ( LCM_Control ctl  ) 

One-time call in LCM task context to start the scrub sub-function.

Parameters:
ctl (in) LCM control block
LCM_scrubTaskInitialize() is run once only in the LCM task context to do any final initialization required by the scrub/exception handling subfunction. For all architectures except rad750, scrubbing is not available. Nevetheless, try for some fidelity with the scrub timer logic.

References LCM_SCRUB_INITIAL_PERIOD, LCM_scrubMemAuto(), LCM_scrubTimer(), _LCM_Control::scrub_period, and _LCM_Control::scrub_timer.

Referenced by taskStartOnce().

WUT_cb_status LCM_scrubTimer ( LCM_Control ctl,
WUT_tmr *  timer 
)

Callback for the memory scrub timer.

Parameters:
ctl (in) LCM control block
timer (in) WUT timer
Returns:
WUT_K_STATE_CHANGE_YES

References LCM_scrubMemAuto(), and _LCM_Control::scrub_period.

Referenced by LCM_ScrubCfg(), and LCM_scrubTaskInitialize().

unsigned int LCM_SMONInitialize ( LCM_Control ctl  ) 

Initialize the LCM SMON subsystem.

Parameters:
ctl (in) LCM control block
LCM_SMONInitialize() initialized the CPU common SMON subsystem.

References _LCM_Control::config, SMON_init(), and _LCM_Control::version.

Referenced by LCM_initialize().

unsigned int LCM_SMONTaskInitialize ( LCM_Control ctl  ) 

One-time call in LCM task context to start SMON sub-function.

Parameters:
ctl (in) LCM control block
LCM_SMONTaskInitialize() starts up the SMON task

References SMON_start().

Referenced by taskStartOnce().

unsigned int LCM_taskInitialize ( LCM_Control ctl  ) 

Initialize the LCM task (elements common to all CPUs).

Parameters:
ctl (in) LCM control block
LCM_taskInitialize() builds up the CPU common elements of the LCM task.

References _LCM_Control::config, _LCM_Control::itc, LCM_Apid694, LCM_Apid695, LCM_Apid696, _LCM_Control::pcb, and _LCM_Control::rcb.

Referenced by LCM_initialize().

unsigned int LCM_taskTaskInitialize ( LCM_Control ctl  ) 

One-time call in LCM task context to start the task.

Parameters:
ctl (in) LCM control block
LCM_taskTaskInitialize() performs any initialization required by the LCM task, and which must be executed in LCM task context.

References _LCM_Control::fqi.

Referenced by taskStartOnce().

void LCM_turboPrimary ( unsigned int  cpu  ) 

Use EPU primary boot telemetry in turbo reset synchronization.

Parameters:
cpu (in) CPU (ITC node)
Warning:
Turbo reset is not supported on unix targets
LCM_turboPrimary() is a special entry point to allow primary boot telemetry activities to participate in turbo reset synchronization. EPU primary boot telemetry is handled by code in package PBC, but that code executes in the context of the LCM task.


Generated on Wed Mar 30 16:02:49 2011 by  doxygen 1.5.8