Changeset 316 in xtideuniversalbios


Ignore:
Timestamp:
Mar 11, 2012, 3:56:34 AM (13 years ago)
Author:
gregli@…
google:author:
gregli@hotmail.com
Message:

Fixed a bug with ah0h/reset of a serial drive that was found during COM detect.

Location:
trunk/XTIDE_Universal_BIOS
Files:
2 edited

Legend:

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

    r277 r316  
    2424    .bStealSize         resb    1   ; Number of 1kB blocks stolen from 640kB base RAM
    2525
     26    .ideVarsBegin:
    2627    .ideVars0           resb    IDEVARS_size
    2728    .ideVars1           resb    IDEVARS_size
     
    3233    .ideVarsSerialAuto  resb    IDEVARS_size
    3334%endif
     35
     36    .ideVarsEnd:
    3437endstruc
     38
     39%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
     40    %if ROMVARS.ideVarsEnd & 0xff00 <> 0
     41        %error ".ideVars structures must fit within the first 256 bytes of the ROM image"
     42    %endif
     43    %if (ROMVARS.ideVarsEnd - ROMVARS.ideVarsBegin) = 0
     44        %error "there must be at lesat one .ideVars structure, it would be bizarre if this were not true, but it is assumed in the ah0h reset code."
     45    %endif
     46%endif
    3547
    3648; Bit defines for ROMVARS.wFlags
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH0h_HReset.asm

    r294 r316  
    158158    mov     dl, ROMVARS.ideVars0                        ; starting Idevars offset
    159159
    160     call    RamVars_GetIdeControllerCountToCX           ; get count of ide controllers
    161     jcxz    .done                                       ; just in case bIdeCnt is zero (shouldn't be)
     160    ; Get count of ALL Idevars structures, not just the ones that are configured.  This may seem odd,
     161    ; but it catches the .ideVarsSerialAuto structure, which would not be scanned if the count from
     162    ; RamVars_GetIdeControllerCountToCX was used.  Unused controllers won't make a difference, since no DPT
     163    ; will point to them.  Performance isn't an issue, as this is a reset operation.
     164    ;
     165    mov     cx, (ROMVARS.ideVarsEnd - ROMVARS.ideVarsBegin) / IDEVARS_size
     166
    162167.loop:
    163168    call    FindDPT_ForIdevarsOffsetInDL                ; look for the first drive on this controller, if any
Note: See TracChangeset for help on using the changeset viewer.