trusty_log.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /* Copyright (C) 2018 RDA Technologies Limited and/or its affiliates("RDA").
  2. * All rights reserved.
  3. *
  4. * This software is supplied "AS IS" without any warranties.
  5. * RDA assumes no responsibility or liability for the use of the software,
  6. * conveys no license or title under any patent, copyright, or mask work
  7. * right to the product. RDA reserves the right to make changes in the
  8. * software without notification. RDA also make no representation or
  9. * warranty that such application will be suitable for the specified use
  10. * without further testing or modification.
  11. */
  12. #ifndef TRUSTY_LOG_H_
  13. #define TRUSTY_LOG_H_
  14. struct log_rb {
  15. volatile uint32_t alloc;
  16. volatile uint32_t put;
  17. uint32_t sz;
  18. volatile char data[0];
  19. } __packed;
  20. enum {
  21. TRUSTY_CALL_PREPARE,
  22. TRUSTY_CALL_RETURNED,
  23. TRUSTY_CALL_PANIC
  24. };
  25. #define SMC_SC_SHARED_LOG_VERSION SMC_STDCALL_NR(SMC_ENTITY_LOGGING, 0)
  26. #define SMC_SC_SHARED_LOG_ADD SMC_STDCALL_NR(SMC_ENTITY_LOGGING, 1)
  27. #define SMC_SC_SHARED_LOG_RM SMC_STDCALL_NR(SMC_ENTITY_LOGGING, 2)
  28. #define TRUSTY_LOG_API_VERSION 1
  29. void print_trusty_memlog(void);
  30. int trusty_log_init(void);
  31. #endif /* TRUSTY_LOG_H_ */