]> git.proxmox.com Git - mirror_edk2.git/log
mirror_edk2.git
7 years agoSecurityPkg: Tcg2ConfigDxe: Display TPM2 HID in Tcg2Config
Zhang, Chao B [Thu, 29 Dec 2016 08:21:02 +0000 (16:21 +0800)]
SecurityPkg: Tcg2ConfigDxe: Display TPM2 HID in Tcg2Config

Display TPM2 HID from TPM2 ACPI device object in Tcg2Config UI

Cc: Long Qin <qin.long@intel.com>
Cc: Yao Jiewen <jiewen.yao@intel.com>
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: Yao Jiewen <jiewen.yao@intel.com>
7 years agoBaseTools: fix the bug for Mixed Pcd display in the report
Yonghong Zhu [Fri, 30 Dec 2016 06:54:34 +0000 (14:54 +0800)]
BaseTools: fix the bug for Mixed Pcd display in the report

Fix the bug to not display the mixed PCD in the Global PCD section, and
correct the Pcd display name.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools toolsetup.bat: set PATH to include Bin Win32 directory
Liming Gao [Thu, 29 Dec 2016 02:52:01 +0000 (10:52 +0800)]
BaseTools toolsetup.bat: set PATH to include Bin Win32 directory

Bin Win32 directory includes antlr.exe. This tool is used when compile
BaseTools source code. So, set it into PATH first.

Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
7 years agoBaseTools toolsetup.bat: Set env when the binary tools are missing
Liming Gao [Thu, 29 Dec 2016 02:52:00 +0000 (10:52 +0800)]
BaseTools toolsetup.bat: Set env when the binary tools are missing

BASE_TOOLS_PATH is required to be set when the binary tools are missing.

Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
7 years agoSecurityPkg: Tcg2Smm: Update HID patch logic
Zhang, Chao B [Wed, 4 Jan 2017 02:29:28 +0000 (10:29 +0800)]
SecurityPkg: Tcg2Smm: Update HID patch logic

Update HID patch logic. NOOP in ASL template may cause syntax error when
disassembled and recompiled.

Cc: Long Qin <qin.long@intel.com>
Cc: Yao Jiewen <jiewen.yao@intel.com>
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: Yao Jiewen <jiewen.yao@intel.com>
7 years agoNetworkPkg/Ip6Dxe: Fix the potential NULL pointer free
Jiaxin Wu [Tue, 3 Jan 2017 03:27:38 +0000 (11:27 +0800)]
NetworkPkg/Ip6Dxe: Fix the potential NULL pointer free

Ip6ConfigSetDnsServer may cause ASSERT if the invalid DNS
server address received. The issue is triggered by the NULL
pointer(Tmp) free.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
7 years agoMdeModulePkg/Ip4Dxe: Fix the potential NULL pointer free
Jiaxin Wu [Thu, 29 Dec 2016 07:57:39 +0000 (15:57 +0800)]
MdeModulePkg/Ip4Dxe: Fix the potential NULL pointer free

Ip4Config2SetDnsServer may cause ASSERT if the invalid DNS
server address received. The issue is triggered by the NULL
pointer(Tmp) free.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
7 years agoVlv2TbltDevicePkg/BootScriptSaveDxe: save 64-bit LoopTimes
Laszlo Ersek [Wed, 30 Nov 2016 19:31:18 +0000 (20:31 +0100)]
Vlv2TbltDevicePkg/BootScriptSaveDxe: save 64-bit LoopTimes

The BootScriptMemPoll() helper function does the following:

- pop LoopTimes from the variable argument list as UINT64, then truncate
  it to UINTN,

- pass the truncated value to S3BootScriptSaveMemPoll() as last argument.

The truncation to UINTN is now superfluous, thanks to the patch titled
"MdePkg, MdeModulePkg: S3BootScriptSaveMemPoll(): accept 64-bit
LoopTimes".

Cc: David Wei <david.wei@intel.com>
Cc: Mang Guo <mang.guo@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: "Yao, Jiewen" <jiewen.yao@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
7 years agoMdeModulePkg: S3SaveStateDxe, SmmS3SaveState: save 64-bit LoopTimes
Laszlo Ersek [Wed, 30 Nov 2016 19:19:06 +0000 (20:19 +0100)]
MdeModulePkg: S3SaveStateDxe, SmmS3SaveState: save 64-bit LoopTimes

The BootScriptWriteMemPoll() helper function in both drivers does the
following:

- pop Delay from the variable argument list as UINT64, then truncate it to
  UINTN,

- divide Delay by 10, using DivU64x32Remainder(), then store the quotient
  in LoopTimes (also UINTN),

- pass LoopTimes to S3BootScriptSaveMemPoll() as last argument.

The truncation to UINTN is superfluous and wrong in this logic (not to
mention incompatible with the PI spec); it prevents callers from
specifying Delays longer than 0xFFFF_FFFF * 100ns (approximately 429
seconds == 7 minutes 9 seconds) on Ia32. In particular it prevents callers
from specifying an infinite timeout (for example, 0xFFFF_FFFF_FFFF_FFFF *
100ns, approximately 58494 years).

Change the type of Delay and LoopTimes to UINT64. Keep the same logic,
just remove the truncations. The resultant LoopTimes values can be safely
passed to S3BootScriptSaveMemPoll() thanks to the previous patch.

Cc: Feng Tian <feng.tian@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: "Yao, Jiewen" <jiewen.yao@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
7 years agoMdePkg, MdeModulePkg: S3BootScriptSaveMemPoll(): accept 64-bit LoopTimes
Laszlo Ersek [Wed, 30 Nov 2016 19:07:50 +0000 (20:07 +0100)]
MdePkg, MdeModulePkg: S3BootScriptSaveMemPoll(): accept 64-bit LoopTimes

The BaseNull instance of S3BootScriptLib obviously doesn't care about the
type of the S3BootScriptSaveMemPoll() function's LoopTimes parameter; this
lib instance doesn't do anything with the parameters received in
S3BootScriptSaveMemPoll().

The PiDxe instance saves the LoopTimes parameter in
EFI_BOOT_SCRIPT_MEM_POLL.LoopTimes. This target field already has UINT64
type. Furthermore, the BootScriptExecuteMemPoll() function in the same
library instance already uses a local UINT64 variable called LoopTimes to
count up to EFI_BOOT_SCRIPT_MEM_POLL.LoopTimes. This means that the the
UINTN type for S3BootScriptSaveMemPoll()'s LoopTimes parameter is an
unnecessary restriction.

The callers of S3BootScriptSaveMemPoll() will be updated in the next
patches, functionally. At this stage, they will continue to compile, since
UINT64 parameters can accept UINTN arguments.

Cc: Feng Tian <feng.tian@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: "Yao, Jiewen" <jiewen.yao@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
7 years agoMdeModulePkg/PrintLib: Add missing return status check for Print APIs
Hao Wu [Fri, 23 Dec 2016 05:04:38 +0000 (13:04 +0800)]
MdeModulePkg/PrintLib: Add missing return status check for Print APIs

https://bugzilla.tianocore.org/show_bug.cgi?id=307

For the following APIs in PrintLib instance
MdeModulePkg\Library\DxePrintLibPrint2Protocol:
UnicodeVSPrint
UnicodeSPrint
UnicodeVSPrintAsciiFormat
UnicodeSPrintAsciiFormat
AsciiVSPrint
AsciiSPrint
AsciiVSPrintUnicodeFormat
AsciiSPrintUnicodeFormat

The internal function DxePrintLibPrint2ProtocolVaListToBaseList() will be
called to convert a VA_LIST to a BASE_LIST. However, those APIs miss
checking the return value of the internal function.

This commit adds codes to check the return value. If the VA_LIST fails to
be converted to a BASE_LIST, those PrintLib APIs will return 0 and leave
the output 'StartOfBuffer' unmodified.

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>
7 years agoUefiCpuPkg/MpInitLib: Set initialize value of TimerPeriod
Jeff Fan [Thu, 29 Dec 2016 01:29:23 +0000 (09:29 +0800)]
UefiCpuPkg/MpInitLib: Set initialize value of TimerPeriod

This fix is to pass VS2010/VS2012 build.

Cc: Feng Tian <feng.tian@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Dandan Bi <dandan.bi@intel.com>
7 years agoBaseTools: Fix the bug for RAW file alignment value support
Yonghong Zhu [Tue, 27 Dec 2016 09:52:12 +0000 (17:52 +0800)]
BaseTools: Fix the bug for RAW file alignment value support

Fix the bug for RAW file to support Align=32 and Align=64. Current FDF
spec FfsAlignmentValues support this two values, while it is not the
valid value for GenFfs. So this patch add the logic to handle it.

Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=248
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoNetworkPkg/NetworkPkg.dsc: Move TLS modules to the supported components
Jiaxin Wu [Wed, 28 Dec 2016 11:32:18 +0000 (19:32 +0800)]
NetworkPkg/NetworkPkg.dsc: Move TLS modules to the supported components

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
7 years agoBaseTools/Ecc: Fix the issue of not recognizing "FILE_GUID"
Hess Chen [Tue, 27 Dec 2016 10:10:48 +0000 (18:10 +0800)]
BaseTools/Ecc: Fix the issue of not recognizing "FILE_GUID"

Fix the issue of not recognizing "FILE_GUID"

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hess Chen <hesheng.chen@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
7 years agoNt32Pkg SecMain: Update SecMain.inf to support VS2015x86 X64 Mode
chanuei [Tue, 18 Oct 2016 02:45:02 +0000 (10:45 +0800)]
Nt32Pkg SecMain: Update SecMain.inf to support VS2015x86 X64 Mode

In V2:
  Add the specific LIB path in IA32 LINK path.

Update SecMain.inf to support VS2015x86 X64 Mode Build.
After this change, X64 Native Tools Command Prompt is not
required to be trig. NT32 IA32 and X64 can be built in the same
environment. It simplifies NT32 X64 build. New build command:
edksetup.bat --nt32
build -p Nt32Pkg\Nt32Pkg.dsc -a X64  # for 64
build -p Nt32Pkg\Nt32Pkg.dsc -a IA32 # for 32

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: David Chan <chanuei@sina.com>
Tested-by: Liming Gao <liming.gao@intel.com>
7 years agoSecurityPkg: Tcg2PhysicalPresence: Define TCG2 PP Flags Initial Pcd
Zhang, Chao B [Tue, 27 Dec 2016 08:47:06 +0000 (16:47 +0800)]
SecurityPkg: Tcg2PhysicalPresence: Define TCG2 PP Flags Initial Pcd

Define PcdTcg2PhysicalPresenceFlags to initialize TCG2 PP Flags setting.

Cc: Yao Jiewen <jiewen.yao@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
7 years agoSecurityPkg: Tcg2Smm: TPM2 Vendor specific HID
Zhang, Chao B [Wed, 21 Dec 2016 06:31:47 +0000 (14:31 +0800)]
SecurityPkg: Tcg2Smm: TPM2 Vendor specific HID

Update TPM2 HID using vendor ManufacturerID & FirmwareVersion1.

Cc: Yao Jiewen <jiewen.yao@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
7 years agoShellPkg/cd: Fix "cd" to support "fs0:dir" (no slash after ':')
Ruiyu Ni [Wed, 21 Dec 2016 08:04:19 +0000 (16:04 +0800)]
ShellPkg/cd: Fix "cd" to support "fs0:dir" (no slash after ':')

When "fs0:dir"(drive letter without slash) is used as destination
of "cd", "cd" tries to change to "dir" in root directory of "fs0:".
It's incorrect. The correct behavior is to change to "dir" in
current directory of "fs0:"

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Signed-off-by: Chen A Chen <chen.a.chen@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
7 years agoMdePkg/BaseLib: Fix PathCleanUpDirectories to correctly handle "\.\"
Ruiyu Ni [Wed, 21 Dec 2016 07:21:32 +0000 (15:21 +0800)]
MdePkg/BaseLib: Fix PathCleanUpDirectories to correctly handle "\.\"

The old code incorrectly cleans path like "fs0:\abc\.\.." to
"fs0:\abc", instead of "fs0:\"

The patch fixes this bug.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen A Chen <chen.a.chen@intel.com>
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
7 years agoUefiCpuPkg/MpInitLib: Set new AP to idle state after switching BSP
Jeff Fan [Mon, 26 Dec 2016 11:16:23 +0000 (19:16 +0800)]
UefiCpuPkg/MpInitLib: Set new AP to idle state after switching BSP

We need to set new AP to idle state if it is expected to be waken up by new BSP
later.

Cc: Feng Tian <feng.tian@intel.com>
Cc: Kinney Michael D <michael.d.kinney@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@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>
7 years agoUefiCpuPkg/MpInitLib: Disable and restore system timer interrupt
Jeff Fan [Mon, 26 Dec 2016 11:13:44 +0000 (19:13 +0800)]
UefiCpuPkg/MpInitLib: Disable and restore system timer interrupt

We need to disable system timer interrup to avoid generating the pending
interrupt on the old BSP.

Cc: Feng Tian <feng.tian@intel.com>
Cc: Kinney Michael D <michael.d.kinney@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@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>
7 years agoUefiCpuPkg/MpInitLib: Swap local APIC timer interrupt state
Jeff Fan [Mon, 26 Dec 2016 08:55:12 +0000 (16:55 +0800)]
UefiCpuPkg/MpInitLib: Swap local APIC timer interrupt state

We need to swap local APIC timer interrupt state between old BSP and new BSP.

Cc: Feng Tian <feng.tian@intel.com>
Cc: Kinney Michael D <michael.d.kinney@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@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>
7 years agoUefiCpuPkg/MpInitLib: Move save/restore interrupt to SwitchBSPWorker()
Jeff Fan [Mon, 26 Dec 2016 08:52:48 +0000 (16:52 +0800)]
UefiCpuPkg/MpInitLib: Move save/restore interrupt to SwitchBSPWorker()

During switching BSP phase, we need to disable CPU interruput to prevent stack
crashed by Timer interrupt handle. But when we enabled source debugging feature,
debug timer interrupt handler (existing on both PEI and DXE) also could crash
the stack used during switching BSP. So,we need to move save/restore interrupt
to SwitchBSPWorker().

Cc: Feng Tian <feng.tian@intel.com>
Cc: Kinney Michael D <michael.d.kinney@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@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>
7 years agoUefiCpuPkg/MpInitLib: Sync BSP's local APIC timer settings to APs
Jeff Fan [Mon, 26 Dec 2016 08:44:24 +0000 (16:44 +0800)]
UefiCpuPkg/MpInitLib: Sync BSP's local APIC timer settings to APs

If APs are waken up by INIT-SIPI-SIPI command, they will lose original local
APIC timer setting. As a result, the timer library instance based on local APIC
timer cannot work on APs function.

This fix is to save BSP's local APIC timer settings before waking up APs and
to sync to APs when APs wakeup by INIT-SIPI-SIPI command.

Setting BSP's current counter to AP's initial counter could make sure BSP and
APs have same counter value across BSP switching.

Cc: Feng Tian <feng.tian@intel.com>
Cc: Kinney Michael D <michael.d.kinney@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@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>
7 years agoUefiCpuPkg/DxeMpInitLib: Support source debugging on AP function
Jeff Fan [Mon, 26 Dec 2016 08:28:58 +0000 (16:28 +0800)]
UefiCpuPkg/DxeMpInitLib: Support source debugging on AP function

The current DxeDebugAgentLib supports source debugging on AP function. This
update is to update DxeMpInitLib to consume Debug Agent Library by
DEBUG_AGENT_INIT_DXE_AP flag. Thus, we could source debugging AP function
invoked by CPU MP Protocol.

However, current SecPeiDebugAgentLib does not support source debugging on AP
function invoked by CPU MP PPI. I have submitted one bugzilla to add this
support at https://bugzilla.tianocore.org/show_bug.cgi?id=308.

Cc: Feng Tian <feng.tian@intel.com>
Cc: Kinney Michael D <michael.d.kinney@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@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>
7 years agoUefiCpuPkg/MicrocodeUpdate: Add MP support.
Jiewen Yao [Tue, 27 Dec 2016 06:21:16 +0000 (14:21 +0800)]
UefiCpuPkg/MicrocodeUpdate: Add MP support.

Support the case that BSP and AP are using different Microcode.
The previous logic validates new MCU on BSP only.
The enhanced logic will validate MCU on every BSP and AP.
As long as one processor loads the MCU successfully, it will be updated.

Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
7 years agoUefiCpuPkg/MicrocodeUpdate: enhance flash write logic
Jiewen Yao [Mon, 26 Dec 2016 15:35:41 +0000 (23:35 +0800)]
UefiCpuPkg/MicrocodeUpdate: enhance flash write logic

The patch updated MicrocodeWrite() to move the Microcode replacement logic
to a standalone function -  UpdateMicrocodeFlashRegion().
More detail description is added in UpdateMicrocodeFlashRegion()
to improve readability.

The Microcode information is collected in InitializeMicrocodeDescriptor(),
so that FmpGetImage() can get the info directly.
MicrocodeRead() is not needed any more.

Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
7 years agoIntelFrameworkModulePkg KbDxe: Execute key notify func at TPL_CALLBACK
Star Zeng [Fri, 16 Dec 2016 10:07:43 +0000 (18:07 +0800)]
IntelFrameworkModulePkg KbDxe: Execute key notify func at TPL_CALLBACK

Current implementation executes key notify function in TimerHandler
at TPL_NOTIFY. The code change is to make key notify function
executed at TPL_CALLBACK to reduce the time occupied at TPL_NOTIFY.

The code will signal KeyNotify process event if the key pressed
matches any key registered and insert the KeyData to the EFI Key
queue for notify, then the KeyNotify process handler will invoke
key notify functions at TPL_CALLBACK.

Cc: Ruiyu Ni <Ruiyu.ni@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Ruiyu Ni <Ruiyu.ni@intel.com>
7 years agoIntelFrameworkModulePkg Ps2KbDxe: Execute key notify func at TPL_CALLBACK
Star Zeng [Fri, 16 Dec 2016 10:07:12 +0000 (18:07 +0800)]
IntelFrameworkModulePkg Ps2KbDxe: Execute key notify func at TPL_CALLBACK

Current implementation executes key notify function in TimerHandler
at TPL_NOTIFY. The code change is to make key notify function
executed at TPL_CALLBACK to reduce the time occupied at TPL_NOTIFY.

The code will signal KeyNotify process event if the key pressed
matches any key registered and insert the KeyData to the EFI Key
queue for notify, then the KeyNotify process handler will invoke
key notify functions at TPL_CALLBACK.

Cc: Ruiyu Ni <Ruiyu.ni@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Ruiyu Ni <Ruiyu.ni@intel.com>
7 years agoMdeModulePkg Ps2KbDxe: Execute key notify func at TPL_CALLBACK
Star Zeng [Fri, 16 Dec 2016 10:08:18 +0000 (18:08 +0800)]
MdeModulePkg Ps2KbDxe: Execute key notify func at TPL_CALLBACK

Current implementation executes key notify function in TimerHandler
at TPL_NOTIFY. The code change is to make key notify function
executed at TPL_CALLBACK to reduce the time occupied at TPL_NOTIFY.

The code will signal KeyNotify process event if the key pressed
matches any key registered and insert the KeyData to the EFI Key
queue for notify, then the KeyNotify process handler will invoke
key notify functions at TPL_CALLBACK.

Cc: Ruiyu Ni <Ruiyu.ni@intel.com>
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: Star Zeng <star.zeng@intel.com>
Reviewed-by: Ruiyu Ni <Ruiyu.ni@intel.com>
7 years agoMdeModulePkg TerminalDxe: Execute key notify func at TPL_CALLBACK
Star Zeng [Mon, 19 Dec 2016 14:21:11 +0000 (22:21 +0800)]
MdeModulePkg TerminalDxe: Execute key notify func at TPL_CALLBACK

Current implementation executes key notify function in TimerHandler
at TPL_NOTIFY. The code change is to make key notify function
executed at TPL_CALLBACK to reduce the time occupied at TPL_NOTIFY.

The code will signal KeyNotify process event if the key pressed
matches any key registered and insert the KeyData to the EFI Key
queue for notify, then the KeyNotify process handler will invoke
key notify functions at TPL_CALLBACK.

Cc: Ruiyu Ni <Ruiyu.ni@intel.com>
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: Star Zeng <star.zeng@intel.com>
Reviewed-by: Ruiyu Ni <Ruiyu.ni@intel.com>
7 years agoMdeModulePkg UsbKbDxe: Execute key notify func at TPL_CALLBACK
Star Zeng [Fri, 16 Dec 2016 09:16:22 +0000 (17:16 +0800)]
MdeModulePkg UsbKbDxe: Execute key notify func at TPL_CALLBACK

Current implementation executes key notify function in TimerHandler
at TPL_NOTIFY. The code change is to make key notify function
executed at TPL_CALLBACK to reduce the time occupied at TPL_NOTIFY.

The code will signal KeyNotify process event if the key pressed
matches any key registered and insert the KeyData to the EFI Key
queue for notify, then the KeyNotify process handler will invoke
key notify functions at TPL_CALLBACK.

Cc: Ruiyu Ni <Ruiyu.ni@intel.com>
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: Star Zeng <star.zeng@intel.com>
Reviewed-by: Ruiyu Ni <Ruiyu.ni@intel.com>
7 years agoMdeModulePkg ConSplitterDxe: Support toggle state sync
Star Zeng [Fri, 15 Apr 2016 09:38:51 +0000 (17:38 +0800)]
MdeModulePkg ConSplitterDxe: Support toggle state sync

Register key notify for toggle state (CapsLock, NumLock and ScrollLock)
sync between multiple keyboards.
The implementation for this feature requires keyboard driver supports
EFI_KEY_STATE_EXPOSED, and turns on physical TextInEx partial key
report for toggle state sync.
The virtual TextInEx will report the partial key after it is required
by calling SetState(X | KEY_STATE_VALID_EXPOSED) explicitly.

Cc: Ruiyu Ni <Ruiyu.ni@intel.com>
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: Star Zeng <star.zeng@intel.com>
Reviewed-by: Ruiyu Ni <Ruiyu.ni@intel.com>
7 years agoNetworkPkg: Fix potentially uninitialized local variable
Jiaxin Wu [Mon, 26 Dec 2016 01:53:20 +0000 (09:53 +0800)]
NetworkPkg: Fix potentially uninitialized local variable

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
7 years agoNt32Pkg/Nt32Pkg.dsc: Change TLS_ENABLE flag to FALSE by default
Jiaxin Wu [Fri, 23 Dec 2016 08:39:45 +0000 (16:39 +0800)]
Nt32Pkg/Nt32Pkg.dsc: Change TLS_ENABLE flag to FALSE by default

TLS feature highly depends on the OpenSSL building. To avoid
the default Nt32 platform build failure, we should change the
default value of TLS_ENABLE to FALSE.

The notes are also provided for Secure Boot and TLS features.

Cc: Ni Ruiyu <ruiyu.ni@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Long Qin <qin.long@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
7 years agoNetworkPkg/HttpDxe: Fix the potential NULL dereference
Jiaxin Wu [Fri, 23 Dec 2016 03:13:21 +0000 (11:13 +0800)]
NetworkPkg/HttpDxe: Fix the potential NULL dereference

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Wu Hao A <hao.a.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
7 years agoNetworkPkg/DnsDxe: Fixed the assert issue in DnsDxe
Jiaxin Wu [Thu, 8 Dec 2016 00:52:41 +0000 (08:52 +0800)]
NetworkPkg/DnsDxe: Fixed the assert issue in DnsDxe

Fix the DnsDxe assert issue when the incorrect answer message
received.

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: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Zhang Lubo <lubo.zhang@intel.com>
7 years agoMdeModulePkg/CapsuleLib: Follow UEFI 22.2.3 to process FMP.
Jiewen Yao [Fri, 23 Dec 2016 15:22:30 +0000 (23:22 +0800)]
MdeModulePkg/CapsuleLib: Follow UEFI 22.2.3 to process FMP.

Previous logic does not follow UEFI 22.2.3 to process FMP strictly.
It may cause FMP image not be processed in some corner case.
The updated logic follows UEFI 22.2.3.

The way to check if a capsule is processed is also simplified.

The function - ProcessFmpCapsuleImage() is too big, so that
we created sub-functions - StartFmpImage(), DumpAllFmpInfo(),
GetFmpHandleBufferByType(), SetFmpImageData(), RecordFmpCapsuleStatus()
to improve the readability.

The function - ProcessTheseCapsules() is too big, so that
we created sub-functions - InitCapsulePtr(), AreAllImagesProcessed(),
PopulateCapsuleInConfigurationTable() to improve the readability.

Cc: Feng Tian <feng.tian@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
7 years agoMdeModulePkg/CapsuleLib: Support result rolling over.
Jiewen Yao [Fri, 23 Dec 2016 16:00:51 +0000 (00:00 +0800)]
MdeModulePkg/CapsuleLib: Support result rolling over.

According to UEFI spec, capsule result variable may roll over to 0.

Cc: Feng Tian <feng.tian@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
7 years agoMdeModulePkg/CapsuleLib: Add CapsuleTarget support.
Jiewen Yao [Fri, 23 Dec 2016 07:42:27 +0000 (15:42 +0800)]
MdeModulePkg/CapsuleLib: Add CapsuleTarget support.

UEFI spec requires CapsuleTarget to be a device path associated
with FMP producer.

Cc: Feng Tian <feng.tian@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
7 years agoBaseTools/Pccts: Resolve GCC sting format mismatch build warning
Hao Wu [Thu, 22 Dec 2016 01:17:27 +0000 (09:17 +0800)]
BaseTools/Pccts: Resolve GCC sting format mismatch build warning

https://bugzilla.tianocore.org/show_bug.cgi?id=282

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoMdeModulePkg/CapsuleLib: remove ImageIndex check.
Jiewen Yao [Thu, 22 Dec 2016 15:41:00 +0000 (23:41 +0800)]
MdeModulePkg/CapsuleLib: remove ImageIndex check.

UEFI specification does not require ImageIndex check,
it only requires ImageTypeId check.

Cc: Feng Tian <feng.tian@intel.com>
Cc: Star Zeng <star.zeng@intel.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>
Reviewed-by: Star Zeng <star.zeng@intel.com>
7 years agoMdeModulePkg/CapsuleApp: Dump capsule name in record.
Jiewen Yao [Thu, 22 Dec 2016 05:45:18 +0000 (13:45 +0800)]
MdeModulePkg/CapsuleApp: Dump capsule name in record.

According to UEFI spec, capsule report variable should include
a null terminator for capsule name and capsule target, if they are
not present.

Cc: Feng Tian <feng.tian@intel.com>
Cc: Star Zeng <star.zeng@intel.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>
Reviewed-by: Star Zeng <star.zeng@intel.com>
7 years agoMdeModulePkg/CapsuleLib: Add NULL capsule name in record.
Jiewen Yao [Thu, 22 Dec 2016 05:43:37 +0000 (13:43 +0800)]
MdeModulePkg/CapsuleLib: Add NULL capsule name in record.

According to UEFI spec, capsule report variable should include
a null terminator for capsule name and capsule target, if they are
not present.

The reserved field is zeroed.

Cc: Feng Tian <feng.tian@intel.com>
Cc: Star Zeng <star.zeng@intel.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>
Reviewed-by: Star Zeng <star.zeng@intel.com>
7 years agoSignedCapsulePkg/SystemCapsuleLib: Add ASSERT check for PCD
Jiewen Yao [Thu, 22 Dec 2016 04:38:22 +0000 (12:38 +0800)]
SignedCapsulePkg/SystemCapsuleLib: Add ASSERT check for PCD

Add ASSERT check for PCD to avoid platform mis-configuration.

Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Qin Long <qin.long@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Qin Long <qin.long@intel.com>
7 years agoSecurityPkg/FmpAuthLib: Add PublicKeyDataLength check
Jiewen Yao [Thu, 22 Dec 2016 04:36:39 +0000 (12:36 +0800)]
SecurityPkg/FmpAuthLib: Add PublicKeyDataLength check

Add PublicKeyDataLength check to be multiple SHA256_DIGEST_SIZE
to avoid caller make mistake, or platform mis-configuration.

Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Qin Long <qin.long@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Qin Long <qin.long@intel.com>
7 years agoNt32Pkg: Enable HTTPS boot feature for Nt32 platform
Jiaxin Wu [Wed, 14 Dec 2016 03:36:38 +0000 (11:36 +0800)]
Nt32Pkg: Enable HTTPS boot feature for Nt32 platform

v2:
* Rename flag: HTTPS_BOOT_ENABLE -> TLS_ENABLE

This path is used to enable HTTPS boot feature for Nt32 platform.

Cc: Long Qin <qin.long@intel.com>
Cc: Ni Ruiyu <ruiyu.ni@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Zhang Lubo <lubo.zhang@intel.com>
Cc: Thomas Palmer <thomas.palmer@hpe.com>
Cc: Yao Jiewen <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Qin Long <qin.long@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
7 years agoNt32Pkg/Nt32Pkg.dsc: Remove the flag for OpensslLib and BaseCryptLib
Jiaxin Wu [Wed, 14 Dec 2016 03:33:49 +0000 (11:33 +0800)]
Nt32Pkg/Nt32Pkg.dsc: Remove the flag for OpensslLib and BaseCryptLib

This patch is used to remove the 'SECURE_BOOT_ENABLE' flag for OpensslLib
and BaseCryptLib modules.

Cc: Long Qin <qin.long@intel.com>
Cc: Ni Ruiyu <ruiyu.ni@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Zhang Lubo <lubo.zhang@intel.com>
Cc: Thomas Palmer <thomas.palmer@hpe.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Qin Long <qin.long@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
7 years agoNetworkPkg/NetworkPkg.dsc: Enable TlsDxe and TlsAuthConfigDxe module
Jiaxin Wu [Wed, 14 Dec 2016 02:59:51 +0000 (10:59 +0800)]
NetworkPkg/NetworkPkg.dsc: Enable TlsDxe and TlsAuthConfigDxe module

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Zhang Lubo <lubo.zhang@intel.com>
Cc: Long Qin <qin.long@intel.com>
Cc: Thomas Palmer <thomas.palmer@hpe.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
7 years agoNetworkPkg/HttpDxe: HTTPS support over IPv4 and IPv6
Jiaxin Wu [Wed, 14 Dec 2016 02:57:41 +0000 (10:57 +0800)]
NetworkPkg/HttpDxe: HTTPS support over IPv4 and IPv6

This patch is used to enable HTTPS feature. HttpDxe driver
will consume TlsDxe driver. It can both support http and https
feature, that’s depended on the information of URL, the HTTP
instance can be able to determine whether to use http or https.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Zhang Lubo <lubo.zhang@intel.com>
Cc: Long Qin <qin.long@intel.com>
Cc: Thomas Palmer <thomas.palmer@hpe.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
7 years agoNetworkPkg/TlsAuthConfigDxe: Provide the UI to support TLS auth configuration
Jiaxin Wu [Wed, 14 Dec 2016 02:54:32 +0000 (10:54 +0800)]
NetworkPkg/TlsAuthConfigDxe: Provide the UI to support TLS auth configuration

This patch provides the UI to support TLS auth configuration.
* EFI_SIGNATURE_LIST format is used for 'TlsCaCertificate'
variable. So, TLS supports multiple certificate configuration.
* The variable attribute is BS with NV, which only target at
preventing runtime phase attack.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Zhang Lubo <lubo.zhang@intel.com>
Cc: Long Qin <qin.long@intel.com>
Cc: Thomas Palmer <thomas.palmer@hpe.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
7 years agoNetworkPkg/TlsDxe: TlsDxe driver implementation over OpenSSL
Jiaxin Wu [Wed, 14 Dec 2016 02:44:07 +0000 (10:44 +0800)]
NetworkPkg/TlsDxe: TlsDxe driver implementation over OpenSSL

v3:
* Typo fix and code refine.
* Rename the internal macros and function:
TLS_INSTANCE_FROM_PROTOCOL_THIS -> TLS_INSTANCE_FROM_PROTOCOL
TLS_INSTANCE_FROM_CONFIGURATION_THIS -> TLS_INSTANCE_FROM_CONFIGURATION
TlsEcryptPacket -> TlsEncryptPacket

v2:
* Refine the TlsEcryptPacket/TlsDecryptPacket function
according the community feedback.

This patch is the implementation of EFI TLS Service Binding
Protocol, EFI TLS Protocol and EFI TLS Configuration Protocol
Interfaces.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Zhang Lubo <lubo.zhang@intel.com>
Cc: Long Qin <qin.long@intel.com>
Cc: Thomas Palmer <thomas.palmer@hpe.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
7 years agoCryptoPkg: Add new TlsLib library
Jiaxin Wu [Wed, 14 Dec 2016 02:34:57 +0000 (10:34 +0800)]
CryptoPkg: Add new TlsLib library

v2:
* Code refine and Typo fix:
TlsHandeAlert -> TlsHandleAlert

This patch is used to add new TlsLib library, which is wrapped
over OpenSSL. The implementation provides TLS library functions
for EFI TLS protocol and EFI TLS Configuration Protocol.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Long Qin <qin.long@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Zhang Lubo <lubo.zhang@intel.com>
Cc: Thomas Palmer <thomas.palmer@hpe.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Qin Long <qin.long@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
7 years agoCryptoPkg: Enable ssl build in OpensslLib directly
Jiaxin Wu [Wed, 14 Dec 2016 02:30:32 +0000 (10:30 +0800)]
CryptoPkg: Enable ssl build in OpensslLib directly

This patch is used to enable ssl build in OpensslLib module
directly.

Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Long Qin <qin.long@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Zhang Lubo <lubo.zhang@intel.com>
Cc: Thomas Palmer <thomas.palmer@hpe.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Long Qin <qin.long@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Tested-by: Wu Jiaxin <jiaxin.wu@intel.com>
7 years agoMdePkg: Add a header to standardize TLS definitions
Jiaxin Wu [Wed, 14 Dec 2016 02:21:16 +0000 (10:21 +0800)]
MdePkg: Add a header to standardize TLS definitions

This path is used to standardize TLS definitions from related
RFCs. Including TLS Cipher Suites, TLS Version, TLS Content Type
and TLS Record Header, etc.

Cc: Long Qin <qin.long@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Zhang Lubo <lubo.zhang@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Thomas Palmer <thomas.palmer@hpe.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Qin Long <qin.long@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
7 years agoMdePkg: Add TLS related protocol definition
Jiaxin Wu [Wed, 14 Dec 2016 02:19:19 +0000 (10:19 +0800)]
MdePkg: Add TLS related protocol definition

This patch is used to add Tls.h and TlsConfig.h header
files to define EFI TLS Configuration Protocol,
EFI TLS Service Binding Protocol and
EFI TLS Configuration Protocol.

Cc: Long Qin <qin.long@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Zhang Lubo <lubo.zhang@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Thomas Palmer <thomas.palmer@hpe.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Qin Long <qin.long@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
7 years agoNetworkPkg: Refine UintnToAscDecWithFormat functions logic
Hao Wu [Tue, 15 Nov 2016 08:25:22 +0000 (16:25 +0800)]
NetworkPkg: Refine UintnToAscDecWithFormat functions logic

This commit refines the logic for HttpBootUintnToAscDecWithFormat and
PxeBcUintnToAscDecWithFormat. It avoids using the decrement operator '--'
for array index to prevent possible mis-reports by static code checkers.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
7 years agoMdeModulePkg/UefiPxeBcDxe: Refine the CvtNum function logic
Hao Wu [Tue, 15 Nov 2016 08:12:30 +0000 (16:12 +0800)]
MdeModulePkg/UefiPxeBcDxe: Refine the CvtNum function logic

This commit refines the logic for the CvtNum function. It avoids using the
decrement operator '--' for array index to prevent possible mis-reports by
static code checkers.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
7 years agoMdeModulePkg/DxeNetLib: Rewrite NetblockChecksum function logic
Hao Wu [Tue, 15 Nov 2016 07:39:44 +0000 (15:39 +0800)]
MdeModulePkg/DxeNetLib: Rewrite NetblockChecksum function logic

This commit rewrites the logic for NetblockChecksum. It processes the
checksum of the left-over byte first to prevent possible mis-reports by
static code checkers.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
7 years agoMdePkg/MemoryLib: Refine InternalMemSetMem16|32|64 functions logic
Hao Wu [Tue, 15 Nov 2016 05:26:47 +0000 (13:26 +0800)]
MdePkg/MemoryLib: Refine InternalMemSetMem16|32|64 functions logic

This commit refines the logic for InternalMemSetMem16|32|64 functions. It
avoids using the decrement operator '--' for array index to prevent
possible mis-reports by static code checkers.

Please note that those modified functions are only consumed within
MemoryLib by APIs SetMem16|32|64, and those APIs will handle the case when
the input number of bytes to set is 0. Hence, the behavior of APIs
SetMem16|32|64 is not changed.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
7 years agoMdePkg/BaseLib: Add an additional check within (Ascii)StrnCmp
Hao Wu [Wed, 7 Dec 2016 02:39:03 +0000 (10:39 +0800)]
MdePkg/BaseLib: Add an additional check within (Ascii)StrnCmp

This commit adds an addtional check in AsciiStrnCmp and StrnCmp. It
explicitly checks the end of the sting pointed by 'SecondString' to make
the code logic easier for reading and to prevent possible mis-reports by
static code checkers.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
7 years agoMdePkg/BaseLib: Refine (Ascii)StrnLenS functions logic
Hao Wu [Tue, 15 Nov 2016 01:59:37 +0000 (09:59 +0800)]
MdePkg/BaseLib: Refine (Ascii)StrnLenS functions logic

This commit refines the logic for AsciiStrnLenS and StrnLenS. It makes the
logic more straightforward to prevent possible mis-reports by static code
checkers.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoUefiCpuPkg/SmmCpuFeaturesLib: Fix coding style issues
Dandan Bi [Tue, 20 Dec 2016 07:12:56 +0000 (15:12 +0800)]
UefiCpuPkg/SmmCpuFeaturesLib: Fix coding style issues

Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
7 years agoUefiCpuPkg: Add Pcd info to uni file
Dandan Bi [Tue, 20 Dec 2016 07:10:29 +0000 (15:10 +0800)]
UefiCpuPkg: Add Pcd info to uni file

Add PcdCpuSmmStmExceptionStackSize/PcdCpuMsegSize prompt and help
string to uni file.

Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
7 years agoSecurityPkg Tcg2ConfigDxe: Force reset when PCR Allocation changed.
Eric Dong [Tue, 20 Dec 2016 07:54:37 +0000 (15:54 +0800)]
SecurityPkg Tcg2ConfigDxe: Force reset when PCR Allocation changed.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
7 years agoUefiCpuPkg/PiSmmCpuDxeSmm: Add check to avoid NULL ptr dereference
Hao Wu [Tue, 20 Dec 2016 01:13:23 +0000 (09:13 +0800)]
UefiCpuPkg/PiSmmCpuDxeSmm: Add check to avoid NULL ptr dereference

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>
7 years agoBaseTools GCC makefile: disable unused-result warning for CPP file
Liming Gao [Fri, 16 Dec 2016 05:07:10 +0000 (13:07 +0800)]
BaseTools GCC makefile: disable unused-result warning for CPP file

This warning has been disabled for C file. To be same, it is also disabled
for CPP file.

Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
7 years agoBaseTools: fix write-strings build warnings
Heyi Guo [Thu, 15 Dec 2016 06:49:47 +0000 (14:49 +0800)]
BaseTools: fix write-strings build warnings

Fix build warnings of "deprecated conversion from string constant to
?CHAR8* {aka char*}? [-Wwrite-strings]" for BaseTools, while using
"gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3)".

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Heyi Guo <heyi.guo@linaro.org>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools: fix format type build warnings
Heyi Guo [Thu, 15 Dec 2016 06:49:46 +0000 (14:49 +0800)]
BaseTools: fix format type build warnings

Fix build warnings of "format ?%d? expects argument of type ?int?, but
argument 5 has type ?long unsigned int? [-Wformat=]" for BaseTools,
while using "gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3)".

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Heyi Guo <heyi.guo@linaro.org>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools: fix format-security build warnings
Heyi Guo [Thu, 15 Dec 2016 06:49:45 +0000 (14:49 +0800)]
BaseTools: fix format-security build warnings

Fix build warnings of "format not a string literal and no format
arguments [-Wformat-security]" for BaseTools, while using "gcc version
4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3)".

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Heyi Guo <heyi.guo@linaro.org>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoMdeModulePkg/NonDiscoverableDeviceRegistrationLib: Fix coding style issues
Dandan Bi [Mon, 19 Dec 2016 07:02:24 +0000 (15:02 +0800)]
MdeModulePkg/NonDiscoverableDeviceRegistrationLib: Fix coding style issues

1. Fix issues in comments
2. Fix Guid/protocol format

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
7 years agoMdeModulePkg/SataControllerDxe: Fix coding style issue
Dandan Bi [Mon, 19 Dec 2016 03:37:51 +0000 (11:37 +0800)]
MdeModulePkg/SataControllerDxe: Fix coding style issue

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
7 years agoMdeModulePkg/TerminalDxe: Initialize variable after declaration
Dandan Bi [Mon, 19 Dec 2016 03:18:46 +0000 (11:18 +0800)]
MdeModulePkg/TerminalDxe: Initialize variable after declaration

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
7 years agoMdeModulePkg/EmmcDxe: Avoid Non-Boolean type used as Boolean
Dandan Bi [Mon, 19 Dec 2016 03:16:19 +0000 (11:16 +0800)]
MdeModulePkg/EmmcDxe: Avoid Non-Boolean type used as Boolean

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
7 years agoMdeModulePkg/EbcDxe: Make variable name follow rules
Dandan Bi [Mon, 19 Dec 2016 03:11:15 +0000 (11:11 +0800)]
MdeModulePkg/EbcDxe: Make variable name follow rules

For variable name, it should contain lower case characters.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
7 years agoMdeModulePkg/CapsuleApp: Fix Guid format issues
Dandan Bi [Mon, 19 Dec 2016 03:03:57 +0000 (11:03 +0800)]
MdeModulePkg/CapsuleApp: Fix Guid format issues

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
7 years agoIntelSiliconPkg: Fix format issues
Dandan Bi [Mon, 19 Dec 2016 01:46:01 +0000 (09:46 +0800)]
IntelSiliconPkg: Fix format issues

1. Fix doxygen formt
2. Fix Guid format

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
7 years agoSecurityPkg/FmpAuthenticationLib: Fix Guid format issues
Dandan Bi [Mon, 19 Dec 2016 01:38:22 +0000 (09:38 +0800)]
SecurityPkg/FmpAuthenticationLib: Fix Guid format issues

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
7 years agoIntelSiliconPkg: 0468303 caused to breaking the SMBIOS tables generation code
Chan, Amy [Fri, 16 Dec 2016 07:10:45 +0000 (15:10 +0800)]
IntelSiliconPkg: 0468303 caused to breaking the SMBIOS tables generation code

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Chiu, Chasel <chasel.chiu@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chan, Amy <amy.chan@intel.com>
System test:
Smbios tables are correctly published on an intel internal platform.

 .../DxeSmbiosDataHobLib/DxeSmbiosDataHobLib.c      | 134 +++------------------
 1 file changed, 14 insertions(+), 120 deletions(-)

7 years agoUefiCpuPkg/ArchitecturalMsr.h: Remove non-Ascii characters
Hao Wu [Tue, 20 Dec 2016 01:42:53 +0000 (09:42 +0800)]
UefiCpuPkg/ArchitecturalMsr.h: Remove non-Ascii characters

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
7 years agoBaseTools: Correct bin wrappers for GenDepex.py path
Yonghong Zhu [Mon, 19 Dec 2016 02:52:20 +0000 (10:52 +0800)]
BaseTools: Correct bin wrappers for GenDepex.py path

The WindowsLike and PosixLike bin wrappers for GenDepex.py do not use
correct path. GenDepex.py is not in a GenDepex directory. Instead, it is
in the AutoGen directory.

Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=292
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoShellBinPkg: New Shell binaries for IA32 and X64
Ruiyu Ni [Mon, 19 Dec 2016 07:27:38 +0000 (15:27 +0800)]
ShellBinPkg: New Shell binaries for IA32 and X64

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
7 years agoFatBinPkg: New EnhancedFatDxe binaries for IA32, X64, EBC and IPF
Ruiyu Ni [Mon, 19 Dec 2016 06:52:38 +0000 (14:52 +0800)]
FatBinPkg: New EnhancedFatDxe binaries for IA32, X64, EBC and IPF

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
7 years agoUefiCpuPkg/PiSmmCpu: Add SMM Comm Buffer Paging Protection.
Jiewen Yao [Thu, 24 Nov 2016 05:36:56 +0000 (13:36 +0800)]
UefiCpuPkg/PiSmmCpu: Add SMM Comm Buffer Paging Protection.

This patch sets the normal OS buffer EfiLoaderCode/Data,
EfiBootServicesCode/Data, EfiConventionalMemory, EfiACPIReclaimMemory
to be not present after SmmReadyToLock.

To access these region in OS runtime phase is not a good solution.

Previously, we did similar check in SmmMemLib to help SMI handler
do the check. But if SMI handler forgets the check, it can still
access these OS region and bring risk.

So here we enforce the policy to prevent it happening.

Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Michael D Kinney <michael.d.kinney@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: Jeff Fan <jeff.fan@intel.com>
7 years agoUefiCpuPkg/SmmCpuFeaturesLibStm: Add STM library instance
Michael Kinney [Mon, 28 Nov 2016 22:36:51 +0000 (06:36 +0800)]
UefiCpuPkg/SmmCpuFeaturesLibStm: Add STM library instance

Add a new instances of the SmmCpuFeaturesLib that is used by
platforms to enable the SMI Transfer Monitor(STM) feature.
This new instance is in the same directory as the default
SmmCpuFeaturesLib instance in order to share source files.

The DSC file is updated to build both SmmCpuFeatureLib
instances and to build two versions of the PiSmmCpuDxeSmm
module using each of the SmmCpuFeatureLib instances.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
7 years agoUefiCpuPkg/SmmCpuFeaturesLib: Split into two files
Michael Kinney [Fri, 18 Nov 2016 04:54:19 +0000 (20:54 -0800)]
UefiCpuPkg/SmmCpuFeaturesLib: Split into two files

Split the default implementation of the SmmCpuFeaturesLib
into two files to prepare for the addition of the STM
specific SmmCpuFeaturesLib implementation.  The STM
specific implementation installs a different SMI entry
handler and initialize the MSEG specific MSR at the end
of SmmCpuFeaturesInitializeProcessor().

This patch does not introduce any functional changes
to the default implementation of the SmmCpuFeaturesLib.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
7 years agoUefiCpuPkg: Add STM GUIDs, Protocols, and PCDs
Michael Kinney [Mon, 28 Nov 2016 21:52:57 +0000 (13:52 -0800)]
UefiCpuPkg: Add STM GUIDs, Protocols, and PCDs

* Add GUIDed HOB that described MSEG region in SMRAM
* Add SM Monitor Init Protocol
* Add PCD to configure size of SMM exception stack
* Add PCD to configure MSEG region size if it is not
  described by the gMsegSmramGuid GUIDed HOB.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
7 years agoUefiCpuPkg/Include: Update MSEG structure comments
Michael Kinney [Wed, 7 Dec 2016 07:22:24 +0000 (23:22 -0800)]
UefiCpuPkg/Include: Update MSEG structure comments

Add comments to describe fields of MSEG_HEADER and
add define values for the MonitorFeatures field.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
7 years agoMdeModulePkg/NonDiscoverablePciDevice: Make variable definition follow rule
Dandan Bi [Thu, 15 Dec 2016 06:15:21 +0000 (14:15 +0800)]
MdeModulePkg/NonDiscoverablePciDevice: Make variable definition follow rule

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
7 years agoMdeModulePkg/NonDiscoverablePciDeviceDxe: Add comments for functions
Dandan Bi [Thu, 15 Dec 2016 12:52:52 +0000 (20:52 +0800)]
MdeModulePkg/NonDiscoverablePciDeviceDxe: Add comments for functions

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
7 years agoMdeModulePkg/NonDiscoverablePciDeviceDxe: Fix VS2010/2012 build failure
Dandan Bi [Fri, 16 Dec 2016 01:53:03 +0000 (09:53 +0800)]
MdeModulePkg/NonDiscoverablePciDeviceDxe: Fix VS2010/2012 build failure

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
7 years agoNetworkPkg: Replace ASSERT with error return code in PXE and HTTP boot driver.
Fu Siyuan [Fri, 16 Dec 2016 07:56:42 +0000 (15:56 +0800)]
NetworkPkg: Replace ASSERT with error return code in PXE and HTTP boot driver.

This patch remove the ASSERT when receive a DHCP packet large than the maximum
cache buffer size.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
7 years agoMdeModulePkg: Replace ASSERT with error return code in PXE driver.
Fu Siyuan [Fri, 16 Dec 2016 06:03:07 +0000 (14:03 +0800)]
MdeModulePkg: Replace ASSERT with error return code in PXE driver.

This patch remove the ASSERT when receive a DHCP packet large than the maximum
cache buffer size.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
7 years agoOmap35xxPkg/PciEmulation: port to new non-discoverable device infrastructure
Ard Biesheuvel [Fri, 9 Dec 2016 15:04:35 +0000 (15:04 +0000)]
Omap35xxPkg/PciEmulation: port to new non-discoverable device infrastructure

Move to the new non-discoverable device protocols for wiring the PCI based
EHCI controller driver to the non-discoverable EHCI controller found on the
OMAP 3530.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
7 years agoSecurityPkg: Tcg2Dxe: Report correct FinalEventLog size
Zhang, Chao B [Fri, 16 Dec 2016 05:09:44 +0000 (13:09 +0800)]
SecurityPkg: Tcg2Dxe: Report correct FinalEventLog size

Update debug log to report correct FinalEventLog size.

Cc: Yao Jiewen <jiewen.yao@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
7 years agoUefiCpuPkg/Cpuid.h: Update CPUID definitions with SDM (Sep.2016)
Hao Wu [Fri, 4 Nov 2016 04:41:18 +0000 (12:41 +0800)]
UefiCpuPkg/Cpuid.h: Update CPUID definitions with SDM (Sep.2016)

https://bugzilla.tianocore.org/show_bug.cgi?id=176

Update CPUID leaf and sub-leaf indexes and structures as described by
Intel(R) 64 and IA-32 Architectures Software Developer's Manual,
Volume 2A, September 2016, CPUID instruction.

Summary of incompatible changes:
1. Field name changes in CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS_EBX
Bit 12 has been renamed from 'PQM' to 'RDT_M' and bit 15 has been renamed
from 'PQE' to 'RDT_A'.

2. Stucture and filed name changes for 'CPUID Platform QoS Monitoring
Information' related definitions
Definition 'CPUID_PLATFORM_QOS_MONITORING' has been renamed to
'CPUID_INTEL_RDT_MONITORING'.
Definition 'CPUID_PLATFORM_QOS_MONITORING_ENUMERATION_SUB_LEAF' has been
renamed to 'CPUID_INTEL_RDT_MONITORING_ENUMERATION_SUB_LEAF'.
Definition 'CPUID_PLATFORM_QOS_MONITORING_CAPABILITY_SUB_LEAF' has been
renamed to 'CPUID_INTEL_RDT_MONITORING_L3_CACHE_SUB_LEAF'.

3. Stucture and filed name changes for 'CPUID Platform QoS Enforcement
Information' related definitions
Definition 'CPUID_PLATFORM_QOS_ENFORCEMENT' has been renamed to
'CPUID_INTEL_RDT_ALLOCATION'.
Definition 'CPUID_PLATFORM_QOS_ENFORCEMENT_MAIN_LEAF' has been renamed to
'CPUID_INTEL_RDT_ALLOCATION_ENUMERATION_SUB_LEAF'.
Definition 'CPUID_PLATFORM_QOS_ENFORCEMENT_RESID_SUB_LEAF' has been
renamed to 'CPUID_INTEL_RDT_ALLOCATION_L3_CACHE_SUB_LEAF'.

This commit also updates the relating codes in
UefiCpuPkg/Application/Cpuid to reflect the changes.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
7 years agoUefiCpuPkg/Include: Add Goldmont MSR header file with SDM (Sep.2016)
Hao Wu [Thu, 8 Dec 2016 08:35:49 +0000 (16:35 +0800)]
UefiCpuPkg/Include: Add Goldmont MSR header file with SDM (Sep.2016)

https://bugzilla.tianocore.org/show_bug.cgi?id=176

Add the MSR header file of Goldmont processor according to Intel(R) 64 and
IA-32 Architectures Software Developer's Manual, Volume 3, September 2016,
Chapter 35 Model-Specific-Registers (MSR), Section 35.5.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
7 years agoUefiCpuPkg/Include: Update Skylake MSR header file with SDM (Sep.2016)
Hao Wu [Thu, 8 Dec 2016 08:35:56 +0000 (16:35 +0800)]
UefiCpuPkg/Include: Update Skylake MSR header file with SDM (Sep.2016)

https://bugzilla.tianocore.org/show_bug.cgi?id=176

Update the MSR header file of Skylake processor according to Intel(R) 64
and IA-32 Architectures Software Developer's Manual, Volume 3, September
2016, Chapter 35 Model-Specific-Registers (MSR), Section 35.15.

Summary of incompatible changes:
1. MSR (address 38EH) IA32_PERF_GLOBAL_STAUS has been renamed to
IA32_PERF_GLOBAL_STATUS
Typo 'STAUS' has been fixed in SDM.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
7 years agoUefiCpuPkg/Include: Update MSR header files with SDM (Sep.2016)
Hao Wu [Tue, 25 Oct 2016 05:35:54 +0000 (13:35 +0800)]
UefiCpuPkg/Include: Update MSR header files with SDM (Sep.2016)

https://bugzilla.tianocore.org/show_bug.cgi?id=176

Update MSR header files of processors (excluding Goldmont and Skylake
processors) according to Intel(R) 64 and IA-32 Architectures Software
Developer's Manual, Volume 3, September 2016, Chapter 35
Model-Specific-Registers (MSR).

Summary of incompatible changes:
General:
1. MSR (address 38EH) IA32_PERF_GLOBAL_STAUS in processor-specific header
files has been removed or renamed to IA32_PERF_GLOBAL_STATUS
Typo 'STAUS' has been fixed in SDM.
If the MSR definition is the same with architectural MSR, we remove it.
Otherwise, we rename the MSR.

2. MSRs (address starting from 400H) MSR_MC{X}_{XXX} (like MSR_MC4_STATUS)
in processor-specific header files have been removed or renamed to
IA32_MC{X}_{XXX} (like IA32_MC4_STATUS)
Register name change from 'MSR_MC{X}_{XXX}' to 'IA32_MC{X}_{XXX}' in SDM.
If the MSR definition is the same with architectural MSR, we remove it.
Otherwise, we rename the MSR.
Please note that for those MSRs still have name like 'MSR_MC{X}_{XXX}' in
SDM are still kept in processor-specific header files.

HaswellMsr.h:
1. MSR (address C80H) IA32_DEBUG_FEATURE has been removed
Register name change from 'IA32_DEBUG_FEATURE' to 'IA32_DEBUG_INTERFACE'
in SDM.
Since the MSR definition is the same with architectural MSR, we remove it.

SandyBridgeMsr.h:
1. MSR (address 391H) MSR_UNC_PERF_GLOBAL_CTRL, name change for bit fields
0:3
Bit description change from 'Core {X} select' to 'Slice {X} select' for
bit 0:3 in SDM.

SilvermontMsr.h:
1. MSR (address 2AH) MSR_EBL_CR_POWERON, structure definition changed
Bit description for this MSR is totally changed in SDM, we modify the
structure definition to align with it.

XeonDMsr.h:
1. MSRs (address 630H to 632H) MSR_PKG_C8_RESIDENCY, MSR_PKG_C9_RESIDENCY
and MSR_PKG_C10_RESIDENCY have been removed
Those 3 MSRs are not defined for this processor in SDM, we remove them.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>