Ignore:
Timestamp:
May 16, 2012, 10:19:24 AM (13 years ago)
Author:
Markus Thielen
Message:
  • (#13) added IDC entry point to allow switching back to BIOS mode
  • added IDCTEST driver and program for testing the IDC entry point
  • fixed bug in IOCTL handling (missing 'break')
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/os2ahci/init.asm

    r128 r133  
    66
    77; -----------------------------------------------------------------------------
     8; Constants
     9                DEV_IDC  EQU    0400h        ;  IDC bit for ADD flags
     10       
     11; -----------------------------------------------------------------------------
    812; Public symbols
    913
    1014                PUBLIC  _asm_strat           ; low-level strategy routine
     15                PUBLIC  _asm_idc_entry       ; low-level IDC entry point
    1116                PUBLIC  _readl               ; MMIO read (32 bits)
    1217                PUBLIC  _writel              ; MMIO write (32 bits)
     
    2934DEVHDR          SEGMENT WORD PUBLIC 'DATA'
    3035_dev_hdr        dd      _legacy_hdr             ; next device header
    31                 dw      DEVLEV_3 + DEV_CHAR_DEV ; flags for ADD drivers
     36                dw      DEVLEV_3 + DEV_CHAR_DEV + DEV_IDC ; flags for ADD drivers
    3237                dw      OFFSET _asm_strat       ; strategy routine
    33                 dw      0                       ; no IDC routine
     38                dw      OFFSET _asm_idc_entry   ; IDC entry point
    3439                db      "OS2AHCI$"              ; name of character device
    3540                dq      0                       ; 8 reserved bytes
     
    4045                dw      DEVLEV_3 + DEV_CHAR_DEV ; flags for ADD drivers
    4146                dw      OFFSET _asm_strat       ; strategy routine
    42                 dw      0                       ; no IDC routine
     47                dw      0                       ; IDC entry point
    4348                db      "IBMS506$"              ; name of character device
    4449                dq      0                       ; 8 reserved bytes
     
    129134                RET
    130135_asm_strat      ENDP
     136
     137
     138; IDC entry point (Assembler stub)
     139_asm_idc_entry  PROC    FAR
     140       
     141                ; push request packet address
     142                PUSH    ES
     143                PUSH    BX
     144                CLD
     145
     146                ; call C IDC entry point - which is the strategy routine
     147                CALL    _c_strat
     148
     149                POP     BX
     150                POP     ES
     151                MOV     WORD PTR ES:[BX+3], AX
     152                RET
     153_asm_idc_entry  ENDP
    131154
    132155                .386
Note: See TracChangeset for help on using the changeset viewer.