Date   

Re: [PATCH] BaseTools: List missing source python files for Ecc tool in Makefile

Zhu, Yonghong <yonghong.zhu@...>
 

Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>

Best Regards,
Zhu Yonghong

-----Original Message-----
From: Wu, Hao A
Sent: Tuesday, September 27, 2016 10:45 AM
To: edk2-devel@lists.01.org
Cc: Wu, Hao A <hao.a.wu@intel.com>; Zhu, Yonghong <yonghong.zhu@intel.com>; Gao, Liming <liming.gao@intel.com>
Subject: [PATCH] BaseTools: List missing source python files for Ecc tool in Makefile

Add missing python sources files that are dependent for Ecc tool in Makefile.

Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
BaseTools/Source/Python/Makefile | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

diff --git a/BaseTools/Source/Python/Makefile b/BaseTools/Source/Python/Makefile
index e7755cd..7ffe211 100644
--- a/BaseTools/Source/Python/Makefile
+++ b/BaseTools/Source/Python/Makefile
@@ -237,6 +237,26 @@ CMD_UPT=$(BASE_TOOLS_PATH)\Source\Python\UPT\Core\DependencyRules.py \
$(BASE_TOOLS_PATH)\Source\Python\UPT\Xml\XmlParser.py \
$(BASE_TOOLS_PATH)\Source\Python\UPT\Xml\XmlParserMisc.py

+CMD_ECC=$(BASE_TOOLS_PATH)\Source\Python\Ecc\c.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\Check.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\CLexer.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\CodeFragment.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\CodeFragmentCollector.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\Configuration.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\CParser.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\Database.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\Ecc.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\EccGlobalData.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\EccToolError.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\Exception.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\FileProfile.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\MetaDataParser.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\ParserWarning.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\MetaFileWorkspace\MetaDataTable.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\MetaFileWorkspace\MetaFileParser.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\MetaFileWorkspace\MetaFileTable.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\Xml\XmlRoutines.py
+
!IFDEF PYTHON_FREEZER_PATH
all: SetPythonPath $(APPLICATIONS)
!ELSE
--
1.9.5.msysgit.0


Re: [Patch] BaseTools: Add some posixlike files for Linux

Liming Gao
 

Yonghong:
This is my mistake. I use the wrong way to apply for this patch. With the correct way, those patches can work well.

Reviewed-by: Liming Gao <liming.gao@intel.com>

Thanks
Liming

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
Gao, Liming
Sent: Monday, September 26, 2016 10:00 AM
To: Zhu, Yonghong <yonghong.zhu@intel.com>; edk2-devel@lists.01.org
Subject: Re: [edk2] [Patch] BaseTools: Add some posixlike files for Linux

Yonghong:
I apply this patch and run them in Linux. They doesn't work. Could you help
try it?

Thanks
Liming
-----Original Message-----
From: Zhu, Yonghong
Sent: Sunday, September 25, 2016 10:50 AM
To: edk2-devel@lists.01.org
Cc: Gao, Liming <liming.gao@intel.com>
Subject: [Patch] BaseTools: Add some posixlike files for Linux

Add the posixlike files for Rsa2048Sha256Sign,
Rsa2048Sha256GenerateKeys
and Pkcs7Sign.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
---
BaseTools/BinWrappers/PosixLike/Pkcs7Sign | 14
++++++++++++++
BaseTools/BinWrappers/PosixLike/Rsa2048Sha256GenerateKeys | 14
++++++++++++++
BaseTools/BinWrappers/PosixLike/Rsa2048Sha256Sign | 14
++++++++++++++
3 files changed, 42 insertions(+)
create mode 100755 BaseTools/BinWrappers/PosixLike/Pkcs7Sign
create mode 100755
BaseTools/BinWrappers/PosixLike/Rsa2048Sha256GenerateKeys
create mode 100755
BaseTools/BinWrappers/PosixLike/Rsa2048Sha256Sign

diff --git a/BaseTools/BinWrappers/PosixLike/Pkcs7Sign
b/BaseTools/BinWrappers/PosixLike/Pkcs7Sign
new file mode 100755
index 0000000..214d88f
--- /dev/null
+++ b/BaseTools/BinWrappers/PosixLike/Pkcs7Sign
@@ -0,0 +1,14 @@
+#!/usr/bin/env bash
+#python `dirname $0`/RunToolFromSource.py `basename $0` $*
+
+# If a python2 command is available, use it in preference to python
+if command -v python2 >/dev/null 2>&1; then
+ python_exe=python2
+fi
+
+full_cmd=${BASH_SOURCE:-$0} # see
http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not
a
good choice here
+dir=$(dirname "$full_cmd")
+cmd=${full_cmd##*/}
+
+export PYTHONPATH="$dir/../../Source/Python"
+exec "${python_exe:-python}" "$dir/../../Source/Python/$cmd/$cmd.py"
"$@"
diff --git a/BaseTools/BinWrappers/PosixLike/Rsa2048Sha256GenerateKeys
b/BaseTools/BinWrappers/PosixLike/Rsa2048Sha256GenerateKeys
new file mode 100755
index 0000000..2cddde9
--- /dev/null
+++ b/BaseTools/BinWrappers/PosixLike/Rsa2048Sha256GenerateKeys
@@ -0,0 +1,14 @@
+#!/usr/bin/env bash
+#python `dirname $0`/RunToolFromSource.py `basename $0` $*
+
+# If a python2 command is available, use it in preference to python
+if command -v python2 >/dev/null 2>&1; then
+ python_exe=python2
+fi
+
+full_cmd=${BASH_SOURCE:-$0} # see
http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not
a
good choice here
+dir=$(dirname "$full_cmd")
+cmd=${full_cmd##*/}
+
+export PYTHONPATH="$dir/../../Source/Python"
+exec "${python_exe:-python}"
"$dir/../../Source/Python/Rsa2048Sha256Sign/$cmd.py" "$@"
diff --git a/BaseTools/BinWrappers/PosixLike/Rsa2048Sha256Sign
b/BaseTools/BinWrappers/PosixLike/Rsa2048Sha256Sign
new file mode 100755
index 0000000..214d88f
--- /dev/null
+++ b/BaseTools/BinWrappers/PosixLike/Rsa2048Sha256Sign
@@ -0,0 +1,14 @@
+#!/usr/bin/env bash
+#python `dirname $0`/RunToolFromSource.py `basename $0` $*
+
+# If a python2 command is available, use it in preference to python
+if command -v python2 >/dev/null 2>&1; then
+ python_exe=python2
+fi
+
+full_cmd=${BASH_SOURCE:-$0} # see
http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not
a
good choice here
+dir=$(dirname "$full_cmd")
+cmd=${full_cmd##*/}
+
+export PYTHONPATH="$dir/../../Source/Python"
+exec "${python_exe:-python}" "$dir/../../Source/Python/$cmd/$cmd.py"
"$@"
--
2.6.1.windows.1
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [PATCH] SecurityPkg: Tcg2: Fix TCG2 PP issues

Long, Qin <qin.long@...>
 

Reviewed-by: Qin Long <qin.long@intel.com>

-----Original Message-----
From: Zhang, Chao B
Sent: Tuesday, September 27, 2016 9:53 AM
To: edk2-devel@lists.01.org
Cc: Yao, Jiewen; Long, Qin; Zhang, Chao B
Subject: [PATCH] SecurityPkg: Tcg2: Fix TCG2 PP issues

Several issues exist in TCG2 PP
1. TCG2 PP use NVS PPRQ/PPRM as PP parameter as well as current PP state
cache. But it doesn't handle PP set failure case 2. TCG2 PP Submit TPM
Operation Request to Pre-OS Environment forgets to clean PPRM 3. Potential
alignment issue

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
---
.../Include/Library/Tcg2PhysicalPresenceLib.h | 24 +++++-
.../SmmTcg2PhysicalPresenceLib.c | 99 +++++++++++++++++-----
SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c | 14 ++-
SecurityPkg/Tcg/Tcg2Smm/Tpm.asl | 1 +
4 files changed, 111 insertions(+), 27 deletions(-)

diff --git a/SecurityPkg/Include/Library/Tcg2PhysicalPresenceLib.h
b/SecurityPkg/Include/Library/Tcg2PhysicalPresenceLib.h
index ce45f17..1bee13a 100644
--- a/SecurityPkg/Include/Library/Tcg2PhysicalPresenceLib.h
+++ b/SecurityPkg/Include/Library/Tcg2PhysicalPresenceLib.h
@@ -2,7 +2,7 @@
Ihis library is intended to be used by BDS modules.
This library will execute TPM2 request.

-Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made
available under the terms and conditions of the BSD License which
accompanies this distribution. The full text of the license may be found at
@@ -116,6 +116,26 @@
Tcg2PhysicalPresenceLibReturnOperationResponseToOsFunction (
OUT UINT32 *Response
);

+/**
+ The handler for TPM physical presence function:
+ Submit TPM Operation Request to Pre-OS Environment and
+ Submit TPM Operation Request to Pre-OS Environment 2.
+
+ This API should be invoked in OS runtime phase to interface with ACPI
method.
+
+ Caution: This function may receive untrusted input.
+
+ @param[in out] Pointer to OperationRequest TPM physical presence
operation request.
+ @param[in out] Pointer to RequestParameter TPM physical presence
operation request parameter.
+
+ @return Return Code for Submit TPM Operation Request to Pre-OS
Environment and
+ Submit TPM Operation Request to Pre-OS Environment 2.
+ **/
+UINT32
+Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunctionEx (
+ IN OUT UINT32 *OperationRequest,
+ IN OUT UINT32 *RequestParameter
+ );

/**
The handler for TPM physical presence function:
@@ -125,7 +145,7 @@
Tcg2PhysicalPresenceLibReturnOperationResponseToOsFunction (
This API should be invoked in OS runtime phase to interface with ACPI
method.

Caution: This function may receive untrusted input.
-
+
@param[in] OperationRequest TPM physical presence operation request.
@param[in] RequestParameter TPM physical presence operation
request parameter.

diff --git
a/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPrese
nceLib.c
b/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPrese
nceLib.c
index 081ec6c..8fcce74 100644
---
a/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPrese
nceLib.c
+++
b/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPres
+++ enceLib.c
@@ -28,6 +28,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED.
#include <Protocol/SmmVariable.h>

#include <Library/DebugLib.h>
+#include <Library/BaseMemorylib.h>
#include <Library/Tcg2PpVendorLib.h>
#include <Library/SmmServicesTableLib.h>

@@ -89,26 +90,27 @@
Tcg2PhysicalPresenceLibReturnOperationResponseToOsFunction (
This API should be invoked in OS runtime phase to interface with ACPI
method.

Caution: This function may receive untrusted input.
-
- @param[in] OperationRequest TPM physical presence operation
request.
- @param[in] RequestParameter TPM physical presence operation
request parameter.
+
+ @param[in out] Pointer to OperationRequest TPM physical presence
operation request.
+ @param[in out] Pointer to RequestParameter TPM physical presence
operation request parameter.

@return Return Code for Submit TPM Operation Request to Pre-OS
Environment and
- Submit TPM Operation Request to Pre-OS Environment 2.
-**/
+ Submit TPM Operation Request to Pre-OS Environment 2.
+ **/
UINT32
-EFIAPI
-Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunction (
- IN UINT32 OperationRequest,
- IN UINT32 RequestParameter
+Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunctionEx (
+ IN OUT UINT32 *OperationRequest,
+ IN OUT UINT32 *RequestParameter
)
{
EFI_STATUS Status;
+ UINT32 ReturnCode;
UINTN DataSize;
EFI_TCG2_PHYSICAL_PRESENCE PpData;
EFI_TCG2_PHYSICAL_PRESENCE_FLAGS Flags;

- DEBUG ((EFI_D_INFO, "[TPM2] SubmitRequestToPreOSFunction, Request
= %x, %x\n", OperationRequest, RequestParameter));
+ DEBUG ((EFI_D_INFO, "[TPM2] SubmitRequestToPreOSFunction, Request
=
+ %x, %x\n", *OperationRequest, *RequestParameter)); ReturnCode =
+ TCG_PP_SUBMIT_REQUEST_TO_PREOS_SUCCESS;

//
// Get the Physical Presence variable @@ -123,21 +125,23 @@
Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunction (
);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "[TPM2] Get PP variable failure! Status = %r\n",
Status));
- return TCG_PP_SUBMIT_REQUEST_TO_PREOS_GENERAL_FAILURE;
+ ReturnCode =
TCG_PP_SUBMIT_REQUEST_TO_PREOS_GENERAL_FAILURE;
+ goto EXIT;
}

- if ((OperationRequest > TCG2_PHYSICAL_PRESENCE_NO_ACTION_MAX)
&&
- (OperationRequest <
TCG2_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION) ) {
+ if ((*OperationRequest > TCG2_PHYSICAL_PRESENCE_NO_ACTION_MAX)
&&
+ (*OperationRequest <
+ TCG2_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION) ) {
//
// This command requires UI to prompt user for Auth data.
//
- return TCG_PP_SUBMIT_REQUEST_TO_PREOS_NOT_IMPLEMENTED;
+ ReturnCode =
TCG_PP_SUBMIT_REQUEST_TO_PREOS_NOT_IMPLEMENTED;
+ goto EXIT;
}

- if ((PpData.PPRequest != OperationRequest) ||
- (PpData.PPRequestParameter != RequestParameter)) {
- PpData.PPRequest = (UINT8)OperationRequest;
- PpData.PPRequestParameter = RequestParameter;
+ if ((PpData.PPRequest != *OperationRequest) ||
+ (PpData.PPRequestParameter != *RequestParameter)) {
+ PpData.PPRequest = (UINT8)*OperationRequest;
+ PpData.PPRequestParameter = *RequestParameter;
DataSize = sizeof (EFI_TCG2_PHYSICAL_PRESENCE);
Status = mTcg2PpSmmVariable->SmmSetVariable (
TCG2_PHYSICAL_PRESENCE_VARIABLE, @@ -150,10
+154,11 @@ Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunction (

if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "[TPM2] Set PP variable failure! Status = %r\n",
Status));
- return TCG_PP_SUBMIT_REQUEST_TO_PREOS_GENERAL_FAILURE;
+ ReturnCode =
TCG_PP_SUBMIT_REQUEST_TO_PREOS_GENERAL_FAILURE;
+ goto EXIT;
}

- if (OperationRequest >=
TCG2_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION) {
+ if (*OperationRequest >=
+ TCG2_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION) {
DataSize = sizeof (EFI_TCG2_PHYSICAL_PRESENCE_FLAGS);
Status = mTcg2PpSmmVariable->SmmGetVariable (
TCG2_PHYSICAL_PRESENCE_FLAGS_VARIABLE,
@@ -165,10 +170,60 @@
Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunction (
if (EFI_ERROR (Status)) {
Flags.PPFlags = TCG2_BIOS_TPM_MANAGEMENT_FLAG_DEFAULT;
}
- return Tcg2PpVendorLibSubmitRequestToPreOSFunction
(OperationRequest, Flags.PPFlags, RequestParameter);
+ ReturnCode = Tcg2PpVendorLibSubmitRequestToPreOSFunction
+ (*OperationRequest, Flags.PPFlags, *RequestParameter);
}

- return TCG_PP_SUBMIT_REQUEST_TO_PREOS_SUCCESS;
+EXIT:
+ //
+ // Sync PPRQ/PPRM from PP Variable if PP submission fails
+ //
+ if (ReturnCode != TCG_PP_SUBMIT_REQUEST_TO_PREOS_SUCCESS) {
+ DEBUG ((EFI_D_ERROR, "[TPM2] Submit PP Request failure! Sync
PPRQ/PPRM with PP variable.\n", Status));
+ DataSize = sizeof (EFI_TCG2_PHYSICAL_PRESENCE);
+ ZeroMem(&PpData, DataSize);
+ Status = mTcg2PpSmmVariable->SmmGetVariable (
+ TCG2_PHYSICAL_PRESENCE_VARIABLE,
+ &gEfiTcg2PhysicalPresenceGuid,
+ NULL,
+ &DataSize,
+ &PpData
+ );
+ *OperationRequest = (UINT32)PpData.PPRequest;
+ *RequestParameter = PpData.PPRequestParameter;
+ }
+
+ return ReturnCode;
+}
+
+/**
+ The handler for TPM physical presence function:
+ Submit TPM Operation Request to Pre-OS Environment and
+ Submit TPM Operation Request to Pre-OS Environment 2.
+
+ This API should be invoked in OS runtime phase to interface with ACPI
method.
+
+ Caution: This function may receive untrusted input.
+
+ @param[in] OperationRequest TPM physical presence operation
request.
+ @param[in] RequestParameter TPM physical presence operation
request parameter.
+
+ @return Return Code for Submit TPM Operation Request to Pre-OS
Environment and
+ Submit TPM Operation Request to Pre-OS Environment 2.
+**/
+UINT32
+EFIAPI
+Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunction (
+ IN UINT32 OperationRequest,
+ IN UINT32 RequestParameter
+ )
+{
+ UINT32 TempOperationRequest;
+ UINT32 TempRequestParameter;
+
+ TempOperationRequest = OperationRequest; TempRequestParameter =
+ RequestParameter;
+
+ return
+
Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunctionEx(&TempOperatio
nRe
+ quest, &TempRequestParameter);
}

/**
diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c
b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c
index f3b7641..d02123d 100644
--- a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c
+++ b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c
@@ -119,6 +119,9 @@ PhysicalPresenceCallback ( {
UINT32 MostRecentRequest;
UINT32 Response;
+ UINT32 OperationRequest;
+ UINT32 RequestParameter;
+

if (mTcgNvs->PhysicalPresence.Parameter ==
TCG_ACPI_FUNCTION_RETURN_REQUEST_RESPONSE_TO_OS) {
mTcgNvs->PhysicalPresence.ReturnCode =
Tcg2PhysicalPresenceLibReturnOperationResponseToOsFunction ( @@ -
130,10 +133,15 @@ PhysicalPresenceCallback (
return EFI_SUCCESS;
} else if ((mTcgNvs->PhysicalPresence.Parameter ==
TCG_ACPI_FUNCTION_SUBMIT_REQUEST_TO_BIOS)
|| (mTcgNvs->PhysicalPresence.Parameter ==
TCG_ACPI_FUNCTION_SUBMIT_REQUEST_TO_BIOS_2)) {
- mTcgNvs->PhysicalPresence.ReturnCode =
Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunction (
- mTcgNvs->PhysicalPresence.Request,
- mTcgNvs->PhysicalPresence.RequestParameter
+
+ OperationRequest = mTcgNvs->PhysicalPresence.Request;
+ RequestParameter = mTcgNvs->PhysicalPresence.RequestParameter;
+ mTcgNvs->PhysicalPresence.ReturnCode =
Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunctionEx (
+ &OperationRequest,
+ &RequestParameter
);
+ mTcgNvs->PhysicalPresence.Request = OperationRequest;
+ mTcgNvs->PhysicalPresence.RequestParameter = RequestParameter;
} else if (mTcgNvs->PhysicalPresence.Parameter ==
TCG_ACPI_FUNCTION_GET_USER_CONFIRMATION_STATUS_FOR_REQUEST)
{
mTcgNvs->PhysicalPresence.ReturnCode =
Tcg2PhysicalPresenceLibGetUserConfirmationStatusFunction (mTcgNvs-
PPRequestUserConfirm);
}
diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tpm.asl
b/SecurityPkg/Tcg/Tcg2Smm/Tpm.asl index 84143cf..2083a3e 100644
--- a/SecurityPkg/Tcg/Tcg2Smm/Tpm.asl
+++ b/SecurityPkg/Tcg/Tcg2Smm/Tpm.asl
@@ -198,6 +198,7 @@ DefinitionBlock (
//

Store (DerefOf (Index (Arg2, 0x00)), PPRQ)
+ Store (0, PPRM)
Store (0x02, PPIP)

//
--
1.9.5.msysgit.1


Re: [PATCH 1/2] MdePkg/BaseMemoryLibOptDxe ARM: fix Thumb-2 bug in ScanMem()

Liming Gao
 

Reviewed-by: Liming Gao <liming.gao@intel.com>

-----Original Message-----
From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org]
Sent: Tuesday, September 27, 2016 6:59 AM
To: edk2-devel@lists.01.org; Gao, Liming <liming.gao@intel.com>
Cc: leif.lindholm@linaro.org; Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: [PATCH 1/2] MdePkg/BaseMemoryLibOptDxe ARM: fix Thumb-2
bug in ScanMem()

The ARM ScanMem() in BaseMemoryLibOptDxe contains code from the
open
source cortex-strings library, and inherited a bug from it where the
conditional execution of a sequence of instructions is erroneously
made dependent on the same condition. Since the final 'addeq' is
supposed to be dependent on the preceding 'tsteq' instruction, they
cannot be part of the same IT block.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
MdePkg/Library/BaseMemoryLibOptDxe/Arm/ScanMem.S | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Arm/ScanMem.S
b/MdePkg/Library/BaseMemoryLibOptDxe/Arm/ScanMem.S
index dc0e74e8657c..1c269547b072 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/Arm/ScanMem.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/Arm/ScanMem.S
@@ -134,11 +134,12 @@ ASM_PFX(InternalMemScanMem8):
bne 61f
adds r0, r0, #1
tst r5, #CHARTSTMASK(1) // 2nd character
- ittt eq
- addeq r0, r0 ,#1
- tsteq r5, #(3 << 15) // 2nd & 3rd character
+ bne 61f
+ adds r0, r0 ,#1
+ tst r5, #(3 << 15) // 2nd & 3rd character
// If not the 3rd must be the last one
- addeq r0, r0, #1
+ it eq
+ addeq.n r0, r0, #1

61:
pop {r4-r7}
--
2.7.4


Re: [PATCH 00/45] Add capsule update and recovery sample.

Liming Gao
 

MdeModulePkg patches are good to me. Reviewed-by: Liming Gao <liming.gao@intel.com>

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
Jiewen Yao
Sent: Wednesday, September 21, 2016 2:45 PM
To: edk2-devel@lists.01.org
Cc: Tian, Feng <feng.tian@intel.com>; Gao, Liming <liming.gao@intel.com>;
Zeng, Star <star.zeng@intel.com>; Kinney, Michael D
<michael.d.kinney@intel.com>; Fan, Jeff <jeff.fan@intel.com>; Zhang, Chao
B <chao.b.zhang@intel.com>
Subject: [edk2] [PATCH 00/45] Add capsule update and recovery sample.

This series patch provides sample on how to do signed capsule update
and recovery in EDKII.

This series patch is also checked into git@github.com:jyao1/edk2.git.

The feature includes:
1) Define EDKII signed system BIOS capsule format.
2) Provide EDKII signed system BIOS update sample.
3) Provide EDKII signed recovery sample.
4) Provide Microcode update sample for X86 system.
5) Update Quark to use new capsule/recovery solution.
6) Update Vlv2(MinnowMax) to use new capsule/recovery solution.

The signed capsule/recovery solution is in MdeModulePkg.
The capsule in IntelFrameworkModulePkg is deprecated.
The Microcode update solution is in UefiCpuPkg.

Cc: Feng Tian <feng.tian@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>


Jiewen Yao (45):
MdeModulePkg/Include: Add EDKII system FMP capsule header.
MdeModulePkg/Include: Add EdkiiSystemCapsuleLib definition.
MdeModulePkg/Include: Add FmpAuthenticationLib header.
MdeModulePkg/Include: Add IniParsingLib header.
MdeModulePkg/Include: Add PlatformFlashAccessLib header.
MdeModulePkg/CapsuleLib: Add ProcessCapsules() API.
MdeModulePkg/MdeModulePkg.dec: Add capsule related definition.
MdeModulePkg/IniParsingLib: Add InitParsingLib instance.
MdeModulePkg/FmpAuthenticationLib: Add FmpAuthenticationLib instance.
MdeModulePkg/DxeCapsuleLibFmp: Add DxeCapsuleLibFmp instance.
MdeModulePkg/DxeCapsuleLibNull: Add ProcessCapsules() interface.
MdeModulePkg/EdkiiSystemCapsuleLib: Add EdkiiSystemCapsuleLib
instance.
MdeModulePkg/PlatformFlashAccessLib: Add NULL PlatformFlashAccessLib.
MdeModulePkg/Esrt: Add ESRT_FW_TYPE_SYSTEMFIRMWARE check.
MdeModulePkg/SystemBiosUpdate: Add SystemBiosUpdate component.
MdeModulePkg/RecoveryModuleLoadPei: Add RecoveryModuleLoadPei.
MdeModulePkg/CapsuleApp: Add CapsuleApp application.
MdeModulePkg/MdeModulePkg.dsc: Add capsule related component.
IntelFrameworkModulePkg/DxeCapsuleLib: Add ProcessCapsules()
interface.
SecurityPkg/SecurityPkg.dec: Add PcdPkcs7CertBuffer PCD.
SecurityPkg/FmpAuthenticationPkcs7Lib: Add PKCS7 NULL class for FMP.
SecurityPkg/FmpAuthenticationRsa2048Sha256Lib: Add NULL class for FMP.
SecurityPkg/SecurityPkg.dsc: Add FmpAuthentication*Lib.
UefiCpuPkg/Include: Add Microcode FMP definition.
UefiCpuPkg/Include: Add MicrocodeFlashAccessLib header.
UefiCpuPkg/UefiCpuPkg.dec: Add Microcode capsule related definition.
UefiCpuPkg/MicrocodeUpdate: Add MicrocodeUpdate component.
UefiCpuPkg/MicrocodeFlashAccessLib: Add NULL MicrocodeFlashAccessLib.
UefiCpuPkg/MicrocodeCapsuleApp: Add MicrocodeCapsuleApp application.
UefiCpuPkg/UefiCpuPkg.dsc: Add MicrocodeCapsule related component.
QuarkPlatformPkg/PlatformFlashAccessLib: Add instance for capsule
update.
QuarkPlatformPkg/SystemBiosDescriptor: Add Descriptor for capsule
update.
QuarkPlatformPkg/SystemBiosUpdateConfig: Add capsule config file.
QuarkPlatformPkg/PlatformInit: Remove recovery PPI installation.
QuarkPlatformPkg/PlatformBootManager: Add capsule/recovery handling.
QuarkPlatformPkg/dsc/fdf: Add capsule/recovery support.
QuarkPlatformPkg/dsc/fdf: add capsule generation DSC/FDF.
Vlv2TbltDevicePkg/PlatformFlashAccessLib: Add instance for capsule
update.
Vlv2TbltDevicePkg/SystemBiosDescriptor: Add Descriptor for capsule
update.
Vlv2TbltDevicePkg/SystemBiosUpdateConfig: Add capsule config file.
Vlv2TbltDevicePkg/FlashDeviceLib: Add DXE flash device lib.
Vlv2TbltDevicePkg/PlatformBootManager: Add capsule/recovery handling.
Vlv2TbltDevicePkg/dsc/fdf: Add capsule/recovery support.
Vlv2TbltDevicePkg/dsc/fdf: add capsule generation DSC/FDF.
Vlv2TbltDevicePkg/bat: add capsule generation in bat.

IntelFrameworkModulePkg/Library/DxeCapsuleLib/DxeCapsuleLib.c
| 39 +-
MdeModulePkg/Application/CapsuleApp/AppSupport.c
| 480 ++++++
MdeModulePkg/Application/CapsuleApp/CapsuleApp.c
| 1047 +++++++++++++
MdeModulePkg/Application/CapsuleApp/CapsuleApp.inf
| 71 +
MdeModulePkg/Application/CapsuleApp/CapsuleApp.uni
| 22 +
MdeModulePkg/Application/CapsuleApp/CapsuleAppExtra.uni
| 19 +
MdeModulePkg/Application/CapsuleApp/CapsuleDump.c
| 840 +++++++++++
MdeModulePkg/Include/Guid/EdkiiSystemFmpCapsule.h
| 110 ++
MdeModulePkg/Include/Library/CapsuleLib.h |
45 +-
MdeModulePkg/Include/Library/EdkiiSystemCapsuleLib.h
| 152 ++
MdeModulePkg/Include/Library/FmpAuthenticationLib.h
| 91 ++
MdeModulePkg/Include/Library/IniParsingLib.h |
153 ++
MdeModulePkg/Include/Library/PlatformFlashAccessLib.h
| 59 +
MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
| 1538 ++++++++++++++++++++
MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.inf
| 82 ++
MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.uni
| 22 +
MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleProcessLib.c
| 517 +++++++
MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleReportLib.c
| 447 ++++++
MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleRuntime.c
| 112 ++
MdeModulePkg/Library/DxeCapsuleLibFmp/DxeRuntimeCapsuleLib.inf
| 85 ++
MdeModulePkg/Library/DxeCapsuleLibFmp/DxeRuntimeCapsuleLib.uni
| 22 +
MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.c
| 47 +-
MdeModulePkg/Library/EdkiiSystemCapsuleLib/EdkiiSystemCapsuleLib.c
| 609 ++++++++
MdeModulePkg/Library/EdkiiSystemCapsuleLib/EdkiiSystemCapsuleLib.inf
| 55 +
MdeModulePkg/Library/EdkiiSystemCapsuleLib/EdkiiSystemCapsuleLib.uni
| 22 +
MdeModulePkg/Library/FmpAuthenitcationLib/FmpAuthenitcationLib.c
| 274 ++++
MdeModulePkg/Library/FmpAuthenitcationLib/FmpAuthenitcationLib.inf
| 47 +
MdeModulePkg/Library/FmpAuthenitcationLib/FmpAuthenitcationLib.uni
| 22 +
MdeModulePkg/Library/IniParsingLib/IniParsingLib.c |
1053 ++++++++++++++
MdeModulePkg/Library/IniParsingLib/IniParsingLib.inf |
42 +
MdeModulePkg/Library/IniParsingLib/IniParsingLib.uni |
22 +

MdeModulePkg/Library/PlatformFlashAccessLibNull/PlatformFlashAccessLib
Null.c | 54 +

MdeModulePkg/Library/PlatformFlashAccessLibNull/PlatformFlashAccessLib
Null.inf | 40 +

MdeModulePkg/Library/PlatformFlashAccessLibNull/PlatformFlashAccessLib
Null.uni | 21 +
MdeModulePkg/MdeModulePkg.dec | 106
++
MdeModulePkg/MdeModulePkg.dsc | 24 +
MdeModulePkg/Universal/EsrtDxe/EsrtDxe.inf |
3 +-
MdeModulePkg/Universal/EsrtDxe/EsrtImpl.c |
37 +-
MdeModulePkg/Universal/RecoveryModuleLoadPei/ParseConfigProfile.c
| 158 ++

MdeModulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadP
ei.c | 746 ++++++++++

MdeModulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadP
ei.h | 44 +

MdeModulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadP
ei.inf | 71 +

MdeModulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadP
ei.uni | 21 +

MdeModulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadP
eiExtra.uni | 20 +
MdeModulePkg/Universal/SystemBiosUpdate/ParseConfigProfile.c
| 219 +++
MdeModulePkg/Universal/SystemBiosUpdate/SystemBiosDxe.h
| 393 +++++
MdeModulePkg/Universal/SystemBiosUpdate/SystemBiosMainDxe.c
| 484 ++++++
MdeModulePkg/Universal/SystemBiosUpdate/SystemBiosMainSetImage.c
| 453 ++++++

MdeModulePkg/Universal/SystemBiosUpdate/SystemBiosMainSetImageDu
mmy.c | 90 ++
MdeModulePkg/Universal/SystemBiosUpdate/SystemBiosReportDxe.inf
| 66 +
MdeModulePkg/Universal/SystemBiosUpdate/SystemBiosReportDxe.uni
| 21 +

MdeModulePkg/Universal/SystemBiosUpdate/SystemBiosReportDxeExtra.u
ni | 20 +
MdeModulePkg/Universal/SystemBiosUpdate/SystemBiosUpdateDxe.inf
| 70 +
MdeModulePkg/Universal/SystemBiosUpdate/SystemBiosUpdateDxe.uni
| 21 +

MdeModulePkg/Universal/SystemBiosUpdate/SystemBiosUpdateDxeExtra.
uni | 20 +

QuarkPlatformPkg/Feature/Capsule/Library/PlatformFlashAccessLib/Platfor
mFlashAccessLibDxe.c | 200 +++

QuarkPlatformPkg/Feature/Capsule/Library/PlatformFlashAccessLib/Platfor
mFlashAccessLibDxe.inf | 52 +

QuarkPlatformPkg/Feature/Capsule/Library/PlatformFlashAccessLib/SpiFlash
Device.c | 336 +++++

QuarkPlatformPkg/Feature/Capsule/Library/PlatformFlashAccessLib/SpiFlash
Device.h | 186 +++

QuarkPlatformPkg/Feature/Capsule/SystemBiosDescriptor/SystemBiosDescr
iptor.aslc | 88 ++

QuarkPlatformPkg/Feature/Capsule/SystemBiosDescriptor/SystemBiosDescr
iptor.inf | 45 +

QuarkPlatformPkg/Feature/Capsule/SystemBiosDescriptor/SystemBiosDescr
iptorPei.c | 66 +

QuarkPlatformPkg/Feature/Capsule/SystemBiosUpdateConfig/SystemBiosU
pdateConfig.ini | 62 +

QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.
c | 95 +-

QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootManager.
h | 8 +-

QuarkPlatformPkg/Library/PlatformBootManagerLib/PlatformBootManagerL
ib.inf | 8 +-
QuarkPlatformPkg/Platform/Pei/PlatformInit/MemoryCallback.c
| 3 +-
QuarkPlatformPkg/Quark.dsc | 61 +-
QuarkPlatformPkg/Quark.fdf | 53 +
QuarkPlatformPkg/QuarkCapsule.dsc | 44 +
QuarkPlatformPkg/QuarkCapsule.fdf | 82 ++
QuarkPlatformPkg/QuarkMin.dsc | 7 +-

SecurityPkg/Library/FmpAuthenticationPkcs7Lib/FmpAuthenticationPkcs7Lib
.c | 144 ++

SecurityPkg/Library/FmpAuthenticationPkcs7Lib/FmpAuthenticationPkcs7Lib
.inf | 52 +

SecurityPkg/Library/FmpAuthenticationPkcs7Lib/FmpAuthenticationPkcs7Lib
.uni | 26 +

SecurityPkg/Library/FmpAuthenticationRsa2048Sha256Lib/FmpAuthenticatio
nRsa2048Sha256Lib.c | 286 ++++

SecurityPkg/Library/FmpAuthenticationRsa2048Sha256Lib/FmpAuthenticatio
nRsa2048Sha256Lib.inf | 53 +

SecurityPkg/Library/FmpAuthenticationRsa2048Sha256Lib/FmpAuthenticatio
nRsa2048Sha256Lib.uni | 26 +
SecurityPkg/SecurityPkg.dec | 6 +
SecurityPkg/SecurityPkg.dsc | 3 +
UefiCpuPkg/Application/MicrocodeCapsuleApp/AppSupport.c
| 480 ++++++
UefiCpuPkg/Application/MicrocodeCapsuleApp/MicrocodeCapsuleApp.c
| 283 ++++
UefiCpuPkg/Application/MicrocodeCapsuleApp/MicrocodeCapsuleApp.inf
| 62 +
UefiCpuPkg/Application/MicrocodeCapsuleApp/MicrocodeCapsuleApp.uni
| 22 +

UefiCpuPkg/Application/MicrocodeCapsuleApp/MicrocodeCapsuleAppExtra.
uni | 19 +
UefiCpuPkg/Application/MicrocodeCapsuleApp/MicrocodeCapsuleDump.c
| 171 +++
UefiCpuPkg/Include/Guid/MicrocodeFmp.h | 21
+
UefiCpuPkg/Include/Library/MicrocodeFlashAccessLib.h
| 39 +

UefiCpuPkg/Library/MicrocodeFlashAccessLibNull/MicrocodeFlashAccessLib
Null.c | 42 +

UefiCpuPkg/Library/MicrocodeFlashAccessLibNull/MicrocodeFlashAccessLib
Null.inf | 40 +

UefiCpuPkg/Library/MicrocodeFlashAccessLibNull/MicrocodeFlashAccessLib
Null.uni | 21 +
UefiCpuPkg/MicrocodeUpdate/MicrocodeFmp.c |
641 ++++++++
UefiCpuPkg/MicrocodeUpdate/MicrocodeUpdate.c
| 775 ++++++++++
UefiCpuPkg/MicrocodeUpdate/MicrocodeUpdate.h
| 299 ++++
UefiCpuPkg/MicrocodeUpdate/MicrocodeUpdate.inf
| 68 +
UefiCpuPkg/MicrocodeUpdate/MicrocodeUpdateDxe.uni
| 21 +
UefiCpuPkg/MicrocodeUpdate/MicrocodeUpdateDxeExtra.uni
| 20 +
UefiCpuPkg/UefiCpuPkg.dec | 7 +
UefiCpuPkg/UefiCpuPkg.dsc | 3 +

Vlv2TbltDevicePkg/Feature/Capsule/Library/PlatformFlashAccessLib/Platfor
mFlashAccessLib.c | 192 +++

Vlv2TbltDevicePkg/Feature/Capsule/Library/PlatformFlashAccessLib/Platfor
mFlashAccessLib.inf | 47 +

Vlv2TbltDevicePkg/Feature/Capsule/SystemBiosDescriptor/SystemBiosDescr
iptor.aslc | 86 ++

Vlv2TbltDevicePkg/Feature/Capsule/SystemBiosDescriptor/SystemBiosDescr
iptor.inf | 45 +

Vlv2TbltDevicePkg/Feature/Capsule/SystemBiosDescriptor/SystemBiosDescr
iptorPei.c | 66 +

Vlv2TbltDevicePkg/Feature/Capsule/SystemBiosUpdateConfig/SystemBiosU
pdateConfig.ini | 72 +

Vlv2TbltDevicePkg/Feature/Capsule/SystemBiosUpdateConfig/SystemBiosU
pdateConfigGcc.ini | 72 +
Vlv2TbltDevicePkg/Library/FlashDeviceLib/FlashDeviceLib.c
| 156 +-
Vlv2TbltDevicePkg/Library/FlashDeviceLib/FlashDeviceLib.inf
| 8 +-
Vlv2TbltDevicePkg/Library/FlashDeviceLib/FlashDeviceLibDxe.c
| 62 +
Vlv2TbltDevicePkg/Library/FlashDeviceLib/FlashDeviceLibDxe.inf
| 49 +
Vlv2TbltDevicePkg/Library/FlashDeviceLib/FlashDeviceLibDxeRuntimeSmm.c
| 188 +++
Vlv2TbltDevicePkg/Library/FlashDeviceLib/SpiChipDefinitions.h
| 5 +-
Vlv2TbltDevicePkg/Library/PlatformBdsLib/BdsPlatform.c
| 117 +-
Vlv2TbltDevicePkg/Library/PlatformBdsLib/PlatformBdsLib.inf
| 2 +
Vlv2TbltDevicePkg/PlatformCapsule.dsc | 44 +
Vlv2TbltDevicePkg/PlatformCapsule.fdf | 81 ++
Vlv2TbltDevicePkg/PlatformCapsuleGcc.fdf | 81
++
Vlv2TbltDevicePkg/PlatformPkg.fdf | 132 +-
Vlv2TbltDevicePkg/PlatformPkgConfig.dsc | 3 +-
Vlv2TbltDevicePkg/PlatformPkgGcc.fdf | 132 +-
Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc | 70
+-
Vlv2TbltDevicePkg/PlatformPkgIA32.dsc | 70 +-
Vlv2TbltDevicePkg/PlatformPkgX64.dsc | 70 +-
Vlv2TbltDevicePkg/bld_vlv.bat | 8 +-
124 files changed, 17848 insertions(+), 384 deletions(-)
create mode 100644
MdeModulePkg/Application/CapsuleApp/AppSupport.c
create mode 100644 MdeModulePkg/Application/CapsuleApp/CapsuleApp.c
create mode 100644
MdeModulePkg/Application/CapsuleApp/CapsuleApp.inf
create mode 100644
MdeModulePkg/Application/CapsuleApp/CapsuleApp.uni
create mode 100644
MdeModulePkg/Application/CapsuleApp/CapsuleAppExtra.uni
create mode 100644
MdeModulePkg/Application/CapsuleApp/CapsuleDump.c
create mode 100644
MdeModulePkg/Include/Guid/EdkiiSystemFmpCapsule.h
create mode 100644
MdeModulePkg/Include/Library/EdkiiSystemCapsuleLib.h
create mode 100644
MdeModulePkg/Include/Library/FmpAuthenticationLib.h
create mode 100644 MdeModulePkg/Include/Library/IniParsingLib.h
create mode 100644
MdeModulePkg/Include/Library/PlatformFlashAccessLib.h
create mode 100644
MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
create mode 100644
MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.inf
create mode 100644
MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.uni
create mode 100644
MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleProcessLib.c
create mode 100644
MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleReportLib.c
create mode 100644
MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleRuntime.c
create mode 100644
MdeModulePkg/Library/DxeCapsuleLibFmp/DxeRuntimeCapsuleLib.inf
create mode 100644
MdeModulePkg/Library/DxeCapsuleLibFmp/DxeRuntimeCapsuleLib.uni
create mode 100644
MdeModulePkg/Library/EdkiiSystemCapsuleLib/EdkiiSystemCapsuleLib.c
create mode 100644
MdeModulePkg/Library/EdkiiSystemCapsuleLib/EdkiiSystemCapsuleLib.inf
create mode 100644
MdeModulePkg/Library/EdkiiSystemCapsuleLib/EdkiiSystemCapsuleLib.uni
create mode 100644
MdeModulePkg/Library/FmpAuthenitcationLib/FmpAuthenitcationLib.c
create mode 100644
MdeModulePkg/Library/FmpAuthenitcationLib/FmpAuthenitcationLib.inf
create mode 100644
MdeModulePkg/Library/FmpAuthenitcationLib/FmpAuthenitcationLib.uni
create mode 100644 MdeModulePkg/Library/IniParsingLib/IniParsingLib.c
create mode 100644 MdeModulePkg/Library/IniParsingLib/IniParsingLib.inf
create mode 100644 MdeModulePkg/Library/IniParsingLib/IniParsingLib.uni
create mode 100644
MdeModulePkg/Library/PlatformFlashAccessLibNull/PlatformFlashAccessLib
Null.c
create mode 100644
MdeModulePkg/Library/PlatformFlashAccessLibNull/PlatformFlashAccessLib
Null.inf
create mode 100644
MdeModulePkg/Library/PlatformFlashAccessLibNull/PlatformFlashAccessLib
Null.uni
create mode 100644
MdeModulePkg/Universal/RecoveryModuleLoadPei/ParseConfigProfile.c
create mode 100644
MdeModulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadP
ei.c
create mode 100644
MdeModulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadP
ei.h
create mode 100644
MdeModulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadP
ei.inf
create mode 100644
MdeModulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadP
ei.uni
create mode 100644
MdeModulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadP
eiExtra.uni
create mode 100644
MdeModulePkg/Universal/SystemBiosUpdate/ParseConfigProfile.c
create mode 100644
MdeModulePkg/Universal/SystemBiosUpdate/SystemBiosDxe.h
create mode 100644
MdeModulePkg/Universal/SystemBiosUpdate/SystemBiosMainDxe.c
create mode 100644
MdeModulePkg/Universal/SystemBiosUpdate/SystemBiosMainSetImage.c
create mode 100644
MdeModulePkg/Universal/SystemBiosUpdate/SystemBiosMainSetImageDu
mmy.c
create mode 100644
MdeModulePkg/Universal/SystemBiosUpdate/SystemBiosReportDxe.inf
create mode 100644
MdeModulePkg/Universal/SystemBiosUpdate/SystemBiosReportDxe.uni
create mode 100644
MdeModulePkg/Universal/SystemBiosUpdate/SystemBiosReportDxeExtra.u
ni
create mode 100644
MdeModulePkg/Universal/SystemBiosUpdate/SystemBiosUpdateDxe.inf
create mode 100644
MdeModulePkg/Universal/SystemBiosUpdate/SystemBiosUpdateDxe.uni
create mode 100644
MdeModulePkg/Universal/SystemBiosUpdate/SystemBiosUpdateDxeExtra.
uni
create mode 100644
QuarkPlatformPkg/Feature/Capsule/Library/PlatformFlashAccessLib/Platfor
mFlashAccessLibDxe.c
create mode 100644
QuarkPlatformPkg/Feature/Capsule/Library/PlatformFlashAccessLib/Platfor
mFlashAccessLibDxe.inf
create mode 100644
QuarkPlatformPkg/Feature/Capsule/Library/PlatformFlashAccessLib/SpiFlash
Device.c
create mode 100644
QuarkPlatformPkg/Feature/Capsule/Library/PlatformFlashAccessLib/SpiFlash
Device.h
create mode 100644
QuarkPlatformPkg/Feature/Capsule/SystemBiosDescriptor/SystemBiosDescr
iptor.aslc
create mode 100644
QuarkPlatformPkg/Feature/Capsule/SystemBiosDescriptor/SystemBiosDescr
iptor.inf
create mode 100644
QuarkPlatformPkg/Feature/Capsule/SystemBiosDescriptor/SystemBiosDescr
iptorPei.c
create mode 100644
QuarkPlatformPkg/Feature/Capsule/SystemBiosUpdateConfig/SystemBiosU
pdateConfig.ini
create mode 100644 QuarkPlatformPkg/QuarkCapsule.dsc
create mode 100644 QuarkPlatformPkg/QuarkCapsule.fdf
create mode 100644
SecurityPkg/Library/FmpAuthenticationPkcs7Lib/FmpAuthenticationPkcs7Lib
.c
create mode 100644
SecurityPkg/Library/FmpAuthenticationPkcs7Lib/FmpAuthenticationPkcs7Lib
.inf
create mode 100644
SecurityPkg/Library/FmpAuthenticationPkcs7Lib/FmpAuthenticationPkcs7Lib
.uni
create mode 100644
SecurityPkg/Library/FmpAuthenticationRsa2048Sha256Lib/FmpAuthenticatio
nRsa2048Sha256Lib.c
create mode 100644
SecurityPkg/Library/FmpAuthenticationRsa2048Sha256Lib/FmpAuthenticatio
nRsa2048Sha256Lib.inf
create mode 100644
SecurityPkg/Library/FmpAuthenticationRsa2048Sha256Lib/FmpAuthenticatio
nRsa2048Sha256Lib.uni
create mode 100644
UefiCpuPkg/Application/MicrocodeCapsuleApp/AppSupport.c
create mode 100644
UefiCpuPkg/Application/MicrocodeCapsuleApp/MicrocodeCapsuleApp.c
create mode 100644
UefiCpuPkg/Application/MicrocodeCapsuleApp/MicrocodeCapsuleApp.inf
create mode 100644
UefiCpuPkg/Application/MicrocodeCapsuleApp/MicrocodeCapsuleApp.uni
create mode 100644
UefiCpuPkg/Application/MicrocodeCapsuleApp/MicrocodeCapsuleAppExtra.
uni
create mode 100644
UefiCpuPkg/Application/MicrocodeCapsuleApp/MicrocodeCapsuleDump.c
create mode 100644 UefiCpuPkg/Include/Guid/MicrocodeFmp.h
create mode 100644
UefiCpuPkg/Include/Library/MicrocodeFlashAccessLib.h
create mode 100644
UefiCpuPkg/Library/MicrocodeFlashAccessLibNull/MicrocodeFlashAccessLib
Null.c
create mode 100644
UefiCpuPkg/Library/MicrocodeFlashAccessLibNull/MicrocodeFlashAccessLib
Null.inf
create mode 100644
UefiCpuPkg/Library/MicrocodeFlashAccessLibNull/MicrocodeFlashAccessLib
Null.uni
create mode 100644 UefiCpuPkg/MicrocodeUpdate/MicrocodeFmp.c
create mode 100644 UefiCpuPkg/MicrocodeUpdate/MicrocodeUpdate.c
create mode 100644 UefiCpuPkg/MicrocodeUpdate/MicrocodeUpdate.h
create mode 100644 UefiCpuPkg/MicrocodeUpdate/MicrocodeUpdate.inf
create mode 100644
UefiCpuPkg/MicrocodeUpdate/MicrocodeUpdateDxe.uni
create mode 100644
UefiCpuPkg/MicrocodeUpdate/MicrocodeUpdateDxeExtra.uni
create mode 100644
Vlv2TbltDevicePkg/Feature/Capsule/Library/PlatformFlashAccessLib/Platfor
mFlashAccessLib.c
create mode 100644
Vlv2TbltDevicePkg/Feature/Capsule/Library/PlatformFlashAccessLib/Platfor
mFlashAccessLib.inf
create mode 100644
Vlv2TbltDevicePkg/Feature/Capsule/SystemBiosDescriptor/SystemBiosDescr
iptor.aslc
create mode 100644
Vlv2TbltDevicePkg/Feature/Capsule/SystemBiosDescriptor/SystemBiosDescr
iptor.inf
create mode 100644
Vlv2TbltDevicePkg/Feature/Capsule/SystemBiosDescriptor/SystemBiosDescr
iptorPei.c
create mode 100644
Vlv2TbltDevicePkg/Feature/Capsule/SystemBiosUpdateConfig/SystemBiosU
pdateConfig.ini
create mode 100644
Vlv2TbltDevicePkg/Feature/Capsule/SystemBiosUpdateConfig/SystemBiosU
pdateConfigGcc.ini
create mode 100644
Vlv2TbltDevicePkg/Library/FlashDeviceLib/FlashDeviceLibDxe.c
create mode 100644
Vlv2TbltDevicePkg/Library/FlashDeviceLib/FlashDeviceLibDxe.inf
create mode 100644
Vlv2TbltDevicePkg/Library/FlashDeviceLib/FlashDeviceLibDxeRuntimeSmm.c
create mode 100644 Vlv2TbltDevicePkg/PlatformCapsule.dsc
create mode 100644 Vlv2TbltDevicePkg/PlatformCapsule.fdf
create mode 100644 Vlv2TbltDevicePkg/PlatformCapsuleGcc.fdf

--
2.7.4.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [PATCH] BaseTools: List missing source python files for Ecc tool in Makefile

Liming Gao
 

Reviewed-by: Liming Gao <liming.gao@intel.com>

-----Original Message-----
From: Wu, Hao A
Sent: Tuesday, September 27, 2016 10:45 AM
To: edk2-devel@lists.01.org
Cc: Wu, Hao A <hao.a.wu@intel.com>; Zhu, Yonghong
<yonghong.zhu@intel.com>; Gao, Liming <liming.gao@intel.com>
Subject: [PATCH] BaseTools: List missing source python files for Ecc tool in
Makefile

Add missing python sources files that are dependent for Ecc tool in
Makefile.

Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
BaseTools/Source/Python/Makefile | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

diff --git a/BaseTools/Source/Python/Makefile
b/BaseTools/Source/Python/Makefile
index e7755cd..7ffe211 100644
--- a/BaseTools/Source/Python/Makefile
+++ b/BaseTools/Source/Python/Makefile
@@ -237,6 +237,26 @@
CMD_UPT=$(BASE_TOOLS_PATH)\Source\Python\UPT\Core\DependencyR
ules.py \
$(BASE_TOOLS_PATH)\Source\Python\UPT\Xml\XmlParser.py \
$(BASE_TOOLS_PATH)\Source\Python\UPT\Xml\XmlParserMisc.py

+CMD_ECC=$(BASE_TOOLS_PATH)\Source\Python\Ecc\c.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\Check.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\CLexer.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\CodeFragment.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\CodeFragmentCollector.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\Configuration.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\CParser.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\Database.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\Ecc.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\EccGlobalData.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\EccToolError.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\Exception.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\FileProfile.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\MetaDataParser.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\ParserWarning.py \
+
$(BASE_TOOLS_PATH)\Source\Python\Ecc\MetaFileWorkspace\MetaDataTa
ble.py \
+
$(BASE_TOOLS_PATH)\Source\Python\Ecc\MetaFileWorkspace\MetaFilePar
ser.py \
+
$(BASE_TOOLS_PATH)\Source\Python\Ecc\MetaFileWorkspace\MetaFileTab
le.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\Xml\XmlRoutines.py
+
!IFDEF PYTHON_FREEZER_PATH
all: SetPythonPath $(APPLICATIONS)
!ELSE
--
1.9.5.msysgit.0


[PATCH] BaseTools: List missing source python files for Ecc tool in Makefile

Wu, Hao A
 

Add missing python sources files that are dependent for Ecc tool in
Makefile.

Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
BaseTools/Source/Python/Makefile | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

diff --git a/BaseTools/Source/Python/Makefile b/BaseTools/Source/Python/Makefile
index e7755cd..7ffe211 100644
--- a/BaseTools/Source/Python/Makefile
+++ b/BaseTools/Source/Python/Makefile
@@ -237,6 +237,26 @@ CMD_UPT=$(BASE_TOOLS_PATH)\Source\Python\UPT\Core\DependencyRules.py \
$(BASE_TOOLS_PATH)\Source\Python\UPT\Xml\XmlParser.py \
$(BASE_TOOLS_PATH)\Source\Python\UPT\Xml\XmlParserMisc.py

+CMD_ECC=$(BASE_TOOLS_PATH)\Source\Python\Ecc\c.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\Check.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\CLexer.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\CodeFragment.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\CodeFragmentCollector.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\Configuration.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\CParser.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\Database.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\Ecc.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\EccGlobalData.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\EccToolError.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\Exception.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\FileProfile.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\MetaDataParser.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\ParserWarning.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\MetaFileWorkspace\MetaDataTable.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\MetaFileWorkspace\MetaFileParser.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\MetaFileWorkspace\MetaFileTable.py \
+ $(BASE_TOOLS_PATH)\Source\Python\Ecc\Xml\XmlRoutines.py
+
!IFDEF PYTHON_FREEZER_PATH
all: SetPythonPath $(APPLICATIONS)
!ELSE
--
1.9.5.msysgit.0


Re: [PATCH] MdeModulePkg: add ARM/AARCH64 requirements to .dsc

Ard Biesheuvel
 

On 26 September 2016 at 18:15, Leif Lindholm <leif.lindholm@linaro.org> wrote:
Some LibraryClasses entries are missing to enable standalone builds
of MdeModulePkg components for ARM/AARCH64. Add those.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

---

Tying back to the conversation in
https://lists.01.org/pipermail/edk2-devel/2016-August/000733.html

If we are not going to refactor the DxeIpl code, would this be an
acceptable fix to enable standalone HelloWorld builds on ARM/AARCH64?

BaseStackCheckLib is unrelated to the DxeIpl issue, but needed in
practice on ARM and in theory on AARCH64.

MdeModulePkg/MdeModulePkg.dsc | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/MdeModulePkg/MdeModulePkg.dsc b/MdeModulePkg/MdeModulePkg.dsc
index 05120c7..3eb55db 100644
--- a/MdeModulePkg/MdeModulePkg.dsc
+++ b/MdeModulePkg/MdeModulePkg.dsc
@@ -160,6 +160,9 @@ [LibraryClasses.common.UEFI_APPLICATION]
DebugLib|MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf

[LibraryClasses.ARM, LibraryClasses.AARCH64]
+ ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf
+ ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf
+
#
# It is not possible to prevent ARM compiler calls to generic intrinsic functions.
# This library provides the instrinsic functions generated by a given compiler.
@@ -167,6 +170,12 @@ [LibraryClasses.ARM, LibraryClasses.AARCH64]
#
NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf

+ #
+ # Since software stack checking may be heuristically enabled by the compiler
+ # include BaseStackCheckLib unconditionally.
+ #
+ NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf
+
[LibraryClasses.EBC]
LockBoxLib|MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.inf

--
2.9.3


[PATCH 2/2] MdePkg/HiiImageDecoder.h: Add missing EFI_HII_IMAGE_DECODER_OTHER_INFO

Ruiyu Ni <ruiyu.ni@...>
 

Besides adding the missing structure
EFI_HII_IMAGE_DECODER_OTHER_INFO, the patch also correct some typo.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
---
MdePkg/Include/Protocol/HiiImageDecoder.h | 30 +++++++++++++++++++++---------
1 file changed, 21 insertions(+), 9 deletions(-)

diff --git a/MdePkg/Include/Protocol/HiiImageDecoder.h b/MdePkg/Include/Protocol/HiiImageDecoder.h
index aebb813..fd14592 100644
--- a/MdePkg/Include/Protocol/HiiImageDecoder.h
+++ b/MdePkg/Include/Protocol/HiiImageDecoder.h
@@ -2,6 +2,7 @@
This protocol provides generic image decoder interfaces to various image formats.

(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
+ Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>

This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
@@ -12,8 +13,8 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

**/
-#ifndef __EFI_IMAGE_DECODER_PROTOCOL_H__
-#define __EFI_IMAGE_DECODER_PROTOCOL_H__
+#ifndef __HII_IMAGE_DECODER_H__
+#define __HII_IMAGE_DECODER_H__

#include <Protocol/HiiImage.h>

@@ -64,6 +65,9 @@ typedef struct _EFI_HII_IMAGE_DECODER_IMAGE_INFO_HEADER {
UINT8 ColorDepthInBits;
} EFI_HII_IMAGE_DECODER_IMAGE_INFO_HEADER;

+#define EFI_IMAGE_JPEG_SCANTYPE_PROGREESSIVE 0x01
+#define EFI_IMAGE_JPEG_SCANTYPE_INTERLACED 0x02
+
//
// EFI_HII_IMAGE_DECODER_JPEG_INFO
// Header The common header
@@ -72,9 +76,6 @@ typedef struct _EFI_HII_IMAGE_DECODER_IMAGE_INFO_HEADER {
//
typedef struct _EFI_HII_IMAGE_DECODER_JPEG_INFO {
EFI_HII_IMAGE_DECODER_IMAGE_INFO_HEADER Header;
-
-#define EFI_IMAGE_JPEG_SCANTYPE_PROGREESSIVE 0x01
-#define EFI_IMAGE_JPEG_SCANTYPE_INTERLACED 0x02
UINT16 ScanType;
UINT64 Reserved;
} EFI_HII_IMAGE_DECODER_JPEG_INFO;
@@ -91,6 +92,17 @@ typedef struct _EFI_HII_IMAGE_DECODER_PNG_INFO {
UINT64 Reserved;
} EFI_HII_IMAGE_DECODER_PNG_INFO;

+//
+// EFI_HII_IMAGE_DECODER_OTHER_INFO
+//
+typedef struct _EFI_HII_IMAGE_DECODER_OTHER_INFO {
+ EFI_HII_IMAGE_DECODER_IMAGE_INFO_HEADER Header;
+ CHAR16 ImageExtenion[1];
+ //
+ // Variable length of image file extension name.
+ //
+} EFI_HII_IMAGE_DECODER_OTHER_INFO;
+
/**
There could be more than one EFI_HII_IMAGE_DECODER_PROTOCOL instances installed
in the system for different image formats. This function returns the decoder
@@ -112,10 +124,10 @@ typedef struct _EFI_HII_IMAGE_DECODER_PNG_INFO {
**/
typedef
EFI_STATUS
-(EFIAPI *EFI_HII_IMAGE_DECODER_GET_DECODER_NAME)(
+(EFIAPI *EFI_HII_IMAGE_DECODER_GET_NAME)(
IN EFI_HII_IMAGE_DECODER_PROTOCOL *This,
IN OUT EFI_GUID **DecoderName,
- IN OUT UINT16 *NumberofDecoderName
+ IN OUT UINT16 *NumberOfDecoderName
);

/**
@@ -183,12 +195,12 @@ EFI_STATUS
IN EFI_HII_IMAGE_DECODER_PROTOCOL *This,
IN VOID *Image,
IN UINTN ImageRawDataSize,
- IN OUT EFI_IMAGE_OUTPUT **BitMap OPTIONAL,
+ IN OUT EFI_IMAGE_OUTPUT **Bitmap,
IN BOOLEAN Transparent
);

struct _EFI_HII_IMAGE_DECODER_PROTOCOL {
- EFI_HII_IMAGE_DECODER_GET_DECODER_NAME GetImageDecoderName;
+ EFI_HII_IMAGE_DECODER_GET_NAME GetImageDecoderName;
EFI_HII_IMAGE_DECODER_GET_IMAGE_INFO GetImageInfo;
EFI_HII_IMAGE_DECODER_DECODE DecodeImage;
};
--
2.9.0.windows.1


[PATCH 1/2] MdePkg/HiiImageDecoder.h: Rename from ImageDecoder.h

Ruiyu Ni <ruiyu.ni@...>
 

Rename the protocol header file to follow EDKII file
name rule before the HiiImageDecoder protocol is used
by anyone.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
---
MdePkg/Include/Protocol/{ImageDecoder.h => HiiImageDecoder.h} | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename MdePkg/Include/Protocol/{ImageDecoder.h => HiiImageDecoder.h} (100%)

diff --git a/MdePkg/Include/Protocol/ImageDecoder.h b/MdePkg/Include/Protocol/HiiImageDecoder.h
similarity index 100%
rename from MdePkg/Include/Protocol/ImageDecoder.h
rename to MdePkg/Include/Protocol/HiiImageDecoder.h
--
2.9.0.windows.1


[PATCH 0/2] Refine HiiImageDecoder.h

Ruiyu Ni <ruiyu.ni@...>
 

The patch renames ImageDecoder.h to HiiImageDecoder.h before
anyone starts to use it. The new file name follows the EDKII
file name rule. The patch also adds a missing structure.

Ruiyu Ni (2):
MdePkg/HiiImageDecoder.h: Rename from ImageDecoder.h
MdePkg/HiiImageDecoder.h: Add missing EFI_HII_IMAGE_DECODER_OTHER_INFO

.../Protocol/{ImageDecoder.h => HiiImageDecoder.h} | 30 +++++++++++++++-------
1 file changed, 21 insertions(+), 9 deletions(-)
rename MdePkg/Include/Protocol/{ImageDecoder.h => HiiImageDecoder.h} (90%)

--
2.9.0.windows.1


[PATCH] SecurityPkg: Tcg2: Fix TCG2 PP issues

Zhang, Chao B <chao.b.zhang@...>
 

Several issues exist in TCG2 PP
1. TCG2 PP use NVS PPRQ/PPRM as PP parameter as well as current
PP state cache. But it doesn't handle PP set failure case
2. TCG2 PP Submit TPM Operation Request to Pre-OS Environment forgets
to clean PPRM
3. Potential alignment issue

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
---
.../Include/Library/Tcg2PhysicalPresenceLib.h | 24 +++++-
.../SmmTcg2PhysicalPresenceLib.c | 99 +++++++++++++++++-----
SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c | 14 ++-
SecurityPkg/Tcg/Tcg2Smm/Tpm.asl | 1 +
4 files changed, 111 insertions(+), 27 deletions(-)

diff --git a/SecurityPkg/Include/Library/Tcg2PhysicalPresenceLib.h b/SecurityPkg/Include/Library/Tcg2PhysicalPresenceLib.h
index ce45f17..1bee13a 100644
--- a/SecurityPkg/Include/Library/Tcg2PhysicalPresenceLib.h
+++ b/SecurityPkg/Include/Library/Tcg2PhysicalPresenceLib.h
@@ -2,7 +2,7 @@
Ihis library is intended to be used by BDS modules.
This library will execute TPM2 request.

-Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -116,6 +116,26 @@ Tcg2PhysicalPresenceLibReturnOperationResponseToOsFunction (
OUT UINT32 *Response
);

+/**
+ The handler for TPM physical presence function:
+ Submit TPM Operation Request to Pre-OS Environment and
+ Submit TPM Operation Request to Pre-OS Environment 2.
+
+ This API should be invoked in OS runtime phase to interface with ACPI method.
+
+ Caution: This function may receive untrusted input.
+
+ @param[in out] Pointer to OperationRequest TPM physical presence operation request.
+ @param[in out] Pointer to RequestParameter TPM physical presence operation request parameter.
+
+ @return Return Code for Submit TPM Operation Request to Pre-OS Environment and
+ Submit TPM Operation Request to Pre-OS Environment 2.
+ **/
+UINT32
+Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunctionEx (
+ IN OUT UINT32 *OperationRequest,
+ IN OUT UINT32 *RequestParameter
+ );

/**
The handler for TPM physical presence function:
@@ -125,7 +145,7 @@ Tcg2PhysicalPresenceLibReturnOperationResponseToOsFunction (
This API should be invoked in OS runtime phase to interface with ACPI method.

Caution: This function may receive untrusted input.
-
+
@param[in] OperationRequest TPM physical presence operation request.
@param[in] RequestParameter TPM physical presence operation request parameter.

diff --git a/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.c b/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.c
index 081ec6c..8fcce74 100644
--- a/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.c
+++ b/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.c
@@ -28,6 +28,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Protocol/SmmVariable.h>

#include <Library/DebugLib.h>
+#include <Library/BaseMemorylib.h>
#include <Library/Tcg2PpVendorLib.h>
#include <Library/SmmServicesTableLib.h>

@@ -89,26 +90,27 @@ Tcg2PhysicalPresenceLibReturnOperationResponseToOsFunction (
This API should be invoked in OS runtime phase to interface with ACPI method.

Caution: This function may receive untrusted input.
-
- @param[in] OperationRequest TPM physical presence operation request.
- @param[in] RequestParameter TPM physical presence operation request parameter.
+
+ @param[in out] Pointer to OperationRequest TPM physical presence operation request.
+ @param[in out] Pointer to RequestParameter TPM physical presence operation request parameter.

@return Return Code for Submit TPM Operation Request to Pre-OS Environment and
- Submit TPM Operation Request to Pre-OS Environment 2.
-**/
+ Submit TPM Operation Request to Pre-OS Environment 2.
+ **/
UINT32
-EFIAPI
-Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunction (
- IN UINT32 OperationRequest,
- IN UINT32 RequestParameter
+Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunctionEx (
+ IN OUT UINT32 *OperationRequest,
+ IN OUT UINT32 *RequestParameter
)
{
EFI_STATUS Status;
+ UINT32 ReturnCode;
UINTN DataSize;
EFI_TCG2_PHYSICAL_PRESENCE PpData;
EFI_TCG2_PHYSICAL_PRESENCE_FLAGS Flags;

- DEBUG ((EFI_D_INFO, "[TPM2] SubmitRequestToPreOSFunction, Request = %x, %x\n", OperationRequest, RequestParameter));
+ DEBUG ((EFI_D_INFO, "[TPM2] SubmitRequestToPreOSFunction, Request = %x, %x\n", *OperationRequest, *RequestParameter));
+ ReturnCode = TCG_PP_SUBMIT_REQUEST_TO_PREOS_SUCCESS;

//
// Get the Physical Presence variable
@@ -123,21 +125,23 @@ Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunction (
);
if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "[TPM2] Get PP variable failure! Status = %r\n", Status));
- return TCG_PP_SUBMIT_REQUEST_TO_PREOS_GENERAL_FAILURE;
+ ReturnCode = TCG_PP_SUBMIT_REQUEST_TO_PREOS_GENERAL_FAILURE;
+ goto EXIT;
}

- if ((OperationRequest > TCG2_PHYSICAL_PRESENCE_NO_ACTION_MAX) &&
- (OperationRequest < TCG2_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION) ) {
+ if ((*OperationRequest > TCG2_PHYSICAL_PRESENCE_NO_ACTION_MAX) &&
+ (*OperationRequest < TCG2_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION) ) {
//
// This command requires UI to prompt user for Auth data.
//
- return TCG_PP_SUBMIT_REQUEST_TO_PREOS_NOT_IMPLEMENTED;
+ ReturnCode = TCG_PP_SUBMIT_REQUEST_TO_PREOS_NOT_IMPLEMENTED;
+ goto EXIT;
}

- if ((PpData.PPRequest != OperationRequest) ||
- (PpData.PPRequestParameter != RequestParameter)) {
- PpData.PPRequest = (UINT8)OperationRequest;
- PpData.PPRequestParameter = RequestParameter;
+ if ((PpData.PPRequest != *OperationRequest) ||
+ (PpData.PPRequestParameter != *RequestParameter)) {
+ PpData.PPRequest = (UINT8)*OperationRequest;
+ PpData.PPRequestParameter = *RequestParameter;
DataSize = sizeof (EFI_TCG2_PHYSICAL_PRESENCE);
Status = mTcg2PpSmmVariable->SmmSetVariable (
TCG2_PHYSICAL_PRESENCE_VARIABLE,
@@ -150,10 +154,11 @@ Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunction (

if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "[TPM2] Set PP variable failure! Status = %r\n", Status));
- return TCG_PP_SUBMIT_REQUEST_TO_PREOS_GENERAL_FAILURE;
+ ReturnCode = TCG_PP_SUBMIT_REQUEST_TO_PREOS_GENERAL_FAILURE;
+ goto EXIT;
}

- if (OperationRequest >= TCG2_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION) {
+ if (*OperationRequest >= TCG2_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION) {
DataSize = sizeof (EFI_TCG2_PHYSICAL_PRESENCE_FLAGS);
Status = mTcg2PpSmmVariable->SmmGetVariable (
TCG2_PHYSICAL_PRESENCE_FLAGS_VARIABLE,
@@ -165,10 +170,60 @@ Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunction (
if (EFI_ERROR (Status)) {
Flags.PPFlags = TCG2_BIOS_TPM_MANAGEMENT_FLAG_DEFAULT;
}
- return Tcg2PpVendorLibSubmitRequestToPreOSFunction (OperationRequest, Flags.PPFlags, RequestParameter);
+ ReturnCode = Tcg2PpVendorLibSubmitRequestToPreOSFunction (*OperationRequest, Flags.PPFlags, *RequestParameter);
}

- return TCG_PP_SUBMIT_REQUEST_TO_PREOS_SUCCESS;
+EXIT:
+ //
+ // Sync PPRQ/PPRM from PP Variable if PP submission fails
+ //
+ if (ReturnCode != TCG_PP_SUBMIT_REQUEST_TO_PREOS_SUCCESS) {
+ DEBUG ((EFI_D_ERROR, "[TPM2] Submit PP Request failure! Sync PPRQ/PPRM with PP variable.\n", Status));
+ DataSize = sizeof (EFI_TCG2_PHYSICAL_PRESENCE);
+ ZeroMem(&PpData, DataSize);
+ Status = mTcg2PpSmmVariable->SmmGetVariable (
+ TCG2_PHYSICAL_PRESENCE_VARIABLE,
+ &gEfiTcg2PhysicalPresenceGuid,
+ NULL,
+ &DataSize,
+ &PpData
+ );
+ *OperationRequest = (UINT32)PpData.PPRequest;
+ *RequestParameter = PpData.PPRequestParameter;
+ }
+
+ return ReturnCode;
+}
+
+/**
+ The handler for TPM physical presence function:
+ Submit TPM Operation Request to Pre-OS Environment and
+ Submit TPM Operation Request to Pre-OS Environment 2.
+
+ This API should be invoked in OS runtime phase to interface with ACPI method.
+
+ Caution: This function may receive untrusted input.
+
+ @param[in] OperationRequest TPM physical presence operation request.
+ @param[in] RequestParameter TPM physical presence operation request parameter.
+
+ @return Return Code for Submit TPM Operation Request to Pre-OS Environment and
+ Submit TPM Operation Request to Pre-OS Environment 2.
+**/
+UINT32
+EFIAPI
+Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunction (
+ IN UINT32 OperationRequest,
+ IN UINT32 RequestParameter
+ )
+{
+ UINT32 TempOperationRequest;
+ UINT32 TempRequestParameter;
+
+ TempOperationRequest = OperationRequest;
+ TempRequestParameter = RequestParameter;
+
+ return Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunctionEx(&TempOperationRequest, &TempRequestParameter);
}

/**
diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c
index f3b7641..d02123d 100644
--- a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c
+++ b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c
@@ -119,6 +119,9 @@ PhysicalPresenceCallback (
{
UINT32 MostRecentRequest;
UINT32 Response;
+ UINT32 OperationRequest;
+ UINT32 RequestParameter;
+

if (mTcgNvs->PhysicalPresence.Parameter == TCG_ACPI_FUNCTION_RETURN_REQUEST_RESPONSE_TO_OS) {
mTcgNvs->PhysicalPresence.ReturnCode = Tcg2PhysicalPresenceLibReturnOperationResponseToOsFunction (
@@ -130,10 +133,15 @@ PhysicalPresenceCallback (
return EFI_SUCCESS;
} else if ((mTcgNvs->PhysicalPresence.Parameter == TCG_ACPI_FUNCTION_SUBMIT_REQUEST_TO_BIOS)
|| (mTcgNvs->PhysicalPresence.Parameter == TCG_ACPI_FUNCTION_SUBMIT_REQUEST_TO_BIOS_2)) {
- mTcgNvs->PhysicalPresence.ReturnCode = Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunction (
- mTcgNvs->PhysicalPresence.Request,
- mTcgNvs->PhysicalPresence.RequestParameter
+
+ OperationRequest = mTcgNvs->PhysicalPresence.Request;
+ RequestParameter = mTcgNvs->PhysicalPresence.RequestParameter;
+ mTcgNvs->PhysicalPresence.ReturnCode = Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunctionEx (
+ &OperationRequest,
+ &RequestParameter
);
+ mTcgNvs->PhysicalPresence.Request = OperationRequest;
+ mTcgNvs->PhysicalPresence.RequestParameter = RequestParameter;
} else if (mTcgNvs->PhysicalPresence.Parameter == TCG_ACPI_FUNCTION_GET_USER_CONFIRMATION_STATUS_FOR_REQUEST) {
mTcgNvs->PhysicalPresence.ReturnCode = Tcg2PhysicalPresenceLibGetUserConfirmationStatusFunction (mTcgNvs->PPRequestUserConfirm);
}
diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tpm.asl b/SecurityPkg/Tcg/Tcg2Smm/Tpm.asl
index 84143cf..2083a3e 100644
--- a/SecurityPkg/Tcg/Tcg2Smm/Tpm.asl
+++ b/SecurityPkg/Tcg/Tcg2Smm/Tpm.asl
@@ -198,6 +198,7 @@ DefinitionBlock (
//

Store (DerefOf (Index (Arg2, 0x00)), PPRQ)
+ Store (0, PPRM)
Store (0x02, PPIP)

//
--
1.9.5.msysgit.1


Re: [patch] MdeModulePkg/HiiDataBase: Fix incorrect local variable type

Liming Gao
 

Reviewed-by: Liming Gao <liming.gao@intel.com>

-----Original Message-----
From: Bi, Dandan
Sent: Monday, September 26, 2016 4:33 PM
To: edk2-devel@lists.01.org
Cc: Gao, Liming <liming.gao@intel.com>; Dong, Eric <eric.dong@intel.com>
Subject: [patch] MdeModulePkg/HiiDataBase: Fix incorrect local variable type

The type of variable "SmallestIdFromFlag" should be BOOLEAN,
this patch fix the incorrect type.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
index 9f036a5..b223300 100644
--- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
+++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
@@ -2101,11 +2101,11 @@ ParseIfrData (
LIST_ENTRY *LinkDefault;
EFI_IFR_VARSTORE_NAME_VALUE *IfrNameValueVarStore;
EFI_HII_PACKAGE_HEADER *PackageHeader;
EFI_VARSTORE_ID VarStoreId;
UINT16 SmallestDefaultId;
- UINT16 SmallestIdFromFlag;
+ BOOLEAN SmallestIdFromFlag;
BOOLEAN FromOtherDefaultOpcode;

Status = EFI_SUCCESS;
BlockData = NULL;
DefaultDataPtr = NULL;
--
1.9.5.msysgit.1


[PATCH] MdeModulePkg: add ARM/AARCH64 requirements to .dsc

Leif Lindholm <leif.lindholm@...>
 

Some LibraryClasses entries are missing to enable standalone builds
of MdeModulePkg components for ARM/AARCH64. Add those.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
---

Tying back to the conversation in
https://lists.01.org/pipermail/edk2-devel/2016-August/000733.html

If we are not going to refactor the DxeIpl code, would this be an
acceptable fix to enable standalone HelloWorld builds on ARM/AARCH64?

BaseStackCheckLib is unrelated to the DxeIpl issue, but needed in
practice on ARM and in theory on AARCH64.

MdeModulePkg/MdeModulePkg.dsc | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/MdeModulePkg/MdeModulePkg.dsc b/MdeModulePkg/MdeModulePkg.dsc
index 05120c7..3eb55db 100644
--- a/MdeModulePkg/MdeModulePkg.dsc
+++ b/MdeModulePkg/MdeModulePkg.dsc
@@ -160,6 +160,9 @@ [LibraryClasses.common.UEFI_APPLICATION]
DebugLib|MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf

[LibraryClasses.ARM, LibraryClasses.AARCH64]
+ ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf
+ ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf
+
#
# It is not possible to prevent ARM compiler calls to generic intrinsic functions.
# This library provides the instrinsic functions generated by a given compiler.
@@ -167,6 +170,12 @@ [LibraryClasses.ARM, LibraryClasses.AARCH64]
#
NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf

+ #
+ # Since software stack checking may be heuristically enabled by the compiler
+ # include BaseStackCheckLib unconditionally.
+ #
+ NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf
+
[LibraryClasses.EBC]
LockBoxLib|MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.inf

--
2.9.3


[PATCH 2/2] MdePkg/BaseMemoryLibOptDxe: replace deprecated uses of IT blocks

Ard Biesheuvel
 

The ARM architecture version 8 deprecates all uses of the IT instruction
except cases where it is followed by a single narrow instruction. So
replace any occurrences with equivalent sequences that adhere to the
new rules.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
.../Library/BaseMemoryLibOptDxe/Arm/CompareGuid.S | 6 ++---
.../Library/BaseMemoryLibOptDxe/Arm/CompareMem.S | 2 +-
MdePkg/Library/BaseMemoryLibOptDxe/Arm/CopyMem.S | 31 ++++++++++++----------
MdePkg/Library/BaseMemoryLibOptDxe/Arm/ScanMem.S | 9 ++++---
MdePkg/Library/BaseMemoryLibOptDxe/Arm/SetMem.S | 12 +++++----
5 files changed, 33 insertions(+), 27 deletions(-)

diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Arm/CompareGuid.S b/MdePkg/Library/BaseMemoryLibOptDxe/Arm/CompareGuid.S
index d729994e8cc6..6d0089049d48 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/Arm/CompareGuid.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/Arm/CompareGuid.S
@@ -42,7 +42,7 @@ ASM_PFX(InternalMemCompareGuid):
ldr lr, [r1, #4]
cmp r2, ip
it eq
- cmpeq r3, lr
+ cmpeq.n r3, lr
beq 0f
movs r0, #0
pop {r4, pc}
@@ -51,7 +51,7 @@ ASM_PFX(InternalMemCompareGuid):
ldr r3, [r1, #12]
cmp r4, r2
it eq
- cmpeq r0, r3
+ cmpeq.n r0, r3
bne 2f
movs r0, #1
pop {r4, pc}
@@ -61,5 +61,5 @@ ASM_PFX(InternalMemCompareGuid):
movs r0, #1
orrs r2, r2, r4
2: it ne
- movne r0, #0
+ movne.n r0, #0
pop {r4, pc}
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Arm/CompareMem.S b/MdePkg/Library/BaseMemoryLibOptDxe/Arm/CompareMem.S
index 3aadebace30f..9483aab61a0c 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/Arm/CompareMem.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/Arm/CompareMem.S
@@ -132,7 +132,7 @@ ASM_PFX(InternalMemCompareMem):
ldrb data2, [src2], #1
subs limit, limit, #1
it cs
- cmpcs data1, data2
+ cmpcs.n data1, data2
beq 1b
sub result, data1, data2
pop {r4-r8, pc}
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Arm/CopyMem.S b/MdePkg/Library/BaseMemoryLibOptDxe/Arm/CopyMem.S
index fb5293befc10..195a0b23f770 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/Arm/CopyMem.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/Arm/CopyMem.S
@@ -65,16 +65,18 @@ memcopy_check_optim_default:
// Check if we can use an optimized path ((length >= 32) && destination word-aligned && source word-aligned) for the memcopy (optimized path if r0 == 1)
tst r0, #0xF
it ne
- movne r0, #0
+ movne.n r0, #0
bne memcopy_default
tst r1, #0xF
- ite ne
- movne r3, #0
- moveq r3, #1
+ it ne
+ movne.n r3, #0
+ it eq
+ moveq.n r3, #1
cmp r2, #31
- ite ls
- movls r0, #0
- andhi r0, r3, #1
+ it ls
+ movls.n r0, #0
+ bls memcopy_default
+ and r0, r3, #1
b memcopy_default

memcopy_check_optim_overlap:
@@ -84,15 +86,16 @@ memcopy_check_optim_overlap:

// Are we in the optimized case ((length >= 32) && dest_end word-aligned && source_end word-aligned)
cmp r2, #31
- ite ls
- movls r0, #0
- movhi r0, #1
+ it ls
+ movls.n r0, #0
+ it hi
+ movhi.n r0, #1
tst r10, #0xF
it ne
- movne r0, #0
+ movne.n r0, #0
tst r14, #0xF
it ne
- movne r0, #0
+ movne.n r0, #0
b memcopy_overlapped

memcopy_overlapped_non_optim:
@@ -123,7 +126,7 @@ memcopy_overlapped:

// If length is less than 32 then disable optim
it ls
- movls r0, #0
+ movls.n r0, #0

cmp r12, #0

@@ -157,7 +160,7 @@ memcopy_default_loop:

// If length is less than 32 then disable optim
it ls
- movls r0, #0
+ movls.n r0, #0

cmp r12, #0

diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Arm/ScanMem.S b/MdePkg/Library/BaseMemoryLibOptDxe/Arm/ScanMem.S
index 1c269547b072..5dcf153a61a9 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/Arm/ScanMem.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/Arm/ScanMem.S
@@ -123,11 +123,12 @@ ASM_PFX(InternalMemScanMem8):
60: // We're here because the fast path found a hit - now we have to track down exactly which word it was
// r0 points to the start of the double word after the one that was tested
// r5 has the 00/ff pattern for the first word, r6 has the chained value
+ subs r0, r0, #3
cmp r5, #0
- itte eq
- moveq r5, r6 // the end is in the 2nd word
- subeq r0, r0, #3 // Points to 2nd byte of 2nd word
- subne r0, r0, #7 // or 2nd byte of 1st word
+ it eq
+ moveq.n r5, r6 // the end is in the 2nd word
+ it ne
+ subne.n r0, r0, #4 // or 2nd byte of 1st word

// r0 currently points to the 3rd byte of the word containing the hit
tst r5, #CHARTSTMASK(0) // 1st character
diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Arm/SetMem.S b/MdePkg/Library/BaseMemoryLibOptDxe/Arm/SetMem.S
index add04443b2e9..2d8f4d5b8621 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/Arm/SetMem.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/Arm/SetMem.S
@@ -73,15 +73,17 @@ ASM_PFX(InternalMemZeroMem):
cmp r4, #4 // between 4 and 15 bytes?
blt 4f
cmp r4, #8 // between 8 and 15 bytes?
- str r2, [lr, #-16] // overlapping store of 4 + (4 + 4) + 4 bytes
- itt gt
- strgt r3, [lr, #-12]
- strgt r2, [r1]
+ sub r4, lr, #16
+ str r2, [r4] // overlapping store of 4 + (4 + 4) + 4 bytes
+ it gt
+ strgt.n r3, [r4, #4]
+ it gt
+ strgt.n r2, [r1]
str r3, [r1, #4]
pop {r4, pc}

4: cmp r4, #2 // 2 or 3 bytes?
strb r2, [lr, #-16] // store 1 byte
it ge
- strhge r2, [r1, #6] // store 2 bytes
+ strhge.n r2, [r1, #6] // store 2 bytes
pop {r4, pc}
--
2.7.4


[PATCH 1/2] MdePkg/BaseMemoryLibOptDxe ARM: fix Thumb-2 bug in ScanMem()

Ard Biesheuvel
 

The ARM ScanMem() in BaseMemoryLibOptDxe contains code from the open
source cortex-strings library, and inherited a bug from it where the
conditional execution of a sequence of instructions is erroneously
made dependent on the same condition. Since the final 'addeq' is
supposed to be dependent on the preceding 'tsteq' instruction, they
cannot be part of the same IT block.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
MdePkg/Library/BaseMemoryLibOptDxe/Arm/ScanMem.S | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Arm/ScanMem.S b/MdePkg/Library/BaseMemoryLibOptDxe/Arm/ScanMem.S
index dc0e74e8657c..1c269547b072 100644
--- a/MdePkg/Library/BaseMemoryLibOptDxe/Arm/ScanMem.S
+++ b/MdePkg/Library/BaseMemoryLibOptDxe/Arm/ScanMem.S
@@ -134,11 +134,12 @@ ASM_PFX(InternalMemScanMem8):
bne 61f
adds r0, r0, #1
tst r5, #CHARTSTMASK(1) // 2nd character
- ittt eq
- addeq r0, r0 ,#1
- tsteq r5, #(3 << 15) // 2nd & 3rd character
+ bne 61f
+ adds r0, r0 ,#1
+ tst r5, #(3 << 15) // 2nd & 3rd character
// If not the 3rd must be the last one
- addeq r0, r0, #1
+ it eq
+ addeq.n r0, r0, #1

61:
pop {r4-r7}
--
2.7.4


Re: [PATCH] ArmPkg-Drivers/CpuDxe: Fix Mmu Initialization Problem.

Ard Biesheuvel
 

On 26 September 2016 at 15:49, Kurt Kennett <Kurt.Kennett@microsoft.com> wrote:
During Mmu initialization in the CpuDxe, for a page table any bits set
in the 'NextSectionAttributes' are garbage and were set from bits that
are actually part of the pagetable address. We clear it out to zero
so that the SyncCacheConfigPage will use the page attributes instead
of trying to convert the (bogus) section attributes into page
attributes.

Contributed-under: TianoCore Contribution Agreement 1.0

Signed-off-by: Kurt Kennett <mailto:kurt.kennett@microsoft.com>
---
ArmPkg/Drivers/CpuDxe/Arm/Mmu.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c
b/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c index 63da8ba..64ef1bb 100644
--- a/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c
+++ b/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c
@@ -297,6 +297,11 @@ SyncCacheConfig (
}
NextRegionLength += TT_DESCRIPTOR_SECTION_SIZE;
} else if (TT_DESCRIPTOR_SECTION_TYPE_IS_PAGE_TABLE(FirstLevelTable[i])) {
+ // In this case any bits set in the 'NextSectionAttributes' are garbage and were set from
+ // bits that are actually part of the pagetable address. We clear it out to zero so that
+ // the SyncCacheConfigPage will use the page attributes instead of trying to convert the
+ // section attributes into page attributes
+ NextSectionAttributes = 0;
Status = SyncCacheConfigPage (
i,FirstLevelTable[i],
NumberOfDescriptors, MemorySpaceMap,
--
2.9.0.windows
Reviewed-by: Ard Biesheuve <ard.biesheuvel@linaro.org>

Pushed as f6be48e9907d

Thanks Kurt!


[PATCH] ArmPkg-Drivers/CpuDxe: Fix Mmu Initialization Problem.

Kurt Kennett <Kurt.Kennett@...>
 

During Mmu initialization in the CpuDxe, for a page table any bits set
in the 'NextSectionAttributes' are garbage and were set from bits that
are actually part of the pagetable address. We clear it out to zero
so that the SyncCacheConfigPage will use the page attributes instead
of trying to convert the (bogus) section attributes into page
attributes.

Contributed-under: TianoCore Contribution Agreement 1.0

Signed-off-by: Kurt Kennett <mailto:kurt.kennett@microsoft.com>
---
ArmPkg/Drivers/CpuDxe/Arm/Mmu.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c
b/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c index 63da8ba..64ef1bb 100644
--- a/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c
+++ b/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c
@@ -297,6 +297,11 @@ SyncCacheConfig (
}
NextRegionLength += TT_DESCRIPTOR_SECTION_SIZE;
} else if (TT_DESCRIPTOR_SECTION_TYPE_IS_PAGE_TABLE(FirstLevelTable[i])) {
+ // In this case any bits set in the 'NextSectionAttributes' are garbage and were set from
+ // bits that are actually part of the pagetable address. We clear it out to zero so that
+ // the SyncCacheConfigPage will use the page attributes instead of trying to convert the
+ // section attributes into page attributes
+ NextSectionAttributes = 0;
Status = SyncCacheConfigPage (
i,FirstLevelTable[i],
NumberOfDescriptors, MemorySpaceMap,
--
2.9.0.windows

K2


Re: [PATCH] [MdePkg ] New Debug Message Levels

Michael D Kinney
 

Felix,

It is the use case for DEBUG_NET|DEBUG_INFO that I am concerned about.

I agree that setting either or both of these bits activates the message.

We already support setting the mask at the module level, so we have control
over verbosity with use of ERROR, WARN, INFO, VERBOSE in each module. However,
setting the mask for every module can be time consuming, so it is easier
to set the global mask value at the top of the DSC file. In this example,
if only NET messages are needed, then the NET bit is set in the mask.
However, you will get all messages that are ORed with NET, so there is no
ability to enable/disable ERROR, WARN, INFO, VERBOSE within the NET subsystem.

I am concerned that adding more subsystems without the ability to adjust
these other levels will become an issue because we are running out of bits
in the mask. What if there is a request for NET_1, NET_2, ... NET_n for
verbose levels within a specific subsystem.

I agree that one solution is to have a different DebugLib implementation
that interprets the bits differently, but that could make implementing
DEBUG() statements more difficult because developers will see multiple
interpretations of the mask.

I would prefer to look into ways we can enhance the current DebugLib
to provide control over verbosity within a subsystem.

One proposal is to treat some of the bits as a verbosity mask bits and
others as subsystem mask bits and have well defined rules for the behavior
when bits are mixed together.

We could view the following bits as verbosity settings:
* DEBUG_INIT
* DEBUG_INFO
* DEBUG_VERBOSE

The following bits are critical error/warn messages that are
displayed no matter what verbosity bits are mixed with them
* DEBUG_ERROR
* DEBUG_WARN

And the rest of the bits are subsystem specific messages that
support being mixed with a verbosity bits:

UEFI/PI Core Subsystems
========================
DEBUG_LOAD
DEBUG_POOL
DEBUG_PAGE
DEBUG_GCD
DEBUG_DISPATCH
DEBUG_EVENT
DEBUG_VARIABLE
DEBUG_BM

CPU Subsystems
==============
DEBUG_CACHE

I/O Subsystems
==============
DEBUG_BLKIO
DEBUG_FS
DEBUG_NET
DEBUG_UNDI
DEBUG_LOADFILE

Would be a small change to the behavior of current DebugLib.

Then add your new subsystem bits.

And consider adding a couple extra verbosity levels such as
VERBOSE2, VERBOSE3, VERBOSE4, so all subsystems can have
multiple levels of verbosity,

Best regards,

Mike

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Felix Poludov
Sent: Monday, September 26, 2016 2:06 PM
To: Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming
<liming.gao@intel.com>; edk2-devel@lists.01.org
Subject: Re: [edk2] [PATCH] [MdePkg ] New Debug Message Levels

Mike,

The goal is to provide a higher level of granularity in controlling debug messages.
Or to put it in different terms, improve developer's ability to reduce amount of
"noise" in the debug log.
For example, if I'm debugging a chipset-specific issue, I'm not necessarily
interested in debug messages from the generic modules and vice versa.

As far as combing the definitions, I think we can leave it up to individual
developers.
I know that with the current implementation DebugPrint statement is printed if it
least one of the used levels is enabled.
For example, DEBUG_NET|DEBUG_INFO is printed when either DEBUG_NET, or DEBUG_INFO, or
both are enabled.
I think this is fine.
Moreover, it's pretty easy to customize the default policy by using a custom DebugLib
and/or DebugPrintErrorLevel instances.


-----Original Message-----
From: Kinney, Michael D [mailto:michael.d.kinney@intel.com]
Sent: Wednesday, September 21, 2016 2:10 AM
To: Felix Poludov; Gao, Liming; edk2-devel@lists.01.org
Subject: RE: [PATCH] [MdePkg ] New Debug Message Levels

Felix,

Thanks for the quick update.

Quick question on usage model. Do you expect to be able to mix
an I/O subsystem bit with ERROR, WARN, INFO, or VERBOSE bits?

Unfortunately, I do not think the current definition and implementation
of the DebugLib instances support this type mixing with a result a
developer may expect.

Can you summarize or provide some example use cases for these new bits?

Thanks,

Mike


-----Original Message-----
From: Felix Poludov [mailto:Felixp@ami.com]
Sent: Tuesday, September 20, 2016 12:29 PM
To: Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming
<liming.gao@intel.com>; edk2-devel@lists.01.org
Subject: RE: [PATCH] [MdePkg ] New Debug Message Levels

Mike and Liming,

Thanks for reviewing the patch.
I implemented all the requested modifications:
- EFI_D_ definitions are removed
- DEBUG_CSM is removed
- Validation expression in MdePkg.dec is updated
- MdePkg.uni is updated

Here is the updated patch
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Felix Polyudov <felixp@ami.com>
==
diff --git a/MdePkg/Include/Library/DebugLib.h b/MdePkg/Include/Library/DebugLib.h
index 803872c..34ea29f 100644
--- a/MdePkg/Include/Library/DebugLib.h
+++ b/MdePkg/Include/Library/DebugLib.h
@@ -54,6 +54,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER
EXPRESS
OR IMPLIED.
#define DEBUG_CACHE 0x00200000 // Memory range cachability changes
#define DEBUG_VERBOSE 0x00400000 // Detailed debug messages that may
// significantly impact boot performance
+#define DEBUG_USB 0x00000200 // USB Driver
+#define DEBUG_PCI 0x00000800 // PCI Bus Driver
+#define DEBUG_CPU 0x00002000 // Processor Driver
+#define DEBUG_CHIPSET 0x00008000 // Chipset/SoC Drivers
+#define DEBUG_PLATFORM 0x00040000 // Platform/Board Drivers
#define DEBUG_ERROR 0x80000000 // Error

//
diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
index 606e2f1..1747bb1 100644
--- a/MdePkg/MdePkg.dec
+++ b/MdePkg/MdePkg.dec
@@ -1883,11 +1883,16 @@
# BIT6 - Information message.<BR>
# BIT7 - Dispatcher message.<BR>
# BIT8 - Variable message.<BR>
+ # BIT9 - USB Driver message.<BR>
# BIT10 - Boot Manager message.<BR>
+ # BIT11 - PCI Bus Driver message.<BR>
# BIT12 - BlockIo Driver message.<BR>
+ # BIT13 - Processor Driver message.<BR>
# BIT14 - Network Driver message.<BR>
+ # BIT15 - Chipset/SoC Driver message.<BR>
# BIT16 - UNDI Driver message.<BR>
# BIT17 - LoadFile message.<BR>
+ # BIT18 - Platform/Board Driver message.<BR>
# BIT19 - Event message.<BR>
# BIT20 - Global Coherency Database changes message.<BR>
# BIT21 - Memory range cachability changes message.<BR>
@@ -1951,18 +1956,23 @@
# BIT6 - Information message.<BR>
# BIT7 - Dispatcher message.<BR>
# BIT8 - Variable message.<BR>
+ # BIT9 - USB Driver message.<BR>
# BIT10 - Boot Manager message.<BR>
+ # BIT11 - PCI Bus Driver message.<BR>
# BIT12 - BlockIo Driver message.<BR>
+ # BIT13 - Processor Driver message.<BR>
# BIT14 - Network Driver message.<BR>
+ # BIT15 - Chipset/SoC Driver message.<BR>
# BIT16 - UNDI Driver message.<BR>
# BIT17 - LoadFile message.<BR>
+ # BIT18 - Platform/Board Driver message.<BR>
# BIT19 - Event message.<BR>
# BIT20 - Global Coherency Database changes message.<BR>
# BIT21 - Memory range cachability changes message.<BR>
# BIT22 - Detailed debug message.<BR>
# BIT31 - Error message.<BR>
# @Prompt Debug Message Print Level.
- # @Expression 0x80000002 | (gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel &
0x7F84AA00) == 0
+ # @Expression 0x80000002 | (gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel &
0x7F800000) == 0
gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000000|UINT32|0x00000006

## The mask is used to control ReportStatusCodeLib behavior.<BR><BR>
diff --git a/MdePkg/MdePkg.uni b/MdePkg/MdePkg.uni
index a110e45..4f3999d 100644
--- a/MdePkg/MdePkg.uni
+++ b/MdePkg/MdePkg.uni
@@ -196,11 +196,16 @@

"BIT6 - Information message.<BR>\n"

"BIT7 - Dispatcher message.<BR>\n"

"BIT8 - Variable message.<BR>\n"
+
"BIT9 - USB Driver message.<BR>\n"

"BIT10 - Boot Manager message.<BR>\n"
+
"BIT11 - PCI Bus Driver message.<BR>\n"

"BIT12 - BlockIo Driver message.<BR>\n"
+
"BIT13 - Processor Driver message.<BR>\n"

"BIT14 - Network Driver message.<BR>\n"
+
"BIT15 - Chipset/SoC Driver message.<BR>\n"

"BIT16 - UNDI Driver message.<BR>\n"

"BIT17 - LoadFile message.<BR>\n"
+
"BIT18 - Platform/Board Driver message.<BR>\n"

"BIT19 - Event message.<BR>\n"

"BIT20 - Global Coherency Database changes message.<BR>\n"

"BIT21 - Memory range cacheability changes message.<BR>\n"
@@ -219,11 +224,16 @@

"BIT6 - Information message.<BR>\n"

"BIT7 - Dispatcher message.<BR>\n"

"BIT8 - Variable message.<BR>\n"
+
"BIT9 - USB Driver message.<BR>\n"

"BIT10 - Boot Manager message.<BR>\n"
+
"BIT11 - PCI Bus Driver message.<BR>\n"

"BIT12 - BlockIo Driver message.<BR>\n"
+
"BIT13 - Processor Driver message.<BR>\n"

"BIT14 - Network Driver message.<BR>\n"
+
"BIT15 - Chipset/SoC Driver message.<BR>\n"

"BIT16 - UNDI Driver message.<BR>\n"

"BIT17 - LoadFile message.<BR>\n"
+
"BIT18 - Platform/Board Driver message.<BR>\n"

"BIT19 - Event message.<BR>\n"

"BIT20 - Global Coherency Database changes message.<BR>\n"

"BIT21 - Memory range cacheability changes message.<BR>\n"
==

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Kinney,
Michael D
Sent: Tuesday, September 20, 2016 12:26 PM
To: Gao, Liming; Felix Poludov; edk2-devel@lists.01.org; Kinney, Michael D
Subject: Re: [edk2] [PATCH] [MdePkg ] New Debug Message Levels

Felix,

We should only add the DEBUG_ defines for new bit values. We would like to retire
the use of EFI_D_ defines and encourage use of DEBUG_ defines. The reason is that
DEBUG() macros apply to all execution phases and module types.

Also, what is the use case for DEBUG_CSM. I would image this would only be used
for
CSM wrapper modules, and the exiting define values should be sufficient for that
specific use case. That bit mask is starting to get full.

Thanks,

Mike

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Gao,
Liming
Sent: Tuesday, September 20, 2016 7:01 AM
To: Felix Poludov <Felixp@ami.com>; edk2-devel@lists.01.org
Subject: Re: [edk2] [PATCH] [MdePkg ] New Debug Message Levels

Felix:
I have two comments.
1) Update @Expression 0x80000002 |
(gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel
& 0x7F84AA00) == 0. 0x7F84AA00 should be updated to match the valid debug error
level
bit mask.
2) PCD help message in MdePkg.uni is also required to be updated.

Thanks
Liming
-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Felix
Poludov
Sent: Thursday, September 15, 2016 3:27 AM
To: edk2-devel@lists.01.org
Subject: Re: [edk2] [PATCH] [MdePkg ] New Debug Message Levels

Resending with the patch (the patch was missing in the original e-mail).

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Felix
Poludov
Sent: Wednesday, September 14, 2016 12:05 PM
To: edk2-devel@lists.01.org
Subject: [edk2] [PATCH] [MdePkg ] New Debug Message Levels

Dear MdePkg maintainer,

DebugLib.h defines debug message levels. Some values such as DEBUG_ERROR and
DEBUG_INFO define messages category, whereas other values such as DEBUG_BLKIO and
DEBUG_VARIABLE define message domain.
This patch adds definitions for several additional message domains.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Felix Polyudov <felixp@ami.com<mailto:felixp@ami.com>>

Thanks
Felix

==
diff --git a/MdePkg/Include/Library/DebugLib.h
b/MdePkg/Include/Library/DebugLib.h
index 803872c..47549b7 100644
--- a/MdePkg/Include/Library/DebugLib.h
+++ b/MdePkg/Include/Library/DebugLib.h
@@ -54,6 +54,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER
EXPRESS
OR IMPLIED.
#define DEBUG_CACHE 0x00200000 // Memory range cachability changes
#define DEBUG_VERBOSE 0x00400000 // Detailed debug messages that may
// significantly impact boot performance
+#define DEBUG_USB 0x00000200 // USB Driver
+#define DEBUG_PCI 0x00000800 // PCI Bus Driver
+#define DEBUG_CSM 0x00002000 // Compatibility Support Module
+#define DEBUG_CPU 0x00008000 // Processor Driver
+#define DEBUG_CHIPSET 0x00040000 // Chipset/SoC Drivers
+#define DEBUG_PLATFORM 0x00800000 // Platform/Board Drivers
#define DEBUG_ERROR 0x80000000 // Error

//
@@ -75,6 +81,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER
EXPRESS
OR IMPLIED.
#define EFI_D_LOADFILE DEBUG_LOADFILE
#define EFI_D_EVENT DEBUG_EVENT
#define EFI_D_VERBOSE DEBUG_VERBOSE
+#define EFI_D_USB DEBUG_USB
+#define EFI_D_PCI DEBUG_PCI
+#define EFI_D_CSM DEBUG_CSM
+#define EFI_D_CPU DEBUG_CPU
+#define EFI_D_CHIPSET DEBUG_CHIPSET
+#define EFI_D_PLATFORM DEBUG_PLATFORM
#define EFI_D_ERROR DEBUG_ERROR

/**
diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
index 606e2f1..eaae076 100644
--- a/MdePkg/MdePkg.dec
+++ b/MdePkg/MdePkg.dec
@@ -1883,15 +1883,21 @@
# BIT6 - Information message.<BR>
# BIT7 - Dispatcher message.<BR>
# BIT8 - Variable message.<BR>
+ # BIT9 - USB Driver message.<BR>
# BIT10 - Boot Manager message.<BR>
+ # BIT11 - PCI Bus Driver message.<BR>
# BIT12 - BlockIo Driver message.<BR>
+ # BIT13 - Compatibility Support Module message.<BR>
# BIT14 - Network Driver message.<BR>
+ # BIT15 - Processor Driver message.<BR>
# BIT16 - UNDI Driver message.<BR>
# BIT17 - LoadFile message.<BR>
+ # BIT18 - Chipset/SoC Driver message.<BR>
# BIT19 - Event message.<BR>
# BIT20 - Global Coherency Database changes message.<BR>
# BIT21 - Memory range cachability changes message.<BR>
# BIT22 - Detailed debug message.<BR>
+ # BIT23 - Platform/Board Driver message.<BR>
# BIT31 - Error message.<BR>
# @Prompt Fixed Debug Message Print Level.
gEfiMdePkgTokenSpaceGuid.PcdFixedDebugPrintErrorLevel|0xFFFFFFFF|UINT32|0x30001016
@@ -1951,15 +1957,21 @@
# BIT6 - Information message.<BR>
# BIT7 - Dispatcher message.<BR>
# BIT8 - Variable message.<BR>
+ # BIT9 - USB Driver message.<BR>
# BIT10 - Boot Manager message.<BR>
+ # BIT11 - PCI Bus Driver message.<BR>
# BIT12 - BlockIo Driver message.<BR>
+ # BIT13 - Compatibility Support Module message.<BR>
# BIT14 - Network Driver message.<BR>
+ # BIT15 - Processor Driver message.<BR>
# BIT16 - UNDI Driver message.<BR>
# BIT17 - LoadFile message.<BR>
+ # BIT18 - Chipset/SoC Driver message.<BR>
# BIT19 - Event message.<BR>
# BIT20 - Global Coherency Database changes message.<BR>
# BIT21 - Memory range cachability changes message.<BR>
# BIT22 - Detailed debug message.<BR>
+ # BIT23 - Platform/Board Driver message.<BR>
# BIT31 - Error message.<BR>
# @Prompt Debug Message Print Level.
# @Expression 0x80000002 | (gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel
&
0x7F84AA00) == 0

Please consider the environment before printing this email.

The information contained in this message may be confidential and proprietary to
American Megatrends, Inc. This communication is intended to be read only by the
individual or entity to whom it is addressed or by their designee. If the reader
of
this message is not the intended recipient, you are on notice that any
distribution
of this message, in any form, is strictly prohibited. Please promptly notify the
sender by reply e-mail or by telephone at 770-246-8600, and then delete or
destroy
all copies of the transmission.
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Please consider the environment before printing this email.

The information contained in this message may be confidential and proprietary to
American Megatrends, Inc. This communication is intended to be read only by the
individual or entity to whom it is addressed or by their designee. If the reader of
this message is not the intended recipient, you are on notice that any distribution
of this message, in any form, is strictly prohibited. Please promptly notify the
sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy
all copies of the transmission.
Please consider the environment before printing this email.

The information contained in this message may be confidential and proprietary to
American Megatrends, Inc. This communication is intended to be read only by the
individual or entity to whom it is addressed or by their designee. If the reader of
this message is not the intended recipient, you are on notice that any distribution
of this message, in any form, is strictly prohibited. Please promptly notify the
sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy
all copies of the transmission.
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [PATCH] ArmPkg-Drivers/CpuDxe: Fix Mmu Initialization Problem.

Ard Biesheuvel
 

On 26 September 2016 at 10:22, Kurt Kennett <Kurt.Kennett@microsoft.com> wrote:
During Mmu initialization in the CpuDxe, for a page table any bits set
in the 'NextSectionAttributes' are garbage and were set from bits that
are actually part of the pagetable address. We clear it out to zero
so that the SyncCacheConfigPage will use the page attributes instead
of trying to convert the (bogus) section attributes into page
attributes.

Contributed-under: TianoCore Contribution Agreement 1.0

Signed-off-by: Kurt Kennett <mailto:kurt.kennett@microsoft.com>
---
ArmPkg/Drivers/CpuDxe/Arm/Mmu.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c b/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c index 63da8ba..64ef1bb 100644
--- a/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c
+++ b/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c
@@ -297,6 +297,11 @@ SyncCacheConfig (
}
NextRegionLength += TT_DESCRIPTOR_SECTION_SIZE;
} else if (TT_DESCRIPTOR_SECTION_TYPE_IS_PAGE_TABLE(FirstLevelTable[i])) {
+ // In this case any bits set in the 'NextSectionAttributes' are garbage and were set from
+ // bits that are actually part of the pagetable address. We clear it out to zero so that
+ // the SyncCacheConfigPage will use the page attributes instead of trying to convert the
+ // section attributes into page attributes
+ NextSectionAttributes = 0;
No, still wacky space characters here. Are you using MS Word :-)