All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heinrich Schuchardt <xypron.glpk@gmx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] mvebu: reserve SRAM memory on Marvell Armada 3700/7K/8K
Date: Thu, 13 Jun 2019 08:09:17 +0200	[thread overview]
Message-ID: <9ddc68c1-c9d8-496f-9cce-ec474e117667@gmx.de> (raw)
In-Reply-To: <9d0fd783-70b3-1680-695c-a53951ca117f@denx.de>



On 6/13/19 7:48 AM, Stefan Roese wrote:
> Added Heinrich to Cc (and use Alex's new address)
>
> On 11.06.19 13:00, Patrick Wildt wrote:
>> The ARM-TF and the optional OP-TEE use the memory region 0x4000000
>> to 0x5400000 and should be reserved in the memory map, otherwise the
>> OS might wrongly assume that it can use that memory area for itself.
>> This has also been done in EDK2 [0].
>>
>> [0]
>> https://github.com/tianocore/edk2-platforms/commit/bf1c4a2cf8024669d1748e78c7e417433f85707e
>>
>>
>> Signed-off-by: Patrick Wildt <patrick@blueri.se>
>>
>> diff --git a/arch/arm/mach-mvebu/arm64-common.c
>> b/arch/arm/mach-mvebu/arm64-common.c
>> index aaf7b7c447..7572aad8c9 100644
>> --- a/arch/arm/mach-mvebu/arm64-common.c
>> +++ b/arch/arm/mach-mvebu/arm64-common.c
>> @@ -14,6 +14,7 @@
>>   #include <asm/arch/cpu.h>
>>   #include <asm/arch/soc.h>
>>   #include <asm/armv8/mmu.h>
>> +#include <efi_loader.h>
>>     DECLARE_GLOBAL_DATA_PTR;
>>   @@ -142,5 +143,11 @@ int arch_early_init_r(void)
>>       pci_init();
>>   #endif
>>   +#ifdef CONFIG_EFI_LOADER
>> +    /* Reserve trusted SRAM section */
>> +    efi_add_memory_map(0x04000000, 0x01400000 >> EFI_PAGE_SHIFT,
>> +               EFI_RESERVED_MEMORY_TYPE, false);
>> +#endif

We already have a reservation via the device tree for a part of this
area [0x4000000-0x4200000[ in U-Boot and Linux:

cf63dad014bae080445bccbf9cecbe05f2cbed45
arm64: dts: marvell: armada-ap806: reserve PSCI area

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v5.2-rc4&id=132ac39cffbcfed80ada38ef0fc6d34d95da7be6

As the concerned boards can be booted not only via bootefi but also via
booti I suggest to update the device trees in Linux and U-Boot.

Best regards

Heinrich

>> +
>>       return 0;
>>   }
>>
>
> I would like to see some comments from the U-Boot "EFI guys", if
> this is the correct approach. I remember some discussions about
> using "reserved-memory" in the DT for this but I might be wrong
> here.
>
> Any comments?
>
> Thanks,
> Stefan
>

  reply	other threads:[~2019-06-13  6:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-31 14:13 [U-Boot] [RFC] Reserve ATF memory on Marvell Armdada 3700/7K/8K Mark Kettenis
2018-04-03  7:34 ` Matwey V. Kornilov
2018-04-06 10:04 ` Alexander Graf
2018-04-06 10:22 ` Alexander Graf
2019-02-04 16:51   ` Patrick Wildt
2019-02-12  9:38     ` Alexander Graf
2019-02-12 10:31       ` Marcin Wojtas
2019-06-11 11:00         ` [U-Boot] mvebu: reserve SRAM memory on Marvell Armada 3700/7K/8K Patrick Wildt
2019-06-13  5:48           ` Stefan Roese
2019-06-13  6:09             ` Heinrich Schuchardt [this message]
2019-06-13  8:23               ` Mark Kettenis
2019-06-13  9:11                 ` Heinrich Schuchardt

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=9ddc68c1-c9d8-496f-9cce-ec474e117667@gmx.de \
    --to=xypron.glpk@gmx.de \
    --cc=u-boot@lists.denx.de \
    /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.