File tree Expand file tree Collapse file tree
Middlewares/Third_Party/OpenAMP/mw_if
STM32MP157C-DK2/Applications/OpenAMP
STM32MP157C-EV1/Applications/OpenAMP Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7474#endif /* VIRTUAL_I2C_MODULE_ENABLED */
7575
7676
77+ /* ########################## Linux Master Selection ############################## */
78+ /**
79+ * @brief Due to Linux compatibility, it's important to distinguish if the MASTER is Linux or not.
80+ * In that case, the LINUX_RPROC_MASTER define is required
81+ */
82+ //#define LINUX_RPROC_MASTER
83+
7784
7885/* USER CODE BEGIN INCLUDE */
7986
@@ -154,7 +161,7 @@ extern int __OPENAMP_region_end__[]; /* defined by linker script */
154161
155162#endif
156163
157- #if defined STM32MP157Cxx
164+ #if defined LINUX_RPROC_MASTER
158165#define VRING_RX_ADDRESS -1 /* allocated by Master processor: CA7 */
159166#define VRING_TX_ADDRESS -1 /* allocated by Master processor: CA7 */
160167#define VRING_BUFF_ADDRESS -1 /* allocated by Master processor: CA7 */
Original file line number Diff line number Diff line change 6161#define __resource __section_t(.resource_table)
6262#endif
6363
64- #if defined (STM32MP157Cxx )
64+ #if defined (LINUX_RPROC_MASTER )
6565 #ifdef VIRTIO_MASTER_ONLY
6666 #define CONST
6767 #else
@@ -82,7 +82,7 @@ extern char system_log_buf[];
8282#endif
8383
8484#if defined(__GNUC__ )
85- #if !defined (__CC_ARM ) && !defined (STM32MP157Cxx )
85+ #if !defined (__CC_ARM ) && !defined (LINUX_RPROC_MASTER )
8686
8787/* Since GCC is not initializing the resource_table at startup, it is declared as volatile to avoid compiler optimization
8888 * for the CM4 (see resource_table_init() below)
@@ -95,7 +95,7 @@ CONST struct shared_resource_table __resource __attribute__((used)) resource_tab
9595__root CONST struct shared_resource_table resource_table @ ".resource_table" = {
9696#endif
9797
98- #if defined(__ICCARM__ ) || defined (__CC_ARM ) || defined (STM32MP157Cxx )
98+ #if defined(__ICCARM__ ) || defined (__CC_ARM ) || defined (LINUX_RPROC_MASTER )
9999 .version = 1 ,
100100#if defined (__LOG_TRACE_IO_ )
101101 .num = 2 ,
@@ -130,7 +130,7 @@ __root CONST struct shared_resource_table resource_table @ ".resource_table" = {
130130void resource_table_init (int RPMsgRole , void * * table_ptr , int * length )
131131{
132132
133- #if !defined (STM32MP157Cxx )
133+ #if !defined (LINUX_RPROC_MASTER )
134134#if defined (__GNUC__ ) && ! defined (__CC_ARM )
135135#ifdef VIRTIO_MASTER_ONLY
136136
Original file line number Diff line number Diff line change 1818 ******************************************************************************
1919 @endverbatim
2020
21+ ### V1.0.3/08-November-2019 ##
22+ ===============================
23+ + openamp_conf_template.h:
24+ - replace the "STM32MP157Cxx" define macro with "LINUX_RPROC_MASTER" to support all STM32MP1 varieties
25+
2126### V1.0.2/29-July-2019 ###
2227============================
2328
Original file line number Diff line number Diff line change 7474#endif /* VIRTUAL_I2C_MODULE_ENABLED */
7575
7676
77+ /* ########################## Linux Master Selection ############################## */
78+ /**
79+ * @brief Due to Linux compatibility, it's important to distinguish if the MASTER is Linux or not.
80+ * In that case, the LINUX_RPROC_MASTER define is required
81+ */
82+ #define LINUX_RPROC_MASTER
83+
7784
7885/* USER CODE BEGIN INCLUDE */
7986
@@ -154,7 +161,7 @@ extern int __OPENAMP_region_end__[]; /* defined by linker script */
154161
155162#endif
156163
157- #if defined STM32MP157Cxx
164+ #if defined LINUX_RPROC_MASTER
158165#define VRING_RX_ADDRESS -1 /* allocated by Master processor: CA7 */
159166#define VRING_TX_ADDRESS -1 /* allocated by Master processor: CA7 */
160167#define VRING_BUFF_ADDRESS -1 /* allocated by Master processor: CA7 */
Original file line number Diff line number Diff line change 6161#define __resource __section_t(.resource_table)
6262#endif
6363
64- #if defined (STM32MP157Cxx )
64+ #if defined (LINUX_RPROC_MASTER )
6565 #ifdef VIRTIO_MASTER_ONLY
6666 #define CONST
6767 #else
@@ -82,7 +82,7 @@ extern char system_log_buf[];
8282#endif
8383
8484#if defined(__GNUC__ )
85- #if !defined (__CC_ARM ) && !defined (STM32MP157Cxx )
85+ #if !defined (__CC_ARM ) && !defined (LINUX_RPROC_MASTER )
8686
8787/* Since GCC is not initializing the resource_table at startup, it is declared as volatile to avoid compiler optimization
8888 * for the CM4 (see resource_table_init() below)
@@ -95,7 +95,7 @@ CONST struct shared_resource_table __resource __attribute__((used)) resource_tab
9595__root CONST struct shared_resource_table resource_table @ ".resource_table" = {
9696#endif
9797
98- #if defined(__ICCARM__ ) || defined (__CC_ARM ) || defined (STM32MP157Cxx )
98+ #if defined(__ICCARM__ ) || defined (__CC_ARM ) || defined (LINUX_RPROC_MASTER )
9999 .version = 1 ,
100100#if defined (__LOG_TRACE_IO_ )
101101 .num = 2 ,
@@ -130,7 +130,7 @@ __root CONST struct shared_resource_table resource_table @ ".resource_table" = {
130130void resource_table_init (int RPMsgRole , void * * table_ptr , int * length )
131131{
132132
133- #if !defined (STM32MP157Cxx )
133+ #if !defined (LINUX_RPROC_MASTER )
134134#if defined (__GNUC__ ) && ! defined (__CC_ARM )
135135#ifdef VIRTIO_MASTER_ONLY
136136
Original file line number Diff line number Diff line change 7474#endif /* VIRTUAL_I2C_MODULE_ENABLED */
7575
7676
77+ /* ########################## Linux Master Selection ############################## */
78+ /**
79+ * @brief Due to Linux compatibility, it's important to distinguish if the MASTER is Linux or not.
80+ * In that case, the LINUX_RPROC_MASTER define is required
81+ */
82+ #define LINUX_RPROC_MASTER
83+
7784
7885/* USER CODE BEGIN INCLUDE */
7986
@@ -154,7 +161,7 @@ extern int __OPENAMP_region_end__[]; /* defined by linker script */
154161
155162#endif
156163
157- #if defined STM32MP157Cxx
164+ #if defined LINUX_RPROC_MASTER
158165#define VRING_RX_ADDRESS -1 /* allocated by Master processor: CA7 */
159166#define VRING_TX_ADDRESS -1 /* allocated by Master processor: CA7 */
160167#define VRING_BUFF_ADDRESS -1 /* allocated by Master processor: CA7 */
Original file line number Diff line number Diff line change 6161#define __resource __section_t(.resource_table)
6262#endif
6363
64- #if defined (STM32MP157Cxx )
64+ #if defined (LINUX_RPROC_MASTER )
6565 #ifdef VIRTIO_MASTER_ONLY
6666 #define CONST
6767 #else
@@ -82,7 +82,7 @@ extern char system_log_buf[];
8282#endif
8383
8484#if defined(__GNUC__ )
85- #if !defined (__CC_ARM ) && !defined (STM32MP157Cxx )
85+ #if !defined (__CC_ARM ) && !defined (LINUX_RPROC_MASTER )
8686
8787/* Since GCC is not initializing the resource_table at startup, it is declared as volatile to avoid compiler optimization
8888 * for the CM4 (see resource_table_init() below)
@@ -95,7 +95,7 @@ CONST struct shared_resource_table __resource __attribute__((used)) resource_tab
9595__root CONST struct shared_resource_table resource_table @ ".resource_table" = {
9696#endif
9797
98- #if defined(__ICCARM__ ) || defined (__CC_ARM ) || defined (STM32MP157Cxx )
98+ #if defined(__ICCARM__ ) || defined (__CC_ARM ) || defined (LINUX_RPROC_MASTER )
9999 .version = 1 ,
100100#if defined (__LOG_TRACE_IO_ )
101101 .num = 2 ,
@@ -130,7 +130,7 @@ __root CONST struct shared_resource_table resource_table @ ".resource_table" = {
130130void resource_table_init (int RPMsgRole , void * * table_ptr , int * length )
131131{
132132
133- #if !defined (STM32MP157Cxx )
133+ #if !defined (LINUX_RPROC_MASTER )
134134#if defined (__GNUC__ ) && ! defined (__CC_ARM )
135135#ifdef VIRTIO_MASTER_ONLY
136136
Original file line number Diff line number Diff line change 7474#endif /* VIRTUAL_I2C_MODULE_ENABLED */
7575
7676
77+ /* ########################## Linux Master Selection ############################## */
78+ /**
79+ * @brief Due to Linux compatibility, it's important to distinguish if the MASTER is Linux or not.
80+ * In that case, the LINUX_RPROC_MASTER define is required
81+ */
82+ #define LINUX_RPROC_MASTER
83+
7784
7885/* USER CODE BEGIN INCLUDE */
7986
@@ -154,7 +161,7 @@ extern int __OPENAMP_region_end__[]; /* defined by linker script */
154161
155162#endif
156163
157- #if defined STM32MP157Cxx
164+ #if defined LINUX_RPROC_MASTER
158165#define VRING_RX_ADDRESS -1 /* allocated by Master processor: CA7 */
159166#define VRING_TX_ADDRESS -1 /* allocated by Master processor: CA7 */
160167#define VRING_BUFF_ADDRESS -1 /* allocated by Master processor: CA7 */
Original file line number Diff line number Diff line change 6161#define __resource __section_t(.resource_table)
6262#endif
6363
64- #if defined (STM32MP157Cxx )
64+ #if defined (LINUX_RPROC_MASTER )
6565 #ifdef VIRTIO_MASTER_ONLY
6666 #define CONST
6767 #else
@@ -82,7 +82,7 @@ extern char system_log_buf[];
8282#endif
8383
8484#if defined(__GNUC__ )
85- #if !defined (__CC_ARM ) && !defined (STM32MP157Cxx )
85+ #if !defined (__CC_ARM ) && !defined (LINUX_RPROC_MASTER )
8686
8787/* Since GCC is not initializing the resource_table at startup, it is declared as volatile to avoid compiler optimization
8888 * for the CM4 (see resource_table_init() below)
@@ -95,7 +95,7 @@ CONST struct shared_resource_table __resource __attribute__((used)) resource_tab
9595__root CONST struct shared_resource_table resource_table @ ".resource_table" = {
9696#endif
9797
98- #if defined(__ICCARM__ ) || defined (__CC_ARM ) || defined (STM32MP157Cxx )
98+ #if defined(__ICCARM__ ) || defined (__CC_ARM ) || defined (LINUX_RPROC_MASTER )
9999 .version = 1 ,
100100#if defined (__LOG_TRACE_IO_ )
101101 .num = 2 ,
@@ -130,7 +130,7 @@ __root CONST struct shared_resource_table resource_table @ ".resource_table" = {
130130void resource_table_init (int RPMsgRole , void * * table_ptr , int * length )
131131{
132132
133- #if !defined (STM32MP157Cxx )
133+ #if !defined (LINUX_RPROC_MASTER )
134134#if defined (__GNUC__ ) && ! defined (__CC_ARM )
135135#ifdef VIRTIO_MASTER_ONLY
136136
Original file line number Diff line number Diff line change 7474#endif /* VIRTUAL_I2C_MODULE_ENABLED */
7575
7676
77+ /* ########################## Linux Master Selection ############################## */
78+ /**
79+ * @brief Due to Linux compatibility, it's important to distinguish if the MASTER is Linux or not.
80+ * In that case, the LINUX_RPROC_MASTER define is required
81+ */
82+ #define LINUX_RPROC_MASTER
83+
7784
7885/* USER CODE BEGIN INCLUDE */
7986
@@ -154,7 +161,7 @@ extern int __OPENAMP_region_end__[]; /* defined by linker script */
154161
155162#endif
156163
157- #if defined STM32MP157Cxx
164+ #if defined LINUX_RPROC_MASTER
158165#define VRING_RX_ADDRESS -1 /* allocated by Master processor: CA7 */
159166#define VRING_TX_ADDRESS -1 /* allocated by Master processor: CA7 */
160167#define VRING_BUFF_ADDRESS -1 /* allocated by Master processor: CA7 */
You can’t perform that action at this time.
0 commit comments