We know that UEFI measures the OS bootloader image integrity every time we power on our computer if secure boot is enabled.
With the growing attacks and discoveries of UEFI vulnerabilities, the following questions arise:
I want to know if there's a specification on UEFI that measures the integrity of the UEFI firmware before the Secure Boot process, so It can prevent or avoid flashing attacks to alter the firmware.
Also, I want to know if the integrity of the firmware of the rest of the devices attached to the computer is measured.
My concern here is that if your firmware gets compromised (flashing exploit), the installed malware is able to perform any tasks, thus tricking the early secure-boot protocol.