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.

WRITING A CUSTOM THIRD-STAGE DRIVER<br />

6.3 DEVICE INITIALIZATION PROCEDURE<br />

6-4<br />

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

third stage:<br />

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

DECLARE unit WORD;<br />

END device$init;<br />

where:<br />

device$init<br />

unit<br />

(code as described below)<br />

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

name you wish for this procedure, as long as <strong>the</strong> names of o<strong>the</strong>r thirdstage<br />

procedures do not conflict.<br />

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, in bytes, if <strong>the</strong><br />

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

The third-stage device driver initialization procedure, (like <strong>the</strong> first-stage device<br />

initialization procedure) must do <strong>the</strong> following operations:<br />

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

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

in 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 was successful. If it was not, return <strong>the</strong> value zero.<br />

4. Read <strong>the</strong> device volume label to obtain <strong>the</strong> device granularity. (For information on<br />

<strong>the</strong> location and organization of <strong>the</strong> volume label, see <strong>the</strong> iRM)(® Disk Verification<br />

Utility Manual.)<br />

5. If <strong>the</strong> attempt to obtain <strong>the</strong> device granularity was successful, return <strong>the</strong> device<br />

granularity. O<strong>the</strong>rwise, return <strong>the</strong> value zero.<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 MULTIBUS II environment. Refer to Section 5.5 for<br />

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

Bootstrap Loader<br />

(<br />

I ,<br />

I<br />

I<br />

(

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

Saved successfully!

Ooh no, something went wrong!