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