3 Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
4 SPDX-License-Identifier: BSD-2-Clause-Patent
12 Produce WinNtThunk protocol and it's associated device path and controller
13 state protocols. WinNtThunk is to the NT emulation environment as
14 PCI_ROOT_BRIGE is to real hardware. The WinNtBusDriver is the child of this
17 Since we are a root hardware abstraction we do not install a Driver Binding
18 protocol on this handle. This driver can only support one one WinNtThunk protocol
19 in the system, since the device path is hard coded.
24 // The package level header files this module uses
29 // The protocols, PPI and GUID defintions for this module
31 #include <Protocol/WinNtThunk.h>
32 #include <Protocol/DevicePath.h>
34 // The Library classes this module consumes
36 #include <Library/UefiDriverEntryPoint.h>
37 #include <Library/WinNtLib.h>
38 #include <Library/UefiBootServicesTableLib.h>
39 #include <Library/DevicePathLib.h>
41 #include "WinNtThunk.h"
44 // WinNtThunk Device Path Protocol Instance
46 WIN_NT_THUNK_DEVICE_PATH mWinNtThunkDevicePath
= {
50 (UINT8
) (sizeof (VENDOR_DEVICE_PATH
)),
51 (UINT8
) ((sizeof (VENDOR_DEVICE_PATH
)) >> 8),
52 EFI_WIN_NT_THUNK_PROTOCOL_GUID
,
56 END_ENTIRE_DEVICE_PATH_SUBTYPE
,
57 END_DEVICE_PATH_LENGTH
,
65 InitializeWinNtThunk (
66 IN EFI_HANDLE ImageHandle
,
67 IN EFI_SYSTEM_TABLE
*SystemTable
72 Install WinNtThunk Protocol and it's associated Device Path protocol
75 (Standard EFI Image entry - EFI_IMAGE_ENTRY_POINT)
78 EFI_SUCEESS - WinNtThunk protocol is added or error status from
79 gBS->InstallMultiProtocolInterfaces().
82 // TODO: ImageHandle - add argument and description to function comment
83 // TODO: SystemTable - add argument and description to function comment
86 EFI_HANDLE ControllerHandle
;
88 ControllerHandle
= NULL
;
89 Status
= gBS
->InstallMultipleProtocolInterfaces (
91 &gEfiWinNtThunkProtocolGuid
,
93 &gEfiDevicePathProtocolGuid
,
94 &mWinNtThunkDevicePath
,