From: Sakar Arora <sakar.arora@arm.com>
To: edk2-devel@lists.01.org
Cc: Supreeth.Venkatesh@arm.com, prasanth.pulla@arm.com
Subject: [edk2-test][RFC PATCH 03/12] uefi-sct/SctPkg: sbbr: Add System Environment Configuration Test Cases
Date: Tue, 6 Nov 2018 14:17:37 +0530 [thread overview]
Message-ID: <1541494066-16288-3-git-send-email-sakar.arora@arm.com> (raw)
In-Reply-To: <1541494066-16288-1-git-send-email-sakar.arora@arm.com>
From: John Powell <john.powell@arm.com>
Add test cases for SBBR v1.0 requirements 3.3.1, 3.3.2, 3.3.3 and 3.3.4.
Change-Id: I3801314af1ffabaa2d71cee76417c4277f5f5521
Signed-off-by: John Powell <john.powell@arm.com>
---
uefi-sct/SctPkg/CommonGenFramework.sh | 3 +
uefi-sct/SctPkg/Config/Data/Category.ini | 11 +-
.../Generic/SbbrSysEnvConfig/BlackBoxTest/Guid.c | 67 +++
.../Generic/SbbrSysEnvConfig/BlackBoxTest/Guid.h | 81 ++++
.../BlackBoxTest/SysEnvConfigBBTest.inf | 84 ++++
.../BlackBoxTest/SysEnvConfigBBTestFunction.c | 527 +++++++++++++++++++++
.../BlackBoxTest/SysEnvConfigBBTestFunction.h | 104 ++++
.../BlackBoxTest/SysEnvConfigBBTestMain.c | 157 ++++++
.../BlackBoxTest/SysEnvConfigBBTestMain.h | 96 ++++
uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc | 7 +
10 files changed, 1135 insertions(+), 2 deletions(-)
create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSysEnvConfig/BlackBoxTest/Guid.c
create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSysEnvConfig/BlackBoxTest/Guid.h
create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSysEnvConfig/BlackBoxTest/SysEnvConfigBBTest.inf
create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSysEnvConfig/BlackBoxTest/SysEnvConfigBBTestFunction.c
create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSysEnvConfig/BlackBoxTest/SysEnvConfigBBTestFunction.h
create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSysEnvConfig/BlackBoxTest/SysEnvConfigBBTestMain.c
create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSysEnvConfig/BlackBoxTest/SysEnvConfigBBTestMain.h
diff --git a/uefi-sct/SctPkg/CommonGenFramework.sh b/uefi-sct/SctPkg/CommonGenFramework.sh
index e0f9658..c9b6ca9 100755
--- a/uefi-sct/SctPkg/CommonGenFramework.sh
+++ b/uefi-sct/SctPkg/CommonGenFramework.sh
@@ -361,6 +361,9 @@ then
cp $ProcessorType/MiscBootServicesBBTest.efi $Framework/Test/ > NUL
cp $ProcessorType/ProtocolHandlerServicesBBTest.efi $Framework/Test/ > NUL
+ # Tests SBBR sections 3.3.1, 3.3.2, 3.3.3, and 3.3.4
+ cp $ProcessorType/SysEnvConfigBBTest.efi $Framework/Test/ > NUL
+
# *********************************************
# Copy ENTS binary
# *********************************************
diff --git a/uefi-sct/SctPkg/Config/Data/Category.ini b/uefi-sct/SctPkg/Config/Data/Category.ini
index 3e9f5e5..9a81c1d 100644
--- a/uefi-sct/SctPkg/Config/Data/Category.ini
+++ b/uefi-sct/SctPkg/Config/Data/Category.ini
@@ -89,8 +89,15 @@ Description =
[Category Data]
Revision = 0x00010000
-CategoryGuid = E9EF7553-F833-4E56-96E8-38AE679523CC
-InterfaceGuid = E9EF7553-F833-4E56-96E8-38AE679523CC
+CategoryGuid = D84A6430-99F5-4660-8454-6E4C896A7E51
+InterfaceGuid = 71652D04-BF38-434a-BCB8-6547D7FD8384
+Name = GenericTest\SbbrSysEnvConfig
+Description =
+
+[Category Data]
+Revision = 0x00010000
+CategoryGuid = E9EF7553-F833-4e56-96E8-38AE679523CC
+InterfaceGuid = E9EF7553-F833-4e56-96E8-38AE679523CC
Name = BootServicesTest
Description =
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSysEnvConfig/BlackBoxTest/Guid.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSysEnvConfig/BlackBoxTest/Guid.c
new file mode 100644
index 0000000..cd6a752
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSysEnvConfig/BlackBoxTest/Guid.c
@@ -0,0 +1,67 @@
+/*++
+ The material contained herein is not a license, either
+ expressly or impliedly, to any intellectual property owned
+ or controlled by any of the authors or developers of this
+ material or to any contribution thereto. The material
+ contained herein is provided on an "AS IS" basis and, to the
+ maximum extent permitted by applicable law, this information
+ is provided AS IS AND WITH ALL FAULTS, and the authors and
+ developers of this material hereby disclaim all other
+ warranties and conditions, either express, implied or
+ statutory, including, but not limited to, any (if any)
+ implied warranties, duties or conditions of merchantability,
+ of fitness for a particular purpose, of accuracy or
+ completeness of responses, of results, of workmanlike
+ effort, of lack of viruses and of lack of negligence, all
+ with regard to this material and any contribution thereto.
+ Designers must not rely on the absence or characteristics of
+ any features or instructions marked "reserved" or
+ "undefined." The Unified EFI Forum, Inc. reserves any
+ features or instructions so marked for future definition and
+ shall have no responsibility whatsoever for conflicts or
+ incompatibilities arising from future changes to them. ALSO,
+ THERE IS NO WARRANTY OR CONDITION OF TITLE, QUIET ENJOYMENT,
+ QUIET POSSESSION, CORRESPONDENCE TO DESCRIPTION OR
+ NON-INFRINGEMENT WITH REGARD TO THE TEST SUITE AND ANY
+ CONTRIBUTION THERETO.
+
+ IN NO EVENT WILL ANY AUTHOR OR DEVELOPER OF THIS MATERIAL OR
+ ANY CONTRIBUTION THERETO BE LIABLE TO ANY OTHER PARTY FOR
+ THE COST OF PROCURING SUBSTITUTE GOODS OR SERVICES, LOST
+ PROFITS, LOSS OF USE, LOSS OF DATA, OR ANY INCIDENTAL,
+ CONSEQUENTIAL, DIRECT, INDIRECT, OR SPECIAL DAMAGES WHETHER
+ UNDER CONTRACT, TORT, WARRANTY, OR OTHERWISE, ARISING IN ANY
+ WAY OUT OF THIS OR ANY OTHER AGREEMENT RELATING TO THIS
+ DOCUMENT, WHETHER OR NOT SUCH PARTY HAD ADVANCE NOTICE OF
+ THE POSSIBILITY OF SUCH DAMAGES.
+
+ Copyright 2006 - 2016 Unified EFI, Inc. All
+ Rights Reserved, subject to all existing rights in all
+ matters included within this Test Suite, to which United
+ EFI, Inc. makes no claim of right.
+
+ Copyright (c) 2016, ARM Corporation. All rights reserved.<BR>
+
+--*/
+/*++
+
+Module Name:
+
+ Guid.c
+
+Abstract:
+
+ GUID assignments for test progress assertions.
+
+--*/
+
+#include "Efi.h"
+#include "Guid.h"
+
+EFI_GUID gSysEnvConfigAssertion001Guid = SYSENVCONFIG_ASSERTION_001_GUID;
+
+EFI_GUID gSysEnvConfigAssertion002Guid = SYSENVCONFIG_ASSERTION_002_GUID;
+
+EFI_GUID gSysEnvConfigAssertion003Guid = SYSENVCONFIG_ASSERTION_003_GUID;
+
+EFI_GUID gSysEnvConfigAssertion004Guid = SYSENVCONFIG_ASSERTION_004_GUID;
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSysEnvConfig/BlackBoxTest/Guid.h b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSysEnvConfig/BlackBoxTest/Guid.h
new file mode 100644
index 0000000..8f474c4
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSysEnvConfig/BlackBoxTest/Guid.h
@@ -0,0 +1,81 @@
+/*++
+ The material contained herein is not a license, either
+ expressly or impliedly, to any intellectual property owned
+ or controlled by any of the authors or developers of this
+ material or to any contribution thereto. The material
+ contained herein is provided on an "AS IS" basis and, to the
+ maximum extent permitted by applicable law, this information
+ is provided AS IS AND WITH ALL FAULTS, and the authors and
+ developers of this material hereby disclaim all other
+ warranties and conditions, either express, implied or
+ statutory, including, but not limited to, any (if any)
+ implied warranties, duties or conditions of merchantability,
+ of fitness for a particular purpose, of accuracy or
+ completeness of responses, of results, of workmanlike
+ effort, of lack of viruses and of lack of negligence, all
+ with regard to this material and any contribution thereto.
+ Designers must not rely on the absence or characteristics of
+ any features or instructions marked "reserved" or
+ "undefined." The Unified EFI Forum, Inc. reserves any
+ features or instructions so marked for future definition and
+ shall have no responsibility whatsoever for conflicts or
+ incompatibilities arising from future changes to them. ALSO,
+ THERE IS NO WARRANTY OR CONDITION OF TITLE, QUIET ENJOYMENT,
+ QUIET POSSESSION, CORRESPONDENCE TO DESCRIPTION OR
+ NON-INFRINGEMENT WITH REGARD TO THE TEST SUITE AND ANY
+ CONTRIBUTION THERETO.
+
+ IN NO EVENT WILL ANY AUTHOR OR DEVELOPER OF THIS MATERIAL OR
+ ANY CONTRIBUTION THERETO BE LIABLE TO ANY OTHER PARTY FOR
+ THE COST OF PROCURING SUBSTITUTE GOODS OR SERVICES, LOST
+ PROFITS, LOSS OF USE, LOSS OF DATA, OR ANY INCIDENTAL,
+ CONSEQUENTIAL, DIRECT, INDIRECT, OR SPECIAL DAMAGES WHETHER
+ UNDER CONTRACT, TORT, WARRANTY, OR OTHERWISE, ARISING IN ANY
+ WAY OUT OF THIS OR ANY OTHER AGREEMENT RELATING TO THIS
+ DOCUMENT, WHETHER OR NOT SUCH PARTY HAD ADVANCE NOTICE OF
+ THE POSSIBILITY OF SUCH DAMAGES.
+
+ Copyright 2006 - 2016 Unified EFI, Inc. All
+ Rights Reserved, subject to all existing rights in all
+ matters included within this Test Suite, to which United
+ EFI, Inc. makes no claim of right.
+
+ Copyright (c) 2016, ARM Corporation. All rights reserved.<BR>
+
+--*/
+/*++
+
+Module Name:
+
+ Guid.h
+
+Abstract:
+
+ Definitions of GUIDs used for test progress assertions.
+
+--*/
+
+#ifndef _SYSENVCONFIG_GUID_H_
+#define _SYSENVCONFIG_GUID_H_
+
+#define SYSENVCONFIG_ASSERTION_001_GUID \
+{0xcc5c4f70, 0xbfc9, 0x48be, {0x97, 0xf8, 0xca, 0xac, 0xfd, 0x8b, 0x97, 0x5e}}
+
+extern EFI_GUID gSysEnvConfigAssertion001Guid;
+
+#define SYSENVCONFIG_ASSERTION_002_GUID \
+{0x6e3f022e, 0x425b, 0x42cd, {0x83, 0x07, 0xb5, 0x67, 0xb9, 0xdb, 0x3d, 0x5d}}
+
+extern EFI_GUID gSysEnvConfigAssertion002Guid;
+
+#define SYSENVCONFIG_ASSERTION_003_GUID \
+{0x91d5b963, 0x1da8, 0x4c1d, {0x91, 0x3e, 0xd3, 0x4b, 0xb3, 0xa7, 0x3a, 0x1c}}
+
+extern EFI_GUID gSysEnvConfigAssertion003Guid;
+
+#define SYSENVCONFIG_ASSERTION_004_GUID \
+{0x9f0b093e, 0x7606, 0x4c94, {0xa1, 0xaa, 0x85, 0x56, 0x7f, 0xd4, 0xbf, 0x15}}
+
+extern EFI_GUID gSysEnvConfigAssertion004Guid;
+
+#endif /* _SYSENVCONFIG_GUID_H_ */
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSysEnvConfig/BlackBoxTest/SysEnvConfigBBTest.inf b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSysEnvConfig/BlackBoxTest/SysEnvConfigBBTest.inf
new file mode 100644
index 0000000..d4d610c
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSysEnvConfig/BlackBoxTest/SysEnvConfigBBTest.inf
@@ -0,0 +1,84 @@
+#
+# The material contained herein is not a license, either
+# expressly or impliedly, to any intellectual property owned
+# or controlled by any of the authors or developers of this
+# material or to any contribution thereto. The material
+# contained herein is provided on an "AS IS" basis and, to the
+# maximum extent permitted by applicable law, this information
+# is provided AS IS AND WITH ALL FAULTS, and the authors and
+# developers of this material hereby disclaim all other
+# warranties and conditions, either express, implied or
+# statutory, including, but not limited to, any (if any)
+# implied warranties, duties or conditions of merchantability,
+# of fitness for a particular purpose, of accuracy or
+# completeness of responses, of results, of workmanlike
+# effort, of lack of viruses and of lack of negligence, all
+# with regard to this material and any contribution thereto.
+# Designers must not rely on the absence or characteristics of
+# any features or instructions marked "reserved" or
+# "undefined." The Unified EFI Forum, Inc. reserves any
+# features or instructions so marked for future definition and
+# shall have no responsibility whatsoever for conflicts or
+# incompatibilities arising from future changes to them. ALSO,
+# THERE IS NO WARRANTY OR CONDITION OF TITLE, QUIET ENJOYMENT,
+# QUIET POSSESSION, CORRESPONDENCE TO DESCRIPTION OR
+# NON-INFRINGEMENT WITH REGARD TO THE TEST SUITE AND ANY
+# CONTRIBUTION THERETO.
+#
+# IN NO EVENT WILL ANY AUTHOR OR DEVELOPER OF THIS MATERIAL OR
+# ANY CONTRIBUTION THERETO BE LIABLE TO ANY OTHER PARTY FOR
+# THE COST OF PROCURING SUBSTITUTE GOODS OR SERVICES, LOST
+# PROFITS, LOSS OF USE, LOSS OF DATA, OR ANY INCIDENTAL,
+# CONSEQUENTIAL, DIRECT, INDIRECT, OR SPECIAL DAMAGES WHETHER
+# UNDER CONTRACT, TORT, WARRANTY, OR OTHERWISE, ARISING IN ANY
+# WAY OUT OF THIS OR ANY OTHER AGREEMENT RELATING TO THIS
+# DOCUMENT, WHETHER OR NOT SUCH PARTY HAD ADVANCE NOTICE OF
+# THE POSSIBILITY OF SUCH DAMAGES.
+#
+# Copyright 2006 - 2016 Unified EFI, Inc. All
+# Rights Reserved, subject to all existing rights in all
+# matters included within this Test Suite, to which United
+# EFI, Inc. makes no claim of right.
+#
+# Copyright (c) 2016, ARM. All rights reserved.<BR>
+#
+#
+#/*++
+#
+# Module Name:
+#
+# SysEnvConfigBBTest.inf
+#
+# Abstract:
+#
+# Component description file for SBBR system environment configuration tests.
+#
+#--*/
+
+[Defines]
+ INF_VERSION = 0x00010005
+ BASE_NAME = SysEnvConfigBBTest
+ FILE_GUID = 96251323-e34e-484b-b60c-6c66de30ccd6
+ MODULE_TYPE = UEFI_DRIVER
+ VERSION_STRING = 1.0
+ ENTRY_POINT = InitializeBBTestSysEnvConfig
+
+[Sources.common]
+ Guid.c
+ SysEnvConfigBBTestFunction.c
+ SysEnvConfigBBTestMain.c
+
+[Packages]
+ ArmPkg/ArmPkg.dec
+ MdePkg/MdePkg.dec
+ SctPkg/SctPkg.dec
+ SctPkg/UEFI/UEFI.dec
+
+[LibraryClasses]
+ ArmLib
+ EfiTestLib
+ SctLib
+ UefiDriverEntryPoint
+
+[Protocols]
+ gBlackBoxEfiBlockIoProtocolGuid
\ No newline at end of file
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSysEnvConfig/BlackBoxTest/SysEnvConfigBBTestFunction.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSysEnvConfig/BlackBoxTest/SysEnvConfigBBTestFunction.c
new file mode 100644
index 0000000..d0dba1e
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSysEnvConfig/BlackBoxTest/SysEnvConfigBBTestFunction.c
@@ -0,0 +1,527 @@
+/*++
+ The material contained herein is not a license, either
+ expressly or impliedly, to any intellectual property owned
+ or controlled by any of the authors or developers of this
+ material or to any contribution thereto. The material
+ contained herein is provided on an "AS IS" basis and, to the
+ maximum extent permitted by applicable law, this information
+ is provided AS IS AND WITH ALL FAULTS, and the authors and
+ developers of this material hereby disclaim all other
+ warranties and conditions, either express, implied or
+ statutory, including, but not limited to, any (if any)
+ implied warranties, duties or conditions of merchantability,
+ of fitness for a particular purpose, of accuracy or
+ completeness of responses, of results, of workmanlike
+ effort, of lack of viruses and of lack of negligence, all
+ with regard to this material and any contribution thereto.
+ Designers must not rely on the absence or characteristics of
+ any features or instructions marked "reserved" or
+ "undefined." The Unified EFI Forum, Inc. reserves any
+ features or instructions so marked for future definition and
+ shall have no responsibility whatsoever for conflicts or
+ incompatibilities arising from future changes to them. ALSO,
+ THERE IS NO WARRANTY OR CONDITION OF TITLE, QUIET ENJOYMENT,
+ QUIET POSSESSION, CORRESPONDENCE TO DESCRIPTION OR
+ NON-INFRINGEMENT WITH REGARD TO THE TEST SUITE AND ANY
+ CONTRIBUTION THERETO.
+
+ IN NO EVENT WILL ANY AUTHOR OR DEVELOPER OF THIS MATERIAL OR
+ ANY CONTRIBUTION THERETO BE LIABLE TO ANY OTHER PARTY FOR
+ THE COST OF PROCURING SUBSTITUTE GOODS OR SERVICES, LOST
+ PROFITS, LOSS OF USE, LOSS OF DATA, OR ANY INCIDENTAL,
+ CONSEQUENTIAL, DIRECT, INDIRECT, OR SPECIAL DAMAGES WHETHER
+ UNDER CONTRACT, TORT, WARRANTY, OR OTHERWISE, ARISING IN ANY
+ WAY OUT OF THIS OR ANY OTHER AGREEMENT RELATING TO THIS
+ DOCUMENT, WHETHER OR NOT SUCH PARTY HAD ADVANCE NOTICE OF
+ THE POSSIBILITY OF SUCH DAMAGES.
+
+ Copyright 2006 - 2016 Unified EFI, Inc. All
+ Rights Reserved, subject to all existing rights in all
+ matters included within this Test Suite, to which United
+ EFI, Inc. makes no claim of right.
+
+ Copyright (c) 2006, ARM. All rights reserved.<BR>
+
+--*/
+/*++
+
+Module Name:
+
+ SysEnvConfigBBTestFunction.c
+
+Abstract:
+
+ Test case definitions for SysEnvConfig tests.
+
+--*/
+
+#include <Chipset/AArch64.h>
+#include "Guid.h"
+#include <Library/ArmLib.h>
+#include "SctLib.h"
+#include "SysEnvConfigBBTestFunction.h"
+#include "SysEnvConfigBBTestMain.h"
+#include <UEFI/Protocol/BlockIo.h>
+#include <UEFI/Protocol/Ebc.h>
+#include <Uefi/UefiGpt.h>
+#include <Uefi/UefiMultiPhase.h>
+
+/**
+ * Entrypoint for Boot Exception Level Test.
+ * @param This a pointer of EFI_BB_TEST_PROTOCOL.
+ * @param ClientInterface a pointer to the interface to be tested.
+ * @param TestLevel test "thoroughness" control.
+ * @param SupportHandle a handle containing protocols required.
+ * @return EFI_SUCCESS Finish the test successfully.
+ */
+
+//
+// SBBR 3.3.1
+//
+
+EFI_STATUS
+BBTestBootExcLevelTest (
+ IN EFI_BB_TEST_PROTOCOL *This,
+ IN VOID *ClientInterface,
+ IN EFI_TEST_LEVEL TestLevel,
+ IN EFI_HANDLE SupportHandle
+ )
+{
+
+ EFI_STANDARD_TEST_LIBRARY_PROTOCOL *StandardLib;
+ EFI_STATUS Status;
+ EFI_TEST_ASSERTION AssertionType;
+ UINTN CurrentEL;
+
+ //
+ // Get the Standard Library Interface
+ //
+ Status = gtBS->HandleProtocol (
+ SupportHandle,
+ &gEfiStandardTestLibraryGuid,
+ (VOID **) &StandardLib
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
+ //
+ // Reading CurrentEL register into ExceptionLevel register variable and checking its value.
+ //
+ CurrentEL = ArmReadCurrentEL();
+
+ switch(CurrentEL){
+ case AARCH64_EL1:
+ AssertionType = EFI_TEST_ASSERTION_PASSED;
+ break;
+ case AARCH64_EL2:
+ AssertionType = EFI_TEST_ASSERTION_PASSED;
+ break;
+ case AARCH64_EL3:
+ AssertionType = EFI_TEST_ASSERTION_FAILED;
+ break;
+ default:
+ StandardLib->RecordAssertion (
+ StandardLib,
+ EFI_TEST_ASSERTION_FAILED,
+ gTestGenericFailureGuid,
+ L"Unrecognized CurrentEL Value",
+ L"%a:%d:CurrentEL=0x%X",
+ __FILE__,
+ (UINTN)__LINE__,
+ CurrentEL
+ );
+ return EFI_UNSUPPORTED;
+ }
+
+ StandardLib->RecordAssertion (
+ StandardLib,
+ AssertionType,
+ gSysEnvConfigAssertion001Guid,
+ L"TestBootExcLevel",
+ L"%a:%d:CurrentEL=0x%X",
+ __FILE__,
+ __LINE__,
+ CurrentEL
+ );
+
+ return EFI_SUCCESS;
+}
+
+/**
+ * Entrypoint for Memory Address Alignment Test.
+ * @param This a pointer of EFI_BB_TEST_PROTOCOL.
+ * @param ClientInterface a pointer to the interface to be tested.
+ * @param TestLevel test "thoroughness" control.
+ * @param SupportHandle a handle containing protocols required.
+ * @return EFI_SUCCESS Finish the test successfully.
+ */
+
+//
+// SBBR 3.3.2
+//
+
+EFI_STATUS
+BBTestMemAddrAlignmentTest (
+ IN EFI_BB_TEST_PROTOCOL *This,
+ IN VOID *ClientInterface,
+ IN EFI_TEST_LEVEL TestLevel,
+ IN EFI_HANDLE SupportHandle
+ )
+{
+
+ EFI_STANDARD_TEST_LIBRARY_PROTOCOL *StandardLib;
+ EFI_STATUS Status;
+ EFI_TEST_ASSERTION AssertionType;
+ UINT32 Sctlr;
+
+ //
+ // Get the Standard Library Interface
+ //
+ Status = gtBS->HandleProtocol (
+ SupportHandle,
+ &gEfiStandardTestLibraryGuid,
+ (VOID **) &StandardLib
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
+ //
+ // Reading SCTLR for current exception level
+ //
+ Sctlr = ArmReadSctlr();
+
+ if (Sctlr & SCTLR_A_MASK)
+ {
+ AssertionType = EFI_TEST_ASSERTION_FAILED;
+ }
+ else
+ {
+ AssertionType = EFI_TEST_ASSERTION_PASSED;
+ }
+
+ StandardLib->RecordAssertion (
+ StandardLib,
+ AssertionType,
+ gSysEnvConfigAssertion002Guid,
+ L"TestMemAddrAlignment",
+ L"%a:%d:SCTLR.A=%d",
+ __FILE__,
+ __LINE__,
+ (Sctlr & SCTLR_A_MASK) >> SCTLR_A_SHIFT
+ );
+
+ return EFI_SUCCESS;
+}
+
+/**
+ * Entrypoint for Operating System Boot Disk Partition Test.
+ * @param This a pointer of EFI_BB_TEST_PROTOCOL.
+ * @param ClientInterface a pointer to the interface to be tested.
+ * @param TestLevel test "thoroughness" control.
+ * @param SupportHandle a handle containing protocols required.
+ * @return EFI_SUCCESS Finish the test successfully.
+ */
+
+//
+// SBBR 3.3.3
+//
+
+EFI_STATUS
+BBTestOsDiskFormatTest (
+ IN EFI_BB_TEST_PROTOCOL *This,
+ IN VOID *ClientInterface,
+ IN EFI_TEST_LEVEL TestLevel,
+ IN EFI_HANDLE SupportHandle
+ )
+{
+ EFI_STANDARD_TEST_LIBRARY_PROTOCOL *StandardLib;
+ EFI_STATUS Status;
+ EFI_TEST_ASSERTION AssertionType;
+ INTN iStatus;
+ UINTN NumberOfHandles;
+ EFI_HANDLE *HandleBuffer;
+ EFI_BLOCK_IO_PROTOCOL *BlockIo;
+ UINT8 *BlockBuffer;
+ EFI_GUID PartitionTypeGuid;
+ UINT32 GptPartitionsInThisLbaCount;
+ EFI_LBA PartitionEntryLba;
+ UINT32 NumberOfPartitionEntries;
+ UINT32 SizeOfPartitionEntry;
+ UINT32 PartitionEntriesPerLba;
+ UINT32 HandleCount;
+ UINT32 GptPartitionEntryCount;
+ EFI_PARTITION_TABLE_HEADER *GptTableHeader;
+ EFI_PARTITION_ENTRY *GptPartitionEntry;
+ UINT8 GptSignature[] = GPT_SIGNATURE;
+ EFI_GUID GptEfiPartitionGuid = GPT_EFI_PARTITION_GUID;
+
+ //
+ // Get the Standard Library Interface
+ //
+ Status = gtBS->HandleProtocol (
+ SupportHandle,
+ &gEfiStandardTestLibraryGuid,
+ (VOID **) &StandardLib
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
+ //
+ // Get list of all handles that support BlockIO.
+ //
+ Status = gBS->LocateHandleBuffer (
+ ByProtocol,
+ &gBlackBoxEfiBlockIoProtocolGuid,
+ NULL,
+ &NumberOfHandles,
+ &HandleBuffer
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
+ //
+ // Checking each disk device to see if it is bootable
+ //
+ HandleCount = 0;
+ while (HandleCount < NumberOfHandles) {
+
+ //
+ // Creating BlockIo device for one of the handles we found.
+ //
+ Status = gBS->OpenProtocol (
+ HandleBuffer[HandleCount],
+ &gBlackBoxEfiBlockIoProtocolGuid,
+ (void *)&BlockIo,
+ gImageHandle,
+ NULL,
+ EFI_OPEN_PROTOCOL_GET_PROTOCOL
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
+ //
+ // Allocating memory to read data into
+ //
+ Status = gBS->AllocatePool (
+ EfiBootServicesData,
+ BlockIo->Media->BlockSize,
+ (void **)&BlockBuffer
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
+ //
+ // Reading block that should contain GPT header.
+ //
+ Status = BlockIo->ReadBlocks (
+ BlockIo,
+ BlockIo->Media->MediaId,
+ GPT_HEADER_LBA,
+ BlockIo->Media->BlockSize,
+ (VOID*)BlockBuffer
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
+ //
+ // Checking if block is a GPT header.
+ //
+ GptTableHeader = (EFI_PARTITION_TABLE_HEADER *)BlockBuffer;
+ iStatus = SctCompareMem (
+ (void *)&GptTableHeader->Header.Signature,
+ (void *)GptSignature,
+ GPT_SIGNATURE_SIZE
+ );
+ if (iStatus == 0) {
+
+ //
+ // Block contains a GPT header, so now we need to find an EFI partition.
+ //
+ PartitionEntryLba = GptTableHeader->PartitionEntryLBA;
+ NumberOfPartitionEntries = GptTableHeader->NumberOfPartitionEntries;
+ SizeOfPartitionEntry = GptTableHeader->SizeOfPartitionEntry;
+
+ //
+ // Loops through LBAs until all partition entries have been searched.
+ //
+ GptPartitionEntryCount = 0;
+ PartitionEntriesPerLba = BlockIo->Media->BlockSize / SizeOfPartitionEntry;
+ while (GptPartitionEntryCount < NumberOfPartitionEntries) {
+
+ //
+ // Reading LBA of partition entry.
+ //
+ Status = BlockIo->ReadBlocks (
+ BlockIo,
+ BlockIo->Media->MediaId,
+ PartitionEntryLba,
+ BlockIo->Media->BlockSize,
+ (VOID *)BlockBuffer
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
+ //
+ // Loops through partition entries in a single LBA
+ //
+ GptPartitionsInThisLbaCount = 0;
+ while ( (GptPartitionsInThisLbaCount < PartitionEntriesPerLba) \
+ && (GptPartitionEntryCount < NumberOfPartitionEntries) \
+ ) {
+
+ GptPartitionEntry = (EFI_PARTITION_ENTRY *)&BlockBuffer[(GptPartitionEntryCount % PartitionEntriesPerLba) * SizeOfPartitionEntry];
+
+ //
+ // Checking partition type GUID against EFI partition type GUID.
+ //
+ CopyGuid (
+ &PartitionTypeGuid,
+ &GptPartitionEntry->PartitionTypeGUID
+ );
+
+ iStatus = SctCompareGuid (
+ (void *)&PartitionTypeGuid,
+ (void *)&GptEfiPartitionGuid
+ );
+ if (iStatus == 0) {
+ StandardLib->RecordAssertion (
+ StandardLib,
+ EFI_TEST_ASSERTION_PASSED,
+ gSysEnvConfigAssertion003Guid,
+ L"TestOsDiskFormat",
+ L"%a:%d:Valid Boot Disk Found",
+ __FILE__,
+ (UINTN)__LINE__
+ );
+ gBS->FreePool ((void *)BlockBuffer);
+ Status = gBS->CloseProtocol (
+ HandleBuffer[HandleCount],
+ &gBlackBoxEfiBlockIoProtocolGuid,
+ gImageHandle,
+ NULL
+ );
+ return EFI_SUCCESS;
+ }
+
+ GptPartitionEntryCount++;
+ GptPartitionsInThisLbaCount++;
+ }
+
+ PartitionEntryLba++;
+ }
+ }
+
+ gBS->FreePool ((void *)BlockBuffer);
+
+ //
+ // Closing the protocol
+ //
+ Status = gBS->CloseProtocol (
+ HandleBuffer[HandleCount],
+ &gBlackBoxEfiBlockIoProtocolGuid,
+ gImageHandle,
+ NULL
+ );
+
+ HandleCount++;
+ }
+
+ StandardLib->RecordAssertion (
+ StandardLib,
+ EFI_TEST_ASSERTION_FAILED,
+ gSysEnvConfigAssertion003Guid,
+ L"TestOsDiskFormat",
+ L"%a:%d:No Valid Boot Disk Found",
+ __FILE__,
+ (UINTN)__LINE__
+ );
+
+ return EFI_SUCCESS;
+}
+
+/**
+ * Entrypoint for EBC interface check.
+ * @param This a pointer of EFI_BB_TEST_PROTOCOL.
+ * @param ClientInterface a pointer to the interface to be tested.
+ * @param TestLevel test "thoroughness" control.
+ * @param SupportHandle a handle containing protocols required.
+ * @return EFI_SUCCESS Finish the test successfully.
+ */
+
+//
+// SBBR 3.3.4
+//
+
+EFI_STATUS
+BBTestEbcInterfacePresentTest (
+ IN EFI_BB_TEST_PROTOCOL *This,
+ IN VOID *ClientInterface,
+ IN EFI_TEST_LEVEL TestLevel,
+ IN EFI_HANDLE SupportHandle
+ )
+{
+
+ EFI_STANDARD_TEST_LIBRARY_PROTOCOL *StandardLib;
+ EFI_STATUS Status;
+ EFI_HANDLE *HandleBuffer;
+ UINTN NumberOfHandles;
+ EFI_GUID EbcProtocolGuid = EFI_EBC_PROTOCOL_GUID;
+
+ //
+ // Get the Standard Library Interface
+ //
+ Status = gtBS->HandleProtocol (
+ SupportHandle,
+ &gEfiStandardTestLibraryGuid,
+ (VOID **) &StandardLib
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
+ //
+ // Attempting to locate EBC protocol
+ //
+ Status = gBS->LocateHandleBuffer (
+ ByProtocol,
+ &EbcProtocolGuid,
+ NULL,
+ &NumberOfHandles,
+ &HandleBuffer
+ );
+ if ( (Status == EFI_NOT_FOUND) && (NumberOfHandles == 0) ) {
+ StandardLib->RecordAssertion (
+ StandardLib,
+ EFI_TEST_ASSERTION_FAILED,
+ gSysEnvConfigAssertion004Guid,
+ L"SBBRTestEbcInterfacePresent",
+ L"%a:%d:EBC Interpreter Not Found",
+ __FILE__,
+ (UINTN)__LINE__
+ );
+ }
+ else if( (Status == EFI_SUCCESS) && (NumberOfHandles > 0) ) {
+ StandardLib->RecordAssertion (
+ StandardLib,
+ EFI_TEST_ASSERTION_PASSED,
+ gSysEnvConfigAssertion004Guid,
+ L"SBBRTestEbcInterfacePresent",
+ L"%a:%d:EBC Interpreter Found",
+ __FILE__,
+ (UINTN)__LINE__
+ );
+ }
+ else {
+ return Status;
+ }
+
+ return EFI_SUCCESS;
+}
\ No newline at end of file
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSysEnvConfig/BlackBoxTest/SysEnvConfigBBTestFunction.h b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSysEnvConfig/BlackBoxTest/SysEnvConfigBBTestFunction.h
new file mode 100644
index 0000000..b42fae0
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSysEnvConfig/BlackBoxTest/SysEnvConfigBBTestFunction.h
@@ -0,0 +1,104 @@
+/*++
+ The material contained herein is not a license, either
+ expressly or impliedly, to any intellectual property owned
+ or controlled by any of the authors or developers of this
+ material or to any contribution thereto. The material
+ contained herein is provided on an "AS IS" basis and, to the
+ maximum extent permitted by applicable law, this information
+ is provided AS IS AND WITH ALL FAULTS, and the authors and
+ developers of this material hereby disclaim all other
+ warranties and conditions, either express, implied or
+ statutory, including, but not limited to, any (if any)
+ implied warranties, duties or conditions of merchantability,
+ of fitness for a particular purpose, of accuracy or
+ completeness of responses, of results, of workmanlike
+ effort, of lack of viruses and of lack of negligence, all
+ with regard to this material and any contribution thereto.
+ Designers must not rely on the absence or characteristics of
+ any features or instructions marked "reserved" or
+ "undefined." The Unified EFI Forum, Inc. reserves any
+ features or instructions so marked for future definition and
+ shall have no responsibility whatsoever for conflicts or
+ incompatibilities arising from future changes to them. ALSO,
+ THERE IS NO WARRANTY OR CONDITION OF TITLE, QUIET ENJOYMENT,
+ QUIET POSSESSION, CORRESPONDENCE TO DESCRIPTION OR
+ NON-INFRINGEMENT WITH REGARD TO THE TEST SUITE AND ANY
+ CONTRIBUTION THERETO.
+
+ IN NO EVENT WILL ANY AUTHOR OR DEVELOPER OF THIS MATERIAL OR
+ ANY CONTRIBUTION THERETO BE LIABLE TO ANY OTHER PARTY FOR
+ THE COST OF PROCURING SUBSTITUTE GOODS OR SERVICES, LOST
+ PROFITS, LOSS OF USE, LOSS OF DATA, OR ANY INCIDENTAL,
+ CONSEQUENTIAL, DIRECT, INDIRECT, OR SPECIAL DAMAGES WHETHER
+ UNDER CONTRACT, TORT, WARRANTY, OR OTHERWISE, ARISING IN ANY
+ WAY OUT OF THIS OR ANY OTHER AGREEMENT RELATING TO THIS
+ DOCUMENT, WHETHER OR NOT SUCH PARTY HAD ADVANCE NOTICE OF
+ THE POSSIBILITY OF SUCH DAMAGES.
+
+ Copyright 2006 - 2016 Unified EFI, Inc. All
+ Rights Reserved, subject to all existing rights in all
+ matters included within this Test Suite, to which United
+ EFI, Inc. makes no claim of right.
+
+ Copyright (c) 2006, ARM. All rights reserved.<BR>
+
+--*/
+/*++
+
+Module Name:
+
+ SysEnvConfigBBTestFunction.h
+
+Abstract:
+
+ Contains definitions and prototypes used in the test functions.
+
+--*/
+
+#ifndef _SYSENVCONFIG_BB_TEST_FUNCTION_H_
+#define _SYSENVCONFIG_BB_TEST_FUNCTION_H_
+
+#include <Library/EfiTestLib.h>
+
+#define SCTLR_A_MASK 0x2
+#define SCTLR_A_SHIFT 1
+
+#define GPT_HEADER_LBA 1
+#define GPT_SIGNATURE_SIZE 8
+#define GPT_SIGNATURE "EFI PART"
+#define GPT_EFI_PARTITION_GUID {0xC12A7328, 0xF81F, 0x11D2, {0xBA, 0x4B, 0x00, 0xA0, 0xC9, 0x3E, 0xC9, 0x3B}}
+#define GPT_STARTING_ENTRY_LBA_OFFSET 72
+
+EFI_STATUS
+BBTestBootExcLevelTest (
+ IN EFI_BB_TEST_PROTOCOL *This,
+ IN VOID *ClientInterface,
+ IN EFI_TEST_LEVEL TestLevel,
+ IN EFI_HANDLE SupportHandle
+ );
+
+EFI_STATUS
+BBTestMemAddrAlignmentTest (
+ IN EFI_BB_TEST_PROTOCOL *This,
+ IN VOID *ClientInterface,
+ IN EFI_TEST_LEVEL TestLevel,
+ IN EFI_HANDLE SupportHandle
+ );
+
+EFI_STATUS
+BBTestOsDiskFormatTest (
+ IN EFI_BB_TEST_PROTOCOL *This,
+ IN VOID *ClientInterface,
+ IN EFI_TEST_LEVEL TestLevel,
+ IN EFI_HANDLE SupportHandle
+ );
+
+EFI_STATUS
+BBTestEbcInterfacePresentTest (
+ IN EFI_BB_TEST_PROTOCOL *This,
+ IN VOID *ClientInterface,
+ IN EFI_TEST_LEVEL TestLevel,
+ IN EFI_HANDLE SupportHandle
+ );
+
+#endif /* _SYSENVCONFIG_BB_TEST_FUNCTION_H_ */
\ No newline at end of file
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSysEnvConfig/BlackBoxTest/SysEnvConfigBBTestMain.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSysEnvConfig/BlackBoxTest/SysEnvConfigBBTestMain.c
new file mode 100644
index 0000000..9ed7cf8
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSysEnvConfig/BlackBoxTest/SysEnvConfigBBTestMain.c
@@ -0,0 +1,157 @@
+/*++
+ The material contained herein is not a license, either
+ expressly or impliedly, to any intellectual property owned
+ or controlled by any of the authors or developers of this
+ material or to any contribution thereto. The material
+ contained herein is provided on an "AS IS" basis and, to the
+ maximum extent permitted by applicable law, this information
+ is provided AS IS AND WITH ALL FAULTS, and the authors and
+ developers of this material hereby disclaim all other
+ warranties and conditions, either express, implied or
+ statutory, including, but not limited to, any (if any)
+ implied warranties, duties or conditions of merchantability,
+ of fitness for a particular purpose, of accuracy or
+ completeness of responses, of results, of workmanlike
+ effort, of lack of viruses and of lack of negligence, all
+ with regard to this material and any contribution thereto.
+ Designers must not rely on the absence or characteristics of
+ any features or instructions marked "reserved" or
+ "undefined." The Unified EFI Forum, Inc. reserves any
+ features or instructions so marked for future definition and
+ shall have no responsibility whatsoever for conflicts or
+ incompatibilities arising from future changes to them. ALSO,
+ THERE IS NO WARRANTY OR CONDITION OF TITLE, QUIET ENJOYMENT,
+ QUIET POSSESSION, CORRESPONDENCE TO DESCRIPTION OR
+ NON-INFRINGEMENT WITH REGARD TO THE TEST SUITE AND ANY
+ CONTRIBUTION THERETO.
+
+ IN NO EVENT WILL ANY AUTHOR OR DEVELOPER OF THIS MATERIAL OR
+ ANY CONTRIBUTION THERETO BE LIABLE TO ANY OTHER PARTY FOR
+ THE COST OF PROCURING SUBSTITUTE GOODS OR SERVICES, LOST
+ PROFITS, LOSS OF USE, LOSS OF DATA, OR ANY INCIDENTAL,
+ CONSEQUENTIAL, DIRECT, INDIRECT, OR SPECIAL DAMAGES WHETHER
+ UNDER CONTRACT, TORT, WARRANTY, OR OTHERWISE, ARISING IN ANY
+ WAY OUT OF THIS OR ANY OTHER AGREEMENT RELATING TO THIS
+ DOCUMENT, WHETHER OR NOT SUCH PARTY HAD ADVANCE NOTICE OF
+ THE POSSIBILITY OF SUCH DAMAGES.
+
+ Copyright 2006 - 2016 Unified EFI, Inc. All
+ Rights Reserved, subject to all existing rights in all
+ matters included within this Test Suite, to which United
+ EFI, Inc. makes no claim of right.
+
+ Copyright (c) 2016, ARM Corporation. All rights reserved.<BR>
+
+--*/
+/*++
+
+Module Name:
+
+ SysEnvConfigBBTestMain.c
+
+Abstract:
+
+ Test driver for SBBR system environment configuration tests.
+
+--*/
+
+#include "SctLib.h"
+#include "SysEnvConfigBBTestFunction.h"
+#include "SysEnvConfigBBTestMain.h"
+
+EFI_BB_TEST_PROTOCOL_FIELD gBBTestProtocolField = {
+ SYSENVCONFIG_TEST_REVISION,
+ SYSENVCONFIG_TEST_GUID,
+ L"SBBR UEFI System Environment and Configuration Tests",
+ L"Tests various processor configuration parameters to make sure they conform to ARM SBBR."
+};
+
+EFI_GUID gSupportProtocolGuid[2] = {
+ EFI_STANDARD_TEST_LIBRARY_GUID,
+ EFI_NULL_GUID
+};
+
+EFI_BB_TEST_ENTRY_FIELD gBBTestEntryField[] = {
+ {
+ SYSENVCONFIG_BOOT_EXC_LEVEL_GUID,
+ L"BootExcLevel",
+ L"Check the execution level of the UEFI boot environment.",
+ EFI_TEST_LEVEL_DEFAULT,
+ gSupportProtocolGuid,
+ EFI_TEST_CASE_AUTO,
+ BBTestBootExcLevelTest
+ },
+ {
+ SYSENVCONFIG_MEM_ADDR_ALIGNMENT_GUID,
+ L"MemAddrAlignment",
+ L"Checking that memory address alignment is not enforced.",
+ EFI_TEST_LEVEL_DEFAULT,
+ gSupportProtocolGuid,
+ EFI_TEST_CASE_AUTO,
+ BBTestMemAddrAlignmentTest
+ },
+ {
+ SYSENVCONFIG_OS_DISK_FORMAT_GUID,
+ L"OsDiskFormat",
+ L"Checking that the operating system disk contains a GPT partition table with an EFI partition.",
+ EFI_TEST_LEVEL_DEFAULT,
+ gSupportProtocolGuid,
+ EFI_TEST_CASE_AUTO,
+ BBTestOsDiskFormatTest
+ },
+ {
+ SYSENVCONFIG_EBC_INTERPRETER_PRESENT_GUID,
+ L"EbcInterfacePresent",
+ L"Checking that an EBC interpreter is present in the system.",
+ EFI_TEST_LEVEL_DEFAULT,
+ gSupportProtocolGuid,
+ EFI_TEST_CASE_AUTO,
+ BBTestEbcInterfacePresentTest
+ },
+ EFI_NULL_GUID
+};
+
+EFI_BB_TEST_PROTOCOL *gBBTestProtocolInterface;
+
+/**
+ * The driver's Unload function
+ * @param ImageHandle The test driver image handle
+ * @return EFI_SUCCESS Indicates the interface was Uninstalled
+*/
+EFI_STATUS
+BBTestSysEnvConfigUnload (
+ IN EFI_HANDLE ImageHandle
+ )
+{
+ return EfiUninstallAndFreeBBTestInterface (
+ ImageHandle,
+ gBBTestProtocolInterface
+ );
+}
+
+/**
+ * Creates/installs the BlackBox Interface and eminating Entry Point
+ * node list.
+ * @param ImageHandle The test driver image handle
+ * @param SystemTable Pointer to System Table
+ * @return EFI_SUCCESS Indicates the interface was installed
+ * @return EFI_OUT_OF_RESOURCES Indicates space for the new handle could not be allocated
+ * @return EFI_INVALID_PARAMETER One of the parameters has an invalid value.
+ */
+EFI_STATUS
+InitializeBBTestSysEnvConfig (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
+ )
+{
+
+ EfiInitializeTestLib (ImageHandle, SystemTable);
+
+ return EfiInitAndInstallBBTestInterface (
+ &ImageHandle,
+ &gBBTestProtocolField,
+ gBBTestEntryField,
+ BBTestSysEnvConfigUnload,
+ &gBBTestProtocolInterface
+ );
+}
\ No newline at end of file
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSysEnvConfig/BlackBoxTest/SysEnvConfigBBTestMain.h b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSysEnvConfig/BlackBoxTest/SysEnvConfigBBTestMain.h
new file mode 100644
index 0000000..151444c
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSysEnvConfig/BlackBoxTest/SysEnvConfigBBTestMain.h
@@ -0,0 +1,96 @@
+/*++
+ The material contained herein is not a license, either
+ expressly or impliedly, to any intellectual property owned
+ or controlled by any of the authors or developers of this
+ material or to any contribution thereto. The material
+ contained herein is provided on an "AS IS" basis and, to the
+ maximum extent permitted by applicable law, this information
+ is provided AS IS AND WITH ALL FAULTS, and the authors and
+ developers of this material hereby disclaim all other
+ warranties and conditions, either express, implied or
+ statutory, including, but not limited to, any (if any)
+ implied warranties, duties or conditions of merchantability,
+ of fitness for a particular purpose, of accuracy or
+ completeness of responses, of results, of workmanlike
+ effort, of lack of viruses and of lack of negligence, all
+ with regard to this material and any contribution thereto.
+ Designers must not rely on the absence or characteristics of
+ any features or instructions marked "reserved" or
+ "undefined." The Unified EFI Forum, Inc. reserves any
+ features or instructions so marked for future definition and
+ shall have no responsibility whatsoever for conflicts or
+ incompatibilities arising from future changes to them. ALSO,
+ THERE IS NO WARRANTY OR CONDITION OF TITLE, QUIET ENJOYMENT,
+ QUIET POSSESSION, CORRESPONDENCE TO DESCRIPTION OR
+ NON-INFRINGEMENT WITH REGARD TO THE TEST SUITE AND ANY
+ CONTRIBUTION THERETO.
+
+ IN NO EVENT WILL ANY AUTHOR OR DEVELOPER OF THIS MATERIAL OR
+ ANY CONTRIBUTION THERETO BE LIABLE TO ANY OTHER PARTY FOR
+ THE COST OF PROCURING SUBSTITUTE GOODS OR SERVICES, LOST
+ PROFITS, LOSS OF USE, LOSS OF DATA, OR ANY INCIDENTAL,
+ CONSEQUENTIAL, DIRECT, INDIRECT, OR SPECIAL DAMAGES WHETHER
+ UNDER CONTRACT, TORT, WARRANTY, OR OTHERWISE, ARISING IN ANY
+ WAY OUT OF THIS OR ANY OTHER AGREEMENT RELATING TO THIS
+ DOCUMENT, WHETHER OR NOT SUCH PARTY HAD ADVANCE NOTICE OF
+ THE POSSIBILITY OF SUCH DAMAGES.
+
+ Copyright 2006 - 2016 Unified EFI, Inc. All
+ Rights Reserved, subject to all existing rights in all
+ matters included within this Test Suite, to which United
+ EFI, Inc. makes no claim of right.
+
+ Copyright (c) 2016, ARM Corporation. All rights reserved.<BR>
+
+--*/
+/*++
+
+Module Name:
+
+ SysEnvConfigBBTestMain.h
+
+Abstract:
+
+ Contains definitions for test information and test GUIDs.
+
+--*/
+
+#ifndef _SYSENVCONFIG_TEST_MAIN_H_
+#define _SYSENVCONFIG_TEST_MAIN_H_
+
+#include <Library/EfiTestLib.h>
+
+#define SYSENVCONFIG_TEST_REVISION 0x00010000
+
+#define SYSENVCONFIG_TEST_GUID \
+ {0xd84a6430, 0x99f5, 0x4660, {0x84, 0x54, 0x6e, 0x4c, 0x89, 0x6a, 0x7e, 0x51}}
+
+EFI_STATUS
+InitializeBBTestSysEnvConfig (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
+ );
+
+EFI_STATUS
+BBTestBootSysEnvConfig (
+ IN EFI_HANDLE ImageHandle
+ );
+
+//
+// Entry GUIDs
+//
+
+#define SYSENVCONFIG_BOOT_EXC_LEVEL_GUID \
+ {0x591cb467, 0x530b, 0x4b16, {0xb0, 0x90, 0xc6, 0xce, 0xfa, 0xfc, 0xc1, 0x56}}
+
+#define SYSENVCONFIG_MEM_ADDR_ALIGNMENT_GUID \
+ {0xe24959d0, 0x9539, 0x4c7b, {0xbd, 0xbc, 0x12, 0x2a, 0xc5, 0xe9, 0xef, 0xd8}}
+
+#define SYSENVCONFIG_OS_DISK_FORMAT_GUID \
+ {0x78f530dd, 0xfe16, 0x4daf, {0xa2, 0x01, 0xbc, 0xb9, 0x37, 0x15, 0x03, 0xa2}}
+
+#define SYSENVCONFIG_EBC_INTERPRETER_PRESENT_GUID \
+ {0xff469a32, 0x6d0a, 0x4a99, {0x8b, 0x1e, 0xd1, 0x37, 0x50, 0x34, 0x08, 0xb6}}
+
+
+#endif /* _SYSENVCONFIG_TEST_MAIN_H_ */
diff --git a/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc b/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
index 7b5b4b0..3a637e2 100644
--- a/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
+++ b/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
@@ -142,6 +142,7 @@
[LibraryClasses.AARCH64]
NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
+ ArmLib|ArmPkg/Library/ArmLib/AArch64/AArch64Lib.inf
###############################################################################
#
@@ -240,6 +241,12 @@ SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Proto
# End of Boot Services Tests - SBBR v1.0 Appendix A
#
+# UEFI System Environment and Configuration Tests - SBBR v1.0 3.3
+#
+SctPkg/TestCase/UEFI/EFI/Generic/SbbrSysEnvConfig/BlackBoxTest/SysEnvConfigBBTest.inf
+#End of UEFI System Environment and Configuration Tests - SBBR v1.0 3.3
+
+#
# Dependency files
#
--
2.7.4
next prev parent reply other threads:[~2018-11-06 8:48 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-06 8:47 [edk2-test][RFC PATCH 01/12] uefi-sct/SctPkg: sbbr: Add support to build SBBR v1.0 test cases Sakar Arora
2018-11-06 8:47 ` [edk2-test][RFC PATCH 02/12] uefi-sct/SctPkg: sbbr: Add boot services test cases for SBBR v1.0 Sakar Arora
2018-11-06 17:30 ` Leif Lindholm
2018-11-06 8:47 ` Sakar Arora [this message]
2018-11-06 17:38 ` [edk2-test][RFC PATCH 03/12] uefi-sct/SctPkg: sbbr: Add System Environment Configuration Test Cases Leif Lindholm
2018-11-06 8:47 ` [edk2-test][RFC PATCH 04/12] uefi-sct/SctPkg: sbbr: Add Required UEFI Runtime Services tests Sakar Arora
2018-11-06 17:40 ` Leif Lindholm
2018-11-06 8:47 ` [edk2-test][RFC PATCH 05/12] uefi-sct/SctPkg: sbbr: Add test cases for SBBR v1.0 Appendix C Sakar Arora
2018-11-06 8:47 ` [edk2-test][RFC PATCH 06/12] uefi-sct/SctPkg: sbbr: Add test cases for SBBR v1.0 3.5.4 and 3.5.5 Sakar Arora
2018-11-06 8:47 ` [edk2-test][RFC PATCH 07/12] uefi-sct/SctPkg: sbbr: Add test cases for SBBR v1.0 boot services Sakar Arora
2018-11-06 17:46 ` Leif Lindholm
2018-11-07 20:55 ` Supreeth Venkatesh
2018-11-06 8:47 ` [edk2-test][RFC PATCH 08/12] uefi-sct/SctPkg: sbbr: UEFI Version Verification Test Sakar Arora
2018-11-06 17:48 ` Leif Lindholm
2018-11-06 8:47 ` [edk2-test][RFC PATCH 09/12] uefi-sct/SctPkg: sbbr: UEFI SMBIOS Base Requirements Sakar Arora
2018-11-06 8:47 ` [edk2-test][RFC PATCH 10/12] uefi-sct/SctPkg: sbbr: Corrected path to ArmBaseLib.inf in SBBR_SCT.dsc Sakar Arora
2018-11-06 17:51 ` Leif Lindholm
2018-11-06 8:47 ` [edk2-test][RFC PATCH 11/12] uefi-sct/SctPkg: sbbr: Bugfix for MemoryMap Check Test Sakar Arora
2018-11-06 17:53 ` Leif Lindholm
2018-11-20 7:55 ` Jin, Eric
2018-11-06 8:47 ` [edk2-test][RFC PATCH 12/12] uefi-sct/SctPkg: sbbr: Modify SBBR description file to add missing dependencies Sakar Arora
2018-11-06 17:56 ` Leif Lindholm
2018-11-06 12:45 ` [edk2-test][RFC PATCH 01/12] uefi-sct/SctPkg: sbbr: Add support to build SBBR v1.0 test cases Leif Lindholm
2018-11-06 17:39 ` Supreeth Venkatesh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1541494066-16288-3-git-send-email-sakar.arora@arm.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox