On 06/01/2023 1:40 pm, Julien Grall wrote: > Hi, > > On 06/01/2023 13:14, Oleksii Kurochko wrote: >> The patch introduce sbi_putchar() SBI call which is necessary >> to implement initial early_printk >> >> Signed-off-by: Oleksii Kurochko <oleksii.kuroc...@gmail.com> >> --- >> xen/arch/riscv/Makefile | 1 + >> xen/arch/riscv/include/asm/sbi.h | 34 ++++++++++++++++++++++++ >> xen/arch/riscv/sbi.c | 44 ++++++++++++++++++++++++++++++++ > > IMHO, it would be better to implement sbi.c in assembly so you can use > print in the console before you jump to C world.
That was already requested not to happen. Frankly, if I was an arm maintainer I'd object to the how it's used there too, but RISCV is massively more simple still. Not even the pagetable setup, or the physical relocation (if even necessary) needs doing in ASM. I'm not completely ruling it out in the future, but someone is going to have to come up with a very convincing argument for why they can't do this piece of critical setup in C. ~Andrew