]>
Commit | Line | Data |
---|---|---|
8016da21 | 1 | /** @file\r |
2 | Legacy BIOS Platform support\r | |
3 | \r | |
4 | Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r | |
5 | \r | |
6 | This program and the accompanying materials are\r | |
7 | licensed and made available under the terms and conditions of the BSD License\r | |
8 | which accompanies this distribution. The full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php\r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
13 | \r | |
14 | **/\r | |
15 | \r | |
16 | #ifndef LEGACY_BIOS_PLATFORM_H_\r | |
17 | #define LEGACY_BIOS_PLATFORM_H_\r | |
18 | \r | |
19 | #include <FrameworkDxe.h>\r | |
20 | \r | |
21 | #include <Protocol/PciIo.h>\r | |
22 | #include <Protocol/PciRootBridgeIo.h>\r | |
23 | #include <Protocol/DevicePath.h>\r | |
24 | #include <Protocol/LegacyInterrupt.h>\r | |
25 | #include <Protocol/LegacyRegion2.h>\r | |
26 | #include <Protocol/LegacyBiosPlatform.h>\r | |
27 | #include <Protocol/FirmwareVolume.h>\r | |
28 | #include <Protocol/DiskInfo.h>\r | |
29 | \r | |
30 | #include <Library/UefiDriverEntryPoint.h>\r | |
31 | #include <Library/UefiBootServicesTableLib.h>\r | |
32 | #include <Library/UefiRuntimeServicesTableLib.h>\r | |
33 | #include <Library/DebugLib.h>\r | |
34 | #include <Library/BaseMemoryLib.h>\r | |
35 | #include <Library/MemoryAllocationLib.h>\r | |
36 | #include <Library/IoLib.h>\r | |
37 | #include <Library/PciLib.h>\r | |
38 | #include <Library/PcdLib.h>\r | |
39 | #include <Library/DxeServicesLib.h>\r | |
40 | #include <Library/DevicePathLib.h>\r | |
41 | \r | |
42 | #include <IndustryStandard/Pci.h>\r | |
43 | \r | |
44 | //\r | |
45 | // PIRQ information constants.\r | |
46 | //\r | |
47 | #define MAX_IRQ_ROUTING_ENTRIES 6\r | |
48 | #define MAX_IRQ_PRIORITY_ENTRIES 7\r | |
49 | \r | |
50 | #define V_INTEL_VENDOR_ID 0x8086\r | |
51 | #define V_PIIX4_IDE_DEVICE_ID 0x7010\r | |
52 | \r | |
53 | //\r | |
54 | // Type declarations\r | |
55 | //\r | |
56 | typedef struct {\r | |
57 | UINT8 SetupValue;\r | |
58 | UINT16 DeviceType;\r | |
59 | UINT8 Class;\r | |
60 | UINT8 SubClass;\r | |
61 | } EFI_SETUP_BBS_MAP;\r | |
62 | \r | |
63 | typedef struct {\r | |
64 | UINT8 Class;\r | |
65 | UINT8 SubClass;\r | |
66 | } PCI_CLASS_RECORD;\r | |
67 | \r | |
68 | typedef struct {\r | |
69 | EFI_LEGACY_PIRQ_TABLE_HEADER PirqTable;\r | |
70 | EFI_LEGACY_IRQ_ROUTING_ENTRY IrqRoutingEntry[MAX_IRQ_ROUTING_ENTRIES];\r | |
71 | } EFI_LEGACY_PIRQ_TABLE;\r | |
72 | \r | |
73 | typedef struct {\r | |
74 | EFI_HANDLE Handle;\r | |
75 | UINT16 Vid;\r | |
76 | UINT16 Did;\r | |
77 | UINT16 SvId;\r | |
78 | UINT16 SysId;\r | |
79 | } DEVICE_STRUCTURE;\r | |
80 | \r | |
81 | typedef struct {\r | |
82 | EFI_GUID FileName;\r | |
83 | UINTN Valid;\r | |
84 | } SYSTEM_ROM_TABLE;\r | |
85 | \r | |
86 | typedef struct {\r | |
87 | UINT32 Signature;\r | |
88 | EFI_HANDLE Handle;\r | |
89 | EFI_LEGACY_BIOS_PLATFORM_PROTOCOL LegacyBiosPlatform;\r | |
90 | EFI_HANDLE ImageHandle;\r | |
91 | EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *PciRootBridgeIo;\r | |
92 | } LEGACY_BIOS_PLATFORM_INSTANCE;\r | |
93 | \r | |
94 | #define LEGACY_BIOS_PLATFORM_INSTANCE_SIGNATURE SIGNATURE_32('P','B','I','O')\r | |
95 | \r | |
96 | #define LEGACY_BIOS_PLATFORM_INSTANCE_FROM_THIS(this) \\r | |
97 | CR (this, \\r | |
98 | LEGACY_BIOS_PLATFORM_INSTANCE, \\r | |
99 | LegacyBiosPlatform, \\r | |
100 | LEGACY_BIOS_PLATFORM_INSTANCE_SIGNATURE \\r | |
101 | )\r | |
102 | \r | |
103 | #endif\r | |
104 | \r |