Skip to content

Commit

Permalink
Remove binary files: src part
Browse files Browse the repository at this point in the history
Remove code which is not usable without hdcp.bin file

ARM-software/tf-issues#651
It is only needed for HDCP support (a DRM feature for video streaming),
if you don't care about that the rest of the firmware should work
perfectly fine without it. Just change rk3399/plat_sip_calls.c to not
handle the RK_SIP_HDCP* SMCs when this option is set, and then exclude
rk3399/drivers/dp/cdn_dp.c and the blob from rk3399/platform.mk.
  • Loading branch information
thefallenidealist committed Aug 14, 2021
1 parent 533e463 commit 0ff68d9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
15 changes: 0 additions & 15 deletions plat/rockchip/rk3399/plat_sip_calls.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@
#define DRAM_SET_PARAM 0x07
#define DRAM_SET_ODT_PD 0x08

#define RK_SIP_HDCP_CONTROL 0x82000009
#define RK_SIP_HDCP_KEY_DATA64 0xC200000A

uint32_t ddr_smc_handler(uint64_t arg0, uint64_t arg1,
uint64_t id, uint64_t arg2)
{
Expand Down Expand Up @@ -56,21 +53,9 @@ uintptr_t rockchip_plat_sip_handler(uint32_t smc_fid,
void *handle,
u_register_t flags)
{
#ifdef PLAT_RK_DP_HDCP
uint64_t x5, x6;
#endif

switch (smc_fid) {
case RK_SIP_DDR_CFG:
SMC_RET1(handle, ddr_smc_handler(x1, x2, x3, x4));
#ifdef PLAT_RK_DP_HDCP
case RK_SIP_HDCP_CONTROL:
SMC_RET1(handle, dp_hdcp_ctrl(x1));
case RK_SIP_HDCP_KEY_DATA64:
x5 = read_ctx_reg(get_gpregs_ctx(handle), CTX_GPREG_X5);
x6 = read_ctx_reg(get_gpregs_ctx(handle), CTX_GPREG_X6);
SMC_RET1(handle, dp_hdcp_store_key(x1, x2, x3, x4, x5, x6));
#endif
default:
ERROR("%s: unhandled SMC (0x%x)\n", __func__, smc_fid);
SMC_RET1(handle, SMC_UNK);
Expand Down
10 changes: 0 additions & 10 deletions plat/rockchip/rk3399/platform.mk
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,6 @@ $(eval $(call add_define_val,RK3399M0FW,\"$(RK3399M0FW)\"))
RK3399M0PMUFW=${BUILD_M0}/${PLAT_M0}pmu.bin
$(eval $(call add_define_val,RK3399M0PMUFW,\"$(RK3399M0PMUFW)\"))

ifdef PLAT_RK_DP_HDCP
BL31_SOURCES += ${RK_PLAT_SOC}/drivers/dp/cdn_dp.c

HDCPFW=${RK_PLAT_SOC}/drivers/dp/hdcp.bin
$(eval $(call add_define_val,HDCPFW,\"$(HDCPFW)\"))

${BUILD_PLAT}/bl31/cdn_dp.o: CCACHE_EXTRAFILES=$(HDCPFW)
${RK_PLAT_SOC}/drivers/dp/cdn_dp.c: $(HDCPFW)
endif

# CCACHE_EXTRAFILES is needed because ccache doesn't handle .incbin
export CCACHE_EXTRAFILES
${BUILD_PLAT}/bl31/pmu_fw.o: CCACHE_EXTRAFILES=$(RK3399M0FW):$(RK3399M0PMUFW)
Expand Down

0 comments on commit 0ff68d9

Please sign in to comment.