Changeset 550 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h
- Timestamp:
- Apr 27, 2013, 5:30:50 PM (12 years ago)
- google:author:
- aitotat@gmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH24h_HSetBlocks.asm
r545 r550 68 68 ; must know what the actual block size is. 69 69 cmp BYTE [di+DPT_ATA.bDevice], DEVICE_8BIT_XTCF_DMA 70 je SHORT ProcessXTCFsubcommandFromAL.AH1Eh_LoadInvalidCommandToAHandSetCF70 je SHORT .DisableBlockMode 71 71 .NoNeedToLimitBlockSize: 72 72 %endif ; MODULE_8BIT_IDE_ADVANCED … … 74 74 push bx 75 75 76 push ax 76 push ax ; Store block size for later use 77 77 xchg dx, ax ; DL = Block size (Sector Count Register) 78 78 mov al, COMMAND_SET_MULTIPLE_MODE 79 79 mov bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRDY, FLG_STATUS_DRDY) 80 80 call Idepack_StoreNonExtParametersAndIssueCommandFromAL 81 pop bx82 jnc SHORT .StoreBlockSize83 81 84 ; Drive disabled block mode since we tried unsupported block size. 85 ; We must adjust DPT accordingly. 86 mov bl, 1 ; Block size 1 will always work (=Block mode disabled) 87 .StoreBlockSize: ; Store new block size to DPT and return 82 ; Disable block mode if failure or if called with block size of 1 sector. 83 ; Some drives allow block mode commands for 1 sector blocks and some do not. 84 pop bx ; Pop block size to BL 85 jc SHORT .DisableBlockMode 86 mov bh, bl ; BL and BH both have block size we tried to set 87 dec bh 88 jz SHORT .DisableBlockMode 89 90 ; Enable block mode and store block size 91 or BYTE [di+DPT.bFlagsHigh], FLGH_DPT_USE_BLOCK_MODE_COMMANDS 92 jmp SHORT .StoreBlockSizeFromBLandReturn 93 94 .DisableBlockMode: 95 and BYTE [di+DPT.bFlagsHigh], ~FLGH_DPT_USE_BLOCK_MODE_COMMANDS 96 mov bl, 1 97 stc 98 .StoreBlockSizeFromBLandReturn: 88 99 mov [di+DPT_ATA.bBlockSize], bl 89 90 100 pop bx 91 101 ret -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH9h_HInit.asm
r545 r550 163 163 ; Initialize block mode transfers 164 164 pop ax ; Restore .wFlags saved in SetWriteCache 165 test BYTE [di+DPT.bFlagsHigh], FLGH_DPT_BLOCK_MODE_SUPPORTED 166 jz SHORT .BlockModeNotSupportedOrDisabled 167 test al, FLG_DRVPARAMS_BLOCKMODE 168 jz SHORT .BlockModeNotSupportedOrDisabled 165 test al, FLG_DRVPARAMS_BLOCKMODE ; Tested here so block mode can be enabled with AH=24h 166 jz SHORT .BlockModeDisabled 169 167 170 168 ; Try block sizes until we find largest possible supported by drive … … 177 175 jnc SHORT .TryNextBlockSize 178 176 STORE_ERROR_FLAG_TO_DPT FLG_INITERROR_FAILED_TO_SET_BLOCK_MODE 179 .BlockMode NotSupportedOrDisabled:177 .BlockModeDisabled: 180 178 .SupportedBlockSizeFound: 181 179 … … 286 284 %endif ; MODULE_8BIT_IDE_ADVANCED 287 285 286 288 287 %ifdef MODULE_8BIT_IDE 289 288 ;-------------------------------------------------------------------- -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH41h_CheckIfExtensionsPresent.asm
r541 r550 44 44 mov WORD [bp+IDEPACK.intpack+INTPACK.bx], 0AA55h 45 45 46 %ifdef CREATE_COMPATIBLE_DPT46 %ifdef MODULE_COMPATIBLE_TABLES 47 47 call AH41h_GetSupportBitsToCX 48 48 mov [bp+IDEPACK.intpack+INTPACK.cx], cx 49 49 %else 50 50 mov WORD [bp+IDEPACK.intpack+INTPACK.cx], ENHANCED_DRIVE_ACCESS_SUPPORT 51 %endif 51 %endif ; MODULE_COMPATIBLE_TABLES 52 52 53 53 and BYTE [bp+IDEPACK.intpack+INTPACK.flags], ~FLG_FLAGS_CF ; Return with CF cleared … … 57 57 58 58 59 %ifdef CREATE_COMPATIBLE_DPT59 %ifdef MODULE_COMPATIBLE_TABLES 60 60 ;-------------------------------------------------------------------- 61 61 ; AH41h_GetSupportBitsToCX … … 87 87 ret 88 88 89 %endif ; CREATE_COMPATIBLE_DPT89 %endif ; MODULE_COMPATIBLE_TABLES -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH48h_GetExtendedDriveParameters.asm
r545 r550 81 81 82 82 ; Create DPTE (hardware information for device drivers) 83 %ifdef CREATE_COMPATIBLE_DPT83 %ifdef MODULE_COMPATIBLE_TABLES 84 84 call AH41h_GetSupportBitsToCX 85 85 test cl, ENHANCED_DISK_DRIVE_SUPPORT … … 87 87 call CompatibleDPT_CreateDeviceParameterTableExtensionToESBXfromDPTinDSSI 88 88 .DoNotCreateDPTE: 89 %endif 89 %endif ; MODULE_COMPATIBLE_TABLES 90 90 91 91 ; Point DS:DI to Extended Drive Information Table to fill … … 107 107 ; Store DPTE for standard controllers only, 108 108 ; FFFF:FFFF for non standard controllers 109 %ifdef CREATE_COMPATIBLE_DPT109 %ifdef MODULE_COMPATIBLE_TABLES 110 110 mov [di+EDRIVE_INFO.fpDPTE], bx 111 111 mov [di+EDRIVE_INFO.fpDPTE+2], es … … 117 117 mov [di+EDRIVE_INFO.fpDPTE], bx 118 118 mov [di+EDRIVE_INFO.fpDPTE+2], bx 119 %endif 119 %endif ; MODULE_COMPATIBLE_TABLES 120 120 121 121 ; Fill Extended Drive Information Table in DS:DI from DPT in ES:SI -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/Prepare.asm
r547 r550 81 81 ; Block mode or single sector 82 82 mov bl, [di+DPT.bFlagsHigh] 83 and bx, BYTE FLGH_DPT_ BLOCK_MODE_SUPPORTED; Bit 183 and bx, BYTE FLGH_DPT_USE_BLOCK_MODE_COMMANDS ; Bit 1 84 84 ret 85 85
Note:
See TracChangeset
for help on using the changeset viewer.