Hi Jiaxin,

1) mSmmInitialized *must* be volatile. Your current code may cause anything, 
from skipping waiting entirely (the loop is optimized away as the compiler 
considers it free from side effects) to stalling (the memory access is 
optimized away as the compiler considers it locally-immutable).

2) ASSERTs on memory allocation failures are one of the most terrible edk2 
"paradigms".

3) Comparisons against boolean constants are not allowed by the code style spec.

Best regards,
Marvin


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#99971): https://edk2.groups.io/g/devel/message/99971
Mute This Topic: https://groups.io/mt/96871374/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to