<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in prmt.c</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>7f5704b6 - ACPI: PRM: Remove unnecessary strict handler address checks</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/drivers/acpi/prmt.c#7f5704b6</link>
        <description>ACPI: PRM: Remove unnecessary strict handler address checksCommit 088984c8d54c (&quot;ACPI: PRM: Find EFI_MEMORY_RUNTIME block for PRMhandler and context&quot;) added unnecessary strict handler address checks,causing the PRM module to fail in translating memory error addresses.Both static data buffer address and ACPI parameter buffer address maybe NULL if they are not needed, as described in section 4.1.2 PRM HandlerInformation Structure of Platform Runtime Mechanism specification [1].Here are two examples from real hardware:----PRMT.dsl----- staic data address is not used[10Ch 0268   2]                     Revision : 0000[10Eh 0270   2]                       Length : 002C[110h 0272  16]                 Handler GUID : F6A58D47-E04F-4F5A-86B8-2A50D4AA109B[120h 0288   8]              Handler address : 0000000065CE51F4[128h 0296   8]           Satic Data Address : 0000000000000000[130h 0304   8]       ACPI Parameter Address : 000000006522A718- ACPI parameter address is not used[1B0h 0432   2]                     Revision : 0000[1B2h 0434   2]                       Length : 002C[1B4h 0436  16]                 Handler GUID : 657E8AE6-A8FC-4877-BB28-42E7DE1899A5[1C4h 0452   8]              Handler address : 0000000065C567C8[1CCh 0460   8]           Satic Data Address : 000000006113FB98[1D4h 0468   8]       ACPI Parameter Address : 0000000000000000Fixes: 088984c8d54c (&quot;ACPI: PRM: Find EFI_MEMORY_RUNTIME block for PRM handler and context&quot;)Reported-and-tested-by: Shi Liu &lt;aurelianliu@tencent.com&gt;Cc: All applicable &lt;stable@vger.kernel.org&gt;Signed-off-by: Aubrey Li &lt;aubrey.li@linux.intel.com&gt;Link: https://uefi.org/sites/default/files/resources/Platform%20Runtime%20Mechanism%20-%20with%20legal%20notice.pdf # [1]Reviewed-by: Koba Ko &lt;kobak@nvidia.com&gt;Acked-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;Link: https://patch.msgid.link/20250126022250.3014210-1-aubrey.li@linux.intel.com[ rjw: Minor changelog edits ]Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;

            List of files:
            /linux-6.15/drivers/acpi/prmt.c</description>
        <pubDate>Sun, 26 Jan 2025 02:22:50 +0000</pubDate>
        <dc:creator>Aubrey Li &lt;aubrey.li@linux.intel.com&gt;</dc:creator>
    </item>
<item>
        <title>3d1c6512 - ACPI: PRM: Clean up guid type in struct prm_handler_info</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/drivers/acpi/prmt.c#3d1c6512</link>
        <description>ACPI: PRM: Clean up guid type in struct prm_handler_infoClang 19 prints a warning when we pass &amp;th-&gt;guid to efi_pa_va_lookup():drivers/acpi/prmt.c:156:29: error: passing 1-byte aligned argument to4-byte aligned parameter 1 of &apos;efi_pa_va_lookup&apos; may result in anunaligned pointer access [-Werror,-Walign-mismatch]  156 |                         (void *)efi_pa_va_lookup(&amp;th-&gt;guid, handler_info-&gt;handler_address);      |                                                  ^The problem is that efi_pa_va_lookup() takes a efi_guid_t and &amp;th-&gt;guidis a regular guid_t.  The difference between the two types is thealignment.  efi_guid_t is a typedef.	typedef guid_t efi_guid_t __aligned(__alignof__(u32));It&apos;s possible that this a bug in Clang 19.  Even though the alignment of&amp;th-&gt;guid is not explicitly specified, it will still end up being alignedat 4 or 8 bytes.Anyway, as Ard points out, it&apos;s cleaner to change guid to efi_guid_t typeand that also makes the warning go away.Fixes: 088984c8d54c (&quot;ACPI: PRM: Find EFI_MEMORY_RUNTIME block for PRM handler and context&quot;)Reported-by: Linux Kernel Functional Testing &lt;lkft@linaro.org&gt;Suggested-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;Signed-off-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;Tested-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;Acked-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;Link: https://patch.msgid.link/3777d71b-9e19-45f4-be4e-17bf4fa7a834@stanley.mountain[ rjw: Subject edit ]Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;

            List of files:
            /linux-6.15/drivers/acpi/prmt.c</description>
        <pubDate>Thu, 24 Oct 2024 08:07:15 +0000</pubDate>
        <dc:creator>Dan Carpenter &lt;dan.carpenter@linaro.org&gt;</dc:creator>
    </item>
<item>
        <title>088984c8 - ACPI: PRM: Find EFI_MEMORY_RUNTIME block for PRM handler and context</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/drivers/acpi/prmt.c#088984c8</link>
        <description>ACPI: PRM: Find EFI_MEMORY_RUNTIME block for PRM handler and contextPRMT needs to find the correct type of block to translate the PA-VAmapping for EFI runtime services.The issue arises because the PRMT is finding a block of typeEFI_CONVENTIONAL_MEMORY, which is not appropriate for runtime servicesas described in Section 2.2.2 (Runtime Services) of the UEFISpecification [1]. Since the PRM handler is a type of runtime service,this causes an exception when the PRM handler is called.    [Firmware Bug]: Unable to handle paging request in EFI runtime service    WARNING: CPU: 22 PID: 4330 at drivers/firmware/efi/runtime-wrappers.c:341        __efi_queue_work+0x11c/0x170    Call trace:Let PRMT find a block with EFI_MEMORY_RUNTIME for PRM handler and PRMcontext.If no suitable block is found, a warning message will be printed, butthe procedure continues to manage the next PRM handler.However, if the PRM handler is actually called without proper allocation,it would result in a failure during error handling.By using the correct memory types for runtime services, ensure that thePRM handler and the context are properly mapped in the virtual addressspace during runtime, preventing the paging request error.The issue is really that only memory that has been remapped for runtimeby the firmware can be used by the PRM handler, and so the region needsto have the EFI_MEMORY_RUNTIME attribute.Link: https://uefi.org/sites/default/files/resources/UEFI_Spec_2_10_Aug29.pdf # [1]Fixes: cefc7ca46235 (&quot;ACPI: PRM: implement OperationRegion handler for the PlatformRtMechanism subtype&quot;)Cc: All applicable &lt;stable@vger.kernel.org&gt;Signed-off-by: Koba Ko &lt;kobak@nvidia.com&gt;Reviewed-by: Matthew R. Ochs &lt;mochs@nvidia.com&gt;Reviewed-by: Zhang Rui &lt;rui.zhang@intel.com&gt;Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;Link: https://patch.msgid.link/20241012205010.4165798-1-kobak@nvidia.com[ rjw: Subject and changelog edits ]Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;

            List of files:
            /linux-6.15/drivers/acpi/prmt.c</description>
        <pubDate>Sat, 12 Oct 2024 20:50:10 +0000</pubDate>
        <dc:creator>Koba Ko &lt;kobak@nvidia.com&gt;</dc:creator>
    </item>
<item>
        <title>f0fcdd2c - ACPI: PRM: Add PRM handler direct call support</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/drivers/acpi/prmt.c#f0fcdd2c</link>
        <description>ACPI: PRM: Add PRM handler direct call supportPlatform Runtime Mechanism (PRM) handlers can be invoked from either the AMLinterpreter or directly by an OS driver. Implement the latter.  [ bp: Massage commit message. ]Signed-off-by: John Allen &lt;john.allen@amd.com&gt;Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;Reviewed-by: Yazen Ghannam &lt;yazen.ghannam@amd.com&gt;Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;Acked-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;Link: https://lore.kernel.org/r/20240730151731.15363-2-john.allen@amd.com

            List of files:
            /linux-6.15/drivers/acpi/prmt.c</description>
        <pubDate>Tue, 30 Jul 2024 15:17:30 +0000</pubDate>
        <dc:creator>John Allen &lt;john.allen@amd.com&gt;</dc:creator>
    </item>
<item>
        <title>2e893457 - ACPI: PRM: Annotate struct prm_module_info with __counted_by</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/drivers/acpi/prmt.c#2e893457</link>
        <description>ACPI: PRM: Annotate struct prm_module_info with __counted_byPrepare for the coming implementation by GCC and Clang of the __counted_byattribute. Flexible array members annotated with __counted_by can havetheir accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS(for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-familyfunctions).As found with Coccinelle[1], add __counted_by for struct prm_module_info.Link: https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci # [1]Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;Reviewed-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;

            List of files:
            /linux-6.15/drivers/acpi/prmt.c</description>
        <pubDate>Fri, 22 Sep 2023 17:53:15 +0000</pubDate>
        <dc:creator>Kees Cook &lt;keescook@chromium.org&gt;</dc:creator>
    </item>
<item>
        <title>5894cf57 - acpi/prmt: Use EFI runtime sandbox to invoke PRM handlers</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/drivers/acpi/prmt.c#5894cf57</link>
        <description>acpi/prmt: Use EFI runtime sandbox to invoke PRM handlersInstead of bypassing the kernel&apos;s adaptation layer for performing EFIruntime calls, wire up ACPI PRM handling into it. This means these callscan no longer occur concurrently with EFI runtime calls, and will bemade from the EFI runtime workqueue. It also means any page faultsoccurring during PRM handling will be identified correctly asoriginating in firmware code.Acked-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;Signed-off-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;

            List of files:
            /linux-6.15/drivers/acpi/prmt.c</description>
        <pubDate>Sun, 02 Jul 2023 09:57:34 +0000</pubDate>
        <dc:creator>Ard Biesheuvel &lt;ardb@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>e38abdab - efi/runtime-wrappers: Remove duplicated macro for service returning void</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/drivers/acpi/prmt.c#e38abdab</link>
        <description>efi/runtime-wrappers: Remove duplicated macro for service returning void__efi_call_virt() exists as an alternative for efi_call_virt() for thesole reason that ResetSystem() returns void, and so we cannot use a callto it in the RHS of an assignment.Given that there is only a single user, let&apos;s drop the macro, and expandit into the caller. That way, the remaining macro can be tightenedsomewhat in terms of type safety too.Note that the use of typeof() on the runtime service invocation does notresult in an actual call being made, but it does require a few pointertypes to be fixed up and converted into the proper function pointerprototypes.Signed-off-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;

            List of files:
            /linux-6.15/drivers/acpi/prmt.c</description>
        <pubDate>Sun, 02 Jul 2023 16:40:39 +0000</pubDate>
        <dc:creator>Ard Biesheuvel &lt;ardb@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>182da6f2 - ACPI: PRM: Check whether EFI runtime is available</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/drivers/acpi/prmt.c#182da6f2</link>
        <description>ACPI: PRM: Check whether EFI runtime is availableThe ACPI PRM address space handler calls efi_call_virt_pointer() toexecute PRM firmware code, but doing so is only permitted when the EFIruntime environment is available. Otherwise, such calls are guaranteedto result in a crash, and must therefore be avoided.Given that the EFI runtime services may become unavailable after a crashoccurring in the firmware, we need to check this each time the PRMaddress space handler is invoked. If the EFI runtime services were notavailable at registration time to being with, don&apos;t install the addressspace handler at all.Fixes: cefc7ca46235 (&quot;ACPI: PRM: implement OperationRegion handler for the PlatformRtMechanism subtype&quot;)Signed-off-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;Cc: All applicable &lt;stable@vger.kernel.org&gt;Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;

            List of files:
            /linux-6.15/drivers/acpi/prmt.c</description>
        <pubDate>Thu, 12 Jan 2023 13:33:19 +0000</pubDate>
        <dc:creator>Ard Biesheuvel &lt;ardb@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>353efd5e - ACPI: PRM: Change handler_addr type to void pointer</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/drivers/acpi/prmt.c#353efd5e</link>
        <description>ACPI: PRM: Change handler_addr type to void pointerhandler_addr is a virtual address passed to efi_call_virt_pointer.While x86 currently type cast it into the pointer in it&apos;s arch specificarch_efi_call_virt() implementation, ARM64 is restrictive for rightreasons.Convert the handler_addr type from u64 to void pointer.Signed-off-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;Acked-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;Signed-off-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;

            List of files:
            /linux-6.15/drivers/acpi/prmt.c</description>
        <pubDate>Tue, 28 Jun 2022 12:53:43 +0000</pubDate>
        <dc:creator>Sudeep Holla &lt;sudeep.holla@arm.com&gt;</dc:creator>
    </item>
<item>
        <title>c52ca713 - ACPI: PRM: Handle memory allocation and memory remap failure</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/drivers/acpi/prmt.c#c52ca713</link>
        <description>ACPI: PRM: Handle memory allocation and memory remap failureHandle memory allocation and memory remap failure in acpi_parse_prmt()when system runs out of memory to avoid the potential NULL pointerdereference errors.Signed-off-by: Aubrey Li &lt;aubrey.li@linux.intel.com&gt;Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;

            List of files:
            /linux-6.15/drivers/acpi/prmt.c</description>
        <pubDate>Wed, 20 Oct 2021 03:23:17 +0000</pubDate>
        <dc:creator>Aubrey Li &lt;aubrey.li@intel.com&gt;</dc:creator>
    </item>
<item>
        <title>caa2bd07 - ACPI: PRM: Remove unnecessary blank lines</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/drivers/acpi/prmt.c#caa2bd07</link>
        <description>ACPI: PRM: Remove unnecessary blank linesJust remove unnecessary blank lines, no other code changesSigned-off-by: Aubrey Li &lt;aubrey.li@linux.intel.com&gt;Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;

            List of files:
            /linux-6.15/drivers/acpi/prmt.c</description>
        <pubDate>Wed, 20 Oct 2021 03:23:16 +0000</pubDate>
        <dc:creator>Aubrey Li &lt;aubrey.li@intel.com&gt;</dc:creator>
    </item>
<item>
        <title>3265cc3e - ACPI: PRM: Find PRMT table before parsing it</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/drivers/acpi/prmt.c#3265cc3e</link>
        <description>ACPI: PRM: Find PRMT table before parsing itFind and verify PRMT before parsing it, which eliminates awarning on machines without PRMT:	[    7.197173] ACPI: PRMT not presentFixes: cefc7ca46235 (&quot;ACPI: PRM: implement OperationRegion handler for the PlatformRtMechanism subtype&quot;)Signed-off-by: Aubrey Li &lt;aubrey.li@linux.intel.com&gt;Tested-by: Paul Menzel &lt;pmenzel@molgen.mpg.de&gt;Cc: 5.14+ &lt;stable@vger.kernel.org&gt; # 5.14+[ rjw: Subject and changelog edits ]Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;

            List of files:
            /linux-6.15/drivers/acpi/prmt.c</description>
        <pubDate>Wed, 08 Sep 2021 10:55:45 +0000</pubDate>
        <dc:creator>Aubrey Li &lt;aubrey.li@intel.com&gt;</dc:creator>
    </item>
<item>
        <title>2bbfa0ad - ACPI: PRM: Deal with table not present or no module found</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/drivers/acpi/prmt.c#2bbfa0ad</link>
        <description>ACPI: PRM: Deal with table not present or no module foundOn the system PRMT table is not present, dmesg output:	$ dmesg | grep PRM	[    1.532237] ACPI: PRMT not present	[    1.532237] PRM: found 4294967277 modulesThe result of acpi_table_parse_entries need to be checked and returnimmediately if PRMT table is not present or no PRM module found.Signed-off-by: Aubrey Li &lt;aubrey.li@linux.intel.com&gt;Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;

            List of files:
            /linux-6.15/drivers/acpi/prmt.c</description>
        <pubDate>Fri, 06 Aug 2021 00:46:24 +0000</pubDate>
        <dc:creator>Aubrey Li &lt;aubrey.li@intel.com&gt;</dc:creator>
    </item>
<item>
        <title>d7a188bb - ACPI: PRM: make symbol &apos;prm_module_list&apos; static</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/drivers/acpi/prmt.c#d7a188bb</link>
        <description>ACPI: PRM: make symbol &apos;prm_module_list&apos; staticThe sparse tool complains as follows:drivers/acpi/prmt.c:53:1: warning: symbol &apos;prm_module_list&apos; was not declared. Should it be static?This symbol is not used outside of prmt.c, so marks it static.Fixes: cefc7ca46235 (&quot;ACPI: PRM: implement OperationRegion handler for the PlatformRtMechanism subtype&quot;)Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;Signed-off-by: Wei Yongjun &lt;weiyongjun1@huawei.com&gt;Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;

            List of files:
            /linux-6.15/drivers/acpi/prmt.c</description>
        <pubDate>Tue, 15 Jun 2021 17:21:57 +0000</pubDate>
        <dc:creator>Wei Yongjun &lt;weiyongjun1@huawei.com&gt;</dc:creator>
    </item>
<item>
        <title>cefc7ca4 - ACPI: PRM: implement OperationRegion handler for the PlatformRtMechanism subtype</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/drivers/acpi/prmt.c#cefc7ca4</link>
        <description>ACPI: PRM: implement OperationRegion handler for the PlatformRtMechanism subtypePlatform Runtime Mechanism (PRM) is a firmware interface that exposesa set of binary executables that can either be called from the AMLinterpreter or device drivers by bypassing the AML interpreter.This change implements the AML interpreter path.According to the specification [1], PRM services are listed in anACPI table called the PRMT. This patch parses module and handlerinformation listed in the PRMT and registers the PlatformRtMechanismOpRegion handler before ACPI tables are loaded.Each service is defined by a 16-byte GUID and called from writing a26-byte ASL buffer containing the identifier to a FieldUnit objectdefined inside a PlatformRtMechanism OperationRegion.    OperationRegion (PRMR, PlatformRtMechanism, 0, 26)    Field (PRMR, BufferAcc, NoLock, Preserve)    {        PRMF, 208 // Write to this field to invoke the OperationRegion Handler    }The 26-byte ASL buffer is defined as the following:Byte Offset   Byte Length    Description=============================================================     0             1         PRM OperationRegion handler status     1             8         PRM service status     9             1         PRM command    10            16         PRM handler GUIDThe ASL caller fills out a 26-byte buffer containing the PRM commandand the PRM handler GUID like so:    /* Local0 is the PRM data buffer */    Local0 = buffer (26){}    /* Create byte fields over the buffer */    CreateByteField (Local0, 0x9, CMD)    CreateField (Local0, 0x50, 0x80, GUID)    /* Fill in the command and data fields of the data buffer */    CMD = 0 // run command    GUID = ToUUID(&quot;xxxx-xx-xxx-xxxx&quot;)    /*     * Invoke PRM service with an ID that matches GUID and save the     * result.     */    Local0 = (\_SB.PRMT.PRMF = Local0)Byte offset 0 - 8 are written by the handler as a status passed back to AMLand used by ASL like so:    /* Create byte fields over the buffer */    CreateByteField (Local0, 0x0, PSTA)    CreateQWordField (Local0, 0x1, USTA)In this ASL code, PSTA contains a status from the OperationRegion andUSTA contains a status from the PRM service.The 26-byte buffer is recieved by acpi_platformrt_space_handler. Thishandler will look at the command value and the handler guid and takethe approperiate actions.Command value    Action=====================================================================    0            Run the PRM service indicated by the PRM handler                 GUID (bytes 10-26)    1            Prevent PRM runtime updates from happening to the                 service&apos;s parent module    2            Allow PRM updates from happening to the service&apos;s parent moduleThis patch enables command value 0.Link: https://uefi.org/sites/default/files/resources/Platform%20Runtime%20Mechanism%20-%20with%20legal%20notice.pdf # [1]Signed-off-by: Erik Kaneda &lt;erik.kaneda@intel.com&gt;[ rjw: Subject and changelog edits ]Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;

            List of files:
            /linux-6.15/drivers/acpi/prmt.c</description>
        <pubDate>Thu, 10 Jun 2021 03:41:52 +0000</pubDate>
        <dc:creator>Erik Kaneda &lt;erik.kaneda@intel.com&gt;</dc:creator>
    </item>
</channel>
</rss>
