OS2LDR

Revision for “OS2LDR” created on July 25, 2015 @ 13:58:22

Title
OS2LDR
Content
<p>Found via Limewire P2P - real nugget</p><p>The following figure represents the various major stages during the non-FAT boot procedure.</p><div class="code"><pre>|------|---------|--------|----------|--------|--------|---------&gt; time POST "black OS2LDR OS2LDR.MSG stage1 stage2 stage3 box" OS2KRNL-&gt;</pre></div><form id="form_61092f4ded" action="http://72.167.111.237/wikka/MiscLdrNotes3/grabcode" method="post"><input class="grabcode" title="Download" name="save" type="submit" value="Grab" /></form><p>In order to enable both bootable IFS and remote IPL, the boot architecture is modified to assume nothing about the sequence of events from the time when POST executes the interrupt 19h to the time OS2LDR receives control (ie. the "black box" is running). However, it does assume that the micro-FSD and the mini-FSD are in memory when OS2LDR is given control. The normal memory map is as follows:</p><div class="code"><pre> +-------------+ Top of High Memory | unused | +-------------+ 100000h (1Meg) | ROM/screen | +-------------+ Top of Low Memory | 64k unused | +-------------+ Top of Low Memory - 64k | microFSD | +-------------+ | unused | +-------------+ | OS2LDR | +-------------+ 10000h (64k) | mFSD.FSD / | | RIPL data | +-------------+ 800h (2k) | reserved | +-------------+ 0</pre></div><form id="form_61092f4ded_1" action="http://72.167.111.237/wikka/MiscLdrNotes3/grabcode" method="post"><input class="grabcode" title="Download" name="save" type="submit" value="Grab" /></form><p>The memory layout can vary but must be described by information passed to OS2LDR in the following table:</p><div class="indent">WORD = number of entries in this table (3 or 4)<br />WORD = paragraph # where OS2LDR was loaded<br />DWORD= length of OS2LDR file image (in bytes)<br />WORD = paragraph # where micro-FSD was loaded<br />DWORD= length of micro-FSD file image (in bytes)<br />WORD = paragraph # where mini-FSD was loaded<br />DWORD= length of mini-FSD file image (in bytes)<br />WORD = paragraph # where RIPL data was loaded<br />DWORD= length of RIPL data file image (in bytes)<br />DWORD= 16:16 pointer to micro-FSD open routine<br />DWORD= 16:16 pointer to micro-FSD read routine<br />DWORD= 16:16 pointer to micro-FSD close routine<br />DWORD= 16:16 pointer to micro-FSD terminate routine</div><p>OS2LDR scans and saves the directory entries for OS2KRNL and OS2LDR.MSG from the root directory. After the directory entries have been saved, the OS2LDR.MSG file will be loaded and parsed into<br />two separate modules (resident vs. discardable messages). The memory configuration will be as follows:</p><div class="code"><pre> +-------------+ Top of High Memory | unused | +-------------+ 100000h (1Meg) | ROM/screen | +-------------+ Top of Low Memory | 64k unused | +-------------+ Top of Low Memory - 64k | microFSD | +-------------+ | unused | +-------------+ | OS2LDR.MSG | +-------------+ | Discard msgs| +-------------+ |Resident msgs| +-------------+ | OS2LDR | +-------------+ 10000h (64k) | mFSD.FSD / | | RIPL data | +-------------+ 800h (2k) | reserved | +-------------+ 0</pre></div><form id="form_61092f4ded_2" action="http://72.167.111.237/wikka/MiscLdrNotes3/grabcode" method="post"><input class="grabcode" title="Download" name="save" type="submit" value="Grab" /></form><p>OS2LDR will then relocate the mini-FSD to high memory (above the 1-Meg boundary but below 16 meg), then continue on with the same initialization before transfering control to OS2KRNL. The resulting memory configuration is as follows:</p><div class="code"><pre> +-------------+ | free | +-------------+ 16M | RIPL data | (non-FAT boot only) +-------------+ | mFSD.FSD | (non-FAT boot only) +-------------+ | free | +-------------+ | OS2KRNL(hi) | +-------------+ | free | +-------------+ 1Meg | ROM/screen | +------------------+ +-------------+ Top of Low Memory | OS2LDR (Discard) | | OS2LDR |-----------&gt;----------&gt;+------------------+ +-------------+ | Discard Msgs | | free | +------------------+ +-------------+ | OS2KRNL(lo) | +------------------+ +-------------+ | Resident Msgs | | DosHlpSeg |-----------&gt;----------&gt;+------------------+ +-------------+ 1000h | DosHlpSeg | | reserved | +------------------+ +-------------+ 0</pre></div><form id="form_61092f4ded_3" action="http://72.167.111.237/wikka/MiscLdrNotes3/grabcode" method="post"><input class="grabcode" title="Download" name="save" type="submit" value="Grab" /></form><p>When OS2KRNL receives control. OS2KRNL contains the OS/2 kernel and initialization code. It switches to protected mode, relocates parts of itself to high memory, then scans the root directory for and reads in the base device drivers (stage 1). The module loader will be called to "load" the mini-FSD from its memory image stored by OS2LDR in high memory to its final location at the top of low memory. Also, the mini-FSD will be called to read the base device drivers (one at a time) via the stage 1 interfaces.</p><p>The mini-FSD will be linked into the IFS chain (actually, it will be the only link in the chain.) and asked to initialize via FS_INIT. The FS_INIT call marks the transition from stage 1 to stage 2.</p><p>Further loading is then by using the stage 2 interfaces. Note that file handles are lost from stage 1 to stage 2.</p><p>The mini-FSD is required to support only a small number of the functions of an FSD. Therefore, the first FSD loaded must be the replacement for the mini-FSD.</p><p>After the replacement FSD has been loaded, it will be called at FS_INIT to initialize itself and take whatever action it needs to effect a smooth transition from the mini-FSD to the FSD. The FSD will then replace the mini-FSD in the IFS chain, as well as in any kernel data structures which keep a handle to the FSD (ie. SFT, VPB).</p><p>From this point on, the system continues normally.</p><p>&nbsp;</p><p>&nbsp;</p>
Excerpt
Markdown content


OldNewDate CreatedAuthorActions
July 25, 2015 @ 13:58:22 mgreene
July 25, 2015 @ 13:57:32 mgreene
July 25, 2015 @ 13:57:10 [Autosave] mgreene
July 25, 2015 @ 13:56:05 mgreene