From mboxrd@z Thu Jan 1 00:00:00 1970 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 Authentication-Results: mx.groups.io; dkim=pass header.i=@ventanamicro.com header.s=google header.b=SAZb3bT0; spf=pass (domain: ventanamicro.com, ip: 209.85.216.44, mailfrom: sunilvl@ventanamicro.com) Received: by mail-pj1-f44.google.com with SMTP id a6-20020a17090abe0600b0020d7c0c6650so1670734pjs.0 for ; Wed, 12 Oct 2022 03:45:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=x1oEC1s/uoofLDUDK3k7eTFE0vyct64TiQY3RaPZBNg=; b=SAZb3bT0ZCOZa1Oasr6eqEIgUj8viVzmoUYY/6ji7VDBPz0NQDb1QatmuCKEgUo22B wtT/YNjg2/FDnbhTKpS43naFg/JJ3rJhUJsgbWf5d/2rrOP4R6w1PlT+HG1EUAqSH01c dpeMMT5j66iQJb7BrkLETho/2MjgbgUaXFvgKLfrX+/TxooLKzAULi1tTL/xLW/k4fCO KOlttUiq0xQlpaP0IJlsrZ1cCvve0WF3XHBaWh3BOKE15dNqqC4EyYpU81iL49wTDEDF 1FN01NWPHkjlSSJk+8MsenKHQdc/8Ne/VEmUv1Y4tvlfbSpm56syu2x9d4ZGBKtaKhKm RQkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=x1oEC1s/uoofLDUDK3k7eTFE0vyct64TiQY3RaPZBNg=; b=Bc598p4/R0xQS/zhsEwtJ5G763zH8c1ZQb4S5jVVG5FlnPL8WfospCbfBGGSJCyD39 0S7zbFQxJ97xBasESoKNXK53yiokp0Y+N3vsqrEICRjd+Z0OK9IOy29mZUkmSKQ4x0Mf bdXuyZMqiLRgNt5KPtWSP18ca/NUo02td8mIz9Ql54lbCdsdOzFizw0pdzf9ymYqBFPA zXLzA0OZC8LJ5xDs4e2dmD3r2Tdt5W3uVEKrU93sLSGp2cx6mV0Dwaua+khEKjDn+DqY MpXdgZffRRaRlNknSObLRysW89UthomqnrFaHde3rBI40cttqT4MEh5/SfG/UPZDdYjT jC4Q== X-Gm-Message-State: ACrzQf0nLNeB/mzEvIJ7Dx08b7grtggODqtbBNzOe2iKGyE4CmrzDU5z aSiz5V4xrhfMRYU9yZUgycM9BPmPJEdBRQ== 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) Return-Path: 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-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> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221012104456.1393376-1-sunilvl@ventanamicro.com> References: <20221012104456.1393376-1-sunilvl@ventanamicro.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4076 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/{ => Ia32_X64}/BaseResetShutdown.c | 0 .../ResetSystemLib/{ => Ia32_X64}/BaseResetShutdownBhyve.c | 0 .../ResetSystemLib/{ => Ia32_X64}/DxeResetShutdown.c | 0 .../{ => Ia32_X64}/DxeResetSystemLibMicrovm.c | 0 .../Library/ResetSystemLib/{ => Ia32_X64}/ResetSystemLib.c | 0 .../ResetSystemLib/{ => Ia32_X64}/ResetSystemLibMicrovm.c | 0 10 files changed, 9 insertions(+), 9 deletions(-) rename OvmfPkg/Library/ResetSystemLib/{ => Ia32_X64}/BaseResetShutdown.c (100%) rename OvmfPkg/Library/ResetSystemLib/{ => Ia32_X64}/BaseResetShutdownBhyve.c (100%) rename OvmfPkg/Library/ResetSystemLib/{ => Ia32_X64}/DxeResetShutdown.c (100%) rename OvmfPkg/Library/ResetSystemLib/{ => Ia32_X64}/DxeResetSystemLibMicrovm.c (100%) rename OvmfPkg/Library/ResetSystemLib/{ => Ia32_X64}/ResetSystemLib.c (100%) rename OvmfPkg/Library/ResetSystemLib/{ => Ia32_X64}/ResetSystemLibMicrovm.c (100%) diff --git a/OvmfPkg/Library/ResetSystemLib/BaseResetSystemLib.inf b/OvmfPkg/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 = IA32 X64 # -[Sources] - BaseResetShutdown.c - ResetSystemLib.c +[Sources.IA32, Sources.X64] + Ia32_X64/BaseResetShutdown.c + Ia32_X64/ResetSystemLib.c [Packages] MdeModulePkg/MdeModulePkg.dec diff --git a/OvmfPkg/Library/ResetSystemLib/BaseResetSystemLibBhyve.inf b/OvmfPkg/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] # [Sources] - BaseResetShutdownBhyve.c - ResetSystemLib.c + Ia32_X64/BaseResetShutdownBhyve.c + Ia32_X64/ResetSystemLib.c [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] # [Sources] - ResetSystemLibMicrovm.c + Ia32_X64/ResetSystemLibMicrovm.c [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 = IA32 X64 # -[Sources] - DxeResetShutdown.c - ResetSystemLib.c +[Sources.IA32, Sources.X64] + Ia32_X64/DxeResetShutdown.c + Ia32_X64/ResetSystemLib.c [Packages] MdeModulePkg/MdeModulePkg.dec diff --git a/OvmfPkg/Library/ResetSystemLib/BaseResetShutdown.c b/OvmfPkg/Library/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/OvmfPkg/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/Library/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/OvmfPkg/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/Library/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/OvmfPkg/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 -- 2.25.1