]> git.proxmox.com Git - mirror_edk2.git/log
mirror_edk2.git
7 years agoMdeModulePkg: VariableDxe: Use UEFI_VARIABLE_DATA
Zhang, Chao B [Tue, 24 Jan 2017 07:29:54 +0000 (15:29 +0800)]
MdeModulePkg: VariableDxe: Use UEFI_VARIABLE_DATA

Use UEFI_VARIABLE_DATA data structure according to TCG PC-Client PFP Spec
00.21.
http://www.trustedcomputinggroup.org/wp-content/uploads/PC-ClientSpecific_Platform_Profile_for_TPM_2p0_Systems_v21.pdf

Cc: Star Zeng <star.zeng@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: Star Zeng <star.zeng@intel.com>
Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
7 years agoMdePkg: UefiTcgPlatform.h: Add UEFI_VARIABLE_DATA
Zhang, Chao B [Tue, 24 Jan 2017 07:28:01 +0000 (15:28 +0800)]
MdePkg: UefiTcgPlatform.h: Add UEFI_VARIABLE_DATA

Add UEFI_VARIABLE_DATA according to TCG PC-Client PFP Spec 00.21.
http://www.trustedcomputinggroup.org/wp-content/uploads/PC-ClientSpecific_Platform_Profile_for_TPM_2p0_Systems_v21.pdf

Cc: Star Zeng <star.zeng@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: Star Zeng <star.zeng@intel.com>
Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
7 years agoShellPkg SmbiosView: Add decoding of SMBIOS spec 3.1.1
Star Zeng [Sun, 22 Jan 2017 06:50:23 +0000 (14:50 +0800)]
ShellPkg SmbiosView: Add decoding of SMBIOS spec 3.1.1

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

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jaben Carsey <jaben.carsey@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>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
7 years agoMdeModulePkg: Update PcdSmbiosDocRev to 0x1 for SMBIOS spec 3.1.1
Star Zeng [Sun, 22 Jan 2017 06:26:13 +0000 (14:26 +0800)]
MdeModulePkg: Update PcdSmbiosDocRev to 0x1 for SMBIOS spec 3.1.1

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

Cc: Feng Tian <feng.tian@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
7 years agoMdePkg: Add definitions for SMBIOS spec 3.1.1
Star Zeng [Sun, 22 Jan 2017 06:24:51 +0000 (14:24 +0800)]
MdePkg: Add definitions for SMBIOS spec 3.1.1

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

This patch is to add definitions for below items.
Processor Information (Type 4):
- add socket SP3r2
- add AMD Zen Processor Family
Management Controller Host Interface (Type 42):
- include Host Interface Type and Protocol Identifier enumerations

Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoOvmfPkg/QemuVideoDxe: Frame buffer config size may change in new mode
Ruiyu Ni [Mon, 23 Jan 2017 06:07:42 +0000 (14:07 +0800)]
OvmfPkg/QemuVideoDxe: Frame buffer config size may change in new mode

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

The patch removes the assumption in QemuVideoDxe driver that it
wrongly assumes the frame buffer configure size is the same in
different video modes.
The assumption is true in old FrameBufferBltLib but is false in
new implementation.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
7 years agoMdeModulePkg/FrameBufferBltLib: Use dynamic allocated line buffer
Ruiyu Ni [Wed, 11 Jan 2017 07:16:39 +0000 (15:16 +0800)]
MdeModulePkg/FrameBufferBltLib: Use dynamic allocated line buffer

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

The patch uses dynamic allocated line buffer to reduce memory usage
of frame buffer configure. (Original implementation uses 0x4000
bytes for line buffer.)

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
7 years agoMdeModulePkg/FrameBufferBltLib: Refine ConfigurePixelBitMaskFormat
Ruiyu Ni [Wed, 11 Jan 2017 07:06:25 +0000 (15:06 +0800)]
MdeModulePkg/FrameBufferBltLib: Refine ConfigurePixelBitMaskFormat

https://bugzilla.tianocore.org/show_bug.cgi?id=339
The patch refines ConfigurePixelBitMaskFormat() to prepare the
enhancement in next commit: Enhance this library to use dynamic
allocated line buffer to reduce memory usage of frame buffer
configure.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
7 years agoMdePkg : UefiTcgPlatform.h: Define Startup Locality Event & Indicator
Zhang, Chao B [Sun, 22 Jan 2017 04:48:03 +0000 (12:48 +0800)]
MdePkg : UefiTcgPlatform.h: Define Startup Locality Event & Indicator

Add Startup Locality Event definition according to PC Client PFP 00.21
http://www.trustedcomputinggroup.org/wp-content/uploads/PC-ClientSpecific_Platform_Profile_for_TPM_2p0_Systems_v21.pdf
Add Locality Indicator definition according to PC Client PTP 00.43
https://www.trustedcomputinggroup.org/wp-content/uploads/PC-Client-Specific-Platform-TPM-Profile-for-TPM-2-0-v43-150126.pdf

Cc: Star Zeng <star.zeng@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: Yao Jiewen <jiewen.yao@intel.com>
7 years agoSecurityPkg: Tcg2Dxe: Log Startup Locality Event
Zhang, Chao B [Sun, 22 Jan 2017 04:47:51 +0000 (12:47 +0800)]
SecurityPkg: Tcg2Dxe: Log Startup Locality Event

Log Startup Locality Event according to TCG PC Client PFP 00.21.
Event should be placed before any extend to PCR[0]
http://www.trustedcomputinggroup.org/wp-content/uploads/PC-ClientSpecific_Platform_Profile_for_TPM_2p0_Systems_v21.pdf

Cc: Star Zeng <star.zeng@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: Yao Jiewen <jiewen.yao@intel.com>
7 years agoBaseTools: Convert incomplete expression with dangling while()
Nikolai SAOUKH [Sun, 22 Jan 2017 03:27:18 +0000 (11:27 +0800)]
BaseTools: Convert incomplete expression with dangling while()

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Nikolai SAOUKH <nms@otdel-1.org>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoBaseTools: Extend the Macro used in the FDF !include statement
Yonghong Zhu [Sun, 22 Jan 2017 01:59:32 +0000 (09:59 +0800)]
BaseTools: Extend the Macro used in the FDF !include statement

Current it only support the system environment variables in the !include
statement, $(WORKSPACE), $(PACKAGES_PATH), $(EFI_SOURCE), $(EDK_SOURCE),
$(ECP_SOURCE), this patch extend the usage to support the Global macros
and the macro which defined before the statement.

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: Fix protocol handler service in HttpDxe.
Zhang, Lubo [Sun, 22 Jan 2017 01:40:30 +0000 (09:40 +0800)]
NetworkPkg: Fix protocol handler service in HttpDxe.

When we create a HTTP driver service binding private
instance, there may be different DriverBindingHandle
for Ipv4 or Ipv6, so it is essential to distinguish
the HttpService image which will be used in open
protocol or close protocol.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Cc: Sriram Subramanian <sriram-s@hpe.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
7 years agoNetworkPkg: Remove superfluous return statement.
Thomas Huth [Thu, 19 Jan 2017 09:37:31 +0000 (17:37 +0800)]
NetworkPkg: Remove superfluous return statement.

If the code eventually returns "Status" anyway, it does not make
sense to explicitely return "Status" in case of an error, too.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
7 years agoOvmfPkg: Allow HTTP connections if HTTP Boot enabled
Jiaxin Wu [Thu, 19 Jan 2017 03:53:08 +0000 (11:53 +0800)]
OvmfPkg: Allow HTTP connections if HTTP Boot enabled

v2
* Move the setting above the "!ifndef $(USE_OLD_SHELL)" part.
* Un-indent the setting to column zero.
(Comments from Laszlo)

Overwrite the value of PcdAllowHttpConnections to allow HTTP
connections if HTTP Boot enabled (-D HTTP_BOOT_ENABLE).

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Justen Jordan L <jordan.l.justen@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Kinney Michael D <michael.d.kinney@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>
Reviewed-by: Gary Lin <glin@suse.com>
Tested-by: Gary Lin <glin@suse.com>
7 years agoNt32Pkg.dsc: Add flag to control HTTP connections
Jiaxin Wu [Fri, 6 Jan 2017 03:55:47 +0000 (11:55 +0800)]
Nt32Pkg.dsc: Add flag to control HTTP connections

v3:
* Correct the commits grammar

v2:
* Rename the flag.

This flag is to overwrite the value of PcdAllowHttpConnections,
then the platform can make a decision whether to allow HTTP
connections or not.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Kinney Michael D <michael.d.kinney@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>
Reviewed-by: Gary Lin <glin@suse.com>
7 years agoNetworkPkg: Add PCD to enable the HTTP connections switch
Jiaxin Wu [Fri, 6 Jan 2017 03:53:57 +0000 (11:53 +0800)]
NetworkPkg: Add PCD to enable the HTTP connections switch

v3:
* Correct the commits grammar

v2:
* Rename the PCD to PcdAllowHttpConnections.
* Refine the PCD descriptions.

If the value of PcdAllowHttpConnections is TRUE, HTTP connections are
allowed. Both the "https://" and "http://" URI schemes are permitted.
Otherwise, HTTP connections are denied. Only the "https://" URI scheme
is permitted.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Kinney Michael D <michael.d.kinney@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>
Reviewed-by: Gary Lin <glin@suse.com>
Tested-by: Gary Lin <glin@suse.com>
7 years agoNt32Pkg FDF: Move StatusCode Handler run earlier in DXE phase
Liming Gao [Fri, 20 Jan 2017 09:28:34 +0000 (17:28 +0800)]
Nt32Pkg FDF: Move StatusCode Handler run earlier in DXE phase

Add StatusCode Handler into APRIORI DXE so that they can run early, then
more DEBUG message can print.

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
7 years agoMdeModulePkg: Variable: Update PCR[7] measure for new TCG spec
Zhang, Chao B [Wed, 18 Jan 2017 03:32:47 +0000 (11:32 +0800)]
MdeModulePkg: Variable: Update PCR[7] measure for new TCG spec

Measure DBT into PCR[7] when it is updated between initial measure and
ExitBootService. Measure "SecureBoot" change after PK update.
Spec version : TCG PC Client PFP 00.37. http://www.trustedcomputinggroup.org/wp-content/uploads/PC-ClientSpecific_Platform_Profile_for_TPM_2p0_Systems_v21.pdf

Cc: Star Zeng <star.zeng@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: Star Zeng <star.zeng@intel.com>
Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
7 years agoSecurityPkg: Tcg2Dxe: Measure DBT into PCR[7]
Zhang, Chao B [Wed, 18 Jan 2017 03:28:54 +0000 (11:28 +0800)]
SecurityPkg: Tcg2Dxe: Measure DBT into PCR[7]

Measure DBT into PCR[7] in initial measurement phase according
to TCG PC Client PFP 00.37. http://www.trustedcomputinggroup.org/wp-content/uploads/PC-ClientSpecific_Platform_Profile_for_TPM_2p0_Systems_v21.pdf

Cc: Star Zeng <star.zeng@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: Star Zeng <star.zeng@intel.com>
Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
7 years agoSecurityPkg: DxeImageVerificationLib: Update PCR[7] measure logic
Zhang, Chao B [Wed, 18 Jan 2017 03:27:19 +0000 (11:27 +0800)]
SecurityPkg: DxeImageVerificationLib: Update PCR[7] measure logic

Update PCR[7] measure logic according to TCG PC Client PFP 00.37.
Only entries in DB that is used for image authentication need to be
measured.
http://www.trustedcomputinggroup.org/wp-content/uploads/PC-ClientSpecific_Platform_Profile_for_TPM_2p0_Systems_v21.pdf

Cc: Star Zeng <star.zeng@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: Star Zeng <star.zeng@intel.com>
Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
7 years agoShellPkg SmbiosView: Add decoding of SMBIOS spec 3.1.0
Star Zeng [Thu, 12 Jan 2017 09:20:01 +0000 (17:20 +0800)]
ShellPkg SmbiosView: Add decoding of SMBIOS spec 3.1.0

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

The decoding of TPM Device (Type 43) has been added at
e9f0be021b7649c15d823e193110c0088cda9a89.

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
7 years agoMdeModulePkg: Update PcdSmbiosVersion to 0x0301 for SMBIOS spec 3.1.0
Star Zeng [Tue, 17 Jan 2017 02:01:26 +0000 (10:01 +0800)]
MdeModulePkg: Update PcdSmbiosVersion to 0x0301 for SMBIOS spec 3.1.0

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

Cc: Feng Tian <feng.tian@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
7 years agoMdePkg: Add definitions for SMBIOS spec 3.1.0
Star Zeng [Thu, 12 Jan 2017 08:21:45 +0000 (16:21 +0800)]
MdePkg: Add definitions for SMBIOS spec 3.1.0

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

TPM Device (Type 43) definition has been added at
713e4b007cb791829397522ad8f366dd1e08bee6.

This patch is to add definitions for below items.
• BIOS Information (Type 0):
– Add new entry for extended BIOS ROM size
• System Enclosure or Chassis (Type 3):
– Add new chassis types: IoT Gateway and Embedded PC
– Add new chassis types: Mini PC and Stick PC
• Processor Information (Type 4):
– Add Intel Core m3 m5 m7 processors
– Add processor socket AM4
– Add processor socket LGA1151
– Add processor socket BGA1356, BGA1440, BGA1515
– Add AMD Opteron A-Series processor
– Add processor socket LGA3647-1
– Add processor socket SP3 Processors
– Add families for ARMv7 and ARMv8
– Add family for AMD Opteron(TM) X3000 Series APU
• Cache Information (Type 7):
– Extend to support Cache sizes >2047 MB
• System Slots (Type 9):
– Add Mini PCIe support

Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoArmPkg/ArmMmuLib: Revert "use a pool allocation for the root table"
Ard Biesheuvel [Fri, 20 Jan 2017 16:44:35 +0000 (16:44 +0000)]
ArmPkg/ArmMmuLib: Revert "use a pool allocation for the root table"

This reverts commit d32702d2c2aa23e828363a7f88829b78ce36c3af.

Using a pool allocation for the root translation table seemed like
a good idea at the time, but as it turns out, such allocations are
handled in a way that makes them unsuitable for this purpose: they
are backed by HOBs that don't remain in the same place during the
various PI phase changes, which means the address programmed into
the TTBR register is no longer valid, and may refer to memory that
is reported as available to the OS.

So switch back to using a page based allocation.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
7 years agoArmPkg/ArmLib: remove indirection layer from timer register accessors
Ard Biesheuvel [Fri, 20 Jan 2017 11:58:37 +0000 (11:58 +0000)]
ArmPkg/ArmLib: remove indirection layer from timer register accessors

The generic timer support libraries call the actual system register
accessor function via a single pair of functions ArmArchTimerReadReg()
and ArmArchTimerWriteReg(), which take an enum argument to identify
the register, and return output values by pointer reference.

Since these functions are never called with a non-immediate argument,
we can simply replace each invocation with the underlying system register
accessor instead. This is mostly functionally equivalent, with the
exception of the bounds check for the enum (which is pointless given the
fact that we never pass a variable), the check for the presence of the
architected timer (which only makes sense for ARMv7, but is highly unlikely
to vary between platforms that are similar enough to run the same firmware
image), and a check for enum values that refer to the HYP view of the timer,
which we never referred to anywhere in the code in the first place.

So get rid of the middle man, and update the ArmGenericTimerPhyCounterLib
and ArmGenericTimerVirtCounterLib implementations to call the system
register accessors directly.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
7 years agoArmPlatformPkg/NorFlashDxe: Change Flash memory attributes before writes
Achin Gupta [Fri, 20 Jan 2017 11:54:59 +0000 (11:54 +0000)]
ArmPlatformPkg/NorFlashDxe: Change Flash memory attributes before writes

In NorFlashFvbInitialize() if a valid Firmware Volume header is not found at the
start of NOR Flash, the Flash memory is written before it has been remapped with
EFI_MEMORY_UC attributes to allow write commands. Since the flash memory was
previously mapped with Normal and possibly cacheable memory attributes, the
Flash commands might never reach the device.

This patch fixes this issue by remapping the Flash memory region with correct
memory attributes before writing to it.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Achin Gupta <achin.gupta@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
7 years agoArmPlatformPkg: Use EfiEventGroupSignal from UefiLib
Star Zeng [Tue, 17 Jan 2017 06:12:51 +0000 (14:12 +0800)]
ArmPlatformPkg: Use EfiEventGroupSignal from UefiLib

Use EfiEventGroupSignal from UefiLib and remove
EmptyCallbackFunction.

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

Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
7 years agoCorebootPayloadPkg: Use EfiEventGroupSignal from UefiLib
Star Zeng [Tue, 17 Jan 2017 06:11:17 +0000 (14:11 +0800)]
CorebootPayloadPkg: Use EfiEventGroupSignal from UefiLib

Use EfiEventGroupSignal from UefiLib and remove
InternalBdsEmptyCallbackFuntion.

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

Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Prince Agyeman <prince.agyeman@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Maurice Ma <maurice.ma@intel.com>
7 years agoIntelFrameworkModulePkg: Use EfiEventEmptyFunction from UefiLib
Star Zeng [Tue, 17 Jan 2017 06:11:05 +0000 (14:11 +0800)]
IntelFrameworkModulePkg: Use EfiEventEmptyFunction from UefiLib

Use EfiEventEmptyFunction from UefiLib and remove the duplication
of event empty function.

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

Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
7 years agoMdeModulePkg: Use EfiEventEmptyFunction from UefiLib
Star Zeng [Tue, 17 Jan 2017 05:50:17 +0000 (13:50 +0800)]
MdeModulePkg: Use EfiEventEmptyFunction from UefiLib

Use EfiEventEmptyFunction from UefiLib and remove the duplication
of event empty function.

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

Cc: Feng Tian <feng.tian@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
7 years agoIntelFrameworkPkg UefiLib: Make the event empty function public
Star Zeng [Tue, 17 Jan 2017 05:27:35 +0000 (13:27 +0800)]
IntelFrameworkPkg UefiLib: Make the event empty function public

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

Then this event empty function can be used to remove
the duplication in drivers and other libraries.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@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>
7 years agoMdePkg UefiLib: Make the event empty function public
Star Zeng [Tue, 17 Jan 2017 05:26:18 +0000 (13:26 +0800)]
MdePkg UefiLib: Make the event empty function public

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

Then this event empty function can be used to remove
the duplication in drivers and other libraries.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoMdePkg: Avoid Non-Boolean type used as Boolean
Dandan Bi [Thu, 19 Jan 2017 08:53:41 +0000 (16:53 +0800)]
MdePkg: Avoid Non-Boolean type used as Boolean

Cc: Brijesh Singh <brijesh.singh@amd.com>
Cc: Leo Duran <leo.duran@amd.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoMdePkg DxeHobLib: Make GetHobList working before Constructor is called
Star Zeng [Mon, 16 Jan 2017 08:07:53 +0000 (16:07 +0800)]
MdePkg DxeHobLib: Make GetHobList working before Constructor is called

The latest PiSmmCore driver added several debug messages in the
function SmmAddMemoryRegion in Page.c. The function SmmAddMemoryRegion
is called by the library constructor
PiSmmCoreMemoryAllocationLibConstructor.

When PiSmmCoreMemoryAllocationLibConstructor is executed, the
constructor of DxeHobLib (HobLibConstructor in HobLib.c) is not
executed yet. But platform instance of DebugLib may need get hob
before printing any message. As a result, an ASSERT happens in the
function GetHobList.

The patch is to update GetHobList to get HOB list from system
configuration table when the HOB list is not retrieved and not cached
yet, and HobLibConstructor is also to be updated to just call
GetHobList.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Amy Chan <amy.chan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoMdeModulePkg: Remove superfluous return statements
Thomas Huth [Thu, 19 Jan 2017 10:16:04 +0000 (18:16 +0800)]
MdeModulePkg: Remove superfluous return statements

If the code eventually returns "Status" anyway, it does not make
sense to explicitly return "Status" in case of an error, too.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
7 years agoMdeModulePkg/UfsBlockIoPei: fix initialize OCS value to 0x0F
Haojian Zhuang [Mon, 16 Jan 2017 12:22:58 +0000 (20:22 +0800)]
MdeModulePkg/UfsBlockIoPei: fix initialize OCS value to 0x0F

The OCS value should be initiliazed as 0x0F according to UFS spec.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Reviewed-by: Feng Tian <feng.tian@intel.com>
7 years agoMdeModulePkg/UfsPassThruDxe: fix initialize OCS value to 0x0F
Haojian Zhuang [Mon, 16 Jan 2017 12:22:57 +0000 (20:22 +0800)]
MdeModulePkg/UfsPassThruDxe: fix initialize OCS value to 0x0F

The OCS value should be initiliazed as 0x0F according to UFS spec.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Reviewed-by: Feng Tian <feng.tian@intel.com>
7 years agoMdeModulePkg/UfsBlockIoPei: fix the bit in UFS_HC_UTRLDBR_OFFSET reg
Haojian Zhuang [Mon, 16 Jan 2017 12:22:56 +0000 (20:22 +0800)]
MdeModulePkg/UfsBlockIoPei: fix the bit in UFS_HC_UTRLDBR_OFFSET reg

When UPIU packet is sent, (BIT0 << Slot) should be set according
to context.  But BIT0 is used without Slot when UfsWaitMemSet ()
is invoked.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Reviewed-by: Feng Tian <feng.tian@intel.com>
7 years agoMdeModulePkg/UfsPassThruDxe: fix the bit in UFS_HC_UTRLDBR_OFFSET reg
Haojian Zhuang [Mon, 16 Jan 2017 12:22:55 +0000 (20:22 +0800)]
MdeModulePkg/UfsPassThruDxe: fix the bit in UFS_HC_UTRLDBR_OFFSET reg

When UPIU packet is sent, (BIT0 << Slot) should be set according
to context.  But BIT0 is used without Slot when UfsWaitMemSet ()
is invoked.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Reviewed-by: Feng Tian <feng.tian@intel.com>
7 years agoMdeModuelPkg/UfsPassThruDxe: fix to identify 32 bits address mode
Haojian Zhuang [Mon, 16 Jan 2017 12:22:54 +0000 (20:22 +0800)]
MdeModuelPkg/UfsPassThruDxe: fix to identify 32 bits address mode

When UFS_HC_CAP_64ADDR bit is set, it means 64-bit address,
not 32-bit address.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Reviewed-by: Feng Tian <feng.tian@intel.com>
7 years agoPcAtChipsetPkg: Fix typing errors
Thomas Huth [Wed, 18 Jan 2017 13:40:15 +0000 (21:40 +0800)]
PcAtChipsetPkg: Fix typing errors

Correct the reported by the codespell utility in some files
of PcAtChipsetPkg.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
7 years agoOvmfPkg: Remove superfluous return statements.
Thomas Huth [Thu, 19 Jan 2017 09:17:37 +0000 (10:17 +0100)]
OvmfPkg: Remove superfluous return statements.

If the code eventually returns "Status" anyway, it does not make
sense to explicitely return "Status" in case of an error, too.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
7 years agoShellPkg: Add check logic for the gateway validity.
Zhang Lubo [Fri, 6 Jan 2017 09:15:27 +0000 (17:15 +0800)]
ShellPkg: Add check logic for the gateway validity.

if we set a static IP using command
'ifconfig -s eth0 static 192.168.0.121 255.255.255.0 0.0.0.0'
The system says 'Failed to set address.' but using
'ifconfig -l', the static IP can be assigned successfully.
so we need to check the gateway validity before setting manual
address to keep the ifconfig -s command more consistent.

Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Cc: Santhapur Naveen <naveens@amiindia.co.in>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-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 agoNetworkPkg: Add dns support for target URL configuration in ISCSI.
Zhang Lubo [Thu, 8 Dec 2016 11:26:24 +0000 (19:26 +0800)]
NetworkPkg: Add dns support for target URL configuration in ISCSI.

v2:
*1. Add IScsiDnsIsConfigured function in IScsiSupported to check
attempt using DNS protocol or not.2. Fix wrongs typos in IScsiDns.c
and .uni file.3. define a macro for the length of target URL.4.
update the Copyright to 2017.

Add DNS support for target URL directly configuration in UI.

Besides, When we enable the option (Get target info via DHCP) ,
the dhcp server will return target info include the  rootpath,
like the format
"iscsi:"<servername>":"<protocol>":"<port>":"<LUN>":"<targetname>
According to the RFC 4173,the server name region is expressed as
IPv4(192.168.10.20 )or IPv6 ([2000:bbbb::3]) or domain name,
but currently we only support the IP address format.
To enable this feature, we can support both.

Another enhancement is that we can deal with the data received from
the iSCSI login response with an target redirection status,
in which contains the Target Address in the format
domainname[:port][,portal-group-tag] required by RFC 3720.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
7 years agoMdeModulePkg/FileExplorer: Enable functionality of creating new file/folder
Dandan Bi [Thu, 12 Jan 2017 12:25:40 +0000 (20:25 +0800)]
MdeModulePkg/FileExplorer: Enable functionality of creating new file/folder

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

Enhance the FileExplorerlib so that user can create a new file/folder
through the UI page.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
7 years agoMdeModulePkg/FileExplorer: Update QuesrionId when Updating FileExplore form
Dandan Bi [Thu, 12 Jan 2017 10:49:40 +0000 (18:49 +0800)]
MdeModulePkg/FileExplorer: Update QuesrionId when Updating FileExplore form

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

When user select and enter a directory, File Explorer will update the
form based on the new folders and files in the directory. But when
creating question opcodes, the question id is same with previous one
and this will cause browser to show the highlight menu incorrectly.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
7 years agoMdeModulePkg/FileExplorer: Remove the codes of searching load file protocol
Dandan Bi [Tue, 10 Jan 2017 05:17:28 +0000 (13:17 +0800)]
MdeModulePkg/FileExplorer: Remove the codes of searching load file protocol

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

FileExplorer no need to search load file protocol to show files.
Now remove the codes.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
7 years agoShellPkg/HandleParsingLib: Fix coding style issue
Dandan Bi [Mon, 16 Jan 2017 01:58:47 +0000 (09:58 +0800)]
ShellPkg/HandleParsingLib: Fix coding style issue

Cc: Jaben Carsey <jaben.carsey@intel.com>
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: Jaben Carsey <jaben.carsey@intel.com>
7 years agoShellPkg SmbiosView: Add missing decoding of SMBIOS spec 3.0.0
Star Zeng [Thu, 12 Jan 2017 10:21:29 +0000 (18:21 +0800)]
ShellPkg SmbiosView: Add missing decoding of SMBIOS spec 3.0.0

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

When I am adding SMBIOS spec 3.1.0 support, I found the decoding
of SMBIOS spec 3.0.0 for some definitions is missing.

Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
7 years agoShellPkg SmbiosView: Add missing decoding of SlotType AGP8X
Star Zeng [Fri, 13 Jan 2017 08:14:54 +0000 (16:14 +0800)]
ShellPkg SmbiosView: Add missing decoding of SlotType AGP8X

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

SlotType AGP8X was added in SMBIOS spec 2.3.4, but the decoding
of it is missing. I found it when I am adding SMBIOS spec 3.1.0
support.

Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
7 years agoMdePkg: Correct comments of macros FixedPcdGetX/PatchPcdXXX in PcdLib.h
Star Zeng [Tue, 17 Jan 2017 03:41:57 +0000 (11:41 +0800)]
MdePkg: Correct comments of macros FixedPcdGetX/PatchPcdXXX in PcdLib.h

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

The patch is also to refine comments of macros PcdToken and PcdTokenEx.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoNetworkPkg/TlsAuthConfigDxe: Declare EFIAPI for the ChooseFile handler
Gary Lin [Mon, 16 Jan 2017 06:30:10 +0000 (14:30 +0800)]
NetworkPkg/TlsAuthConfigDxe: Declare EFIAPI for the ChooseFile handler

The ChooseFile handler, UpdateCAFromFile, has to be EFIAPI or gcc would
use the wrong ABI and cause the crash of the firmware. This commit also
removes the unnecessary type casting in ChooseFile.

Cc: Siyuan Fu <siyuan.fu@intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Lin <glin@suse.com>
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
7 years agoOvmfPkg: pull in TLS modules with -D TLS_ENABLE (also enabling HTTPS)
Gary Lin [Tue, 17 Jan 2017 04:52:32 +0000 (12:52 +0800)]
OvmfPkg: pull in TLS modules with -D TLS_ENABLE (also enabling HTTPS)

This commit introduces a new build option, TLS_ENABLE, to pull in the
TLS-related modules. If HTTP_BOOT_ENABLE and TLS_ENABLE are enabled at
the same time, the HTTP driver locates the TLS protocols automatically
and thus HTTPS is enabled.

To build OVMF with HTTP Boot:

$ ./build.sh -D HTTP_BOOT_ENABLE

To build OVMF with HTTPS Boot:

$ ./build.sh -D HTTP_BOOT_ENABLE -D TLS_ENABLE

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Justen Jordan L <jordan.l.justen@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Cc: Long Qin <qin.long@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Lin <glin@suse.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
7 years agoOvmfPkg: correct the IScsiDxe module included for the IPv6 stack
Gary Lin [Tue, 17 Jan 2017 04:52:31 +0000 (12:52 +0800)]
OvmfPkg: correct the IScsiDxe module included for the IPv6 stack

Always use IScsiDxe from NetworkPkg when IPv6 is enabled since it provides
the complete ISCSI support.

NOTE: This makes OpenSSL a hard requirement when NETWORK_IP6_ENABLE is
      true.

(Based on Jiaxin's suggestion)

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Justen Jordan L <jordan.l.justen@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Cc: Long Qin <qin.long@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Lin <glin@suse.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
[lersek@redhat.com: update subject line]
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
7 years agoOvmfPkg: always resolve OpenSslLib, IntrinsicLib and BaseCryptLib
Gary Lin [Tue, 17 Jan 2017 04:52:30 +0000 (12:52 +0800)]
OvmfPkg: always resolve OpenSslLib, IntrinsicLib and BaseCryptLib

This commit provides unconditional library resolutions for the OpenSslLib,
IntrinsicLib and BaseCryptLib classes, regardless of whether those classes
are actually used by any module.

Although those libraries depends on OpenSSL, they won't be built unless
a module really uses them. Thus, missing OpenSSL from the tree won't
cause any build failure as long as SECURE_BOOT_ENABLE is false.

(Based on Jiaxin's patch and Laszlo's suggestion)

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Justen Jordan L <jordan.l.justen@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Cc: Long Qin <qin.long@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Lin <glin@suse.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
7 years agoOvmfPkg: Modify QemuFwCfgLib to use new IoLib class library
Leo Duran [Fri, 13 Jan 2017 20:10:00 +0000 (04:10 +0800)]
OvmfPkg: Modify QemuFwCfgLib to use new IoLib class library

The Fifo routines from the QuemuFwCfgLib library have been ported
to the new BaseIoLibIntrinsic (IoLib class) library.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Signed-off-by: Leo Duran <leo.duran@amd.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
7 years agoIntelFrameworkPkg/DxeIoLibCpuIo: Add new Fifo routines in IoLib class
Leo Duran [Fri, 13 Jan 2017 20:09:59 +0000 (04:09 +0800)]
IntelFrameworkPkg/DxeIoLibCpuIo: Add new Fifo routines in IoLib class

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Signed-off-by: Leo Duran <leo.duran@amd.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
7 years agoMdePkg/SmmIoLibSmmCpuIo2: Add new Fifo routines in IoLib class
Leo Duran [Fri, 13 Jan 2017 20:09:58 +0000 (04:09 +0800)]
MdePkg/SmmIoLibSmmCpuIo2: Add new Fifo routines in IoLib class

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: Brijesh Singh <brijesh.singh@amd.com>
Signed-off-by: Leo Duran <leo.duran@amd.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
7 years agoMdePkg/DxeIoLibEsal: Add new Fifo routines in IoLib class
Leo Duran [Fri, 13 Jan 2017 20:09:57 +0000 (04:09 +0800)]
MdePkg/DxeIoLibEsal: Add new Fifo routines in IoLib class

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: Brijesh Singh <brijesh.singh@amd.com>
Signed-off-by: Leo Duran <leo.duran@amd.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
7 years agoMdePkg/PeiIoLibCpuIo: Add new Fifo routines in IoLib class
Leo Duran [Fri, 13 Jan 2017 20:09:56 +0000 (04:09 +0800)]
MdePkg/PeiIoLibCpuIo: Add new Fifo routines in IoLib class

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: Brijesh Singh <brijesh.singh@amd.com>
Signed-off-by: Leo Duran <leo.duran@amd.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
7 years agoMdePkg/DxeIoLibCpuIo2: Add new Fifo routines in IoLib class
Leo Duran [Fri, 13 Jan 2017 20:09:55 +0000 (04:09 +0800)]
MdePkg/DxeIoLibCpuIo2: Add new Fifo routines in IoLib class

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: Brijesh Singh <brijesh.singh@amd.com>
Signed-off-by: Leo Duran <leo.duran@amd.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
7 years agoIntelFrameworkModulePkg: Modify CpuIoDxe to support new IoLib library
Leo Duran [Fri, 13 Jan 2017 20:09:54 +0000 (04:09 +0800)]
IntelFrameworkModulePkg: Modify CpuIoDxe to support new IoLib library

The IO_PROTOCOL supports Fifo types by invoking the Fifo routines in the
new BaseIoLibIntrinsic (IoLib class) library.

Cc: Jeff Fan <jeff.fan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Signed-off-by: Leo Duran <leo.duran@amd.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
7 years agoUefiCpuPkg: Modify CpuIoPei to support new IoLib library
Leo Duran [Fri, 13 Jan 2017 20:09:53 +0000 (04:09 +0800)]
UefiCpuPkg: Modify CpuIoPei to support new IoLib library

The IO_PPI supports Fifo types by invoking the Fifo routines in the
new BaseIoLibIntrinsic (IoLib class) library.

Cc: Jeff Fan <jeff.fan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Signed-off-by: Leo Duran <leo.duran@amd.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
7 years agoUefiCpuPkg: Modify CpuIo2Dxe to use new IoLib library
Leo Duran [Fri, 13 Jan 2017 20:09:52 +0000 (04:09 +0800)]
UefiCpuPkg: Modify CpuIo2Dxe to use new IoLib library

The Fifo routines from the UefiCpuPkg/CpuIo2Dxe driver have been
moved to the new BaseIoLibIntrinsic (IoLib class) library.

Cc: Jeff Fan <jeff.fan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Signed-off-by: Leo Duran <leo.duran@amd.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
7 years agoMdePkg: Expand BaseIoLibIntrinsic (IoLib class) library
Leo Duran [Fri, 13 Jan 2017 20:09:51 +0000 (04:09 +0800)]
MdePkg: Expand BaseIoLibIntrinsic (IoLib class) library

The UefiCpuPkg/CpuIo2Dxe driver and the QemuCfgLib library have duplicate
implementations of I/O Fifo routines. This patch clones the I/O Fifo
routines into the BaseIoLibIntrinsic library and expands the IoLib class
to include the ported I/O Fifo routines.

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: Brijesh Singh <brijesh.singh@amd.com>
Signed-off-by: Leo Duran <leo.duran@amd.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
7 years agoArmVirtPkg/ArmVirtQemu: Install BGRT ACPI table
Bhupesh Sharma [Mon, 16 Jan 2017 15:06:18 +0000 (20:36 +0530)]
ArmVirtPkg/ArmVirtQemu: Install BGRT ACPI table

While debugging OS for ACPI BGRT support (especially on VMs),
it is very useful to have the EFI firmware to export the
ACPI BGRT table.

This patch tries to add this support in ArmVirtPkg.

Cc: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Bhupesh Sharma <bhsharma@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
7 years agoUefiCpuPkg/MpInitLib: Add missing point mark
Jeff Fan [Thu, 5 Jan 2017 01:59:22 +0000 (09:59 +0800)]
UefiCpuPkg/MpInitLib: Add missing point mark

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 agoMdeModulePkg/TerminalDxe: Refine SetTerminalDevicePath
Hao Wu [Thu, 12 Jan 2017 01:45:31 +0000 (09:45 +0800)]
MdeModulePkg/TerminalDxe: Refine SetTerminalDevicePath

Pass '&Node.Header' instead of '&Node' as the 1st parameter to function
SetDevicePathNodeLength().

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
7 years agoMdeModulePkg DxeCorePerformanceLib: Only support linking with DxeCore
Star Zeng [Thu, 12 Jan 2017 08:27:06 +0000 (16:27 +0800)]
MdeModulePkg DxeCorePerformanceLib: Only support linking with DxeCore

DxeCorePerformanceLib is the performance log manager of PEI and DXE
phase, and it will also produce Performance(Ex) protocol, it should
only support linking with DxeCore.

Cc: Liming Gao <liming.gao@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: Liming Gao <liming.gao@intel.com>
7 years agoMdeModulePkg/TerminalDxe: Remove out-of-dated comments
Ruiyu Ni [Fri, 13 Jan 2017 07:35:19 +0000 (15:35 +0800)]
MdeModulePkg/TerminalDxe: Remove out-of-dated comments

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
7 years agoShellPkg/Ifconfig6: Address ASSERT because of a missing NULL check
hegdenag [Thu, 12 Jan 2017 03:39:38 +0000 (11:39 +0800)]
ShellPkg/Ifconfig6: Address ASSERT because of a missing NULL check

When we issue 'ifconfig6 -s <interface> auto' system hangs with
an ASSERT in StrLen. in IfConfig6SetInterfaceInfo, for 'auto' case
we added checks to rule out the invalid inputs like 'host', 'gw'
and 'dns'. To parse through this, we do a VarArg = VarArg->Next but
we dont check new VarArg before calling StrCmp. Fix with a check
in this patch.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Reviewed-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
7 years agoShellPkg/SmbiosView: Add decoding of SMBIOS record type 43
Linson Augustine [Thu, 12 Jan 2017 06:59:36 +0000 (14:59 +0800)]
ShellPkg/SmbiosView: Add decoding of SMBIOS record type 43

Added decoding of the new SMBIOS Type 43 record.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Augustine Linson P <linson.augustine@hpe.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
7 years agoCorebootPayloadPkg: Add APRIORI file in FDF file
Maurice Ma [Tue, 10 Jan 2017 03:36:34 +0000 (19:36 -0800)]
CorebootPayloadPkg: Add APRIORI file in FDF file

Add APRIORI file to allow status code related DXE drivers to
be dispatched earlier so that debug message can also be seen
much earlier. With this, lots of DXE driver debug message will
be missing.

Cc: Prince Agyeman <prince.agyeman@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
Reviewed-by: Prince Agyeman <prince.agyeman@intel.com>
7 years agoMdeModulePkg/NonDiscoverable: Compare SIZE_4GB with address type
Hao Wu [Wed, 11 Jan 2017 01:54:39 +0000 (09:54 +0800)]
MdeModulePkg/NonDiscoverable: Compare SIZE_4GB with address type

Refine the codes to compare the definition 'SIZE_4GB' with type
EFI_PHYSICAL_ADDRESS.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
7 years agoSignedCapsulePkg/CapsuleLib: Refine to compare with same type
Hao Wu [Fri, 6 Jan 2017 08:12:59 +0000 (16:12 +0800)]
SignedCapsulePkg/CapsuleLib: Refine to compare with same type

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 agoSecurityPkg/FmpAuthenticationLib: Refine to compare with same type
Hao Wu [Fri, 6 Jan 2017 08:11:26 +0000 (16:11 +0800)]
SecurityPkg/FmpAuthenticationLib: Refine to compare with same type

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 agoSecurityPkg/TcgDxe: Refine to compare 2 values with the same type
Hao Wu [Fri, 6 Jan 2017 08:10:09 +0000 (16:10 +0800)]
SecurityPkg/TcgDxe: Refine to compare 2 values with the same type

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 agoMdeModulePkg/UefiBootManagerLib: Remove redundant type cast
Hao Wu [Thu, 17 Nov 2016 08:25:32 +0000 (16:25 +0800)]
MdeModulePkg/UefiBootManagerLib: Remove redundant type cast

The type of return value for function EfiBootManagerFindLoadOption() is
INTN. When checking its return value, it is unnecessary to type cast -1 to
type UINTN.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Sunny Wang <sunnywang@hpe.com>
7 years agoMdeModulePkg/Stall: Refine to compare 2 values with the same type
Hao Wu [Fri, 6 Jan 2017 07:18:27 +0000 (15:18 +0800)]
MdeModulePkg/Stall: Refine to compare 2 values with the same type

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
7 years agoFatPkg: Explicitly declare FAT_CLUSTER_SPECIAL as unsigned type
Hao Wu [Thu, 17 Nov 2016 07:57:43 +0000 (15:57 +0800)]
FatPkg: Explicitly declare FAT_CLUSTER_SPECIAL as unsigned type

In FatPkg, cluster-related varibles are declared as unsigned type (e.g.
UINT32/UINTN). To keep the comparisions involving those variables
type-matched, declare the definition FAT_CLUSTER_SPECIAL as unsigned type
explicitly.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
7 years agoMdePkg/UefiFileHandleLib: Refine the check for valid Ascii character
Hao Wu [Thu, 17 Nov 2016 06:59:54 +0000 (14:59 +0800)]
MdePkg/UefiFileHandleLib: Refine the check for valid Ascii character

The commit will check if bit 7 is set of an Ascii character to judge its
validity.

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 agoShellPkg: Update smbiosview command to display Type 3 values
Chris Phillips [Tue, 10 Jan 2017 06:52:40 +0000 (14:52 +0800)]
ShellPkg: Update smbiosview command to display Type 3 values

The smbiosview command was not displaying SMBIOS Type 3 Height, NumberofPowerCords, or SKU Number.
Added handling to display these values.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chris Phillips <chrisp@hpe.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
7 years agoNt32Pkg: Fixes to correctly set SMBIOS Type 3
Chris Phillips [Tue, 10 Jan 2017 06:56:43 +0000 (14:56 +0800)]
Nt32Pkg: Fixes to correctly set SMBIOS Type 3

When running Nt32Pkg, SMBIOS Type 3 was missing Height, NumberofPowerCords, and SKU Number.
Also, ContainedElements was not being handled correctly.
Fixed code to add example data, correct some variable names (Assert -> Asset), and properly handle setting the Type 3 values.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chris Phillips <chrisp@hpe.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
7 years agoNt32Pkg: Fix code to correctly set SMBIOS Type 2 Length
Chris Phillips [Tue, 10 Jan 2017 16:48:45 +0000 (00:48 +0800)]
Nt32Pkg: Fix code to correctly set SMBIOS Type 2 Length

When running Nt32Pkg, SMBIOS Type 2 had the wrong Length.
Fixed the code to use the correct structure in sizeof, and properly account for ContainedObjectHandles.
Also updated variable names with Assert -> Asset

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chris Phillips <chrisp@hpe.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
7 years agoMdePkg: Add comments for SMBIOS Type 3 structure to cover SKU Number
Chris Phillips [Tue, 10 Jan 2017 06:49:08 +0000 (14:49 +0800)]
MdePkg: Add comments for SMBIOS Type 3 structure to cover SKU Number

Starting with SMBIOS spec version 2.7, Type 3 added SKU Number.
SKU Number is at a variable offset (depends on count and length of Contained Elements), so cannot add SKU Number to the SMBIOS_TABLE_TYPE3 structure.
Adding comments to explain how to get SKU Number.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chris Phillips <chrisp@hpe.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
7 years agoMdeModulePkg/DxeCore:Clear RT attribute on SetCapabilities.
Jiewen Yao [Mon, 9 Jan 2017 06:33:20 +0000 (14:33 +0800)]
MdeModulePkg/DxeCore:Clear RT attribute on SetCapabilities.

When gDS->SetMemorySpaceCapabilities() is called,
current DXE core will sync all GCD attributes to memory map
attributes, including RUNTIME attributes.
It is wrong, because RUNTIME attributes should be set for
runtime memory only.

This fix clears the RUNTIME attributes before convert to UEFI
memory map. So that the UEFI memory map is good after
gDS->SetMemorySpaceCapabilities() is called.

Cc: Star Zeng <star.zeng@intel.com>
Cc: Feng Tian <feng.tian@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 agoSecuritPkg: Tcg2Smm: Add PlatformClass to TPM2 Table
Zhang, Chao B [Thu, 12 Jan 2017 02:42:29 +0000 (10:42 +0800)]
SecuritPkg: Tcg2Smm: Add PlatformClass to TPM2 Table

Add PlatformClass info into TPM2 ACPI table, it is only valid with table
Rev 4 and later.

Cc: Star Zeng <star.zeng@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: Star Zeng <star.zeng@intel.com>
Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
7 years agoMdePkg/SmBios.h: Add new defines for SMBIOS record type 43
Linson Augustine [Wed, 11 Jan 2017 09:10:14 +0000 (17:10 +0800)]
MdePkg/SmBios.h: Add new defines for SMBIOS record type 43

Added definitions for the new SMBIOS Type 43 record.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Augustine Linson P <linson.augustine@hpe.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
7 years agoQuarkPlatformPkg/Tpm12DeviceLibAtmelI2c: Fix GCC build issues
Michael Kinney [Tue, 10 Jan 2017 17:41:01 +0000 (09:41 -0800)]
QuarkPlatformPkg/Tpm12DeviceLibAtmelI2c: Fix GCC build issues

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

Fix build issues with GCC49.  There are local variables that
may be used before initialized in some paths.

Cc: Kelly Steele <kelly.steele@intel.com>
Cc: Lee Leahy <leroy.p.leahy@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Lee Leahy <leroy.p.leahy@intel.com>
7 years agoQuarkPlatformPkg/Tpm12DeviceLibAtmelI2c: Fix SubmitCommand() out size
Michael Kinney [Tue, 10 Jan 2017 17:08:52 +0000 (09:08 -0800)]
QuarkPlatformPkg/Tpm12DeviceLibAtmelI2c: Fix SubmitCommand() out size

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

When the Tpm12SubmitCommand() detects a response packet that
is the same size as a TPM_RSP_COMMAND_HDR, it returns
EFI_SUCCESS without reading any additional response packet
information from the TPM.  In that case, the return parameter
OutputParameterBlockSize is not be updated, so the size of
that OutputParameterBlock returned is the value passed in which
could be larger than what is actually returned from the TPM.

Set the OutputParameterBlockSize to the size of the
TPM_RSP_COMMAND_HDR when this specific condition is detected.

Cc: Kelly Steele <kelly.steele@intel.com>
Cc: Lee Leahy <leroy.p.leahy@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Lee Leahy <leroy.p.leahy@intel.com>
7 years agoQuarkPlatformPkg/Tpm12DeviceLibAtmelI2c: Remove PP Check
Michael Kinney [Tue, 10 Jan 2017 17:02:30 +0000 (09:02 -0800)]
QuarkPlatformPkg/Tpm12DeviceLibAtmelI2c: Remove PP Check

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

The Tpm12CommandLib in the SecurityPkg was updated to check
the returnCode in the response packet in the following
commit:

https://github.com/tianocore/edk2/commit/950a3bc788b5b101729b26aed3ff75fd2a64a570

The Tpm12DeviceLibAtmelI2C uses the Tpm12PhysicalPresence()
function from the Tpm12CommandLib to verify that the I2C device
is responding to TPM command packets.  However, at this point
the TPM device has not been started, and the TPM properly
responds with an error in the returnCode field of the response
packet.  Before the commit above, the check worked, but the
additional error checking in the commit above now returns an
error and an Atmel I2C is returned as not present.

The fix is to remove the call to the Tpm12PhysicalPresence()
API in the Tpm12CommandLib from the Tpm12RequestUseTpm() API.
The Atmel I2C TPM device is detected if a byte can be read
from the slave address assigned to the Atmel I2C device.
When the startup command is sent to the TPM later, the
command and response packet processing will be verified, and
if the I2C device is not an Atmel TPM, it will be detected
at that point.

Cc: Kelly Steele <kelly.steele@intel.com>
Cc: Lee Leahy <leroy.p.leahy@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Lee Leahy <leroy.p.leahy@intel.com>
7 years agoShellPkg/Shell: Add double quotes to args with white space
Michael Kinney [Fri, 6 Jan 2017 22:30:44 +0000 (14:30 -0800)]
ShellPkg/Shell: Add double quotes to args with white space

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

When the ShellLib ShellExecute() API or the Shell
Protocol Execute() API are used to execute a
command, the arguments are parsed to produce the
Argc/Argv list in the Shell Parameters Protocol and
double quotes are removed from arguments that are
surrounded by double quotes.  This is the required
behavior of the Shell Parameters Protocol.

The ProcessCommandLine() function in the shell
implementation uses the Argc/Argv list from the
Shell Parameters Protocol to assemble a new command
line, but the double quotes that may have been
originally present for an argument are not preserved.

ProcessCommandLine() is updated to check if an
argument added to the generated command line
contains one or more white space characters, and
if it does, double quotes are added around the
argument.

Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Ruiyu Ni <Ruiyu.ni@intel.com>
7 years agoMdeModulePkg/TerminalDxe: Fix driver model bug
Ruiyu Ni [Tue, 10 Jan 2017 06:04:00 +0000 (14:04 +0800)]
MdeModulePkg/TerminalDxe: Fix driver model bug

TerminalDxe driver contains bugs in its DriverBindingStart():
1. It cannot be started AGAIN using a different terminal type;
2. It doesn't install SimpleTextInput/SimpleTextOut when
   ConIn/ConOut doesn't contain its device path. The check is
   duplicated of the same logic in ConPlatform driver and can
   be removed.

The patch optimized the code to remove the unnecessary
gEfiCallerIdGuid protocol installation.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
7 years agoMdeModulePkg/TerminalDxe: Remove unnecessary NULL pointer check
Ruiyu Ni [Tue, 10 Jan 2017 05:55:22 +0000 (13:55 +0800)]
MdeModulePkg/TerminalDxe: Remove unnecessary NULL pointer check

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
7 years agoMdeModulePkg/TerminalDxe: Separate state machine start/stop logic
Ruiyu Ni [Tue, 10 Jan 2017 05:25:27 +0000 (13:25 +0800)]
MdeModulePkg/TerminalDxe: Separate state machine start/stop logic

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
7 years agoMdeModulePkg/TerminalDxe: Refine SetTerminalDevicePath
Ruiyu Ni [Tue, 10 Jan 2017 05:17:35 +0000 (13:17 +0800)]
MdeModulePkg/TerminalDxe: Refine SetTerminalDevicePath

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
7 years agoMdeModulePkg/TerminalDxe: Refine InitializeTerminalConsoleTextMode
Ruiyu Ni [Tue, 10 Jan 2017 05:11:25 +0000 (13:11 +0800)]
MdeModulePkg/TerminalDxe: Refine InitializeTerminalConsoleTextMode

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
7 years agoMdeModulePkg/TerminalDxe: Separate controller name init logic
Ruiyu Ni [Tue, 10 Jan 2017 05:05:46 +0000 (13:05 +0800)]
MdeModulePkg/TerminalDxe: Separate controller name init logic

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
7 years agoMdeModulePkg/TerminalDxe: Add TerminalTypeFromGuid internal function
Ruiyu Ni [Tue, 10 Jan 2017 03:33:51 +0000 (11:33 +0800)]
MdeModulePkg/TerminalDxe: Add TerminalTypeFromGuid internal function

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>