summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-07-06UefiCpuPkg/PiSmmCpuDxeSmm: Using CPU semaphores in aligned bufferJeff Fan
Update each CPU semaphores to the ones in allocated aligned semaphores buffer. Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Regression-tested-by: Laszlo Ersek <lersek@redhat.com> (cherry picked from commit ed3d5ecb342dd6cca299ac72b30d4855a8b804a4)
2016-07-06UefiCpuPkg/PiSmmCpuDxeSmm: Allocate buffer for each CPU semaphoresJeff Fan
Allocate each CPU semaphores in allocated aligned semaphores buffer. And add it into semaphores structure. Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Regression-tested-by: Laszlo Ersek <lersek@redhat.com> (cherry picked from commit 4e920581133766a31410f9d5b091446a3bc19d8c)
2016-07-06UefiCpuPkg/PiSmmCpuDxeSmm: Using global semaphores in aligned bufferJeff Fan
Update all global semaphores to the ones in allocated aligned semaphores buffer. Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Regression-tested-by: Laszlo Ersek <lersek@redhat.com> (cherry picked from commit fe3a75bc41545125f76c28238016658f48833ba2)
2016-07-06UefiCpuPkg/PiSmmCpuDxeSmm: Move forward MP sync data initializationJeff Fan
Move MP sync data initialization in front of the place that initialize page table, because the page fault spin lock is allocated in InitializeMpSyncData() while it is initialized in SmmInitPageTable(). Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Regression-tested-by: Laszlo Ersek <lersek@redhat.com> (cherry picked from commit d67b73cc381219f16f5d120e733efb7ffaa814f0)
2016-07-06UefiCpuPkg/PiSmmCpuDxeSmm: Allocate buffer for global semaphoresJeff Fan
Get semaphores alignment/size requirement and allocate aligned buffer for all global spin lock and semaphores. Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Regression-tested-by: Laszlo Ersek <lersek@redhat.com> (cherry picked from commit 1d64853193602f1100b835a4824da14c4258e5da)
2016-07-06MdePkg/WSMT.h: update header comment to use official URL link.Jiewen Yao
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> (cherry picked from commit e6877b56b2e6d781fe0ce808318c779eb703657c)
2016-07-06SecurityPkg TcgStorageOpalLib: Check the capability before use.Dong, Eric
For Pyrite SSC device, it may not supports Active Key, So add check logic before enable it. Cc: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> (cherry picked from commit 6e7423c3c2ff56c9256b92a845b3e0c959ab0d74)
2016-07-06SecurityPkg OpalPasswordSmm: Always execute BlockSid command.Eric Dong
The BlockSid feature is not depend on lock status, so move the send BlockSid command out of unlock process. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> (cherry picked from commit 3f250a944d691d2169fa3834c89eed7235b735ae)
2016-07-06SecurityPkg OpalPasswordSmm: Enhance BlockSid Logic.Eric Dong
BlockSid feature can be retrieve from the header info. Update the logic, check BlockSid capability before use it. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> (cherry picked from commit 69cd129471c3507d6be0b9e993a020ddef38692e)
2016-07-06SecurityPkg OpalPasswordDxe: Check BlockSid capability before send command.Eric Dong
Not all opal device support BlockSid feature. So Add code logic to check the capability before send BlockSid command. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> (cherry picked from commit be08755355ef16bf86ebed01762c6c9cb319b48a)
2016-07-06SecurityPkg OpalPasswordDxe: Change BlockSid position.Eric Dong
The BlockSid feature is a global level feature instead of device level feature. So move the menu from device page to the main page. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> (cherry picked from commit 8d3d84508f06d1b7c8269deb16f234646b0a4585)
2016-07-06SecurityPkg TcgStorageOpalLib: Check BlockSid capability.Eric Dong
Check the BlockSid feature capability through check BlockSid header in the DiscoveryHeader. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> (cherry picked from commit b20e0d29fa99d7e6126930e133afada55ad1bc66)
2016-07-06MdePkg: Add TCG_BLOCK_SID_FEATURE_DESCRIPTOR definition.Eric Dong
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> (cherry picked from commit 19d539af756429815310ebaffb443409e94da809)
2016-07-06SecurityPkg TcgStorageOpalLib: Update ComId for Block SID command.Eric Dong
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> (cherry picked from commit 81c1b6df92184f07446b6cf197b18c61ad8b73f0)
2016-07-06SecurityPkg: SecureBootConfigDxe: Disable SecureBoot Enable/Disable in some caseZhang, Chao B
Disable SecureBoot Enable/Disable feature when PhysicalPresence is not available, Since SecureBootEnable is protected with PhysicalPresence. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> (cherry picked from commit e8903bb7bf3f975ce8d1986bdbbaaf05c29c0e2b)
2016-07-06SecurityPkg OpalPasswordDxe: Install menu without device dependency.Eric Dong
Change design to always install opal menu. Current implementation only install menu when device connect. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> (cherry picked from commit f14307489f7a50415239211d76a4a4190db22deb)
2016-07-06SecuritPkg: DxeImageVerificationLib: Fix wrong verification logic in DBX & DBTZhang, Chao B
In image verification, if image verified pass in DBT, still need to verify if it is blocked by any other cert/cert hash from DBX. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Long Qin <qin.long@intel.com> Reviewed-by: Dick Wilkins <dick_wilkins@phoenix.com> (cherry picked from commit 91422384d5915a6f14523b3cec557d730c940c6a)
2016-07-06MdePkg-SmmMemLib: Enhance SmmIsBufferOutsideSmmValid() check for fixed comm ↵Jiewen Yao
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> (cherry picked from commit 91f51fcc84d9ce3b801fdd895e514cd5525975c7)
2016-07-06SecurityPkg-Opal(2): Enhance AHCI Bar MMIO region check.Eric Dong
This patch enhance OPAL password SMM driver to check SMM bar is valid MMIO besides outside of SMRAM. This is designed to meet Microsoft WSMT table definition on FIXED_COMM_BUFFERS requirement. Cc: Eric Dong <eric.dong@intel.com> Cc: Feng Tian <feng.tian@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> (cherry picked from commit 009264f5cf0fa0009ff96f307eaac88860a998a8)
2016-07-06SecurityPkg-Opal(1): Use fixed SMM communication buffer in OPAL password lib.Eric Dong
This patch enhance OPAL password lib SMM communication by using fixed SMM communication buffer. Update OPAL password lib to consume EDKII_PI_SMM_COMMUNICATION_REGION_TABLE as fixed communication buffer for SMM communication. This is designed to meet Microsoft WSMT table definition on FIXED_COMM_BUFFERS requirement. Cc: Eric Dong <eric.dong@intel.com> Cc: Feng Tian <feng.tian@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> (cherry picked from commit 83681c74f07978adbb621a467fe391ae901e2515)
2016-07-06MdeModulePkg-FPDT(4): Use fixed buffer for SMM_PERF_COMMUNICATE in PerfLib.Liming Gao
This patch enhance performance data SMM communication by using fixed SMM communication buffer. Update PerformanceLib to use fixed SMM communication buffer to get performance data by SMM_PERF_COMMUNICATE API. This is designed to meet Microsoft WSMT table definition on FIXED_COMM_BUFFERS requirement. Cc: Liming Gao <liming.gao@intel.com> Cc: Feng Tian <feng.tian@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> (cherry picked from commit de2459d66d87eb526e3a21f1e6682fac8e1926c5)
2016-07-06MdeModulePkg-FPDT(3): Use SMM_FPDT_FUNCTION_GET_BOOT_RECORD_DATA_BY_OFFSET ↵Liming Gao
in FpdtDxe. This patch enhance performance data SMM communication by using fixed SMM communication buffer. Update FpdtDxe to use fixed SMM communication buffer to get performance data by SMM_FPDT_FUNCTION_GET_BOOT_RECORD_DATA_BY_OFFSET API. This is designed to meet Microsoft WSMT table definition on FIXED_COMM_BUFFERS requirement. Cc: Liming Gao <liming.gao@intel.com> Cc: Feng Tian <feng.tian@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> (cherry picked from commit d158ba675b95c9f07455d77d0ef68ce22e7f65d0)
2016-07-06MdeModulePkg-FPDT(2): Add SMM_FPDT_FUNCTION_GET_BOOT_RECORD_DATA_BY_OFFSET ↵Liming Gao
in FpdtSmm Handler. This patch enhance performance data SMM communication by using fixed SMM communication buffer. Update FpdtSmm to handle SMM_FPDT_FUNCTION_GET_BOOT_RECORD_DATA_BY_OFFSET request. This is designed to meet Microsoft WSMT table definition on FIXED_COMM_BUFFERS requirement. Cc: Liming Gao <liming.gao@intel.com> Cc: Feng Tian <feng.tian@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> (cherry picked from commit 77a6e6c4f966bd618196ba7196964515228a84e1)
2016-07-06MdeModulePkg-FPDT(1): Add SMM_FPDT_FUNCTION_GET_BOOT_RECORD_DATA_BY_OFFSET ↵Liming Gao
definition. This patch enhance performance data SMM communication by using fixed SMM communication buffer. A new command SMM_FPDT_FUNCTION_GET_BOOT_RECORD_DATA_BY_OFFSET is added, because we need to support get partial PerformanceData to fixed SMM communication buffer. If performance data is bigger than fixed SMM communication buffer, the DXE agent need to call SMM_FPDT_FUNCTION_GET_BOOT_RECORD_DATA_BY_OFFSET multiple times to get all data out. This is designed to meet Microsoft WSMT table definition on FIXED_COMM_BUFFERS requirement. Cc: Liming Gao <liming.gao@intel.com> Cc: Feng Tian <feng.tian@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> (cherry picked from commit 7110e306faaf713ca644719685a7cb21f3c17d8b)
2016-07-06MdeModulePkg-MemoryProfile(3): Use ↵Star Zeng
SMRAM_PROFILE_COMMAND_GET_PROFILE_DATA_BY_OFFSET in MemoryProfileInfo. This patch enhance SMM memory profile SMM communication by using fixed SMM communication buffer. Update MemoryProfileInfo APP to use fixed SMM communication buffer to get profile data by SMRAM_PROFILE_COMMAND_GET_PROFILE_DATA_BY_OFFSET API. This is designed to meet Microsoft WSMT table definition on FIXED_COMM_BUFFERS requirement. Cc: Star Zeng <star.zeng@intel.com> Cc: Feng Tian <feng.tian@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> (cherry picked from commit 2f7961c7d67faad52449ec8d5c71b2cd891bd7b6)
2016-07-06MdeModulePkg-MemoryProfile(2): Add ↵Star Zeng
SMRAM_PROFILE_COMMAND_GET_PROFILE_DATA_BY_OFFSET in PiSmmCore. This patch enhance SMM memory profile SMM communication by using fixed SMM communication buffer. Update PiSmmCore to handle SMRAM_PROFILE_COMMAND_GET_PROFILE_DATA_BY_OFFSET request. This is designed to meet Microsoft WSMT table definition on FIXED_COMM_BUFFERS requirement. Cc: Star Zeng <star.zeng@intel.com> Cc: Feng Tian <feng.tian@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> Regression-tested-by: Laszlo Ersek <lersek@redhat.com> (cherry picked from commit c3592c86ee39c3582f1d4c6b31cf91113e9d4c5f)
2016-07-06MdeModulePkg-MemoryProfile(1): Add ↵Star Zeng
SMRAM_PROFILE_COMMAND_GET_PROFILE_DATA_BY_OFFSET definition. This patch enhance SMM memory profile SMM communication by using fixed SMM communication buffer. A new command SMRAM_PROFILE_COMMAND_GET_PROFILE_DATA_BY_OFFSET is added, because we need to support get partial ProfileData to fixed SMM communication buffer. If profile data is bigger than fixed SMM communication buffer, the DXE agent need to call SMRAM_PROFILE_COMMAND_GET_PROFILE_DATA_BY_OFFSET multiple times to get all data out. This is designed to meet Microsoft WSMT table definition on FIXED_COMM_BUFFERS requirement. Cc: Star Zeng <star.zeng@intel.com> Cc: Feng Tian <feng.tian@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> (cherry picked from commit 73e0de62826dffe8f9e32d6d0d18b54a8a5d3f38)
2016-07-06MdeModulePkg: Add new driver to publish EDKII_PI_SMM_COMMUNICATION_REGION_TABLE.Jiewen Yao
Add a driver to publish EDKII_PI_SMM_COMMUNICATION_REGION_TABLE, so that other DXE driver can consume this table directly. NOTE: This is sample driver. A platform may uses its own way to define default SMM communication buffer region and publish information in its own EDKII_PI_SMM_COMMUNICATION_REGION_TABLE. This is designed to meet Microsoft WSMT table definition on FIXED_COMM_BUFFERS requirement. Cc: Feng Tian <feng.tian@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: Feng, Tian <feng.tian@intel.com> (cherry picked from commit 6e4e6ffda448b77a3b2f3549137aca5c1b62cb4a)
2016-07-06MdeModulePkg: Add EDKII_PI_SMM_COMMUNICATION_REGION_TABLE definition.Jiewen Yao
This configuration table is used to describe platform pre-allocated memory for SMM communication buffer. If DXE driver wants to communicate with SMM agent, it can use this memory as SMM communication buffer instead of allocate new memory region. This is designed to meet Microsoft WSMT table definition on FIXED_COMM_BUFFERS requirement. Cc: Feng Tian <feng.tian@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: Feng Tian <feng.tian@intel.com> (cherry picked from commit 1e01ea240e67aacd0e6b99012ac4ab3b68be8215)
2016-07-06MdePkg: Add WSMT definition.Jiewen Yao
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> (cherry picked from commit 6a0d24221241bb1b13bafc7b2d264240d19d2993)
2016-07-06SecurityPkg OpalPasswordDxe: Error handling enhance when input password.Eric Dong
Enhance the error handling: 1. When the device is unlocked at BIOS phase and system does a warm reboot, the device may be still in unlock status if it uses external power. For such case, we would still popup password window to ask user input. If user presses ESC key here, we would force the system shut down or ask user input again to avoid security hole. 2. When user reach max retry count, force shutdown. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> (cherry picked from commit 72a05f849f18b48586f3103c7457b8d07a02c7dd)
2016-07-06MdeModulePkg: DxeCore MemoryPool Algorithm UpdateLiming Gao
Use 128 bytes as the start size region to be same to previous one. 64 bytes is small as the first range. On X64 arch, POOL_OVERHEAD takes 40 bytes, the pool data less than 24 bytes can be fit into it. But, the real allocation is few that can't reduce its free pool link list. And, the second range (64~128) has more allocation that also increases the free pool link list of the first range. Then, the link list will become longer and longer. When LinkList check enable in DEBUG tip, the long link list will bring the additional overhead and bad performance. Here is the performance data collected in our X64 platform with DEBUG enable. 64 byte: 22 seconds in BDS phase 128 byte: 19.6 seconds in BDS phase Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> (cherry picked from commit 467d5f6b30bcd2bb73bfaafc31118944d95ec28e)
2016-07-06SecurityPkg: AuthVariableLib & SecureBootConfigDxe: Fix SecureBootEnable & ↵Hao Wu
PK inconsistency issue Revert previous fix in AuthVariable driver init which breaks SecureBootEnable original behavior. Add more error handling logic in SecureBootConfigDxe to prevent wrong display info when SecureBootEnable & PK inconsistency happens. Commit hash for the reverted patch in AuthVariable driver is SHA-1: a6811666b0bef18871fa62b6c5abf18fb076fd0d (We integrate the change for AuthService.c in commit 126f3b1de02c71fde8e28abc35a46ac5f135b527 on master to AuthVariableLib.c on UDK2015 branch) Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> (cherry picked from commit 126f3b1de02c71fde8e28abc35a46ac5f135b527)
2016-07-06UefiCpuPkg/CpuMpPei: Fix potential AP mwait wakeup issueJeff Fan
If ApLoopMode is set to ApInMwaitLoop, AP will be placed into C-State by mwait instruction. BSP will wakeup AP by write start-up signal in monitor address. However, AP maybe waken by SMI/NMI/MCE and other condition. On this case, AP will check if BSP wants to wakeup itself really. If not, AP will continue to execute mwait to C-State. One potential issue: BSP may not recognize AP was wakeup from C-State by other event and BSP still writes start-up signal to wakeup AP. But AP does not aware it and still execute mwait instruction to C-State. So, AP cannot be wakeup on this case. This fix is let AP to clear start-up signal when it really is wakeup to execute AP function. And BSP will write start-up signal till AP clears it. Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Feng Tian <feng.tian@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> (cherry picked from commit 4da1ebf3b3c22ec3e09cef3fe5d1da6f40895e6d)
2016-07-06SecurityPkg OpalPasswordDxe: Suppress option for special device.Eric Dong
According to current Pyrite SSC Spec 1.00, there is no parameter for RevertSP method. So suppress KeepUserData option for the Pyrite Ssc type device. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> (cherry picked from commit ea2a6eb786c3fa881fdd5146de00c6a48273b4c1)
2016-07-05IntelFsp2Pkg SecFspSecPlatformLibNull: Convert Ia32/Flat32.asm to NASMLiming Gao
Manually convert Ia32/Flat32.asm to Ia32/Flat32.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit b295fbba8ddd380ca09d255dcfc8485e01921338)
2016-07-05IntelFsp2Pkg SecFspSecPlatformLibNull: Convert Ia32/SecCarInit.asm to NASMLiming Gao
The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert Ia32/SecCarInit.asm to Ia32/SecCarInit.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 03e30338915fcb6340263f16be01c74e58c23973)
2016-07-05IntelFsp2Pkg BaseFspSwitchStackLib: Convert Ia32/Stack.asm to NASMLiming Gao
The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert Ia32/Stack.asm to Ia32/Stack.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 4c42aaff8bd861d69b7cbec0967324f74040103a)
2016-07-05IntelFsp2Pkg BaseFspDebugLibSerialPort: Convert Ia32/FspDebug.asm to NASMLiming Gao
The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert Ia32/FspDebug.asm to Ia32/FspDebug.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 68ff74354e88ed7fff02a39c98417e7f07e79b5e)
2016-07-05IntelFsp2Pkg-BaseFspCommonLib: Add funtion to return the reset required statusYarlagadda, Satya P
Added new funtion in FSPCommonLib to update the FSP API return status with the requested return status and return the control to the boot loader. Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Satya Yarlagadda <satya.p.yarlagadda@intel.com> Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> (cherry picked from commit 6b5677e1bb62c289fba7848bbfde08220fc37ba1)
2016-07-05IntelFsp2Pkg: rename GetFspVpdDataPointer() to GetFspCfgRegionDataPointer()Jiewen Yao
FSP2.0 removed VPD concept. Rename GetFspVpdDataPointer() to GetFspCfgRegionDataPointer() to follow FSP2.0 specification (CfgRegionOffset). Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com> Cc: Amy Chan <amy.chan@intel.com> Cc: Satya Yarlagadda <satya.p.yarlagadda@intel.com> Cc: Maurice Ma <maurice.ma@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com> Reviewed-by: Amy Chan <amy.chan@intel.com> (cherry picked from commit cc0b456a05f8dd1ebfb9be485465be37e96999e7)
2016-07-05InterFsp2Pkg:Tool: Add user manual for SplitFspBin tool.Jiewen Yao
Besides Split FSP binary, we added some more feature to SplitFspBin tool. Here we add user manual for it to describe all usage. Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com> Cc: Maurice Ma <maurice.ma@intel.com> Cc: Satya P Yarlagadda <satya.p.yarlagadda@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com> Reviewed-by: Maurice Ma <maurice.ma@intel.com> (cherry picked from commit 0fbffbc05caed4e5e2b20b99c39cf095343d8b85)
2016-07-05IntelFsp2Pkg/Tools: Add FSP rebasing function into SplitFspBin toolMaurice Ma
Enhanced the SplitFspBin tool in IntelFsp2Pkg to support: - Rebase FSP 2.0 components to a different base address - Display FSP 2.0 information header Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Maurice Ma <maurice.ma@intel.com> Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com> (cherry picked from commit c6ca1c011b154d968be4462ed4a84b815dfea2c6)
2016-07-05IntelFsp2Pkg: Add missing OEM status code defines.Giri P Mudusuru
Adding defines from FSP EAS v2.0 section 11.2.2 Oem Status code. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Maurice Ma <maurice.ma@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Giri P Mudusuru <giri.p.mudusuru@intel.com> Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com> Reviewed-by: Maurice Ma <maurice.ma@intel.com> (cherry picked from commit 190895683aea889336367ea2ae4371abe9a87a19)
2016-07-05IntelFsp2Pkg/Tools: Add BSF bit field support in GenCfgOpt toolMaurice Ma
The current GenCfgOpt tool does not generate bit fields in BSF. This change will allow bit fields to be created in BSF for a specific FSP UPD item. The argument for the tool is also updated to be in sync with the old usage model in IntelFspPkg. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Maurice Ma <maurice.ma@intel.com> Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com> Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com> (cherry picked from commit 62997d5ede78c0d719548e4ecd9b9c717ce593cf)
2016-07-05IntelFsp2Pkg/FspApi.h: Add comment for structure definition.Jiewen Yao
Add doxygen style comment for structure definition. Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com> Cc: Satya P Yarlagadda <satya.p.yarlagadda@intel.com> Cc: Maurice Ma <maurice.ma@intel.com> Cc: Ravi P Rangarajan <ravi.p.rangarajan@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com> (cherry picked from commit 6d0ac988257d22d2c17a1f88f26780028bd239c5)
2016-07-05IntelFsp2WrapperPkg: Add error handling for possible NULL ptr dereferenceHao Wu
Possible NULL pointer dereference for FspmHeaderPtr/FspsHeaderPtr in module FspmWrapperPeim/FspsWrapperPeim. Add error handling codes to avoid this issue. Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com> (cherry picked from commit 599c45ff0b2bbc53a4ee3d82aab46c2cf3c78889)
2016-07-05IntelFsp2WrapperPkg SecFspWrapperPlatformSecLibSample: Convert ASM to NASMLiming Gao
Manually converts Ia32/PeiCoreEntry.asm, Ia32/SecEntry.asm and Ia32/Stack.asm to Ia32/PeiCoreEntry.nasm, Ia32/SecEntry.nasm and Ia32/Stack.nasm. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 2d24f4e70b5b452d0741c4b0e37936d510aeaecf)
2016-07-05IntelFsp2WrapperPkg BaseFspWrapperApiLib: Convert X64/Thunk64To32.asm to NASMLiming Gao
Manually convert X64/Thunk64To32.asm to X64/Thunk64To32.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 24498828f71992e9fd87dd516dcbb5ccd5b71ff0)
2016-07-05IntelFsp2WrapperPkg: Add support to handle ResetRequired return Status from FSP.Jiewen Yao
As per FSP 2.0 spec, FSP shall not trigger system reset and instead it shall return from the FSP API to the BL/Wrapper with the required reset type. The changes are to handle the ResetRequired return code from FSP APIs and provide lib interface for platform to trigger the actual reset. Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com> Cc: Amy Chan <amy.chan@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Satya Yarlagadda <satya.p.yarlagadda@intel.com> Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com> (cherry picked from commit f862a3b6f9dc026ea0e108fd548c65c75346bada)