cdn_dp.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef CDN_DP_H
  7. #define CDN_DP_H
  8. #include <plat_private.h>
  9. enum {
  10. CDN_DP_HDCP_1X_KSV_LEN = 5,
  11. CDN_DP_HDCP_KSV_LEN = 8,
  12. CDN_DP_HDCP_RESERVED_LEN = 10,
  13. CDN_DP_HDCP_UID_LEN = 16,
  14. CDN_DP_HDCP_SHA_LEN = 20,
  15. CDN_DP_HDCP_DPK_LEN = 280,
  16. CDN_DP_HDCP_1X_KEYS_LEN = 285,
  17. CDN_DP_HDCP_KEY_LEN = 326,
  18. };
  19. struct cdn_dp_hdcp_key_1x {
  20. uint8_t ksv[CDN_DP_HDCP_KSV_LEN];
  21. uint8_t device_key[CDN_DP_HDCP_DPK_LEN];
  22. uint8_t sha1[CDN_DP_HDCP_SHA_LEN];
  23. uint8_t uid[CDN_DP_HDCP_UID_LEN];
  24. uint16_t seed;
  25. uint8_t reserved[CDN_DP_HDCP_RESERVED_LEN];
  26. };
  27. #define HDCP_KEY_DATA_START_TRANSFER 0
  28. #define HDCP_KEY_DATA_START_DECRYPT 1
  29. #define HDCP_KEY_1X_STORE_DATA_ALIGN_SIZE (6 * 64) / 8
  30. /* Checks the cdn_dp_hdcp_key_1x must be aligned on 6 x 64-bit word boundary */
  31. CASSERT(sizeof(struct cdn_dp_hdcp_key_1x) % HDCP_KEY_1X_STORE_DATA_ALIGN_SIZE,
  32. assert_hdcp_key_1x_store_data_align_size_mismatch);
  33. uint64_t dp_hdcp_ctrl(uint64_t type);
  34. uint64_t dp_hdcp_store_key(uint64_t x1,
  35. uint64_t x2,
  36. uint64_t x3,
  37. uint64_t x4,
  38. uint64_t x5,
  39. uint64_t x6);
  40. #endif /* CDN_DP_H */