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/Boot/BootMenuPrintCfg.asm

    r127 r150  
    1717;       Nothing
    1818;   Corrupts registers:
    19 ;       AX, BX, CX, DX, SI, DI, ES
     19;       AX, BX, CX, DX, SI, DI
    2020;--------------------------------------------------------------------
    2121ALIGN JUMP_ALIGN
     
    2424    mov     si, g_szCfgHeader
    2525    call    BootMenuPrint_NullTerminatedStringFromCSSIandSetCF
    26     call    BootMenuPrintCfg_GetPointers
     26    eMOVZX  ax, BYTE [di+DPT.bIdevarsOffset]
     27    xchg    si, ax                      ; CS:SI now points to IDEVARS
    2728    ; Fall to PushAndFormatCfgString
    28 
    2929
    3030;--------------------------------------------------------------------
     
    3232;   Parameters:
    3333;       DS:DI:  Ptr to DPT
    34 ;       ES:BX:  Ptr to BOOTNFO
    3534;       CS:SI:  Ptr to IDEVARS
    3635;   Returns:
     
    4847;   Parameters:
    4948;       DS:DI:  Ptr to DPT
    50 ;       ES:BX:  Ptr to BOOTNFO
    5149;       CS:SI:  Ptr to IDEVARS
    5250;   Returns:
     
    5654;--------------------------------------------------------------------
    5755PushAddressingMode:
    58     xchg    ax, bx
    59     mov     bx, MASK_DPT_ADDR   ; Load addressing mode mask
    60     and     bl, [di+DPT.bFlags] ; Addressing mode now in BX
    61     push    WORD [cs:bx+.rgszAddressingModeString]
    62     xchg    bx, ax
    63     jmp     SHORT .NextPush
    64 ALIGN WORD_ALIGN
    65 .rgszAddressingModeString:
    66     dw      g_szLCHS
    67     dw      g_szPCHS
    68     dw      g_szLBA28
    69     dw      g_szLBA48
    70 ALIGN JUMP_ALIGN
    71 .NextPush:
     56    call    AccessDPT_GetAddressingModeForWordLookToBX
     57    push    WORD [cs:bx+rgszAddressingModeString]
    7258
    7359;--------------------------------------------------------------------
     
    7561;   Parameters:
    7662;       DS:DI:  Ptr to DPT
    77 ;       ES:BX:  Ptr to BOOTNFO
    7863;       CS:SI:  Ptr to IDEVARS
    7964;   Returns:
     
    8368;--------------------------------------------------------------------
    8469PushBlockMode:
    85     eMOVZX  ax, BYTE [di+DPT.bSetBlock]
     70    mov     ax, 1
     71    test    WORD [di+DPT.wFlags], FLG_DPT_BLOCK_MODE_SUPPORTED
     72    jz      SHORT .PushBlockSizeFromAX
     73    mov     al, [di+DPT_ATA.bSetBlock]
     74.PushBlockSizeFromAX:
    8675    push    ax
    8776
     
    9079;   Parameters:
    9180;       DS:DI:  Ptr to DPT
    92 ;       ES:BX:  Ptr to BOOTNFO
    9381;       CS:SI:  Ptr to IDEVARS
    9482;   Returns:
     
    9987PushBusType:
    10088    xchg    ax, bx      ; Store BX to AX
    101     eMOVZX  bx, BYTE [cs:si+IDEVARS.bBusType]
    102     mov     bx, [cs:bx+.rgwBusTypeValues]   ; Char to BL, Int to BH
     89    eMOVZX  bx, BYTE [cs:si+IDEVARS.bDevice]
     90    mov     bx, [cs:bx+rgwBusTypeValues]    ; Char to BL, Int to BH
    10391    eMOVZX  dx, bh
    10492    push    bx          ; Push character
    105     push    dx          ; Push 8, 16 or 32
     93    push    dx          ; Push 1, 8, 16 or 32
    10694    xchg    bx, ax      ; Restore BX
    107     jmp     SHORT .NextPush
    108 ALIGN WORD_ALIGN
    109 .rgwBusTypeValues:
    110     db      'D', 8      ; BUS_TYPE_8_DUAL
    111     db      ' ', 16     ; BUS_TYPE_16
    112     db      ' ', 32     ; BUS_TYPE_32
    113     db      'S', 8      ; BUS_TYPE_8_SINGLE
    114 ALIGN JUMP_ALIGN
    115 .NextPush:
    11695
    11796;--------------------------------------------------------------------
     
    11998;   Parameters:
    12099;       DS:DI:  Ptr to DPT
    121 ;       ES:BX:  Ptr to BOOTNFO
    122100;       CS:SI:  Ptr to IDEVARS
    123101;   Returns:
     
    152130;   Parameters:
    153131;       DS:DI:  Ptr to DPT
    154 ;       ES:BX:  Ptr to BOOTNFO
    155132;       CS:SI:  Ptr to IDEVARS
    156133;   Returns:
     
    160137;--------------------------------------------------------------------
    161138PushResetStatus:
    162     eMOVZX  ax, BYTE [di+DPT.bReset]
     139    mov     ax, [di+DPT.wFlags]
     140    and     ax, MASK_DPT_RESET
    163141    push    ax
    164142
     
    177155
    178156
    179 ;--------------------------------------------------------------------
    180 ; BootMenuPrintCfg_GetPointers
    181 ;   Parameters:
    182 ;       DS:DI:  Ptr to DPT
    183 ;   Returns:
    184 ;       DS:DI:  Ptr to DPT
    185 ;       ES:BX:  Ptr to BOOTNFO
    186 ;       CS:SI:  Ptr to IDEVARS
    187 ;   Corrupts registers:
    188 ;       AX, DL
    189 ;--------------------------------------------------------------------
    190 ALIGN JUMP_ALIGN
    191 BootMenuPrintCfg_GetPointers:
    192     mov     dl, [di+DPT.bDrvNum]        ; Load Drive number to DL
    193     call    BootInfo_GetOffsetToBX      ; ES:BX now points...
    194     LOAD_BDA_SEGMENT_TO es, ax, !       ; ...to BOOTNFO
    195     mov     al, [di+DPT.bIdeOff]
    196     xchg    si, ax                      ; CS:SI now points to IDEVARS
    197     ret
     157ALIGN WORD_ALIGN
     158rgszAddressingModeString:
     159    dw      g_szLCHS
     160    dw      g_szPCHS
     161    dw      g_szLBA28
     162    dw      g_szLBA48
     163
     164rgwBusTypeValues:
     165    db      'D', 8      ; DEVICE_8BIT_DUAL_PORT_XTIDE
     166    db      'X', 8      ; DEVICE_XTIDE_WITH_REVERSED_A3_AND_A0
     167    db      'S', 8      ; DEVICE_8BIT_SINGLE_PORT
     168    db      ' ', 16     ; DEVICE_16BIT_ATA
     169    db      ' ', 32     ; DEVICE_32BIT_ATA
     170    db      ' ', 1      ; DEVICE_SERIAL_PORT
Note: See TracChangeset for help on using the changeset viewer.