From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4864:20::e33; helo=mail-vs1-xe33.google.com; envelope-from=tresko1@gmail.com; receiver=edk2-devel@lists.01.org Received: from mail-vs1-xe33.google.com (mail-vs1-xe33.google.com [IPv6:2607:f8b0:4864:20::e33]) (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 6D8432194EB76 for ; Thu, 14 Mar 2019 13:46:46 -0700 (PDT) Received: by mail-vs1-xe33.google.com with SMTP id z6so4132582vsc.0 for ; Thu, 14 Mar 2019 13:46:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=KDrYfl8xsCc6ydt2GIvAEpCIrNN/wFdKfcQR6rU9KmU=; b=tzImx2gey7Q36tIuxZ8JbJdj5qySrOsGx7DhcJDeKxRWAHXoDB9nlx7lKfAec4NKZy pVkWZjaXLP7a78QPrckd9291T4FEZ7kAQV2t1t3GM6Kcb0i8CTPP8jMAYfAyRPLXt0eB vlWF8jHUO6pRuxgWlF8ppgR++GTxccBI+r8TwoVqxKD81hDLOCALv7Fzcl8tl/5jjdec KaqBGtLUf4VWhJ3j08g7qFKFvkDgSl71yUtkrTxpbHYntqxrRVdmgXWhEN33N0HOa82f QbeWKeBCAGpiMvhTFAFR9rfqXC4x1MFJa530u9vuUvfTP+2adUKwuBolkNETASfbZlPd E9JQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=KDrYfl8xsCc6ydt2GIvAEpCIrNN/wFdKfcQR6rU9KmU=; b=tx/Kirz+Lr0aCI4lbAFcvbznny4BeDgWnu3fduz+//Q0o9wbW70EVOSBbfsj6CXVoH jGHaUR4iR1ti4x8IL5cxl650xrmqQ+MbuUhhyMJ+PsZVsZUtUXdHdIQaJYPU44NaDauG uMsZaV3pKFh+qIj946TTrh2B70eOZg1WciAIi1Fcq6Jkxjk9pXeTIJvT421ibXCLMVaw gJHKHSpgX1Ag0ZucRfq/e6KUjVQmCL/mZOSo+tp4TZyFYLHPiso89MY2YSVvCnyV4TpE XPvXmfe8jPjrwuHKqWs8W/vksXKr6skAqkqfMSllmMqcM6PYv6xdFcQplfiLNLjqSyAe 2jfw== X-Gm-Message-State: APjAAAWuTsk2cCta3Eh7NgYjpKwcXQBUPA57K23ykxRkDp47RFRpA1I1 T02ZC/+S3GfrS847eKipDB0UDgEa0R+ETK4NgiObdGHD X-Google-Smtp-Source: APXvYqzRT3LGgK0jQGcZIEakGY0kCiXBne4FxYcN94e/Jvwb1lq1Ca/MfThOJADYxQGUh0y3Qtrgsv90zQdTbiYvRuY= X-Received: by 2002:a67:e993:: with SMTP id b19mr94025vso.45.1552596404783; Thu, 14 Mar 2019 13:46:44 -0700 (PDT) MIME-Version: 1.0 From: TVKR Date: Thu, 14 Mar 2019 15:46:33 -0500 Message-ID: To: edk2-devel@lists.01.org X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Data Structure alignment 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: Thu, 14 Mar 2019 20:46:46 -0000 Content-Type: text/plain; charset="UTF-8" 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