I am trying it for riscv32 architecture. We dont want to run in supervisor mode
Which SoC are you trying with? AFAIK all supported SoC's only incorporate Machine mode access, not even User mode. Supervisor mode is meant for a full-fledged operating system.