From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932912AbcHVQ7o (ORCPT ); Mon, 22 Aug 2016 12:59:44 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:36832 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753882AbcHVQ7l (ORCPT ); Mon, 22 Aug 2016 12:59:41 -0400 Date: Mon, 22 Aug 2016 18:43:33 +0200 From: Ingo Molnar To: Matt Fleming Cc: Thomas Gleixner , "H . Peter Anvin" , Jeffrey Hugo , Ard Biesheuvel , linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org, Leif Lindholm , Mark Rutland , stable@vger.kernel.org Subject: Re: [PATCH 4/6] efi/libstub: Use efi_exit_boot_services() in FDT Message-ID: <20160822164332.GC11327@gmail.com> References: <1471638904-3494-1-git-send-email-matt@codeblueprint.co.uk> <1471638904-3494-5-git-send-email-matt@codeblueprint.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1471638904-3494-5-git-send-email-matt@codeblueprint.co.uk> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Matt Fleming wrote: > From: Jeffrey Hugo > > The FDT code directly calls ExitBootServices. This is inadvisable as the > UEFI spec details a complex set of errors, race conditions, and API > interactions that the caller of ExitBootServices must get correct. The > FDT code does not handle EFI_INVALID_PARAMETER as required by the spec, > which causes intermittent boot failures on the Qualcomm Technologies > QDF2432. The efi_exit_boot_services() helper handles the > EFI_INVALID_PARAMETER scenario. So I had to look twice to understand what this commit tries to do. Had it ended with this sentence: > Call the efi_exit_boot_services() helper intead, which handles the > EFI_INVALID_PARAMETER scenario properly. I wouldn't have looked twice! ;-) > + /* > + * Update the memory map with virtual addresses. The function will also > + * populate @runtime_map with copies of just the EFI_MEMORY_RUNTIME > + * entries so that we can pass it straight into SetVirtualAddressMap() s/straight to ? Thanks, Ingo