The EDK II infrastructure for this capability is implemented in the
SecurityPkg, as described in page 15 of A Tour Beyond BIOS: Implementing TPM2 Support in EDKII. This generic code can signal to the platform that there must be a ‘clear’ operation, but the underlying platform implementation of the memory clear is often in closed source platform and SI-vendor specific code. In the case of EDK II, the signal is implemented with a UEFI variable. EDK II provides code to initialize, set, and reset the variable, but there also needs to be platform-specific code to honor the signal and perform the clear operation.