From: Hans de Goede <johannes.goede@oss.qualcomm.com>
To: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>
Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>,
linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 1/2] arm64: dts: qcom: hamoa: Fix xbl_tmp_buffer_mem size
Date: Tue, 16 Jun 2026 22:40:10 +0200 [thread overview]
Message-ID: <829fa641-dbd4-4319-90a2-99a24934e0df@oss.qualcomm.com> (raw)
In-Reply-To: <21a97c4b-293f-435c-91fe-ca7394b5a2b0@oss.qualcomm.com>
Hi konrad,
On 16-Jun-26 1:04 PM, Konrad Dybcio wrote:
> On 5/25/26 2:46 PM, Hans de Goede wrote:
>> Hi,
>>
>> On 25-May-26 14:29, Konrad Dybcio wrote:
>>> On 5/25/26 1:47 PM, Hans de Goede wrote:
>>>> The EFI memtable (shown when booting with efi=debug) shows that the
>>>> xbl_tmp_buffer_mem region size is 0x1c0000 bytes large not 0xc00000 bytes:
>>>>
>>>> efi: 0x000082800000-0x0000829bffff [Reserved |
>>>> efi: 0x0000829c0000-0x000083efffff [Conventional|
>>>>
>>>> This fix aligns the size with the EFI reported size and makes /proc/iomem
>>>> correctly show mem blocks matching the EFI memmap:
>>>>
>>>> 82800000-829bffff : reserved
>>>> 829c0000-83efffff : System RAM
>>>>
>>>> Instead of:
>>>>
>>>> 82800000-833fffff : reserved
>>>> 83400000-83efffff : System RAM
>>>>
>>>> before this change
>>>>
>>>> Signed-off-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
>>>> ---
>>>> arch/arm64/boot/dts/qcom/hamoa.dtsi | 2 +-
>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/arch/arm64/boot/dts/qcom/hamoa.dtsi b/arch/arm64/boot/dts/qcom/hamoa.dtsi
>>>> index de0f2346cb38..5a2e84365901 100644
>>>> --- a/arch/arm64/boot/dts/qcom/hamoa.dtsi
>>>> +++ b/arch/arm64/boot/dts/qcom/hamoa.dtsi
>>>> @@ -582,7 +582,7 @@ tz_stat_mem: tz-stat@82700000 {
>>>> };
>>>>
>>>> xbl_tmp_buffer_mem: xbl-tmp-buffer@82800000 {
>>>> - reg = <0x0 0x82800000 0x0 0xc00000>;
>>>> + reg = <0x0 0x82800000 0x0 0x1c0000>;
>>>
>>> FWIW the reference memory map shows a contiguous block of:
>>>
>>> 0x8280_0000 -> "no reclaim XBL scratch_buffer2"
>>> 0x829c_0000 -> "reclaimable XBL scratch_buffer"
>>> 0x83f0_0000-0x8400_0000 -> "no reclaim xbl scratch_buffer1"
>>
>> Thanks, so the first part here 0x8280_0000 - 0x829c_0000
>> aligns with the EFI reservation and with the dts reservation
>> after my patch.
>>
>> 0x829c_0000 - 0x83f0_0000 being reclaimable matches with
>> both EFI + the dts (old and new with a different start)
>> having this as usable RAM.
>>
>> The 0x83f0_0000-0x8400_0000 area seems to be marked as
>> reserved by neither EFI nor the current dts...
>>
>> With the first part of the reference memory map aligning
>> with what EFI shows, I think this patch is correct.
>>
>> I wonder if we should do anything about the 0x83f0_0000-0x8400_0000
>> range though ?
>
> The logs in your commit message suggest the UEFI ahd already taken care
> of reserving that bit
>
> Could you post the full output of `memmap` in uefi shell on your device?
I find just booting with efi=debug easier. Here is the EFI memmap as
seen/printed by Linux when booting with efi=debug:
[ 0.000000] efi: Processing EFI memory map:
[ 0.000000] efi: 0x000080800000-0x000080dfffff [Reserved | | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x0000815a0000-0x0000819fffff [Conventional| | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x000081a00000-0x000081a3ffff [Reserved | | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x000081d00000-0x000081dfffff [Conventional| | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x000081f20000-0x000081f2ffff [Reserved | | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x000081f38000-0x0000826fffff [Conventional| | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x0000829c0000-0x000083efffff [Conventional| | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x000084000000-0x000084afffff [Conventional| | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x000085380000-0x0000866bffff [Conventional| | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x000091480000-0x0000a67fffff [Conventional| | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x0000a6800000-0x0000a7f00fff [Boot Data | | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x0000a7f01000-0x0000a7f01fff [Runtime Data|RUN| | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x0000a7f02000-0x0000a7f04fff [Boot Data | | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x0000a7f05000-0x0000a7f0cfff [Runtime Data|RUN| | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x0000a7f0d000-0x0000a7f18fff [Conventional| | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x0000a7f19000-0x0000a7ffffff [Boot Data | | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x0000a8000000-0x0000bbc0ffff [Conventional| | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x0000bbc10000-0x0000c177ffff [Loader Data | | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x0000c1780000-0x0000c178afff [Conventional| | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x0000c178b000-0x0000c3933fff [Loader Code | | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x0000c3934000-0x0000c4c76fff [Loader Data | | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x0000c4c77000-0x0000c50aafff [Loader Code | | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x0000c50ab000-0x0000c54fcfff [Loader Data | | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x0000c54fd000-0x0000c5b12fff [Boot Code | | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x0000c5b13000-0x0000c5b21fff [Conventional| | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x0000c5b22000-0x0000c5b23fff [Loader Data | | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x0000c5b24000-0x0000c5b34fff [Conventional| | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x0000c5b35000-0x0000c62e3fff [Boot Code | | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x0000c62e4000-0x0000c62e4fff [Conventional| | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x0000c62e5000-0x0000c62edfff [Loader Data | | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x0000c62ee000-0x0000c65f6fff [Conventional| | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x0000c65f7000-0x0000c66d5fff [Loader Code | | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x0000c66d6000-0x0000cf6ecfff [Conventional| | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x0000cf6ed000-0x0000cfbb9fff [Boot Data | | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x0000cfbba000-0x0000d0020fff [Conventional| | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x0000d0021000-0x0000d5135fff [Boot Data | | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x0000d5136000-0x0000d5136fff [Conventional| | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x0000d5137000-0x0000d5cedfff [Boot Code | | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x0000d5cee000-0x0000d5e7dfff [Runtime Code|RUN| | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x0000d5e7e000-0x0000d6c8dfff [Runtime Data|RUN| | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x0000d6c8e000-0x0000d6c9dfff [Reserved | | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x0000d6c9e000-0x0000d6d02fff [ACPI Mem NVS| | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x0000d6d03000-0x0000d6ddefff [ACPI Reclaim| | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x0000d6ddf000-0x0000d6ddffff [Boot Data | | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x0000d6de0000-0x0000d6e0ffff [Boot Code | | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x0000d6e10000-0x0000d7ffffff [Boot Data | | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x0000de5b0000-0x0000e46fffff [Conventional| | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x0000e69c0000-0x0000f84fffff [Conventional| | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x000880000000-0x000cc236ffff [Conventional| | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x000cc2370000-0x000cc6bdffff [Loader Code | | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x000cc6be0000-0x000ffdffffff [Conventional| | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x000ffe000000-0x000fffffffff [Loader Code | | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x00000c264000-0x00000c264fff [MMIO |RUN| | | | | | | | | | | | | |UC]
[ 0.000000] efi: 0x000081a40000-0x000081cfffff [Reserved | | | | | | | | | | | | | | |UC]
[ 0.000000] efi: 0x000081e00000-0x000081efffff [Reserved | | | | | | | | | | | | | | |UC]
[ 0.000000] efi: 0x000081f00000-0x000081f1ffff [Reserved | | | | | | | | | | | | | |WC| ]
[ 0.000000] efi: 0x000081f30000-0x000081f37fff [Reserved | | | | | | | | | | | | | |WC| ]
[ 0.000000] efi: 0x000082700000-0x0000827fffff [Reserved | | | | | | | | | | | | | | |UC]
[ 0.000000] efi: 0x000082800000-0x0000829bffff [Reserved | | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x000083f00000-0x000083ffffff [Reserved | | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x000084b00000-0x00008537ffff [Reserved | | | | | | | | | | | | | | |UC]
[ 0.000000] efi: 0x0000866c0000-0x00009137ffff [Reserved | | | | | | | | | | | | | | |UC]
[ 0.000000] efi: 0x0000e4700000-0x0000e47fffff [Reserved | | | | | | | | | | | | | |WC| ]
[ 0.000000] efi: 0x0000e4800000-0x0000e69bffff [Reserved | | | | | | | | |WP| | |WB|WT|WC|UC]
[ 0.000000] efi: 0x0000ff800000-0x0000ffffffff [Reserved | | | | | | | | | | | | | | |UC]
Let me know if you want the efi shell output instead of this.
Regards,
Hans
next prev parent reply other threads:[~2026-06-16 20:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-25 11:47 [PATCH 0/2] arm64: dts: qcom: hamoa: reserved-memory changes Hans de Goede
2026-05-25 11:47 ` [PATCH 1/2] arm64: dts: qcom: hamoa: Fix xbl_tmp_buffer_mem size Hans de Goede
2026-05-25 12:29 ` Konrad Dybcio
2026-05-25 12:46 ` Hans de Goede
2026-06-16 11:04 ` Konrad Dybcio
2026-06-16 20:40 ` Hans de Goede [this message]
2026-05-25 11:47 ` [RFC 2/2] arm64: dts: qcom: hamoa: Remove mem-reservations which are already covered by EFI Hans de Goede
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=829fa641-dbd4-4319-90a2-99a24934e0df@oss.qualcomm.com \
--to=johannes.goede@oss.qualcomm.com \
--cc=andersson@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox