Giter Club home page Giter Club logo

coffer's Introduction

Coffer RISC-V Trusted Execution Environment

Issue Rust riscv64

Table of contents

  1. What is Coffer?
  2. Quickstart with QEMU.
  3. Quickstart with Nezha D1.
  4. Current Status.
  5. Contact.
  6. License and Copyright.

What is Coffer?

Coffer is designed to be an flexible, software-based trusted execution environment. It requires a minimal hardware primitive (PMP is all you need!) to provide a powerful software interface for TEE.

asciicast

Quickstart with QEMU

To run Linux with Coffer, you will need to prepare a Linux image and a rootfs.

One may refer to this tutorial (EN) or this tutorial (CN) to learn how to build your own image and rootfs.

Once your Linux/rootfs is ready, you can run just one line to get coffer booting Linux in qemu.

just qemu <path-to-your-kernel> <path-to-your-rootfs>

Quickstart with Nezha D1

To run Linux with Coffer on Nezha D1 SoC, you will first need to get the Nezha SDK ready.

One may refer to the official guide to learn how to get Allwinner SDK setup.

To replace OpenSBI with Coffer, you will need to run the following command.

# Make other stuff using Allwinner SDK
just release sunxi # build coffer for target platform Nezha D1
cp coffer <path-to-allwinner-sdk>/device/config/chips/d1/bin/opensbi_sun20iw1p1.bin # replace OpenSBI with Coffer

Once copied into the SDK, you can continue the tutorial provided by AllWinner and run Linux on D1 with Coffer enabled.

Current Status

Coffer has serveral goals to archive in terms of both security and functionality.

  • Linux-capable Bootload
  • SBI Standard Implementation
  • Runtime Memory Protection
  • I/O Space Protection
  • Firmware Specific Binary Interface
  • Port to SiFive Unleashed Board
  • Enclave Memory Migration

Contact

You can email [email protected] if you have any questions about Coffer.

License and Copyright

See LICENSE for distribution and use of source code, binaries, and documentation.

coffer's People

Contributors

jwnhy avatar

Stargazers

Chen Peiwen avatar Lowie Deferme avatar  avatar Peter Lin avatar  avatar Ian Dutfield avatar Mahiru Kagura avatar Benshan Mei avatar Baby Melvin avatar ChengXiang Qi avatar Derui Yang avatar José Martins avatar Dmitrii Kuznetsov avatar Nikita avatar Luo Jia / Zhouqi Jiang avatar hwanning avatar  avatar Neko Null avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

mfkiwl

coffer's Issues

Library Completion & Compatibility Issues with Latest Version of Rust

This library shows promise, but unfortunately, it needs code updates to function correctly with the latest version of Rust. Not only do some function definitions and macros need to be updated and removed, but also, various aspects of the library seem unfinished. For instance, the banner function is demonstrated in the demo video, yet it fails to execute during runtime. When running using qemu and the VIRT Machine the program just hangs and does not go through the SBI process.

Steps to reproduce:

  1. Update Rust to Rust 2022 and fix Code errors
  2. Use QEMU VIRT machine emulation instead of default SUNXI

Expected result: The program runs through the SBI process, sets up the TEE and finally boots into a linux environment as shown in the demo video.

Actual result: Outdated function definitions and macros cause compilation difficulties, and once compiled the program displays an unknown error at an address within the Coffer start and end memory locations.

Given that this project has been recognized with a RiscV SBI Implementation ID I would like to explore this project further if this library was updated to become fully functional. Hopefully it won't be abandoned as it seems right this moment.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.