- Timestamp:
- Nov 10, 2013, 4:56:20 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/os2ahci/Makefile
r171 r174 30 30 # Define default build version if not specified in environment 31 31 BLD_MAJOR=1 32 BLD_MINOR=3 1# must be 2 digits32 BLD_MINOR=32 # must be 2 digits 33 33 BLD_REV=0 # not used at this time 34 34 FIXPACK= … … 58 58 !endif 59 59 60 CC_INCLUDE = -I..\include & 61 -I$(DDK)\base\h & 62 -I$(DDK)\base\ibmh & 63 -I$(DDK)\base\src\dev\dasd\diskh & 64 -I$(DDK)\base\src\dev\thinkpad\dockii\apmcalls & 65 66 AS_INCLUDE = -I=$(DDK)\base\inc & 67 -I=$(DDK)\base\src\dev\dasd\diskinc 68 69 LIB_DIRS = $(DDK)\base\lib\ & 70 $(DDK)\base\src\dev\dasd\devhlp\ & 71 $(DDK)\base\src\dev\thinkpad\dockii\apmcalls\ 60 AS_INCLUDE = -I=$(DDK)\base\inc 61 LIB_DIRS = $(DDK)\base\lib\ 72 62 73 63 ############################################################################### … … 79 69 # 80 70 81 %PATH=..\..\tools;$(WATCOM)\BINP;$(WATCOM)\BINW; 82 AS = wasm 83 CC = wcc 84 MAPSYM = $(DDK)\base\tools\mapsym.exe 71 %INCLUDE=..\include;$(DDK)\base\h; 72 %PATH=..\..\tools;$(WATCOM)\BINP;$(WATCOM)\BINW;$(DDK)\base\tools; 73 AS=wasm 74 CC=wcc 75 MAPSYM=mapsym.exe 85 76 86 77 !ifdef __LOADDLL__ … … 160 151 161 152 .c.obj: .autodepend 162 $(CC) $(CFLAGS) $ (CC_INCLUDE) $[@153 $(CC) $(CFLAGS) $[@ 163 154 #wdis -l $^@ 164 155 -
trunk/src/os2ahci/README
r173 r174 8 8 9 9 OS2AHCI is an AHCI driver for eComStation. It supports both ATA and 10 ATAPI devices in a single driver , thus there's no need for an11 ATAPI/CDROM filter driver.10 ATAPI devices in a single driver. An ATAPI/CDROM filter driver is 11 only required if you want to read/write CD-DA (audio) format CDs. 12 12 13 13 … … 43 43 ========================= 44 44 45 The *binary* delivery of OS2AHCI.ADD as obtained from ecomstation.nl,45 The *binary* delivery of OS2AHCI.ADD as obtained from the BetaZone, 46 46 or as part of packaged eComStation releases, is licensed to run with 47 47 eComStation only. … … 53 53 54 54 Please note that builds other than the official binary delivered as 55 part of eComStation releases or downloaded from ecomstation.nlare56 not officially supported by Mensys.55 part of eComStation releases or downloaded from the BetaZone are 56 not officially supported. 57 57 58 58 … … 62 62 The toolchain required for compilation consists of: 63 63 64 - IBM OS/2 DDK version 9.23 or later (see ddk\base\h\version.mak) 65 and that has been updated for SMP systems. (Used for include files) 66 - Open Watcom C/C++ package 67 (available from: http://www.openwatcom.org/index.php/Downloads) 68 - WCC 16-bit C Compiler (part of the Open Watcom package) 69 - WASM Assembler (part of the Open Watcom package) 70 - WLINK Linker (part of the Open Watcom package) 71 - MAPSYM (part of the DDK) 64 - The MiniDDK or an updated DDK 65 - Open Watcom version 1.9 or later 72 66 73 67 Define DDK and WATCOM in the environment. … … 358 352 the character device named "IBMS506$", they will not work with OS2AHCI unless 359 353 modified to open the OS2AHCI$ device. Previous versions of OS2AHCI used to 360 register a duplicate device with the IBMS506$ name, however since 361 that caused so many unacceptable problems, that is no longer done. You must 362 have a SMARTutility that opens the OS2AHCI$ device to access the AHCI driver.354 register a duplicate device with the IBMS506$ name, however since that caused 355 so many unacceptable problems, that is no longer done. You must have a SMART 356 utility that opens the OS2AHCI$ device to access the AHCI driver. 363 357 364 358 A patched version of the smartctl.exe program is included in the OS2AHCI … … 393 387 Change Log 394 388 ========== 389 390 v.1.32 09-Nov-2013 - David Azarewicz 391 Fix for some hardware that reports incorrect status 392 Report real device in addition to fake SCSI device when SCSI emulation 393 is enabled. 395 394 396 395 v.1.31 21-Aug-2013 - David Azarewicz -
trunk/src/os2ahci/ahci.c
r171 r174 315 315 /* more ports in port_map than in HOST_CAP & 0x1f */ 316 316 ports = ai->hw_ports; 317 dprintf("implemented port map (0x%lx) contains more " 318 "ports than nr_ports (%d), using nr_ports\n", 319 ai->port_map, ports); 317 dprintf("implemented port map (0x%lx) contains more ports than nr_ports (%d), using nr_ports\n", ai->port_map, ports); 320 318 ai->port_map = (1UL << ports) - 1UL; 321 319 } … … 347 345 readl(ai->mmio + HOST_CTL); 348 346 349 if ((ai->bios_config[HOST_CTL / sizeof(u32)] & HOST_AHCI_EN) == 0 && 350 ai->pci_vendor == PCI_VENDOR_ID_INTEL) { 347 if ((ai->bios_config[HOST_CTL / sizeof(u32)] & HOST_AHCI_EN) == 0 && ai->pci_vendor == PCI_VENDOR_ID_INTEL) { 351 348 352 349 /* This BIOS apparently accesses the controller via SATA registers and … … 410 407 } 411 408 409 #ifdef NOT_USED 412 410 int ahci_reset_controller(AD_INFO *ai) 413 411 { … … 416 414 417 415 dprintf("controller reset starting on adapter %d\n", ad_no(ai)); 418 /* we must be in AHCI mode, before using anything 419 * AHCI-specific, such as HOST_RESET. 420 */ 416 417 /* we must be in AHCI mode, before using anything AHCI-specific, such as HOST_RESET. */ 421 418 ahci_enable_ahci(ai); 422 419 … … 445 442 ahci_enable_ahci(ai); 446 443 447 /* Some registers might be cleared on reset. Restore 448 * initial values. 449 */ 444 /* Some registers might be cleared on reset. Restore initial values. */ 450 445 ahci_restore_initial_config(ai); 451 446 … … 465 460 return 0; 466 461 } 462 #endif 467 463 468 464 /****************************************************************************** … … 769 765 writel(port_mmio + PORT_SCR_ERR, tmp); 770 766 771 /* power up and spin up the drive if necessary */ 772 if (((tmp = readl(port_mmio + PORT_CMD)) & (PORT_CMD_SPIN_UP|PORT_CMD_POWER_ON)) != (PORT_CMD_SPIN_UP|PORT_CMD_POWER_ON)) { 773 writel(port_mmio + PORT_CMD, tmp | PORT_CMD_SPIN_UP | PORT_CMD_POWER_ON); 774 } 767 /* Some hardware reports incorrect status so just set these bits unconditionally */ 768 tmp = readl(port_mmio + PORT_CMD); 769 tmp &= ~PORT_CMD_ALPE; /* turn off agressive power management */ 770 tmp |= (PORT_CMD_SPIN_UP | PORT_CMD_POWER_ON); /* power up and spin up the drive */ 771 writel(port_mmio + PORT_CMD, tmp); 775 772 776 773 /* set link speed and power management options */ … … 1309 1306 rc = timer_check_and_block(&Timer); 1310 1307 if (rc) { 1311 dprintf(" Timeout" , tmp);1308 dprintf(" Timeout"); 1312 1309 break; 1313 1310 } 1314 1311 } 1315 1312 1316 if ((tmp = readl(port_mmio + PORT_SCR_ERR)) != 0) { 1313 tmp = readl(port_mmio + PORT_SCR_ERR); 1314 if (tmp & PORT_ERR_FAIL_BITS) { 1317 1315 dprintf(" SERR = 0x%08lx", tmp); 1318 1316 rc = 1; -
trunk/src/os2ahci/ahci.h
r162 r174 182 182 PORT_IRQ_PIOS_FIS | PORT_IRQ_D2H_REG_FIS) 183 183 184 #define PORT_ERR_X (1UL << 26) /* Exchanged */ 185 #define PORT_ERR_FIS (1UL << 25) /* Unknown FIS type */ 186 #define PORT_ERR_TP (1UL << 24) /* Transport State Transition Error */ 187 #define PORT_ERR_S (1UL << 23) /* Link Sequence Error */ 188 #define PORT_ERR_H (1UL << 22) /* Handshake Error */ 189 #define PORT_ERR_CRC (1UL << 21) /* CRC Error */ 190 #define PORT_ERR_D (1UL << 20) /* Disparity Error */ 191 #define PORT_ERR_B (1UL << 19) /* 10B to 8B Decode Error */ 192 #define PORT_ERR_W (1UL << 18) /* Comm Wake */ 193 #define PORT_ERR_PI (1UL << 17) /* Phy Internal Error */ 194 #define PORT_ERR_N (1UL << 16) /* PhyRdy Change */ 195 #define PORT_ERR_IE (1UL << 11) /* Internal Error */ 196 #define PORT_ERR_P (1UL << 10) /* Protocol Error */ 197 #define PORT_ERR_C (1UL << 9) /* Persistent Communication or Data Integrity Error */ 198 #define PORT_ERR_TD (1UL << 8) /* Transient Data Integrity Error */ 199 #define PORT_ERR_M (1UL << 1) /* Recovered Communications Error */ 200 #define PORT_ERR_DI (1UL << 0) /* Recoverred Data Integrity Error */ 201 #define PORT_ERR_FAIL_BITS (PORT_ERR_X | PORT_ERR_FIS | PORT_ERR_TP | PORT_ERR_S | PORT_ERR_H | PORT_ERR_CRC | \ 202 PORT_ERR_D | PORT_ERR_B | PORT_ERR_W | PORT_ERR_PI | PORT_ERR_IE | PORT_ERR_P | \ 203 PORT_ERR_C | PORT_ERR_TD) 204 184 205 /* PORT_CMD bits */ 185 206 #define PORT_CMD_ASP (1UL << 27) /* Aggressive Slumber/Partial */ -
trunk/src/os2ahci/os2ahci.c
r171 r174 1072 1072 if (ad_info->ports[p].devs[d].present) { 1073 1073 if (ad_info->ports[p].devs[d].atapi && emulate_scsi[dta][p]) { 1074 /* onlyreport this unit as SCSI unit */1074 /* report this unit as SCSI unit */ 1075 1075 scsi_units++; 1076 continue;1076 //continue; 1077 1077 } 1078 1078 if (add_unit_info(iorb_conf, dta, dta, p, d, 0)) { … … 1101 1101 for (p = 0; p <= ad_info->port_max; p++) { 1102 1102 for (d = 0; d <= ad_info->ports[p].dev_max; d++) { 1103 if (ad_info->ports[p].devs[d].present && 1104 ad_info->ports[p].devs[d].atapi && 1105 emulate_scsi[a][p]) { 1103 if (ad_info->ports[p].devs[d].present && ad_info->ports[p].devs[d].atapi && emulate_scsi[a][p]) { 1106 1104 if (add_unit_info(iorb_conf, dta, a, p, d, scsi_id++)) { 1107 1105 goto iocm_device_table_done; … … 1446 1444 * separate function which is invoked via a context hook. 1447 1445 */ 1448 void _cdecl _far timeout_callback(ULONG timer_handle, ULONG p1, 1449 ULONG p2) 1446 void _cdecl _far timeout_callback(ULONG timer_handle, ULONG p1, ULONG p2) 1450 1447 { 1451 1448 IORBH _far *iorb = (IORBH _far *) p1; … … 1502 1499 * problems during the early boot phase. 1503 1500 */ 1504 void _cdecl _far reset_watchdog(ULONG timer_handle, ULONG p1, 1505 ULONG p2) 1501 void _cdecl _far reset_watchdog(ULONG timer_handle, ULONG p1, ULONG p2) 1506 1502 { 1507 1503 /* reset watchdog timer */ -
trunk/src/os2ahci/pci.c
r171 r174 931 931 } 932 932 933 dddphex(parm, sizeof(*parm), "oemhlp_parm: ");934 dddphex(data, sizeof(*data), "oemhlp_data: ");933 //dddphex(parm, sizeof(*parm), "oemhlp_parm: "); 934 //dddphex(data, sizeof(*data), "oemhlp_data: "); 935 935 936 936 if (ioctl.rph.Status & STERR) { -
trunk/tools/update.cmd
r156 r174 1 1 /* Update the driver */ 2 call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'; 3 call SysLoadFuncs; 2 4 parse arg BootDrive; 3 5
Note:
See TracChangeset
for help on using the changeset viewer.