rsc_table.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. /* This file populates resource table for BM remote
  12. * for use by the Linux Master */
  13. #ifndef RSC_TABLE_H_
  14. #define RSC_TABLE_H_
  15. #include "openamp/open_amp.h"
  16. #include "openamp_conf.h"
  17. /* Place resource table in special ELF section */
  18. //#define __section_t(S) __attribute__((__section__(#S)))
  19. //#define __resource __section_t(.resource_table)
  20. /* Resource table for the given remote */
  21. struct shared_resource_table {
  22. unsigned int version;
  23. unsigned int num;
  24. unsigned int reserved[2];
  25. unsigned int offset[NUM_RESOURCE_ENTRIES];
  26. /* text carveout entry */
  27. /* rpmsg vdev entry */
  28. struct fw_rsc_vdev vdev;
  29. struct fw_rsc_vdev_vring vring0;
  30. struct fw_rsc_vdev_vring vring1;
  31. struct fw_rsc_trace cm_trace;
  32. };
  33. void resource_table_init(int RPMsgRole, void **table_ptr, int *length);
  34. #endif /* RSC_TABLE_H_ */