S10.8.2 Which World Owns This Peripheral

MediumImplement22 minIcarus Verilog · serverReview the topic

Assign registers, SRAM, service interrupts and debug transactions using one board policy.

Hardware context: Firmware handoff and world gate. Secure boot and peripheral isolation

Use this exercise policy. Secure firmware owns the watchdog, its interrupt and SRAM pages 0 through 2. The normal OS owns UART and its interrupt.

This worksheet uses named constants. The first three entries show how to record your decisions.

Signals in the Timeline

SignalWidthRole
question8input of each check
Full specification

Routes use code 1 for secure and 2 for normal. Transactions use 0 for deny and 1 for allow. Both worlds may read the public ID. Only the owning world may acknowledge its interrupt or write its device.

Debug reads of protected SRAM require both a fresh authenticated service session and the service lifecycle. Normal software cannot read protected SRAM. Normal SRAM is readable by either software world.

EntryYour decision
UART_ROUTEDestination code for the UART interrupt?
DOG_ROUTEDestination code for the watchdog interrupt?
ID_READNormal software reads the public ID. Allow?
DOG_WRITENormal software writes the watchdog. Allow?
DOG_ACKNormal software acknowledges a watchdog event. Allow?
UART_WRITESecure software writes UART. Allow?
NORMAL_RAMSecure software reads page 3. Allow?
SERVICEFreshly authenticated debug reads page 2 in service lifecycle. Allow?
FIELDFreshly authenticated debug reads page 2 in field lifecycle. Allow?
SESSIONUnauthenticated debug reads page 2 in service lifecycle. Allow?
NORMAL_READNormal software reads SRAM page PAGE. Allow?

Examples

Example 1

UART ROUTE
Input
Destination code for the UART interrupt?
Output
matches = 1

The normal OS services UART.

Example 2

DOG ROUTE
Input
Destination code for the watchdog interrupt?
Output
matches = 1

The secure handler owns the watchdog.

Example 3

ID READ
Input
Normal software reads the public ID. Allow?
Output
matches = 1

Both worlds may read this word.

Constraints and Contract

  • Keep the parameter and named constants. Use the numeric codes and units on this page.
  • For NORMAL_READ, enter a constant expression using PAGE. Only this entry changes with the parameter. The supported integer range is 0 through 15, inclusive.
  • Replace each unfinished FF entry with your decision.

Hints

Hint 1

Resolve world or debug lifecycle before looking up rights.

Hint 2

Reads, writes and interrupt acknowledgements have different effects.

Hint 3

Follow each event to the software permitted to clear it.

What the grader checks: Each check compares the full eight-bit answer. Parameter trials change one condition and keep the other decisions fixed.

11 checks on Icarus Verilog · server. Run the examples first, then check the full regression. Full checks use the server judge. Downloads contain your source only; samples require the simulation service. A passing result establishes the tested cases, not a proof for all possible inputs.

See all 2 problems on this path

Report a problem with this page

Your code SystemVerilogSaved locally
Ln 1, Col 1Tab indents · Ctrl/⌘ + Enter runs samples
Not run yet

UART ROUTE

Input
Destination code for the UART interrupt?
Expected output
matches = 1

The normal OS services UART.

Run samples executes all 3 public checks. Check all tests runs 11 checks on the server.

Icarus Verilog · server