public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-test][RFC PATCH 01/12] uefi-sct/SctPkg: sbbr: Add support to build SBBR v1.0 test cases.
@ 2018-11-06  8:47 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
                   ` (11 more replies)
  0 siblings, 12 replies; 24+ messages in thread
From: Sakar Arora @ 2018-11-06  8:47 UTC (permalink / raw)
  To: edk2-devel; +Cc: Supreeth.Venkatesh, prasanth.pulla

Provide a framework for building SBBR Test Cases using the existing
UEFI-SCT Framework. Separate out build-scripts/install scripts to
carve out SBBR test cases.

To build SBBR SCT,

   ./build_sbbr.sh AARCH64 GCC

Change-Id: I3d7612dbb42a4dc3bce40e4e9b351fd1f5f84dcd
Signed-off-by: Sakar Arora <sakar.arora@arm.com>
---
 uefi-sct/SctPkg/CommonGenFramework.sh |  33 ++++
 uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc     | 205 ++++++++++++++++++++++
 uefi-sct/SctPkg/build_sbbr.sh         | 312 ++++++++++++++++++++++++++++++++++
 3 files changed, 550 insertions(+)
 create mode 100644 uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
 create mode 100755 uefi-sct/SctPkg/build_sbbr.sh

diff --git a/uefi-sct/SctPkg/CommonGenFramework.sh b/uefi-sct/SctPkg/CommonGenFramework.sh
index 299f0d6..4bb68ce 100755
--- a/uefi-sct/SctPkg/CommonGenFramework.sh
+++ b/uefi-sct/SctPkg/CommonGenFramework.sh
@@ -335,4 +335,37 @@ then
   CopyDependency Ebc
   CopyDependency PxeBaseCode
 fi
+# *********************************************
+# For SBBR v1.0 SCT
+# *********************************************
+
+if [ $1 = "sbbr_sct" ]
+then
+    # *********************************************
+    # Copy the SBBR v1.0 Test Cases
+    # *********************************************
+
+    mkdir -p $Framework/SCRT
+    cp $ProcessorType/SCRTDRIVER.efi                           $Framework/SCRT  > NUL
+    cp $ProcessorType/SCRTAPP.efi                              $Framework/SCRT  > NUL
+    cp ../../../SctPkg/Config/Data/SCRT.conf                   $Framework/SCRT  > NUL
+
+    # *********************************************
+    # Copy your test cases here
+    # *********************************************
+
 
+    # *********************************************
+    # Copy ENTS binary
+    # *********************************************
+
+    cp $ProcessorType/SerialMonitor.efi                $Framework/Ents/Support/ > NUL
+    cp $ProcessorType/ManagedNetworkMonitor.efi        $Framework/Ents/Support/ > NUL
+    cp $ProcessorType/IP4NetworkMonitor.efi            $Framework/Ents/Support/ > NUL
+    cp $ProcessorType/Eftp.efi                         $Framework/Ents/Support/ > NUL
+
+    # *********************************************
+    # Copy the test dependency files
+    # *********************************************
+
+fi
diff --git a/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc b/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
new file mode 100644
index 0000000..ff6abd9
--- /dev/null
+++ b/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
@@ -0,0 +1,205 @@
+#
+# 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) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
+#
+#
+#/*++
+#
+# Module Name:
+#
+#    SBBR_SCT.dsc
+#
+# Abstract:
+#
+#   This is a build description file used to build the test modules of SBBR SCT.
+#
+# Notes:
+#
+#   The info in this file is broken down into sections. The start of a section
+#   is designated by a "[" in the first column. So the [=====] separater ends
+#   a section.
+#
+#--*/
+
+################################################################################
+#
+# Defines Section - statements that will be processed to create a Makefile.
+#
+################################################################################
+[Defines]
+  PLATFORM_NAME                  = SbbrSct
+  PLATFORM_GUID                  = d513138b-9d4a-479c-8058-4a5160018663
+  PLATFORM_VERSION               = 0.1
+  DSC_SPECIFICATION              = 0x00010005
+  OUTPUT_DIRECTORY               = Build/SbbrSct
+  SUPPORTED_ARCHITECTURES        = AARCH64
+  BUILD_TARGETS                  = DEBUG|RELEASE
+  SKUID_IDENTIFIER               = DEFAULT
+
+  DEFINE GCC_VER_MACRO           = -D EFI_SPECIFICATION_VERSION=0x00020028 -D TIANO_RELEASE_VERSION=0x00080006
+  DEFINE MSFT_VER_MACRO          = /D EFI_SPECIFICATION_VERSION=0x00020028 /D TIANO_RELEASE_VERSION=0x00080006
+
+
+################################################################################
+#
+# SKU Identification section - list of all SKU IDs supported by this
+#                              Platform.
+#
+################################################################################
+[SkuIds]
+  0|DEFAULT              # The entry: 0|DEFAULT is reserved and always required.
+
+[BuildOptions]
+  *_*_AARCH64_CC_FLAGS         = -D EFIAARCH64 -I$(WORKSPACE)/MdePkg/Include/AArch64 $(GCC_VER_MACRO)
+  GCC:*_*_AARCH64_CC_FLAGS     = -D EFIAARCH64 $(GCC_VER_MACRO) -ffreestanding -nostdinc -nostdlib -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error
+  *_*_AARCH64_VFRPP_FLAGS      = -D EFIAARCH64 $(GCC_VER_MACRO)
+  *_*_AARCH64_APP_FLAGS        = -D EFIAARCH64 $(GCC_VER_MACRO)
+  *_*_AARCH64_PP_FLAGS         = -D EFIAARCH64 $(GCC_VER_MACRO)
+  RVCT:*_*_AARCH64_DLINK_FLAGS = --muldefweak
+
+  DEBUG_*_*_CC_FLAGS  = -DEFI_DEBUG
+  RELEASE_*_*_CC_FLAGS  = -DMDEPKG_NDEBUG
+
+[Libraries]
+  SctPkg/Library/SctLib/SctLib.inf
+  SctPkg/Library/SctGuidLib/SctGuidLib.inf
+  SctPkg/Library/EfiTestLib/EfiTestLib.inf
+
+  SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/EntsLib.inf
+
+  MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
+
+[Libraries.ARM]
+  ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
+
+[Libraries.AARCH64]
+  ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
+
+[LibraryClasses.common]
+  UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
+  UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
+  UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
+  BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
+  BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
+  DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
+  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
+  MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
+  UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
+  UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
+  HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
+  PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
+  UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
+  DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
+
+  SctLib|SctPkg/Library/SctLib/SctLib.inf
+  NetLib|SctPkg/Library/NetLib/NetLib.inf
+  EntsLib|SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/EntsLib.inf
+  EasLib|SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasDispatcher/Eas.inf
+  EfiTestLib|SctPkg/Library/EfiTestLib/EfiTestLib.inf
+
+[LibraryClasses.ARM]
+  NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
+
+[LibraryClasses.AARCH64]
+  NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
+
+###############################################################################
+#
+# These are the components that will be built by the master makefile
+#
+###############################################################################
+
+[Components]
+
+#
+# The default package
+#
+DEFINE PACKAGE=Default
+
+#
+# Components
+#
+
+#
+# Following are the SCT suite & related drivers
+#
+
+SctPkg/TestInfrastructure/SCT/Framework/Sct.inf
+SctPkg/TestInfrastructure/SCT/Drivers/StandardTest/StandardTest.inf
+SctPkg/TestInfrastructure/SCT/Drivers/TestProfile/TestProfile.inf
+SctPkg/TestInfrastructure/SCT/Drivers/TestRecovery/TestRecovery.inf
+SctPkg/TestInfrastructure/SCT/Drivers/TestLogging/TestLogging.inf
+
+#
+# Related SCT applications
+#
+
+SctPkg/Application/InstallSct/InstallSct.inf
+SctPkg/Application/StallForKey/StallForKey.inf
+
+SctPkg/SCRT/SCRTApp/SCRTApp.inf
+SctPkg/SCRT/SCRTDriver/SCRTDriver.inf
+
+#
+# Test cases for SBBR SCT
+#
+
+# Add Your test cases here:
+
+# Runtime Services Tests
+#SctPkg/TestCase/UEFI/EFI/RuntimeServices/MiscRuntimeServices/BlackBoxTest/MiscRuntimeServicesBBTest.inf
+#SctPkg/TestCase/UEFI/EFI/RuntimeServices/TimeServices/BlackBoxTest/TimeServicesBBTest.inf
+#SctPkg/TestCase/UEFI/EFI/RuntimeServices/VariableServices/BlackBoxTest/VariableServicesBBTest.inf
+
+#
+# Dependency files
+#
+
+#
+# Support Files
+#
+SctPkg/TestInfrastructure/SCT/Framework/ENTS/Eftp/Eftp.inf
+SctPkg/TestInfrastructure/SCT/Framework/ENTS/MonitorServices/SerialMonitor/SerialMonitor.inf
+SctPkg/TestInfrastructure/SCT/Framework/ENTS/MonitorServices/ManagedNetworkMonitor/ManagedNetworkMonitor.inf
+SctPkg/TestInfrastructure/SCT/Framework/ENTS/MonitorServices/IP4NetworkMonitor/IP4NetworkMonitor.inf
+
diff --git a/uefi-sct/SctPkg/build_sbbr.sh b/uefi-sct/SctPkg/build_sbbr.sh
new file mode 100755
index 0000000..6956e9b
--- /dev/null
+++ b/uefi-sct/SctPkg/build_sbbr.sh
@@ -0,0 +1,312 @@
+#!/bin/bash
+# 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 - 2015 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) 2011, 2015 ARM Ltd. All rights reserved.<BR>
+#
+
+SctpackageDependencyList=(EdkCompatibilityPkg SctPkg BaseTools)
+
+function get_build_arch
+{
+	case `uname -m` in
+	    aarch64*)
+	        BUILD_ARCH=AARCH64;;
+	    *)
+	        BUILD_ARCH=other;;
+	esac
+}
+
+function set_cross_compile
+{
+	get_build_arch
+
+	echo "Target: $SCT_TARGET_ARCH"
+	echo "Build: $BUILD_ARCH"
+	if [ "$SCT_TARGET_ARCH" = "$BUILD_ARCH" ]; then
+	    TEMP_CROSS_COMPILE=
+	elif [ "$SCT_TARGET_ARCH" == "AARCH64" ]; then
+	    if [ X"$CROSS_COMPILE_64" != X"" ]; then
+	        TEMP_CROSS_COMPILE="$CROSS_COMPILE_64"
+	    else
+	        TEMP_CROSS_COMPILE=aarch64-linux-gnu-
+	    fi
+	else
+	    echo "Unsupported target architecture '$SCT_TARGET_ARCH'!" >&2
+	fi
+}
+
+function get_gcc_version
+{
+	gcc_version=$($1 -dumpversion)
+	case $gcc_version in
+		4.6*|4.7*|4.8*|4.9*)
+			echo GCC$(echo ${gcc_version} | awk -F. '{print $1$2}')
+			;;
+		*)
+			echo "Unknown toolchain version '$gcc_version'" >&2
+			echo "Attempting to build using GCC49 profile." >&2
+			echo GCC49
+			;;
+	esac
+}
+
+function get_clang_version
+{
+	clang_version=`$1 --version | head -1 | sed 's/^.*version\s*\([0-9]*\).\([0-9]*\).*/\1\2/g'`
+	echo "CLANG$clang_version"
+}
+
+
+GetBaseToolsBinSubDir() {
+	#
+	# Figure out a uniq directory name from the uname command
+	#
+	UNAME_DIRNAME=`uname -sm`
+	UNAME_DIRNAME=${UNAME_DIRNAME// /-}
+	UNAME_DIRNAME=${UNAME_DIRNAME//\//-}
+	echo $UNAME_DIRNAME
+}
+
+GetEdkToolsPathBinDirectory() {
+	#
+	# Figure out a uniq directory name from the uname
+	# command
+	#
+	BIN_SUB_DIR=`GetBaseToolsBinSubDir`
+
+	if [ -e	$EDK_TOOLS_PATH/BinWrappers/$BIN_SUB_DIR ]
+	then
+		EDK_TOOLS_PATH_BIN=$EDK_TOOLS_PATH/BinWrappers/$BIN_SUB_DIR
+	else
+		EDK_TOOLS_PATH_BIN=$EDK_TOOLS_PATH/BinWrappers/PosixLike
+	fi
+        echo $EDK_TOOLS_PATH_BIN
+}
+
+PrintUsage() {
+	#
+	#Print Help
+	#
+	echo "Usage:"
+	echo "    $0 <architecture (ARM, AARCH64, X64, etc)> \
+<toolchain name (RVCT or ARMGCC or GCC*)> \
+[build type (RELEASE OR DEBUG, DEFAULT: DEBUG)]"
+}
+
+#Iterate through the SCT package dependency list and check if they exist in the current directory
+for pkg in ${names[@]}
+do
+    if [ ! -d `pwd`/$name]
+    then
+    echo "Couldn't build SCT:"
+    echo The directory `pwd`/$name does not exist.
+    exit -1
+    fi
+done
+
+export EFI_SOURCE=`pwd`
+export EDK_SOURCE=`pwd`/EdkCompatibilityPkg
+
+# check if the last command was successful
+status=$?
+if test $status -ne 0; then
+	echo Could not Run the edksetup.sh script
+	exit -1
+fi
+
+SCT_TARGET_ARCH=${1}
+
+#
+# Pick a default tool type for a given OS
+#
+case `uname` in
+   Linux*)
+	case ${2} in
+		RVCT | rvct)
+			TARGET_TOOLS=RVCTLINUX
+		;;
+
+		ARMGCC | armgcc)
+			TARGET_TOOLS=ARMGCC
+		;;
+
+		GCC | gcc)
+            set_cross_compile
+	        CROSS_COMPILE="$TEMP_CROSS_COMPILE"
+            export TARGET_TOOLS=`get_gcc_version "$CROSS_COMPILE"gcc`
+
+		;;
+
+		*)
+			echo "Couldn't build SBBR SCT:"
+			PrintUsage
+			exit -1
+		;;
+	esac
+   ;;
+   CYGWIN*)
+	case ${2} in
+		RVCT | rvct)
+			TARGET_TOOLS=RVCT31CYGWIN
+		;;
+
+		ARMGCC | armgcc)
+			TARGET_TOOLS=ARMGCCCYGWIN
+		;;
+
+		*)
+			echo "Couldn't build SBBR SCT:"
+			PrintUsage
+			exit -1
+		;;
+	esac
+   ;;
+   *)
+     echo "Couldn't build SBBR SCT:"
+     echo "Unknown OS, Use this script either in Unix or Cygwin environment".
+     PrintUsage
+     exit -1
+   ;;
+esac
+
+echo "TOOLCHAIN is ${TARGET_TOOLS}"
+export ${TARGET_TOOLS}_${SCT_TARGET_ARCH}_PREFIX=$CROSS_COMPILE
+echo "Toolchain prefix: ${TARGET_TOOLS}_${SCT_TARGET_ARCH}_PREFIX=$CROSS_COMPILE"
+
+SCT_BUILD=DEBUG
+if [ "$3" = "RELEASE" -o "$3" = "DEBUG" ]; then
+  SCT_BUILD=$3
+  shift
+fi
+
+#
+# Setup workspace if it is not set
+#
+if [ -z "${WORKSPACE:-}" ]; then
+	echo Initializing workspace
+	# Uses an external BaseTools project
+	# Uses the BaseTools in edk2
+	export EDK_TOOLS_PATH=`pwd`/BaseTools
+	# We do not pass BuildArmSct.sh arguments to edksetup.sh
+	while (( "$#" )); do
+		shift
+	done
+	source ./edksetup.sh
+else
+	echo Building from: $WORKSPACE
+fi
+
+if  [[ ! -e $EDK_TOOLS_PATH/Source/C/bin ]]
+then
+  # build the tools if they don't yet exist
+  echo Building tools: $EDK_TOOLS_PATH
+  make -C $EDK_TOOLS_PATH
+  status=$?
+  if test $status -ne 0
+  then
+  echo Error while building EDK tools
+    exit -1
+  fi
+else
+  echo using prebuilt tools
+fi
+
+# Copy GenBin file to Base tools directory
+DEST_DIR=`GetEdkToolsPathBinDirectory`
+# Ensure the directory exist
+mkdir -p $DEST_DIR
+case `uname -m` in
+	x86_64)
+		cp SctPkg/Tools/Bin/GenBin_lin_64 $DEST_DIR/GenBin
+		;;
+	x86_32)
+		cp SctPkg/Tools/Bin/GenBin_lin_32 $DEST_DIR/GenBin
+		;;
+	*)
+		cp SctPkg/Tools/Bin/GenBin_lin_32 $DEST_DIR/GenBin
+		;;
+esac
+
+#
+# Build the SCT package
+#
+build -p SctPkg/UEFI/SBBR_SCT.dsc -a $SCT_TARGET_ARCH -t $TARGET_TOOLS -b $SCT_BUILD $3 $4 $5 $6 $7 $8 $9
+
+# Check if there is any error
+status=$?
+if test $status -ne 0
+then
+echo Could not build the SBBR SCT package
+        exit -1
+fi
+
+#
+# If the argument is clean, then don't have to generate Sct binary.
+#
+for arg in "$@"
+do
+  if [ $arg == clean ] || [ $arg == cleanall ]
+  then
+      # no need to post process if we are doing a clean
+      exit 1
+  fi
+done
+
+#
+# Change directory to Build directory
+#
+cd Build/SbbrSct/${SCT_BUILD}_${TARGET_TOOLS}
+pwd
+
+#
+# Run a script to generate Sct binary for the target architecture
+#
+../../../SctPkg/CommonGenFramework.sh sbbr_sct $SCT_TARGET_ARCH Install$SCT_TARGET_ARCH.efi
+
+status=$?
+if test $status -ne 0
+then
+echo Could not generate SBBR SCT binary
+     exit -1
+else
+echo The SBBR SCT binary "SctPackage${SCT_TARGET_ARCH}" is located at "$EFI_SOURCE/Build/SbbrSct/${SCT_BUILD}_${TARGET_TOOLS}"
+fi
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [edk2-test][RFC PATCH 02/12] uefi-sct/SctPkg: sbbr: Add boot services test cases for SBBR v1.0
  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 ` Sakar Arora
  2018-11-06 17:30   ` Leif Lindholm
  2018-11-06  8:47 ` [edk2-test][RFC PATCH 03/12] uefi-sct/SctPkg: sbbr: Add System Environment Configuration Test Cases Sakar Arora
                   ` (10 subsequent siblings)
  11 siblings, 1 reply; 24+ messages in thread
From: Sakar Arora @ 2018-11-06  8:47 UTC (permalink / raw)
  To: edk2-devel; +Cc: Supreeth.Venkatesh, prasanth.pulla

1. Implements boot services tests defined in Appendix A of
   http://infocenter.arm.com/help/topic/com.arm.doc.den0044b/DEN0044B_Server_Base_Boot_Requirements.pdf

2. Fixes whitespace issues in SctPkg/CommonGenFramework.sh file.

Change-Id: Idc7b6e471a4c4966d4ad55f39ea045775854c206
Signed-off-by: Sakar Arora <sakar.arora@arm.com>
---
 uefi-sct/SctPkg/CommonGenFramework.sh |  12 +-
 uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc     | 457 +++++++++++++++++++---------------
 2 files changed, 261 insertions(+), 208 deletions(-)

diff --git a/uefi-sct/SctPkg/CommonGenFramework.sh b/uefi-sct/SctPkg/CommonGenFramework.sh
index 4bb68ce..e0f9658 100755
--- a/uefi-sct/SctPkg/CommonGenFramework.sh
+++ b/uefi-sct/SctPkg/CommonGenFramework.sh
@@ -89,7 +89,7 @@ CopyDependencyFile()
 
 CopyDependency()
 {
-    mkdir -p $Framework/Dependency/$1BBTest	
+    mkdir -p $Framework/Dependency/$1BBTest
     ls -h $ProcessorType/$1_Invalid*       > temp.txt 2>NUL
     ls -h $ProcessorType/$1_*.efi   >> temp.txt 2>NUL
     ls -h $ProcessorType/$1_*.ini   >> temp.txt 2>NUL
@@ -107,8 +107,8 @@ CopyDependency()
 # For UEFI SCT
 # *********************************************
 
-if [ $1 = "uefi_sct" ] 
-then 
+if [ $1 = "uefi_sct" ]
+then
     # *********************************************
     # Copy the UEFI 2.1 Test Cases
     # *********************************************
@@ -354,6 +354,12 @@ then
     # Copy your test cases here
     # *********************************************
 
+    # Boot Services Tests - SBBR v1.0 Appendix A
+    cp $ProcessorType/EventTimerTaskPriorityServicesBBTest.efi          $Framework/Test/  > NUL
+    cp $ProcessorType/ImageServicesBBTest.efi                           $Framework/Test/  > NUL
+    cp $ProcessorType/MemoryAllocationServicesBBTest.efi                $Framework/Test/  > NUL
+    cp $ProcessorType/MiscBootServicesBBTest.efi                        $Framework/Test/  > NUL
+    cp $ProcessorType/ProtocolHandlerServicesBBTest.efi                 $Framework/Test/  > NUL
 
     # *********************************************
     # Copy ENTS binary
diff --git a/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc b/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
index ff6abd9..7b5b4b0 100644
--- a/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
+++ b/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
@@ -1,205 +1,252 @@
-#
-# 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) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
-#
-#
-#/*++
-#
-# Module Name:
-#
-#    SBBR_SCT.dsc
-#
-# Abstract:
-#
-#   This is a build description file used to build the test modules of SBBR SCT.
-#
-# Notes:
-#
-#   The info in this file is broken down into sections. The start of a section
-#   is designated by a "[" in the first column. So the [=====] separater ends
-#   a section.
-#
-#--*/
-
-################################################################################
-#
-# Defines Section - statements that will be processed to create a Makefile.
-#
-################################################################################
-[Defines]
-  PLATFORM_NAME                  = SbbrSct
-  PLATFORM_GUID                  = d513138b-9d4a-479c-8058-4a5160018663
-  PLATFORM_VERSION               = 0.1
-  DSC_SPECIFICATION              = 0x00010005
-  OUTPUT_DIRECTORY               = Build/SbbrSct
-  SUPPORTED_ARCHITECTURES        = AARCH64
-  BUILD_TARGETS                  = DEBUG|RELEASE
-  SKUID_IDENTIFIER               = DEFAULT
-
-  DEFINE GCC_VER_MACRO           = -D EFI_SPECIFICATION_VERSION=0x00020028 -D TIANO_RELEASE_VERSION=0x00080006
-  DEFINE MSFT_VER_MACRO          = /D EFI_SPECIFICATION_VERSION=0x00020028 /D TIANO_RELEASE_VERSION=0x00080006
-
-
-################################################################################
-#
-# SKU Identification section - list of all SKU IDs supported by this
-#                              Platform.
-#
-################################################################################
-[SkuIds]
-  0|DEFAULT              # The entry: 0|DEFAULT is reserved and always required.
-
-[BuildOptions]
-  *_*_AARCH64_CC_FLAGS         = -D EFIAARCH64 -I$(WORKSPACE)/MdePkg/Include/AArch64 $(GCC_VER_MACRO)
-  GCC:*_*_AARCH64_CC_FLAGS     = -D EFIAARCH64 $(GCC_VER_MACRO) -ffreestanding -nostdinc -nostdlib -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error
-  *_*_AARCH64_VFRPP_FLAGS      = -D EFIAARCH64 $(GCC_VER_MACRO)
-  *_*_AARCH64_APP_FLAGS        = -D EFIAARCH64 $(GCC_VER_MACRO)
-  *_*_AARCH64_PP_FLAGS         = -D EFIAARCH64 $(GCC_VER_MACRO)
-  RVCT:*_*_AARCH64_DLINK_FLAGS = --muldefweak
-
-  DEBUG_*_*_CC_FLAGS  = -DEFI_DEBUG
-  RELEASE_*_*_CC_FLAGS  = -DMDEPKG_NDEBUG
-
-[Libraries]
-  SctPkg/Library/SctLib/SctLib.inf
-  SctPkg/Library/SctGuidLib/SctGuidLib.inf
-  SctPkg/Library/EfiTestLib/EfiTestLib.inf
-
-  SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/EntsLib.inf
-
-  MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
-
-[Libraries.ARM]
-  ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
-
-[Libraries.AARCH64]
-  ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
-
-[LibraryClasses.common]
-  UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
-  UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
-  UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
-  BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
-  BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
-  DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
-  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
-  MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
-  UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
-  UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
-  HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
-  PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
-  UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
-  DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
-
-  SctLib|SctPkg/Library/SctLib/SctLib.inf
-  NetLib|SctPkg/Library/NetLib/NetLib.inf
-  EntsLib|SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/EntsLib.inf
-  EasLib|SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasDispatcher/Eas.inf
-  EfiTestLib|SctPkg/Library/EfiTestLib/EfiTestLib.inf
-
-[LibraryClasses.ARM]
-  NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
-
-[LibraryClasses.AARCH64]
-  NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
-
-###############################################################################
-#
-# These are the components that will be built by the master makefile
-#
-###############################################################################
-
-[Components]
-
-#
-# The default package
-#
-DEFINE PACKAGE=Default
-
-#
-# Components
-#
-
-#
-# Following are the SCT suite & related drivers
-#
-
-SctPkg/TestInfrastructure/SCT/Framework/Sct.inf
-SctPkg/TestInfrastructure/SCT/Drivers/StandardTest/StandardTest.inf
-SctPkg/TestInfrastructure/SCT/Drivers/TestProfile/TestProfile.inf
-SctPkg/TestInfrastructure/SCT/Drivers/TestRecovery/TestRecovery.inf
-SctPkg/TestInfrastructure/SCT/Drivers/TestLogging/TestLogging.inf
-
-#
-# Related SCT applications
-#
-
-SctPkg/Application/InstallSct/InstallSct.inf
-SctPkg/Application/StallForKey/StallForKey.inf
-
-SctPkg/SCRT/SCRTApp/SCRTApp.inf
-SctPkg/SCRT/SCRTDriver/SCRTDriver.inf
-
-#
-# Test cases for SBBR SCT
-#
-
-# Add Your test cases here:
-
-# Runtime Services Tests
-#SctPkg/TestCase/UEFI/EFI/RuntimeServices/MiscRuntimeServices/BlackBoxTest/MiscRuntimeServicesBBTest.inf
-#SctPkg/TestCase/UEFI/EFI/RuntimeServices/TimeServices/BlackBoxTest/TimeServicesBBTest.inf
-#SctPkg/TestCase/UEFI/EFI/RuntimeServices/VariableServices/BlackBoxTest/VariableServicesBBTest.inf
-
-#
-# Dependency files
-#
-
-#
-# Support Files
-#
-SctPkg/TestInfrastructure/SCT/Framework/ENTS/Eftp/Eftp.inf
-SctPkg/TestInfrastructure/SCT/Framework/ENTS/MonitorServices/SerialMonitor/SerialMonitor.inf
-SctPkg/TestInfrastructure/SCT/Framework/ENTS/MonitorServices/ManagedNetworkMonitor/ManagedNetworkMonitor.inf
-SctPkg/TestInfrastructure/SCT/Framework/ENTS/MonitorServices/IP4NetworkMonitor/IP4NetworkMonitor.inf
-
+#
+# 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) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
+#
+#
+#/*++
+#
+# Module Name:
+#
+#    SBBR_SCT.dsc
+#
+# Abstract:
+#
+#   This is a build description file used to build the test modules of SBBR SCT.
+#
+# Notes:
+#
+#   The info in this file is broken down into sections. The start of a section
+#   is designated by a "[" in the first column. So the [=====] separater ends
+#   a section.
+#
+#--*/
+
+################################################################################
+#
+# Defines Section - statements that will be processed to create a Makefile.
+#
+################################################################################
+[Defines]
+  PLATFORM_NAME                  = SbbrSct
+  PLATFORM_GUID                  = d513138b-9d4a-479c-8058-4a5160018663
+  PLATFORM_VERSION               = 0.1
+  DSC_SPECIFICATION              = 0x00010005
+  OUTPUT_DIRECTORY               = Build/SbbrSct
+  SUPPORTED_ARCHITECTURES        = AARCH64
+  BUILD_TARGETS                  = DEBUG|RELEASE
+  SKUID_IDENTIFIER               = DEFAULT
+
+  DEFINE GCC_VER_MACRO           = -D EFI_SPECIFICATION_VERSION=0x00020028 -D TIANO_RELEASE_VERSION=0x00080006
+  DEFINE MSFT_VER_MACRO          = /D EFI_SPECIFICATION_VERSION=0x00020028 /D TIANO_RELEASE_VERSION=0x00080006
+
+
+################################################################################
+#
+# SKU Identification section - list of all SKU IDs supported by this
+#                              Platform.
+#
+################################################################################
+[SkuIds]
+  0|DEFAULT              # The entry: 0|DEFAULT is reserved and always required.
+
+[BuildOptions]
+  *_*_AARCH64_CC_FLAGS         = -D EFIAARCH64 -I$(WORKSPACE)/MdePkg/Include/AArch64 $(GCC_VER_MACRO)
+  GCC:*_*_AARCH64_CC_FLAGS     = -D EFIAARCH64 $(GCC_VER_MACRO) -ffreestanding -nostdinc -nostdlib -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error
+  *_*_AARCH64_VFRPP_FLAGS      = -D EFIAARCH64 $(GCC_VER_MACRO)
+  *_*_AARCH64_APP_FLAGS        = -D EFIAARCH64 $(GCC_VER_MACRO)
+  *_*_AARCH64_PP_FLAGS         = -D EFIAARCH64 $(GCC_VER_MACRO)
+  RVCT:*_*_AARCH64_DLINK_FLAGS = --muldefweak
+
+  DEBUG_*_*_CC_FLAGS  = -DEFI_DEBUG
+  RELEASE_*_*_CC_FLAGS  = -DMDEPKG_NDEBUG
+
+[Libraries]
+  SctPkg/Library/SctLib/SctLib.inf
+  SctPkg/Library/SctGuidLib/SctGuidLib.inf
+  SctPkg/Library/EfiTestLib/EfiTestLib.inf
+
+  SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/EntsLib.inf
+
+  MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
+
+[Libraries.ARM]
+  ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
+
+[Libraries.AARCH64]
+  ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
+
+[LibraryClasses.common]
+  UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
+  UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
+  UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
+  BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
+  BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
+  DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
+  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
+  MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
+  UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
+  UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
+  HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
+  PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
+  UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
+  DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
+
+  SctLib|SctPkg/Library/SctLib/SctLib.inf
+  NetLib|SctPkg/Library/NetLib/NetLib.inf
+  EntsLib|SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/EntsLib.inf
+  EasLib|SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasDispatcher/Eas.inf
+  EfiTestLib|SctPkg/Library/EfiTestLib/EfiTestLib.inf
+
+[LibraryClasses.ARM]
+  NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
+
+[LibraryClasses.AARCH64]
+  NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
+
+###############################################################################
+#
+# These are the components that will be built by the master makefile
+#
+###############################################################################
+
+[Components]
+
+#
+# The default package
+#
+DEFINE PACKAGE=Default
+
+#
+# Components
+#
+
+#
+# Following are the SCT suite & related drivers
+#
+
+SctPkg/TestInfrastructure/SCT/Framework/Sct.inf
+SctPkg/TestInfrastructure/SCT/Drivers/StandardTest/StandardTest.inf
+SctPkg/TestInfrastructure/SCT/Drivers/TestProfile/TestProfile.inf
+SctPkg/TestInfrastructure/SCT/Drivers/TestRecovery/TestRecovery.inf
+SctPkg/TestInfrastructure/SCT/Drivers/TestLogging/TestLogging.inf
+
+#
+# Related SCT applications
+#
+
+SctPkg/Application/InstallSct/InstallSct.inf
+SctPkg/Application/StallForKey/StallForKey.inf
+
+SctPkg/SCRT/SCRTApp/SCRTApp.inf
+SctPkg/SCRT/SCRTDriver/SCRTDriver.inf
+
+#
+# Test cases for SBBR SCT
+#
+
+# Boot Services Tests - SBBR v1.0 Appendix A
+#
+##  1. EFI_RAISE_TPL
+##  2. EFI_RESTORE_TPL
+##  3. EFI_CREATE_EVENT
+##  4. EFI_SET_TIMER
+##  5. EFI_WAIT_FOR_EVENT
+##  6. EFI_SIGNAL_EVENT
+##  7. EFI_CLOSE_EVENT
+##  8. EFI_CREATE_EVENT_EX
+SctPkg/TestCase/UEFI/EFI/BootServices/EventTimerTaskPriorityServices/BlackBoxTest/EventTimerTaskPriorityServicesBBTest_uefi.inf
+#
+##  9. EFI_IMAGE_LOAD
+## 10. EFI_IMAGE_START
+## 11. EFI_EXIT
+## 12. EFI_IMAGE_UNLOAD
+## 13. EFI_EXIT_BOOT_SERVICES
+SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/ImageBBTest.inf
+#
+## 14. EFI_ALLOCATE_PAGES
+## 15. EFI_FREE_PAGES
+## 16. EFI_GET_MEMORY_MAP
+## 17. EFI_ALLOCATE_POOL
+## 18. EFI_FREE_POOL
+SctPkg/TestCase/UEFI/EFI/BootServices/MemoryAllocationServices/BlackBoxTest/MemoryAllocationServicesBBTest.inf
+#
+## 19. EFI_INSTALL_CONFIGURATION_TABLE
+## 20. EFI_GET_NEXT_MONOTONIC_COUNT
+## 21. EFI_STALL
+## 22. EFI_SET_WATCHDOG_TIMER
+## 23. EFI_CALCULATE_CRC32
+## 24. EFI_COPY_MEM
+## 25. EFI_SET_MEM
+SctPkg/TestCase/UEFI/EFI/BootServices/MiscBootServices/BlackBoxTest/MiscBootServicesBBTest.inf
+#
+## 26. EFI_INSTALL_PROTOCOL_INTERFACE
+## 27. EFI_REINSTALL_PROTOCOL_INTERFACE
+## 28. EFI_UNINSTALL_PROTOCOL_INTERFACE
+## 29. EFI_HANDLE_PROTOCOL
+## 30. EFI_REGISTER_PROTOCOL_NOTIFY
+## 31. EFI_LOCATE_HANDLE
+## 32. EFI_LOCATE_PROTOCOL
+## 33. EFI_LOCATE_DEVICE_PATH
+## 34. EFI_CONNECT_CONTROLLER
+## 35. EFI_DISCONNECT_CONTROLLER
+## 36. EFI_OPEN_PROTOCOL
+## 37. EFI_CLOSE_PROTOCOL
+## 38. EFI_OPEN_PROTOCOL_INFORMATION
+## 39. EFI_PROTOCOLS_PER_HANDLE
+## 40. EFI_LOCATE_HANDLE_BUFFER
+## 41. EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES
+## 42. EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES
+SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/ProtocolHandlerBBTest.inf
+# End of Boot Services Tests - SBBR v1.0 Appendix A
+
+#
+# Dependency files
+#
+
+#
+# Support Files
+#
+SctPkg/TestInfrastructure/SCT/Framework/ENTS/Eftp/Eftp.inf
+SctPkg/TestInfrastructure/SCT/Framework/ENTS/MonitorServices/SerialMonitor/SerialMonitor.inf
+SctPkg/TestInfrastructure/SCT/Framework/ENTS/MonitorServices/ManagedNetworkMonitor/ManagedNetworkMonitor.inf
+SctPkg/TestInfrastructure/SCT/Framework/ENTS/MonitorServices/IP4NetworkMonitor/IP4NetworkMonitor.inf
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [edk2-test][RFC PATCH 03/12] uefi-sct/SctPkg: sbbr: Add System Environment Configuration Test Cases
  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  8:47 ` Sakar Arora
  2018-11-06 17:38   ` 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
                   ` (9 subsequent siblings)
  11 siblings, 1 reply; 24+ messages in thread
From: Sakar Arora @ 2018-11-06  8:47 UTC (permalink / raw)
  To: edk2-devel; +Cc: Supreeth.Venkatesh, prasanth.pulla

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



^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [edk2-test][RFC PATCH 04/12] uefi-sct/SctPkg: sbbr: Add Required UEFI Runtime Services tests.
  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  8:47 ` [edk2-test][RFC PATCH 03/12] uefi-sct/SctPkg: sbbr: Add System Environment Configuration Test Cases Sakar Arora
@ 2018-11-06  8:47 ` 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
                   ` (8 subsequent siblings)
  11 siblings, 1 reply; 24+ messages in thread
From: Sakar Arora @ 2018-11-06  8:47 UTC (permalink / raw)
  To: edk2-devel; +Cc: Supreeth.Venkatesh, prasanth.pulla

Required UEFI Runtime Services Tests - SBBR v1.0 Appendix B
1. EFI_GET_TIME
2. EFI_SET_TIME
3. EFI_GET_WAKEUP_TIME
4. EFI_SET_WAKEUP_TIME
5. EFI_GET_VARIABLE
6. EFI_GET_NEXT_VARIABLE_NAME
7. EFI_SET_VARIABLE
8. EFI_QUERY_VARIABLE_INFO
9. EFI_QUERY_CAPSULE_CAPABILITIES
10. EFI_UPDATE_CAPSULE
11. EFI_RESET_SYSTEM
12. EFI_SET_VIRTUAL_ADDRESS_MAP
13. EFI_CONVERT_POINTER

Signed-off-by: Sakar Arora <sakar.arora@arm.com>
---
 uefi-sct/SctPkg/CommonGenFramework.sh              |   6 +
 uefi-sct/SctPkg/Config/Data/Category.ini           |  11 +-
 .../SBBRRuntimeServices/BlackBoxTest/Guid.c        |  61 ++++++
 .../SBBRRuntimeServices/BlackBoxTest/Guid.h        |  65 ++++++
 .../BlackBoxTest/SBBRRuntimeServicesBBTest.inf     |  81 ++++++++
 .../SBBRRuntimeServicesBBTestFunction.c            | 218 +++++++++++++++++++++
 .../SBBRRuntimeServicesBBTestFunction.h            |  71 +++++++
 .../BlackBoxTest/SBBRRuntimeServicesBBTestMain.c   | 131 +++++++++++++
 .../BlackBoxTest/SBBRRuntimeServicesBBTestMain.h   |  86 ++++++++
 uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc                  |  24 +++
 10 files changed, 752 insertions(+), 2 deletions(-)
 create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/Guid.c
 create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/Guid.h
 create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTest.inf
 create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTestFunction.c
 create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTestFunction.h
 create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTestMain.c
 create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTestMain.h

diff --git a/uefi-sct/SctPkg/CommonGenFramework.sh b/uefi-sct/SctPkg/CommonGenFramework.sh
index c9b6ca9..bf94d8e 100755
--- a/uefi-sct/SctPkg/CommonGenFramework.sh
+++ b/uefi-sct/SctPkg/CommonGenFramework.sh
@@ -364,6 +364,12 @@ then
     # Tests SBBR sections 3.3.1, 3.3.2, 3.3.3, and 3.3.4
     cp $ProcessorType/SysEnvConfigBBTest.efi                            $Framework/Test/ > NUL
 
+    # Runtime Services Tests - SBBR v1.0 Appendix B
+    cp $ProcessorType/VariableServicesBBTest.efi               $Framework/Test/ > NUL
+    cp $ProcessorType/TimeServicesBBTest.efi                   $Framework/Test/ > NUL
+    cp $ProcessorType/MiscRuntimeServicesBBTest.efi            $Framework/Test/ > NUL
+    cp $ProcessorType/SBBRRuntimeServicesBBTest.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 9a81c1d..a41cd0f 100644
--- a/uefi-sct/SctPkg/Config/Data/Category.ini
+++ b/uefi-sct/SctPkg/Config/Data/Category.ini
@@ -173,8 +173,15 @@ Description   =
 
 [Category Data]
 Revision      = 0x00010000
-CategoryGuid  = 5B1B31A1-9562-11D2-8E3F-00A0C969723B
-InterfaceGuid = 5B1B31A1-9562-11D2-8E3F-00A0C969723B
+CategoryGuid  = 52A69BBF-E19F-4e82-93D6-AAC46E2E1E06
+InterfaceGuid = AFF115FB-387B-4c18-8C41-6AFC7F03BB90
+Name          = RuntimeServicesTest\SBBRRuntimeServicesTest
+Description   =
+
+[Category Data]
+Revision      = 0x00010000
+CategoryGuid  = 5B1B31A1-9562-11d2-8E3F-00A0C969723B
+InterfaceGuid = 5B1B31A1-9562-11d2-8E3F-00A0C969723B
 Name          = LoadedImageProtocolTest
 Description   =
 
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/Guid.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/Guid.c
new file mode 100644
index 0000000..374b767
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/Guid.c
@@ -0,0 +1,61 @@
+/*++
+  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:
+
+  GUIDs auto-generated for EFI test assertion.
+
+--*/
+
+#include "Efi.h"
+#include "Guid.h"
+
+EFI_GUID gSBBRRuntimeServicesAssertion001Guid = SBBRRUNTIMESERVICES_ASSERTION_001_GUID;
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/Guid.h b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/Guid.h
new file mode 100644
index 0000000..86165b3
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/Guid.h
@@ -0,0 +1,65 @@
+/*++
+  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:
+
+  GUIDs auto-generated for EFI test assertion.
+
+--*/
+
+#ifndef _SBBRRUNTIMESERVICES_GUID_H_
+#define _SBBRRUNTIMESERVICES_GUID_H_
+
+#define SBBRRUNTIMESERVICES_ASSERTION_001_GUID \
+{ 0x787ad247, 0xc901, 0x49d8, {0x84, 0x82, 0x91, 0x5e, 0x09, 0x61, 0xcf, 0x34 }}
+
+extern EFI_GUID gSBBRRuntimeServicesAssertion001Guid;
+#endif /* _SBBRRUNTIMESERVICES_GUID_H_ */
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTest.inf b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTest.inf
new file mode 100644
index 0000000..f6c6856
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTest.inf
@@ -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. All rights reserved.<BR>
+#
+#
+#/*++
+#
+# Module Name:
+#
+#   SBBRRuntimeServicesBBTest.inf
+#
+# Abstract:
+#
+#   Component description file for SBBRRuntimeServices tests.
+#
+#--*/
+
+[Defines]
+  INF_VERSION          = 0x00010005
+  BASE_NAME            = SBBRRuntimeServicesBBTest
+  FILE_GUID            = 8906d7fb-39d8-4f90-ba35-ee838fee1805
+  MODULE_TYPE          = UEFI_DRIVER
+  VERSION_STRING       = 1.0
+  ENTRY_POINT          = InitializeBBTestSBBRRuntimeServices
+
+[Sources.common]
+  Guid.c
+  SBBRRuntimeServicesBBTestFunction.c
+  SBBRRuntimeServicesBBTestMain.c
+
+[Packages]
+  MdePkg/MdePkg.dec
+  SctPkg/SctPkg.dec
+  SctPkg/UEFI/UEFI.dec
+
+[LibraryClasses]
+  EfiTestLib
+  SctLib
+  UefiDriverEntryPoint
+
+[Protocols]
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTestFunction.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTestFunction.c
new file mode 100644
index 0000000..1f19cef
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTestFunction.c
@@ -0,0 +1,218 @@
+/*++
+  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:
+
+  SBBRRuntimeServicesBBTestFunction.c
+
+Abstract:
+
+  Test cases for SBBRRuntimeServices.
+
+--*/
+#include "Guid.h"
+#include "SctLib.h"
+#include "SBBRRuntimeServicesBBTestMain.h"
+#include "SBBRRuntimeServicesBBTestFunction.h"
+
+
+
+
+/**
+ *  Entrypoint for Runtime Services 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.
+ */
+
+EFI_STATUS
+BBTestRuntimeServices (
+  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              CRC32;
+  UINT32              LocalCRC32;
+
+  //
+  // Get the Standard Library Interface
+  //
+  Status = gtBS->HandleProtocol (
+                   SupportHandle,
+                   &gEfiStandardTestLibraryGuid,
+                   (VOID **) &StandardLib
+                   );
+  if (EFI_ERROR (Status)) {
+    return Status;
+  }
+
+  //
+  // Check the EFI Runtime Services Table
+  //
+  CRC32 = gtRT->Hdr.CRC32;
+  gtRT->Hdr.CRC32 = 0;
+
+  LocalCRC32 = 0;
+  Status = SctCalculateCrc32 ((UINT8 *)gtRT, gtRT->Hdr.HeaderSize, &LocalCRC32);
+  if (EFI_ERROR (Status)) {
+    AssertionType = EFI_TEST_ASSERTION_FAILED;
+  } else {
+    if ((gtRT->Hdr.Signature             == EFI_RUNTIME_SERVICES_SIGNATURE) &&
+        (gtRT->Hdr.Revision              >= 0x00020000                    ) &&
+        (gtRT->Hdr.Reserved              == 0x00000000                    ) &&
+        (gtRT->GetTime                   != NULL                          ) &&
+        (gtRT->SetTime                   != NULL                          ) &&
+        (gtRT->GetWakeupTime             != NULL                          ) &&
+        (gtRT->SetWakeupTime             != NULL                          ) &&
+        (gtRT->SetVirtualAddressMap      != NULL                          ) &&
+        (gtRT->ConvertPointer            != NULL                          ) &&
+        (gtRT->GetVariable               != NULL                          ) &&
+        (gtRT->GetNextVariableName       != NULL                          ) &&
+        (gtRT->SetVariable               != NULL                          ) &&
+        (gtRT->GetNextHighMonotonicCount != NULL                          ) &&
+        (gtRT->ResetSystem               != NULL                          ) &&
+        (gtRT->QueryVariableInfo         != NULL                          ) &&
+        (gtRT->QueryCapsuleCapabilities  != NULL                          ) &&
+        (gtRT->UpdateCapsule             != NULL                          ) &&
+        (LocalCRC32                      == CRC32                         )) {
+      AssertionType = EFI_TEST_ASSERTION_PASSED;
+    } else {
+      AssertionType = EFI_TEST_ASSERTION_FAILED;
+    }
+
+    gtRT->Hdr.CRC32 = CRC32;
+  }
+
+  StandardLib->RecordAssertion (
+                 StandardLib,
+                 AssertionType,
+                 gSBBRRuntimeServicesAssertion001Guid,
+                 L"UEFI Compliant - EFI Runtime Services Table must be implemented",
+                 L"%a:%d:Signature - %lX, Expected - %lX",
+                 __FILE__,
+                 (UINTN)__LINE__,
+                 gtRT->Hdr.Signature,
+                 EFI_RUNTIME_SERVICES_SIGNATURE
+                 );
+
+  //
+  // Record the entire EFI Runtime Services Table
+  //
+  StandardLib->RecordMessage (
+                 StandardLib,
+                 EFI_VERBOSE_LEVEL_DEFAULT,
+                 L"  Hdr.Signature             : %lX\n"
+                 L"  Hdr.Revision              : %X\n"
+                 L"  Hdr.HeaderSize            : %X\n"
+                 L"  Hdr.CRC32                 : %X\n"
+                 L"  Hdr.Reserved              : %X\n",
+                 gtRT->Hdr.Signature,
+                 gtRT->Hdr.Revision,
+                 gtRT->Hdr.HeaderSize,
+                 gtRT->Hdr.CRC32,
+                 gtRT->Hdr.Reserved
+                 );
+
+
+  StandardLib->RecordMessage (
+                 StandardLib,
+                 EFI_VERBOSE_LEVEL_DEFAULT,
+                 L"  GetTime                   : %X\n"
+                 L"  SetTime                   : %X\n"
+                 L"  GetWakeupTime             : %X\n"
+                 L"  SetWakeupTime             : %X\n"
+                 L"  SetVirtualAddressMap      : %X\n"
+                 L"  ConvertPointer            : %X\n"
+                 L"  GetVariable               : %X\n"
+                 L"  GetNextVariableName       : %X\n"
+                 L"  SetVariable               : %X\n"
+                 L"  GetNextHighMonotonicCount : %X\n"
+                 L"  ResetSystem               : %X\n"
+                 L"  QueryVariableInfo         : %X\n"
+                 L"  QueryCapsuleCapabilities  : %X\n"
+                 L"  UpdateCapsule             : %X\n",
+                 gtRT->GetTime,
+                 gtRT->SetTime,
+                 gtRT->GetWakeupTime,
+                 gtRT->SetWakeupTime,
+                 gtRT->SetVirtualAddressMap,
+                 gtRT->ConvertPointer,
+                 gtRT->GetVariable,
+                 gtRT->GetNextVariableName,
+                 gtRT->SetVariable,
+                 gtRT->GetNextHighMonotonicCount,
+                 gtRT->ResetSystem,
+                 gtRT->QueryVariableInfo,
+                 gtRT->QueryCapsuleCapabilities,
+                 gtRT->UpdateCapsule
+                 );
+
+  //
+  // Done
+  //
+
+  //
+  // Function calls like above are used to record test results.
+  // The actual return value of this function is used to tell
+  // the framework whether the tests completed successfully or
+  // if there was some fault in the test itself.  For example, not
+  // being able to allocate a buffer because the system is out of
+  // memory would return an error, but a test case failing because
+  // a register being checked does not contain the right value
+  // would return EFI_SUCCESS.
+  //
+
+  return EFI_SUCCESS;
+}
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTestFunction.h b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTestFunction.h
new file mode 100644
index 0000000..25dd209
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTestFunction.h
@@ -0,0 +1,71 @@
+/*++
+  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:
+
+  SBBRRuntimeServicesBBTestFunction.h
+
+Abstract:
+
+  Header file for SBBRRuntimeServicesBBTestFunction.h.
+
+--*/
+
+#ifndef _SBBRRUNTIMESERVICES_BB_TEST_FUNCTION_H_
+#define _SBBRRUNTIMESERVICES_BB_TEST_FUNCTION_H_
+
+#include <Library/EfiTestLib.h>
+
+EFI_STATUS
+BBTestRuntimeServices (
+  IN EFI_BB_TEST_PROTOCOL       *This,
+  IN VOID                       *ClientInterface,
+  IN EFI_TEST_LEVEL             TestLevel,
+  IN EFI_HANDLE                 SupportHandle
+  );
+
+#endif /* _SBBRRUNTIMESERVICES_BB_TEST_FUNCTION_H_ */
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTestMain.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTestMain.c
new file mode 100644
index 0000000..4af06cc
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTestMain.c
@@ -0,0 +1,131 @@
+/*++
+  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:
+
+  SBBRRuntimeServicesBBTestMain.c
+
+Abstract:
+
+  Test driver for SBBRRuntimeServices tests.
+
+--*/
+
+#include "SctLib.h"
+#include "SBBRRuntimeServicesBBTestFunction.h"
+#include "SBBRRuntimeServicesBBTestMain.h"
+
+
+EFI_BB_TEST_PROTOCOL_FIELD gBBTestProtocolField = {
+  SBBRRUNTIMESERVICES_TEST_REVISION,
+  SBBRRUNTIMESERVICES_TEST_GUID,
+  L"SBBRRuntimeServices Tests",
+  L"Tests to test Runtime Services Exception Level, Memory Map, Real Time Clock , Reset, Shutdown and Set Variable."
+};
+
+EFI_GUID gSupportProtocolGuid[2] = {
+  EFI_STANDARD_TEST_LIBRARY_GUID,
+  EFI_NULL_GUID
+};
+
+EFI_BB_TEST_ENTRY_FIELD gBBTestEntryField[] = {
+  {
+    SBBRRUNTIMESERVICES_TEST_CASE_GUID,
+    L"Runtime Services Test",
+    L"Test to check runtime services exist or not.",
+    EFI_TEST_LEVEL_DEFAULT,
+    gSupportProtocolGuid,
+    EFI_TEST_CASE_AUTO,
+    BBTestRuntimeServices
+  },
+  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
+BBTestSBBRRuntimeServicesUnload (
+  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
+InitializeBBTestSBBRRuntimeServices (
+  IN EFI_HANDLE           ImageHandle,
+  IN EFI_SYSTEM_TABLE     *SystemTable
+  )
+{
+
+  EfiInitializeTestLib (ImageHandle, SystemTable);
+
+  return EfiInitAndInstallBBTestInterface (
+           &ImageHandle,
+           &gBBTestProtocolField,
+           gBBTestEntryField,
+           BBTestSBBRRuntimeServicesUnload,
+           &gBBTestProtocolInterface
+           );
+}
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTestMain.h b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTestMain.h
new file mode 100644
index 0000000..e14b9bb
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTestMain.h
@@ -0,0 +1,86 @@
+/*++
+  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:
+
+  SBBRRuntimeServicesBBTestMain.h
+
+Abstract:
+
+  Header file for SBBRRuntimeServicesBBTestMain.c.
+
+--*/
+
+#ifndef _SBBRRUNTIMESERVICES_TEST_MAIN_H_
+#define _SBBRRUNTIMESERVICES_TEST_MAIN_H_
+
+#include "Efi.h"
+
+#define SBBRRUNTIMESERVICES_TEST_REVISION 0x00010000
+
+#define SBBRRUNTIMESERVICES_TEST_GUID     \
+  { 0x52A69BBF, 0xE19F, 0x4e82, {0x93, 0xD6, 0xAA, 0xC4, 0x6E, 0x2E, 0x1E, 0x06 }}
+
+EFI_STATUS
+InitializeBBTestSBBRRuntimeServices (
+  IN EFI_HANDLE           ImageHandle,
+  IN EFI_SYSTEM_TABLE     *SystemTable
+  );
+
+EFI_STATUS
+BBTestSBBRRuntimeServices (
+  IN EFI_HANDLE       ImageHandle
+  );
+
+//
+// Entry GUIDs
+//
+
+#define SBBRRUNTIMESERVICES_TEST_CASE_GUID \
+  { 0xe867fa15, 0x942b, 0x4c69, {0xad, 0xee, 0xf9, 0x3b, 0x11, 0x71, 0xd0, 0x8c }}
+
+#endif /* _SBBRRUNTIMESERVICES_TEST_MAIN_H_ */
diff --git a/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc b/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
index 3a637e2..9020ade 100644
--- a/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
+++ b/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
@@ -246,6 +246,30 @@ SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Proto
 SctPkg/TestCase/UEFI/EFI/Generic/SbbrSysEnvConfig/BlackBoxTest/SysEnvConfigBBTest.inf
 #End of UEFI System Environment and Configuration Tests - SBBR v1.0 3.3
 
+# Required UEFI Runtime Services Tests - SBBR v1.0 Appendix B
+#
+##  1. EFI_GET_TIME
+##  2. EFI_SET_TIME
+##  3. EFI_GET_WAKEUP_TIME
+##  4. EFI_SET_WAKEUP_TIME
+SctPkg/TestCase/UEFI/EFI/RuntimeServices/TimeServices/BlackBoxTest/TimeServicesBBTest.inf
+#
+##  5. EFI_GET_VARIABLE
+##  6. EFI_GET_NEXT_VARIABLE_NAME
+##  7. EFI_SET_VARIABLE
+##  8. EFI_QUERY_VARIABLE_INFO
+SctPkg/TestCase/UEFI/EFI/RuntimeServices/VariableServices/BlackBoxTest/VariableServicesBBTest.inf
+#
+##  9. EFI_QUERY_CAPSULE_CAPABILITIES
+## 10. EFI_UPDATE_CAPSULE
+## 11. EFI_RESET_SYSTEM
+SctPkg/TestCase/UEFI/EFI/RuntimeServices/MiscRuntimeServices/BlackBoxTest/MiscRuntimeServicesBBTest.inf
+#
+## 12. EFI_SET_VIRTUAL_ADDRESS_MAP
+## 13. EFI_CONVERT_POINTER
+SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTest.inf
+# End of Runtime Services Tests - SBBR v1.0 Appendix B
+
 #
 # Dependency files
 #
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [edk2-test][RFC PATCH 05/12] uefi-sct/SctPkg: sbbr: Add test cases for SBBR v1.0 Appendix C
  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
                   ` (2 preceding siblings ...)
  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  8:47 ` 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
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 24+ messages in thread
From: Sakar Arora @ 2018-11-06  8:47 UTC (permalink / raw)
  To: edk2-devel; +Cc: Supreeth.Venkatesh, prasanth.pulla

From: John Powell <john.powell@arm.com>

GenericTest/RequiredUefiProtocols covers part of Appendix C and
GenericTest/EfiCompliant covers the remaining requirements.

This patch also fixes a few small formatting issues in CommonGenFramework.sh
and SBBR_SCT.dsc

Change-Id: I541d425dfcc630725ecb6f874fc396cdd151221e
Signed-off-by: John Powell <john.powell@arm.com>
---
 uefi-sct/SctPkg/CommonGenFramework.sh              |  16 ++-
 uefi-sct/SctPkg/Config/Data/Category.ini           |   7 +
 .../SbbrRequiredUefiProtocols/BlackBoxTest/Guid.c  |  61 +++++++++
 .../SbbrRequiredUefiProtocols/BlackBoxTest/Guid.h  |  66 +++++++++
 .../BlackBoxTest/RequiredUefiProtocolsBBTest.inf   |  81 +++++++++++
 .../RequiredUefiProtocolsBBTestFunction.c          | 149 +++++++++++++++++++++
 .../RequiredUefiProtocolsBBTestFunction.h          |  86 ++++++++++++
 .../BlackBoxTest/RequiredUefiProtocolsBBTestMain.c | 130 ++++++++++++++++++
 .../BlackBoxTest/RequiredUefiProtocolsBBTestMain.h |  88 ++++++++++++
 uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc                  |   8 ++
 10 files changed, 686 insertions(+), 6 deletions(-)
 create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrRequiredUefiProtocols/BlackBoxTest/Guid.c
 create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrRequiredUefiProtocols/BlackBoxTest/Guid.h
 create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrRequiredUefiProtocols/BlackBoxTest/RequiredUefiProtocolsBBTest.inf
 create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrRequiredUefiProtocols/BlackBoxTest/RequiredUefiProtocolsBBTestFunction.c
 create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrRequiredUefiProtocols/BlackBoxTest/RequiredUefiProtocolsBBTestFunction.h
 create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrRequiredUefiProtocols/BlackBoxTest/RequiredUefiProtocolsBBTestMain.c
 create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrRequiredUefiProtocols/BlackBoxTest/RequiredUefiProtocolsBBTestMain.h

diff --git a/uefi-sct/SctPkg/CommonGenFramework.sh b/uefi-sct/SctPkg/CommonGenFramework.sh
index bf94d8e..aecd21b 100755
--- a/uefi-sct/SctPkg/CommonGenFramework.sh
+++ b/uefi-sct/SctPkg/CommonGenFramework.sh
@@ -355,14 +355,14 @@ then
     # *********************************************
 
     # Boot Services Tests - SBBR v1.0 Appendix A
-    cp $ProcessorType/EventTimerTaskPriorityServicesBBTest.efi          $Framework/Test/  > NUL
-    cp $ProcessorType/ImageServicesBBTest.efi                           $Framework/Test/  > NUL
-    cp $ProcessorType/MemoryAllocationServicesBBTest.efi                $Framework/Test/  > NUL
-    cp $ProcessorType/MiscBootServicesBBTest.efi                        $Framework/Test/  > NUL
-    cp $ProcessorType/ProtocolHandlerServicesBBTest.efi                 $Framework/Test/  > NUL
+    cp $ProcessorType/EventTimerTaskPriorityServicesBBTest.efi $Framework/Test/ > NUL
+    cp $ProcessorType/ImageServicesBBTest.efi                  $Framework/Test/ > NUL
+    cp $ProcessorType/MemoryAllocationServicesBBTest.efi       $Framework/Test/ > NUL
+    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
+    cp $ProcessorType/SysEnvConfigBBTest.efi                   $Framework/Test/ > NUL
 
     # Runtime Services Tests - SBBR v1.0 Appendix B
     cp $ProcessorType/VariableServicesBBTest.efi               $Framework/Test/ > NUL
@@ -370,6 +370,10 @@ then
     cp $ProcessorType/MiscRuntimeServicesBBTest.efi            $Framework/Test/ > NUL
     cp $ProcessorType/SBBRRuntimeServicesBBTest.efi            $Framework/Test/ > NUL
 
+    # Tests SBBR Appendix C
+    cp $ProcessorType/RequiredUefiProtocolsBBTest.efi          $Framework/Test/ > NUL
+    cp $ProcessorType/EfiCompliantBBTest.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 a41cd0f..9576971 100644
--- a/uefi-sct/SctPkg/Config/Data/Category.ini
+++ b/uefi-sct/SctPkg/Config/Data/Category.ini
@@ -89,6 +89,13 @@ Description   =
 
 [Category Data]
 Revision      = 0x00010000
+CategoryGuid  = 6b4d5d18-f55f-4fc5-8496-f10022375c04
+InterfaceGuid = 71652D04-BF38-434A-BCB8-6547D7FD8384
+Name          = GenericTest\SbbrRequiredUefiProtocols
+Description   = Checks that UEFI protocols required by ARM SBBR are present.
+
+[Category Data]
+Revision      = 0x00010000
 CategoryGuid  = D84A6430-99F5-4660-8454-6E4C896A7E51
 InterfaceGuid = 71652D04-BF38-434a-BCB8-6547D7FD8384
 Name          = GenericTest\SbbrSysEnvConfig
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrRequiredUefiProtocols/BlackBoxTest/Guid.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrRequiredUefiProtocols/BlackBoxTest/Guid.c
new file mode 100644
index 0000000..1886989
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrRequiredUefiProtocols/BlackBoxTest/Guid.c
@@ -0,0 +1,61 @@
+/*++
+  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.
+
+--*/
+/*++
+
+Module Name:
+
+  Guid.c
+
+Abstract:
+
+  Global variable assignments for GUIDs used in test assertions.
+
+--*/
+
+#include "Efi.h"
+#include "Guid.h"
+
+EFI_GUID gRequiredUefiProtocolsAssertion001Guid = REQUIREDUEFIPROTOCOLS_ASSERTION_001_GUID;
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrRequiredUefiProtocols/BlackBoxTest/Guid.h b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrRequiredUefiProtocols/BlackBoxTest/Guid.h
new file mode 100644
index 0000000..121ad19
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrRequiredUefiProtocols/BlackBoxTest/Guid.h
@@ -0,0 +1,66 @@
+/*++
+  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.
+
+--*/
+/*++
+
+Module Name:
+
+  Guid.h
+
+Abstract:
+
+  Definitions for GUIDs used in test assertions.
+
+--*/
+
+#ifndef _REQUIREDUEFIPROTOCOLS_GUID_H_
+#define _REQUIREDUEFIPROTOCOLS_GUID_H_
+
+#define REQUIREDUEFIPROTOCOLS_ASSERTION_001_GUID \
+{ 0x6092f275, 0x19ca, 0x413a, {0xac, 0xc8, 0x60, 0xd6, 0xe0, 0xca, 0x70, 0x54 }}
+
+extern EFI_GUID gRequiredUefiProtocolsAssertion001Guid;
+
+#endif /* _REQUIREDUEFIPROTOCOLS_GUID_H_ */
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrRequiredUefiProtocols/BlackBoxTest/RequiredUefiProtocolsBBTest.inf b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrRequiredUefiProtocols/BlackBoxTest/RequiredUefiProtocolsBBTest.inf
new file mode 100644
index 0000000..674aba0
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrRequiredUefiProtocols/BlackBoxTest/RequiredUefiProtocolsBBTest.inf
@@ -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.
+#
+#
+#/*++
+#
+# Module Name:
+#
+#   RequiredUefiProtocolsBBTest.inf
+#
+# Abstract:
+#
+#   Component description file for RequiredUefiProtocols tests.
+#
+#--*/
+
+[Defines]
+  INF_VERSION          = 0x00010005
+  BASE_NAME            = RequiredUefiProtocolsBBTest
+  FILE_GUID            = acc875f3-9c75-4392-9b95-fcb97d48890e
+  MODULE_TYPE          = UEFI_DRIVER
+  VERSION_STRING       = 1.0
+  ENTRY_POINT          = InitializeBBTestRequiredUefiProtocols
+
+[Sources.common]
+  RequiredUefiProtocolsBBTestMain.c
+  RequiredUefiProtocolsBBTestFunction.c
+  Guid.c
+
+[Packages]
+  MdePkg/MdePkg.dec
+  SctPkg/SctPkg.dec
+  SctPkg/UEFI/UEFI.dec
+
+[LibraryClasses]
+  UefiDriverEntryPoint
+  SctLib
+  EfiTestLib
+
+[Protocols]
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrRequiredUefiProtocols/BlackBoxTest/RequiredUefiProtocolsBBTestFunction.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrRequiredUefiProtocols/BlackBoxTest/RequiredUefiProtocolsBBTestFunction.c
new file mode 100644
index 0000000..6b149ee
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrRequiredUefiProtocols/BlackBoxTest/RequiredUefiProtocolsBBTestFunction.c
@@ -0,0 +1,149 @@
+/*++
+  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.
+
+--*/
+/*++
+
+Module Name:
+
+  RequiredUefiProtocolsBBTestFunction.c
+
+Abstract:
+
+  Test case function definitions for RequiredUefiProtocols.
+
+--*/
+
+#include "RequiredUefiProtocolsBBTestMain.h"
+#include "RequiredUefiProtocolsBBTestFunction.h"
+#include "SctLib.h"
+#include "Guid.h"
+
+/**
+ *  Entrypoint for MediaIoProtocols 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.
+ */
+
+EFI_STATUS
+BBTestMediaIoProtocolsTest (
+  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;
+  EFI_HANDLE                          *HandleBuffer;
+  UINTN                               NumberOfHandles;
+  SBBR_REQUIRED_PROTOCOL             Protocol[] = {
+                                        {EFI_LOAD_FILE_PROTOCOL_GUID, L"EFI_LOAD_FILE_PROTOCOL"},
+                                        {EFI_LOAD_FILE2_PROTOCOL_GUID, L"EFI_LOAD_FILE2_PROTOCOL"},
+                                        {gEfiNullGuid, 0}
+                                      };
+  UINT32                              i;
+
+  //
+  // Get the Standard Library Interface
+  //
+  Status = gtBS->HandleProtocol (
+              SupportHandle,
+              &gEfiStandardTestLibraryGuid,
+              (VOID **) &StandardLib
+              );
+  if (EFI_ERROR (Status)) {
+    return Status;
+  }
+
+  //
+  // Looking for Protocols
+  //
+  i = 0;
+  while (SctCompareGuid (&Protocol[i].guid, &gEfiNullGuid) != 0){
+    Status = gBS->LocateHandleBuffer (
+                ByProtocol,
+                &Protocol[i].guid,
+                NULL,
+                &NumberOfHandles,
+                &HandleBuffer
+                );
+
+    if ((Status == EFI_NOT_FOUND) && (NumberOfHandles == 0)){
+      // Protocol not found
+      StandardLib->RecordAssertion (
+                  StandardLib,
+                  EFI_TEST_ASSERTION_FAILED,
+                  gRequiredUefiProtocolsAssertion001Guid,
+                  L"MediaIoProtocols",
+                  L"%a:%d:%s Not Found",
+                  __FILE__,
+                  __LINE__,
+                  Protocol[i].name
+                  );
+    }
+    else {
+      // Protocol found
+      StandardLib->RecordAssertion (
+                  StandardLib,
+                  EFI_TEST_ASSERTION_PASSED,
+                  gRequiredUefiProtocolsAssertion001Guid,
+                  L"MediaIoProtocols",
+                  L"%a:%d:%s Found",
+                  __FILE__,
+                  __LINE__,
+                  Protocol[i].name
+                  );
+    }
+
+    i++;
+  }
+
+  return EFI_SUCCESS;
+}
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrRequiredUefiProtocols/BlackBoxTest/RequiredUefiProtocolsBBTestFunction.h b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrRequiredUefiProtocols/BlackBoxTest/RequiredUefiProtocolsBBTestFunction.h
new file mode 100644
index 0000000..15009c9
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrRequiredUefiProtocols/BlackBoxTest/RequiredUefiProtocolsBBTestFunction.h
@@ -0,0 +1,86 @@
+/*++
+  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.
+
+--*/
+/*++
+
+Module Name:
+
+  RequiredUefiProtocolsBBTestFunction.h
+
+Abstract:
+
+  Contains definitions and prototypes for test case functions.
+
+--*/
+
+#ifndef _REQUIREDUEFIPROTOCOLS_BB_TEST_FUNCTION_H_
+#define _REQUIREDUEFIPROTOCOLS_BB_TEST_FUNCTION_H_
+
+/*
+ * GUIDs of protocols we're looking for are here as to avoid
+ * compilation errors in the case that they do not exist in the
+ * system.
+ */
+
+#define EFI_LOAD_FILE_PROTOCOL_GUID \
+{0x56EC3091, 0x954C, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B}}
+
+#define EFI_LOAD_FILE2_PROTOCOL_GUID \
+{0x4006C0C1, 0xFCB3, 0x403E, {0x99, 0x6D, 0x4A, 0x6C, 0x87, 0x24, 0xE0, 0x6D}}
+
+typedef struct {
+  EFI_GUID guid;
+  UINT16 *name;
+} SBBR_REQUIRED_PROTOCOL;
+
+EFI_STATUS
+BBTestMediaIoProtocolsTest (
+  IN EFI_BB_TEST_PROTOCOL       *This,
+  IN VOID                       *ClientInterface,
+  IN EFI_TEST_LEVEL             TestLevel,
+  IN EFI_HANDLE                 SupportHandle
+  );
+
+#endif /* _REQUIREDUEFIPROTOCOLS_BB_TEST_FUNCTION_H_ */
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrRequiredUefiProtocols/BlackBoxTest/RequiredUefiProtocolsBBTestMain.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrRequiredUefiProtocols/BlackBoxTest/RequiredUefiProtocolsBBTestMain.c
new file mode 100644
index 0000000..72056e0
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrRequiredUefiProtocols/BlackBoxTest/RequiredUefiProtocolsBBTestMain.c
@@ -0,0 +1,130 @@
+/*++
+  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.
+
+--*/
+/*++
+
+Module Name:
+
+  RequiredUefiProtocolsBBTestMain.c
+
+Abstract:
+
+  Test driver for RequiredUefiProtocols tests.
+
+--*/
+
+#include "SctLib.h"
+#include "RequiredUefiProtocolsBBTestMain.h"
+#include "RequiredUefiProtocolsBBTestFunction.h"
+
+EFI_BB_TEST_PROTOCOL_FIELD gBBTestProtocolField = {
+  REQUIREDUEFIPROTOCOLS_TEST_REVISION,
+  REQUIREDUEFIPROTOCOLS_TEST_GUID,
+  L"RequiredUefiProtocols Tests",
+  L"Checks that UEFI protocols required by ARM SBBR are present."
+};
+
+EFI_GUID gSupportProtocolGuid[2] = {
+  EFI_STANDARD_TEST_LIBRARY_GUID,
+  EFI_NULL_GUID
+};
+
+EFI_BB_TEST_ENTRY_FIELD gBBTestEntryField[] = {
+  {
+    REQUIREDUEFIPROTOCOLS_MEDIAIOPROTOCOLS_GUID,
+    L"MediaIoProtocols",
+    L"Checks to make sure various media IO protocols are supported.",
+    EFI_TEST_LEVEL_DEFAULT,
+    gSupportProtocolGuid,
+    EFI_TEST_CASE_AUTO,
+    BBTestMediaIoProtocolsTest
+  },
+  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
+BBTestRequiredUefiProtocolsUnload (
+  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
+InitializeBBTestRequiredUefiProtocols (
+  IN EFI_HANDLE           ImageHandle,
+  IN EFI_SYSTEM_TABLE     *SystemTable
+  )
+{
+
+  EfiInitializeTestLib (ImageHandle, SystemTable);
+
+  return EfiInitAndInstallBBTestInterface (
+           &ImageHandle,
+           &gBBTestProtocolField,
+           gBBTestEntryField,
+           BBTestRequiredUefiProtocolsUnload,
+           &gBBTestProtocolInterface
+           );
+}
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrRequiredUefiProtocols/BlackBoxTest/RequiredUefiProtocolsBBTestMain.h b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrRequiredUefiProtocols/BlackBoxTest/RequiredUefiProtocolsBBTestMain.h
new file mode 100644
index 0000000..26e591c
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrRequiredUefiProtocols/BlackBoxTest/RequiredUefiProtocolsBBTestMain.h
@@ -0,0 +1,88 @@
+/*++
+  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.
+
+--*/
+/*++
+
+Module Name:
+
+  RequiredUefiProtocolsBBTestMain.h
+
+Abstract:
+
+  Contains definitions for test information and test GUIDs.
+
+--*/
+
+#ifndef _REQUIREDUEFIPROTOCOLS_TEST_MAIN_H_
+#define _REQUIREDUEFIPROTOCOLS_TEST_MAIN_H_
+
+#include "Efi.h"
+#include "Guid.h"
+#include <Library/EfiTestLib.h>
+
+#define REQUIREDUEFIPROTOCOLS_TEST_REVISION 0x00010000
+
+#define REQUIREDUEFIPROTOCOLS_TEST_GUID \
+{ 0x6b4d5d18, 0xf55f, 0x4fc5, {0x84, 0x96, 0xf1, 0x00, 0x22, 0x37, 0x5c, 0x04 }}
+
+EFI_STATUS
+InitializeBBTestRequiredUefiProtocols (
+  IN EFI_HANDLE           ImageHandle,
+  IN EFI_SYSTEM_TABLE     *SystemTable
+  );
+
+EFI_STATUS
+BBTestBootRequiredUefiProtocols (
+  IN EFI_HANDLE       ImageHandle
+  );
+
+//
+// Entry GUIDs
+//
+
+#define REQUIREDUEFIPROTOCOLS_MEDIAIOPROTOCOLS_GUID \
+{ 0x24d52c4c, 0xafeb, 0x49ea, {0xa7, 0x77, 0x8f, 0xe1, 0x9f, 0x32, 0x20, 0x66 }}
+
+#endif /* _REQUIREDUEFIPROTOCOLS_TEST_MAIN_H_ */
diff --git a/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc b/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
index 9020ade..ae0a009 100644
--- a/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
+++ b/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
@@ -246,6 +246,7 @@ SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Proto
 SctPkg/TestCase/UEFI/EFI/Generic/SbbrSysEnvConfig/BlackBoxTest/SysEnvConfigBBTest.inf
 #End of UEFI System Environment and Configuration Tests - SBBR v1.0 3.3
 
+#
 # Required UEFI Runtime Services Tests - SBBR v1.0 Appendix B
 #
 ##  1. EFI_GET_TIME
@@ -271,6 +272,13 @@ SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRu
 # End of Runtime Services Tests - SBBR v1.0 Appendix B
 
 #
+# UEFI Required Protocols Tests - SBBR Appendix C
+#
+SctPkg/TestCase/UEFI/EFI/Generic/SbbrRequiredUefiProtocols/BlackBoxTest/RequiredUefiProtocolsBBTest.inf
+SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompliantBBTest_uefi.inf
+# End of UEFI Required Protocols Tests - SBBR Appendix C
+
+#
 # Dependency files
 #
 
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [edk2-test][RFC PATCH 06/12] uefi-sct/SctPkg: sbbr: Add test cases for SBBR v1.0 3.5.4 and 3.5.5
  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
                   ` (3 preceding siblings ...)
  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 ` 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
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 24+ messages in thread
From: Sakar Arora @ 2018-11-06  8:47 UTC (permalink / raw)
  To: edk2-devel; +Cc: Supreeth.Venkatesh, prasanth.pulla

From: John Powell <john.powell@arm.com>

3.5.4 tests ResetSystem runtime service functions. The PSCI portion
of this requirement will be handled later or removed completely.

3.5.5 tests non-volatile variable persistence across resets.

Signed-off-by: John Powell <john.powell@arm.com>
---
 .../SBBRRuntimeServices/BlackBoxTest/Guid.c        |   6 +
 .../SBBRRuntimeServices/BlackBoxTest/Guid.h        |  16 +
 .../BlackBoxTest/SBBRRuntimeServicesBBTest.inf     |   1 +
 .../SBBRRuntimeServicesBBTestFunction.c            | 391 +++++++++++++++++++++
 .../SBBRRuntimeServicesBBTestFunction.h            |  19 +
 .../BlackBoxTest/SBBRRuntimeServicesBBTestMain.c   |  25 ++
 .../BlackBoxTest/SBBRRuntimeServicesBBTestMain.h   |  20 ++
 7 files changed, 478 insertions(+)

diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/Guid.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/Guid.c
index 374b767..11dcfac 100644
--- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/Guid.c
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/Guid.c
@@ -59,3 +59,9 @@ Abstract:
 #include "Guid.h"
 
 EFI_GUID gSBBRRuntimeServicesAssertion001Guid = SBBRRUNTIMESERVICES_ASSERTION_001_GUID;
+
+EFI_GUID gSBBRRuntimeServicesAssertion002Guid = SBBRRUNTIMESERVICES_ASSERTION_002_GUID;
+
+EFI_GUID gSBBRRuntimeServicesAssertion003Guid = SBBRRUNTIMESERVICES_ASSERTION_003_GUID;
+
+EFI_GUID gSBBRRuntimeServicesAssertion004Guid = SBBRRUNTIMESERVICES_ASSERTION_004_GUID;
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/Guid.h b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/Guid.h
index 86165b3..29fcc1f 100644
--- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/Guid.h
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/Guid.h
@@ -62,4 +62,20 @@ Abstract:
 { 0x787ad247, 0xc901, 0x49d8, {0x84, 0x82, 0x91, 0x5e, 0x09, 0x61, 0xcf, 0x34 }}
 
 extern EFI_GUID gSBBRRuntimeServicesAssertion001Guid;
+
+#define SBBRRUNTIMESERVICES_ASSERTION_002_GUID \
+{ 0xcd4cedc0, 0xf8e3, 0x4f75, {0xbd, 0xec, 0x6d, 0xf2, 0xa6, 0x9f, 0xa4, 0x0f }}
+
+extern EFI_GUID gSBBRRuntimeServicesAssertion002Guid;
+
+#define SBBRRUNTIMESERVICES_ASSERTION_003_GUID \
+{ 0x5a353070, 0xc002, 0x48b7, {0xae, 0x15, 0x80, 0x77, 0xe2, 0x7a, 0x25, 0xaf }}
+
+extern EFI_GUID gSBBRRuntimeServicesAssertion003Guid;
+
+#define SBBRRUNTIMESERVICES_ASSERTION_004_GUID \
+{ 0xe8c528de, 0x4b69, 0x4c6b, {0xaa, 0xec, 0x69, 0x64, 0x59, 0x69, 0x26, 0x6f }}
+
+extern EFI_GUID gSBBRRuntimeServicesAssertion004Guid;
+
 #endif /* _SBBRRUNTIMESERVICES_GUID_H_ */
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTest.inf b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTest.inf
index f6c6856..fd4dae0 100644
--- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTest.inf
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTest.inf
@@ -79,3 +79,4 @@
   UefiDriverEntryPoint
 
 [Protocols]
+  gEfiTestRecoveryLibraryGuid
\ No newline at end of file
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTestFunction.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTestFunction.c
index 1f19cef..3cee3ab 100644
--- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTestFunction.c
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTestFunction.c
@@ -56,8 +56,10 @@ Abstract:
 --*/
 #include "Guid.h"
 #include "SctLib.h"
+#include <Library/EfiTestLib.h>
 #include "SBBRRuntimeServicesBBTestMain.h"
 #include "SBBRRuntimeServicesBBTestFunction.h"
+#include EFI_TEST_PROTOCOL_DEFINITION(TestRecoveryLibrary)
 
 
 
@@ -216,3 +218,392 @@ BBTestRuntimeServices (
 
   return EFI_SUCCESS;
 }
+
+
+extern EFI_TPL TplArray [];
+
+
+/**
+ *  Entrypoint for gtRT->ResetSystem() Manual 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.5.4
+//
+EFI_STATUS
+BBTestResetShutdown (
+  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_TEST_RECOVERY_LIBRARY_PROTOCOL   *RecoveryLib;
+  EFI_STATUS                           Status;
+  EFI_TEST_ASSERTION                   AssertionType;
+  UINTN                                Index;
+  EFI_TPL                              OldTpl;
+  UINT8                                Buffer[1024];
+  RESET_DATA                           *ResetData;
+  UINTN                                Size;
+
+  //
+  // Get the Standard Library Interface
+  //
+  Status = gtBS->HandleProtocol (
+              SupportHandle,
+              &gEfiStandardTestLibraryGuid,
+              (VOID **) &StandardLib
+              );
+
+  if (EFI_ERROR (Status)) {
+    return Status;
+  }
+
+  //
+  // Get the Recovery Library Interface
+  //
+  Status = gtBS->HandleProtocol (
+              SupportHandle,
+              &gEfiTestRecoveryLibraryGuid,
+              (VOID **) &RecoveryLib
+              );
+
+  if (EFI_ERROR (Status)) {
+    StandardLib->RecordAssertion (
+                StandardLib,
+                EFI_TEST_ASSERTION_FAILED,
+                gTestGenericFailureGuid,
+                L"BS.HandleProtocol - Handle recovery library",
+                L"%a:%d:Status - %r",
+                __FILE__,
+                (UINTN)__LINE__,
+                Status
+                );
+    return Status;
+  }
+
+  //
+  // Read reset record
+  //
+  Status = RecoveryLib->ReadResetRecord (
+              RecoveryLib,
+              &Size,
+              Buffer
+              );
+  ResetData = (RESET_DATA *)Buffer;
+  if (EFI_ERROR (Status) || (Size < sizeof (RESET_DATA))) {
+    //
+    // Step 1
+    //
+  } else if (ResetData->Step == 1) {
+    //
+    // Step 2
+    //
+    if (ResetData->TplIndex < TPL_ARRAY_SIZE) {
+      Index = ResetData->TplIndex;
+      AssertionType = EFI_TEST_ASSERTION_PASSED;
+      goto ManualTestStep2;
+    }
+  } else {
+    return EFI_LOAD_ERROR;
+  }
+
+  for (Index = 0; Index < TPL_ARRAY_SIZE; Index++) {
+    //
+    // 4.2.2.1  ResetSystem must succeed when ResetType is EfiResetShutdown
+    //
+    ResetData->Step = 1;
+    ResetData->TplIndex = Index;
+    Status = RecoveryLib->WriteResetRecord (
+                RecoveryLib,
+                sizeof (RESET_DATA),
+                Buffer
+                );
+    if (EFI_ERROR (Status)) {
+      StandardLib->RecordAssertion (
+                  StandardLib,
+                  EFI_TEST_ASSERTION_FAILED,
+                  gTestGenericFailureGuid,
+                  L"TestRecoveryLib - WriteResetRecord",
+                  L"%a:%d:Status - %r, TPL - %d",
+                  __FILE__,
+                  (UINTN)__LINE__,
+                  Status,
+                  TplArray[Index]
+                  );
+      return Status;
+    }
+
+    //
+    // Print out some information to avoid the user thought it is an error.
+    //
+    // And the stall a second is required to make sure the recovery data has
+    // been written into the storage device.
+    //
+    SctPrint (L"System will shut down (or cold reset) after 1 second...");
+    gtBS->Stall (1000000);
+
+    OldTpl = gtBS->RaiseTPL (TplArray[Index]);
+    gtRT->ResetSystem (
+                EfiResetShutdown,
+                EFI_SUCCESS,
+                0,
+                NULL
+                );
+    gtBS->RestoreTPL (OldTpl);
+    AssertionType = EFI_TEST_ASSERTION_FAILED;
+
+ManualTestStep2:
+    StandardLib->RecordAssertion (
+                StandardLib,
+                AssertionType,
+                Index==0? \
+                  gSBBRRuntimeServicesAssertion003Guid: \
+                  (Index == 1? \
+                  gSBBRRuntimeServicesAssertion002Guid: \
+                  gSBBRRuntimeServicesAssertion003Guid),
+                L"RT.ResetSystem - EfiResetShutdown",
+                L"%a:%d:Status - %r, TPL - %d",
+                __FILE__,
+                (UINTN)__LINE__,
+                Status,
+                TplArray[Index]
+                );
+  }
+
+  return EFI_SUCCESS;
+}
+
+/**
+ *  Entrypoint for NonVolatileVariable 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.5.5
+//
+EFI_STATUS
+BBTestNonVolatileVariable (
+  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_TEST_RECOVERY_LIBRARY_PROTOCOL   *RecoveryLib;
+  EFI_STATUS                           Status;
+  EFI_TEST_ASSERTION                   AssertionType;
+  UINT8                                Buffer[20];
+  EFI_GUID                             ResetGuid = SBBRRUNTIMESERVICES_NONVOLATILEVARIABLE_RESET_GUID;
+  EFI_GUID                             *TestResetGuid;
+  EFI_GUID                             VarVendorGuid = VENDOR_GUID;
+  UINTN                                Size;
+  UINT32                               Attributes;
+  UINT32                               VariableValue = UEFI_VARIABLE_TEST_VALUE;
+  UINT32                               *TestVariableValue;
+
+  //
+  // Get the Standard Library Interface
+  //
+  Status = gtBS->HandleProtocol (
+              SupportHandle,
+              &gEfiStandardTestLibraryGuid,
+              (VOID **) &StandardLib
+              );
+
+  if (EFI_ERROR(Status)) {
+    return Status;
+  }
+
+  //
+  // Get the Recovery Library Interface
+  //
+  Status = gtBS->HandleProtocol (
+              SupportHandle,
+              &gEfiTestRecoveryLibraryGuid,
+              (VOID **) &RecoveryLib
+              );
+  if (EFI_ERROR(Status)) {
+    StandardLib->RecordAssertion (
+                StandardLib,
+                EFI_TEST_ASSERTION_FAILED,
+                gTestGenericFailureGuid,
+                L"BS.HandleProtocol - Handle recovery library",
+                L"%a:%d:Status - %r",
+                __FILE__,
+                (UINTN)__LINE__,
+                Status
+                );
+    return Status;
+  }
+
+  //
+  // Read reset record
+  //
+  Status = RecoveryLib->ReadResetRecord (
+              RecoveryLib,
+              &Size,
+              Buffer
+              );
+  TestResetGuid = (EFI_GUID *)Buffer;
+  if (EFI_ERROR(Status) || SctCompareGuid((void *)TestResetGuid, (void *)&ResetGuid) != 0) {
+    //
+    // Writing a new non-volatile variable for testing after making sure it doesn't already exist.
+    //
+
+    // Making a variable of the same name and vendor GUID with a size of zero to delete anything that might be left over
+    Size = 0;
+    Status = gtRT->SetVariable (
+                TEST_VAR_NAME,
+                &VarVendorGuid,
+                NULL,
+                Size,
+                NULL
+                );
+    if (EFI_ERROR(Status) && Status != EFI_NOT_FOUND) {
+      StandardLib->RecordAssertion (
+                  StandardLib,
+                  EFI_TEST_ASSERTION_FAILED,
+                  gTestGenericFailureGuid,
+                  L"RS.SetVariable",
+                  L"%a:%d:Status - %r",
+                  __FILE__,
+                  (UINTN)__LINE__,
+                  Status
+                  );
+      return Status;
+    }
+
+    // Writing a known value into the UEFI variable with nonvolatile flag
+    Size = sizeof (UINT32);
+    Attributes = EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS;
+    Status = gtRT->SetVariable (
+                TEST_VAR_NAME,
+                &VarVendorGuid,
+                Attributes,
+                Size,
+                (VOID *)&VariableValue
+                );
+    if (EFI_ERROR(Status)) {
+      StandardLib->RecordAssertion (
+                  StandardLib,
+                  EFI_TEST_ASSERTION_FAILED,
+                  gTestGenericFailureGuid,
+                  L"RS.SetVariable",
+                  L"%a:%d:Status - %r",
+                  __FILE__,
+                  (UINTN)__LINE__,
+                  Status
+                  );
+      return Status;
+    }
+
+    // Writing reset record and doing a cold reset
+    SctPrint (L"System will cold reboot...");
+    Status = RecoveryLib->WriteResetRecord (
+                RecoveryLib,
+                sizeof (EFI_GUID),
+                &ResetGuid
+                );
+    gtBS->Stall (1000000);
+    gtRT->ResetSystem (
+                EfiResetCold,
+                EFI_SUCCESS,
+                0,
+                NULL
+                );
+
+    // Execution should never get here
+    StandardLib->RecordAssertion (
+                  StandardLib,
+                  EFI_TEST_ASSERTION_FAILED,
+                  gTestGenericFailureGuid,
+                  L"RT.ResetSystem",
+                  L"%a:%d - System failed to reboot.",
+                  __FILE__,
+                  (UINTN)__LINE__
+                  );
+    return EFI_ABORTED;
+
+  } else if (SctCompareGuid((void *)TestResetGuid, (void *)&ResetGuid) == 0) {
+    //
+    // Reading non-volatile variable to see if it's value was retained.
+    //
+
+    // Calling GetVariable to see if our new variable is still there.
+    Status = gtRT->GetVariable (
+                TEST_VAR_NAME,
+                &VarVendorGuid,
+                &Attributes,
+                &Size,
+                Buffer
+                );
+    if (EFI_ERROR(Status)) {
+      StandardLib->RecordAssertion (
+                  StandardLib,
+                  EFI_TEST_ASSERTION_FAILED,
+                  gTestGenericFailureGuid,
+                  L"RS.GetVariable",
+                  L"%a:%d:Status - %r",
+                  __FILE__,
+                  (UINTN)__LINE__,
+                  Status
+                  );
+      return Status;
+    }
+
+    // Erasing the variable we created from the system
+    Size = 0;
+    Status = gtRT->SetVariable (
+                TEST_VAR_NAME,
+                &VarVendorGuid,
+                NULL,
+                Size,
+                NULL
+                );
+    if (EFI_ERROR(Status)) {
+      StandardLib->RecordAssertion (
+                  StandardLib,
+                  EFI_TEST_ASSERTION_FAILED,
+                  gTestGenericFailureGuid,
+                  L"RS.SetVariable",
+                  L"%a:%d:Status - %r",
+                  __FILE__,
+                  (UINTN)__LINE__,
+                  Status
+                  );
+      return Status;
+    }
+
+    // Checking value received against value written.
+    TestVariableValue = (UINT32 *)Buffer;
+    if (*TestVariableValue == VariableValue) {
+      AssertionType = EFI_TEST_ASSERTION_PASSED;
+    } else {
+      AssertionType = EFI_TEST_ASSERTION_FAILED;
+    }
+    StandardLib->RecordAssertion (
+                StandardLib,
+                AssertionType,
+                gSBBRRuntimeServicesAssertion004Guid,
+                L"NonVolatileVariable",
+                L"%a:%d",
+                __FILE__,
+                (UINTN)__LINE__
+                );
+
+    return EFI_SUCCESS;
+  } else {
+    return EFI_LOAD_ERROR;
+  }
+}
\ No newline at end of file
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTestFunction.h b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTestFunction.h
index 25dd209..f8ae376 100644
--- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTestFunction.h
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTestFunction.h
@@ -60,6 +60,9 @@ Abstract:
 
 #include <Library/EfiTestLib.h>
 
+#define TEST_VAR_NAME (L"SCT_NON_VOLATILE_TEST")
+#define UEFI_VARIABLE_TEST_VALUE 0xDEADBEEF
+
 EFI_STATUS
 BBTestRuntimeServices (
   IN EFI_BB_TEST_PROTOCOL       *This,
@@ -68,4 +71,20 @@ BBTestRuntimeServices (
   IN EFI_HANDLE                 SupportHandle
   );
 
+EFI_STATUS
+BBTestResetShutdown (
+  IN EFI_BB_TEST_PROTOCOL       *This,
+  IN VOID                       *ClientInterface,
+  IN EFI_TEST_LEVEL             TestLevel,
+  IN EFI_HANDLE                 SupportHandle
+  );
+
+EFI_STATUS
+BBTestNonVolatileVariable (
+  IN EFI_BB_TEST_PROTOCOL       *This,
+  IN VOID                       *ClientInterface,
+  IN EFI_TEST_LEVEL             TestLevel,
+  IN EFI_HANDLE                 SupportHandle
+  );
+
 #endif /* _SBBRRUNTIMESERVICES_BB_TEST_FUNCTION_H_ */
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTestMain.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTestMain.c
index 4af06cc..8ce604d 100644
--- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTestMain.c
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTestMain.c
@@ -60,6 +60,12 @@ Abstract:
 #include "SBBRRuntimeServicesBBTestMain.h"
 
 
+EFI_TPL TplArray [TPL_ARRAY_SIZE] = {
+  TPL_APPLICATION,
+  TPL_CALLBACK,
+  TPL_NOTIFY
+};
+
 EFI_BB_TEST_PROTOCOL_FIELD gBBTestProtocolField = {
   SBBRRUNTIMESERVICES_TEST_REVISION,
   SBBRRUNTIMESERVICES_TEST_GUID,
@@ -82,6 +88,24 @@ EFI_BB_TEST_ENTRY_FIELD gBBTestEntryField[] = {
     EFI_TEST_CASE_AUTO,
     BBTestRuntimeServices
   },
+  {
+    SBBRRUNTIMESERVICES_TEST_CASE_RESETSHUTDOWN_GUID,
+    L"ResetSystem Shutdown Test",
+    L"Manual Test for ResetSystem Shutdown.",
+    EFI_TEST_LEVEL_DEFAULT,
+    gSupportProtocolGuid,
+    EFI_TEST_CASE_MANUAL,
+    BBTestResetShutdown
+  },
+  {
+    SBBRRUNTIMESERVICES_TEST_CASE_NONVOLATILEVARIABLE_GUID,
+    L"Non-volatile Variable Reset Test",
+    L"Ensures that non-volatile UEFI variables can survive cold resets.",
+    EFI_TEST_LEVEL_DEFAULT,
+    gSupportProtocolGuid,
+    EFI_TEST_CASE_AUTO,
+    BBTestNonVolatileVariable
+  },
   EFI_NULL_GUID
 };
 
@@ -120,6 +144,7 @@ InitializeBBTestSBBRRuntimeServices (
 {
 
   EfiInitializeTestLib (ImageHandle, SystemTable);
+  SctInitializeLib (ImageHandle, SystemTable);
 
   return EfiInitAndInstallBBTestInterface (
            &ImageHandle,
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTestMain.h b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTestMain.h
index e14b9bb..5b46068 100644
--- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTestMain.h
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTestMain.h
@@ -65,6 +65,20 @@ Abstract:
 #define SBBRRUNTIMESERVICES_TEST_GUID     \
   { 0x52A69BBF, 0xE19F, 0x4e82, {0x93, 0xD6, 0xAA, 0xC4, 0x6E, 0x2E, 0x1E, 0x06 }}
 
+#define SBBRRUNTIMESERVICES_NONVOLATILEVARIABLE_RESET_GUID \
+{ 0xf3a95660, 0xce09, 0x418b, {0x93, 0xfe, 0xd3, 0xfa, 0x9d, 0xe3, 0x9b, 0x45 }}
+
+#define VENDOR_GUID \
+{ 0xb110c08e, 0x9756, 0x4d88, {0xb5, 0x5a, 0x4a, 0x4f, 0x60, 0x3e, 0x71, 0x70 }}
+
+#define TPL_ARRAY_SIZE 3
+
+typedef struct _RESET_DATA {
+  UINTN           Step;
+  UINTN           TplIndex;
+  UINT32          RepeatTimes;
+} RESET_DATA;
+
 EFI_STATUS
 InitializeBBTestSBBRRuntimeServices (
   IN EFI_HANDLE           ImageHandle,
@@ -83,4 +97,10 @@ BBTestSBBRRuntimeServices (
 #define SBBRRUNTIMESERVICES_TEST_CASE_GUID \
   { 0xe867fa15, 0x942b, 0x4c69, {0xad, 0xee, 0xf9, 0x3b, 0x11, 0x71, 0xd0, 0x8c }}
 
+#define SBBRRUNTIMESERVICES_TEST_CASE_RESETSHUTDOWN_GUID \
+  { 0x877143a4, 0xad97, 0x4213, {0x8f, 0x7f, 0x7d, 0xd3, 0x7e, 0xa4, 0x63, 0xd5 }}
+
+#define SBBRRUNTIMESERVICES_TEST_CASE_NONVOLATILEVARIABLE_GUID \
+  { 0xa5936aeb, 0x3642, 0x4d1d, {0xb2, 0x26, 0x09, 0xe0, 0xe0, 0xa5, 0x2b, 0xaf }}
+
 #endif /* _SBBRRUNTIMESERVICES_TEST_MAIN_H_ */
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [edk2-test][RFC PATCH 07/12] uefi-sct/SctPkg: sbbr: Add test cases for SBBR v1.0 boot services
  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
                   ` (4 preceding siblings ...)
  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 ` Sakar Arora
  2018-11-06 17:46   ` Leif Lindholm
  2018-11-06  8:47 ` [edk2-test][RFC PATCH 08/12] uefi-sct/SctPkg: sbbr: UEFI Version Verification Test Sakar Arora
                   ` (5 subsequent siblings)
  11 siblings, 1 reply; 24+ messages in thread
From: Sakar Arora @ 2018-11-06  8:47 UTC (permalink / raw)
  To: edk2-devel; +Cc: Supreeth.Venkatesh, prasanth.pulla

From: John Powell <john.powell@arm.com>

Tests SBBR requirements 3.4.1 and 3.4.4.

Change-Id: I0dd625851db65d04d2a7572a2d6838951c8f7c67
Signed-off-by: John Powell <john.powell@arm.com>
---
 uefi-sct/SctPkg/CommonGenFramework.sh              |   3 +
 uefi-sct/SctPkg/Config/Data/Category.ini           |  11 +-
 .../SbbrBootServices/BlackBoxTest/Guid.c           |  65 +++
 .../SbbrBootServices/BlackBoxTest/Guid.h           |  76 +++
 .../BlackBoxTest/SbbrBootServicesBBTest.inf        |  85 ++++
 .../BlackBoxTest/SbbrBootServicesBBTestFunction.c  | 549 +++++++++++++++++++++
 .../BlackBoxTest/SbbrBootServicesBBTestFunction.h  |  85 ++++
 .../BlackBoxTest/SbbrBootServicesBBTestMain.c      | 149 ++++++
 .../BlackBoxTest/SbbrBootServicesBBTestMain.h      |  99 ++++
 uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc                  |   7 +
 10 files changed, 1127 insertions(+), 2 deletions(-)
 create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/Guid.c
 create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/Guid.h
 create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/SbbrBootServicesBBTest.inf
 create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/SbbrBootServicesBBTestFunction.c
 create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/SbbrBootServicesBBTestFunction.h
 create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/SbbrBootServicesBBTestMain.c
 create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/SbbrBootServicesBBTestMain.h

diff --git a/uefi-sct/SctPkg/CommonGenFramework.sh b/uefi-sct/SctPkg/CommonGenFramework.sh
index aecd21b..ab35c5a 100755
--- a/uefi-sct/SctPkg/CommonGenFramework.sh
+++ b/uefi-sct/SctPkg/CommonGenFramework.sh
@@ -364,6 +364,9 @@ then
     # Tests SBBR sections 3.3.1, 3.3.2, 3.3.3, and 3.3.4
     cp $ProcessorType/SysEnvConfigBBTest.efi                   $Framework/Test/ > NUL
 
+    # UEFI Boot Services - SBBR v1.0 3.4
+    cp $ProcessorType/SbbrBootServicesBBTest.efi               $Framework/Test/ > NUL
+
     # Runtime Services Tests - SBBR v1.0 Appendix B
     cp $ProcessorType/VariableServicesBBTest.efi               $Framework/Test/ > NUL
     cp $ProcessorType/TimeServicesBBTest.efi                   $Framework/Test/ > NUL
diff --git a/uefi-sct/SctPkg/Config/Data/Category.ini b/uefi-sct/SctPkg/Config/Data/Category.ini
index 9576971..17ca639 100644
--- a/uefi-sct/SctPkg/Config/Data/Category.ini
+++ b/uefi-sct/SctPkg/Config/Data/Category.ini
@@ -145,8 +145,15 @@ Description   =
 
 [Category Data]
 Revision      = 0x00010000
-CategoryGuid  = AFF115FB-387B-4C18-8C41-6AFC7F03BB90
-InterfaceGuid = AFF115FB-387B-4C18-8C41-6AFC7F03BB90
+CategoryGuid  = 8dafd7a7-44d0-4cf4-9d28-9f87080fc091
+InterfaceGuid = E9EF7553-F833-4E56-96E8-38AE679523CC
+Name          = BootServicesTest\SbbrBootServices
+Description   = Tests SBBR boot services requirements.
+
+[Category Data]
+Revision      = 0x00010000
+CategoryGuid  = AFF115FB-387B-4c18-8C41-6AFC7F03BB90
+InterfaceGuid = AFF115FB-387B-4c18-8C41-6AFC7F03BB90
 Name          = RuntimeServicesTest
 Description   =
 
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/Guid.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/Guid.c
new file mode 100644
index 0000000..a0224a9
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/Guid.c
@@ -0,0 +1,65 @@
+/*++
+  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 Ltd. All rights reserved.
+
+--*/
+/*++
+
+Module Name:
+
+  Guid.c
+
+Abstract:
+
+  Global variable assignments for GUIDs used in test assertions.
+
+--*/
+
+#include "Efi.h"
+#include "Guid.h"
+
+EFI_GUID gSbbrBootServicesAssertion001Guid = SBBRBOOTSERVICES_ASSERTION_001_GUID;
+
+EFI_GUID gSbbrBootServicesAssertion002Guid = SBBRBOOTSERVICES_ASSERTION_002_GUID;
+
+EFI_GUID gSbbrBootServicesAssertion003Guid = SBBRBOOTSERVICES_ASSERTION_003_GUID;
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/Guid.h b/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/Guid.h
new file mode 100644
index 0000000..9f7d5a9
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/Guid.h
@@ -0,0 +1,76 @@
+/*++
+  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 Ltd. All rights reserved.
+
+--*/
+/*++
+
+Module Name:
+
+  Guid.h
+
+Abstract:
+
+  Definitions for GUIDs used in test assertions.
+
+--*/
+
+#ifndef _SBBRBOOTSERVICES_GUID_H_
+#define _SBBRBOOTSERVICES_GUID_H_
+
+#define SBBRBOOTSERVICES_ASSERTION_001_GUID \
+{ 0x58a44f17, 0x760e, 0x478b, {0xba, 0xef, 0xe2, 0x0b, 0xfb, 0xcd, 0x74, 0x57 }}
+
+extern EFI_GUID gSbbrBootServicesAssertion001Guid;
+
+#define SBBRBOOTSERVICES_ASSERTION_002_GUID \
+{ 0x1e4cdbab, 0x9727, 0x4f71, {0x88, 0x25, 0xb4, 0xb1, 0x6a, 0x58, 0xcf, 0x84 }}
+
+extern EFI_GUID gSbbrBootServicesAssertion002Guid;
+
+#define SBBRBOOTSERVICES_ASSERTION_003_GUID \
+{ 0x2a326d84, 0x5e23, 0x40e1, {0xb8, 0xae, 0xf7, 0xa9, 0xce, 0x18, 0xf9, 0xb5 }}
+
+extern EFI_GUID gSbbrBootServicesAssertion003Guid;
+
+#endif /* _SBBRBOOTSERVICES_GUID_H_ */
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/SbbrBootServicesBBTest.inf b/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/SbbrBootServicesBBTest.inf
new file mode 100644
index 0000000..9abf4e2
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/SbbrBootServicesBBTest.inf
@@ -0,0 +1,85 @@
+#
+# 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 Ltd. All rights reserved.
+#
+#
+#/*++
+#
+# Module Name:
+#
+#   SbbrBootServicesBBTest.inf
+#
+# Abstract:
+#
+#   Component description file for SbbrBootServices tests.
+#
+#--*/
+
+[Defines]
+  INF_VERSION          = 0x00010005
+  BASE_NAME            = SbbrBootServicesBBTest
+  FILE_GUID            = 9fa74174-eacf-468a-adca-f23a6ee190d2
+  MODULE_TYPE          = UEFI_DRIVER
+  VERSION_STRING       = 1.0
+  ENTRY_POINT          = InitializeBBTestSbbrBootServices
+
+[Sources.common]
+  SbbrBootServicesBBTestMain.c
+  SbbrBootServicesBBTestFunction.c
+  Guid.c
+
+[Packages]
+  MdePkg/MdePkg.dec
+  SctPkg/SctPkg.dec
+  SctPkg/UEFI/UEFI.dec
+
+[LibraryClasses]
+  UefiDriverEntryPoint
+  SctLib
+  EfiTestLib
+
+[Protocols]
+
+[Guids]
+  gEfiSmbios3TableGuid
+  gEfiAcpi20TableGuid
\ No newline at end of file
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/SbbrBootServicesBBTestFunction.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/SbbrBootServicesBBTestFunction.c
new file mode 100644
index 0000000..fb50702
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/SbbrBootServicesBBTestFunction.c
@@ -0,0 +1,549 @@
+/*++
+  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 Ltd. All rights reserved.
+
+--*/
+/*++
+
+Module Name:
+
+  SbbrBootServicesBBTestFunction.c
+
+Abstract:
+
+  Test case function definitions for SbbrBootServices.
+
+--*/
+
+#include "Guid.h"
+#include <IndustryStandard/Acpi20.h>
+#include <IndustryStandard/SmBios.h>
+#include "SbbrBootServicesBBTestMain.h"
+#include "SbbrBootServicesBBTestFunction.h"
+#include "SctLib.h"
+
+/* Helper Functions */
+
+STATIC
+UINT8
+SbbrBootServicesByteChecksum (
+  IN VOID                 *Data,
+  IN UINT32               Length
+  )
+{
+  UINT32 i;
+  UINT8 sum = 0;
+  UINT8 *Bytes = (UINT8 *)Data;
+
+  for (i = 0; i < Length; i++){
+    sum = sum + Bytes[i];
+  }
+
+  return sum;
+}
+
+STATIC
+UINT32
+SbbrBootServicesIsRam (
+  EFI_MEMORY_DESCRIPTOR *MemoryMapEntry
+  )
+{
+  switch (MemoryMapEntry->Type)
+  {
+    case EfiLoaderCode:
+    case EfiLoaderData:
+    case EfiBootServicesCode:
+    case EfiBootServicesData:
+    case EfiRuntimeServicesCode:
+    case EfiRuntimeServicesData:
+    case EfiConventionalMemory:
+      return TRUE;
+    default:
+      return FALSE;
+  }
+}
+
+/**
+ *  Entrypoint for MemoryMap 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.
+ */
+
+EFI_STATUS
+BBTestMemoryMapTest (
+  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;
+  UINTN                               MemoryMapSize;
+  VOID                                *MemoryMap;
+  EFI_MEMORY_DESCRIPTOR               *MemoryMapDescriptor;
+  UINTN                               MapKey;
+  UINTN                               DescriptorSize;
+  UINT32                              DescriptorVersion;
+  UINT32                              i;
+  UINT32                              error;
+
+  //
+  // Get the Standard Library Interface
+  //
+  Status = gtBS->HandleProtocol (
+              SupportHandle,
+              &gEfiStandardTestLibraryGuid,
+              &StandardLib
+              );
+  if (EFI_ERROR (Status)) {
+    return Status;
+  }
+
+  //
+  // Getting memory map
+  //
+  MemoryMapSize = 0;
+  Status = gtBS->GetMemoryMap (
+              &MemoryMapSize,
+              MemoryMap,
+              &MapKey,
+              &DescriptorSize,
+              &DescriptorVersion
+              );
+  if (Status != EFI_BUFFER_TOO_SMALL){
+    StandardLib->RecordAssertion (
+                StandardLib,
+                EFI_TEST_ASSERTION_FAILED,
+                gSbbrBootServicesAssertion001Guid,
+                L"MemoryMap",
+                L"%a:%d - MemoryMap Not Found",
+                __FILE__,
+                __LINE__
+                );
+    return EFI_SUCCESS;
+  }
+  MemoryMap = SctAllocatePool(MemoryMapSize);
+  if (MemoryMap == 0) {
+    return EFI_OUT_OF_RESOURCES;
+  }
+  Status = gtBS->GetMemoryMap (
+              &MemoryMapSize,
+              MemoryMap,
+              &MapKey,
+              &DescriptorSize,
+              &DescriptorVersion
+              );
+  if (EFI_ERROR (Status)) {
+    StandardLib->RecordAssertion (
+                StandardLib,
+                EFI_TEST_ASSERTION_FAILED,
+                gSbbrBootServicesAssertion001Guid,
+                L"MemoryMap",
+                L"%a:%d - MemoryMap Not Found",
+                __FILE__,
+                __LINE__
+                );
+    SctFreePool(MemoryMap);
+    return EFI_SUCCESS;
+  }
+
+  //
+  // Looping through each descriptor
+  //
+  for (i = 0; i < MemoryMapSize / DescriptorSize; i++) {
+    MemoryMapDescriptor = (EFI_MEMORY_DESCRIPTOR *)(MemoryMap + (i * DescriptorSize));
+    error = FALSE;
+
+    //
+    // Checking for identity mapping
+    //
+    if (MemoryMapDescriptor->PhysicalStart != MemoryMapDescriptor->VirtualStart) {
+      StandardLib->RecordAssertion (
+                  StandardLib,
+                  EFI_TEST_ASSERTION_FAILED,
+                  gSbbrBootServicesAssertion001Guid,
+                  L"MemoryMap",
+                  L"%a:%d - MemoryMap 0x%X Not Identity Mapped",
+                  __FILE__,
+                  __LINE__,
+                  MemoryMapDescriptor
+                  );
+      error = TRUE;
+    }
+
+    //
+    // Checking attribute
+    //
+    if (SbbrBootServicesIsRam(MemoryMapDescriptor) == TRUE && !(MemoryMapDescriptor->Attribute & EFI_MEMORY_WB)) {
+      StandardLib->RecordAssertion (
+                  StandardLib,
+                  EFI_TEST_ASSERTION_FAILED,
+                  gSbbrBootServicesAssertion001Guid,
+                  L"MemoryMap",
+                  L"%a:%d - MemoryMap 0x%X Attribute Not Supported",
+                  __FILE__,
+                  __LINE__,
+                  MemoryMapDescriptor
+                  );
+      error = TRUE;
+    }
+
+    //
+    // Checking for 64KB alignment
+    //
+    if (MemoryMapDescriptor->PhysicalStart & (SIZE_64KB - 1)) {
+      StandardLib->RecordAssertion (
+                  StandardLib,
+                  EFI_TEST_ASSERTION_FAILED,
+                  gSbbrBootServicesAssertion001Guid,
+                  L"MemoryMap",
+                  L"%a:%d - MemoryMap 0x%X Not Aligned to 64KB",
+                  __FILE__,
+                  __LINE__,
+                  MemoryMapDescriptor
+                  );
+      error = TRUE;
+    }
+
+    //
+    // No issues found
+    //
+    if (error == FALSE) {
+      StandardLib->RecordAssertion (
+                  StandardLib,
+                  EFI_TEST_ASSERTION_PASSED,
+                  gSbbrBootServicesAssertion001Guid,
+                  L"MemoryMap 0x%X",
+                  L"%a:%d",
+                  __FILE__,
+                  __LINE__,
+                  MemoryMapDescriptor
+                  );
+    }
+  }
+
+  SctFreePool(MemoryMap);
+  return EFI_SUCCESS;
+}
+
+/**
+ *  Entrypoint for AcpiTable 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.
+ */
+
+EFI_STATUS
+BBTestAcpiTableTest (
+  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;
+  UINTN                               IStatus;
+  EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER     *AcpiTable;
+  UINT8                               Checksum;
+  UINT32                              i;
+
+  //
+  // Get the Standard Library Interface
+  //
+  Status = gtBS->HandleProtocol (
+              SupportHandle,
+              &gEfiStandardTestLibraryGuid,
+              &StandardLib
+              );
+  if (EFI_ERROR (Status)) {
+    return Status;
+  }
+
+  //
+  // Looking for ACPI table
+  //
+  Status = SctGetSystemConfigurationTable (
+              &gEfiAcpi20TableGuid,
+              &AcpiTable
+              );
+  if (EFI_ERROR (Status)){
+    StandardLib->RecordAssertion (
+                StandardLib,
+                EFI_TEST_ASSERTION_FAILED,
+                gSbbrBootServicesAssertion002Guid,
+                L"AcpiTable",
+                L"%a:%d - ACPI Table Not Found",
+                __FILE__,
+                __LINE__
+                );
+  }
+
+  //
+  // Checking ACPI table signature
+  //
+  IStatus = SctCompareMem (
+              &AcpiTable->Signature,
+              RSDP_SIGNATURE_STRING,
+              sizeof(RSDP_SIGNATURE_STRING) - 1
+              );
+  if (IStatus != 0) {
+    StandardLib->RecordAssertion (
+                StandardLib,
+                EFI_TEST_ASSERTION_FAILED,
+                gSbbrBootServicesAssertion002Guid,
+                L"AcpiTable",
+                L"%a:%d - ACPI Table Invalid Signature",
+                __FILE__,
+                __LINE__
+                );
+  }
+
+  //
+  // Checking ACPI table checksum
+  //
+  Checksum = SbbrBootServicesByteChecksum (AcpiTable, ACPI_TABLE_CHECKSUM_LENGTH);
+  if (Checksum != 0) {
+    StandardLib->RecordAssertion (
+                StandardLib,
+                EFI_TEST_ASSERTION_FAILED,
+                gSbbrBootServicesAssertion002Guid,
+                L"AcpiTable",
+                L"%a:%d - ACPI Table Invalid Checksum",
+                __FILE__,
+                __LINE__
+                );
+    return EFI_SUCCESS;
+  }
+
+  //
+  // Checking ACPI table extended checksum
+  //
+  Checksum = SbbrBootServicesByteChecksum (AcpiTable, AcpiTable->Length);
+  if (Checksum != 0) {
+    StandardLib->RecordAssertion (
+                StandardLib,
+                EFI_TEST_ASSERTION_FAILED,
+                gSbbrBootServicesAssertion002Guid,
+                L"AcpiTable",
+                L"%a:%d - ACPI Table Invalid Extended Checksum",
+                __FILE__,
+                __LINE__
+                );
+    return EFI_SUCCESS;
+  }
+
+  //
+  // Checking ACPI table length
+  //
+  if (AcpiTable->Length != ACPI_TABLE_EXPECTED_LENGTH) {
+    StandardLib->RecordAssertion (
+                StandardLib,
+                EFI_TEST_ASSERTION_FAILED,
+                gSbbrBootServicesAssertion002Guid,
+                L"AcpiTable",
+                L"%a:%d - ACPI Table Invalid Length",
+                __FILE__,
+                __LINE__
+                );
+    return EFI_SUCCESS;
+  }
+
+  //
+  // Checking ACPI table XSDT address
+  //
+  if (AcpiTable->XsdtAddress == 0) {
+    StandardLib->RecordAssertion (
+                StandardLib,
+                EFI_TEST_ASSERTION_FAILED,
+                gSbbrBootServicesAssertion002Guid,
+                L"AcpiTable",
+                L"%a:%d - ACPI Table Invalid XSDT Pointer",
+                __FILE__,
+                __LINE__
+                );
+    return EFI_SUCCESS;
+  }
+
+  StandardLib->RecordAssertion (
+                StandardLib,
+                EFI_TEST_ASSERTION_PASSED,
+                gSbbrBootServicesAssertion002Guid,
+                L"AcpiTable",
+                L"%a:%d",
+                __FILE__,
+                __LINE__
+                );
+
+  return EFI_SUCCESS;
+}
+
+/**
+ *  Entrypoint for SmbiosTable 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.
+ */
+
+EFI_STATUS
+BBTestSmbiosTableTest (
+  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;
+  INTN                                IStatus;
+  SMBIOS_TABLE_3_0_ENTRY_POINT        *SmbiosTable;
+  UINT8                               Checksum;
+  UINT32                              i;
+
+  //
+  // Get the Standard Library Interface
+  //
+  Status = gtBS->HandleProtocol (
+              SupportHandle,
+              &gEfiStandardTestLibraryGuid,
+              &StandardLib
+              );
+  if (EFI_ERROR (Status)) {
+    return Status;
+  }
+
+  //
+  // Looking for SMBIOS table
+  //
+  Status = SctGetSystemConfigurationTable (
+              &gEfiSmbios3TableGuid,
+              &SmbiosTable
+              );
+  if (EFI_ERROR(Status)) {
+    StandardLib->RecordAssertion (
+                StandardLib,
+                EFI_TEST_ASSERTION_FAILED,
+                gSbbrBootServicesAssertion003Guid,
+                L"SmbiosTable",
+                L"%a:%d - SMBIOS Table Not Found",
+                __FILE__,
+                __LINE__
+                );
+    return EFI_SUCCESS;
+  }
+
+  //
+  // Checking SMBIOS Anchor String
+  //
+  IStatus = SctCompareMem (
+              SmbiosTable->AnchorString,
+              SMBIOS30_ANCHOR_STRING,
+              sizeof(SMBIOS30_ANCHOR_STRING) - 1
+              );
+  if (IStatus != 0) {
+    StandardLib->RecordAssertion (
+                StandardLib,
+                EFI_TEST_ASSERTION_FAILED,
+                gSbbrBootServicesAssertion003Guid,
+                L"SmbiosTable",
+                L"%a:%d - SMBIOS Table Anchor String Not Found",
+                __FILE__,
+                __LINE__
+                );
+    return EFI_SUCCESS;
+  }
+
+  //
+  // Checking entry point revision
+  //
+  if (SmbiosTable->EntryPointRevision != 1) {
+    StandardLib->RecordAssertion (
+                StandardLib,
+                EFI_TEST_ASSERTION_FAILED,
+                gSbbrBootServicesAssertion003Guid,
+                L"SmbiosTable",
+                L"%a:%d - SMBIOS Table Invalid Entry Point Revision",
+                __FILE__,
+                __LINE__
+                );
+    return EFI_SUCCESS;
+  }
+
+  //
+  // Checking entry point checksum
+  //
+  Checksum = SbbrBootServicesByteChecksum (SmbiosTable, SmbiosTable->EntryPointLength);
+  if (Checksum != 0) {
+    StandardLib->RecordAssertion (
+                StandardLib,
+                EFI_TEST_ASSERTION_FAILED,
+                gSbbrBootServicesAssertion003Guid,
+                L"SmbiosTable",
+                L"%a:%d - SMBIOS Table Invalid Checksum",
+                __FILE__,
+                __LINE__
+                );
+    return EFI_SUCCESS;
+  }
+
+  StandardLib->RecordAssertion (
+              StandardLib,
+              EFI_TEST_ASSERTION_PASSED,
+              gSbbrBootServicesAssertion003Guid,
+              L"SmbiosTable",
+              L"%a:%d",
+              __FILE__,
+              __LINE__
+              );
+
+  return EFI_SUCCESS;
+}
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/SbbrBootServicesBBTestFunction.h b/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/SbbrBootServicesBBTestFunction.h
new file mode 100644
index 0000000..841aed9
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/SbbrBootServicesBBTestFunction.h
@@ -0,0 +1,85 @@
+/*++
+  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 Ltd. All rights reserved.
+
+--*/
+/*++
+
+Module Name:
+
+  SbbrBootServicesBBTestFunction.h
+
+Abstract:
+
+  Contains definitions and prototypes for test case functions.
+
+--*/
+
+#ifndef _SBBRBOOTSERVICES_BB_TEST_FUNCTION_H_
+#define _SBBRBOOTSERVICES_BB_TEST_FUNCTION_H_
+
+EFI_STATUS
+BBTestMemoryMapTest (
+  IN EFI_BB_TEST_PROTOCOL       *This,
+  IN VOID                       *ClientInterface,
+  IN EFI_TEST_LEVEL             TestLevel,
+  IN EFI_HANDLE                 SupportHandle
+  );
+
+EFI_STATUS
+BBTestAcpiTableTest (
+  IN EFI_BB_TEST_PROTOCOL       *This,
+  IN VOID                       *ClientInterface,
+  IN EFI_TEST_LEVEL             TestLevel,
+  IN EFI_HANDLE                 SupportHandle
+  );
+
+EFI_STATUS
+BBTestSmbiosTableTest (
+  IN EFI_BB_TEST_PROTOCOL       *This,
+  IN VOID                       *ClientInterface,
+  IN EFI_TEST_LEVEL             TestLevel,
+  IN EFI_HANDLE                 SupportHandle
+  );
+
+#endif /* _SBBRBOOTSERVICES_BB_TEST_FUNCTION_H_ */
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/SbbrBootServicesBBTestMain.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/SbbrBootServicesBBTestMain.c
new file mode 100644
index 0000000..584b38c
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/SbbrBootServicesBBTestMain.c
@@ -0,0 +1,149 @@
+/*++
+  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 Ltd. All rights reserved.
+
+--*/
+/*++
+
+Module Name:
+
+  SbbrBootServicesBBTestMain.c
+
+Abstract:
+
+  Test driver for SbbrBootServices tests.
+
+--*/
+
+#include "SctLib.h"
+#include "SbbrBootServicesBBTestMain.h"
+#include "SbbrBootServicesBBTestFunction.h"
+
+EFI_BB_TEST_PROTOCOL_FIELD gBBTestProtocolField = {
+  SBBRBOOTSERVICES_TEST_REVISION,
+  SBBRBOOTSERVICES_TEST_GUID,
+  L"SbbrBootServices Tests",
+  L"Tests SBBR boot services requirements."
+};
+
+EFI_GUID gSupportProtocolGuid[2] = {
+  EFI_STANDARD_TEST_LIBRARY_GUID,
+  EFI_NULL_GUID
+};
+
+EFI_BB_TEST_ENTRY_FIELD gBBTestEntryField[] = {
+  {
+    SBBRBOOTSERVICES_MEMORYMAP_GUID,
+    L"MemoryMap",
+    L"Checks memory map provided by UEFI.",
+    EFI_TEST_LEVEL_DEFAULT,
+    gSupportProtocolGuid,
+    EFI_TEST_CASE_AUTO,
+    BBTestMemoryMapTest
+  },
+  {
+    SBBRBOOTSERVICES_SMBIOSTABLE_GUID,
+    L"SmbiosTable",
+    L"Checks that SMBIOS3 table is provided by UEFI.",
+    EFI_TEST_LEVEL_DEFAULT,
+    gSupportProtocolGuid,
+    EFI_TEST_CASE_AUTO,
+    BBTestSmbiosTableTest
+  },
+  {
+    SBBRBOOTSERVICES_ACPITABLE_GUID,
+    L"AcpiTable",
+    L"Checks that ACPI table is provided by UEFI.",
+    EFI_TEST_LEVEL_DEFAULT,
+    gSupportProtocolGuid,
+    EFI_TEST_CASE_AUTO,
+    BBTestAcpiTableTest
+  },
+  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
+BBTestSbbrBootServicesUnload (
+  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
+InitializeBBTestSbbrBootServices (
+  IN EFI_HANDLE           ImageHandle,
+  IN EFI_SYSTEM_TABLE     *SystemTable
+  )
+{
+
+  EfiInitializeTestLib (ImageHandle, SystemTable);
+  SctInitializeLib (ImageHandle, SystemTable);
+
+  return EfiInitAndInstallBBTestInterface (
+           &ImageHandle,
+           &gBBTestProtocolField,
+           gBBTestEntryField,
+           BBTestSbbrBootServicesUnload,
+           &gBBTestProtocolInterface
+           );
+}
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/SbbrBootServicesBBTestMain.h b/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/SbbrBootServicesBBTestMain.h
new file mode 100644
index 0000000..e0a81ab
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/SbbrBootServicesBBTestMain.h
@@ -0,0 +1,99 @@
+/*++
+  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 Ltd. All rights reserved.
+
+--*/
+/*++
+
+Module Name:
+
+  SbbrBootServicesBBTestMain.h
+
+Abstract:
+
+  Contains definitions for test information and test GUIDs.
+
+--*/
+
+#ifndef _SBBRBOOTSERVICES_TEST_MAIN_H_
+#define _SBBRBOOTSERVICES_TEST_MAIN_H_
+
+#include "Efi.h"
+#include "Guid.h"
+#include <Library/EfiTestLib.h>
+
+#define SBBRBOOTSERVICES_TEST_REVISION 0x00010000
+
+#define SBBRBOOTSERVICES_TEST_GUID \
+  { 0x8dafd7a7, 0x44d0, 0x4cf4, {0x9d, 0x28, 0x9f, 0x87, 0x08, 0x0f, 0xc0, 0x91 }}
+
+#define ACPI_TABLE_EXPECTED_LENGTH 36
+#define ACPI_TABLE_CHECKSUM_LENGTH 20
+#define SMBIOS30_ANCHOR_STRING "_SM3_"
+#define RSDP_SIGNATURE_STRING "RSD PTR "
+
+EFI_STATUS
+InitializeBBTestSbbrBootServices (
+  IN EFI_HANDLE           ImageHandle,
+  IN EFI_SYSTEM_TABLE     *SystemTable
+  );
+
+EFI_STATUS
+BBTestSbbrBootServicesUnload (
+  IN EFI_HANDLE       ImageHandle
+  );
+
+//
+// Test Case GUIDs
+//
+
+#define SBBRBOOTSERVICES_MEMORYMAP_GUID \
+  { 0x8540c12d, 0x5413, 0x4a0b, {0xa5, 0x45, 0x89, 0xa8, 0xe3, 0xc7, 0xda, 0x4b }}
+
+#define SBBRBOOTSERVICES_ACPITABLE_GUID \
+  { 0x40ff8495, 0x8ae9, 0x442e, {0x89, 0xf2, 0xf8, 0x97, 0xbb, 0x7c, 0x41, 0x75 }}
+
+#define SBBRBOOTSERVICES_SMBIOSTABLE_GUID \
+  { 0xc44ca44c, 0x4f4e, 0x4760, {0x96, 0xc9, 0xb8, 0xcd, 0xe5, 0x31, 0xb4, 0xc4 }}
+
+#endif /* _SBBRBOOTSERVICES_TEST_MAIN_H_ */
diff --git a/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc b/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
index ae0a009..d3fafb6 100644
--- a/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
+++ b/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
@@ -247,6 +247,13 @@ SctPkg/TestCase/UEFI/EFI/Generic/SbbrSysEnvConfig/BlackBoxTest/SysEnvConfigBBTes
 #End of UEFI System Environment and Configuration Tests - SBBR v1.0 3.3
 
 #
+# UEFI Boot Services - SBBR v1.0 3.4
+#
+## 3.4.4 Configuration Tables
+SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/SbbrBootServicesBBTest.inf
+# End of UEFI Boot Services - SBBR v1.0 3.4
+
+#
 # Required UEFI Runtime Services Tests - SBBR v1.0 Appendix B
 #
 ##  1. EFI_GET_TIME
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [edk2-test][RFC PATCH 08/12] uefi-sct/SctPkg: sbbr: UEFI Version Verification Test
  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
                   ` (5 preceding siblings ...)
  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  8:47 ` 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
                   ` (4 subsequent siblings)
  11 siblings, 1 reply; 24+ messages in thread
From: Sakar Arora @ 2018-11-06  8:47 UTC (permalink / raw)
  To: edk2-devel; +Cc: Supreeth.Venkatesh, prasanth.pulla

From: Randy Jones <randy.jones@arm.com>

Check if EFI Specification Version is 2.5 or greater.

Change-Id: I7a602e52ac833f18dc791ca992f55e1f1996bc60
Signed-off-by: Randy Jones <randy.jones@arm.com>
---
 uefi-sct/SctPkg/CommonGenFramework.sh              |   3 +
 .../BlackBoxTest/EfiSpecVerLvlBBTest.inf           |  84 +++++
 .../BlackBoxTest/EfiSpecVerLvlBBTestFunction.c     | 130 +++++++
 .../BlackBoxTest/EfiSpecVerLvlBBTestFunction.h     |  71 ++++
 .../BlackBoxTest/EfiSpecVerLvlBBTestMain.c         | 127 +++++++
 .../BlackBoxTest/EfiSpecVerLvlBBTestMain.h         |  84 +++++
 .../Generic/SbbrEfiSpecVerLvl/BlackBoxTest/Guid.c  |  61 ++++
 .../Generic/SbbrEfiSpecVerLvl/BlackBoxTest/Guid.h  |  66 ++++
 uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc                  | 402 +++++++++++----------
 9 files changed, 829 insertions(+), 199 deletions(-)
 create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTest.inf
 create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTestFunction.c
 create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTestFunction.h
 create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTestMain.c
 create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTestMain.h
 create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/Guid.c
 create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/Guid.h

diff --git a/uefi-sct/SctPkg/CommonGenFramework.sh b/uefi-sct/SctPkg/CommonGenFramework.sh
index ab35c5a..7058111 100755
--- a/uefi-sct/SctPkg/CommonGenFramework.sh
+++ b/uefi-sct/SctPkg/CommonGenFramework.sh
@@ -367,6 +367,9 @@ then
     # UEFI Boot Services - SBBR v1.0 3.4
     cp $ProcessorType/SbbrBootServicesBBTest.efi               $Framework/Test/ > NUL
 
+    # Check if EFI Specification Version is 2.5 or greater
+    cp $ProcessorType/EfiSpecVerLvlBBTest.efi                  $Framework/Test/ > NUL
+
     # Runtime Services Tests - SBBR v1.0 Appendix B
     cp $ProcessorType/VariableServicesBBTest.efi               $Framework/Test/ > NUL
     cp $ProcessorType/TimeServicesBBTest.efi                   $Framework/Test/ > NUL
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTest.inf b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTest.inf
new file mode 100644
index 0000000..daa4d44
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTest.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 Ltd. All rights reserved.<BR>
+#
+#
+#/*++
+#
+# Module Name:
+#
+#   EfiSpecVerLvlBBTest.inf
+#
+# Abstract:
+#
+#   Component description file for SBBR EFI Specification Version Level test.
+#
+#--*/
+
+[Defines]
+  INF_VERSION          = 0x00010019
+  BASE_NAME            = EfiSpecVerLvlBBTest
+  FILE_GUID            = f865a18a-9b47-420d-97ae-676d8016a513
+  MODULE_TYPE          = UEFI_DRIVER
+  VERSION_STRING       = 1.0
+  ENTRY_POINT          = InitializeBBTestEfiSpecVerLvl
+
+[Sources.common]
+  EfiSpecVerLvlBBTestFunction.c
+  EfiSpecVerLvlBBTestMain.c
+  Guid.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/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTestFunction.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTestFunction.c
new file mode 100644
index 0000000..3985b4a
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTestFunction.c
@@ -0,0 +1,130 @@
+/*++
+  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 Ltd. All rights reserved.<BR>
+
+--*/
+/*++
+
+Module Name:
+
+  EfiSpecVerLvlBBTestFunction.c
+
+Abstract:
+
+  Test case definitions for EfiSpecVerLvl test.
+
+--*/
+
+#include <Library/ArmLib.h>
+
+#include "EfiSpecVerLvlBBTestMain.h"
+#include "Guid.h"
+#include "SctLib.h"
+#include "EfiSpecVerLvlBBTestFunction.h"
+
+/** Entrypoint for EFI Specification Version 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
+BBTestEfiSpecVerLvlTest (
+  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;
+  UINTN                                 CurHrRev;
+
+  // Get the Standard Library Interface
+  Status = gtBS->HandleProtocol (
+              SupportHandle,
+              &gEfiStandardTestLibraryGuid,
+              (VOID **) &StandardLib
+              );
+  if (EFI_ERROR (Status)) {
+    return Status;
+  }
+
+  CurHrRev = gtBS->Hdr.Revision; // Reading revision of the EFI Specification.
+
+  // Check if EFI Specification version is less than 2.5
+  if (gtBS->Hdr.Revision < EFI_2_50_SYSTEM_TABLE_REVISION){
+    StandardLib->RecordAssertion (
+                StandardLib,
+                EFI_TEST_ASSERTION_FAILED,
+                gTestGenericFailureGuid,
+                L"EFI Specification Version is below 2.5",
+                L"%a:%d:Current EFI Header Rev=0x%X",
+                __FILE__,
+                __LINE__,
+                CurHrRev
+                );
+    return EFI_INCOMPATIBLE_VERSION;
+  } else {
+    StandardLib->RecordAssertion (
+                StandardLib,
+                EFI_TEST_ASSERTION_PASSED,
+                gEfiSpecVerLvlAssertion01Guid,
+                L"TestEfiSpecVerLvl",
+                L"%a:%d:Current EFI Header Rev=0x%X",
+                __FILE__,
+                __LINE__,
+                CurHrRev
+                );
+
+    return EFI_SUCCESS;
+  }
+}
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTestFunction.h b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTestFunction.h
new file mode 100644
index 0000000..0ea7aa7
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTestFunction.h
@@ -0,0 +1,71 @@
+/*++
+  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 Ltd. All rights reserved.<BR>
+
+--*/
+/*++
+
+Module Name:
+
+  EfiSpecVerLvlBBTestFunction.h
+
+Abstract:
+
+  Contains definitions and prototypes used in the test functions.
+
+--*/
+
+#ifndef _EFISPECVERLVL_BB_TEST_FUNCTION_H_
+#define _EFISPECVERLVL_BB_TEST_FUNCTION_H_
+
+#include <Library/EfiTestLib.h>
+
+EFI_STATUS
+BBTestEfiSpecVerLvlTest (
+  IN EFI_BB_TEST_PROTOCOL       *This,
+  IN VOID                       *ClientInterface,
+  IN EFI_TEST_LEVEL             TestLevel,
+  IN EFI_HANDLE                 SupportHandle
+  );
+
+#endif /* _EFISPECVERLVL_BB_TEST_FUNCTION_H_ */
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTestMain.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTestMain.c
new file mode 100644
index 0000000..754644c
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTestMain.c
@@ -0,0 +1,127 @@
+/*++
+  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 Ltd. All rights reserved.<BR>
+
+--*/
+/*++
+
+Module Name:
+
+  EfiSpecVerLvlBBTestMain.c
+
+Abstract:
+
+  Test driver for SBBR system environment configuration tests.
+
+--*/
+
+#include "SctLib.h"
+#include "EfiSpecVerLvlBBTestFunction.h"
+#include "EfiSpecVerLvlBBTestMain.h"
+
+EFI_BB_TEST_PROTOCOL_FIELD gBBTestProtocolField = {
+  EFISPECVERLVL_TEST_REVISION,
+  EFISPECVERLVL_TEST_GUID,
+  L"SBBR UEFI Specification Version Level Test",
+  L"Check the UEFI Specification Version Level to make sure it conforms to ARM SBBR."
+};
+
+EFI_GUID gSupportProtocolGuid[2] = {
+  EFI_STANDARD_TEST_LIBRARY_GUID,
+  EFI_NULL_GUID
+};
+
+EFI_BB_TEST_ENTRY_FIELD gBBTestEntryField[] = {
+  {
+    EFISPECVERLVL_GUID,
+    L"TestEfiSpecVerLvl",
+    L"Check the EFI Specification Version Level.",
+    EFI_TEST_LEVEL_DEFAULT,
+    gSupportProtocolGuid,
+    EFI_TEST_CASE_AUTO,
+    BBTestEfiSpecVerLvlTest
+  },
+  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
+BBTestEfiSpecVerLvlUnload (
+  IN EFI_HANDLE       ImageHandle
+  )
+{
+  return EfiUninstallAndFreeBBTestInterface (
+           ImageHandle,
+           gBBTestProtocolInterface
+           );
+}
+
+/** Creates/installs the BlackBox Interface and emanating 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
+InitializeBBTestEfiSpecVerLvl (
+  IN EFI_HANDLE           ImageHandle,
+  IN EFI_SYSTEM_TABLE     *SystemTable
+  )
+{
+
+  EfiInitializeTestLib (ImageHandle, SystemTable);
+
+  return EfiInitAndInstallBBTestInterface (
+           &ImageHandle,
+           &gBBTestProtocolField,
+           gBBTestEntryField,
+           BBTestEfiSpecVerLvlUnload,
+           &gBBTestProtocolInterface
+           );
+}
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTestMain.h b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTestMain.h
new file mode 100644
index 0000000..49fd7bb
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTestMain.h
@@ -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 Ltd. All rights reserved.<BR>
+
+--*/
+/*++
+
+Module Name:
+
+  EfiSpecVerLvlBBTestMain.h
+
+Abstract:
+
+  Contains definitions for test information and test GUIDs.
+
+--*/
+
+#ifndef _EFISPECVERLVL_TEST_MAIN_H_
+#define _EFISPECVERLVL_TEST_MAIN_H_
+
+#include "Efi.h"
+#include <Library/EfiTestLib.h>
+
+
+#define EFISPECVERLVL_TEST_REVISION 0x00010000
+
+#define EFISPECVERLVL_TEST_GUID     \
+  {0xd6e40d12, 0x7a51, 0x4454, {0xb4, 0xfd, 0x4c, 0x93, 0x88, 0x7e, 0xd6, 0xcf}}
+
+EFI_STATUS
+InitializeBBTestEfiSpecVerLvl (
+  IN EFI_HANDLE           ImageHandle,
+  IN EFI_SYSTEM_TABLE     *SystemTable
+  );
+
+//
+// Entry GUIDs
+//
+
+#define EFISPECVERLVL_GUID \
+  {0x6e46b2e2, 0x2535, 0x4c8e, {0x82, 0x5a, 0x84, 0x5d, 0xc2, 0xbe, 0xed, 0xdf}}
+
+
+#endif /* _EFISPECVERLVL_TEST_MAIN_H_ */
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/Guid.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/Guid.c
new file mode 100644
index 0000000..52c6d90
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/Guid.c
@@ -0,0 +1,61 @@
+/*++
+  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 Ltd. All rights reserved.<BR>
+
+--*/
+/*++
+
+Module Name:
+
+  Guid.c
+
+Abstract:
+
+  GUID assignments for test progress assertions.
+
+--*/
+
+#include "Efi.h"
+#include "Guid.h"
+
+EFI_GUID gEfiSpecVerLvlAssertion01Guid = EFISPECVERLVL_ASSERTION_001_GUID;
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/Guid.h b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/Guid.h
new file mode 100644
index 0000000..b554961
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/Guid.h
@@ -0,0 +1,66 @@
+/*++
+  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 Ltd. All rights reserved.<BR>
+
+--*/
+/*++
+
+Module Name:
+
+  Guid.h
+
+Abstract:
+
+  Definitions of GUIDs used for test progress assertions.
+
+--*/
+
+#ifndef _EFISPECVERSION_GUID_H_
+#define _EFISPECVERSION_GUID_H_
+
+#define EFISPECVERLVL_ASSERTION_001_GUID \
+{0x14932290, 0x563b, 0x4d20, {0x95, 0xa7, 0xee, 0xc0, 0x2d, 0xbb, 0x1b, 0x13}}
+
+extern EFI_GUID gEfiSpecVerLvlAssertion01Guid;
+
+#endif /* _EFISPECVERSION_GUID_H_ */
diff --git a/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc b/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
index d3fafb6..931b8da 100644
--- a/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
+++ b/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
@@ -1,190 +1,192 @@
-#
-# 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) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
-#
-#
-#/*++
-#
-# Module Name:
-#
-#    SBBR_SCT.dsc
-#
-# Abstract:
-#
-#   This is a build description file used to build the test modules of SBBR SCT.
-#
-# Notes:
-#
-#   The info in this file is broken down into sections. The start of a section
-#   is designated by a "[" in the first column. So the [=====] separater ends
-#   a section.
-#
-#--*/
-
-################################################################################
-#
-# Defines Section - statements that will be processed to create a Makefile.
-#
-################################################################################
-[Defines]
-  PLATFORM_NAME                  = SbbrSct
-  PLATFORM_GUID                  = d513138b-9d4a-479c-8058-4a5160018663
-  PLATFORM_VERSION               = 0.1
-  DSC_SPECIFICATION              = 0x00010005
-  OUTPUT_DIRECTORY               = Build/SbbrSct
-  SUPPORTED_ARCHITECTURES        = AARCH64
-  BUILD_TARGETS                  = DEBUG|RELEASE
-  SKUID_IDENTIFIER               = DEFAULT
-
-  DEFINE GCC_VER_MACRO           = -D EFI_SPECIFICATION_VERSION=0x00020028 -D TIANO_RELEASE_VERSION=0x00080006
-  DEFINE MSFT_VER_MACRO          = /D EFI_SPECIFICATION_VERSION=0x00020028 /D TIANO_RELEASE_VERSION=0x00080006
-
-
-################################################################################
-#
-# SKU Identification section - list of all SKU IDs supported by this
-#                              Platform.
-#
-################################################################################
-[SkuIds]
-  0|DEFAULT              # The entry: 0|DEFAULT is reserved and always required.
-
-[BuildOptions]
-  *_*_AARCH64_CC_FLAGS         = -D EFIAARCH64 -I$(WORKSPACE)/MdePkg/Include/AArch64 $(GCC_VER_MACRO)
-  GCC:*_*_AARCH64_CC_FLAGS     = -D EFIAARCH64 $(GCC_VER_MACRO) -ffreestanding -nostdinc -nostdlib -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error
-  *_*_AARCH64_VFRPP_FLAGS      = -D EFIAARCH64 $(GCC_VER_MACRO)
-  *_*_AARCH64_APP_FLAGS        = -D EFIAARCH64 $(GCC_VER_MACRO)
-  *_*_AARCH64_PP_FLAGS         = -D EFIAARCH64 $(GCC_VER_MACRO)
-  RVCT:*_*_AARCH64_DLINK_FLAGS = --muldefweak
-
-  DEBUG_*_*_CC_FLAGS  = -DEFI_DEBUG
-  RELEASE_*_*_CC_FLAGS  = -DMDEPKG_NDEBUG
-
-[Libraries]
-  SctPkg/Library/SctLib/SctLib.inf
-  SctPkg/Library/SctGuidLib/SctGuidLib.inf
-  SctPkg/Library/EfiTestLib/EfiTestLib.inf
-
-  SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/EntsLib.inf
-
-  MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
-
-[Libraries.ARM]
-  ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
-
-[Libraries.AARCH64]
-  ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
-
-[LibraryClasses.common]
-  UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
-  UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
-  UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
-  BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
-  BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
-  DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
-  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
-  MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
-  UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
-  UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
-  HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
-  PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
-  UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
-  DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
-
-  SctLib|SctPkg/Library/SctLib/SctLib.inf
-  NetLib|SctPkg/Library/NetLib/NetLib.inf
-  EntsLib|SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/EntsLib.inf
-  EasLib|SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasDispatcher/Eas.inf
-  EfiTestLib|SctPkg/Library/EfiTestLib/EfiTestLib.inf
-
-[LibraryClasses.ARM]
-  NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
-
-[LibraryClasses.AARCH64]
-  NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
+#
+# 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) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
+#
+# Copyright (c) 2016, ARM Ltd. All rights reserved.<BR>
+#
+#
+#/*++
+#
+# Module Name:
+#
+#    SBBR_SCT.dsc
+#
+# Abstract:
+#
+#   This is a build description file used to build the test modules of SBBR SCT.
+#
+# Notes:
+#
+#   The info in this file is broken down into sections. The start of a section
+#   is designated by a "[" in the first column. So the [=====] separater ends
+#   a section.
+#
+#--*/
+
+################################################################################
+#
+# Defines Section - statements that will be processed to create a Makefile.
+#
+################################################################################
+[Defines]
+  PLATFORM_NAME                  = SbbrSct
+  PLATFORM_GUID                  = d513138b-9d4a-479c-8058-4a5160018663
+  PLATFORM_VERSION               = 0.1
+  DSC_SPECIFICATION              = 0x00010005
+  OUTPUT_DIRECTORY               = Build/SbbrSct
+  SUPPORTED_ARCHITECTURES        = AARCH64
+  BUILD_TARGETS                  = DEBUG|RELEASE
+  SKUID_IDENTIFIER               = DEFAULT
+
+  DEFINE GCC_VER_MACRO           = -D EFI_SPECIFICATION_VERSION=0x00020028 -D TIANO_RELEASE_VERSION=0x00080006
+  DEFINE MSFT_VER_MACRO          = /D EFI_SPECIFICATION_VERSION=0x00020028 /D TIANO_RELEASE_VERSION=0x00080006
+
+
+################################################################################
+#
+# SKU Identification section - list of all SKU IDs supported by this
+#                              Platform.
+#
+################################################################################
+[SkuIds]
+  0|DEFAULT              # The entry: 0|DEFAULT is reserved and always required.
+
+[BuildOptions]
+  *_*_AARCH64_CC_FLAGS         = -D EFIAARCH64 -I$(WORKSPACE)/MdePkg/Include/AArch64 $(GCC_VER_MACRO)
+  GCC:*_*_AARCH64_CC_FLAGS     = -D EFIAARCH64 $(GCC_VER_MACRO) -ffreestanding -nostdinc -nostdlib -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error
+  *_*_AARCH64_VFRPP_FLAGS      = -D EFIAARCH64 $(GCC_VER_MACRO)
+  *_*_AARCH64_APP_FLAGS        = -D EFIAARCH64 $(GCC_VER_MACRO)
+  *_*_AARCH64_PP_FLAGS         = -D EFIAARCH64 $(GCC_VER_MACRO)
+  RVCT:*_*_AARCH64_DLINK_FLAGS = --muldefweak
+
+  DEBUG_*_*_CC_FLAGS  = -DEFI_DEBUG
+  RELEASE_*_*_CC_FLAGS  = -DMDEPKG_NDEBUG
+
+[Libraries]
+  SctPkg/Library/SctLib/SctLib.inf
+  SctPkg/Library/SctGuidLib/SctGuidLib.inf
+  SctPkg/Library/EfiTestLib/EfiTestLib.inf
+
+  SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/EntsLib.inf
+
+  MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
+
+[Libraries.ARM]
+  ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
+
+[Libraries.AARCH64]
+  ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
+
+[LibraryClasses.common]
+  UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
+  UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
+  UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
+  BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
+  BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
+  DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
+  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
+  MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
+  UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
+  UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
+  HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
+  PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
+  UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
+  DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
+
+  SctLib|SctPkg/Library/SctLib/SctLib.inf
+  NetLib|SctPkg/Library/NetLib/NetLib.inf
+  EntsLib|SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/EntsLib.inf
+  EasLib|SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasDispatcher/Eas.inf
+  EfiTestLib|SctPkg/Library/EfiTestLib/EfiTestLib.inf
+
+[LibraryClasses.ARM]
+  NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
+
+[LibraryClasses.AARCH64]
+  NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
   ArmLib|ArmPkg/Library/ArmLib/AArch64/AArch64Lib.inf
-
-###############################################################################
-#
-# These are the components that will be built by the master makefile
-#
-###############################################################################
-
-[Components]
-
-#
-# The default package
-#
-DEFINE PACKAGE=Default
-
-#
-# Components
-#
-
-#
-# Following are the SCT suite & related drivers
-#
-
-SctPkg/TestInfrastructure/SCT/Framework/Sct.inf
-SctPkg/TestInfrastructure/SCT/Drivers/StandardTest/StandardTest.inf
-SctPkg/TestInfrastructure/SCT/Drivers/TestProfile/TestProfile.inf
-SctPkg/TestInfrastructure/SCT/Drivers/TestRecovery/TestRecovery.inf
-SctPkg/TestInfrastructure/SCT/Drivers/TestLogging/TestLogging.inf
-
-#
-# Related SCT applications
-#
-
-SctPkg/Application/InstallSct/InstallSct.inf
-SctPkg/Application/StallForKey/StallForKey.inf
-
-SctPkg/SCRT/SCRTApp/SCRTApp.inf
-SctPkg/SCRT/SCRTDriver/SCRTDriver.inf
-
-#
-# Test cases for SBBR SCT
-#
-
+
+###############################################################################
+#
+# These are the components that will be built by the master makefile
+#
+###############################################################################
+
+[Components]
+
+#
+# The default package
+#
+DEFINE PACKAGE=Default
+
+#
+# Components
+#
+
+#
+# Following are the SCT suite & related drivers
+#
+
+SctPkg/TestInfrastructure/SCT/Framework/Sct.inf
+SctPkg/TestInfrastructure/SCT/Drivers/StandardTest/StandardTest.inf
+SctPkg/TestInfrastructure/SCT/Drivers/TestProfile/TestProfile.inf
+SctPkg/TestInfrastructure/SCT/Drivers/TestRecovery/TestRecovery.inf
+SctPkg/TestInfrastructure/SCT/Drivers/TestLogging/TestLogging.inf
+
+#
+# Related SCT applications
+#
+
+SctPkg/Application/InstallSct/InstallSct.inf
+SctPkg/Application/StallForKey/StallForKey.inf
+
+SctPkg/SCRT/SCRTApp/SCRTApp.inf
+SctPkg/SCRT/SCRTDriver/SCRTDriver.inf
+
+#
+# Test cases for SBBR SCT
+#
+
 # Boot Services Tests - SBBR v1.0 Appendix A
 #
 ##  1. EFI_RAISE_TPL
@@ -239,13 +241,15 @@ SctPkg/TestCase/UEFI/EFI/BootServices/MiscBootServices/BlackBoxTest/MiscBootServ
 ## 42. EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES
 SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/ProtocolHandlerBBTest.inf
 # 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
-
+#
+# Check if EFI Specification Version is 2.5 or greater
+SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTest.inf
 #
 # UEFI Boot Services - SBBR v1.0 3.4
 #
@@ -286,13 +290,13 @@ SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompliantBBTest_ue
 # End of UEFI Required Protocols Tests - SBBR Appendix C
 
 #
-# Dependency files
-#
-
-#
-# Support Files
-#
-SctPkg/TestInfrastructure/SCT/Framework/ENTS/Eftp/Eftp.inf
-SctPkg/TestInfrastructure/SCT/Framework/ENTS/MonitorServices/SerialMonitor/SerialMonitor.inf
-SctPkg/TestInfrastructure/SCT/Framework/ENTS/MonitorServices/ManagedNetworkMonitor/ManagedNetworkMonitor.inf
-SctPkg/TestInfrastructure/SCT/Framework/ENTS/MonitorServices/IP4NetworkMonitor/IP4NetworkMonitor.inf
+# Dependency files
+#
+
+#
+# Support Files
+#
+SctPkg/TestInfrastructure/SCT/Framework/ENTS/Eftp/Eftp.inf
+SctPkg/TestInfrastructure/SCT/Framework/ENTS/MonitorServices/SerialMonitor/SerialMonitor.inf
+SctPkg/TestInfrastructure/SCT/Framework/ENTS/MonitorServices/ManagedNetworkMonitor/ManagedNetworkMonitor.inf
+SctPkg/TestInfrastructure/SCT/Framework/ENTS/MonitorServices/IP4NetworkMonitor/IP4NetworkMonitor.inf
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [edk2-test][RFC PATCH 09/12] uefi-sct/SctPkg: sbbr: UEFI SMBIOS Base Requirements
  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
                   ` (6 preceding siblings ...)
  2018-11-06  8:47 ` [edk2-test][RFC PATCH 08/12] uefi-sct/SctPkg: sbbr: UEFI Version Verification Test Sakar Arora
@ 2018-11-06  8:47 ` 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
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 24+ messages in thread
From: Sakar Arora @ 2018-11-06  8:47 UTC (permalink / raw)
  To: edk2-devel; +Cc: Supreeth.Venkatesh, prasanth.pulla

From: John Powell <john.powell@arm.com>

Tests that SMBIOS3 table is properly accessible from UEFI and
that it is in the correct memory region.

Change-Id: I113ead8183f02886e0facded0ed2ad4e213677d8
Signed-off-by: John Powell <john.powell@arm.com>
---
 uefi-sct/SctPkg/CommonGenFramework.sh              |   3 +
 uefi-sct/SctPkg/Config/Data/Category.ini           |   7 +
 .../EFI/Generic/SbbrSmbios/BlackBoxTest/Guid.c     |  61 ++++++
 .../EFI/Generic/SbbrSmbios/BlackBoxTest/Guid.h     |  66 ++++++
 .../SbbrSmbios/BlackBoxTest/SbbrSmbiosBBTest.inf   |  84 ++++++++
 .../BlackBoxTest/SbbrSmbiosBBTestFunction.c        | 222 +++++++++++++++++++++
 .../BlackBoxTest/SbbrSmbiosBBTestFunction.h        |  69 +++++++
 .../SbbrSmbios/BlackBoxTest/SbbrSmbiosBBTestMain.c | 181 +++++++++++++++++
 .../SbbrSmbios/BlackBoxTest/SbbrSmbiosBBTestMain.h |  90 +++++++++
 uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc                  |   5 +
 10 files changed, 788 insertions(+)
 create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSmbios/BlackBoxTest/Guid.c
 create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSmbios/BlackBoxTest/Guid.h
 create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSmbios/BlackBoxTest/SbbrSmbiosBBTest.inf
 create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSmbios/BlackBoxTest/SbbrSmbiosBBTestFunction.c
 create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSmbios/BlackBoxTest/SbbrSmbiosBBTestFunction.h
 create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSmbios/BlackBoxTest/SbbrSmbiosBBTestMain.c
 create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSmbios/BlackBoxTest/SbbrSmbiosBBTestMain.h

diff --git a/uefi-sct/SctPkg/CommonGenFramework.sh b/uefi-sct/SctPkg/CommonGenFramework.sh
index 7058111..8e7c7ca 100755
--- a/uefi-sct/SctPkg/CommonGenFramework.sh
+++ b/uefi-sct/SctPkg/CommonGenFramework.sh
@@ -370,6 +370,9 @@ then
     # Check if EFI Specification Version is 2.5 or greater
     cp $ProcessorType/EfiSpecVerLvlBBTest.efi                  $Framework/Test/ > NUL
 
+    # SMBIOS Requirements on UEFI - SBBR v1.0 5.1.1
+    cp $ProcessorType/SbbrSmbiosBBTest.efi                     $Framework/Test/ > NUL
+
     # Runtime Services Tests - SBBR v1.0 Appendix B
     cp $ProcessorType/VariableServicesBBTest.efi               $Framework/Test/ > NUL
     cp $ProcessorType/TimeServicesBBTest.efi                   $Framework/Test/ > NUL
diff --git a/uefi-sct/SctPkg/Config/Data/Category.ini b/uefi-sct/SctPkg/Config/Data/Category.ini
index 17ca639..66b2112 100644
--- a/uefi-sct/SctPkg/Config/Data/Category.ini
+++ b/uefi-sct/SctPkg/Config/Data/Category.ini
@@ -96,6 +96,13 @@ Description   = Checks that UEFI protocols required by ARM SBBR are present.
 
 [Category Data]
 Revision      = 0x00010000
+CategoryGuid  = 852e92eb-d7aa-4d61-84ef-d32dc5d545ec
+InterfaceGuid = 71652D04-BF38-434A-BCB8-6547D7FD8384
+Name          = GenericTest\SbbrSmbios
+Description   = Checks that SMBIOS on UEFI is implemented correctly.
+
+[Category Data]
+Revision      = 0x00010000
 CategoryGuid  = D84A6430-99F5-4660-8454-6E4C896A7E51
 InterfaceGuid = 71652D04-BF38-434a-BCB8-6547D7FD8384
 Name          = GenericTest\SbbrSysEnvConfig
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSmbios/BlackBoxTest/Guid.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSmbios/BlackBoxTest/Guid.c
new file mode 100644
index 0000000..5a685f6
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSmbios/BlackBoxTest/Guid.c
@@ -0,0 +1,61 @@
+/*++
+  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 LTD. All rights reserved.
+
+--*/
+/*++
+
+Module Name:
+
+  Guid.c
+
+Abstract:
+
+  Global variable assignments for GUIDs used in test assertions.
+
+--*/
+
+#include "Efi.h"
+#include "Guid.h"
+
+EFI_GUID gSbbrSmbiosAssertion001Guid = SBBRSMBIOS_ASSERTION_001_GUID;
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSmbios/BlackBoxTest/Guid.h b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSmbios/BlackBoxTest/Guid.h
new file mode 100644
index 0000000..967be4d
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSmbios/BlackBoxTest/Guid.h
@@ -0,0 +1,66 @@
+/*++
+  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 LTD. All rights reserved.
+
+--*/
+/*++
+
+Module Name:
+
+  Guid.h
+
+Abstract:
+
+  Definitions for GUIDs used in test assertions.
+
+--*/
+
+#ifndef _SBBRSMBIOS_GUID_H_
+#define _SBBRSMBIOS_GUID_H_
+
+#define SBBRSMBIOS_ASSERTION_001_GUID \
+  { 0xed2399ae, 0x416e, 0x46c6, {0xac, 0xa2, 0xd9, 0xb1, 0xcf, 0x99, 0x75, 0xcd }}
+
+extern EFI_GUID gSbbrSmbiosAssertion001Guid;
+
+#endif /* _SBBRSMBIOS_GUID_H_ */
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSmbios/BlackBoxTest/SbbrSmbiosBBTest.inf b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSmbios/BlackBoxTest/SbbrSmbiosBBTest.inf
new file mode 100644
index 0000000..91c013f
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSmbios/BlackBoxTest/SbbrSmbiosBBTest.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 LTD. All rights reserved.
+#
+#
+#/*++
+#
+# Module Name:
+#
+#   SbbrSmbiosBBTest.inf
+#
+# Abstract:
+#
+#   Component description file for SbbrSmbios tests.
+#
+#--*/
+
+[Defines]
+  INF_VERSION          = 0x00010019
+  BASE_NAME            = SbbrSmbiosBBTest
+  FILE_GUID            = 04a5d449-9c54-4937-8b83-142103adb759
+  MODULE_TYPE          = UEFI_DRIVER
+  VERSION_STRING       = 1.0
+  ENTRY_POINT          = InitializeBBTestSbbrSmbios
+
+[Sources.common]
+  Guid.c
+  SbbrSmbiosBBTestFunction.c
+  SbbrSmbiosBBTestMain.c
+
+[Packages]
+  MdePkg/MdePkg.dec
+  SctPkg/SctPkg.dec
+  SctPkg/UEFI/UEFI.dec
+
+[LibraryClasses]
+  EfiTestLib
+  SctLib
+  UefiDriverEntryPoint
+
+[Protocols]
+
+[Guids]
+  gEfiSmbios3TableGuid
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSmbios/BlackBoxTest/SbbrSmbiosBBTestFunction.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSmbios/BlackBoxTest/SbbrSmbiosBBTestFunction.c
new file mode 100644
index 0000000..7dca5ef
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSmbios/BlackBoxTest/SbbrSmbiosBBTestFunction.c
@@ -0,0 +1,222 @@
+/*++
+  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 LTD. All rights reserved.
+
+--*/
+/*++
+
+Module Name:
+
+  SbbrSmbiosBBTestFunction.c
+
+Abstract:
+
+  Test case function definitions for SbbrSmbios.
+
+--*/
+
+#include "SbbrSmbiosBBTestMain.h"
+#include "SbbrSmbiosBBTestFunction.h"
+#include "SctLib.h"
+#include "Guid.h"
+#include <IndustryStandard/SmBios.h>
+#include <Library/EfiTestLib.h>
+
+/**
+ *  Entrypoint for UefiSmbios 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.
+ */
+
+EFI_STATUS
+BBTestUefiSmbiosTest (
+  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;
+  SMBIOS_TABLE_3_0_ENTRY_POINT        *SmbiosTable;
+  UINTN                               MemoryMapSize;
+  VOID                                *MemoryMap;
+  EFI_MEMORY_DESCRIPTOR               *MemoryMapDescriptor;
+  UINTN                               MapKey;
+  UINTN                               DescriptorSize;
+  UINT32                              DescriptorVersion;
+  UINT32                              i;
+  UINT64                              EndAddress;
+
+  //
+  // Get the Standard Library Interface
+  //
+  Status = gtBS->HandleProtocol (
+                   SupportHandle,
+                   &gEfiStandardTestLibraryGuid,
+                   (VOID **) &StandardLib
+                   );
+  if (EFI_ERROR (Status)) {
+    return Status;
+  }
+
+  //
+  // Looking for SMBIOS table
+  //
+  Status = SctGetSystemConfigurationTable (
+              &gEfiSmbios3TableGuid,
+              (VOID **)&SmbiosTable
+              );
+  if (EFI_ERROR(Status)) {
+    StandardLib->RecordAssertion (
+                StandardLib,
+                EFI_TEST_ASSERTION_FAILED,
+                gSbbrSmbiosAssertion001Guid,
+                L"UefiSmbios",
+                L"%a:%d - SMBIOS30 Table Not Found",
+                __FILE__,
+                __LINE__
+                );
+    return EFI_SUCCESS;
+  }
+
+  //
+  // Checking SMBIOS table version
+  //
+  if (SmbiosTable->MajorVersion != SBBRSMBIOS_MAJOR_VERSION) {
+    StandardLib->RecordAssertion (
+                StandardLib,
+                EFI_TEST_ASSERTION_FAILED,
+                gSbbrSmbiosAssertion001Guid,
+                L"UefiSmbios",
+                L"%a:%d - SMBIOS30 table invalid version. %d",
+                __FILE__,
+                __LINE__,
+                SmbiosTable->MajorVersion
+                );
+    return EFI_SUCCESS;
+  }
+
+  //
+  // Getting Memory Map
+  //
+  Status = SbbrAllocAndGetMemoryMap (
+              &MemoryMapSize,
+              &MemoryMap,
+              &MapKey,
+              &DescriptorSize,
+              &DescriptorVersion
+              );
+  if (EFI_ERROR (Status)) {
+    StandardLib->RecordAssertion (
+                StandardLib,
+                EFI_TEST_ASSERTION_FAILED,
+                gTestGenericFailureGuid,
+                L"MemoryMap",
+                L"%a:%d - Could not retrieve memory map. 0x%X",
+                __FILE__,
+                __LINE__,
+                Status
+                );
+    return EFI_NOT_FOUND;
+  }
+
+  //
+  // Looping through memory map descriptors to find the one containing SMBIOS table
+  //
+  for (i = 0; i < MemoryMapSize / DescriptorSize; i++) {
+    MemoryMapDescriptor = (EFI_MEMORY_DESCRIPTOR *)(MemoryMap + (i * DescriptorSize));
+    EndAddress = MemoryMapDescriptor->PhysicalStart + (MemoryMapDescriptor->NumberOfPages * EFI_PAGE_SIZE);
+    if ( (SmbiosTable->TableAddress >= MemoryMapDescriptor->PhysicalStart) &&
+         ((SmbiosTable->TableAddress + SmbiosTable->TableMaximumSize) < EndAddress))
+    {
+      //
+      // Memory region containing SMBIOS table found
+      //
+      if (MemoryMapDescriptor->Type != EfiRuntimeServicesData) {
+        StandardLib->RecordAssertion (
+                    StandardLib,
+                    EFI_TEST_ASSERTION_FAILED,
+                    gSbbrSmbiosAssertion001Guid,
+                    L"UefiSmbios",
+                    L"%a:%d - Wrong SMBIOS30 Memory Type. 0x%X",
+                    __FILE__,
+                    __LINE__,
+                    MemoryMapDescriptor->Type
+                    );
+      } else {
+        StandardLib->RecordAssertion (
+                    StandardLib,
+                    EFI_TEST_ASSERTION_PASSED,
+                    gSbbrSmbiosAssertion001Guid,
+                    L"UefiSmbios",
+                    L"%a:%d",
+                    __FILE__,
+                    __LINE__
+                    );
+      }
+
+      SctFreePool(MemoryMap);
+      return EFI_SUCCESS;
+    }
+
+  }
+
+  //
+  // Memory region not found.
+  //
+  StandardLib->RecordAssertion (
+              StandardLib,
+              EFI_TEST_ASSERTION_FAILED,
+              gSbbrSmbiosAssertion001Guid,
+              L"UefiSmbios",
+              L"%a:%d - Memory region not found in map.",
+              __FILE__,
+              __LINE__
+              );
+  SctFreePool(MemoryMap);
+  return EFI_SUCCESS;
+}
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSmbios/BlackBoxTest/SbbrSmbiosBBTestFunction.h b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSmbios/BlackBoxTest/SbbrSmbiosBBTestFunction.h
new file mode 100644
index 0000000..1de882c
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSmbios/BlackBoxTest/SbbrSmbiosBBTestFunction.h
@@ -0,0 +1,69 @@
+/*++
+  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 LTD. All rights reserved.
+
+--*/
+/*++
+
+Module Name:
+
+  SbbrSmbiosBBTestFunction.h
+
+Abstract:
+
+  Contains definitions and prototypes for test case functions.
+
+--*/
+
+#ifndef _SBBRSMBIOS_BB_TEST_FUNCTION_H_
+#define _SBBRSMBIOS_BB_TEST_FUNCTION_H_
+
+EFI_STATUS
+BBTestUefiSmbiosTest (
+  IN EFI_BB_TEST_PROTOCOL       *This,
+  IN VOID                       *ClientInterface,
+  IN EFI_TEST_LEVEL             TestLevel,
+  IN EFI_HANDLE                 SupportHandle
+  );
+
+#endif /* _SBBRSMBIOS_BB_TEST_FUNCTION_H_ */
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSmbios/BlackBoxTest/SbbrSmbiosBBTestMain.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSmbios/BlackBoxTest/SbbrSmbiosBBTestMain.c
new file mode 100644
index 0000000..d6ff5a0
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSmbios/BlackBoxTest/SbbrSmbiosBBTestMain.c
@@ -0,0 +1,181 @@
+/*++
+  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 LTD. All rights reserved.
+
+--*/
+/*++
+
+Module Name:
+
+  SbbrSmbiosBBTestMain.c
+
+Abstract:
+
+  Test driver for SbbrSmbios tests.
+
+--*/
+
+#include "SctLib.h"
+#include "SbbrSmbiosBBTestMain.h"
+#include "SbbrSmbiosBBTestFunction.h"
+
+EFI_BB_TEST_PROTOCOL_FIELD gBBTestProtocolField = {
+  SBBRSMBIOS_TEST_REVISION,
+  SBBRSMBIOS_TEST_GUID,
+  L"SbbrSmbios Tests",
+  L"Checks that SMBIOS on UEFI is implemented correctly."
+};
+
+EFI_GUID gSupportProtocolGuid1[2] = {
+  EFI_STANDARD_TEST_LIBRARY_GUID,
+  EFI_NULL_GUID
+};
+
+EFI_BB_TEST_ENTRY_FIELD gBBTestEntryField[] = {
+  {
+    SBBRSMBIOS_UEFISMBIOS_GUID,
+    L"UefiSmbios",
+    L"Checks that the SMBIOS3 table is accessible though its GUID and that it has the correct memory region settings.",
+    EFI_TEST_LEVEL_DEFAULT,
+    gSupportProtocolGuid1,
+    EFI_TEST_CASE_AUTO,
+    BBTestUefiSmbiosTest
+  },
+  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
+BBTestSbbrSmbiosUnload (
+  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
+InitializeBBTestSbbrSmbios (
+  IN EFI_HANDLE           ImageHandle,
+  IN EFI_SYSTEM_TABLE     *SystemTable
+  )
+{
+
+  EfiInitializeTestLib (ImageHandle, SystemTable);
+  SctInitializeLib (ImageHandle, SystemTable);
+
+  return EfiInitAndInstallBBTestInterface (
+              &ImageHandle,
+              &gBBTestProtocolField,
+              gBBTestEntryField,
+              BBTestSbbrSmbiosUnload,
+              &gBBTestProtocolInterface
+              );
+}
+
+/**
+ * SbbrGetMemoryMap function used by test cases.
+ */
+EFI_STATUS
+SbbrAllocAndGetMemoryMap (
+  UINTN                               *MemoryMapSize,
+  VOID                                **MemoryMap,
+  UINTN                               *MapKey,
+  UINTN                               *DescriptorSize,
+  UINT32                              *DescriptorVersion
+  )
+{
+  EFI_STATUS                          Status;
+
+  //
+  // Getting memory map
+  //
+  do {
+    *MemoryMapSize = 0;
+    // First call with a size of 0 so we can find out how big the memory map is.
+    Status = gtBS->GetMemoryMap (
+                MemoryMapSize,
+                *MemoryMap,
+                MapKey,
+                DescriptorSize,
+                DescriptorVersion
+                );
+    if (Status != EFI_BUFFER_TOO_SMALL){
+      return EFI_NOT_FOUND;
+    }
+    *MemoryMap = SctAllocatePool(*MemoryMapSize);
+    if (*MemoryMap == NULL) {
+      return EFI_OUT_OF_RESOURCES;
+    }
+    // Second call with our newly allocated buffer should work properly.
+    Status = gtBS->GetMemoryMap (
+                MemoryMapSize,
+                *MemoryMap,
+                MapKey,
+                DescriptorSize,
+                DescriptorVersion
+                );
+    if (EFI_ERROR (Status)) {
+      SctFreePool(*MemoryMap);
+    }
+  } while (EFI_ERROR (Status));
+
+  return EFI_SUCCESS;
+}
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSmbios/BlackBoxTest/SbbrSmbiosBBTestMain.h b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSmbios/BlackBoxTest/SbbrSmbiosBBTestMain.h
new file mode 100644
index 0000000..8884bdd
--- /dev/null
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrSmbios/BlackBoxTest/SbbrSmbiosBBTestMain.h
@@ -0,0 +1,90 @@
+/*++
+  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 LTD. All rights reserved.
+
+--*/
+/*++
+
+Module Name:
+
+  SbbrSmbiosBBTestMain.h
+
+Abstract:
+
+  Contains definitions for test information and test GUIDs.
+
+--*/
+
+#ifndef _SBBRSMBIOS_TEST_MAIN_H_
+#define _SBBRSMBIOS_TEST_MAIN_H_
+
+#include "Efi.h"
+#include "Guid.h"
+#include <Library/EfiTestLib.h>
+
+#define SBBRSMBIOS_TEST_REVISION 0x00010000
+
+#define SBBRSMBIOS_TEST_GUID     \
+  { 0x852e92eb, 0xd7aa, 0x4d61, {0x84, 0xef, 0xd3, 0x2d, 0xc5, 0xd5, 0x45, 0xec }}
+
+#define SBBRSMBIOS_MAJOR_VERSION 3
+
+EFI_STATUS
+InitializeBBTestSbbrSmbios (
+  IN EFI_HANDLE           ImageHandle,
+  IN EFI_SYSTEM_TABLE     *SystemTable
+  );
+
+EFI_STATUS
+BBTestSbbrSmbiosUnload (
+  IN EFI_HANDLE       ImageHandle
+  );
+
+//
+// Entry GUIDs
+//
+
+#define SBBRSMBIOS_UEFISMBIOS_GUID \
+  { 0x71b32221, 0x8b9d, 0x4b41, {0x8b, 0x04, 0xee, 0x6d, 0x18, 0xa6, 0xe5, 0x25 }}
+
+#endif /* _SBBRSMBIOS_TEST_MAIN_H_ */
diff --git a/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc b/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
index 931b8da..bf010c9 100644
--- a/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
+++ b/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
@@ -258,6 +258,11 @@ SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/SbbrBootServ
 # End of UEFI Boot Services - SBBR v1.0 3.4
 
 #
+# SMBIOS Requirements on UEFI - SBBR v1.0 5.1.1
+#
+SctPkg/TestCase/UEFI/EFI/Generic/SbbrSmbios/BlackBoxTest/SbbrSmbiosBBTest.inf
+
+#
 # Required UEFI Runtime Services Tests - SBBR v1.0 Appendix B
 #
 ##  1. EFI_GET_TIME
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [edk2-test][RFC PATCH 10/12] uefi-sct/SctPkg: sbbr: Corrected path to ArmBaseLib.inf in SBBR_SCT.dsc
  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
                   ` (7 preceding siblings ...)
  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 ` 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
                   ` (2 subsequent siblings)
  11 siblings, 1 reply; 24+ messages in thread
From: Sakar Arora @ 2018-11-06  8:47 UTC (permalink / raw)
  To: edk2-devel; +Cc: Supreeth.Venkatesh, prasanth.pulla

From: Randy Jones <randy.jones@arm.com>

Change-Id: I0fa236441ed8388d6c8a7fd185d46ec5a2dbe02d
---
 uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc b/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
index bf010c9..7076d11 100644
--- a/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
+++ b/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
@@ -144,7 +144,7 @@
 
 [LibraryClasses.AARCH64]
   NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
-  ArmLib|ArmPkg/Library/ArmLib/AArch64/AArch64Lib.inf
+  ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf
 
 ###############################################################################
 #
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [edk2-test][RFC PATCH 11/12] uefi-sct/SctPkg: sbbr: Bugfix for MemoryMap Check Test.
  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
                   ` (8 preceding siblings ...)
  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  8:47 ` 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 12:45 ` [edk2-test][RFC PATCH 01/12] uefi-sct/SctPkg: sbbr: Add support to build SBBR v1.0 test cases Leif Lindholm
  11 siblings, 2 replies; 24+ messages in thread
From: Sakar Arora @ 2018-11-06  8:47 UTC (permalink / raw)
  To: edk2-devel; +Cc: Supreeth.Venkatesh, prasanth.pulla

As per SBBR specification, "A UEFI runtime environment compliant with
SBBR must not be written with any assumption of an identity mapping
between virtual and physical memory maps."

Test case implementation was failing the test, if it is not identity
mapped, which is incorrect.

Corrected test case to warn the user that UEFI runtime environment is
identity mapped, instead of failure.

Signed-off-by: Sakar Arora <sakar.arora@arm.com>
Reported-by: Felix Poludov <Felixp@ami.com>
---
 .../SbbrBootServices/BlackBoxTest/SbbrBootServicesBBTestFunction.c  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/SbbrBootServicesBBTestFunction.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/SbbrBootServicesBBTestFunction.c
index fb50702..c88d60b 100644
--- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/SbbrBootServicesBBTestFunction.c
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/SbbrBootServicesBBTestFunction.c
@@ -201,13 +201,13 @@ BBTestMemoryMapTest (
     //
     // Checking for identity mapping
     //
-    if (MemoryMapDescriptor->PhysicalStart != MemoryMapDescriptor->VirtualStart) {
+    if (MemoryMapDescriptor->PhysicalStart == MemoryMapDescriptor->VirtualStart) {
       StandardLib->RecordAssertion (
                   StandardLib,
-                  EFI_TEST_ASSERTION_FAILED,
+                  EFI_TEST_ASSERTION_WARNING,
                   gSbbrBootServicesAssertion001Guid,
                   L"MemoryMap",
-                  L"%a:%d - MemoryMap 0x%X Not Identity Mapped",
+                  L"%a:%d - MemoryMap 0x%X is Identity Mapped. UEFI runtime environment must not be written with any assumption of an identity mapping between virtual and physical memory maps.",
                   __FILE__,
                   __LINE__,
                   MemoryMapDescriptor
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [edk2-test][RFC PATCH 12/12] uefi-sct/SctPkg: sbbr: Modify SBBR description file to add missing dependencies.
  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
                   ` (9 preceding siblings ...)
  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  8:47 ` 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
  11 siblings, 1 reply; 24+ messages in thread
From: Sakar Arora @ 2018-11-06  8:47 UTC (permalink / raw)
  To: edk2-devel; +Cc: Supreeth.Venkatesh, prasanth.pulla

SBBR ImageServicesTest fails because it can't load its dependent
drivers.
Modify the description file to include all the dependecies and copy it
over to the dependency folder.

Signed-off-by: Sakar Arora <sakar.arora@arm.com>
Reported-by: Felix Poludov <Felixp@ami.com>
---
 uefi-sct/SctPkg/CommonGenFramework.sh |  3 ++
 uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc     | 81 +++++++++++++++++++++++++++++++++--
 2 files changed, 80 insertions(+), 4 deletions(-)

diff --git a/uefi-sct/SctPkg/CommonGenFramework.sh b/uefi-sct/SctPkg/CommonGenFramework.sh
index 8e7c7ca..2d7083d 100755
--- a/uefi-sct/SctPkg/CommonGenFramework.sh
+++ b/uefi-sct/SctPkg/CommonGenFramework.sh
@@ -396,4 +396,7 @@ then
     # Copy the test dependency files
     # *********************************************
 
+    CopyDependency EfiCompliant
+    CopyDependency ProtocolHandlerServices
+    CopyDependency ImageServices
 fi
diff --git a/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc b/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
index 7076d11..01754ba 100644
--- a/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
+++ b/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
@@ -205,6 +205,44 @@ SctPkg/TestCase/UEFI/EFI/BootServices/EventTimerTaskPriorityServices/BlackBoxTes
 ## 12. EFI_IMAGE_UNLOAD
 ## 13. EFI_EXIT_BOOT_SERVICES
 SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/ImageBBTest.inf
+##
+## Dependency files for Image Services Test
+##
+SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/LoadFile/LoadFile.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/Application1/Application1.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/Application2/Application2.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/Application3/Application3.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/Application4/Application4.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/BootServicesDriver1/BootServicesDriver1.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/BootServicesDriver2/BootServicesDriver2.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/BootServicesDriver3/BootServicesDriver3.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/BootServicesDriver4/BootServicesDriver4.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/BootServicesDriver5/BootServicesDriver5.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/BootServicesDriver6/BootServicesDriver6.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/RuntimeServicesDriver1/RuntimeServicesDriver1.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/RuntimeServicesDriver2/RuntimeServicesDriver2.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/RuntimeServicesDriver3/RuntimeServicesDriver3.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/RuntimeServicesDriver4/RuntimeServicesDriver4.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/RuntimeServicesDriver5/RuntimeServicesDriver5.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/RuntimeServicesDriver6/RuntimeServicesDriver6.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/CombinationImage1/CombinationImage1.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/CombinationImage2/CombinationImage2.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/CombinationImage3/CombinationImage3.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/CombinationImage4/CombinationImage4.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/CombinationImage5/CombinationImage5.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/CombinationImage6/CombinationImage6.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/CombinationImage7/CombinationImage7.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/CombinationImage8/CombinationImage8.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/CombinationImage9/CombinationImage9.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/CombinationImage10/CombinationImage10.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/InvalidImage1/InvalidImage1.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/InvalidImage2/InvalidImage2.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/InvalidImage3/InvalidImage3.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/InvalidImage4/InvalidImage4.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/InvalidImage5/InvalidImage5.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/InvalidImage6/InvalidImage6.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/InvalidImage7/InvalidImage7.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/ValidHiiImage1/ValidHiiImage1.inf
 #
 ## 14. EFI_ALLOCATE_PAGES
 ## 15. EFI_FREE_PAGES
@@ -240,6 +278,41 @@ SctPkg/TestCase/UEFI/EFI/BootServices/MiscBootServices/BlackBoxTest/MiscBootServ
 ## 41. EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES
 ## 42. EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES
 SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/ProtocolHandlerBBTest.inf
+##
+## Dependency files for Protocol Handler Services Test
+##
+SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/BusDriver1/BusDriver1.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/BusDriver2/BusDriver2.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/BusDriver3/BusDriver3.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/BusDriver4/BusDriver4.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DBindingDriver1/DBindingDriver1.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DBindingDriver2/DBindingDriver2.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DBindingDriver3/DBindingDriver3.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DBindingDriver4/DBindingDriver4.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DBindingDriver5/DBindingDriver5.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DeviceDriver1/DeviceDriver1.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DeviceDriver2/DeviceDriver2.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DeviceDriver3/DeviceDriver3.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DeviceDriver4/DeviceDriver4.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DeviceDriver5/DeviceDriver5.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DeviceDriver6/DeviceDriver6.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DeviceDriver7/DeviceDriver7.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DeviceDriver11/DeviceDriver11.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DeviceDriver12/DeviceDriver12.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DeviceDriver13/DeviceDriver13.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DeviceDriver14/DeviceDriver14.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DeviceDriver15/DeviceDriver15.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DeviceDriver18/DeviceDriver18.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DeviceDriver19/DeviceDriver19.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DeviceDriver110/DeviceDriver110.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DeviceDriver111/DeviceDriver111.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/TestDriver1/TestDriver1.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/TestDriver2/TestDriver2.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/TestDriver3/TestDriver3.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/TestDriver4/TestDriver4.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/TestDriver5/TestDriver5.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/PlatformOverrideDriver1/PlatformOverrideDriver1.inf
+SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/BusOverrideDriver1/BusOverrideDriver1.inf
 # End of Boot Services Tests - SBBR v1.0 Appendix A
 
 #
@@ -292,13 +365,13 @@ SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRu
 #
 SctPkg/TestCase/UEFI/EFI/Generic/SbbrRequiredUefiProtocols/BlackBoxTest/RequiredUefiProtocolsBBTest.inf
 SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompliantBBTest_uefi.inf
+##
+## Dependency files for UEFI/EFI Compliant Test
+##
+SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/Dependency/Config/Config.inf
 # End of UEFI Required Protocols Tests - SBBR Appendix C
 
 #
-# Dependency files
-#
-
-#
 # Support Files
 #
 SctPkg/TestInfrastructure/SCT/Framework/ENTS/Eftp/Eftp.inf
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Re: [edk2-test][RFC PATCH 01/12] uefi-sct/SctPkg: sbbr: Add support to build SBBR v1.0 test cases.
  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
                   ` (10 preceding siblings ...)
  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 12:45 ` Leif Lindholm
  2018-11-06 17:39   ` Supreeth Venkatesh
  11 siblings, 1 reply; 24+ messages in thread
From: Leif Lindholm @ 2018-11-06 12:45 UTC (permalink / raw)
  To: Sakar Arora; +Cc: edk2-devel, prasanth.pulla, Eric Jin, Supreeth Venkatesh

Hi Sakar,

Glad to see you guys already contributing to the newly(ish) open SCT.

I do have some comments on this patch - starting with: please cc the
maintainers. I have added Eric/Supreeth to this reply.

On Tue, Nov 06, 2018 at 02:17:35PM +0530, Sakar Arora wrote:
> Provide a framework for building SBBR Test Cases using the existing
> UEFI-SCT Framework. Separate out build-scripts/install scripts to
> carve out SBBR test cases.
> 
> To build SBBR SCT,
> 
>    ./build_sbbr.sh AARCH64 GCC
> 
> Change-Id: I3d7612dbb42a4dc3bce40e4e9b351fd1f5f84dcd
> Signed-off-by: Sakar Arora <sakar.arora@arm.com>
> ---
>  uefi-sct/SctPkg/CommonGenFramework.sh |  33 ++++
>  uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc     | 205 ++++++++++++++++++++++
>  uefi-sct/SctPkg/build_sbbr.sh         | 312 ++++++++++++++++++++++++++++++++++
>  3 files changed, 550 insertions(+)
>  create mode 100644 uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
>  create mode 100755 uefi-sct/SctPkg/build_sbbr.sh
> 
> diff --git a/uefi-sct/SctPkg/CommonGenFramework.sh b/uefi-sct/SctPkg/CommonGenFramework.sh
> index 299f0d6..4bb68ce 100755
> --- a/uefi-sct/SctPkg/CommonGenFramework.sh
> +++ b/uefi-sct/SctPkg/CommonGenFramework.sh
> @@ -335,4 +335,37 @@ then
>    CopyDependency Ebc
>    CopyDependency PxeBaseCode
>  fi
> +# *********************************************
> +# For SBBR v1.0 SCT
> +# *********************************************
> +
> +if [ $1 = "sbbr_sct" ]
> +then
> +    # *********************************************
> +    # Copy the SBBR v1.0 Test Cases
> +    # *********************************************
> +
> +    mkdir -p $Framework/SCRT
> +    cp $ProcessorType/SCRTDRIVER.efi                           $Framework/SCRT  > NUL

This "> NUL" comes from someone cargo-culting when translating from a
Windows .bat file. On any unix-like system, this means you end up with
a file called NUL. (Read through the thread at
https://twitter.com/Foone/status/1058676834940776450 for a recent
hilarious twitter rant.)

So please don't add any new "> NUL" statements.
I would argue since the unix cp is silent by default, it can be
dropped completely.

Someone with some free time on their hands could go through and delete
all of the Windows-isms from the original script.

> +    cp $ProcessorType/SCRTAPP.efi                              $Framework/SCRT  > NUL
> +    cp ../../../SctPkg/Config/Data/SCRT.conf                   $Framework/SCRT  > NUL

1) Is there no way of doing this without ../../..?
2) Which SctPkg is this? This file is already in SctPkg, yet this
   brings us 3 levels of hierarchy up?

> +
> +    # *********************************************
> +    # Copy your test cases here
> +    # *********************************************
> +
>  
> +    # *********************************************
> +    # Copy ENTS binary
> +    # *********************************************
> +
> +    cp $ProcessorType/SerialMonitor.efi                $Framework/Ents/Support/ > NUL
> +    cp $ProcessorType/ManagedNetworkMonitor.efi        $Framework/Ents/Support/ > NUL
> +    cp $ProcessorType/IP4NetworkMonitor.efi            $Framework/Ents/Support/ > NUL
> +    cp $ProcessorType/Eftp.efi                         $Framework/Ents/Support/ > NUL
> +
> +    # *********************************************
> +    # Copy the test dependency files
> +    # *********************************************
> +
> +fi
> diff --git a/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc b/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
> new file mode 100644
> index 0000000..ff6abd9
> --- /dev/null
> +++ b/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
> @@ -0,0 +1,205 @@
> +#
> +# 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) 2010 - 2016, Intel Corporation. All rights reserved.<BR>

Question for maintainers: is this a license header we want to be using
for new submissions?

> +#
> +#
> +#/*++
> +#
> +# Module Name:
> +#
> +#    SBBR_SCT.dsc
> +#
> +# Abstract:
> +#
> +#   This is a build description file used to build the test modules of SBBR SCT.
> +#
> +# Notes:
> +#
> +#   The info in this file is broken down into sections. The start of a section
> +#   is designated by a "[" in the first column. So the [=====] separater ends
> +#   a section.
> +#
> +#--*/
> +
> +################################################################################
> +#
> +# Defines Section - statements that will be processed to create a Makefile.
> +#
> +################################################################################
> +[Defines]
> +  PLATFORM_NAME                  = SbbrSct
> +  PLATFORM_GUID                  = d513138b-9d4a-479c-8058-4a5160018663
> +  PLATFORM_VERSION               = 0.1
> +  DSC_SPECIFICATION              = 0x00010005

Please bump substantially. I think current version is 0x0001001a,
but it may have gone further.

> +  OUTPUT_DIRECTORY               = Build/SbbrSct
> +  SUPPORTED_ARCHITECTURES        = AARCH64
> +  BUILD_TARGETS                  = DEBUG|RELEASE

Preferably add NOOPT as well for new submissions.

> +  SKUID_IDENTIFIER               = DEFAULT
> +
> +  DEFINE GCC_VER_MACRO           = -D EFI_SPECIFICATION_VERSION=0x00020028 -D TIANO_RELEASE_VERSION=0x00080006
> +  DEFINE MSFT_VER_MACRO          = /D EFI_SPECIFICATION_VERSION=0x00020028 /D TIANO_RELEASE_VERSION=0x00080006
> +
> +
> +################################################################################
> +#
> +# SKU Identification section - list of all SKU IDs supported by this
> +#                              Platform.
> +#
> +################################################################################
> +[SkuIds]
> +  0|DEFAULT              # The entry: 0|DEFAULT is reserved and always required.
> +
> +[BuildOptions]
> +  *_*_AARCH64_CC_FLAGS         = -D EFIAARCH64 -I$(WORKSPACE)/MdePkg/Include/AArch64 $(GCC_VER_MACRO)

Why -D EFIAARCH64? If such a filter is truly needed, test against
already defined MDE_CPU_AARCH64.

> +  GCC:*_*_AARCH64_CC_FLAGS     = -D EFIAARCH64 $(GCC_VER_MACRO) -ffreestanding -nostdinc -nostdlib -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error

Why do we need these special flags? -Wno-error particularly looks like
an unfortunate addition, but I don't see why we need the others at all.

> +  *_*_AARCH64_VFRPP_FLAGS      = -D EFIAARCH64 $(GCC_VER_MACRO)
> +  *_*_AARCH64_APP_FLAGS        = -D EFIAARCH64 $(GCC_VER_MACRO)
> +  *_*_AARCH64_PP_FLAGS         = -D EFIAARCH64 $(GCC_VER_MACRO)
> +  RVCT:*_*_AARCH64_DLINK_FLAGS = --muldefweak

So, this one I can see may be valid, but it deserves a comment as to
why it is needed.

> +
> +  DEBUG_*_*_CC_FLAGS  = -DEFI_DEBUG

Why is this needed?
You can test against !MDEPKG_NDEBUG for the DEBUG targets. This is a
common pattern in edk2.

> +  RELEASE_*_*_CC_FLAGS  = -DMDEPKG_NDEBUG

> +
> +[Libraries]
> +  SctPkg/Library/SctLib/SctLib.inf
> +  SctPkg/Library/SctGuidLib/SctGuidLib.inf
> +  SctPkg/Library/EfiTestLib/EfiTestLib.inf
> +
> +  SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/EntsLib.inf
> +
> +  MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
> +
> +[Libraries.ARM]
> +  ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
> +

SUPPORTED_ARCHITECTURES is set to AARCH64 only, so no need to keep
this .ARM section.

> +[Libraries.AARCH64]
> +  ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
> +
> +[LibraryClasses.common]
> +  UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
> +  UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
> +  UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
> +  BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
> +  BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
> +  DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
> +  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
> +  MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
> +  UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
> +  UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
> +  HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
> +  PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
> +  UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
> +  DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
> +
> +  SctLib|SctPkg/Library/SctLib/SctLib.inf
> +  NetLib|SctPkg/Library/NetLib/NetLib.inf
> +  EntsLib|SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/EntsLib.inf
> +  EasLib|SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasDispatcher/Eas.inf
> +  EfiTestLib|SctPkg/Library/EfiTestLib/EfiTestLib.inf
> +
> +[LibraryClasses.ARM]
> +  NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf

Can drop this .ARM section.

> +
> +[LibraryClasses.AARCH64]
> +  NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
> +
> +###############################################################################
> +#
> +# These are the components that will be built by the master makefile
> +#
> +###############################################################################
> +
> +[Components]
> +
> +#
> +# The default package
> +#
> +DEFINE PACKAGE=Default
> +
> +#
> +# Components
> +#
> +
> +#
> +# Following are the SCT suite & related drivers
> +#
> +
> +SctPkg/TestInfrastructure/SCT/Framework/Sct.inf
> +SctPkg/TestInfrastructure/SCT/Drivers/StandardTest/StandardTest.inf
> +SctPkg/TestInfrastructure/SCT/Drivers/TestProfile/TestProfile.inf
> +SctPkg/TestInfrastructure/SCT/Drivers/TestRecovery/TestRecovery.inf
> +SctPkg/TestInfrastructure/SCT/Drivers/TestLogging/TestLogging.inf
> +
> +#
> +# Related SCT applications
> +#
> +
> +SctPkg/Application/InstallSct/InstallSct.inf
> +SctPkg/Application/StallForKey/StallForKey.inf
> +
> +SctPkg/SCRT/SCRTApp/SCRTApp.inf
> +SctPkg/SCRT/SCRTDriver/SCRTDriver.inf
> +
> +#
> +# Test cases for SBBR SCT
> +#
> +
> +# Add Your test cases here:
> +
> +# Runtime Services Tests
> +#SctPkg/TestCase/UEFI/EFI/RuntimeServices/MiscRuntimeServices/BlackBoxTest/MiscRuntimeServicesBBTest.inf
> +#SctPkg/TestCase/UEFI/EFI/RuntimeServices/TimeServices/BlackBoxTest/TimeServicesBBTest.inf
> +#SctPkg/TestCase/UEFI/EFI/RuntimeServices/VariableServices/BlackBoxTest/VariableServicesBBTest.inf
> +
> +#
> +# Dependency files
> +#
> +
> +#
> +# Support Files
> +#
> +SctPkg/TestInfrastructure/SCT/Framework/ENTS/Eftp/Eftp.inf
> +SctPkg/TestInfrastructure/SCT/Framework/ENTS/MonitorServices/SerialMonitor/SerialMonitor.inf
> +SctPkg/TestInfrastructure/SCT/Framework/ENTS/MonitorServices/ManagedNetworkMonitor/ManagedNetworkMonitor.inf
> +SctPkg/TestInfrastructure/SCT/Framework/ENTS/MonitorServices/IP4NetworkMonitor/IP4NetworkMonitor.inf
> +
> diff --git a/uefi-sct/SctPkg/build_sbbr.sh b/uefi-sct/SctPkg/build_sbbr.sh
> new file mode 100755
> index 0000000..6956e9b
> --- /dev/null
> +++ b/uefi-sct/SctPkg/build_sbbr.sh

Do we need to completely duplicate build.sh?
Since most of the functionality is identical, can we not add a flag to
build.sh, or make this a thin wrapper script instead?

/
    Leif

> @@ -0,0 +1,312 @@
> +#!/bin/bash
> +# 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 - 2015 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) 2011, 2015 ARM Ltd. All rights reserved.<BR>
> +#
> +
> +SctpackageDependencyList=(EdkCompatibilityPkg SctPkg BaseTools)
> +
> +function get_build_arch
> +{
> +	case `uname -m` in
> +	    aarch64*)
> +	        BUILD_ARCH=AARCH64;;
> +	    *)
> +	        BUILD_ARCH=other;;
> +	esac
> +}
> +
> +function set_cross_compile
> +{
> +	get_build_arch
> +
> +	echo "Target: $SCT_TARGET_ARCH"
> +	echo "Build: $BUILD_ARCH"
> +	if [ "$SCT_TARGET_ARCH" = "$BUILD_ARCH" ]; then
> +	    TEMP_CROSS_COMPILE=
> +	elif [ "$SCT_TARGET_ARCH" == "AARCH64" ]; then
> +	    if [ X"$CROSS_COMPILE_64" != X"" ]; then
> +	        TEMP_CROSS_COMPILE="$CROSS_COMPILE_64"
> +	    else
> +	        TEMP_CROSS_COMPILE=aarch64-linux-gnu-
> +	    fi
> +	else
> +	    echo "Unsupported target architecture '$SCT_TARGET_ARCH'!" >&2
> +	fi
> +}
> +
> +function get_gcc_version
> +{
> +	gcc_version=$($1 -dumpversion)
> +	case $gcc_version in
> +		4.6*|4.7*|4.8*|4.9*)
> +			echo GCC$(echo ${gcc_version} | awk -F. '{print $1$2}')
> +			;;
> +		*)
> +			echo "Unknown toolchain version '$gcc_version'" >&2
> +			echo "Attempting to build using GCC49 profile." >&2
> +			echo GCC49
> +			;;
> +	esac
> +}
> +
> +function get_clang_version
> +{
> +	clang_version=`$1 --version | head -1 | sed 's/^.*version\s*\([0-9]*\).\([0-9]*\).*/\1\2/g'`
> +	echo "CLANG$clang_version"
> +}
> +
> +
> +GetBaseToolsBinSubDir() {
> +	#
> +	# Figure out a uniq directory name from the uname command
> +	#
> +	UNAME_DIRNAME=`uname -sm`
> +	UNAME_DIRNAME=${UNAME_DIRNAME// /-}
> +	UNAME_DIRNAME=${UNAME_DIRNAME//\//-}
> +	echo $UNAME_DIRNAME
> +}
> +
> +GetEdkToolsPathBinDirectory() {
> +	#
> +	# Figure out a uniq directory name from the uname
> +	# command
> +	#
> +	BIN_SUB_DIR=`GetBaseToolsBinSubDir`
> +
> +	if [ -e	$EDK_TOOLS_PATH/BinWrappers/$BIN_SUB_DIR ]
> +	then
> +		EDK_TOOLS_PATH_BIN=$EDK_TOOLS_PATH/BinWrappers/$BIN_SUB_DIR
> +	else
> +		EDK_TOOLS_PATH_BIN=$EDK_TOOLS_PATH/BinWrappers/PosixLike
> +	fi
> +        echo $EDK_TOOLS_PATH_BIN
> +}
> +
> +PrintUsage() {
> +	#
> +	#Print Help
> +	#
> +	echo "Usage:"
> +	echo "    $0 <architecture (ARM, AARCH64, X64, etc)> \
> +<toolchain name (RVCT or ARMGCC or GCC*)> \
> +[build type (RELEASE OR DEBUG, DEFAULT: DEBUG)]"
> +}
> +
> +#Iterate through the SCT package dependency list and check if they exist in the current directory
> +for pkg in ${names[@]}
> +do
> +    if [ ! -d `pwd`/$name]
> +    then
> +    echo "Couldn't build SCT:"
> +    echo The directory `pwd`/$name does not exist.
> +    exit -1
> +    fi
> +done
> +
> +export EFI_SOURCE=`pwd`
> +export EDK_SOURCE=`pwd`/EdkCompatibilityPkg
> +
> +# check if the last command was successful
> +status=$?
> +if test $status -ne 0; then
> +	echo Could not Run the edksetup.sh script
> +	exit -1
> +fi
> +
> +SCT_TARGET_ARCH=${1}
> +
> +#
> +# Pick a default tool type for a given OS
> +#
> +case `uname` in
> +   Linux*)
> +	case ${2} in
> +		RVCT | rvct)
> +			TARGET_TOOLS=RVCTLINUX
> +		;;
> +
> +		ARMGCC | armgcc)
> +			TARGET_TOOLS=ARMGCC
> +		;;
> +
> +		GCC | gcc)
> +            set_cross_compile
> +	        CROSS_COMPILE="$TEMP_CROSS_COMPILE"
> +            export TARGET_TOOLS=`get_gcc_version "$CROSS_COMPILE"gcc`
> +
> +		;;
> +
> +		*)
> +			echo "Couldn't build SBBR SCT:"
> +			PrintUsage
> +			exit -1
> +		;;
> +	esac
> +   ;;
> +   CYGWIN*)
> +	case ${2} in
> +		RVCT | rvct)
> +			TARGET_TOOLS=RVCT31CYGWIN
> +		;;
> +
> +		ARMGCC | armgcc)
> +			TARGET_TOOLS=ARMGCCCYGWIN
> +		;;
> +
> +		*)
> +			echo "Couldn't build SBBR SCT:"
> +			PrintUsage
> +			exit -1
> +		;;
> +	esac
> +   ;;
> +   *)
> +     echo "Couldn't build SBBR SCT:"
> +     echo "Unknown OS, Use this script either in Unix or Cygwin environment".
> +     PrintUsage
> +     exit -1
> +   ;;
> +esac
> +
> +echo "TOOLCHAIN is ${TARGET_TOOLS}"
> +export ${TARGET_TOOLS}_${SCT_TARGET_ARCH}_PREFIX=$CROSS_COMPILE
> +echo "Toolchain prefix: ${TARGET_TOOLS}_${SCT_TARGET_ARCH}_PREFIX=$CROSS_COMPILE"
> +
> +SCT_BUILD=DEBUG
> +if [ "$3" = "RELEASE" -o "$3" = "DEBUG" ]; then
> +  SCT_BUILD=$3
> +  shift
> +fi
> +
> +#
> +# Setup workspace if it is not set
> +#
> +if [ -z "${WORKSPACE:-}" ]; then
> +	echo Initializing workspace
> +	# Uses an external BaseTools project
> +	# Uses the BaseTools in edk2
> +	export EDK_TOOLS_PATH=`pwd`/BaseTools
> +	# We do not pass BuildArmSct.sh arguments to edksetup.sh
> +	while (( "$#" )); do
> +		shift
> +	done
> +	source ./edksetup.sh
> +else
> +	echo Building from: $WORKSPACE
> +fi
> +
> +if  [[ ! -e $EDK_TOOLS_PATH/Source/C/bin ]]
> +then
> +  # build the tools if they don't yet exist
> +  echo Building tools: $EDK_TOOLS_PATH
> +  make -C $EDK_TOOLS_PATH
> +  status=$?
> +  if test $status -ne 0
> +  then
> +  echo Error while building EDK tools
> +    exit -1
> +  fi
> +else
> +  echo using prebuilt tools
> +fi
> +
> +# Copy GenBin file to Base tools directory
> +DEST_DIR=`GetEdkToolsPathBinDirectory`
> +# Ensure the directory exist
> +mkdir -p $DEST_DIR
> +case `uname -m` in
> +	x86_64)
> +		cp SctPkg/Tools/Bin/GenBin_lin_64 $DEST_DIR/GenBin
> +		;;
> +	x86_32)
> +		cp SctPkg/Tools/Bin/GenBin_lin_32 $DEST_DIR/GenBin
> +		;;
> +	*)
> +		cp SctPkg/Tools/Bin/GenBin_lin_32 $DEST_DIR/GenBin
> +		;;
> +esac
> +
> +#
> +# Build the SCT package
> +#
> +build -p SctPkg/UEFI/SBBR_SCT.dsc -a $SCT_TARGET_ARCH -t $TARGET_TOOLS -b $SCT_BUILD $3 $4 $5 $6 $7 $8 $9
> +
> +# Check if there is any error
> +status=$?
> +if test $status -ne 0
> +then
> +echo Could not build the SBBR SCT package
> +        exit -1
> +fi
> +
> +#
> +# If the argument is clean, then don't have to generate Sct binary.
> +#
> +for arg in "$@"
> +do
> +  if [ $arg == clean ] || [ $arg == cleanall ]
> +  then
> +      # no need to post process if we are doing a clean
> +      exit 1
> +  fi
> +done
> +
> +#
> +# Change directory to Build directory
> +#
> +cd Build/SbbrSct/${SCT_BUILD}_${TARGET_TOOLS}
> +pwd
> +
> +#
> +# Run a script to generate Sct binary for the target architecture
> +#
> +../../../SctPkg/CommonGenFramework.sh sbbr_sct $SCT_TARGET_ARCH Install$SCT_TARGET_ARCH.efi
> +
> +status=$?
> +if test $status -ne 0
> +then
> +echo Could not generate SBBR SCT binary
> +     exit -1
> +else
> +echo The SBBR SCT binary "SctPackage${SCT_TARGET_ARCH}" is located at "$EFI_SOURCE/Build/SbbrSct/${SCT_BUILD}_${TARGET_TOOLS}"
> +fi
> -- 
> 2.7.4
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [edk2-test][RFC PATCH 02/12] uefi-sct/SctPkg: sbbr: Add boot services test cases for SBBR v1.0
  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
  0 siblings, 0 replies; 24+ messages in thread
From: Leif Lindholm @ 2018-11-06 17:30 UTC (permalink / raw)
  To: Sakar Arora; +Cc: edk2-devel, prasanth.pulla, Eric Jin, Supreeth Venkatesh

Hi Sakar,

On Tue, Nov 06, 2018 at 02:17:36PM +0530, Sakar Arora wrote:
> 1. Implements boot services tests defined in Appendix A of
>    http://infocenter.arm.com/help/topic/com.arm.doc.den0044b/DEN0044B_Server_Base_Boot_Requirements.pdf
> 
> 2. Fixes whitespace issues in SctPkg/CommonGenFramework.sh file.

Can you please break 2 out as a separate patch, preceding the changes
made by 1?

Combining whitespace-only changes with functional changes makes first
code-review and later the output of git blame (or bisect) ever so much
more painful.

/
    Leif

> Change-Id: Idc7b6e471a4c4966d4ad55f39ea045775854c206
> Signed-off-by: Sakar Arora <sakar.arora@arm.com>
> ---
>  uefi-sct/SctPkg/CommonGenFramework.sh |  12 +-
>  uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc     | 457 +++++++++++++++++++---------------
>  2 files changed, 261 insertions(+), 208 deletions(-)
> 
> diff --git a/uefi-sct/SctPkg/CommonGenFramework.sh b/uefi-sct/SctPkg/CommonGenFramework.sh
> index 4bb68ce..e0f9658 100755
> --- a/uefi-sct/SctPkg/CommonGenFramework.sh
> +++ b/uefi-sct/SctPkg/CommonGenFramework.sh
> @@ -89,7 +89,7 @@ CopyDependencyFile()
>  
>  CopyDependency()
>  {
> -    mkdir -p $Framework/Dependency/$1BBTest	
> +    mkdir -p $Framework/Dependency/$1BBTest
>      ls -h $ProcessorType/$1_Invalid*       > temp.txt 2>NUL
>      ls -h $ProcessorType/$1_*.efi   >> temp.txt 2>NUL
>      ls -h $ProcessorType/$1_*.ini   >> temp.txt 2>NUL
> @@ -107,8 +107,8 @@ CopyDependency()
>  # For UEFI SCT
>  # *********************************************
>  
> -if [ $1 = "uefi_sct" ] 
> -then 
> +if [ $1 = "uefi_sct" ]
> +then
>      # *********************************************
>      # Copy the UEFI 2.1 Test Cases
>      # *********************************************
> @@ -354,6 +354,12 @@ then
>      # Copy your test cases here
>      # *********************************************
>  
> +    # Boot Services Tests - SBBR v1.0 Appendix A
> +    cp $ProcessorType/EventTimerTaskPriorityServicesBBTest.efi          $Framework/Test/  > NUL
> +    cp $ProcessorType/ImageServicesBBTest.efi                           $Framework/Test/  > NUL
> +    cp $ProcessorType/MemoryAllocationServicesBBTest.efi                $Framework/Test/  > NUL
> +    cp $ProcessorType/MiscBootServicesBBTest.efi                        $Framework/Test/  > NUL
> +    cp $ProcessorType/ProtocolHandlerServicesBBTest.efi                 $Framework/Test/  > NUL
>  
>      # *********************************************
>      # Copy ENTS binary
> diff --git a/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc b/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
> index ff6abd9..7b5b4b0 100644
> --- a/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
> +++ b/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
> @@ -1,205 +1,252 @@
> -#
> -# 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) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
> -#
> -#
> -#/*++
> -#
> -# Module Name:
> -#
> -#    SBBR_SCT.dsc
> -#
> -# Abstract:
> -#
> -#   This is a build description file used to build the test modules of SBBR SCT.
> -#
> -# Notes:
> -#
> -#   The info in this file is broken down into sections. The start of a section
> -#   is designated by a "[" in the first column. So the [=====] separater ends
> -#   a section.
> -#
> -#--*/
> -
> -################################################################################
> -#
> -# Defines Section - statements that will be processed to create a Makefile.
> -#
> -################################################################################
> -[Defines]
> -  PLATFORM_NAME                  = SbbrSct
> -  PLATFORM_GUID                  = d513138b-9d4a-479c-8058-4a5160018663
> -  PLATFORM_VERSION               = 0.1
> -  DSC_SPECIFICATION              = 0x00010005
> -  OUTPUT_DIRECTORY               = Build/SbbrSct
> -  SUPPORTED_ARCHITECTURES        = AARCH64
> -  BUILD_TARGETS                  = DEBUG|RELEASE
> -  SKUID_IDENTIFIER               = DEFAULT
> -
> -  DEFINE GCC_VER_MACRO           = -D EFI_SPECIFICATION_VERSION=0x00020028 -D TIANO_RELEASE_VERSION=0x00080006
> -  DEFINE MSFT_VER_MACRO          = /D EFI_SPECIFICATION_VERSION=0x00020028 /D TIANO_RELEASE_VERSION=0x00080006
> -
> -
> -################################################################################
> -#
> -# SKU Identification section - list of all SKU IDs supported by this
> -#                              Platform.
> -#
> -################################################################################
> -[SkuIds]
> -  0|DEFAULT              # The entry: 0|DEFAULT is reserved and always required.
> -
> -[BuildOptions]
> -  *_*_AARCH64_CC_FLAGS         = -D EFIAARCH64 -I$(WORKSPACE)/MdePkg/Include/AArch64 $(GCC_VER_MACRO)
> -  GCC:*_*_AARCH64_CC_FLAGS     = -D EFIAARCH64 $(GCC_VER_MACRO) -ffreestanding -nostdinc -nostdlib -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error
> -  *_*_AARCH64_VFRPP_FLAGS      = -D EFIAARCH64 $(GCC_VER_MACRO)
> -  *_*_AARCH64_APP_FLAGS        = -D EFIAARCH64 $(GCC_VER_MACRO)
> -  *_*_AARCH64_PP_FLAGS         = -D EFIAARCH64 $(GCC_VER_MACRO)
> -  RVCT:*_*_AARCH64_DLINK_FLAGS = --muldefweak
> -
> -  DEBUG_*_*_CC_FLAGS  = -DEFI_DEBUG
> -  RELEASE_*_*_CC_FLAGS  = -DMDEPKG_NDEBUG
> -
> -[Libraries]
> -  SctPkg/Library/SctLib/SctLib.inf
> -  SctPkg/Library/SctGuidLib/SctGuidLib.inf
> -  SctPkg/Library/EfiTestLib/EfiTestLib.inf
> -
> -  SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/EntsLib.inf
> -
> -  MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
> -
> -[Libraries.ARM]
> -  ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
> -
> -[Libraries.AARCH64]
> -  ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
> -
> -[LibraryClasses.common]
> -  UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
> -  UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
> -  UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
> -  BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
> -  BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
> -  DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
> -  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
> -  MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
> -  UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
> -  UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
> -  HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
> -  PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
> -  UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
> -  DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
> -
> -  SctLib|SctPkg/Library/SctLib/SctLib.inf
> -  NetLib|SctPkg/Library/NetLib/NetLib.inf
> -  EntsLib|SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/EntsLib.inf
> -  EasLib|SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasDispatcher/Eas.inf
> -  EfiTestLib|SctPkg/Library/EfiTestLib/EfiTestLib.inf
> -
> -[LibraryClasses.ARM]
> -  NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
> -
> -[LibraryClasses.AARCH64]
> -  NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
> -
> -###############################################################################
> -#
> -# These are the components that will be built by the master makefile
> -#
> -###############################################################################
> -
> -[Components]
> -
> -#
> -# The default package
> -#
> -DEFINE PACKAGE=Default
> -
> -#
> -# Components
> -#
> -
> -#
> -# Following are the SCT suite & related drivers
> -#
> -
> -SctPkg/TestInfrastructure/SCT/Framework/Sct.inf
> -SctPkg/TestInfrastructure/SCT/Drivers/StandardTest/StandardTest.inf
> -SctPkg/TestInfrastructure/SCT/Drivers/TestProfile/TestProfile.inf
> -SctPkg/TestInfrastructure/SCT/Drivers/TestRecovery/TestRecovery.inf
> -SctPkg/TestInfrastructure/SCT/Drivers/TestLogging/TestLogging.inf
> -
> -#
> -# Related SCT applications
> -#
> -
> -SctPkg/Application/InstallSct/InstallSct.inf
> -SctPkg/Application/StallForKey/StallForKey.inf
> -
> -SctPkg/SCRT/SCRTApp/SCRTApp.inf
> -SctPkg/SCRT/SCRTDriver/SCRTDriver.inf
> -
> -#
> -# Test cases for SBBR SCT
> -#
> -
> -# Add Your test cases here:
> -
> -# Runtime Services Tests
> -#SctPkg/TestCase/UEFI/EFI/RuntimeServices/MiscRuntimeServices/BlackBoxTest/MiscRuntimeServicesBBTest.inf
> -#SctPkg/TestCase/UEFI/EFI/RuntimeServices/TimeServices/BlackBoxTest/TimeServicesBBTest.inf
> -#SctPkg/TestCase/UEFI/EFI/RuntimeServices/VariableServices/BlackBoxTest/VariableServicesBBTest.inf
> -
> -#
> -# Dependency files
> -#
> -
> -#
> -# Support Files
> -#
> -SctPkg/TestInfrastructure/SCT/Framework/ENTS/Eftp/Eftp.inf
> -SctPkg/TestInfrastructure/SCT/Framework/ENTS/MonitorServices/SerialMonitor/SerialMonitor.inf
> -SctPkg/TestInfrastructure/SCT/Framework/ENTS/MonitorServices/ManagedNetworkMonitor/ManagedNetworkMonitor.inf
> -SctPkg/TestInfrastructure/SCT/Framework/ENTS/MonitorServices/IP4NetworkMonitor/IP4NetworkMonitor.inf
> -
> +#
> +# 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) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
> +#
> +#
> +#/*++
> +#
> +# Module Name:
> +#
> +#    SBBR_SCT.dsc
> +#
> +# Abstract:
> +#
> +#   This is a build description file used to build the test modules of SBBR SCT.
> +#
> +# Notes:
> +#
> +#   The info in this file is broken down into sections. The start of a section
> +#   is designated by a "[" in the first column. So the [=====] separater ends
> +#   a section.
> +#
> +#--*/
> +
> +################################################################################
> +#
> +# Defines Section - statements that will be processed to create a Makefile.
> +#
> +################################################################################
> +[Defines]
> +  PLATFORM_NAME                  = SbbrSct
> +  PLATFORM_GUID                  = d513138b-9d4a-479c-8058-4a5160018663
> +  PLATFORM_VERSION               = 0.1
> +  DSC_SPECIFICATION              = 0x00010005
> +  OUTPUT_DIRECTORY               = Build/SbbrSct
> +  SUPPORTED_ARCHITECTURES        = AARCH64
> +  BUILD_TARGETS                  = DEBUG|RELEASE
> +  SKUID_IDENTIFIER               = DEFAULT
> +
> +  DEFINE GCC_VER_MACRO           = -D EFI_SPECIFICATION_VERSION=0x00020028 -D TIANO_RELEASE_VERSION=0x00080006
> +  DEFINE MSFT_VER_MACRO          = /D EFI_SPECIFICATION_VERSION=0x00020028 /D TIANO_RELEASE_VERSION=0x00080006
> +
> +
> +################################################################################
> +#
> +# SKU Identification section - list of all SKU IDs supported by this
> +#                              Platform.
> +#
> +################################################################################
> +[SkuIds]
> +  0|DEFAULT              # The entry: 0|DEFAULT is reserved and always required.
> +
> +[BuildOptions]
> +  *_*_AARCH64_CC_FLAGS         = -D EFIAARCH64 -I$(WORKSPACE)/MdePkg/Include/AArch64 $(GCC_VER_MACRO)
> +  GCC:*_*_AARCH64_CC_FLAGS     = -D EFIAARCH64 $(GCC_VER_MACRO) -ffreestanding -nostdinc -nostdlib -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error
> +  *_*_AARCH64_VFRPP_FLAGS      = -D EFIAARCH64 $(GCC_VER_MACRO)
> +  *_*_AARCH64_APP_FLAGS        = -D EFIAARCH64 $(GCC_VER_MACRO)
> +  *_*_AARCH64_PP_FLAGS         = -D EFIAARCH64 $(GCC_VER_MACRO)
> +  RVCT:*_*_AARCH64_DLINK_FLAGS = --muldefweak
> +
> +  DEBUG_*_*_CC_FLAGS  = -DEFI_DEBUG
> +  RELEASE_*_*_CC_FLAGS  = -DMDEPKG_NDEBUG
> +
> +[Libraries]
> +  SctPkg/Library/SctLib/SctLib.inf
> +  SctPkg/Library/SctGuidLib/SctGuidLib.inf
> +  SctPkg/Library/EfiTestLib/EfiTestLib.inf
> +
> +  SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/EntsLib.inf
> +
> +  MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
> +
> +[Libraries.ARM]
> +  ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
> +
> +[Libraries.AARCH64]
> +  ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
> +
> +[LibraryClasses.common]
> +  UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
> +  UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
> +  UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
> +  BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
> +  BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
> +  DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
> +  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
> +  MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
> +  UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
> +  UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
> +  HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
> +  PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
> +  UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
> +  DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
> +
> +  SctLib|SctPkg/Library/SctLib/SctLib.inf
> +  NetLib|SctPkg/Library/NetLib/NetLib.inf
> +  EntsLib|SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/EntsLib.inf
> +  EasLib|SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasDispatcher/Eas.inf
> +  EfiTestLib|SctPkg/Library/EfiTestLib/EfiTestLib.inf
> +
> +[LibraryClasses.ARM]
> +  NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
> +
> +[LibraryClasses.AARCH64]
> +  NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
> +
> +###############################################################################
> +#
> +# These are the components that will be built by the master makefile
> +#
> +###############################################################################
> +
> +[Components]
> +
> +#
> +# The default package
> +#
> +DEFINE PACKAGE=Default
> +
> +#
> +# Components
> +#
> +
> +#
> +# Following are the SCT suite & related drivers
> +#
> +
> +SctPkg/TestInfrastructure/SCT/Framework/Sct.inf
> +SctPkg/TestInfrastructure/SCT/Drivers/StandardTest/StandardTest.inf
> +SctPkg/TestInfrastructure/SCT/Drivers/TestProfile/TestProfile.inf
> +SctPkg/TestInfrastructure/SCT/Drivers/TestRecovery/TestRecovery.inf
> +SctPkg/TestInfrastructure/SCT/Drivers/TestLogging/TestLogging.inf
> +
> +#
> +# Related SCT applications
> +#
> +
> +SctPkg/Application/InstallSct/InstallSct.inf
> +SctPkg/Application/StallForKey/StallForKey.inf
> +
> +SctPkg/SCRT/SCRTApp/SCRTApp.inf
> +SctPkg/SCRT/SCRTDriver/SCRTDriver.inf
> +
> +#
> +# Test cases for SBBR SCT
> +#
> +
> +# Boot Services Tests - SBBR v1.0 Appendix A
> +#
> +##  1. EFI_RAISE_TPL
> +##  2. EFI_RESTORE_TPL
> +##  3. EFI_CREATE_EVENT
> +##  4. EFI_SET_TIMER
> +##  5. EFI_WAIT_FOR_EVENT
> +##  6. EFI_SIGNAL_EVENT
> +##  7. EFI_CLOSE_EVENT
> +##  8. EFI_CREATE_EVENT_EX
> +SctPkg/TestCase/UEFI/EFI/BootServices/EventTimerTaskPriorityServices/BlackBoxTest/EventTimerTaskPriorityServicesBBTest_uefi.inf
> +#
> +##  9. EFI_IMAGE_LOAD
> +## 10. EFI_IMAGE_START
> +## 11. EFI_EXIT
> +## 12. EFI_IMAGE_UNLOAD
> +## 13. EFI_EXIT_BOOT_SERVICES
> +SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/ImageBBTest.inf
> +#
> +## 14. EFI_ALLOCATE_PAGES
> +## 15. EFI_FREE_PAGES
> +## 16. EFI_GET_MEMORY_MAP
> +## 17. EFI_ALLOCATE_POOL
> +## 18. EFI_FREE_POOL
> +SctPkg/TestCase/UEFI/EFI/BootServices/MemoryAllocationServices/BlackBoxTest/MemoryAllocationServicesBBTest.inf
> +#
> +## 19. EFI_INSTALL_CONFIGURATION_TABLE
> +## 20. EFI_GET_NEXT_MONOTONIC_COUNT
> +## 21. EFI_STALL
> +## 22. EFI_SET_WATCHDOG_TIMER
> +## 23. EFI_CALCULATE_CRC32
> +## 24. EFI_COPY_MEM
> +## 25. EFI_SET_MEM
> +SctPkg/TestCase/UEFI/EFI/BootServices/MiscBootServices/BlackBoxTest/MiscBootServicesBBTest.inf
> +#
> +## 26. EFI_INSTALL_PROTOCOL_INTERFACE
> +## 27. EFI_REINSTALL_PROTOCOL_INTERFACE
> +## 28. EFI_UNINSTALL_PROTOCOL_INTERFACE
> +## 29. EFI_HANDLE_PROTOCOL
> +## 30. EFI_REGISTER_PROTOCOL_NOTIFY
> +## 31. EFI_LOCATE_HANDLE
> +## 32. EFI_LOCATE_PROTOCOL
> +## 33. EFI_LOCATE_DEVICE_PATH
> +## 34. EFI_CONNECT_CONTROLLER
> +## 35. EFI_DISCONNECT_CONTROLLER
> +## 36. EFI_OPEN_PROTOCOL
> +## 37. EFI_CLOSE_PROTOCOL
> +## 38. EFI_OPEN_PROTOCOL_INFORMATION
> +## 39. EFI_PROTOCOLS_PER_HANDLE
> +## 40. EFI_LOCATE_HANDLE_BUFFER
> +## 41. EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES
> +## 42. EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES
> +SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/ProtocolHandlerBBTest.inf
> +# End of Boot Services Tests - SBBR v1.0 Appendix A
> +
> +#
> +# Dependency files
> +#
> +
> +#
> +# Support Files
> +#
> +SctPkg/TestInfrastructure/SCT/Framework/ENTS/Eftp/Eftp.inf
> +SctPkg/TestInfrastructure/SCT/Framework/ENTS/MonitorServices/SerialMonitor/SerialMonitor.inf
> +SctPkg/TestInfrastructure/SCT/Framework/ENTS/MonitorServices/ManagedNetworkMonitor/ManagedNetworkMonitor.inf
> +SctPkg/TestInfrastructure/SCT/Framework/ENTS/MonitorServices/IP4NetworkMonitor/IP4NetworkMonitor.inf
> -- 
> 2.7.4
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [edk2-test][RFC PATCH 03/12] uefi-sct/SctPkg: sbbr: Add System Environment Configuration Test Cases
  2018-11-06  8:47 ` [edk2-test][RFC PATCH 03/12] uefi-sct/SctPkg: sbbr: Add System Environment Configuration Test Cases Sakar Arora
@ 2018-11-06 17:38   ` Leif Lindholm
  0 siblings, 0 replies; 24+ messages in thread
From: Leif Lindholm @ 2018-11-06 17:38 UTC (permalink / raw)
  To: Sakar Arora; +Cc: edk2-devel, prasanth.pulla, Eric Jin, Supreeth Venkatesh

Hi Sakar,

On Tue, Nov 06, 2018 at 02:17:37PM +0530, Sakar Arora wrote:
> 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(-)

Can you generate patches using the steps outlined in
https://github.com/tianocore/tianocore.github.io/wiki/Laszlo's-unkempt-git-guide-for-edk2-contributors-and-maintainers#contrib-23
?

This has two major benefits to the reviewer (and can reduce the number
of revisions required for a set):
- full paths are displayed, instead of truncated ones (.../)
- interfaces (or changes to) get reviewed before their first use

>  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   =

This diff would be much more clear if GenericTest\SbbrSysEnvConfig was
introduced afer the existing BootServicesTest rather than before.

/
    Leif


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [edk2-test][RFC PATCH 01/12] uefi-sct/SctPkg: sbbr: Add support to build SBBR v1.0 test cases.
  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
  0 siblings, 0 replies; 24+ messages in thread
From: Supreeth Venkatesh @ 2018-11-06 17:39 UTC (permalink / raw)
  To: Leif Lindholm, Sakar Arora
  Cc: edk2-devel@lists.01.org, Prasanth Pulla, Eric Jin

On Tue, 2018-11-06 at 06:45 -0600, Leif Lindholm wrote:
> Hi Sakar,
> 
> Glad to see you guys already contributing to the newly(ish) open SCT.
Indeed.
> 
> I do have some comments on this patch - starting with: please cc the
> maintainers. I have added Eric/Supreeth to this reply.
We (me and Eric) have setup or in the process of setting up email
filters that has a subject line of "edk2-test". So, Its ok, but will be
more convenient if we are copied on CC. 
> 
> On Tue, Nov 06, 2018 at 02:17:35PM +0530, Sakar Arora wrote:
> > Provide a framework for building SBBR Test Cases using the existing
> > UEFI-SCT Framework. Separate out build-scripts/install scripts to
> > carve out SBBR test cases.
> > 
> > To build SBBR SCT,
> > 
> >    ./build_sbbr.sh AARCH64 GCC
> > 
> > Change-Id: I3d7612dbb42a4dc3bce40e4e9b351fd1f5f84dcd
> > Signed-off-by: Sakar Arora <sakar.arora@arm.com>
> > ---
> >  uefi-sct/SctPkg/CommonGenFramework.sh |  33 ++++
> >  uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc     | 205 ++++++++++++++++++++++
> >  uefi-sct/SctPkg/build_sbbr.sh         | 312
> > ++++++++++++++++++++++++++++++++++
> >  3 files changed, 550 insertions(+)
> >  create mode 100644 uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
> >  create mode 100755 uefi-sct/SctPkg/build_sbbr.sh
> > 
> > diff --git a/uefi-sct/SctPkg/CommonGenFramework.sh b/uefi-
> > sct/SctPkg/CommonGenFramework.sh
> > index 299f0d6..4bb68ce 100755
> > --- a/uefi-sct/SctPkg/CommonGenFramework.sh
> > +++ b/uefi-sct/SctPkg/CommonGenFramework.sh
> > @@ -335,4 +335,37 @@ then
> >    CopyDependency Ebc
> >    CopyDependency PxeBaseCode
> >  fi
> > +# *********************************************
> > +# For SBBR v1.0 SCT
> > +# *********************************************
> > +
> > +if [ $1 = "sbbr_sct" ]
> > +then
> > +    # *********************************************
> > +    # Copy the SBBR v1.0 Test Cases
> > +    # *********************************************
> > +
> > +    mkdir -p $Framework/SCRT
> > +    cp
> > $ProcessorType/SCRTDRIVER.efi                           $Framework/
> > SCRT  > NUL
> 
> This "> NUL" comes from someone cargo-culting when translating from a
> Windows .bat file. On any unix-like system, this means you end up
> with
> a file called NUL. (Read through the thread at
> https://twitter.com/Foone/status/1058676834940776450 for a recent
> hilarious twitter rant.)
> 
> So please don't add any new "> NUL" statements.
> I would argue since the unix cp is silent by default, it can be
> dropped completely.
> 
> Someone with some free time on their hands could go through and
> delete
> all of the Windows-isms from the original script.
I agree. Since this is a unix/linux shell script, there is no need for
windows related quirks.
> 
> > +    cp
> > $ProcessorType/SCRTAPP.efi                              $Framework/
> > SCRT  > NUL
> > +    cp
> > ../../../SctPkg/Config/Data/SCRT.conf                   $Framework/
> > SCRT  > NUL
> 
> 1) Is there no way of doing this without ../../..?
> 2) Which SctPkg is this? This file is already in SctPkg, yet this
>    brings us 3 levels of hierarchy up?
> 
> > +
> > +    # *********************************************
> > +    # Copy your test cases here
> > +    # *********************************************
> > +
> >  
> > +    # *********************************************
> > +    # Copy ENTS binary
> > +    # *********************************************
> > +
> > +    cp
> > $ProcessorType/SerialMonitor.efi                $Framework/Ents/Sup
> > port/ > NUL
> > +    cp
> > $ProcessorType/ManagedNetworkMonitor.efi        $Framework/Ents/Sup
> > port/ > NUL
> > +    cp
> > $ProcessorType/IP4NetworkMonitor.efi            $Framework/Ents/Sup
> > port/ > NUL
> > +    cp $ProcessorType/Eftp.efi                         $Framework/
> > Ents/Support/ > NUL
> > +
> > +    # *********************************************
> > +    # Copy the test dependency files
> > +    # *********************************************
> > +
> > +fi
> > diff --git a/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc b/uefi-
> > sct/SctPkg/UEFI/SBBR_SCT.dsc
> > new file mode 100644
> > index 0000000..ff6abd9
> > --- /dev/null
> > +++ b/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
> > @@ -0,0 +1,205 @@
> > +#
> > +# 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) 2010 - 2016, Intel Corporation. All rights
> > reserved.<BR>
> 
> Question for maintainers: is this a license header we want to be
> using
> for new submissions?
No. The new license file is as follows:
/** @file
  Copyright 2006 - 2018 Unified EFI, Inc.<BR>
  Copyright (c) 2018, Arm LTD. 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 
  http://opensource.org/licenses/bsd-license.php
 
  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR
  IMPLIED.
**/
> 
> > +#
> > +#
> > +#/*++
> > +#
> > +# Module Name:
> > +#
> > +#    SBBR_SCT.dsc
> > +#
> > +# Abstract:
> > +#
> > +#   This is a build description file used to build the test
> > modules of SBBR SCT.
> > +#
> > +# Notes:
> > +#
> > +#   The info in this file is broken down into sections. The start
> > of a section
> > +#   is designated by a "[" in the first column. So the [=====]
> > separater ends
> > +#   a section.
> > +#
> > +#--*/
> > +
> > +##################################################################
> > ##############
> > +#
> > +# Defines Section - statements that will be processed to create a
> > Makefile.
> > +#
> > +##################################################################
> > ##############
> > +[Defines]
> > +  PLATFORM_NAME                  = SbbrSct
> > +  PLATFORM_GUID                  = d513138b-9d4a-479c-8058-
> > 4a5160018663
> > +  PLATFORM_VERSION               = 0.1
> > +  DSC_SPECIFICATION              = 0x00010005
> 
> Please bump substantially. I think current version is 0x0001001a,
> but it may have gone further.
I concur. Please look into DSC specification and use the latest
version.
> 
> > +  OUTPUT_DIRECTORY               = Build/SbbrSct
> > +  SUPPORTED_ARCHITECTURES        = AARCH64
> > +  BUILD_TARGETS                  = DEBUG|RELEASE
> 
> Preferably add NOOPT as well for new submissions.
> 
> > +  SKUID_IDENTIFIER               = DEFAULT
> > +
> > +  DEFINE GCC_VER_MACRO           = -D
> > EFI_SPECIFICATION_VERSION=0x00020028 -D
> > TIANO_RELEASE_VERSION=0x00080006
> > +  DEFINE MSFT_VER_MACRO          = /D
> > EFI_SPECIFICATION_VERSION=0x00020028 /D
> > TIANO_RELEASE_VERSION=0x00080006
> > +
> > +
> > +##################################################################
> > ##############
> > +#
> > +# SKU Identification section - list of all SKU IDs supported by
> > this
> > +#                              Platform.
> > +#
> > +##################################################################
> > ##############
> > +[SkuIds]
> > +  0|DEFAULT              # The entry: 0|DEFAULT is reserved and
> > always required.
> > +
> > +[BuildOptions]
> > +  *_*_AARCH64_CC_FLAGS         = -D EFIAARCH64
> > -I$(WORKSPACE)/MdePkg/Include/AArch64 $(GCC_VER_MACRO)
> 
> Why -D EFIAARCH64? If such a filter is truly needed, test against
> already defined MDE_CPU_AARCH64.
> 
> > +  GCC:*_*_AARCH64_CC_FLAGS     = -D EFIAARCH64 $(GCC_VER_MACRO)
> > -ffreestanding -nostdinc -nostdlib -Wno-error=unused-function -Wno-
> > error=unused-but-set-variable -Wno-error
> 
> Why do we need these special flags? -Wno-error particularly looks
> like
> an unfortunate addition, but I don't see why we need the others at
> all.
> 
> > +  *_*_AARCH64_VFRPP_FLAGS      = -D EFIAARCH64 $(GCC_VER_MACRO)
> > +  *_*_AARCH64_APP_FLAGS        = -D EFIAARCH64 $(GCC_VER_MACRO)
> > +  *_*_AARCH64_PP_FLAGS         = -D EFIAARCH64 $(GCC_VER_MACRO)
> > +  RVCT:*_*_AARCH64_DLINK_FLAGS = --muldefweak
> 
> So, this one I can see may be valid, but it deserves a comment as to
> why it is needed.
> 
> > +
> > +  DEBUG_*_*_CC_FLAGS  = -DEFI_DEBUG
> 
> Why is this needed?
> You can test against !MDEPKG_NDEBUG for the DEBUG targets. This is a
> common pattern in edk2.
> 
> > +  RELEASE_*_*_CC_FLAGS  = -DMDEPKG_NDEBUG
> > +
> > +[Libraries]
> > +  SctPkg/Library/SctLib/SctLib.inf
> > +  SctPkg/Library/SctGuidLib/SctGuidLib.inf
> > +  SctPkg/Library/EfiTestLib/EfiTestLib.inf
> > +
> > +  SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/EntsLib.inf
> > +
> > +  MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
> > +
> > +[Libraries.ARM]
> > +  ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
> > +
> 
> SUPPORTED_ARCHITECTURES is set to AARCH64 only, so no need to keep
> this .ARM section.
> 
> > +[Libraries.AARCH64]
> > +  ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
> > +
> > +[LibraryClasses.common]
> > +  UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoi
> > nt/UefiApplicationEntryPoint.inf
> > +  UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDri
> > verEntryPoint.inf
> > +  UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib
> > /UefiBootServicesTableLib.inf
> > +  BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
> > +  BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
> > +  DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
> > +  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
> > +  MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiM
> > emoryAllocationLib.inf
> > +  UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTa
> > bleLib/UefiRuntimeServicesTableLib.inf
> > +  UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiH
> > iiServicesLib.inf
> > +  HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
> > +  PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
> > +  UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
> > +  DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib
> > .inf
> > +
> > +  SctLib|SctPkg/Library/SctLib/SctLib.inf
> > +  NetLib|SctPkg/Library/NetLib/NetLib.inf
> > +  EntsLib|SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/Ents
> > Lib.inf
> > +  EasLib|SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasDispatche
> > r/Eas.inf
> > +  EfiTestLib|SctPkg/Library/EfiTestLib/EfiTestLib.inf
> > +
> > +[LibraryClasses.ARM]
> > +  NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.
> > inf
> 
> Can drop this .ARM section.
> 
> > +
> > +[LibraryClasses.AARCH64]
> > +  NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.
> > inf
> > +
> > +##################################################################
> > #############
> > +#
> > +# These are the components that will be built by the master
> > makefile
> > +#
> > +##################################################################
> > #############
> > +
> > +[Components]
> > +
> > +#
> > +# The default package
> > +#
> > +DEFINE PACKAGE=Default
> > +
> > +#
> > +# Components
> > +#
> > +
> > +#
> > +# Following are the SCT suite & related drivers
> > +#
> > +
> > +SctPkg/TestInfrastructure/SCT/Framework/Sct.inf
> > +SctPkg/TestInfrastructure/SCT/Drivers/StandardTest/StandardTest.in
> > f
> > +SctPkg/TestInfrastructure/SCT/Drivers/TestProfile/TestProfile.inf
> > +SctPkg/TestInfrastructure/SCT/Drivers/TestRecovery/TestRecovery.in
> > f
> > +SctPkg/TestInfrastructure/SCT/Drivers/TestLogging/TestLogging.inf
> > +
> > +#
> > +# Related SCT applications
> > +#
> > +
> > +SctPkg/Application/InstallSct/InstallSct.inf
> > +SctPkg/Application/StallForKey/StallForKey.inf
> > +
> > +SctPkg/SCRT/SCRTApp/SCRTApp.inf
> > +SctPkg/SCRT/SCRTDriver/SCRTDriver.inf
> > +
> > +#
> > +# Test cases for SBBR SCT
> > +#
> > +
> > +# Add Your test cases here:
> > +
> > +# Runtime Services Tests
> > +#SctPkg/TestCase/UEFI/EFI/RuntimeServices/MiscRuntimeServices/Blac
> > kBoxTest/MiscRuntimeServicesBBTest.inf
> > +#SctPkg/TestCase/UEFI/EFI/RuntimeServices/TimeServices/BlackBoxTes
> > t/TimeServicesBBTest.inf
> > +#SctPkg/TestCase/UEFI/EFI/RuntimeServices/VariableServices/BlackBo
> > xTest/VariableServicesBBTest.inf
> > +
> > +#
> > +# Dependency files
> > +#
> > +
> > +#
> > +# Support Files
> > +#
> > +SctPkg/TestInfrastructure/SCT/Framework/ENTS/Eftp/Eftp.inf
> > +SctPkg/TestInfrastructure/SCT/Framework/ENTS/MonitorServices/Seria
> > lMonitor/SerialMonitor.inf
> > +SctPkg/TestInfrastructure/SCT/Framework/ENTS/MonitorServices/Manag
> > edNetworkMonitor/ManagedNetworkMonitor.inf
> > +SctPkg/TestInfrastructure/SCT/Framework/ENTS/MonitorServices/IP4Ne
> > tworkMonitor/IP4NetworkMonitor.inf
> > +
> > diff --git a/uefi-sct/SctPkg/build_sbbr.sh b/uefi-
> > sct/SctPkg/build_sbbr.sh
> > new file mode 100755
> > index 0000000..6956e9b
> > --- /dev/null
> > +++ b/uefi-sct/SctPkg/build_sbbr.sh
> 
> Do we need to completely duplicate build.sh?
> Since most of the functionality is identical, can we not add a flag
> to
> build.sh, or make this a thin wrapper script instead?
> 
> /
>     Leif
> 
> > @@ -0,0 +1,312 @@
> > +#!/bin/bash
> > +# 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 - 2015 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) 2011, 2015 ARM Ltd. All rights reserved.<BR>
> > +#
> > +
> > +SctpackageDependencyList=(EdkCompatibilityPkg SctPkg BaseTools)
> > +
> > +function get_build_arch
> > +{
> > +	case `uname -m` in
> > +	    aarch64*)
> > +	        BUILD_ARCH=AARCH64;;
> > +	    *)
> > +	        BUILD_ARCH=other;;
> > +	esac
> > +}
> > +
> > +function set_cross_compile
> > +{
> > +	get_build_arch
> > +
> > +	echo "Target: $SCT_TARGET_ARCH"
> > +	echo "Build: $BUILD_ARCH"
> > +	if [ "$SCT_TARGET_ARCH" = "$BUILD_ARCH" ]; then
> > +	    TEMP_CROSS_COMPILE=
> > +	elif [ "$SCT_TARGET_ARCH" == "AARCH64" ]; then
> > +	    if [ X"$CROSS_COMPILE_64" != X"" ]; then
> > +	        TEMP_CROSS_COMPILE="$CROSS_COMPILE_64"
> > +	    else
> > +	        TEMP_CROSS_COMPILE=aarch64-linux-gnu-
> > +	    fi
> > +	else
> > +	    echo "Unsupported target architecture '$SCT_TARGET_ARCH'!"
> > >&2
> > +	fi
> > +}
> > +
> > +function get_gcc_version
> > +{
> > +	gcc_version=$($1 -dumpversion)
> > +	case $gcc_version in
> > +		4.6*|4.7*|4.8*|4.9*)
> > +			echo GCC$(echo ${gcc_version} | awk -F. '{print
> > $1$2}')
> > +			;;
> > +		*)
> > +			echo "Unknown toolchain version '$gcc_version'"
> > >&2
> > +			echo "Attempting to build using GCC49 profile."
> > >&2
> > +			echo GCC49
> > +			;;
> > +	esac
> > +}
> > +
> > +function get_clang_version
> > +{
> > +	clang_version=`$1 --version | head -1 | sed
> > 's/^.*version\s*\([0-9]*\).\([0-9]*\).*/\1\2/g'`
> > +	echo "CLANG$clang_version"
> > +}
> > +
> > +
> > +GetBaseToolsBinSubDir() {
> > +	#
> > +	# Figure out a uniq directory name from the uname command
> > +	#
> > +	UNAME_DIRNAME=`uname -sm`
> > +	UNAME_DIRNAME=${UNAME_DIRNAME// /-}
> > +	UNAME_DIRNAME=${UNAME_DIRNAME//\//-}
> > +	echo $UNAME_DIRNAME
> > +}
> > +
> > +GetEdkToolsPathBinDirectory() {
> > +	#
> > +	# Figure out a uniq directory name from the uname
> > +	# command
> > +	#
> > +	BIN_SUB_DIR=`GetBaseToolsBinSubDir`
> > +
> > +	if [ -e	$EDK_TOOLS_PATH/BinWrappers/$BIN_SUB_DIR ]
> > +	then
> > +		EDK_TOOLS_PATH_BIN=$EDK_TOOLS_PATH/BinWrappers/$BIN_SUB
> > _DIR
> > +	else
> > +		EDK_TOOLS_PATH_BIN=$EDK_TOOLS_PATH/BinWrappers/PosixLik
> > e
> > +	fi
> > +        echo $EDK_TOOLS_PATH_BIN
> > +}
> > +
> > +PrintUsage() {
> > +	#
> > +	#Print Help
> > +	#
> > +	echo "Usage:"
> > +	echo "    $0 <architecture (ARM, AARCH64, X64, etc)> \
> > +<toolchain name (RVCT or ARMGCC or GCC*)> \
> > +[build type (RELEASE OR DEBUG, DEFAULT: DEBUG)]"
> > +}
> > +
> > +#Iterate through the SCT package dependency list and check if they
> > exist in the current directory
> > +for pkg in ${names[@]}
> > +do
> > +    if [ ! -d `pwd`/$name]
> > +    then
> > +    echo "Couldn't build SCT:"
> > +    echo The directory `pwd`/$name does not exist.
> > +    exit -1
> > +    fi
> > +done
> > +
> > +export EFI_SOURCE=`pwd`
> > +export EDK_SOURCE=`pwd`/EdkCompatibilityPkg
> > +
> > +# check if the last command was successful
> > +status=$?
> > +if test $status -ne 0; then
> > +	echo Could not Run the edksetup.sh script
> > +	exit -1
> > +fi
> > +
> > +SCT_TARGET_ARCH=${1}
> > +
> > +#
> > +# Pick a default tool type for a given OS
> > +#
> > +case `uname` in
> > +   Linux*)
> > +	case ${2} in
> > +		RVCT | rvct)
> > +			TARGET_TOOLS=RVCTLINUX
> > +		;;
> > +
> > +		ARMGCC | armgcc)
> > +			TARGET_TOOLS=ARMGCC
> > +		;;
> > +
> > +		GCC | gcc)
> > +            set_cross_compile
> > +	        CROSS_COMPILE="$TEMP_CROSS_COMPILE"
> > +            export TARGET_TOOLS=`get_gcc_version
> > "$CROSS_COMPILE"gcc`
> > +
> > +		;;
> > +
> > +		*)
> > +			echo "Couldn't build SBBR SCT:"
> > +			PrintUsage
> > +			exit -1
> > +		;;
> > +	esac
> > +   ;;
> > +   CYGWIN*)
> > +	case ${2} in
> > +		RVCT | rvct)
> > +			TARGET_TOOLS=RVCT31CYGWIN
> > +		;;
> > +
> > +		ARMGCC | armgcc)
> > +			TARGET_TOOLS=ARMGCCCYGWIN
> > +		;;
> > +
> > +		*)
> > +			echo "Couldn't build SBBR SCT:"
> > +			PrintUsage
> > +			exit -1
> > +		;;
> > +	esac
> > +   ;;
> > +   *)
> > +     echo "Couldn't build SBBR SCT:"
> > +     echo "Unknown OS, Use this script either in Unix or Cygwin
> > environment".
> > +     PrintUsage
> > +     exit -1
> > +   ;;
> > +esac
> > +
> > +echo "TOOLCHAIN is ${TARGET_TOOLS}"
> > +export ${TARGET_TOOLS}_${SCT_TARGET_ARCH}_PREFIX=$CROSS_COMPILE
> > +echo "Toolchain prefix:
> > ${TARGET_TOOLS}_${SCT_TARGET_ARCH}_PREFIX=$CROSS_COMPILE"
> > +
> > +SCT_BUILD=DEBUG
> > +if [ "$3" = "RELEASE" -o "$3" = "DEBUG" ]; then
> > +  SCT_BUILD=$3
> > +  shift
> > +fi
> > +
> > +#
> > +# Setup workspace if it is not set
> > +#
> > +if [ -z "${WORKSPACE:-}" ]; then
> > +	echo Initializing workspace
> > +	# Uses an external BaseTools project
> > +	# Uses the BaseTools in edk2
> > +	export EDK_TOOLS_PATH=`pwd`/BaseTools
> > +	# We do not pass BuildArmSct.sh arguments to edksetup.sh
> > +	while (( "$#" )); do
> > +		shift
> > +	done
> > +	source ./edksetup.sh
> > +else
> > +	echo Building from: $WORKSPACE
> > +fi
> > +
> > +if  [[ ! -e $EDK_TOOLS_PATH/Source/C/bin ]]
> > +then
> > +  # build the tools if they don't yet exist
> > +  echo Building tools: $EDK_TOOLS_PATH
> > +  make -C $EDK_TOOLS_PATH
> > +  status=$?
> > +  if test $status -ne 0
> > +  then
> > +  echo Error while building EDK tools
> > +    exit -1
> > +  fi
> > +else
> > +  echo using prebuilt tools
> > +fi
> > +
> > +# Copy GenBin file to Base tools directory
> > +DEST_DIR=`GetEdkToolsPathBinDirectory`
> > +# Ensure the directory exist
> > +mkdir -p $DEST_DIR
> > +case `uname -m` in
> > +	x86_64)
> > +		cp SctPkg/Tools/Bin/GenBin_lin_64 $DEST_DIR/GenBin
> > +		;;
> > +	x86_32)
> > +		cp SctPkg/Tools/Bin/GenBin_lin_32 $DEST_DIR/GenBin
> > +		;;
> > +	*)
> > +		cp SctPkg/Tools/Bin/GenBin_lin_32 $DEST_DIR/GenBin
> > +		;;
> > +esac
> > +
> > +#
> > +# Build the SCT package
> > +#
> > +build -p SctPkg/UEFI/SBBR_SCT.dsc -a $SCT_TARGET_ARCH -t
> > $TARGET_TOOLS -b $SCT_BUILD $3 $4 $5 $6 $7 $8 $9
> > +
> > +# Check if there is any error
> > +status=$?
> > +if test $status -ne 0
> > +then
> > +echo Could not build the SBBR SCT package
> > +        exit -1
> > +fi
> > +
> > +#
> > +# If the argument is clean, then don't have to generate Sct
> > binary.
> > +#
> > +for arg in "$@"
> > +do
> > +  if [ $arg == clean ] || [ $arg == cleanall ]
> > +  then
> > +      # no need to post process if we are doing a clean
> > +      exit 1
> > +  fi
> > +done
> > +
> > +#
> > +# Change directory to Build directory
> > +#
> > +cd Build/SbbrSct/${SCT_BUILD}_${TARGET_TOOLS}
> > +pwd
> > +
> > +#
> > +# Run a script to generate Sct binary for the target architecture
> > +#
> > +../../../SctPkg/CommonGenFramework.sh sbbr_sct $SCT_TARGET_ARCH
> > Install$SCT_TARGET_ARCH.efi
> > +
> > +status=$?
> > +if test $status -ne 0
> > +then
> > +echo Could not generate SBBR SCT binary
> > +     exit -1
> > +else
> > +echo The SBBR SCT binary "SctPackage${SCT_TARGET_ARCH}" is located
> > at "$EFI_SOURCE/Build/SbbrSct/${SCT_BUILD}_${TARGET_TOOLS}"
> > +fi
> > -- 
> > 2.7.4
> > 
> > _______________________________________________
> > edk2-devel mailing list
> > edk2-devel@lists.01.org
> > https://lists.01.org/mailman/listinfo/edk2-devel



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [edk2-test][RFC PATCH 04/12] uefi-sct/SctPkg: sbbr: Add Required UEFI Runtime Services tests.
  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
  0 siblings, 0 replies; 24+ messages in thread
From: Leif Lindholm @ 2018-11-06 17:40 UTC (permalink / raw)
  To: Sakar Arora; +Cc: edk2-devel, prasanth.pulla, Eric Jin, Supreeth Venkatesh

On Tue, Nov 06, 2018 at 02:17:38PM +0530, Sakar Arora wrote:
> Required UEFI Runtime Services Tests - SBBR v1.0 Appendix B
> 1. EFI_GET_TIME
> 2. EFI_SET_TIME
> 3. EFI_GET_WAKEUP_TIME
> 4. EFI_SET_WAKEUP_TIME
> 5. EFI_GET_VARIABLE
> 6. EFI_GET_NEXT_VARIABLE_NAME
> 7. EFI_SET_VARIABLE
> 8. EFI_QUERY_VARIABLE_INFO
> 9. EFI_QUERY_CAPSULE_CAPABILITIES
> 10. EFI_UPDATE_CAPSULE
> 11. EFI_RESET_SYSTEM
> 12. EFI_SET_VIRTUAL_ADDRESS_MAP
> 13. EFI_CONVERT_POINTER
> 
> Signed-off-by: Sakar Arora <sakar.arora@arm.com>
> ---
>  uefi-sct/SctPkg/CommonGenFramework.sh              |   6 +
>  uefi-sct/SctPkg/Config/Data/Category.ini           |  11 +-
>  .../SBBRRuntimeServices/BlackBoxTest/Guid.c        |  61 ++++++
>  .../SBBRRuntimeServices/BlackBoxTest/Guid.h        |  65 ++++++
>  .../BlackBoxTest/SBBRRuntimeServicesBBTest.inf     |  81 ++++++++
>  .../SBBRRuntimeServicesBBTestFunction.c            | 218 +++++++++++++++++++++
>  .../SBBRRuntimeServicesBBTestFunction.h            |  71 +++++++
>  .../BlackBoxTest/SBBRRuntimeServicesBBTestMain.c   | 131 +++++++++++++
>  .../BlackBoxTest/SBBRRuntimeServicesBBTestMain.h   |  86 ++++++++
>  uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc                  |  24 +++
>  10 files changed, 752 insertions(+), 2 deletions(-)
>  create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/Guid.c
>  create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/Guid.h
>  create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTest.inf
>  create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTestFunction.c
>  create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTestFunction.h
>  create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTestMain.c
>  create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRuntimeServicesBBTestMain.h
> 
> diff --git a/uefi-sct/SctPkg/CommonGenFramework.sh b/uefi-sct/SctPkg/CommonGenFramework.sh
> index c9b6ca9..bf94d8e 100755
> --- a/uefi-sct/SctPkg/CommonGenFramework.sh
> +++ b/uefi-sct/SctPkg/CommonGenFramework.sh
> @@ -364,6 +364,12 @@ then
>      # Tests SBBR sections 3.3.1, 3.3.2, 3.3.3, and 3.3.4
>      cp $ProcessorType/SysEnvConfigBBTest.efi                            $Framework/Test/ > NUL
>  
> +    # Runtime Services Tests - SBBR v1.0 Appendix B
> +    cp $ProcessorType/VariableServicesBBTest.efi               $Framework/Test/ > NUL
> +    cp $ProcessorType/TimeServicesBBTest.efi                   $Framework/Test/ > NUL
> +    cp $ProcessorType/MiscRuntimeServicesBBTest.efi            $Framework/Test/ > NUL
> +    cp $ProcessorType/SBBRRuntimeServicesBBTest.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 9a81c1d..a41cd0f 100644
> --- a/uefi-sct/SctPkg/Config/Data/Category.ini
> +++ b/uefi-sct/SctPkg/Config/Data/Category.ini
> @@ -173,8 +173,15 @@ Description   =
>  
>  [Category Data]
>  Revision      = 0x00010000
> -CategoryGuid  = 5B1B31A1-9562-11D2-8E3F-00A0C969723B
> -InterfaceGuid = 5B1B31A1-9562-11D2-8E3F-00A0C969723B
> +CategoryGuid  = 52A69BBF-E19F-4e82-93D6-AAC46E2E1E06
> +InterfaceGuid = AFF115FB-387B-4c18-8C41-6AFC7F03BB90
> +Name          = RuntimeServicesTest\SBBRRuntimeServicesTest
> +Description   =
> +
> +[Category Data]
> +Revision      = 0x00010000
> +CategoryGuid  = 5B1B31A1-9562-11d2-8E3F-00A0C969723B
> +InterfaceGuid = 5B1B31A1-9562-11d2-8E3F-00A0C969723B
>  Name          = LoadedImageProtocolTest
>  Description   =

Again, the actual change would be much more clear if
RuntimeServicesTest\SBBRRuntimeServicesTest was added after
LoadedImageProtocolTest.

/
    Leif


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [edk2-test][RFC PATCH 07/12] uefi-sct/SctPkg: sbbr: Add test cases for SBBR v1.0 boot services
  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
  0 siblings, 1 reply; 24+ messages in thread
From: Leif Lindholm @ 2018-11-06 17:46 UTC (permalink / raw)
  To: Sakar Arora; +Cc: edk2-devel, prasanth.pulla, Eric Jin, Supreeth Venkatesh

On Tue, Nov 06, 2018 at 02:17:41PM +0530, Sakar Arora wrote:
> From: John Powell <john.powell@arm.com>
> 
> Tests SBBR requirements 3.4.1 and 3.4.4.
> 
> Change-Id: I0dd625851db65d04d2a7572a2d6838951c8f7c67
> Signed-off-by: John Powell <john.powell@arm.com>
> ---
>  uefi-sct/SctPkg/CommonGenFramework.sh              |   3 +
>  uefi-sct/SctPkg/Config/Data/Category.ini           |  11 +-
>  .../SbbrBootServices/BlackBoxTest/Guid.c           |  65 +++
>  .../SbbrBootServices/BlackBoxTest/Guid.h           |  76 +++
>  .../BlackBoxTest/SbbrBootServicesBBTest.inf        |  85 ++++
>  .../BlackBoxTest/SbbrBootServicesBBTestFunction.c  | 549 +++++++++++++++++++++
>  .../BlackBoxTest/SbbrBootServicesBBTestFunction.h  |  85 ++++
>  .../BlackBoxTest/SbbrBootServicesBBTestMain.c      | 149 ++++++
>  .../BlackBoxTest/SbbrBootServicesBBTestMain.h      |  99 ++++
>  uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc                  |   7 +
>  10 files changed, 1127 insertions(+), 2 deletions(-)
>  create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/Guid.c
>  create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/Guid.h
>  create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/SbbrBootServicesBBTest.inf
>  create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/SbbrBootServicesBBTestFunction.c
>  create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/SbbrBootServicesBBTestFunction.h
>  create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/SbbrBootServicesBBTestMain.c
>  create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/SbbrBootServicesBBTestMain.h
> 
> diff --git a/uefi-sct/SctPkg/CommonGenFramework.sh b/uefi-sct/SctPkg/CommonGenFramework.sh
> index aecd21b..ab35c5a 100755
> --- a/uefi-sct/SctPkg/CommonGenFramework.sh
> +++ b/uefi-sct/SctPkg/CommonGenFramework.sh
> @@ -364,6 +364,9 @@ then
>      # Tests SBBR sections 3.3.1, 3.3.2, 3.3.3, and 3.3.4
>      cp $ProcessorType/SysEnvConfigBBTest.efi                   $Framework/Test/ > NUL
>  
> +    # UEFI Boot Services - SBBR v1.0 3.4
> +    cp $ProcessorType/SbbrBootServicesBBTest.efi               $Framework/Test/ > NUL
> +
>      # Runtime Services Tests - SBBR v1.0 Appendix B
>      cp $ProcessorType/VariableServicesBBTest.efi               $Framework/Test/ > NUL
>      cp $ProcessorType/TimeServicesBBTest.efi                   $Framework/Test/ > NUL
> diff --git a/uefi-sct/SctPkg/Config/Data/Category.ini b/uefi-sct/SctPkg/Config/Data/Category.ini
> index 9576971..17ca639 100644
> --- a/uefi-sct/SctPkg/Config/Data/Category.ini
> +++ b/uefi-sct/SctPkg/Config/Data/Category.ini
> @@ -145,8 +145,15 @@ Description   =
>  
>  [Category Data]
>  Revision      = 0x00010000
> -CategoryGuid  = AFF115FB-387B-4C18-8C41-6AFC7F03BB90
> -InterfaceGuid = AFF115FB-387B-4C18-8C41-6AFC7F03BB90
> +CategoryGuid  = 8dafd7a7-44d0-4cf4-9d28-9f87080fc091
> +InterfaceGuid = E9EF7553-F833-4E56-96E8-38AE679523CC
> +Name          = BootServicesTest\SbbrBootServices
> +Description   = Tests SBBR boot services requirements.
> +
> +[Category Data]
> +Revision      = 0x00010000
> +CategoryGuid  = AFF115FB-387B-4c18-8C41-6AFC7F03BB90
> +InterfaceGuid = AFF115FB-387B-4c18-8C41-6AFC7F03BB90
>  Name          = RuntimeServicesTest
>  Description   =

Diff would be more clear if added test was added after existing test.

/
    Leif


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [edk2-test][RFC PATCH 08/12] uefi-sct/SctPkg: sbbr: UEFI Version Verification Test
  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
  0 siblings, 0 replies; 24+ messages in thread
From: Leif Lindholm @ 2018-11-06 17:48 UTC (permalink / raw)
  To: Sakar Arora; +Cc: edk2-devel, prasanth.pulla, Eric Jin, Supreeth Venkatesh

On Tue, Nov 06, 2018 at 02:17:42PM +0530, Sakar Arora wrote:
> From: Randy Jones <randy.jones@arm.com>
> 
> Check if EFI Specification Version is 2.5 or greater.
> 
> Change-Id: I7a602e52ac833f18dc791ca992f55e1f1996bc60
> Signed-off-by: Randy Jones <randy.jones@arm.com>
> ---
>  uefi-sct/SctPkg/CommonGenFramework.sh              |   3 +
>  .../BlackBoxTest/EfiSpecVerLvlBBTest.inf           |  84 +++++
>  .../BlackBoxTest/EfiSpecVerLvlBBTestFunction.c     | 130 +++++++
>  .../BlackBoxTest/EfiSpecVerLvlBBTestFunction.h     |  71 ++++
>  .../BlackBoxTest/EfiSpecVerLvlBBTestMain.c         | 127 +++++++
>  .../BlackBoxTest/EfiSpecVerLvlBBTestMain.h         |  84 +++++
>  .../Generic/SbbrEfiSpecVerLvl/BlackBoxTest/Guid.c  |  61 ++++
>  .../Generic/SbbrEfiSpecVerLvl/BlackBoxTest/Guid.h  |  66 ++++
>  uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc                  | 402 +++++++++++----------
>  9 files changed, 829 insertions(+), 199 deletions(-)
>  create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTest.inf
>  create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTestFunction.c
>  create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTestFunction.h
>  create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTestMain.c
>  create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTestMain.h
>  create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/Guid.c
>  create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/Guid.h
> 
> diff --git a/uefi-sct/SctPkg/CommonGenFramework.sh b/uefi-sct/SctPkg/CommonGenFramework.sh
> index ab35c5a..7058111 100755
> --- a/uefi-sct/SctPkg/CommonGenFramework.sh
> +++ b/uefi-sct/SctPkg/CommonGenFramework.sh
> @@ -367,6 +367,9 @@ then
>      # UEFI Boot Services - SBBR v1.0 3.4
>      cp $ProcessorType/SbbrBootServicesBBTest.efi               $Framework/Test/ > NUL
>  
> +    # Check if EFI Specification Version is 2.5 or greater
> +    cp $ProcessorType/EfiSpecVerLvlBBTest.efi                  $Framework/Test/ > NUL
> +
>      # Runtime Services Tests - SBBR v1.0 Appendix B
>      cp $ProcessorType/VariableServicesBBTest.efi               $Framework/Test/ > NUL
>      cp $ProcessorType/TimeServicesBBTest.efi                   $Framework/Test/ > NUL
> diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTest.inf b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTest.inf
> new file mode 100644
> index 0000000..daa4d44
> --- /dev/null
> +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTest.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 Ltd. All rights reserved.<BR>
> +#
> +#
> +#/*++
> +#
> +# Module Name:
> +#
> +#   EfiSpecVerLvlBBTest.inf
> +#
> +# Abstract:
> +#
> +#   Component description file for SBBR EFI Specification Version Level test.
> +#
> +#--*/
> +
> +[Defines]
> +  INF_VERSION          = 0x00010019
> +  BASE_NAME            = EfiSpecVerLvlBBTest
> +  FILE_GUID            = f865a18a-9b47-420d-97ae-676d8016a513
> +  MODULE_TYPE          = UEFI_DRIVER
> +  VERSION_STRING       = 1.0
> +  ENTRY_POINT          = InitializeBBTestEfiSpecVerLvl
> +
> +[Sources.common]
> +  EfiSpecVerLvlBBTestFunction.c
> +  EfiSpecVerLvlBBTestMain.c
> +  Guid.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/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTestFunction.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTestFunction.c
> new file mode 100644
> index 0000000..3985b4a
> --- /dev/null
> +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTestFunction.c
> @@ -0,0 +1,130 @@
> +/*++
> +  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 Ltd. All rights reserved.<BR>
> +
> +--*/
> +/*++
> +
> +Module Name:
> +
> +  EfiSpecVerLvlBBTestFunction.c
> +
> +Abstract:
> +
> +  Test case definitions for EfiSpecVerLvl test.
> +
> +--*/
> +
> +#include <Library/ArmLib.h>
> +
> +#include "EfiSpecVerLvlBBTestMain.h"
> +#include "Guid.h"
> +#include "SctLib.h"
> +#include "EfiSpecVerLvlBBTestFunction.h"
> +
> +/** Entrypoint for EFI Specification Version 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
> +BBTestEfiSpecVerLvlTest (
> +  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;
> +  UINTN                                 CurHrRev;
> +
> +  // Get the Standard Library Interface
> +  Status = gtBS->HandleProtocol (
> +              SupportHandle,
> +              &gEfiStandardTestLibraryGuid,
> +              (VOID **) &StandardLib
> +              );
> +  if (EFI_ERROR (Status)) {
> +    return Status;
> +  }
> +
> +  CurHrRev = gtBS->Hdr.Revision; // Reading revision of the EFI Specification.
> +
> +  // Check if EFI Specification version is less than 2.5
> +  if (gtBS->Hdr.Revision < EFI_2_50_SYSTEM_TABLE_REVISION){
> +    StandardLib->RecordAssertion (
> +                StandardLib,
> +                EFI_TEST_ASSERTION_FAILED,
> +                gTestGenericFailureGuid,
> +                L"EFI Specification Version is below 2.5",
> +                L"%a:%d:Current EFI Header Rev=0x%X",
> +                __FILE__,
> +                __LINE__,
> +                CurHrRev
> +                );
> +    return EFI_INCOMPATIBLE_VERSION;
> +  } else {
> +    StandardLib->RecordAssertion (
> +                StandardLib,
> +                EFI_TEST_ASSERTION_PASSED,
> +                gEfiSpecVerLvlAssertion01Guid,
> +                L"TestEfiSpecVerLvl",
> +                L"%a:%d:Current EFI Header Rev=0x%X",
> +                __FILE__,
> +                __LINE__,
> +                CurHrRev
> +                );
> +
> +    return EFI_SUCCESS;
> +  }
> +}
> diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTestFunction.h b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTestFunction.h
> new file mode 100644
> index 0000000..0ea7aa7
> --- /dev/null
> +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTestFunction.h
> @@ -0,0 +1,71 @@
> +/*++
> +  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 Ltd. All rights reserved.<BR>
> +
> +--*/
> +/*++
> +
> +Module Name:
> +
> +  EfiSpecVerLvlBBTestFunction.h
> +
> +Abstract:
> +
> +  Contains definitions and prototypes used in the test functions.
> +
> +--*/
> +
> +#ifndef _EFISPECVERLVL_BB_TEST_FUNCTION_H_
> +#define _EFISPECVERLVL_BB_TEST_FUNCTION_H_
> +
> +#include <Library/EfiTestLib.h>
> +
> +EFI_STATUS
> +BBTestEfiSpecVerLvlTest (
> +  IN EFI_BB_TEST_PROTOCOL       *This,
> +  IN VOID                       *ClientInterface,
> +  IN EFI_TEST_LEVEL             TestLevel,
> +  IN EFI_HANDLE                 SupportHandle
> +  );
> +
> +#endif /* _EFISPECVERLVL_BB_TEST_FUNCTION_H_ */
> diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTestMain.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTestMain.c
> new file mode 100644
> index 0000000..754644c
> --- /dev/null
> +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTestMain.c
> @@ -0,0 +1,127 @@
> +/*++
> +  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 Ltd. All rights reserved.<BR>
> +
> +--*/
> +/*++
> +
> +Module Name:
> +
> +  EfiSpecVerLvlBBTestMain.c
> +
> +Abstract:
> +
> +  Test driver for SBBR system environment configuration tests.
> +
> +--*/
> +
> +#include "SctLib.h"
> +#include "EfiSpecVerLvlBBTestFunction.h"
> +#include "EfiSpecVerLvlBBTestMain.h"
> +
> +EFI_BB_TEST_PROTOCOL_FIELD gBBTestProtocolField = {
> +  EFISPECVERLVL_TEST_REVISION,
> +  EFISPECVERLVL_TEST_GUID,
> +  L"SBBR UEFI Specification Version Level Test",
> +  L"Check the UEFI Specification Version Level to make sure it conforms to ARM SBBR."
> +};
> +
> +EFI_GUID gSupportProtocolGuid[2] = {
> +  EFI_STANDARD_TEST_LIBRARY_GUID,
> +  EFI_NULL_GUID
> +};
> +
> +EFI_BB_TEST_ENTRY_FIELD gBBTestEntryField[] = {
> +  {
> +    EFISPECVERLVL_GUID,
> +    L"TestEfiSpecVerLvl",
> +    L"Check the EFI Specification Version Level.",
> +    EFI_TEST_LEVEL_DEFAULT,
> +    gSupportProtocolGuid,
> +    EFI_TEST_CASE_AUTO,
> +    BBTestEfiSpecVerLvlTest
> +  },
> +  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
> +BBTestEfiSpecVerLvlUnload (
> +  IN EFI_HANDLE       ImageHandle
> +  )
> +{
> +  return EfiUninstallAndFreeBBTestInterface (
> +           ImageHandle,
> +           gBBTestProtocolInterface
> +           );
> +}
> +
> +/** Creates/installs the BlackBox Interface and emanating 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
> +InitializeBBTestEfiSpecVerLvl (
> +  IN EFI_HANDLE           ImageHandle,
> +  IN EFI_SYSTEM_TABLE     *SystemTable
> +  )
> +{
> +
> +  EfiInitializeTestLib (ImageHandle, SystemTable);
> +
> +  return EfiInitAndInstallBBTestInterface (
> +           &ImageHandle,
> +           &gBBTestProtocolField,
> +           gBBTestEntryField,
> +           BBTestEfiSpecVerLvlUnload,
> +           &gBBTestProtocolInterface
> +           );
> +}
> diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTestMain.h b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTestMain.h
> new file mode 100644
> index 0000000..49fd7bb
> --- /dev/null
> +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTestMain.h
> @@ -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 Ltd. All rights reserved.<BR>
> +
> +--*/
> +/*++
> +
> +Module Name:
> +
> +  EfiSpecVerLvlBBTestMain.h
> +
> +Abstract:
> +
> +  Contains definitions for test information and test GUIDs.
> +
> +--*/
> +
> +#ifndef _EFISPECVERLVL_TEST_MAIN_H_
> +#define _EFISPECVERLVL_TEST_MAIN_H_
> +
> +#include "Efi.h"
> +#include <Library/EfiTestLib.h>
> +
> +
> +#define EFISPECVERLVL_TEST_REVISION 0x00010000
> +
> +#define EFISPECVERLVL_TEST_GUID     \
> +  {0xd6e40d12, 0x7a51, 0x4454, {0xb4, 0xfd, 0x4c, 0x93, 0x88, 0x7e, 0xd6, 0xcf}}
> +
> +EFI_STATUS
> +InitializeBBTestEfiSpecVerLvl (
> +  IN EFI_HANDLE           ImageHandle,
> +  IN EFI_SYSTEM_TABLE     *SystemTable
> +  );
> +
> +//
> +// Entry GUIDs
> +//
> +
> +#define EFISPECVERLVL_GUID \
> +  {0x6e46b2e2, 0x2535, 0x4c8e, {0x82, 0x5a, 0x84, 0x5d, 0xc2, 0xbe, 0xed, 0xdf}}
> +
> +
> +#endif /* _EFISPECVERLVL_TEST_MAIN_H_ */
> diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/Guid.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/Guid.c
> new file mode 100644
> index 0000000..52c6d90
> --- /dev/null
> +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/Guid.c
> @@ -0,0 +1,61 @@
> +/*++
> +  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 Ltd. All rights reserved.<BR>
> +
> +--*/
> +/*++
> +
> +Module Name:
> +
> +  Guid.c
> +
> +Abstract:
> +
> +  GUID assignments for test progress assertions.
> +
> +--*/
> +
> +#include "Efi.h"
> +#include "Guid.h"
> +
> +EFI_GUID gEfiSpecVerLvlAssertion01Guid = EFISPECVERLVL_ASSERTION_001_GUID;
> diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/Guid.h b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/Guid.h
> new file mode 100644
> index 0000000..b554961
> --- /dev/null
> +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/Guid.h
> @@ -0,0 +1,66 @@
> +/*++
> +  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 Ltd. All rights reserved.<BR>
> +
> +--*/
> +/*++
> +
> +Module Name:
> +
> +  Guid.h
> +
> +Abstract:
> +
> +  Definitions of GUIDs used for test progress assertions.
> +
> +--*/
> +
> +#ifndef _EFISPECVERSION_GUID_H_
> +#define _EFISPECVERSION_GUID_H_
> +
> +#define EFISPECVERLVL_ASSERTION_001_GUID \
> +{0x14932290, 0x563b, 0x4d20, {0x95, 0xa7, 0xee, 0xc0, 0x2d, 0xbb, 0x1b, 0x13}}
> +
> +extern EFI_GUID gEfiSpecVerLvlAssertion01Guid;
> +
> +#endif /* _EFISPECVERSION_GUID_H_ */
> diff --git a/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc b/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
> index d3fafb6..931b8da 100644
> --- a/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
> +++ b/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc

This patch causes tons of unrelated whitespace changes to a file
introduced by this set. Please rework, I can't tell if there are any
functional changes to this file.

/
    Leif

> @@ -1,190 +1,192 @@
> -#
> -# 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) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
> -#
> -#
> -#/*++
> -#
> -# Module Name:
> -#
> -#    SBBR_SCT.dsc
> -#
> -# Abstract:
> -#
> -#   This is a build description file used to build the test modules of SBBR SCT.
> -#
> -# Notes:
> -#
> -#   The info in this file is broken down into sections. The start of a section
> -#   is designated by a "[" in the first column. So the [=====] separater ends
> -#   a section.
> -#
> -#--*/
> -
> -################################################################################
> -#
> -# Defines Section - statements that will be processed to create a Makefile.
> -#
> -################################################################################
> -[Defines]
> -  PLATFORM_NAME                  = SbbrSct
> -  PLATFORM_GUID                  = d513138b-9d4a-479c-8058-4a5160018663
> -  PLATFORM_VERSION               = 0.1
> -  DSC_SPECIFICATION              = 0x00010005
> -  OUTPUT_DIRECTORY               = Build/SbbrSct
> -  SUPPORTED_ARCHITECTURES        = AARCH64
> -  BUILD_TARGETS                  = DEBUG|RELEASE
> -  SKUID_IDENTIFIER               = DEFAULT
> -
> -  DEFINE GCC_VER_MACRO           = -D EFI_SPECIFICATION_VERSION=0x00020028 -D TIANO_RELEASE_VERSION=0x00080006
> -  DEFINE MSFT_VER_MACRO          = /D EFI_SPECIFICATION_VERSION=0x00020028 /D TIANO_RELEASE_VERSION=0x00080006
> -
> -
> -################################################################################
> -#
> -# SKU Identification section - list of all SKU IDs supported by this
> -#                              Platform.
> -#
> -################################################################################
> -[SkuIds]
> -  0|DEFAULT              # The entry: 0|DEFAULT is reserved and always required.
> -
> -[BuildOptions]
> -  *_*_AARCH64_CC_FLAGS         = -D EFIAARCH64 -I$(WORKSPACE)/MdePkg/Include/AArch64 $(GCC_VER_MACRO)
> -  GCC:*_*_AARCH64_CC_FLAGS     = -D EFIAARCH64 $(GCC_VER_MACRO) -ffreestanding -nostdinc -nostdlib -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error
> -  *_*_AARCH64_VFRPP_FLAGS      = -D EFIAARCH64 $(GCC_VER_MACRO)
> -  *_*_AARCH64_APP_FLAGS        = -D EFIAARCH64 $(GCC_VER_MACRO)
> -  *_*_AARCH64_PP_FLAGS         = -D EFIAARCH64 $(GCC_VER_MACRO)
> -  RVCT:*_*_AARCH64_DLINK_FLAGS = --muldefweak
> -
> -  DEBUG_*_*_CC_FLAGS  = -DEFI_DEBUG
> -  RELEASE_*_*_CC_FLAGS  = -DMDEPKG_NDEBUG
> -
> -[Libraries]
> -  SctPkg/Library/SctLib/SctLib.inf
> -  SctPkg/Library/SctGuidLib/SctGuidLib.inf
> -  SctPkg/Library/EfiTestLib/EfiTestLib.inf
> -
> -  SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/EntsLib.inf
> -
> -  MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
> -
> -[Libraries.ARM]
> -  ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
> -
> -[Libraries.AARCH64]
> -  ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
> -
> -[LibraryClasses.common]
> -  UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
> -  UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
> -  UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
> -  BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
> -  BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
> -  DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
> -  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
> -  MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
> -  UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
> -  UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
> -  HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
> -  PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
> -  UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
> -  DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
> -
> -  SctLib|SctPkg/Library/SctLib/SctLib.inf
> -  NetLib|SctPkg/Library/NetLib/NetLib.inf
> -  EntsLib|SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/EntsLib.inf
> -  EasLib|SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasDispatcher/Eas.inf
> -  EfiTestLib|SctPkg/Library/EfiTestLib/EfiTestLib.inf
> -
> -[LibraryClasses.ARM]
> -  NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
> -
> -[LibraryClasses.AARCH64]
> -  NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
> +#
> +# 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) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
> +#
> +# Copyright (c) 2016, ARM Ltd. All rights reserved.<BR>
> +#
> +#
> +#/*++
> +#
> +# Module Name:
> +#
> +#    SBBR_SCT.dsc
> +#
> +# Abstract:
> +#
> +#   This is a build description file used to build the test modules of SBBR SCT.
> +#
> +# Notes:
> +#
> +#   The info in this file is broken down into sections. The start of a section
> +#   is designated by a "[" in the first column. So the [=====] separater ends
> +#   a section.
> +#
> +#--*/
> +
> +################################################################################
> +#
> +# Defines Section - statements that will be processed to create a Makefile.
> +#
> +################################################################################
> +[Defines]
> +  PLATFORM_NAME                  = SbbrSct
> +  PLATFORM_GUID                  = d513138b-9d4a-479c-8058-4a5160018663
> +  PLATFORM_VERSION               = 0.1
> +  DSC_SPECIFICATION              = 0x00010005
> +  OUTPUT_DIRECTORY               = Build/SbbrSct
> +  SUPPORTED_ARCHITECTURES        = AARCH64
> +  BUILD_TARGETS                  = DEBUG|RELEASE
> +  SKUID_IDENTIFIER               = DEFAULT
> +
> +  DEFINE GCC_VER_MACRO           = -D EFI_SPECIFICATION_VERSION=0x00020028 -D TIANO_RELEASE_VERSION=0x00080006
> +  DEFINE MSFT_VER_MACRO          = /D EFI_SPECIFICATION_VERSION=0x00020028 /D TIANO_RELEASE_VERSION=0x00080006
> +
> +
> +################################################################################
> +#
> +# SKU Identification section - list of all SKU IDs supported by this
> +#                              Platform.
> +#
> +################################################################################
> +[SkuIds]
> +  0|DEFAULT              # The entry: 0|DEFAULT is reserved and always required.
> +
> +[BuildOptions]
> +  *_*_AARCH64_CC_FLAGS         = -D EFIAARCH64 -I$(WORKSPACE)/MdePkg/Include/AArch64 $(GCC_VER_MACRO)
> +  GCC:*_*_AARCH64_CC_FLAGS     = -D EFIAARCH64 $(GCC_VER_MACRO) -ffreestanding -nostdinc -nostdlib -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error
> +  *_*_AARCH64_VFRPP_FLAGS      = -D EFIAARCH64 $(GCC_VER_MACRO)
> +  *_*_AARCH64_APP_FLAGS        = -D EFIAARCH64 $(GCC_VER_MACRO)
> +  *_*_AARCH64_PP_FLAGS         = -D EFIAARCH64 $(GCC_VER_MACRO)
> +  RVCT:*_*_AARCH64_DLINK_FLAGS = --muldefweak
> +
> +  DEBUG_*_*_CC_FLAGS  = -DEFI_DEBUG
> +  RELEASE_*_*_CC_FLAGS  = -DMDEPKG_NDEBUG
> +
> +[Libraries]
> +  SctPkg/Library/SctLib/SctLib.inf
> +  SctPkg/Library/SctGuidLib/SctGuidLib.inf
> +  SctPkg/Library/EfiTestLib/EfiTestLib.inf
> +
> +  SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/EntsLib.inf
> +
> +  MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
> +
> +[Libraries.ARM]
> +  ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
> +
> +[Libraries.AARCH64]
> +  ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
> +
> +[LibraryClasses.common]
> +  UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
> +  UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
> +  UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
> +  BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
> +  BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
> +  DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
> +  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
> +  MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
> +  UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
> +  UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
> +  HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
> +  PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
> +  UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
> +  DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
> +
> +  SctLib|SctPkg/Library/SctLib/SctLib.inf
> +  NetLib|SctPkg/Library/NetLib/NetLib.inf
> +  EntsLib|SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasLib/EntsLib.inf
> +  EasLib|SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasDispatcher/Eas.inf
> +  EfiTestLib|SctPkg/Library/EfiTestLib/EfiTestLib.inf
> +
> +[LibraryClasses.ARM]
> +  NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
> +
> +[LibraryClasses.AARCH64]
> +  NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
>    ArmLib|ArmPkg/Library/ArmLib/AArch64/AArch64Lib.inf
> -
> -###############################################################################
> -#
> -# These are the components that will be built by the master makefile
> -#
> -###############################################################################
> -
> -[Components]
> -
> -#
> -# The default package
> -#
> -DEFINE PACKAGE=Default
> -
> -#
> -# Components
> -#
> -
> -#
> -# Following are the SCT suite & related drivers
> -#
> -
> -SctPkg/TestInfrastructure/SCT/Framework/Sct.inf
> -SctPkg/TestInfrastructure/SCT/Drivers/StandardTest/StandardTest.inf
> -SctPkg/TestInfrastructure/SCT/Drivers/TestProfile/TestProfile.inf
> -SctPkg/TestInfrastructure/SCT/Drivers/TestRecovery/TestRecovery.inf
> -SctPkg/TestInfrastructure/SCT/Drivers/TestLogging/TestLogging.inf
> -
> -#
> -# Related SCT applications
> -#
> -
> -SctPkg/Application/InstallSct/InstallSct.inf
> -SctPkg/Application/StallForKey/StallForKey.inf
> -
> -SctPkg/SCRT/SCRTApp/SCRTApp.inf
> -SctPkg/SCRT/SCRTDriver/SCRTDriver.inf
> -
> -#
> -# Test cases for SBBR SCT
> -#
> -
> +
> +###############################################################################
> +#
> +# These are the components that will be built by the master makefile
> +#
> +###############################################################################
> +
> +[Components]
> +
> +#
> +# The default package
> +#
> +DEFINE PACKAGE=Default
> +
> +#
> +# Components
> +#
> +
> +#
> +# Following are the SCT suite & related drivers
> +#
> +
> +SctPkg/TestInfrastructure/SCT/Framework/Sct.inf
> +SctPkg/TestInfrastructure/SCT/Drivers/StandardTest/StandardTest.inf
> +SctPkg/TestInfrastructure/SCT/Drivers/TestProfile/TestProfile.inf
> +SctPkg/TestInfrastructure/SCT/Drivers/TestRecovery/TestRecovery.inf
> +SctPkg/TestInfrastructure/SCT/Drivers/TestLogging/TestLogging.inf
> +
> +#
> +# Related SCT applications
> +#
> +
> +SctPkg/Application/InstallSct/InstallSct.inf
> +SctPkg/Application/StallForKey/StallForKey.inf
> +
> +SctPkg/SCRT/SCRTApp/SCRTApp.inf
> +SctPkg/SCRT/SCRTDriver/SCRTDriver.inf
> +
> +#
> +# Test cases for SBBR SCT
> +#
> +
>  # Boot Services Tests - SBBR v1.0 Appendix A
>  #
>  ##  1. EFI_RAISE_TPL
> @@ -239,13 +241,15 @@ SctPkg/TestCase/UEFI/EFI/BootServices/MiscBootServices/BlackBoxTest/MiscBootServ
>  ## 42. EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES
>  SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/ProtocolHandlerBBTest.inf
>  # 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
> -
> +#
> +# Check if EFI Specification Version is 2.5 or greater
> +SctPkg/TestCase/UEFI/EFI/Generic/SbbrEfiSpecVerLvl/BlackBoxTest/EfiSpecVerLvlBBTest.inf
>  #
>  # UEFI Boot Services - SBBR v1.0 3.4
>  #
> @@ -286,13 +290,13 @@ SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompliantBBTest_ue
>  # End of UEFI Required Protocols Tests - SBBR Appendix C
>  
>  #
> -# Dependency files
> -#
> -
> -#
> -# Support Files
> -#
> -SctPkg/TestInfrastructure/SCT/Framework/ENTS/Eftp/Eftp.inf
> -SctPkg/TestInfrastructure/SCT/Framework/ENTS/MonitorServices/SerialMonitor/SerialMonitor.inf
> -SctPkg/TestInfrastructure/SCT/Framework/ENTS/MonitorServices/ManagedNetworkMonitor/ManagedNetworkMonitor.inf
> -SctPkg/TestInfrastructure/SCT/Framework/ENTS/MonitorServices/IP4NetworkMonitor/IP4NetworkMonitor.inf
> +# Dependency files
> +#
> +
> +#
> +# Support Files
> +#
> +SctPkg/TestInfrastructure/SCT/Framework/ENTS/Eftp/Eftp.inf
> +SctPkg/TestInfrastructure/SCT/Framework/ENTS/MonitorServices/SerialMonitor/SerialMonitor.inf
> +SctPkg/TestInfrastructure/SCT/Framework/ENTS/MonitorServices/ManagedNetworkMonitor/ManagedNetworkMonitor.inf
> +SctPkg/TestInfrastructure/SCT/Framework/ENTS/MonitorServices/IP4NetworkMonitor/IP4NetworkMonitor.inf
> -- 
> 2.7.4
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [edk2-test][RFC PATCH 10/12] uefi-sct/SctPkg: sbbr: Corrected path to ArmBaseLib.inf in SBBR_SCT.dsc
  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
  0 siblings, 0 replies; 24+ messages in thread
From: Leif Lindholm @ 2018-11-06 17:51 UTC (permalink / raw)
  To: Sakar Arora; +Cc: edk2-devel, prasanth.pulla

On Tue, Nov 06, 2018 at 02:17:44PM +0530, Sakar Arora wrote:
> From: Randy Jones <randy.jones@arm.com>
> 
> Change-Id: I0fa236441ed8388d6c8a7fd185d46ec5a2dbe02d
> ---
>  uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc b/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
> index bf010c9..7076d11 100644
> --- a/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
> +++ b/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
> @@ -144,7 +144,7 @@
>  
>  [LibraryClasses.AARCH64]
>    NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
> -  ArmLib|ArmPkg/Library/ArmLib/AArch64/AArch64Lib.inf
> +  ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf

The modified line was added as part of this set.
But without this change, I seriously doubt any of the preceding
commits will have been possible to compile.
(ArmPkg/Library/ArmLib/AArch64/AArch64Lib.inf does not exist.)

Please fold this change into the original introduction of this line.

/
    Leif

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


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [edk2-test][RFC PATCH 11/12] uefi-sct/SctPkg: sbbr: Bugfix for MemoryMap Check Test.
  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
  1 sibling, 0 replies; 24+ messages in thread
From: Leif Lindholm @ 2018-11-06 17:53 UTC (permalink / raw)
  To: Sakar Arora; +Cc: edk2-devel, prasanth.pulla, Eric Jin, Supreeth Venkatesh

On Tue, Nov 06, 2018 at 02:17:45PM +0530, Sakar Arora wrote:
> As per SBBR specification, "A UEFI runtime environment compliant with
> SBBR must not be written with any assumption of an identity mapping
> between virtual and physical memory maps."
> 
> Test case implementation was failing the test, if it is not identity
> mapped, which is incorrect.
> 
> Corrected test case to warn the user that UEFI runtime environment is
> identity mapped, instead of failure.
> 
> Signed-off-by: Sakar Arora <sakar.arora@arm.com>
> Reported-by: Felix Poludov <Felixp@ami.com>
> ---
>  .../SbbrBootServices/BlackBoxTest/SbbrBootServicesBBTestFunction.c  | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/SbbrBootServicesBBTestFunction.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/SbbrBootServicesBBTestFunction.c
> index fb50702..c88d60b 100644
> --- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/SbbrBootServicesBBTestFunction.c
> +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/SbbrBootServicesBBTestFunction.c
> @@ -201,13 +201,13 @@ BBTestMemoryMapTest (
>      //
>      // Checking for identity mapping
>      //
> -    if (MemoryMapDescriptor->PhysicalStart != MemoryMapDescriptor->VirtualStart) {
> +    if (MemoryMapDescriptor->PhysicalStart == MemoryMapDescriptor->VirtualStart) {
>        StandardLib->RecordAssertion (
>                    StandardLib,
> -                  EFI_TEST_ASSERTION_FAILED,
> +                  EFI_TEST_ASSERTION_WARNING,
>                    gSbbrBootServicesAssertion001Guid,
>                    L"MemoryMap",
> -                  L"%a:%d - MemoryMap 0x%X Not Identity Mapped",
> +                  L"%a:%d - MemoryMap 0x%X is Identity Mapped. UEFI runtime environment must not be written with any assumption of an identity mapping between virtual and physical memory maps.",
>                    __FILE__,
>                    __LINE__,
>                    MemoryMapDescriptor

This file was only added as part of this set - please fold this change
into the original patch adding it. Development history before
upstreaming is not something we need (or want) to track.

/
    Leif

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


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [edk2-test][RFC PATCH 12/12] uefi-sct/SctPkg: sbbr: Modify SBBR description file to add missing dependencies.
  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
  0 siblings, 0 replies; 24+ messages in thread
From: Leif Lindholm @ 2018-11-06 17:56 UTC (permalink / raw)
  To: Sakar Arora; +Cc: edk2-devel, prasanth.pulla, Eric Jin, Supreeth Venkatesh

On Tue, Nov 06, 2018 at 02:17:46PM +0530, Sakar Arora wrote:
> SBBR ImageServicesTest fails because it can't load its dependent
> drivers.
> Modify the description file to include all the dependecies and copy it
> over to the dependency folder.
> 
> Signed-off-by: Sakar Arora <sakar.arora@arm.com>
> Reported-by: Felix Poludov <Felixp@ami.com>

Again, this looks like something that could be folded in to initial
addition of SBBR_SCT.dsc.

> ---
>  uefi-sct/SctPkg/CommonGenFramework.sh |  3 ++
>  uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc     | 81 +++++++++++++++++++++++++++++++++--
>  2 files changed, 80 insertions(+), 4 deletions(-)
> 
> diff --git a/uefi-sct/SctPkg/CommonGenFramework.sh b/uefi-sct/SctPkg/CommonGenFramework.sh
> index 8e7c7ca..2d7083d 100755
> --- a/uefi-sct/SctPkg/CommonGenFramework.sh
> +++ b/uefi-sct/SctPkg/CommonGenFramework.sh
> @@ -396,4 +396,7 @@ then
>      # Copy the test dependency files
>      # *********************************************
>  
> +    CopyDependency EfiCompliant
> +    CopyDependency ProtocolHandlerServices
> +    CopyDependency ImageServices
>  fi
> diff --git a/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc b/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
> index 7076d11..01754ba 100644
> --- a/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
> +++ b/uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc
> @@ -205,6 +205,44 @@ SctPkg/TestCase/UEFI/EFI/BootServices/EventTimerTaskPriorityServices/BlackBoxTes
>  ## 12. EFI_IMAGE_UNLOAD
>  ## 13. EFI_EXIT_BOOT_SERVICES
>  SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/ImageBBTest.inf
> +##
> +## Dependency files for Image Services Test
> +##
> +SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/LoadFile/LoadFile.inf

Oh, and the (lack of) indentation here does not look correct.

/
    Leif

> +SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/Application1/Application1.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/Application2/Application2.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/Application3/Application3.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/Application4/Application4.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/BootServicesDriver1/BootServicesDriver1.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/BootServicesDriver2/BootServicesDriver2.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/BootServicesDriver3/BootServicesDriver3.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/BootServicesDriver4/BootServicesDriver4.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/BootServicesDriver5/BootServicesDriver5.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/BootServicesDriver6/BootServicesDriver6.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/RuntimeServicesDriver1/RuntimeServicesDriver1.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/RuntimeServicesDriver2/RuntimeServicesDriver2.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/RuntimeServicesDriver3/RuntimeServicesDriver3.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/RuntimeServicesDriver4/RuntimeServicesDriver4.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/RuntimeServicesDriver5/RuntimeServicesDriver5.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/RuntimeServicesDriver6/RuntimeServicesDriver6.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/CombinationImage1/CombinationImage1.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/CombinationImage2/CombinationImage2.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/CombinationImage3/CombinationImage3.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/CombinationImage4/CombinationImage4.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/CombinationImage5/CombinationImage5.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/CombinationImage6/CombinationImage6.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/CombinationImage7/CombinationImage7.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/CombinationImage8/CombinationImage8.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/CombinationImage9/CombinationImage9.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/CombinationImage10/CombinationImage10.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/InvalidImage1/InvalidImage1.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/InvalidImage2/InvalidImage2.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/InvalidImage3/InvalidImage3.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/InvalidImage4/InvalidImage4.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/InvalidImage5/InvalidImage5.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/InvalidImage6/InvalidImage6.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/InvalidImage7/InvalidImage7.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ImageServices/BlackBoxTest/Dependency/ValidHiiImage1/ValidHiiImage1.inf
>  #
>  ## 14. EFI_ALLOCATE_PAGES
>  ## 15. EFI_FREE_PAGES
> @@ -240,6 +278,41 @@ SctPkg/TestCase/UEFI/EFI/BootServices/MiscBootServices/BlackBoxTest/MiscBootServ
>  ## 41. EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES
>  ## 42. EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES
>  SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/ProtocolHandlerBBTest.inf
> +##
> +## Dependency files for Protocol Handler Services Test
> +##
> +SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/BusDriver1/BusDriver1.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/BusDriver2/BusDriver2.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/BusDriver3/BusDriver3.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/BusDriver4/BusDriver4.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DBindingDriver1/DBindingDriver1.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DBindingDriver2/DBindingDriver2.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DBindingDriver3/DBindingDriver3.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DBindingDriver4/DBindingDriver4.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DBindingDriver5/DBindingDriver5.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DeviceDriver1/DeviceDriver1.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DeviceDriver2/DeviceDriver2.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DeviceDriver3/DeviceDriver3.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DeviceDriver4/DeviceDriver4.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DeviceDriver5/DeviceDriver5.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DeviceDriver6/DeviceDriver6.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DeviceDriver7/DeviceDriver7.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DeviceDriver11/DeviceDriver11.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DeviceDriver12/DeviceDriver12.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DeviceDriver13/DeviceDriver13.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DeviceDriver14/DeviceDriver14.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DeviceDriver15/DeviceDriver15.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DeviceDriver18/DeviceDriver18.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DeviceDriver19/DeviceDriver19.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DeviceDriver110/DeviceDriver110.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/DeviceDriver111/DeviceDriver111.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/TestDriver1/TestDriver1.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/TestDriver2/TestDriver2.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/TestDriver3/TestDriver3.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/TestDriver4/TestDriver4.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/TestDriver5/TestDriver5.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/PlatformOverrideDriver1/PlatformOverrideDriver1.inf
> +SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Dependency/BusOverrideDriver1/BusOverrideDriver1.inf
>  # End of Boot Services Tests - SBBR v1.0 Appendix A
>  
>  #
> @@ -292,13 +365,13 @@ SctPkg/TestCase/UEFI/EFI/RuntimeServices/SBBRRuntimeServices/BlackBoxTest/SBBRRu
>  #
>  SctPkg/TestCase/UEFI/EFI/Generic/SbbrRequiredUefiProtocols/BlackBoxTest/RequiredUefiProtocolsBBTest.inf
>  SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompliantBBTest_uefi.inf
> +##
> +## Dependency files for UEFI/EFI Compliant Test
> +##
> +SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/Dependency/Config/Config.inf
>  # End of UEFI Required Protocols Tests - SBBR Appendix C
>  
>  #
> -# Dependency files
> -#
> -
> -#
>  # Support Files
>  #
>  SctPkg/TestInfrastructure/SCT/Framework/ENTS/Eftp/Eftp.inf
> -- 
> 2.7.4
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [edk2-test][RFC PATCH 07/12] uefi-sct/SctPkg: sbbr: Add test cases for SBBR v1.0 boot services
  2018-11-06 17:46   ` Leif Lindholm
@ 2018-11-07 20:55     ` Supreeth Venkatesh
  0 siblings, 0 replies; 24+ messages in thread
From: Supreeth Venkatesh @ 2018-11-07 20:55 UTC (permalink / raw)
  To: Leif Lindholm, Sakar Arora; +Cc: edk2-devel, prasanth.pulla, Eric Jin

On Tue, 2018-11-06 at 17:46 +0000, Leif Lindholm wrote:
> On Tue, Nov 06, 2018 at 02:17:41PM +0530, Sakar Arora wrote:
> > From: John Powell <john.powell@arm.com>
> > 
> > Tests SBBR requirements 3.4.1 and 3.4.4.
It would be better if we add comments on how SBBR requirements 3.4.1
and 3.4.4 relate to the UEFI specification. Since this is being
requested to be added as part of UEFI-SCT, it would need to be related
to UEFI specification.

For all the SBBR patches, please correlate SBBR specification text to
UEFI specification, so that it can be justified as UEFI-SCT test case.

> > 
> > Change-Id: I0dd625851db65d04d2a7572a2d6838951c8f7c67
> > Signed-off-by: John Powell <john.powell@arm.com>
> > ---
> >  uefi-sct/SctPkg/CommonGenFramework.sh              |   3 +
> >  uefi-sct/SctPkg/Config/Data/Category.ini           |  11 +-
> >  .../SbbrBootServices/BlackBoxTest/Guid.c           |  65 +++
> >  .../SbbrBootServices/BlackBoxTest/Guid.h           |  76 +++
> >  .../BlackBoxTest/SbbrBootServicesBBTest.inf        |  85 ++++
> >  .../BlackBoxTest/SbbrBootServicesBBTestFunction.c  | 549
> > +++++++++++++++++++++
> >  .../BlackBoxTest/SbbrBootServicesBBTestFunction.h  |  85 ++++
> >  .../BlackBoxTest/SbbrBootServicesBBTestMain.c      | 149 ++++++
> >  .../BlackBoxTest/SbbrBootServicesBBTestMain.h      |  99 ++++
> >  uefi-sct/SctPkg/UEFI/SBBR_SCT.dsc                  |   7 +
> >  10 files changed, 1127 insertions(+), 2 deletions(-)
> >  create mode 100644 uefi-
> > sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBox
> > Test/Guid.c
> >  create mode 100644 uefi-
> > sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBox
> > Test/Guid.h
> >  create mode 100644 uefi-
> > sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBox
> > Test/SbbrBootServicesBBTest.inf
> >  create mode 100644 uefi-
> > sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBox
> > Test/SbbrBootServicesBBTestFunction.c
> >  create mode 100644 uefi-
> > sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBox
> > Test/SbbrBootServicesBBTestFunction.h
> >  create mode 100644 uefi-
> > sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBox
> > Test/SbbrBootServicesBBTestMain.c
> >  create mode 100644 uefi-
> > sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBox
> > Test/SbbrBootServicesBBTestMain.h
> > 
> > diff --git a/uefi-sct/SctPkg/CommonGenFramework.sh b/uefi-
> > sct/SctPkg/CommonGenFramework.sh
> > index aecd21b..ab35c5a 100755
> > --- a/uefi-sct/SctPkg/CommonGenFramework.sh
> > +++ b/uefi-sct/SctPkg/CommonGenFramework.sh
> > @@ -364,6 +364,9 @@ then
> >      # Tests SBBR sections 3.3.1, 3.3.2, 3.3.3, and 3.3.4
> >      cp
> > $ProcessorType/SysEnvConfigBBTest.efi                   $Framework/
> > Test/ > NUL
> >  
> > +    # UEFI Boot Services - SBBR v1.0 3.4
> > +    cp
> > $ProcessorType/SbbrBootServicesBBTest.efi               $Framework/
> > Test/ > NUL
> > +
> >      # Runtime Services Tests - SBBR v1.0 Appendix B
> >      cp
> > $ProcessorType/VariableServicesBBTest.efi               $Framework/
> > Test/ > NUL
> >      cp
> > $ProcessorType/TimeServicesBBTest.efi                   $Framework/
> > Test/ > NUL
> > diff --git a/uefi-sct/SctPkg/Config/Data/Category.ini b/uefi-
> > sct/SctPkg/Config/Data/Category.ini
> > index 9576971..17ca639 100644
> > --- a/uefi-sct/SctPkg/Config/Data/Category.ini
> > +++ b/uefi-sct/SctPkg/Config/Data/Category.ini
> > @@ -145,8 +145,15 @@ Description   =
> >  
> >  [Category Data]
> >  Revision      = 0x00010000
> > -CategoryGuid  = AFF115FB-387B-4C18-8C41-6AFC7F03BB90
> > -InterfaceGuid = AFF115FB-387B-4C18-8C41-6AFC7F03BB90
> > +CategoryGuid  = 8dafd7a7-44d0-4cf4-9d28-9f87080fc091
> > +InterfaceGuid = E9EF7553-F833-4E56-96E8-38AE679523CC
> > +Name          = BootServicesTest\SbbrBootServices
> > +Description   = Tests SBBR boot services requirements.
> > +
> > +[Category Data]
> > +Revision      = 0x00010000
> > +CategoryGuid  = AFF115FB-387B-4c18-8C41-6AFC7F03BB90
> > +InterfaceGuid = AFF115FB-387B-4c18-8C41-6AFC7F03BB90
> >  Name          = RuntimeServicesTest
> >  Description   =
> 
> Diff would be more clear if added test was added after existing test.
> 
> /
>     Leif



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [edk2-test][RFC PATCH 11/12] uefi-sct/SctPkg: sbbr: Bugfix for MemoryMap Check Test.
  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
  1 sibling, 0 replies; 24+ messages in thread
From: Jin, Eric @ 2018-11-20  7:55 UTC (permalink / raw)
  To: Sakar Arora, edk2-devel@lists.01.org

Add the maintainer Supreeth.

Hello Sakar,

Thank for the patches in this series.
The common comments is: 
The keyword 'SBBR' exists on the FilePath or in the FileName. But 'SBBR' string or related description is not mentioned in UEFI spec at all. 
Could you please add more detail for the checkpoint requirement in the UEFI spec? Please remove the 'SBBR' in the new patch.
If the checkpoint is not related to UEFI spec, uefi-sct/sctpkg may not be the proper space for these patch landing. Thanks. 

Best Regards
Eric

-----Original Message-----
From: edk2-devel <edk2-devel-bounces@lists.01.org> On Behalf Of Sakar Arora
Sent: Tuesday, November 6, 2018 4:48 PM
To: edk2-devel@lists.01.org
Cc: prasanth.pulla@arm.com
Subject: [edk2] [edk2-test][RFC PATCH 11/12] uefi-sct/SctPkg: sbbr: Bugfix for MemoryMap Check Test.

As per SBBR specification, "A UEFI runtime environment compliant with SBBR must not be written with any assumption of an identity mapping between virtual and physical memory maps."

Test case implementation was failing the test, if it is not identity mapped, which is incorrect.

Corrected test case to warn the user that UEFI runtime environment is identity mapped, instead of failure.

Signed-off-by: Sakar Arora <sakar.arora@arm.com>
Reported-by: Felix Poludov <Felixp@ami.com>
---
 .../SbbrBootServices/BlackBoxTest/SbbrBootServicesBBTestFunction.c  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/SbbrBootServicesBBTestFunction.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/SbbrBootServicesBBTestFunction.c
index fb50702..c88d60b 100644
--- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/BlackBoxTest/SbbrBootServicesBBTestFunction.c
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/SbbrBootServices/Bl
+++ ackBoxTest/SbbrBootServicesBBTestFunction.c
@@ -201,13 +201,13 @@ BBTestMemoryMapTest (
     //
     // Checking for identity mapping
     //
-    if (MemoryMapDescriptor->PhysicalStart != MemoryMapDescriptor->VirtualStart) {
+    if (MemoryMapDescriptor->PhysicalStart == 
+ MemoryMapDescriptor->VirtualStart) {
       StandardLib->RecordAssertion (
                   StandardLib,
-                  EFI_TEST_ASSERTION_FAILED,
+                  EFI_TEST_ASSERTION_WARNING,
                   gSbbrBootServicesAssertion001Guid,
                   L"MemoryMap",
-                  L"%a:%d - MemoryMap 0x%X Not Identity Mapped",
+                  L"%a:%d - MemoryMap 0x%X is Identity Mapped. UEFI 
+ runtime environment must not be written with any assumption of an 
+ identity mapping between virtual and physical memory maps.",
                   __FILE__,
                   __LINE__,
                   MemoryMapDescriptor
--
2.7.4

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


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2018-11-20  7:55 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [edk2-test][RFC PATCH 03/12] uefi-sct/SctPkg: sbbr: Add System Environment Configuration Test Cases Sakar Arora
2018-11-06 17:38   ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox