qemu-devel
[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: Thu, 10 Nov 2022 17:19:38 +0000

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.

thanks
-- PMM



reply via email to

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