3 Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
4 Portions copyright (c) 2011, Apple Inc. All rights reserved.
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
17 #include <Protocol/DevicePath.h>
18 #include <Protocol/EmuThunk.h>
20 #include <Library/DebugLib.h>
21 #include <Library/UefiLib.h>
22 #include <Library/UefiDriverEntryPoint.h>
23 #include <Library/EmuThunkLib.h>
24 #include <Library/MemoryAllocationLib.h>
25 #include <Library/UefiBootServicesTableLib.h>
26 #include <Library/DevicePathLib.h>
29 // EmuThunk Device Path Protocol Instance
31 EMU_THUNK_DEVICE_PATH mEmuThunkDevicePath
= {
38 (UINT8
) (sizeof (EMU_VENDOR_DEVICE_PATH_NODE
)),
39 (UINT8
) ((sizeof (EMU_VENDOR_DEVICE_PATH_NODE
)) >> 8)
42 EMU_THUNK_PROTOCOL_GUID
48 END_ENTIRE_DEVICE_PATH_SUBTYPE
,
50 END_DEVICE_PATH_LENGTH
,
60 IN EFI_HANDLE ImageHandle
,
61 IN EFI_SYSTEM_TABLE
*SystemTable
66 Install UnixThunk Protocol and it's associated Device Path protocol
69 (Standard EFI Image entry - EFI_IMAGE_ENTRY_POINT)
72 EFI_SUCEESS - UnixThunk protocol is added or error status from
73 gBS->InstallMultiProtocolInterfaces().
81 Status
= gBS
->InstallMultipleProtocolInterfaces (
83 &gEmuThunkProtocolGuid
, gEmuThunk
,
84 &gEfiDevicePathProtocolGuid
, &mEmuThunkDevicePath
,