Changeset 31 for trunk/BOOTCODE/REGULAR/DRIVEIO.ASM
- Timestamp:
- Jan 13, 2013, 8:15:35 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BOOTCODE/REGULAR/DRIVEIO.ASM
r30 r31 61 61 mov si, offset Configuration ; Calculate new checksum 62 62 xor bx, bx 63 mov cx, 5 ; Total of 5 Config-Sectors 63 64 ; Changed from 5 to calculated 65 ; Fixes issue: #2987 -- "air-boot doesn't remember drive letter" 66 mov cx, (MBR_BackUpMBR - Configuration) / 2 ; Size of the ab-configuration 67 ; TASM does not evaluate expression above corrrectly. 68 ; Listing shows correct opcode but generated opcode has imm. word byteswapped. 69 ; Casting to byte also does not work (overflow). 70 ; So we swap back here -- must be removed in JWasm version !! 71 xchg ch,cl 72 64 73 mov dx, [CFG_CheckConfig] 65 74 mov [CFG_CheckConfig], bx … … 73 82 mov dx, 0080h ; First harddrive, Sector 55... 74 83 mov cx, 0037h 75 mov ax, 0305h ; Function 03, 5 sectors to write 84 85 ; Changed from 5 to calculated 86 ; Fixes issue: #2987 -- "air-boot doesn't remember drive letter" 87 mov ax, (MBR_BackUpMBR - Configuration) / 2 ; sizeof(ab-configuration) to write 88 ; TASM does not evaluate expression above corrrectly. 89 ; Listing shows correct opcode but generated opcode has imm. word byteswapped. 90 ; Casting to byte also does not work (overflow). 91 ; So we swap back here -- must be removed in JWasm version !! 92 xchg ah,al 93 mov ah,03h 94 76 95 int 13h 77 96 jnc DIOSC_NoError … … 147 166 ; This is calculated by Sector*Heads. Comparing will get done with Bit 25-10 148 167 ; on LBA sectors, so we actually divide sector number by 1024. 149 DriveIO_InitLBASwitchTable Proc Near Uses es di ; Rousseau: LBA !168 DriveIO_InitLBASwitchTable Proc Near Uses es di 150 169 mov di, offset LBASwitchTable 151 170 mov dh, TotalHarddiscs … … 166 185 mov ah,0 167 186 168 mov bl, dh ; DH -> head count ; Rousseau: nope, it's max head number !187 mov bl, dh ; DH -> max head number 169 188 mul bl ; AX = Sectors*Heads 170 189 shl ah, 1 … … 188 207 ; Rousseau: Enhanced to handle sector-numbers 127 and 255 besides 63 for LVM-info sectors. 189 208 ; Ugly, need to cleanup. 190 DriveIO_LVMAdjustToInfoSector Proc Near Uses ; Rousseau: LVM stuff !209 DriveIO_LVMAdjustToInfoSector Proc Near Uses 191 210 192 211 … … 555 574 mov cx, wptr cs:[CurPartition_Location+6] ; Gets cur. partition location 556 575 557 call DriveIO_LVMAdjustToInfoSector ; Rousseau: LVM stuff !576 call DriveIO_LVMAdjustToInfoSector 558 577 559 578 mov si, offset LVMSector … … 593 612 ;popf 594 613 595 call LVM_CheckSectorSignature ; Rousseau: LVM stuff !614 call LVM_CheckSectorSignature 596 615 jnc DIOLLVMS_NoLVMSector 597 call LVM_CheckSectorCRC ; Rousseau: LVM stuff !616 call LVM_CheckSectorCRC 598 617 jnc DIOLLVMS_NoLVMSector 599 618 ret … … 662 681 ; Preserve: all registers 663 682 ; ######################################################################### 664 DriveIO_LoadSector Proc Near Uses ax bx ds si es di ; Rousseau: Disk IO683 DriveIO_LoadSector Proc Near Uses ax bx ds si es di 665 684 test cs:[CurIO_UseExtension], 1 666 685 jz DIOLS_UseNormal 667 ; Are we forced do use LBA via Setting? 668 test cs:[CFG_ForceLBAUsage], 1 ; Rousseau: LBA 686 ; Are we forced do use LBA via Setting? ; Rousseau: LBA 669 687 jnz DIOLS_UseExtension 670 688 ; Is the drive not a harddrive? … … 685 703 pop es 686 704 mov bx, si ; ES:BX - Destination 687 mov ax, 0201h ; Function 2 - Load Sector ; Rousseau: Disk IO -- legacy BIOS call705 mov ax, 0201h ; Function 2 - Load Sector 688 706 int 13h 689 707 jnc DIOLS_Success … … 704 722 pop ds 705 723 mov si, offset DriveIO_DAP 706 mov ah, 42h ; Extended Read ; Rousseau: Disk IO -- extended BIOS call724 mov ah, 42h ; Extended Read 707 725 int 13h 708 726 pop cx … … 728 746 jz DIOSS_UseNormal 729 747 ; Are we forced do use LBA via Setting? 730 test cs:[CFG_ForceLBAUsage], 1 ; Rousseau: LBA748 test cs:[CFG_ForceLBAUsage], 1 731 749 jnz DIOSS_UseExtension 732 750 ; Is the drive not a harddrive?
Note:
See TracChangeset
for help on using the changeset viewer.