qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] hw/arm/boot: set initrd parameters to 64bit in fdt


From: Peter Maydell
Subject: Re: [PATCH] hw/arm/boot: set initrd parameters to 64bit in fdt
Date: Wed, 16 Nov 2022 13:14:58 +0000

On Wed, 16 Nov 2022 at 06:11, Schspa Shi <schspa@gmail.com> wrote:
>
>
> Peter Maydell <peter.maydell@linaro.org> writes:
>
> > On Tue, 8 Nov 2022 at 15:50, Schspa Shi <schspa@gmail.com> wrote:
> >>
> >>
> >> Peter Maydell <peter.maydell@linaro.org> writes:
> >>
> >> > On Tue, 8 Nov 2022 at 13:54, Peter Maydell <peter.maydell@linaro.org> 
> >> > wrote:
> >> >>
> >> >> On Tue, 8 Nov 2022 at 12:52, Schspa Shi <schspa@gmail.com> wrote:
> >> >> > I think this lowmem does not mean below 4GB. and it is to make sure
> >> >> > the initrd_start > memblock_start_of_DRAM for Linux address range 
> >> >> > check.
> >> >>
> >> >> The wording of this comment pre-dates 64-bit CPU support: it
> >> >> is talking about the requirement in the 32-bit booting doc
> >> >> https://www.kernel.org/doc/Documentation/arm/Booting
> >> >> that says
> >> >> "If an initramfs is in use then, as with the dtb, it must be placed in
> >> >> a region of memory where the kernel decompressor will not overwrite it
> >> >> while also with the region which will be covered by the kernel's
> >> >> low-memory mapping."
> >> >>
> >> >> So it does mean "below 4GB", because you can't boot a 32-bit kernel
> >> >> if you don't put the kernel, initrd, etc below 4GB.
> >> >
> >> > A kernel person corrects me on the meaning of "lowmem" here -- the
> >> > kernel means by it "within the first 768MB of RAM". There is also
> >> > an implicit requirement that everything be within the bottom 32-bits
> >> > of the physical address space.
> >> >
> >>
> >> Thanks for your comment.
> >>
> >> In this view, initrd shouldn't be placed higher than 4GB ? But it
> >> seems the Linux kernel can boot when there is no memory below 4GB.
> >
> > A *32 bit* kernel cannot -- it is completely unable to access
> > anything above the 4GB mark when the MMU is off, as it is on
> > initial boot. This QEMU code handles both 32 bit and 64 bit
> > kernel boot. These days of course there is 64-bit only hardware,
> > and that might choose to put its RAM above the 4GB mark,
> > because it isn't ever going to boot a 32-bit kernel anyway.
> >
>
> Yes, I think we should accept this patch, because it will not affect
> 32-bit devices, and provides support for 64-bit devices to put initrd
> above 4GB.

Yes, I agree. However since it doesn't cause a problem for any
of the machine models in upstream QEMU, I think we should leave
it until after the in-progress 7.2 release, so that we have
plenty of time to investigate just in case it does cause an
unexpected issue on 32-bit boards.

This patch is on my list to review and deal with when 7.2
goes out and development reopens for 8.0 (should be in about
four weeks).

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]