- Timestamp:
- Oct 14, 2011, 10:22:12 PM (14 years ago)
- Location:
- trunk/src/os2ahci
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/os2ahci/README
r120 r128 57 57 - ALP Assembler (part of DDK) 58 58 - link.exe (part of DDK) 59 60 Please note that builds other than the official binary delivered as 61 part of eComStation releases or downloaded from ecomstation.nl are 62 not officially supported by Mensys. 59 63 60 64 … … 101 105 /t Perform thorough PCI ID scan; default = on, can be 102 106 turned off with /!t to perform only a PCI class scan 107 /f Force the use of the HW write cache when using NCQ 108 commands; see "Native Command Queuing" below for 109 further explanation 103 110 /r Reset ports during initialization (default = off 104 111 unless the [Intel] AHCI controller was found to be 105 initialized by the BIOS toSATA mode)112 initialized by the BIOS in SATA mode) 106 113 /a Set adapter for adapter-specific options 107 114 (default = -1, all adapters) … … 173 180 option "/n" to OS2AHCI.ADD. 174 181 182 NCQ and HW Caches 183 ----------------- 184 185 In NCQ mode, OS2AHCI supports a request flag which allows upstream code 186 (e.g. file systems) to force writes to go directly to the disk instead 187 of being buffered in the HW disk cache. However, at least JFS doesn't 188 support this flag properly which effectively disables the HW disk cache 189 for write operations across the board, resulting in a substantial 190 performance loss. In order to prevent OS2AHCI from disabling the HW 191 cache when so requested by upstream code, please use the command line 192 option "/f". 193 194 This may, of course, result in data loss in case of power failures but 195 apparently this was the situation with previous IDE drivers as well thus 196 shouldn't make much difference in the field. The JFS code also seems to 197 imply that this flag has never been widely supported by [IDE] drivers; 198 otherwise, the JFS developers should have stumbled over the performance 199 loss a long time ago and fixed the code. 200 201 NOTES: 202 203 - Without NCQ, OS2AHCI behaves like former IDE drivers, i.e. the HW 204 cache will always be enabled (on modern disks). 205 206 - When suspending, rebooting or shutting down, OS2AHCI always flushes 207 the HW disk cache regardless of the "/f" or "/n" command line options. 208 175 209 176 210 Interoperability With IDE Drivers … … 278 312 always done via DMA. 279 313 314 315 SMART Support 316 ============= 317 318 Starting with version 1.22, OS2AHCI supports the IOCTL interface required by 319 existing SMART monitoring tools. Since those tools are hard-coded to open 320 the character device named "IBMS506$", OS2AHCI will now register a device 321 with this name, too. 322 323 NOTES: 324 325 - If multiple drivers exporting this character device name are loaded at 326 the same time, the driver loaded last will receive all [SMART] requests. 327 This means that if both DANIS506 and OS2AHCI are loaded and SMART support 328 for OS2AHCI-controlled hard disks is desired, OS2AHCI will have to be 329 loaded after DANIS506. It also means that DANIS506 may have to be told 330 to ignore type 2 controllers (i.e. controllers supporting both SATA and 331 AHCI) using the command line options "/A:x /I". 332 333 - The IOCTL interface for SMART is based on the idea of IDE controllers 334 with a master and a slave drive. OS2AHCI maps all devices (ATA or ATAPI) 335 sequentially to this pattern. If, for example, you have 4 hard disks and 336 one CDROM attached to a single controller on ports 1, 2, 5, 7, and 11, 337 SMART tools will see 3 controllers as follows: 338 339 - controller 0, master: HD on port 1 340 - controller 0, slave: HD on port 2 341 - controller 1, master: HD on port 5 342 - controller 1, slave: HD on port 7 343 - controller 2, master: CDROM on port 11 344 345 - The DSKSP_GEN_GET_COUNTERS interface is currently unsupported; calls to 346 the corresponding IOCTL will return 0 for all counters. SMART counters 347 are not affected by this limitation, i.e. SMART tools will be able to 348 report counters from the physical disk; this limitation only affects 349 the software counters maintained by ADD drivers which do support the 350 DSKSP_GEN_GET_COUNTERS IOCTL request. 351 -
trunk/src/os2ahci/init.asm
r79 r128 28 28 29 29 DEVHDR SEGMENT WORD PUBLIC 'DATA' 30 _dev_hdr dd -1 ; no headers after this one30 _dev_hdr dd _legacy_hdr ; next device header 31 31 dw DEVLEV_3 + DEV_CHAR_DEV ; flags for ADD drivers 32 dw _asm_strat; strategy routine32 dw OFFSET _asm_strat ; strategy routine 33 33 dw 0 ; no IDC routine 34 34 db "OS2AHCI$" ; name of character device 35 35 dq 0 ; 8 reserved bytes 36 36 dd DEV_IOCTL2 + DEV_ADAPTER_DD + DEV_INITCOMPLETE + 20h ; ADD flags 37 dw 0 38 39 _legacy_hdr dd -1 ; no headers after this one 40 dw DEVLEV_3 + DEV_CHAR_DEV ; flags for ADD drivers 41 dw OFFSET _asm_strat ; strategy routine 42 dw 0 ; no IDC routine 43 db "IBMS506$" ; name of character device 44 dq 0 ; 8 reserved bytes 45 dd 0 37 46 dw 0 38 47 DEVHDR ENDS -
trunk/src/os2ahci/ioctl.c
r126 r128 462 462 UCHAR parm; 463 463 464 /* this is not sufficiently tested so far */465 return(STDON | STATUS_ERR_UNKCMD);466 467 464 /* verify addressability of parm buffer (DSKSP_CommandParameters) */ 468 465 if (DevHelp_VerifyAccess((SEL) ((ULONG) cp >> 16), -
trunk/src/os2ahci/os2ahci.c
r125 r128 161 161 USHORT init_drv(RPINITIN _far *req) 162 162 { 163 static int init_drv_called; 164 static int init_drv_failed; 163 165 RPINITOUT _far *rsp = (RPINITOUT _far *) req; 164 166 DDD_PARM_LIST _far *ddd_pl = (DDD_PARM_LIST _far *) req->InitArgs; … … 172 174 u16 vendor; 173 175 u16 device; 176 177 if (init_drv_called) { 178 /* This is the init call for the second (legacy IBMS506$) character 179 * device driver. If the main driver failed initialization, fail this 180 * one as well. 181 */ 182 rsp->CodeEnd = (u16) end_of_code; 183 rsp->DataEnd = (u16) &end_of_data; 184 return(STDON | ((init_drv_failed) ? ERROR_I24_QUIET_INIT_FAIL : 0)); 185 } 186 init_drv_called = 1; 174 187 175 188 /* set device helper entry point */ … … 375 388 rsp->CodeEnd = 0; 376 389 rsp->DataEnd = 0; 390 init_drv_failed = 1; 377 391 378 392 /* free context hooks */ -
trunk/src/os2ahci/version.h
r125 r128 14 14 15 15 16 #define VERSION 12 1/* driver version (2 implied decimals) */16 #define VERSION 122 /* driver version (2 implied decimals) */ 17 17
Note:
See TracChangeset
for help on using the changeset viewer.