RISC-V: Improve init_resources()