On 2022/11/24 17:32, zhangfei.gao@foxmail.com wrote:
On 2022/11/24 下午3:43, liulongfang wrote:
Update the current driver adaptation and usage method, from fixed use of Hisilicon device driver to automatic registration of the driver according to the algorithm.
When the algorithm API layer uses the driver, it is no longer bound to the fixed device driver, but dynamically obtained and stored according to the algorithm query to use.
Any example? not understand this. Does applications need to be changed?
.
For example: static void __attribute__((constructor)) wd_cipher_open_driver(void) { wd_cipher_setting.dlhandle = dlopen("libhisi_sec.so", RTLD_NOW); if (!wd_cipher_setting.dlhandle) WD_ERR("failed to open libhisi_sec.so, %s\n", dlerror()); }
This is the fixed code writing method between the cipher API and the corresponding HiSilicon sec accelerator driver.
It is recommended that you apply the patch to the latest uadk mainline branch. Here, the zip API and driver are modified together. It is very clear to look at the code directly.
Thanks, Longfang.