Changeset 111 for trunk/bootcode/special/lvm.asm
- Timestamp:
- Apr 8, 2017, 12:27:09 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bootcode/special/lvm.asm
r102 r111 56 56 ; Destroyed: None 57 57 LVM_GetSectorCRC Proc Near Uses bx cx 58 59 IFDEF AUX_DEBUG 60 IF 0 61 pushf 62 pusha 63 push si 64 mov si, offset $+5 65 jmp @F 66 db 10,'LVM_GetSectorCRC:',10,0 67 @@: 68 call AuxIO_Print 69 pop si 70 ;~ call DEBUG_DumpRegisters 71 ;~ call AuxIO_DumpParagraph 72 ;~ call AuxIO_TeletypeNL 73 popa 74 popf 75 ENDIF 76 ENDIF 77 58 78 push word ptr [si+LocLVM_CRC+00] 59 79 push word ptr [si+LocLVM_CRC+02] … … 165 185 ; DS:SI - points to LVM information entry 166 186 ; Destroyed: None 187 188 ; INVALID LVM RECORD WHEN STICK INSERTED ! 189 167 190 LVM_SearchForPartition Proc Near Uses cx 191 192 IFDEF AUX_DEBUG 193 IF 0 194 pushf 195 pusha 196 push si 197 mov si, offset $+5 198 jmp @F 199 db 10,'LVM_SearchForPartition:',10,0 200 @@: 201 call AuxIO_Print 202 pop si 203 ;~ call DEBUG_DumpRegisters 204 ;~ call AuxIO_DumpParagraph 205 ;~ call AuxIO_TeletypeNL 206 popa 207 popf 208 ENDIF 209 ENDIF 210 168 211 cmp byte ptr [si+LocLVM_SignatureStart], LocLVM_SignatureByte0 169 212 jne LVMSFP_NotFound ; Quick Check, if LVM sector there … … 195 238 ; assigned or no LVM-info. 196 239 LVM_GetDriveLetter Proc Near Uses bx cx dx si di ds es 240 241 IFDEF AUX_DEBUG 242 IF 0 243 pushf 244 pusha 245 push si 246 mov si, offset $+5 247 jmp @F 248 db 10,'LVM_GetDriveLetter:',10,0 249 @@: 250 call AuxIO_Print 251 pop si 252 ;~ call DEBUG_DumpRegisters 253 ;~ call AuxIO_DumpParagraph 254 ;~ call AuxIO_TeletypeNL 255 popa 256 popf 257 ENDIF 258 ENDIF 259 260 261 197 262 ; For primary partitions this information is stored in the last 198 263 ; sector of track0; for all four partition entries in case they … … 216 281 ; will be set to 0ffh indicating an invalid index. 217 282 call PART_IsPrimaryPartition 283 IF 0 284 pushf 285 pusha 286 call VideoIO_PrintHexWord 287 popa 288 popf 289 ENDIF 218 290 mov al,0 219 291 rcl al,1 ; CY if primary … … 262 334 ; This locator takes care of extended OS/2 geometry should that be used 263 335 ; 336 IF 0 337 ; DH=0 or 1, DL=disk (8?h) 338 pushf 339 pusha 340 mov ax, dx 341 call VideoIO_PrintHexWord 342 mov al,'-' 343 call VideoIO_PrintSingleChar 344 popa 345 popf 346 ENDIF 347 ; THIS ONE FAULTERS WHEN DISKS > 1 264 348 call DriveIO_LoadMasterLVMSector 349 350 IF 0 351 ; INVALID LVM SECTOR !! 352 pushf 353 pusha 354 mov ax,0000h 355 rcl al,1 356 call VideoIO_PrintHexWord ; LVMSector 357 mov al,'-' 358 call VideoIO_PrintSingleChar 359 mov si, offset [LVMSector] 360 mov ax, si 361 call VideoIO_PrintHexWord ; LVMSector 362 lodsw 363 call VideoIO_PrintHexWord ; sig 364 lodsw 365 call VideoIO_PrintHexWord ; sig 366 mov al,'-' 367 call VideoIO_PrintSingleChar 368 popa 369 popf 370 ENDIF 265 371 266 372 LVM_GetDriveLetter_is_not_pri: … … 279 385 push si 280 386 mov ax,cx 281 mov dx,bx 387 mov dx,bx ; DL DESTROYED 282 388 mov si,offset [LVMSector] 283 389 call LVM_SearchForPartition 390 391 IF 0 392 pushf 393 pusha 394 mov ax, 0000h 395 rcl al, 1 396 call VideoIO_PrintHexWord 397 mov ax, si 398 call VideoIO_PrintHexWord 399 popa 400 popf 401 ENDIF 402 403 IFDEF AUX_DEBUG 404 IF 0 405 pusha 406 push si 407 mov si, offset $+5 408 jmp @F 409 db 10,'LVM_GetDriveLetter:',10,0 410 @@: 411 call AuxIO_Print 412 pop si 413 call DEBUG_DumpRegisters 414 call AuxIO_DumpParagraph 415 call AuxIO_TeletypeNL 416 popa 417 ENDIF 418 ENDIF 419 284 420 mov bx,si ; BX now points to LVM entry 285 421 mov dx,0 … … 316 452 ; Out: CY=1 if LVM-info found, 0 if no LVM-info. 317 453 LVM_SetDriveLetter Proc Near Uses bx cx dx si di ds es 454 318 455 local disk:byte 319 456 local drive_letter:byte … … 335 472 ; correct drive-letter. 336 473 ; 474 475 IFDEF AUX_DEBUG 476 IF 0 477 pushf 478 pusha 479 push si 480 mov si, offset $+5 481 jmp @F 482 db 10,'LVM_SetDriveLetter:',10,0 483 @@: 484 call AuxIO_Print 485 pop si 486 ;~ call DEBUG_DumpRegisters 487 ;~ call AuxIO_DumpParagraph 488 ;~ call AuxIO_TeletypeNL 489 popa 490 popf 491 ENDIF 492 ENDIF 337 493 338 494 mov [disk], dl … … 457 613 ; Destroyed: None 458 614 LVM_RemoveVolLetterFromSector Proc Near Uses cx 615 616 IFDEF AUX_DEBUG 617 IF 0 618 pushf 619 pusha 620 push si 621 mov si, offset $+5 622 jmp @F 623 db 10,'LVM_RemoveVolLetterFromSector:',10,0 624 @@: 625 call AuxIO_Print 626 pop si 627 ;~ call DEBUG_DumpRegisters 628 ;~ call AuxIO_DumpParagraph 629 ;~ call AuxIO_TeletypeNL 630 popa 631 popf 632 ENDIF 633 ENDIF 634 459 635 cmp bptr [si+LocLVM_SignatureStart], LocLVM_SignatureByte0 460 636 jne LVMRVLFS_Done ; Quick Check, if LVM sector there … … 487 663 LVM_DoLetterReassignment Proc Near Uses bx cx dx si di 488 664 489 IFDEF AUX_DEBUG 665 IFDEF AUX_DEBUG 666 IF 0 667 pushf 490 668 pusha 491 mov si, offset [dlra] 492 call AuxIO_Print 493 call AuxIO_Teletype 494 call AuxIO_TeletypeNL 669 push si 670 mov si, offset $+5 671 jmp @F 672 db 10,'LVM_DoLetterReassignment:',10,0 673 @@: 674 call AuxIO_Print 675 pop si 676 ;~ call DEBUG_DumpRegisters 677 ;~ call AuxIO_DumpParagraph 678 ;~ call AuxIO_TeletypeNL 495 679 popa 496 ENDIF 680 popf 681 ENDIF 682 ENDIF 497 683 498 684 mov di, si ; Save SI in DI (Partition-pointer)
Note:
See TracChangeset
for help on using the changeset viewer.