]> git.proxmox.com Git - mirror_edk2.git/log
mirror_edk2.git
5 years agoBaseTools: AutoGen - refactor out functions only called in __init__
Carsey, Jaben [Fri, 27 Apr 2018 22:32:33 +0000 (06:32 +0800)]
BaseTools: AutoGen - refactor out functions only called in __init__

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: move PCD size calculation functions to PcdClassObject
Carsey, Jaben [Fri, 27 Apr 2018 22:32:32 +0000 (06:32 +0800)]
BaseTools: move PCD size calculation functions to PcdClassObject

move both GetPcdMaxSize and GetPcdSize to the PcdClassObject.
fix MAX_SIZE_TYPE to have int values

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: Workspace - refactor a dict
Carsey, Jaben [Fri, 27 Apr 2018 22:32:31 +0000 (06:32 +0800)]
BaseTools: Workspace - refactor a dict

change a dict to a set since we never examine the contents, just the keys.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: remove Compound statements
Carsey, Jaben [Fri, 27 Apr 2018 22:32:30 +0000 (06:32 +0800)]
BaseTools: remove Compound statements

split them into 2 seperate lines.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: eliminate {} from dictionary contructor call
Carsey, Jaben [Fri, 27 Apr 2018 22:32:29 +0000 (06:32 +0800)]
BaseTools: eliminate {} from dictionary contructor call

no need to construct 2 dictionaries.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: refactor to use list not dict
Carsey, Jaben [Fri, 27 Apr 2018 22:32:28 +0000 (06:32 +0800)]
BaseTools: refactor to use list not dict

since we never access the values in the copied dict, just use a list instead.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: AutoGen - UniClassObject refactor static methods
Carsey, Jaben [Fri, 27 Apr 2018 22:32:27 +0000 (06:32 +0800)]
BaseTools: AutoGen - UniClassObject refactor static methods

change methods which do not use self to @staticmethod
change their calls to use class name instead of instance

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: AutoGen - remove global line
Carsey, Jaben [Fri, 27 Apr 2018 22:32:26 +0000 (06:32 +0800)]
BaseTools: AutoGen - remove global line

this serves no purpose since we dont change the global or assign to it.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: Eot - refactor global data
Carsey, Jaben [Fri, 27 Apr 2018 22:32:25 +0000 (06:32 +0800)]
BaseTools: Eot - refactor global data

remove unused lists, dicts, and duplicate variables

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: Eot - remove unused lists
Carsey, Jaben [Fri, 27 Apr 2018 22:32:24 +0000 (06:32 +0800)]
BaseTools: Eot - remove unused lists

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: AutoGen - refactor class factory
Carsey, Jaben [Fri, 27 Apr 2018 22:32:23 +0000 (06:32 +0800)]
BaseTools: AutoGen - refactor class factory

since instances are not added to cache, the factory does nothing.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: AutoGen - share StripComments API
Carsey, Jaben [Fri, 27 Apr 2018 22:32:22 +0000 (06:32 +0800)]
BaseTools: AutoGen - share StripComments API

add the API root in one class file.
delete the static API out of both classes.
share it in the single location.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: AutoGen - GenVar refactor static methods
Carsey, Jaben [Fri, 27 Apr 2018 22:32:21 +0000 (06:32 +0800)]
BaseTools: AutoGen - GenVar refactor static methods

change methods which do not use self to @staticmethod
change their calls to use class name instead of instance

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: AutoGen - refactor dictionary access
Carsey, Jaben [Fri, 27 Apr 2018 22:32:20 +0000 (06:32 +0800)]
BaseTools: AutoGen - refactor dictionary access

dont use dict.get() inside loops of dictionary contents. its not needed.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: AutoGen - refactor assemble_variable
Carsey, Jaben [Fri, 27 Apr 2018 22:32:19 +0000 (06:32 +0800)]
BaseTools: AutoGen - refactor assemble_variable

make this function @staticmethod since self parameter is not used.
change valuelist to valuedict since it is a dictionary.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: this function has no purpose.
Carsey, Jaben [Fri, 27 Apr 2018 22:32:18 +0000 (06:32 +0800)]
BaseTools: this function has no purpose.

it looks like a old POC of the concepts then used to make the classes
in the file.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: check before accessing members in __eq__
Carsey, Jaben [Fri, 27 Apr 2018 22:32:17 +0000 (06:32 +0800)]
BaseTools: check before accessing members in __eq__

minimize risk for exceptions.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: AutoGen - update to remove duplicate constant value
Carsey, Jaben [Fri, 27 Apr 2018 22:32:16 +0000 (06:32 +0800)]
BaseTools: AutoGen - update to remove duplicate constant value

PCD size by type is shared.  just use it.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: FdfParser - update to remove duplicate constant value
Carsey, Jaben [Fri, 27 Apr 2018 22:32:15 +0000 (06:32 +0800)]
BaseTools: FdfParser - update to remove duplicate constant value

PCD size by type is shared so this change both removes duplication
and makes the function work for all numeric PCD types.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoMdeModulePkg/Terminal: Check status of OpenProtocol in BindingStart
Ruiyu Ni [Fri, 13 Apr 2018 04:13:52 +0000 (12:13 +0800)]
MdeModulePkg/Terminal: Check status of OpenProtocol in BindingStart

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

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Steven Shi <steven.shi@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
5 years agoSecurityPkg/UserProfileManagerDxe: Update RouteConfig function
Thomas Palmer [Wed, 18 Apr 2018 20:33:14 +0000 (04:33 +0800)]
SecurityPkg/UserProfileManagerDxe: Update RouteConfig function

According to UEFI spec, the RouteConfig protocol function should populate
the Progress pointer with an address inside Configuration.  This patch
ensures that these functions are compliant when EFI_NOT_FOUND is returned.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com>
Reviewed-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
5 years agoSecurityPkg/UserIdentifyManagerDxe: Update RouteConfig function
Thomas Palmer [Wed, 18 Apr 2018 20:33:13 +0000 (04:33 +0800)]
SecurityPkg/UserIdentifyManagerDxe: Update RouteConfig function

According to UEFI spec, the RouteConfig protocol function should populate
the Progress pointer with an address inside Configuration.  This patch
ensures that these functions are compliant when EFI_NOT_FOUND is returned.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com>
Reviewed-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
5 years agoSecurityPkg/PwdCredentialProviderDxe: Update RouteConfig function
Thomas Palmer [Wed, 18 Apr 2018 20:33:12 +0000 (04:33 +0800)]
SecurityPkg/PwdCredentialProviderDxe: Update RouteConfig function

According to UEFI spec, the RouteConfig protocol function should populate
the Progress pointer with an address inside Configuration.  This patch
ensures that these functions are compliant when EFI_NOT_FOUND is returned.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com>
Reviewed-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
5 years agoSecurityPkg/Tcg2Config: Update RouteConfig function
Thomas Palmer [Wed, 18 Apr 2018 20:33:11 +0000 (04:33 +0800)]
SecurityPkg/Tcg2Config: Update RouteConfig function

According to UEFI spec, the RouteConfig protocol function should populate
the Progress pointer with an address inside Configuration.  This patch
ensures that these functions are compliant when EFI_NOT_FOUND is returned.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com>
Reviewed-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
5 years agoMdeModulePkg/DriverHealthManagerDxe: Update RouteConfig function
Thomas Palmer [Wed, 18 Apr 2018 20:32:27 +0000 (04:32 +0800)]
MdeModulePkg/DriverHealthManagerDxe: Update RouteConfig function

According to UEFI spec, the RouteConfig protocol function should populate
the Progress pointer with an address inside Configuration.  This patch
ensures that these functions are compliant when EFI_NOT_FOUND is returned.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com>
Reviewed-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
5 years agoMdeModulePkg/RamDiskDxe: Update RouteConfig function
Thomas Palmer [Wed, 18 Apr 2018 20:32:26 +0000 (04:32 +0800)]
MdeModulePkg/RamDiskDxe: Update RouteConfig function

According to UEFI spec, the RouteConfig protocol function should populate
the Progress pointer with an address inside Configuration.  This patch
ensures that these functions are compliant when EFI_NOT_FOUND is returned.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com>
Reviewed-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
5 years agoMdeModulePkg/UiApp: Update RouteConfig function
Thomas Palmer [Wed, 18 Apr 2018 20:32:25 +0000 (04:32 +0800)]
MdeModulePkg/UiApp: Update RouteConfig function

According to UEFI spec, the RouteConfig protocol function should populate
the Progress pointer with an address inside Configuration.  This patch
ensures that these functions are compliant when EFI_NOT_FOUND is returned.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com>
Reviewed-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
5 years agoIntelFrameworkModulePkg/LegacyBootMaintUiLib: Update RouteConfig function
Thomas Palmer [Wed, 18 Apr 2018 20:31:35 +0000 (04:31 +0800)]
IntelFrameworkModulePkg/LegacyBootMaintUiLib: Update RouteConfig function

According to UEFI spec, the RouteConfig protocol function should populate
the Progress pointer with an address inside Configuration.  This patch
ensures that these functions are compliant when EFI_NOT_FOUND is returned.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com>
Reviewed-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
5 years agoMdePkg/DevicePathToText: Fix iSCSI.Lun byte order issue
Ruiyu Ni [Mon, 5 Mar 2018 03:27:34 +0000 (11:27 +0800)]
MdePkg/DevicePathToText: Fix iSCSI.Lun byte order issue

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
5 years agoBaseTools: remove unused MigrationUtilities.py
Carsey, Jaben [Fri, 20 Apr 2018 15:51:46 +0000 (23:51 +0800)]
BaseTools: remove unused MigrationUtilities.py

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: remove redundant if comparison
Carsey, Jaben [Fri, 20 Apr 2018 15:51:42 +0000 (23:51 +0800)]
BaseTools: remove redundant if comparison

inherently python will check string and list for None and having data

if <x> in [None, ''] and similar are superflous.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: replace string with predefined constant
Carsey, Jaben [Thu, 26 Apr 2018 16:57:57 +0000 (00:57 +0800)]
BaseTools: replace string with predefined constant

v2 - add missing namespace.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: Replace Binary File type strings with predefined constant
Carsey, Jaben [Thu, 26 Apr 2018 16:57:56 +0000 (00:57 +0800)]
BaseTools: Replace Binary File type strings with predefined constant

BINARY_FILE_TYPE_FW was 'FW'
BINARY_FILE_TYPE_GUID was 'GUID'
BINARY_FILE_TYPE_PREEFORM was 'PREEFORM'
BINARY_FILE_TYPE_UEFI_APP was 'UEFI_APP'
BINARY_FILE_TYPE_UNI_UI was 'UNI_UI'
BINARY_FILE_TYPE_UNI_VER was 'UNI_VER'
BINARY_FILE_TYPE_LIB was 'LIB'
BINARY_FILE_TYPE_PE32 was 'PE32'
BINARY_FILE_TYPE_PIC was 'PIC'
BINARY_FILE_TYPE_PEI_DEPEX was 'PEI_DEPEX'
BINARY_FILE_TYPE_DXE_DEPEX was 'DXE_DEPEX'
BINARY_FILE_TYPE_SMM_DEPEX was 'SMM_DEPEX'
BINARY_FILE_TYPE_TE was 'TE'
BINARY_FILE_TYPE_VER was 'VER'
BINARY_FILE_TYPE_UI was 'UI'
BINARY_FILE_TYPE_BIN was 'BIN'
BINARY_FILE_TYPE_FV was 'FV'

v2 - split apart FV and GUID types with different meanings.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: Replace PCD type strings with predefined constant
Carsey, Jaben [Thu, 26 Apr 2018 16:57:55 +0000 (00:57 +0800)]
BaseTools: Replace PCD type strings with predefined constant

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: DataType - cleanup list constants
Carsey, Jaben [Fri, 20 Apr 2018 15:51:37 +0000 (23:51 +0800)]
BaseTools: DataType - cleanup list constants

remove unused ones
convert lists used for membership testing to sets
use shared ones not local ones

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: Replace EDK Component strings with predefined constant
Carsey, Jaben [Fri, 27 Apr 2018 14:04:15 +0000 (22:04 +0800)]
BaseTools: Replace EDK Component strings with predefined constant

EDK_COMPONENT_TYPE_LIBRARY was 'LIBRARY'
EDK_COMPONENT_TYPE_SECURITY_CORE was 'SECURITY_CORE'
EDK_COMPONENT_TYPE_COMBINED_PEIM_DRIVER was 'COMBINED_PEIM_DRIVER'
EDK_COMPONENT_TYPE_PIC_PEIM was 'PIC_PEIM'
EDK_COMPONENT_TYPE_RELOCATABLE_PEIM was 'RELOCATABLE_PEIM'
EDK_COMPONENT_TYPE_BS_DRIVER was 'BS_DRIVER'
EDK_COMPONENT_TYPE_RT_DRIVER was 'RT_DRIVER'
EDK_COMPONENT_TYPE_SAL_RT_DRIVER was 'SAL_RT_DRIVER'
EDK_COMPONENT_TYPE_APPLICATION was 'APPLICATION'

v2 - revert 2 files.  will update later in own patches.
v3 - fix v2

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: Share a dictionary instead of keeping multiples
Carsey, Jaben [Fri, 20 Apr 2018 15:51:35 +0000 (23:51 +0800)]
BaseTools: Share a dictionary instead of keeping multiples

Move a dictionary to a shared location and use from there

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: Define and use a set for common list
Carsey, Jaben [Fri, 20 Apr 2018 15:51:34 +0000 (23:51 +0800)]
BaseTools: Define and use a set for common list

share a set for both PEI module types

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: replace string constants used for module types
Carsey, Jaben [Thu, 26 Apr 2018 16:57:53 +0000 (00:57 +0800)]
BaseTools: replace string constants used for module types

replace raw strings in the code (note: except UPT) with constants.
SUP_MODULE_BASE was 'BASE'
SUP_MODULE_SEC was 'SEC'
SUP_MODULE_PEI_CORE was 'PEI_CORE'
SUP_MODULE_PEIM was 'PEIM'
SUP_MODULE_DXE_CORE was 'DXE_CORE'
SUP_MODULE_DXE_DRIVER was 'DXE_DRIVER'
SUP_MODULE_DXE_RUNTIME_DRIVER was 'DXE_RUNTIME_DRIVER'
SUP_MODULE_DXE_SAL_DRIVER was 'DXE_SAL_DRIVER'
SUP_MODULE_DXE_SMM_DRIVER was 'DXE_SMM_DRIVER'
SUP_MODULE_UEFI_DRIVER was 'UEFI_DRIVER'
SUP_MODULE_UEFI_APPLICATION was 'UEFI_APPLICATION'
SUP_MODULE_USER_DEFINED was 'USER_DEFINED'
SUP_MODULE_SMM_CORE was 'SMM_CORE'
SUP_MODULE_MM_STANDALONE was 'MM_STANDALONE'
SUP_MODULE_MM_CORE_STANDALONE was 'MM_CORE_STANDALONE'

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: Workspace/MetaFileParser - refactor dicts
Carsey, Jaben [Fri, 27 Apr 2018 14:04:14 +0000 (22:04 +0800)]
BaseTools: Workspace/MetaFileParser - refactor dicts

make defaultdict to avoid initialize inner items
to empty the dict, call clear instead of making a new object

v2 - to empty the dict, dont re-run constructor, just call .clear()
in post process API also.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: Fix regression bug by 3378782691af
Yunhua Feng [Fri, 27 Apr 2018 01:15:56 +0000 (09:15 +0800)]
BaseTools: Fix regression bug by 3378782691af

Fix regression bug by 3378782691af

Fixes:https://bugzilla.tianocore.org/show_bug.cgi?id=941
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoEmbeddedPkg/Drivers: add virtual keyboard driver
Haojian Zhuang [Thu, 8 Mar 2018 13:28:22 +0000 (21:28 +0800)]
EmbeddedPkg/Drivers: add virtual keyboard driver

This driver is used to simulate a keyboard. For example, user
could read GPIO setting or data from RAM address. If the value
matches the expected pattern, it could trigger a key pressed
event.

User needs to implement hooks of PLATFORM_VIRTUAL_KBD_PROTOCOL.
There're 4 hooks in this protocol.
Register(): Quote the interface that user needs. For example, user
needs to locate GPIO protocol if he wants to simulate a GPIO value
as a key.
Reset(): Do the initialization before reading value.
Query(): Read value. If the value matches the expected pattern,
trigger a key pressed event.
Clear(): Clean the value if necessary.

Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
5 years agoArmPkg: Fix bug in Generic Watchdog driver
AlexeiFedorov [Fri, 27 Apr 2018 13:58:43 +0000 (14:58 +0100)]
ArmPkg: Fix bug in Generic Watchdog driver

In ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.c, the following
functions:

  WatchdogWriteOffsetRegister()
  WatchdogWriteCompareRegister()
  WatchdogEnable()
  WatchdogDisable()

provide write access to ARM Generic Watchdog registers and use the values
returned by MmioWrite32() and MmioWrite64() as EFI_STATUS return codes.

Because MmioWriteXY() return the value passed as its write parameter,
Generic Watchdog access functions can spuriously return error codes which
are different from EFI_SUCCESS, e.g. the following call

    Status = WatchdogWriteOffsetRegister (MAX_UINT32);
    if (EFI_ERROR (Status)) {
      return Status;
    }

will return MAX_UINT32 defined in MdePkg/Include/Base.h as

 #define MAX_UINT32  ((UINT32)0xFFFFFFFF)

This commit declares all the functions listed above as VOID
and removes the code for checking their return values.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Alexei Fedorov <alexei.fedorov@arm.com>
Reviewed-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
5 years agoArmVirtPkg: use protocol-based DevicePathLib instance for most DXE modules
Laszlo Ersek [Mon, 23 Apr 2018 23:36:27 +0000 (01:36 +0200)]
ArmVirtPkg: use protocol-based DevicePathLib instance for most DXE modules

Port OvmfPkg commit 5c3481b0b611e to ArmVirtPkg. Some explanation should
be in order (because 5c3481b0b611e doesn't offer any):

- The UefiDevicePathLibDevicePathProtocol instance uses the Device Path
  Utilities Protocol, produced by DevicePathDxe, for formatting and
  parsing the textual device path representation. This allows for a
  lighter weight lib instance that gets linked into several DXE modules.
  In comparison, the more standalone UefiDevicePathLib instance includes
  the formatting and parsing routines in every client module.

- The DXE core needs DevicePathLib before it dispatches DevicePathDxe, so
  it needs to stick with the standalone instance.

- DevicePathDxe itself also needs the standalone instance, for
  implementing the protocol.

- The DXE-phase PCD driver, "MdeModulePkg/Universal/PCD/Dxe/Pcd.inf",
  depends on DevicePathLib via UefiLib and DxeServicesLib at the least; so
  with this update, it inherits a dependency on the protocol. In reverse,
  DevicePathDxe depends on the PCD Protocol, via PcdLib. The cycle is
  broken by using BasePcdLibNull in DevicePathDxe. That restricts it to
  FixedAtBuild, Patch, and FeatureFlag PCDs, but that's fine.

Example space savings (using ArmVirtQemu and the GCC5 toolchain):
- NOOPT:   187KB in FVMAIN, 12KB in FVMAIN_COMPACT
- DEBUG:   147KB in FVMAIN, 20KB in FVMAIN_COMPACT
- RELEASE: 123KB in FVMAIN, 17KB in FVMAIN_COMPACT

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Julien Grall <julien.grall@linaro.org>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=940
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
5 years agoBaseTools: Fix regression issue by 1eb72acddd61
Yunhua Feng [Fri, 27 Apr 2018 03:21:17 +0000 (11:21 +0800)]
BaseTools: Fix regression issue by 1eb72acddd61

Fix regression issue by 1eb72acddd61
secRe not replace by secReGeneral

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoOvmfPkg/QemuVideoDxe: round up FrameBufferSize to full page
Gerd Hoffmann [Thu, 26 Apr 2018 07:02:07 +0000 (09:02 +0200)]
OvmfPkg/QemuVideoDxe: round up FrameBufferSize to full page

Guests do the same, because the framebuffer is mapped somewhere, which
obviously works with page granularity only.

When not rounding up to full page size we get messages like this one
(linux kernel):

    efifb: framebuffer at 0x80000000, using 1876k, total 1875k
                                            ^^^^^        ^^^^^
Also sysfb is confused and throws an error:

    sysfb: VRAM smaller than advertised

Cc: Phil Dennis-Jordan <phil@philjordan.eu>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
[lersek@redhat.com: fix coding style]

5 years agoCryptoPkg/OpensslLib: remove OpenSSL version number from OpenSSL-HOWTO.txt
Laszlo Ersek [Wed, 25 Apr 2018 17:44:18 +0000 (19:44 +0200)]
CryptoPkg/OpensslLib: remove OpenSSL version number from OpenSSL-HOWTO.txt

Remove any concrete OpenSSL version numbers from "OpenSSL-HOWTO.txt". That
information is out of date and there's no reason for us to refresh it:

We now track stable OpenSSL releases via a git submodule. CryptoPkg
maintainers push such submodule updates to edk2 that identify the correct
stable releases of OpenSSL. "OpenSSL-HOWTO.txt" already provides
instructions to users for updating their local submodules.

Cc: Qin Long <qin.long@intel.com>
Cc: Ting Ye <ting.ye@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Long Qin <qin.long@intel.com>
5 years agoBaseTools: Fix one invalid change in 6be94743
Yunhua Feng [Wed, 25 Apr 2018 00:46:36 +0000 (08:46 +0800)]
BaseTools: Fix one invalid change in 6be94743

Roll back one change in 6be94743, it was updated incorrect.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: CommonClass - remove unused classes
Carsey, Jaben [Fri, 20 Apr 2018 15:51:47 +0000 (23:51 +0800)]
BaseTools: CommonClass - remove unused classes

CommonDataClass/CommonClass has only 1 used class: SkuInfoClass
remove all unused classes

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: AutoGen - use defaultdict to auto initialize
Carsey, Jaben [Fri, 20 Apr 2018 15:51:45 +0000 (23:51 +0800)]
BaseTools: AutoGen - use defaultdict to auto initialize

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: GenFds - simplify testing for Hex number
Carsey, Jaben [Fri, 20 Apr 2018 15:51:44 +0000 (23:51 +0800)]
BaseTools: GenFds - simplify testing for Hex number

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: AutoGen - use dafultdict instead of dict
Carsey, Jaben [Fri, 20 Apr 2018 15:51:43 +0000 (23:51 +0800)]
BaseTools: AutoGen - use dafultdict instead of dict

since we manually make each entry a set(), just use defaultdict(set)

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: remove duplicate variable
Carsey, Jaben [Fri, 20 Apr 2018 15:51:40 +0000 (23:51 +0800)]
BaseTools: remove duplicate variable

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: remove dict from DscBuildData
Carsey, Jaben [Fri, 20 Apr 2018 15:51:32 +0000 (23:51 +0800)]
BaseTools: remove dict from DscBuildData

the dict is not needed as BaseTools can check the set

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: Remove extra .keys()
Carsey, Jaben [Fri, 20 Apr 2018 15:51:30 +0000 (23:51 +0800)]
BaseTools: Remove extra .keys()

Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: AutoGen - remove unused variables.
Carsey, Jaben [Fri, 20 Apr 2018 15:51:29 +0000 (23:51 +0800)]
BaseTools: AutoGen - remove unused variables.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: AutoGen - remove dictionary populated, but never accessed
Carsey, Jaben [Fri, 20 Apr 2018 15:51:28 +0000 (23:51 +0800)]
BaseTools: AutoGen - remove dictionary populated, but never accessed

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: Workspace - refactor GetStructurePcdInfo
Carsey, Jaben [Fri, 20 Apr 2018 15:51:27 +0000 (23:51 +0800)]
BaseTools: Workspace - refactor GetStructurePcdInfo

the function doesn't use self and can be static
defaultdict replaces dict and removes the dict initialization code

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: simplify if call
Carsey, Jaben [Fri, 20 Apr 2018 15:51:26 +0000 (23:51 +0800)]
BaseTools: simplify if call

the variable is a string type since we just used .strip() on it.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: Autogen - replace string constants with those from DataType
Carsey, Jaben [Fri, 20 Apr 2018 15:51:25 +0000 (23:51 +0800)]
BaseTools: Autogen - replace string constants with those from DataType

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: Workspace - refactor RegEx to minimize multiple compiling
Carsey, Jaben [Fri, 20 Apr 2018 15:51:24 +0000 (23:51 +0800)]
BaseTools: Workspace - refactor RegEx to minimize multiple compiling

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoArmVirtPkg: reinstate timer unmask quirk for Xen
Ard Biesheuvel [Mon, 23 Apr 2018 14:55:18 +0000 (16:55 +0200)]
ArmVirtPkg: reinstate timer unmask quirk for Xen

Commit 411a373ed642 ("ArmPkg/TimerDxe: remove workaround for KVM timer
handling") removed the virtual timer handling quirk that cleared the
mask bit in the control register when enabling the timer, under the
assumption that only ancient KVM host implementations required it.
However, Julien reports that Xen also masks the timer interrupt in the
guest view of the timer control register, and therefore needs the same
quirk.

So let's reinstate it, but using a Xen specific implementation of the
timer support library, so that other virt platforms remain unchanged.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Julien Grall <julien.grall@arm.com>
Acked-by: Julien Grall <julien.grall@arm.com>
5 years agoArmPkg: add reenable hook to ArmGenericTimerCounterLib
Ard Biesheuvel [Mon, 23 Apr 2018 14:47:18 +0000 (16:47 +0200)]
ArmPkg: add reenable hook to ArmGenericTimerCounterLib

In preparation of selectively reinstating the timer enable quirk for Xen
that we removed in commit 411a373ed642 ("ArmPkg/TimerDxe: remove workaround
for KVM timer handling"), add a ArmGenericTimerReenableTimer() library
function to ArmGenericTimerCounterLib that we will populate for Xen only.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Julien Grall <julien.grall@arm.com>
Acked-by: Julien Grall <julien.grall@arm.com>
5 years agoBaseTools: Share RegEx between files
Carsey, Jaben [Fri, 20 Apr 2018 15:51:23 +0000 (23:51 +0800)]
BaseTools: Share RegEx between files

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: GenPatchPcdTable - refactor RegEx to minimize multiple compiling
Carsey, Jaben [Fri, 20 Apr 2018 15:51:22 +0000 (23:51 +0800)]
BaseTools: GenPatchPcdTable - refactor RegEx to minimize multiple compiling

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
5 years agoBaseTools: Misc - refactor RegEx to minimize multiple compiling
Carsey, Jaben [Fri, 20 Apr 2018 15:51:21 +0000 (23:51 +0800)]
BaseTools: Misc - refactor RegEx to minimize multiple compiling

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
6 years agoSignedCapsulePkg SystemFirmwareUpdate: Fix typo EFI_SECURITY_VIOLATIO
Star Zeng [Tue, 3 Apr 2018 09:35:06 +0000 (17:35 +0800)]
SignedCapsulePkg SystemFirmwareUpdate: Fix typo EFI_SECURITY_VIOLATIO

Fix typo EFI_SECURITY_VIOLATIO to EFI_SECURITY_VIOLATION.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
6 years agoIntelSiliconPkg MicrocodeUpdate: Fix typo EFI_SECURITY_VIOLATIO
Star Zeng [Tue, 3 Apr 2018 09:33:05 +0000 (17:33 +0800)]
IntelSiliconPkg MicrocodeUpdate: Fix typo EFI_SECURITY_VIOLATIO

Fix typo EFI_SECURITY_VIOLATIO to EFI_SECURITY_VIOLATION.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
6 years agoMdePkg FirmwareManagement.h: Fix typo EFI_SECURITY_VIOLATIO
Star Zeng [Mon, 2 Apr 2018 07:39:04 +0000 (15:39 +0800)]
MdePkg FirmwareManagement.h: Fix typo EFI_SECURITY_VIOLATIO

Fix typo EFI_SECURITY_VIOLATIO to EFI_SECURITY_VIOLATION.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
6 years agoMdeModulePkg NvmExpressDxe: return error code in error path
Star Zeng [Mon, 23 Apr 2018 08:13:23 +0000 (16:13 +0800)]
MdeModulePkg NvmExpressDxe: return error code in error path

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

In NvmeExpressPassthru.c near line 659:
    Prp = NvmeCreatePrpList (
            PciIo,
            PhyAddr,
            EFI_SIZE_TO_PAGES(Offset + Bytes) - 1,
            &PrpListHost,
            &PrpListNo,
            &MapPrpList
            );
    if (Prp == NULL) {
      goto EXIT;
    }
Status is not set to an error code - Status is initialized to
EFI_SUCCESS, or set by a PciIo->Map to EFI_SUCCESS above this
code. This error path should set Status to an error code before
goto EXIT.

Change-Id: I8a5cdf981aa609534c205d3676395805ac60a003
Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Michael Turner <Michael.Turner@microsoft.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
6 years agoMdeModulePkg EsrtFmpDxe: Use EfiBootServicesData for ESRT table
Star Zeng [Fri, 20 Apr 2018 07:13:32 +0000 (15:13 +0800)]
MdeModulePkg EsrtFmpDxe: Use EfiBootServicesData for ESRT table

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

We see UEFI spec is saying to use EfiBootServicesData for ESRT table.

UEFI 2.7 chapter 23.3:
The ESRT shall be stored in memory of type EfiBootServicesData.

And we see EsrtDxe is using AllocatePool for ESRT table, but
EsrtFmpDxe is using AllocateRuntimeZeroPool for ESRT table.

This patch updates code to use EfiBootServicesData for ESRT table
in EsrtFmpDxe.

Change-Id: I72a73e0cc0a37e429cc262d68eb284fb268cb5ef
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
6 years agoUefiCpuPkg MpInitLib: Fix typo "sCPUID" to "CPUID"
Star Zeng [Mon, 9 Apr 2018 02:10:40 +0000 (10:10 +0800)]
UefiCpuPkg MpInitLib: Fix typo "sCPUID" to "CPUID"

Cc: Eric Dong <eric.dong@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
6 years agoOvmfPkg/README: add HTTPS Boot
Gary Lin [Tue, 24 Apr 2018 08:35:44 +0000 (16:35 +0800)]
OvmfPkg/README: add HTTPS Boot

Add the new section for HTTPS Boot.

Changes in v2:
  - Fixed the typos
  - Added the command for p11-kit based on Laszlo's suggestion
  - Also added the efisiglist command
  - Elaborated how to create the customized cipher suite list
  - Mentioned the changes in QEMU in the future based on Laszlo's
    suggestion

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Gary Lin <glin@suse.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
[lersek@redhat.com: trivial typo fixes; update-crypto-policies URL fix]

6 years agoMaintainers.txt: add Laszlo Ersek to stewards
Leif Lindholm [Fri, 13 Apr 2018 19:18:28 +0000 (20:18 +0100)]
Maintainers.txt: add Laszlo Ersek to stewards

Cc: Andrew Fish <afish@apple.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Andrew J. Fish <afish@apple.com>
6 years agoArmPkg: Introduce SCMI protocol
Girish Pathak [Mon, 15 Jan 2018 14:53:26 +0000 (14:53 +0000)]
ArmPkg: Introduce SCMI protocol

This change introduces a new SCMI protocol driver for
Arm systems. The driver currently supports only clock
and performance management protocols. Other protocols
will be added as and when needed.

Clock management protocol is used to configure various clocks
available on the platform e.g. HDLCD clock on the Juno platforms.

Whereas performance management protocol allows adjustment
of various performance domains. Currently this is used to evaluate
performance of the Juno platform.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Girish Pathak <girish.pathak@arm.com>
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
6 years agoArmPkg: MTL Library interface and Null library implementation
Girish Pathak [Mon, 15 Jan 2018 14:41:51 +0000 (14:41 +0000)]
ArmPkg: MTL Library interface and Null library implementation

Upcoming new component ArmPkg/Drivers/ArmScmiDxe is dependent on
platform specific ArmMtlLib library implementation, however in order
to be able to build the ArmScmiDxe component outside of the context of a
particular platform, this change adds Null implementation of the
ArmMtlLib along with ARM MTL library header.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Girish Pathak <girish.pathak@arm.com>
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
6 years agoArmPlatformPkg: New DP500/DP550/DP650 GOP driver
Girish Pathak [Tue, 26 Sep 2017 20:15:29 +0000 (21:15 +0100)]
ArmPlatformPkg: New DP500/DP550/DP650 GOP driver

This change adds support for the ARM Mali DP500/DP500/DP650 display
processors using the GOP protocol. It has been tested on FVP base
models + DP550 support. This change adds platform independant LcdHwLib
library. A corresponding platform specific library will be submitted
to edk-platforms/Platform/ARM/VExpressPkg.

This change does not modify functionality provided by PL111 or
HDLCD. This LcdHwLib implementation should be suitable for those
platforms that implement ARM Mali DP500/DP550/DP650 replacing
PL111/HDLCD.

Only graphics layer of the ARM Mali DP is configured for rendering
the RGB/BGR format frame buffer to satisfy the UEFI GOP requirements
Other layers e.g. video layers are not configured.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Girish Pathak <girish.pathak@arm.com>
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
6 years agoArmPlatformPkg: Reserving framebuffer at build
Girish Pathak [Tue, 26 Sep 2017 20:15:28 +0000 (21:15 +0100)]
ArmPlatformPkg: Reserving framebuffer at build

Currently framebuffer memory is either reserved in special VRAM or
dynamically allocated using boot services memory allocation functions.
When allocated using boot services calls the memory has to be allocated
as EfiBootServicesData. Unfortunately failures have been seen with this
case.  There is also an unfortunate lack of control on the placement of
the framebuffer.

This change introduces two PCDs, PcdArmLcdFrameBufferBase and
PcdArmLcdFrameBufferSize which enable build time reservation of the
framebuffer, avoiding the need to allocate dynamically. This allows
the framebuffer to appear as "I/O memory" outside of the normal RAM
map, which is similar to the "VRAM" case.

This change has no impact on current code, only enables the option
of build time reservation of framebuffers.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Girish Pathak <girish.pathak@arm.com>
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
6 years agoArmPlatformPkg: Additional display modes
Girish Pathak [Tue, 26 Sep 2017 20:15:27 +0000 (21:15 +0100)]
ArmPlatformPkg: Additional display modes

Add definitions for new display modes such as HD 720.
This has no effect on existing display drivers.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Girish Pathak <girish.pathak@arm.com>
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
6 years agoArmPlatformPkg: PCD to swap red/blue format for HDLCD
Girish Pathak [Tue, 26 Sep 2017 20:15:25 +0000 (21:15 +0100)]
ArmPlatformPkg: PCD to swap red/blue format for HDLCD

This change adds a new PCD PcdArmHdlcdSwapBlueRedSelect
to swap values for HDLCD RED_SELECT and BLUE_SELECT registers
on platforms where blue and red hardware lines are swapped.

If set to TRUE in the platform dsc, HDLCD library will swap the values
while setting RED_SELECT and BLUE_SELECT registers. The default
value of the PCD is FALSE.

NOTE: The motive for this is that a discrepancy in the Red/Blue lines
exists between some VersatileExpress platforms.  Rather than have
divergent code, this build switch allows a simple, pragmatic solution.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Girish Pathak <girish.pathak@arm.com>
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
6 years agoArmPlatformPkg: Add PCD to select pixel format
Girish Pathak [Tue, 26 Sep 2017 20:15:24 +0000 (21:15 +0100)]
ArmPlatformPkg: Add PCD to select pixel format

Current HDLCD and PL111 platform libraries do not support display modes
with PixelBlueGreenRedReserved8BitPerColor format, i.e. because of
historical confusion, they do not support the UEFI default
PixelBlueGreenRedReserved8BitPerColor format

In LcdPlatformLib for PL111, LcdPlatformQueryMode returns the pixel
format as PixelRedGreenBlueReserved8BitPerColor which is wrong, because
that does not match the display controller's pixel format which is set
to BGR in PL111Lcd LcdHwLib.

Also it is not possible to configure pixel format as RGB/BGR for the
display modes for a platform at build time.

This change adds PcdGopPixelFormat to configure pixel format as
    PixelRedGreenBlueReserved8BitPerColor    or
    PixelBlueGreenRedReserved8BitPerColor    or
    PixelBitMask.
With this change, pixel format can be selected in the platform specific
.dsc file for all supported display modes.

Support for PixelBitMask is not implemented in PL111 or HDLCD LcdHwLib
libraries, hence  HDLCD and PL111 platform libraries will return error
EFI_UNSUPPORTED if PcdGopPixelFormat is set to PixelBitMask.  Indeed,
it is not clear what selecting PixelBitMask might mean, but the option
is allowed as it might suit a custom platform.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Girish Pathak <girish.pathak@arm.com>
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
6 years agoArmPlatformPkg: Redefine LcdPlatformGetTimings function
Girish Pathak [Tue, 26 Sep 2017 20:15:22 +0000 (21:15 +0100)]
ArmPlatformPkg: Redefine LcdPlatformGetTimings function

The LcdPlatformGetTimings interface function takes similar sets of
multiple parameters for horizontal and vertical timings which can be
aggregated in a common data type. This change defines a structure
SCAN_TIMINGS for this which can be used to describe both horizontal and
vertical scan timings, and accordingly redefines the
LcdPlatformGetTiming interface, greatly reducing the amount of data
passed about.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Girish Pathak <girish.pathak@arm.com>
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
6 years agoArmPlatformPkg: Implement LcdIdentify function for HDLCD GOP
Girish Pathak [Tue, 26 Sep 2017 20:15:21 +0000 (21:15 +0100)]
ArmPlatformPkg: Implement LcdIdentify function for HDLCD GOP

LcdIdentify function does not currently check presence of HDLCD
controller.

Implement this functionality by reading HDLCD_REG_VERSION and checking
against the PRODUCT_ID field to detect presence of HDLCD controller.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Girish Pathak <girish.pathak@arm.com>
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
6 years agoArmPlatformPkg: PL111Lcd: Combine two writes to LCDControl
Girish Pathak [Wed, 14 Feb 2018 11:52:46 +0000 (11:52 +0000)]
ArmPlatformPkg: PL111Lcd: Combine two writes to LCDControl

Currenty bit LcdPwr of the LCDControl register is enabled immediately
after setting other bits of the LCDControl register. This two write
sequence is unnecessary. This change removes this extra write by setting
LcdPwr bit along with other bits of the LcdControl register.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Girish Pathak <girish.pathak@arm.com>
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
6 years agoArmPlatformPkg: PL111Lcd: Replace magic number with macro
Girish Pathak [Tue, 26 Sep 2017 20:15:16 +0000 (21:15 +0100)]
ArmPlatformPkg: PL111Lcd: Replace magic number with macro

Minor code change, replaces magic number with macro in LCD disable.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Girish Pathak <girish.pathak@arm.com>
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
6 years agoArmPlatformPkg: HDLCD and PL111: Update debug ASSERTS
Girish Pathak [Tue, 26 Sep 2017 20:15:14 +0000 (21:15 +0100)]
ArmPlatformPkg: HDLCD and PL111: Update debug ASSERTS

This change moves some ASSERTs in error handling code
to improve efficiency in DEBUG build. This change also
removes redundant error code returns.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Girish Pathak <girish.pathak@arm.com>
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
6 years agoArmPlatformPkg: Tidy Lcd code: Updated comments
Girish Pathak [Tue, 26 Sep 2017 20:15:12 +0000 (21:15 +0100)]
ArmPlatformPkg: Tidy Lcd code: Updated comments

There is no functional modification in this change
some comments are modified and a few new comments are added.
This is to prevent mixing formatting changes with functional
changes.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Girish Pathak <girish.pathak@arm.com>
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
6 years agoArmPlatformPkg: Tidy Lcd code: Coding standard
Girish Pathak [Tue, 26 Sep 2017 20:15:11 +0000 (21:15 +0100)]
ArmPlatformPkg: Tidy Lcd code: Coding standard

There is no functional modification in this change
As preparation for further work, the formatting is corrected to meet
the EDKII coding standard.
Of specific note, some invalid include guards were fixed.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Girish Pathak <girish.pathak@arm.com>
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
6 years agoArmPlatformPkg: Rectify line endings of LcdPlatformNullLib
Girish Pathak [Mon, 15 Jan 2018 17:45:49 +0000 (17:45 +0000)]
ArmPlatformPkg: Rectify line endings of LcdPlatformNullLib

This fix changes line endings of LcdPlatformNullLib.c to DOS
style line endings from UNIX style line endings to meet the EDK2
coding standard.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Girish Pathak <girish.pathak@arm.com>
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
6 years agoArmPlatformPkg: Rectify line endings of LcdHwNullLib
Girish Pathak [Mon, 15 Jan 2018 18:13:10 +0000 (18:13 +0000)]
ArmPlatformPkg: Rectify line endings of LcdHwNullLib

This fix changes line endings of LcdHwNullLib.c to DOS
style line endings from UNIX style line endings to meet the
EDK2 coding standard. Note it also fixes an end of line
whitespace.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Girish Pathak <girish.pathak@arm.com>
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
6 years agoShellPkg: Add acpiview tool to dump ACPI tables
Ruiyu Ni [Fri, 20 Apr 2018 08:08:22 +0000 (16:08 +0800)]
ShellPkg: Add acpiview tool to dump ACPI tables

This program is provided to allow examination of ACPI table contents
from the UEFI Shell.  This can help with investigations, especially at
that stage where the tables are not enabling an OS to boot.
The program is not exhaustive, and only encapsulates detailed knowledge
of a limited number of table types.

Default behaviour is to display the content of all tables installed.
'Known' table types will be parsed and displayed with descriptions and
field values.  Where appropriate a degree of consistency checking is
done and errors may be reported in the output.
Other table types will be displayed as an array of Hexadecimal bytes.

To facilitate debugging, the -s and -d options can be used to generate a
binary file image of a table that can be copied elsewhere for
investigation using tools such as those provided by acpica.org.  This is
especially relevant for AML type tables like DSDT and SSDT.

The inspiration for this is the existing smbiosview Debug1 Shell
command.

Many tables are not explicitly handled, in part because no examples are
available for our testing.

The program is designed to be extended to new tables with minimal
effort, and contributions are invited.

Change-Id: Ifa23dc80ab8ab042c56e88424847e796a8122a7c
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
6 years agoMdeModulePkg/UefiBootManagerLib: fix AddLoadOptionVariable docs/prototype
Ruiyu Ni [Fri, 20 Apr 2018 08:21:32 +0000 (16:21 +0800)]
MdeModulePkg/UefiBootManagerLib: fix AddLoadOptionVariable docs/prototype

Clean up the leading comment and the prototype of
EfiBootManagerAddLoadOptionVariable():

- the function may modify Option on output, annotate the parameter with
  OUT and update the documentation;

- "@retval EFI_STATUS" and "@retval Others" are not idiomatic
  documentation, use @return instead;

- sync comment and prototype between lib instance and lib class header.

Change-Id: I8a609d6502b6f8929b2f568acaa147065003b6f4
Cc: Eric Dong <eric.dong@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
6 years agoBaseTools: replace 'UINT8','UINT16','UINT32','UINT64','VOID*' with shared constants.
Carsey, Jaben [Wed, 11 Apr 2018 16:14:05 +0000 (09:14 -0700)]
BaseTools: replace 'UINT8','UINT16','UINT32','UINT64','VOID*' with shared constants.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
6 years agoBaseTools: remove un-needed use of .keys() on dictionaries
Carsey, Jaben [Thu, 12 Apr 2018 23:53:53 +0000 (16:53 -0700)]
BaseTools: remove un-needed use of .keys() on dictionaries

sometimes just delete it.
sometimes the loop needed .values() instead

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
6 years agoBaseTools: remove PlatformClass as it's not used
Carsey, Jaben [Thu, 19 Apr 2018 15:12:45 +0000 (23:12 +0800)]
BaseTools: remove PlatformClass as it's not used

v2 - update makefile too.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
6 years agoBaseTools: remove EdkIIWorkspace as its not used.
Carsey, Jaben [Thu, 19 Apr 2018 15:12:44 +0000 (23:12 +0800)]
BaseTools: remove EdkIIWorkspace as its not used.

v2 - update makefile too.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
6 years agoSecurityPkg FmpAuthenticationLibRsa2048Sha256: Remove PCD reference
Star Zeng [Mon, 16 Apr 2018 08:39:28 +0000 (16:39 +0800)]
SecurityPkg FmpAuthenticationLibRsa2048Sha256: Remove PCD reference

PcdRsa2048Sha256PublicKeyBuffer is referenced but not used in the
library, that makes me a little confusing.
Actually, the PublicKeyData should be from the caller of
AuthenticateFmpImage() as input parameter, for example
EdkiiSystemCapsuleLib.

This patch is to remove the PCD reference in this library instance
to be aligned with FmpAuthenticationLibPkcs7 that does not reference
PcdPkcs7CertBuffer.

Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
6 years agoMdeModulePkg DxeCapsuleLibFmp: Fix wrong Index is used
Star Zeng [Fri, 13 Apr 2018 06:32:11 +0000 (14:32 +0800)]
MdeModulePkg DxeCapsuleLibFmp: Fix wrong Index is used

DEBUG((
  DEBUG_ERROR,
  "ItemOffsetList[%d](0x%lx) < ItemOffsetList[%d](0x%x)\n",
  Index,
  ItemOffsetList[Index],
  Index,                       // Should be Index - 1
  ItemOffsetList[Index - 1]
  ));

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
6 years agoNt32Pkg/NtGopInput: ReadKeyStrokeEx always return key state
Ruiyu Ni [Thu, 19 Apr 2018 10:41:25 +0000 (18:41 +0800)]
Nt32Pkg/NtGopInput: ReadKeyStrokeEx always return key state

Today's implementation only return key state when there is key.
But when user doesn't press any key, the key state cannot be
returned.

The patch changes the ReadKeyStrokeEx() to always return the
key state even there is no key pressed.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
6 years agoArmPkg/TimerDxe: remove workaround for KVM timer handling
Ard Biesheuvel [Thu, 15 Mar 2018 10:13:01 +0000 (10:13 +0000)]
ArmPkg/TimerDxe: remove workaround for KVM timer handling

When we first ported EDK2 to KVM/arm, we implemented a workaround for
the quirky timer handling on the KVM side. This has been fixed in
Linux commit f120cd6533d2 ("KVM: arm/arm64: timer: Allow the timer to
control the active state") dated 23 June 2014, which was incorporated
into Linux release 4.3.

So almost 4 years later, it should be safe to drop this workaround on
the EDK2 side.

This reverts commit b1a633434ddc.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>