In Flat32ToFlat64.asm I see a weird bitmask 0x2f. it is 0010 1111 and cannot precisely extract [6:0] bits of gpaw. the correct bitmask should be 0x3f which is 0011 1111.
;
; esp [6:0] holds gpaw, if it is at least 52 bits, need to set
; LA57 and use 5-level paging
;
mov ecx, esp
and ecx, 0x2f
In Flat32ToFlat64.asm I see a weird bitmask
0x2f
. it is0010 1111
and cannot precisely extract [6:0] bits of gpaw. the correct bitmask should be0x3f
which is0011 1111
.https://github.com/confidential-containers/td-shim/blob/9dea7d2bf0a0bccd621a3a692a2809148f691e96/td-shim/ResetVector/Ia32/Flat32ToFlat64.asm#L25