From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) by mx.groups.io with SMTP id smtpd.web08.5681.1665655156307817794 for ; Thu, 13 Oct 2022 02:59:16 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ventanamicro.com header.s=google header.b=HKbQMsLL; spf=pass (domain: ventanamicro.com, ip: 209.85.214.179, mailfrom: sunilvl@ventanamicro.com) Received: by mail-pl1-f179.google.com with SMTP id n7so1378325plp.1 for ; Thu, 13 Oct 2022 02:59:16 -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=HKbQMsLLM4AOkBOWhaub1G6DaETDdRVwuD+RNuwZZzAIpypd5lF9WOM/0BUHLVabmy zKjwxFB/IrIGAr5SG7Oq7POPuk2ybMEXhJqMo4a9wA9GePY612EQEnaro73Oj6IhnRH7 VCeIYwNWZiPDy4rEnDQvEXR6ptmhDUbSHobVA6Q16naWzgRJzWNNhx7waVvtro3VA5Oo 7diSYm8J8Wqki4surWPiv4VBKbmrDzvOqr8J+Skh+e3rZFZtnPNH8RCOqw7Yb4S1jRWS +NLFcFYtYMUOdXFRBiHXQdGGHm9sKPJbcpoN72srySGlg84IIWU9kvA3TVC1Msw81LMQ WykQ== 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=JeYLvKcEjBsA9WmRbfMarQsF4tTDOVF+RAuUK9jog+QWwp5jaIznTVGpY/acCEGadk cu6Ht4PUjfs3vegW9Z/UKJ2vYlfF+f4J80dXN84hAYRe07AijkgIRNt8lLZlyaWpUmjt OLJp1ny43dhI3/0bztm+FxVFArQD5O+/3DryMaf8cDMqc7MfHRSvjgmmKn+qGiqhXPLF yZdOyZ6miIJK0ZTM6n3RijANzoeC9pAlUwh/2frhCmNoOWhOychlSQDmkDLueXVcnS83 Onb+MTHC0DqE9AsAL7nRvNhPkusEwY+JEgKkjgVZG9uFizuXIZq5TS7nUzoMd31/JXjw kg4w== X-Gm-Message-State: ACrzQf0FFXF4Yq0eEop8aaJp02nGo5tXQeDfwxHNCsH9+eTurgNC8xiV Hy3GSrx52bX4BPFKuy+odizjVyfSD9bSbw== X-Google-Smtp-Source: AMsMyM5nDeriA/faBQ+WIgVyXtKX66t2+s0ECjOkJiTBZu8wHYp9jGDEvqMKo2hHQDErkdzfGTWAXw== X-Received: by 2002:a17:902:724b:b0:183:16f:fae4 with SMTP id c11-20020a170902724b00b00183016ffae4mr17314309pll.88.1665655155481; Thu, 13 Oct 2022 02:59:15 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([49.206.13.138]) by smtp.gmail.com with ESMTPSA id w8-20020a17090abc0800b0020d43c5c9a0sm2931845pjr.18.2022.10.13.02.59.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Oct 2022 02:59:14 -0700 (PDT) From: "Sunil V L" To: devel@edk2.groups.io Cc: Eric Dong , Ray Ni , Rahul Kumar Subject: [edk2-staging/RiscV64QemuVirt PATCH V3 13/34] UefiCpuPkg/CpuTimerLib: Refactor to allow other architectures Date: Thu, 13 Oct 2022 15:28:08 +0530 Message-Id: <20221013095829.1454581-14-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221013095829.1454581-1-sunilvl@ventanamicro.com> References: <20221013095829.1454581-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