Changeset 477 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers


Ignore:
Timestamp:
Oct 20, 2012, 5:04:32 PM (12 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • Added non-working DMA transfer code.
Location:
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH1Eh_XTCF.asm

    r475 r477  
    112112    mov     BYTE [di+DPT_ATA.bDevice], DEVICE_8BIT_XTCF_DMA
    113113    mov     al, [di+DPT_ATA.bBlockSize]
    114     jmp     AH24h_SetBlockSize  ; AH=24h limits block size if necessary
     114    call    AH24h_SetBlockSize  ; AH=24h limits block size if necessary
     115    jmp     SHORT .Enable8bitPioMode
    115116
    116117.SetMemoryMappedMode:
     
    120121.Set8bitPioMode:
    121122    mov     BYTE [di+DPT_ATA.bDevice], DEVICE_8BIT_XTCF_PIO8
     123    ; Fall to .Enable8bitPioMode
     124   
     125    ; We always need to enable 8-bit mode since 16-bit mode is restored
     126    ; when controller is reset (AH=0h or Dh)
    122127.Enable8bitPioMode:
    123128    jmp     AH23h_Enable8bitPioMode
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/Prepare.asm

    r474 r477  
    9494ALIGN JUMP_ALIGN
    9595Prepare_BufferToESSIforOldInt13hTransfer:
     96    mov     si, [bp+IDEPACK.intpack+INTPACK.bx] ; Load offset
     97
     98%ifdef MODULE_8BIT_IDE
    9699    cmp     BYTE [di+DPT_ATA.bDevice], DEVICE_8BIT_XTCF_DMA
    97100    jne     SHORT .NormalizeForSmallestPossibleOffset
    98101
    99     ; Normalize segment for physical 64k pages
    100     xor     bx, bx
    101     mov     si, [bp+IDEPACK.intpack+INTPACK.es] ; Load segment
    102 %rep 4
    103     shl     si, 1
    104     rcl     bx, 1
    105 %endrep
    106     add     si, [bp+IDEPACK.intpack+INTPACK.bx]
    107     adc     bx, BYTE 0
    108     mov     es, bx                              ; ES:SI now has physical address
     102    ; DMA transfers do not need to normalize pointer
     103    ; (it will be converted to physical address in IdeDmaTransfer.asm)
     104    mov     es, [bp+IDEPACK.intpack+INTPACK.es]
    109105    jmp     SHORT Prepare_ByValidatingSectorsInALforOldInt13h
     106%endif ; MODULE_8BIT_IDE
    110107
    111108    ; Normalize segment for 16b pages
    112109.NormalizeForSmallestPossibleOffset:
    113     mov     bx, [bp+IDEPACK.intpack+INTPACK.bx] ; Load offset
    114     mov     si, bx
     110    mov     bx, si
    115111    eSHR_IM bx, 4                               ; Divide offset by 16
    116112    add     bx, [bp+IDEPACK.intpack+INTPACK.es]
Note: See TracChangeset for help on using the changeset viewer.