Changeset 541 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS
- Timestamp:
- Apr 14, 2013, 5:04:32 PM (12 years ago)
- google:author:
- aitotat@gmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH41h_CheckIfExtensionsPresent.asm
r535 r541 44 44 mov WORD [bp+IDEPACK.intpack+INTPACK.bx], 0AA55h 45 45 46 %ifdef RETURN_DPTE_ON_AH48H46 %ifdef CREATE_COMPATIBLE_DPT 47 47 call AH41h_GetSupportBitsToCX 48 48 mov [bp+IDEPACK.intpack+INTPACK.cx], cx … … 57 57 58 58 59 %ifdef RETURN_DPTE_ON_AH48H59 %ifdef CREATE_COMPATIBLE_DPT 60 60 ;-------------------------------------------------------------------- 61 61 ; AH41h_GetSupportBitsToCX … … 87 87 ret 88 88 89 %endif ; RETURN_DPTE_ON_AH48H89 %endif ; CREATE_COMPATIBLE_DPT -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH48h_GetExtendedDriveParameters.asm
r535 r541 84 84 85 85 ; Create DPTE (hardware information for device drivers) 86 %ifdef RETURN_DPTE_ON_AH48H86 %ifdef CREATE_COMPATIBLE_DPT 87 87 call AH41h_GetSupportBitsToCX 88 88 test cl, ENHANCED_DISK_DRIVE_SUPPORT 89 89 jz SHORT .DoNotCreateDPTE 90 call C reateDeviceParameterTableExtensionToESBXfromDPTinDSSI90 call CompatibleDPT_CreateDeviceParameterTableExtensionToESBXfromDPTinDSSI 91 91 .DoNotCreateDPTE: 92 92 %endif … … 110 110 ; Store DPTE for standard controllers only, 111 111 ; FFFF:FFFF for non standard controllers 112 %ifdef RETURN_DPTE_ON_AH48H112 %ifdef CREATE_COMPATIBLE_DPT 113 113 mov [di+EDRIVE_INFO.fpDPTE], bx 114 114 mov [di+EDRIVE_INFO.fpDPTE+2], es … … 161 161 .ReturnWithError: 162 162 jmp Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH 163 164 165 %ifdef RETURN_DPTE_ON_AH48H166 ;--------------------------------------------------------------------167 ; CreateDeviceParameterTableExtensionToESBXfromDPTinDSSI168 ; Parameters:169 ; DS:SI: Ptr to DPT (in RAMVARS segment)170 ; ES: RAMVARS segment171 ; Returns:172 ; ES:BX: Ptr to Device Parameter Table Extension (DPTE)173 ; Corrupts registers:174 ; AX, CX, DX, DI175 ;--------------------------------------------------------------------176 CreateDeviceParameterTableExtensionToESBXfromDPTinDSSI:177 ; Point ES:DI to DPTE buffer (valid until next AH=48h call)178 mov di, [cs:ROMVARS.bStealSize]179 eSHL_IM di, 10 ; DI = RAMVARS size in bytes180 sub di, BYTE DPTE_size ; DI = Offset to DPTE181 xor dx, dx ; Clear for checksum182 183 ; Set 32-bit flag for 32-bit controllers184 mov cx, FLG_LBA_TRANSLATION_ENABLED ; DPTE.wFlags185 cmp BYTE [si+DPT_ATA.bDevice], DEVICE_32BIT_ATA186 eCMOVE cl, FLG_LBA_TRANSLATION_ENABLED | FLG_32BIT_XFER_MODE187 188 ; DPTE.wBasePort189 mov ax, [si+DPT.wBasePort]190 call StoswThenAddALandAHtoDL ; Bytes 0 and 1191 192 ; DPTE.wControlBlockPort193 eMOVZX bx, BYTE [si+DPT.bIdevarsOffset]194 mov ax, [cs:bx+IDEVARS.wControlBlockPort]195 call StoswThenAddALandAHtoDL ; Bytes 2 and 3196 197 ; DPTE.bDrvnhead and DPTE.bBiosVendor198 xchg di, si199 call AccessDPT_GetDriveSelectByteForEbiosToAL200 xchg si, di201 call StoswThenAddALandAHtoDL ; Bytes 4 and 5202 203 ; DPTE.bIRQ and DPTE.bBlockSize204 mov al, [cs:bx+IDEVARS.bIRQ] ; No way to define that we might not use IRQ205 mov ah, [si+DPT_ATA.bBlockSize]206 cmp ah, 1207 jbe SHORT .DoNotSetBlockModeFlag208 or cl, FLG_BLOCK_MODE_ENABLED209 .DoNotSetBlockModeFlag:210 call StoswThenAddALandAHtoDL ; Bytes 6 and 7211 212 ; DPTE.bDmaChannelAndType and DPTE.bPioMode213 xor ax, ax214 %ifdef MODULE_ADVANCED_ATA215 or ah, [si+DPT_ADVANCED_ATA.bPioMode]216 jz SHORT .NoDotSetFastPioFlag217 cmp WORD [si+DPT_ADVANCED_ATA.wControllerID], BYTE 0218 je SHORT .NoDotSetFastPioFlag219 inc cx ; FLG_FAST_PIO_ENABLED220 .NoDotSetFastPioFlag:221 %endif222 call StoswThenAddALandAHtoDL ; Bytes 8 and 9223 224 ; Set CHS translation flags and store DPTE.wFlags225 mov al, [si+DPT.bFlagsLow]226 and al, MASKL_DPT_TRANSLATEMODE227 jz SHORT .NoChsTranslationOrBitShiftTranslationSet228 or cl, FLG_CHS_TRANSLATION_ENABLED229 test al, FLGL_DPT_ASSISTED_LBA230 jz SHORT .NoChsTranslationOrBitShiftTranslationSet231 or cx, LBA_ASSISTED_TRANSLATION << TRANSLATION_TYPE_FIELD_POSITION232 .NoChsTranslationOrBitShiftTranslationSet:233 xchg ax, cx234 call StoswThenAddALandAHtoDL ; Bytes 10 and 11235 236 ; DPTE.wReserved (must be zero)237 xor ax, ax238 call StoswThenAddALandAHtoDL ; Bytes 12 and 13239 240 ; DPTE.bRevision and DPTE.bChecksum241 mov ax, DPTE_REVISION | (DPTE_REVISION<<8)242 add ah, dl243 neg ah244 stosw245 lea bx, [di-DPTE_size]246 ret247 248 249 ;--------------------------------------------------------------------250 ; StoswThenAddALandAHtoDL251 ; Parameters:252 ; AX: WORD to store253 ; ES:DI: Ptr to where to store AX254 ; DL: Checksum byte255 ; Returns:256 ; DL: Checksum byte257 ; DI: Incremented by 2258 ; Corrupts registers:259 ; Nothing260 ;--------------------------------------------------------------------261 StoswThenAddALandAHtoDL:262 stosw263 add dl, al264 add dl, ah265 ret266 267 %endif ; RETURN_DPTE_ON_AH48H
Note:
See TracChangeset
for help on using the changeset viewer.