]> git.proxmox.com Git - mirror_edk2.git/blob - DuetPkg/PciRootBridgeNoEnumerationDxe/PcatPciRootBridgeDevicePath.c
Patch to remove STATIC modifier. This is on longer recommended by EFI Framework codin...
[mirror_edk2.git] / DuetPkg / PciRootBridgeNoEnumerationDxe / PcatPciRootBridgeDevicePath.c
1 /*++
2
3 Copyright (c) 2005 - 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
8
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.
11
12 Module Name:
13 PcatPciRootBridgeDevicePath.c
14
15 Abstract:
16
17 EFI PCAT PCI Root Bridge Device Path Protocol
18
19 Revision History
20
21 --*/
22
23 #include "PcatPciRootBridge.h"
24
25 //
26 // Static device path declarations for this driver.
27 //
28
29 typedef struct {
30 ACPI_HID_DEVICE_PATH AcpiDevicePath;
31 EFI_DEVICE_PATH_PROTOCOL EndDevicePath;
32 } EFI_PCI_ROOT_BRIDGE_DEVICE_PATH;
33
34 EFI_PCI_ROOT_BRIDGE_DEVICE_PATH mEfiPciRootBridgeDevicePath = {
35 {
36 ACPI_DEVICE_PATH,
37 ACPI_DP,
38 (UINT8) (sizeof(ACPI_HID_DEVICE_PATH)),
39 (UINT8) ((sizeof(ACPI_HID_DEVICE_PATH)) >> 8),
40 EISA_PNP_ID(0x0A03),
41 0
42 },
43 {
44 END_DEVICE_PATH_TYPE,
45 END_ENTIRE_DEVICE_PATH_SUBTYPE,
46 END_DEVICE_PATH_LENGTH,
47 0
48 }
49 };
50
51 EFI_STATUS
52 PcatRootBridgeDevicePathConstructor (
53 IN EFI_DEVICE_PATH_PROTOCOL **Protocol,
54 IN UINTN RootBridgeNumber,
55 IN BOOLEAN IsPciExpress
56 )
57 /*++
58
59 Routine Description:
60
61 Construct the device path protocol
62
63 Arguments:
64
65 Protocol - protocol to initialize
66
67 Returns:
68
69 None
70
71 --*/
72 {
73 ACPI_HID_DEVICE_PATH *AcpiDevicePath;
74
75 *Protocol = DuplicateDevicePath((EFI_DEVICE_PATH_PROTOCOL *)(&mEfiPciRootBridgeDevicePath));
76
77 AcpiDevicePath = (ACPI_HID_DEVICE_PATH *)(*Protocol);
78
79 AcpiDevicePath->UID = (UINT32)RootBridgeNumber;
80
81 if (IsPciExpress) {
82 AcpiDevicePath->HID = EISA_PNP_ID(0x0A08);
83 }
84
85 return EFI_SUCCESS;
86 }
87