Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38682 )
Change subject: src/soc/tigerlake: Define and use config for number of USB2/3 ports
......................................................................
Patch Set 8:
(2 comments)
https://review.coreboot.org/c/coreboot/+/38682/8//COMMIT_MSG
Commit Message:
https://review.coreboot.org/c/coreboot/+/38682/8//COMMIT_MSG@10
PS8, Line 10: and jsl in fsp params.
Won't the TGL FSP also support PCH-H? It seems the new numbers are
for PCH-LP only.
https://review.coreboot.org/c/coreboot/+/38682/8/src/soc/intel/tigerlake/fsp...
File src/soc/intel/tigerlake/fsp_params_jsl.c:
https://review.coreboot.org/c/coreboot/+/38682/8/src/soc/intel/tigerlake/fsp...
PS8, Line 108: for (i = 0; i < CONFIG_SOC_INTEL_USB2_PORT_MAX; i++) {
How about `ARRAY_SIZE(params->PortUsb20Enable)` instead? It's always better
to use the target size to avoid writing to undefined memory.
We should, in any case, assert that we don't make wrong assumptions about
the UPDs. e.g. with the size as above:
_Static_assert(ARRAY_SIZE(params->PortUsb20Enable) <= ARRAY_SIZE(config->usb2_ports));
Then we were also sure that we don't read from undefined locations. This way
we wouldn't need more Kconfigs and would be safer.
--
To view, visit
https://review.coreboot.org/c/coreboot/+/38682
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ia8e88e92989fe40d7bd1c28942e005cb0d862fcb
Gerrit-Change-Number: 38682
Gerrit-PatchSet: 8
Gerrit-Owner: Meera Ravindranath
meera.ravindranath@intel.com
Gerrit-Reviewer: Aamir Bohra
aamir.bohra@intel.com
Gerrit-Reviewer: Aaron Durbin
adurbin@chromium.org
Gerrit-Reviewer: Balaji Manigandan
balaji.manigandan@intel.com
Gerrit-Reviewer: Justin TerAvest
teravest@chromium.org
Gerrit-Reviewer: Karthik Ramasubramanian
kramasub@google.com
Gerrit-Reviewer: Meera Ravindranath
meera.ravindranath@intel.com
Gerrit-Reviewer: Nick Vaccaro
nvaccaro@google.com
Gerrit-Reviewer: Nico Huber
nico.h@gmx.de
Gerrit-Reviewer: Patrick Rudolph
siro@das-labor.org
Gerrit-Reviewer: Rizwan Qureshi
rizwan.qureshi@intel.com
Gerrit-Reviewer: Sridhar Siricilla
sridhar.siricilla@intel.com
Gerrit-Reviewer: Wonkyu Kim
wonkyu.kim@intel.com
Gerrit-Reviewer: build bot (Jenkins)
no-reply@coreboot.org
Gerrit-CC: Furquan Shaikh
furquan@google.com
Gerrit-CC: Paul Menzel
paulepanter@users.sourceforge.net
Gerrit-Comment-Date: Fri, 14 Feb 2020 13:47:32 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment