From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) by mx.groups.io with SMTP id smtpd.web10.9638.1665766139883605525 for ; Fri, 14 Oct 2022 09:48:59 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ventanamicro.com header.s=google header.b=YPOF553A; spf=pass (domain: ventanamicro.com, ip: 209.85.214.181, mailfrom: sunilvl@ventanamicro.com) Received: by mail-pl1-f181.google.com with SMTP id d24so5266087pls.4 for ; Fri, 14 Oct 2022 09:48:59 -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=YPOF553AgCl4+fF4reKCA6e67bOLm/27sCdanuReHNJ3/1c13eqV7NCTp8KXMU4Fr4 E4WecdUeNoPq2ijw2nS32D8VZEvizXvQGLAPKpZK0gRb/2xaIjWRg1H03jeJkKeFtQWa m+cqy8M+EHpw6TWryYDfzUMCgjCnTf4ulNn6FmrB6y68ZGsWR7GlxImGJ0Y7OQVrrJpk 3PFLOLpUOU3ojpmkLQr5kzi1UVa2e/rt0TxRwpB0usVEeGeelZ+tnSdmKSzHfL/o9qfw ajGN+WIYK8+ZRvbooaURISS5I/geDRHJjQqGleLAD5hDr8SMK0Bmy1K0bJthLpvBpRSU lI6w== 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=0N8Maq8Pr5Kh8T6E083cRXu7IPxzOAPYF1pnKxbzbbedwKenffZuFIGgWFRHMfhbW1 oCwZUG/FRZhH9jWZmV33XyS3uBs1d8/Gxngs7hfOI4HQmG2oIMcn3jzXGqp+RUaIJcAp HyFpgzaxgvf7qvCHFHysWTjClGdkUNSvJ2nXZSxZZAtS9rq9KPwezOVZhKtqEJ1mx9nT KLEPSxaJcKOPHhAQ4eZtYs09tHLyaYHLYEYKwANILyAXSm3EFUhlx6mdQHASNTOk13zO T3/idk+eKQ3yhcOuq++JNAtUfXJ4ieEZj6KJO4c+ARFZsLenb2BG3ZNi709WDK6S5zNG H3dA== X-Gm-Message-State: ACrzQf0Yr41GYq70bHfxn6zs8DFmoA9QJuTI4FUbE3zsNA3X1tgZwUoH wi64RjsDjJhfhEvRqhaVjsPRa28W97UnkQ== X-Google-Smtp-Source: AMsMyM5ycMLG4B9XT5QhwJsM17tUATZSFmJN0ARaETpbBzoaPnnmYR4K323TLmicRtqmX90xGumjwg== X-Received: by 2002:a17:903:2691:b0:181:2875:9d6 with SMTP id jf17-20020a170903269100b00181287509d6mr6141375plb.105.1665766139142; Fri, 14 Oct 2022 09:48:59 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([49.206.13.138]) by smtp.gmail.com with ESMTPSA id f3-20020a62db03000000b0056265011136sm1963368pfg.112.2022.10.14.09.48.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Oct 2022 09:48:58 -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 V4 07/34] OvmfPkg/ResetSystemLib: Refactor to allow other architectures. Date: Fri, 14 Oct 2022 22:18:09 +0530 Message-Id: <20221014164836.1513036-8-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221014164836.1513036-1-sunilvl@ventanamicro.com> References: <20221014164836.1513036-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