Visible to Intel only — GUID: GUID-4415B896-E9B1-4C1E-BF42-6C8B59FC23AA
Visible to Intel only — GUID: GUID-4415B896-E9B1-4C1E-BF42-6C8B59FC23AA
KDI Sample
This sample is a simple Linux host application that uses KDI (Kernel DAL Interface), an Intel® Dynamic Application Loader (Intel® DAL) Linux kernel module. (Supported on platforms running API level 8 and above.)
Note: You will be able to run the sample once a Linux kernel has been released containing KDI and Intel® Dynamic Application Loader (Intel® DAL) Test module.
Note: In the first release of the SDK, this sample is not included in the installer. It is located on the Intel DAL download page, under Related downloads. To access the download page, click the Download button on the Intel DAL home page.
The sample loads a trusted application into the Intel DAL virtual machine (VM), using the Intel® DAL Host Interface Service (JHI), and uses KDI to communicate with the trusted application.
Note: KDI is usually used by Linux modules in kernel space. This sample is run over user space to simplify its operation.
A typical use case is to create a kernel module to communicate with KDI.
The sample uses the Intel DAL test Linux module , which is compiled under the kernel configuration CONFIG_INTEL_MEI_DAL_TEST, to call the KDI APIs inside the kernel space. For details, refer to the test module code for kernel developer use.
Components
- Bist applet (simple echo applet)
- Intel DAL host application
Sample Flow
The sample does the following:
- Installs a trusted application. (See the java code in Bist.java. The application uses the compiled and signed trusted application.) The installation is performed from the user space, using teemanagement APIs.
- Uses KDI to open a session to the trusted application. The command is sent to KDI via the Intel DAL test module.
- Uses the trusted application's SendAndRecv function to send a command and receive data, using KDI via the Intel DAL test module.
- Uses KDI to close the session.
- Uses the Intel® DAL Host Interface Service (JHI) to uninstall the trusted application.
Running the Sample
To run the sample, do the following:
- Install CMake.
- Run the following inside the sample directory:
cmake . make
This will create an executable file: kdi_sample.
3. Run the executable:
./kdi_sample