From 38ae337f702265a98954f4ba461c35b8f1c026cc Mon Sep 17 00:00:00 2001 From: Sujana M Date: Thu, 10 Apr 2025 17:23:56 +0530 Subject: [PATCH] Support to limit entire PCIe space - Added placeholder PAL API to provide support to skip buses during PCIe table creation to ensure less time taken in pre-silicon Signed-off-by: Sujana M --- .../files/common/include/pal_pcie_enum.h | 5 ++++- .../files/common/src/pal_pcie_enumeration.c | 19 ++++++++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/acs-drv/files/platform/pal_linux/files/common/include/pal_pcie_enum.h b/acs-drv/files/platform/pal_linux/files/common/include/pal_pcie_enum.h index da7d0a5..06db3a1 100644 --- a/acs-drv/files/platform/pal_linux/files/common/include/pal_pcie_enum.h +++ b/acs-drv/files/platform/pal_linux/files/common/include/pal_pcie_enum.h @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * - * Copyright (C) 2016-2018, 2021-2022, 2024, Arm Limited + * Copyright (C) 2016-2018, 2021-2022, 2024-2025, Arm Limited * * Author: Prasanth Pulla * @@ -58,6 +58,9 @@ pal_pci_write_config_byte(uint32_t bdf, uint8_t offset, uint8_t val); unsigned int pal_pcie_check_device_valid(unsigned int bdf); +unsigned int +pal_pcie_check_bus_valid(unsigned int bus_index); + void *pal_mem_calloc(unsigned int num, unsigned int size); diff --git a/acs-drv/files/platform/pal_linux/files/common/src/pal_pcie_enumeration.c b/acs-drv/files/platform/pal_linux/files/common/src/pal_pcie_enumeration.c index 582a070..57ff617 100644 --- a/acs-drv/files/platform/pal_linux/files/common/src/pal_pcie_enumeration.c +++ b/acs-drv/files/platform/pal_linux/files/common/src/pal_pcie_enumeration.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * - * Copyright (C) 2016-2018, 2021-2022, 2024, Arm Limited + * Copyright (C) 2016-2018, 2021-2022, 2024-2025, Arm Limited * * Author: Prasanth Pulla * @@ -185,3 +185,20 @@ pal_pcie_check_device_valid(unsigned int bdf) return 1; } + +/** + @brief This API is used as placeholder to check if the bus + is to be skipped for PCIe table creation + + @param bus_index + @return 1 if bus to be skipped else 0 +**/ +unsigned int +pal_pcie_check_bus_valid(unsigned int bus_index) +{ + /* Add Bus index to this function if PCIe table + creation need to be ignored for a bus + */ + + return 0; +} -- GitLab