summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorLeila Lin <leilacy_lin@compal.corp-partner.google.com>2022-11-24 23:40:53 +0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-12-13 03:01:16 +0000
commit66bb9ab754a109bdeae44f0376bf1a87a0e1fd10 (patch)
tree9276f4ed050a0dedd895e49f9cf1e7e658b963a3 /core
parentd0df4832fef81ce55b9df6e374520c05db76b78c (diff)
downloadchrome-ec-66bb9ab754a109bdeae44f0376bf1a87a0e1fd10.tar.gz
hooks: Add HOOK_BODY_DETECT_CHANGE
Add HOOK_BODY_DETECT_CHANGE hook when CONFIG_BODY_DETECTION is enabled to notify body detection's state is changing. BRANCH=none BUG=b:232946420 TEST=zmake build winterhold and confirm that the notification of the hook has been received. Change-Id: Ied9afeef41ee14d7f2de1b423d94600d076bb975 Signed-off-by: Leila Lin <leilacy_lin@compal.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4054308 Tested-by: LeilaCY Lin <leilacy_lin@compal.corp-partner.google.com.test-google-a.com> Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: LeilaCY Lin <leilacy_lin@compal.corp-partner.google.com.test-google-a.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Diffstat (limited to 'core')
-rw-r--r--core/cortex-m/ec.lds.S6
-rw-r--r--core/cortex-m0/ec.lds.S6
-rw-r--r--core/host/host_exe.lds4
-rw-r--r--core/minute-ia/ec.lds.S6
-rw-r--r--core/nds32/ec.lds.S6
-rw-r--r--core/riscv-rv32i/ec.lds.S6
6 files changed, 34 insertions, 0 deletions
diff --git a/core/cortex-m/ec.lds.S b/core/cortex-m/ec.lds.S
index c11dc8f0a5..b6dc1dd7df 100644
--- a/core/cortex-m/ec.lds.S
+++ b/core/cortex-m/ec.lds.S
@@ -275,6 +275,12 @@ SECTIONS
KEEP(*(.rodata.HOOK_TABLET_MODE_CHANGE))
__hooks_tablet_mode_change_end = .;
+#ifdef CONFIG_BODY_DETECTION
+ __hooks_body_detect_change = .;
+ KEEP(*(.rodata.HOOK_BODY_DETECT_CHANGE))
+ __hooks_body_detect_change_end = .;
+#endif
+
__hooks_base_attached_change = .;
KEEP(*(.rodata.HOOK_BASE_ATTACHED_CHANGE))
__hooks_base_attached_change_end = .;
diff --git a/core/cortex-m0/ec.lds.S b/core/cortex-m0/ec.lds.S
index 3c2076b9e4..c59973ebff 100644
--- a/core/cortex-m0/ec.lds.S
+++ b/core/cortex-m0/ec.lds.S
@@ -155,6 +155,12 @@ SECTIONS
KEEP(*(.rodata.HOOK_TABLET_MODE_CHANGE))
__hooks_tablet_mode_change_end = .;
+#ifdef CONFIG_BODY_DETECTION
+ __hooks_body_detect_change = .;
+ KEEP(*(.rodata.HOOK_BODY_DETECT_CHANGE))
+ __hooks_body_detect_change_end = .;
+#endif
+
__hooks_base_attached_change = .;
KEEP(*(.rodata.HOOK_BASE_ATTACHED_CHANGE))
__hooks_base_attached_change_end = .;
diff --git a/core/host/host_exe.lds b/core/host/host_exe.lds
index b4c94c12ff..05943b408a 100644
--- a/core/host/host_exe.lds
+++ b/core/host/host_exe.lds
@@ -85,6 +85,10 @@ SECTIONS {
KEEP(*(.rodata.HOOK_TABLET_MODE_CHANGE))
__hooks_tablet_mode_change_end = .;
+ __hooks_body_detect_change = .;
+ KEEP(*(.rodata.HOOK_BODY_DETECT_CHANGE))
+ __hooks_body_detect_change_end = .;
+
__hooks_base_attached_change = .;
KEEP(*(.rodata.HOOK_BASE_ATTACHED_CHANGE))
__hooks_base_attached_change_end = .;
diff --git a/core/minute-ia/ec.lds.S b/core/minute-ia/ec.lds.S
index be3e0fbf2e..81668fecc7 100644
--- a/core/minute-ia/ec.lds.S
+++ b/core/minute-ia/ec.lds.S
@@ -122,6 +122,12 @@ SECTIONS
KEEP(*(.rodata.HOOK_TABLET_MODE_CHANGE))
__hooks_tablet_mode_change_end = .;
+#ifdef CONFIG_BODY_DETECTION
+ __hooks_body_detect_change = .;
+ KEEP(*(.rodata.HOOK_BODY_DETECT_CHANGE))
+ __hooks_body_detect_change_end = .;
+#endif
+
__hooks_base_attached_change = .;
KEEP(*(.rodata.HOOK_BASE_ATTACHED_CHANGE))
__hooks_base_attached_change_end = .;
diff --git a/core/nds32/ec.lds.S b/core/nds32/ec.lds.S
index 87f6d2041a..b97af1a679 100644
--- a/core/nds32/ec.lds.S
+++ b/core/nds32/ec.lds.S
@@ -151,6 +151,12 @@ SECTIONS
KEEP(*(.rodata.HOOK_TABLET_MODE_CHANGE))
__hooks_tablet_mode_change_end = .;
+#ifdef CONFIG_BODY_DETECTION
+ __hooks_body_detect_change = .;
+ KEEP(*(.rodata.HOOK_BODY_DETECT_CHANGE))
+ __hooks_body_detect_change_end = .;
+#endif
+
__hooks_base_attached_change = .;
KEEP(*(.rodata.HOOK_BASE_ATTACHED_CHANGE))
__hooks_base_attached_change_end = .;
diff --git a/core/riscv-rv32i/ec.lds.S b/core/riscv-rv32i/ec.lds.S
index e62a7d1427..015ed12548 100644
--- a/core/riscv-rv32i/ec.lds.S
+++ b/core/riscv-rv32i/ec.lds.S
@@ -199,6 +199,12 @@ SECTIONS
KEEP(*(.rodata.HOOK_TABLET_MODE_CHANGE))
__hooks_tablet_mode_change_end = .;
+#ifdef CONFIG_BODY_DETECTION
+ __hooks_body_detect_change = .;
+ KEEP(*(.rodata.HOOK_BODY_DETECT_CHANGE))
+ __hooks_body_detect_change_end = .;
+#endif
+
__hooks_base_attached_change = .;
KEEP(*(.rodata.HOOK_BASE_ATTACHED_CHANGE))
__hooks_base_attached_change_end = .;