29.6 Memory ordering

The EBC architecture is required to be strongly ordered, and the EBC virtual machine interpreter ensures that all memory transactions are strongly ordered. The EDK II includes a complete implementation of the EBC virtual machine interpreter in the MdeModulePkg in the directory MdeModulePkg/Universal/EbcDxe.

EBC drivers are not required to use the EDK II library BaseLib function MemoryFence() when strong ordering is required. However, UEFI Drivers compiled for other CPU architectures may require the use of the MemoryFence() function to enforce strong ordering. The EDK II library BaseLib implementation of MemoryFence() for EBC is an empty function. This means there is no performance penalty for MemoryFence() calls in UEFI Drivers compiled for EBC.