Commit 4c5eb926 authored by Andrew Davis's avatar Andrew Davis Committed by Anas Nashif
Browse files

lib: open-amp: Use fixed width types for resource table



This structure is shared between cores which may have different type
widths. Use fixed width types when defining the structure. We can
also use struct resource_table to help as it is already defined with
fixed width types and removes the need to redefine these elements.

Signed-off-by: default avatarAndrew Davis <afd@ti.com>
parent 1af474b5
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -34,8 +34,10 @@ extern char ram_console[];
#define __resource Z_GENERIC_SECTION(.resource_table)

static struct fw_resource_table __resource resource_table = {
	.hdr = {
		.ver = 1,
		.num = RSC_TABLE_NUM_ENTRY,
	},
	.offset = {

#if (CONFIG_OPENAMP_RSC_TABLE_NUM_RPMSG_BUFF > 0)
+2 −4
Original line number Diff line number Diff line
@@ -41,10 +41,8 @@ enum rsc_table_entries {
};

struct fw_resource_table {
	unsigned int ver;
	unsigned int num;
	unsigned int reserved[2];
	unsigned int offset[RSC_TABLE_NUM_ENTRY];
	struct resource_table hdr;
	uint32_t offset[RSC_TABLE_NUM_ENTRY];

#if (CONFIG_OPENAMP_RSC_TABLE_NUM_RPMSG_BUFF > 0)
	struct fw_rsc_vdev vdev;