summaryrefslogtreecommitdiffstats
path: root/MdePkg
Commit message (Collapse)AuthorAgeFilesLines
* MdePkg/Register: Fix various typosAntoine Coeur2020-02-106-9/+9
| | | | | | | | | | | | | Fix various typos in comments and documentation. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Antoine Coeur <coeur@gmx.fr> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com> Message-Id: <20200207010831.9046-29-philmd@redhat.com>
* MdePkg/Ppi: Fix various typosAntoine Coeur2020-02-1011-13/+13
| | | | | | | | | | | | | Fix various typos in comments and documentation. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Antoine Coeur <coeur@gmx.fr> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com> Message-Id: <20200207010831.9046-28-philmd@redhat.com>
* MdePkg/Library/Smm: Fix various typosAntoine Coeur2020-02-108-36/+36
| | | | | | | | | | | | | Fix various typos in comments and documentation. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Antoine Coeur <coeur@gmx.fr> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com> Message-Id: <20200207010831.9046-27-philmd@redhat.com>
* MdePkg/Library/Pci: Fix various typosAntoine Coeur2020-02-106-11/+11
| | | | | | | | | | | | | Fix various typos in comments and documentation. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Antoine Coeur <coeur@gmx.fr> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com> Message-Id: <20200207010831.9046-26-philmd@redhat.com>
* MdePkg/Library/Dxe: Fix various typosAntoine Coeur2020-02-1010-21/+21
| | | | | | | | | | | | | | Fix various typos in documentation, comments and strings, and remove the duplicated 'the'. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Antoine Coeur <coeur@gmx.fr> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com> Message-Id: <20200207010831.9046-25-philmd@redhat.com>
* MdePkg/IndustryStandard: Fix various typosAntoine Coeur2020-02-1019-65/+65
| | | | | | | | | | | | | Fix various typos in comments and documentation. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Antoine Coeur <coeur@gmx.fr> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com> Message-Id: <20200207010831.9046-24-philmd@redhat.com>
* MdePkg/Test: Add SafeIntLib and BaseLib Base64 unit testsMichael D Kinney2020-02-0716-3/+5034
| | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=2505 * Add unit tests for SafeIntLib class * Add unit tests for BaseLib Base64 conversion APIs. * Add Test/MdePkgHostTest.dsc -to build host based unit tests * Update MdePkg.dsc to build target based tests for SafeIntLib and BaseLib * Update MdePkg.ci.yaml to build and run host based tests for SafeIntLib and BaseLib Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Bret Barkelew <Bret.Barkelew@microsoft.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Acked-by: Hao A Wu <hao.a.wu@intel.com> Reviewed-by: Bret Barkelew <Bret.Barkelew@microsoft.com>
* MdePkg/Include/Library: Add UnitTestLib classBret Barkelew2020-02-072-0/+761
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=2505 Add UnitTestLib class to MdePkg that provides services and macros to implement unit tests. These services and macros support the following features: * Create a Unit Test Framework * Add a Unit Test Suite to a Unit Test Framework + Support optional step that executes before a Unit Test Suite is started. + Support optional step that executes after a Unit Test Suite is finished. * Add a Unit Test to a Unit Test Suite + Support optional step that executes before a Unit Test is started. + Support optional step that executes after a Unit Test is finished. * Run all unit tests added to a Unit Test Framework * Save Unit Test Framework state to persistent storage * Support assertion checks in a unit test for TRUE, FALSE, EQUAL, MEM_EQUAL, NOT_EFI_ERROR, STATUS_EQUAL, and NOT_NULL. * Support generation of log messages at ERROR, WARN, INFO, and VERBOSE levels. Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Bret Barkelew <Bret.Barkelew@microsoft.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Bret Barkelew <Bret.Barkelew@microsoft.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
* MdePkg Base.h: Use correct style to check macro _MSC_VER valueLiming Gao2020-02-063-3/+3
| | | | | Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg: Avoid using __clang__ to specify CLANGPDBLiu, Zhiguang2020-02-061-1/+1
| | | | | | | | | | | | | REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2415 Avoid using __clang__ to specify CLANGPDB because this macro is also defined in CLANG38 and this causes CLANG38 build failure. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg: Add definition for Fmp Capsule Dependency.Xu, Wei62020-01-192-11/+43
| | | | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2421 Add new definitions for Fmp Capsule dependency in UEFI Spec 2.8. 1. Extend the Last Attempt Status with a value to indicate the firmware update fails with unsatisfied dependencies. 2. Add the definition of dependency expression op-codes. 3. Add the definition of EFI_FIRMWARE_IMAGE_DEP which is an array of FMP dependency expression op-codes. 4. Extend the EFI_FIRMWARE_IMAGE_DESCRIPTOR with a pointer to the array of FMP dependency expression op-codes. 5. Extend the Image Attribute Definitions with IMAGE_ATTRIBUTE_DEPENDENCY to indicate that there is and EFI_FIRMWARE_IMAGE_DEP section associated with the image. 6. Update EFI_FIRMWARE_IMAGE_DESCRIPTOR_VERSION to 4. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Wei6 Xu <wei6.xu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg Base.h: Use correct style to check the defined macroLiming Gao2020-01-171-2/+2
| | | | | | | | #if MACRO is not good style. It should be changed to #ifdef MACRO style or #if defined (MACRO) style. Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg: Add header file for Firmware Interface Table specification.Siyuan Fu2020-01-101-0/+76
| | | | | | | | | | | | | | | | This patch add FirmwareInterfaceTable.h for the Firmware Interface Table BIOS specification. This is to remove future edk2 dependency on edk2-platforms repo. The file content comes from edk2-platforms\Silicon\Intel\IntelSiliconPkg\Include\IndustryStandard BZ link: https://tianocore.acgmultimedia.com/show_bug.cgi?id=2449 Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Siyuan Fu <siyuan.fu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg BaseLib.h: Update IA32_CR4 strut to include all public fieldsJason Voelz2020-01-101-3/+12
| | | | | | | | | Based on Intel Software Develeper's Manual, add all fields in IA32_CR4. Signed-off-by: Jason Voelz <jason.voelz@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Ray Ni <ray.ni@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* MdePkg: Do not use CreateEventEx unless requiredVitaly Cheptsov via Groups.Io2020-01-1014-47/+15
| | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2446 There are many firmwares in the wild not supporting CreateEventEx, including devices less than 5 years old. Signed-off-by: Vitaly Cheptsov <vit9696@protonmail.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg/Tcg: Add new definition in TCG PFP spec.Jiewen Yao2019-12-201-9/+173
| | | | | | | | | | | The latest TCG PFP specification (TCG PC Client Platform Firmware Profile Specification, Revision 1.05) added new data structure. For example, the SPDM device measurement. This patch adds the new content. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg: Use __builtin_offset with CLANGPDB toolchainAlex James2019-12-201-3/+1
| | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2393 CLANGPDB does not define __GNUC__, but it does define __clang__. Check for the __clang__ preprocessor definition to use __builtin_offsetof to implement the OFFSET_OF macro. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Alex James <theracermaster@gmail.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg PciExpress21: PCI_REG_PCIE_DEVICE_CONTROL2 struct has 17 bitsDaniel Pawel Banaszek2019-12-191-1/+1
| | | | | | | | | Device Control 2 Structure have an issue. LtrMechanism - there is 2 bits instead of 1. Signed-off-by: Daniel Pawel Banaszek <daniel.pawel.banaszek@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* MdePkg/Spdm: fix Nonce structure error.Jiewen Yao2019-12-191-5/+5
| | | | | | | | | | Align to SPDM 1.0.0 specification. Fix Nonce data structure error. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg/Include: Add DCC and BCM2835 SPCR UART typesPete Batard2019-12-121-0/+10
| | | | | | | | | | | | | | | | As per the Microsoft Debug Port Table 2 (DBG2) documentation, that can be found online, we are missing 2 serial interface types for Arm DCC and Bcm2835 (the latter being used with the Raspberry Pi). These same types are present in DebugPort2Table.h so add them to SerialPortConsoleRedirectionTable.h too. Note that we followed the same idiosyncrasies as DebugPort2Table for naming these new macros. Signed-off-by: Pete Batard <pete@akeo.ie> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg: Update the comments of IsLanguageSupportedShenglei Zhang2019-11-202-18/+19
| | | | | | | | | | Keep the comment style of IsLanguageSupported align with other functions. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg/SmBios.h: SMBIOS 3.3.0 Update Intel Persistent Memory stringGao, Zhichao2019-11-141-0/+4
| | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2305 Memory Device (Type 17): - SMBIOSCR00179: update the string for Intel persistent memory Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Sai Chaganty <rangasai.v.chaganty@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
* MdePkg/SmBios.h: SMBIOS 3.3.0 Add value HBM and Die for type 17Gao, Zhichao2019-11-141-2/+5
| | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2305 Memory Device (Type 17): - SMBIOSCR00178: add new memory device type value (HBM) and new form factor value (Die) Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Sai Chaganty <rangasai.v.chaganty@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
* MdePkg/SmBios.h: SMBIOS 3.3.0 add support for CXL FlexbusGao, Zhichao2019-11-141-1/+3
| | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2305 Various: - SMBIOSCR00183: add support for CXL Flexbus Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Sai Chaganty <rangasai.v.chaganty@intel.com> Reviewed-by: Sai Chaganty <rangasai.v.chaganty@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
* MdePkg/SmBios.h: SMBIOS 3.3.0 add PCI gen4 values for type 9Gao, Zhichao2019-11-141-2/+8
| | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2305 System Slots (Type 9): - SMBIOSCR00184: add PCI Express Gen 4 values Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Sai Chaganty <rangasai.v.chaganty@intel.com> Reviewed-by: Sai Chaganty <rangasai.v.chaganty@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
* MdePkg: add null version of RngLibJian J Wang2019-11-144-0/+139
| | | | | | | | | | | | | | | | | | | | | Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1871 This is null version of RngLib which should be used with modules that inherit an (indirect) dependency on the RngLib class, but never actually call RngLib APIs for consuming randomness. To be more specific, if following components or functionalities are used in a platform, the BaseRngLibNull should *not* be used. Instead, a non-Null version of RngLib must be used (like BaseRngLib for IA32/X64, or future DxeRngLibRngProtocol for all ARCHs). - HddPasswordDxe.inf - AES, TLS (TlsDxe.inf, TlsLib.inf), RSA_OAEP, RSA_PK1 - (If BaseRngLibNull interface ASSERTed at boot time) Signed-off-by: Jian J Wang <jian.j.wang@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg: Add YAML file for CI buildsMichael D Kinney2019-11-111-0/+90
| | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=2315 Add YAML file to the package directory with the configuration of the checks to perform during a CI build. Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg/Include: Add DMTF SPDM definition.Jiewen Yao2019-11-111-0/+320
| | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2303 Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Yun Lou <yun.lou@intel.com> Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed by: Liming Gao <liming.gao@intel.com> Reviewed by: Ray Ni <ray.ni@intel.com>
* MdePkg-UefiSpec.h: Add UEFI 2.8 new memory attributesHuang, Qing2019-11-041-0/+20
| | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2309 Add EFI_MEMORY_SP and EFI_MEMORY_CPU_CRYPTO definition into UEFI specification header file. Signed-off-by: Qing Huang <qing.huang@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg: Add AML OpCode definition for ExternalOpPierre Gondois2019-11-041-0/+2
| | | | | | | | | | | | | The ACPI specification, version 6.3, January 2019, defines the Named Object Encoding for ExternalOp in section '20.2.5.2 Named Objects Encoding'. This patch adds the definition for ExternalOp to the list of Primary Opcode definitions. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* MdePkg/UefiFileHandleLib: Tolerate more Root handle FileNamesMarvin Haeuser2019-11-041-7/+18
| | | | | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2295 The current implementation of the FileHandleGetFileName() function assumes that the Root directory always has the FileName '\0'. However, the only requirement the UEFI specification defines is that a prepended '\\' must be supported to access files and folders relative to the Root directory. This patch removes this assumption and supports constructing valid paths for any value of FileName for the Root Directory. In practice, this fixes compatibility issues with File System drivers that report '\\' as the FileName of the Root directory, which currently is both generating an invalid path ("\\\\") and resulting in an EFI_NOT_FOUND result from the CurrentHandle->Open() call. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Marvin Haeuser <mhaeuser@outlook.de> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
* MdePkg/UefiFileHandleLib: Fix potential NULL dereferenceMarvin Haeuser2019-11-041-13/+15
| | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2293 Move the NULL check in FileHandleGetInfo() to directly after the allocation to prevent potential NULL dereferences. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Marvin Haeuser <mhaeuser@outlook.de> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg/UefiDebugLibStdErr: Pass the correct buffer sizeMarvin Haeuser2019-11-041-2/+2
| | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2302 The second argument of "UnicodeVSPrintAsciiFormat" is "BufferSize", which takes the size of the buffer in bytes. Replace the currently used MAX_DEBUG_MESSAGE_LENGTH usage, which is the buffer's length, with the actual buffer size. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Marvin Haeuser <mhaeuser@outlook.de> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg/UefiDebugLibConOut: Pass the correct buffer sizeMarvin Haeuser2019-11-041-2/+2
| | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2302 The second argument of "UnicodeVSPrintAsciiFormat" is "BufferSize", which takes the size of the buffer in bytes. Replace the currently used MAX_DEBUG_MESSAGE_LENGTH usage, which is the buffer's length, with the actual buffer size. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Marvin Haeuser <mhaeuser@outlook.de> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg/Include/Protocol/Tls.h: Add the data type of EfiTlsVerifyHost ↵Wu, Jiaxin2019-11-021-11/+57
| | | | | | | | | | | | | | | | | | | | | | | | | (CVE-2019-14553) REF: https://bugzilla.tianocore.org/show_bug.cgi?id=960 CVE: CVE-2019-14553 In the patch, we add the new data type named "EfiTlsVerifyHost" and the EFI_TLS_VERIFY_HOST_FLAG for the TLS protocol consumer (HTTP) to enable the host name check so as to avoid the potential Man-In-The-Middle attack. Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Long Qin <qin.long@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20190927034441.3096-2-Jiaxin.wu@intel.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Sivaraman Nainar <sivaramann@amiindia.co.in> Cc: Xiaoyu Lu <xiaoyux.lu@intel.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg BaseIoLibIntrinsic: Remove __inline__ attribute for IO functionsLiming Gao2019-10-241-6/+0
| | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1603 __inline__ has no functional difference effect with the GCC48 / GCC49 / GCC5 toolchains, but it breaks the build with CLANG9. Remove __inline__. Signed-off-by: Liming Gao <liming.gao@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
* MdePkg Base.h: Add definition for CLANG9 tool chainLiming Gao2019-10-243-6/+6
| | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1603 CLANG9 tool chain defines __clang__ macro only, doesn't define __GNUC__ macro. But, it uses some same definitions with GCC. So, update base definition for CLANG9 tool chain. Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
* MdePkg: Add UefiFileHandleLib to DSC fileSean Brogan2019-10-221-0/+1
| | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=2261 Add the UefiFileHandleLib to the [Components] section of the MdePkg DSC file to support full build testing of the MdePkg. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg/Include: Update to support SmBios 3.3.0Abner Chang2019-10-171-3/+73
| | | | | | | | | | | | | | | Update SmBios.h to support SMBIOS 3.3.0 spec. Bugzilla link, https://bugzilla.tianocore.org/show_bug.cgi?id=2202 Signed-off-by: Abner Chang <abner.chang@hpe.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Gilbert Chen <gilbert.chen@hpe.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
* MdePkg/Include: correct Lasa in Tpm2Acpi.Jiewen Yao2019-10-111-1/+1
| | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=978 Correct Lasa according to TCG ACPI spec. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg/DxeServicesLib: remove bogus castLaszlo Ersek2019-10-091-1/+1
| | | | | | | | | | | | | | The HandleProtocol() boot service takes an EFI_HANDLE, not an (EFI_HANDLE*). Remove the bogus cast in the InternalImageHandleToFvHandle() function. This is a semantic cleanup; there is no change in behavior. Cc: Liming Gao <liming.gao@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
* MdePkg: Implement SCSI commands for Security Protocol In/OutZurcher, Christopher J2019-09-293-19/+388
| | | | | | | | | | | | | | BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1546 This patch implements the Security Protocol In and Security Protocol Out commands in UefiScsiLib to prepare support for the Storage Security Command Protocol. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Signed-off-by: Christopher J Zurcher <christopher.j.zurcher@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg Base.h: Define STATIC_ASSERT macro as empty for EBC archLiming Gao2019-09-251-1/+3
| | | | | | | | | | | | EBC compiler doesn't support C11 static_assert macro. So, define STATIC_ASSERT as empty to pass EBC arch build. STATIC_ASSERT macro is introduced @204ae9da230ecbf0910c21acac7aa5d5e8cbb8d0 Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
* MdePkg: UefiLib: Add a function to check if a language is supportedTom Zhao2019-09-172-21/+56
| | | | | | | | | | | Add a function that checks if a target language is in the supported languages list. Add some calls to this function where appropriate in UefiLib.c Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Tom Zhao <tzhao@solarflare.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg: Drop VERIFY_SIZE_OF in favour of STATIC_ASSERTVitaly Cheptsov via Groups.Io2019-09-171-13/+0
| | | | | | | | | REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2048 New STATIC_ASSERT macro supersedes VERIFY_SIZE_OF as being more functional. Signed-off-by: Vitaly Cheptsov <vit9696@protonmail.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg: Use STATIC_ASSERT macroVitaly Cheptsov via Groups.Io2019-09-171-39/+40
| | | | | | | | | REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2048 Use new STATIC_ASSERT macro instead of VERIFY_SIZE_OF. Signed-off-by: Vitaly Cheptsov <vit9696@protonmail.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg/MdePkg.dec: Update PciSegmentLib.h to S3PciSegmentLib.hShenglei Zhang2019-09-171-1/+1
| | | | | | | | | | | | S3PciSegmentLib library class header file should be Include/Library/S3PciSegmentLib.h instead of Include/Library/PciSegmentLib.h. https://bugzilla.tianocore.org/show_bug.cgi?id=2146 Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg: Add STATIC_ASSERT macroVitaly Cheptsov via Groups.Io2019-09-111-0/+14
| | | | | | | | | | | | | REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2048 Provide a macro for compile time assertions. Equivalent to C11 static_assert macro from assert.h. Signed-off-by: Vitaly Cheptsov <vit9696@protonmail.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Jiewen Yao <jiewen.yao@intel.com>
* MdePkg/BluetoothLeConfig.h: Add type EfiBluetoothSmpPeerAddressListRay Ni2019-09-101-1/+3
| | | | | | | | | | | | To support auto-connection, EFI_BLUETOOTH_LE_SMP_DATA_TYPE needs to add a new data type EfiBluetoothSmpPeerAddressList which associates with a list of Bluetooth per address connected before. This new data type was added in UEFI spec 2.7b. Signed-off-by: Ray Ni <ray.ni@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg/DxeHstiLib: Added checks to improve error handling.Jayanth Raghuram2019-09-021-1/+1
| | | | | | | | | | | | | | REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2138 Added checks for return parameters of GetSupportedTypes function calls in InternalHstiFindAip to improve error handling. An issue was observed on Dell Poweredge R740, where the Dell PERC H740P controller UEFI driver returned InfoTypesBuffer = NULL, InfoTypesBufferCount = 0 and caused an FreePool assert. Signed-off-by: Jayanth Raghuram <Jayanth.Raghuram@Dell.com> Cc: Wei G Liu <Wei_G_Liu@Dell.com> Reviewed-by: Liming Gao <liming.gao@intel.com>