hab_ghs.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
  4. * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
  5. */
  6. #ifndef __HAB_GHS_H
  7. #define __HAB_GHS_H
  8. #include "hab_ghs_os.h"
  9. #define GIPC_RECV_BUFF_SIZE_BYTES (256*1024)
  10. struct ghs_vdev {
  11. int be;
  12. void *read_data; /* buffer to receive from gipc */
  13. size_t read_size;
  14. int read_offset;
  15. GIPC_Endpoint endpoint;
  16. spinlock_t io_lock;
  17. char name[32];
  18. struct ghs_vdev_os *os_data; /* os-specific for this comm dev */
  19. };
  20. struct ghs_vmm_plugin_info_s {
  21. const char * const *dt_name;
  22. int *mmid_dt_mapping;
  23. int curr;
  24. int probe_cnt;
  25. };
  26. extern struct ghs_vmm_plugin_info_s ghs_vmm_plugin_info;
  27. extern const char * const dt_gipc_path_name[];
  28. int get_dt_name_idx(int vmid_base, int mmid,
  29. struct ghs_vmm_plugin_info_s *plugin_info);
  30. int hab_gipc_wait_to_send(GIPC_Endpoint endpoint);
  31. int hab_gipc_ep_attach(int is_be, char *name, int vmid_remote,
  32. struct hab_device *mmid_device, struct ghs_vdev *dev);
  33. #endif /* __HAB_GHS_H */