Skip to content

Commit

Permalink
S_PCIe_11: Steering Tag properties (ARM-software#382)
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 <sujana.murali@arm.com>
  • Loading branch information
Sujana-M authored Nov 6, 2024
1 parent fbf5507 commit 48c13d2
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 1 deletion.
34 changes: 34 additions & 0 deletions pal/baremetal/target/RDN2/sbsa/src/pal_sbsa_bm_pcie.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/** @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 "pal_common_support.h"
#include "pal_pcie_enum.h"

#define NOT_IMPLEMENTED 0x4B1D

/**
@brief Check for the _DSM method to obtain the STE value
@param None
@return 0 - Failure, NOT_IMPLEMENTED - DSM Method not implemented, Other values - PASS
**/
uint32_t pal_pcie_dsm_ste_tags(void)
{

return NOT_IMPLEMENTED;
}
3 changes: 3 additions & 0 deletions val/sbsa/include/sbsa_acs_pcie.h
Original file line number Diff line number Diff line change
Expand Up @@ -231,4 +231,7 @@ p064_entry(uint32_t num_pe);
uint32_t
p065_entry(uint32_t num_pe);

uint32_t
p066_entry(uint32_t num_pe);

#endif
1 change: 1 addition & 0 deletions val/sbsa/include/sbsa_pal_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ uint32_t pal_smmu_is_etr_behind_catu(char *etr_path);
/* PCIe related PAL APIs */
uint32_t pal_pcie_get_rp_transaction_frwd_support(uint32_t seg, uint32_t bus,
uint32_t dev, uint32_t fn);
uint32_t pal_pcie_dsm_ste_tags(void);

/* Exerciser related PAL APIs */
void pal_exerciser_disable_rp_pio_register(uint32_t bdf);
Expand Down
1 change: 1 addition & 0 deletions val/sbsa/include/sbsa_val_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ uint32_t val_smmu_is_etr_behind_catu(char *etr_path);
/* PCIE VAL APIs */
void val_pcie_enable_ordering(uint32_t bdf);
void val_pcie_disable_ordering(uint32_t bdf);
uint32_t val_pcie_dsm_ste_tags(void);

/* NIST VAL APIs */
uint32_t val_nist_generate_rng(uint32_t *rng_buffer);
Expand Down
15 changes: 14 additions & 1 deletion val/sbsa/src/sbsa_acs_pcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@
* limitations under the License.
**/

#include "sbsa/include/sbsa_val_interface.h"
#include "common/include/acs_val.h"
#include "common/include/acs_common.h"
#include "common/include/acs_pcie.h"
#include "sbsa/include/sbsa_acs_pcie.h"
#include "sbsa/include/sbsa_val_interface.h"
#include "sbsa/include/sbsa_pal_interface.h"

uint64_t
pal_get_mcfg_ptr(void);
Expand Down Expand Up @@ -211,3 +212,15 @@ val_pcie_disable_ordering(uint32_t bdf)
val_pcie_write_cfg(bdf, pciecs_base + DCTLR_OFFSET, reg_value & dis_mask);

}

/**
@brief Returns the Steering Tag value discovered
@param None
@return Returns the steering tag value
**/
uint32_t val_pcie_dsm_ste_tags(void)
{

return pal_pcie_dsm_ste_tags();
}
5 changes: 5 additions & 0 deletions val/sbsa/src/sbsa_execute_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,11 @@ val_sbsa_pcie_execute_tests(uint32_t level, uint32_t num_pe)
}
#endif

#if defined(TARGET_LINUX) || defined(TARGET_EMULATION)
if (((level > 7) && (g_sbsa_only_level == 0)) || (g_sbsa_only_level == 8))
status |= p066_entry(num_pe);
#endif

val_print_test_end(status, "PCIe");

return status;
Expand Down

0 comments on commit 48c13d2

Please sign in to comment.