Changeset 540 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src
- Timestamp:
- Apr 13, 2013, 3:40:27 PM (12 years ago)
- google:author:
- aitotat@gmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeCommand.asm
r536 r540 140 140 141 141 ; Clear Task Flag and set Interrupt In-Service Flag 142 or BYTE [di+DPT.bFlagsHigh], FLGH_DPT_INTERRUPT_IN_SERVICE143 142 push ds 144 LOAD_BDA_SEGMENT_TO ds, dx , ! ; Also zero DX145 mov [BDA.bHDTaskFlg], dl143 LOAD_BDA_SEGMENT_TO ds, dx 144 mov BYTE [BDA.bHDTaskFlg], 1 ; Will be adjusted to zero later 146 145 pop ds 147 146 .DoNotSetInterruptInServiceFlag: -
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeIrq.asm
r535 r540 33 33 IdeIrq_WaitForIRQ: 34 34 push ds 35 36 35 LOAD_BDA_SEGMENT_TO ds, ax, ! ; Zero AX 37 36 mov ah, OS_HOOK_DEVICE_BUSY ; Hard disk busy (AX=9000h) 38 37 cli ; Disable interrupts 39 cmp al, [BDA.bHDTaskFlg] ; Task flag already set? 40 jc SHORT .ReturnFromWaitNotify ; If so, skip OS notification 38 dec BYTE [BDA.bHDTaskFlg] ; Clear to zero if still waiting for IRQ 39 pop ds 40 jnz SHORT .ReturnFromWaitNotify ; IRQ already! (CompactFlash was faster than CPU) 41 41 int BIOS_SYSTEM_INTERRUPT_15h ; OS hook, device busy 42 42 43 43 .ReturnFromWaitNotify: 44 44 sti ; Enable interrupts 45 pop ds46 45 ret 47 46 … … 61 60 ALIGN JUMP_ALIGN 62 61 IdeIrq_InterruptServiceRoutineForIrqs2to7: 63 push di64 62 push ax 65 call AcknowledgeIdeInterruptAndSetTaskFlag63 mov al, COMMAND_END_OF_INTERRUPT 66 64 67 mov al, COMMAND_END_OF_INTERRUPT65 %ifdef USE_AT 68 66 jmp SHORT AcknowledgeMasterInterruptController 69 70 67 71 68 ALIGN JUMP_ALIGN 72 69 IdeIrq_InterruptServiceRoutineForIrqs8to15: 73 push di74 70 push ax 75 call AcknowledgeIdeInterruptAndSetTaskFlag76 77 71 mov al, COMMAND_END_OF_INTERRUPT 78 72 out SLAVE_8259_COMMAND_out, al ; Acknowledge Slave 8259 73 JMP_DELAY 79 74 AcknowledgeMasterInterruptController: 75 %endif ; USE_AT 76 80 77 out MASTER_8259_COMMAND_out, al ; Acknowledge Master 8259 81 78 79 ; Set Task Flag 80 push ds 81 LOAD_BDA_SEGMENT_TO ds, ax, ! ; Clear AL and CF for INT 15h 82 dec BYTE [BDA.bHDTaskFlg] ; Set task flag (or clear if IRQ occurred before call to INT 15h AH=90h) 83 sti ; Enable interrupts 84 pop ds 85 82 86 ; Issue Int 15h, function AX=9100h (Interrupt ready) 83 clc ; Must be called with CF clear84 mov a x, OS_HOOK_DEVICE_POST<<8; Interrupt ready, device 0 (HD)87 jz SHORT .DoNotPostSinceIrqOccurredBeforeWait 88 mov ah, OS_HOOK_DEVICE_POST ; Interrupt ready, device 0 (HD) 85 89 int BIOS_SYSTEM_INTERRUPT_15h 90 .DoNotPostSinceIrqOccurredBeforeWait: 86 91 87 92 pop ax 88 pop di89 93 iret 90 91 92 ;--------------------------------------------------------------------93 ; AcknowledgeIdeInterruptAndSetTaskFlag94 ; Parameters:95 ; Nothing96 ; Returns:97 ; Nothing98 ; Corrupts registers:99 ; AX100 ;--------------------------------------------------------------------101 ALIGN JUMP_ALIGN102 AcknowledgeIdeInterruptAndSetTaskFlag:103 push ds104 push si105 push dx106 push bx107 108 ; Reading Status Register acknowledges IDE interrupt109 call RamVars_GetSegmentToDS110 mov bl, FLGH_DPT_INTERRUPT_IN_SERVICE111 call FindDPT_ToDSDIforFlagsHighInBL112 INPUT_TO_AL_FROM_IDE_REGISTER STATUS_REGISTER_in113 114 ; Clear Interrupt In-Service Flag from DPT115 and BYTE [di+DPT.bFlagsHigh], ~FLGH_DPT_INTERRUPT_IN_SERVICE116 117 ; Set Task Flag118 LOAD_BDA_SEGMENT_TO ds, ax119 mov BYTE [BDA.bHDTaskFlg], 0FFh ; Set task flag120 121 pop bx122 pop dx123 pop si124 pop ds125 ret -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h.asm
r533 r540 392 392 dw UnsupportedFunction ; 12h, Controller RAM Diagnostic (XT) 393 393 dw UnsupportedFunction ; 13h, Drive Diagnostic (XT) 394 dw UnsupportedFunction; 14h, Controller Internal Diagnostic (All)394 dw AH10h_HandlerForCheckDriveReady ; 14h, Controller Internal Diagnostic (All) 395 395 dw AH15h_HandlerForReadDiskDriveSize ; 15h, Read Disk Drive Size (AT+) 396 396 dw UnsupportedFunction ; 16h, -
trunk/XTIDE_Universal_BIOS/Src/Initialization/Interrupts.asm
r530 r540 119 119 test al, al 120 120 jz SHORT .Return ; IRQ not used 121 %ifdef USE_AT 121 122 cmp al, 8 122 123 jb SHORT .InstallLowIrqHandler … … 137 138 mov si, IdeIrq_InterruptServiceRoutineForIrqs8to15 138 139 jmp SHORT Interrupts_InstallHandlerToVectorInALFromCSSI 140 %endif ; USE_AT 139 141 140 142 ;--------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.