Disabling C ISA in visionfive2 board

I have to disable the C ISA and want only IMAFD ISA. Is it possible on visionfive2 board and if it is possible then how to do that?

You lie to your compiler and tell it that the “RISC-V C extension” does not exist. Or more precisely that only the “RISC-V IMAFD extensions” exist.

For gcc it would probably need something like this:

$ XCFLAGS=‘-march=rv64imafd_zicsr_zifencei_zba_zbb -mabi=lp64d -O3’

Thanks for reply,but actually i want to disable C ISA at the time of booting itself not in compiler.

You compile everything without it. The Das U-boot bootloader, OpenSBI, the linux kernel with modules, all applications, everything.

It is impossible to disable the RISC-V C extension at a hardware level but if everything ignores that it exists how can you tell.

Like if the kernel task scheduler was compiled without the RISC-V C extension it will be unable to schedule any tasks that require that extension to execute. Hence the need to compile all applications (RISC-V GC extensions were agreeded by most distributions as the default).

1 Like

It’s not possible AFAIK. There’s Sifive feature disable CSR, but there’s no control of the C extension. It’s always available.

1 Like

I even don’t understand why that should be possible. If you don’t want compressed instructions, simply don’t use them. :man_shrugging: