summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-07-13Multi board support.zwei4
Cleanup libraries for multi boards. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: zwei4 <david.wei@intel.com>
2017-07-12Build Script.lushifex
GCC build script clean up. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: lushifex <shifeix.a.lu@intel.com>
2017-07-12Build Script.lushifex
Change GCC build script. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: lushifex <shifeix.a.lu@intel.com>
2017-07-12Move to new locationGuo Mang
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Guo Mang <mang.guo@intel.com>
2017-07-12ShellBinPkg: Ia32/X64 Shell binary update.Ruiyu Ni
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> (cherry picked from commit 46e2632b4e873dc191bf008c95b47340c8957a47)
2017-07-12MdeModulePkg/BMMUiLib: Fix incorrect variable nameDandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=592 In function UpdateConsoleContent, we compare console name with "ErrOut" string to check whether the content in console Error device page has been changed. But when call function UpdateConsoleContent, we pass console name as "ConErr" by mistake. This patch is to fix the inconsistent issue. Cc: Eric Dong <eric.dong@intel.com> Cc: Liming Gao <liming.gao@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> (cherry picked from commit 983f59932db28ae37b9f9e545c1258bc59aa71ca)
2017-07-12SecurityPkg TcgDxe: Simplify debug msg when "TPM not working properly"Star Zeng
Current code for case "TPM not working properly" uses the predefined macro __FILE__ in debug format string, but uses predefined macro __LINE__ as parameter, and it also uses multiple pairs of "" in debug format string. To be simple and clear, this patch is to update the code to just use "DriverEntry: TPM not working properly\n" as the debug message. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Amy Chan <amy.chan@intel.com> Cc: Chasel Chiu <chasel.chiu@intel.com> Cc: Chao Zhang <chao.b.zhang@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> Reviewed-by: Chasel Chiu <chasel.chiu@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com> (cherry picked from commit ec4910cd3336565fdb61dafdd9ec4ae7a6160ba3)
2017-07-12ShellPkg: Fix typo errors in ifconfig help outputTapan Shah
Found few instances where IPv4 and DHCPv4 spelled incorrectly as IP4 and DHCP4 respectively. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Tapan Shah <tapandshah@hpe.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> (cherry picked from commit 97f1cd597e01b9c96a1be9b33d7785362269506e)
2017-07-12Shell/alias: Print detailed error when deleting aliasRuiyu Ni
STR_GEN_ERR_NOT_FOUND is added and currently is only used by alias command. This string template can be used by other commands as well. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Tapan Shah <tapandshah@hpe.com> (cherry picked from commit 937bc66e1e555e74acdeba766b12c06fd506e408)
2017-07-12ShellPkg/ifconfig: Update help messagehegdenag
Couple of instances had IP4 mentioned, instead of IPv4. Changing all to IPv4 to maintain consistency. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com> Reviewed-by: Tapan Shah <tapandshah@hpe.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com> (cherry picked from commit c1f4b86ba786cc9cbe5c88a05abc9bf0554b1cc8)
2017-07-12ShellPkg: Remove unnecessary Readme.txtRuiyu Ni
The Readme.txt contains instructions about how to integrate Shell into Nt32. Actually Nt32 already contains a macro USE_OLD_SHELL to choose OLD or NEW Shell. So remove this txt file. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> (cherry picked from commit 752234768eee79c3e9b32b9a2d134148ecaa635a)
2017-07-12BaseTools/Bin: Update the BaseTools Win32 binaries version informationHao Wu
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com>
2017-07-12MdePkg: update Wi-Fi/Supplicant header files to meet UEFI 2.7.Wang, Fan
This patch is used to update supplicant.h and wifi2.h to meet UEFI 2.7 definition. Add EfiSupplicant80211PMK field in EFI_SUPPLICANT_DATA_TYPE and change **NetworkDesc to NetworkDesc[1] in EFI_80211_GET_NETWORKS_RESULT. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wang Fan <fan.wang@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> (cherry picked from commit b941c34ef859971e29683ffb57c309e24e6a96be)
2017-07-12BaseTools: Fix the bug use same FMP_PAYLOAD in different capsule fileYonghong Zhu
Fix the bug that use same FMP_PAYLOAD in different capsule file. Because in previous FMP generation, the FMP already be generated, so we don't need to regenerate again. 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> (cherry picked from commit d4c558e83d8f428393d27816772efc7f4b0e8403)
2017-07-12BaseTools: Fix incremental build failure that override file be removedYonghong Zhu
Fix a Incremental build failure. The case is: Both A and B package will include a same .h file, and in the driver's packages section, A package is listed before B package, so we will use the .h file in the A package and build success, then we directly delete the .h file in package A, it cause increment build failure since in the AutoGenTimeStamp file the .h file in A can't be found. 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> (cherry picked from commit 4a1167dfef3deff3d96f06ccfd104e26486d7dae)
2017-07-12ShellBinPkg: Ia32/X64 Shell binary update.Ruiyu Ni
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> (cherry picked from commit b9f1625193a6e83aed59c5b801f105b8ba8cc546)
2017-07-12ShellPkg/parse: Handle Unicode stream from pipe correctlyRuiyu Ni
The original code expects the Unicode stream from pipe doesn't contains the Unicode BOM. But that's not true. Commit [9ed21946c76e430097e9c4e59b419af928e0cb8c] changes CreateFileInterfaceMem() to add the BOM for Unicode stream. When parse pipe support was firstly added, a private implementation ParseReturnStdInLine() was created to specially handle the Unicode stream without BOM. Since now the Unicode steam contains BOM, the private implementation can be removed and ShellFileHandleReturnLine() can be used directly. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Tapan Shah <tapandshah@hpe.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> (cherry picked from commit 4e6394455a8a9741dafe2928373db461ef21671e)
2017-07-12ShellPkg/alias: Return status for alias deletionRuiyu Ni
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Tapan Shah <tapandshah@hpe.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> (cherry picked from commit 7bd5a2c81ed5bc52ed63b348fcb1686f1fb5b398)
2017-07-12ShellPkg/alias: Fix bug to support upper-case aliasRuiyu Ni
alias in UEFI Shell is case insensitive. Old code saves the alias to variable storage without converting the alias to lower-case, which results upper case alias setting doesn't work. The patch converts the alias to lower case before saving to variable storage. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Tapan Shah <tapandshah@hpe.com> (cherry picked from commit 7ec69844b8f1d348c0699cc882222c728acb13ad)
2017-07-12MdePkg: Add BluetoothAttribute.h and BluetoothLeConfig.hRuiyu Ni
UEFI Spec 2.7 introduces BluetoothAttribute and BluetoothLeConfig protocols. The patch adds the definitions for them. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> (cherry picked from commit 9c94cc2ca270c2a9121c485281792c178281ac7d)
2017-07-12MdePkg/BluetoothIo: Formalize function header comments.Ruiyu Ni
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> (cherry picked from commit 1e4547668e097951b4976db655e3822666ae2c37)
2017-07-12MdePkg/BluetoothHc: Add detailed function header commentsRuiyu Ni
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> (cherry picked from commit 5a39f404f3b870fd27d0127b864d82c90704fde6)
2017-07-12MdePkg/BluetoothConfig: Add new EFI_BLUETOOTH_CONFIG_DATA_TYPE typesRuiyu Ni
UEFI spec 2.7 adds new EFI_BLUETOOTH_CONFIG_DATA_TYPE types. The patch adds them to the header file. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> (cherry picked from commit 0cbd5830b48a97cd8a8089d2830c3d30fc3e7a63)
2017-07-12MdePkg/DevicePath: Add BluetoothLe device path node supportRuiyu Ni
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com> (cherry picked from commit ff5623e990782ad62c5f6943087ebafb17afe8ba)
2017-07-12ShellPkg/UefiShellLib: Avoid reading undefined content before stringHao Wu
https://bugzilla.tianocore.org/show_bug.cgi?id=566 In function InternalShellPrintWorker(), if the string in variable 'mPostReplaceFormat2' starts with character L'%', the following expression: *(ResumeLocation-1) == L'^' at line 2831 will read an undefined value before the starting of string 'mPostReplaceFormat2'. This commit adds additional logic to avoid reading undefined content. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> (cherry picked from commit d727614c913449a59e8333c4d75cff4ebf1f9779)
2017-07-12MdeModulePkg/Xhci: Correct the indention of commentsRuiyu Ni
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> (cherry picked from commit b0b626ea2f16faca9f864599384fd184a89e0195)
2017-07-12ShellPkg/UefiShellLib: Check correct variable for NULLJeff Westfahl
Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Westfahl <jeff.westfahl@ni.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> (cherry picked from commit 5220897839dd583e9d1f749fb4d8196ff86ccc8b)
2017-07-12MdeModulePkg/Xhci: Remove TRB when canceling Async Int TransferRuiyu Ni
Some USB devices don't report data periodically through Int Transfer. They report data only when be asked. If the TRB is not removed from the XHCI HW, when next time HOST asks data again, the data is reported but consumed by the previous TRB, which results the HOST thinks data never comes. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao A Wu <hao.a.wu@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> (cherry picked from commit b33b1055b0026f36be97fb5ec6826436088e9a23)
2017-07-12MdeModulePkg/MnpDxe: Fix EBC build hang issue.Fu Siyuan
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> (cherry picked from commit 54d7177c78dc35919a631c8baa533d287bf0ae57)
2017-07-12MdeModulePkg/UsbBus: Correct debug messageRuiyu Ni
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> (cherry picked from commit 76d1c752cb6629262bb999204f574e274be00500)
2017-07-12MdeModulePkg/UsbBus: Fix system hang when failed to uninstall UsbIoRuiyu Ni
When "reconnect -r" is typed in shell, UsbFreeInterface() is called to uninstall the UsbIo and DevicePath. But When a UsbIo is opened by a driver and that driver rejects to close the UsbIo in Stop(), the uninstall doesn't succeed. But UsbFreeInterface () frees the DevicePath memory without check whether the uninstall succeeds. It leads to the DXE core database contain a DevicePath instance but that instance's memory is freed. Assertion happens when someone calls InstallProtocol(DevicePath) because the InstallProtocol() checks all DevicePath instance to find whether the same one exits in database. We haven't seen any USB device driver which rejects to close UsbIo in Stop(), but it's very likely. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> (cherry picked from commit b659b503fa7c43677ccab40d311dbab33366ee97)
2017-07-12BaseTools/Bin: Update the BaseTools Win32 binaries version informationHao Wu
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com>
2017-07-12MdePkg/DevicePathLib: Reverse the byte order of BD_ADDR for BluetoothHao Wu
For the following two functions: DevPathFromTextBluetooth() DevPathToTextBluetooth() The Bluetooth device address "UINT8 Address[6]" is displayed with the order from Address[5] to Address[0]. This commit reverses the order. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> (cherry picked from commit 4fc8277133fb011d028b4e0a42444ab6f552d0b9)
2017-07-12UefiCpuPkg/MpInitLib: Force to enable X2APIC if CPU number > 255Jeff Fan
Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> (cherry picked from commit 71d8226ac6f256d360626c8072337f9373f95671)
2017-07-12UefiCpuPkg/MpInitLib: Check APIC mode change around AP functionJeff Fan
If APIC ID values are changed during AP functions execution, we need to update new APIC ID values in local data structure accordingly. But if APIC mode change happened during AP function execution, we do not support APIC ID value changed. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> (cherry picked from commit c6b0feb39637867744bb7bffaa8534ecb1de707d)
2017-07-12UefiCpuPkg/CpuCommonFeaturesLib: Support X2APIC enableJeff Fan
Current X2APIC is enabled in MpInitLib (used by CpuMpPei and CpuDxe) to follow SDM suggestion. That means we only enable X2APIC if we found there are any initial CPU ID value >= 255. This patch is to provide one chance for platform to enable X2APIC even there is no any initial CPU ID value >= 255. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> (cherry picked from commit 6661abb6953fcb6dafe4eee9ec741685ceb3a552)
2017-07-12BaseTools: Correct if condition expression for DatumType == 'VOID*'Yonghong Zhu
Correct the if condition expression for DatumType == 'VOID*'. Current this condition is not work since the DatumType is changed before we do the value judgement. 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> (cherry picked from commit 687bde9cac2ce1a45d916bc26caa370d15d58fce)
2017-07-12BaseTools: Fix the bug that different DSC file use same build outputYonghong Zhu
We meet a corner case that build different DSC file, but the DSC file use same build output directory, and the different DSC file use a same PCD with different Pcd Type, it cause build failure. 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> (cherry picked from commit 2d499388452cf8215265a0757395e7dbcdb32ea8)
2017-07-12BaseTools: Fix incremental build bug on DynamicPcd Token GenerationYonghong Zhu
During incremental build, we meet the bug that the different drivers use the different token for the same DynamicPcd. 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> (cherry picked from commit 99adfe9f51cbe105ec12f0572571fc85762382fb)
2017-07-12UefiCpuPkg/MpInitLib: Fix X64 XCODE5/NASM compatibility issuesMichael Kinney
https://bugzilla.tianocore.org/show_bug.cgi?id=565 Fix NASM compatibility issues with XCODE5 tool chain. The XCODE5 tool chain for X64 builds using PIE (Position Independent Executable). For most assembly sources using PIE mode does not cause any issues. However, if assembly code is copied to a different address (such as AP startup code in the MpInitLib), then the X64 assembly source must be implemented to be compatible with PIE mode that uses RIP relative addressing. The specific changes in this patch are: * Use LEA instruction instead of MOV instruction to lookup the addresses of functions. * The assembly function RendezvousFunnelProc() is copied below 1MB so it can be executed as part of the MpInitLib AP startup sequence. RendezvousFunnelProc() calls the external function InitializeFloatingPointUnits(). The absolute address of InitializeFloatingPointUnits() is added to the MP_CPU_EXCHANGE_INFO structure that is passed to RendezvousFunnelProc(). Cc: Andrew Fish <afish@apple.com> Cc: Jeff Fan <jeff.fan@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Andrew Fish <afish@apple.com> (cherry picked from commit 3b2928b46987693caaaeefbb7b799d1e1de803c0)
2017-07-12MdeModulePkg/LogoDxe: Return error if HII Package not presentMichael Kinney
https://bugzilla.tianocore.org/show_bug.cgi?id=554 Update LogoDxe module to print a DEBUG() message and exit with an error instead of ASSERT_EFI_ERROR() if the HII Image Package with the logo image is not present. If a tool chain does not support generation of PE/COFF resource sections, then this module can not produce the logo from an HII Image Package. XCODE5 is an example of a tool chain that does not currently support generation of PE/COFF resource sections. Cc: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Andrew Fish <afish@apple.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> (cherry picked from commit 1c020add31d9ba5f556d97bad174e80d7325d973)
2017-07-12edk2: Add .DS_Store to .gitignore for macOSMichael Kinney
https://bugzilla.tianocore.org/show_bug.cgi?id=558 macOS may generate .DS_Store files in directories. The .gitignore file is updated to ignore these .DS_Store files. Cc: Andrew Fish <afish@apple.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Andrew Fish <afish@apple.com> (cherry picked from commit 112f4ada2e6bf606d28c5c9a0fe7c5357d85092d)
2017-07-12BaseTools: Clean up tools_def.template for XCODE5Michael Kinney
Reorganize the statements for XCODE5 to match other tool chains and remove dependency on XCLANG and XCODE32 Cc: Andrew Fish <afish@apple.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Andrew Fish <afish@apple.com> (cherry picked from commit 3e1d93c32efc7d716baeaa0d5d0ef96528141060)
2017-07-12BaseTools: Add -D NO_MSABI_VARGS to X64 XCODE5 CC_FLAGSMichael Kinney
https://bugzilla.tianocore.org/show_bug.cgi?id=561 Update BaseTools/Conf/tools_def.template to add the define -D NO_MSABI_VAARGS To CC_FLAGS for X64 XCODE5 builds. The llvm/clang compiler used in XCODE5 builds supports the _ms_ versions of the vararg builtins, but the compiler generates build errors. The recommendation from the XCODE5 experts is to never use the _ms_ version of the vararg builtins. The define NO_MSABI_VARARGS is already supported in MdePkg/Include/Base.h and forces the use the standard vararg builtins. Cc: Andrew Fish <afish@apple.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Andrew Fish <afish@apple.com> (cherry picked from commit bdaced0bcf9a15817fbab4e7b98200cf6628b7a5)
2017-07-12UefiCpuPkg: Use FINIT instead of hex valuesMichael Kinney
https://bugzilla.tianocore.org/show_bug.cgi?id=560 Update X64 NASM file to match IA32 NASM file and use FINIT instruction instead of hand assembled hex values for the FINIT instruction. Cc: Jeff Fan <jeff.fan@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> (cherry picked from commit b9dbc03e5a4c90b9e3efe0e0e8c014c428528261)
2017-07-12UefiCpuPkg/BaseUefiCpuLib: Use NASM read-only data section nameMichael Kinney
https://bugzilla.tianocore.org/show_bug.cgi?id=556 NASM requires read-only data sections to use the section name .rodata. This fix changes .rdata to .rodata. The build failure from use of .rdata is seen when using the XCODE5 tool chain. Section "7.8.1 macho extensions to the SECTION Directive" of the NASM documentation at http://www.nasm.us/doc/ describes the section name requirements. Cc: Jeff Fan <jeff.fan@intel.com> Cc: Andrew Fish <afish@apple.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> (cherry picked from commit 5b78f30d81d7e536df37bafb48c4cb5b6d44edb8)
2017-07-12UefiCpuPkg/PiSmmCpuDxeSmm: Add missing JMP instructionMichael Kinney
https://bugzilla.tianocore.org/show_bug.cgi?id=555 Add JMP instruction in SmiEntry.S file that is missing. This updates SmiEntry.S to match the logic in SmiEntry.asm and SmiEntry.nasm. The default BUILDRULEORDER has .nasm higher priority than .asm or .S, so this issue was not seen with MSFT or GCC tool chain families. The XCODE5 tool chain overrides the BUILDRULEORDER with .S higher than .nasm, so this issue was only seen when using XCODE5 tool chain when IA32 SMM is enabled. Cc: Jeff Fan <jeff.fan@intel.com> Cc: Andrew Fish <afish@apple.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> (cherry picked from commit 0d0a19cb14ba6867813f56a52cfc89545ad07f3a)
2017-07-12PcAtChipsetPkg/SerialIoLib: Remove negative value shiftMichael Kinney
https://bugzilla.tianocore.org/show_bug.cgi?id=553 Remove left shift of negative values that always evaluate to 0 to address build errors from the llvm/clang compiler used in the XCODE5 tool chain. Clang rightfully complains about left-shifting ~DLAB. DLAB is #defined as 0x01 (an "int"), hence ~DLAB has value (-2) on all edk2 platforms. Left-shifting a negative int is undefined behavior. Rather than replacing ~DLAB with ~(UINT32)DLAB, realize that the nonzero bits of (~(UINT32)DLAB << 7) would all be truncated away in the final conversion to UINT8 anyway. So just remove (~DLAB << 7). Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Andrew Fish <afish@apple.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> (cherry picked from commit bbd61de5dbc6ad146dc7250e9646cb662604b5f3)
2017-07-12MdeModulePkg SmiHandlerProfile: Use fixed data type in data structureStar Zeng
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=568 Use fixed data type in data structure and make the structure be natural aligned. Without this update, the code must assume DXE and SMM are using same data type (same size of UINTN), but it may be not true at some case, for example, after standalone SMM feature is enabled. With this update, the data structure will be phase independent and convenient for consumer to parse the data. Cc: Jiewen Yao <jiewen.yao@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> (cherry picked from commit f248539538efd522a71c1e9bf63c622e02d443f4)
2017-07-12MdeModulePkg SmiHandlerProfile: Fix no PDB case handling incorrectlyStar Zeng
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=569 The PdbStringOffset should be set to 0 for no PDB case, then SmiHandlerProfileInfo can use it to know whether there is PCD info or not. Cc: Jiewen Yao <jiewen.yao@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> (cherry picked from commit 8ced192d5cf1e8ccd56fa5daed2c2ca28fb04cff)