[U-Boot] [PATCH] efi_loader: don't allocate unusable RAM
Alexander Graf
agraf at suse.de
Tue Jul 31 20:15:43 UTC 2018
> Am 31.07.2018 um 22:04 schrieb Stephen Warren <swarren at wwwdotorg.org>:
>
> On 07/31/2018 02:03 PM, Alexander Graf wrote:
>>> Am 31.07.2018 um 21:44 schrieb Stephen Warren <swarren at wwwdotorg.org>:
>>>
>>> From: Stephen Warren <swarren at nvidia.com>
>>>
>>> Some boards define a maximum usable RAM top that's more restrictive than
>>> the ranges defined by U-Boot's memory bank definitions[1]. In this case,
>>> the unusable RAM isn't mapped in the page tables, and so the EFI code must
>>> not attempt to allocate RAM from outside the usable regions. Fix
>>> efi_find_free_memory() to detect when max_addr is unconstrained or out of
>>> range, and substitue a valid value.
>>>
>>> [1] For example, when some peripherals can't access RAM above 4GiB, it's
>>> simplest to force U-Boot's ram_top to a smaller value to avoid dealing
>>> with this issue more explicitly. However, the RAM bank definitions still
>>> describe the unusable RAM so that the booted OS has access to it, since
>>> the OS can typically deal with such restrictions in a more complex
>>> manner.
>> That's what we have the efi bounce buffers for. Can't we just enable those for tegra?
>
> No, because that wouldn't help all the non-EFI code, or cause the RAM to be mapped in the page tables due to the non-EFI code not needing it.
The non-efi code can still rely on ram_top just fine, no? I was more thinking of enabling the bounce buffer config option as alternative to your patch.
Alex
More information about the U-Boot
mailing list