Coder Social home page Coder Social logo

libcheckpoint's Introduction

LibCheckpoint

LibCheckpoint is a restorer of "rvgcpt checkpoint" for restoring in-memory architectural state into registers.

Provides the following functions:

  • restore checkpoint which using protobuf point to memory layout (max cores: 128)
  • restore dual core "rvgcpt checkpoint" which using qemu generate (https://github.com/OpenXiangShan/qemu/tree/checkpoint) (Currently the most commonly used)
  • limited M-mode checkpoint restore (it is best not to try to generate checkpoints on bare metal programs)
  • output the in-memory architecture state (before recovery)
  • block core N (using for debug)

How to

  1. Init
pip install --upgrade protobuf grpcio-tools
git submodule update --init
  1. Build for restore checkpoint that using protobuf and 'checkpoint' device (Not officially put into use, only passed testing)
make clean && make -j
  1. Build for qemu dual core checkpoint that put serialize data at 0x80300000~0x80800000 (stable)
make clean && make USING_QEMU_DUAL_CORE_SYSTEM=1

  1. Build restorer that can pause a core's operation (stable)
make STOP_CPU_N=n # n could be any hartid
  1. Build restorer that can display serialize data from memory before unserialize to hardware (stable)
make DISPLAY_CPU_N=0 # n could be any hartid, one appropriate approach is to suspend one of the cores in a dual-core checkpoint and output the serialized data from the other core
  1. Build for link next level bootloader (stable)
make GCPT_PAYLOAD_PATH=/path/to/bbl.bin # default: put next level bootloader at address 0x80100000
make GCPT_PAYLOAD_PATH=/path/to/bbl.bin GCPT_PAYLOAD_POSITION=0x???????? # point to link address
  • The above options are not mutually exclusive and can be used in any combination

Reference

FAQ:

  • warning: build/gcpt has a LOAD segment with RWX permissions
    • this warning does not affect any normal use

libcheckpoint's People

Contributors

xyyy1420 avatar shinezyy avatar sashimi-yzh avatar

Stargazers

Xu, Zefan avatar zhenwei avatar

Watchers

 avatar Xim avatar Steve Gou avatar

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.