Home | History | Annotate | Download | only in memdisk

Lines Matching full:drive

42 /* We will probe a BIOS drive number using INT 0x13, AH == func */
43 static void probe_any(uint8_t func, uint8_t drive, com32sys_t * regs)
46 regs->edx.b[0] = drive; /* DL == drive number to probe */
71 static int probe_int13h_01h(uint8_t drive)
77 probe_any(0x01, drive, &regs);
84 * INT 0x13, AH == 0x08: Get drive parameters.
86 static int probe_int13h_08h(uint8_t drive, com32sys_t * regs)
92 probe_any(0x08, drive, regs);
97 status = probe_int13h_01h(drive);
106 static int probe_int13h_15h(uint8_t drive, com32sys_t * regs)
112 probe_any(0x15, drive, regs);
117 status = probe_int13h_01h(drive);
126 static int probe_int13h_41h(uint8_t drive, com32sys_t * regs)
133 probe_any(0x41, drive, regs);
138 status = probe_int13h_01h(drive);
146 * This heuristic then assumes that all drives of 'drive's type are
147 * found in a contiguous range, and returns 1 if the probed drive
152 int probe_bda_drive(uint8_t drive)
157 if (drive & 0x80) {
166 err = (drive - (drive & 0x80)) >= bios_drives ? 0 : 1;
167 dskprobe_printf("BDA drive %02x? %d, total count: %d\n", drive, err,
173 * We will probe a drive with a few different methods, returning
176 int multi_probe_drive(uint8_t drive)
181 dskprobe_printf("INT 13 DL%02x:\n", drive);
183 if (drive & 0x80) {
185 c += probe_int13h_08h(drive, &regs);
186 c += probe_int13h_15h(drive, &regs);
187 c += probe_int13h_41h(drive, &regs);
189 c += probe_bda_drive(drive);
195 * We will probe a contiguous range of BIOS drive, starting with drive
197 * the first drive which doesn't respond to any of the probes.
201 uint8_t drive = start;
202 while (multi_probe_drive(drive)) {
203 drive++;
205 if ((drive & 0x7F) == 0)
208 return drive;