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-09 14:23:23 +0000 |
commit | 4a2e334030cf936cc5bc59b034b8bbbb6aa55caa (patch) | |
tree | 54435a786d6b927eeb8699397112af9cedf4e241 /chip/it83xx | |
parent | 9e82920e70ea835ec0744eb666a108f265f287fb (diff) | |
download | chrome-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 'chip/it83xx')
-rw-r--r-- | chip/it83xx/config_chip_it8xxx2.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/chip/it83xx/config_chip_it8xxx2.h b/chip/it83xx/config_chip_it8xxx2.h index 8716380f29..0bbfe89b59 100644 --- a/chip/it83xx/config_chip_it8xxx2.h +++ b/chip/it83xx/config_chip_it8xxx2.h @@ -87,6 +87,13 @@ || defined(CHIP_VARIANT_IT81302BX_512) \ || defined(CHIP_VARIANT_IT81202BX_1024) +/* + * Workaround mul instruction bug, see: + * https://www.ite.com.tw/uploads/product_download/it81202-bx-chip-errata.pdf + */ +#undef CONFIG_RISCV_EXTENSION_M +#define CONFIG_IT8XXX2_MUL_WORKAROUND + #if defined(CHIP_VARIANT_IT81302BX_512) #define CONFIG_FLASH_SIZE_BYTES 0x00080000 #define CONFIG_RAM_BASE 0x80080000 |