summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* BaseTools/BinToPcd: Add support for multiple binary input filesKinney, Michael D2018-03-281-29/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=890 There are use cases where a VOID * PCD needs to be generated from multiple binary input files. This can be in the form of an array of fixed size elements or a set of variable sized elements. Update BinToPcd to support multiple one or more -i INPUTFILE arguments. By default, the contents of each binary input file are concatenated in the order provided. This supports generating a PCD that is an array of fixed size elements Add -x, --xdr flags to BinToPcd to encodes the PCD using the Variable-Length Opaque Data of RFC 4506 External Data Representation Standard (XDR). https://tools.ietf.org/html/rfc4506 https://tools.ietf.org/html/rfc4506#section-4.10 The data format from RFC 4506 meets the requirements for a PCD that is a set of variable sized elements in the Variable-Length Opaque Data format. The overhead of this format is a 32-bit length and 0 to 3 bytes of padding to align the next element at a 32-bit boundary. Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* OvmfPkg/PlatformPei: debug log "etc/reserved-memory-end" from fw_cfgLaszlo Ersek2018-03-281-0/+2
| | | | | | | | | | | | | | QEMU calculates the UINT64 value in "etc/reserved-memory-end" in a quite complex way, in the pc_memory_init() function. Log the value as a DEBUG_VERBOSE message to support debugging. Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Jordan Justen <jordan.l.justen@intel.com> Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1353591 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* NetworkPkg/TlsAuthConfigDxe: preserve TlsCaCertificate variable attributesLaszlo Ersek2018-03-281-7/+8
| | | | | | | | | | | | | | | | | | If the platform creates the "TlsCaCertificate" variable as volatile, then EnrollX509toVariable() shouldn't fail to extend it just because TLS_AUTH_CONFIG_VAR_BASE_ATTR contains the EFI_VARIABLE_NON_VOLATILE attribute. Thus, if the variable exists, add the EFI_VARIABLE_APPEND_WRITE attribute to the variable's current attributes. This is what DeleteCert() does already. Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
* NetworkPkg/HttpDxe: sanity-check the TlsCaCertificate variable before useLaszlo Ersek2018-03-282-1/+67
| | | | | | | | | | | | | | | | | | In TlsConfigCertificate(), make sure that the set of EFI_SIGNATURE_LIST objects that the platform stored to "TlsCaCertificate" is well-formed. In addition, because HttpInstance->TlsConfiguration->SetData() expects X509 certificates only, ensure that the EFI_SIGNATURE_LIST objects only report X509 certificates, as described under EFI_CERT_X509_GUID in the UEFI-2.7 spec. Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=909 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
* NetworkPkg/HttpDxe: drop misleading comment / status code in cert configLaszlo Ersek2018-03-281-2/+0
| | | | | | | | | | | | | | | | | | | | For TlsConfigureSession(), it makes sense to exempt EFI_NOT_FOUND from TlsConfigCipherList() / gRT->GetVariable(), because there is a default cipher list (SSL_DEFAULT_CIPHER_LIST) we can fall back to. The same is not true of TlsConfigCertificate(), because there is no default CA cert list. The platform (or the user of the Setup utility) is required to configure a CA cert list first. Remove the misleading comment and status code mapping in TlsConfigCertificate(). Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
* NetworkPkg/HttpDxe: use error handler epilogue in TlsConfigCertificate()Laszlo Ersek2018-03-281-5/+4
| | | | | | | | | | | | | Introduce a FreeCACert label near the end of the function, so that we can keep the FreePool(CACert) statement centralized for error and success exits. Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
* NetworkPkg/HttpBootDxe: fix typo in DHCPv4 packet parsingLaszlo Ersek2018-03-281-2/+2
| | | | | | | | | | | | | | The string "HTTPClient" has 10 non-NUL characters; the value 9 is a copy-paste leftover from "PXEClient". Check for all 10 characters in the vendor-class-identifier option when determining whether the DHCP offer is an HTTP offer. Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
* OvmfPkg:Fix VS2012 build failureDandan Bi2018-03-283-3/+24
| | | | | | | | | | | | | | | | | | | | | | | | | Initialize local variable to suppress warning C4701/C4703: potentially uninitialized local variable/pointer variable. 1.In VirtualMemory.c: Read of "PageMapLevel4Entry" in SetMemoryEncDe() is only reached when "PageMapLevel4Entry" is got correctly. 2.In VirtioBlk.c: Reads (dereferences) of "BufferMapping" and "BufferDeviceAddress" in SynchronousRequest() are only reached if "BufferSize > 0" *and* we map the data buffer successfully. 3.In VirtioScsi.c: Reads (dereferences) of "InDataMapping" and "InDataDeviceAddress", in VirtioScsiPassThru() are only reached if "Packet->InTransferLength > 0" on input, *and* we map the input buffer successfully. The similar reason for "OutDataMapping" and "OutDataDeviceAddress". Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* BaseTools: Update Rsa2048Sha256Sign to use openssl dgst optionLiming Gao2018-03-281-3/+3
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Qin Long <qin.long@intel.com> Reviewed-by: Qin Long <qin.long@intel.com>
* BaseTools: Update Rsa2048Sha256Sign to use openssl standard optionsLiming Gao2018-03-271-2/+2
| | | | | | | | | | | | | | | | | sha256 is not the standard option. It should be replaced by sha -sha256. Otherwise, it doesn't work in MAC OS. In V2, update the option to sha1 -sha256. In late openssl version >= 1.1, there is no sha option, but has sha1,sha256. In previous openssl version < 1.1, there is no sha256, but has sha,sha1. To work with all openssl version, use sha1 -sha256 for it. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liao Jui-peng <jui-pengx.liao@intel.com> Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: Autogen - modify to use standard parent/child class relationshipsCarsey, Jaben2018-03-271-39/+54
| | | | | | | | | | use __new__ and __init__ to create/manage/initialize objects in standard flow. Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools/ECC: Add a new exception supportHess Chen2018-03-271-2/+8
| | | | | | | | Add a new exception support for the checkPoint of no use C type. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* OvmfPkg/QemuVideoDxe: handle invalid BltOperation gracefullyLaszlo Ersek2018-03-261-1/+1
| | | | | | | | | | | | | | | | | | | | According to the UEFI spec, EFI_GRAPHICS_OUTPUT_PROTOCOL.Blt() is supposed to catch an invalid BltOperation, and report it with EFI_INVALID_PARAMETER. Remove the assertion from QemuVideoGraphicsOutputBlt() that prevents this from working in NOOPT and DEBUG builds. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Rocky <xingrong.ni@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Reported-by: Rocky <xingrong.ni@intel.com> Analyzed-by: Ruiyu Ni <ruiyu.ni@intel.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=897 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* NetworkPkg: Correct HttpTlsCipherList.h file format to DOSLiming Gao2018-03-261-38/+38
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
* MdeModulePkg/Usb: Replace macro USB_BOOT_IO_BLOCKSMing Huang2018-03-262-6/+14
| | | | | | | | | | | | | Booting from USB may fail while the macro USB_BOOT_IO_BLOCKS set to 128 because the block size of some USB devices are exceeded 512, like some virtual CD-ROM from BMC, the block size is 2048. So,the count blocks to transfer should be calculated by block size of the USB devices. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ming Huang <ming.huang@linaro.org> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* MdeModulePkg/UsbKb: fix shell edit cannot read '!@#$%^&*' charactersRuiyu Ni2018-03-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 5563281fa2b31093a1cbd415553b9264c5136e89 * ShellPkg/[hex]edit: use SimpleTextInEx to read console changes shell edit and hexedit to read input through SimpleTextInEx. It exposes a issue in UsbKeyboard driver: Per UEFI Spec, When interpreting the data from this function (ReadKeyStrokeEx), it should be noted that if a class of printable characters that are normally adjusted by shift modifiers (e.g. Shift Key + "f" key) would be presented solely as a KeyData.Key.UnicodeChar without the associated shift state. So in the previous example of a Shift Key + "f" key being pressed, the only pertinent data returned would be KeyData.Key.UnicodeChar with the value of "F". UsbKeyboard driver does convert Shift Key + "f" to "F" without the shift state. But it doesn't do the conversion for all printable characters, e.g.: Shift Key + "1" --> "!". The root cause is today's logic to check whether a character is printable or not is as below: if ((KeyDescriptor->AffectedAttribute & EFI_AFFECTED_BY_CAPS_LOCK) != 0) { So it only converts Shift + "a"-"z", but doesn't for Shift + "0"-"9", and Shift + "["... The patch updates the check logic as below to fix the issue: if ((KeyDescriptor->Unicode != CHAR_NULL) && (KeyDescriptor->ShiftedUnicode != CHAR_NULL) && (KeyDescriptor->Unicode != KeyDescriptor->ShiftedUnicode)) { The above check is TRUE when the character is printable and it's *really* affected by Shift key. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* BaseTool/VfrCompile: Fix potential memory leak issueBi, Dandan2018-03-231-0/+4
| | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=771 Cc: Eric Dong <eric.dong@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTool/VfrCompile: make delete[] match with new[]Bi, Dandan2018-03-235-22/+22
| | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=764 Cc: Eric Dong <eric.dong@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTool: Fixed the issue of empty PcdDB.BobCF2018-03-231-4/+5
| | | | | | | | | | If there is no dynamic pcds, there should be DB header in the Pcd DataBase. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Add the missing package include directory in PcdValueInit MakefileLiming Gao2018-03-231-1/+3
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Feng Bob C <bob.c.feng@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* Vlv2TbltDevicePkg: Remove DxeTcg2PhysicalPresenceLibNullKinney, Michael D2018-03-215-297/+3
| | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=908 The following commit that to use Tcg2 instead of TrEE breaks the build of Vlv2TbltDevicePkg\Library\DxeTcg2PhysicalPresenceLibNull https://github.com/tianocore/edk2/commit/9461604e1490f73fdbcc8e957dbe75f75c73b027#diff-c85873f3649e35873a11936ace983807 The correct fix is to remove the DxeTcg2PhysicalPresenceLibNull library instance and update library mappings in DSC files. Cc: Jiewen Yao <jiewen.yao@intel.com> C: David Wei <david.wei@intel.com> Cc: Mang Guo <mang.guo@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* MdeModulePkg/CapsuleApp: Center bitmap at bottom of screenMichael D Kinney2018-03-212-5/+61
| | | | | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=907 When -G option is used to convert a BMP file to a UX capsule, the bitmap is centered horizontally and placed in the lower half of the screen below the boot logo. This matches examples shown in the following pages: https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/user-experience-for-uefi-firmware-updates https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/boot-screen-components Checks are also made to make sure the bitmap provided fits in the current GOP mode. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* MdeModulePkg/CapsuleApp: Fix logic bug in CleanGatherList()Michael D Kinney2018-03-211-2/+2
| | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=905 Fix pointer math when more than one capsule is passed to the CapsuleApp. Use the ContinuationPointer from the last array entry instead of the first array entry. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* NetworkPkg/UefiPxeBcDxe: Configure the ARP Instance/RouteTable with new addressJiaxin Wu2018-03-222-40/+52
| | | | | | | | | | | After completed a DHCP D.O.R.A process and got the new address, the ARP Instance and RouteTable should be configured so as to avoid the later Pxe.Arp failure. Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Ye Ting <ting.ye@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
* NetworkPkg/HttpDxe: Handle the large data request via HTTPS channel.Jiaxin Wu2018-03-223-39/+111
| | | | | | | | | | Cc: Karunakar P <karunakarp@amiindia.co.in> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Ye Ting <ting.ye@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Karunakar p <karunakarp@amiindia.co.in> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
* NetworkPkg/TlsDxe: Handle the multiple TLS record messages ↵Jiaxin Wu2018-03-222-28/+52
| | | | | | | | | | | | encryption/decryption. Cc: Karunakar P <karunakarp@amiindia.co.in> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Ye Ting <ting.ye@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Karunakar p <karunakarp@amiindia.co.in> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
* MdePkg/Tls1.h: Add TLS record header length and max payload length.Jiaxin Wu2018-03-221-1/+15
| | | | | | | | | | Cc: Karunakar P <karunakarp@amiindia.co.in> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Ye Ting <ting.ye@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Karunakar p <karunakarp@amiindia.co.in> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
* BaseTools/PosixLike: honor pre-set PYTHONPATHLaszlo Ersek2018-03-2113-13/+13
| | | | | | | | | | | | | | | | Utilities written in Python may depend on external (preinstalled) Python packages; for example, Ecc depends on "antlr_python_runtime-3.0.1". Such packages need not be installed system-wide, as long as they are reachable through PYTHONPATH. Therefore we shouldn't overwrite the user's PYTHONPATH with "BaseTools/Source/Python"; instead, we should prepend the latter to the former. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=896 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* SecurityPkg Tpm12CommandLib: Fix TPM12 GetCapability response errorZhang, Chao B2018-03-211-3/+3
| | | | | | | | | | | | TPM12 command lib doesn't convert Response Size before using. Add logic to fix the issue. Cc: Long Qin <qin.long@intel.com> Cc: Yao Jiewen <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Long Qin <qin.long@intel.com> Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
* SecurityPkg Tpm2CommandLib: Fix TPM2.0 response memory overflowZhang, Chao B2018-03-218-10/+151
| | | | | | | | | | | | | TPM2.0 command lib always assumes TPM device and transmission channel can respond correctly. But it is not true when communication channel is exploited and wrong data is spoofed. Add more logic to prohibit memory overflow attack. Cc: Long Qin <qin.long@intel.com> Cc: Yao Jiewen <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Long Qin <qin.long@intel.com> Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
* BaseTools: FdfParser remove class never used.Carsey, Jaben2018-03-211-15/+0
| | | | | | | | | | the MacroProfile class is never instantiated nor referenced. Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: FdfParser & FdfParserLite refactor regular expression for GUIDsCarsey, Jaben2018-03-212-5/+5
| | | | | | | | | | | Instead of recompiling it each time the API is called, just use the global one that exists. Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: StrGather remove functions no one callsCarsey, Jaben2018-03-211-30/+0
| | | | | | | | | | simplify the code and remove functions not called anymore Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: StrGather simplify string/int conversion functionsCarsey, Jaben2018-03-211-14/+4
| | | | | | | | | | | use ''.format instead of eval() and use some list comprehension for making list delete some unused variables Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: StrGather has redundant declarationCarsey, Jaben2018-03-211-7/+2
| | | | | | | | | | | remove COMPATIBLE_STRING_TOKEN as it is the same as STRING_TOKEN remove if statement that used one or the other (identical) re Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: Override Max size by build Option Pcd for HII typeYonghong Zhu2018-03-211-0/+8
| | | | | | | | | | Current code will generate maxsize for HII type PCD when parser DSC file, while this HII type PCD value maybe override in build command per --pcd option, so the max size need re-calculate. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* Maintainers.txt: Add StandaloneMmPkg and maintainersAchin Gupta2018-03-212-0/+5
| | | | | | | | | | | | | This patch adds maintainers, reviewer and directory for the StandaloneMmPkg. This package will host an implementation of Standalone Management Mode as specified in the Platform Initialization (PI) Specification, Volume 4: Management Mode Core Interface. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Achin Gupta <achin.gupta@arm.com> Reviewed-by: Jiewen.yao@intel.com Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* SourceLevelDebugPkg DebugCommUsb3: Return error when debug cap is resetStar Zeng2018-03-201-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When source level debug is enabled, but debug cable is not connected, XhcResetHC() in XhciReg.c will reset the host controller, the debug capability registers will be also reset. After the code in InitializeUsbDebugHardware() sets DCE bit and LSE bit to "1" in DCCTRL, there will be DMA on 0 (the value of some debug capability registers for data transfer is 0) address buffer, fault info like below will appear when IOMMU based on VTd is enabled. VER_REG - 0x00000010 CAP_REG - 0x00D2008C40660462 ECAP_REG - 0x0000000000F050DA GSTS_REG - 0xC0000000 RTADDR_REG - 0x0000000086512000 CCMD_REG - 0x2800000000000000 FSTS_REG - 0x00000002 FECTL_REG - 0xC0000000 FEDATA_REG - 0x00000000 FEADDR_REG - 0x00000000 FEUADDR_REG - 0x00000000 FRCD_REG[0] - 0xC0000006000000A0 0000000000000000 Fault Info - 0x0000000000000000 Source - B00 D14 F00 Type - 1 (read) Reason - 6 IVA_REG - 0x0000000000000000 IOTLB_REG - 0x1200000000000000 This patch is to return error for the case. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Hao Wu <hao.a.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
* BaseTools: Fix bug for --pcd VOID* type when no max size is specifiedYonghong Zhu2018-03-201-13/+0
| | | | | | | | | | | | when VOID* type non-structure pcd used in --pcd, and its max size is not specified in DSC or its value is hex value, build break due to the code int(Pcd.MaxDatumSize,10). Now this patch remove this code, because tool will calculate the size info in later phase. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Add Feature Flag Pcd Type into Override listYonghong Zhu2018-03-201-1/+2
| | | | | | | | | when only define the PCD in the DEC file, and use --pcd feature, we also need cover this case for Feature Flag Type. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdeModulePkg/DxeMain: Fix BSP interrupts reenabled in ExitBootServicesHao Wu2018-03-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Within function CoreExitBootServices(), this commit will move the call of: MemoryProtectionExitBootServicesCallback(); before: SaveAndSetDebugTimerInterrupt (FALSE); and gCpu->DisableInterrupt (gCpu); The reason is that, within MemoryProtectionExitBootServicesCallback(), APIs like RaiseTpl and RestoreTpl maybe called. An example will be: DebugLib (using PeiDxeDebugLibReportStatusCode instance) | v ReportStatusCodeLib (using DxeReportStatusCodeLib instance) | v Raise/RestoreTpl The call of Raise/RestoreTpl APIs will re-enable BSP interrupts. Hence, this commit refine the calling sequence to ensure BSP interrupts before leaving CoreExitBootServices(). Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* UefiCpuPkg/MpInitLib: Disable interrupt at ExitBootServices AP MwaitHao Wu2018-03-202-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Within function ApWakeupFunction(): When source level debugger is enabled, AP interrupts will be enabled by EnableDebugAgent(). Then the AP function will be executed by: Procedure (Parameter); After the AP function returns, AP interrupts will be disabled when the APs are placed in loop mode (both HltLoop and MwaiLoop). However, at ExitBootServices, ApWakeupFunction() is called with 'Procedure' equals to RelocateApLoop(). (ExitBootServices callback registered within InitMpGlobalData()) RelocateApLoop() never returns, so it has to disable the AP interrupts by itself. However, we find that interrupts are only disabled for the HltLoop case, but not for the MwaitLoop case (within file MpFuncs.nasm). This commit adds the missing disabling of AP interrupts for MwaitLoop. Also, for X64, this commit will disable the interrupts before switching to 32-bit mode. Cc: Laszlo Ersek <lersek@redhat.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Jeff Fan <vanjeff_919@hotmail.com>
* MdePkg BaseStackCheckLib: Correct style of file headerLiming Gao2018-03-201-5/+2
| | | | | | | Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Bi Dandan <dandan.bi@intel.com>
* MdePkg/Library/BaseLib/AArch64: Comment style harmonizationPete Batard2018-03-202-94/+98
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Pete Batard <pete@akeo.ie> Reviewed-by: Liming Gao <liming.gao@intel.com>
* IntelSiliconPkg/Vtd: Add more debug info.Jiewen Yao2018-03-201-1/+1
| | | | | | | | | Add more debug info for reason code. Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* BaseTools/Conf: Add VS2017/ARM64 supportPete Batard2018-03-192-3/+31
| | | | | | | | | | Build options for ARM64 are the same as for ARM, except for /BASE:0 which is removed from DLINK flags to avoid LNK1355 error: invalid base address 0x0; ARM64 image cannot have base address below 4GB Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Pete Batard <pete@akeo.ie> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg/Include: Add VA list support for VS2017/ARM64Pete Batard2018-03-191-4/+3
| | | | | | | | | | | We need to explicitly call the built-in __va_start() for ARM64, otherwise the variable parameters are not properly enqueued for the next function calls. Also do the same for ARM, as as it doesn't harm us. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Pete Batard <pete@akeo.ie> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg/Library/BaseLib: Enable VS2017/ARM64 buildsPete Batard2018-03-198-0/+378
| | | | | | | | Required GCC assembly files are converted for the MSFT assembler Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Pete Batard <pete@akeo.ie> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg: Disable some Level 4 warnings for VS2017/ARM64Pete Batard2018-03-191-2/+51
| | | | | | | | We disable the exact same warnings as IA32 and X64. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Pete Batard <pete@akeo.ie> Reviewed-by: Liming Gao <liming.gao@intel.com>
* ShellBinPkg: Update ReadMe.txtRuiyu Ni2018-03-191-1/+1
| | | | | Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>