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::22a; helo=mail-wr0-x22a.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr0-x22a.google.com (mail-wr0-x22a.google.com [IPv6:2a00:1450:400c:c0c::22a]) (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 06F972277AF06 for ; Mon, 23 Apr 2018 09:22:13 -0700 (PDT) Received: by mail-wr0-x22a.google.com with SMTP id p18-v6so23752459wrm.1 for ; Mon, 23 Apr 2018 09:22:13 -0700 (PDT) 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=VUx7u2QloNaGoR0978BfDm8+DZzUv6BvX0n34oDzJY4=; b=cBlHdYAE6nu3Nq75kVD+UrsADblMCs+yOTePE3XyaUUE2Akflby5Wv1VM62HIHzBoh z0/0vsDHynY5UHOT9kduLZzC+yio1IKL0QYilQEQTqZopcE9my40V/1FH0V5FHg4RmbN Lo8iRiliipiWFtR/skxRozbLH6wZU+O2Mxrog= 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=VUx7u2QloNaGoR0978BfDm8+DZzUv6BvX0n34oDzJY4=; b=LcRh39tis2Sa0qM9Gx5Hb6yTb3cH5IDUcbFI42tvDVGbhWOjnKq9xNyP/cn/eoOze8 SUPnofnbf99fFGCGgWgg3L79/ecWpsEGFiUFS7HPXER6gbAsdxhSCQx2xoWY1l6tvuy7 WeK83H09ItR3xtFfIR7dwbrVAV0gi03NMs1ZXX/s2zd6ktAFHbdrZdimh7PVhzzbKV19 RLtrcwKETrmJdmfvJmvhkWKDAt7Z4yt+6nLqxbU5Pi0+AUh40P+ZszlZjW7xtmz603cB 4+z0J/+T+UG/E/6G7zkjpcvSQF8A9dEEPBN+djeLPCoi1JTcK7tlszvYHqRv/MmFZ0cp tNzA== X-Gm-Message-State: ALQs6tD/2KxKcBCRcxxRCUJIh+z1dc9ZeMs9mjOwq26ANWO8HEUTxF1g JBmL734Kv4oPrD8dH7A36/yzEg== X-Google-Smtp-Source: AB8JxZo7vdTeibRmUNhQvYBxcJo611aAg/IH1hr7B+5OkNuWgjd7+EbQqjiOsJpdU5dy1Z4DhDonng== X-Received: by 10.28.63.148 with SMTP id m142mr10300714wma.153.1524500531482; Mon, 23 Apr 2018 09:22:11 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id b5-v6sm18382688wrh.67.2018.04.23.09.22.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Apr 2018 09:22:10 -0700 (PDT) Date: Mon, 23 Apr 2018 17:22:08 +0100 From: Leif Lindholm To: Girish Pathak Cc: "edk2-devel@lists.01.org" , "ard.biesheuvel@linaro.org" , Matteo Carlini , Stephanie Hughes-Fitt , nd Message-ID: <20180423162208.qgjfm6znzcsbhjna@bivouac.eciton.net> References: <20180320161212.79120-1-girish.pathak@arm.com> <20180320161212.79120-17-girish.pathak@arm.com> <20180423113150.6dgqzp23ersamcrh@bivouac.eciton.net> MIME-Version: 1.0 In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [PATCH v3 16/16] ArmPkg: Introduce SCMI protocol X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2018 16:22:14 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Apr 23, 2018 at 04:06:43PM +0000, Girish Pathak wrote: > > From: Leif Lindholm > > Sent: 23 April 2018 12:32 > > To: Girish Pathak > > Cc: edk2-devel@lists.01.org; ard.biesheuvel@linaro.org; Matteo Carlini > > ; Stephanie Hughes-Fitt > Fitt@arm.com>; nd > > Subject: Re: [PATCH v3 16/16] ArmPkg: Introduce SCMI protocol > > > > Hmm, I did find a few minor things below that I need to hear back on > > before pushing. > > Thanks for your comments, We can incorporate all the changes > suggested, shall I tidy this up and resubmit the patch series ? Oh God, please don't. If you're happy with all of my comments on previous patches, can you just say if you're OK with me folding in the below patch into 16/16 before pushing?: >>From 50294f90db0c3e7b5b19bc2022b5c1d866d0b8e1 Mon Sep 17 00:00:00 2001 From: Leif Lindholm Date: Mon, 23 Apr 2018 12:36:06 +0100 Subject: [PATCH] fixup scmi --- ArmPkg/Drivers/ArmScmiDxe/ArmScmiClockProtocolPrivate.h | 2 +- ArmPkg/Drivers/ArmScmiDxe/ScmiClockProtocol.c | 4 ++-- ArmPkg/Drivers/ArmScmiDxe/ScmiPerformanceProtocol.c | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ArmPkg/Drivers/ArmScmiDxe/ArmScmiClockProtocolPrivate.h b/ArmPkg/Drivers/ArmScmiDxe/ArmScmiClockProtocolPrivate.h index 71245c1647..0d1ec6f5ad 100644 --- a/ArmPkg/Drivers/ArmScmiDxe/ArmScmiClockProtocolPrivate.h +++ b/ArmPkg/Drivers/ArmScmiDxe/ArmScmiClockProtocolPrivate.h @@ -30,7 +30,7 @@ typedef struct { #define RATE_FORMAT_SHIFT 12 #define RATE_FORMAT_MASK 0x0001 #define RATE_FORMAT(RatesFlags) ((RatesFlags >> RATE_FORMAT_SHIFT) \ - & RATE_FORMAT_MASK) + & RATE_FORMAT_MASK) // Number of remaining rates after a call to the SCP, RatesFlag Bits[31:16] #define NUM_REMAIN_RATES_SHIFT 16 diff --git a/ArmPkg/Drivers/ArmScmiDxe/ScmiClockProtocol.c b/ArmPkg/Drivers/ArmScmiDxe/ScmiClockProtocol.c index fe7edd2a8c..64d2afab72 100644 --- a/ArmPkg/Drivers/ArmScmiDxe/ScmiClockProtocol.c +++ b/ArmPkg/Drivers/ArmScmiDxe/ScmiClockProtocol.c @@ -83,7 +83,7 @@ ClockGetTotalClocks ( Status = ScmiGetProtocolAttributes (SCMI_PROTOCOL_ID_CLOCK, &ReturnValues); if (EFI_ERROR (Status)) { - return Status; + return Status; } *TotalClocks = SCMI_CLOCK_PROTOCOL_TOTAL_CLKS (ReturnValues[0]); @@ -334,7 +334,7 @@ ClockRateGet ( return Status; } - *Rate = ((UINT64)ClockRate->High << 32) | ClockRate->Low; + *Rate = ConvertTo64Bit (ClockRate->Low, ClockRate->High); return EFI_SUCCESS; } diff --git a/ArmPkg/Drivers/ArmScmiDxe/ScmiPerformanceProtocol.c b/ArmPkg/Drivers/ArmScmiDxe/ScmiPerformanceProtocol.c index ac32442ad8..e012424a9b 100644 --- a/ArmPkg/Drivers/ArmScmiDxe/ScmiPerformanceProtocol.c +++ b/ArmPkg/Drivers/ArmScmiDxe/ScmiPerformanceProtocol.c @@ -15,9 +15,9 @@ DEN0056A_System_Control_and_Management_Interface.pdf **/ +#include #include #include -#include #include "ArmScmiPerformanceProtocolPrivate.h" #include "ScmiPrivate.h" @@ -72,7 +72,7 @@ PerformanceGetAttributes ( return Status; } - memcpy ( + CopyMem ( Attributes, ReturnValues, sizeof (SCMI_PERFORMANCE_PROTOCOL_ATTRIBUTES) @@ -127,7 +127,7 @@ PerformanceDomainAttributes ( return Status; } - memcpy ( + CopyMem ( DomainAttributes, ReturnValues, sizeof (SCMI_PERFORMANCE_DOMAIN_ATTRIBUTES) @@ -219,7 +219,7 @@ PerformanceDescribeLevels ( } for (LevelNo = 0; LevelNo < ReturnNumLevels; LevelNo++) { - memcpy ( + CopyMem ( &LevelArray[LevelIndex++], &Levels->PerfLevel[LevelNo], sizeof (SCMI_PERFORMANCE_LEVEL) -- 2.11.0