From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::344; helo=mail-wm1-x344.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) (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 AB3712194D387 for ; Mon, 3 Dec 2018 01:42:47 -0800 (PST) Received: by mail-wm1-x344.google.com with SMTP id r24so6514927wmh.0 for ; Mon, 03 Dec 2018 01:42:47 -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=tB7OGyqmPCtjfQ1p7oFRyF+IiwBx2kZNlr5WcWB3vFM=; b=LS5FmBONvB/tYKiDt2b/JxZbql3crmCZiUfQ6J2tFcx5ECWQwC4vAgpIdz1qpZw+Z5 VKiID6+0ysSwsjkbLVv6+7j+P3JFqncs02X+Dh6zZFKdrS+IY6Ln/79U6aJUu0BozKGD NSNGRwOdFmSourdjsaNJbzDlck/YGw5Ur0vAY= 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=tB7OGyqmPCtjfQ1p7oFRyF+IiwBx2kZNlr5WcWB3vFM=; b=JHI9P//gyzcxMs+VpKHAP2tGKlWjyswgfBQHvQXsPZ4LEgHMVW7PY2FT0CEZzyFgYl Xv0vDWfP6d93CQMimqomRohzszGH1sH115RV/CzDPwQKOSZs5DV7IIhgaluqMaojdlRY rFkf1rheb17J7QVNrLQ2M5otJLjgCjj9o7zDj/Qy626GqJ51InGNpUxSjPrMUZQ0DfIG Q39BJe3TbzzhMl8owkDmqWEm4DZSAV/HemXYwq3EBjusfaZOuyRKaD1vFf+OhxrqhTNk MyjnZUCcP6bm7+pV7uKPqcnG4lbXVy9oUwBBvdl/H1G6nIffEPehNN2ObmdXHmO2fvUi 1xPA== X-Gm-Message-State: AA+aEWYWIyEbegvBReSgN/dV0naG8Qgb+fQTzVH5pTObQ3wMdt+jQqDK Qfhke3zaTjfAnkSsMhhCRjeVW2YLTcc= X-Google-Smtp-Source: AFSGD/UgXcx9ntMQz/zo1PqnNhjvNEcVZ27cDn23RFTi/PYPNs05ACzgkwzvYHKW8oKaMsyAtmU2Dw== X-Received: by 2002:a1c:68d7:: with SMTP id d206mr7278617wmc.43.1543830164718; Mon, 03 Dec 2018 01:42: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 n5sm8861967wrr.94.2018.12.03.01.42.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 03 Dec 2018 01:42:43 -0800 (PST) Date: Mon, 3 Dec 2018 09:42:42 +0000 From: Leif Lindholm To: Chris Co Cc: "edk2-devel@lists.01.org" , Ard Biesheuvel , Michael D Kinney Message-ID: <20181203094241.n6nbk4zvs73xf4k3@bivouac.eciton.net> References: <20180921082542.35768-1-christopher.co@microsoft.com> <20180921082542.35768-10-christopher.co@microsoft.com> <20181101182020.w5qvmjbi3ukhxf2t@bivouac.eciton.net> MIME-Version: 1.0 In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [PATCH edk2-platforms 09/27] Silicon/NXP: Add headers for SoC-specific i.MX packages to use X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Dec 2018 09:42:48 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Dec 01, 2018 at 12:22:17AM +0000, Chris Co wrote: > > If using EFI_ACPI prefix, these #defines really should be in edk2 MdePkg. And > > CSRT itself is, so that might not be a bad idea. > > > > > + > > > +#pragma pack(push, 1) > > > > I don't see this #pragma making any difference to the structs below, can it be > > dropped? > > The pragma pack is defensive. Without it, we rely on the compiler > packing structures by default and this may not happen on 64 bit > compiles. I understand that is what the pragma does. My comment was because all of the variables in the below structs are naturally aligned. The reason I dislike its use when effectively a no-op, is that it makes it look like it it isn't a no-op. If it covers a larger set of structs, some of which require the packed attribute I'm OK with that. But I'm not a fan of adding it "just in case" without contemplating the statement's (lack of) effect. Regards, Leif > I have addressed the remaining feedback and will resubmit with v2. > > Thanks, > Chris > > > > +//------------------------------------------------------------------- > > > +----- // CSRT Resource Group header 24 bytes long > > > +//------------------------------------------------------------------- > > > +----- > > > +typedef struct { > > > + UINT32 Length; > > > + UINT32 VendorID; > > > + UINT32 SubVendorId; > > > + UINT16 DeviceId; > > > + UINT16 SubdeviceId; > > > + UINT16 Revision; > > > + UINT16 Reserved; > > > + UINT32 SharedInfoLength; > > > +} EFI_ACPI_5_0_CSRT_RESOURCE_GROUP_HEADER; > > > + > > > +//------------------------------------------------------------------- > > > +----- // CSRT Resource Descriptor 12 bytes total > > > +//------------------------------------------------------------------- > > > +----- > > > +typedef struct { > > > + UINT32 Length; > > > + UINT16 ResourceType; > > > + UINT16 ResourceSubType; > > > + UINT32 UID; > > > +} EFI_ACPI_5_0_CSRT_RESOURCE_DESCRIPTOR_HEADER; > > > +#pragma pack (pop)