<?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>topic PSECT on a page boundary in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/psect-on-a-page-boundary/m-p/4854565#M31709</link>
    <description>&lt;BR /&gt;Hi All,&lt;BR /&gt;&lt;BR /&gt;Currently I'm struggling with the following problem:&lt;BR /&gt;&lt;BR /&gt;I have a little routine that executes in kernel mode at elevated IPL. The routine was originally written in C (generated a psect of 800 or so bytes). In order to prevent pagefaults I have to lock the routine in the working set. So far, so good.&lt;BR /&gt;Unfortunately, my "locking" routine only locks one page (8K).&lt;BR /&gt;As it happened the other day, the psect started off in one page and ended in the next, leading to the dreaded PGFIPLHI crash.&lt;BR /&gt;At first, I searched the C docs, but could not find how to tell the C compiler to align a code psect on a specific boundary (lots of stuff on data though).&lt;BR /&gt;Does this "feature" exist? And how is it activated?&lt;BR /&gt;Failing to find a solution in C, I rewrote the routine in MACRO-32, and gave the code psect the alignment attribute PAGE. A bit to my surprise, the psect was aligned on a 512-byte boundary. If you think about it, only natural for a VAX (page=512 bytes). But I thought (foolish maybe), on an Alpha PAGE=8K.&lt;BR /&gt;Any ideas on how I can put my psects on a boundary larger than 512-bytes?&lt;BR /&gt;And euh, rewriting the "locking" routine would break too much of the already existing code.&lt;BR /&gt;Furthermore, the code has to run on the 3 architectures.&lt;BR /&gt;&lt;BR /&gt;Any help greatly appreciated.&lt;BR /&gt;&lt;BR /&gt;Greetz,&lt;BR /&gt;&lt;BR /&gt;Kris</description>
    <pubDate>Tue, 18 May 2004 14:29:14 GMT</pubDate>
    <dc:creator>Kris Clippeleyr</dc:creator>
    <dc:date>2004-05-18T14:29:14Z</dc:date>
    <item>
      <title>PSECT on a page boundary</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/psect-on-a-page-boundary/m-p/4854565#M31709</link>
      <description>&lt;BR /&gt;Hi All,&lt;BR /&gt;&lt;BR /&gt;Currently I'm struggling with the following problem:&lt;BR /&gt;&lt;BR /&gt;I have a little routine that executes in kernel mode at elevated IPL. The routine was originally written in C (generated a psect of 800 or so bytes). In order to prevent pagefaults I have to lock the routine in the working set. So far, so good.&lt;BR /&gt;Unfortunately, my "locking" routine only locks one page (8K).&lt;BR /&gt;As it happened the other day, the psect started off in one page and ended in the next, leading to the dreaded PGFIPLHI crash.&lt;BR /&gt;At first, I searched the C docs, but could not find how to tell the C compiler to align a code psect on a specific boundary (lots of stuff on data though).&lt;BR /&gt;Does this "feature" exist? And how is it activated?&lt;BR /&gt;Failing to find a solution in C, I rewrote the routine in MACRO-32, and gave the code psect the alignment attribute PAGE. A bit to my surprise, the psect was aligned on a 512-byte boundary. If you think about it, only natural for a VAX (page=512 bytes). But I thought (foolish maybe), on an Alpha PAGE=8K.&lt;BR /&gt;Any ideas on how I can put my psects on a boundary larger than 512-bytes?&lt;BR /&gt;And euh, rewriting the "locking" routine would break too much of the already existing code.&lt;BR /&gt;Furthermore, the code has to run on the 3 architectures.&lt;BR /&gt;&lt;BR /&gt;Any help greatly appreciated.&lt;BR /&gt;&lt;BR /&gt;Greetz,&lt;BR /&gt;&lt;BR /&gt;Kris</description>
      <pubDate>Tue, 18 May 2004 14:29:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/psect-on-a-page-boundary/m-p/4854565#M31709</guid>
      <dc:creator>Kris Clippeleyr</dc:creator>
      <dc:date>2004-05-18T14:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: PSECT on a page boundary</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/psect-on-a-page-boundary/m-p/4854566#M31710</link>
      <description>&lt;BR /&gt;You mention 3 architectures.&lt;BR /&gt;On VAX you need to lock down code &amp;amp; data.&lt;BR /&gt;On Alpha code, data and linages... still doable.&lt;BR /&gt;On IA-64 (ELF Image) you would need to worry about code, data, short data, Linker generated code (jumps), ... too tricky.&lt;BR /&gt;So for iVMS you want to look at using lib$lock_image(va) / lib$unlock_image(va).&lt;BR /&gt;This locks the whole image so you want to look at placing high IPL code into a separate shareable image.&lt;BR /&gt;This service also exists on Alpha (recent versions).&lt;BR /&gt;&lt;BR /&gt;[I learned all this during the OpenVMS bootkamp this morning!]&lt;BR /&gt;&lt;BR /&gt;In macro PAGE defaults to 512, but... why not force the issue and specuify a number? (13 for 8KB).&lt;BR /&gt;&lt;A href="http://h71000.www7.hp.com/doc/73final/4515/4515pro_010.html#index_x_401" target="_blank"&gt;http://h71000.www7.hp.com/doc/73final/4515/4515pro_010.html#index_x_401&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The Linker manual suggest that specifying 'page' would give you 64KB on Alpha. Maybe you want to all a PSECT line to your LINKER OPTION file to influence matters?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h71000.www7.hp.com/doc/73final/4548/4548pro_005.html#psect_att_sec" target="_blank"&gt;http://h71000.www7.hp.com/doc/73final/4548/4548pro_005.html#psect_att_sec&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;PAGE = "Alignment on the default target page size, which is 64 KB for Alpha linking and 512 bytes for VAX linking"&lt;BR /&gt;&lt;BR /&gt;Maybe you code psect got collected with other code psects in a way not intended? You makde and studied a link map did you? Maybe attach one to a future reply if you get desperate?&lt;BR /&gt;&lt;BR /&gt;hth,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 18 May 2004 15:01:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/psect-on-a-page-boundary/m-p/4854566#M31710</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2004-05-18T15:01:12Z</dc:date>
    </item>
    <item>
      <title>Re: PSECT on a page boundary</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/psect-on-a-page-boundary/m-p/4854567#M31711</link>
      <description>&lt;BR /&gt;Hein,&lt;BR /&gt;&lt;BR /&gt;Thanx for the pointers.&lt;BR /&gt;On VAX there was actually no problem; the code there is only 194 bytes in size (fits easily in a 512-byte page).&lt;BR /&gt;The code on Alpha is larger (588 bytes); so that presented a problem if aligned on a 512-byte boundary. But, your tip on specifying a number (13) instead of a reserved word (PAGE) for the psect alignment did the trick on Alpha.&lt;BR /&gt;I think I was a bit tired last night when reading thru the manuals (in the VAX Macro manual is mentioned a number between 1 and 9). Didn't think a larger number would work, but it does.&lt;BR /&gt;&lt;BR /&gt;Btw, for Itanium I see no problem since I've read in the release notes that, and I quote&lt;BR /&gt;"On OpenVMS I64 systems, $LKWSET has been modified to avoid the problems encountered on OpenVMS Alpha systems by locking the entire image referenced by the parameters."&lt;BR /&gt;&lt;BR /&gt;Thanx again, and problem solved.&lt;BR /&gt;&lt;BR /&gt;CU,&lt;BR /&gt;&lt;BR /&gt;Kris</description>
      <pubDate>Wed, 19 May 2004 05:35:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/psect-on-a-page-boundary/m-p/4854567#M31711</guid>
      <dc:creator>Kris Clippeleyr</dc:creator>
      <dc:date>2004-05-19T05:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: PSECT on a page boundary</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/psect-on-a-page-boundary/m-p/4854568#M31712</link>
      <description>See remarks above.&lt;BR /&gt;Kris (aka Qkcl)</description>
      <pubDate>Fri, 07 Jan 2005 09:49:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/psect-on-a-page-boundary/m-p/4854568#M31712</guid>
      <dc:creator>Kris Clippeleyr</dc:creator>
      <dc:date>2005-01-07T09:49:14Z</dc:date>
    </item>
  </channel>
</rss>

