That’s reasonable. Well considering that this EBREAK is now pretty much baked into some RISCV cpu in the field. What may be a reasonable thing to do is to add to next ISA revision… a note on how openocd place the magic number.
This would at least ensure that other people using EBREAK for other semihosting reason, won’t be stepping on openocd. And if possible, could be a good idea to document all the openocd semihosting “reasons” and “arguments” list as well for riscv (in case other tools want to do semihosting as well).
Of course this doesn’t mean we shouldn’t add another instruction to properly resolve this eventually anyway, as you mentioned. But at least this would help formalise the openocd way of doing semihosting (At least the magic number bit).