From nobody Sun May 5 07:06:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+40013+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+40013+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1557108425; cv=none; d=zoho.com; s=zohoarc; b=iBFBfZAcUzPqs/jZSKYcwlxHLMW6P5JXPUrrNwcRCGCFpH+CJNI8imqrWRKFKC5N6lmRykIIXTDqX91Ri7G8YPvUuzgOWFJqJBtexsDFsVLz6cFrJrr6vur9AWVdtrgXVaqvlk9eo5DS/sQFCz5eMZ2H/HXvz9Z4ljbVdZ5Ae2M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557108425; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=Uov35bmHL1sGCq9DXGeYQd1iXdD+XMeL6RstMfqjDuk=; b=obvg7cWJhnxU3NNtOw6uDdslFO0QTyntMzZAYl81OQuEU65fNz9GJIvMli80uqjeHlIzeNtDy7ZT8lq5vl2t4DqsLu8oNKPuGDY02Jvw4z/N/nBGTWYSId9EsuZKxAlP+PRRnTXmeloYxvPHdwODg/uj793u+I7+RrOGeYElvzo= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+40013+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1557108425987185.09270191178825; Sun, 5 May 2019 19:07:05 -0700 (PDT) Return-Path: X-Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by groups.io with SMTP; Sun, 05 May 2019 19:07:04 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 May 2019 19:07:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,435,1549958400"; d="scan'208";a="344045948" X-Received: from fieedk002.ccr.corp.intel.com ([10.239.157.133]) by fmsmga006.fm.intel.com with ESMTP; 05 May 2019 19:07:03 -0700 From: "Zhiguang Liu" To: devel@edk2.groups.io Cc: Jordan Justen , Andrew Fish , Ray Ni Subject: [edk2-devel] [Patch V2 1/2] EmulatorPkg: Save the modified order after rebooting Date: Mon, 6 May 2019 10:06:17 +0800 Message-Id: <20190506020618.12032-2-zhiguang.liu@intel.com> In-Reply-To: <20190506020618.12032-1-zhiguang.liu@intel.com> References: <20190506020618.12032-1-zhiguang.liu@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,zhiguang.liu@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1557108425; bh=cPYPj6JU+07CzS25CwDCWe4yLuxY5zmhpyB+Q6z65DM=; h=Cc:Date:From:Reply-To:Subject:To; b=AKT1ZRsTuTn31agWIMyXwbRD/sg2VVm6MYdY759tG73mtM4hrTDrDlZejCh71j7+hA8 laQ80pH8N97clfDTIu49QDkPjYMRVESp+iVLERtDfGcnW5pNBKLOux986OSj4zG/5HOer Oa4Y5zIYmEBi/jq9/N5plwGJd1lHnnB/OW8= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D1650 v2: Abandon v1, and avoid using memory mapped FV device path by adding FvNameGuid to EmulatorPkg.fdf file. v1: The reason why boot order changed is that everytime Emulator restarts, the memory mapped address will change. This patch correct the device path to the right one. Signed-off-by: Zhiguang Liu Cc: Jordan Justen Cc: Andrew Fish Cc: Ray Ni Reviewed-by: Ray Ni --- EmulatorPkg/EmulatorPkg.fdf | 1 + 1 file changed, 1 insertion(+) diff --git a/EmulatorPkg/EmulatorPkg.fdf b/EmulatorPkg/EmulatorPkg.fdf index 85197a14ca..c5c69f8a84 100644 --- a/EmulatorPkg/EmulatorPkg.fdf +++ b/EmulatorPkg/EmulatorPkg.fdf @@ -80,6 +80,7 @@ DATA =3D { gEmulatorPkgTokenSpaceGuid.PcdEmuFlashNvStorageFtwSpareBase|gEfiMdeModuleP= kgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize =20 [FV.FvRecovery] +FvNameGuid =3D 6D99E806-3D38-42c2-A095-5F4300BFD7DC FvAlignment =3D 16 #FV alignment and FV attributes setting. ERASE_POLARITY =3D 1 MEMORY_MAPPED =3D TRUE --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#40013): https://edk2.groups.io/g/devel/message/40013 Mute This Topic: https://groups.io/mt/31515768/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sun May 5 07:06:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+40014+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+40014+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1557108428; cv=none; d=zoho.com; s=zohoarc; b=jxKbCXduWOOwCqBV68wPx2HJXBqFqKSkFFe4Pb51uROPeeWZGeycVgvdS6O+j+INW6EbtXhT59SfhiYuF1vnV2od8h5wSFwbUEV6hSfoK7LQbd6DkPbgUa71kWCRin0OtSdq/j+ugrsak10LJUPqWnraSgQtnw/CecMk+hTvrkQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557108428; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=qtmuKwA9oZ7ClgKrv2tOLfoZClZAJm5qFhzIz3azp+E=; b=HRLZnBSAglziv2Fe1fRRnzom2VwV+0vu8XRwbUNWhrO6CeuHoa/03eMX2VNQuo1nY2mEg9gvYThrp0B/hRcjF3g/0uBRT2bIBgp/RPrGEil8C187hp/dFXAQiQxfK4h6zNzO+X9O/Fwy1vjnmIrFWRc7BCkImpcBBFM+V7bomrM= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+40014+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1557108428589621.7080294788946; Sun, 5 May 2019 19:07:08 -0700 (PDT) Return-Path: X-Received: from mga09.intel.com (mga09.intel.com []) by groups.io with SMTP; Sun, 05 May 2019 19:07:07 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 May 2019 19:07:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,435,1549958400"; d="scan'208";a="344045955" X-Received: from fieedk002.ccr.corp.intel.com ([10.239.157.133]) by fmsmga006.fm.intel.com with ESMTP; 05 May 2019 19:07:06 -0700 From: "Zhiguang Liu" To: devel@edk2.groups.io Cc: Jordan Justen , Andrew Fish , Ray Ni Subject: [edk2-devel] [Patch V2 2/2] EmulatorPkg: Make the shell be the first boot option Date: Mon, 6 May 2019 10:06:18 +0800 Message-Id: <20190506020618.12032-3-zhiguang.liu@intel.com> In-Reply-To: <20190506020618.12032-1-zhiguang.liu@intel.com> References: <20190506020618.12032-1-zhiguang.liu@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,zhiguang.liu@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1557108428; bh=+9n7imXZfm6DNs9f4YlIqn2bf4aEAthu9fWT6CJ2EoY=; h=Cc:Date:From:Reply-To:Subject:To; b=VblDMyO6OjVyFITayF42PhszlS3xlpfTPBsuM0g8Jd5ZqJaYzBgTI8KtiuADAKPPdSe qd80wyD6XYCZLkiva2ljUPk5vcu+L7YElUxp3FmT6oFLB5XePaUX7zWeqDlSAZ1vyK6pR lLI8rLSjs+11X2tQbt9FST11ZfZasPbZyag= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D1649 Make the shell be the first boot option by default, So it can boot into UEFI Internal Shell directly Signed-off-by: Zhiguang Liu Cc: Jordan Justen Cc: Andrew Fish Cc: Ray Ni Reviewed-by: Ray Ni --- EmulatorPkg/Library/PlatformBmLib/PlatformBm.c | 30 ++++++++++++++++++++++= ++++++++ 1 file changed, 30 insertions(+) diff --git a/EmulatorPkg/Library/PlatformBmLib/PlatformBm.c b/EmulatorPkg/L= ibrary/PlatformBmLib/PlatformBm.c index 191ce58cfb..03f6157ae8 100644 --- a/EmulatorPkg/Library/PlatformBmLib/PlatformBm.c +++ b/EmulatorPkg/Library/PlatformBmLib/PlatformBm.c @@ -332,6 +332,35 @@ PlatformBdsRegisterStaticBootOptions ( PrintXY (10, 50, &White, &Black, L"Enter to boot directly."); } =20 +/** + Returns the priority number. + + @param BootOption +**/ +UINTN +BootOptionPriority ( + CONST EFI_BOOT_MANAGER_LOAD_OPTION *BootOption + ) +{ + // + // Make sure Shell is first + // + if (StrCmp (BootOption->Description, L"UEFI Shell") =3D=3D 0) { + return 0; + } + return 100; +} + +INTN +EFIAPI +CompareBootOption ( + CONST EFI_BOOT_MANAGER_LOAD_OPTION *Left, + CONST EFI_BOOT_MANAGER_LOAD_OPTION *Right + ) +{ + return BootOptionPriority (Left) - BootOptionPriority (Right); +} + /** Do the platform specific action after the console is connected. =20 @@ -377,6 +406,7 @@ PlatformBootManagerAfterConsole ( PlatformBdsRegisterStaticBootOptions (); PlatformBdsConnectSequence (); EfiBootManagerRefreshAllBootOption (); + EfiBootManagerSortLoadOptionVariable (LoadOptionTypeBoot, (SORT_COMPAR= E)CompareBootOption); break; } } --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#40014): https://edk2.groups.io/g/devel/message/40014 Mute This Topic: https://groups.io/mt/31515769/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-