diff --git a/bsa-acs-drv/files/bsa_acs_drv.h b/bsa-acs-drv/files/bsa_acs_drv.h index df42a0cbb2126c2f3eec7a3beef88c384bf5abe1..b19126b2ef1874e56df0c5302174ac26f2d1ab73 100644 --- a/bsa-acs-drv/files/bsa_acs_drv.h +++ b/bsa-acs-drv/files/bsa_acs_drv.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-2021 Arm Limited + * Copyright (C) 2016-2024 Arm Limited * * Author: Prasanth Pulla * @@ -39,15 +39,12 @@ #define DRV_STATUS_AVAILABLE 0x10000000 #define DRV_STATUS_PENDING 0x40000000 -#define PE_INFO_TBL_SZ 8192 -#define GIC_INFO_TBL_SZ 2048 -#define TIMER_INFO_TBL_SZ 1024 -#define WD_INFO_TBL_SZ 512 -#define MEM_INFO_TBL_SZ 4096 -#define IOVIRT_INFO_TBL_SZ 32768 -#define PERIPHERAL_INFO_TBL_SZ 2883584 -#define PCIE_INFO_TBL_SZ 1024 -#define DMA_INFO_TBL_SZ 1024 +/* Please MAKE SURE all table sizes are 16 bytes aligned */ +#define PE_INFO_TBL_SZ 16384 /* Supports maximum 400 PEs [40 B each + 4 B header] */ +#define IOVIRT_INFO_TBL_SZ 1048576 /* Supports maximum 2400 iort nodes [268+32*5 B each + 24 B header] */ +#define PERIPHERAL_INFO_TBL_SZ 8192 /* Supports maximum 145 PCIe peripheral device (anykind) [56 B each + 16 B header] */ +#define PCIE_INFO_TBL_SZ 512 /* Supports maximum 20 PCIe ECAM block [24 B each + 4 B header] */ +#define DMA_INFO_TBL_SZ 1024 /* Supports maximum 30 DMA ctrl [32 B each + 4 B header] */ #define ACS_PCIE_RCiEP_DISABLE 0 typedef diff --git a/bsa-acs-drv/files/platform/pal_linux/files/src/pal_dma.c b/bsa-acs-drv/files/platform/pal_linux/files/src/pal_dma.c index f87e6a16351d4c90a6c8287dcebc822992292cd0..383e9a6fedccea73dc80516f2f127214cdd63847 100644 --- a/bsa-acs-drv/files/platform/pal_linux/files/src/pal_dma.c +++ b/bsa-acs-drv/files/platform/pal_linux/files/src/pal_dma.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,2023, Arm Limited + * Copyright (C) 2016-2018,2021,2023-2024 Arm Limited * * Author: Prasanth Pulla * @@ -121,6 +121,8 @@ pal_dma_create_info_table(DMA_INFO_TABLE *dma_info_table) ap = ata_shost_to_port(shost); if ((ap == NULL) || (ap->dev == NULL)) continue; //Not a ATA port + if ((ap->scsi_host == NULL) || (ap->scsi_host != shost)) + continue; //Not a valid ATA Port do { /* get the device connected to this host */ sdev = __scsi_iterate_devices(shost, sdev); diff --git a/sbsa-acs-drv/files/platform/pal_linux/files/src/pal_dma.c b/sbsa-acs-drv/files/platform/pal_linux/files/src/pal_dma.c index 95b6ef506a1f5b29b916872c69290defeff98903..3f098bfe84cbbafcc7a185fbb29a7376d4bdcddf 100644 --- a/sbsa-acs-drv/files/platform/pal_linux/files/src/pal_dma.c +++ b/sbsa-acs-drv/files/platform/pal_linux/files/src/pal_dma.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, 2023, Arm Limited + * Copyright (C) 2016-2018, 2021, 2023-2024 Arm Limited * * Author: Prasanth Pulla * @@ -121,6 +121,8 @@ pal_dma_create_info_table(DMA_INFO_TABLE *dma_info_table) ap = ata_shost_to_port(shost); if ((ap == NULL) || (ap->dev == NULL)) continue; //Not a ATA port + if ((ap->scsi_host == NULL) || (ap->scsi_host != shost)) + continue; //Not a valid ATA Port do { /* get the device connected to this host */ sdev = __scsi_iterate_devices(shost, sdev); diff --git a/sbsa-acs-drv/files/sbsa_acs_drv.h b/sbsa-acs-drv/files/sbsa_acs_drv.h index 46c1cf70b8468f64d1e265eb2b9f53969af7389f..25646217603cf9b15baaa1629e648fcb1f29b519 100644 --- a/sbsa-acs-drv/files/sbsa_acs_drv.h +++ b/sbsa-acs-drv/files/sbsa_acs_drv.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-2020, 2023 Arm Limited + * Copyright (C) 2016-2020, 2023-2024 Arm Limited * * Author: Prasanth Pulla * @@ -37,15 +37,12 @@ #define DRV_STATUS_AVAILABLE 0x10000000 #define DRV_STATUS_PENDING 0x40000000 -#define PE_INFO_TBL_SZ 8192 -#define GIC_INFO_TBL_SZ 2048 -#define TIMER_INFO_TBL_SZ 1024 -#define WD_INFO_TBL_SZ 512 -#define MEM_INFO_TBL_SZ 4096 -#define IOVIRT_INFO_TBL_SZ 32768 -#define PERIPHERAL_INFO_TBL_SZ 2883584 -#define PCIE_INFO_TBL_SZ 1024 -#define DMA_INFO_TBL_SZ 1024 +/* Please MAKE SURE all table sizes are 16 bytes aligned */ +#define PE_INFO_TBL_SZ 16384 /* Supports maximum 400 PEs [40 B each + 4 B header] */ +#define IOVIRT_INFO_TBL_SZ 1048576 /* Supports maximum 2400 iort nodes [268+32*5 B each + 24 B header] */ +#define PERIPHERAL_INFO_TBL_SZ 8192 /* Supports maximum 145 PCIe peripheral device (anykind) [56 B each + 16 B header] */ +#define PCIE_INFO_TBL_SZ 512 /* Supports maximum 20 PCIe ECAM block [24 B each + 4 B header] */ +#define DMA_INFO_TBL_SZ 1024 /* Supports maximum 30 DMA ctrl [32 B each + 4 B header] */ typedef struct __TEST_PARAMS__