This event has been canceled with a note:
"Hi, No topic planned for today. Thanks & Regards, Olivier."
TF-A Tech Forum
Thursday Feb 20, 2025 ⋅ 5pm – 6pm
Central European Time - Paris
We run an open technical forum call for anyone to participate and it is not
restricted to Trusted Firmware project members. It will operate under the
guidance of the TF TSC. Feel free to forward this invite to colleagues.
Invites are via the TF-A mailing list and also published on the Trusted
Firmware website. Details are here:
https://www.trustedfirmware.org/meetings/tf-a-technical-forum/Trusted
Firmware is inviting you to a scheduled Zoom meeting.Join Zoom
Meetinghttps://linaro-org.zoom.us/my/trustedfirmware?pwd=VktXcm5MNUUyVVM4R0k3ZUtvdU84QT09
One tap mobile+16465588656,,9159704974# US (New
York)+16699009128,,9159704974# US (San Jose)Dial by your location +1
646 558 8656 US (New York) +1 669 900 9128 US (San Jose) 877
853 5247 US Toll-free 888 788 0099 US Toll-freeMeeting ID: 915 970
4974Find your local number: https://zoom.us/u/ad27hc6t7h
Guests
tf-a(a)lists.trustedfirmware.org
~~//~~
Invitation from Google Calendar: https://calendar.google.com/calendar/
You are receiving this email because you are an attendee on the event.
Forwarding this invitation could allow any recipient to send a response to
the organizer, be added to the guest list, invite others regardless of
their own invitation status, or modify your RSVP.
Learn more https://support.google.com/calendar/answer/37135#forwarding
Hi,
I have a question regarding the TBBR implementation for non-volatile counters in TF-A.
While looking through the code and documentation for Trusted Boot authentication options, it was not clear why there are only two non-volatile counters for the Trusted and Non-Trusted worlds (`TRUSTED_FW_NVCOUNTER` and `NON_TRUSTED_FW_NVCOUNTER`). This is true for the Arm DEN0006D specification, but it was retired and ARM DEN0072 is the current specification. Is there any specific reason why there isn't a counter for each authenticated image declared and created by `cert_create` or is the retired specification the only reason? This limits the non-volatile counter extensions for all certificates, meaning that the Trusted OS content certificate for example cannot be authenticated with another extension, unless I add a custom certificate with another non-volatile counter extension and a new command line option.
To quote the ARM DEN0072 TBBR specification [source: https://developer.arm.com/documentation/den0072/latest]: "It is recommended to implement as many version counters as there are images, where each image can use a separate counter without affecting other images. However, the number of rollback counters that can practically be supported is implementation dependent.".
Thank you!
This event has been canceled with a note:
"Hi, Cancelling as no topic proposed this week. Regards, Olivier. "
TF-A Tech Forum
Thursday Feb 6, 2025 ⋅ 5pm – 6pm
Central European Time - Paris
We run an open technical forum call for anyone to participate and it is not
restricted to Trusted Firmware project members. It will operate under the
guidance of the TF TSC. Feel free to forward this invite to colleagues.
Invites are via the TF-A mailing list and also published on the Trusted
Firmware website. Details are here:
https://www.trustedfirmware.org/meetings/tf-a-technical-forum/Trusted
Firmware is inviting you to a scheduled Zoom meeting.Join Zoom
Meetinghttps://linaro-org.zoom.us/my/trustedfirmware?pwd=VktXcm5MNUUyVVM4R0k3ZUtvdU84QT09
One tap mobile+16465588656,,9159704974# US (New
York)+16699009128,,9159704974# US (San Jose)Dial by your location +1
646 558 8656 US (New York) +1 669 900 9128 US (San Jose) 877
853 5247 US Toll-free 888 788 0099 US Toll-freeMeeting ID: 915 970
4974Find your local number: https://zoom.us/u/ad27hc6t7h
Guests
tf-a(a)lists.trustedfirmware.org
~~//~~
Invitation from Google Calendar: https://calendar.google.com/calendar/
You are receiving this email because you are an attendee on the event.
Forwarding this invitation could allow any recipient to send a response to
the organizer, be added to the guest list, invite others regardless of
their own invitation status, or modify your RSVP.
Learn more https://support.google.com/calendar/answer/37135#forwarding
Hi
I tried to turn on encryption in BL31.
And, I met some trouble.
Here is my code.
```
static struct plat_io_policy policies[] = {
...
[BL31_IMAGE_ID] = {&enc_dev_handle, &bl31_uuid_spec, check_enc_fip},
....
[ENC_IMAGE_ID] = {&fip_dev_handle, NULL, check_fip}
}
int plat_get_image_source(...) {
...
policy = &policies[image_id];
ret = policy->check[policy->image_spec];
...
}
static int check_fip(const uintptr_t spec)
{
int ret;
ret = io_dev_open(fip_dev_con, (uintptr_t)NULL, &fip_dev_handle);
if (ret) {
ERROR("io_dev_open failed for FIP (%d)\n", ret);
return ret;
}
ret = io_dev_init(fip_dev_handle, fip_image_id);
if (ret) {
ERROR("io_dev_init failed for FIP image id %lu (%d)\n",
fip_image_id, ret);
io_dev_close(fip_dev_handle);
}
return ret;
}
static int check_enc_fip(const uintptr_t spec)
{
int result;
uintptr_t local_image_handle;
/* See if a Firmware Image Package is available */
result = io_dev_open(enc_dev_con, (uintptr_t)NULL, &enc_dev_handle);
if (result) {
ERROR("io_dev_open failed for FIP (%d)\n", result);
return result;
}
result = io_dev_init(enc_dev_handle, (uintptr_t)ENC_IMAGE_ID);
if (result != 0)
return result;
return result;
}
```
But, I can't boot successfully.
Below is log.
```
INFO: Image id=3 loaded: 0x40800000 - 0x4080e299
INFO: BL2: Loading image id 5
WARNING: ===== allocate_dev_info 1 =====
WARNING: ==== -12 ====
ERROR: io_dev_open failed for FIP (-12)
ERROR: Image id 11 open failed with -12
WARNING: Failed to obtain reference to image id=11 (-12)
ERROR: BL2: Failed to load image id 5 (-12)
```
And, I found root cause in `allocate_dev_info` and `free_dev_info` in
`drivers/io/io_fip.c`
In `allocate_dev_info`, there is a count, `fip_dev_count`, increasing by 1
after calling `fip_dev_open`
There is a check. The value of MAX_FIP_DEVICES is 1.
```
if (fip_dev_count < (unsigned int)MAX_FIP_DEVICES) {
unsigned int index = 0;
result = find_first_fip_state(0, &index);
assert(result == 0);
/* initialize dev_info */
dev_info_pool[index].funcs = &fip_dev_funcs;
dev_info_pool[index].info =
(uintptr_t)&state_pool[index];
*dev_info = &dev_info_pool[index];
++fip_dev_count;
}
```
And, in `fip_dev_close`, The `fip_dev_count` will be decreased by 1.
However, The root casue is it call fip_dev_open but not calling
fip_dev_close.
It cause the `fip_dev_count` not be decreased by 1.
Now, I have two solution.
1. Increasing the MAX_FIP_DEVICES, it will be working.
2. Add the io_dev_close in `enc_dev_close` in `driver/io_/io_encrypted.c`.
And, it will call the fip_dev_close. It will be working.
Do you have any idea in this solution ?
Which solution is more general ?
Thanks !