X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdePkg%2FLibrary%2FUefiPciSegmentLibPciRootBridgeIo%2FPciSegmentLib.h;h=639902f3d39f307a30e139521f37c1a4085b2fbc;hp=00129edea6bb405ee4e16f97115df9e8c5dcaac7;hb=32eb6739b961a5b4cc204b94220fa5ad15f79a9b;hpb=6f6ae61dc605f06a9fc27ffc295cc2f6f7b26dda diff --git a/MdePkg/Library/UefiPciSegmentLibPciRootBridgeIo/PciSegmentLib.h b/MdePkg/Library/UefiPciSegmentLibPciRootBridgeIo/PciSegmentLib.h index 00129edea6..639902f3d3 100644 --- a/MdePkg/Library/UefiPciSegmentLibPciRootBridgeIo/PciSegmentLib.h +++ b/MdePkg/Library/UefiPciSegmentLibPciRootBridgeIo/PciSegmentLib.h @@ -1,13 +1,13 @@ /** @file Include file of PciSegmentPciRootBridgeIo Library. - Copyright (c) 2007 - 2008, Intel Corporation All rights - reserved. This program and the accompanying materials are + Copyright (c) 2007 - 2018, 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 - + 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. @@ -16,7 +16,6 @@ #ifndef __DXE_PCI_SEGMENT_LIB__ #define __DXE_PCI_SEGMENT_LIB__ -#include #include @@ -37,23 +36,23 @@ typedef struct { /** Assert the validity of a PCI Segment address. - A valid PCI address should not contain 1's in bits 31:28 + A valid PCI Segment address should not contain 1's in bits 28..31 and 48..63 @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) + ASSERT (((A) & (0xffff0000f0000000ULL | (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 + @param A The 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))) + ((((UINT32)(A) << 4) & 0xff000000) | (((UINT32)(A) >> 4) & 0x00000700) | (((UINT32)(A) << 1) & 0x001f0000) | (LShiftU64((A) & 0xfff, 32))) #endif