Skip to content

Commit

Permalink
Fix #161, remove OS_VolumeTable
Browse files Browse the repository at this point in the history
Replace with call to OS_FileSysAddFixedMap() for the FS_BASED
entries.  Other types are already handled at runtime anyway.
  • Loading branch information
jphickey committed May 14, 2020
1 parent 37ee8eb commit 26f512d
Show file tree
Hide file tree
Showing 11 changed files with 38 additions and 242 deletions.
9 changes: 0 additions & 9 deletions fsw/inc/cfe_psp_configdata.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ typedef const struct
uint32 PSP_ExceptionLogSize; /**< Size of PSP exception log */
CFE_PSP_MemTable_t *PSP_MemoryTable; /**< Pointer to PSP memory table (forward reference) */

uint32 OS_VolumeTableSize; /**< Size of OS volume table */
OS_VolumeInfo_t *OS_VolumeTable; /**< Pointer to OS volume table (forward reference) */

/**
* Number of EEPROM banks on this platform
*/
Expand All @@ -85,11 +82,5 @@ extern Target_PspConfigData GLOBAL_PSP_CONFIGDATA;
*/
extern CFE_PSP_MemTable_t CFE_PSP_MemoryTable[];

/**
* Extern reference to the psp volume table
* Allows the actual instantiation to be done outside this module
*/
extern OS_VolumeInfo_t OS_VolumeTable[];


#endif /* CFE_PSP_CONFIG_H_ */
1 change: 0 additions & 1 deletion fsw/mcp750-vxworks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ add_library(psp-${CFE_SYSTEM_PSPNAME}-impl OBJECT
src/cfe_psp_start.c
src/cfe_psp_support.c
src/cfe_psp_timer.c
src/cfe_psp_voltab.c
src/cfe_psp_watchdog.c)

13 changes: 13 additions & 0 deletions fsw/mcp750-vxworks/src/cfe_psp_start.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ void OS_Application_Startup(void)
int TicksPerSecond;
uint32 reset_type;
uint32 reset_subtype;
uint32 fs_id;
char reset_register;
int32 Status;

Expand All @@ -112,6 +113,18 @@ void OS_Application_Startup(void)
CFE_PSP_Panic(Status);
}

/*
** Set up the virtual FS mapping for the "/cf" directory
** On this platform it is will use the CF:0 physical device.
*/
Status = OS_FileSysAddFixedMap(&fs_id, "CF:0", "/cf");
if (Status != OS_SUCCESS)
{
/* Print for informational purposes --
* startup can continue, but loads may fail later, depending on config. */
OS_printf("CFE_PSP: OS_FileSysAddFixedMap() failure: %d\n", (int)Status);
}

/*
** Delay for one second.
*/
Expand Down
72 changes: 0 additions & 72 deletions fsw/mcp750-vxworks/src/cfe_psp_voltab.c

This file was deleted.

1 change: 0 additions & 1 deletion fsw/pc-linux/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ add_library(psp-${CFE_SYSTEM_PSPNAME}-impl OBJECT
src/cfe_psp_start.c
src/cfe_psp_support.c
src/cfe_psp_timer.c
src/cfe_psp_voltab.c
src/cfe_psp_watchdog.c)

13 changes: 13 additions & 0 deletions fsw/pc-linux/src/cfe_psp_start.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ void OS_Application_Startup(void)
uint32 reset_subtype;
int32 time_status;
uint32 sys_timebase_id;
uint32 fs_id;
int opt = 0;
int longIndex = 0;
int32 Status;
Expand Down Expand Up @@ -321,6 +322,18 @@ void OS_Application_Startup(void)
sys_timebase_id = 0;
}

/*
** Set up the virtual FS mapping for the "/cf" directory
** On this platform it is just a local/relative dir of the same name.
*/
Status = OS_FileSysAddFixedMap(&fs_id, "./cf", "/cf");
if (Status != OS_SUCCESS)
{
/* Print for informational purposes --
* startup can continue, but loads may fail later, depending on config. */
OS_printf("CFE_PSP: OS_FileSysAddFixedMap() failure: %d\n", (int)Status);
}

/*
** Initialize the statically linked modules (if any)
** This is only applicable to CMake build - classic build
Expand Down
89 changes: 0 additions & 89 deletions fsw/pc-linux/src/cfe_psp_voltab.c

This file was deleted.

1 change: 0 additions & 1 deletion fsw/pc-rtems/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ add_library(psp-${CFE_SYSTEM_PSPNAME}-impl OBJECT
src/cfe_psp_start.c
src/cfe_psp_support.c
src/cfe_psp_timer.c
src/cfe_psp_voltab.c
src/cfe_psp_watchdog.c)

12 changes: 12 additions & 0 deletions fsw/pc-rtems/src/cfe_psp_start.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ void CFE_PSP_Main(void)
{
uint32 reset_type;
uint32 reset_subtype;
uint32 fs_id;
int32 Status;


Expand All @@ -256,6 +257,17 @@ void CFE_PSP_Main(void)
*/
CFE_PSP_SetupReservedMemoryMap();

/*
** Set up the virtual FS mapping for the "/cf" directory
*/
Status = OS_FileSysAddFixedMap(&fs_id, "/mnt/eeprom", "/cf");
if (Status != OS_SUCCESS)
{
/* Print for informational purposes --
* startup can continue, but loads may fail later, depending on config. */
OS_printf("CFE_PSP: OS_FileSysAddFixedMap() failure: %d\n", (int)Status);
}

/*
** Initialize the statically linked modules (if any)
*/
Expand Down
66 changes: 0 additions & 66 deletions fsw/pc-rtems/src/cfe_psp_voltab.c

This file was deleted.

3 changes: 0 additions & 3 deletions fsw/shared/cfe_psp_configdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ Target_PspConfigData GLOBAL_PSP_CONFIGDATA =
.PSP_MemTableSize = CFE_PSP_MEM_TABLE_SIZE,
.PSP_MemoryTable = CFE_PSP_MemoryTable,

.OS_VolumeTableSize = NUM_TABLE_ENTRIES,
.OS_VolumeTable = OS_VolumeTable,

.HW_NumEepromBanks = CFE_PSP_NUM_EEPROM_BANKS,

.PSP_VersionInfo =
Expand Down

0 comments on commit 26f512d

Please sign in to comment.