Commit Graph

25 Commits

Author SHA1 Message Date
rsun3 55565b0859 The PCI HotPlug Init Protocol returns a list of Root HPC, but it is possible that some HPCs in the list are not found during PCI enumeration. In this case, the PCI HotPlug Init Protocol.InitializeRootHpc() will not be called for the un-found HPCs. However, in AllRootHPCInitialized(), all reported HPCs are checked to see if it has been initialized, so TIME_OUT happens.
This check-in fix the issue by adding a flag to indicate if a HPC is found during PCI enumeration or not. This check-in also adds a debug message if any found HPC failed with initialization.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11081 6f19259b-4bc3-4df7-8a09-765794883524
2010-11-22 07:16:02 +00:00
vanjeff c1450e1670 Fix bug: The lower 2 bits of Width and stripped, Count will always be multiplied by 1, which will leave Count unchanged.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11043 6f19259b-4bc3-4df7-8a09-765794883524
2010-11-12 02:10:21 +00:00
rsun3 f13f9683db Fix ICC build break.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11020 6f19259b-4bc3-4df7-8a09-765794883524
2010-11-10 03:16:25 +00:00
rsun3 aeeb84bab4 Some existing PCI adapters with UEFI option ROMs make unaligned requests through the PCI I/O Protocol. Add support for unaligned requests in the PCI IO protocol implementation in the PCI Bus driver to be compatible with those UEFI option ROMs.
This solution defines a PCD Feature Flag to enabled support for unaligned requests through the PCI I/O Protocol.  This flag is disabled by default. Platforms that do want to support such EFI/UEFI drivers that make unaligned PCI I/O requests should enable this feature.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11016 6f19259b-4bc3-4df7-8a09-765794883524
2010-11-09 03:41:03 +00:00
rsun3 13fd0d50b5 Per the UEFI spec, if a PCI controller is a P2P bridge, then the I/O, Memory and Bus Master bits in the Command register of the PCI configuration header should be placed in the enabled state by the PCI Bus driver.
But current PCI bus driver has a bug that if a P2P bridge has no child devices detected during enumeration, the bits won’t be set. This may impact PCI hot plug capable bridges because the OS may re-assign resources for them causing the reserved resource by the firmware will be overwritten.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11013 6f19259b-4bc3-4df7-8a09-765794883524
2010-11-08 07:36:12 +00:00
jljusten 815119f3d9 DuetPkg, MdeModulePkg: Fix several enum comparions
These comparisons were not comparing an enum variable
with a member of the same enum type.

GCC 4.5 generated a warning for these comparison
operations.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10932 6f19259b-4bc3-4df7-8a09-765794883524
2010-10-13 07:08:29 +00:00
ydong10 cd7bfc2c63 Refine code to make code run safely.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10880 6f19259b-4bc3-4df7-8a09-765794883524
2010-09-16 04:51:25 +00:00
ydong10 c9325700d0 Refine soma code to make code run safely.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10877 6f19259b-4bc3-4df7-8a09-765794883524
2010-09-15 07:48:11 +00:00
niruiyu 6989af7168 clear the correct BAR register. Because for P2P device, only register from 0x10 to 0x14 is BAR register.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10805 6f19259b-4bc3-4df7-8a09-765794883524
2010-08-18 12:21:21 +00:00
rsun3 05399810c5 Return from ProgramBar() after VF BARs are programmed.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10645 6f19259b-4bc3-4df7-8a09-765794883524
2010-07-13 02:13:55 +00:00
rsun3 d40483911c Fix bugs in the PCI bus driver to support SR-IOV.
1. Expand the type of Offset in the _PCI_BAR structure from UINT8 to UINT16, because a VF BAR’s offset may be >= 0x100;
2. Enable ARI Capable Hierarchy for SR-IOV devices at earlier time because FirstVFOffset and VFStride of a SR-IOV device may change after its ARI Capable Hierarchy is set;
3. Change type of PcdSrIovSupport, PcdAriSupport, PcdMrIovSupport from FeatureFlag to [FixAtBuild, PcdDynamics], which allows SR-IOV/MR-IOV/ARI feature can be turn on/off dynamically, typically via a setup option.
4. Change PCI bus scan algorithm in PciScanBus() to prevent the case where some ARI extended functions may be skipped in the scan loop.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10644 6f19259b-4bc3-4df7-8a09-765794883524
2010-07-13 01:58:47 +00:00
mdkinney 8063b47b1c Fix bug in PciHostBridgeEnumerator().
A linked list is created for the list of PCI Root Bridges in the platform.  This list is then traversed to enumerate each PCI Root Bridge.  After enumeration, the RootBridgeDev is destroyed, but it was not removed from the linked list before it was destroyed.  This left the linked list of PCI Root Bridges in a bad state, specially if memory is cleared on frees, or the freed buffer was reallocated.

The fix is to remove the node from the linked list before the RootBridgeDev is destroyed.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10463 6f19259b-4bc3-4df7-8a09-765794883524
2010-05-07 22:44:54 +00:00
hhtian cd5ebaa06d Update the copyright notice format
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10420 6f19259b-4bc3-4df7-8a09-765794883524
2010-04-24 09:49:11 +00:00
lgao4 6bfbb5f0e0 1. Correct File header to ## @file
2. Remove unnecessary .common] postfix on section.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10052 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-24 00:21:16 +00:00
mdkinney 188e4e8444 Remove unnecessary use of FixedPcdxxx() functions and [FixedPcd] INF sections. These should only be used for PCDs that are used to pre-init global variables, pre-init global structures, or size arrays.
Do some minor clean ups to INF files
 


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9868 6f19259b-4bc3-4df7-8a09-765794883524
2010-01-29 23:39:48 +00:00
rsun3 1ccdbf2a3e Improve coding style in MdeModulePkg.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9793 6f19259b-4bc3-4df7-8a09-765794883524
2010-01-19 06:42:21 +00:00
rsun3 aa75dfeccd Fix some coding style issues in MdeModulePkg.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9774 6f19259b-4bc3-4df7-8a09-765794883524
2010-01-15 08:03:23 +00:00
rsun3 c11fa40c4e Fix the issue in MdeModulePkg that mismatch between PCD type and the PCD Lib API to get the PCD.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9751 6f19259b-4bc3-4df7-8a09-765794883524
2010-01-14 09:46:12 +00:00
rsun3 4661d5df04 Fix a bug about linked list manipulation in DegradeResource() in PCI bus driver.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9622 6f19259b-4bc3-4df7-8a09-765794883524
2009-12-29 06:16:29 +00:00
rsun3 de028a62de Fix a bug in DegradeResource().
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9621 6f19259b-4bc3-4df7-8a09-765794883524
2009-12-29 03:14:37 +00:00
rsun3 f00b5d8352 Fix ICC toolchain build break.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9600 6f19259b-4bc3-4df7-8a09-765794883524
2009-12-25 01:56:24 +00:00
rsun3 6051620257 Update resource degrade algorithm in PCI bus driver. (1)If any child device has both option ROM and 64-bit BAR, degrade its PMEM64/MEM64 requests in case that if a legacy option ROM image can not access 64-bit resources. (2) If there are both PMEM64 and PMEM32 requests from child devices, which can not be satisfied by a P2P bridge simultaneously, keep PMEM64 and degrade PMEM32 to MEM32. (3) PMEM64/MEM64 are not supported when firmware is in 32-bit mode.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9599 6f19259b-4bc3-4df7-8a09-765794883524
2009-12-24 14:05:36 +00:00
rsun3 1ef2678316 Update PCI bus driver to support non-standard PCI to PCI bridge I/O window alignment, such as 2K/1K/512 byte. Feature PCD PcdPciBridgeIoAlignmentProbe is introduced to turn on/off this feature.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9598 6f19259b-4bc3-4df7-8a09-765794883524
2009-12-24 11:58:04 +00:00
vanjeff 0ce94f384e Set Handle to NULL when creating a new handle.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9358 6f19259b-4bc3-4df7-8a09-765794883524
2009-10-26 02:28:49 +00:00
davidhuang 9060e3ec6d 1. Impl PI 1.2 PCI part. Major changes include:
a. Update PciBusDxe module, and move it from IntelFrameworkModulePkg to MdeModulePkg
  b. Move IncompatiblePciDeviceSupportDxe module from IntelFrameworkModulePkg to MdeModulePkg
  c. Update the related consumes in inf/dsc/fdf

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9347 6f19259b-4bc3-4df7-8a09-765794883524
2009-10-20 03:43:40 +00:00