From nobody Tue Feb 10 01:50:28 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+95071+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+95071+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1665571526; cv=none; d=zohomail.com; s=zohoarc; b=BLlTK33Nm+V2FUHBCLeowMEiVTjYZYq15p9TLOTcXL/1qEnJW7ulPKYG6fGmpesgVzL9LPZYBAagfLaRp6s7MMTgBVz+utCVnrL+j9aHAmPP0gngVqi1JsHmh6B9Lt3zB75/YLvTEKZ5/i5lW6A5Tey3cUbyXRs2CKYCZSlfyIs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665571526; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=4slJOZA4JrY0jJR60P7zODwTrZsOPUQSatCS0lAwu/Q=; b=GuX6vszW1KZDd82ST4rtzlBdSv4Pz6NzyePvjFThBac0KLBGZBLCiTxnamFoMmP5P76hsUbKY9RyXIVYFqIRpv5ghRcHMIAZnC2UNOHmRDgndVKSxCWvyoim0QbFf79NmOw7RIEnekBD2hV0NVOg1Z+jIOZincHegBdsl48viCU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+95071+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1665571526553401.62079546266557; Wed, 12 Oct 2022 03:45:26 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id nRZsYY1788612xvRF4Q9C8aG; Wed, 12 Oct 2022 03:45:26 -0700 X-Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) by mx.groups.io with SMTP id smtpd.web12.18898.1665571525534623570 for ; Wed, 12 Oct 2022 03:45:25 -0700 X-Received: by mail-pj1-f44.google.com with SMTP id a6-20020a17090abe0600b0020d7c0c6650so1670734pjs.0 for ; Wed, 12 Oct 2022 03:45:25 -0700 (PDT) X-Gm-Message-State: PAZxOHDWDW6qQeHgkFVdX5NYx1787277AA= X-Google-Smtp-Source: AMsMyM4trMTD7/OF16rVhR7cCydupILLw6BmL6Y9u+vpHb3snEI2I0nERm6sSCbuK4nHP5tJMZ8mBw== X-Received: by 2002:a17:90b:1648:b0:20b:f0ae:2169 with SMTP id il8-20020a17090b164800b0020bf0ae2169mr4255380pjb.173.1665571524555; Wed, 12 Oct 2022 03:45:24 -0700 (PDT) X-Received: from localhost.localdomain ([49.206.13.138]) by smtp.gmail.com with ESMTPSA id z4-20020aa79e44000000b0054223a0185asm10812221pfq.161.2022.10.12.03.45.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Oct 2022 03:45:24 -0700 (PDT) From: "Sunil V L" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Jiewen Yao , Jordan Justen , Gerd Hoffmann , Rebecca Cran , Peter Grehan Subject: [edk2-devel] [edk2-staging/RiscV64QemuVirt PATCH V2 07/33] OvmfPkg/ResetSystemLib: Refactor to allow other architectures. Date: Wed, 12 Oct 2022 16:14:30 +0530 Message-Id: <20221012104456.1393376-8-sunilvl@ventanamicro.com> In-Reply-To: <20221012104456.1393376-1-sunilvl@ventanamicro.com> References: <20221012104456.1393376-1-sunilvl@ventanamicro.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: 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,sunilvl@ventanamicro.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=1665571526; bh=C3RWvcskYnOULfoqshWeOXZ0oz7LDlzvXHvZjakQKDo=; h=Cc:Date:From:Reply-To:Subject:To; b=bXJN9uB8+MRoGgRK0JE7C4C2svWl28B/6m1hmz56C0ekdB61ul+l2h9YmD5T8G69Wj+ x1CjRBJz2W/5j1xNNqCqfwaiImu3XeVI+TOI3clElONCocS4vhpOrKLyqTAdw1FuMiKb0 kKa2hH/6Z5TWywpMK5QSKzbe+usoL/zWzp4= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1665571527917100001 Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4076 Currently, the ResetSystemLib library supports only X86 architecture. Refactor it to allow adding other CPU architectures like RISC-V. Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Jordan Justen Cc: Gerd Hoffmann Cc: Rebecca Cran Cc: Peter Grehan Signed-off-by: Sunil V L --- OvmfPkg/Library/ResetSystemLib/BaseResetSystemLib.inf | 6 +++--- OvmfPkg/Library/ResetSystemLib/BaseResetSystemLibBhyve.inf | 4 ++-- .../Library/ResetSystemLib/BaseResetSystemLibMicrovm.inf | 2 +- OvmfPkg/Library/ResetSystemLib/DxeResetSystemLib.inf | 6 +++--- .../ResetSystemLib/{ =3D> Ia32_X64}/BaseResetShutdown.c | 0 .../ResetSystemLib/{ =3D> Ia32_X64}/BaseResetShutdownBhyve.c | 0 .../ResetSystemLib/{ =3D> Ia32_X64}/DxeResetShutdown.c | 0 .../{ =3D> Ia32_X64}/DxeResetSystemLibMicrovm.c | 0 .../Library/ResetSystemLib/{ =3D> Ia32_X64}/ResetSystemLib.c | 0 .../ResetSystemLib/{ =3D> Ia32_X64}/ResetSystemLibMicrovm.c | 0 10 files changed, 9 insertions(+), 9 deletions(-) rename OvmfPkg/Library/ResetSystemLib/{ =3D> Ia32_X64}/BaseResetShutdown.c= (100%) rename OvmfPkg/Library/ResetSystemLib/{ =3D> Ia32_X64}/BaseResetShutdownBh= yve.c (100%) rename OvmfPkg/Library/ResetSystemLib/{ =3D> Ia32_X64}/DxeResetShutdown.c = (100%) rename OvmfPkg/Library/ResetSystemLib/{ =3D> Ia32_X64}/DxeResetSystemLibMi= crovm.c (100%) rename OvmfPkg/Library/ResetSystemLib/{ =3D> Ia32_X64}/ResetSystemLib.c (1= 00%) rename OvmfPkg/Library/ResetSystemLib/{ =3D> Ia32_X64}/ResetSystemLibMicro= vm.c (100%) diff --git a/OvmfPkg/Library/ResetSystemLib/BaseResetSystemLib.inf b/OvmfPk= g/Library/ResetSystemLib/BaseResetSystemLib.inf index 35d317f1e0b3..4397f90a24dd 100644 --- a/OvmfPkg/Library/ResetSystemLib/BaseResetSystemLib.inf +++ b/OvmfPkg/Library/ResetSystemLib/BaseResetSystemLib.inf @@ -21,9 +21,9 @@ [Defines] # VALID_ARCHITECTURES =3D IA32 X64 # =20 -[Sources] - BaseResetShutdown.c - ResetSystemLib.c +[Sources.IA32, Sources.X64] + Ia32_X64/BaseResetShutdown.c + Ia32_X64/ResetSystemLib.c =20 [Packages] MdeModulePkg/MdeModulePkg.dec diff --git a/OvmfPkg/Library/ResetSystemLib/BaseResetSystemLibBhyve.inf b/O= vmfPkg/Library/ResetSystemLib/BaseResetSystemLibBhyve.inf index 74124aed38e8..3e52a9e3d7f9 100644 --- a/OvmfPkg/Library/ResetSystemLib/BaseResetSystemLibBhyve.inf +++ b/OvmfPkg/Library/ResetSystemLib/BaseResetSystemLibBhyve.inf @@ -25,8 +25,8 @@ [Defines] # =20 [Sources] - BaseResetShutdownBhyve.c - ResetSystemLib.c + Ia32_X64/BaseResetShutdownBhyve.c + Ia32_X64/ResetSystemLib.c =20 [Packages] MdeModulePkg/MdeModulePkg.dec diff --git a/OvmfPkg/Library/ResetSystemLib/BaseResetSystemLibMicrovm.inf b= /OvmfPkg/Library/ResetSystemLib/BaseResetSystemLibMicrovm.inf index 564b1d3022a6..c66720771d82 100644 --- a/OvmfPkg/Library/ResetSystemLib/BaseResetSystemLibMicrovm.inf +++ b/OvmfPkg/Library/ResetSystemLib/BaseResetSystemLibMicrovm.inf @@ -23,7 +23,7 @@ [Defines] # =20 [Sources] - ResetSystemLibMicrovm.c + Ia32_X64/ResetSystemLibMicrovm.c =20 [Packages] MdeModulePkg/MdeModulePkg.dec diff --git a/OvmfPkg/Library/ResetSystemLib/DxeResetSystemLib.inf b/OvmfPkg= /Library/ResetSystemLib/DxeResetSystemLib.inf index a9b4ce90000a..79478453d7cb 100644 --- a/OvmfPkg/Library/ResetSystemLib/DxeResetSystemLib.inf +++ b/OvmfPkg/Library/ResetSystemLib/DxeResetSystemLib.inf @@ -23,9 +23,9 @@ [Defines] # VALID_ARCHITECTURES =3D IA32 X64 # =20 -[Sources] - DxeResetShutdown.c - ResetSystemLib.c +[Sources.IA32, Sources.X64] + Ia32_X64/DxeResetShutdown.c + Ia32_X64/ResetSystemLib.c =20 [Packages] MdeModulePkg/MdeModulePkg.dec diff --git a/OvmfPkg/Library/ResetSystemLib/BaseResetShutdown.c b/OvmfPkg/L= ibrary/ResetSystemLib/Ia32_X64/BaseResetShutdown.c similarity index 100% rename from OvmfPkg/Library/ResetSystemLib/BaseResetShutdown.c rename to OvmfPkg/Library/ResetSystemLib/Ia32_X64/BaseResetShutdown.c diff --git a/OvmfPkg/Library/ResetSystemLib/BaseResetShutdownBhyve.c b/Ovmf= Pkg/Library/ResetSystemLib/Ia32_X64/BaseResetShutdownBhyve.c similarity index 100% rename from OvmfPkg/Library/ResetSystemLib/BaseResetShutdownBhyve.c rename to OvmfPkg/Library/ResetSystemLib/Ia32_X64/BaseResetShutdownBhyve.c diff --git a/OvmfPkg/Library/ResetSystemLib/DxeResetShutdown.c b/OvmfPkg/Li= brary/ResetSystemLib/Ia32_X64/DxeResetShutdown.c similarity index 100% rename from OvmfPkg/Library/ResetSystemLib/DxeResetShutdown.c rename to OvmfPkg/Library/ResetSystemLib/Ia32_X64/DxeResetShutdown.c diff --git a/OvmfPkg/Library/ResetSystemLib/DxeResetSystemLibMicrovm.c b/Ov= mfPkg/Library/ResetSystemLib/Ia32_X64/DxeResetSystemLibMicrovm.c similarity index 100% rename from OvmfPkg/Library/ResetSystemLib/DxeResetSystemLibMicrovm.c rename to OvmfPkg/Library/ResetSystemLib/Ia32_X64/DxeResetSystemLibMicrovm.c diff --git a/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c b/OvmfPkg/Libr= ary/ResetSystemLib/Ia32_X64/ResetSystemLib.c similarity index 100% rename from OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c rename to OvmfPkg/Library/ResetSystemLib/Ia32_X64/ResetSystemLib.c diff --git a/OvmfPkg/Library/ResetSystemLib/ResetSystemLibMicrovm.c b/OvmfP= kg/Library/ResetSystemLib/Ia32_X64/ResetSystemLibMicrovm.c similarity index 100% rename from OvmfPkg/Library/ResetSystemLib/ResetSystemLibMicrovm.c rename to OvmfPkg/Library/ResetSystemLib/Ia32_X64/ResetSystemLibMicrovm.c --=20 2.25.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 (#95071): https://edk2.groups.io/g/devel/message/95071 Mute This Topic: https://groups.io/mt/94278063/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-