GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > PBC / V4-9-0
Constituent: pbc_bootshell     Tag: rad750
#include <vxWorks.h>
#include "BootDiagnostics.h"
#include "EE_boot.h"
#include "pbc_memmap.h"
#include "MEM/MEM_dump.h"
#include "MEM/MEM_load.h"
Include dependency graph for bootshell.h:
This graph shows which files directly or indirectly include this file:
Data Structures | |
struct | _Pbc_UplinkCountSet |
A set of uplink counts. More... | |
struct | _Pbc_UplinkStatus |
Uplink status. More... | |
struct | _Pbc_GlobalStateData |
Global state information for PBC. More... | |
Defines | |
#define | GLOBAL extern |
Global allocation symbol. | |
#define | INITIAL(initializer) |
Global symbol initializer. | |
#define | PBC_CMD_DELAY_MSEC (10) |
Inter-command delay in milliseconds. | |
#define | PBC_CMD_DELAY_USEC (1000 * PBC_CMD_DELAY_MSEC) |
Inter-command delay in microseconds. | |
#define | PBC_CMD_DELAY_NSEC (1000 * PBC_CMD_DELAY_USEC) |
Inter-command delay in nanoseconds. | |
#define | PBC_AUTOBOOT_MIN (10) |
Initial delay before autoboot, in minutes. | |
#define | PBC_AUTOBOOT_SEC (60 * PBC_AUTOBOOT_MIN) |
Initial delay before autoboot, in seconds. | |
#define | PBC_AUTOBOOT_MSEC (1000 * PBC_AUTOBOOT_SEC) |
Initial delay before autoboot, in milliseconds. | |
#define | PBC_AUTOBOOT_NSEC ((unsigned long long)1000000 * (unsigned long long)PBC_AUTOBOOT_MSEC) |
Initial delay before autoboot, in nanoseconds. | |
#define | PBC_WATCHDOG_LOOP_SECONDS (600) |
Command loop watchdog timer value. | |
#define | PBC_WATCHDOG_SBC_SECONDS (600) |
Secondary boot watchdog timer value. | |
#define | Pbc_MODULE_PAD |
Module trailing padding. | |
#define | Pbc_MODULE_PAD_14 |
Module trailing padding (2^14 boundary). | |
Typedefs | |
typedef _Pbc_UplinkCountSet | Pbc_UplinkCountSet |
typedef _Pbc_UplinkStatus | Pbc_UplinkStatus |
typedef _Pbc_GlobalStateData | Pbc_GlobalStateData |
Functions | |
unsigned int | Pbc_ProcessScBroadcast (const unsigned short apid, const unsigned short funcCode, const void *scBroadcast, const unsigned int pktSize) |
Process spacecraft broadcast telecommand. | |
unsigned int | Pbc_ProcessLatBoot (const unsigned short apid, const unsigned short funcCode, const void *latBoot, const unsigned int pktSize) |
Process LAT boot telecommands. | |
unsigned int | Pbc_ProcessFileLoad (const unsigned short apid, const unsigned short funcCode, const void *fileLoad, const unsigned int pktSize) |
Process LAT file load telecommands. | |
void | Pbc_InitFileLoad () |
Initialize file upload command handling. | |
void | Pbc_GetFileLoadTlm (unsigned short *fileUploadState, unsigned short *fileUploadPktCnt, unsigned long *fileUploadError) |
Get file load telemetry. | |
void | Pbc_ResetFileLoad () |
Reset FILE upload state machine. | |
unsigned int | Pbc_MemLoadService (void) |
Service the Memory Load operation. | |
unsigned int | Pbc_ProcessMemLoad (const void *memLoad, const unsigned int pktSize) |
Process Memory Write commands. | |
unsigned int | Pbc_ProcessPciLoad (const void *pciLoad, const unsigned int pktSize) |
Process Memory PCI Device Header Write commands. | |
unsigned int | Pbc_ProcessRegLoad (const void *regLoad, const unsigned int pktSize) |
Process Memory Processor Register Write commands. | |
unsigned int | Pbc_ProcessMemDump (const unsigned short funcCode, const void *memDump, const unsigned int pktSize) |
Process LAT MEMORY DUMP telecommands. | |
unsigned int | Pbc_TlmCreateHkp (unsigned short seqCount, void *pkt_p, unsigned int *size_p, size_t pktSize) |
Create boot housekeeping telemetry packet. | |
void | PBC_reboot (unsigned int cause, unsigned int pri_boot_flags) |
Warm reboot the RAD750. | |
int | PBC_init_ram (unsigned int start_addr, unsigned int num_bytes) |
Use the PPCI hardware to initialize a region of RAM to 0. | |
void | PBC_icache_disable (void) |
Disable the instruction cache. | |
int | pciBusInit (void) |
Initialized PCI bus for PBC. | |
int | Pbc_ExecuteSecondary (const int rtosArg, const unsigned long sbcFlags) |
Load, possibly inflate and execute secondary boot code. | |
void | Pbc_TimeInit () |
Init boot time. | |
void | Pbc_TimeGet (unsigned long *seconds, unsigned long *subSeconds) |
Get boot time. | |
void | Pbc_TimeSetSeconds (unsigned long seconds) |
Set boot time seconds. | |
void | Pbc_ResetWatchdog (unsigned long seconds) |
Set watchdog timer. | |
void | Pbc_CommitInit () |
Initialize commit state machine. | |
void | Pbc_CommitConfigureData (const unsigned long source, const unsigned long dest, const size_t bytes) |
Configure commit request for memory block. | |
unsigned int | Pbc_CommitConfigureFile (const unsigned long source, const size_t bytes, const unsigned int fileId) |
Configure commit request for a file upload. | |
void | Pbc_CommitDone (const unsigned long newBootMode) |
Copy next chunk of data. | |
void | Pbc_CommitService () |
Service commit state machine. | |
void | Pbc_ErrorLogInit () |
Initialize PBC error log. | |
void | Pbc_ErrorLogPop () |
Pop oldest entry from the error ring. | |
void | Pbc_ErrorLogStats (unsigned int *totalCount, unsigned int *ringCount, unsigned int *queuedCode, unsigned int *lastCode) |
Get state of PBC error log. | |
void | Pbc_ErrCheck (void) |
Check for errors reported in PPCI registers. | |
Variables | |
GLOBAL Pbc_GlobalStateData | Pbc_globalState |
volatile BOOT_Diagnostics * | Pbc_diagsPtr = (volatile BOOT_Diagnostics *)MEMMAP_BOOT_DIAGS_ADDR |
unsigned long | Pbc_RamExcStart |
unsigned long | Pbc_RamExcEnd |
Top-level header for boot shell. Contains boot functions defs and prototypes.
Revision 1.28 2005/03/03 22:31:12 dmay move build info to excVector.S
Revision 1.27 2005/01/26 17:31:37 dmay support EE driver changes
Revision 1.26 2005/01/10 22:39:48 dmay add PBC_icache_disable prototype
Revision 1.25 2004/12/30 20:05:30 dmay add Pbc_buildInfo and Pbc_buildSrc; add info about PBC_reboot and PBC_init_ram
Revision 1.24 2004/12/08 18:19:46 dmay remove apid from Pbc_ProcessMemDump()
Revision 1.23 2004/12/07 14:26:34 dmay add Pbc_ProcessMemLoad, Pbc_ProcessPciLoad, and Pbc_ProcessRegLoad
Revision 1.22 2004/10/29 19:58:13 dmay fix doxygen tag error
Revision 1.21 2004/10/29 19:38:04 dmay add Pbc_MODULE_PAD_14
Revision 1.20 2004/10/15 16:18:05 dmay add PBC_init_ram()
Revision 1.19 2004/09/23 21:11:20 dmay add PBC_reboot; remove comm functions
Revision 1.18 2004/09/09 19:33:07 dmay use pbc_memmap.h
Revision 1.17 2004/07/26 14:06:11 dmay merge MEM load and MEM dump APIDs and function codes; add software memory scrubber; add memmap table entries for SIB registers and RAM
Revision 1.16 2004/07/20 14:10:51 dmay Add more function prototypes; add eeLoadBank
Revision 1.15 2004/06/29 13:20:40 dmay accomodate MEM dump interface changes
Revision 1.14 2004/06/17 19:31:57 dmay add Memory Load context handle to global state
Revision 1.13 2004/04/19 20:14:14 dmay Removed a redundant doxygen description of struct _Pbc_CommHandle
Revision 1.12 2004/04/06 12:22:50 ray add last command telemetry
Revision 1.11 2004/03/19 15:33:43 ray added file load reset after commit
Revision 1.10 2004/03/18 15:24:29 ray completed implementation of EEPROM commit
Revision 1.9 2004/03/11 13:33:06 ray added dumpActive to global state, added commit and file upload
Revision 1.8 2004/03/09 13:33:43 ray added PBC watchdog configuration
Revision 1.7 2004/02/23 19:41:57 ray fix doxygen constructs
Revision 1.6 2004/02/23 15:52:05 ray added background memory dump
Revision 1.5 2004/01/29 20:24:26 ray moved error logging features, first full implementation of PBC command/telemetry, change in Pbc_ExecuteSecondary() interface
Revision 1.4 2003/12/11 16:31:00 ray header re-org, document bootshell.h
Revision 1.3 2003/12/10 15:18:15 ray Further development: added command and telemetry interface, exception vectors, boot timing initial timeout state, module pad
Revision 1.2 2003/11/14 13:37:24 ray addition of interfaces from secondary.c and sysLib.c
Revision 1.1.1.1 2003/08/04 19:19:40 ray Create package PBC
|
Global allocation symbol. Allows for single point of allocation and definition of global variables. If ALLOC_GLOBALS is defined, GLOBAL will be noop-ed, causing allocation to occur. Otherwise, GLOBAL evaluates to "extern", causing a reference to be defined. One and only one module must define ALLOC_GLOBALS before including this header file. For PBC, that file is bootshell.c. |
|
Global symbol initializer. Allows for single point of initialization of global variables. See GLOBAL for more information. |
|
Initial delay before autoboot, in minutes. Define how long the PBC waits in the timeout state before autoboot. In minutes. |
|
Initial delay before autoboot, in milliseconds. See PBC_AUTOBOOT_MIN. |
|
Initial delay before autoboot, in nanoseconds. See PBC_AUTOBOOT_MIN. |
|
Initial delay before autoboot, in seconds. See PBC_AUTOBOOT_MIN. |
|
Inter-command delay in milliseconds. How long to delay between commands. The minimum inter-command delay is 20 msec, we will over sample by 2 to check commands. |
|
Inter-command delay in nanoseconds. See PBC_CMD_DELAY_MSEC. |
|
Inter-command delay in microseconds. See PBC_CMD_DELAY_MSEC. |
|
Module trailing padding. Pad out the end of the file. This is a convenient for debug because it results in quicker loads. The theory is that is a developer can change a little code in a module, and not force a reload of all of the SUROM, since the new code only eats up the pad. The pad byte of 0x4b will generate an instruction that is likely to cause an exception (bla 0xff4b4b48) for safety reasons. Only used in DEBUG mode. Noop-ed out otherwise. |
|
Command loop watchdog timer value. This defines the watchdog timer value that is set each time through the PBC command and telemetry loop. |
|
Secondary boot watchdog timer value. This defines the watchdog timer value that is set before executing the secondary boot. |
|
Typedef for struct _Pbc_GlobalStateData |
|
Typedef for struct _Pbc_UplinkCountSet |
|
Typedef for struct _Pbc_UplinkStatus |
|
Configure commit request for memory block. Configure commit state machine to copy a specified data to RAM or EEPROM. Takes source address, destination address and size arguments. Puts the commit state machine in the active state.
|
|
Configure commit request for a file upload. Configure commit state machine to copy a specified file to RAM or EEPROM. Takes source address, file id and size arguments. Puts the commit state machine in the active state. A destination address is calculated from the fileId.
|
|
Copy next chunk of data. Cleanup state machine and PBC state when commit is done. Commit state machine is reset and we go back into boot command mode. It is assumed that we're in the PBC_SW_MODE_COMMIT mode when this function is called.
|
|
Initialize commit state machine. Set internal commit data to idle state and reset members of commit context.
|
|
Service commit state machine. Perform periodic processing of commit state machine. Should be called at all times, even when commit is not active. Sorry, no parameters - all data is in global pbc_commitData structure.
|
|
Check for errors reported in PPCI registers. Checks error registers within the PPCI bridge chip and reports any pending errors.
|
|
Initialize PBC error log. Initialize error long structure. All counters cleared. Ring buffer is reset. Last error is erased. |
|
Pop oldest entry from the error ring. Pop oldest entry from the error ring. The "first" pointer is moved forward by one error entry. This routine has no effect if the error log is empty. |
|
Get state of PBC error log. Return information about the error log. Returns both error counts (total errors & number of errors in the ring). Also returns the oldest and lastest error codes. The return contents of lastCode will only be valid if totalCount is non-zero. The return contents of firstCode will only be valid if ringCount is non-zero.
|
|
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.
|
|
Get file load telemetry. Get file load telemetry. |
|
Disable the instruction cache.
|
|
Use the PPCI hardware to initialize a region of RAM to 0.
|
|
Initialize file upload command handling. Initialize file upload command handling. |
|
Service the Memory Load operation. This function services the Memory Load operation by writing the next chunk of data. When all data has been loaded, and the target of the load was SIB EEPROM, the EEPROM is locked.
|
|
Process LAT file load telecommands. This function will process file load telecommands received by the LAT. Processing depends on function code.
|
|
Process LAT boot telecommands. This function will process boot telecommands received by the LAT. Processing depends on function code.
|
|
Process LAT MEMORY DUMP telecommands. This function will process memory dump telecommands received by the LAT. Processing depends on function code.
|
|
Process Memory Write commands.
|
|
Process Memory PCI Device Header Write commands.
|
|
Process Memory Processor Register Write commands.
|
|
Process spacecraft broadcast telecommand. This function will process spacecraft broadcast telecommands received by the LAT. The only function code of the spacecraft broadcast telecommand that is processed is the SITIMETONE. When a SITIMETONE packet is received, the seconds parameter in that packet is recorded as the current time in the PBC. No processing is done for SIANCILLARY and SIATTITUDE function codes.
|
|
Warm reboot the RAD750.
|
|
Reset FILE upload state machine. A simple front end to FILE_uplReset() |
|
Set watchdog timer. Set watchdog timer counter to specified number of seconds.
|
|
Get boot time. Get time.
|
|
Init boot time. Init time. Time set to zero.
|
|
Set boot time seconds. Set current boot time.
|
|
Create boot housekeeping telemetry packet. Creates an up-to-date boot housekeeping telemetry packet. All contents of the telemetry packet are gathered in this function EXCEPT the sequence count. The calling routine must manage the sequence count and pass in the desired sequence count as an argument. The caller must also pass in a non-null pointer for pkt and must have allocated enough space to fit a housekeeping telemetry packet.
|
|
Global pointer to diagnostics |
|
Global boot state information. |
|
Symbol defined at the end of ram exceptions. The address of this variable is the last address of RAM exceptions vectors stored in ROM. |
|
Symbol defined at the start of ram exceptions. The address of this variable is the address where RAM exceptions vectors are stored in ROM. |