diff options
author | Dino Li <Dino.Li@ite.com.tw> | 2022-06-06 15:59:08 +0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-06-14 10:16:42 +0000 |
commit | 689870d95ca5318942bb6e653ebd2375ace32ab1 (patch) | |
tree | a41b9be58abbde49c3fdb8353b2bec4172de5a62 /include/config.h | |
parent | 7453254050089ab085eda60c6d21c387fc29414a (diff) | |
download | chrome-ec-firmware-icarus-12574.B.tar.gz |
it8xxx2: The "M" extension is disabled by defaultfirmware-icarus-12574.B
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>
(cherry picked from commit 4a2e334030cf936cc5bc59b034b8bbbb6aa55caa)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3705076
Diffstat (limited to 'include/config.h')
-rw-r--r-- | include/config.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/config.h b/include/config.h index ee84db0291..cb364d5516 100644 --- a/include/config.h +++ b/include/config.h @@ -2643,6 +2643,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. */ |