How to delete the TPM NV index in UEFI?


dang.luu@...
 

Hi Renan Moraes,

After doing some research, I found that undefining the NV index is necessary so I no longer use this function.
Thank you for your help.

Best Regards,
Dang Luu.


renan.moraes2@...
 

Hi Dang Luu,

I think you can check the TPM specification in the section NV Index Deletion 37.2.3 (https://trustedcomputinggroup.org/wp-content/uploads/TCG_TPM2_r1p59_Part1_Architecture_pub.pdf). Maybe, you can use the function TPM2_NV_UndefineSpace instead of TPM2_NV_UndefineSpaceSpecial().

Could you please share with us how you define the NV index? Because, depending on the parameters used, this can impact the way of undefining.

Best Regards,
Renan Moraes


dang.luu@...
 

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 https://github.com/corthon/edk2/commit/36fd71c4a1d393865c45d3c81104095895987c18#diff-d98067eb1e8295ae97f55c6020de3886ba140567d4d8fd03af97fd924300dce2
I would like how to execute this function to delete the TPM NV index.

Thanks,
Dang Luu