<?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>MPC5xxx中的主题 Re: Problem in entering supervisor mode in MPC5748g</title>
    <link>https://community.nxp.com/t5/MPC5xxx/Problem-in-entering-supervisor-mode-in-MPC5748g/m-p/778529#M11325</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Ok so you want to change from user mode to supervisor mode.&lt;/P&gt;&lt;P&gt;That is always good to know.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/38981iFCCC728C30F82BC4/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For your usecase:&lt;/P&gt;&lt;P&gt;1. call IVOR8&lt;/P&gt;&lt;P&gt;asm("se_sc");&lt;/P&gt;&lt;P&gt;2. change SRR1 in IVOR8 exception according to picture.&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Nov 2017 08:15:37 GMT</pubDate>
    <dc:creator>petervlna</dc:creator>
    <dc:date>2017-11-28T08:15:37Z</dc:date>
    <item>
      <title>Problem in entering supervisor mode in MPC5748g</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Problem-in-entering-supervisor-mode-in-MPC5748g/m-p/778524#M11320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After triggering the software interrupt 1&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; INTC.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;SSCIR&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;[1].&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;B&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #0000c0; font-size: small;"&gt;SET&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; = 1; &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;// to trigger a software interrupt.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using this assembly code inside the interrupt service routine to change the&amp;nbsp;PR bit of the MSR register.&lt;/P&gt;&lt;P&gt;1)&amp;nbsp;to read the current MSR value into variable var&lt;/P&gt;&lt;P&gt;var is declared as:&lt;/P&gt;&lt;P&gt;uint32_t var = 0;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;__asm__&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: small;"&gt;__volatile__&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;"e_lis %r30, (&lt;SPAN style="text-decoration: underline;"&gt;var&lt;/SPAN&gt;)@h"&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: small;"&gt;__asm__&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: small;"&gt;__volatile__&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;"e_ori %r30, %r30, (&lt;SPAN style="text-decoration: underline;"&gt;var&lt;/SPAN&gt;)@l"&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: small;"&gt;__asm__&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: small;"&gt;__volatile__&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;"&lt;SPAN style="text-decoration: underline;"&gt;mfmsr&lt;/SPAN&gt; %r31"&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: small;"&gt;__asm__&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #7f0055; font-size: small;"&gt;__volatile__&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;"e_stw %r31, 0(%r30)"&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;But the e_ori instruction is intrepretted as e_mulli instruction in the disassembly, therefore its not loading the lower 16 bits into the r30 register, and returning a IVOR1 exception after executing the e_stw instruction.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;Is this the correct way to do it? please suggest some solution.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Nov 2017 09:31:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Problem-in-entering-supervisor-mode-in-MPC5748g/m-p/778524#M11320</guid>
      <dc:creator>ashishraikar</dc:creator>
      <dc:date>2017-11-15T09:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in entering supervisor mode in MPC5748g</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Problem-in-entering-supervisor-mode-in-MPC5748g/m-p/778525#M11321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am not aware which compiler are you using.&lt;/P&gt;&lt;P&gt;I have used GHS one and bellow core works for me fine:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/32991i6CEC18E21FE1D260/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Nov 2017 13:32:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Problem-in-entering-supervisor-mode-in-MPC5748g/m-p/778525#M11321</guid>
      <dc:creator>petervlna</dc:creator>
      <dc:date>2017-11-15T13:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in entering supervisor mode in MPC5748g</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Problem-in-entering-supervisor-mode-in-MPC5748g/m-p/778526#M11322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does this code work? The code does not reference var, and the comments mention changing from supervisor to user mode. What about changing from user to supervisor mode?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Nov 2017 05:25:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Problem-in-entering-supervisor-mode-in-MPC5748g/m-p/778526#M11322</guid>
      <dc:creator>proteusiv</dc:creator>
      <dc:date>2017-11-27T05:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in entering supervisor mode in MPC5748g</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Problem-in-entering-supervisor-mode-in-MPC5748g/m-p/778527#M11323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Yes, the code works. Why I would post not working code?&lt;/P&gt;&lt;P&gt;var is defined as global 32-bit variable for me.&lt;/P&gt;&lt;P&gt;Change from user to supervisor is done via system call exception IVOR. (see core reference manual)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Nov 2017 10:08:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Problem-in-entering-supervisor-mode-in-MPC5748g/m-p/778527#M11323</guid>
      <dc:creator>petervlna</dc:creator>
      <dc:date>2017-11-27T10:08:41Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in entering supervisor mode in MPC5748g</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Problem-in-entering-supervisor-mode-in-MPC5748g/m-p/778528#M11324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&amp;nbsp; I have tried calling&amp;nbsp;sm("se_sc"); from my code and have set up an&amp;nbsp;IVOR8_Handler.&amp;nbsp; I have tried masking out the PR bit from the MSR register, but do not know which mnemonic do I use.&amp;nbsp;Please can you expand upon how to change to supervisor mode?&amp;nbsp; Many thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Nov 2017 06:24:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Problem-in-entering-supervisor-mode-in-MPC5748g/m-p/778528#M11324</guid>
      <dc:creator>proteusiv</dc:creator>
      <dc:date>2017-11-28T06:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in entering supervisor mode in MPC5748g</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Problem-in-entering-supervisor-mode-in-MPC5748g/m-p/778529#M11325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Ok so you want to change from user mode to supervisor mode.&lt;/P&gt;&lt;P&gt;That is always good to know.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/38981iFCCC728C30F82BC4/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For your usecase:&lt;/P&gt;&lt;P&gt;1. call IVOR8&lt;/P&gt;&lt;P&gt;asm("se_sc");&lt;/P&gt;&lt;P&gt;2. change SRR1 in IVOR8 exception according to picture.&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Nov 2017 08:15:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Problem-in-entering-supervisor-mode-in-MPC5748g/m-p/778529#M11325</guid>
      <dc:creator>petervlna</dc:creator>
      <dc:date>2017-11-28T08:15:37Z</dc:date>
    </item>
  </channel>
</rss>

