]> git.proxmox.com Git - mirror_edk2.git/blame - Vlv2TbltDevicePkg/Include/Protocol/UsbPolicy.h
Upload BSD-licensed Vlv2TbltDevicePkg and Vlv2DeviceRefCodePkg to
[mirror_edk2.git] / Vlv2TbltDevicePkg / Include / Protocol / UsbPolicy.h
CommitLineData
3cbfba02
DW
1/*++\r
2\r
3 Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
4 \r\r
5 This program and the accompanying materials are licensed and made available under\r\r
6 the terms and conditions of the BSD License that accompanies this distribution. \r\r
7 The full text of the license may be found at \r\r
8 http://opensource.org/licenses/bsd-license.php. \r\r
9 \r\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r\r
12 \r\r
13\r
14Module Name:\r
15 UsbPolicy.h\r
16\r
17Abstract:\r
18\r
19--*/\r
20\r
21#ifndef _USB_POLICY_H_\r
22#define _USB_POLICY_H_\r
23\r
24EFI_FORWARD_DECLARATION (EFI_USB_POLICY_PROTOCOL);\r
25\r
26#define USB_POLICY_GUID \\r
27 {\\r
28 0xf617b358, 0x12cf, 0x414a, 0xa0, 0x69, 0x60, 0x67, 0x7b, 0xda, 0x13, 0xb4\\r
29 }\r
30\r
31#define TIANO_CODE_BASE 0x00\r
32#define ICBD_CODE_BASE 0x01\r
33\r
34#define ATUO_TYPE 0x00\r
35#define USB_FDD_TYPE 0x01\r
36#define HDD_TYPE 0x02\r
37#define ZIP_TYPE 0x03\r
38#define CDROM_TYPE 0x04\r
39#define SIZE_TYPE 0x05\r
40\r
41#define ZIP_FDD 0x80\r
42\r
43#define FDD_EMULATION 0x00\r
44#define HDD_EMULATION 0x01\r
45\r
46#define HIGH_SPEED 0x00\r
47#define FULL_SPEED 0x01\r
48#define SUPER_SPEED 0x02\r
49\r
50#define LEGACY_KB_EN 0x01\r
51#define LEGACY_KB_DIS 0x00\r
52#define LEGACY_MS_EN 0x01\r
53#define LEGACY_MS_DIS 0x00\r
54#define LEGACY_USB_EN 0x00\r
55#define LEGACY_USB_DIS 0x01\r
56#define LEGACY_FREE_SUPP 0x01\r
57#define LEGACY_FREE_UN_SUPP 0x00\r
58#define LEGACY_PERIOD_SUPP 0x01\r
59#define LEGACY_PERIOD_UN_SUPP 0x00\r
60\r
61#define LEGACY_USB_TIME_TUE_ENABLE 0x01\r
62#define LEGACY_USB_TIME_TUE_DISABLE 0x00\r
63#define USB_HAVE_HUB_INTERNEL 0x01\r
64#define USB_NOT_HAVE_HUB_INTERNEL 0x00\r
65\r
66#define USB_POLICY_PROTOCOL_REVISION_1 1\r
67#define USB_POLICY_PROTOCOL_REVISION_2 2\r
68\r
69#ifndef __GNUC__\r
70#pragma warning ( disable : 4306 )\r
71#pragma warning ( disable : 4054 )\r
72#endif\r
73\r
74#define GET_USB_CFG (UsbCfg);\\r
75 do{\\r
76 UINT16 *pSegOfEbda;\\r
77 UINT32 mToEbda;\\r
78 pSegOfEbda = (UINT16 *)(UINTN)0x40E;\\r
79 mToEbda = (UINT32)(((UINTN)(*pSegOfEbda) << 4) + 0x80);\\r
80 UsbCfg = (USB_CFG *)(UINTN)mToEbda;\\r
81 }while(0);\r
82\r
83#pragma pack(1)\r
84typedef struct {\r
85 UINT8 HasUSBKeyboard:1;\r
86 UINT8 HasUSBMouse:1;\r
87 UINT8 LegacyFreeSupport:1;\r
88 UINT8 UsbOperationMode:1;\r
89 UINT8 LegacyKBEnable:1;\r
90 UINT8 LegacyMSEnable:1;\r
91 UINT8 USBPeriodSupport:1;\r
92 UINT8 Reserved:1;\r
93} USB_DEVICE_INFOR;\r
94\r
95typedef struct {\r
96 UINT8 Codebase;\r
97 UINT8 USBHDDForceType;\r
98 UINT8 Configurated;\r
99 UINT8 LpcAcpiBase;\r
100 UINT8 AcpiTimerReg;\r
101 UINT8 Reserved1[0x01];\r
102 UINT8 LegacyUsbEnable;\r
103 USB_DEVICE_INFOR UsbDeviceInfor;\r
104 UINT16 UsbEmulationSize;\r
105 UINT8 Reserved2[0x06];\r
106} USB_CFG;\r
107#pragma pack()\r
108\r
109typedef struct _EFI_USB_POLICY_PROTOCOL{\r
110 UINT8 Version;\r
111 UINT8 UsbMassStorageEmulationType; // 1: FDD_Type; 2: HDD_Type; other:Auto_Type*\r
112 UINT8 UsbOperationMode; // 0: High_Speed; 1: Full_Speed;\r
113 UINT8 LegacyKBEnable; // 0: Disabled; 1: Enabled*\r
114 UINT8 LegacyMSEnable; // 0: Disabled; 1: Enabled*\r
115 UINT8 USBPeriodSupport; // 0; Unsupport; 1: Support\r
116 UINT8 LegacyUsbEnable; // 1: Disabled; 0: Enabled*\r
117 UINT8 LegacyFreeSupport; // 0: Unsupport; 1: Support\r
118 UINT8 CodeBase;\r
119 UINT8 LpcAcpiBase; // 40h(default)\r
120 UINT8 AcpiTimerReg;\r
121 UINT8 UsbTimeTue;\r
122 UINT8 InternelHubExist; // 1: Host have internel hub on board; 0: No internel hub on board\r
123 UINT8 EnumWaitPortStableStall; // Value for wait port stable when enum a new dev.\r
124 UINT16 UsbEmulationSize; // Mbytes.\r
125 UINT8 UsbZipEmulationType;\r
126 UINT8 Reserved[3]; // Reserved fields for future expansion w/o protocol change\r
127} EFI_USB_POLICY_PROTOCOL;\r
128\r
129extern EFI_GUID gUsbPolicyGuid;\r
130\r
131#endif\r