<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>i.MX ProcessorsのトピックRe: IMX8QXP SCFW API permissions pm_reset</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/IMX8QXP-SCFW-API-permissions-pm-reset/m-p/1884640#M224749</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/233809"&gt;@grichards-vt&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I was wondering how feasible it is to create a "ghost" resource that could be used as an extra permission check to allow Linux to initiate this reset without handing over SC_R_SYSTEM.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;--&amp;gt;It is not possible to support this operation, and if the reset can be controlled without&amp;nbsp;SC_R_SYSTEM , then there would be no value in SCFW's existence.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Zhiming&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 11 Jun 2024 02:43:28 GMT</pubDate>
    <dc:creator>Zhiming_Liu</dc:creator>
    <dc:date>2024-06-11T02:43:28Z</dc:date>
    <item>
      <title>IMX8QXP SCFW API permissions pm_reset</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8QXP-SCFW-API-permissions-pm-reset/m-p/1883699#M224707</link>
      <description>&lt;P&gt;Hi NXP&lt;/P&gt;&lt;P&gt;I am currently working on a board based on the iMX8QXP_MEK. As part of our update process we sometimes update the boot containers produced by imx-mkimage. Due to this we need to be able to initiate a reset at a lower level to be able to load the new boot container.&lt;/P&gt;&lt;P&gt;I've investigated and it seems like I would need to call the SCFW API sc_pm_reset function but this requires the SC_R_SYSTEM permissions.&lt;/P&gt;&lt;P&gt;I was wondering how feasible it is to create a "ghost" resource that could be used as an extra permission check to allow Linux to initiate this reset without handing over SC_R_SYSTEM.&lt;/P&gt;&lt;P&gt;Something like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;sc_err_t pm_reset(sc_rm_pt_t caller_pt, sc_pm_reset_type_t type)
{
    sc_err_t err = SC_ERR_NONE;
    
    /* Bounds check */
    BOUND_PT(caller_pt);
    ASRT_ERR(type &amp;lt;= SC_PM_RESET_TYPE_BOARD, SC_ERR_PARM);

    /* Check permissions */
    if(rm_is_sys_access(caller_pt) == SC_FALSE &amp;amp;&amp;amp; rm_is_resource_owned(caller_pt, SC_R_POWER_RESET) == SC_FALSE) 
    {
        err = SC_ERR_NOACCESS;
    }

    /* Do reset */
    if (err == SC_ERR_NONE)
    {
        err = board_reset(type, SC_PM_RESET_REASON_SW, caller_pt);
    }

    return err;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This fails due to the rm_rsrc_map_data value check in rm_check_map_ridx(). The map it's referring to is marked with a do not edit comment inside the relevant mx8qx_mek/board.c&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If not, is there any other method you would recommend?&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;George&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2024 15:31:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8QXP-SCFW-API-permissions-pm-reset/m-p/1883699#M224707</guid>
      <dc:creator>grichards-vt</dc:creator>
      <dc:date>2024-06-07T15:31:28Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8QXP SCFW API permissions pm_reset</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8QXP-SCFW-API-permissions-pm-reset/m-p/1884640#M224749</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/233809"&gt;@grichards-vt&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I was wondering how feasible it is to create a "ghost" resource that could be used as an extra permission check to allow Linux to initiate this reset without handing over SC_R_SYSTEM.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;--&amp;gt;It is not possible to support this operation, and if the reset can be controlled without&amp;nbsp;SC_R_SYSTEM , then there would be no value in SCFW's existence.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Zhiming&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2024 02:43:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8QXP-SCFW-API-permissions-pm-reset/m-p/1884640#M224749</guid>
      <dc:creator>Zhiming_Liu</dc:creator>
      <dc:date>2024-06-11T02:43:28Z</dc:date>
    </item>
    <item>
      <title>Re: IMX8QXP SCFW API permissions pm_reset</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX8QXP-SCFW-API-permissions-pm-reset/m-p/1884935#M224773</link>
      <description>&lt;P&gt;Hi Zhiming&lt;/P&gt;&lt;P&gt;Okay, thanks. I was hoping to pass over control for just that one function. There are other functions that are held in SC_R_SYSTEM that I would not like to pass access to such as writing to the fuses&lt;/P&gt;&lt;P&gt;Is there a standard way of allowing a reset to be triggered from Linux? From reading it seems only by passing this SC_R_SYSTEM or by using the watchdog. I will investigate the watchdog however this seems a bit over the top for our use case&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;George&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2024 08:09:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX8QXP-SCFW-API-permissions-pm-reset/m-p/1884935#M224773</guid>
      <dc:creator>grichards-vt</dc:creator>
      <dc:date>2024-06-11T08:09:45Z</dc:date>
    </item>
  </channel>
</rss>

