Changeset 49787 in vbox for trunk/src/VBox/HostDrivers/Support
- Timestamp:
- Dec 5, 2013 11:26:00 AM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 91106
- Location:
- trunk/src/VBox/HostDrivers/Support
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/SUPDrv.c
r49786 r49787 139 139 RTCPUID idCpu, uint8_t idApic, uint64_t iTick); 140 140 static void supdrvGipInitCpu(PSUPGLOBALINFOPAGE pGip, PSUPGIPCPU pCpu, uint64_t u64NanoTS); 141 static int supdrvIOCtl_ResumeBuiltinKbd(void); 141 142 142 143 … … 1904 1905 } 1905 1906 1907 case SUP_CTL_CODE_NO_SIZE(SUP_IOCTL_RESUME_BUILTIN_KBD): 1908 { 1909 /* validate */ 1910 REQ_CHECK_SIZES(SUP_IOCTL_RESUME_BUILTIN_KBD); 1911 1912 pReqHdr->rc = supdrvIOCtl_ResumeBuiltinKbd(); 1913 return 0; 1914 } 1906 1915 1907 1916 default: … … 6140 6149 } 6141 6150 6151 /** 6152 * Resume built-in keyboard on MacBook Air and Pro hosts. 6153 * If there is no built-in keyboard device, return success anyway. 6154 * 6155 * @returns 0 on Mac OS X platform, VERR_NOT_IMPLEMENTED on the other ones. 6156 */ 6157 static int supdrvIOCtl_ResumeBuiltinKbd(void) 6158 { 6159 #if defined(RT_OS_DARWIN) 6160 return supdrvDarwinResumeBuiltinKbd(); 6161 #else 6162 return VERR_NOT_IMPLEMENTED; 6163 #endif 6164 } 6165 -
trunk/src/VBox/HostDrivers/Support/SUPDrvIOC.h
r49634 r49787 194 194 * - Remove RTSpinlockReleaseNoInts. 195 195 */ 196 #define SUPDRV_IOC_VERSION 0x001a000 6196 #define SUPDRV_IOC_VERSION 0x001a0007 197 197 198 198 /** SUP_IOCTL_COOKIE. */ … … 1438 1438 /** @} */ 1439 1439 1440 /** @name SUP_IOCTL_RESUME_BUILTIN_KBD 1441 * Resume built-in keyboard (make sense on MacBook Air/Pro hosts only). 1442 * 1443 * @{ 1444 */ 1445 #define SUP_IOCTL_RESUME_BUILTIN_KBD SUP_CTL_CODE_SIZE(35, SUP_IOCTL_RESUME_BUILTIN_KBD_SIZE) 1446 #define SUP_IOCTL_RESUME_BUILTIN_KBD_SIZE sizeof(SUPREQHDR) 1447 #define SUP_IOCTL_RESUME_BUILTIN_KBD_SIZE_IN sizeof(SUPREQHDR) 1448 #define SUP_IOCTL_RESUME_BUILTIN_KBD_SIZE_OUT sizeof(SUPREQHDR) 1449 /** @} */ 1450 1440 1451 1441 1452 #pragma pack() /* paranoia */ -
trunk/src/VBox/HostDrivers/Support/SUPDrvInternal.h
r49634 r49787 749 749 #endif /* SUPDRV_WITH_MSR_PROBER */ 750 750 751 #if defined(RT_OS_DARWIN) 752 int VBOXCALL supdrvDarwinResumeBuiltinKbd(void); 753 #endif 751 754 752 755 /******************************************************************************* -
trunk/src/VBox/HostDrivers/Support/SUPLib.cpp
r49634 r49787 2133 2133 } 2134 2134 2135 2136 SUPR3DECL(int) SUPR3ResumeBuiltinKeyboard(void) 2137 { 2138 #ifdef RT_OS_DARWIN 2139 /* 2140 * Issue IOCtl to the SUPDRV kernel module. 2141 */ 2142 SUPREQHDR Req; 2143 Req.u32Cookie = g_u32Cookie; 2144 Req.u32SessionCookie= g_u32SessionCookie; 2145 Req.cbIn = SUP_IOCTL_RESUME_BUILTIN_KBD_SIZE_IN; 2146 Req.cbOut = SUP_IOCTL_RESUME_BUILTIN_KBD_SIZE_OUT; 2147 Req.fFlags = SUPREQHDR_FLAGS_DEFAULT; 2148 Req.rc = VERR_INTERNAL_ERROR; 2149 int rc = suplibOsIOCtl(&g_supLibData, SUP_IOCTL_RESUME_BUILTIN_KBD, &Req, SUP_IOCTL_RESUME_BUILTIN_KBD_SIZE); 2150 if (RT_SUCCESS(rc)) 2151 rc = Req.rc; 2152 return rc; 2153 #else /* !RT_OS_DARWIN */ 2154 return VERR_NOT_SUPPORTED; 2155 #endif 2156 } 2157 -
trunk/src/VBox/HostDrivers/Support/darwin/SUPDrv-darwin.cpp
r49767 r49787 67 67 #include <IOKit/pwr_mgt/RootDomain.h> 68 68 #include <IOKit/IODeviceTreeSupport.h> 69 #include <IOKit/usb/IOUSBHIDDriver.h> 69 70 70 71 #ifdef VBOX_WITH_HOST_VMX … … 1143 1144 1144 1145 1146 /** 1147 * Resume built-in keyboard on MacBook Air and Pro hosts. 1148 * If there is no built-in keyboard device, return success anyway. 1149 */ 1150 int VBOXCALL supdrvDarwinResumeBuiltinKbd(void) 1151 { 1152 /* 1153 * AppleUSBTCKeyboard KEXT is responsible for built-in keyboard management. 1154 * We resume keyboard by accessing to its IOService. */ 1155 OSDictionary *pDictionary = IOService::serviceMatching("AppleUSBTCKeyboard"); 1156 if (pDictionary) 1157 { 1158 OSIterator *pIter; 1159 IOUSBHIDDriver *pDriver; 1160 1161 pIter = IOService::getMatchingServices(pDictionary); 1162 if (pIter) 1163 { 1164 while ((pDriver = (IOUSBHIDDriver *)pIter->getNextObject())) 1165 pDriver->SuspendPort(false, 0); 1166 1167 pIter->release(); 1168 } 1169 pDictionary->release(); 1170 } 1171 1172 return 0; 1173 } 1174 1175 1145 1176 1146 1177 /**
Note:
See TracChangeset
for help on using the changeset viewer.