/* * IBM ASM Service Processor Device Driver * * Copyright (C) IBM Corporation, 2004 * * Author: Max Asböck <amax@us.ibm.com> * * This driver is based on code originally written by Pete Reynolds * and others.
*/
/* * The ASM device driver does the following things: * * 1) When loaded it sends a message to the service processor, * indicating that an OS is * running. This causes the service processor * to send periodic heartbeats to the OS. * * 2) Answers the periodic heartbeats sent by the service processor. * Failure to do so would result in system reboot. * * 3) Acts as a pass through for dot commands sent from user applications. * The interface for this is the ibmasmfs file system. * * 4) Allows user applications to register for event notification. Events * are sent to the driver through interrupts. They can be read from user * space through the ibmasmfs file system. * * 5) Allows user space applications to send heartbeats to the service * processor (aka reverse heartbeats). Again this happens through ibmasmfs. * * 6) Handles remote mouse and keyboard event interrupts and makes them * available to user applications through ibmasmfs. *
*/
result = ibmasm_event_buffer_init(sp); if (result) {
dev_err(sp->dev, "Failed to allocate event buffer\n"); goto error_eventbuffer;
}
result = ibmasm_heartbeat_init(sp); if (result) {
dev_err(sp->dev, "Failed to allocate heartbeat command\n"); goto error_heartbeat;
}
sp->irq = pdev->irq;
sp->base_address = pci_ioremap_bar(pdev, 0); if (!sp->base_address) {
dev_err(sp->dev, "Failed to ioremap pci memory\n");
result = -ENODEV; goto error_ioremap;
}
result = request_irq(sp->irq, ibmasm_interrupt_handler, IRQF_SHARED, sp->devname, (void*)sp); if (result) {
dev_err(sp->dev, "Failed to register interrupt handler\n"); goto error_request_irq;
}
enable_sp_interrupts(sp->base_address);
result = ibmasm_init_remote_input_dev(sp); if (result) {
dev_err(sp->dev, "Failed to initialize remote queue\n"); goto error_init_remote;
}
result = ibmasm_send_driver_vpd(sp); if (result) {
dev_err(sp->dev, "Failed to send driver VPD to service processor\n"); goto error_send_message;
}
result = ibmasm_send_os_state(sp, SYSTEM_STATE_OS_UP); if (result) {
dev_err(sp->dev, "Failed to send OS state to service processor\n"); goto error_send_message;
}
ibmasmfs_add_sp(sp);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.