GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > PBC / V4-5-0
Constituent: pbc_bootshell     Tag: rad750
#include "rom_defs.h"
#include "PBC/PBC.h"
#include "asmFns.h"
#include "bootshell.h"
#include "pbc_sio.h"
#include "pbc_memmap.h"
#include "BootDiagnostics.h"
#include "CCSDS/CCSDS_pkt.h"
#include "PBC/PBC_msgs.h"
#include "PBC/PBC_types.h"
#include "PBC/PBC_string.h"
#include "ZLIB/zlib.h"
#include "CCSDS/CCSDS_msg.h"
#include "CTDB/SUMT_rt_poll.h"
#include "cmdtlm.h"
#include "CTDB/CO1553_util.h"
#include "PBS/SPIN.h"
#include "MEM/MEM_apid.h"
#include "MEM/MEM_cmddefs.h"
#include "MEM/MEM_dump.h"
#include "MEM/MEM_load.h"
#include "MEM/MEM_map.h"
#include <drv/ppci/ppciInt.h>
#include <drv/ppci/ppciMem.h>
#include <drv/ppci/ppciRegs.h>
#include "EE_boot.h"
#include "SIB/SIB.h"
#include "bootcomm.h"
Include dependency graph for bootshell.c:
Functions | |
void | pbc_RejectPacket (void *cmdBuffer) |
Mark CCSDS as rejected command. | |
void | pbc_RejectCommand (const unsigned short apid, void *cmdBuffer) |
Mark telecommand as rejected. | |
void | pbc_AcceptCommand (const unsigned short apid, void *cmdBuffer) |
Mark telecommand as accepted. | |
unsigned int | pbc_ProcessTelecommand (void *telecommand, unsigned short apid, unsigned short funcCode, unsigned short pktSize) |
Process telecommand at the LAT telecommand layer. | |
unsigned int | pbc_ProcessCcsdsPacket (void *cmdBuffer, unsigned int cmdBufferSize) |
Process telecommand at the CCSDS protocol layer. | |
void | pbc_CommandLoop (void) |
Boot command/telemetry processing. | |
void | pbc_InitPpci (void) |
Initialize the Power PCI bridge chip. | |
void | pbc_EnableMemoryInterrupts () |
Enable memory controller interrupts. | |
void | pbc_EnablePciInterrupts () |
Enable PCI error interrupts. | |
void | pbc_InstallRamExc () |
Install exception handers into RAM. | |
void | pbc_EnableRamExc () |
Enable exception handers in RAM. | |
void | pbc_InitMemSystem () |
Initialize the MEM interface. | |
void * | pbc_eeReadFunc (void *dest_p, const void *source_p, const size_t nbytes, void *context_p, size_t *bytes_read_p) |
EEPROM read callback function. | |
void * | pbc_eeWriteFunc (void *dest_p, const void *source_p, const size_t nbytes, void *context_p, size_t *bytes_written_p) |
EEPROM write callback function. | |
void | pbc_InitSIB (void) |
Initialize the SIB interface. | |
void | pbc_InitScrubber (void) |
Initialize the software memory scrubber. | |
void | pbc_CheckSelectionResults () |
Check the image selection results. | |
void | pbc_InitGlobalState (const unsigned int bootType) |
Initialize global state structure. | |
void | PBC_BootShell (const unsigned int bootType) |
Primary boot code shell. |
Boot shell main loop.
CVS $Id: bootshell.c,v 1.36 2005/05/17 20:41:03 dmay Exp $
|
Mark telecommand as accepted. Accept telecommand.
|
|
Primary boot code shell. This is the "main" function for the primary boot code. It is the first C function that is called after the romInit code has run. This function is resposible for finishing all of the RAD750 hardware setup (mainly setup of the PCI bus) and devices on the PCI bus (the SIB and LCB). After the RAD750 and periphirals are configured, the PBC_BootShell will examine the boot flags to determine if the primary boot code will run the command and telemetry loop or proceed directly to running the secondary boot code. This function should not return. If it does, it will result in a warm start in the romInit code.
|
Here is the call graph for this function:
|
Check the image selection results. Check the results of the image selection process and report any failures.
|
Here is the call graph for this function:
|
Boot command/telemetry processing. Process the command and telemetry loop during the boot command operations. This function is your basic endless loop. Each time through the loop, the communications interface is polled with Pbc_CommPoll(). If Pbc_CommPoll() indicates a command was received, the command is processed with pbc_ProcessCcsdsPacket(). Pbc_CommPoll() also generates and sends telemetry to the spacecraft. If pbc_ProcessCcsdsPacket() is given a Boot Start telemcommand, it will not return if a secondary boot is successfully loaded and executed. This is the only way to (properly) exit this loop.
|
Here is the call graph for this function:
|
EEPROM read callback function. EEPROM read function that is suitable for use as a memory map table entry callback function.
|
|
EEPROM write callback function. EEPROM write function that is suitable for use as a memory map table entry callback function.
|
|
Enable memory controller interrupts. Enable errors in the memory controller to interrupt the processor. This will cause the interrupt exception handler to record the memory controller error and reset the processor.
|
|
Enable PCI error interrupts. Enable errors on the PCI to interrupt the processor. This will cause the interrupt exception handler to record the PCI error and reset the processor.
|
|
Enable exception handers in RAM. Enable exception vectors located in RAM. The MSR is be programmed to use these vectors instead of the vectors in ROM.
|
|
Initialize global state structure. This routine will initialize the PBC global state structure. It should be called once at the start of PBC. The argument bootType will be used to initialize the bootType member of the global data. The boot mode it set to "INIT". All command counts are zeroed.
|
Here is the call graph for this function:
|
Initialize the MEM interface. Initialize the memory map, dump, and load functions.
|
|
Initialize the Power PCI bridge chip. Initialize the registers within the Power PCI bridge chip. This function is modeled after the ppciInit function from VxWorks.
|
|
Initialize the software memory scrubber. Initialize the software memory scrubber. In boot mode, the hardware scrubber is not used since we don't want to scrub all of SDRAM. Instead, the command loop marches through the SDRAM and scrubs it 'manually'. In this way we restrict the scrub operation to the portion of SDRAM that is used by the boot code. Just before the boot code jumps to the secondary boot code, it should enable the hardware scrubber.
|
|
Initialize the SIB interface. Initialize the interface to the SIB functions.
|
Here is the call graph for this function:
|
Install exception handers into RAM. Install exception vectors into RAM. The vectors are stored in the .rodata section in ROM. Two symbols, Pbc_RamExcStart and Pbc_RamExcEnd are defined to indicate the start and end address of the vectors. This routine copies the code from the ROM into RAM. After these exception vectors are installed, the MSR must be programmed to use these vectors instead of the vectors in ROM. Use the function Pbc_EnableRamExc() to do this.
|
Here is the call graph for this function:
|
Process telecommand at the CCSDS protocol layer. This is the function that processes all commands sent to the PBC. Commands are verified through the CCDSD protocol layer. Commands that do not pass verification are rejected. Commands that pass verification are passed to pbc_ProcessTelecommand() for processing.
|
Here is the call graph for this function:
|
Process telecommand at the LAT telecommand layer. This is the function that processes all verified LAT commands sent to the PBC. It is assumed that commands processed here have passed verification. Commands are processed based on APID.
|
Here is the call graph for this function:
|
Mark telecommand as rejected. Reject telecommand.
|
|
Mark CCSDS as rejected command. Reject a CCSDS packet. This is used if a CCSDS count failed protocol checks so badly that I could not be interpreted as a telecommand.
|