1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2019-2020 Broadcom
18 #define TF_SESSIONS_MAX 1 /** max # sessions */
19 #define TF_SESSION_ID_INVALID 0xFFFFFFFF /** Invalid Session ID define */
23 * Shared memory containing private TruFlow session information.
24 * Through this structure the session can keep track of resource
25 * allocations and (if so configured) any shadow copy of flow
28 * Memory is assigned to the Truflow instance by way of
29 * tf_open_session. Memory is allocated and owned by i.e. ULP.
31 * Access control to this shared memory is handled by the spin_lock in
35 /** TrueFlow Version. Used to control the structure layout
36 * when sharing sessions. No guarantee that a secondary
37 * process would come from the same version of an executable.
39 struct tf_session_version ver;
41 /** Device type, provided by tf_open_session().
43 enum tf_device_type device_type;
45 /** Session ID, allocated by FW on tf_open_session().
47 union tf_session_id session_id;
50 * String containing name of control channel interface to be
51 * used for this session to communicate with firmware.
53 * ctrl_chan_name will be used as part of a name for any
54 * shared memory allocation.
56 char ctrl_chan_name[TF_SESSION_NAME_MAX];
59 * Boolean controlling the use and availability of shadow
60 * copy. Shadow copy will allow the TruFlow Core to keep track
61 * of resource content on the firmware side without having to
62 * query firmware. Additional private session core_data will
63 * be allocated if this boolean is set to 'true', default
66 * Size of memory depends on the NVM Resource settings for the
72 * Session Reference Count. To keep track of functions per
73 * session the ref_count is incremented. There is also a
74 * parallel TruFlow Firmware ref_count in case the TruFlow
75 * Core goes away without informing the Firmware.
79 /** CRC32 seed table */
80 #define TF_LKUP_SEED_MEM_SIZE 512
81 uint32_t lkup_em_seed_mem[TF_DIR_MAX][TF_LKUP_SEED_MEM_SIZE];
82 /** Lookup3 init values */
83 uint32_t lkup_lkup3_init_cfg[TF_DIR_MAX];
86 #endif /* _TF_SESSION_H_ */