| 20077edf | 17-Mar-2021 |
Wei Huang <[email protected]> |
raw/ifpga/base: check null pointer
In init_sec_mgr(), pointer "hw" may be NULL, so "hw" should be checked before dereferencing.
Coverity issue: 367483 Fixes: a05bd1b40bde ("raw/ifpga: add FPGA RSU
raw/ifpga/base: check null pointer
In init_sec_mgr(), pointer "hw" may be NULL, so "hw" should be checked before dereferencing.
Coverity issue: 367483 Fixes: a05bd1b40bde ("raw/ifpga: add FPGA RSU APIs")
Signed-off-by: Wei Huang <[email protected]> Acked-by: Tianfei Zhang <[email protected]> Acked-by: Rosen Xu <[email protected]>
show more ...
|
| bf95921a | 17-Mar-2021 |
Wei Huang <[email protected]> |
raw/ifpga/base: check file length
In fpga_update_flash(), "smgr->rsu_length" is passed to a parameter that cannot be negative. So return value of function "lseek" should be checked before being assi
raw/ifpga/base: check file length
In fpga_update_flash(), "smgr->rsu_length" is passed to a parameter that cannot be negative. So return value of function "lseek" should be checked before being assigned to "smgr->rsu_length".
Coverity issue: 367481 Fixes: a05bd1b40bde ("raw/ifpga: add FPGA RSU APIs")
Signed-off-by: Wei Huang <[email protected]> Acked-by: Tianfei Zhang <[email protected]> Acked-by: Rosen Xu <[email protected]>
show more ...
|
| e6dc14c8 | 05-Nov-2020 |
Wei Huang <[email protected]> |
raw/ifpga/base: check adapter pointer before dereference
In opae_adapter_destroy(), pointer "adapter" is not validated before passing it to opae_adapter_shm_free() and opae_adapter_mutex_close() whi
raw/ifpga/base: check adapter pointer before dereference
In opae_adapter_destroy(), pointer "adapter" is not validated before passing it to opae_adapter_shm_free() and opae_adapter_mutex_close() which dereference it.
Coverity issue: 363752 Fixes: e41856b515ce ("raw/ifpga/base: enhance driver reliability in multi-process")
Signed-off-by: Wei Huang <[email protected]> Acked-by: Rosen Xu <[email protected]>
show more ...
|
| e41856b5 | 23-Oct-2020 |
Wei Huang <[email protected]> |
raw/ifpga/base: enhance driver reliability in multi-process
Current hardware protection is based on pthread mutex which work just for situation of multi-thread in one process. In multi-process envir
raw/ifpga/base: enhance driver reliability in multi-process
Current hardware protection is based on pthread mutex which work just for situation of multi-thread in one process. In multi-process environment, hardware state machine would be corrupted by concurrent access, that means original pthread mutex mechanism need be enhanced.
The major modifications in this patch are list below: 1. Create a mutex for adapter in shared memory named "mutex.IFPGA:domain:bus:dev.func" when device is probed. 2. Create a shared memory named "IFPGA:domain:bus:dev.func" during opae adapter is initializing. There is a reference count in shared memory. Shared memory will be destroyed once reference count turned to zero. 3. Two mutexs are created in shared memory and initialized with flag PTHREAD_PROCESS_SHARED. One for SPI and the other for I2C. They will be passed to SPI and I2C driver subsequently. 4. DTB data in flash will be cached in shared memory. Then MAX10 driver can read DTB from shared memory instead of flash. This avoid confliction of concurrent flash access between hardware and software.
Signed-off-by: Wei Huang <[email protected]> Signed-off-by: Tianfei Zhang <[email protected]> Acked-by: Rosen Xu <[email protected]>
show more ...
|
| cbcf2263 | 14-Jul-2020 |
Tianfei Zhang <[email protected]> |
raw/ifpga/base: fix NIOS SPI init
Add fecmode setting on NIOS SPI primary initialization. this SPI is shared by NIOS core inside FPGA, NIOS will use this SPI primary to do some one-time initializati
raw/ifpga/base: fix NIOS SPI init
Add fecmode setting on NIOS SPI primary initialization. this SPI is shared by NIOS core inside FPGA, NIOS will use this SPI primary to do some one-time initialization after power up, and then release the control to DPDK.
Fix the timeout initialization for polling the NIOS_INIT_DONE.
Fixes: bc44402f ("raw/ifpga/base: configure FEC mode") Cc: [email protected]
Signed-off-by: Tianfei Zhang <[email protected]> Acked-by: Rosen Xu <[email protected]>
show more ...
|
| 4a19f891 | 14-Nov-2019 |
Tianfei Zhang <[email protected]> |
raw/ifpga/base: support multiple cards
In PAC N3000 card, there is one MAX10 chip in each card, and all of the sensors are connected to MAX10 chip. To support multiple cards in one server, we introd
raw/ifpga/base: support multiple cards
In PAC N3000 card, there is one MAX10 chip in each card, and all of the sensors are connected to MAX10 chip. To support multiple cards in one server, we introducing a sensor device list under intel_max10_device instead of a global list. On the other hand, we using separate intel_max10_device instance for each opae_adatper.
Add mutex lock on do_transaction() function for SPI driver to avoid race condition.
Signed-off-by: Tianfei Zhang <[email protected]> Signed-off-by: Andy Pei <[email protected]>
show more ...
|