summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods/meta-ast2500/recipes-bsp/u-boot/files/0053-Disable-SoC-debug-feature.patch
blob: 999afedf79b1c9e9726865b676e8266d68e5c087 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
From 39d80e444fb704e48d0163735ae181117e2e1adf Mon Sep 17 00:00:00 2001
From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
Date: Fri, 20 Nov 2020 10:59:10 -0800
Subject: [PATCH] Disable SoC debug feature

This commit disables Aspeed SoC debug feature due to security
concerns.

Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
---
 arch/arm/mach-aspeed/platform_g5.S | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/mach-aspeed/platform_g5.S b/arch/arm/mach-aspeed/platform_g5.S
index ef43d5d400c1..2c8bf03b0eff 100644
--- a/arch/arm/mach-aspeed/platform_g5.S
+++ b/arch/arm/mach-aspeed/platform_g5.S
@@ -582,6 +582,14 @@ espi_early_init_done:
     mov   r1, #0xAE
     str   r1, [r0]
 
+#if !defined(CONFIG_ASPEED_SOC_DEBUG)
+    /* Disable SoC debug */
+    ldr   r0, =0x1e6e202c
+    ldr   r1, [r0]
+    orr   r1, r1, #0x400
+    str   r1, [r0]
+#endif
+
 #ifdef CONFIG_HW_WATCHDOG
     /* Enable WDT2 to recover u-boot hang */
     ldr   r0, =0x1e785024
-- 
2.17.1