Changeset 363 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Boot


Ignore:
Timestamp:
Mar 26, 2012, 4:20:43 PM (13 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • Added Advanced ATA Module (MODULE_ADVANCED_ATA) with native support for QDI Vision QD6500 and QD6580 VLB IDE Controllers.
  • Hopefully optimized IDE transfer functions for 8088 (replaced some memory accesses from WORD to BYTE).
  • XT build does not fit in 8k at the moment!!!
Location:
trunk/XTIDE_Universal_BIOS/Src/Boot
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuInfo.asm

    r269 r363  
    1717;       ES:BX:  Ptr to BOOTMENUINFO (if successful)
    1818;   Corrupts registers:
    19 ;       AX, BX, CX, DX, DI
     19;       AX, CX, DX, DI
    2020;--------------------------------------------------------------------
    2121BootMenuInfo_CreateForHardDisk:
    2222    call    BootMenuInfo_ConvertDPTtoBX         ; ES:BX now points to new BOOTMENUINFO
     23    push    ds                                  ; Preserve RAMVARS...
     24    push    si                                  ; ...and SI
     25
     26    push    es                                  ; ES to be copied to DS
     27
     28%ifdef MODULE_ADVANCED_ATA
     29    ; Copy DPT_ADVANCED_ATA to BOOTMENUINFO to keep DPTs small.
     30    ; DPT_ADVANCED_ATA has variables that are only needed during initialization.
     31    mov     ax, [di+DPT_ADVANCED_ATA.wIdeBasePort]
     32    mov     [es:bx+BOOTMENUINFO.wIdeBasePort], ax
     33    mov     dx, [di+DPT_ADVANCED_ATA.wMinPioActiveTimeNs]
     34    mov     [es:bx+BOOTMENUINFO.wMinPioActiveTimeNs], dx
     35
     36    mov     ax, [di+DPT_ADVANCED_ATA.wMinPioRecoveryTimeNs]
     37    mov     cx, [di+DPT_ADVANCED_ATA.wControllerID]
     38    mov     dx, [di+DPT_ADVANCED_ATA.wControllerBasePort]
     39    pop     ds                                  ; ES copied to DS
     40    mov     [bx+BOOTMENUINFO.wMinPioRecoveryTimeNs], ax
     41    mov     [bx+BOOTMENUINFO.wControllerID], cx
     42    mov     [bx+BOOTMENUINFO.wControllerBasePort], dx
     43
     44%else
     45    pop     ds                                  ; ES copied to DS
     46%endif
    2347
    2448    ; Store Drive Name
    25     push    ds                                  ; Preserve RAMVARS
    26     push    si
    27 
    28     push    es                                  ; ES copied to DS
    29     pop     ds
    30 
    3149    add     si, BYTE ATA1.strModel              ; DS:SI now points drive name
    3250    lea     di, [bx+BOOTMENUINFO.szDrvName]     ; ES:DI now points to name destination
     
    4260    pop     si
    4361    pop     ds
    44        
    4562    ret
    4663
     
    5572;       CX
    5673;--------------------------------------------------------------------
    57 ALIGN JUMP_ALIGN
    5874BootMenuInfo_GetTotalSectorCount:
    5975    test    BYTE [di+DPT.bFlagsLow], FLG_DRVNHEAD_LBA
     
    6278.ReturnFullCapacity:
    6379    jmp     AccessDPT_GetLbaSectorCountToBXDXAX
     80
     81
     82;--------------------------------------------------------------------
     83; BootMenuInfo_IsAvailable
     84;   Parameters:
     85;       Nothing
     86;   Returns:
     87;       ES:     Segment to BOOTVARS with BOOTMENUINFOs
     88;       ZF:     Set if BOOTVARS with BOOTMENUINFOs is available
     89;               Cleared if not available (no longer initializing)
     90;   Corrupts registers:
     91;       BX
     92;--------------------------------------------------------------------
     93BootMenuInfo_IsAvailable:
     94    LOAD_BDA_SEGMENT_TO es, bx
     95    cmp     WORD [es:BOOTVARS.wMagicWord], BOOTVARS_MAGIC_WORD
     96    ret
    6497
    6598
     
    73106;       BX:     Offset to BOOTMENUINFO struct
    74107;   Corrupts registers:
    75 ;       AX
     108;       Nothing
    76109;--------------------------------------------------------------------
    77 ALIGN JUMP_ALIGN
    78110BootMenuInfo_ConvertDPTtoBX:
     111    push    ax
    79112    mov     ax, di
    80     sub     ax, RAMVARS_size                        ; subtract off base of DPTs
     113    sub     ax, BYTE RAMVARS_size                   ; subtract off base of DPTs
    81114    mov     bl, DPT_BOOTMENUINFO_SIZE_MULTIPLIER    ; BOOTMENUINFO's are a whole number multiple of DPT size
    82115    mul     bl                             
    83116    add     ax, BOOTVARS.rgBootNfo                  ; add base of BOOTMENUINFO
    84117    xchg    ax, bx
     118    pop     ax
    85119    ret         
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrintCfg.asm

    r294 r363  
    111111;       Nothing (falls to next push below)
    112112;   Corrupts registers:
    113 ;       AX
     113;       AX, BX, DX, ES
    114114;--------------------------------------------------------------------
    115115.PushResetStatus:
    116     mov     al, [di+DPT.bFlagsHigh]
    117     and     al, MASKH_DPT_RESET         ;  ah already zero from last push
    118     push    ax
     116    call    BootMenuInfo_IsAvailable    ; Load segment to ES
     117    call    BootMenuInfo_ConvertDPTtoBX
     118    push    WORD [es:bx+BOOTMENUINFO.wInitErrorFlags]
    119119
    120120;;; fall-out to BootMenuPrint_HardDiskRefreshInformation.
Note: See TracChangeset for help on using the changeset viewer.