Skip to content

[rtl] Protect Ibex clock gate against faults - #2565

Merged
nasahlpa merged 1 commit into
lowRISC:masterfrom
nasahlpa:ibex_clock_gate_protection
Nov 19, 2026
Merged

nasahlpa merged 1 commit into
lowRISC:masterfrom
nasahlpa:ibex_clock_gate_protection

Conversation

@nasahlpa

@nasahlpa nasahlpa commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Faulting the clock enable (gate) signal is not detected by the lockstep comparison as both cores are then halted.

To protect against this FI threat, redundantly compute the clock enable signal and check whether the gated clock is running as expected or not.

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@nasahlpa

nasahlpa commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document. By submitting this pull request comment, I am hereby confirming my acceptance of the terms of the CLA Document and my agreement to be legally bound by its terms.

@vogelpi vogelpi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR and sorry for the review delay @nasahlpa . I think we should build a mini-lockstep running on the ungated clock for the core_busy_o signal only. If I understand correctly, the current implementation is not robust. But maybe best to discuss in person on Monday.

Comment thread doc/03_reference/security.rst Outdated
When Ibex is configured with the SecureIbex parameter, the core clock gate is checked.
A fault on the clock enable logic or on the clock gate could stop the core clock while the core should be running.
As both cores of the dual core lockstep and the lockstep comparison are clocked by the gated clock, the lockstep cannot detect this.
To mitigate this thread, the clock enable is recomputed from an independent copy of the core busy register and the gated clock is observed using a toggle flop that is sampled in the ungated clock domain.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thread -> threat

Comment thread rtl/ibex_top.sv Resolved
Faulting the clock enable (gate) signal is not detected by the lockstep
comparison as both cores are then halted.

To protect against this FI threat, redundantly compute the clock enable
signal and check whether the gated clock is running as expected or not.

Signed-off-by: Pascal Nasahl <nasahlpa@lowrisc.org>
@nasahlpa
nasahlpa force-pushed the ibex_clock_gate_protection branch from a9557f0 to 6de6b08 Compare November 19, 2026 09:16
@nasahlpa
nasahlpa added this pull request to the merge queue Nov 19, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 19, 2026
@nasahlpa
nasahlpa added this pull request to the merge queue Nov 19, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 19, 2026
@nasahlpa
nasahlpa added this pull request to the merge queue Nov 19, 2026
Merged via the queue into lowRISC:master with commit f5b1439 Nov 19, 2026
13 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants