Hi,
> For tdx, the actual max physical address bits is decreased by the KEY_ID_BITS
> bits.
> But the max physical address bits reported from CPUID instruction don't
> change.
I guess the physical address bits calculation for tdx needs adjustment
then. Right now we have:
if (TdIsEnabled ()) {
if (TdSharedPageMask () == (1ULL << 47)) {
PhysMemAddressWidth = 48;
} else {
PhysMemAddressWidth = 52;
}
}
See PlatformAddressWidthInitialization() in PlatformInitLib/MemDetect.c
Which would be the third place needing the same logic. Maybe worth
thinking about a helper function in a library somewhere, so we don't
cut&paste the same code snippet again and again ...
take care,
Gerd
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#102165): https://edk2.groups.io/g/devel/message/102165
Mute This Topic: https://groups.io/mt/97767965/21656
Group Owner: [email protected]
Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-