OS/2 IFS INF

Wikis > OS/2 Loader Notes > OS/2 IFS INF

When initially transferring control to OS2LDR from a “black box”, the following interface is defined:

DH
boot mode flags:

bit 0 (NOVOLIO) on indicates that the mini-FSD does not use MFSH_DOVOLIO.
bit 1 (RIPL) on indicates that boot volume is not local (RIPL boot)
bit 2 (MINIFSD) on indicates that a mini-FSD is present.
bit 3 (RESERVED)
bit 4 (MICROFSD) on indicates that a micro-FSD is present.
bits 5-7 are reserved and MUST be zero.

DL
drive number for the boot disk. This parameter is ignored if either the NOVOLIO or MINIFSD bits are zero.

DS:SI
is a pointer to the BOOT Media’s BPB. This parameter is ignored if either the NOVOLIO or MINIFSD bits are zero.

ES:DI
is a pointer to a filetable structure. The filetable structure has the following format:

 

struct FileTable {
unsigned short ft_cfiles; /* # of entries in this table */
unsigned short ft_ldrseg; /* paragraph # where OS2LDR is loaded */
unsigned long ft_ldrlen; /* length of OS2LDR in bytes */
unsigned short ft_museg; /* paragraph # where microFSD is loaded */
unsigned long ft_mulen; /* length of microFSD in bytes */
unsigned short ft_mfsseg; /* paragraph # where miniFSD is loaded */
unsigned long ft_mfslen; /* length of miniFSD in bytes */
unsigned short ft_ripseg; /* paragraph # where RIPL data is loaded */
unsigned long ft_riplen; /* length of RIPL data in bytes */

/* The next four elements are 16:16 pointers to microFSD entry points */
unsigned short (far *ft_muOpen) (char far *pName, unsigned long far *pulFileSize);
unsigned long (far *ft_muRead) (long loffseek, char far *pBuf, unsigned long cbBuf);
unsigned long (far *ft_muClose)(void);
unsigned long (far *ft_muTerminate)(void);
}

The microFSD entry points interface is defined as follows:

mu_Open – is passed a far pointer to name of file to be opened and a far pointer to a ULONG to return the file’s size. The returned value (in AX) indicates success(0) or failure(non-0).

mu_Read – is passed a seek offset, a far pointer to a data buffer, and the size of the data buffer. The returned value(in DX:AX) indicates the number of bytes actually read.

mu_Close – has no parameters and expects no return value. It is a signal to the micro-FSD that the loader is done reading the current file.

mu_Terminate – has no parameters and expects no return value. It is a signal to the micro-FSD that the loader has finished reading the boot drive.

The loader will call the micro-FSD in a Open-Read-Read-….-Read-Close sequence with each file read in from the boot drive.