riscv-software-src / riscv-pk

RISC-V Proxy Kernel
Other
570 stars 304 forks source link

exception trap_instruction_page_fault #299

Open peter-samir-luis opened 1 year ago

peter-samir-luis commented 1 year ago

i built and install pk as follows:

git clone https://github.com/riscv/riscv-pk.git
cd riscv-pk
mkdir build
cd build 
../configure --prefix=/home/user/Spike-installed-tools --host=riscv32-unknown-elf --with-arch=rv32i_zifencei_zicsr
make
make install

i run simple hello program as follows:

spike --isa=RV32I pk /home/user/code/print/hello
bbl loader

then i debugged , and found that it enters exception trap_instruction_page_fault

core   0: exception trap_instruction_page_fault, epc 0x00011738
core   0:           tval 0x00011738
core   0: >>>>  trap_entry
core   0: 0x800027d8 (0x14011173) csrrw   sp, sscratch, sp
...
...
core   0: 0x000101c8 (0x0000006f) j       pc + 0x0