From: Schspa Shi <schspa@gmail.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Alex Bennée" <alex.bennee@linaro.org>,
qemu-devel@nongnu.org, qemu-arm@nongnu.org
Subject: Re: [PATCH] hw/arm/boot: set initrd parameters to 64bit in fdt
Date: Wed, 16 Nov 2022 21:52:17 +0800 [thread overview]
Message-ID: <m27czvhuqd.fsf@gmail.com> (raw)
In-Reply-To: <CAFEAcA9k5a8O02zT6x1tqFvo11NmYupX9mfe2YdSwebBHKSdbw@mail.gmail.com>
Peter Maydell <peter.maydell@linaro.org> writes:
> 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
OK, thank you very much.
--
BRs
Schspa Shi
next prev parent reply other threads:[~2022-11-16 13:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-08 2:35 [PATCH] hw/arm/boot: set initrd parameters to 64bit in fdt Schspa Shi
2022-11-08 9:14 ` Alex Bennée
2022-11-08 12:52 ` Schspa Shi
2022-11-08 13:54 ` Peter Maydell
2022-11-08 14:16 ` Peter Maydell
2022-11-08 15:36 ` Schspa Shi
2022-11-10 17:19 ` Peter Maydell
2022-11-16 6:07 ` Schspa Shi
2022-11-16 13:14 ` Peter Maydell
2022-11-16 13:52 ` Schspa Shi [this message]
2022-11-22 13:27 ` Peter Maydell
2022-11-28 19:01 ` Peter Maydell
2022-11-29 7:50 ` Schspa Shi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m27czvhuqd.fsf@gmail.com \
--to=schspa@gmail.com \
--cc=alex.bennee@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.