Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutRoadmapCareersInternshipsFAQContactPrivacyTerms
Skip to lesson

Course contents

  • How to Use This Course
  • The NanoSoC Tour
  • Reading Path
  • SoC Glossary10
  • SoC Metrics Reference
  • SoC Cheatsheet
  • What SoC Integration Is12
  • Architecture and Budgets21
  • Memory Maps and Address Decode26
  • Interconnect and Bus Fabrics26
  • Clock and Reset Architecture24
  • Power Architecture21
  • Interrupts, DMA and Peripherals15
  • Memories, Boot and Security21
    • Memory Subsystem Integration
    • ECC and Error Handling
    • External Memory Controller Integration
    • Boot ROM and Boot Modes
    • eFuse and OTP
    • Secure Boot and Root of Trust
      • Chain of Trust and Immutable ROM
      • Image Authentication, Conceptually
      • Failure Handling and Recovery
    • Security Architecture
  • IP Integration and Handoff21
  • Top-Level Verification and Bring-up21
  • Package, Pads and I/O18
  • Chip Signoff and Tapeout18
  • SoC Interview Prep16
  • Capstone: Integrate NanoSoC14
Loading lesson

←Secure Boot and Root of Trust
  1. Topics
  2. SoC Design
  3. Memories, Boot and Security
  4. Secure Boot and Root of Trust
  5. Failure Handling and Recovery
On this page

    Part 8 of 14, lesson 18 of 21Part 8 of 14/Memories, Boot and Security/Lesson 18 of 21All levels

    Failure Handling and Recovery

    Refusing to boot safely: fail states, recovery images, and what the device tells the world.

    Why it matters

    This lesson has one job: define the behaviour when authentication fails. A device that halts with secrets in registers, retries forever on attacker-controlled input, or leaks which check failed gives away the rest of the design. The failure path needs the same specification effort as the pass path: a safe state, a bounded recovery, and silence about the cause.

    The core idea

    On failure the ROM enters a defined fail state: no jump, interrupts held, secrets cleared from reachable registers, and the device waits for an authorised recovery rather than retrying the rejected image. Recovery is a second, independently authenticated image path, typically a minimal loader over the same SPI link, itself verified against the same fused keys before it runs; an unauthenticated recovery path is a back door wearing a maintenance badge. The external world learns only that boot failed, never which of the four checks fired: distinguishing responses invite oracle attacks that probe one check at a time. Attempt counting with a fused monotonic counter can rate-limit physical probing, at the cost of a denial path the product must own deliberately.

    Diagram
    # not-run: recovery budget thinking, NanoSoC teaching values
    Recovery loader: a minimal SPI image under 2 KB, verified like any image.
    Fail-state power: clocks gated except the always-on domain; wake only on
      authorised recovery request, never on retry timers owned by the ROM.
    What the ROM never does: jump on fail, retry the same bytes, or report
      which check failed over any observable interface.

    What the review looks for

    • The fail state is specified register by register: what is cleared, what is held, what stays powered.

    • Recovery is authenticated to the same root with its own test images: good recovery boots, bad recovery refuses.

    • Failure observables are enumerated and carry no check-specific information: one fail indication for all causes.

    Verify and debug

    Fail each of the four checks separately and confirm identical external behaviour in all four cases: same indication, same safe state, same recovery offer. Then corrupt the recovery image and confirm it refuses too. If any failing case jumps, retries silently, or names its check on the UART, the failure path was specified as prose and implemented as hope.

    Recovery that bypasses verification: a maintenance loader that runs without authentication for factory convenience and ships enabled. Symptom: every authentication test passes while the device stays open. Caught by attempting recovery with a corrupt image in the test plan. Fix: authenticate recovery to the same root, and lock factory paths by lifecycle state.

    If asked what happens on authentication failure, answer with the three sentences: enter the safe state, offer only authenticated recovery, and disclose nothing about which check failed. Then explain why each sentence costs an attacker something.

    Check yourself Why must all four check failures look identical from outside?

    Because distinguishable failures let an attacker fix one check at a time against the device as an oracle. Uniform failure forces the attacker to satisfy every check blind, which is the whole point of having four of them.

    Related topics

    • Image Authentication, Conceptually

    • Next: Security Architecture

    Previous

    168 / 289

    Next: IP Collateral and Versioning

    Up next

    Up nextIP Collateral and Versioning

    Sign in to save progress

    Practice this lessonPrevious lessonReport an error

    See also

    • Chain of Trust and Immutable ROM