From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) by mx.groups.io with SMTP id smtpd.web09.8114.1667136549299319147 for ; Sun, 30 Oct 2022 06:29:09 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ventanamicro.com header.s=google header.b=dWYTdHOs; spf=pass (domain: ventanamicro.com, ip: 209.85.214.171, mailfrom: sunilvl@ventanamicro.com) Received: by mail-pl1-f171.google.com with SMTP id u6so8640165plq.12 for ; Sun, 30 Oct 2022 06:29:09 -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=2d1rLrPE+Y5qihj88T++lIx+D8yddG8ms1sGQPX+2zM=; b=dWYTdHOsEVs3s2BLI/YaEaKKH/6a70FBn9Gjo7ouR5UNcievgSQEqOgY8zvpNrXHmO VSxNmjcGop5tnnyVAxNxYDk3QH9fCZAzAfIalxt0o/eC/VAfIuO0982eT5zpIOqxWrwx MRZ1O6fJ6gZk7xAliB+HJcFPWFLCdBh5R9J+usrJdjBcvcijCl0iqFoLQz4e3J97eiAs vGULOSVKjfBe+fmyNuJ8GKa8wbHn5y4BTrQC6E0Fa3w0DMqOhwdvf2VdrH1B6Z7Rg57Q 7r1fhlJmHfBIPDyN9QrLoNCMWwNw/LbW2gRIuJpCyv1+lvutAGImyPCbsmY4uP7CEh8n Qa9g== 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=2d1rLrPE+Y5qihj88T++lIx+D8yddG8ms1sGQPX+2zM=; b=SAgsrZ+Mo9XLwm167Fx6vHBwbcLnMu/NAYBWyZ9BkEOp6+IM76JeOoJKuKp8Ft6GYq oU9+SXHoKVnqDN42M/x56ZIGlNHBftetmXJJ9yubg0J7U8LBVidG4Ks66Bosz5F8wr6/ a+9TYwtztGdlRFPZ+zjcJIG6P8PaG0I4nBC/pEL9ALe6ms5S1u2xvgIzdtdbTtXbQr8l P1FLBuLASMKBlaiVEmHqgPCITpmFoECEpARn0sR0L+xQQgA5UcZS8kIWwT+H8Po7jG76 B0zCKrKrH42fMjeZKWwcDEVlIDFVJdWIQg7097szujFEMxHu/gDT9Ec6ZZ/rlg4Q9KVL 7iUg== X-Gm-Message-State: ACrzQf00kHRSHvW6c7VawPYNmQNOpqOWCaKVFuOOaXrwlcU5yfUa324k N23UcuGx8bkkWDBQIppVHlRAc0eGcsma1w== X-Google-Smtp-Source: AMsMyM7jil9Ha3pYhsfz8TRW6o5z/Op44fr7xkTfcxEb033F1JeLjxZn3n+V9HQcsWk2Idl15Czhgg== X-Received: by 2002:a17:90b:254e:b0:20b:7e26:f0a0 with SMTP id nw14-20020a17090b254e00b0020b7e26f0a0mr26254336pjb.203.1667136548468; Sun, 30 Oct 2022 06:29:08 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([49.206.12.236]) by smtp.gmail.com with ESMTPSA id r10-20020aa79eca000000b0056b6a22d6c9sm2612330pfq.212.2022.10.30.06.29.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Oct 2022 06:29:08 -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 V5 07/30] OvmfPkg/ResetSystemLib: Refactor to allow other architectures. Date: Sun, 30 Oct 2022 18:58:19 +0530 Message-Id: <20221030132842.54077-8-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221030132842.54077-1-sunilvl@ventanamicro.com> References: <20221030132842.54077-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 ++-- OvmfPkg/Library/ResetSystemLib/BaseResetSystemLibMicrovm.inf | 2 +- OvmfPkg/Library/ResetSystemLib/DxeResetSystemLib.inf | 6 +++--- OvmfPkg/Library/ResetSystemLib/DxeResetSystemLibMicrovm.inf | 4 ++-- OvmfPkg/Library/ResetSystemLib/{ => Ia32X64}/BaseResetShutdown.c | 0 OvmfPkg/Library/ResetSystemLib/{ => Ia32X64}/BaseResetShutdownBhyve.c | 0 OvmfPkg/Library/ResetSystemLib/{ => Ia32X64}/DxeResetShutdown.c | 0 OvmfPkg/Library/ResetSystemLib/{ => Ia32X64}/DxeResetSystemLibMicrovm.c | 0 OvmfPkg/Library/ResetSystemLib/{ => Ia32X64}/ResetSystemLib.c | 0 OvmfPkg/Library/ResetSystemLib/{ => Ia32X64}/ResetSystemLibMicrovm.c | 0 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/OvmfPkg/Library/ResetSystemLib/BaseResetSystemLib.inf b/OvmfPkg/Library/ResetSystemLib/BaseResetSystemLib.inf index 35d317f1e0b3..a554c6b68cfe 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] + Ia32X64/BaseResetShutdown.c + Ia32X64/ResetSystemLib.c [Packages] MdeModulePkg/MdeModulePkg.dec diff --git a/OvmfPkg/Library/ResetSystemLib/BaseResetSystemLibBhyve.inf b/OvmfPkg/Library/ResetSystemLib/BaseResetSystemLibBhyve.inf index 74124aed38e8..882a8767cfa5 100644 --- a/OvmfPkg/Library/ResetSystemLib/BaseResetSystemLibBhyve.inf +++ b/OvmfPkg/Library/ResetSystemLib/BaseResetSystemLibBhyve.inf @@ -25,8 +25,8 @@ [Defines] # [Sources] - BaseResetShutdownBhyve.c - ResetSystemLib.c + Ia32X64/BaseResetShutdownBhyve.c + Ia32X64/ResetSystemLib.c [Packages] MdeModulePkg/MdeModulePkg.dec diff --git a/OvmfPkg/Library/ResetSystemLib/BaseResetSystemLibMicrovm.inf b/OvmfPkg/Library/ResetSystemLib/BaseResetSystemLibMicrovm.inf index 564b1d3022a6..8e73ac256bc7 100644 --- a/OvmfPkg/Library/ResetSystemLib/BaseResetSystemLibMicrovm.inf +++ b/OvmfPkg/Library/ResetSystemLib/BaseResetSystemLibMicrovm.inf @@ -23,7 +23,7 @@ [Defines] # [Sources] - ResetSystemLibMicrovm.c + Ia32X64/ResetSystemLibMicrovm.c [Packages] MdeModulePkg/MdeModulePkg.dec diff --git a/OvmfPkg/Library/ResetSystemLib/DxeResetSystemLib.inf b/OvmfPkg/Library/ResetSystemLib/DxeResetSystemLib.inf index a9b4ce90000a..acf9c6a93552 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] + Ia32X64/DxeResetShutdown.c + Ia32X64/ResetSystemLib.c [Packages] MdeModulePkg/MdeModulePkg.dec diff --git a/OvmfPkg/Library/ResetSystemLib/DxeResetSystemLibMicrovm.inf b/OvmfPkg/Library/ResetSystemLib/DxeResetSystemLibMicrovm.inf index ac9c2599642c..918c8262fac7 100644 --- a/OvmfPkg/Library/ResetSystemLib/DxeResetSystemLibMicrovm.inf +++ b/OvmfPkg/Library/ResetSystemLib/DxeResetSystemLibMicrovm.inf @@ -24,8 +24,8 @@ [Defines] # [Sources] - ResetSystemLibMicrovm.c - DxeResetSystemLibMicrovm.c + Ia32X64/ResetSystemLibMicrovm.c + Ia32X64/DxeResetSystemLibMicrovm.c [Packages] MdeModulePkg/MdeModulePkg.dec diff --git a/OvmfPkg/Library/ResetSystemLib/BaseResetShutdown.c b/OvmfPkg/Library/ResetSystemLib/Ia32X64/BaseResetShutdown.c similarity index 100% rename from OvmfPkg/Library/ResetSystemLib/BaseResetShutdown.c rename to OvmfPkg/Library/ResetSystemLib/Ia32X64/BaseResetShutdown.c diff --git a/OvmfPkg/Library/ResetSystemLib/BaseResetShutdownBhyve.c b/OvmfPkg/Library/ResetSystemLib/Ia32X64/BaseResetShutdownBhyve.c similarity index 100% rename from OvmfPkg/Library/ResetSystemLib/BaseResetShutdownBhyve.c rename to OvmfPkg/Library/ResetSystemLib/Ia32X64/BaseResetShutdownBhyve.c diff --git a/OvmfPkg/Library/ResetSystemLib/DxeResetShutdown.c b/OvmfPkg/Library/ResetSystemLib/Ia32X64/DxeResetShutdown.c similarity index 100% rename from OvmfPkg/Library/ResetSystemLib/DxeResetShutdown.c rename to OvmfPkg/Library/ResetSystemLib/Ia32X64/DxeResetShutdown.c diff --git a/OvmfPkg/Library/ResetSystemLib/DxeResetSystemLibMicrovm.c b/OvmfPkg/Library/ResetSystemLib/Ia32X64/DxeResetSystemLibMicrovm.c similarity index 100% rename from OvmfPkg/Library/ResetSystemLib/DxeResetSystemLibMicrovm.c rename to OvmfPkg/Library/ResetSystemLib/Ia32X64/DxeResetSystemLibMicrovm.c diff --git a/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c b/OvmfPkg/Library/ResetSystemLib/Ia32X64/ResetSystemLib.c similarity index 100% rename from OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c rename to OvmfPkg/Library/ResetSystemLib/Ia32X64/ResetSystemLib.c diff --git a/OvmfPkg/Library/ResetSystemLib/ResetSystemLibMicrovm.c b/OvmfPkg/Library/ResetSystemLib/Ia32X64/ResetSystemLibMicrovm.c similarity index 100% rename from OvmfPkg/Library/ResetSystemLib/ResetSystemLibMicrovm.c rename to OvmfPkg/Library/ResetSystemLib/Ia32X64/ResetSystemLibMicrovm.c -- 2.38.0