Changeset 411 in xtideuniversalbios


Ignore:
Timestamp:
Apr 26, 2012, 7:41:59 PM (13 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • Moved some IRQ and LBA48 code to related modules.
Location:
trunk/XTIDE_Universal_BIOS
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Inc/CustomDPT.inc

    r400 r411  
    4545    MASKL_DPT_CHS_SHIFT_COUNT                   EQU (7<<0)  ; Bits 0...2, P-CHS to L-CHS bit shift count (0...4)
    4646    FLGL_DPT_SLAVE                              EQU FLG_DRVNHEAD_DRV    ; (1<<4), Drive is slave drive
    47     MASKL_DPT_ADDRESSING_MODE                   EQU (3<<5)  ; Bits 5..6, Addressing Mode (bit 6 == FLG_DRVNHEAD_LBA)
     47    MASKL_DPT_ADDRESSING_MODE                   EQU (3<<ADDRESSING_MODE_FIELD_POSITION) ; Bits 5..6, Addressing Mode (bit 6 == FLG_DRVNHEAD_LBA)
     48%ifdef MODULE_IRQ
    4849    FLGL_DPT_ENABLE_IRQ                         EQU (1<<7)
     50%endif
    4951
    5052    ; Bit definitions for DPT.bFlagsHigh
    5153    FLGH_DPT_BLOCK_MODE_SUPPORTED               EQU (1<<1)  ; Use block transfer commands (must be bit 1!)
     54%ifdef MODULE_SERIAL
    5255    FLGH_DPT_SERIAL_DEVICE                      EQU (1<<2)  ; Serial Port Device
     56%endif
     57%ifdef MODULE_IRQ
    5358    FLGH_DPT_INTERRUPT_IN_SERVICE               EQU (1<<3)  ; Set when waiting for IRQ
     59%endif
     60%ifdef MODULE_FEATURE_SETS
    5461    FLGH_DPT_POWER_MANAGEMENT_SUPPORTED         EQU (1<<5)
     62%endif
    5563
    5664    ; IDE device only
     65%ifdef MODULE_ADVANCED_ATA
    5766    FLGH_DPT_IORDY                              EQU (1<<7)  ; Controller and Drive supports IORDY
     67%endif
    5868
    5969    ; Serial device only
     70%ifdef MODULE_SERIAL_FLOPPY
    6071    FLGH_DPT_SERIAL_FLOPPY                      EQU (1<<4)
    6172    FLGH_DPT_SERIAL_FLOPPY_TYPE_MASK            EQU 0e0h
    6273    FLGH_DPT_SERIAL_FLOPPY_TYPE_FIELD_POSITION  EQU 5
     74%endif
    6375
    6476    ; Addressing modes for DPT.wFlags
     
    6779    ADDRESSING_MODE_PCHS                        EQU     1   ; P-CHS Addressing Mode (LARGE in many other BIOSes)
    6880    ADDRESSING_MODE_LBA28                       EQU     2   ; 28-bit LBA Addressing Mode
     81%ifdef MODULE_EBIOS
    6982    ADDRESSING_MODE_LBA48                       EQU     3   ; 48-bit LBA Addressing Mode
     83%endif
    7084
    7185
     
    89103    .bInitError             resb    1   ; Flags for initialization errors
    90104endstruc
    91 %endif
    92105
    93106    ; Flags for DPT_ADVANCED_ATA.bInitError
     
    99112    FLG_INITERROR_FAILED_TO_SET_PIO_MODE                EQU (1<<5)
    100113    FLG_INITERROR_FAILED_TO_INITIALIZE_STANDBY_TIMER    EQU (1<<6)
     114%endif
    101115
    102116
  • trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeCommand.asm

    r408 r411  
    9090    mov     dl, 1                       ; Sector count (required by IdeTransfer.asm)
    9191    mov     al, COMMAND_IDENTIFY_DEVICE
    92     mov     bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_IDENTIFY_DEVICE, FLG_STATUS_DRQ)
     92    mov     bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRQ, FLG_STATUS_DRQ)
    9393    call    Idepack_StoreNonExtParametersAndIssueCommandFromAL
    9494
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/AtaID.asm

    r376 r411  
    7171;--------------------------------------------------------------------
    7272.GetLbaSectorCount:
     73%ifdef MODULE_EBIOS
    7374    test    BYTE [di+ATA6.wSetSup83+1], A6_wSetSup83_LBA48>>8
    7475    jz      SHORT .GetLba28SectorCount
     76
     77    ; Get LBA48 sector count
    7578    mov     ax, [di+ATA6.qwLBACnt]
    7679    mov     dx, [di+ATA6.qwLBACnt+2]
    7780    mov     bx, [di+ATA6.qwLBACnt+4]
    7881    ret
     82%endif
    7983
    8084.GetLba28SectorCount:
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AccessDPT.asm

    r376 r411  
    6868ALIGN JUMP_ALIGN
    6969AccessDPT_GetDeviceControlByteToAL:
     70%ifdef MODULE_IRQ
    7071    xor     al, al
    7172    test    BYTE [di+DPT.bFlagsLow], FLGL_DPT_ENABLE_IRQ
     
    7374    or      al, FLG_DEVCONTROL_nIEN ; Disable IRQ
    7475.EnableDeviceIrq:
     76%else
     77    mov     al, FLG_DEVCONTROL_nIEN ; Disable IRQ
     78%endif
    7579    ret
    7680
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CreateDPT.asm

    r376 r411  
    7474    mov     al, bh
    7575    and     ax, BYTE FLG_DRVNHEAD_DRV       ; AL now has Master/Slave bit
     76%ifdef MODULE_IRQ
    7677    cmp     [cs:bp+IDEVARS.bIRQ], ah        ; Interrupts enabled?
    7778    jz      SHORT .StoreFlags               ;  If not, do not set interrupt flag
    7879    or      al, FLGL_DPT_ENABLE_IRQ
    7980.StoreFlags:
     81%endif
    8082    mov     [di+DPT.wFlags], ax
    8183    ; Fall to .StoreAddressing
     
    281283    mov     [di+DPT.twLbaSectors+4], bx
    282284
     285%ifdef MODULE_EBIOS
    283286    and     BYTE [di+DPT.bFlagsLow], ~MASKL_DPT_ADDRESSING_MODE
    284287    test    bx, bx
     
    292295    or      BYTE [di+DPT.bFlagsLow], ADDRESSING_MODE_LBA48<<ADDRESSING_MODE_FIELD_POSITION
    293296.SetLba28AddressingToDPT:
     297%endif
    294298    or      BYTE [di+DPT.bFlagsLow], ADDRESSING_MODE_LBA28<<ADDRESSING_MODE_FIELD_POSITION
    295299    ret
Note: See TracChangeset for help on using the changeset viewer.