From: York Sun <yorksun@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v1] armv8: fsl-layerscale: Rewrite reserving memory for MC and debug server
Date: Mon, 16 Nov 2015 09:29:54 -0800 [thread overview]
Message-ID: <564A1292.5040209@freescale.com> (raw)
In-Reply-To: <1447694516.7686.91.camel@infinera.com>
On 11/16/2015 09:21 AM, Joakim Tjernlund wrote:
> On Mon, 2015-11-16 at 09:03 -0800, York Sun wrote:
>>
>> On 11/12/2015 02:54 PM, Joakim Tjernlund wrote:
>>> On Thu, 2015-11-12 at 14:20 -0800, York Sun wrote:
>>>> Introduce a new function to calculate reserved memory to replace macro
>>>> CONFIG_SYS_MEM_TOP_HIDE for more flexibility. Legacy use of this macro is
>>>> still supported. MC and debug server are not board-specific. Move the
>>>> reservation function to SoC file. Reduce debug server memory by 2MB to
>>>> make room for secure memory.
>>>
>>> I would make sure "pram" is first to reserve memory, is it?
>>>
>>
>> (previous reply wasn't caught by patchwork, adding more info)
>>
>> Yes, pram is used to reserve small memory from the top of u-boot memory, not
>> necessarily the top of total memory. For example, a 32-bit u-boot with large
>> memory. This patch deals with carving memory from the end of memory, which could
>> be far away from u-boot top. Even in system with small memory, it is still
>> correct, because pram reserves memory from the _top_ of u-boot and this
>> mechanism reserved memory is hidden from u-boot.
>
> And I realize I am mixing pram and CONFIG_SYS_MEM_TOP_HIDE. Your patch
> reserves memory before CONFIG_SYS_MEM_TOP_HIDE which might be confusing
> for some. Why do you need another( then CONFIG_SYS_MEM_TOP_HIDE) method to reserve memory?
>
I am not going to discover the legacy reason to have CONFIG_SYS_MEM_TOP_HIDE.
For my current use on ARMv8, we have management complex (aks MC) and debug
server. They both require a big chunk of private memory (even after OS boots
up). I am taking advantage of existing CONFIG_SYS_MEM_TOP_HIDE to reserve this
memory without fragment memory and without the need to create reserved memory
node in device tree.
With that in place, I think it makes sense to do the same way for reserving
secure memory.
York
next prev parent reply other threads:[~2015-11-16 17:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-12 22:20 [U-Boot] [PATCH v1] armv8: fsl-layerscale: Rewrite reserving memory for MC and debug server York Sun
2015-11-12 22:54 ` Joakim Tjernlund
2015-11-12 23:47 ` York Sun
2015-11-16 17:03 ` York Sun
2015-11-16 17:21 ` Joakim Tjernlund
2015-11-16 17:29 ` York Sun [this message]
2015-11-18 17:14 ` York Sun
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=564A1292.5040209@freescale.com \
--to=yorksun@freescale.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox