How to delete the TPM NV index in UEFI?


Hi everyone,
I want to find a way to delete the TPM NV index that I was provisioned before. I have found a function Tpm2NvUndefineSpaceSpecial() on EDK2 open source but I still don't know how to execute it.
This function has two arguments: IndexAuthSession and PlatAuthSession, they are optional, but when I set them to NULL, the received result is Device Error.
I have found this function in
I would like how to execute this function to delete the TPM NV index.

Dang Luu

Join { to automatically receive all group messages.