Skip to content

Commit c7ac6ef

Browse files
committed
annotate field names of the resource table
1 parent 62c2e69 commit c7ac6ef

File tree

1 file changed

+42
-23
lines changed

1 file changed

+42
-23
lines changed

cores/arduino/stm32/OpenAMP/rsc_table.c

Lines changed: 42 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -62,33 +62,52 @@ extern char system_log_buf[];
6262
#endif
6363

6464
const struct shared_resource_table __attribute__((__section__(".resource_table"))) __attribute__((used)) resource_table = {
65-
.version = 1,
65+
.version = 1,
6666
#if defined (__LOG_TRACE_IO_)
67-
.num = 2,
67+
.num = 2,
6868
#else
69-
.num = 1,
69+
.num = 1,
7070
#endif
71-
.reserved = {0, 0},
72-
.offset = {
73-
offsetof(struct shared_resource_table, vdev),
74-
offsetof(struct shared_resource_table, cm_trace),
75-
},
76-
77-
/* Virtio device entry */
78-
.vdev = {
79-
RSC_VDEV, VIRTIO_ID_RPMSG_, 0, RPMSG_IPU_C0_FEATURES, 0, 0, 0,
80-
VRING_COUNT, {0, 0},
81-
},
82-
83-
/* Vring rsc entry - part of vdev rsc entry */
84-
.vring0 = {VRING_TX_ADDRESS, VRING_ALIGNMENT, VRING_NUM_BUFFS, VRING0_ID, 0},
85-
.vring1 = {VRING_RX_ADDRESS, VRING_ALIGNMENT, VRING_NUM_BUFFS, VRING1_ID, 0},
86-
71+
.reserved = {0, 0},
72+
.offset = {
73+
offsetof(struct shared_resource_table, vdev),
74+
offsetof(struct shared_resource_table, cm_trace),
75+
},
76+
/* Virtio device entry */
77+
.vdev = {
78+
.type = RSC_VDEV,
79+
.id = VIRTIO_ID_RPMSG_,
80+
.notifyid = 0,
81+
.dfeatures = RPMSG_IPU_C0_FEATURES,
82+
.gfeatures = 0,
83+
.config_len = 0,
84+
.status = 0,
85+
.num_of_vrings = VRING_COUNT,
86+
.reserved = {0, 0},
87+
},
88+
/* Vring rsc entry - part of vdev rsc entry */
89+
.vring0 = {
90+
.da = VRING_TX_ADDRESS,
91+
.align = VRING_ALIGNMENT,
92+
.num = VRING_NUM_BUFFS,
93+
.notifyid = VRING0_ID,
94+
.reserved = 0
95+
},
96+
.vring1 = {
97+
.da = VRING_RX_ADDRESS,
98+
.align = VRING_ALIGNMENT,
99+
.num = VRING_NUM_BUFFS,
100+
.notifyid = VRING1_ID,
101+
.reserved = 0
102+
},
87103
#if defined (__LOG_TRACE_IO_)
88-
.cm_trace = {
89-
RSC_TRACE,
90-
(uint32_t)system_log_buf, SYSTEM_TRACE_BUF_SZ, 0, "cm4_log",
91-
},
104+
.cm_trace = {
105+
.type = RSC_TRACE,
106+
.da = (uint32_t)system_log_buf,
107+
.len = SYSTEM_TRACE_BUF_SZ,
108+
.reserved = 0,
109+
.name = "arduino_core_debug",
110+
},
92111
#endif
93112
} ;
94113

0 commit comments

Comments
 (0)