MdeModulePkg/PciHostBridge: Count the (mm)io overhead when polling

RootBridgeIo.PollMem()/PollIo() originally don't count the IO/MMIO
access overhead when delaying.
The patch changes the implementation to count the access overhead
so that the actually delay equals to user required delay.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
This commit is contained in:
Ruiyu Ni
2018-04-23 14:20:26 +08:00
parent b22a62be5c
commit 0edb7ec5ce
5 changed files with 114 additions and 54 deletions

View File

@@ -1,7 +1,7 @@
## @file
# Generic PCI Host Bridge driver.
#
# Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
# Copyright (c) 2009 - 2018, 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
@@ -43,9 +43,9 @@
PciSegmentLib
UefiLib
PciHostBridgeLib
TimerLib
[Protocols]
gEfiMetronomeArchProtocolGuid ## CONSUMES
gEfiCpuIo2ProtocolGuid ## CONSUMES
gEfiDevicePathProtocolGuid ## BY_START
gEfiPciRootBridgeIoProtocolGuid ## BY_START
@@ -54,5 +54,4 @@
[Depex]
gEfiCpuIo2ProtocolGuid AND
gEfiMetronomeArchProtocolGuid AND
gEfiCpuArchProtocolGuid