From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c06::232; helo=mail-io0-x232.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-io0-x232.google.com (mail-io0-x232.google.com [IPv6:2607:f8b0:4001:c06::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1A6402215BD82 for ; Mon, 29 Jan 2018 02:13:54 -0800 (PST) Received: by mail-io0-x232.google.com with SMTP id f34so7052919ioi.13 for ; Mon, 29 Jan 2018 02:19:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=e26Hht4eaiU7odNpzz1OjOCvV0NsoRMOkeT2VTDn1TM=; b=Hb35E8CcV/CijiItKaGLhKQogTLicSozKcbBegyjHxY6Q2ilGONydWqpz2rQfePV8V 2GZFkMrwa4FKFK1DRoXvNr8q0PTaSqPB2NOGxhgmXif3G6IzZp9iB8hcu+wtHgtftncB elCnw/HDSMdc1jUrzqj9plhmG3kXSW7b49iYY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=e26Hht4eaiU7odNpzz1OjOCvV0NsoRMOkeT2VTDn1TM=; b=Mo3vqeDb3v5fWKHHUF0ZFLG63AsTbJagvJcAlyZqIREypd50Ea2nnC77MRxqudVJRV PoG2RwK7qHGI+krbPSdLWtS9ZZ2Fy+/Gx518RVDciD/TtFgAZBJX4uqIAA/pr9F6L8u+ +bRLHBFqlKeIZdSygBgua9imu3on0ChCliynWjlV9r8LCkZCRGzihTKci93HxqDXFEH6 +HkifFWU19Bw+fQiKlbIJ3pyZ7TYbv5BDl3rp7m45y+ZGO9kvG83fbT7ZhDuFElxQVuA J2LCnoODiEjBbbH1YPQ8RXIoBsAI3C0xAEgVM+viXvSW5Fr9yjbAYR+Efl/UPvcQWKIE 3UHA== X-Gm-Message-State: AKwxyteiu6zdTXJ8obs1vNiRJE3cpWydOMTroRke0WRvpuVAQPP2YXhv vXdNUGNzG54gbz6Bih3qLcbYhW7q83NIXcLZu4SieA== X-Google-Smtp-Source: AH8x224aouZfNiFnaSKHg4W2C03NnszrmJk71d7VJ74NCs1c0XMrIlLordYsAyN4AdHwdfoY2iG9nKh6ya+TaTCeg5M= X-Received: by 10.107.6.161 with SMTP id f33mr27187478ioi.196.1517221167559; Mon, 29 Jan 2018 02:19:27 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.112.13 with HTTP; Mon, 29 Jan 2018 02:19:27 -0800 (PST) In-Reply-To: <3f9a89b8-7558-f9a3-a262-59860b2e98a9@huawei.com> References: <1516287703-35516-1-git-send-email-huangming23@huawei.com> <1516287703-35516-14-git-send-email-huangming23@huawei.com> <20180123102320.7rloxdthhq2njbvu@bivouac.eciton.net> <2ced3021-fd0e-7551-c476-4468c915f82e@huawei.com> <3f9a89b8-7558-f9a3-a262-59860b2e98a9@huawei.com> From: Ard Biesheuvel Date: Mon, 29 Jan 2018 10:19:27 +0000 Message-ID: To: "Huangming (Mark)" Cc: Leif Lindholm , Ming Huang , linaro-uefi , "edk2-devel@lists.01.org" , Graeme Gregory , guoheyi@huawei.com, wanghuiqiang , Jason Zhang , Mengfanrong , waip23@126.com Subject: Re: [PATCH edk2-platforms v1 13/14] Hisilicon/Library: Add OsBootLib X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jan 2018 10:13:55 -0000 Content-Type: text/plain; charset="UTF-8" On 29 January 2018 at 08:55, Huangming (Mark) wrote: > > > On 2018/1/27 18:37, Ard Biesheuvel wrote: >> On 27 January 2018 at 01:47, Huangming (Mark) wrote: >>> >>> >>> On 2018/1/23 18:23, Leif Lindholm wrote: >>>> On Thu, Jan 18, 2018 at 11:01:42PM +0800, Ming Huang wrote: >>>>> OsBootLib can create OS option after upgrade firmware. >>>> >>>> I will respond more strongly that Ard did: >>>> >>>> I have seen functionality like this implemented in publicly available >>>> systems - laptops, desktops. >>>> Without exception, they end up in bug reports saying "my system >>>> refuses to boot after installation/upgrade". >>>> Without exception, they add to existing negative perceptions of UEFI >>>> in general in certain market spaces. >>>> >>>> Presumably this is trying to address a real problem you have faced. >>>> Please bring this issue to the table for discussion, so that we can >>>> agree on an appropriate way of resolving it. >>>> >>>> Regardless, this code will not be included in 18.02. >>>> >>>> / >>>> Leif >>>> >>>> . >>>> >>> >>> The problem is that OS boot option is lost after upgrade firmware. >> >> Why is that? There is no need to clear the variable store if you >> upgrade the executable image. If you fix this issue, you don't need >> this patch. >> > > Ok, retaining the variable store can solve the problem also. > But retaining the variable store have some issues, like,if the struct stored in > variable is different between new firmware and old firmware, this situation may cause > a problem. > Yes. That means you have to design it with forward compatibility in mind, i.e., add reserved fields that default to zero, and use zero as a reasonable default when you add new fields. > If OsBootLib is not needed for community, It will use for internal project in hisilicon. > Well, that is up to you to decide. But I highly recommend not hardcoding this kind of knowledge into the firmware to begin with. > >>> It is inconvenient for using. OsBootLib can help this. >>> >>> OsBootLib retain the options installed by OS, and create OS boot option >>> after upgrade firmware if grub file is existed in EFI partition and in mUefiOsBootFiles, >>> and delete redundant options in the same GPT. >>> >> >> . >> > > -- > Best Regards, > > Ming >