mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-08 16:41:55 +00:00
CR50: enable dcrypto random stalls
Clean up a lingering TODO; enable random stalls (NOPs) at ~6% for crypto operations. BRANCH=none BUG=none TEST=TCG tests pass Change-Id: I46b2755d9f501eb4ec98c3184d1e14fbf118c718 Signed-off-by: nagendra modadugu <ngm@google.com> Reviewed-on: https://chromium-review.googlesource.com/501349 Commit-Ready: Nagendra Modadugu <ngm@google.com> Tested-by: Nagendra Modadugu <ngm@google.com> Reviewed-by: Marius Schilder <mschilder@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-by: Paul Scheidt <pscheidt@google.com>
This commit is contained in:
committed by
chrome-bot
parent
4ecdf78793
commit
70f2088b41
@@ -30,9 +30,12 @@ void dcrypto_init(void)
|
||||
REG_WRITE_MLV(GR_PMU_RST0, GC_PMU_RST0_DCRYPTO0_MASK,
|
||||
GC_PMU_RST0_DCRYPTO0_LSB, 0);
|
||||
|
||||
/* Turn off random nops (for accurate measuring here). */
|
||||
/* TODO(ngm): enable for production. */
|
||||
GREG32(CRYPTO, RAND_STALL_CTL) = 0;
|
||||
/* Turn off random nops (which are enabled by default). */
|
||||
GWRITE_FIELD(CRYPTO, RAND_STALL_CTL, STALL_EN, 0);
|
||||
/* Configure random nop percentage at 6%. */
|
||||
GWRITE_FIELD(CRYPTO, RAND_STALL_CTL, FREQ, 3);
|
||||
/* Now turn on random nops. */
|
||||
GWRITE_FIELD(CRYPTO, RAND_STALL_CTL, STALL_EN, 1);
|
||||
|
||||
/* Initialize DMEM. */
|
||||
ptr = GREG32_ADDR(CRYPTO, DMEM_DUMMY);
|
||||
|
||||
Reference in New Issue
Block a user