- Timestamp:
- Apr 3, 2013, 11:13:13 PM (12 years ago)
- Location:
- trunk/src/os2ahci
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/os2ahci/Makefile
r152 r153 46 46 VENDOR=$(%VENDOR) 47 47 !else 48 VENDOR= Mensys BV48 VENDOR=Unknown 49 49 !endif 50 50 … … 79 79 80 80 %PATH=..\..\tools;$(WATCOM)\BINP;$(WATCOM)\BINW; 81 AS 82 CC 83 MAPSYM 81 AS = wasm 82 CC = wcc 83 MAPSYM = $(DDK)\base\tools\mapsym.exe 84 84 85 85 !ifdef __LOADDLL__ … … 89 89 90 90 AFLAGS = -q 91 #CFLAGS = -ei -5 -d3 -hc -bt=os2 -ms -zu -w3 -wcd=138 -wcd=300 -ecc -zp1 -q -s -zgp -zfp -oi92 91 # In order to build the SMP safe version you must have the updated devhelp.h and define OS2AHCI_SMP. 93 CFLAGS = -ei - 5 -d0 -bt=os2 -ms -zu -w=0-ecc -zp=1 -q -s -zgp -zfp -oi -DOS2AHCI_SMP94 CFLAGS_DEBUG = -ei - 5-d3 -hc -bt=os2 -ms -zu -ecc -zp=1 -q -s -zgp -zfp -od92 CFLAGS = -ei -6 -d0 -bt=os2 -ms -zu -wx -ecc -zp=1 -q -s -zgp -zfp -oi -DOS2AHCI_SMP 93 CFLAGS_DEBUG = -ei -6 -d3 -hc -bt=os2 -ms -zu -ecc -zp=1 -q -s -zgp -zfp -od 95 94 96 95 ############################################################################### … … 150 149 @AddToFile $^@,$#define BLD_MONTH,DATEMONTH 151 150 @AddToFile $^@,$#define BLD_DAY,DATEDAY 152 @AddToFile .cmd$^@,$#define BLDLEVEL,BLDLEVEL2,$(VENDOR),$(BLD_MAJOR).$(BLD_MINOR),AHCI Driver (c) Mensys BV 2013151 @AddToFile $^@,$#define BLDLEVEL,BLDLEVEL2,$(VENDOR),$(BLD_MAJOR).$(BLD_MINOR),AHCI Driver (c) Mensys BV 2013 153 152 154 153 .asm.obj: .autodepend -
trunk/src/os2ahci/README
r148 r153 62 62 63 63 - IBM OS/2 DDK version 9.23 or later (see ddk\base\h\version.mak) 64 (Used for include files and qgrep)64 and that has been updated for SMP systems. (Used for include files) 65 65 - Open Watcom C/C++ package 66 66 (available from: http://www.openwatcom.org/index.php/Downloads) -
trunk/src/os2ahci/apm.c
r87 r153 105 105 int d; 106 106 107 if (suspended) return; 107 108 dprintf("apm_suspend()\n"); 108 109 … … 140 141 } 141 142 143 suspended = 1; 142 144 dprintf("apm_suspend() finished\n"); 143 145 } … … 151 153 int a; 152 154 155 if (!suspended) return; 153 156 dprintf("apm_resume()\n"); 154 157 … … 172 175 } 173 176 177 suspended = 0; 174 178 dprintf("apm_resume() finished\n"); 175 179 } -
trunk/src/os2ahci/ata.c
r136 r153 1065 1065 AP_END); 1066 1066 } 1067 1067 1068 1068 return(rc); 1069 1069 } -
trunk/src/os2ahci/init.asm
r144 r153 40 40 db "OS2AHCI$" ; name of character device 41 41 dq 0 ; 8 reserved bytes 42 dd DEV_IOCTL2 + DEV_ADAPTER_DD + DEV_INITCOMPLETE + 20h; ADD flags42 dd DEV_IOCTL2 + DEV_ADAPTER_DD + DEV_INITCOMPLETE + DEV_SAVERESTORE ; ADD flags 43 43 dw 0 44 44 45 ; This is here to support old SMART tools. This is a really bad thing to do as it will 46 ; cause problems in the future. The SMART tools should be fixed instead. 45 47 _legacy_hdr dd -1 ; no headers after this one 46 48 dw DEVLEV_3 + DEV_CHAR_DEV ; flags for ADD drivers … … 51 53 dd 0 52 54 dw 0 55 53 56 DEVHDR ENDS 54 57 -
trunk/src/os2ahci/libc.c
r148 r153 375 375 vsprintf(buf, fmt, va); 376 376 377 if (debug && com_base != 0) {378 /* print the same message to COM1 as well */377 if (debug) { 378 /* print the same message to COM1/trace as well */ 379 379 printf("%s", buf); 380 380 } -
trunk/src/os2ahci/os2ahci.c
r152 r153 121 121 u16 ad_ignore; /* bitmap with adapter indexes to ignore */ 122 122 int init_complete; /* if != 0, initialization has completed */ 123 int suspended; 123 124 124 125 /* apapter/port-specific options saved when parsing the command line */ … … 163 164 case CMDINPUT: 164 165 rc = char_dev_input((RP_RWV _far *) req); 166 break; 167 168 case CMDSaveRestore: 169 rc = sr_drv(((RPSAVERESTORE _far *) req)->FuncCode); 165 170 break; 166 171 … … 203 208 } 204 209 init_drv_called = 1; 210 suspended = 0; 205 211 206 212 /* set device helper entry point */ … … 373 379 trace_init(); 374 380 } 381 dprintf("BldLevel: %s\n", BldLevel); 382 dprintf("CmdLine: %Fs\n", cmd_line); 375 383 376 384 /* scan PCI bus for supported devices */ … … 518 526 519 527 apm_suspend(); 528 return(STDON); 529 } 530 531 /****************************************************************************** 532 * Device driver suspend/resume handler. This handler is called when ACPI is 533 * executing a suspend or resume. 534 */ 535 USHORT sr_drv(int func) 536 { 537 dprintf("sr_drv(%d) called\n", func); 538 539 if (func) apm_resume(); 540 else apm_suspend(); 541 520 542 return(STDON); 521 543 } -
trunk/src/os2ahci/os2ahci.h
r150 r153 404 404 extern USHORT char_dev_input (RP_RWV _far *rwrb); 405 405 extern USHORT exit_drv (int func); 406 extern USHORT sr_drv (int func); 406 407 extern void _cdecl _far _loadds add_entry (IORBH _far *iorb); 407 408 extern void trigger_engine (void); … … 557 558 extern u16 ad_ignore; /* bitmap with adapters to be ignored */ 558 559 extern int init_complete; /* if != 0, initialization has completed */ 560 extern int suspended; /* indicates if the driver is suspended */ 559 561 560 562 extern u16 com_base; /* debug COM port base address */ -
trunk/src/os2ahci/pci.c
r148 r153 610 610 611 611 /* found a supported AHCI device */ 612 ciiprintf("found AHCI device: %s %s (%04x:%04x)\n" 613 " class:0x%06lx bus:%d devfunc:0x%02x\n", 612 ciiprintf("found AHCI device: %s %s (%04x:%04x) class:0x%06lx bus:%d devfunc:0x%02x\n", 614 613 vendor_from_id(vendor), device_from_id(device), 615 614 vendor, device, -
trunk/src/os2ahci/trace.c
r148 r153 169 169 u16 trace_read(u8 _far *buf, u16 cb_buf) 170 170 { 171 u16 cb_avail;172 171 u16 cb_read; 173 172
Note:
See TracChangeset
for help on using the changeset viewer.