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/os2ahci.c

    r131 r133  
    124124 * for initialization purposes; all other calls go directly to the adapter
    125125 * device driver's strategy function.
     126 *
     127 * NOTE: this is also used as the IDC entry point. We expect an IOCTL request
     128 *       packet for IDC calls, so they can be handled by gen_ioctl.
    126129 */
    127130USHORT _cdecl c_strat(RPH _far *req)
     
    247250      case 'r':
    248251        /* reset ports during initialization */
    249         init_reset = 1;
     252        init_reset = 1;
    250253        break;
    251254
     
    427430
    428431    }
     432    break;
     433
     434  case OS2AHCI_IDC_CATEGORY:
     435    switch (ioctl->Function) {
     436
     437    case OS2AHCI_IDC_BIOSMODE:
     438      /* reconfigure adapters in BIOS/int13 mode; needed for generating
     439       * trap dumps on some machines. This is called by ACPI.PSD.
     440       *
     441       * To enter BIOS mode, we flush all write caches, turn off interrupts
     442       * and restore the BIOS configuration. This is exactly what
     443       * apm_suspend() does.
     444       */
     445      apm_suspend();
     446      return(STDON);
     447
     448    case OS2AHCI_IDC_BEEP:
     449      /* IOCTL for IDC testing - just beep */
     450      DevHelp_Beep(2000, 100);
     451      return(STDON);
     452    }
     453    break;
    429454
    430455  case DSKSP_CAT_GENERIC:
Note: See TracChangeset for help on using the changeset viewer.