summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* NetworkPkg: Fix incorrect buffer free in HttpDxeJiaxin Wu2016-04-281-22/+22
| | | | | | | | | | | | | | FragmentBuffer of each TcpWrap in HttpDxe should not be freed in HttpTcpTokenCleanup(). This buffer points to HttpMsg body actually, which is the responsibility of the caller to allocate a buffer for Body. Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Zhang Lubo <lubo.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com>
* NetworkPkg: Avoid the indefinite wait case in HttpDxeJiaxin Wu2016-04-283-17/+117
| | | | | | | | | | | | | | | | | Need the timer check to avoid the indefinite wait case in HttpDxe driver A.HTTP receive Header process in HttpTcpReceiveHeader(); B.HTTP receive Body process in HttpTcpReceiveBody(); Cc: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com> Cc: El-Haj-Mahmoud Samer <samer.el-haj-mahmoud@hpe.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Zhang Lubo <lubo.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
* MdeModulePkg: DxeCore MemoryPool Algorithm UpdateLiming Gao2016-04-281-1/+1
| | | | | | | | | | | | | | | | | | | | | Use 128 bytes as the start size region to be same to previous one. 64 bytes is small as the first range. On X64 arch, POOL_OVERHEAD takes 40 bytes, the pool data less than 24 bytes can be fit into it. But, the real allocation is few that can't reduce its free pool link list. And, the second range (64~128) has more allocation that also increases the free pool link list of the first range. Then, the link list will become longer and longer. When LinkList check enable in DEBUG tip, the long link list will bring the additional overhead and bad performance. Here is the performance data collected in our X64 platform with DEBUG enable. 64 byte: 22 seconds in BDS phase 128 byte: 19.6 seconds in BDS phase Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
* ShellPkg: Fix typos and EDK2 coding style issuesTapan Shah2016-04-271-10/+10
| | | | | | | | | Fixing typos and EDK2 coding style issues found from previous submit Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Tapan Shah <tapandshah@hpe.com> Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ShellPkg: Fix pci command for '_e' optionAbdul Lateef Attar2016-04-271-0/+1
| | | | | | | | | | | | | ShellPkg: Fix pci command for '_e' option Processing of '_e' argument was missing. Added fix, to process the '_e' option for printing additional AER information. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Abdul Lateef Attar <abdul-lateef.attar@hpe.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
* MdeModulePkg: Export ConfigResp only for form Package after ReadyToBootDandan Bi2016-04-272-8/+58
| | | | | | | | | | | | | | | | | | | | | The Hii runtime support feature will export the content of HiiDatabase and the ConfigResp string to runtime buffer after ReadyToBoot event is triggered. If some drivers add/update/remove packages from Hiidatabase after ReadyToBoot: Originally we will both export the content of HiiDatabase and the ConfigResp string for all packages. But now after investigation, we found only for form packages need to export the content of HiiDatabase and the ConfigResp string, for other packages just need to export the content of HiiDatabase. Now to enhance this logic. Cc: Liming Gao <liming.gao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
* MdeModulePkg: BOOLEAN type needn't to compare to TRUE/FALSE explicitlyDandan Bi2016-04-271-1/+1
| | | | | | | | | | Fix this issue to follow the coding style. Cc: Qiu Shumin <shumin.qiu@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
* MdeModulePkg: Add description to MdeModulePkg AcpiTable driver.Liming Gao2016-04-272-5/+6
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* NetworkPkg:HttpDxe:Consume DxeHttpLib API changesNagaraj Hegde2016-04-273-21/+17
| | | | | | | | | | | | | HttpGenRequestString is updated to HttpGenRequestMessage, with an additional argument. This patch updates the caller of the DxeHttpLib API. Also, we will avoid adding any '\0' to the string, which was added to make AsciiStrLen to work on the string. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Nagaraj Hegde <nagaraj-p.hegde@hpe.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
* MdeModulePkg:DxeHttpLib: Update to DxeHttpLib APINagaraj Hegde2016-04-272-18/+44
| | | | | | | | | | | | | Rename and update the logic of HttpGenRequestString API provided by DxeHttpLib. The RequestString size is returned as an argument. The user is not expected to do a AsciiStrLen anymore, and is not logical too, since request string can contain message body and using AsciiStrLen on such a string can provide truncated lengths. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Nagaraj Hegde <nagaraj-p.hegde@hpe.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
* NetworkPkg: Allow user to create a HTTP corporate boot option in setup page.Fu Siyuan2016-04-272-5/+6
| | | | | | | | | | | | This patch updates the HTTP Boot Configuration page to allow the user to create a corporate mode HTTP boot option, by leaving the URI string empty. The patch also fix a bug that the L"https://" should use StrnCmp() with Length 8. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
* MdePkg:Http11.h: Add defines for "Expect" headerNagaraj Hegde2016-04-271-0/+14
| | | | | | | | | | | Add #defines for "Expect" header, which is a part of RFC 2616 and used for HTTP PUT/POST operations. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hegde, Nagaraj P <nagaraj-p.hegde@hpe.com> Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
* BaseTools: Fix the bug for .aml to use ASL binary type in Asbuilt infYonghong Zhu2016-04-271-21/+16
| | | | | | | | | | | | Per build spec, the .aml file should use ASL binary type in the Asbuilt inf file. the original bug is .aml file may use BIN as binary type when the module type is not BASE or USER_DEFINED. This patch 1) fix this bug. 2) fix some indent coding style issue. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Update FMP Capsule support to follow FDF specYonghong Zhu2016-04-271-26/+34
| | | | | | | | | | | | Current the FMP Capsule feature is supported, but its format has a little different with FDF spec. so this patch 1) Align the FMP Capsule with FDF spec. 2) fix some style issue, eg: Tab. 3) Add a SectionParser function to check the section header info since this method is used in 7 places. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* OvmfPkg: SataControllerDxe: SataControllerStop: fix use after freeLaszlo Ersek2016-04-261-6/+11
| | | | | | | | | | | | | | | | | | It would be possible to remove the UAF without local variables, by calling SataPrivateData->PciIo->Attributes() before releasing SataPrivateData. However, by keeping the location of the call (for which temporary variables are necessary), we continue to match the error path logic in SataControllerStart(), which is always recommended. Reported-by: wang xiaofeng <winggundum82@163.com> Fixes: bcab71413407e61c144994925556725dd65eede9 Cc: wang xiaofeng <winggundum82@163.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* OvmfPkg: SataControllerDxe: SataControllerStop: remove useless null checkLaszlo Ersek2016-04-261-11/+9
| | | | | | | | | "ASSERT (SataPrivateData != NULL)" is just a few lines higher up. Cc: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* MdeModulePkg DxeCore: Check free memory type by CoreUpdateProfile()Star Zeng2016-04-264-12/+7
| | | | | | | | | | | | | It can improve profile performance, especially when PcdMemoryProfileMemoryType configured without EfiBootServicesData. CoreUpdateProfile() can return quickly, but not depend on the further code to find the buffer not recorded and then return. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* MdeModulePkg/NvmExpress: Clean Phase/CqHdbl/SqTdbl fields to restart HCTian Feng2016-04-262-4/+12
| | | | | | | | | | | | | Phase Tag, SqTdbl/CqHdbl and SqBuffer/CqBuffer should be cleared in NvmeControllerInit() to make HC functionality work when user invokes NvmeBlockIoReset(). Cc: Simon (Xiang) Lian-SSI <simon.lian@ssi.samsung.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Simon (Xiang) Lian-SSI <simon.lian@ssi.samsung.com>
* MdeModulePkg/NvmExpress: Fix bug of handling not null-terminated stringsFeng Tian2016-04-262-6/+15
| | | | | | | | | | | | | | In EnumerateNvmeDevNamespace(), when Private->ControllerData->Sn and/or Private->ControllerData->Mn are NOT null-terminated strings, UnicodeSPrintAsciiFormat(…) may generate unexpected (garbage) output string. Cc: Simon (Xiang) Lian-SSI <simon.lian@ssi.samsung.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Simon (Xiang) Lian-SSI <simon.lian@ssi.samsung.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdeModulePkg/NvmExpress: Fix mem leak in error handling of Start()Tian Feng2016-04-261-0/+4
| | | | | | | | | | | | Memory pointed to by Private->ControllerData has not been freed up correctly at error handling path. Cc: Simon (Xiang) Lian-SSI <simon.lian@ssi.samsung.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Simon (Xiang) Lian-SSI <simon.lian@ssi.samsung.com>
* MdeModulePkg/EmmcDxe: Fix wrong coding style on close braceFeng Tian2016-04-261-2/+3
| | | | | | | | | | The close brace of EmmcDxeComponentNameGetControllerName should be at the beginning of a line. Cc: Qiu Shumin <shumin.qiu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Shumin Qiu <shumin.qiu@intel.com>
* MdeModulePkg/EmmcDxe: Fix wrong typo on function commentsFeng Tian2016-04-262-2/+3
| | | | | | | Cc: Qiu Shumin <shumin.qiu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Shumin Qiu <shumin.qiu@intel.com>
* MdeModulePkg/Sd: Not explicitly compare BOOLEAN type with TRUE/FALSEFeng Tian2016-04-261-4/+4
| | | | | | | | | It's coding style update to follow EDKII coding style doc. Cc: Qiu Shumin <shumin.qiu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Shumin Qiu <shumin.qiu@intel.com>
* MdeModulePkg/MdeModulePkg.uni: Add SD related PCD descriptionFeng Tian2016-04-261-0/+3
| | | | | | | Cc: Shumin Qiu <shumin.qiu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Shumin Qiu <shumin.qiu@intel.com>
* ShellPkg: Fix Shell treats every .EFI file as an executable application.Qiu Shumin2016-04-262-1/+19
| | | | | | | | | | | | UEFI Shell 2.x cannot recognize whether a .EFI file is an application or a driver. This means when we typed in a driver image in Shell command line, Shell will load the driver image and try to run the entry point function of the driver. This patch check the ImageCodeType to fix the issue. Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
* BaseTools/UPT: UPT to Support UTF-8Hess Chen2016-04-261-4/+10
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools/ECC: Remove UNI checkpoint from ECCHess Chen2016-04-261-0/+2
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* Update ECC to support more doxygen keywordsHess Chen2016-04-262-5/+10
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* ShellPkg: Enahance 'dh' command to add more protocols decoding supportTapan Shah2016-04-256-10/+267
| | | | | | | | | | Adding EdidDiscovered, EdidActive protocol decode support a in 'dh' command. Extending GraphicsOutput protocol decoding to list all supported GOP resolutions. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Tapan Shah <tapandshah@hpe.com> Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* ArmPkg/Gic: Fix boundary checking bugHeyi Guo2016-04-253-9/+9
| | | | | | | | | mGicNumInterrupts is the total number of interrupts, so the interrupt ID equal to mGicNumInterrupts is also invalid. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Heyi Guo <heyi.guo@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* MdeModulePkg/SetupBrowserDxe: Remove the useless checkDandan Bi2016-04-251-1/+1
| | | | | | | | | | | | | When the type of HiiValue is BUFFER Type, the BufferValue of the related question can not be NULL, so can remove the check. Cc: Qiu Shumin <shumin.qiu@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
* MdeModulePkg/DxeCore: Avoid assertion in CoreLocateProtocolRuiyu Ni2016-04-251-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch uses CoreAcquireLockOrFail() instead of CoreAcquireProtocolLock() in CoreLocateProtocol() to avoid assertion when CoreLocateProtocol() is called with the protocol database locked. The issue was found when changing PcdDebugPrintErrorLevel to enable page/pool allocation debug message. Nt32 platform hangs immediately after DxeCore is loaded. Investigation shows the following calling stacks: DxeCore entry point (Install a certain protocol) 0 DxeCore::CoreInstallProtocolInterface // Protocol DB is locked 1 DxeCore::AllocatePool 2 PeiDxeDebugLibReportStatusCode::DebugPrint 3 DxeReportStatusCodeLib::ReportStatusCodeEx // <-------------------| 4 DxeReportStatusCodeLib::InternalGetReportStatusCode | 5 DxeCore::LocateProtocol(StatusCodeRuntimeProtocol) | // Assertion when locking Protocol DB 2nd time | 6 DxeCore::CoreAcquireProtocolLock | 7 PeiDxeDebugLibReportStatusCode::DebugAssert | 8 DxeReportStatusCodeLib::ReportSatusCodeEx // loop begins --------- In frame #6 the assertion is triggered due to the protocol database is already locked. #8 calls #4 and the loop begins. After changing #6 to CoreAcquireLockOrFail(), the assertion is avoided and the loop is broken. With the fix, NT32 can boot to Shell even setting PcdDebugPrintErrorLevel to 0xFFFFFFFF, with all error levels turned on. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdeModulePkg: Correct PlatformHookLibSerialPortPpi module type.Liming Gao2016-04-251-2/+2
| | | | | | | | | This library instance is PEIM type, not BASE type. It has the PPI dependency for PEIM. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* NetworkPkg: Fix GCC code build error of iSCSI driver.Zhang Lubo2016-04-221-1/+3
| | | | | | | | Fix GCC build error when refine the codes of iSCSI driver. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
* MdeModulePkg: Fix GCC code build error of iSCSI driver.Zhang Lubo2016-04-221-1/+3
| | | | | | | | Fix GCC build error when refine the codes of iSCSI driver. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
* Vlv2TbltDevicePkg: Convert to build FatPkg from sourceJordan Justen2016-04-225-8/+9
| | | | | | | | | | | Now that FatPkg is open source (and therefore in the EDK II tree) we can build and use it directly. Note: Not build tested Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Tim He <tim.he@intel.com>
* FatBinPkg: Change to 2-clause BSD licenseJordan Justen2016-04-222-35/+20
| | | | | | | | | The FatPkg is now open source. Update FatBinPkg license to match FatPkg. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* FatPkg: Add Contributions.txtJordan Justen2016-04-221-0/+218
| | | | | | | | | This is copied from MdePkg/Contributions.txt Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* FatPkg: Update License.txt to have the full license textJordan Justen2016-04-221-7/+22
| | | | | | | | | | | | | | | | | | | A script was used to convert the license text for the entire FatPkg. It used the shorter BSD text that we use in most files: 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 http://opensource.org/licenses/bsd-license.php The script also used the short version in FatPkg/License.txt. In each package's License.txt, we normally include the full BSD license text. This change copies the longer version of License.txt from MdePkg. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* NetworkPkg: refine codes of iSCSI driver.Zhang Lubo2016-04-223-15/+39
| | | | | | | | | | | | | | | Add error handling logic in DriverBingingStop function, it may return error status when invoking the UninstallProtocolInterface. Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
* MdeModulePkg: refine codes of iSCSI driver.Zhang Lubo2016-04-223-18/+40
| | | | | | | | | | | | | | | Add error handling logic in DriverBingingStop function, it may return error status when invoking the UninstallProtocolInterface. Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
* MdeModulePkg DxeCore: Enhance MemoryAttributesTable installationStar Zeng2016-04-225-15/+92
| | | | | | | | | | | | | | | | | | | | | | Current MemoryAttributesTable will be installed on ReadyToBoot event at TPL_NOTIFY level, it maybe incorrect when PcdHiiOsRuntimeSupport = TRUE as HiiDatabaseDxe will have runtime memory allocation for HII OS runtime support on and after ReadyToBoot. The issue was exposed at http://article.gmane.org/gmane.comp.bios.edk2.devel/10125. To make sure the correctness of MemoryAttributesTable, this patch is to enhance MemoryAttributesTable installation to install MemoryAttributesTable on ReadyToBoot event at TPL_CALLBACK - 1 level to make sure it is at the last of ReadyToBoot event, and also hook runtime memory allocation after ReadyToBoot. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Feng Tian <feng.tian@intel.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* MdeModulePkg DxeCore: Return memory type from internal free pool/pagesStar Zeng2016-04-225-59/+34
| | | | | | | | | | | | The following patch for MemoryAttributesTable will need the memory type. And CoreUpdateProfile() can also use the memory type for check. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* MdeModulePkg DxeCore: Fix a memory leak in InstallMemoryAttributesTable()Star Zeng2016-04-221-0/+2
| | | | | | | | | Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* MdeModulePkg/HiiDatabaseDxe: Fix the VS2010/VS2012 build failDandan Bi2016-04-221-0/+2
| | | | | | | | Cc: Liming Gao <liming.gao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
* MdeModulePkg DxeCore: Call PeCoffExtraActionLib member after ConstructorStar Zeng2016-04-221-13/+13
| | | | | | | | | | | | | | | | | | Originally, the code block for "Report DXE Core image information to the PE/COFF Extra Action Library" was after ProcessLibraryConstructorList(). To fix an issue, ProcessLibraryConstructorList() was moved to be right after CoreInitializeGcdServices() at c5d5379937629f3061d08b8d9a3386a40152ca2c, but the code block was left. As there maybe PeCoffExtraActionLib implementation need Constructor executed first, the patch is to move the code block for "Report DXE Core image information to the PE/COFF Extra Action Library" to be after ProcessLibraryConstructorList. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* MdeModulePkg/Sd: wait 1ms before check DATA line in voltage switch procFeng Tian2016-04-212-2/+2
| | | | | | | | | | 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.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
* MdeModulePkg/SdMmcPciHc: Reset the slot when sd device is connectedFeng Tian2016-04-211-0/+7
| | | | | | | | | | 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.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@Intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
* MdeModulePkg/Sd: Fix wrong response type of SD Deselect cmdFeng Tian2016-04-212-4/+8
| | | | | | | | | | The SD CMD7 deselect cmd have no response according to SD physical layer simplified spec. Cc: Hao Wu <hao.a.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
* MdeModulePkg/Sd: update the sd detection logicFeng Tian2016-04-212-15/+18
| | | | | | | | | | | | | | If there is no card presented before power on, there would have no card change interrupt generated. This is a corner case which can't be handled by old logic. The patch is used to move card present detection in the front of card change interrupt detection. Cc: Hao Wu <hao.a.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>