From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) by mx.groups.io with SMTP id smtpd.web08.18566.1665571544832182980 for ; Wed, 12 Oct 2022 03:45:44 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ventanamicro.com header.s=google header.b=INlUsaUy; spf=pass (domain: ventanamicro.com, ip: 209.85.216.46, mailfrom: sunilvl@ventanamicro.com) Received: by mail-pj1-f46.google.com with SMTP id o9-20020a17090a0a0900b0020ad4e758b3so1647955pjo.4 for ; Wed, 12 Oct 2022 03:45:44 -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=INlUsaUyM207eo6sZlI9e8NWxAJnv/bkjUBriQf+0O6jyaBNZMlz9Jgcie3cO7JMXw /arR+q0ADS9SebES1ST0qvCmSLx1Ya4bY3JRRSqtffOH5hUNmfFhfkWGH4AsMieMWxrZ XBwig99HsL2GkeQ98p41UDulaekzZPXLCjWzutNgfnwtlRYKC3Vg2rYIQtKIjXKjhmTX hNaV17aWJUpybjIwybsnns4de2dQK8+QpFsuKyA+aljPSI4UKLCWjwFXXCevpo2qOYe2 lcSSX+5svUHzFv1Ccoh5fHkcjlVTNnLrKV5Uw+vPuwUqsOZXapUjy+iJukIQxfHvraq5 CPhw== 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=AIzsIfZp8ALxass1lmhsxhX/okGHy8kidjTHydZRTztxunAkQEDVOI6qLZABqz/zo1 QOU6Yu0dUc7Dc046lmk2tOAAx3o3xAK3l/sNt2wJ56mlKyymsP8Zv+UG/kA226ASf1Yx aOrCIjNAl4EFEXw++JRaXkBx7axj1n5b3PFeoj+S2vEBPnNebIU7x22Gy0Qpc7Kpii3d RvUB0VVVWr7MwUPmlTxX0g+D7P21q+E5ztHYPiMcSNSJgfsao6qFGfgWbf5lhSrjH90z /W3RI2zrR0vzFCcVbtXPE0vrze/atj1XaGkVH98gmP/sASm2S4ttMIo2cQd5+2wI36Hi MYxA== X-Gm-Message-State: ACrzQf0jKEKFVKbzQVIQr/fZMmC8qYwPn3vrjmu5wmur4CR9cWJ597qN XBaffTLck/1gqyOdAq673lQ0Z41G3hESjg== X-Google-Smtp-Source: AMsMyM6JIk/OICmTxyKzaz8euvaBODToqvuvxSOP7gPtFxteLiQTGu4XmgmxRkf0OA3rbF6vqSzH1g== X-Received: by 2002:a17:902:ce86:b0:182:498f:afd3 with SMTP id f6-20020a170902ce8600b00182498fafd3mr14367111plg.82.1665571544044; Wed, 12 Oct 2022 03:45:44 -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.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Oct 2022 03:45:43 -0700 (PDT) From: "Sunil V L" To: devel@edk2.groups.io Cc: Eric Dong , Ray Ni , Rahul Kumar Subject: [edk2-staging/RiscV64QemuVirt PATCH V2 13/33] UefiCpuPkg/CpuTimerLib: Refactor to allow other architectures Date: Wed, 12 Oct 2022 16:14:36 +0530 Message-Id: <20221012104456.1393376-14-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, 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