@@ -186,11 +186,18 @@ InitEbcVmTestProtocol (
186186 @return EFI_UNSUPPORTED This function always return EFI_UNSUPPORTED status.
187187
188188**/
189+ STATIC
189190EFI_STATUS
190191EFIAPI
191192EbcVmTestUnsupported (
192- VOID
193- );
193+ IN EFI_EBC_VM_TEST_PROTOCOL * This ,
194+ IN CHAR16 * AsmText ,
195+ IN OUT INT8 * Buffer ,
196+ IN OUT UINTN * BufferLen
197+ )
198+ {
199+ return EFI_UNSUPPORTED ;
200+ }
194201
195202/**
196203 Registers a callback function that the EBC interpreter calls to flush the
@@ -374,6 +381,27 @@ EbcIsImageSupported (
374381 return TRUE;
375382}
376383
384+ /**
385+ This is a wrapper for the Flush callback routine needed for type compatibility.
386+
387+ @param Start The beginning physical address to flush from the processor's instruction cache.
388+ @param Length The number of bytes to flush from the processor's instruction cache.
389+
390+ @retval EFI_SUCCESS The function completed successfully.
391+
392+ **/
393+ STATIC
394+ EFI_STATUS
395+ EFIAPI
396+ EbcInvalidateInstructionCache (
397+ IN EFI_PHYSICAL_ADDRESS Start ,
398+ IN UINT64 Length
399+ )
400+ {
401+ InvalidateInstructionCacheRange ((VOID * )(UINTN )Start , (UINTN )Length );
402+ return EFI_SUCCESS ;
403+ }
404+
377405/**
378406 Register a supported PE/COFF image with the emulator. After this call
379407 completes successfully, the PE/COFF image may be started as usual, and
@@ -407,7 +435,7 @@ EbcRegisterImage (
407435{
408436 EbcRegisterICacheFlush (
409437 NULL ,
410- ( EBC_ICACHE_FLUSH ) InvalidateInstructionCacheRange
438+ EbcInvalidateInstructionCache
411439 );
412440
413441 return EbcCreateThunk (
@@ -1489,8 +1517,8 @@ InitEbcVmTestProtocol (
14891517 EbcVmTestProtocol -> Execute = (EBC_VM_TEST_EXECUTE )EbcExecuteInstructions ;
14901518
14911519 DEBUG_CODE_BEGIN ();
1492- EbcVmTestProtocol -> Assemble = ( EBC_VM_TEST_ASM ) EbcVmTestUnsupported ;
1493- EbcVmTestProtocol -> Disassemble = ( EBC_VM_TEST_DASM ) EbcVmTestUnsupported ;
1520+ EbcVmTestProtocol -> Assemble = EbcVmTestUnsupported ;
1521+ EbcVmTestProtocol -> Disassemble = EbcVmTestUnsupported ;
14941522 DEBUG_CODE_END ();
14951523
14961524 //
@@ -1505,21 +1533,6 @@ InitEbcVmTestProtocol (
15051533 return Status ;
15061534}
15071535
1508- /**
1509- Returns the EFI_UNSUPPORTED Status.
1510-
1511- @return EFI_UNSUPPORTED This function always return EFI_UNSUPPORTED status.
1512-
1513- **/
1514- EFI_STATUS
1515- EFIAPI
1516- EbcVmTestUnsupported (
1517- VOID
1518- )
1519- {
1520- return EFI_UNSUPPORTED ;
1521- }
1522-
15231536/**
15241537 Allocates a buffer of type EfiBootServicesCode.
15251538
0 commit comments