[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4f1677e24a5fcdfd2fda714cdd66f4dbe7817284.camel@wdc.com>
Date: Wed, 21 Aug 2019 17:31:00 +0000
From: Atish Patra <Atish.Patra@....com>
To: "hch@....de" <hch@....de>,
"troy.benjegerdes@...ive.com" <troy.benjegerdes@...ive.com>
CC: "paul.walmsley@...ive.com" <paul.walmsley@...ive.com>,
"linux-riscv@...ts.infradead.org" <linux-riscv@...ts.infradead.org>,
Damien Le Moal <Damien.LeMoal@....com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"palmer@...ive.com" <palmer@...ive.com>
Subject: Re: [PATCH 15/15] riscv: disable the EFI PECOFF header for M-mode
On Tue, 2019-08-20 at 21:14 -0700, Troy Benjegerdes wrote:
> > On Aug 13, 2019, at 8:47 AM, Christoph Hellwig <hch@....de> wrote:
> >
> > No point in bloating the kernel image with a bootloader header if
> > we run bare metal.
>
> I would say the same for S-mode. EFI booting should be an option, not
> a requirement.
EFI booting is never a requirement on any board. When EFI stub will be
added for kernel, it will be enabled with CONFIG_EFI_STUB only.
The current additional header is only 64 bytes and also required for
booti in U-boot. So it shouldn't disabled for S-mode.
Disabling it for M-Mode Linux is okay because of memory constraint and
M-Mode linux won't use U-boot anyways.
> I have M-mode U-boot working with bootelf to start BBL,
> and at some point, I’m hoping we can have a M-mode linux kernel be
> the SBI provider for S-mode kernels,
Why do you want bloat a M-Mode software with Linux just for SBI
implementation?
Using Linux as a last stage boot loader i.e. LinuxBoot may make sense
though.
> which seem most logical to me
> to start using the vmlinux elf binaries using something like kexec()
>
> > Signed-off-by: Christoph Hellwig <hch@....de>
> > ---
> > arch/riscv/kernel/head.S | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/arch/riscv/kernel/head.S b/arch/riscv/kernel/head.S
> > index 670e5cacb24e..09fcf3d000c0 100644
> > --- a/arch/riscv/kernel/head.S
> > +++ b/arch/riscv/kernel/head.S
> > @@ -16,6 +16,7 @@
> >
> > __INIT
> > ENTRY(_start)
> > +#ifndef CONFIG_M_MODE
> > /*
> > * Image header expected by Linux boot-loaders. The image
> > header data
> > * structure is described in asm/image.h.
> > @@ -47,6 +48,7 @@ ENTRY(_start)
> >
> > .global _start_kernel
> > _start_kernel:
> > +#endif /* CONFIG_M_MODE */
> > /* Mask all interrupts */
> > csrw CSR_XIE, zero
> > csrw CSR_XIP, zero
> > --
> > 2.20.1
> >
> >
> > _______________________________________________
> > linux-riscv mailing list
> > linux-riscv@...ts.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-riscv
>
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@...ts.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv
--
Regards,
Atish
Powered by blists - more mailing lists