Changeset 149 for trunk/bootcode/regular/driveio.asm
- Timestamp:
- Apr 8, 2017, 12:27:52 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bootcode/regular/driveio.asm
r147 r149 437 437 ;# EFFECTS : Modifies DAP structure and fills or clears sector buffer 438 438 ;# ---------------------------------------------------------------------------- 439 ;# IN : None- Location info is in [CurPartition_Location]440 ;# ---------------------------------------------------------------------------- 441 ;# OUT : CF=1 442 ;# : SI 439 ;# IN : MEM - Location info is in [CurPartition_Location] 440 ;# ---------------------------------------------------------------------------- 441 ;# OUT : CF=1 - failure, no valid LVM sector was loaded 442 ;# : SI - Points to the sector buffer ([LVMSector]) 443 443 ;############################################################################## 444 444 DriveIO_LoadLVMSector Proc Near Uses ax bx cx dx di … … 463 463 test byte ptr [CFG_IgnoreLVM], 1 ; ZF=0 means ignore LVM 464 464 jnz DIOLLVMS_NoLVMSector ; Quit if so 465 466 ; Calculate the entry in the DISKINFO array for this disk467 call DriveIO_CalcDiskInfoPointer468 469 ; If the LVM_SPT is ZERO, no LVM info is present and we quit with CY470 mov di, [bx+LocDISKINFO_LVM_Secs] ; Get LVM_SPT471 test di, di ; See if it is 0472 jz DIOLLVMS_NoLVMSector ; Quit if so473 465 474 466 ; Load the location of the current partition being acted upon. … … 485 477 mov cx, wptr cs:[CurPartition_Location+6] ; BIOS cyl & sec 486 478 479 ; Calculate the entry in the DISKINFO array for this disk, 480 ; and put the LVM_SPT in DI 481 push bx 482 call DriveIO_CalcDiskInfoPointer 483 mov di, [bx+LocDISKINFO_LVM_Secs] 484 pop bx 485 486 ; If the LVM_SPT is ZERO, no LVM info is present and we quit with CY 487 test di, di ; See if it is 0 488 jz DIOLLVMS_NoLVMSector ; Quit if so 489 487 490 ; Adjust the location to point to the LVM sector 488 491 add ax, di ; Add the LVM sectors-per-track … … 495 498 mov di, ds ; Segment of that buffer 496 499 call DriveIO_ReadSectorLBA ; Read the LVM sector 497 jc DIOLLVMS_NoLVMSector ; Quit on error498 499 ; Check the validity of the LVM sector, quit with CY if invalid500 call LVM_ValidateSector ; Check signature and CRC501 jnc DIOLLVMS_NoLVMSector ; Quit if not valid502 503 500 504 501 IFDEF AUX_DEBUG 505 502 IF 1 506 DBG_TEXT_OUT_AUX ' CurPartition'503 DBG_TEXT_OUT_AUX 'LVMSecLoaded' 507 504 PUSHRF 508 505 call DEBUG_DumpRegisters … … 513 510 ENDIF 514 511 ENDIF 512 513 jc DIOLLVMS_NoLVMSector ; Quit on error 514 515 ; Check the validity of the LVM sector, quit with CY if invalid 516 call LVM_ValidateSector ; Check signature and CRC 517 jnc DIOLLVMS_NoLVMSector ; Quit if not valid 515 518 516 519 ; We're done, indicate success and return
Note:
See TracChangeset
for help on using the changeset viewer.