RenameRename DxePciLibPciRootBridgeIo to UefiPciLibPciRootBridgeIo.

Rename DxePciSegmentLibPciRootBridgeIo to UefiPciSegmentLibPciRootBridgeIo.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6696 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
xli24
2008-11-24 06:47:15 +00:00
parent a2461f6bc7
commit 6f6ae61dc6
5 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,58 @@
# @file
# PCI Segment Library that layers on top of the PCI Root Bridge I/O Protocol.
#
# This library produces the APIs from the PCI Library and implements these APIs
# by calling into the PCI Root Bridge I/O Protocols that are present in the platform.
# The PCI Root Bridge I/O Protocols are typically produced by a chipset specific DXE driver.
# This library binds to all of the PCI Root Bridge I/O Protocols in the platform and handles
# the translation from a PCI segment number into a specific PCI Root Bridge I/O Protocol.
#
# Copyright (c) 2007 - 2008, Intel Corporation.
#
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
#
#
[Defines]
INF_VERSION = 0x00010005
BASE_NAME = DxePciSegmentLibPciRootBridgeIo
FILE_GUID = C6068612-B6E0-48a3-BB92-60E4A4F89EDF
MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0
LIBRARY_CLASS = PciSegmentLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SMM_DRIVER DXE_SAL_DRIVER UEFI_DRIVER UEFI_APPLICATION
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
CONSTRUCTOR = PciSegmentLibConstructor
DESTRUCTOR = PciSegmentLibDestructor
#
# The following information is for reference only and not required by the build tools.
#
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
#
[Sources.common]
PciSegmentLib.h
PciSegmentLib.c
[Packages]
MdePkg/MdePkg.dec
[LibraryClasses]
MemoryAllocationLib
BaseLib
UefiBootServicesTableLib
DebugLib
[Protocols]
gEfiPciRootBridgeIoProtocolGuid # PROTOCOL ALWAYS_CONSUMED

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,59 @@
/** @file
Include file of PciSegmentPciRootBridgeIo Library.
Copyright (c) 2007 - 2008, Intel Corporation All rights
reserved. This program and the accompanying materials are
licensed and made available under the terms and conditions of
the BSD License which accompanies this distribution. The full
text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef __DXE_PCI_SEGMENT_LIB__
#define __DXE_PCI_SEGMENT_LIB__
#include <PiDxe.h>
#include <Protocol/PciRootBridgeIo.h>
#include <Library/PciSegmentLib.h>
#include <Library/BaseLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/DebugLib.h>
#include <IndustryStandard/Acpi.h>
typedef struct {
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *PciRootBridgeIo;
UINT32 SegmentNumber;
UINT64 MinBusNumber;
UINT64 MaxBusNumber;
} PCI_ROOT_BRIDGE_DATA;
/**
Assert the validity of a PCI Segment address.
A valid PCI address should not contain 1's in bits 31:28
@param A The address to validate.
@param M Additional bits to assert to be zero.
**/
#define ASSERT_INVALID_PCI_SEGMENT_ADDRESS(A,M) \
ASSERT (((A) & (0xf0000000 | (M))) == 0)
/**
Translate PCI Lib address into format of PCI Root Bridge I/O Protocol
@param A Address that encodes the PCI Bus, Device, Function and
Register.
**/
#define PCI_TO_PCI_ROOT_BRIDGE_IO_ADDRESS(A) \
((((A) << 4) & 0xff000000) | (((A) >> 4) & 0x00000700) | (((A) << 1) & 0x001f0000) | (LShiftU64((A) & 0xfff, 32)))
#endif