Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support generate checkpoint to flash file and memory file, and support restore from these files #714

Open
wants to merge 40 commits into
base: master
Choose a base branch
from

Conversation

xyyy1420
Copy link
Contributor

@xyyy1420 xyyy1420 commented Dec 10, 2024

  • Submodule
    • add protobuf
  • take cpt to flash
    • support for generating checkpoints to flash, thus avoiding the need to link payloads with libcheckpointAlpha.
    • two files will be generated, a flash image and a memory image
    • support difftest from flash
    • change the restore option to specify a flash image, since both checkpoint images and binary are essentially memory mirrors
  • difftest
    • support override ref model pmp and pmpcfg regs
    • support override ref model flash contents
    • tried to fix difftest attach but failed, because of spike has many non-register states which are hard to fix
  • CI
    • because protobuf is added, submodule is initialized by default in CI
    • add take cpt with flash and restore cpt with flash
    • migrating nutshell-spike-ref from local to ready-to-run
  • config file
    • fix the address setting in NEMU riscv64-nutshell-diff-spike_defconfig according to the flash address set in spike.
    • add two configuration files for generating checkpoints to be placed in flash
  • MMIO
    • add three flags to indicate which operations need to skip difftest ref model

@xyyy1420 xyyy1420 requested a review from shinezyy December 10, 2024 09:19
@xyyy1420
Copy link
Contributor Author

load gcpt to flash need position-indenpendent code OpenXiangShan/LibCheckpointAlpha#6

@xyyy1420 xyyy1420 force-pushed the protobuf_and_restore_device branch 4 times, most recently from 32d4183 to ddf2930 Compare December 10, 2024 10:40
@xyyy1420
Copy link
Contributor Author

OpenXiangShan/riscv-isa-sim#70 this pr fixes the difftest after checkpoint restore

@xyyy1420 xyyy1420 marked this pull request as draft December 19, 2024 02:25
@xyyy1420 xyyy1420 force-pushed the protobuf_and_restore_device branch from 2f10b4f to 266e786 Compare December 19, 2024 03:22
@xyyy1420
Copy link
Contributor Author

OpenXiangShan/ready-to-run#78 Bump spike ref in ready-to-run

@xyyy1420
Copy link
Contributor Author

OpenXiangShan/ready-to-run#79 add nutshell spike so to ready-to-run

@xyyy1420
Copy link
Contributor Author

OpenXiangShan/riscv-isa-sim#71 support force override vtype

@xyyy1420
Copy link
Contributor Author

OpenXiangShan/ready-to-run#80 bump spike ref in ready-to-run

@xyyy1420
Copy link
Contributor Author

OpenXiangShan/riscv-isa-sim#75 support override spike flash

Signed-off-by: jiaxiaoyu <xyyy1420@gmail.com>
add protobuf, using for encode checkpoint memlayout

Signed-off-by: jiaxiaoyu <xyyy1420@gmail.com>
Signed-off-by: jiaxiaoyu <xyyy1420@gmail.com>
Signed-off-by: jiaxiaoyu <xyyy1420@gmail.com>
Signed-off-by: jiaxiaoyu <xyyy1420@gmail.com>
Signed-off-by: jiaxiaoyu <xyyy1420@gmail.com>
Signed-off-by: jiaxiaoyu <xyyy1420@gmail.com>
Signed-off-by: jiaxiaoyu <xyyy1420@gmail.com>
Signed-off-by: jiaxiaoyu <xyyy1420@gmail.com>
…lash archive, and support load checkpoint from these files

Signed-off-by: jiaxiaoyu <xyyy1420@gmail.com>
Signed-off-by: jiaxiaoyu <xyyy1420@gmail.com>
… 'protobuf' first

Signed-off-by: jiaxiaoyu <xyyy1420@gmail.com>
Signed-off-by: jiaxiaoyu <xyyy1420@gmail.com>
…able

Signed-off-by: jiaxiaoyu <xyyy1420@gmail.com>
Signed-off-by: jiaxiaoyu <xyyy1420@gmail.com>
Signed-off-by: jiaxiaoyu <xyyy1420@gmail.com>
Signed-off-by: jiaxiaoyu <xyyy1420@gmail.com>
Signed-off-by: jiaxiaoyu <xyyy1420@gmail.com>
Signed-off-by: jiaxiaoyu <xyyy1420@gmail.com>
Signed-off-by: jiaxiaoyu <xyyy1420@gmail.com>
Signed-off-by: jiaxiaoyu <xyyy1420@gmail.com>
…o specify the checkpoint file.

Signed-off-by: jiaxiaoyu <xyyy1420@gmail.com>
…so of ready-to-run

Signed-off-by: jiaxiaoyu <xyyy1420@gmail.com>
Signed-off-by: jiaxiaoyu <xyyy1420@gmail.com>
…o specify the checkpoint file.

Signed-off-by: jiaxiaoyu <xyyy1420@gmail.com>
Signed-off-by: jiaxiaoyu <xyyy1420@gmail.com>
Signed-off-by: jiaxiaoyu <xyyy1420@gmail.com>
Signed-off-by: jiaxiaoyu <xyyy1420@gmail.com>
@xyyy1420 xyyy1420 force-pushed the protobuf_and_restore_device branch from 141efc5 to aed3ce1 Compare December 25, 2024 08:15
Signed-off-by: jiaxiaoyu <xyyy1420@gmail.com>
Signed-off-by: jiaxiaoyu <xyyy1420@gmail.com>
Signed-off-by: jiaxiaoyu <xyyy1420@gmail.com>
Signed-off-by: jiaxiaoyu <xyyy1420@gmail.com>
Signed-off-by: jiaxiaoyu <xyyy1420@gmail.com>
Signed-off-by: jiaxiaoyu <xyyy1420@gmail.com>
Signed-off-by: jiaxiaoyu <xyyy1420@gmail.com>
Signed-off-by: jiaxiaoyu <xyyy1420@gmail.com>
Signed-off-by: jiaxiaoyu <xyyy1420@gmail.com>
Signed-off-by: jiaxiaoyu <xyyy1420@gmail.com>
@xyyy1420 xyyy1420 marked this pull request as ready for review December 26, 2024 07:11
Copy link
Member

@poemonsense poemonsense left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is difficult for me to review such a large PR. Is it possible to split it into multiple smaller PRs?

@xyyy1420
Copy link
Contributor Author

It is difficult for me to review such a large PR. Is it possible to split it into multiple smaller PRs?

Okay, I'm going to split it and request a review again.

@cebarobot
Copy link
Member

I agree with great Poemonsense. It's better to split this large PR into smaller ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants