[rom_ext] Add support for owner FW image constraints in owner info page
- Dominant language
- SystemVerilog
- Stars
- 3.6k
- Forks
- 1.1k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 141
Description
### Description
The ChromeOS owner firmware has the notion of locking a FW image to a certain lifecycle of a ChromeOS device. Specifically we create two types of images: prePVT and MP. The MP images can be run on any device, but prePVT images can only be run on ChromeOS device that are in development and will never be shipped to customers.
The way we enforce this is through values in the owner firmware manifest (or equivalent) and values in a protected owner INFO page. Specifically the value (i.e. mask) in the signed manifest header for an image needs to be bit-wise `AND`ed with the value in the owner INFO page. If the resulting value matches the value (i.e. mask), then the image is allowed to run. If it does not match, then the image is invalid for that device.
Concrete examples:
INFO page value is `0x7f7f` (represents a ChromeOS device in proto, EVT, or DVT lifecycle)
INFO page value is `0x7f80` (represents a ChromeOS device in Mass Production lifecycle)
The manifest header constraint value of `0x0000` represent an image that can run on any device.
The manifest header constraint value of `0x0010` represent an image that can only run on prePVT ChromeOS devices (note there are other valid values that could achieve as well).
| | Constraint value 0x0000 | Constraint value 0x0010 |
| --- | --- | --- |
| INFO Value `0x7f7f` | Boot | Boot |
| INFO Value `0x7f80` | Boot | No Boot |
Furthermore, the ROM_EXT needs to protect the INFO page as read/write only (without giving the erase permission) unless certain conditions are met -- see more below. This means that normal owner firmware can use this INFO page for software, write-once "fuses".
With a special owner firmware image, this owner INFO page that is normally not erasable should become erasible by owner firmware if the following conditions are met:
* The owner firmware is lock to a specific device id
* The owner firmware has special-usage bit set to true (indicating that it should have erase access to this INFO page)
* The owner firmware must be signed with production key (not developer key)
Only if all of the above conditions are met, the ROM_EXT allows erase on the special INFO page.
Contributor guide
Assessment
This issue has not been assessed yet.