From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c0c::244; helo=mail-wr0-x244.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr0-x244.google.com (mail-wr0-x244.google.com [IPv6:2a00:1450:400c:c0c::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id CABBE220D4C1F for ; Thu, 30 Nov 2017 06:30:56 -0800 (PST) Received: by mail-wr0-x244.google.com with SMTP id s66so6792959wrc.9 for ; Thu, 30 Nov 2017 06:35:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=K5GuLpIhGHIUFC+JrR4m9LN2dppulLHfrZRcd3xIiW0=; b=HBWc0mL0Fpmjy7wvS8dhydvoudqbdLp9koaZHBytarCiNj/QOgBFR6xFp6+TTrdhIL VasTJbQ7C0cshF+pN8AOk9zajJVd4nlF5cDApVJubFbIQuskeeHOmBC/6hIv+kB+uOFb dgIfqtC5ZypeJaL2Q3m7ftcZ8ETUjXhPxgRJY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=K5GuLpIhGHIUFC+JrR4m9LN2dppulLHfrZRcd3xIiW0=; b=hJpU0RWkT3eJFtxIIAjmewcRorlfmee0Y4Uw5MLF/3KTN16KrkwbLoLkw9AYIrUBdE q4VsbE9sG1hYyRxKOhSW1ARxaNxqBn1mO33eLuytmAOL0EYd8h1ykOw4JPlhou4r6fv0 4d8HW2SLvp/++mOye1+yrVmk4dK88XRASQtZ2Cs1UsqaLUEOWqz+U5I5NHwZWU3ZTSnJ 68srfsZD93ggY+Le9FpeJ1fI5JloCEoLw4y3ze0nu4d1F7C7oVF0Ms9EfYnMiVzT0i+B rTTYdLuXshqfPauwDjncLARDi6KVMjiBWae5K+bOxKgzsG1pWmqbEdSv9nhuhm8b1Y5l aFSQ== X-Gm-Message-State: AJaThX4BSUDv3NQKo4B78msY8hOzPcEqottzmg6erAf3hAVW93aURBhp xbl6vW7niXeOCb4s4yhdMX+8XlCutE8= X-Google-Smtp-Source: AGs4zMYgOW5ltZ2ZNnvFj+F591Z9P613sVKnh23KJQA8iHtCcUhLjuj5PDLMtgAdfPJ+StKbKJyUUQ== X-Received: by 10.223.134.76 with SMTP id 12mr2317816wrw.137.1512052520831; Thu, 30 Nov 2017 06:35:20 -0800 (PST) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id c54sm6502864wra.84.2017.11.30.06.34.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 30 Nov 2017 06:34:41 -0800 (PST) Date: Thu, 30 Nov 2017 14:34:39 +0000 From: Leif Lindholm To: Ard Biesheuvel Cc: "edk2-devel@lists.01.org" Message-ID: <20171130143439.2uid33ehb6xcbyfo@bivouac.eciton.net> References: <20171130142257.28140-1-leif.lindholm@linaro.org> MIME-Version: 1.0 In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [PATCH v2] Omap35xxPkg: add GetTimeInNanoSecond implementation X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Nov 2017 14:30:57 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Nov 30, 2017 at 02:24:24PM +0000, Ard Biesheuvel wrote: > On 30 November 2017 at 14:22, Leif Lindholm wrote: > > Commit a63be426f8e3 ("ArmPlatformPkg: Store initial timer value") caused > > BeagleBoard to stop building, due to Omap35xxTimerLib lacking an > > implementation of GetTimeInNanoSecond (). So add one. > > > > Contributed-under: TianoCore Contribution Agreement 1.1 > > Signed-off-by: Leif Lindholm > > --- > > Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c | 24 ++++++++++++++++++++++++ > > 1 file changed, 24 insertions(+) > > > > diff --git a/Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c b/Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c > > index 652c47b6f6..a6f79ddd57 100644 > > --- a/Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c > > +++ b/Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c > > @@ -131,3 +131,27 @@ GetPerformanceCounterProperties ( > > > > return PcdGet64(PcdEmbeddedPerformanceCounterFrequencyInHz); > > } > > + > > +/** > > + Converts elapsed ticks of performance counter to time in nanoseconds. > > + > > + This function converts the elapsed ticks of running performance counter to > > + time value in unit of nanoseconds. > > + > > + @param Ticks The number of elapsed ticks of running performance counter. > > + > > + @return The elapsed time in nanoseconds. > > + > > +**/ > > +UINT64 > > +EFIAPI > > +GetTimeInNanoSecond ( > > + IN UINT64 Ticks > > + ) > > +{ > > + UINT32 Period; > > + > > + Period = PcdGet32 (PcdEmbeddedPerformanceCounterPeriodInNanoseconds); > > + > > + return (Ticks * Period); > > +} > > -- > > 2.11.0 > > > > Reviewed-by: Ard Biesheuvel Thanks. These two BeagleBoard/Omap fixes pushed as ef1b70ff08..f0d9d2b617.