Ziyuan Xu | 4060cfd | 2017-02-10 11:54:52 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
Antonio Nino Diaz | 5eb8837 | 2018-11-08 10:20:19 +0000 | [diff] [blame] | 7 | #ifndef CDN_DP_H |
| 8 | #define CDN_DP_H |
| 9 | |
Ziyuan Xu | 4060cfd | 2017-02-10 11:54:52 +0800 | [diff] [blame] | 10 | #include <plat_private.h> |
| 11 | |
| 12 | enum { |
| 13 | CDN_DP_HDCP_1X_KSV_LEN = 5, |
| 14 | CDN_DP_HDCP_KSV_LEN = 8, |
| 15 | CDN_DP_HDCP_RESERVED_LEN = 10, |
| 16 | CDN_DP_HDCP_UID_LEN = 16, |
| 17 | CDN_DP_HDCP_SHA_LEN = 20, |
| 18 | CDN_DP_HDCP_DPK_LEN = 280, |
| 19 | CDN_DP_HDCP_1X_KEYS_LEN = 285, |
| 20 | CDN_DP_HDCP_KEY_LEN = 326, |
| 21 | }; |
| 22 | |
| 23 | struct cdn_dp_hdcp_key_1x { |
| 24 | uint8_t ksv[CDN_DP_HDCP_KSV_LEN]; |
| 25 | uint8_t device_key[CDN_DP_HDCP_DPK_LEN]; |
| 26 | uint8_t sha1[CDN_DP_HDCP_SHA_LEN]; |
| 27 | uint8_t uid[CDN_DP_HDCP_UID_LEN]; |
| 28 | uint16_t seed; |
| 29 | uint8_t reserved[CDN_DP_HDCP_RESERVED_LEN]; |
| 30 | }; |
| 31 | |
| 32 | #define HDCP_KEY_DATA_START_TRANSFER 0 |
| 33 | #define HDCP_KEY_DATA_START_DECRYPT 1 |
| 34 | #define HDCP_KEY_1X_STORE_DATA_ALIGN_SIZE (6 * 64) / 8 |
| 35 | |
| 36 | /* Checks the cdn_dp_hdcp_key_1x must be aligned on 6 x 64-bit word boundary */ |
Elyes Haouas | 183638f | 2023-02-13 10:05:41 +0100 | [diff] [blame] | 37 | CASSERT(sizeof(struct cdn_dp_hdcp_key_1x) % HDCP_KEY_1X_STORE_DATA_ALIGN_SIZE, |
Ziyuan Xu | 4060cfd | 2017-02-10 11:54:52 +0800 | [diff] [blame] | 38 | assert_hdcp_key_1x_store_data_align_size_mismatch); |
| 39 | |
| 40 | uint64_t dp_hdcp_ctrl(uint64_t type); |
| 41 | |
| 42 | uint64_t dp_hdcp_store_key(uint64_t x1, |
| 43 | uint64_t x2, |
| 44 | uint64_t x3, |
| 45 | uint64_t x4, |
| 46 | uint64_t x5, |
| 47 | uint64_t x6); |
Antonio Nino Diaz | 5eb8837 | 2018-11-08 10:20:19 +0000 | [diff] [blame] | 48 | |
| 49 | #endif /* CDN_DP_H */ |