From: Martin Blumenstingl <martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
To: Neil Armstrong <narmstrong-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
Cc: linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
jbrunet-rdvid1DuHRBWk0Htik3J/w@public.gmane.org,
khilman-rdvid1DuHRBWk0Htik3J/w@public.gmane.org,
carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
mturquette-rdvid1DuHRBWk0Htik3J/w@public.gmane.org,
linux-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org
Subject: Re: [PATCH 09/13] ARM: dts: meson8: add reserved memory zones
Date: Wed, 14 Jun 2017 23:46:29 +0200 [thread overview]
Message-ID: <CAFBinCDv=fNVhuOatRukHED9xRMQ_8jTHvWpg1b4v4Pn11bevA@mail.gmail.com> (raw)
In-Reply-To: <2f93816d-4276-2ccb-fd3e-e6ec8a6c9f70-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
On Mon, Jun 12, 2017 at 9:32 AM, Neil Armstrong <narmstrong-rdvid1DuHRBWk0Htik3J/w@public.gmane.org> wrote:
> On 06/11/2017 12:16 PM, Martin Blumenstingl wrote:
>> There seem to be two memory regions that need to be reserved, otherwise
>> the system just hangs when running:
>> $ stress --vm-bytes $(awk '/MemFree/{printf "%d\n", $2 * 0.9;}' < /proc/meminfo)k \
>> --vm-keep -m 1
>>
>> The first memory region is really crucial and without it the system
>> hangs. I could not find any references to this in Amlogic's GPL kernel
>> sources.
>> The second region is used by the "suspend firmware". The u-boot sources
>> (/arch/arm/cpu/aml_meson/m8/firmwareld.c) state that the suspend
>> firmware is located at "64M + 15M" which matches CONFIG_MESON_SUSPEND in
>> the Amlogic GPL kernel sources. The "suspend firmware" is responsible
>> for waking up the system from suspend state.
>>
>> This also fixes reading the full SD card as without this the system
>> would simply hang (probably related to the first memory region, if some
>> buffer is allocated there).
>>
>> Signed-off-by: Martin Blumenstingl <martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
>> ---
>> arch/arm/boot/dts/meson8.dtsi | 27 +++++++++++++++++++++++++++
>> 1 file changed, 27 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/meson8.dtsi b/arch/arm/boot/dts/meson8.dtsi
>> index 8582490fcb52..cf011dfe050e 100644
>> --- a/arch/arm/boot/dts/meson8.dtsi
>> +++ b/arch/arm/boot/dts/meson8.dtsi
>> @@ -83,6 +83,33 @@
>> reg = <0x203>;
>> };
>> };
>> +
>> + reserved-memory {
>> + #address-cells = <1>;
>> + #size-cells = <1>;
>> + ranges;
>> +
>> + /* 2 MiB reserved for Hardware ROM Firmware? */
>> + hwrom_reserved: hwrom@0 {
>> + reg = <0x0 0x200000>;
>> + no-map;
>> + };
>> +
>> + /*
>> + * 1 MiB reserved for the "ARM Power Firmware": this is ARM
>> + * code which is responsible for system suspend. It loads a
>> + * piece of ARC code ("arc_power" in the vendor u-boot tree)
>> + * into SRAM, executes that and shuts down the (last) ARM core.
>> + * The arc_power firmware then checks various wakeup sources
>> + * (IR remote receiver, HDMI CEC, WIFI and Bluetooth wakeup or
>> + * simply the power key) and re-starts the ARM core once it
>> + * detects a wakeup request.
>> + */
>> + suspend_firmware: secmon@4f00000 {
>> + reg = <0x4f00000 0x100000>;
>> + no-map;
>> + };
>> + };
>> }; /* end of / */
>>
>> &aobus {
>>
>
> Good, but maybe you could add _reserved to the secmon alias.
good catch, thanks
it seems that "secmon@" is still a copy-and-paste left-over so I'd
rather change the whole line to "power_firmware:
power-firmware-memory@4f00000" (as it's definitely not the secure
monitor firmware) instead
does that also sound good for you?
Regards,
Martin
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-06-14 21:46 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-11 10:16 [PATCH 00/13] add support for more devices on Meson8 and Meson8b Martin Blumenstingl
[not found] ` <20170611101644.28581-1-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2017-06-11 10:16 ` [PATCH 01/13] clk: meson8b: export the SAR ADC clocks Martin Blumenstingl
[not found] ` <20170611101644.28581-2-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2017-06-12 7:28 ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 02/13] clk: meson8b: export the SDIO clock Martin Blumenstingl
[not found] ` <20170611101644.28581-3-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2017-06-12 7:28 ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 03/13] clk: meson8b: export the gate clock for the HW random number generator Martin Blumenstingl
[not found] ` <20170611101644.28581-4-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2017-06-12 7:28 ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 04/13] clk: meson8b: export the USB clocks Martin Blumenstingl
[not found] ` <20170611101644.28581-5-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2017-06-12 7:28 ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 05/13] clk: meson8b: export the ethernet gate clock Martin Blumenstingl
[not found] ` <20170611101644.28581-6-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2017-06-12 7:28 ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 06/13] ARM: dts: meson8: add the PWM_E and PWM_F pins Martin Blumenstingl
[not found] ` <20170611101644.28581-7-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2017-06-12 7:32 ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 07/13] ARM: dts: meson8: add the pins for the SDIO controller Martin Blumenstingl
[not found] ` <20170611101644.28581-8-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2017-06-12 7:32 ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 08/13] ARM: dts: meson: add the SAR ADC Martin Blumenstingl
[not found] ` <20170611101644.28581-9-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2017-06-12 7:33 ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 09/13] ARM: dts: meson8: add reserved memory zones Martin Blumenstingl
[not found] ` <20170611101644.28581-10-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2017-06-12 7:32 ` Neil Armstrong
[not found] ` <2f93816d-4276-2ccb-fd3e-e6ec8a6c9f70-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
2017-06-14 21:46 ` Martin Blumenstingl [this message]
2017-06-11 10:16 ` [PATCH 10/13] ARM: dts: meson: add the hardware random number generator Martin Blumenstingl
[not found] ` <20170611101644.28581-11-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2017-06-12 7:35 ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 11/13] ARM: dts: meson: add USB support on Meson8 and Meson8b Martin Blumenstingl
[not found] ` <20170611101644.28581-12-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2017-06-12 7:36 ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 12/13] ARM: dts: meson8b: add the SCU device node Martin Blumenstingl
[not found] ` <20170611101644.28581-13-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2017-06-12 7:37 ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 13/13] ARM: dts: meson: use the real ethernet clock on Meson8 and Meson8b Martin Blumenstingl
[not found] ` <20170611101644.28581-14-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2017-06-12 7:37 ` Neil Armstrong
2017-06-12 7:32 ` [PATCH 00/13] add support for more devices " Jerome Brunet
[not found] ` <1497252724.3086.0.camel-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
2017-06-14 21:39 ` Martin Blumenstingl
2017-06-15 21:33 ` [PATCH v2 00/10] " Martin Blumenstingl
[not found] ` <20170615213352.25134-1-martin.blumenstingl-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2017-06-15 21:33 ` [PATCH v2 01/10] ARM: dts: meson: use C preprocessor friendly include syntax Martin Blumenstingl
2017-06-15 21:33 ` [PATCH v2 02/10] ARM: dts: meson: use GIC_SPI and IRQ_TYPE_EDGE_RISING macros Martin Blumenstingl
2017-06-15 21:33 ` [PATCH v2 03/10] ARM: dts: meson8: add the PWM_E and PWM_F pins Martin Blumenstingl
2017-06-15 21:33 ` [PATCH v2 04/10] ARM: dts: meson8: add the pins for the SDIO controller Martin Blumenstingl
2017-06-15 21:33 ` [PATCH v2 05/10] ARM: dts: meson: add the SAR ADC Martin Blumenstingl
2017-06-15 21:33 ` [PATCH v2 06/10] ARM: dts: meson8: add reserved memory zones Martin Blumenstingl
2017-06-15 21:33 ` [PATCH v2 07/10] ARM: dts: meson: add the hardware random number generator Martin Blumenstingl
2017-06-15 21:33 ` [PATCH v2 08/10] ARM: dts: meson: add USB support on Meson8 and Meson8b Martin Blumenstingl
2017-06-15 21:33 ` [PATCH v2 09/10] ARM: dts: meson8b: add the SCU device node Martin Blumenstingl
2017-06-15 21:33 ` [PATCH v2 10/10] ARM: dts: meson: use the real ethernet clock on Meson8 and Meson8b Martin Blumenstingl
2017-06-16 19:10 ` [PATCH v2 00/10] add support for more devices " Kevin Hilman
2017-06-16 19:12 ` Kevin Hilman
[not found] ` <m260fvg31w.fsf-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
2017-06-16 23:00 ` Martin Blumenstingl
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='CAFBinCDv=fNVhuOatRukHED9xRMQ_8jTHvWpg1b4v4Pn11bevA@mail.gmail.com' \
--to=martin.blumenstingl-gm/ye1e23mwn+bqq9rbeug@public.gmane.org \
--cc=carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=jbrunet-rdvid1DuHRBWk0Htik3J/w@public.gmane.org \
--cc=khilman-rdvid1DuHRBWk0Htik3J/w@public.gmane.org \
--cc=linux-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org \
--cc=linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=mturquette-rdvid1DuHRBWk0Htik3J/w@public.gmane.org \
--cc=narmstrong-rdvid1DuHRBWk0Htik3J/w@public.gmane.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;
as well as URLs for NNTP newsgroup(s).