This commit implements grub_tcg2_cap_pcr() for ieee1275 with the firmware function, 2hash-ext-log, to extend the target PCR with an EV_SEPARATOR event and record the event into the TPM event log. To avoid duplicate code, ibmvtpm_2hash_ext_log() is moved to tcg2.c and exported as a global function. Signed-off-by: Gary Lin <glin@suse.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>