From: K Prateek Nayak <kprateek.nayak@amd.com>
To: Mario Limonciello <mario.limonciello@amd.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Len Brown <lenb@kernel.org>, Borislav Petkov <bp@alien8.de>,
Yazen Ghannam <yazen.ghannam@amd.com>,
<linux-kernel@vger.kernel.org>, <linux-acpi@vger.kernel.org>,
<acpica-devel@lists.linux.dev>
Cc: Vilas Sridharan <Vilas.Sridharan@amd.com>
Subject: Re: [RFC PATCH 2/3] ACPI: PHAT: Add generic helper to parse PHAT records
Date: Fri, 5 Jun 2026 09:36:35 +0530 [thread overview]
Message-ID: <f554ac86-01bb-400e-a206-b40c41da8ce7@amd.com> (raw)
In-Reply-To: <308d71e0-2f63-49a6-8a2b-d6a6401b8018@amd.com>
Hello Mario,
On 6/3/2026 7:55 PM, Mario Limonciello wrote:
>> +/**
>> + * acpi_phat_get_vendor_reset_reason - Find a "Vendor Specific Reset Reason
>> + * Entry" with the matching @guid from the "Firmware Health Data Record". If
>> + * successfully located, the function will allocate an object of the size
>> + * "acpi_phat_vendor_element.length" and return a pointer populated with the
>> + * content of the record.
>> + *
>> + * @guid: The "Vendor Data ID" of the reset reason record.
>> + *
>> + * Return: A valid pointer to an allocated "acpi_phat_vendor_element" populated
>> + * with the data from the record with matching @guid; an ERR_PTR() otherwise if
>> + * no matching records were found, or if the element could not be allocated.
>> + * If a valid pointer was returned, the user must call
>> + * acpi_phat_put_vendor_reset_reason() for the object once done to reclaim the
>> + * allocated memory.
>> + */
>> +struct acpi_phat_vendor_element *acpi_phat_get_vendor_reset_reason(guid_t *guid)
>> +{
>> + struct acpi_table_header *phat_tbl __free(acpi_put_table) = NULL;
>> + struct acpi_phat_health_data *fw_health_data;
>> + struct acpi_phat_device_data *dev_data;
>> + acpi_status status;
>> + void *data;
>> + int i;
>> +
>> + status = acpi_get_table(ACPI_SIG_PHAT, 0, &phat_tbl);
>> + if (ACPI_FAILURE(status))
>> + return ERR_PTR(-ENODEV);
>
> For some further sanity checking, should you look at the PHAT revision
> here matches 2 as well? Table 55 in the linked spec.
Good catch! I'll add in that check in the next version.
--
Thanks and Regards,
Prateek
next prev parent reply other threads:[~2026-06-05 4:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-03 6:33 [RFC PATCH 0/3] ACPI, x86/cpu/amd: Parse S5_REST_STATUS from ACPI PHAT on supported AMD platforms K Prateek Nayak
2026-06-03 6:33 ` [RFC PATCH 1/3] ACPICA: actbl2.h: ACPI 6.5: PHAT: Add more struct definitions K Prateek Nayak
2026-06-03 6:33 ` [RFC PATCH 2/3] ACPI: PHAT: Add generic helper to parse PHAT records K Prateek Nayak
2026-06-03 14:25 ` Mario Limonciello
2026-06-05 4:06 ` K Prateek Nayak [this message]
2026-06-03 6:33 ` [RFC PATCH 3/3] x86/cpu/amd: Fetch S5_RESET_STATUS from PHAT when supported K Prateek Nayak
2026-06-03 14:26 ` Mario Limonciello
2026-06-05 4:10 ` K Prateek Nayak
2026-06-03 14:37 ` [RFC PATCH 0/3] ACPI, x86/cpu/amd: Parse S5_REST_STATUS from ACPI PHAT on supported AMD platforms Rong Zhang
2026-06-05 4:02 ` K Prateek Nayak
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=f554ac86-01bb-400e-a206-b40c41da8ce7@amd.com \
--to=kprateek.nayak@amd.com \
--cc=Vilas.Sridharan@amd.com \
--cc=acpica-devel@lists.linux.dev \
--cc=bp@alien8.de \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=rafael@kernel.org \
--cc=yazen.ghannam@amd.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