3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 Produce WinNtThunk protocol and it's associated device path and controller
19 state protocols. WinNtThunk is to the NT emulation environment as
20 PCI_ROOT_BRIGE is to real hardware. The WinNtBusDriver is the child of this
23 Since we are a root hardware abstraction we do not install a Driver Binding
24 protocol on this handle. This driver can only support one one WinNtThunk protocol
25 in the system, since the device path is hard coded.
30 // Include common header file for this module.
32 #include "CommonHeader.h"
34 #include "WinNtThunk.h"
37 // WinNtThunk Device Path Protocol Instance
39 static WIN_NT_THUNK_DEVICE_PATH mWinNtThunkDevicePath
= {
43 (UINT8
) (sizeof (VENDOR_DEVICE_PATH
)),
44 (UINT8
) ((sizeof (VENDOR_DEVICE_PATH
)) >> 8),
45 EFI_WIN_NT_THUNK_PROTOCOL_GUID
,
49 END_ENTIRE_DEVICE_PATH_SUBTYPE
,
50 END_DEVICE_PATH_LENGTH
,
58 InitializeWinNtThunk (
59 IN EFI_HANDLE ImageHandle
,
60 IN EFI_SYSTEM_TABLE
*SystemTable
65 Install WinNtThunk Protocol and it's associated Device Path protocol
68 (Standard EFI Image entry - EFI_IMAGE_ENTRY_POINT)
71 EFI_SUCEESS - WinNtThunk protocol is added or error status from
72 gBS->InstallMultiProtocolInterfaces().
75 // TODO: ImageHandle - add argument and description to function comment
76 // TODO: SystemTable - add argument and description to function comment
79 EFI_HANDLE ControllerHandle
;
81 ControllerHandle
= NULL
;
82 Status
= gBS
->InstallMultipleProtocolInterfaces (
84 &gEfiWinNtThunkProtocolGuid
,
86 &gEfiDevicePathProtocolGuid
,
87 &mWinNtThunkDevicePath
,