Commit 6849a1aa authored by Adam Wujek's avatar Adam Wujek 💬

arch/lm32: store structure versions

When any of exported structures is changed please update
WRPC_SHMEM_VERSION or WRS_PPSI_SHMEM_VERSION (for PPSI)
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent 9620a3ab
......@@ -101,6 +101,8 @@ CFLAGS = $(cflags-y) -Wall -Wstrict-prototypes \
-ffunction-sections -fdata-sections -Os -Wmissing-prototypes \
-include include/wrc.h -ggdb
ASFLAGS = -I.
LDFLAGS = $(ldflags-y) \
-Wl,--gc-sections -Os -lgcc -lc
......
......@@ -74,7 +74,9 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#define __ASSEMBLY__
#include "include/revision.h"
#include "ppsi/proto-ext-whiterabbit/wr-api.h"
/* From include/sys/signal.h */
#define SIGINT 2 /* interrupt */
#define SIGTRAP 5 /* trace trap */
......@@ -114,7 +116,16 @@ _reset_handler:
.global uptime_sec
uptime_sec:
.word 0
.org 0xa4
.global version_wrpc
version_wrpc:
.byte WRPC_SHMEM_VERSION
.global version_ppsi
version_ppsi:
.byte WRS_PPSI_SHMEM_VERSION
.extern _irq_entry
.org 0xc0
.global _interrupt_handler
......
/*
* This work is part of the White Rabbit project
*
* Copyright (C) 2017 CERN (www.cern.ch)
* Author: Adam Wujek <adam.wujek@cern.ch>
*
* Released according to the GNU GPL, version 2 or any later version.
*/
#ifndef __REVISION_H__
#define __REVISION_H__
/* Please increment WRPC_SHMEM_VERSION if you change any exported data
* structure */
#define WRPC_SHMEM_VERSION 1 /* first version */
#ifndef __ASSEMBLY__
extern const char *build_revision;
extern const char *build_date;
extern const char *build_time;
extern const char *build_by;
#endif
#endif /* __REVISION_H__ */
ppsi @ 0e0abb05
Subproject commit 8ff1442e9e8caaa016f0b8fb9903f3c28a57077a
Subproject commit 0e0abb05d413c8c1368c393c34d2da8ac7281463
......@@ -116,6 +116,7 @@ void check_vco_frequencies(void);
* Aux and main state:
* used to be in .c file, but we need it here for memory dumping
*/
/* NOTE: Please increment WRPC_SHMEM_VERSION if you change this structure */
struct spll_aux_state {
int seq_state;
int32_t phase_target;
......@@ -125,7 +126,7 @@ struct spll_aux_state {
} pll;
};
/* NOTE: Please increment WRPC_SHMEM_VERSION if you change this structure */
struct softpll_state {
int mode;
int seq_state;
......@@ -142,6 +143,7 @@ struct softpll_state {
struct spll_ptracker_state ptrackers[MAX_PTRACKERS];
};
/* NOTE: Please increment WRPC_SHMEM_VERSION if you change this structure */
struct spll_fifo_log {
uint32_t trr;
uint32_t tstamp;
......
......@@ -15,6 +15,7 @@
#include "softpll_ng.h"
/* NOTE: Please increment WRPC_SHMEM_VERSION if you change this structure */
struct spll_external_state {
struct spll_helper_state *helper;
struct spll_main_state *main;
......
......@@ -25,6 +25,7 @@
* clamped to this value. */
#define HELPER_ERROR_CLAMP 150000
/* NOTE: Please increment WRPC_SHMEM_VERSION if you change this structure */
struct spll_helper_state {
int p_adder; /* anti wrap-around adder */
int p_setpoint, tag_d0;
......
......@@ -14,6 +14,7 @@
#define __SPLL_MAIN_H
/* State of the Main PLL */
/* NOTE: Please increment WRPC_SHMEM_VERSION if you change this structure */
struct spll_main_state {
int state;
......
......@@ -12,6 +12,7 @@
#ifndef __SPLL_PTRACKER_H
#define __SPLL_PTRACKER_H
/* NOTE: Please increment WRPC_SHMEM_VERSION if you change this structure */
struct spll_ptracker_state {
int enabled, id;
int n_avg, acc, avg_count, preserve_sign;
......
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