Copyright (C) 2016, Red Hat, Inc.\r
Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
\r
- This program and the accompanying materials are licensed and made available\r
- under the terms and conditions of the BSD License which accompanies this\r
- distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php.\r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT\r
- WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+ SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
#include <PiDxe.h>\r
DevicePath = AllocateCopyPool (sizeof mRootBridgeDevicePathTemplate,\r
&mRootBridgeDevicePathTemplate);\r
if (DevicePath == NULL) {\r
- DEBUG ((EFI_D_ERROR, "%a: %r\n", __FUNCTION__, EFI_OUT_OF_RESOURCES));\r
+ DEBUG ((DEBUG_ERROR, "%a: %r\n", __FUNCTION__, EFI_OUT_OF_RESOURCES));\r
return EFI_OUT_OF_RESOURCES;\r
}\r
DevicePath->AcpiDevicePath.UID = RootBusNumber;\r
RootBus->DevicePath = (EFI_DEVICE_PATH_PROTOCOL *)DevicePath;\r
\r
- DEBUG ((EFI_D_INFO,\r
+ DEBUG ((DEBUG_INFO,\r
"%a: populated root bus %d, with room for %d subordinate bus(es)\n",\r
__FUNCTION__, RootBusNumber, MaxSubBusNumber - RootBusNumber));\r
return EFI_SUCCESS;\r
return ScanForRootBridges (Count);\r
}\r
\r
+ ZeroMem (&Io, sizeof (Io));\r
+ ZeroMem (&Mem, sizeof (Mem));\r
+ ZeroMem (&MemAbove4G, sizeof (MemAbove4G));\r
+\r
Attributes = EFI_PCI_ATTRIBUTE_IDE_PRIMARY_IO |\r
EFI_PCI_ATTRIBUTE_IDE_SECONDARY_IO |\r
EFI_PCI_ATTRIBUTE_ISA_IO_16 |\r
QemuFwCfgReadBytes (FwCfgSize, &ExtraRootBridges);\r
\r
if (ExtraRootBridges > PCI_MAX_BUS) {\r
- DEBUG ((EFI_D_ERROR, "%a: invalid count of extra root buses (%Lu) "\r
+ DEBUG ((DEBUG_ERROR, "%a: invalid count of extra root buses (%Lu) "\r
"reported by QEMU\n", __FUNCTION__, ExtraRootBridges));\r
return NULL;\r
}\r
- DEBUG ((EFI_D_INFO, "%a: %Lu extra root buses reported by QEMU\n",\r
+ DEBUG ((DEBUG_INFO, "%a: %Lu extra root buses reported by QEMU\n",\r
__FUNCTION__, ExtraRootBridges));\r
}\r
\r
//\r
Bridges = AllocatePool ((1 + (UINTN)ExtraRootBridges) * sizeof *Bridges);\r
if (Bridges == NULL) {\r
- DEBUG ((EFI_D_ERROR, "%a: %r\n", __FUNCTION__, EFI_OUT_OF_RESOURCES));\r
+ DEBUG ((DEBUG_ERROR, "%a: %r\n", __FUNCTION__, EFI_OUT_OF_RESOURCES));\r
return NULL;\r
}\r
Initialized = 0;\r
{\r
EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *Descriptor;\r
UINTN RootBridgeIndex;\r
- DEBUG ((EFI_D_ERROR, "PciHostBridge: Resource conflict happens!\n"));\r
+ DEBUG ((DEBUG_ERROR, "PciHostBridge: Resource conflict happens!\n"));\r
\r
RootBridgeIndex = 0;\r
Descriptor = (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *) Configuration;\r
while (Descriptor->Desc == ACPI_ADDRESS_SPACE_DESCRIPTOR) {\r
- DEBUG ((EFI_D_ERROR, "RootBridge[%d]:\n", RootBridgeIndex++));\r
+ DEBUG ((DEBUG_ERROR, "RootBridge[%d]:\n", RootBridgeIndex++));\r
for (; Descriptor->Desc == ACPI_ADDRESS_SPACE_DESCRIPTOR; Descriptor++) {\r
ASSERT (Descriptor->ResType <\r
ARRAY_SIZE (mPciHostBridgeLibAcpiAddressSpaceTypeStr)\r
);\r
- DEBUG ((EFI_D_ERROR, " %s: Length/Alignment = 0x%lx / 0x%lx\n",\r
+ DEBUG ((DEBUG_ERROR, " %s: Length/Alignment = 0x%lx / 0x%lx\n",\r
mPciHostBridgeLibAcpiAddressSpaceTypeStr[Descriptor->ResType],\r
Descriptor->AddrLen, Descriptor->AddrRangeMax\r
));\r
if (Descriptor->ResType == ACPI_ADDRESS_SPACE_TYPE_MEM) {\r
- DEBUG ((EFI_D_ERROR, " Granularity/SpecificFlag = %ld / %02x%s\n",\r
+ DEBUG ((DEBUG_ERROR, " Granularity/SpecificFlag = %ld / %02x%s\n",\r
Descriptor->AddrSpaceGranularity, Descriptor->SpecificFlag,\r
((Descriptor->SpecificFlag &\r
EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_PREFETCHABLE\r