From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) by mx.groups.io with SMTP id smtpd.web10.14855.1677235547780585486 for ; Fri, 24 Feb 2023 02:45:47 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@ventanamicro.com header.s=google header.b=OiRUII2t; spf=pass (domain: ventanamicro.com, ip: 209.85.215.171, mailfrom: sunilvl@ventanamicro.com) Received: by mail-pg1-f171.google.com with SMTP id s17so7314858pgv.4 for ; Fri, 24 Feb 2023 02:45:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=hKry7a+0PlLW9fuwmhxE+Ge1Qqehnv07eqsWNmdPXqc=; b=OiRUII2tOhncQaj15+VCkqdUJN+QimB3yAcruZG4LpA1gh7/PK4Tmqu8gagrisFFdX ulk5BpgfOGR+u63YD8w98h9Ojh0qkrYJkQ75ut+Vmqsh/cDjG8JP4tkoDMaxe7blp/Qs T6f64tvGIgc3m+4vR3DaWxTq+jn5QlC4ON2rviIPwF/bn8N/BRK2HLId86MreXi0uQ29 hQ6ukybRrC+VqaIVmSGKJEF8fObJPAqxiWrPzqOpDYkOso762stsn2n3Cl2OaRFEU93k Yc+k4zr7fEC6efl3qUzmUi5KZIzJM2LLRnRHH3CDRmy2LOALsQG6hVN7WWLfBYrCPUWL lcsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=hKry7a+0PlLW9fuwmhxE+Ge1Qqehnv07eqsWNmdPXqc=; b=mr3BnSS9o5EXyxt9lZxMTCc3NN3PI3gmA6Ko1RjIPbZ/rVh2+WyUOgFAjCY8lexQa9 X6DQDM7/xvMfGEU7B9UiTI0fc1Et4j6yaPBr2LEbhjygVcWz5u4Kbuo3OSwehvtovpAK AOg3thxxY47J5Uh1H1r7SAtEkqega1NmZdIAle8ZimV9EdcnFpwoIVNGl2TWwGf1nA+1 owvaKtw0G4/IImMwR5FoHDDq6ezjI25IGLJePNpZxMiTTDbdm0poXl/x/ROkx+34roCA YmhBoqHo9Oi7q/jOlbQX+k+xAerHLvqiw0DNvbUtn6B15DPCrfxN5IGCNbK+5FM+flsu VGHA== X-Gm-Message-State: AO0yUKVcG0foh8xf67X87AMR64wq8V+rN/xOxCTbxpeCbR4W2rZfvXvm HOGCi2tnvZKr2Nvc0N1KnUvbYg== X-Google-Smtp-Source: AK7set/w+ADCif0OtsGQzjmGpT++zushASlLurRpnrjKmhgekswr58eTVyZlFFwG9068og9+nVT7qg== X-Received: by 2002:a62:3841:0:b0:5a9:c55b:2cae with SMTP id f62-20020a623841000000b005a9c55b2caemr12450592pfa.31.1677235547089; Fri, 24 Feb 2023 02:45:47 -0800 (PST) Return-Path: Received: from sunil-laptop ([49.206.14.226]) by smtp.gmail.com with ESMTPSA id 23-20020aa79217000000b005941ff79428sm5309062pfo.90.2023.02.24.02.45.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Feb 2023 02:45:46 -0800 (PST) Date: Fri, 24 Feb 2023 16:15:41 +0530 From: "Sunil V L" To: Andrei Warkentin Cc: devel@edk2.groups.io, Daniel Schaefer Subject: Re: [PATCH 6/7] [PATCH v2] UefiCpuPkg: CpuTimerDxeRiscV64: fix tick duration accounting Message-ID: References: <20230223235454.23556-1-andrei.warkentin@intel.com> <20230223235454.23556-7-andrei.warkentin@intel.com> MIME-Version: 1.0 In-Reply-To: <20230223235454.23556-7-andrei.warkentin@intel.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Feb 23, 2023 at 05:54:53PM -0600, Andrei Warkentin wrote: > The TimerDxe implementation doesn't account for the physical > time passed due to timer handler execution or (perhaps even > more importantly) time spent with interrupts masked. > > Other implementations (e.g. like the Arm one) do. If the > timer tick is always incremented at a fixed rate, then > you can slow down UEFI's perception of time by running > long sections of code in a critical section. > > Cc: Sunil V L > Cc: Daniel Schaefer > Signed-off-by: Andrei Warkentin > --- > UefiCpuPkg/CpuTimerDxeRiscV64/Timer.c | 33 +++++++++++++++------------ > 1 file changed, 19 insertions(+), 14 deletions(-) > Reviewed-by: Sunil V L