Skip to content

Commit

Permalink
S_PCIe_11: Steering Tag properties (#507)
Browse files Browse the repository at this point in the history
- Use _DSM Method to obtain the STE values from
  table

Signed-off-by: Sujana M <[email protected]>
  • Loading branch information
Sujana-M authored Nov 6, 2024
1 parent b76e716 commit da1030c
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/arm_sbsa_testcase_checklist.rst
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ The below table provides the following details
+-------+--------------------------------------------+-----+----------------------------------------------------+----------------+----+----------+-----+-------------------+
|865 |Check RP Extensions for DPC |FR |PCI_ER_09 |Yes |Yes |Yes |No |No |
+-------+--------------------------------------------+-----+----------------------------------------------------+----------------+----+----------+-----+-------------------+
|866 |Steering Tag value properties |FR |S_PCIe_11 |Yes |Yes#|Yes |Yes |No |
+-------+--------------------------------------------+-----+----------------------------------------------------+----------------+----+----------+-----+-------------------+
|901 |Enhanced ECAM Memory access check |L3 |PCI_IN_01, PCI_IN_02 |No |Yes |Yes |No |Yes |
+-------+--------------------------------------------+-----+----------------------------------------------------+----------------+----+----------+-----+-------------------+
|902 |PCIe Address translation check |L6 |RE_SMU_2 |No |Yes |Yes |No |Yes |
Expand All @@ -257,6 +259,8 @@ The below table provides the following details
+-------+--------------------------------------------+-----+----------------------------------------------------+----------------+----+----------+-----+-------------------+
|912 |RAS ERR record for external abort |FR |PCI_ER_07 |No |Yes |Yes |No |Yes |
+-------+--------------------------------------------+-----+----------------------------------------------------+----------------+----+----------+-----+-------------------+
|913 |Enable and disable STE.DCP bit |FR |S_PCIe_10 |No |Yes |Yes |No |Yes |
+-------+--------------------------------------------+-----+----------------------------------------------------+----------------+----+----------+-----+-------------------+
|1001 |Check for MPAM extension |L7 |S_L7MP_01, S_L7MP_02 |Yes |Yes |Yes |No |No |
+-------+--------------------------------------------+-----+----------------------------------------------------+----------------+----+----------+-----+-------------------+
|1002 |Check for MPAM LLC CSU |L7 |S_L7MP_03, S_L7MP_04 |Yes |Yes |Yes |No |No |
Expand Down
4 changes: 4 additions & 0 deletions linux_app/sbsa-acs-app/sbsa_app_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ main (int argc, char **argv)
{
{"skip", required_argument, NULL, 'n'},
{"help", no_argument, NULL, 'h'},
{"fr", no_argument, NULL, 'r'},
{NULL, 0, NULL, 0}
};

Expand All @@ -90,6 +91,9 @@ main (int argc, char **argv)
case 'l':
g_sbsa_level = strtol(optarg, &endptr, 10);
break;
case 'r':
g_sbsa_level = 8;
break;
case 'h':
print_help();
return 1;
Expand Down
1 change: 1 addition & 0 deletions test_pool/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ obj-m += sbsa_acs_test.o
sbsa_acs_test-objs += $(TEST_POOL)/pcie/operating_system/test_p001.o \
$(TEST_POOL)/pcie/operating_system/test_p005.o \
$(TEST_POOL)/pcie/operating_system/test_p009.o \
$(TEST_POOL)/pcie/operating_system/test_p066.o \
$(TEST_POOL)/smmu/operating_system/test_i016.o

ccflags-y=-I$(PWD)/$(ACS_DIR)/.. -I$(PWD)/$(ACS_DIR)/val/ -I$(PWD)/$(ACS_DIR)/ -DTARGET_LINUX -Wall -Werror
Expand Down
73 changes: 73 additions & 0 deletions test_pool/pcie/operating_system/test_p066.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/** @file
* Copyright (c) 2024, Arm Limited or its affiliates. All rights reserved.
* SPDX-License-Identifier : Apache-2.0
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/

#include "val/common/include/acs_val.h"
#include "val/common/include/acs_pe.h"
#include "val/common/include/acs_pcie.h"

#include "val/sbsa/include/sbsa_acs_pcie.h"
#include "val/sbsa/include/sbsa_val_interface.h"

#define TEST_NUM (ACS_PCIE_TEST_NUM_BASE + 66)
#define TEST_RULE "S_PCIe_11"
#define TEST_DESC "Steering Tag value properties "

static
void
payload(void)
{
uint32_t index = val_pe_get_index_mpid(val_pe_get_mpid());
uint32_t status;

/* Obtain the STE values from PAL using _DSM Method */
status = val_pcie_dsm_ste_tags();
val_print(ACS_PRINT_DEBUG, "\n STE tag value is %x", status);


if (status == NOT_IMPLEMENTED) {
val_print(ACS_PRINT_DEBUG, "\n DSM method for STE not implemented\n", 0);
val_set_status(index, RESULT_SKIP(TEST_NUM, 0));
}
else if (status == 0) {
val_print(ACS_PRINT_ERR, "\n STE tag value should not be 0\n", 0);
val_set_status(index, RESULT_FAIL(TEST_NUM, 1));
}
else
val_set_status(index, RESULT_PASS(TEST_NUM, 0));

}

uint32_t
p066_entry(uint32_t num_pe)
{

uint32_t status = ACS_STATUS_FAIL;

num_pe = 1; //This test is run on single processor

status = val_initialize_test(TEST_NUM, TEST_DESC, num_pe);
if (status != ACS_STATUS_SKIP)
val_run_test_payload(TEST_NUM, num_pe, payload, 0);

/* get the result from all PE and check for failure */
status = val_check_for_error(TEST_NUM, num_pe, TEST_RULE);

val_report_status(0, ACS_END(TEST_NUM), NULL);

return status;
}

0 comments on commit da1030c

Please sign in to comment.