Changeset 144 for trunk/bootcode/regular/partscan.asm
- Timestamp:
- Apr 8, 2017, 12:27:39 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bootcode/regular/partscan.asm
r125 r144 52 52 PSSFP_HarddiscLoop: 53 53 54 ; ========================================================= [ Scan Partitions ] 55 54 56 push dx 55 56 ; ================================================ [ Locate Master LVM Sector ]57 58 ; Locate the Master LVM sector for this disk.59 ; If one is found, BX:AX will hold its LBA address, otherwise zero.60 ; Note that if LVM is set to be ignored in the SETUP, checking for a61 ; signature will not be done and thus no Master LVM sector will be62 ; found.63 call DriveIO_LocateMasterLVMSector64 65 ; Put the LBA address in the BSS location for this disk66 xor bh, bh ; Zero upper part of index67 mov bl, dl ; Get BIOS drive-number68 sub bl, 80h ; Now 0-based index69 shl bx, 3 ; Mult by 4 for DWORD70 add bx, offset [LVM_MasterSecs] ; Add the base offset71 mov [bx+00h], ax ; Store LBA low72 xor ax, ax ; LBA high always zero73 mov [bx+02h], ax ; Store LBA high74 75 ;!76 ;! DEBUG_BLOCK77 ;! Check stored Master LVM LBA address.78 ;!79 IFDEF AUX_DEBUG80 IF 081 DBG_TEXT_OUT_AUX '[Master LVM Sector]'82 PUSHRF83 xor bh, bh84 mov bl, dl85 sub bl, 80h86 shl bx, 387 add bx, offset [LVM_MasterSecs]88 mov al, [bx]89 mov ah, dl90 call DEBUG_DumpRegisters91 POPRF92 ENDIF93 ENDIF94 95 ; ========================================================= [ Scan Partitions ]96 97 57 call PARTSCAN_ScanDriveForPartitions 98 58 pop dx … … 104 64 IFDEF AUX_DEBUG 105 65 IF 0 106 pushf 107 pusha 66 PUSHRF 108 67 call DEBUG_DumpHidePartTables 109 popa 110 popf 68 POPRF 111 69 ENDIF 112 70 ENDIF … … 117 75 IFDEF AUX_DEBUG 118 76 IF 0 119 pushf 120 pusha 121 call DEBUG_DumpHidePartTables 122 popa 123 popf 77 PUSHRF 78 call DEBUG_DumpHidePartTables 79 POPRF 124 80 ENDIF 125 81 ENDIF 126 82 127 83 ; Now we copy the new IPT over the old one... 128 mov si, offset NewPartTable129 mov di, offset PartitionTable84 mov si, offset [NewPartTable] 85 mov di, offset [PartitionTable] 130 86 ;movzx ax, NewPartitions 131 87 mov al,NewPartitions … … 139 95 140 96 ; and the New Logical Drive Letter table as well... 141 mov si, offset NewDriveLetters142 mov di, offset DriveLetters97 mov si, offset [NewDriveLetters] 98 mov di, offset [DriveLetters] 143 99 mov cx, LocIPT_MaxPartitions 144 100 rep movsb 145 101 146 102 ; ...and finally check, if we need to set a Drive-Letter 147 mov dl, AutoDrvLetter103 mov dl, [AutoDrvLetter] 148 104 or dl, dl 149 105 jz PSSFP_NoAutoDriveLetter 150 106 ;movzx cx, CFG_Partitions 151 mov cl, CFG_Partitions107 mov cl, [CFG_Partitions] 152 108 mov ch,0 153 109 154 110 or cx, cx 155 111 jz PSSFP_NoAutoDriveLetter 156 mov si, offset PartitionTable157 mov di, offset DriveLetters158 mov ax, w ptr [AutoDrvLetterSerial]159 mov bx, w ptr [AutoDrvLetterSerial+2]112 mov si, offset [PartitionTable] 113 mov di, offset [DriveLetters] 114 mov ax, word ptr [AutoDrvLetterSerial+00h] 115 mov bx, word ptr [AutoDrvLetterSerial+02h] 160 116 PSSFP_AutoDrvLetterLoop: 161 117 cmp ax, [si+LocIPT_Serial] … … 433 389 434 390 IFDEF AUX_DEBUG 435 IF 1391 IF 0 436 392 DBG_TEXT_OUT_AUX 'PARTSCAN_CheckThisPartition:' 437 393 PUSHRF
Note:
See TracChangeset
for help on using the changeset viewer.