You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am observing weirdness in PeiCheckAndSwitchStack() when SecCoreData is offset twice. This is to demonstrate the idea: aik@2e81b55
TRACE1 prints SecCoreData == 81FD20 and TRACE2 prints 7BF55D20 and TRACE3 prints 7BF55D20 (the same as TRACE2).
But if TRACE2 is commented out (as in the patch), TRACE3 prins 0xf768bd20 which is 2*(0x7BF55D20 - 0x81FD20) + 0x81FD20. And the effect is not 100% stable.
The code adjusts SecCoreData before it switches the stack, SecCoreData should be adjusted once but it happens twice. /me brain explodes.
This is AMD EPYC, upstream QEMU, q32 machine, 2GB of RAM, 1 vcpu.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am observing weirdness in PeiCheckAndSwitchStack() when SecCoreData is offset twice. This is to demonstrate the idea:
aik@2e81b55
TRACE1 prints SecCoreData == 81FD20 and TRACE2 prints 7BF55D20 and TRACE3 prints 7BF55D20 (the same as TRACE2).
But if TRACE2 is commented out (as in the patch), TRACE3 prins 0xf768bd20 which is 2*(0x7BF55D20 - 0x81FD20) + 0x81FD20. And the effect is not 100% stable.
The code adjusts SecCoreData before it switches the stack, SecCoreData should be adjusted once but it happens twice. /me brain explodes.
This is AMD EPYC, upstream QEMU, q32 machine, 2GB of RAM, 1 vcpu.
Is some barrier missing here? Thanks,
This is the QEMU cmdline:
Beta Was this translation helpful? Give feedback.
All reactions