Skip to content

Commit

Permalink
Merge pull request #24 from dayeol/dev
Browse files Browse the repository at this point in the history
Make Keystone driver loadable module
  • Loading branch information
dayeol committed Jan 10, 2019
2 parents 83c7b82 + a439746 commit ed28e26
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 7 deletions.
5 changes: 4 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
url = https://github.com/keystone-enclave/busybear-linux
[submodule "riscv-linux"]
path = riscv-linux
url = https://github.com/keystone-enclave/riscv-linux
url = https://github.com/riscv/riscv-linux
[submodule "riscv-pk"]
path = riscv-pk
url = https://github.com/keystone-enclave/riscv-pk
Expand All @@ -16,3 +16,6 @@
[submodule "sdk"]
path = sdk
url = https://github.com/keystone-enclave/keystone-sdk
[submodule "linux-keystone-driver"]
path = linux-keystone-driver
url = https://github.com/keystone-enclave/linux-keystone-driver
2 changes: 1 addition & 1 deletion busybear-linux
15 changes: 12 additions & 3 deletions docs/source/Getting-Started/Guide-to-Components.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,22 @@ riscv-gnu-toolchain
Unmodified toolchain for building riscv targets. Required to build all
other components.

linux-keystone-driver
---------------------

Link: `<https://github.com/keystone-enclave/linux-keystone-driver>`_

A loadable module for Keystone Enclave.
Works in kernels >= 4.17


riscv-linux
-----------

Link: `<https://github.com/keystone-enclave/riscv-linux>`_
Link: `<https://github.com/riscv/riscv-linux>`_

Linux kernel with riscv patches, updated to mainline semi-regularly.
Only Keystone modification is the Keystone driver, in arch/riscv/drivers/.
Linux kernel with riscv patches.
We use 4.15 with patches for the loadable module support.

riscv-pk
--------
Expand Down
22 changes: 21 additions & 1 deletion docs/source/Getting-Started/Running-Keystone-with-QEMU.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ You should apply patches before building the QEMU.
make
cd ..

Build Linux Kernel with Built-in Keystone Driver
Build Linux Kernel
################################################

::
Expand Down Expand Up @@ -128,8 +128,19 @@ Build Root-of-Trust Boot ROM
make
cd ..

Build Keystone Driver
##############################

::

cd linux-keystone-driver
make
make copy
cd ..

Build Keystone SDK
#############################

Keystone SDK includes sample enclave programs and some useful libraries. To run sample programs, you should compile SDK library and apps, and copy all of them into the disk image. Following commands will compile the sdk, and copy sample binaries into the ``busybear.bin`` disk image.

::
Expand Down Expand Up @@ -157,6 +168,15 @@ Login as ``root`` with the password ``busybear``.

You can exit QEMU by ``ctrl-a``+``x``

Insert Keystone Driver
-------------------------------------

Insert the keystone driver.

::

insmod keystone-driver.ko

Run Tests
---------------------------------------

Expand Down
1 change: 1 addition & 0 deletions linux-keystone-driver
Submodule linux-keystone-driver added at 4f8e0e
2 changes: 1 addition & 1 deletion riscv-linux

0 comments on commit ed28e26

Please sign in to comment.