Changeset 282 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers


Ignore:
Timestamp:
Feb 29, 2012, 10:21:42 AM (13 years ago)
Author:
gregli@…
google:author:
gregli@hotmail.com
Message:

More fun with resets: It turns out to be important to reset our drives too, if for not other reason then to have the proper return code set for xlat'd drives (consider the case that we reset foreign drives with dl=80h, and at the same time we have one of our drives mapped to 80h). Fixed bug with polarity of ther iteration routine in ahDh for the return value for ah9h. Update signature in Configurator.

Location:
trunk/XTIDE_Universal_BIOS/Src/Handlers
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH0h_HReset.asm

    r275 r282  
    5151    call    ResetForeignHardDisks
    5252
    53     test    di, di
    54     jz      SHORT .SkipHardDiskReset
    55 
    5653    ; Resetting our hard disks will modify dl and bl to be idevars offset based instead of drive number based,
    5754    ; such that this call must be the last in the list of reset routines called.
     55    ;
     56    ; This needs to happen after ResetForeignHardDisks, as that call may have set the error code for 80h,
     57    ; and we need to override that value if we are xlate'd into 80h with one of our drives.
    5858    ;
    5959    call    ResetHardDisksHandledByOurBIOS         
     
    139139;   Parameters:
    140140;       DS:DI:  Ptr to DPT for requested drive
    141 ;               If DI is Null (foreign drive), or if error result in BH won't be used,
    142 ;               enter through .ErrorCodeNotUsed, to avoid di=Null dereference
     141;               If DPT pointer is not available, or error result in BH won't be used anyway,
     142;               enter through .ErrorCodeNotUsed.
    143143;       SS:BP:  Ptr to IDEPACK
    144144;   Returns:
     
    148148;--------------------------------------------------------------------
    149149ResetHardDisksHandledByOurBIOS:
     150    mov     bl, 0                                       ; Assume Null IdevarsOffset for now, assuming foreign drive
     151    test    di, di
     152    jz      .ErrorCodeNotUsed
    150153    mov     bl, [di+DPT.bIdevarsOffset]                 ; replace drive number with Idevars pointer for cmp with dl
    151 
    152 .ErrorCodeNotUsed:                                      ; BH will be garbage if thie entry point is used,
     154       
     155.ErrorCodeNotUsed:                                      ; BH will be garbage on exit if thie entry point is used,
    153156                                                        ; but reset of all drives will still happen
    154157
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AHDh_HReset.asm

    r271 r282  
    8080    call    AH9h_InitializeDriveForUse          ; Reset Master and Slave (Master will come first in DPT list)
    8181    pop     ax     
    82     jc      .done
     82    jnc     .done
    8383    or      ah, (RET_HD_RESETFAIL << 1) | 1     ; OR in Reset Failed error code and CF, will SHR into position later
    8484.done:
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm

    r258 r282  
    2929ALIGN JUMP_ALIGN
    3030Int19h_BootLoaderHandler:
     31    sti
    3132    ; Install INT 19h handler for proper reboot
    3233    LOAD_BDA_SEGMENT_TO es, ax
Note: See TracChangeset for help on using the changeset viewer.