On 19/01/2023 2:07 pm, Oleksii Kurochko wrote: > diff --git a/xen/arch/riscv/early_printk.c b/xen/arch/riscv/early_printk.c > new file mode 100644 > index 0000000000..6f590e712b > --- /dev/null > +++ b/xen/arch/riscv/early_printk.c > @@ -0,0 +1,45 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +/* > + * RISC-V early printk using SBI > + * > + * Copyright (C) 2021 Bobby Eshleman <bobbyeshle...@gmail.com> > + */ > +#include <asm/early_printk.h> > +#include <asm/sbi.h> > + > +/* > + * early_*() can be called from head.S with MMU-off. > + * > + * The following requiremets should be honoured for early_*() to > + * work correctly: > + * It should use PC-relative addressing for accessing symbols. > + * To achieve that GCC cmodel=medany should be used. > + */ > +#ifndef __riscv_cmodel_medany > +#error "early_*() can be called from head.S with MMU-off" > +#endif
This comment is false, and the check is bogus. It needs deleting. ~Andrew