From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) by mx.groups.io with SMTP id smtpd.web11.4506.1665396750096840700 for ; Mon, 10 Oct 2022 03:12:30 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ventanamicro.com header.s=google header.b=Vc9VOH8/; spf=pass (domain: ventanamicro.com, ip: 209.85.214.176, mailfrom: sunilvl@ventanamicro.com) Received: by mail-pl1-f176.google.com with SMTP id l4so9953494plb.8 for ; Mon, 10 Oct 2022 03:12:30 -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=Vc9VOH8/bosT694MpnLBdNEMlOVzk8cDum29TMsVtbsZf3opSMWDTHYuBXkvNR18Lo OzH9mUf485kHkKdD9XyOQp6MeEOVOyGU7LTs+9LxoQIhhDtqEUc170VSsNE6ByojVW6b yLDlr7bbzXqHcf74bUexvZQ1lgBcN3UtboaNfRrLaDUHfOs7AptMJpbEDNeX+Ap3qQ0C Qw8iBlKid9NXpVcjp0/+mov4wv7CKByjF4VWMY7DF7jFupESha0audAwq+LZFH9TRptu rsXhdnUgHbQNYJItEN2jv3r+xg1CIBSHfVR3ufICTenZ7oJjFTBw36FsvnJyhkmq0H+N s+PA== 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=T3lPyU5ykHzLjD6FRBk4sw3GzeLTcnHyrvEVrIpjRmt5uzFPWbWxUClAl9hIaTAxh9 UR9V0WrhYYgtNLcNuXKAuUH9s5FaiIJTM+PKLzTEM2jMxv6Yy75MxyRnKkr/BJJ/uYrC 6cXeDayF2ry3kkc57rxRoaHFOn10W5ZgF3sB9phFOSaUVxlws0Cf/U3DfCD/atCve/5g /I0A1crJFOJPDcnAiTdcInK53YQZmB2JUhiaHm/eQdV8tO7Df65gxY8Z1VImVjmVExDk iQXJbLKMul2TuiVxZ2NmXJE9TNCDwHPJE49VvUyAW+amXS/7eqDDotSbwLIYv/+GqC9I xAWw== X-Gm-Message-State: ACrzQf2S+mFAAasmnwlRMYmtHYfAEWv/KpTpGlOrzHrxEMNFypGnsbCc 4/Mg5KYHmSKaw4mjpWiYMU27pBBrVM0T2g== X-Google-Smtp-Source: AMsMyM4X62R5JA8QaODQ0S3iGwH81/4H4yHZ1MuoAGZsl8s0R66nXI8hc2V5kzu8pOWBAouRcehCbQ== X-Received: by 2002:a17:90a:f2c3:b0:20b:b75f:2f9e with SMTP id gt3-20020a17090af2c300b0020bb75f2f9emr17256845pjb.43.1665396749460; Mon, 10 Oct 2022 03:12:29 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([49.206.13.138]) by smtp.gmail.com with ESMTPSA id h17-20020a170902f55100b001788ccecbf5sm6302138plf.31.2022.10.10.03.12.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Oct 2022 03:12:29 -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 07/29] OvmfPkg/ResetSystemLib: Refactor to allow other architectures. Date: Mon, 10 Oct 2022 15:41:40 +0530 Message-Id: <20221010101202.1146624-8-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221010101202.1146624-1-sunilvl@ventanamicro.com> References: <20221010101202.1146624-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