30.3.3 EBC Virtual Machine Driver Example

The following example shows the directory structure for another driver that includes instruction set architecture-specific files for three of the supported instruction sets. The files EbcLowLevel.asm and EbcLowLevel.s contain logic that must be implemented in assembly to handle the transitions between native execution and the EBC interpreter. Doing so makes the driver work on all three supported architectures, but the UEFI driver takes longer to develop and is more difficult to maintain if any changes are required in the instruction set architecture-specific components.

If possible, a UEFI driver should be implemented in C with no instruction set architecture-specific files, which reduces the development time, reduces maintenance costs, and increases portability.

Example 262-EBC driver with instruction set architecture-specific files
MdeModulePkg\ Universal\ EbcDxe\
EbcDxe.inf
EbcExecute.c
EbcExecute.h EbcInt.c
EbcInt.h
Ia32\
EbcSupport.c
EbcLowLevel.asm
EbcLowLevel.S Ipf\
EbcSupport.c
EbcSupport.h
EbcLowLevel.s X64\
EbcSupport.c
EbcLowLevel.asm
EbcLowLevel.S