Changeset 150 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Initialization


Ignore:
Timestamp:
Apr 29, 2011, 7:04:13 PM (14 years ago)
Author:
Tomi Tilli
google:author:
aitotat
Message:

Changes to XTIDE Universal BIOS:

  • Redesigned Disk Parameter Tables.
  • Code generalizations for supporting non-IDE devices in the future.
Location:
trunk/XTIDE_Universal_BIOS/Src/Initialization
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm

    r120 r150  
    1 ; Project name  :   IDE BIOS
     1; Project name  :   XTIDE Universal BIOS
    22; Description   :   Functions for detecting drive for the BIOS.
    33
     
    4343    push    cx
    4444    mov     ax, g_szMaster
    45     mov     bh, MASK_IDE_DRVHD_SET                              ; Select Master drive
     45    mov     bh, MASK_DRVNHEAD_SET                               ; Select Master drive
    4646    call    StartDetectionWithDriveSelectByteInBHandStringInAX  ; Detect and create DPT + BOOTNFO
    4747
    4848    mov     ax, g_szSlave
    49     mov     bh, MASK_IDE_DRVHD_SET | FLG_IDE_DRVHD_DRV
     49    mov     bh, MASK_DRVNHEAD_SET | FLG_DRVNHEAD_DRV
    5050    call    StartDetectionWithDriveSelectByteInBHandStringInAX
    5151    pop     cx
     
    7878;       ES:     Zero (BDA segment)
    7979;   Returns:
    80 ;       ES:SI   Ptr to ATA information (read with IDENTIFY DEVICE command)
    8180;       CF:     Cleared if ATA-information read successfully
    8281;               Set if any error
    8382;   Corrupts registers:
    84 ;       AX, BL, CX, DX, DI
     83;       AX, BL, CX, DX, SI, DI
    8584;--------------------------------------------------------------------
    8685.ReadAtaInfoFromHardDisk:
    87     mov     bl, [cs:bp+IDEVARS.bBusType]; Load BUS type
    88     mov     dx, [cs:bp+IDEVARS.wPort]   ; Load IDE Base Port address
    89     mov     di, BOOTVARS.rgbAtaInfo     ; ES:DI now points to ATA info location
    90     call    AH25h_GetDriveInfo
     86    mov     si, BOOTVARS.rgbAtaInfo     ; ES:SI now points to ATA info location
     87    push    es
     88    push    si
     89    push    bx
     90    call    Device_IdentifyToBufferInESSIwithDriveSelectByteInBH
     91    pop     bx
     92    pop     si
     93    pop     es
    9194    jnc     SHORT CreateBiosTablesForHardDisk
    9295    ; Fall to .ReadAtapiInfoFromDrive
     
    103106;       BH:     Drive Select byte for Drive and Head Register
    104107;       CS:BP:  Ptr to IDEVARS for the drive
    105 ;       ES:DI   Ptr to ATA information for the drive
     108;       ES:SI   Ptr to ATA information for the drive
    106109;       DS:     RAMVARS segment
    107110;       ES:     BDA/Bootnfo segment
     
    112115;--------------------------------------------------------------------
    113116CreateBiosTablesForHardDisk:
    114     mov     si, di                  ; ES:SI now points to ATA information
    115117    call    CreateDPT_FromAtaInformation
    116118    jc      SHORT .InvalidAtaInfo
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/Initialize.asm

    r130 r150  
    108108;       Nothing
    109109;   Corrupts registers:
    110 ;       AX, BX, CX, DX, DI
     110;       All
    111111;--------------------------------------------------------------------
    112112.ResetDetectedDrives:
    113     jmp     AH0h_ResetHardDisksHandledByOurBIOS
     113    call    Idepack_FakeToSSBP
     114    call    AH0h_ResetHardDisksHandledByOurBIOS
     115    add     sp, BYTE SIZE_OF_FAKE_IDEPACK
     116    ret
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/Interrupts.asm

    r148 r150  
    111111.InstallHighIrqHandler:
    112112    add     bx, BYTE INTV_IRQ8 - 8          ; Interrupt vector number
    113     mov     si, HIRQ_InterruptServiceRoutineForIrqs8to15
     113    mov     si, IdeIrq_InterruptServiceRoutineForIrqs8to15
    114114    jmp     SHORT Interrupts_InstallHandlerToVectorInBXFromCSSI
    115115
     
    126126.InstallLowIrqHandler:
    127127    add     bx, BYTE INTV_IRQ0              ; Interrupt vector number
    128     mov     si, HIRQ_InterruptServiceRoutineForIrqs2to7
     128    mov     si, IdeIrq_InterruptServiceRoutineForIrqs2to7
    129129    ; Fall to Interrupts_InstallHandlerToVectorInBXFromCSSI
    130130
     
    158158;--------------------------------------------------------------------
    159159Interrupts_UnmaskInterruptControllerForDriveInDSDI:
    160     eMOVZX  bx, BYTE [di+DPT.bIdeOff]
     160    eMOVZX  bx, BYTE [di+DPT.bIdevarsOffset]
    161161    mov     al, [cs:bx+IDEVARS.bIRQ]
    162162    test    al, al
Note: See TracChangeset for help on using the changeset viewer.