public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: TVKR <tresko1@gmail.com>
To: edk2-devel@lists.01.org
Subject: Data Structure alignment
Date: Thu, 14 Mar 2019 15:46:33 -0500	[thread overview]
Message-ID: <CAD+hitemczBHzo88dLnPUqg5Bik0zUKSaodY-kZaRvtCWdDg+A@mail.gmail.com> (raw)

Hi,
The PCI FW spec says PCI Data Structure must be DWORD aligned and I came
across this code the uses the following check

(RomHeader->PcirOffset & 3) != 0

The above is using the PcirOffset to do the check and not the actual data
structure itself (located at RomHeader + RomHeader->PcirOffset) Shouldn't
it instead be

(RomHeader + RomHeader->PcirOffset & 3) != 0

Thanks


             reply	other threads:[~2019-03-14 20:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-14 20:46 TVKR [this message]
2019-03-14 21:08 ` Data Structure alignment Tim Lewis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAD+hitemczBHzo88dLnPUqg5Bik0zUKSaodY-kZaRvtCWdDg+A@mail.gmail.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox