Skip to content

Backport 27468 ([rescue,opentitanlib,test] Add functional test for GetOwnerPage)#29320

Open
pamaury wants to merge 4 commits intolowRISC:masterfrom
pamaury:backport_27468
Open

Backport 27468 ([rescue,opentitanlib,test] Add functional test for GetOwnerPage)#29320
pamaury wants to merge 4 commits intolowRISC:masterfrom
pamaury:backport_27468

Conversation

@pamaury
Copy link
Contributor

@pamaury pamaury commented Feb 16, 2026

Backport #27468, depends on #29319

@pamaury pamaury requested review from a team and cfrantz as code owners February 16, 2026 10:45
@pamaury pamaury requested review from jwnrt and moidx and removed request for a team February 16, 2026 10:45
The rescue mode validation logic was updated to immediately return bad
mode if a prior error occurred and the selected service exclusively
supports either upload or download operations in the DFU implementation.

This change ensures that `opentitantool` receives an error when
sending a disallowed command for uni-directional services. However,
for services supporting both upload and download, the `opentitantool`
might not receive an error for a disallowed command depending on the
owner configuration (e.g., when only upload or download is permitted).

Signed-off-by: Anthony Chen <antchen@google.com>
(cherry picked from commit a140bc0)
This adds the `empty` function in BootSvc for creating the Empty boot
service request and updates the Rescue trait.

Signed-off-by: Anthony Chen <antchen@google.com>
(cherry picked from commit 54ff8f5)
This introduces a new test to verify rescue command disabilities. It
uses the owner block binary if provided; otherwise, it captures the
owner page 0 Base64 data from the UART console.

The test analyzes the owner block to identify disallowed rescue commands
and then attempts to execute each of them. This ensures that the device
correctly enforces the configured restrictions.

The testing approach differs slightly between rescue protocols:

- XMODEM: The test directly examines the result of the rescue operation
 to confirm if a command was disallowed by the device.
- DFU: Due to the potential for the rescue operation result to be
 inconclusive, the test primarily relies on analyzing device logs to
 determine if a command was rejected. Only when informative device logs
 are absent will the test fall back to checking the rescue operation
 result.

Signed-off-by: Anthony Chen <antchen@google.com>
(cherry picked from commit 0fe7506)
This introduces the test to verify the functionality of the
`GetOwnerPage` rescue command.

The `get_boot_log_test` verifies the retrieved OwnerPage against the
owner block binary if provided; otherwise it verifies against the owner
page 0 base64 data captured from the UART console.

Signed-off-by: Anthony Chen <antchen@google.com>
(cherry picked from commit f96ed8e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments