]> git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/Csm/CsmSupportLib/LegacyPlatform.h
OvmfPkg: Apply uncrustify changes
[mirror_edk2.git] / OvmfPkg / Csm / CsmSupportLib / LegacyPlatform.h
1 /** @file
2 Legacy BIOS Platform support
3
4 Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
5
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8 **/
9
10 #ifndef LEGACY_BIOS_PLATFORM_H_
11 #define LEGACY_BIOS_PLATFORM_H_
12
13 #include <FrameworkDxe.h>
14
15 #include <Protocol/PciIo.h>
16 #include <Protocol/PciRootBridgeIo.h>
17 #include <Protocol/DevicePath.h>
18 #include <Protocol/LegacyInterrupt.h>
19 #include <Protocol/LegacyRegion2.h>
20 #include <Protocol/LegacyBiosPlatform.h>
21 #include <Protocol/FirmwareVolume.h>
22 #include <Protocol/DiskInfo.h>
23
24 #include <Library/UefiDriverEntryPoint.h>
25 #include <Library/UefiBootServicesTableLib.h>
26 #include <Library/UefiRuntimeServicesTableLib.h>
27 #include <Library/DebugLib.h>
28 #include <Library/BaseMemoryLib.h>
29 #include <Library/MemoryAllocationLib.h>
30 #include <Library/IoLib.h>
31 #include <Library/PciLib.h>
32 #include <Library/PcdLib.h>
33 #include <Library/DxeServicesLib.h>
34 #include <Library/DevicePathLib.h>
35
36 #include <IndustryStandard/Pci.h>
37
38 //
39 // PIRQ information constants.
40 //
41 #define MAX_IRQ_ROUTING_ENTRIES 6
42 #define MAX_IRQ_PRIORITY_ENTRIES 7
43
44 #define V_INTEL_VENDOR_ID 0x8086
45 #define V_PIIX4_IDE_DEVICE_ID 0x7010
46
47 //
48 // Type declarations
49 //
50 typedef struct {
51 UINT8 SetupValue;
52 UINT16 DeviceType;
53 UINT8 Class;
54 UINT8 SubClass;
55 } EFI_SETUP_BBS_MAP;
56
57 typedef struct {
58 UINT8 Class;
59 UINT8 SubClass;
60 } PCI_CLASS_RECORD;
61
62 typedef struct {
63 EFI_LEGACY_PIRQ_TABLE_HEADER PirqTable;
64 EFI_LEGACY_IRQ_ROUTING_ENTRY IrqRoutingEntry[MAX_IRQ_ROUTING_ENTRIES];
65 } EFI_LEGACY_PIRQ_TABLE;
66
67 typedef struct {
68 EFI_HANDLE Handle;
69 UINT16 Vid;
70 UINT16 Did;
71 UINT16 SvId;
72 UINT16 SysId;
73 } DEVICE_STRUCTURE;
74
75 typedef struct {
76 EFI_GUID FileName;
77 UINTN Valid;
78 } SYSTEM_ROM_TABLE;
79
80 typedef struct {
81 UINT32 Signature;
82 EFI_HANDLE Handle;
83 EFI_LEGACY_BIOS_PLATFORM_PROTOCOL LegacyBiosPlatform;
84 EFI_HANDLE ImageHandle;
85 EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *PciRootBridgeIo;
86 } LEGACY_BIOS_PLATFORM_INSTANCE;
87
88 #define LEGACY_BIOS_PLATFORM_INSTANCE_SIGNATURE SIGNATURE_32('P','B','I','O')
89
90 #define LEGACY_BIOS_PLATFORM_INSTANCE_FROM_THIS(this) \
91 CR (this, \
92 LEGACY_BIOS_PLATFORM_INSTANCE, \
93 LegacyBiosPlatform, \
94 LEGACY_BIOS_PLATFORM_INSTANCE_SIGNATURE \
95 )
96
97 #endif