Commit b2fea31d authored by Adam Wujek's avatar Adam Wujek 💬

userspace/wrsw_hal: add hal_mode to shmem

hal_mode can be:
--TIME_GM (Grand-Master)
--TIME_FM (Free-Running Master)
--TIME_BC (Boundary Clock)
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent 24fe7c67
...@@ -110,10 +110,11 @@ struct hal_temp_sensors { ...@@ -110,10 +110,11 @@ struct hal_temp_sensors {
}; };
/* This is the overall structure stored in shared memory */ /* This is the overall structure stored in shared memory */
#define HAL_SHMEM_VERSION 7 /* Version 7 because of moving of reading #define HAL_SHMEM_VERSION 8 /* Version 8 because of adding HAL mode */
* temperature treshold values to snmpd */
struct hal_shmem_header { struct hal_shmem_header {
int nports; int nports;
int hal_mode;
struct hal_port_state *ports; struct hal_port_state *ports;
struct hal_temp_sensors temp; struct hal_temp_sensors temp;
}; };
......
ppsi @ d0192a54
Subproject commit ac3206500476b95ec31b0013d2b5488dd83c76cd Subproject commit d0192a54c1948c268ab54122288f508aaae86a3b
...@@ -238,6 +238,7 @@ void dump_many_fields(void *addr, struct dump_info *info, int ninfo) ...@@ -238,6 +238,7 @@ void dump_many_fields(void *addr, struct dump_info *info, int ninfo)
#define DUMP_STRUCT struct hal_shmem_header #define DUMP_STRUCT struct hal_shmem_header
struct dump_info hal_shmem_info [] = { struct dump_info hal_shmem_info [] = {
DUMP_FIELD(int, nports), DUMP_FIELD(int, nports),
DUMP_FIELD(int, hal_mode),
DUMP_FIELD(sensor_temp, temp.fpga), DUMP_FIELD(sensor_temp, temp.fpga),
DUMP_FIELD(sensor_temp, temp.pll), DUMP_FIELD(sensor_temp, temp.pll),
DUMP_FIELD(sensor_temp, temp.psl), DUMP_FIELD(sensor_temp, temp.psl),
......
...@@ -230,6 +230,7 @@ int hal_port_init_all() ...@@ -230,6 +230,7 @@ int hal_port_init_all()
/* We are done, mark things as valid */ /* We are done, mark things as valid */
hal_shmem->nports = hal_port_nports; hal_shmem->nports = hal_port_nports;
hal_shmem_hdr->version = HAL_SHMEM_VERSION; hal_shmem_hdr->version = HAL_SHMEM_VERSION;
hal_shmem->hal_mode = hal_get_timing_mode();
/* Release processes waiting for HAL's to fill shm with correct data /* Release processes waiting for HAL's to fill shm with correct data
When shm is opened successfully data in shm is still not populated! When shm is opened successfully data in shm is still not populated!
Read data with wrs_shm_seqbegin and wrs_shm_seqend! Read data with wrs_shm_seqbegin and wrs_shm_seqend!
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment