[U-Boot] [PATCH] efi_loader: don't allocate unusable RAM

Stephen Warren swarren at wwwdotorg.org
Tue Jul 31 20:04:35 UTC 2018


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.


More information about the U-Boot mailing list