31.01.2013 Views

using the bootstrap loader

using the bootstrap loader

using the bootstrap loader

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

5.2 DEVICE INITIALIZE PROCEDURE<br />

WRITING A CUSTOM FIRST-STAGE DRIVER<br />

The device initialize procedure must present <strong>the</strong> following PL/M-86 interface to <strong>the</strong><br />

Bootstrap Loader:<br />

device$init: PROCEDURE (unit) WORD PUBLIC;<br />

DECLARE unit WORD;<br />

END device$init;<br />

where:<br />

(code as described below)<br />

device$init The name of <strong>the</strong> device initialize procedure. You can choose any name<br />

you wish for this procedure, as long as it does not conflict with <strong>the</strong><br />

names of any o<strong>the</strong>r first-stage procedure.<br />

unit The device unit number, as defined during Bootstrap Loader<br />

configuration.<br />

The WORD value returned by <strong>the</strong> procedure must be <strong>the</strong> device granularity (fu bytes) if<br />

<strong>the</strong> device is ready, or zero if <strong>the</strong> device is not ready.<br />

To be compatible with <strong>the</strong> Bootstrap Loader, <strong>the</strong> device initialize procedure must do <strong>the</strong><br />

following steps:<br />

1. Test to see if <strong>the</strong> device is present. If not, return <strong>the</strong> value zero.<br />

2. Initialize <strong>the</strong> device for reading. This operation is device-dependent. For guidance in<br />

initializing <strong>the</strong> device, refer to <strong>the</strong> hardware reference manual for <strong>the</strong> device.<br />

3. Test to see if device initialization is successful. If not, return <strong>the</strong> value zero.<br />

4. Obtain <strong>the</strong> device granularity. For some devices, only one granularity is possible,<br />

while for o<strong>the</strong>r devices several granularities are possible. The hardware reference<br />

manual for your device explains this device-dependent issue.<br />

5. Return <strong>the</strong> device granularity.<br />

NOTE<br />

Besides <strong>the</strong> above five steps, <strong>the</strong> procedure must follow MUL TIBUS II<br />

transport protocol and belong to <strong>the</strong> BSL-Drivers COMPACT sub-system if <strong>the</strong><br />

driver functions in a non-MSA MULTIBUS II environment. Refer to Section<br />

5.5 for more information on <strong>the</strong>se two requirements.<br />

Bootstrap Loader 5-3

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!