[edk2] [patch] MdeModulePkg/SdMmc: Add break to avoid dead loop when polling OCR Reg

2017-03-12 Thread Feng Tian
At worst case, OCR register may always not set BIT31. It will cause original code enter to dead loop. Adding a break for such case. Cc: Hao Wu <hao.a...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.t...@intel.com> --- MdeModul

[edk2] [patch 3/4] UefiCpuPkg/SmmCpuFeaturesLib: Split into two files

2016-12-15 Thread Feng Tian
ialize the MSEG specific MSR at the end of SmmCpuFeaturesInitializeProcessor(). This patch does not introduce any functional changes to the default implementation of the SmmCpuFeaturesLib. Cc: Jiewen Yao <jiewen@intel.com> Cc: Jeff Fan <jeff@intel.com> Cc: Feng Tian <feng.t...@i

[edk2] [patch 4/4] UefiCpuPkg/SmmCpuFeaturesLibStm: Add STM library instance

2016-12-15 Thread Feng Tian
he DSC file is updated to build both SmmCpuFeatureLib instances and to build two versions of the PiSmmCpuDxeSmm module using each of the SmmCpuFeatureLib instances. Cc: Jiewen Yao <jiewen@intel.com> Cc: Jeff Fan <jeff@intel.com> Cc: Feng Tian <feng.t...@intel.com> Cont

[edk2] [patch 0/4] Add STM (Smi Tranfer Monitor) support

2016-12-15 Thread Feng Tian
This patch series is used to add STM support to UefiCpuPkg. More details about STM are described in: http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-manual-325462.pdf

[edk2] [patch 1/4] UefiCpuPkg/Include: Update MSEG structure comments

2016-12-15 Thread Feng Tian
From: Michael Kinney <michael.d.kin...@intel.com> Add comments to describe fields of MSEG_HEADER and add define values for the MonitorFeatures field. Cc: Jiewen Yao <jiewen@intel.com> Cc: Jeff Fan <jeff@intel.com> Cc: Feng Tian <feng.t...@intel.com> Cont

[edk2] [patch 2/4] UefiCpuPkg: Add STM GUIDs, Protocols, and PCDs

2016-12-15 Thread Feng Tian
Jiewen Yao <jiewen@intel.com> Cc: Jeff Fan <jeff@intel.com> Cc: Feng Tian <feng.t...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kin...@intel.com> --- UefiCpuPkg/Include/Guid/MsegSmram.h

[edk2] [patch] UefiCpuPkg/PiSmmCpuDxeSmm: Fix .S & .asm build failure

2016-12-14 Thread Feng Tian
Cc: Michael D Kinney <michael.d.kin...@intel.com> Cc: Jeff Fan <jeff@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.t...@intel.com> --- UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmiEntry.S | 1 + UefiCpuPkg/PiSmmCpuDxeSmm/Ia3

[edk2] [patch] MdeModulePkg/SdMmc: Fix build failure caused by last check-in

2016-12-01 Thread Feng Tian
ent 1.0 Signed-off-by: Feng Tian <feng.t...@intel.com> --- MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c index

[edk2] [patch] MdeModulePkg/Ehci: don't clear port status bits during init

2016-11-29 Thread Feng Tian
r: TianoCore Contribution Agreement 1.0 Signed-off-by: Mike Turner <michael.tur...@microsoft.com> Signed-off-by: Feng Tian <feng.t...@intel.com> --- MdeModulePkg/Bus/Pci/EhciDxe/EhciReg.c | 10 +- MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.c | 18 +- 2 files changed, 22 in

[edk2] [patch] MdeModulePkg/Xhci: Add 10ms delay before sending SendAddr cmd to dev

2016-11-22 Thread Feng Tian
<star.z...@intel.com> Cc: Baraneedharan Anbazhagan <anbazha...@hp.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.t...@intel.com> Tested-by: Baraneedharan Anbazhagan <anbazha...@hp.com> --- MdeModulePkg/Bus/Pci/XhciDxe/Xhci.h

[edk2] [patch] MdeModulePkg/Emmc: coding style update to not use pointer as boolean

2016-11-14 Thread Feng Tian
Non-Boolean comparisons should use a compare operator. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.t...@intel.com> --- MdeModulePkg/Bus/Sd/EmmcDxe/EmmcBlockIo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/

[edk2] [patch] MdePkg: Fix spec mismatch in string representation of EMMC dev node

2016-11-09 Thread Feng Tian
Cc: Eric Jin <eric@intel.com> Cc: Liming Gao <liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.t...@intel.com> --- MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c | 2 +- MdePkg/Library/UefiDevicePathLib/

[edk2] [patch] MdeModulePkg/UsbMass: Revert changes of removing retry logic

2016-11-06 Thread Feng Tian
sense. Cc: Star Zeng <star.z...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.t...@intel.com> --- MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c | 7 +-- MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBot.c | 8 ++

[edk2] [patch v2] MdeModulePkg/Xhci: Change short packet debug message to verbose level

2016-10-30 Thread Feng Tian
Short Packet case is a normal case, we shouldn't print it as an error compared with v1, this patch addes the same fix in XhciPei. Cc: Star Zeng <star.z...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.t...@intel.com> --- MdeModul

[edk2] [patch] MdeModulePkg/Xhci: Change short packet debug message to verbose level

2016-10-30 Thread Feng Tian
Short Packet case is a normal case, we shouldn't print it as an error Cc: Star Zeng <star.z...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.t...@intel.com> --- MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c | 2 +- 1 file changed, 1 ins

[edk2] [patch] MdeModulePkg/Ufs: ensure the DBC field of UTP PRDT is dword-aligned

2016-10-17 Thread Feng Tian
to fill the DBC field to avoid bring issue on some UFS HCs. Cc: Hao Wu <hao.a...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.t...@intel.com> --- MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c | 5 + 1 file changed, 5 inserti

[edk2] [patch] MdeModulePkg/XhciPei: 1ms delay before accessing MMIO reg in reset

2016-09-13 Thread Feng Tian
Some XHCI HCs require to have 1ms delay before accessing any MMIO register in reset. Cc: Star Zeng <star.z...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.t...@intel.com> --- MdeModulePkg/Bus/Pci/XhciPei/XhcPeim.c | 1 + 1 fil

[edk2] [patch] MdeModulePkg/Xhci: add 1ms delay before access MMIO reg during reset

2016-09-13 Thread Feng Tian
Some XHCI host controllers require to have extra 1ms delay before accessing any MMIO register during HC reset. Cc: Star Zeng <star.z...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.t...@intel.com> --- MdeModulePkg/Bus/Pci/XhciDxe/X

[edk2] [patch] MdeModulePkg/AtaAtapiPassThru: update AtaStatusBlock after cmd exec

2016-08-09 Thread Feng Tian
AhciDumpPortStatus doesn't fully populate all the fields of AtaStatusBlock after completing command execution, which may bring issue if someone depends on the return status. Cc: Star Zeng <star.z...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fen

[edk2] [patch] MdeModulePkg/UsbMass: Not retry if usb bot transfer execution fail

2016-08-02 Thread Feng Tian
<star.z...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.t...@intel.com> --- MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c | 9 +++-- MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBot.c | 8 ++-- 2 files changed, 1

[edk2] [patch] MdeModulePkg: add generic SataController driver.

2016-07-19 Thread Feng Tian
kin...@intel.com> Cc: Amy Chan <amy.c...@intel.com> Cc: Giri P Mudusuru <giri.p.mudus...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.t...@intel.com> --- .../Bus/Pci/SataControllerDxe/ComponentName.c | 177 .../B

[edk2] [patch 3/3] MdeModulePkg/XhciDxe: fix a bug on TRB check in async int transfer

2016-07-10 Thread Feng Tian
noCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.t...@intel.com> --- MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c index 1130b6a..b6

[edk2] [patch 2/3] MdeModulePkg/UsbBus: reduce the port status polling before port reset

2016-07-10 Thread Feng Tian
t 1.0 Signed-off-by: Feng Tian <feng.t...@intel.com> --- MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c | 28 ++-- MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c| 20 +--- 2 files changed, 19 insertions(+), 29 deletions(-) diff --git a/MdeModulePkg/Bus/Usb/Usb

[edk2] [patch 1/3] MdeModulePkg/UsbBus: remove redundant host controller reset in UsbBus

2016-07-10 Thread Feng Tian
ed-off-by: Feng Tian <feng.t...@intel.com> --- MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c index ef002f5..7822022 100644 --- a/MdeModulePkg/Bus/U

[edk2] [patch 0/3] Fix issues in Usb stack

2016-07-10 Thread Feng Tian
1. remove redudant host controller reset 2. tune the enumeration process by removing redudant port status polling. 3. fix a bug in async interrupt transfer TRB check logic. Feng Tian (3): MdeModulePkg/UsbBus: remove redundant host controller reset in UsbBus MdeModulePkg/UsbBus: reduce

[edk2] [patch] MdeModulePkg/EmmcDxe: Don't expose BlockIo interface for RPMB partition

2016-06-28 Thread Feng Tian
uted-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.t...@intel.com> --- MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDxe.c | 138 +++--- 1 file changed, 45 insertions(+), 93 deletions(-) diff --git a/MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDxe.c b/MdeModulePk

[edk2] [patch] MdePkg/IndustryStandard: fix build break due to latest Atapi.h change

2016-06-28 Thread Feng Tian
Update the new introduced ATA_CMD_SEEK to ATA_CMD_ATAPI_SEEK. Cc: Liming Gao <liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.t...@intel.com> --- MdePkg/Include/IndustryStandard/Atapi.h | 4 ++-- 1 file changed, 2 inse

[edk2] [patch v3] MdeModulePkg/SdMmc: update TPL to notify to fix UEFI SCT hang

2016-06-24 Thread Feng Tian
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.t...@intel.com> --- MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c | 9 ++-- MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c | 2 +- MdeModulePkg/Bus/Sd/EmmcDxe/EmmcBlockIo.c | 60 +-

[edk2] [patch v2] MdeModulePkg/SdMmc: update TPL to notify to fix UEFI SCT hang

2016-06-23 Thread Feng Tian
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.t...@intel.com> --- MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c | 8 +-- MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c | 2 +- MdeModulePkg/Bus/Sd/EmmcDxe/Emm

[edk2] [patch] MdeModulePkg/SdMmc: update TPL to notify to fix UEFI SCT hang

2016-06-23 Thread Feng Tian
gt; waiting for async task completion. if the low layer driver doesn't run at TPL_NOTIFY level, it will have no time to trigger async task and cause system hang. Cc: Hao Wu <hao.a...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian &l

[edk2] [patch] MdeModulePkg/UsbMouseAbsolutePointerDxe: fix VS2015 NOOPT build error

2016-05-10 Thread Feng Tian
Cc: Shumin Qiu <shumin@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.t...@intel.com> --- .../Bus/Usb/UsbMouseAbsolutePointerDxe/UsbMouseAbsolutePointer.c | 8 1 file changed, 4 insertions(+), 4 deletions(-)

[edk2] [patch] MdeModulePkg/Sd: add Erase Block support on sd/emmc device

2016-05-03 Thread Feng Tian
It's done by producing EFI_ERASE_BLOCK_PROTOCOL protocol instance. Cc: Wu, Hao A <hao.a...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.t...@intel.com> --- MdeModulePkg/Bus/Sd/EmmcDxe/EmmcBlo

[edk2] [patch] MdeModulePkg/NvmExpressDxe: comments update to meet implementation

2016-04-26 Thread Feng Tian
Cc: Simon (Xiang) Lian-SSI <simon.l...@ssi.samsung.com> Cc: Wu, Hao A <hao.a...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.t...@intel.com> --- MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.h | 12 +--- 1 file cha

[edk2] [patch 0/4] Fix coding style issue in SdMmc modules

2016-04-21 Thread Feng Tian
it includes: 1. Add SD related PCD description to MdeModulePkg.uni 2. Not explicitly compare BOOLEAN type with TRUE/FALSE 3. Fix typo on function comments 4. Fix wrong coding style on close brace Feng Tian (4): MdeModulePkg/MdeModulePkg.uni: Add SD related PCD description MdeModulePkg/Sd

[edk2] [patch 3/4] MdeModulePkg/EmmcDxe: Fix wrong typo on function comments

2016-04-21 Thread Feng Tian
Cc: Qiu Shumin <shumin@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.t...@intel.com> --- MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDxe.c | 1 + MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDxe.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deleti

[edk2] [patch 4/4] MdeModulePkg/EmmcDxe: Fix wrong coding style on close brace

2016-04-21 Thread Feng Tian
The close brace of EmmcDxeComponentNameGetControllerName should be at the beginning of a line. Cc: Qiu Shumin <shumin@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.t...@intel.com> --- MdeModulePkg/Bus/Sd/EmmcDxe/ComponentName.c

[edk2] [patch] MdeModulePkg/UsbKbDxe: don't assert when the key read is invalid

2016-04-13 Thread Feng Tian
The GetKeyDescriptor() may return NULL when the KeyData is invalid. For such case, we should go to error handling path rather than assert Cc: Star Zeng <star.z...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.t...@intel.com> ---

[edk2] [patch 1/3] MdeModulePkg/Sd: Fix wrong response type of SD Deselect cmd

2016-04-12 Thread Feng Tian
The SD CMD7 deselect cmd have no response according to SD physical layer simplified spec. Cc: Hao Wu <hao.a...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.t...@intel.com> --- MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/Sd

[edk2] [patch 2/3] MdeModulePkg/SdMmcPciHc: Reset the slot when sd device is connected

2016-04-12 Thread Feng Tian
The original code doesn't reset the slot when there is device change. It may bring issue on device identification procedure of some SD cards. Cc: Hao Wu <hao.a...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.t...@intel.com> ---

[edk2] [patch 3/3] MdeModulePkg/Sd: wait 1ms before check DATA line in voltage switch proc

2016-04-12 Thread Feng Tian
According to SD Host Controller 3.0 spec figure 3-10, we have to wait 1ms before checking DAT[3:0] in voltage switch proc Cc: Hao Wu <hao.a...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.t...@intel.com> --- MdeModulePkg/Bus/Pci/S

[edk2] [patch 0/3] Fix some bugs found in EDKII SD/MMC stack

2016-04-12 Thread Feng Tian
this series is used to fix some bugs found with some sd cards Feng Tian (3): MdeModulePkg/Sd: Fix wrong response type of SD Deselect cmd MdeModulePkg/SdMmcPciHc: Reset the slot when sd device is connected MdeModulePkg/Sd: wait 1ms before check DATA line in voltage switch proc

[edk2] [patch] MdeModulePkg/Usb: Fix wrong condition judgment to support usb3.1 dev

2016-04-07 Thread Feng Tian
The bcdUSB value of usb3.1 is 0x0310, we update the condition judgment to get correct max packet size for usb3.1 dev. Cc: Star Zeng <star.z...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.t...@intel.com> --- MdeModulePkg/Bus/Pci/Xh

[edk2] [patch 0/4] Add EDKII SD/MMC stack to manage SD/EMMC device

2016-03-22 Thread Feng Tian
i. SdBlockIoPei driver to consume SdMmcHostController Ppi and produce VirutalBlkIo1&2 ii. EmmcBlockIoPei driver to consume SdMmcHostController Ppi and produce VirutalBlkIo1&2 iii.SdMmcPciHcPei driver to produce SdMmcHostController Ppi Feng Tian (4): Mde

[edk2] [patch 2/4] MdePkg/DevicePath: Add EMMC device path definition

2016-03-22 Thread Feng Tian
This device path node is introduced in UEFI2.6 spec. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.t...@intel.com> --- MdePkg/Include/Protocol/DevicePath.h | 11 .../Library/UefiDevicePathLib/DevicePathFromText.

[edk2] [patch v2 2/2] MdeModulePkg/UfsPassThru: Fix uninitialized field in QueryReqest UPIU

2016-02-29 Thread Feng Tian
The DataSegmentLength field of Query Request UPIU doesn't set correctly, which causes a 0 value rather than right data length is set to this field Cc: Hao Wu <hao.a...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.t...@

[edk2] [patch v2 0/2] Fix uninitialized field in QueryRequest UPIU in EDKII UFS stack

2016-02-29 Thread Feng Tian
Changes made compared with v1 of the patch: 1. Fix the same bug in UfsBlockIoPei Feng Tian (2): MdeModulePkg/UfsBlockIoPei: Fix uninitialized field in QueryRequest UPIU MdeModulePkg/UfsPassThru: Fix uninitialized field in QueryReqest UPIU MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHci.c

[edk2] [patch v2 1/2] MdeModulePkg/UfsBlockIoPei: Fix uninitialized field in QueryRequest UPIU

2016-02-29 Thread Feng Tian
The DataSegmentLength field of Query Request UPIU doesn't set correctly, which causes a 0 value rather than right data length is set to this field Cc: Hao Wu <hao.a...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.t...@