diff mbox series

FWTS still checks the _UID of GIC entries for cores with _STA set to 0, causing the test to fail

Message ID PSAPR06MB44392EE43FDD30CE77F04CF18E8BA@PSAPR06MB4439.apcprd06.prod.outlook.com
State Superseded
Headers show
Series FWTS still checks the _UID of GIC entries for cores with _STA set to 0, causing the test to fail | expand

Commit Message

Monty Zhao May 8, 2025, 9:47 a.m. UTC
Hi,

BUG Link:Bug #2110175 “FWTS still checks the _UID of GIC entries for core...” : Bugs : fwts package : Ubuntu<https://bugs.launchpad.net/ubuntu/+source/fwts/+bug/2110175>
When certain CPU cores are disabled (i.e., their _STA value is changed from 0xF to 0x0), FWTS correctly skips these cores. However, it still checks whether the _UID in the MADT GIC entries matches the UID of the cores, which causes the test to FAIL.
log like this:
madt: GICC has no matching processor UID x.
This behavior is not compliant with the ACPI specification, as the correct way to indicate whether a GIC is used by the OS is through the Flags field in the MADT GICC entries, not the _STA value.
URL:https://uefi.org/htmlspecs/ACPI_Spec_6_4_html/05_ACPI_Software_Programming_Model/ACPI_Software_Programming_Model.html?highlight=madt#gicc-cpu-interface-flags
We've made a little modification to fix this:

Thanks,
Monty





This email (including its attachments) is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. Unauthorized use, dissemination, distribution or copying of this email or the information herein or taking any action in reliance on the contents of this email or the information herein, by anyone other than the intended recipient, or an employee or agent responsible for delivering the message to the intended recipient, is strictly prohibited. If you are not the intended recipient, please do not read, copy, use or disclose any part of this e-mail to others. Please notify the sender immediately and permanently delete this e-mail and any attachments if you received it in error. Internet communications cannot be guaranteed to be timely, secure, error-free or virus-free. The sender does not accept liability for any errors or omissions.

Comments

Ivan Hu May 23, 2025, 6:06 a.m. UTC | #1
Hi Monty,

Thanks for the report and the fix suggestion.

To proceed with reviewing and integrating the change, could you please send the modification as a proper git-formatted patch (using git format-patch or git send-email), including a commit message with a Signed-off-by line? This will help us keep track of authorship and streamline the review process.

Thanks,
Ivan

On 2025/5/8 17:47, Monty Zhao wrote:
> Hi,
> 
> BUG Link:Bug #2110175 “FWTS still checks the _UID of GIC entries for core...” : Bugs : fwts package : Ubuntu <https://bugs.launchpad.net/ubuntu/+source/fwts/+bug/2110175>
> When certain CPU cores are disabled (i.e., their _STA value is changed from 0xF to 0x0), FWTS correctly skips these cores. However, it still checks whether the _UID in the MADT GIC entries matches the UID of the cores, which causes the test to FAIL.
> log like this:
> madt: GICC has no matching processor UID x.
> This behavior is not compliant with the ACPI specification, as the correct way to indicate whether a GIC is used by the OS is through the Flags field in the MADT GICC entries, not the _STA value.
> URL:https://uefi.org/htmlspecs/ACPI_Spec_6_4_html/05_ACPI_Software_Programming_Model/ACPI_Software_Programming_Model.html?highlight=madt#gicc-cpu-interface-flags <https://uefi.org/htmlspecs/ACPI_Spec_6_4_html/05_ACPI_Software_Programming_Model/ACPI_Software_Programming_Model.html?highlight=madt#gicc-cpu-interface-flags>
> We've made a little modification to fix this:
> diff --git a/src/acpi/madt/madt.c b/src/acpi/madt/madt.c
> index 0b6d00ad..21e614a6 100644
> --- a/src/acpi/madt/madt.c
> +++ b/src/acpi/madt/madt.c
> @@ -1083,7 +1083,8 @@ static int madt_gicc(fwts_framework *fw,
>                              "MADT %s reserved field properly set to zero.",
>                              madt_sub_names[hdr->type]);
> -       madt_find_processor_uid(fw, gic->processor_uid, "GICC");
> +       if((gic->flags & 1) != 0)
> +               madt_find_processor_uid(fw, gic->processor_uid, "GICC");
>          mask = 0xfffffffc;
>          start = 2;
> 
> Thanks,
> Monty
> 
> 
> 
> 
> This email (including its attachments) is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. Unauthorized use, dissemination, distribution or copying of this email or the information herein or taking any action in reliance on the contents of this email or the information herein, by anyone other than the intended recipient, or an employee or agent responsible for delivering the message to the intended recipient, is strictly prohibited. If you are not the intended recipient, please do not read, copy, use or disclose any part of this e-mail to others. Please notify the sender immediately and permanently delete this e-mail and any attachments if you received it in error. Internet communications cannot be guaranteed to be timely, secure, error-free or virus-free. The sender does not accept liability for any errors or omissions.
> 
>
diff mbox series

Patch

diff --git a/src/acpi/madt/madt.c b/src/acpi/madt/madt.c
index 0b6d00ad..21e614a6 100644
--- a/src/acpi/madt/madt.c
+++ b/src/acpi/madt/madt.c
@@ -1083,7 +1083,8 @@  static int madt_gicc(fwts_framework *fw,
                            "MADT %s reserved field properly set to zero.",
                            madt_sub_names[hdr->type]);

-       madt_find_processor_uid(fw, gic->processor_uid, "GICC");
+       if((gic->flags & 1) != 0)
+               madt_find_processor_uid(fw, gic->processor_uid, "GICC");

        mask = 0xfffffffc;
        start = 2;