Attention is currently required from: Bora Guvendik, Caveh Jalali, Selma Bensaid, Maulik V Vaghela, Subrata Banik, Nick Vaccaro, Patrick Rudolph, Karthik Ramasubramanian. Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/58351 )
Change subject: soc/intel/common: add generic gpio lock mechanism ......................................................................
Patch Set 10: Code-Review+1
(2 comments)
File src/soc/intel/common/block/gpio/gpio.c:
https://review.coreboot.org/c/coreboot/+/58351/comment/e0b56ecb_f38b2405 PS7, Line 461: int gpio_lock_multiple_pads(const struct gpio_lock_config *pads_a, const size_t count_a, : const struct gpio_lock_config *pads_b, const size_t count_b)
I had thought about that as well, seems much more straight-foward to have the routine support lockin […]
That seems fine to me, the unlocking/locking of PCR 2 times should not be terrible.
File src/soc/intel/common/block/smm/smihandler.c:
https://review.coreboot.org/c/coreboot/+/58351/comment/cc0cc3fe_62624fe5 PS7, Line 328: const struct gpio_lock_config *soc_gpios; : const struct gpio_lock_config *mb_gpios; : size_t soc_gpio_num; : size_t mb_gpio_num; : : /* get list of gpios from SoC, exit if SoC does not export a list */ : soc_gpios = soc_gpio_lock_config(&soc_gpio_num); : : /* get list of gpios from mainboard, it's ok if mb does not export a list */ : mb_gpios = mb_gpio_lock_config(&mb_gpio_num); : : /* Lock all mainboard and soc requested gpios */ : gpio_lock_multiple_pads(soc_gpios, soc_gpio_num, mb_gpios, mb_gpio_num);
so you could just use malloc() here to allocate a list long enough to store both and not have the aw […]
Or call it twice ;)