linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hanjun Guo <hanjun.guo@linaro.org>
To: "Zheng, Lv" <lv.zheng@intel.com>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>
Cc: "linaro-acpi@lists.linaro.org" <linaro-acpi@lists.linaro.org>
Subject: Re: Question about FADT length
Date: Fri, 09 May 2014 16:44:36 +0800	[thread overview]
Message-ID: <536C9574.3040005@linaro.org> (raw)
In-Reply-To: <1AE640813FDE7649BE1B193DEA596E880255ADFD@SHSMSX101.ccr.corp.intel.com>

Hi Lv,

On 2014-5-9 9:45, Zheng, Lv wrote:
> Hi,
> 
> Using size instead of version field to determine FADT version has been talked for many times.
> I didn't see a real case that was persuasive enough to introduce this change.
> Do you have real platforms for us to examine?

There are some changes for the FADT in the new coming ACPI spec
which changed the field of "reserved4" into other useful information,
and the name of that field was changed also. So if we want to accommodate
that change, we should modify the "reserved4" in the macro of
ACPI_FADT_V2_SIZE too. If any change to the FADT in the future, we may
modify it again, so I think constant value for the macros would
be better.

Thanks
Hanjun

> 
> Thanks and best regards
> -Lv
> 
>> From: linux-acpi-owner@vger.kernel.org [mailto:linux-acpi-owner@vger.kernel.org] On Behalf Of Hanjun Guo
>> Sent: Wednesday, May 07, 2014 4:14 PM
>>
>> Hi,
>>
>> I ran into some compile errors when I was prototyping the code
>> for the proposals in ASWG, it turns out that some field in FADT is
>> changed and "reserved4[0]" used in ACPI_FADT_V2_SIZE will
>> cause the error.
>>
>> So my question is that the length of very version of FADT is
>> fixed, why not use a constant value for this puspose?
>>
>> Here is the code:
>>
>> /*
>>   * Sizes of the various flavors of FADT. We need to look closely
>>   * at the FADT length because the version number essentially tells
>>   * us nothing because of many BIOS bugs where the version does not
>>   * match the expected length. In other words, the length of the
>>   * FADT is the bottom line as to what the version really is.
>>   *
>>   * For reference, the values below are as follows:
>>   *     FADT V1  size: 0x074
>>   *     FADT V2  size: 0x084
>>   *     FADT V3  size: 0x0F4
>>   *     FADT V4  size: 0x0F4
>>   *     FADT V5  size: 0x10C
>>   */
>> #define ACPI_FADT_V1_SIZE       (u32) (ACPI_FADT_OFFSET (flags) + 4)
>> #define ACPI_FADT_V2_SIZE       (u32) (ACPI_FADT_OFFSET (reserved4[0]) + 3)
>> #define ACPI_FADT_V3_SIZE       (u32) (ACPI_FADT_OFFSET (sleep_control))
>> #define ACPI_FADT_V5_SIZE       (u32) (sizeof (struct acpi_table_fadt))
>>
>> Why not  #define ACPI_FADT_V1_SIZE 0x074 ?
>> Did I miss something? any clarify will be appreciated :)
>>
>> Thanks
>> Hanjun
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html


  reply	other threads:[~2014-05-09  8:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-07  8:14 Question about FADT length Hanjun Guo
2014-05-09  1:45 ` Zheng, Lv
2014-05-09  8:44   ` Hanjun Guo [this message]
2014-05-12  5:32     ` Zheng, Lv

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-all 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=536C9574.3040005@linaro.org \
    --to=hanjun.guo@linaro.org \
    --cc=linaro-acpi@lists.linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=lv.zheng@intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).