Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions apps/linux/bsa-acs-app/bsa_app_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,34 @@ static RULE_ID_e g_skip_rule_buf[BSA_RULE_ID_LIST_MAX];
unsigned int g_skip_rule_count = 0;

/* Helpers for rule parsing */
static int sizeof_char_ptr(const char *tok)
{
int i = 0;

if (tok)
{
while (tok[i] != '\0')
i++;
}
return i;

}

static int rule_id_from_string(const char *tok)
{
unsigned int rid;
int cmp_len;

if (!tok || !*tok) return -1;
for (rid = 0; rid < RULE_ID_SENTINEL; rid++) {
if (rule_id_string[rid] && strcmp((const char *)rule_id_string[rid], tok) == 0)
if (!rule_id_string[rid])
continue;

cmp_len = sizeof_char_ptr(rule_id_string[rid]);
if (cmp_len < sizeof_char_ptr(tok))
cmp_len = sizeof_char_ptr(tok);

if (strncmp((const char *)rule_id_string[rid], tok, cmp_len) == 0)
return (int)rid;
}
return -1;
Expand Down Expand Up @@ -100,7 +122,7 @@ void print_help(){
"-r Comma-separated rule IDs to run (overwrites default rule list) [no spaces]\n"
"--fr Run future requirement tests (FR); use without -l\n"
"--skip Rules to skip as comma-separated RULE IDs. [no spaces]\n"
"--skip-dp-nic-ms Skip PCIe tests for DisplayPort, Network, and Mass Storage devices\n"
"--skip-dp-nic-ms Skip PCIe tests for DisplayPort, Network, Mass Storage devices and Unclassified devices\n"
);
}

Expand Down
28 changes: 25 additions & 3 deletions apps/linux/sbsa-acs-app/sbsa_app_main.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @file
* Copyright (c) 2016-2025, Arm Limited or its affiliates. All rights reserved.
* Copyright (c) 2016-2026, Arm Limited or its affiliates. All rights reserved.
* SPDX-License-Identifier : Apache-2.0

* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -53,12 +53,34 @@ static RULE_ID_e g_skip_rule_buf[RULE_ID_LIST_MAX];
unsigned int g_skip_rule_count = 0;

/* Helpers for rule parsing */
static int sizeof_char_ptr(const char *tok)
{
int i = 0;

if (tok)
{
while (tok[i] != '\0')
i++;
}
return i;

}

static int rule_id_from_string(const char *tok)
{
unsigned int rid;
int cmp_len;

if (!tok || !*tok) return -1;
for (rid = 0; rid < RULE_ID_SENTINEL; rid++) {
if (rule_id_string[rid] && strcmp((const char *)rule_id_string[rid], tok) == 0)
if (!rule_id_string[rid])
continue;

cmp_len = sizeof_char_ptr(rule_id_string[rid]);
if (cmp_len < sizeof_char_ptr(tok))
cmp_len = sizeof_char_ptr(tok);

if (strncmp((const char *)rule_id_string[rid], tok, cmp_len) == 0)
return (int)rid;
}
return -1;
Expand Down Expand Up @@ -99,7 +121,7 @@ void print_help(){
"-r Comma-separated rule IDs to run (overwrites default rule list) [no spaces]\n"
"--fr Run future requirement tests (FR); use without -l\n"
"--skip Rules to skip as comma-separated RULE IDs (e.g. B_PE_01,B_PE_02) [no spaces]\n"
"--skip-dp-nic-ms Skip PCIe tests for DisplayPort, Network, and Mass Storage devices\n"
"--skip-dp-nic-ms Skip PCIe tests for DisplayPort, Network, Mass Storage devices and Unclassified devices\n"
);
}

Expand Down
2 changes: 1 addition & 1 deletion apps/uefi/bsa_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ HelpMsg (VOID)
"-skip Rule ID(s) to be skipped (comma-separated, like -r)\n"
" Example: -skip B_PE_01,B_GIC_02\n"
"-skip-dp-nic-ms \n"
" Skip PCIe tests for DisplayPort, Network, and Mass Storage devices\n"
" Skip PCIe tests for DisplayPort, Network, Mass Storage devices and Unclassified devices\n"
"-skipmodule \n"
" Skip the specified modules (comma-separated names).\n"
" Example: -skipmodule PE,GIC,PCIE\n"
Expand Down
2 changes: 1 addition & 1 deletion apps/uefi/mem_test_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ HelpMsg (
"-dtb Enable the execution of dtb dump\n"
"-sbsa Enable sbsa requirements for bsa binary\n"
"-el1physkip Skips EL1 register checks\n"
"-skip-dp-nic-ms Skip PCIe tests for DisplayPort, Network, and Mass Storage devices\n"
"-skip-dp-nic-ms Skip PCIe tests for DisplayPort, Network, Mass Storage devices and Unclassified devices\n"
);
}

Expand Down
2 changes: 1 addition & 1 deletion apps/uefi/sbsa_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ HelpMsg (VOID)
"-skip Rule ID(s) to be skipped (comma-separated, like -r)\n"
" Example: -skip B_PE_01,B_GIC_02\n"
"-skip-dp-nic-ms \n"
" Skip PCIe tests for DisplayPort, Network, and Mass Storage devices\n"
" Skip PCIe tests for DisplayPort, Network, Mass Storage devices and Unclassified devices\n"
"-skipmodule \n"
" Skip the specified modules (comma-separated names).\n"
" Example: -skipmodule PE,GIC,PCIE\n"
Expand Down
4 changes: 2 additions & 2 deletions apps/uefi/vbsa_main.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @file
* Copyright (c) 2025, Arm Limited or its affiliates. All rights reserved.
* Copyright (c) 2025-2026, Arm Limited or its affiliates. All rights reserved.
* SPDX-License-Identifier : Apache-2.0

* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -87,7 +87,7 @@ HelpMsg (VOID)
"-skip Rule ID(s) to be skipped (comma-separated, like -r)\n"
" Example: -skip B_PE_01,B_GIC_02\n"
"-skip-dp-nic-ms \n"
" Skip PCIe tests for DisplayPort, Network, and Mass Storage devices\n"
" Skip PCIe tests for DisplayPort, Network, Mass Storage devices and Unclassified devices\n"
"-timeout <n> \n"
" Set timeout multiple for wakeup tests\n"
" 1 - min value 5 - max value, Defaults to 1 \n"
Expand Down
4 changes: 2 additions & 2 deletions apps/uefi/xbsa_main.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @file
* Copyright (c) 2025, Arm Limited or its affiliates. All rights reserved.
* Copyright (c) 2025-2026, Arm Limited or its affiliates. All rights reserved.
* SPDX-License-Identifier : Apache-2.0

* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -117,7 +117,7 @@ HelpMsg (VOID)
"-skip Rule ID(s) to be skipped (comma-separated, like -r)\n"
" Example: -skip B_PE_01,B_GIC_02\n"
"-skip-dp-nic-ms \n"
" Skip PCIe tests for DisplayPort, Network, and Mass Storage devices\n"
" Skip PCIe tests for DisplayPort, Network, Mass Storage devices and Unclassified devices\n"
"-skipmodule \n"
" Skip the specified modules (comma-separated names).\n"
" Example: -skipmodule PE,GIC,PCIE\n"
Expand Down
5 changes: 3 additions & 2 deletions test_pool/pcie/p004.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @file
* Copyright (c) 2016-2018, 2021-2025, Arm Limited or its affiliates. All rights reserved.
* Copyright (c) 2016-2018, 2021-2026, Arm Limited or its affiliates. All rights reserved.
* SPDX-License-Identifier : Apache-2.0

* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -78,7 +78,8 @@ check_bdf_under_rp(uint32_t rp_bdf)
val_print(ACS_PRINT_DEBUG, "\n Class code is 0x%x", reg_value);
base_cc = reg_value >> TYPE01_BCC_SHIFT;
if (g_pcie_skip_dp_nic_ms &&
((base_cc == CNTRL_CC) || (base_cc == DP_CNTRL_CC) || (base_cc == MAS_CC)))
((base_cc == UNCLAS_CC) || (base_cc == CNTRL_CC)
|| (base_cc == DP_CNTRL_CC) || (base_cc == MAS_CC)))
return 1;
}
}
Expand Down
5 changes: 3 additions & 2 deletions test_pool/pcie/p005.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @file
* Copyright (c) 2020, 2022-2025, Arm Limited or its affiliates. All rights reserved.
* Copyright (c) 2020, 2022-2026, Arm Limited or its affiliates. All rights reserved.
* SPDX-License-Identifier : Apache-2.0

* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -78,7 +78,8 @@ check_bdf_under_rp(uint32_t rp_bdf)
val_print(ACS_PRINT_DEBUG, "\n Class code is 0x%x", reg_value);
base_cc = reg_value >> TYPE01_BCC_SHIFT;
if (g_pcie_skip_dp_nic_ms &&
((base_cc == CNTRL_CC) || (base_cc == DP_CNTRL_CC) || (base_cc == MAS_CC)))
((base_cc == UNCLAS_CC) || (base_cc == CNTRL_CC)
|| (base_cc == DP_CNTRL_CC) || (base_cc == MAS_CC)))
return 1;
}
}
Expand Down
6 changes: 4 additions & 2 deletions test_pool/pcie/p030.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ get_dsf_bdf(uint32_t rp_bdf, uint32_t *target_bdf)
val_print(ACS_PRINT_DEBUG, "\n Downstream class code is 0x%x", reg_value);
base_cc = reg_value >> TYPE01_BCC_SHIFT;
if (g_pcie_skip_dp_nic_ms &&
((base_cc == CNTRL_CC) || (base_cc == DP_CNTRL_CC) || (base_cc == MAS_CC))) {
((base_cc == UNCLAS_CC) || (base_cc == CNTRL_CC)
|| (base_cc == DP_CNTRL_CC) || (base_cc == MAS_CC))) {
val_print(ACS_PRINT_DEBUG, "\n Skipping downstream BDF 0x%x", dev_bdf);
continue;
}
Expand Down Expand Up @@ -161,7 +162,8 @@ payload(void)
val_print(ACS_PRINT_DEBUG, "\n Class code is 0x%x", reg_value);
base_cc = reg_value >> TYPE01_BCC_SHIFT;
if (g_pcie_skip_dp_nic_ms &&
((base_cc == CNTRL_CC) || (base_cc == DP_CNTRL_CC) || (base_cc == MAS_CC))) {
((base_cc == UNCLAS_CC) || (base_cc == CNTRL_CC)
|| (base_cc == DP_CNTRL_CC) || (base_cc == MAS_CC))) {
val_print(ACS_PRINT_DEBUG, "\n Skipping for BDF 0x%x", bdf);
continue;
}
Expand Down
5 changes: 3 additions & 2 deletions test_pool/pcie/p035.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @file
* Copyright (c) 2019-2025, Arm Limited or its affiliates. All rights reserved.
* Copyright (c) 2019-2026, Arm Limited or its affiliates. All rights reserved.
* SPDX-License-Identifier : Apache-2.0

* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -95,7 +95,8 @@ payload(void)
val_pcie_read_cfg(bdf, TYPE01_RIDR, &reg_value);
base_cc = reg_value >> TYPE01_BCC_SHIFT;
if (g_pcie_skip_dp_nic_ms &&
((base_cc == MAS_CC) || (base_cc == CNTRL_CC) || (base_cc == DP_CNTRL_CC)))
((base_cc == UNCLAS_CC) || (base_cc == MAS_CC)
|| (base_cc == CNTRL_CC) || (base_cc == DP_CNTRL_CC)))
{
val_print(ACS_PRINT_DEBUG, "\n Skipping for BDF - 0x%x ", bdf);
val_print(ACS_PRINT_DEBUG, " Classcode is : 0x%x ", base_cc);
Expand Down
3 changes: 2 additions & 1 deletion test_pool/pcie/p045.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ payload(void)
val_print(ACS_PRINT_DEBUG, "\n Class code is 0x%x", reg_value);
base_cc = reg_value >> TYPE01_BCC_SHIFT;
if (g_pcie_skip_dp_nic_ms &&
((base_cc == CNTRL_CC) || (base_cc == DP_CNTRL_CC) || (base_cc == MAS_CC))) {
((base_cc == UNCLAS_CC) || (base_cc == CNTRL_CC)
|| (base_cc == DP_CNTRL_CC) || (base_cc == MAS_CC))) {
val_print(ACS_PRINT_DEBUG, "\n Skipping BDF as 0x%x", bdf);
tbl_index++;
goto next_bdf;
Expand Down
6 changes: 4 additions & 2 deletions test_pool/pcie/p058.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ get_dsf_bdf(uint32_t rp_bdf, uint32_t *target_bdf)
val_print(ACS_PRINT_DEBUG, "\n Downstream class code is 0x%x", reg_value);
base_cc = reg_value >> TYPE01_BCC_SHIFT;
if (g_pcie_skip_dp_nic_ms &&
((base_cc == CNTRL_CC) || (base_cc == DP_CNTRL_CC) || (base_cc == MAS_CC))) {
((base_cc == UNCLAS_CC) || (base_cc == CNTRL_CC)
|| (base_cc == DP_CNTRL_CC) || (base_cc == MAS_CC))) {
val_print(ACS_PRINT_DEBUG, "\n Skipping downstream BDF 0x%x", dev_bdf);
continue;
}
Expand Down Expand Up @@ -200,7 +201,8 @@ payload(void *arg)
val_print(ACS_PRINT_DEBUG, "\n Class code is 0x%x", reg_value);
base_cc = reg_value >> TYPE01_BCC_SHIFT;
if (g_pcie_skip_dp_nic_ms &&
((base_cc == CNTRL_CC) || (base_cc == DP_CNTRL_CC) || (base_cc == MAS_CC))) {
((base_cc == UNCLAS_CC) || (base_cc == CNTRL_CC)
|| (base_cc == DP_CNTRL_CC) || (base_cc == MAS_CC))) {
val_print(ACS_PRINT_DEBUG, "\n Skipping for BDF 0x%x", bdf);
continue;
}
Expand Down
5 changes: 3 additions & 2 deletions test_pool/pcie/p063.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @file
* Copyright (c) 2019-2025, Arm Limited or its affiliates. All rights reserved.
* Copyright (c) 2019-2026, Arm Limited or its affiliates. All rights reserved.
* SPDX-License-Identifier : Apache-2.0

* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -96,7 +96,8 @@ payload(void)
val_pcie_read_cfg(bdf, TYPE01_RIDR, &reg_value);
base_cc = reg_value >> TYPE01_BCC_SHIFT;
if (g_pcie_skip_dp_nic_ms &&
((base_cc == MAS_CC) || (base_cc == CNTRL_CC) || (base_cc == DP_CNTRL_CC)))
((base_cc == UNCLAS_CC) || (base_cc == MAS_CC)
|| (base_cc == CNTRL_CC) || (base_cc == DP_CNTRL_CC)))
{
val_print(ACS_PRINT_DEBUG, "\n Skipping for BDF - 0x%x ", bdf);
val_print(ACS_PRINT_DEBUG, " Classcode is : 0x%x ", base_cc);
Expand Down
3 changes: 2 additions & 1 deletion test_pool/pcie/p094.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ payload(void)
val_print(ACS_PRINT_DEBUG, "\n Class code is 0x%x", reg_value);
base_cc = reg_value >> TYPE01_BCC_SHIFT;
if (g_pcie_skip_dp_nic_ms &&
((base_cc == CNTRL_CC) || (base_cc == DP_CNTRL_CC) || (base_cc == MAS_CC))) {
((base_cc == UNCLAS_CC) || (base_cc == CNTRL_CC)
|| (base_cc == DP_CNTRL_CC) || (base_cc == MAS_CC))) {
val_print(ACS_PRINT_DEBUG, "\n Skipping BDF as 0x%x", bdf);
tbl_index++;
goto next_bdf;
Expand Down
6 changes: 4 additions & 2 deletions test_pool/pcie/p097.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ payload (void)
* with base class codes greater than 13h as they
* are reserved */
if ((g_pcie_skip_dp_nic_ms &&
((base_cc == CNTRL_CC) || (base_cc == DP_CNTRL_CC) || (base_cc == MAS_CC)))
((base_cc == UNCLAS_CC) || (base_cc == CNTRL_CC)
|| (base_cc == DP_CNTRL_CC) || (base_cc == MAS_CC)))
|| (base_cc > RES_CC))
{
tbl_index++;
Expand Down Expand Up @@ -193,7 +194,8 @@ payload (void)
* with base class codes greater than 13h as they
* are reserved */
if ((g_pcie_skip_dp_nic_ms &&
((base_cc == CNTRL_CC) || (base_cc == DP_CNTRL_CC) || (base_cc == MAS_CC)))
((base_cc == UNCLAS_CC) || (base_cc == CNTRL_CC)
|| (base_cc == DP_CNTRL_CC) || (base_cc == MAS_CC)))
|| (base_cc > RES_CC))
{
val_print(ACS_PRINT_DEBUG, "\n Skipping DP/NIC/MAS/RES device.", 0);
Expand Down
1 change: 1 addition & 0 deletions val/include/acs_pcie_spec.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@

#define TYPE0_HEADER 0
#define TYPE1_HEADER 1
#define UNCLAS_CC 0x0
#define MAS_CC 0x1
#define CNTRL_CC 0x2
#define DP_CNTRL_CC 0x3
Expand Down