<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/coreboot/arm-trusted-firmware.git/drivers, branch topics/clang-format</title>
<subtitle>review.coreboot.org: arm-trusted-firmware.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/arm-trusted-firmware.git/'/>
<entry>
<title>Merge "fix(mbedtls): fix mbedtls coverity issues" into integration</title>
<updated>2023-03-03T09:54:43+00:00</updated>
<author>
<name>Manish V Badarkhe</name>
<email>manish.badarkhe@arm.com</email>
</author>
<published>2023-03-03T09:54:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/arm-trusted-firmware.git/commit/?id=88844f6de20ed72c5dd5e9d7fdfc6a68280e3faf'/>
<id>88844f6de20ed72c5dd5e9d7fdfc6a68280e3faf</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(auth): use a single function for parsing extensions</title>
<updated>2023-03-02T16:48:43+00:00</updated>
<author>
<name>Demi Marie Obenour</name>
<email>demiobenour@gmail.com</email>
</author>
<published>2023-01-28T20:15:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/arm-trusted-firmware.git/commit/?id=a987b89dab15ab7e79063aa085e696dcdb6feffe'/>
<id>a987b89dab15ab7e79063aa085e696dcdb6feffe</id>
<content type='text'>
Previously, extensions were parsed twice: once with error checking for
validation, and a second time without error checking to extract the
extension data.  This is error prone and caused TFV-10 (CVE-2022-47630).

A simpler approach is to have get_ext() be responsible for all extension
parsing, and to treat a NULL OID as an indicator that get_ext() is only
being called for validation.  cert_parse() checks that get_ext() returns
IMG_PARSER_OK and fails otherwise.

Change-Id: I65a2ff053a188351ba54799827a2b7bd833bb037
Signed-off-by: Demi Marie Obenour &lt;demiobenour@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, extensions were parsed twice: once with error checking for
validation, and a second time without error checking to extract the
extension data.  This is error prone and caused TFV-10 (CVE-2022-47630).

A simpler approach is to have get_ext() be responsible for all extension
parsing, and to treat a NULL OID as an indicator that get_ext() is only
being called for validation.  cert_parse() checks that get_ext() returns
IMG_PARSER_OK and fails otherwise.

Change-Id: I65a2ff053a188351ba54799827a2b7bd833bb037
Signed-off-by: Demi Marie Obenour &lt;demiobenour@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(mbedtls): fix mbedtls coverity issues</title>
<updated>2023-03-01T12:51:43+00:00</updated>
<author>
<name>Govindraj Raja</name>
<email>govindraj.raja@arm.com</email>
</author>
<published>2023-02-28T11:37:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/arm-trusted-firmware.git/commit/?id=a9edc32c8964ffe047909b4847edd710b5879f35'/>
<id>a9edc32c8964ffe047909b4847edd710b5879f35</id>
<content type='text'>
commit (a8eadc51a refactor(mbedtls): avoid including
MBEDTLS_CONFIG_FILE) avoids using config file directly and relies on
config file usage from mbedtls version.h

But we could build trusted boot without mbedtls dir so guard version.h
include in cot_def.h with availability of config file.

Also we refactored in same commit to break dependencies between
auth_mod.h and cot_def.h, So add cot_def.h include in nxp tbbr
cot file.

Change-Id: I4779e90c18f04c73d2121c88df6420b4b1109c8b
Signed-off-by: Govindraj Raja &lt;govindraj.raja@arm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit (a8eadc51a refactor(mbedtls): avoid including
MBEDTLS_CONFIG_FILE) avoids using config file directly and relies on
config file usage from mbedtls version.h

But we could build trusted boot without mbedtls dir so guard version.h
include in cot_def.h with availability of config file.

Also we refactored in same commit to break dependencies between
auth_mod.h and cot_def.h, So add cot_def.h include in nxp tbbr
cot file.

Change-Id: I4779e90c18f04c73d2121c88df6420b4b1109c8b
Signed-off-by: Govindraj Raja &lt;govindraj.raja@arm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(auth): clean up certificate length checks</title>
<updated>2023-02-27T19:08:28+00:00</updated>
<author>
<name>Demi Marie Obenour</name>
<email>demiobenour@gmail.com</email>
</author>
<published>2023-01-19T14:50:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/arm-trusted-firmware.git/commit/?id=ddd9f6757e61ca9abe682eeb8d6dc3b16ef1044c'/>
<id>ddd9f6757e61ca9abe682eeb8d6dc3b16ef1044c</id>
<content type='text'>
The previous code was correct but unnecessarily verbose.

Change-Id: Ia19c667811a7c3b6957a0274d36076b0b16e36b7
Signed-off-by: Demi Marie Obenour &lt;demiobenour@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The previous code was correct but unnecessarily verbose.

Change-Id: Ia19c667811a7c3b6957a0274d36076b0b16e36b7
Signed-off-by: Demi Marie Obenour &lt;demiobenour@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(auth): remove code duplication</title>
<updated>2023-02-27T19:08:28+00:00</updated>
<author>
<name>Demi Marie Obenour</name>
<email>demiobenour@gmail.com</email>
</author>
<published>2023-01-19T14:46:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/arm-trusted-firmware.git/commit/?id=6a7104a324ce67c5585c9a75ff9e48fa15408fa5'/>
<id>6a7104a324ce67c5585c9a75ff9e48fa15408fa5</id>
<content type='text'>
The unique IDs are handled identically, so just use a for loop to get
both of them.

Change-Id: I44baaa4747ca7f314d364a79dfcbce97315f5a92
Signed-off-by: Demi Marie Obenour &lt;demiobenour@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The unique IDs are handled identically, so just use a for loop to get
both of them.

Change-Id: I44baaa4747ca7f314d364a79dfcbce97315f5a92
Signed-off-by: Demi Marie Obenour &lt;demiobenour@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge changes I960771e6,I291dc627,I57f31664 into integration</title>
<updated>2023-02-27T15:59:56+00:00</updated>
<author>
<name>Madhukar Pappireddy</name>
<email>madhukar.pappireddy@arm.com</email>
</author>
<published>2023-02-27T15:59:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/arm-trusted-firmware.git/commit/?id=55a328305a555252931fe94372db31112983e7c7'/>
<id>55a328305a555252931fe94372db31112983e7c7</id>
<content type='text'>
* changes:
  fix(ufs): set the PRDT length field properly
  fix(ufs): flush the entire PRDT
  fix(ufs): only allow using one slot
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* changes:
  fix(ufs): set the PRDT length field properly
  fix(ufs): flush the entire PRDT
  fix(ufs): only allow using one slot
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge changes from topic "mbedtls3_support" into integration</title>
<updated>2023-02-27T15:32:21+00:00</updated>
<author>
<name>Manish V Badarkhe</name>
<email>manish.badarkhe@arm.com</email>
</author>
<published>2023-02-27T15:32:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/arm-trusted-firmware.git/commit/?id=766d78b1cf8612e97e5363469b83f002a534715f'/>
<id>766d78b1cf8612e97e5363469b83f002a534715f</id>
<content type='text'>
* changes:
  feat(stm32mp1): add mbedtls-3.3 support config
  refactor(fvp): minor cleanup with TRUSTED_BOARD_BOOT
  style(crypto): add braces for if statement
  feat(fvp): increase BL1_RW and BL2 size
  feat(mbedtls): add support for mbedtls-3.3
  refactor(crypto): avoid using struct mbedtls_pk_rsassa_pss_options
  refactor(mbedtls): avoid including MBEDTLS_CONFIG_FILE
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* changes:
  feat(stm32mp1): add mbedtls-3.3 support config
  refactor(fvp): minor cleanup with TRUSTED_BOARD_BOOT
  style(crypto): add braces for if statement
  feat(fvp): increase BL1_RW and BL2 size
  feat(mbedtls): add support for mbedtls-3.3
  refactor(crypto): avoid using struct mbedtls_pk_rsassa_pss_options
  refactor(mbedtls): avoid including MBEDTLS_CONFIG_FILE
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(ufs): set the PRDT length field properly</title>
<updated>2023-02-25T14:32:44+00:00</updated>
<author>
<name>Jorge Troncoso</name>
<email>jatron@google.com</email>
</author>
<published>2023-02-22T23:30:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/arm-trusted-firmware.git/commit/?id=20fdbcf502bd457a4b74ffa9a610d573594f1f6c'/>
<id>20fdbcf502bd457a4b74ffa9a610d573594f1f6c</id>
<content type='text'>
The PRDT length field contains the count of the entries in the PRDT. See
JEDEC Standard No. 223E, section 6.1.1, "UTP Transfer Request
Descriptor," page 66. Previously we were setting the PRDT length field
to the number of bytes in the PRDT divided by four (the size in units of
32 bits). This was incorrect according to the spec.

Signed-off-by: Jorge Troncoso &lt;jatron@google.com&gt;
Change-Id: I960771e6ce57002872392993042fae9ec505447e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The PRDT length field contains the count of the entries in the PRDT. See
JEDEC Standard No. 223E, section 6.1.1, "UTP Transfer Request
Descriptor," page 66. Previously we were setting the PRDT length field
to the number of bytes in the PRDT divided by four (the size in units of
32 bits). This was incorrect according to the spec.

Signed-off-by: Jorge Troncoso &lt;jatron@google.com&gt;
Change-Id: I960771e6ce57002872392993042fae9ec505447e
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(ufs): flush the entire PRDT</title>
<updated>2023-02-25T14:32:43+00:00</updated>
<author>
<name>Jorge Troncoso</name>
<email>jatron@google.com</email>
</author>
<published>2023-02-22T09:41:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/arm-trusted-firmware.git/commit/?id=83ef8698f9d1477c892cad15b4e48574ed634903'/>
<id>83ef8698f9d1477c892cad15b4e48574ed634903</id>
<content type='text'>
Previously, if the image being read exceeded 12,800 KB (or 50 PRDT
entries of size 256 KB), the UFS driver would not flush the entire
Physical Region Descriptor Table (PRDT). This would cause the UFS host
controller to read empty PRDT entries, which eventually would make the
system crash. This change updates the UFS driver to flush the entire
PRDT, irrespective of the size of the image being read.

This change also throws an error if the memory allocated for UFS
descriptors is not sufficient to hold the entire Physical Region
Descriptor Table (PRDT).

Signed-off-by: Jorge Troncoso &lt;jatron@google.com&gt;
Change-Id: I291dc62748992481be3cc156ce1474a6e3990ea9
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, if the image being read exceeded 12,800 KB (or 50 PRDT
entries of size 256 KB), the UFS driver would not flush the entire
Physical Region Descriptor Table (PRDT). This would cause the UFS host
controller to read empty PRDT entries, which eventually would make the
system crash. This change updates the UFS driver to flush the entire
PRDT, irrespective of the size of the image being read.

This change also throws an error if the memory allocated for UFS
descriptors is not sufficient to hold the entire Physical Region
Descriptor Table (PRDT).

Signed-off-by: Jorge Troncoso &lt;jatron@google.com&gt;
Change-Id: I291dc62748992481be3cc156ce1474a6e3990ea9
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(ufs): only allow using one slot</title>
<updated>2023-02-25T14:32:43+00:00</updated>
<author>
<name>Jorge Troncoso</name>
<email>jatron@google.com</email>
</author>
<published>2023-02-22T08:51:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/coreboot/arm-trusted-firmware.git/commit/?id=56db7b8b08d5bb350a02e1f794dc6eb02827917f'/>
<id>56db7b8b08d5bb350a02e1f794dc6eb02827917f</id>
<content type='text'>
Currently the UFS driver places the Command UPIU, Response UPIU, and
PRDT immediately after the UTP Transfer Request Descriptor. This space
would normally be reserved for other slots in the UTP Transfer Request
List, but because we always use slot zero, the other slots in the UTP
Transfer Request List are never used and this is okay.

Because the Command UPIU, Response UPIU, and PRDT are placed inside the
UTP Transfer Request List, the UFS driver would break if two or more
slots were used at the same time. Therefore, in a sense the
get_empty_slot() function is misleading. It gives developers the
illusion that they can use two or more slots simultaneously but in
reality they cannot.

This change deletes the get_empty_slot() function and replaces it with
is_slot_available() so that only one slot can be used.

Signed-off-by: Jorge Troncoso &lt;jatron@google.com&gt;
Change-Id: I57f316640a1cdd56493505ede61f3012ceb2f305
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently the UFS driver places the Command UPIU, Response UPIU, and
PRDT immediately after the UTP Transfer Request Descriptor. This space
would normally be reserved for other slots in the UTP Transfer Request
List, but because we always use slot zero, the other slots in the UTP
Transfer Request List are never used and this is okay.

Because the Command UPIU, Response UPIU, and PRDT are placed inside the
UTP Transfer Request List, the UFS driver would break if two or more
slots were used at the same time. Therefore, in a sense the
get_empty_slot() function is misleading. It gives developers the
illusion that they can use two or more slots simultaneously but in
reality they cannot.

This change deletes the get_empty_slot() function and replaces it with
is_slot_available() so that only one slot can be used.

Signed-off-by: Jorge Troncoso &lt;jatron@google.com&gt;
Change-Id: I57f316640a1cdd56493505ede61f3012ceb2f305
</pre>
</div>
</content>
</entry>
</feed>
