Question about rsdp test?

Al Stone al.stone at linaro.org
Wed Jul 20 16:02:09 UTC 2016


On 07/20/2016 01:02 AM, Dong, Eric wrote:
> Hi Alex,
> 
> We are using the UEFI code. In UEFI code, it uses both Rsdt and Xsdt. I check the ACPI spec and found below info: (Excerpt from ACPI spec 6.0 page 113)
> 	Platforms provide the RSDT to enable compatibility with ACPI 1.0 operating systems. The XSDT, described in the next section, supersedes RSDT functionality.
> 
> So base on this, I think UEFI code is ok and Fwts should not do such check.

Right.  That is what the spec says.  I think Alex's question was different,
though, and something the spec does not address.

The test being referred to below is saying that the RSDT and XSDT addresses
are different.  It is okay to use both addresses.  But, if they are different,
which one is the correct one for the OS?  There is no way to know, and the
spec does not tell us, so this is an error.

As a practical matter, in the firmware I have seen, either RSDT is used, or
XSDT is used, or both are used and have exactly the same value.

> Thanks,
> Eric
>> -----Original Message-----
>> From: Alex Hung [mailto:alex.hung at canonical.com]
>> Sent: Wednesday, July 20, 2016 1:44 PM
>> To: Dong, Eric
>> Cc: Al Stone; fwts-devel at lists.ubuntu.com
>> Subject: Re: Question about rsdp test?
>>
>> FWTS only generates this error message when both are RSDT and XSDT
>> aren't zero && they aren't not pointing to the same address, as below.
>> Is there any reason why your firmware to point to different two
>> differently? Recent 64 bit OS will have no problem choosing XSDT, but
>> older 32 bit OS may pick RSDT which is never tested and that can
>> potentially cause problems.
>>
>>         if (rsdp->rsdt_address != 0 && rsdp->xsdt_address != 0)
>>                 if ((uint64_t)rsdp->rsdt_address == rsdp->xsdt_address) {
>>                         fwts_warning(fw,
>>                                      "Both RSDT and XSDT addresses are set. "
>>                                      "Since they are the same address, this "
>>                                      "is unambiguous to the OS.");
>>                         fwts_advice(fw,
>>                                     "Set only one of the 32-bit RSDT or the "
>>                                     "64-bit XSDT addresses.  Recent versions "
>>                                     "of the spec require that only one of "
>>                                     "these be used but as a practical matter, "
>>                                     "many vendors do use both.  If both "
>>                                     "fields must be used, make sure they at "
>>                                     "least contain the same value so that "
>>                                     "the OS can unambiguously determine "
>>                                     "which address is the correct one.");
>>                 } else {
>>                         fwts_failed(fw, LOG_LEVEL_MEDIUM,
>>                                     "RSDPBothAddressesFound",
>>                                     "RSDP: only one of RsdtAddress or "
>>                                     "XsdtAddress should be non-zero.  Both "
>>                                     "fields are non-zero.");
>>                 }
>>         else
>>                 fwts_passed(fw,
>>                             "RSDP: only one of RsdtAddress or XsdtAddress "
>>                             "is non-zero.");
>>
>> On Wed, Jul 20, 2016 at 9:39 AM, Dong, Eric <eric.dong at intel.com> wrote:
>>>> On 07/18/2016 06:06 AM, Dong, Eric wrote:
>>>>> When I do the Fwts test, I got below error for the rsdp test.
>>>>>
>>>>> rsdp           ;HED rsdp: RSDP Root System Description Pointer test.
>>>>>
>>>>> rsdp           ;SEP ------------------------------------------------------------
>>>>>
>>>>> rsdp           ;INF Test 1 of 1: RSDP Root System Description Pointer test.
>>>>>
>>>>> rsdp           ;PAS PASSED: Test 1, RSDP first checksum is correct
>>>>>
>>>>> rsdp           ;PAS PASSED: Test 1, RSDP: oem_id contains only printable
>>>>>
>>>>> rsdp           ;PAS characters.
>>>>>
>>>>> rsdp           ;PAS PASSED: Test 1, RSDP: revision is 2.
>>>>>
>>>>> rsdp           ;PAS PASSED: Test 1, RSDP: at least one of RsdtAddress or
>>>>>
>>>>> rsdp           ;PAS XsdtAddress is non-zero.
>>>>>
>>>>> rsdp           ;FAL FAILED [MEDIUM] RSDPBothAddressesFound: Test 1, RSDP: only
>>>>>
>>>>> rsdp           ;FAL one of RsdtAddress or XsdtAddress should be non-zero. Both
>>>>>
>>>>> rsdp           ;FAL fields are non-zero.
>>>>>
>>>>> rsdp           ;PAS PASSED: Test 1, RSDP: the correct RSDT/XSDT address is being
>>>>>
>>>>> rsdp           ;PAS used.
>>>>>
>>>>> rsdp           ;PAS PASSED: Test 1, RSDP: the table is the correct length.
>>>>>
>>>>> rsdp           ;PAS PASSED: Test 1, RSDP second checksum is correct
>>>>>
>>>>> rsdp           ;PAS PASSED: Test 1, RSDP: the reserved field is zero.
>>>>>
>>>>> rsdp           ;NLN
>>>>>
>>>>> rsdp           ;SEP ============================================================
>>>>>
>>>>> rsdp           ;SUM 8 passed, 1 failed, 0 warning, 0 aborted, 0 skipped, 0 info
>>>>>
>>>>> rsdp           ;SUM only.
>>>>>
>>>>> rsdp           ;SEP ============================================================
>>>>>
>>>>>
>>>>>
>>>>> I think it caused by both Rsdt and Xsdt address are not zero. But From ACPI 6.0
>>>>> spec: (page 115)
>>>>>
>>>>> Notice that both the XSDT and the RSDT can be pointed to by the RSDP structure.
>>>>> An ACPI-compatible OS must use the XSDT if present.
>>>>>
>>>>>
>>>>>
>>>>> From the above description, I think the spec allowed the case of both Xsdt and
>>>>> Rsdt are not zero.  So I think Fwts tool should not report error for this case,
>>>>> am I correct?
>>>>>
>>>>>
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Eric
>>>>
>>>> On what architecture?  If this is on ARMv8, we should not be using an RSDT,
>>>> according to SBSA/SBBR specifications.  If this is on x86, or perhaps ia64,
>>>> then the test probably needs to allow for that, if it doesn't already.
>>>>
>>>> Personally, I'd really like to discourage new systems from using the 32-bit
>>>> tables.
>>>>
>>>
>>> Yes, I use the x86 system. I think it's an optional choice, Fwts should not report it as an error, maybe a warning is ok.
>>>
>>>> --
>>>> ciao,
>>>> al
>>>> -----------------------------------
>>>> Al Stone
>>>> Software Engineer
>>>> Linaro Enterprise Group
>>>> al.stone at linaro.org
>>>> -----------------------------------
>>>
>>> --
>>> fwts-devel mailing list
>>> fwts-devel at lists.ubuntu.com
>>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/fwts-devel
>>
>>
>>
>> --
>> Cheers,
>> Alex Hung


-- 
ciao,
al
-----------------------------------
Al Stone
Software Engineer
Linaro Enterprise Group
al.stone at linaro.org
-----------------------------------



More information about the fwts-devel mailing list