diff options
author | rsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-06-18 04:52:20 +0000 |
---|---|---|
committer | rsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-06-18 04:52:20 +0000 |
commit | 2a5c4680269cefa6555abae13d09f1a5358c83c9 (patch) | |
tree | 1957a51c0bcfb69b73110d5bc3160a913ef0ad22 /MdePkg/Include | |
parent | 0bc26da2bfc1cb469e25bdfc6efb9ed9af885d5c (diff) | |
download | edk2-platforms-2a5c4680269cefa6555abae13d09f1a5358c83c9.tar.xz |
Update the EFI_PCI_ADDRESS macro in PciRootBridgeIo.h to support PCI Express extended registers.
Signed-off-by: rsun3
Reviewed-by: mdkinney
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11848 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Include')
-rw-r--r-- | MdePkg/Include/Protocol/PciRootBridgeIo.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/MdePkg/Include/Protocol/PciRootBridgeIo.h b/MdePkg/Include/Protocol/PciRootBridgeIo.h index 30645a560e..449dcba67a 100644 --- a/MdePkg/Include/Protocol/PciRootBridgeIo.h +++ b/MdePkg/Include/Protocol/PciRootBridgeIo.h @@ -5,7 +5,7 @@ and PCI Configuration cycles on a PCI Root Bridge. It also provides services to perform
defferent types of bus mastering DMA.
- Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
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
@@ -19,6 +19,8 @@ #ifndef __PCI_ROOT_BRIDGE_IO_H__
#define __PCI_ROOT_BRIDGE_IO_H__
+#include <Library/BaseLib.h>
+
#define EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_GUID \
{ \
0x2f707ebb, 0x4a1a, 0x11d4, {0x9a, 0x38, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
@@ -106,7 +108,11 @@ typedef enum { #define EFI_PCI_ATTRIBUTE_INVALID_FOR_ALLOCATE_BUFFER (~EFI_PCI_ATTRIBUTE_VALID_FOR_ALLOCATE_BUFFER)
#define EFI_PCI_ADDRESS(bus, dev, func, reg) \
- ((UINT64) ((((UINTN) bus) << 24) + (((UINTN) dev) << 16) + (((UINTN) func) << 8) + ((UINTN) reg)))
+ (UINT64) ( \
+ (((UINTN) bus) << 24) | \
+ (((UINTN) dev) << 16) | \
+ (((UINTN) func) << 8) | \
+ (((UINTN) (reg)) < 256 ? ((UINTN) (reg)) : (UINT64) (LShiftU64 ((UINT64) (reg), 32))))
typedef struct {
UINT8 Register;
|