MdeModulePkg: PciHostBridgeLibNull: rewrap source to 79 characters
Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Marcel Apfelbaum <marcel@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
This commit is contained in:
@ -2,21 +2,22 @@
|
|||||||
Null instance of PCI Host Bridge Library with empty functions.
|
Null instance of PCI Host Bridge Library with empty functions.
|
||||||
|
|
||||||
Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials are
|
|
||||||
licensed and made available under the terms and conditions of
|
This program and the accompanying materials are licensed and made available
|
||||||
the BSD License which accompanies this distribution. The full
|
under the terms and conditions of the BSD License which accompanies this
|
||||||
text of the license may be found at
|
distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php.
|
http://opensource.org/licenses/bsd-license.php.
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
#include <PiDxe.h>
|
#include <PiDxe.h>
|
||||||
#include <Library/PciHostBridgeLib.h>
|
#include <Library/PciHostBridgeLib.h>
|
||||||
#include <Library/DebugLib.h>
|
#include <Library/DebugLib.h>
|
||||||
|
|
||||||
GLOBAL_REMOVE_IF_UNREFERENCED CHAR16 *mPciHostBridgeLibAcpiAddressSpaceTypeStr[] = {
|
GLOBAL_REMOVE_IF_UNREFERENCED
|
||||||
|
CHAR16 *mPciHostBridgeLibAcpiAddressSpaceTypeStr[] = {
|
||||||
L"Mem", L"I/O", L"Bus"
|
L"Mem", L"I/O", L"Bus"
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -40,7 +41,8 @@ PciHostBridgeGetRootBridges (
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Free the root bridge instances array returned from PciHostBridgeGetRootBridges().
|
Free the root bridge instances array returned from
|
||||||
|
PciHostBridgeGetRootBridges().
|
||||||
|
|
||||||
@param The root bridge instances array.
|
@param The root bridge instances array.
|
||||||
@param The count of the array.
|
@param The count of the array.
|
||||||
@ -59,13 +61,15 @@ PciHostBridgeFreeRootBridges (
|
|||||||
Inform the platform that the resource conflict happens.
|
Inform the platform that the resource conflict happens.
|
||||||
|
|
||||||
@param HostBridgeHandle Handle of the Host Bridge.
|
@param HostBridgeHandle Handle of the Host Bridge.
|
||||||
@param Configuration Pointer to PCI I/O and PCI memory resource descriptors.
|
@param Configuration Pointer to PCI I/O and PCI memory resource
|
||||||
The Configuration contains the resources for all the
|
descriptors. The Configuration contains the resources
|
||||||
root bridges. The resource for each root bridge is
|
for all the root bridges. The resource for each root
|
||||||
terminated with END descriptor and an additional END
|
bridge is terminated with END descriptor and an
|
||||||
is appended indicating the end of the entire resources.
|
additional END is appended indicating the end of the
|
||||||
The resource descriptor field values follow the description
|
entire resources. The resource descriptor field
|
||||||
in EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL.SubmitResources().
|
values follow the description in
|
||||||
|
EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL
|
||||||
|
.SubmitResources().
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
EFIAPI
|
EFIAPI
|
||||||
@ -84,14 +88,20 @@ PciHostBridgeResourceConflict (
|
|||||||
DEBUG ((EFI_D_ERROR, "RootBridge[%d]:\n", RootBridgeIndex++));
|
DEBUG ((EFI_D_ERROR, "RootBridge[%d]:\n", RootBridgeIndex++));
|
||||||
for (; Descriptor->Desc == ACPI_ADDRESS_SPACE_DESCRIPTOR; Descriptor++) {
|
for (; Descriptor->Desc == ACPI_ADDRESS_SPACE_DESCRIPTOR; Descriptor++) {
|
||||||
ASSERT (Descriptor->ResType <
|
ASSERT (Descriptor->ResType <
|
||||||
sizeof (mPciHostBridgeLibAcpiAddressSpaceTypeStr) / sizeof (mPciHostBridgeLibAcpiAddressSpaceTypeStr[0])
|
(sizeof (mPciHostBridgeLibAcpiAddressSpaceTypeStr) /
|
||||||
|
sizeof (mPciHostBridgeLibAcpiAddressSpaceTypeStr[0])
|
||||||
|
)
|
||||||
);
|
);
|
||||||
DEBUG ((EFI_D_ERROR, " %s: Length/Alignment = 0x%lx / 0x%lx\n",
|
DEBUG ((EFI_D_ERROR, " %s: Length/Alignment = 0x%lx / 0x%lx\n",
|
||||||
mPciHostBridgeLibAcpiAddressSpaceTypeStr[Descriptor->ResType], Descriptor->AddrLen, Descriptor->AddrRangeMax));
|
mPciHostBridgeLibAcpiAddressSpaceTypeStr[Descriptor->ResType],
|
||||||
|
Descriptor->AddrLen, Descriptor->AddrRangeMax
|
||||||
|
));
|
||||||
if (Descriptor->ResType == ACPI_ADDRESS_SPACE_TYPE_MEM) {
|
if (Descriptor->ResType == ACPI_ADDRESS_SPACE_TYPE_MEM) {
|
||||||
DEBUG ((EFI_D_ERROR, " Granularity/SpecificFlag = %ld / %02x%s\n",
|
DEBUG ((EFI_D_ERROR, " Granularity/SpecificFlag = %ld / %02x%s\n",
|
||||||
Descriptor->AddrSpaceGranularity, Descriptor->SpecificFlag,
|
Descriptor->AddrSpaceGranularity, Descriptor->SpecificFlag,
|
||||||
((Descriptor->SpecificFlag & EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_PREFETCHABLE) != 0) ? L" (Prefetchable)" : L""
|
((Descriptor->SpecificFlag &
|
||||||
|
EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_PREFETCHABLE
|
||||||
|
) != 0) ? L" (Prefetchable)" : L""
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -99,6 +109,8 @@ PciHostBridgeResourceConflict (
|
|||||||
// Skip the END descriptor for root bridge
|
// Skip the END descriptor for root bridge
|
||||||
//
|
//
|
||||||
ASSERT (Descriptor->Desc == ACPI_END_TAG_DESCRIPTOR);
|
ASSERT (Descriptor->Desc == ACPI_END_TAG_DESCRIPTOR);
|
||||||
Descriptor = (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *) ((EFI_ACPI_END_TAG_DESCRIPTOR *) Descriptor + 1);
|
Descriptor = (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *)(
|
||||||
|
(EFI_ACPI_END_TAG_DESCRIPTOR *)Descriptor + 1
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,12 +3,13 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials are licensed and made available
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# under the terms and conditions of the BSD License which accompanies this
|
||||||
# which accompanies this distribution. The full text of the license may be found at
|
# distribution. The full text of the license may be found at
|
||||||
# http://opensource.org/licenses/bsd-license.php
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR
|
||||||
|
# IMPLIED.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
##
|
##
|
||||||
@ -23,7 +24,8 @@
|
|||||||
LIBRARY_CLASS = PciHostBridgeLib
|
LIBRARY_CLASS = PciHostBridgeLib
|
||||||
|
|
||||||
#
|
#
|
||||||
# The following information is for reference only and not required by the build tools.
|
# The following information is for reference only and not required by the build
|
||||||
|
# tools.
|
||||||
#
|
#
|
||||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
||||||
#
|
#
|
||||||
|
Reference in New Issue
Block a user