audk/IntelSiliconPkg
Star Zeng e69d7e99e7 IntelSiliconPkg IntelVTdDxe: Optimize when func 0 is not implemented
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1169

PCI spec:
They are also required to always implement function 0 in the device.
Implementing other functions is optional and may be assigned in any
order (i.e., a two-function device must respond to function 0 but
can choose any of the other possible function numbers (1-7) for the
second function).

This patch updates ScanPciBus() to not scan other functions if
function 0 is not implemented.

Test done:
Added debug code below in the second loop of ScanPciBus(),
compared the debug logs with and without this patch, many
non-0 unimplemented functions are skipped correctly.

  DEBUG ((
    DEBUG_INFO,
    "%a() B%02xD%02xF%02x VendorId: %04x DeviceId: %04x\n",
    __FUNCTION__,
    Bus,
    Device,
    Function,
    VendorID,
    DeviceID
    ));

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
Cc: Tomson Chang <tomson.chang@intel.com>
Cc: Jenny Huang <jenny.huang@intel.com>
Cc: Amy Chan <amy.chan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2018-09-17 09:17:42 +08:00
..
Feature IntelSiliconPkg IntelVTdDxe: Optimize when func 0 is not implemented 2018-09-17 09:17:42 +08:00
Include IntelSiliconPkg: Move MicrocodeUpdate from UefiCpuPkg 2017-11-30 09:25:28 +08:00
Library/DxeSmbiosDataHobLib IntelSiliconPkg: Fix format issues 2016-12-20 10:51:16 +08:00
IntelSiliconPkg.dec IntelSiliconPkg VTdPmrPei: Add PcdVTdPeiDmaBufferSize(S3) 2018-03-06 22:31:49 +08:00
IntelSiliconPkg.dsc IntelSiliconPkg: Update MicrocodeUpdate build path in dsc 2017-12-01 09:31:52 +08:00