1 /* 2 * Copyright (c) 2019 STMicroelectronics. 3 * All rights reserved. 4 * 5 * This software component is licensed by ST under BSD 3-Clause license, 6 * the "License"; You may not use this file except in compliance with the 7 * License. You may obtain a copy of the License at: 8 * opensource.org/licenses/BSD-3-Clause 9 * 10 */ 11 12 /* This file populates resource table for BM remote 13 * for use by the Linux Master */ 14 15 #ifndef RSC_TABLE_H_ 16 #define RSC_TABLE_H_ 17 18 #include "openamp/open_amp.h" 19 #include "openamp_conf.h" 20 21 /* Place resource table in special ELF section */ 22 //#define __section_t(S) __attribute__((__section__(#S))) 23 //#define __resource __section_t(.resource_table) 24 25 /* Resource table for the given remote */ 26 struct shared_resource_table { 27 unsigned int version; 28 unsigned int num; 29 unsigned int reserved[2]; 30 unsigned int offset[NUM_RESOURCE_ENTRIES]; 31 /* text carveout entry */ 32 33 /* rpmsg vdev entry */ 34 struct fw_rsc_vdev vdev; 35 struct fw_rsc_vdev_vring vring0; 36 struct fw_rsc_vdev_vring vring1; 37 struct fw_rsc_trace cm_trace; 38 }; 39 40 void resource_table_init(int RPMsgRole, void **table_ptr, int *length); 41 42 #endif /* RSC_TABLE_H_ */ 43 44