Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
49baea5
delete useless code
xyyy1420 Mar 8, 2024
255a606
checkpoint: add gcpt device, cpu regs will store in device mmio space,
xyyy1420 Mar 8, 2024
ce06338
checkpoint: add using_gcpt_mmio arg
xyyy1420 Mar 8, 2024
663dcd0
checkpoint: add compress gcpt and pmem space
xyyy1420 Mar 8, 2024
704ff3c
is_gz/zstd_file: panic support filename
xyyy1420 Mar 8, 2024
16da779
finish zstd/gz checkpoint using gcpt device and restore from device
xyyy1420 Mar 11, 2024
9372be8
fix ng checkpoint
xyyy1420 Dec 4, 2024
492aa13
feat(libcheckpoint): add support for libcheckpoint
xyyy1420 Dec 6, 2024
46ecdc2
feat(libcheckpoint): migrate to libcheckpoint memlayout
xyyy1420 Dec 10, 2024
ba303bf
feat(checkpoint): support generate checkpoint to memory archive and f…
xyyy1420 Dec 10, 2024
3c23325
feat(cpt-defconfig): support next-generation checkpoint by default
xyyy1420 Dec 10, 2024
5d6509d
feat(checkpoint): support libcheckpoint memlayout need init submodule…
xyyy1420 Dec 10, 2024
f5c5933
fix(flash): fix bugs using flash devices
xyyy1420 Dec 10, 2024
0b71c23
set limit, just using next generation checkpoint when flash device en…
xyyy1420 Dec 11, 2024
0108e0a
fix take checkpoint script
xyyy1420 Dec 11, 2024
62b4f6a
fix(difftest attach): add pmp and pmp cfg copy to difftest attach
xyyy1420 Dec 17, 2024
362421f
feat(flash): skip flash difftest
xyyy1420 Dec 18, 2024
3a48709
feat: add new config file to support libcheckpoint
xyyy1420 Dec 18, 2024
30d8ac3
feat: update ci, support check checkpoint with flash
xyyy1420 Dec 19, 2024
9cfad1a
fix(config): update config for more accurate instruction counting
xyyy1420 Dec 19, 2024
f15cc7c
fix(jrelop): check difftest attch when exec jrelop
xyyy1420 Dec 19, 2024
01c5f7c
Bump submodule(ready-to-run): Bump spike ref, nemu ref in ready-to-run
xyyy1420 Dec 19, 2024
fc5e44a
fix(difftest): Enable pmp register copy only when flash exists
xyyy1420 Dec 19, 2024
8a5a36d
fix(ci): The restore parameter has changed its function and is used t…
xyyy1420 Dec 19, 2024
f04e4c2
feat(ci): Replace the local spike-so used by nutshell with the spike-…
xyyy1420 Dec 19, 2024
a055d5c
feat(difftest): add detach and attach log
xyyy1420 Dec 19, 2024
c013291
fix(ci): The restore parameter has changed its function and is used t…
xyyy1420 Dec 19, 2024
f796a25
fix(ci): Delete intermediates
xyyy1420 Dec 20, 2024
0513f74
Bump submodule(ready-to-run): Bump spike ref in ready-to-run
xyyy1420 Dec 20, 2024
8264153
debug
xyyy1420 Dec 20, 2024
923297c
feat(difftest): Supports selective difftest of mmio address space
xyyy1420 Dec 25, 2024
1771d44
delete useless output
xyyy1420 Dec 25, 2024
ee6b1ec
delete debug code
xyyy1420 Dec 25, 2024
aed3ce1
bump ready-to-run
xyyy1420 Dec 25, 2024
dbf91da
fix compile in centos docker
xyyy1420 Dec 25, 2024
ff7fd5f
fix ci error
xyyy1420 Dec 25, 2024
27a7019
fix ci error
xyyy1420 Dec 25, 2024
e3ebffe
fix mmio skip diff flag
xyyy1420 Dec 26, 2024
0230e0f
fix mmio skip difftest ref
xyyy1420 Dec 26, 2024
c023a91
fix mmio map
xyyy1420 Dec 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 30 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
env:
CI_WORKLOADS: /nfs/home/share/ci-workloads
SPIKE_SO: ./ready-to-run/riscv64-spike-so
NUTSHELL_SPIKE_SO: ./ready-to-run/riscv64-nutshell-spike-so

jobs:
compilation-all:
Expand All @@ -22,6 +23,7 @@ jobs:
- name: Setup env
run: |
echo "NEMU_HOME=$GITHUB_WORKSPACE" >> $GITHUB_ENV
git submodule update --init --depth=1
- name: Try to compile
id: list_configs
run: |
Expand All @@ -40,6 +42,7 @@ jobs:
echo "V_WORKLOAD_HOME=/nfs/home/share/ci-workloads/V-extension-tests" >> $GITHUB_ENV
- name: Build NEMU interpreter for XS
run: |
git submodule update --init --depth=1
make riscv64-xs_defconfig
make -j
- name: System - linux-hello-opensbi
Expand All @@ -62,11 +65,24 @@ jobs:
make clean-all

# restore cpt
git submodule update --init --depth=1 ready-to-run
make riscv64-xs-diff-spike_defconfig
make -j
bash ./scripts/restore_zstd.sh
make clean-all
rm -rf output_top

#take cpt with flash
make clean-all
make riscv64-xs-cpt-flash_defconfig
make -j
bash ./scripts/take_zstd_from_flash.sh
make clean-all

#restore cpt from flash, with difftest
make riscv64-xs-diff-spike-withflash_defconfig
make -j
bash ./scripts/restore_zstd_from_flash.sh
make clean-all

basic-nutshell:
runs-on: nemu
Expand All @@ -80,6 +96,7 @@ jobs:
echo "NEMU_HOME=$GITHUB_WORKSPACE" >> $GITHUB_ENV
- name: Build NEMU interpreter
run: |
git submodule update --init --depth=1
make riscv64-nutshell_defconfig
make -j
- name: test boot linux
Expand All @@ -92,7 +109,7 @@ jobs:
make -j
- name: test boot linux with difftest
run: |
./build/riscv64-nemu-interpreter -b --diff ${CI_WORKLOADS}/nutshell/riscv64-spike-so ${CI_WORKLOADS}/linux-hello/bbl.bin
./build/riscv64-nemu-interpreter -b --diff ${NUTSHELL_SPIKE_SO} ${CI_WORKLOADS}/linux-hello/bbl.bin

diff-spike-guard:
# NEMU should report error if RVV agnostic is enabled when comparing against Spike ref; It should crash in the expected way
Expand All @@ -108,12 +125,12 @@ jobs:
echo "TEST_HOME=/nfs/home/share/ci-workloads/V-extension-tests" >> $GITHUB_ENV
- name: Build NEMU with V extension and agnostic
run: |
git submodule update --init --depth=1 ready-to-run
git submodule update --init --depth=1
make clean-all
make riscv64-xs-diff-spike-agnostic_defconfig
make -j
set -x
./build/riscv64-nemu-interpreter -b --diff ${SPIKE_SO} --restore $TEST_HOME/hmmer_retro_6200_0.0378585.gz -r $TEST_HOME/v-gcpt.bin -I 2000000 > crash.log || exit_code=$?
./build/riscv64-nemu-interpreter -b --diff ${SPIKE_SO} $TEST_HOME/hmmer_retro_6200_0.0378585.gz -r $TEST_HOME/v-gcpt.bin -I 2000000 > crash.log || exit_code=$?
if [ ${exit_code} -eq 0 ]; then echo "Difftest is broken, it should report error!" exit 1; fi
match=$(grep "wrong.*=.*ffff" crash.log -c)
if [ ${match} -eq 0 ]; then echo "Difftest is broken, it should report at least one agnostic related difference!" exit 1; fi
Expand All @@ -134,7 +151,7 @@ jobs:

- name: Build NEMU interpreter for diff with spike
run: |
git submodule update --init --depth=1 ready-to-run
git submodule update --init --depth=1
make riscv64-xs-diff-spike_defconfig
make -j

Expand Down Expand Up @@ -254,19 +271,19 @@ jobs:

- name: Build NEMU interpreter for diff with spike
run: |
git submodule update --init --depth=1 ready-to-run
git submodule update --init --depth=1
make riscv64-xs-diff-spike_defconfig
make -j

- name: Run Vector-spec06-checkpoint with Spike DiffTest
run: |
./build/riscv64-nemu-interpreter -b --diff ${SPIKE_SO} --restore $TEST_HOME/hmmer_nph3_1886_0.000268086.gz -r $TEST_HOME/v-gcpt.bin -I 40000000
./build/riscv64-nemu-interpreter -b --diff ${SPIKE_SO} --restore $TEST_HOME/hmmer_retro_6200_0.0378585.gz -r $TEST_HOME/v-gcpt.bin -I 40000000
./build/riscv64-nemu-interpreter -b --diff ${SPIKE_SO} --restore $TEST_HOME/h264ref_sss_88321_0.0346343.gz -r $TEST_HOME/v-gcpt.bin -I 40000000
./build/riscv64-nemu-interpreter -b --diff ${SPIKE_SO} --restore $TEST_HOME/h264ref_foreman.baseline_8028_0.0414445.gz -r $TEST_HOME/v-gcpt.bin -I 40000000
./build/riscv64-nemu-interpreter -b --diff ${SPIKE_SO} --restore $TEST_HOME/h264ref_foreman.main_3027_0.0443573.gz -r $TEST_HOME/v-gcpt.bin -I 40000000
./build/riscv64-nemu-interpreter -b --diff ${SPIKE_SO} --restore $TEST_HOME/libquantum_41028_0.0840681.gz -r $TEST_HOME/v-gcpt.bin -I 40000000
./build/riscv64-nemu-interpreter -b --diff ${SPIKE_SO} --restore $TEST_HOME/bzip2_402_0.00785398.gz -r $TEST_HOME/v-gcpt.bin -I 40000000
./build/riscv64-nemu-interpreter $TEST_HOME/hmmer_nph3_1886_0.000268086.gz -b --diff ${SPIKE_SO} -r $TEST_HOME/v-gcpt.bin -I 40000000
./build/riscv64-nemu-interpreter $TEST_HOME/hmmer_retro_6200_0.0378585.gz -b --diff ${SPIKE_SO} -r $TEST_HOME/v-gcpt.bin -I 40000000
./build/riscv64-nemu-interpreter $TEST_HOME/h264ref_sss_88321_0.0346343.gz -b --diff ${SPIKE_SO} -r $TEST_HOME/v-gcpt.bin -I 40000000
./build/riscv64-nemu-interpreter $TEST_HOME/h264ref_foreman.baseline_8028_0.0414445.gz -b --diff ${SPIKE_SO} -r $TEST_HOME/v-gcpt.bin -I 40000000
./build/riscv64-nemu-interpreter $TEST_HOME/h264ref_foreman.main_3027_0.0443573.gz -b --diff ${SPIKE_SO} -r $TEST_HOME/v-gcpt.bin -I 40000000
./build/riscv64-nemu-interpreter $TEST_HOME/libquantum_41028_0.0840681.gz -b --diff ${SPIKE_SO} -r $TEST_HOME/v-gcpt.bin -I 40000000
./build/riscv64-nemu-interpreter $TEST_HOME/bzip2_402_0.00785398.gz -b --diff ${SPIKE_SO} -r $TEST_HOME/v-gcpt.bin -I 40000000

- name: Run OpenSBI+Linux+Vectorized_h264 with Spike DiffTest
run: |
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
[submodule "resource/simpoint/simpoint_repo"]
path = resource/simpoint/simpoint_repo
url = https://github.com/shinezyy/SimPoint.3.2-fix.git
[submodule "resource/nanopb"]
path = resource/nanopb
url = https://github.com/nanopb/nanopb
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ DIRS-y += src/checkpoint
endif

SRCS-y += $(shell find $(DIRS-y) -name "*.c")
SRCS-y += resource/nanopb/pb_common.c
SRCS-y += resource/nanopb/pb_decode.c
SRCS-y += resource/nanopb/pb_encode.c
INC_DIR += resource/nanopb
INC_DIR += include/checkpoint
SRCS-y += $(patsub %.proto,%.pb.c,(shell find $(DIRS-y) -name "*.proto"))

SRCS = $(SRCS-y)

Expand Down
2 changes: 1 addition & 1 deletion configs/riscv64-nutshell-diff-spike_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ CONFIG_RTC_MMIO=0xa1000048
# CONFIG_HAS_SDCARD is not set
CONFIG_HAS_FLASH=y
CONFIG_FLASH_PRESET_CONTENT="0x0010029b,0x01f29293,0x00028067"
CONFIG_FLASH_START_ADDR=0x10000000
CONFIG_FLASH_START_ADDR=0x40000000
CONFIG_FLASH_SIZE=0x00000100
CONFIG_FLASH_IMG_PATH=""
# CONFIG_FPU_HOST is not set
Expand Down
210 changes: 210 additions & 0 deletions configs/riscv64-xs-cpt-flash_defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
#
# Automatically generated file; DO NOT EDIT.
# NEMU Configuration Menu
#
# CONFIG_ISA_x86 is not set
# CONFIG_ISA_mips32 is not set
# CONFIG_ISA_riscv32 is not set
CONFIG_ISA_riscv64=y
CONFIG_ISA="riscv64"
CONFIG_ILEN_MIN=2
CONFIG_ISA64=y

#
# ISA-dependent Options for riscv64
#
CONFIG_CLINT_MMIO=0x38000000
# CONFIG_MULTICORE_DIFF is not set
CONFIG_RVB=y
CONFIG_RV_CBO=y
CONFIG_RVK=y
CONFIG_RV_ZICOND=y
# CONFIG_RV_ZFH is not set
CONFIG_RV_ZFH_MIN=y
CONFIG_RV_ZFA=y
CONFIG_RVV=y
CONFIG_RV_ZVFH_MIN=y
CONFIG_RV_ZVFH=y
CONFIG_RV_DEBUG=y
CONFIG_RVH=y
# CONFIG_RV_SDEXT is not set
CONFIG_RV_SDTRIG=y
CONFIG_TDATA1_MCONTROL6=y
# CONFIG_TDATA1_ICOUNT is not set
# CONFIG_TDATA1_ITRIGGER is not set
# CONFIG_TDATA1_ETRIGGER is not set
CONFIG_TRIGGER_NUM=4
# CONFIG_SDTRIG_EXTRA is not set
# CONFIG_RV_AIA is not set
# CONFIG_RV_SSTC is not set
CONFIG_RV_SMRNMI=y
# CONFIG_RV_SMDBLTRP is not set
# CONFIG_RV_SSDBLTRP is not set
CONFIG_NMIE_INIT=y
CONFIG_RV_ZICNTR=y
CONFIG_RV_CSR_TIME=y
CONFIG_RV_ZIHINTPAUSE=y
CONFIG_RV_ZIHPM=y
CONFIG_RV_CSR_MCOUNTINHIBIT=y
CONFIG_RV_CSR_MCOUNTINHIBIT_CNTR=y
CONFIG_RV_CSR_MCOUNTINHIBIT_HPM=y
# CONFIG_RV_PMP_ENTRY_0 is not set
CONFIG_RV_PMP_ENTRY_16=y
# CONFIG_RV_PMP_ENTRY_64 is not set
CONFIG_RV_PMP_CSR=y
CONFIG_RV_PMP_NUM=16
CONFIG_RV_PMP_ACTIVE_NUM=16
CONFIG_PMP_GRANULARITY=12

#
# PMP Check Disabled when enabling PERF_OPT
#
CONFIG_RV_SVINVAL=y
# CONFIG_RV_SV39 is not set
CONFIG_RV_SV48=y
CONFIG_RV_SVNAPOT=y
CONFIG_RV_SVPBMT=y
CONFIG_RV_SSNPM=y
CONFIG_RV_SMNPM=y
CONFIG_RV_SMMPM=y
CONFIG_RV_SSCOFPMF=y
CONFIG_RV_SHLCOFIDELEG=y
CONFIG_RV_SMSTATEEN=y
CONFIG_MISA_UNCHANGEABLE=y
CONFIG_XTVEC_VECTORED_MODE=y
CONFIG_TVAL_EX_II=y
CONFIG_FS_CLEAN_STATE=y
CONFIG_USE_XS_ARCH_CSRS=y
# CONFIG_RVV_AGNOSTIC is not set
CONFIG_RV_ZCMOP=y
CONFIG_RV_ZIMOP=y
CONFIG_RV_ZCB=y
CONFIG_RV_ZACAS=y
CONFIG_RESERVATION_SET_WIDTH=6
# end of ISA-dependent Options for riscv64

CONFIG_ENGINE_INTERPRETER=y
CONFIG_ENGINE="interpreter"
CONFIG_MODE_SYSTEM=y
# CONFIG_MODE_USER is not set

#
# Build Options
#
CONFIG_CC_GCC=y
# CONFIG_CC_GPP is not set
# CONFIG_CC_CLANG is not set
CONFIG_CC="gcc"
# CONFIG_CC_O0 is not set
# CONFIG_CC_O1 is not set
CONFIG_CC_O2=y
# CONFIG_CC_O3 is not set
CONFIG_CC_OPT="-O2"
CONFIG_CC_NATIVE_ARCH=y
CONFIG_CC_LTO=y
# CONFIG_CC_DEBUG is not set
# CONFIG_CC_ASAN is not set
# end of Build Options

#
# Testing and Debugging
#
# CONFIG_DEBUG is not set
# CONFIG_DIFFTEST is not set
CONFIG_DIFFTEST_REF_PATH="none"
CONFIG_DIFFTEST_REF_NAME="none"
# CONFIG_DETERMINISTIC is not set
# CONFIG_IQUEUE is not set
# CONFIG_MEMLOG is not set
# CONFIG_TRANSLOG is not set
# CONFIG_EXITLOG is not set
# CONFIG_TRACE_INST is not set
# CONFIG_TRACE_BB is not set
# CONFIG_SIMPOINT_LOG is not set
# end of Testing and Debugging

#
# Memory Configuration
#
CONFIG_MBASE=0x80000000
# CONFIG_USE_SPARSEMM is not set
CONFIG_MSIZE=0x200000000
CONFIG_PADDRBITS=48
# CONFIG_STORE_LOG is not set
# CONFIG_BR_LOG is not set
CONFIG_BBL_OFFSET_WITH_CPT=0x100000
# CONFIG_RESET_FROM_MMIO is not set
CONFIG_PC_RESET_OFFSET=0x0
CONFIG_USE_MMAP=y
# CONFIG_MEM_RANDOM is not set
CONFIG_MEM_COMPRESS=y
CONFIG_ENABLE_CONFIG_MMIO_SPACE=y
CONFIG_MMIO_SPACE_RANGE="0x0, 0x7FFFFFFF"
# end of Memory Configuration

CONFIG_DEVICE=y
CONFIG_HAS_PORT_IO=y
# CONFIG_HAS_SERIAL is not set
CONFIG_HAS_UARTLITE=y
CONFIG_UARTLITE_PORT=0x3f8
CONFIG_UARTLITE_MMIO=0x40600000
# CONFIG_UARTLITE_INPUT_FIFO is not set
CONFIG_UARTLITE_ASSERT_FOUR=y
# CONFIG_HAS_UART_SNPS is not set
CONFIG_HAS_PLIC=y
CONFIG_PLIC_ADDRESS=0x3c000000
CONFIG_HAS_TIMER=y
CONFIG_RTC_PORT=0x48
CONFIG_RTC_MMIO=0xa1000048
CONFIG_HAS_KEYBOARD=y
CONFIG_I8042_DATA_PORT=0x60
CONFIG_I8042_DATA_MMIO=0xa1000060
CONFIG_HAS_VGA=y
CONFIG_FB_ADDR=0x50000000
CONFIG_VGA_CTL_PORT=0x100
CONFIG_VGA_CTL_MMIO=0x40001000
# CONFIG_VGA_SHOW_SCREEN is not set
CONFIG_VGA_SIZE_400x300=y
# CONFIG_VGA_SIZE_800x600 is not set
# CONFIG_HAS_AUDIO is not set
# CONFIG_HAS_DISK is not set
CONFIG_HAS_SDCARD=y
CONFIG_SDCARD_CTL_MMIO=0x40002000
CONFIG_SDCARD_IMG_PATH=""
CONFIG_HAS_FLASH=y
CONFIG_FLASH_PRESET_CONTENT="0x0010029b,0x01f29293,0x00028067"
CONFIG_FLASH_START_ADDR=0x10000000
CONFIG_FLASH_SIZE=0x10000000
CONFIG_FLASH_IMG_PATH="$(NEMU_HOME)/resource/gcpt_restore/build/gcpt.bin"
# CONFIG_FPU_HOST is not set
CONFIG_FPU_SOFT=y
# CONFIG_FPU_NONE is not set
# CONFIG_AC_HOST is not set
# CONFIG_AC_SOFT is not set
CONFIG_AC_NONE=y
CONFIG_VECTOR_AC_SOFT=y
CONFIG_MMIO_AC_SOFT=y
CONFIG_AMO_AC_SOFT=y

#
# Processor difftest reference config
#
# CONFIG_SHARE is not set
# end of Processor difftest reference config

#
# Miscellaneous
#
CONFIG_TIMER_GETTIMEOFDAY=y
# CONFIG_TIMER_CLOCK_GETTIME is not set
# CONFIG_MEMORY_REGION_ANALYSIS is not set
CONFIG_REPORT_ILLEGAL_INSTR=y
CONFIG_RT_CHECK=y
CONFIG_PERF_OPT=y
CONFIG_TCACHE_SIZE=8192
CONFIG_BB_LIST_SIZE=1024
CONFIG_BB_POOL_SIZE=1024
CONFIG_INSTR_CNT_BY_BB=y
# CONFIG_INSTR_CNT_BY_INSTR_PERF_OPT is not set
CONFIG_ENABLE_INSTR_CNT=y
# end of Miscellaneous
Loading
Loading