Problem solved, I was missing some flags for building a proper version of ovmf. I didn't know tpm has flags too, that need to be enabled.   So, summarizing, if one wants to compile himself/herself ovmf (following example build latest stable version at the time of writing, 202108):   git clone https://github.com/tianocore/edk2.git cd edk2 git clean -ffdx git reset --hard git submodule deinit --force --all git checkout edk2-stable202108 git submodule update --init --force so