[U-Boot] [PATCH 4/9] armv8: layerscape: Rewrite memory reservation

Alexander Graf agraf at suse.de
Wed Feb 15 22:01:57 UTC 2017



On 15/02/2017 19:52, york sun wrote:
> Reduce CC list.
>
> On 02/14/2017 11:56 AM, Alexander Graf wrote:
>>
>>
>> On 14/02/2017 18:38, york sun wrote:
>>> On 02/14/2017 09:00 AM, york.sun at nxp.com wrote:
>>>> On 02/14/2017 07:31 AM, Alexander Graf wrote:
>>>>>
>>>>>
>>>>> On 14/02/2017 04:45, York Sun wrote:
>>>>>> For ARMv8 Layerscape SoCs, secure memory and MC memorey are reserved
>>>>>> at the end of DDR. DDR is spit into two or three banks. This patch
>>>>>> reverts commit aabd7ddb and simplifies the calculation of reserved
>>>>>> memory, and moves the code into common SoC file. Secure memory is
>>>>>> carved out first. DDR bank size is reduced. Reserved memory is then
>>>>>> allocated on the top of available memory. U-Boot still has access
>>>>>> to reserved memory as data transferring is needed. Device tree is
>>>>>> fixed with reduced memory size to hide the reserved memory from OS.
>>>>>
>>>>> I haven't looked in detail, but could you please ensure that you also
>>>>> reserve those regions in the efi_loader memory map?
>>>>
>>>> I missed efi reserved memory map. Will add in v2 patch.
>>>>
>>>
>>> Alex,
>>>
>>> Is the misc_init_r() the best place to add such reservation under your
>>> code dealing with DP_DDR? It is per board code. As of now, we only have
>>> ls2080ardb with efi boot.
>>
>> Ideally I'd like to make sure efi boot works on all boards, not just
>> individual ones. So if you find a more generic place that gets called
>> after efi_memory_init(), that would be great.
>>
>> Since you add a global kconfig define for reserved memory, you can even
>> do it inside efi_memory_init() directly for the top-of-ram region.
>>
>
> Alex,
>
> I am thinking to add a weak function efi_add_known_memory() to do the
> work you have at the beginning of efi_memory_init(). Then I will add
> this function to arch/arm/cpu/armv8/fsl-layerscape/cpu.c. Since the SoC
> file has the knowledge of DP-DDR and how memory is reserved, it can be
> easily added without risking breaking anything else.

That's certainly a possibility, yes :).

> By the way, I failed to run distro boot as I set up before. I am going
> to re-download the DVD ISO file and deploy it again to my USB thumb
> drive. Any tips on running it without installation, i.e. live CD mode? I
> remember last time I did some trick to drop to the shell.

Grub should give you a rescue menu item which gets you into a shell, 
yes. Inside the installer you can also exit into a very minimalistic 
shell if you like, but it's not very powerful.


Alex


More information about the U-Boot mailing list