Skip to content

[crypto] ABI compatibility test b/w for OTBN boot service app b/w frozen ROM and code changes #28634

@johannheyszl

Description

@johannheyszl

Description

This test should be done when changing code of the OTBN boot services app to check for ABI compatibilty.

Citing and slightly paraphrasing @cfrantz from comment in #28625:

ROM_EXT uses a boot services OTBN app frozen with the silicon's ROM. Testing during SW development will use fresh builds of the OTBN boot services app which are not the same as the frozen state in silicon. Any changes to OTBN code that affect this app need to be tested for ABI compatibility to make sure SW development of ROM_EXT will use this same ABI and work on silicon.

These symbols need to evaluate to the same values as the version that landed in ROM. Should they be different, the ROM_EXT and IMM_SECTION built after a change will be unable to interact with the program loaded into OTBN by ROM.

We can accept changes to the boot services program, but only if they are ABI compatible with the one that exists in ROM. A test is to check the symbol values (above) vs the ROM release Earlgrey-PROD-A2-M6-ROM-RC1.

@cfrantz checked out the ROM release and added this patch. When he ran the otbn_boot_services_functest, this leads:

kOtbnVarBootMode = 000000e0
kOtbnVarBootMsg = 00000100
kOtbnVarBootX = 00000160
kOtbnVarBootY = 00000180
kOtbnVarBootR = 00000120
kOtbnVarBootS = 00000140
kOtbnVarBootXr = 000001a0
kOtbnVarBootOk = 000000e4
kOtbnVarBootAttestationAdditionalSeed = 000001c0

@cfrantz then checked out #28625 ,applied the patch and ran the same test which led the same values. This should mean that the OTBN boot program is ABI compatible.

Note that we cannot include a newer version of the OTBN app into ROM_EXT because there isn't enough memory space.

cc @cfrantz and @nasahlpa

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions