summaryrefslogtreecommitdiff
path: root/include/config.h
diff options
context:
space:
mode:
authorDino Li <Dino.Li@ite.com.tw>2022-06-06 15:59:08 +0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-06-09 14:23:23 +0000
commit4a2e334030cf936cc5bc59b034b8bbbb6aa55caa (patch)
tree54435a786d6b927eeb8699397112af9cedf4e241 /include/config.h
parent9e82920e70ea835ec0744eb666a108f265f287fb (diff)
downloadchrome-ec-4a2e334030cf936cc5bc59b034b8bbbb6aa55caa.tar.gz
it8xxx2: The "M" extension is disabled by default
There is a mul instruction bug. The bug may cause instructions of writing back CPU GPR (e.g mv a0,s2) which following the mul instruction to fail. This patch disables the 'M' extension and overwrite integer multiplication and division arithmetic library routines with using hardware multiplication and division and nop instructions. This will ensure that there is no write back GPR instruction to follow mul instruction to avoid the bug. BUG=b:235297478 BRANCH=asurada,cherry,icarus TEST=- buildall - The "M" extension is disabled on cherry image (-march=rv32iac) Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Change-Id: I39b34a91dd77d975b78b6756494691c6b28dc42d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3690042 Reviewed-by: Eric Yilun Lin <yllin@google.com>
Diffstat (limited to 'include/config.h')
-rw-r--r--include/config.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/config.h b/include/config.h
index c255f593da..c436155d95 100644
--- a/include/config.h
+++ b/include/config.h
@@ -2879,6 +2879,12 @@
#undef CONFIG_IT83XX_VCC_3P3V
/*
+ * Overwrite integer multiplication and division arithmetic library routines
+ * with using hardware multiplication and division and nop instructions.
+ */
+#undef CONFIG_IT8XXX2_MUL_WORKAROUND
+
+/*
* Support the standard integer multiplication and division instruction
* extension.
*/