Changeset 525 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src
- Timestamp:
- Mar 14, 2013, 9:45:07 PM (12 years ago)
- google:author:
- krille_n_@hotmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src/Handlers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h.asm
r522 r525 37 37 ALIGN JUMP_ALIGN 38 38 Int13h_DiskFunctionsHandlerWithStackChange: 39 push ds 39 sti ; Enable interrupts 40 ; TODO: Maybe we need to save Flags (DF) as well? 41 push ds ; Save DS:DI on the original stack 40 42 push di 41 43 call RamVars_GetSegmentToDS 42 44 43 45 ; Store entry registers to RAMVARS 46 %ifdef USE_386 47 pop DWORD [RAMVARS.dwStackChangeDSDI] 48 %else 49 pop WORD [RAMVARS.wStackChangeDI] ; Pop DS:DI to the top of what 50 pop WORD [RAMVARS.wStackChangeDS] ; is to become the new stack 51 %endif 44 52 mov [RAMVARS.fpInt13hEntryStack], sp 45 53 mov [RAMVARS.fpInt13hEntryStack+2], ss 46 pop WORD [RAMVARS.wStackChangeDI]47 pop WORD [RAMVARS.wStackChangeDS]48 54 49 55 ; Load new stack and restore DS and DI 50 mov di, ds ; We do not want to overwrite DS and DI in stack 51 mov ss, di 52 mov sp, RAMVARS.rgbTopOfStack 53 lds di, [RAMVARS.dwStackChangeDSDI] 56 mov di, ds ; We can save 2 bytes by using PUSH/POP but it's slower 57 mov ss, di ; No need to wrap with CLI/STI since this is for AT only (286+) 58 mov sp, RAMVARS.rgbTopOfStack-4 59 pop di ; DI before stack change 60 pop ds ; DS before stack change 54 61 55 62 ; Call INT 13h … … 59 66 60 67 ; Restore stack (we must not corrupt FLAGS!) 61 cli62 68 %ifdef USE_386 63 69 lss sp, [ss:RAMVARS.fpInt13hEntryStack] 64 70 %else 71 cli 65 72 mov sp, [ss:RAMVARS.fpInt13hEntryStack] 66 73 mov ss, [ss:RAMVARS.fpInt13hEntryStack+2] 67 %endif 68 pop di ; DI before stack change 69 pop ds ; DS before stack change 74 sti 75 %endif 70 76 retf 2 ; Skip FLAGS from stack 71 77 %endif ; RELOCATE_INT13H_STACK … … 88 94 ALIGN JUMP_ALIGN 89 95 Int13h_DiskFunctionsHandler: 96 %ifndef RELOCATE_INT13H_STACK 90 97 sti ; Enable interrupts 98 %endif 91 99 cld ; String instructions to increment pointers 92 100 CREATE_FRAME_INTPACK_TO_SSBP SIZE_OF_IDEPACK_WITHOUT_INTPACK … … 398 406 dw AH1Eh_HandlerForXTCFfeatures ; 1Eh, Lo-tech XT-CF features (XTIDE Universal BIOS) 399 407 %else 400 dw UnsupportedFunction ; 1Eh, 408 dw UnsupportedFunction ; 1Eh, 401 409 %endif 402 410 dw UnsupportedFunction ; 1Fh, -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH1Eh_XTCF.asm
r505 r525 112 112 jae SHORT .SetMemoryMappedMode 113 113 114 ; We need to limit block size here. Consider this scenario;115 ; 1. While in PIO mode or memory mapped mode, the drive is set to do116 ; block transfers larger than XTCF_DMA_MODE_MAX_BLOCK_SIZE.117 ; 2. A call is subsequently made to change device mode to DEVICE_8BIT_XTCF_DMA.118 ; 3. The call to AH24h_SetBlockSize fails but the change in device mode has been made.119 120 114 ; Set DMA Mode 121 115 mov BYTE [di+DPT_ATA.bDevice], DEVICE_8BIT_XTCF_DMA 122 116 mov al, [di+DPT_ATA.bBlockSize] 123 MIN_U al, XTCF_DMA_MODE_MAX_BLOCK_SIZE 124 jmp SHORT AH24h_SetBlockSize ; Returns via AH23h_Enable8bitPioMode 117 cmp al, XTCF_DMA_MODE_MAX_BLOCK_SIZE 118 jbe SHORT AH24h_SetBlockSize 119 mov al, XTCF_DMA_MODE_MAX_BLOCK_SIZE 120 jmp SHORT AH24h_SetBlockSize 125 121 126 122 .SetMemoryMappedMode:
Note:
See TracChangeset
for help on using the changeset viewer.