summaryrefslogtreecommitdiffstats
path: root/MdePkg
Commit message (Collapse)AuthorAgeFilesLines
* MdePkg: Refine codes related to Dhcpv4 and Dhcpv6 configuration.Zhang Lubo2016-06-231-0/+282
| | | | | | | | | | | | | | | | | | v2: *add some new arch types for PXE boot. refine the definition of arch types for http boot Add a new head file Dhcp.h in Mde/Include/IndustryStandard, normalize the universal option numbers and other network number tags. Cc: Sriram Subramanian <sriram-s@hpe.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@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: Fu Siyuan <siyuan.fu@intel.com>
* MdePkg/PCI: Add missing PCI/PCIE definitionsRuiyu Ni2016-06-224-21/+503
| | | | | | | | | | | The definitions are required by certain platform initialization code. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jeff Fan <jeff.fan@intel.com> Cc: Feng Tian <feng.tian@intel.com> Reviewed-by: Amy Chan <amy.chan@intel.com>
* MdePkg: Fix 'cd ..\..' go up only 1 level.Qiu Shumin2016-06-221-2/+4
| | | | | | | | | When we try to cd up two levels using the "../.." notation we only go up one level. This patch fix this bug. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg/DebugLib: Flag post-_ASSERT() as unreachable for analyzers.Marvin H?user2016-06-221-0/+1
| | | | | | | | | | | | | | | | | When a variable is compared to NULL as part of an ASSERT() call, the code implies that the variable may be NULL. Certain Static Analyzers, such as the Clang Static Analyzer, then issue false warnings for any untested access of that pointer, even though that defeats the intention behind ASSERT(). This patch flags the position after _ASSERT() as unreachable for Static Analyzers to indicate that if the variable is NULL, execution cannot pass. As the ANALYZER-prefixed version is used, the executables will not have any code stripped during compilation. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Marvin Haeuser <Marvin.Haeuser@outlook.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg: Add NORETURN attribute and UNREACHABLE() macro.Marvin H?user2016-06-221-0/+110
| | | | | | | | | | | | | | | | | | | | The NORETURN attribute informs compilers and analyzers that the flagged function cannot return. This may improve the quality of the optimizations. The UNREACHABLE() macro informs compilers and analyzers that its position cannot be reached, for example eliminating implicit returns. It is recommended to be used together with the NORETURN attribute to prevent warnings regarding the function flagged as 'noreturn' returning. The ANALYZER-prefixed versions have the same effects, but exclude compilers. They may be used to surpress warnings of static analyzers, such as possible dereferencing of a NULL pointer when dereferencing it after having checked it via ASSERT(). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Marvin Haeuser <Marvin.Haeuser@outlook.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
* MdePkg: Indicate UnicodeStrToAsciiStr/AsciiStrToUnicodeStr to be deprecatedStar Zeng2016-06-212-2/+20
| | | | | | | | | | | | Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
* MdePkg: Replace UnicodeStrToAsciiStr() with UnicodeStrToAsciiStrS()Star Zeng2016-06-212-4/+4
| | | | | | | | | | | | | | | It is the follow up of 3ab41b7a325ca11a12b42f5ad1661c4b6791cb49 to replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStr with UnicodeStrToAsciiStrS/AsciiStrToUnicodeStrS. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
* MdePkg: MTftp6: Correct #define value in Mtfp6.hhegdenag2016-06-161-1/+3
| | | | | | | | | | | | | defined values of EFI_MTFTP6_ERRORCODE_ILLEGAL_OPERATION and EFI_MTFTP6_ERRORCODE_FILE_ALREADY_EXISTS are the same. This patch corrects the value of EFI_MTFTP6_ERRORCODE_ILLEGAL_OPERATION to 4. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Sriram Subramanian <sriram-s@hpe.com> Reviewed-By: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
* MdePkg/BaseLib: Add 2 more safe string functions.Jiewen Yao2016-06-062-2/+288
| | | | | | | | | | | | | | | Add UnicodeStrToAsciiStrS() and AsciiStrToUnicodeStrS() API. These 2 safe version APIs are used to replace UnicodeStrToAsciiStr() and AsciiStrToUnicodeStr() API. The safe version string convert APIs use similar check as StrCpyS(). Cc: Liming Gao <Liming.Gao@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <Jiewen.Yao@intel.com> Reviewed-by: Liming Gao <Liming.Gao@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* MdePkg/Hsti: Fix a memory allocation check issue.Jiewen Yao2016-06-061-1/+1
| | | | | | | | | Cc: Liming Gao <Liming.Gao@intel.com> Cc: Amy Chan <Amy.Chan@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <Jiewen.Yao@intel.com> Reviewed-by: Liming Gao <Liming.Gao@intel.com> Reviewed-by: Amy Chan <Amy.Chan@intel.com>
* MdePkg: Follow PI1.4a update SmmStartupThisAP() descriptionJeff Fan2016-06-021-11/+11
| | | | | | | | Cc: Liming Gao <liming.gao@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg: Follow PI1.4a update EFI_SEC_PLATFORM_INFORMATION2 descriptionJeff Fan2016-06-021-3/+3
| | | | | | | | Cc: Liming Gao <liming.gao@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg: Follow PI1.4a to update EFI_SMM_SW_REGISTER2 return statusJeff Fan2016-06-021-3/+3
| | | | | | | | Cc: Liming Gao <liming.gao@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg: Add a header for NVMe v1.1 spec. definitions.Darbin Reyes2016-05-271-0/+935
| | | | | | | | | | | | | | | Adds a public header for NVMe v1.1 spec. definitions. The majority of these definitions where copied from a private header in MdeModulePkg/Bus/Pci/NvmExpress/NvmExpressHci.h. Additional definitions were added e.g. the NVMe Smart Health Log and Firmware Info. Log structures. These definitions should be in a public header so that clients of the NVMe passthru protocol can use them to execute NVMe commands. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Darbin Reyes <darbin.emm.reyes@hpe.com> Reviewed-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hpe.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdePkg: Correct EFI_HTTP_CONFIGURE return status valueJiaxin Wu2016-05-261-1/+0
| | | | | | | | | | | | 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: Samer El-Haj-Mahmoud <elhaj@hpe.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Zhang Lubo <lubo.zhang@intel.com>
* MdePkg/BaseLib: Add more comments for safe string functions.Jiewen Yao2016-05-242-0/+72
| | | | | | | | | | | | Add more comments: 1) EDKII version safe string function is similar as the one C11. 2) If error is returned, the Destination is unmodified. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg/WSMT.h: update header comment to use official URL link.Jiewen Yao2016-05-241-1/+1
| | | | | | | | | | | Update WSMT table link to official MSDN URL. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
* MdePkg: Update StatusCode Runtime Protocol comments to follow PI spec 1.4a.Liming Gao2016-05-231-12/+3
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg: Follow PI1.4a to fix artificial limitation of SkuId rangeStar Zeng2016-05-234-36/+6
| | | | | | | | | | | | | There is absolutely no reason to artificially limit the SKU range to 1-255. PI1.4a spec fixed the artificial limitation. This patch is to follow PI1.4a spec to remove PCD_MAX_SKU_ID definition, the check to PCD_MAX_SKU_ID and the comments describes the limitation. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg: Follow PI1.4a to update the comments of EndOfDxe and SmmReadyToLockStar Zeng2016-05-233-20/+41
| | | | | | | | | Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
* MdePkg: Clarification to the return status of EFI_PEIM_NOTIFY_ENTRY_POINTStar Zeng2016-05-201-2/+3
| | | | | | | | | | | | | | | | | | In Previous PI spec (< PI1.4a) Volume 1, Section 7.4.1, the callback EFI_PEIM_NOTIFY_ENTRY_POINT is defined. A description for the arguments are provided but not for the EFI_STATUS return value. PI1.4a updated EFI_PEIM_NOTIFY_ENTRY_POINT definition to include a new paragraph with this sentence after the arguments: "The status code returned from this function is ignored" This patch is to follow PI1.4a spec to update the code. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg: Update EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTABLE to 0x00080000Star Zeng2016-05-201-3/+3
| | | | | | | | | | | | | | Previous PI spec (< PI1.4a) has EFI_RESOURCE_ATTRIBUTE_PERSISTENT and EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTABLE with same value 0x00800000. To resolve the conflict, PI1.4a updated EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTABLE to 0x00080000, this patch is to follow PI1.4a spec to update the code. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg IndustryStandard/Scsi.h: Add Unmap command supportHao Wu2016-05-201-4/+60
| | | | | | | | | | | | | | | According to the SCSI Block Commands - 4 (SBC-4) spec, the patch add SCSI unmap command support in IndustryStandard/Scsi.h. The following changes have been made: 1. Add SCSI unmap command OP Code 2. Update the structure definition for Block Limits VPD page 3. Add structure definitions for UNMAP parameter list header & UNMAP block descriptor. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdePkg: Reinitialize twice-iterated VA_LIST in variadic function ↵Zenith4322016-05-181-0/+2
| | | | | | | | UefiDevicePathLibCatPrint() Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zenith432 <zenith432@users.sourceforge.net> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg: remove Libray references from code baseMichael Zimmermann2016-05-162-4/+4
| | | | | | | | | as reported on github: https://github.com/tianocore/edk2/issues/79 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Zimmermann <sigmaepsilon92@gmail.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg: Add NFIT definition from ACPI 6.1Samer El-Haj-Mahmoud2016-05-161-0/+3
| | | | | | | | | Add NFIT definition from ACPI 6.1 for the NVDIMM Control Region Structure Valid Fields for Manufacturing Location and Manufacturing Date Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hpe.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg: Add HII definitions from UEFI 2.6Samer El-Haj-Mahmoud2016-05-131-0/+16
| | | | | | | | | | Add HII definitions from UEFI 2.6 for HII Image Variability and PNG Blocks Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hpe.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com>
* MdePkg Protocol/AtaPassThru.h: Update PortMultiplierPort related commentsHao Wu2016-05-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | The UEFI2.5 Errata (Mantis ticket 1472 - https://mantis.uefi.org/mantis/view.php?id=1472) updated 'PortMultiplierPort' parameter description for the following services in EFI_ATA_PASS_THRU_PROTOCOL: 1. PassThru 2. BuildDevicePath 3. ResetDevice Now, if there is no port multiplier on a ATA controller port, the PortMultiplierPort parameter should be set to 0xFFFF instead of 0. Please note that this is an incompatible semantic change. The consumer of EFI_ATA_PASS_THRU_PROTOCOL needs to re-examine its usage to follow UEFI 2.5 Errata mantis 1472. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdePkg Protocol/DevicePath.h: Update SATA Device Path commentsHao Wu2016-05-121-2/+2
| | | | | | | | | | | | | | | The UEFI2.5 spec (Mantis ticket 1353 - https://mantis.uefi.org/mantis/view.php?id=1353) updated the Port Multiplier Port Number description of SATA device path to use 0xFFFF when the device is directly connected to the HBA. Please note that this is an incompatible semantic change. The consumer of SATA device path needs to re-examine its usage to follow UEFI 2.5 mantis 1353. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdePkg: Add TCG_BLOCK_SID_FEATURE_DESCRIPTOR definition.Eric Dong2016-05-052-0/+13
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* SecurityPkg TcgStorageOpalLib: Update ComId for Block SID command.Eric Dong2016-05-051-0/+4
| | | | | | | | | | | The ComId for Block SID authentication command is 0x0005 according to "TCG Storage Feature Set: Block SID Authentication Specification Version 1.0.0". Update code to follow this spec requirement. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdePkg: Revert AuditMode/DeployedMode name definitionZhang, Chao B2016-05-042-28/+3
| | | | | | | | | | | | | Revert AuditMode/DeployedMode definition from Customized Secure Boot feature defined in UEFI2.5 Mantis 1263. The feature has been moved to https://github.com/tianocore/edk2-staging/tree/Customized-Secure-Boot Previous check-in hash is SHA-1: 79e7b6472797f156d1ff28f3022b25d9c6f250f9 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: El-Haj-Mahmoud Samer <samer.el-haj-mahmoud@hpe.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
* MdePkg-SmmMemLib: Enhance SmmIsBufferOutsideSmmValid() check for fixed comm ↵Jiewen Yao2016-04-292-3/+183
| | | | | | | | | | | | | | | | | | | | | | | | | | | buffer. This patch adds more check in SmmIsBufferOutsideSmmValid(), to make sure that SMM communication buffer is only EfiReservedMemoryType/EfiRuntimeServicesCode/ EfiRuntimeServicesData/EfiACPIMemoryNVS. So that the communication buffer will not touch any OS memory. The assumption is that a platform reports valid SMM communication buffer at EndOfDxe, because EndOfDxe is last hook point that SMM code can call-out to get memory map information. A platform MUST finish SMM communication buffer allocation before EndOfDxe. If a DXE or OS driver need do communication after EndOfDxe, it can either allocate SMM communication buffer before EndOfDxe and save it, or consume EDKII_PI_SMM_COMMUNICATION_REGION_TABLE table to get general fixed comm buffer. This is designed to meet Microsoft WSMT table definition on FIXED_COMM_BUFFERS requirement. Cc: Liming Gao <liming.gao@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
* MdePkg: Add WSMT definition.Jiewen Yao2016-04-291-0/+39
| | | | | | | | | | | This patch adds Windows SMM Security Mitigation Table @ http://download.microsoft.com/download/1/8/A/18A21244-EB67-4538-BAA2-1A54E0E490B6/WSMT.docx Cc: "Gao, Liming" <liming.gao@intel.com> Cc: "Kinney, Michael D" <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com> Reviewed-by: "Gao, Liming" <liming.gao@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>
* MdePkg: Add EFI Erase Block Protocol definitionsHao Wu2016-04-132-0/+108
| | | | | | | | This protocol is newly introduced in UEFI 2.6 spec. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdePkg: Update PerformanceLib comments not to check Identifier.Liming Gao2016-04-111-2/+2
| | | | | | | | | In PerformanceLib, Identifier is for single PERF, not the pair of PERF. When find the matched START and END pair, the identifier will not be checked. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdePkg Cper.h: Add missing structure for 'Processor Error Record'Hao Wu2016-04-061-1/+18
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-off-by: Jeff Fan <jeff.fan@intel.com>
* MdePkg/MdePkg.uni: Add description for PcdUartDefaultReceiveFifoDepthRuiyu Ni2016-04-051-1/+6
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Shumin Qiu <shumin.qiu@intel.com>
* MdePkg/BaseSynchronizationLib: Add spin lock alignment for IA32/x64Jeff Fan2016-04-056-4/+112
| | | | | | | | | | | | | | | From Intel(R) 64 and IA-32 Architectures Software Developer's Manual, one lock or semaphore is suggested to be present within a cache line. If the processors are based on Intel NetBurst microarchitecture, two cache lines are suggested. This could minimize the bus traffic required to service locks. Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdePkg/BaseSynchronizationLib: Do not check timeout if lock releasedJeff Fan2016-04-053-18/+18
| | | | | | | | | | | | | | Current AcquireSpinLock() will check if timeout happens when PcdSpinLockTimeout is not zero, even though the spin lock is already released. It may do unnecessary operation to read timer's counter. This update is trying to acquire spin lock firstly. If it could be acquired successfully, needn't to check timeout at all. Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg: Add ARM Serial Port Subtypes to DBG2Sami Mujawar2016-04-011-0/+6
| | | | | | | | | | | | The Microsoft Debug Port Table 2 (DBG2) specification revision October 6, 2015 adds support for Serial Port Subtypes for ARM. This patch adds these definitions. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Evan Lloyd <evan.lloyd@arm.com> Reviewed-by: Yao Jiewen <jiewen.yao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg: Add ARM Serial Port Subtype definitionsSami Mujawar2016-04-011-2/+23
| | | | | | | | | | | | | | | | The Serial Port Console Redirection Table specification Version 1.03 - August 10, 2015 adds support for Serial Port Subtypes for ARM. These Subtypes are described in the Table 3 of the Microsoft Debug Port Table 2 (DBG2) Specification - December 10, 2015. This patch adds macro definitions for these. Code at: https://github.com/EvanLloyd/tianocore/commit/79678a0f399e97883cfba09275e750861e24cd70 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Evan Lloyd <evan.lloyd@arm.com> Reviewed-by: Yao Jiewen <jiewen.yao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* MdePkg/IndustryStandard: Add SD/EMMC common definitionsFeng Tian2016-03-302-0/+478
| | | | | | | | | These definitions are defined in SD physical layer simplified spec and eMMC electrical standard spec. 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>
* MdePkg/DevicePath: Add EMMC device path definitionFeng Tian2016-03-303-0/+72
| | | | | | | | This device path node is introduced in UEFI2.6 spec. 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>
* MdePkg: Add EFI_SD_MMC_PASS_THRU_PROTOCOL definitionFeng Tian2016-03-302-0/+267
| | | | | | | | This protocol is introduced in UEFI2.6 spec. 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>
* MdePkg: Add definition for TCG Storage Core and Opal specs.Eric Dong2016-03-292-0/+558
| | | | | | | | The definitions are defined in TCG storage core and opal spec. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* MdePkg: Add PCD for UART default receive FIFO depthHeyi Guo2016-03-291-0/+4
| | | | | | | | | | | | PcdUartDefaultReceiveFifoDepth is added to indicate UART default receive FIFO depth. Type of UINT16 is enough for FIFO depth. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Heyi Guo <heyi.guo@linaro.org> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
* MdePkg: Move SMBIOS data into the IndustryStandard header.Marvin Häuser2016-03-242-90/+133
| | | | | | | | | | | | | | | | | | | | | | | | As the SMBIOS table types belong to the SMBIOS standard, they were moved from the SMBIOS Protocol header into the SMBIOS IndustryStandard header without the EFI_-prefix. Defines with the EFI_-prefix have been kept in the Protocol header for backwards-compatibility, resolving to the IndustryStandard defines. The same has been done with the C types. The SMBIOS table header structure had been duplicated - SMBIOS_STRUCTURE in the IndustryStandard header and EFI_SMBIOS_TABLE_HEADER in the Protocol file - and thus the Protocol type was replaced with a typedef to the InudstryStandard's. This doesn't only make it easier to maintain, but it also prevents potential future issues as the Protocol type has been aligned, while the standard and the IndustryStandard header declare it as byte-packed. This has worked well till now only because the members of the structure do not require alignment yet. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Marvin Haeuser <Marvin.Haeuser@outlook.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
* MdePkg/UefiLib: introduce EfiEventGroupSignalLaszlo Ersek2016-03-232-0/+61
| | | | | | | | | | | | | | | | | | | | | | This is a small convenience function that eases signaling an event group (identified by GUID). An example where it can be used is Platform BDS signaling the End-of-DXE event group. The naming follows EfiNamedEventSignal(). The patch modifies the library class header, and updates the most commonly used library instance at once. Other library instances in the edk2 tree will be adapted in the following patches. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Suggested-by: 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> Reviewed-by: Liming Gao <liming.gao@intel.com>