Skip to content

Commit

Permalink
Avoid magic number in dts generation's default pmpgranularity
Browse files Browse the repository at this point in the history
  • Loading branch information
jerryz123 committed Feb 6, 2023
1 parent 85cb2d9 commit 79d5b9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion riscv/dts.cc
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ std::string make_dts(size_t insns_per_rtc_tick, size_t cpu_hz,
" riscv,isa = \"" << procs[i]->get_isa().get_isa_string() << "\";\n"
" mmu-type = \"riscv," << (procs[i]->get_isa().get_max_xlen() <= 32 ? "sv32" : "sv57") << "\";\n"
" riscv,pmpregions = <" << pmpregions << ">;\n"
" riscv,pmpgranularity = <4>;\n"
" riscv,pmpgranularity = <" << (1 << PMP_SHIFT) << ">;\n"
" clock-frequency = <" << cpu_hz << ">;\n"
" CPU" << i << "_intc: interrupt-controller {\n"
" #address-cells = <2>;\n"
Expand Down

0 comments on commit 79d5b9a

Please sign in to comment.