From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x229.google.com (mail-wm0-x229.google.com [IPv6:2a00:1450:400c:c09::229]) (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 3976E81F4F for ; Fri, 2 Dec 2016 03:03:46 -0800 (PST) Received: by mail-wm0-x229.google.com with SMTP id f82so12378285wmf.1 for ; Fri, 02 Dec 2016 03:03:46 -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=J29rPIQlUgxJgF9YkJE+XvcLDv5iiPR6zxS/c1FUaU8=; b=SOWR0hFJqay4w0NZGQ4KQ3tv0qEScS32XgtkFuGV3d2lc/9EZj/c6AjEyra/26Gh5f ROT6xqsjWMuV7IHVWI0wEmdYZ2plO1CjRXFgjJU/gX+wyVeRjOFSvDgSENvYq/w3VwHN ItOEzex2jDxsOqMj0Vbh8g3lIt94gncG5qjBo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=J29rPIQlUgxJgF9YkJE+XvcLDv5iiPR6zxS/c1FUaU8=; b=fOtwZGJ1kwb7BsGqk9BwKjnIb2+W+igUTwe1cEYUiPrLvjlv7sw2527PLQgq2n0AEi Xx6TtzQkfkivrvi3HEtDAdHUHKPEvLdAoDq51oy1/F2hsumIFtR78AAA+g2YCMCD/iSo TJWsbRZUGEuI+pNPGt7YmS8KTFhzmjZBuBlsQG2gxY4RoXLJ63eNeNJ3kd/O919GNZEJ lQmoQxvZPOm+rH8X94bb1UNCDsVz4i4Yt2w1tUD4Q/0tjCe0yieIrzlLXzW1MeetNNmX 9/WBvA7RRtFbTNRELwzxp2IIqv3XPfXazHZNDKCeSy+8caK14i/sr+Ehqd4Hg89dbJ/w LHKg== X-Gm-Message-State: AKaTC02g2i9rgc4AOyNd7jtEpylJWyZ9DHdTIpEQ9WlXIjlpqQtm50RfVRittzs6tmX8rifo X-Received: by 10.28.32.150 with SMTP id g144mr2446896wmg.46.1480676624647; Fri, 02 Dec 2016 03:03:44 -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 p144sm2595906wme.23.2016.12.02.03.03.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Dec 2016 03:03:44 -0800 (PST) Date: Fri, 2 Dec 2016 11:03:42 +0000 From: Leif Lindholm To: Laszlo Ersek Cc: edk2-devel-01 , Ard Biesheuvel Message-ID: <20161202110342.GS27069@bivouac.eciton.net> References: <20161201175633.2538-1-lersek@redhat.com> <20161201175633.2538-5-lersek@redhat.com> MIME-Version: 1.0 In-Reply-To: <20161201175633.2538-5-lersek@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [PATCH 4/5] ArmVirtPkg/QemuFwCfgLib: rebase lib instance to OvmfPkg/IndustryStandard X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2016 11:03:46 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Dec 01, 2016 at 06:56:32PM +0100, Laszlo Ersek wrote: > where "QemuFwCfgDma.h" was added in the previous patch. > > Cc: Ard Biesheuvel > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Laszlo Ersek This is nice cleanup. One bit of bikeshedding below, address or ignore - regardless: Reviewed-by: Leif Lindholm > --- > ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c | 24 +++----------------- > 1 file changed, 3 insertions(+), 21 deletions(-) > > diff --git a/ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c b/ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c > index 2fd8d9050566..62a85dff328e 100644 > --- a/ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c > +++ b/ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c > @@ -25,6 +25,8 @@ > > #include > > +#include > + So, I forget if we have official guidelines on this, but instinctively I would put IndustryStandard before Library (alphabetically). Regards, Leif > STATIC UINTN mFwCfgSelectorAddress; > STATIC UINTN mFwCfgDataAddress; > STATIC UINTN mFwCfgDmaAddress; > @@ -53,26 +55,6 @@ STATIC READ_BYTES_FUNCTION DmaReadBytes; > // > STATIC READ_BYTES_FUNCTION *InternalQemuFwCfgReadBytes = MmioReadBytes; > > -// > -// Communication structure for DmaReadBytes(). All fields are encoded in big > -// endian. > -// > -#pragma pack (1) > -typedef struct { > - UINT32 Control; > - UINT32 Length; > - UINT64 Address; > -} FW_CFG_DMA_ACCESS; > -#pragma pack () > - > -// > -// Macros for the FW_CFG_DMA_ACCESS.Control bitmap (in native encoding). > -// > -#define FW_CFG_DMA_CTL_ERROR BIT0 > -#define FW_CFG_DMA_CTL_READ BIT1 > -#define FW_CFG_DMA_CTL_SKIP BIT2 > -#define FW_CFG_DMA_CTL_SELECT BIT3 > - > > /** > Returns a boolean indicating if the firmware configuration interface > @@ -183,7 +165,7 @@ QemuFwCfgInitialize ( > > QemuFwCfgSelectItem (QemuFwCfgItemInterfaceVersion); > Features = QemuFwCfgRead32 (); > - if ((Features & BIT1) != 0) { > + if ((Features & FW_CFG_F_DMA) != 0) { > mFwCfgDmaAddress = FwCfgDmaAddress; > InternalQemuFwCfgReadBytes = DmaReadBytes; > } > -- > 2.9.2 > > > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel