[FREELDR] Formatting only.
[reactos.git] / boot / freeldr / freeldr / arch / i386 / pcdisk.c
1 /*
2 * FreeLoader
3 * Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20 // #if defined(__i386__) || defined(_M_AMD64)
21
22 #include <freeldr.h>
23
24 #include <debug.h>
25 DBG_DEFAULT_CHANNEL(DISK);
26
27 #include <pshpack2.h>
28
29 typedef struct
30 {
31 UCHAR PacketSize; // 00h - Size of packet (10h or 18h)
32 UCHAR Reserved; // 01h - Reserved (0)
33 USHORT LBABlockCount; // 02h - Number of blocks to transfer (max 007Fh for Phoenix EDD)
34 USHORT TransferBufferOffset; // 04h - Transfer buffer offset (seg:off)
35 USHORT TransferBufferSegment; // Transfer buffer segment (seg:off)
36 ULONGLONG LBAStartBlock; // 08h - Starting absolute block number
37 // ULONGLONG TransferBuffer64; // 10h - (EDD-3.0, optional) 64-bit flat address of transfer buffer
38 // used if DWORD at 04h is FFFFh:FFFFh
39 // Commented since some earlier BIOSes refuse to work with
40 // such extended structure
41 } I386_DISK_ADDRESS_PACKET, *PI386_DISK_ADDRESS_PACKET;
42
43 typedef struct
44 {
45 UCHAR PacketSize; // 00h - Size of packet in bytes (13h)
46 UCHAR MediaType; // 01h - Boot media type (see #00282)
47 UCHAR DriveNumber; /* 02h - Drive number:
48 * 00h Floppy image
49 * 80h Bootable hard disk
50 * 81h-FFh Nonbootable or no emulation
51 */
52 UCHAR Controller; // 03h - CD-ROM controller number
53 ULONG LBAImage; // 04h - Logical Block Address of disk image to emulate
54 USHORT DeviceSpec; /* 08h - Device specification (see also #00282)
55 * (IDE) Bit 0:
56 * Drive is slave instead of master
57 * (SCSI) Bits 7-0:
58 * LUN and PUN
59 * Bits 15-8:
60 * Bus number
61 */
62 USHORT Buffer; // 0Ah - Segment of 3K buffer for caching CD-ROM reads
63 USHORT LoadSeg; // 0Ch - Load segment for initial boot image.
64 // If 0000h, load at segment 07C0h.
65 USHORT SectorCount; // 0Eh - Number of 512-byte virtual sectors to load
66 // (only valid for AH=4Ch).
67 UCHAR CHSGeometry[3]; /* 10h - Low byte of cylinder count (for INT 13/AH=08h)
68 * 11h - Sector count, high bits of cylinder count (for INT 13/AH=08h)
69 * 12h - Head count (for INT 13/AH=08h)
70 */
71 UCHAR Reserved;
72 } I386_CDROM_SPEC_PACKET, *PI386_CDROM_SPEC_PACKET;
73
74 #include <poppack.h>
75
76 /* FUNCTIONS *****************************************************************/
77
78 BOOLEAN DiskResetController(UCHAR DriveNumber)
79 {
80 REGS RegsIn, RegsOut;
81
82 WARN("DiskResetController(0x%x) DISK OPERATION FAILED -- RESETTING CONTROLLER\n", DriveNumber);
83
84 /*
85 * BIOS Int 13h, function 0 - Reset disk system
86 * AH = 00h
87 * DL = drive (if bit 7 is set both hard disks and floppy disks reset)
88 * Return:
89 * AH = status
90 * CF clear if successful
91 * CF set on error
92 */
93 RegsIn.b.ah = 0x00;
94 RegsIn.b.dl = DriveNumber;
95
96 /* Reset the disk controller */
97 Int386(0x13, &RegsIn, &RegsOut);
98
99 return INT386_SUCCESS(RegsOut);
100 }
101
102 static BOOLEAN PcDiskReadLogicalSectorsLBA(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer)
103 {
104 REGS RegsIn, RegsOut;
105 ULONG RetryCount;
106 PI386_DISK_ADDRESS_PACKET Packet = (PI386_DISK_ADDRESS_PACKET)(BIOSCALLBUFFER);
107
108 TRACE("PcDiskReadLogicalSectorsLBA() DriveNumber: 0x%x SectorNumber: %I64d SectorCount: %d Buffer: 0x%x\n", DriveNumber, SectorNumber, SectorCount, Buffer);
109 ASSERT(((ULONG_PTR)Buffer) <= 0xFFFFF);
110
111 /* Setup disk address packet */
112 RtlZeroMemory(Packet, sizeof(*Packet));
113 Packet->PacketSize = sizeof(*Packet);
114 Packet->Reserved = 0;
115 Packet->LBABlockCount = (USHORT)SectorCount;
116 ASSERT(Packet->LBABlockCount == SectorCount);
117 Packet->TransferBufferOffset = ((ULONG_PTR)Buffer) & 0x0F;
118 Packet->TransferBufferSegment = (USHORT)(((ULONG_PTR)Buffer) >> 4);
119 Packet->LBAStartBlock = SectorNumber;
120
121 /*
122 * BIOS int 0x13, function 42h - IBM/MS INT 13 Extensions - EXTENDED READ
123 * Return:
124 * CF clear if successful
125 * AH = 00h
126 * CF set on error
127 * AH = error code
128 * Disk address packet's block count field set to the
129 * number of blocks successfully transferred.
130 */
131 RegsIn.b.ah = 0x42; // Subfunction 42h
132 RegsIn.b.dl = DriveNumber; // Drive number in DL (0 - floppy, 0x80 - harddisk)
133 RegsIn.x.ds = BIOSCALLBUFSEGMENT; // DS:SI -> disk address packet
134 RegsIn.w.si = BIOSCALLBUFOFFSET;
135
136 /* Retry 3 times */
137 for (RetryCount=0; RetryCount<3; RetryCount++)
138 {
139 Int386(0x13, &RegsIn, &RegsOut);
140
141 /* If it worked return TRUE */
142 if (INT386_SUCCESS(RegsOut))
143 {
144 return TRUE;
145 }
146 /* If it was a corrected ECC error then the data is still good */
147 else if (RegsOut.b.ah == 0x11)
148 {
149 return TRUE;
150 }
151 /* If it failed then do the next retry */
152 else
153 {
154 DiskResetController(DriveNumber);
155 continue;
156 }
157 }
158
159 /* If we get here then the read failed */
160 ERR("Disk Read Failed in LBA mode: %x (DriveNumber: 0x%x SectorNumber: %I64d SectorCount: %d)\n", RegsOut.b.ah, DriveNumber, SectorNumber, SectorCount);
161
162 return FALSE;
163 }
164
165 static BOOLEAN PcDiskReadLogicalSectorsCHS(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer)
166 {
167 UCHAR PhysicalSector;
168 UCHAR PhysicalHead;
169 ULONG PhysicalTrack;
170 GEOMETRY DriveGeometry;
171 ULONG NumberOfSectorsToRead;
172 REGS RegsIn, RegsOut;
173 ULONG RetryCount;
174
175 TRACE("PcDiskReadLogicalSectorsCHS()\n");
176
177 /* Get the drive geometry */
178 if (!MachDiskGetDriveGeometry(DriveNumber, &DriveGeometry) ||
179 DriveGeometry.Sectors == 0 ||
180 DriveGeometry.Heads == 0)
181 {
182 return FALSE;
183 }
184
185 while (SectorCount)
186 {
187 /*
188 * Calculate the physical disk offsets.
189 * Note: DriveGeometry.Sectors < 64
190 */
191 PhysicalSector = 1 + (UCHAR)(SectorNumber % DriveGeometry.Sectors);
192 PhysicalHead = (UCHAR)((SectorNumber / DriveGeometry.Sectors) % DriveGeometry.Heads);
193 PhysicalTrack = (ULONG)((SectorNumber / DriveGeometry.Sectors) / DriveGeometry.Heads);
194
195 /* Calculate how many sectors we need to read this round */
196 if (PhysicalSector > 1)
197 {
198 if (SectorCount >= (DriveGeometry.Sectors - (PhysicalSector - 1)))
199 NumberOfSectorsToRead = (DriveGeometry.Sectors - (PhysicalSector - 1));
200 else
201 NumberOfSectorsToRead = SectorCount;
202 }
203 else
204 {
205 if (SectorCount >= DriveGeometry.Sectors)
206 NumberOfSectorsToRead = DriveGeometry.Sectors;
207 else
208 NumberOfSectorsToRead = SectorCount;
209 }
210
211 /* Make sure the read is within the geometry boundaries */
212 if ((PhysicalHead >= DriveGeometry.Heads) ||
213 (PhysicalTrack >= DriveGeometry.Cylinders) ||
214 ((NumberOfSectorsToRead + PhysicalSector) > (DriveGeometry.Sectors + 1)) ||
215 (PhysicalSector > DriveGeometry.Sectors))
216 {
217 DiskError("Disk read exceeds drive geometry limits.", 0);
218 return FALSE;
219 }
220
221 /*
222 * BIOS Int 13h, function 2 - Read Disk Sectors
223 * AH = 02h
224 * AL = number of sectors to read (must be nonzero)
225 * CH = low eight bits of cylinder number
226 * CL = sector number 1-63 (bits 0-5)
227 * high two bits of cylinder (bits 6-7, hard disk only)
228 * DH = head number
229 * DL = drive number (bit 7 set for hard disk)
230 * ES:BX -> data buffer
231 * Return:
232 * CF set on error
233 * if AH = 11h (corrected ECC error), AL = burst length
234 * CF clear if successful
235 * AH = status
236 * AL = number of sectors transferred
237 * (only valid if CF set for some BIOSes)
238 */
239 RegsIn.b.ah = 0x02;
240 RegsIn.b.al = (UCHAR)NumberOfSectorsToRead;
241 RegsIn.b.ch = (PhysicalTrack & 0xFF);
242 RegsIn.b.cl = (UCHAR)(PhysicalSector + ((PhysicalTrack & 0x300) >> 2));
243 RegsIn.b.dh = PhysicalHead;
244 RegsIn.b.dl = DriveNumber;
245 RegsIn.w.es = (USHORT)(((ULONG_PTR)Buffer) >> 4);
246 RegsIn.w.bx = ((ULONG_PTR)Buffer) & 0x0F;
247
248 /* Perform the read. Retry 3 times. */
249 for (RetryCount=0; RetryCount<3; RetryCount++)
250 {
251 Int386(0x13, &RegsIn, &RegsOut);
252
253 /* If it worked break out */
254 if (INT386_SUCCESS(RegsOut))
255 {
256 break;
257 }
258 /* If it was a corrected ECC error then the data is still good */
259 else if (RegsOut.b.ah == 0x11)
260 {
261 break;
262 }
263 /* If it failed the do the next retry */
264 else
265 {
266 DiskResetController(DriveNumber);
267 continue;
268 }
269 }
270
271 /* If we retried 3 times then fail */
272 if (RetryCount >= 3)
273 {
274 ERR("Disk Read Failed in CHS mode, after retrying 3 times: %x\n", RegsOut.b.ah);
275 return FALSE;
276 }
277
278 // I have learned that not all BIOSes return
279 // the sector read count in the AL register (at least mine doesn't)
280 // even if the sectors were read correctly. So instead
281 // of checking the sector read count we will rely solely
282 // on the carry flag being set on error
283
284 Buffer = (PVOID)((ULONG_PTR)Buffer + (NumberOfSectorsToRead * DriveGeometry.BytesPerSector));
285 SectorCount -= NumberOfSectorsToRead;
286 SectorNumber += NumberOfSectorsToRead;
287 }
288
289 return TRUE;
290 }
291
292 static BOOLEAN DiskInt13ExtensionsSupported(UCHAR DriveNumber)
293 {
294 static UCHAR LastDriveNumber = 0xff;
295 static BOOLEAN LastSupported;
296 REGS RegsIn, RegsOut;
297
298 TRACE("DiskInt13ExtensionsSupported()\n");
299
300 if (DriveNumber == LastDriveNumber)
301 {
302 TRACE("Using cached value %s for drive 0x%x\n",
303 LastSupported ? "TRUE" : "FALSE", DriveNumber);
304 return LastSupported;
305 }
306
307 /*
308 * Some BIOSes report that extended disk access functions are not supported
309 * when booting from a CD (e.g. Phoenix BIOS v6.00PG and Insyde BIOS shipping
310 * with Intel Macs). Therefore we just return TRUE if we're booting from a CD -
311 * we can assume that all El Torito capable BIOSes support INT 13 extensions.
312 * We simply detect whether we're booting from CD by checking whether the drive
313 * number is >= 0x8A. It's 0x90 on the Insyde BIOS, and 0x9F on most other BIOSes.
314 */
315 if (DriveNumber >= 0x8A)
316 {
317 LastSupported = TRUE;
318 return TRUE;
319 }
320
321 LastDriveNumber = DriveNumber;
322
323 /*
324 * IBM/MS INT 13 Extensions - INSTALLATION CHECK
325 * AH = 41h
326 * BX = 55AAh
327 * DL = drive (80h-FFh)
328 * Return:
329 * CF set on error (extensions not supported)
330 * AH = 01h (invalid function)
331 * CF clear if successful
332 * BX = AA55h if installed
333 * AH = major version of extensions
334 * 01h = 1.x
335 * 20h = 2.0 / EDD-1.0
336 * 21h = 2.1 / EDD-1.1
337 * 30h = EDD-3.0
338 * AL = internal use
339 * CX = API subset support bitmap
340 * DH = extension version (v2.0+ ??? -- not present in 1.x)
341 *
342 * Bitfields for IBM/MS INT 13 Extensions API support bitmap
343 * Bit 0, extended disk access functions (AH=42h-44h,47h,48h) supported
344 * Bit 1, removable drive controller functions (AH=45h,46h,48h,49h,INT 15/AH=52h) supported
345 * Bit 2, enhanced disk drive (EDD) functions (AH=48h,AH=4Eh) supported
346 * extended drive parameter table is valid
347 * Bits 3-15 reserved
348 */
349 RegsIn.b.ah = 0x41;
350 RegsIn.w.bx = 0x55AA;
351 RegsIn.b.dl = DriveNumber;
352
353 /* Reset the disk controller */
354 Int386(0x13, &RegsIn, &RegsOut);
355
356 if (!INT386_SUCCESS(RegsOut))
357 {
358 /* CF set on error (extensions not supported) */
359 LastSupported = FALSE;
360 return FALSE;
361 }
362
363 if (RegsOut.w.bx != 0xAA55)
364 {
365 /* BX = AA55h if installed */
366 LastSupported = FALSE;
367 return FALSE;
368 }
369
370 if (!(RegsOut.w.cx & 0x0001))
371 {
372 /*
373 * CX = API subset support bitmap.
374 * Bit 0, extended disk access functions (AH=42h-44h,47h,48h) supported.
375 */
376 DbgPrint("Suspicious API subset support bitmap 0x%x on device 0x%lx\n",
377 RegsOut.w.cx, DriveNumber);
378 LastSupported = FALSE;
379 return FALSE;
380 }
381
382 LastSupported = TRUE;
383 return TRUE;
384 }
385
386 BOOLEAN PcDiskReadLogicalSectors(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer)
387 {
388 BOOLEAN ExtensionsSupported;
389
390 TRACE("PcDiskReadLogicalSectors() DriveNumber: 0x%x SectorNumber: %I64d SectorCount: %d Buffer: 0x%x\n",
391 DriveNumber, SectorNumber, SectorCount, Buffer);
392
393 /*
394 * Check to see if it is a fixed disk drive.
395 * If so then check to see if Int13 extensions work.
396 * If they do then use them, otherwise default back to BIOS calls.
397 */
398 ExtensionsSupported = DiskInt13ExtensionsSupported(DriveNumber);
399
400 if ((DriveNumber >= 0x80) && ExtensionsSupported)
401 {
402 TRACE("Using Int 13 Extensions for read. DiskInt13ExtensionsSupported(%d) = %s\n", DriveNumber, ExtensionsSupported ? "TRUE" : "FALSE");
403
404 /* LBA is easy, nothing to calculate. Just do the read. */
405 return PcDiskReadLogicalSectorsLBA(DriveNumber, SectorNumber, SectorCount, Buffer);
406 }
407 else
408 {
409 /* LBA is not supported default to the CHS calls */
410 return PcDiskReadLogicalSectorsCHS(DriveNumber, SectorNumber, SectorCount, Buffer);
411 }
412
413 return TRUE;
414 }
415
416 VOID DiskStopFloppyMotor(VOID)
417 {
418 WRITE_PORT_UCHAR((PUCHAR)0x3F2, 0);
419 }
420
421 BOOLEAN DiskGetExtendedDriveParameters(UCHAR DriveNumber, PVOID Buffer, USHORT BufferSize)
422 {
423 REGS RegsIn, RegsOut;
424 PUSHORT Ptr = (PUSHORT)(BIOSCALLBUFFER);
425
426 TRACE("DiskGetExtendedDriveParameters()\n");
427
428 if (!DiskInt13ExtensionsSupported(DriveNumber))
429 return FALSE;
430
431 /* Initialize transfer buffer */
432 *Ptr = BufferSize;
433
434 /*
435 * BIOS Int 13h, function 48h - Get drive parameters
436 * AH = 48h
437 * DL = drive (bit 7 set for hard disk)
438 * DS:SI = result buffer
439 * Return:
440 * CF set on error
441 * AH = status (07h)
442 * CF clear if successful
443 * AH = 00h
444 * DS:SI -> result buffer
445 */
446 RegsIn.b.ah = 0x48;
447 RegsIn.b.dl = DriveNumber;
448 RegsIn.x.ds = BIOSCALLBUFSEGMENT; // DS:SI -> result buffer
449 RegsIn.w.si = BIOSCALLBUFOFFSET;
450
451 /* Get drive parameters */
452 Int386(0x13, &RegsIn, &RegsOut);
453 if (!INT386_SUCCESS(RegsOut))
454 return FALSE;
455
456 memcpy(Buffer, Ptr, BufferSize);
457
458 #if DBG
459 TRACE("size of buffer: %x\n", Ptr[0]);
460 TRACE("information flags: %x\n", Ptr[1]);
461 TRACE("number of physical cylinders on drive: %u\n", *(PULONG)&Ptr[2]);
462 TRACE("number of physical heads on drive: %u\n", *(PULONG)&Ptr[4]);
463 TRACE("number of physical sectors per track: %u\n", *(PULONG)&Ptr[6]);
464 TRACE("total number of sectors on drive: %I64u\n", *(unsigned long long*)&Ptr[8]);
465 TRACE("bytes per sector: %u\n", Ptr[12]);
466 if (Ptr[0] >= 0x1e)
467 {
468 TRACE("EED configuration parameters: %x:%x\n", Ptr[13], Ptr[14]);
469 if (Ptr[13] != 0xffff && Ptr[14] != 0xffff)
470 {
471 PUCHAR SpecPtr = (PUCHAR)(ULONG_PTR)((Ptr[13] << 4) + Ptr[14]);
472 TRACE("SpecPtr: %x\n", SpecPtr);
473 TRACE("physical I/O port base address: %x\n", *(PUSHORT)&SpecPtr[0]);
474 TRACE("disk-drive control port address: %x\n", *(PUSHORT)&SpecPtr[2]);
475 TRACE("drive flags: %x\n", SpecPtr[4]);
476 TRACE("proprietary information: %x\n", SpecPtr[5]);
477 TRACE("IRQ for drive: %u\n", SpecPtr[6]);
478 TRACE("sector count for multi-sector transfers: %u\n", SpecPtr[7]);
479 TRACE("DMA control: %x\n", SpecPtr[8]);
480 TRACE("programmed I/O control: %x\n", SpecPtr[9]);
481 TRACE("drive options: %x\n", *(PUSHORT)&SpecPtr[10]);
482 }
483 }
484 if (Ptr[0] >= 0x42)
485 {
486 TRACE("signature: %x\n", Ptr[15]);
487 }
488 #endif
489
490 return TRUE;
491 }
492
493 BOOLEAN
494 PcDiskGetDriveGeometry(UCHAR DriveNumber, PGEOMETRY Geometry)
495 {
496 EXTENDED_GEOMETRY ExtGeometry;
497 REGS RegsIn, RegsOut;
498 ULONG Cylinders;
499
500 TRACE("DiskGetDriveGeometry()\n");
501
502 /* Try to get the extended geometry first */
503 ExtGeometry.Size = sizeof(ExtGeometry);
504 if (DiskGetExtendedDriveParameters(DriveNumber, &ExtGeometry, ExtGeometry.Size))
505 {
506 Geometry->Cylinders = ExtGeometry.Cylinders;
507 Geometry->Heads = ExtGeometry.Heads;
508 Geometry->Sectors = ExtGeometry.SectorsPerTrack;
509 Geometry->BytesPerSector = ExtGeometry.BytesPerSector;
510 return TRUE;
511 }
512
513 /*
514 * BIOS Int 13h, function 08h - Get drive parameters
515 * AH = 08h
516 * DL = drive (bit 7 set for hard disk)
517 * ES:DI = 0000h:0000h to guard against BIOS bugs
518 * Return:
519 * CF set on error
520 * AH = status (07h)
521 * CF clear if successful
522 * AH = 00h
523 * AL = 00h on at least some BIOSes
524 * BL = drive type (AT/PS2 floppies only)
525 * CH = low eight bits of maximum cylinder number
526 * CL = maximum sector number (bits 5-0)
527 * high two bits of maximum cylinder number (bits 7-6)
528 * DH = maximum head number
529 * DL = number of drives
530 * ES:DI -> drive parameter table (floppies only)
531 */
532 RegsIn.b.ah = 0x08;
533 RegsIn.b.dl = DriveNumber;
534 RegsIn.w.es = 0x0000;
535 RegsIn.w.di = 0x0000;
536
537 /* Get drive parameters */
538 Int386(0x13, &RegsIn, &RegsOut);
539 if (!INT386_SUCCESS(RegsOut))
540 return FALSE;
541
542 Cylinders = (RegsOut.b.cl & 0xC0) << 2;
543 Cylinders += RegsOut.b.ch;
544 Cylinders++;
545 Geometry->Cylinders = Cylinders;
546 Geometry->Heads = RegsOut.b.dh + 1;
547 Geometry->Sectors = RegsOut.b.cl & 0x3F;
548 Geometry->BytesPerSector = 512; /* Just assume 512 bytes per sector */
549
550 return TRUE;
551 }
552
553 ULONG
554 PcDiskGetCacheableBlockCount(UCHAR DriveNumber)
555 {
556 GEOMETRY Geometry;
557
558 /* If LBA is supported then the block size will be 64 sectors (32k)
559 * If not then the block size is the size of one track. */
560 if (DiskInt13ExtensionsSupported(DriveNumber))
561 {
562 return 64;
563 }
564 /* Get the disk geometry. If this fails then we will
565 * just return 1 sector to be safe. */
566 else if (! PcDiskGetDriveGeometry(DriveNumber, &Geometry))
567 {
568 return 1;
569 }
570 else
571 {
572 return Geometry.Sectors;
573 }
574 }
575
576 BOOLEAN
577 PcDiskGetBootPath(OUT PCHAR BootPath, IN ULONG Size)
578 {
579 // FIXME: Keep it there, or put it in DiskGetBootPath?
580 // Or, abstract the notion of network booting to make
581 // sense for other platforms than the PC (and this idea
582 // already exists), then we would need to check whether
583 // we were booting from network (and: PC --> PXE, etc...)
584 // and if so, set the correct ARC path. But then this new
585 // logic could be moved back to DiskGetBootPath...
586
587 if (*FrldrBootPath)
588 {
589 /* Copy back the buffer */
590 if (Size < strlen(FrldrBootPath) + 1)
591 return FALSE;
592 strncpy(BootPath, FrldrBootPath, Size);
593 return TRUE;
594 }
595
596 // FIXME! FIXME! Do this in some drive recognition procedure!!!!
597 if (PxeInit())
598 {
599 strcpy(BootPath, "net(0)");
600 return TRUE;
601 }
602 return DiskGetBootPath(BootPath, Size);
603 }
604
605 /* EOF */