3 Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
4 Portions copyright (c) 2011, Apple Inc. All rights reserved.
5 SPDX-License-Identifier: BSD-2-Clause-Patent
11 #include <Protocol/DevicePath.h>
12 #include <Protocol/EmuThunk.h>
14 #include <Library/DebugLib.h>
15 #include <Library/UefiLib.h>
16 #include <Library/UefiDriverEntryPoint.h>
17 #include <Library/EmuThunkLib.h>
18 #include <Library/MemoryAllocationLib.h>
19 #include <Library/UefiBootServicesTableLib.h>
20 #include <Library/DevicePathLib.h>
23 // EmuThunk Device Path Protocol Instance
25 EMU_THUNK_DEVICE_PATH mEmuThunkDevicePath
= {
32 (UINT8
) (sizeof (EMU_VENDOR_DEVICE_PATH_NODE
)),
33 (UINT8
) ((sizeof (EMU_VENDOR_DEVICE_PATH_NODE
)) >> 8)
36 EMU_THUNK_PROTOCOL_GUID
42 END_ENTIRE_DEVICE_PATH_SUBTYPE
,
44 END_DEVICE_PATH_LENGTH
,
54 IN EFI_HANDLE ImageHandle
,
55 IN EFI_SYSTEM_TABLE
*SystemTable
60 Install UnixThunk Protocol and it's associated Device Path protocol
63 (Standard EFI Image entry - EFI_IMAGE_ENTRY_POINT)
66 EFI_SUCEESS - UnixThunk protocol is added or error status from
67 gBS->InstallMultiProtocolInterfaces().
75 Status
= gBS
->InstallMultipleProtocolInterfaces (
77 &gEmuThunkProtocolGuid
, gEmuThunk
,
78 &gEfiDevicePathProtocolGuid
, &mEmuThunkDevicePath
,