smci_clientenv.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. /* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
  2. /*
  3. * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
  4. */
  5. #ifndef __SMCI_CLIENTENV_H
  6. #define __SMCI_CLIENTENV_H
  7. #include "smci_object.h"
  8. #include "IClientEnv.h"
  9. #define SMCI_CLIENTENV_OP_OPEN 0
  10. #define SMCI_CLIENTENV_OP_REGISTERLEGACY 1
  11. #define SMCI_CLIENTENV_OP_REGISTER 2
  12. #define SMCI_CLIENTENV_OP_REGISTERWITHWHITELIST 3
  13. #define SMCI_CLIENTENV_OP_NOTIFYDOMAINCHANGE 4
  14. #define SMCI_CLIENTENV_OP_REGISTERWITHCREDENTIALS 5
  15. #define SMCI_CLIENTENV_OP_LOADCMNLIBFROMBUFFER 6
  16. #define SMCI_CLIENTENV_OP_CONFIGTAREGION 7
  17. #define SMCI_CLIENTENV_OP_ADCIACCEPT 8
  18. #define SMCI_CLIENTENV_OP_ADCISUTDOWN 9
  19. static inline int32_t
  20. smci_clientenv_release(struct smci_object self)
  21. {
  22. return IClientEnv_release(self);
  23. }
  24. static inline int32_t
  25. smci_clientenv_retain(struct smci_object self)
  26. {
  27. return IClientEnv_retain(self);
  28. }
  29. static inline int32_t
  30. smci_clientenv_open(struct smci_object self, uint32_t uid_val, struct smci_object *obj_ptr)
  31. {
  32. return IClientEnv_open(self, uid_val, obj_ptr);
  33. }
  34. static inline int32_t
  35. smci_clientenv_registerlegacy(struct smci_object self, const void *credentials_ptr,
  36. size_t credentials_len, struct smci_object *clientenv_ptr)
  37. {
  38. return IClientEnv_registerLegacy(self, credentials_ptr,
  39. credentials_len, clientenv_ptr);
  40. }
  41. static inline int32_t
  42. smci_clientenv_register(struct smci_object self, struct smci_object credentials_val,
  43. struct smci_object *clientenv_ptr)
  44. {
  45. return IClientEnv_register(self, credentials_val,
  46. clientenv_ptr);
  47. }
  48. static inline int32_t
  49. smci_clientenv_registerwithwhitelist(struct smci_object self,
  50. struct smci_object credentials_val, const uint32_t *uids_ptr,
  51. size_t uids_len, struct smci_object *clientenv_ptr)
  52. {
  53. return IClientEnv_registerWithWhitelist(self,
  54. credentials_val, uids_ptr,
  55. uids_len, clientenv_ptr);
  56. }
  57. static inline int32_t
  58. smc_clientenv_notifydomainchange(struct smci_object self)
  59. {
  60. return IClientEnv_notifyDomainChange(self);
  61. }
  62. static inline int32_t
  63. smci_clientenv_registerwithcredentials(struct smci_object self, struct smci_object
  64. credentials_val, struct smci_object *clientenv_ptr)
  65. {
  66. return IClientEnv_registerWithCredentials(self,
  67. credentials_val, clientenv_ptr);
  68. }
  69. static inline int32_t
  70. smci_clientenv_loadcmnlibfrombuffer(struct smci_object self, const void *cmnlibelf_ptr,
  71. size_t cmnlibelf_len)
  72. {
  73. return IClientEnv_loadCmnlibFromBuffer(self, cmnlibelf_ptr, cmnlibelf_len);
  74. }
  75. static inline int32_t
  76. smci_clientenv_configtaregion(struct smci_object self, uint64_t apprgnaddr_val,
  77. uint32_t apprgnsize_val)
  78. {
  79. return IClientEnv_configTaRegion(self, apprgnaddr_val, apprgnsize_val);
  80. }
  81. static inline int32_t
  82. smci_clientenv_adciaccept(struct smci_object self)
  83. {
  84. return IClientEnv_adciAccept(self);
  85. }
  86. static inline int32_t
  87. smci_clientenv_adcishutdown(struct smci_object self)
  88. {
  89. return IClientEnv_adciShutdown(self);
  90. }
  91. #endif /* __SMCI_CLIENTENV_H */