4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
22 * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 #include <sys/promif.h>
27 #include <sys/promimpl.h>
30 * Provide 10 millisecond heartbeat for the PROM. A client that has taken over
31 * the trap table and clock interrupts, but is not quite ready to take over the
32 * function of polling the input-device for an abort sequence (L1/A or BREAK)
33 * may use this function to instruct the PROM to poll the keyboard. If used,
34 * this function should be called every 10 milliseconds.
37 prom_heartbeat(int msecs
)
41 ci
[0] = p1275_ptr2cell("SUNW,heartbeat"); /* Service name */
42 ci
[1] = (cell_t
)1; /* #argument cells */
43 ci
[2] = (cell_t
)1; /* #result cells */
44 ci
[3] = p1275_int2cell(msecs
); /* Arg1: msecs */
45 ci
[4] = (cell_t
)0; /* Prime the result */
48 (void) p1275_cif_handler(&ci
);
51 return (p1275_cell2int(ci
[4])); /* Res1: abort-flag */