From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) by mx.groups.io with SMTP id smtpd.web11.4509.1665396767912725341 for ; Mon, 10 Oct 2022 03:12:48 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ventanamicro.com header.s=google header.b=G+Q/uK9Z; spf=pass (domain: ventanamicro.com, ip: 209.85.214.170, mailfrom: sunilvl@ventanamicro.com) Received: by mail-pl1-f170.google.com with SMTP id z20so9942657plb.10 for ; Mon, 10 Oct 2022 03:12:47 -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=7yS9TpQ7t+Mpv7r9PrFPr5NTff5EoZ1Ivqv7bzuWMww=; b=G+Q/uK9Zh0TnHEe/R08TG5wH38v8JZlaUfbaSGP8R1d3tKAfRwrV26eBM/yRt/7q1u F0pRKY+sVtHxGFRhROoxTIS14+U7PsHbC7fd/RyT/W57ARqvIt9v8AYqXerfNvAihPuM gTpUnIfiCV67ixbsGy+HRMJNBYSBXwAHG+mFpuCyzm/CzyphWWJ3hvxBgojSud9x8ntb y/G0IKJsL032tFyv9TXIxUzenes9xp1k1miKI38z/ja/NGyUCydd5O+waQDScqupprF8 MyMUOwFY3Y5EHvGChoXOWvb3hXkqGlrkpTHqEzRXxNhNMRmsXqMcPoef6gLxQsHfQ7+5 NQWQ== 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=7yS9TpQ7t+Mpv7r9PrFPr5NTff5EoZ1Ivqv7bzuWMww=; b=pPa0qYvDHNw9OeKY91T3gqlzL2xQVqaL9Pz7pX8/e6RnNOFXvSM//ajY4JEgcNoPfx 5/TF8fi8c0KAS5w8OB4rrHqzSkKa6G/nYBnx1zDlNmAzyGhPRU14ls/ZkQdmZ5n7absy J8LD9ESYlrcRZ1JAv9m3+0z2LifKbq5w8HLAGRDMo8iH/IyTHOK9tEum+OTbM8e3SdRJ iZVO/EeQ/TkicTL3dzElqIAOitphJmK4cHB0MJEZb2NP7XvmP4E1eWncxJhR0Y/hf0Ew 5apVAqMELfjL4WTCg8bOJPoMwJMfblZ/bIYzKySWy2N/dyuujSmLhQSSJ96uZMVWATKU aS5g== X-Gm-Message-State: ACrzQf32/tN8Q+2kbu8djewgxBflmQB6FmO5cZFGL9RHOlhMdYzypqPT BL9LjIgYjA74Rb/xnZC9Hypxg/q5FR0tXg== X-Google-Smtp-Source: AMsMyM7seJzz3zFNr42FMx8xm7M4IL1jogyYrji7nkRh70ToH0TPONWm+a0Otxxu1W5AXQ1y/w7zSQ== X-Received: by 2002:a17:902:f70e:b0:178:8895:d1fb with SMTP id h14-20020a170902f70e00b001788895d1fbmr18616861plo.166.1665396767161; Mon, 10 Oct 2022 03:12:47 -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.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Oct 2022 03:12:46 -0700 (PDT) From: "Sunil V L" To: devel@edk2.groups.io Cc: Eric Dong , Ray Ni , Rahul Kumar Subject: [edk2-staging/RiscV64QemuVirt PATCH 13/29] UefiCpuPkg/CpuTimerLib: Refactor to allow other architectures Date: Mon, 10 Oct 2022 15:41:46 +0530 Message-Id: <20221010101202.1146624-14-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, CpuTimerLib library supports only X86 architecture. Refactor to allow other CPU architectures. Cc: Eric Dong Cc: Ray Ni Cc: Rahul Kumar Signed-off-by: Sunil V L --- UefiCpuPkg/Library/CpuTimerLib/BaseCpuTimerLib.inf | 6 +++--- .../Library/CpuTimerLib/{ => Ia32_X64}/BaseCpuTimerLib.c | 0 UefiCpuPkg/Library/CpuTimerLib/{ => Ia32_X64}/CpuTimerLib.c | 0 3 files changed, 3 insertions(+), 3 deletions(-) rename UefiCpuPkg/Library/CpuTimerLib/{ => Ia32_X64}/BaseCpuTimerLib.c (100%) rename UefiCpuPkg/Library/CpuTimerLib/{ => Ia32_X64}/CpuTimerLib.c (100%) diff --git a/UefiCpuPkg/Library/CpuTimerLib/BaseCpuTimerLib.inf b/UefiCpuPkg/Library/CpuTimerLib/BaseCpuTimerLib.inf index de0648de91b5..a22457b44940 100644 --- a/UefiCpuPkg/Library/CpuTimerLib/BaseCpuTimerLib.inf +++ b/UefiCpuPkg/Library/CpuTimerLib/BaseCpuTimerLib.inf @@ -18,9 +18,9 @@ [Defines] LIBRARY_CLASS = TimerLib MODULE_UNI_FILE = BaseCpuTimerLib.uni -[Sources] - CpuTimerLib.c - BaseCpuTimerLib.c +[Sources.IA32, Sources.X64] + Ia32_X64/CpuTimerLib.c + Ia32_X64/BaseCpuTimerLib.c [Packages] MdePkg/MdePkg.dec diff --git a/UefiCpuPkg/Library/CpuTimerLib/BaseCpuTimerLib.c b/UefiCpuPkg/Library/CpuTimerLib/Ia32_X64/BaseCpuTimerLib.c similarity index 100% rename from UefiCpuPkg/Library/CpuTimerLib/BaseCpuTimerLib.c rename to UefiCpuPkg/Library/CpuTimerLib/Ia32_X64/BaseCpuTimerLib.c diff --git a/UefiCpuPkg/Library/CpuTimerLib/CpuTimerLib.c b/UefiCpuPkg/Library/CpuTimerLib/Ia32_X64/CpuTimerLib.c similarity index 100% rename from UefiCpuPkg/Library/CpuTimerLib/CpuTimerLib.c rename to UefiCpuPkg/Library/CpuTimerLib/Ia32_X64/CpuTimerLib.c -- 2.25.1