/*
- * Copyright (c) 1999-2000 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 1999-2016 Apple Inc. All rights reserved.
*
- * @APPLE_LICENSE_HEADER_START@
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
- * The contents of this file constitute Original Code as defined in and
- * are subject to the Apple Public Source License Version 1.1 (the
- * "License"). You may not use this file except in compliance with the
- * License. Please obtain a copy of the License at
- * http://www.apple.com/publicsource and read it before using this file.
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apple Public Source License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. The rights granted to you under the License
+ * may not be used to create, or enable the creation or redistribution of,
+ * unlawful or unlicensed copies of an Apple operating system, or to
+ * circumvent, violate, or enable the circumvention or violation of, any
+ * terms of an Apple operating system software license agreement.
*
- * This Original Code and all software distributed under the License are
- * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * Please obtain a copy of the License at
+ * http://www.opensource.apple.com/apsl/ and read it before using this file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
- * License for the specific language governing rights and limitations
- * under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
*
- * @APPLE_LICENSE_HEADER_END@
- */
-/*
- * Copyright (c) 1999-2000 Apple Computer, Inc. All rights reserved.
- *
- * DRI: Josh de Cesare
- *
+ * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
*/
extern "C" {
#include <machine/machine_routines.h>
#include <pexpert/pexpert.h>
+#include <kern/cpu_number.h>
}
+#include <machine/machine_routines.h>
+
#include <IOKit/IOLib.h>
#include <IOKit/IOPlatformExpert.h>
+#include <IOKit/pwr_mgt/RootDomain.h>
+#include <IOKit/pwr_mgt/IOPMPrivate.h>
#include <IOKit/IOUserClient.h>
+#include <IOKit/IOKitKeysPrivate.h>
#include <IOKit/IOCPU.h>
+#include "IOKitKernelInternal.h"
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+#include <kern/queue.h>
+
+extern "C" void console_suspend();
+extern "C" void console_resume();
+
+typedef kern_return_t (*iocpu_platform_action_t)(void * refcon0, void * refcon1, uint32_t priority,
+ void * param1, void * param2, void * param3,
+ const char * name);
+
+struct iocpu_platform_action_entry
+{
+ queue_chain_t link;
+ iocpu_platform_action_t action;
+ int32_t priority;
+ const char * name;
+ void * refcon0;
+ void * refcon1;
+ struct iocpu_platform_action_entry * alloc_list;
+};
+typedef struct iocpu_platform_action_entry iocpu_platform_action_entry_t;
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+#define kBootCPUNumber 0
+
+enum
+{
+ kQueueSleep = 0,
+ kQueueWake = 1,
+ kQueueQuiesce = 2,
+ kQueueActive = 3,
+ kQueueHaltRestart = 4,
+ kQueuePanic = 5,
+ kQueueCount = 6
+};
+
+const OSSymbol * gIOPlatformSleepActionKey;
+const OSSymbol * gIOPlatformWakeActionKey;
+const OSSymbol * gIOPlatformQuiesceActionKey;
+const OSSymbol * gIOPlatformActiveActionKey;
+const OSSymbol * gIOPlatformHaltRestartActionKey;
+const OSSymbol * gIOPlatformPanicActionKey;
+
+static queue_head_t gActionQueues[kQueueCount];
+static const OSSymbol * gActionSymbols[kQueueCount];
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+static void
+iocpu_add_platform_action(queue_head_t * queue, iocpu_platform_action_entry_t * entry)
+{
+ iocpu_platform_action_entry_t * next;
+
+ queue_iterate(queue, next, iocpu_platform_action_entry_t *, link)
+ {
+ if (next->priority > entry->priority)
+ {
+ queue_insert_before(queue, entry, next, iocpu_platform_action_entry_t *, link);
+ return;
+ }
+ }
+ queue_enter(queue, entry, iocpu_platform_action_entry_t *, link); // at tail
+}
+
+static void
+iocpu_remove_platform_action(iocpu_platform_action_entry_t * entry)
+{
+ remque(&entry->link);
+}
+
+static kern_return_t
+iocpu_run_platform_actions(queue_head_t * queue, uint32_t first_priority, uint32_t last_priority,
+ void * param1, void * param2, void * param3)
+{
+ kern_return_t ret = KERN_SUCCESS;
+ kern_return_t result = KERN_SUCCESS;
+ iocpu_platform_action_entry_t * next;
+
+ queue_iterate(queue, next, iocpu_platform_action_entry_t *, link)
+ {
+ uint32_t pri = (next->priority < 0) ? -next->priority : next->priority;
+ if ((pri >= first_priority) && (pri <= last_priority))
+ {
+ //kprintf("[%p]", next->action);
+ ret = (*next->action)(next->refcon0, next->refcon1, pri, param1, param2, param3, next->name);
+ }
+ if (KERN_SUCCESS == result)
+ result = ret;
+ }
+ return (result);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+extern "C" kern_return_t
+IOCPURunPlatformQuiesceActions(void)
+{
+ return (iocpu_run_platform_actions(&gActionQueues[kQueueQuiesce], 0, 0U-1,
+ NULL, NULL, NULL));
+}
+
+extern "C" kern_return_t
+IOCPURunPlatformActiveActions(void)
+{
+ return (iocpu_run_platform_actions(&gActionQueues[kQueueActive], 0, 0U-1,
+ NULL, NULL, NULL));
+}
+
+extern "C" kern_return_t
+IOCPURunPlatformHaltRestartActions(uint32_t message)
+{
+ if (!gActionQueues[kQueueHaltRestart].next) return (kIOReturnNotReady);
+ return (iocpu_run_platform_actions(&gActionQueues[kQueueHaltRestart], 0, 0U-1,
+ (void *)(uintptr_t) message, NULL, NULL));
+}
+
+extern "C" kern_return_t
+IOCPURunPlatformPanicActions(uint32_t message)
+{
+ if (!gActionQueues[kQueuePanic].next) return (kIOReturnNotReady);
+ return (iocpu_run_platform_actions(&gActionQueues[kQueuePanic], 0, 0U-1,
+ (void *)(uintptr_t) message, NULL, NULL));
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+static kern_return_t
+IOServicePlatformAction(void * refcon0, void * refcon1, uint32_t priority,
+ void * param1, void * param2, void * param3,
+ const char * service_name)
+{
+ IOReturn ret;
+ IOService * service = (IOService *) refcon0;
+ const OSSymbol * function = (const OSSymbol *) refcon1;
+
+ kprintf("%s -> %s\n", function->getCStringNoCopy(), service_name);
+
+ ret = service->callPlatformFunction(function, false,
+ (void *)(uintptr_t) priority, param1, param2, param3);
+
+ return (ret);
+}
+
+static void
+IOInstallServicePlatformAction(IOService * service, uint32_t qidx)
+{
+ iocpu_platform_action_entry_t * entry;
+ OSNumber * num;
+ uint32_t priority;
+ const OSSymbol * key = gActionSymbols[qidx];
+ queue_head_t * queue = &gActionQueues[qidx];
+ bool reverse;
+ bool uniq;
+
+ num = OSDynamicCast(OSNumber, service->getProperty(key));
+ if (!num) return;
+
+ reverse = false;
+ uniq = false;
+ switch (qidx)
+ {
+ case kQueueWake:
+ case kQueueActive:
+ reverse = true;
+ break;
+ case kQueueHaltRestart:
+ case kQueuePanic:
+ uniq = true;
+ break;
+ }
+ if (uniq)
+ {
+ queue_iterate(queue, entry, iocpu_platform_action_entry_t *, link)
+ {
+ if (service == entry->refcon0) return;
+ }
+ }
+
+ entry = IONew(iocpu_platform_action_entry_t, 1);
+ entry->action = &IOServicePlatformAction;
+ entry->name = service->getName();
+ priority = num->unsigned32BitValue();
+ if (reverse)
+ entry->priority = -priority;
+ else
+ entry->priority = priority;
+ entry->refcon0 = service;
+ entry->refcon1 = (void *) key;
+
+ iocpu_add_platform_action(queue, entry);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+void
+IOCPUInitialize(void)
+{
+ for (uint32_t qidx = kQueueSleep; qidx < kQueueCount; qidx++)
+ {
+ queue_init(&gActionQueues[qidx]);
+ }
+
+ gIOPlatformSleepActionKey = gActionSymbols[kQueueSleep]
+ = OSSymbol::withCStringNoCopy(kIOPlatformSleepActionKey);
+ gIOPlatformWakeActionKey = gActionSymbols[kQueueWake]
+ = OSSymbol::withCStringNoCopy(kIOPlatformWakeActionKey);
+ gIOPlatformQuiesceActionKey = gActionSymbols[kQueueQuiesce]
+ = OSSymbol::withCStringNoCopy(kIOPlatformQuiesceActionKey);
+ gIOPlatformActiveActionKey = gActionSymbols[kQueueActive]
+ = OSSymbol::withCStringNoCopy(kIOPlatformActiveActionKey);
+ gIOPlatformHaltRestartActionKey = gActionSymbols[kQueueHaltRestart]
+ = OSSymbol::withCStringNoCopy(kIOPlatformHaltRestartActionKey);
+ gIOPlatformPanicActionKey = gActionSymbols[kQueuePanic]
+ = OSSymbol::withCStringNoCopy(kIOPlatformPanicActionKey);
+}
+
+IOReturn
+IOInstallServicePlatformActions(IOService * service)
+{
+ IOInstallServicePlatformAction(service, kQueueHaltRestart);
+ IOInstallServicePlatformAction(service, kQueuePanic);
+
+ return (kIOReturnSuccess);
+}
+
+IOReturn
+IORemoveServicePlatformActions(IOService * service)
+{
+ iocpu_platform_action_entry_t * entry;
+ iocpu_platform_action_entry_t * next;
+
+ for (uint32_t qidx = kQueueSleep; qidx < kQueueCount; qidx++)
+ {
+ next = (typeof(entry)) queue_first(&gActionQueues[qidx]);
+ while (!queue_end(&gActionQueues[qidx], &next->link))
+ {
+ entry = next;
+ next = (typeof(entry)) queue_next(&entry->link);
+ if (service == entry->refcon0)
+ {
+ iocpu_remove_platform_action(entry);
+ IODelete(entry, iocpu_platform_action_entry_t, 1);
+ }
+ }
+ }
+
+ return (kIOReturnSuccess);
+}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
if (sourceCPU && targetCPU) sourceCPU->signalCPU(targetCPU);
}
-void PE_cpu_machine_init(cpu_id_t target, boolean_t boot)
+void PE_cpu_signal_deferred(cpu_id_t source, cpu_id_t target)
+{
+ IOCPU *sourceCPU = OSDynamicCast(IOCPU, (OSObject *)source);
+ IOCPU *targetCPU = OSDynamicCast(IOCPU, (OSObject *)target);
+
+ if (sourceCPU && targetCPU) sourceCPU->signalCPUDeferred(targetCPU);
+}
+
+void PE_cpu_signal_cancel(cpu_id_t source, cpu_id_t target)
+{
+ IOCPU *sourceCPU = OSDynamicCast(IOCPU, (OSObject *)source);
+ IOCPU *targetCPU = OSDynamicCast(IOCPU, (OSObject *)target);
+
+ if (sourceCPU && targetCPU) sourceCPU->signalCPUCancel(targetCPU);
+}
+
+void PE_cpu_machine_init(cpu_id_t target, boolean_t bootb)
{
IOCPU *targetCPU = OSDynamicCast(IOCPU, (OSObject *)target);
- if (targetCPU) targetCPU->initCPU(boot);
+ if (targetCPU) targetCPU->initCPU(bootb);
}
void PE_cpu_machine_quiesce(cpu_id_t target)
{
IOCPU *targetCPU = OSDynamicCast(IOCPU, (OSObject *)target);
-
+
if (targetCPU) targetCPU->quiesceCPU();
}
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#define super IOService
void IOCPUSleepKernel(void)
{
- long cnt, numCPUs;
- IOCPU *target;
-
- numCPUs = gIOCPUs->getCount();
-
- // Sleep the CPUs.
- cnt = numCPUs;
- while (cnt--) {
- target = OSDynamicCast(IOCPU, gIOCPUs->getObject(cnt));
- if (target->getCPUState() == kIOCPUStateRunning) {
- target->haltCPU();
+ long cnt, numCPUs;
+ IOCPU *target;
+ IOCPU *bootCPU = NULL;
+ IOPMrootDomain *rootDomain = IOService::getPMRootDomain();
+
+ kprintf("IOCPUSleepKernel\n");
+
+ IORegistryIterator * iter;
+ OSOrderedSet * all;
+ IOService * service;
+
+ rootDomain->tracePoint( kIOPMTracePointSleepPlatformActions );
+
+ iter = IORegistryIterator::iterateOver( gIOServicePlane,
+ kIORegistryIterateRecursively );
+ if( iter)
+ {
+ all = 0;
+ do
+ {
+ if (all)
+ all->release();
+ all = iter->iterateAll();
+ }
+ while (!iter->isValid());
+ iter->release();
+
+ if (all)
+ {
+ while((service = (IOService *) all->getFirstObject()))
+ {
+ for (uint32_t qidx = kQueueSleep; qidx <= kQueueActive; qidx++)
+ {
+ IOInstallServicePlatformAction(service, qidx);
+ }
+ all->removeObject(service);
+ }
+ all->release();
+ }
}
- }
-
- // Wake the other CPUs.
- for (cnt = 1; cnt < numCPUs; cnt++) {
- target = OSDynamicCast(IOCPU, gIOCPUs->getObject(cnt));
- if (target->getCPUState() == kIOCPUStateStopped) {
- processor_start(target->getMachProcessor());
+
+ iocpu_run_platform_actions(&gActionQueues[kQueueSleep], 0, 0U-1,
+ NULL, NULL, NULL);
+
+ rootDomain->tracePoint( kIOPMTracePointSleepCPUs );
+
+ numCPUs = gIOCPUs->getCount();
+ // Sleep the CPUs.
+ cnt = numCPUs;
+ while (cnt--)
+ {
+ target = OSDynamicCast(IOCPU, gIOCPUs->getObject(cnt));
+
+ // We make certain that the bootCPU is the last to sleep
+ // We'll skip it for now, and halt it after finishing the
+ // non-boot CPU's.
+ if (target->getCPUNumber() == kBootCPUNumber)
+ {
+ bootCPU = target;
+ } else if (target->getCPUState() == kIOCPUStateRunning)
+ {
+ target->haltCPU();
+ }
+ }
+
+ assert(bootCPU != NULL);
+ assert(cpu_number() == 0);
+
+ console_suspend();
+
+ rootDomain->tracePoint( kIOPMTracePointSleepPlatformDriver );
+
+ // Now sleep the boot CPU.
+ bootCPU->haltCPU();
+
+ rootDomain->tracePoint( kIOPMTracePointWakePlatformActions );
+
+ console_resume();
+
+ iocpu_run_platform_actions(&gActionQueues[kQueueWake], 0, 0U-1,
+ NULL, NULL, NULL);
+
+ iocpu_platform_action_entry_t * entry;
+ for (uint32_t qidx = kQueueSleep; qidx <= kQueueActive; qidx++)
+ {
+ while (!(queue_empty(&gActionQueues[qidx])))
+ {
+ entry = (typeof(entry)) queue_first(&gActionQueues[qidx]);
+ iocpu_remove_platform_action(entry);
+ IODelete(entry, iocpu_platform_action_entry_t, 1);
+ }
+ }
+
+ rootDomain->tracePoint( kIOPMTracePointWakeCPUs );
+
+ // Wake the other CPUs.
+ for (cnt = 0; cnt < numCPUs; cnt++)
+ {
+ target = OSDynamicCast(IOCPU, gIOCPUs->getObject(cnt));
+
+ // Skip the already-woken boot CPU.
+ if ((target->getCPUNumber() != kBootCPUNumber)
+ && (target->getCPUState() == kIOCPUStateStopped))
+ {
+ processor_start(target->getMachProcessor());
+ }
}
- }
}
void IOCPU::initCPUs(void)
gIOCPUs->setObject(this);
- // Correct the bus, cpu and dec frequencies in the device tree.
- busFrequency = OSData::withBytesNoCopy((void *)&gPEClockFrequencyInfo.bus_clock_rate_hz, 4);
- cpuFrequency = OSData::withBytesNoCopy((void *)&gPEClockFrequencyInfo.cpu_clock_rate_hz, 4);
- timebaseFrequency = OSData::withBytesNoCopy((void *)&gPEClockFrequencyInfo.timebase_frequency_hz, 4);
+ // Correct the bus, cpu and timebase frequencies in the device tree.
+ if (gPEClockFrequencyInfo.bus_frequency_hz < 0x100000000ULL) {
+ busFrequency = OSData::withBytesNoCopy((void *)&gPEClockFrequencyInfo.bus_clock_rate_hz, 4);
+ } else {
+ busFrequency = OSData::withBytesNoCopy((void *)&gPEClockFrequencyInfo.bus_frequency_hz, 8);
+ }
provider->setProperty("bus-frequency", busFrequency);
- provider->setProperty("clock-frequency", cpuFrequency);
- provider->setProperty("timebase-frequency", timebaseFrequency);
busFrequency->release();
+
+ if (gPEClockFrequencyInfo.cpu_frequency_hz < 0x100000000ULL) {
+ cpuFrequency = OSData::withBytesNoCopy((void *)&gPEClockFrequencyInfo.cpu_clock_rate_hz, 4);
+ } else {
+ cpuFrequency = OSData::withBytesNoCopy((void *)&gPEClockFrequencyInfo.cpu_frequency_hz, 8);
+ }
+ provider->setProperty("clock-frequency", cpuFrequency);
cpuFrequency->release();
+
+ timebaseFrequency = OSData::withBytesNoCopy((void *)&gPEClockFrequencyInfo.timebase_frequency_hz, 4);
+ provider->setProperty("timebase-frequency", timebaseFrequency);
timebaseFrequency->release();
- setProperty("IOCPUID", (UInt32)this, 32);
+ super::setProperty("IOCPUID", getRegistryEntryID(), sizeof(uint64_t)*8);
setCPUNumber(0);
setCPUState(kIOCPUStateUnregistered);
return true;
}
+OSObject *IOCPU::getProperty(const OSSymbol *aKey) const
+{
+ if (aKey == gIOCPUStateKey) return gIOCPUStateNames[_cpuState];
+
+ return super::getProperty(aKey);
+}
+
+bool IOCPU::setProperty(const OSSymbol *aKey, OSObject *anObject)
+{
+ if (aKey == gIOCPUStateKey) {
+ return false;
+ }
+
+ return super::setProperty(aKey, anObject);
+}
+
+bool IOCPU::serializeProperties(OSSerialize *serialize) const
+{
+ bool result;
+ OSDictionary *dict = dictionaryWithProperties();
+ if (!dict) return false;
+ dict->setObject(gIOCPUStateKey, gIOCPUStateNames[_cpuState]);
+ result = dict->serialize(serialize);
+ dict->release();
+ return result;
+}
+
IOReturn IOCPU::setProperties(OSObject *properties)
{
OSDictionary *dict = OSDynamicCast(OSDictionary, properties);
OSString *stateStr;
+ IOReturn result;
if (dict == 0) return kIOReturnUnsupported;
stateStr = OSDynamicCast(OSString, dict->getObject(gIOCPUStateKey));
if (stateStr != 0) {
- if (!IOUserClient::clientHasPrivilege(current_task(), "root"))
- return kIOReturnNotPrivileged;
+ result = IOUserClient::clientHasPrivilege(current_task(), kIOClientPrivilegeAdministrator);
+ if (result != kIOReturnSuccess) return result;
- if (_cpuNumber == 0) return kIOReturnUnsupported;
+ if (setProperty(gIOCPUStateKey, stateStr)) return kIOReturnSuccess;
- if (stateStr->isEqualTo("running")) {
- if (_cpuState == kIOCPUStateStopped) {
- processor_start(machProcessor);
- } else if (_cpuState != kIOCPUStateRunning) {
- return kIOReturnUnsupported;
- }
- } else if (stateStr->isEqualTo("stopped")) {
- if (_cpuState == kIOCPUStateRunning) {
- haltCPU();
- } else if (_cpuState != kIOCPUStateStopped) {
- return kIOReturnUnsupported;
- }
- } else return kIOReturnUnsupported;
-
- return kIOReturnSuccess;
+ return kIOReturnUnsupported;
}
return kIOReturnUnsupported;
{
}
+void IOCPU::signalCPUDeferred(IOCPU *target)
+{
+ // Our CPU may not support deferred IPIs,
+ // so send a regular IPI by default
+ signalCPU(target);
+}
+
+void IOCPU::signalCPUCancel(IOCPU */*target*/)
+{
+ // Meant to cancel signals sent by
+ // signalCPUDeferred; unsupported
+ // by default
+}
+
void IOCPU::enableCPUTimeBase(bool /*enable*/)
{
}
void IOCPU::setCPUNumber(UInt32 cpuNumber)
{
_cpuNumber = cpuNumber;
- setProperty("IOCPUNumber", _cpuNumber, 32);
+ super::setProperty("IOCPUNumber", _cpuNumber, 32);
}
UInt32 IOCPU::getCPUState(void)
void IOCPU::setCPUState(UInt32 cpuState)
{
- if ((cpuState >= 0) && (cpuState < kIOCPUStateCount)) {
+ if (cpuState < kIOCPUStateCount) {
_cpuState = cpuState;
- setProperty(gIOCPUStateKey, gIOCPUStateNames[cpuState]);
}
}
}
}
+ ml_init_max_cpus(numCPUs);
+
return kIOReturnSuccess;
}
OSData *tmpData;
long tmpLong;
+ if ((service->getProperty(gIOInterruptControllersKey) != 0) &&
+ (service->getProperty(gIOInterruptSpecifiersKey) != 0))
+ return;
+
// Create the interrupt specifer array.
specifier = OSArray::withCapacity(numCPUs);
for (cnt = 0; cnt < numCPUs; cnt++) {
void IOCPUInterruptController::enableCPUInterrupt(IOCPU *cpu)
{
- ml_install_interrupt_handler(cpu, cpu->getCPUNumber(), this,
- (IOInterruptHandler)&IOCPUInterruptController::handleInterrupt, 0);
-
- enabledCPUs++;
-
- if (enabledCPUs == numCPUs) thread_wakeup(this);
+ IOInterruptHandler handler = OSMemberFunctionCast(
+ IOInterruptHandler, this, &IOCPUInterruptController::handleInterrupt);
+
+ ml_install_interrupt_handler(cpu, cpu->getCPUNumber(), this, handler, 0);
+
+ // Ensure that the increment is seen by all processors
+ OSIncrementAtomic(&enabledCPUs);
+
+ if (enabledCPUs == numCPUs) {
+ IOService::cpusRunning();
+ thread_wakeup(this);
+ }
}
IOReturn IOCPUInterruptController::registerInterrupt(IOService *nub,