[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: |
Schspa Shi |
Subject: |
Re: [PATCH] hw/arm/boot: set initrd parameters to 64bit in fdt |
Date: |
Wed, 16 Nov 2022 21:52:17 +0800 |
User-agent: |
mu4e 1.6.10; emacs 27.2 |
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
- [PATCH] hw/arm/boot: set initrd parameters to 64bit in fdt, Schspa Shi, 2022/11/07
- Re: [PATCH] hw/arm/boot: set initrd parameters to 64bit in fdt, Alex Bennée, 2022/11/08
- Re: [PATCH] hw/arm/boot: set initrd parameters to 64bit in fdt, Schspa Shi, 2022/11/08
- Re: [PATCH] hw/arm/boot: set initrd parameters to 64bit in fdt, Peter Maydell, 2022/11/08
- Re: [PATCH] hw/arm/boot: set initrd parameters to 64bit in fdt, Peter Maydell, 2022/11/08
- Re: [PATCH] hw/arm/boot: set initrd parameters to 64bit in fdt, Schspa Shi, 2022/11/08
- Re: [PATCH] hw/arm/boot: set initrd parameters to 64bit in fdt, Peter Maydell, 2022/11/10
- Re: [PATCH] hw/arm/boot: set initrd parameters to 64bit in fdt, Schspa Shi, 2022/11/16
- Re: [PATCH] hw/arm/boot: set initrd parameters to 64bit in fdt, Peter Maydell, 2022/11/16
- Re: [PATCH] hw/arm/boot: set initrd parameters to 64bit in fdt,
Schspa Shi <=
- Re: [PATCH] hw/arm/boot: set initrd parameters to 64bit in fdt, Peter Maydell, 2022/11/22
Re: [PATCH] hw/arm/boot: set initrd parameters to 64bit in fdt, Peter Maydell, 2022/11/28