Skip to content

Commit 121d387

Browse files
committed
Change RPMSG_ADDR_BMP_SIZE from byte unit to bit unit
This patch fixes the limitation which did not allow to create more than 4 endpoints Signed-off-by: Xiang Xiao <[email protected]>
1 parent ce3cd02 commit 121d387

File tree

2 files changed

+3
-3
lines changed
  • Middlewares/Third_Party/OpenAMP/open-amp/lib

2 files changed

+3
-3
lines changed

Middlewares/Third_Party/OpenAMP/open-amp/lib/include/openamp/rpmsg.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <openamp/compiler.h>
1616
#include <metal/mutex.h>
1717
#include <metal/list.h>
18+
#include <metal/utilities.h>
1819
#include <string.h>
1920
#include <stdbool.h>
2021
#include <stdint.h>
@@ -25,7 +26,7 @@ extern "C" {
2526

2627
/* Configurable parameters */
2728
#define RPMSG_NAME_SIZE (32)
28-
#define RPMSG_ADDR_BMP_SIZE (4)
29+
#define RPMSG_ADDR_BMP_SIZE (128)
2930

3031
#define RPMSG_NS_EPT_ADDR (0x35)
3132
#define RPMSG_ADDR_ANY 0xFFFFFFFF
@@ -101,7 +102,7 @@ struct rpmsg_device_ops {
101102
struct rpmsg_device {
102103
struct metal_list endpoints;
103104
struct rpmsg_endpoint ns_ept;
104-
unsigned long bitmap[RPMSG_ADDR_BMP_SIZE];
105+
unsigned long bitmap[metal_bitmap_longs(RPMSG_ADDR_BMP_SIZE)];
105106
metal_mutex_t lock;
106107
rpmsg_ns_bind_cb ns_bind_cb;
107108
struct rpmsg_device_ops ops;

Middlewares/Third_Party/OpenAMP/open-amp/lib/rpmsg/rpmsg.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
#include <openamp/rpmsg.h>
1111
#include <metal/alloc.h>
12-
#include <metal/utilities.h>
1312

1413
#include "rpmsg_internal.h"
1514

0 commit comments

Comments
 (0)