Re: [PATCH 4/4] x86/efi: Allocate a trampoline if needed in efi_free_boot_services()

From: Andy Lutomirski
Date: Tue Aug 02 2016 - 14:25:13 EST


On Sun, Jul 31, 2016 at 10:07 PM, H. Peter Anvin <hpa@xxxxxxxxx> wrote:
> On 07/26/16 15:55, Andy Lutomirski wrote:
>> + /*
>> + * Nasty quirk: if all sub-1MB memory is used for boot
>> + * services, we can get here without having allocated the
>> + * real mode trampoline. It's too late to hand boot services
>> + * memory back to the memblock allocator, so instead
>> + * try to reclaim a single page if needed.
>> + *
>
> This comment makes no sense. Nowhere is there a dependency on a single
> page, and this refers to allocation, not reclaim...

I wrote that while I had the misapprehension that it was a page and I
forgot to fix it. How about:

Nasty quirk: if all sub-1MB memory is used for boot
services, we can get here without having allocated the
real mode trampoline. It's too late to hand boot services
memory back to the memblock allocator, so instead
try to manually allocate the trampoline if needed.