I read that TPM takes measurements of all critical components and writes their hashes to its PCR registers at boot time.
Does TPM also take measurement at run time or during when these components are in operation?
I read that TPM takes measurements of all critical components and writes their hashes to its PCR registers at boot time.
Does TPM also take measurement at run time or during when these components are in operation?
The TPM itself does not take any measurments at all. Also not at boot time. It is a place where a trust enabled piece of code can store measurements in a tamper proof way.
During boot, the measurments are taken by the firmware (BIOS, UEFI) and stored in the TPM. It is possible to configure your system in a way that also after the firmware has finished, additional measurements are taken. Like a trusted boot loader.
If you are interested in extending the chain of trust further to every executed bit of code, projects like IBM's Integrity Measurement Architecture are worth looking at. However, I consider those measurements pointless. What do you do with these? There are rarely any casese where you can actually verify that a certain chain of measurements is trusted.
You may also write your own piece of software that stores measurements at any given time or use tools like jTSS, TrouSerS or IBM's libtpm tools.