]> git.proxmox.com Git - mirror_edk2.git/blame - EdkNt32Pkg/Dxe/WinNtThunk/WinNtThunk/WinNtThunk.c
[Source] Useless assigning statement in ata and atapi
[mirror_edk2.git] / EdkNt32Pkg / Dxe / WinNtThunk / WinNtThunk / WinNtThunk.c
CommitLineData
878ddf1f 1/*++\r
2\r
3Copyright (c) 2006, Intel Corporation \r
4All rights reserved. This program and the accompanying materials \r
5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13\r
14 WinNtThunk.c\r
15\r
16Abstract:\r
17\r
18 Produce WinNtThunk protocol and it's associated device path and controller \r
19 state protocols. WinNtThunk is to the NT emulation environment as \r
20 PCI_ROOT_BRIGE is to real hardware. The WinNtBusDriver is the child of this\r
21 driver.\r
22\r
23 Since we are a root hardware abstraction we do not install a Driver Binding\r
24 protocol on this handle. This driver can only support one one WinNtThunk protocol\r
25 in the system, since the device path is hard coded.\r
26\r
27--*/\r
28\r
29#include "WinNtThunk.h"\r
30\r
31//\r
32// WinNtThunk Device Path Protocol Instance\r
33//\r
34static WIN_NT_THUNK_DEVICE_PATH mWinNtThunkDevicePath = {\r
35 {\r
36 HARDWARE_DEVICE_PATH,\r
37 HW_VENDOR_DP,\r
38 (UINT8) (sizeof (VENDOR_DEVICE_PATH)),\r
39 (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8),\r
40 EFI_WIN_NT_THUNK_PROTOCOL_GUID,\r
41 },\r
42 {\r
43 END_DEVICE_PATH_TYPE,\r
44 END_ENTIRE_DEVICE_PATH_SUBTYPE,\r
45 END_DEVICE_PATH_LENGTH,\r
46 0\r
47 }\r
48};\r
49\r
50\r
51EFI_STATUS\r
52EFIAPI\r
53InitializeWinNtThunk (\r
54 IN EFI_HANDLE ImageHandle,\r
55 IN EFI_SYSTEM_TABLE *SystemTable\r
56 )\r
57/*++\r
58\r
59Routine Description:\r
60 Install WinNtThunk Protocol and it's associated Device Path protocol\r
61\r
62Arguments:\r
63 (Standard EFI Image entry - EFI_IMAGE_ENTRY_POINT)\r
64\r
65Returns:\r
66 EFI_SUCEESS - WinNtThunk protocol is added or error status from \r
67 gBS->InstallMultiProtocolInterfaces().\r
68\r
69--*/\r
70// TODO: ImageHandle - add argument and description to function comment\r
71// TODO: SystemTable - add argument and description to function comment\r
72{\r
73 EFI_STATUS Status;\r
74 EFI_HANDLE ControllerHandle;\r
75\r
76 ControllerHandle = NULL;\r
77 Status = gBS->InstallMultipleProtocolInterfaces (\r
78 &ControllerHandle,\r
79 &gEfiWinNtThunkProtocolGuid,\r
80 gWinNt,\r
81 &gEfiDevicePathProtocolGuid,\r
82 &mWinNtThunkDevicePath,\r
83 NULL\r
84 );\r
85\r
86 return Status;\r
87}\r