Re: [edk2-devel] [PATCH v2 1/4] uefi-sct/SctPkg: TCG2 Protocol: correct definition of TPMT_HA struct

2024-04-24 Thread Stuart Yoder
Hi Edhaya, Yes, we could get rid of the TPM 2.0 definitions and include the MdePkg definition, but it will require rework of TCG2.h to remove duplicate definitions. But, what is the general of philosophy of what source code edk2-test should include from edk2?  Since the purpose of edk2-test

[edk2-devel] [PATCH v2 2/4] uefi-sct/SctPkg: TCG2 Protocol: use OFFSET_OF for computing offsets

2024-04-16 Thread Stuart Yoder
Use compiler-independent OFFSET_OF macro defined from Base.h instead of the GCC specific __builtin_offsetof Signed-off-by: Stuart Yoder --- uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/TCG2/BlackBoxTest/TCG2ProtocolBBTestConformance.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions

[edk2-devel] [PATCH v2 3/4] uefi-sct/SctPkg: TCG2 Protocol: #pragma pack cleanup

2024-04-16 Thread Stuart Yoder
Fix compiler warning by adding #pragma pack() to close a pragma section. Also delete extraneous #pragma pack(1). Signed-off-by: Stuart Yoder Reviewed-by: Heinrich Schuchardt --- uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/TCG2/BlackBoxTest/TCG2ProtocolBBTest.h | 3 +-- 1 file changed, 1

[edk2-devel] [PATCH v2 4/4] uefi-sct/SctPkg: TCG2 Protocol: clean up type conversion warnings

2024-04-16 Thread Stuart Yoder
The VS2015x86 build encountered errors due to type conversion warnings. Resolve these by adding casts and refactoring. Signed-off-by: Stuart Yoder --- uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/TCG2/BlackBoxTest/TCG2ProtocolBBTestConformance.c | 18 -- 1 file changed, 8

[edk2-devel] [PATCH v2 0/4] TCG2 protocol clean up

2024-04-16 Thread Stuart Yoder
-resolve type conversion warnings Patches are in github here: https://github.com/stuyod01/edk2-test/tree/tcg2-cleanup Version 2 -add SM3 hash type to TPM2.h -resolve type conversion warnings Stuart Yoder (4): uefi-sct/SctPkg: TCG2 Protocol: correct definition of TPMT_HA struct uefi-sct/SctPkg

[edk2-devel] [PATCH v2 1/4] uefi-sct/SctPkg: TCG2 Protocol: correct definition of TPMT_HA struct

2024-04-16 Thread Stuart Yoder
e the size of hash algorithms varies, this should have been defined as a union of the sizes of supported hash algorithms. This is how is it done in the TPM Library specfication and in EDK2. In addition, added the SM3 hash type to align with the TPM Library spec. Signed-off-by: Stuart Yoder ---

[edk2-devel] [PATCH v1 3/3] uefi-sct/SctPkg: TCG2 Protocol: #pragma pack cleanup

2024-04-15 Thread Stuart Yoder
Fix compiler warning by adding #pragma pack() to close a pragma section. Also delete extraneous #pragma pack(1). Signed-off-by: Stuart Yoder --- uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/TCG2/BlackBoxTest/TCG2ProtocolBBTest.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff

[edk2-devel] [PATCH v1 0/3] TCG2 protocol clean up

2024-04-15 Thread Stuart Yoder
are in github here: https://github.com/stuyod01/edk2-test/tree/tcg2-cleanup Stuart Yoder (3): uefi-sct/SctPkg: TCG2 Protocol: correct definition of TPMT_HA struct uefi-sct/SctPkg: TCG2 Protocol: use OFFSET_OF for computing offsets uefi-sct/SctPkg: TCG2 Protocol: #pragma pack cleanup uefi

[edk2-devel] [PATCH v1 1/3] uefi-sct/SctPkg: TCG2 Protocol: correct definition of TPMT_HA struct

2024-04-15 Thread Stuart Yoder
e the size of hash algorithms varies, this should have been defined as a union of the sizes of supported hash algorithms. This is how is it done in the TPM Library specfication and in EDK2. Signed-off-by: Stuart Yoder --- uefi-sct/SctPkg/UEFI/Protocol/TCG2.h | 13 - 1 file change

[edk2-devel] [PATCH v1 2/3] uefi-sct/SctPkg: TCG2 Protocol: use OFFSET_OF for computing offsets

2024-04-15 Thread Stuart Yoder
Use compiler-independent OFFSET_OF macro defined from Base.h instead of the GCC specific __builtin_offsetof Signed-off-by: Stuart Yoder --- uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/TCG2/BlackBoxTest/TCG2ProtocolBBTestConformance.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions

Re: [edk2-devel] [PATCH v4 3/3] ShellPkg: UefiShellDebug1CommandsLib: Conformance Profiles in Dmem.c

2024-04-04 Thread Stuart Yoder
mem.c | 69 ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni | 5 ++ 5 files changed, 138 insertions(+) Tested-by: Stuart Yoder Tested on EDK2, output looks like: Conformance Profile

Re: [edk2-devel] [PATCH v4 2/3] ShellPkg: UefiShellDebug1CommandsLib: Image Execution Table in Dmem.c

2024-04-04 Thread Stuart Yoder
/UefiShellDebug1CommandsLib.uni | 3 + 2 files changed, 137 insertions(+) Tested-by: Stuart Yoder Tested on EDK2, verbose output looks like: Image Execution Table TestImage1.bin: AUTH_UNTESTED TestImage2.bin: AUTH_UNTESTED TestImage6.bin: AUTH_SIG_FAILED

Re: [edk2-devel] [PATCH v4 1/3] ShellPkg: UefiShellDebug1CommandsLib: Dumping RT Properties in Dmem.c

2024-04-04 Thread Stuart Yoder
ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni | 23 ++- 2 files changed, 84 insertions(+), 2 deletions(-) Tested-by: Stuart Yoder RT properties is not implemented in EDK2, but is in the EFI implementation in u-boot. Output looks like this: RT

Re: [edk2-devel] [PATCH v4 3/3] ShellPkg: UefiShellDebug1CommandsLib: Conformance Profiles in Dmem.c

2024-04-04 Thread Stuart Yoder
Reviewed-by: Stuart Yoder On 4/3/24 4:19 PM, Sam Kaynor via groups.io wrote: REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4352 Implemented dumping of the UEFI Conformance Profiles Table using Dmem.c Additionally added the base support for the table with new header file

Re: [edk2-devel] [PATCH v4 2/3] ShellPkg: UefiShellDebug1CommandsLib: Image Execution Table in Dmem.c

2024-04-04 Thread Stuart Yoder
Reviewed-by: Stuart Yoder On 4/3/24 4:19 PM, Sam Kaynor via groups.io wrote: REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4352 Implemented dumping of the Image Execution Table using Dmem.c Cc: Ray Ni Cc: Zhichao Gao Signed-off-by: Sam Kaynor --- Notes: v4: - changed

Re: [edk2-devel] [PATCH v4 1/3] ShellPkg: UefiShellDebug1CommandsLib: Dumping RT Properties in Dmem.c

2024-04-04 Thread Stuart Yoder
Reviewed-by: Stuart Yoder On 4/3/24 4:19 PM, Sam Kaynor via groups.io wrote: REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4352 Implemented the dumping of the UEFI RT Properties Table using Dmem.c Added new entry to the help command for the -verbose option Cc: Ray Ni Cc: Zhichao Gao

Re: [edk2-devel] [PATCH v3 1/3] ShellPkg: UefiShellDebug1CommandsLib: Dumping RT Properties in Dmem.c

2024-04-01 Thread Stuart Yoder
Hi Sam, See comments below... +SHELL_STATUS +DisplayRtProperties ( + IN UINT64 Address + ) +{ + EFI_RT_PROPERTIES_TABLE *RtPropertiesTable; + UINT32 RtServices; + SHELL_STATUSShellStatus; + EFI_STATUS Status; + + ShellStatus = SHELL_SUCCESS; + +

Re: [edk2-devel] [PATCH v1 1/6] uefi-sct/SctPkg: TCG2 Protocol: add header with TCG2 protocol definitions

2024-03-05 Thread Stuart Yoder
On 12/15/23 8:30 AM, Heinrich Schuchardt wrote: On 12/15/23 00:39, Stuart Yoder wrote: From: Joseph Hemann Please, provide commit messages. This is fixed in v2 of the patch series. (Sent Jan 9) Thanks, Stuart -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to

Re: [edk2-devel] [PATCH v1 1/3] ShellPkg: UefiShellDebug1CommandsLib: Dumping RT Properties in Dmem.c

2024-03-04 Thread Stuart Yoder
Hi Sam, See inline comments... On 1/24/24 2:56 PM, Sam Kaynor wrote: REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4352 Implemented the dumping of the UEFI RT Properties Table using Dmem.c Cc: Ray Ni Cc: Zhichao Gao Signed-off-by: Sam Kaynor --- ShellPkg/Library/UefiShellDebug1Comm

Re: [edk2-devel] [PATCH v1 3/3] ShellPkg: UefiShellDebug1CommandsLib: Conformance Profiles in Dmem.c

2024-03-04 Thread Stuart Yoder
Hi Sam, See inline comments... On 1/24/24 2:56 PM, Sam Kaynor wrote: REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4352 Implemented dumping of the UEFI Conformance Profiles Table using Dmem.c Additionally added the base support for the table with new header file ConformanceProfiles.h (Cc

Re: [edk2-devel] [PATCH v1 2/3] ShellPkg: UefiShellDebug1CommandsLib: Image Execution Table in Dmem.c

2024-03-04 Thread Stuart Yoder
Hi Sam, See inline comments... On 1/24/24 2:56 PM, Sam Kaynor wrote: REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4352 Implemented dumping of the Image Execution Table using Dmem.c Cc: Ray Ni Cc: Zhichao Gao Signed-off-by: Sam Kaynor --- ShellPkg/Library/UefiShellDebug1CommandsLib

Re: [edk2-devel] [PATCH v3 0/7] EDK2-TEST TCG MOR Tests

2024-02-15 Thread Stuart Yoder
tree/tcgmortest_v3 Cc: G Edhaya Chandran Cc: Barton Gao Cc: Carolyn Gjertsen Cc: Stuart Yoder Cc: Sunny Wang Abhi Singh (6): uefi-sct/SctPkg: TCG MOR SetVariable Test uefi-sct/SctPkg: TCG MORLOCK SetVariable Test uefi-sct/SctPkg: TCG MORLOCK Unlocked State Test uefi-sct/SctPkg: TCG MOR

[edk2-devel] [PATCH v2 5/6] uefi-sct/SctPkg: TCG2 Protocol: add GetEventLog test

2024-01-09 Thread Stuart Yoder
From: Joseph Hemann -add test for GetEventLog() -test for valid and invalid event log format -test event log header -verify expected event log entry Signed-off-by: Joseph Hemann Signed-off-by: Stuart Yoder --- uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/TCG2/BlackBoxTest/Guid.h

[edk2-devel] [PATCH v2 1/6] uefi-sct/SctPkg: TCG2 Protocol: add header with TCG2 protocol definitions

2024-01-09 Thread Stuart Yoder
From: Joseph Hemann Define constants and data structure specified in the TCG EFI Protocol specification. Signed-off-by: Joseph Hemann Signed-off-by: Stuart Yoder --- uefi-sct/SctPkg/UEFI/Protocol/TCG2.h | 177 1 file changed, 177 insertions(+) diff --git a/uefi-sct

[edk2-devel] [PATCH v2 6/6] uefi-sct/SctPkg: TCG2 Protocol: add SubmitCommand test

2024-01-09 Thread Stuart Yoder
From: Joseph Hemann Add test verifying the functionality of the SubmitCommand function using the TPM command TPM2_HASH_COMMAND. Signed-off-by: Joseph Hemann Signed-off-by: Stuart Yoder --- uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/TCG2/BlackBoxTest/Guid.h | 5

[edk2-devel] [PATCH v2 2/6] uefi-sct/SctPkg: TCG2 Protocol: add test infrastructure and GetCapability Test

2024-01-09 Thread Stuart Yoder
for buffer -add checkpoint for validating fields of the struct returned by GetCapability() Signed-off-by: Joseph Hemann Signed-off-by: Stuart Yoder --- uefi-sct/SctPkg/UEFI/UEFI_SCT.dsc | 1 + uefi-sct/SctPkg/TestCase/UEFI/EFI

[edk2-devel] [PATCH v2 4/6] uefi-sct/SctPkg: TCG2 Protocol: add HashLogExtendEvent test

2024-01-09 Thread Stuart Yoder
From: Joseph Hemann -add tests for HashLogExtendEvent() -tests with valid, invalid, and out of range parameters -do extend of data to PCR 16 Signed-off-by: Joseph Hemann Signed-off-by: Stuart Yoder --- uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/TCG2/BlackBoxTest/Guid.h

[edk2-devel] [PATCH v2 3/6] uefi-sct/SctPkg: TCG2 Protocol: add GetActivePcrBanks test

2024-01-09 Thread Stuart Yoder
From: Joseph Hemann -add test for GetActivePcrBanks() -checkpoint for NULL pointer passed for buffer -checkpoint for test of function with proper input Signed-off-by: Joseph Hemann Signed-off-by: Stuart Yoder --- uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/TCG2/BlackBoxTest/Guid.h

[edk2-devel] [PATCH v2 0/6] Tests for TCG2 Protocol

2024-01-09 Thread Stuart Yoder
This patch series adds tests for the TCG2 Protocol which is implemented by EDK2. The protocol is defined in chapter 6 in the TCG EFI Protocol Specification: https://trustedcomputinggroup.org/resource/tcg-efi-protocol-specification/ The definition of the test cases is in a specification that has be

[edk2-devel] [PATCH v1 4/6] uefi-sct/SctPkg: TCG2 Protocol: add HashLogExtendEvent test

2023-12-14 Thread Stuart Yoder
From: Joseph Hemann -add tests for HashLogExtendEvent() -tests with valid, invalid, and out of range parameters -do extend of data to PCR 16 Signed-off-by: Joseph Hemann Signed-off-by: Stuart Yoder --- uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/TCG2/BlackBoxTest/Guid.h

[edk2-devel] [PATCH v1 6/6] uefi-sct/SctPkg: TCG2 Protocol: add SubmitCommand test

2023-12-14 Thread Stuart Yoder
From: Joseph Hemann Signed-off-by: Joseph Hemann Signed-off-by: Stuart Yoder --- uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/TCG2/BlackBoxTest/Guid.h | 5 + uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/TCG2/BlackBoxTest/TCG2ProtocolBBTest.h | 71

[edk2-devel] [PATCH v1 5/6] uefi-sct/SctPkg: TCG2 Protocol: add GetEventLog test

2023-12-14 Thread Stuart Yoder
From: Joseph Hemann -add test for GetEventLog() -test for valid and invalid event log format -test event log header -verify expected event log entry Signed-off-by: Joseph Hemann Signed-off-by: Stuart Yoder --- uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/TCG2/BlackBoxTest/Guid.h

[edk2-devel] [PATCH v1 0/6] Tests for TCG2 Protocol

2023-12-14 Thread Stuart Yoder
This patch series adds tests for the TCG2 Protocol which is implemented by EDK2. The protocol is defined in chapter 6 in the TCG EFI Protocol Specification: https://trustedcomputinggroup.org/resource/tcg-efi-protocol-specification/ The definition of the test cases is in a specification that has be

[edk2-devel] [PATCH v1 1/6] uefi-sct/SctPkg: TCG2 Protocol: add header with TCG2 protocol definitions

2023-12-14 Thread Stuart Yoder
From: Joseph Hemann Signed-off-by: Joseph Hemann Signed-off-by: Stuart Yoder --- uefi-sct/SctPkg/UEFI/Protocol/TCG2.h | 179 1 file changed, 179 insertions(+) diff --git a/uefi-sct/SctPkg/UEFI/Protocol/TCG2.h b/uefi-sct/SctPkg/UEFI/Protocol/TCG2.h new file mode 100644

[edk2-devel] [PATCH v1 3/6] uefi-sct/SctPkg: TCG2 Protocol: add GetActivePcrBanks test

2023-12-14 Thread Stuart Yoder
From: Joseph Hemann -add test for GetActivePcrBanks() -checkpoint for NULL pointer passed for buffer -checkpoint for test of function with proper input Signed-off-by: Joseph Hemann Signed-off-by: Stuart Yoder --- uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/TCG2/BlackBoxTest/Guid.h

[edk2-devel] [PATCH v1 2/6] uefi-sct/SctPkg: TCG2 Protocol: add test infrastructure and GetCapability Test

2023-12-14 Thread Stuart Yoder
for buffer -add checkpoint for validating fields of the struct returned by GetCapability() Signed-off-by: Joseph Hemann Signed-off-by: Stuart Yoder --- uefi-sct/SctPkg/UEFI/UEFI_SCT.dsc | 1 + uefi-sct/SctPkg/TestCase/UEFI/EFI

Re: [edk2-devel] [PATCH v2 6/6] uefi-sct/SctPkg: TCG MORLOCK Locked with Key State Test

2023-09-21 Thread Stuart Yoder
See inline comments... On 9/21/23 11:37 AM, Abhimanyu Singh via groups.io wrote: SCT spec: https://bugzilla.tianocore.org/show_bug.cgi?id=4374 BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4419 -Implement MemoryOverwriteRequestControlLock Locked with Key State test cases -Add remaini

Re: [edk2-devel] [PATCH v2 5/6] uefi-sct/SctPkg: TCG MORLOCK Locked No Key State Test

2023-09-21 Thread Stuart Yoder
See inline comments... On 9/21/23 11:37 AM, Abhimanyu Singh via groups.io wrote: SCT spec: https://bugzilla.tianocore.org/show_bug.cgi?id=4374 BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4419 -Implement MemoryOverwriteRequestControlLock Locked No Key State test cases -Add Assertio

Re: [edk2-devel] [PATCH v2 4/6] uefi-sct/SctPkg: TCG MORLOCK Unlocked State Test

2023-09-21 Thread Stuart Yoder
See inline... On 9/21/23 11:37 AM, Abhimanyu Singh via groups.io wrote: SCT spec: https://bugzilla.tianocore.org/show_bug.cgi?id=4374 BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4419 -Implement MemoryOverwriteRequestControlLock Unlocked State test cases -Add Assertions 19, 20, 21, a

Re: [edk2-devel] [PATCH v2 3/6] uefi-sct/SctPkg: TCG MORLOCK SetVariable Test

2023-09-21 Thread Stuart Yoder
See inline comments... On 9/21/23 11:37 AM, Abhimanyu Singh via groups.io wrote: SCT spec: https://bugzilla.tianocore.org/show_bug.cgi?id=4374 BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4419 -Implement MemoryOverwriteRequestControlLockSetVariable test cases -Add Assertions 9 throug

Re: [edk2-devel] [PATCH v2 2/6] uefi-sct/SctPkg: TCG MOR SetVariable Test

2023-09-21 Thread Stuart Yoder
See inline comments... On 9/21/23 11:37 AM, Abhimanyu Singh via groups.io wrote: SCT spec: https://bugzilla.tianocore.org/show_bug.cgi?id=4374 BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4419 -Implement MemoryOverwriteRequestControlSetVariable test cases -Add Assertions 5, 6, 7, and 8

Re: [edk2-devel] [PATCH v2 0/6] RESEND: TCG MemoryOverwriteRequest Tests

2023-09-21 Thread Stuart Yoder
On 9/21/23 11:37 AM, Abhimanyu Singh via groups.io wrote: Resending to Cc the reviewers These tests support platform firmware that implement MemoryOverwriteRequestControl & MemoryOverwriteRequestControlLock UEFI variables in accordance with TCG PC Platform Reset Attack Mitigation Specificatio

Re: [edk2-devel] [PATCH v1 1/1] uefi-sct/SctPkg: TCG MemoryOverwriteRequest

2023-08-22 Thread Stuart Yoder
Hi Abhi, See inline comments... On 8/17/23 11:10 AM, Abhimanyu Singh via groups.io wrote: From: "Abhi.Singh" SCT Platform Reset Check Test SCT spec: https://bugzilla.tianocore.org/show_bug.cgi?id=4374 Test: https://bugzilla.tianocore.org/show_bug.cgi?id=4419 -Implement initial test infrast

[edk2-devel] [PATCH] MdeModulePkg/Variable: Attribute combination should return EFI_UNSUPPORTED

2023-02-09 Thread Stuart Yoder
) EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS is deprecated and the UEFI spec says this should return EFI_UNSUPPORTED. Cc: Liming Gao Cc: Hao A Wu Cc: Sunny Wang Signed-off-by: Stuart Yoder --- MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion

Re: [edk2-devel] [PATCH 2/6] uefi-sct/SctPkg: TCG2 Protocol: add GetCapability Test

2022-02-01 Thread Stuart Yoder
See inline comments... +EFI_STATUS +BBTestGetCapabilityConformanceTestCheckpoint2 ( + IN EFI_STANDARD_TEST_LIBRARY_PROTOCOL*StandardLib, + IN EFI_TCG2_PROTOCOL *TCG2 + ) +{ + EFI_TEST_ASSERTIONAssertionType; + EFI_STATUS

Re: [edk2-devel] edk2 memory map on QEMU

2021-07-30 Thread Stuart Yoder
On 7/30/21 3:36 PM, Andrew Fish wrote: On Jul 30, 2021, at 12:32 PM, Stuart Yoder mailto:stuart.yo...@arm.com>> wrote: I am playing around with EDK2 on QEMU with a UEFI shell application and in the app I allocate some memory using gBS->AllocatePool(EfiBootSer

[edk2-devel] edk2 memory map on QEMU

2021-07-30 Thread Stuart Yoder
I am playing around with EDK2 on QEMU with a UEFI shell application and in the app I allocate some memory using gBS->AllocatePool(EfiBootServicesData, ...) Programmatically accessing the pointer returned works fine, but when I print it, it does not seem to be what I would expect is a valid addr