Re: [PATCH v6 06/29] OvmfPkg/ResetVector: pre-validate the data pages used in SEC phase


Gerd Hoffmann
 

On Tue, Sep 14, 2021 at 03:49:31AM +0000, Yao, Jiewen wrote:
I can explain why we prefer DQ instead of DD.

You are right that current TD entrypoint is 32bit. However, we cannot predict that is always TRUE for the future.
So a "save space in MEMFD" vs. "be future proof" tradeoff.

Back to 16 bit machine, we have entrypoint at F000:FFF0. But in 32bit mode we removed 1M limitation and move entrypoint to below 4G.
There is no limitation that we move 64bit entrypoint above 4G for 64bit machine.
Any plans to actually do that?

Defining an 64-bit entry point is a more than just using 64-bit
addresses. For starters long mode requires paging being enabled.
So a set of initial page tables is needed, and you possibly need
to handle virtual vs. physical addresses. You also need to find
a place above 4G where you can place the firmware without conflicts
with something else.

So I have my doubts that trying to make the struct future-proof
will actually work out in practice. Or that we will actually
need that anytime soon.

take care,
Gerd

Join devel@edk2.groups.io to automatically receive all group messages.