/* The function caches the pointer of the Unix thunk functions It will ASSERT() if Unix thunk ppi is not installed. */
EFI_STATUS EFIAPI EmuPeCoffGetThunkStucture()
/* The function caches the pointer of the Unix thunk functions It will ASSERT() if Unix thunk ppi is not installed. */
EFI_STATUS EFIAPI EmuPeCoffGetThunkStucture()
{
  EMU_THUNK_PPI  *ThunkPpi;
  EFI_STATUS     Status;
  Status = PeiServicesLocatePpi (
             &gEmuThunkPpiGuid,
             0,
             NULL,
             (VOID **)&ThunkPpi
             );
  ASSERT_EFI_ERROR (Status);
  EMU_MAGIC_PAGE ()->Thunk = (EMU_THUNK_PROTOCOL *)ThunkPpi->Thunk ();
  return EFI_SUCCESS;
}