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

Changes to XTIDE Universal BIOS:

  • Redesigned Disk Parameter Tables.
  • Code generalizations for supporting non-IDE devices in the future.
File:
1 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
Note: See TracChangeset for help on using the changeset viewer.