The libkos library is the basic KasperskyOS library that provides the set of APIs that allow programs and other libraries (for example, libc and kdf) to use core endpoints. The APIs provided by the libkos library enable solution developers to do the following:
Manage processes, threads, and virtual memory.
Control access to resources.
Perform input/output operations.
Create IPC channels.
Manage power.
Obtain statistical data on the system.
Use other capabilities supported by core endpoints.
On hardware platforms running an Arm processor architecture, input and output parameters of the libkos library API cannot be saved in Device memory because this could lead to unpredictable behavior. (Exceptions to this rule are the addr parameter of the KnVmQuery() function from the vmm_api.h API, the reg and baseReg parameters of functions from the mmio.h API, the va parameter of the KnHalFlushCache() function from the hal_api.h API, and the va parameter of the KosCpuCacheFlush() function from the cpucache.h API.) Parameters of the libkos library API must be saved in Normal memory. To copy data from "Device memory" to "Normal memory" and vice versa, you must use the RtlPedanticMemcpy() function declared in the header file sysroot-*-kos/include/rtl/string_pedantic.h from the KasperskyOS SDK.