From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id C156894005F for ; Wed, 1 Nov 2023 01:13:09 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=fTIY8Dpd/NwCDgSF8Ecl4r/h+ZFsMAMgeH2I5DqEZto=; c=relaxed/simple; d=groups.io; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:To:Cc:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Transfer-Encoding; s=20140610; t=1698801188; v=1; b=UssSbZy670W2irct1hKCw8QkK+juPA7bjPjkiYWiZ/4L6LhIWhQAESFM00AwCS5T58QqVGyA h9fT/NKKrcxu8MAzfpzdzqjSvY5sjUWsVJKQd3zPpWbdIUzsxQ0qkxw6AdCg3dQ4DErVxJJyGts ruY7AizkYrc2VLMngTVWq1eU= X-Received: by 127.0.0.2 with SMTP id tS7SYY7687511xW1q79xGrVv; Tue, 31 Oct 2023 18:13:08 -0700 X-Received: from mail-yb1-f175.google.com (mail-yb1-f175.google.com [209.85.219.175]) by mx.groups.io with SMTP id smtpd.web10.12460.1698801187866746636 for ; Tue, 31 Oct 2023 18:13:08 -0700 X-Received: by mail-yb1-f175.google.com with SMTP id 3f1490d57ef6-d9ac9573274so5867350276.0 for ; Tue, 31 Oct 2023 18:13:07 -0700 (PDT) X-Gm-Message-State: tzDmNejjqSjlUileElrBH0lyx7686176AA= X-Google-Smtp-Source: AGHT+IGKSxwoyOaNG3x4SrpZsBE2zTSq6CwaUL4aEiF3A8YtD5BiuDtQ2BlU8vwJlkzVq/TwzOqEJKBdHovlbL8EP9Y= X-Received: by 2002:a05:6902:201:b0:da3:74d8:48bf with SMTP id j1-20020a056902020100b00da374d848bfmr3138558ybs.37.1698801186923; Tue, 31 Oct 2023 18:13:06 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "Mike Maslenkin" Date: Wed, 1 Nov 2023 04:12:31 +0300 Message-ID: Subject: Re: [edk2-devel] [PATCH] MdeModulePkg/XhciDxe: Non-zero start/stop values in XhcGetElapsedTicks To: devel@edk2.groups.io, patrick.henz@hpe.com Cc: hao.a.wu@intel.com, ray.ni@intel.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,mike.maslenkin@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=UssSbZy6; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io On Tue, Oct 31, 2023 at 7:52=E2=80=AFPM Henz, Patrick wrote: > > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D4578 > > The implementation of XhcGetElapsedTicks did not account for > non-zero start and stop values for the performance counter > timer, potentially resulting in an incorrect elapsed tick > count getting returned to the caller. Account for non-zero > start and stop values when calculating the elapsed tick > count. > > Cc: Hao A Wu > Cc: Ray Ni > Signed-off-by: Patrick Henz > Reviewed-by: > --- > MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c b/MdeModulePkg/Bus/Pci/X= hciDxe/Xhci.c > index 7a2e32a9dd..6cb97b7452 100644 > --- a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c > +++ b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c > @@ -2389,7 +2389,7 @@ XhcGetElapsedTicks ( > // Counter counts upwards, check for an overflow condition > // > if (*PreviousTick > CurrentTick) { > - Delta =3D (mPerformanceCounterEndValue - *PreviousTick) + CurrentT= ick; > + Delta =3D (CurrentTick - mPerformanceCounterStartValue) + (mPerfor= manceCounterEndValue - *PreviousTick); > } else { > Delta =3D CurrentTick - *PreviousTick; > } > @@ -2398,7 +2398,7 @@ XhcGetElapsedTicks ( > // Counter counts downwards, check for an underflow condition > // > if (*PreviousTick < CurrentTick) { > - Delta =3D (mPerformanceCounterStartValue - CurrentTick) + *Previou= sTick; > + Delta =3D (mPerformanceCounterStartValue - CurrentTick) + (*Previo= usTick - mPerformanceCounterEndValue); > } else { > Delta =3D *PreviousTick - CurrentTick; > } > -- > 2.34.1 > > > > ------------ > Groups.io Links: You receive all messages sent to this group. > View/Reply Online (#110434): https://edk2.groups.io/g/devel/message/11043= 4 > Mute This Topic: https://groups.io/mt/102301510/1770412 > Group Owner: devel+owner@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub [mike.maslenkin@gmail.c= om] > ------------ > > Hello, All Just curious why this patch was broken by google groups. Some patches to edk2 and edk2-redfish-client have unintended line breaks marked with "=3D", additional "0D" and additional "3D" to "=3D" Web shows https://edk2.groups.io/g/devel/message/110434 exactly as it saved by mailer. What do sender should setup to avoid this? Regards, Mike. -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#110459): https://edk2.groups.io/g/devel/message/110459 Mute This Topic: https://groups.io/mt/102301510/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-