- Timestamp:
- May 31, 2013, 2:03:41 AM (12 years ago)
- Location:
- trunk/src/os2ahci
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/os2ahci/Makefile
r159 r160 30 30 # Define default build version if not specified in environment 31 31 BLD_MAJOR=1 32 BLD_MINOR=2 7# must be 2 digits32 BLD_MINOR=28 # must be 2 digits 33 33 BLD_REV=0 # not used at this time 34 FIXPACK= 34 FIXPACK=Test Build 35 35 36 36 !ifndef %WATCOM # if not defined in the environment … … 91 91 AFLAGS = -q 92 92 # In order to build the SMP safe version you must have the updated devhelp.h and define OS2AHCI_SMP. 93 CFLAGS = -ei -6 -d0 -bt=os2 -ms -zu -wx -ecc -zp=1 -q -s -zgp -zfp -oi -DOS2AHCI_SMP94 CFLAGS_DEBUG = -ei -6 -d3 -hc -bt=os2 -ms -zu -ecc -zp =1 -q -s -zgp -zfp -od93 CFLAGS= -ei -6 -d0 -bt=os2 -ms -zu -wx -ecc -zp1 -q -s -zgp -zfp -oi -DOS2AHCI_SMP 94 CFLAGS_DEBUG = -ei -6 -d3 -hc -bt=os2 -ms -zu -ecc -zp1 -q -s -zgp -zfp -od 95 95 96 96 ############################################################################### -
trunk/src/os2ahci/README
r158 r160 44 44 The *binary* delivery of OS2AHCI.ADD as obtained from ecomstation.nl, 45 45 or as part of packaged eComStation releases, is licensed to run with 46 eComStation ,only.46 eComStation only. 47 47 48 48 The source code can be retrieved from http://svn.ecomstation.nl; … … 382 382 ========== 383 383 384 v.1.28 30-May-2013 - David Azarewicz 385 Reworked trap dump kernel exit 386 Removed unused IDC entry point. 387 Some work on suspend/resume routines. 388 384 389 v.1.27 23-Apr-2013 - David Azarewicz 385 390 Added LVM aware disk geometry reporting. -
trunk/src/os2ahci/ahci.c
r157 r160 162 162 163 163 /* print AHCI register debug information */ 164 #ifdef DEBUG 164 165 if (debug) { 165 printf("AHCI global controller registers:\n");166 aprintf("AHCI global controller registers:\n"); 166 167 for (i = 0; i <= HOST_CAP2 / sizeof(u32); i++) { 167 168 u32 val = ai->bios_config[i]; 168 printf(" %02x: %08lx", i, val);169 aprintf(" %02x: %08lx", i, val); 169 170 170 171 if (i == HOST_CAP) { 171 printf_nts(" -");172 if (val & HOST_CAP_64) printf_nts(" 64bit");173 if (val & HOST_CAP_NCQ) printf_nts(" ncq");174 if (val & HOST_CAP_SNTF) printf_nts(" sntf");175 if (val & HOST_CAP_MPS) printf_nts(" mps");176 if (val & HOST_CAP_SSS) printf_nts(" sss");177 if (val & HOST_CAP_ALPM) printf_nts(" alpm");178 if (val & HOST_CAP_LED) printf_nts(" led");179 if (val & HOST_CAP_CLO) printf_nts(" clo");180 if (val & HOST_CAP_ONLY) printf_nts(" ahci_only");181 if (val & HOST_CAP_PMP) printf_nts(" pmp");182 if (val & HOST_CAP_FBS) printf_nts(" fbs");183 if (val & HOST_CAP_PIO_MULTI) printf_nts(" pio_multi");184 if (val & HOST_CAP_SSC) printf_nts(" ssc");185 if (val & HOST_CAP_PART) printf_nts(" part");186 if (val & HOST_CAP_CCC) printf_nts(" ccc");187 if (val & HOST_CAP_EMS) printf_nts(" ems");188 if (val & HOST_CAP_SXS) printf_nts(" sxs");189 printf_nts(" cmd_slots:%d", (u16) ((val >> 8) & 0x1f) + 1);190 printf_nts(" ports:%d", (u16) (val & 0x1f) + 1);172 ntprintf(" -"); 173 if (val & HOST_CAP_64) ntprintf(" 64bit"); 174 if (val & HOST_CAP_NCQ) ntprintf(" ncq"); 175 if (val & HOST_CAP_SNTF) ntprintf(" sntf"); 176 if (val & HOST_CAP_MPS) ntprintf(" mps"); 177 if (val & HOST_CAP_SSS) ntprintf(" sss"); 178 if (val & HOST_CAP_ALPM) ntprintf(" alpm"); 179 if (val & HOST_CAP_LED) ntprintf(" led"); 180 if (val & HOST_CAP_CLO) ntprintf(" clo"); 181 if (val & HOST_CAP_ONLY) ntprintf(" ahci_only"); 182 if (val & HOST_CAP_PMP) ntprintf(" pmp"); 183 if (val & HOST_CAP_FBS) ntprintf(" fbs"); 184 if (val & HOST_CAP_PIO_MULTI) ntprintf(" pio_multi"); 185 if (val & HOST_CAP_SSC) ntprintf(" ssc"); 186 if (val & HOST_CAP_PART) ntprintf(" part"); 187 if (val & HOST_CAP_CCC) ntprintf(" ccc"); 188 if (val & HOST_CAP_EMS) ntprintf(" ems"); 189 if (val & HOST_CAP_SXS) ntprintf(" sxs"); 190 ntprintf(" cmd_slots:%d", (u16) ((val >> 8) & 0x1f) + 1); 191 ntprintf(" ports:%d", (u16) (val & 0x1f) + 1); 191 192 192 193 } else if (i == HOST_CTL) { 193 printf_nts(" -");194 if (val & HOST_AHCI_EN) printf_nts(" ahci_enabled");195 if (val & HOST_IRQ_EN) printf_nts(" irq_enabled");196 if (val & HOST_RESET) printf_nts(" resetting");194 ntprintf(" -"); 195 if (val & HOST_AHCI_EN) ntprintf(" ahci_enabled"); 196 if (val & HOST_IRQ_EN) ntprintf(" irq_enabled"); 197 if (val & HOST_RESET) ntprintf(" resetting"); 197 198 198 199 } else if (i == HOST_CAP2) { 199 printf_nts(" -");200 if (val & HOST_CAP2_BOH) printf_nts(" boh");201 if (val & HOST_CAP2_NVMHCI) printf_nts(" nvmhci");202 if (val & HOST_CAP2_APST) printf_nts(" apst");200 ntprintf(" -"); 201 if (val & HOST_CAP2_BOH) ntprintf(" boh"); 202 if (val & HOST_CAP2_NVMHCI) ntprintf(" nvmhci"); 203 if (val & HOST_CAP2_APST) ntprintf(" apst"); 203 204 } 204 printf_nts("\n"); 205 } 206 } 205 ntprintf("\n"); 206 } 207 } 208 #endif 207 209 208 210 /* Save working copies of CAP, CAP2 and port_map and remove broken feature … … 337 339 } 338 340 } 339 340 /* Wait some time to give the COMRESET a chance to complete (usually, at341 * least hard disks complete the reset within a few milliseonds)342 */343 msleep(20);344 341 } 345 342 … … 456 453 } 457 454 458 int ahci_reset_controller(AD_INFO *ai)459 {460 u32 tmp;461 TIMER Timer;462 463 dprintf("controller reset starting on adapter %d\n", ad_no(ai));464 /* we must be in AHCI mode, before using anything465 * AHCI-specific, such as HOST_RESET.466 */467 ahci_enable_ahci(ai);468 469 /* global controller reset */470 tmp = readl(ai->mmio + HOST_CTL);471 if ((tmp & HOST_RESET) == 0) {472 writel(ai->mmio + HOST_CTL, tmp | HOST_RESET);473 readl(ai->mmio + HOST_CTL); /* flush */474 }475 476 /*477 * to perform host reset, OS should set HOST_RESET478 * and poll until this bit is read to be "0".479 * reset must complete within 1 second, or480 * the hardware should be considered fried.481 */482 timer_init(&Timer, 1000);483 while (((tmp = readl(ai->mmio + HOST_CTL)) & HOST_RESET) != 0) {484 if (timer_check_and_block(&Timer)) {485 dprintf("controller reset failed (0x%lx)\n", tmp);486 return(-1);487 }488 }489 490 /* turn on AHCI mode */491 ahci_enable_ahci(ai);492 493 /* Some registers might be cleared on reset. Restore494 * initial values.495 */496 ahci_restore_initial_config(ai);497 498 if (ai->pci->vendor == PCI_VENDOR_ID_INTEL) {499 u32 tmp16 = 0;500 501 ddprintf("ahci_reset_controller: intel detected\n");502 /* configure PCS */503 pci_read_conf(ai->bus, ai->dev_func, 0x92, sizeof(u16), &tmp16);504 if ((tmp16 & ai->port_map) != ai->port_map) {505 ddprintf("ahci_reset_controller: updating PCS %x/%x\n", (u16)tmp16, ai->port_map);506 tmp16 |= ai->port_map;507 pci_write_conf(ai->bus, ai->dev_func, 0x92, sizeof(u16), tmp16);508 }509 }510 511 return 0;512 }513 514 455 /****************************************************************************** 515 456 * Scan all ports for connected devices and fill in the corresponding device … … 547 488 ahci_save_bios_config(ai); 548 489 } 549 550 ahci_reset_controller(ai);551 490 552 491 if (ahci_enable_ahci(ai)) { … … 723 662 dprintf("ahci_reset_port: resetting port %d.%d\n", ad_no(ai), p); 724 663 if (debug > 1) { 725 printf(" PORT_CMD = 0x%lx\n", readl(port_mmio + PORT_CMD));726 printf("ahci_reset_port: command engine status:\n");727 printf(" PORT_SCR_ACT = 0x%lx\n", readl(port_mmio + PORT_SCR_ACT));728 printf(" PORT_CMD_ISSUE = 0x%lx\n", readl(port_mmio + PORT_CMD_ISSUE));729 printf("link/device status:\n");730 printf(" PORT_SCR_STAT = 0x%lx\n", readl(port_mmio + PORT_SCR_STAT));731 printf(" PORT_SCR_CTL = 0x%lx\n", readl(port_mmio + PORT_SCR_CTL));732 printf(" PORT_SCR_ERR = 0x%lx\n", readl(port_mmio + PORT_SCR_ERR));733 printf(" PORT_TFDATA = 0x%lx\n", readl(port_mmio + PORT_TFDATA));734 printf("interrupt status:\n");735 printf(" PORT_IRQ_STAT = 0x%lx\n", readl(port_mmio + PORT_IRQ_STAT));736 printf(" PORT_IRQ_MASK = 0x%lx\n", readl(port_mmio + PORT_IRQ_MASK));737 printf(" HOST_IRQ_STAT = 0x%lx\n", readl(ai->mmio + HOST_IRQ_STAT));664 aprintf(" PORT_CMD = 0x%lx\n", readl(port_mmio + PORT_CMD)); 665 aprintf("ahci_reset_port: command engine status:\n"); 666 aprintf(" PORT_SCR_ACT = 0x%lx\n", readl(port_mmio + PORT_SCR_ACT)); 667 aprintf(" PORT_CMD_ISSUE = 0x%lx\n", readl(port_mmio + PORT_CMD_ISSUE)); 668 aprintf("link/device status:\n"); 669 aprintf(" PORT_SCR_STAT = 0x%lx\n", readl(port_mmio + PORT_SCR_STAT)); 670 aprintf(" PORT_SCR_CTL = 0x%lx\n", readl(port_mmio + PORT_SCR_CTL)); 671 aprintf(" PORT_SCR_ERR = 0x%lx\n", readl(port_mmio + PORT_SCR_ERR)); 672 aprintf(" PORT_TFDATA = 0x%lx\n", readl(port_mmio + PORT_TFDATA)); 673 aprintf("interrupt status:\n"); 674 aprintf(" PORT_IRQ_STAT = 0x%lx\n", readl(port_mmio + PORT_IRQ_STAT)); 675 aprintf(" PORT_IRQ_MASK = 0x%lx\n", readl(port_mmio + PORT_IRQ_MASK)); 676 aprintf(" HOST_IRQ_STAT = 0x%lx\n", readl(ai->mmio + HOST_IRQ_STAT)); 738 677 } 739 678 … … 1565 1504 */ 1566 1505 if (irq_stat & PORT_IRQ_UNK_FIS) { 1506 #ifdef DEBUG 1567 1507 u32 _far *unk = (u32 _far *) (port_dma_base(ai, p)->rx_fis + RX_FIS_UNK); 1568 dprintf("warning: unknown FIS %08lx %08lx %08lx %08lx\n", 1569 unk[0], unk[1], unk[2], unk[3]);1508 dprintf("warning: unknown FIS %08lx %08lx %08lx %08lx\n", unk[0], unk[1], unk[2], unk[3]); 1509 #endif 1570 1510 reset_port = 1; 1571 1511 } … … 1688 1628 void ahci_execute_ata(IORBH _far *iorb) 1689 1629 { 1630 #ifdef DEBUG 1690 1631 int a = iorb_unit_adapter(iorb); 1691 1632 int p = iorb_unit_port(iorb); 1692 1633 int d = iorb_unit_device(iorb); 1634 #endif 1693 1635 1694 1636 dphex(((IORB_ADAPTER_PASSTHRU _far *) iorb)->pControllerCmd, -
trunk/src/os2ahci/apm.c
r157 r160 77 77 if (evt->ulParm2 >> 16 != APM_PWRSTATEREADY) { 78 78 /* we're suspending */ 79 apm_suspend();79 suspend(); 80 80 } 81 81 break; … … 84 84 case APM_CRITRESUMEEVENT: 85 85 /* we're resuming */ 86 apm_resume();86 resume(); 87 87 break; 88 88 … … 96 96 97 97 /****************************************************************************** 98 * APM suspend handler. In a nutshell, it'll turn of interrupts and flush all98 * Suspend handler. In a nutshell, it'll turn off interrupts and flush all 99 99 * write caches. 100 100 */ 101 void apm_suspend(void)101 void suspend(void) 102 102 { 103 103 int a; … … 107 107 108 108 if (suspended) return; 109 dprintf(" apm_suspend()\n");109 dprintf("suspend()\n"); 110 110 111 111 /* restart all ports with interrupts disabled */ … … 132 132 } 133 133 } 134 135 /* AHCI spec rev1.1 section 8.3.3: 136 * Software must disable interrupts prior to requesting a transition of the HBA to D3 state. 137 */ 138 writel(ai->mmio + HOST_CTL, readl(ai->mmio + HOST_CTL) & ~HOST_IRQ_EN); 139 readl(ai->mmio + HOST_CTL); /* flush */ 134 140 } 135 141 … … 137 143 init_complete = 0; 138 144 145 #if 0 139 146 /* restore BIOS configuration for each adapter and release the adapter */ 140 147 for (a = 0; a < ad_info_cnt; a++) { 141 148 ahci_restore_bios_config(ad_infos + a); 142 unlock_adapter(ad_infos + a); 143 } 149 } 150 #endif 151 152 /* TODO: put the device into the D3 state */ 144 153 145 154 suspended = 1; 146 dprintf(" apm_suspend() finished\n");147 } 148 149 /****************************************************************************** 150 * APM resume handler. All ports are restarted with interrupts enabled using155 dprintf("suspend() finished\n"); 156 } 157 158 /****************************************************************************** 159 * Resume handler. All ports are restarted with interrupts enabled using 151 160 * the same function as the IOCM_COMPLETE_INIT handler does. 152 161 */ 153 void apm_resume(void)162 void resume(void) 154 163 { 155 164 int a; 156 165 157 166 if (!suspended) return; 158 dprintf("apm_resume()\n"); 167 dprintf("resume()\n"); 168 169 /* TODO: put the device into the D0 state */ 159 170 160 171 for (a = 0; a < ad_info_cnt; a++) { … … 165 176 * done to get the adapter and its ports up and running. 166 177 */ 167 lock_adapter(ai);168 178 ahci_complete_init(ai); 169 179 } … … 178 188 179 189 suspended = 0; 180 dprintf("apm_resume() finished\n"); 181 } 190 dprintf("resume() finished\n"); 191 } 192 193 /****************************************************************************** 194 * This is the kernel exit handler for panics and traps. 195 * Assume the system is trashed and do the absolute minimum necessary 196 * to put the adapters into a state so that the BIOS can operate the 197 * adapters. We never need to recover from this as the system will be rebooted. 198 */ 199 void shutdown_driver(void) 200 { 201 int a; 202 int p; 203 u16 i; 204 u32 tmp; 205 //int d; 206 207 dprintf("shutdown_driver() enter\n"); 208 209 for (a = 0; a < ad_info_cnt; a++) { 210 AD_INFO *ai = ad_infos + a; 211 212 /* Try to be nice. Wait 50ms for adapter to go not busy. 213 * If it doesn't go not busy in that time, too bad. Stop it anyway. 214 */ 215 for (i=0; i<50000 && ai->busy; i++) udelay(1000); 216 217 for (p = 0; p <= ai->port_max; p++) { 218 u8 _far *port_mmio = port_base(ai, p); 219 220 /* Wait up to 50ms for port to go not busy. Again stop it 221 * anyway if it doesn't go not busy in that time. 222 */ 223 for (i=0; i<50000 && ahci_port_busy(ai, p); i++) udelay(1000); 224 225 /* stop port */ 226 writel(port_mmio + PORT_IRQ_MASK, 0); /* disable port interrupts */ 227 writel(port_mmio + PORT_CMD, readl(port_mmio + PORT_CMD) & ~PORT_CMD_FIS_RX); /* disable FIS reception */ 228 while (readl(port_mmio + PORT_CMD) & PORT_CMD_FIS_ON); /* wait for it to stop */ 229 writel(port_mmio + PORT_CMD, readl(port_mmio + PORT_CMD) & ~PORT_CMD_START); /* set port to idle */ 230 while (readl(port_mmio + PORT_CMD) & PORT_CMD_LIST_ON); /* wait for it to stop */ 231 232 /* clear any pending port IRQs */ 233 tmp = readl(port_mmio + PORT_IRQ_STAT); 234 if (tmp) writel(port_mmio + PORT_IRQ_STAT, tmp); 235 writel(ai->mmio + HOST_IRQ_STAT, 1UL << p); 236 237 /* reset PxSACT register (tagged command queues, not reset by COMRESET) */ 238 writel(port_mmio + PORT_SCR_ACT, 0); 239 readl(port_mmio + PORT_SCR_ACT); /* flush */ 240 241 #if 0 242 ahci_start_port(ai, p, 0); 243 244 /* flush cache on all attached devices */ 245 for (d = 0; d <= ai->ports[p].dev_max; d++) { 246 if (ai->ports[p].devs[d].present) { 247 ahci_flush_cache(ai, p, d); 248 } 249 } 250 #endif 251 } 252 } 253 254 init_complete = 0; 255 256 /* restore BIOS configuration for each adapter */ 257 for (a = 0; a < ad_info_cnt; a++) { 258 ahci_restore_bios_config(ad_infos + a); 259 } 260 261 dprintf("shutdown_driver() finished\n"); 262 } 263 -
trunk/src/os2ahci/ata.c
r157 r160 277 277 278 278 if (debug >= 2) { 279 printf("ATA command for %d.%d.%d, slot %d:\n", ad_no(ai), p, d, slot);279 aprintf("ATA command for %d.%d.%d, slot %d:\n", ad_no(ai), p, d, slot); 280 280 phex(cmd_hdr, offsetof(AHCI_CMD_HDR, reserved), "cmd_hdr: "); 281 281 phex(&ata_cmd, sizeof(ata_cmd), "ata_cmd: "); … … 480 480 { 481 481 GEOMETRY _far *geometry = ((IORB_GEOMETRY _far *) iorb)->pGeometry; 482 AD_INFO *ai = ad_infos + iorb_unit_adapter(iorb);483 int p = iorb_unit_port(iorb);484 int d = iorb_unit_device(iorb);485 482 ULONG sector; 486 483 … … 488 485 489 486 if (use_lvm_info) { 487 #ifdef DEBUG 488 AD_INFO *ai = ad_infos + iorb_unit_adapter(iorb); 489 int p = iorb_unit_port(iorb); 490 int d = iorb_unit_device(iorb); 490 491 ddprintf("is_lvm_geometry (%d.%d.%d)\n", ad_no(ai), p, d); 492 #endif 491 493 492 494 /* First check the sector reported by the hardware */ -
trunk/src/os2ahci/init.asm
r157 r160 109 109 EXTRN _reset_ctxhook : NEAR ; C reset context hook 110 110 EXTRN _engine_ctxhook : NEAR ; C engine context hook 111 EXTRN _ apm_suspend : NEAR; C routine for INT13 IO enable111 EXTRN _shutdown_driver : NEAR ; C routine for INT13 IO enable 112 112 _TEXT ENDS 113 113 … … 134 134 TGROUP GROUP _TEXT, CODE, LIBCODE, RMCode, _z_text 135 135 136 .386 136 137 137 138 ; ---------------------------------------------------------------------------- … … 181 182 ; Kernel exit routine to enable INT13 I/O (called before a trap dump occurrs) 182 183 _asm_krnl_exit PROC FAR 183 184 184 PUSH ES 185 185 PUSH DS … … 189 189 190 190 ; call C routine 191 CALL _ apm_suspend191 CALL _shutdown_driver 192 192 193 193 POP DS … … 469 469 __I4D endp 470 470 471 .286472 473 471 _TEXT ENDS 474 472 -
trunk/src/os2ahci/libc.c
r159 r160 405 405 if (debug) { 406 406 /* print the same message to COM1/trace as well */ 407 printf("%s", buf);407 aprintf("%s", buf); 408 408 } 409 409 … … 436 436 /* print hex block */ 437 437 while (len > 0) { 438 printf_nts("%Fp ", buf);438 ntprintf("%Fp ", buf); 439 439 440 440 /* print hex block */ 441 441 for (i = 0; i < 16; i++) { 442 442 if (i < len) { 443 printf_nts("%c%02x", ((i == 8) ? '-' : ' '), buf[i]);443 ntprintf("%c%02x", ((i == 8) ? '-' : ' '), buf[i]); 444 444 } else { 445 printf_nts(" ");445 ntprintf(" "); 446 446 } 447 447 } 448 448 449 449 /* print ASCII block */ 450 printf_nts(" ");450 ntprintf(" "); 451 451 for (i = 0; i < ((len > 16) ? 16 : len); i++) { 452 printf_nts("%c", (buf[i] >= 32 && buf[i] < 128) ? buf[i] : '.');453 } 454 printf_nts("\n");452 ntprintf("%c", (buf[i] >= 32 && buf[i] < 128) ? buf[i] : '.'); 453 } 454 ntprintf("\n"); 455 455 456 456 buf += 16; -
trunk/src/os2ahci/os2ahci.c
r157 r160 408 408 } 409 409 410 printf_nts("BldLevel: %s\n", BldLevel);411 printf_nts("CmdLine: %Fs\n", cmd_line);410 ntprintf("BldLevel: %s\n", BldLevel); 411 ntprintf("CmdLine: %Fs\n", cmd_line); 412 412 413 413 /* scan PCI bus for supported devices */ … … 489 489 break; 490 490 491 case OS2AHCI_IDC_CATEGORY:492 switch (ioctl->Function) {493 494 case OS2AHCI_IDC_BIOSMODE:495 /* reconfigure adapters in BIOS/int13 mode; needed for generating496 * trap dumps on some machines. This was intended to be called by ACPI.PSD,497 * but that is never done. This is obslete. The kernel exit accomplishes498 * this instead.499 *500 * To enter BIOS mode, we flush all write caches, turn off interrupts501 * and restore the BIOS configuration. This is exactly what502 * apm_suspend() does.503 */504 apm_suspend();505 return(STDON);506 507 case OS2AHCI_IDC_BEEP:508 /* IOCTL for IDC testing - just beep */509 DevHelp_Beep(2000, 100);510 return(STDON);511 }512 break;513 514 491 case DSKSP_CAT_GENERIC: 515 492 return(ioctl_gen_dsk(ioctl)); … … 552 529 } 553 530 554 apm_suspend();531 suspend(); 555 532 return(STDON); 556 533 } … … 564 541 dprintf("sr_drv(%d) called\n", func); 565 542 566 if (func) apm_resume();567 else apm_suspend();543 if (func) resume(); 544 else suspend(); 568 545 569 546 return(STDON); … … 765 742 * IORB. 766 743 */ 744 while (suspended) DevHelp_ProcBlock((ULONG)&send_iorb, 1, WAIT_IS_INTERRUPTABLE); 767 745 add_workspace(iorb)->processing = 1; 768 746 spin_unlock(drv_lock); … … 1263 1241 1264 1242 if (debug > min_debug) { 1265 printf("IORB %Fp queued (cmd = %d/%d, queue = %Fp [%s], timeout = %ld)\n",1243 aprintf("IORB %Fp queued (cmd = %d/%d, queue = %Fp [%s], timeout = %ld)\n", 1266 1244 iorb, iorb->CommandCode, iorb->CommandModifier, queue, queue_type, 1267 1245 iorb->Timeout); -
trunk/src/os2ahci/os2ahci.h
r157 r160 34 34 */ 35 35 36 #define DEBUG 36 37 #define INCL_NOPMAPI 37 38 #define INCL_DOSINFOSEG … … 104 105 105 106 /* debug output macros */ 107 #ifdef DEBUG 106 108 #define dprintf if (debug > 0) printf 107 109 #define dphex if (debug > 0) phex … … 110 112 #define dddprintf if (debug > 2) printf 111 113 #define dddphex if (debug > 2) phex 114 #define ntprintf printf_nts 115 #define aprintf printf 116 #else 117 #define dprintf(a,...) 118 #define dphex(a,b,c,...) 119 #define ddprintf(a,...) 120 #define ddphex(a,b,c,...) 121 #define dddprintf(a,...) 122 #define dddphex(a,b,c,...) 123 #define ntprintf(a,...) 124 #define aprintf(a,...) 125 #endif 112 126 113 127 /* verbosity console print macros … … 561 575 /* apm.c */ 562 576 extern void apm_init (void); 563 extern void apm_suspend (void);564 extern void apm_resume (void);577 extern void suspend (void); 578 extern void resume (void); 565 579 566 580 /* ioctl.c */ -
trunk/src/os2ahci/trace.c
r156 r160 235 235 AD_INFO *ai = ad_infos + a; 236 236 237 printf_nts("Adapter %d: %d:%d:%d irq=%d addr=0x%lx\n", a,237 ntprintf("Adapter %d: %d:%d:%d irq=%d addr=0x%lx\n", a, 238 238 ai->bus, ai->dev_func>>3, ai->dev_func&7, 239 239 ai->irq, ai->mmio_phys); … … 242 242 P_INFO *pi = &ai->ports[p]; 243 243 244 printf_nts(" Port %d:\n", p);244 ntprintf(" Port %d:\n", p); 245 245 246 246 for (d = 0; d <= pi->dev_max; d++) { 247 247 if (!pi->devs[d].present) continue; 248 printf_nts(" Drive %d: atapi=%d, removable=%d\n", d, pi->devs[d].atapi, pi->devs[d].removable);248 ntprintf(" Drive %d: atapi=%d, removable=%d\n", d, pi->devs[d].atapi, pi->devs[d].removable); 249 249 } 250 250 }
Note:
See TracChangeset
for help on using the changeset viewer.