src/kevin/atf: roll back ~9months to fix suspend-to-ram
ATF v1.6 on gru-kevin causes the laptop to reset itself instead of waking up from suspend-to-ram. The cause of this problem is something in the ~835 commits prior to the v1.6 release. For now, let's simply use an older commit from upstream; suspend-to-ram is pretty important for laptops. TODO: git bisect and revert only the commits that cause this problem.master
parent
4a2a89d88a
commit
2c6a837b48
@ -0,0 +1,75 @@
|
|||||||
|
commit 1f5ee6b1006d3d41d96901dca17f9d2758797836
|
||||||
|
Author: Your Name <you@example.com>
|
||||||
|
Date: Sun Nov 14 22:31:39 2021 -0800
|
||||||
|
|
||||||
|
Expunge HDCP firmware binary blob; patch taken from here, minus the
|
||||||
|
baud-rate change:
|
||||||
|
|
||||||
|
https://gitlab.com/vicencb/kevinboot/-/blob/master/atf.patch
|
||||||
|
|
||||||
|
diff --git a/lib/stack_protector/stack_protector.mk b/lib/stack_protector/stack_protector.mk
|
||||||
|
index 0f0d90fb8..936b0a3f7 100644
|
||||||
|
--- a/lib/stack_protector/stack_protector.mk
|
||||||
|
+++ b/lib/stack_protector/stack_protector.mk
|
||||||
|
@@ -12,7 +12,7 @@ STACK_PROTECTOR_ENABLED := 1
|
||||||
|
BL_COMMON_SOURCES += lib/stack_protector/stack_protector.c \
|
||||||
|
lib/stack_protector/${ARCH}/asm_stack_protector.S
|
||||||
|
|
||||||
|
-TF_CFLAGS += -fstack-protector-${ENABLE_STACK_PROTECTOR}
|
||||||
|
+TF_CFLAGS += -fstack-protector-explicit
|
||||||
|
endif
|
||||||
|
|
||||||
|
$(eval $(call add_define,STACK_PROTECTOR_ENABLED))
|
||||||
|
diff --git a/plat/rockchip/rk3399/drivers/dp/cdn_dp.c b/plat/rockchip/rk3399/drivers/dp/cdn_dp.c
|
||||||
|
index f1a5e2b7a..d22ff63e8 100644
|
||||||
|
--- a/plat/rockchip/rk3399/drivers/dp/cdn_dp.c
|
||||||
|
+++ b/plat/rockchip/rk3399/drivers/dp/cdn_dp.c
|
||||||
|
@@ -9,17 +9,6 @@
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
-__asm__(
|
||||||
|
- ".pushsection .text.hdcp_handler, \"ax\", %progbits\n"
|
||||||
|
- ".global hdcp_handler\n"
|
||||||
|
- ".balign 4\n"
|
||||||
|
- "hdcp_handler:\n"
|
||||||
|
- ".incbin \"" __XSTRING(HDCPFW) "\"\n"
|
||||||
|
- ".type hdcp_handler, %function\n"
|
||||||
|
- ".size hdcp_handler, .- hdcp_handler\n"
|
||||||
|
- ".popsection\n"
|
||||||
|
-);
|
||||||
|
-
|
||||||
|
static uint64_t *hdcp_key_pdata;
|
||||||
|
static struct cdn_dp_hdcp_key_1x key;
|
||||||
|
|
||||||
|
@@ -34,7 +23,7 @@ uint64_t dp_hdcp_ctrl(uint64_t type)
|
||||||
|
return 0;
|
||||||
|
case HDCP_KEY_DATA_START_DECRYPT:
|
||||||
|
if (hdcp_key_pdata == (uint64_t *)(&key + 1))
|
||||||
|
- return hdcp_handler(&key);
|
||||||
|
+ return PSCI_E_DISABLED;
|
||||||
|
else
|
||||||
|
return PSCI_E_INVALID_PARAMS;
|
||||||
|
default:
|
||||||
|
diff --git a/plat/rockchip/rk3399/platform.mk b/plat/rockchip/rk3399/platform.mk
|
||||||
|
index 1997dfc48..69a4954f7 100644
|
||||||
|
--- a/plat/rockchip/rk3399/platform.mk
|
||||||
|
+++ b/plat/rockchip/rk3399/platform.mk
|
||||||
|
@@ -82,17 +82,11 @@ BUILD_M0 := ${BUILD_PLAT}/m0
|
||||||
|
RK3399M0FW=${BUILD_M0}/${PLAT_M0}.bin
|
||||||
|
$(eval $(call add_define,RK3399M0FW))
|
||||||
|
|
||||||
|
-HDCPFW=${RK_PLAT_SOC}/drivers/dp/hdcp.bin
|
||||||
|
-$(eval $(call add_define,HDCPFW))
|
||||||
|
-
|
||||||
|
# CCACHE_EXTRAFILES is needed because ccache doesn't handle .incbin
|
||||||
|
export CCACHE_EXTRAFILES
|
||||||
|
${BUILD_PLAT}/bl31/pmu_fw.o: CCACHE_EXTRAFILES=$(RK3399M0FW)
|
||||||
|
${RK_PLAT_SOC}/drivers/pmu/pmu_fw.c: $(RK3399M0FW)
|
||||||
|
|
||||||
|
-${BUILD_PLAT}/bl31/cdn_dp.o: CCACHE_EXTRAFILES=$(HDCPFW)
|
||||||
|
-${RK_PLAT_SOC}/drivers/dp/cdn_dp.c: $(HDCPFW)
|
||||||
|
-
|
||||||
|
$(eval $(call MAKE_PREREQ_DIR,${BUILD_M0},${BUILD_PLAT}))
|
||||||
|
.PHONY: $(RK3399M0FW)
|
||||||
|
$(RK3399M0FW): | ${BUILD_M0}
|
Loading…
Reference in New Issue