Attention is currently required from: Chiranjeevi Rapolu, Tim Wawrzynczak, John Zhao, Duncan Laurie, Brandon Breitenstein. Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/51195 )
Change subject: mb/google/volteer: Configure tcss port information for early tcss init ......................................................................
Patch Set 1:
(2 comments)
File src/mainboard/google/volteer/mainboard.c:
https://review.coreboot.org/c/coreboot/+/51195/comment/26524ff8_d2f69754 PS1, Line 182: mux_info mux_info is never really allocated space. So, this code ends up writing at address 0. As mentioned on the SoC CL, I think this should return a pointer to the table rather than expecting SoC to pass in allocated space:
const struct tcss_mux *mainboard_get_tcss_mux_info(size_t *num_ports) { static struct tcss_mux mux_info[MAX_TYPE_C_PORTS]; size_t port;
*num_ports = ARRAY_SIZE(mux_info); for (port = 0; port < *num_ports; port++) { ... }
return mux_info; }
https://review.coreboot.org/c/coreboot/+/51195/comment/22bf1e66_3ce4af91 PS1, Line 186: get_connector_config This function can be called with mux as a pointer rather than having to fetch mux pointer every time.
const struct device *pmc; const struct device *mux;
*num_ports = 0;
pmc = pcidev_path_on_root(PCH_DEVFN_PMC); if (!pmc) return NULL;
mux = pmc->link_list->children; if (!mux) return NULL;
*num_ports = ARRAY_SIZE(mux_info);
for (port = 0; port < *num_ports; port++) { mux_config = get_connector_config(mux, port); if (mux_config == NULL) continue;
mux_info[port].usb2_port = ...; ... }