xref: /freebsd/sys/dev/dcons/dcons_os.h (revision 2ff63af9b88c7413b7d71715b5532625752a248e)
1098ca2bdSWarner Losh /*-
2df57947fSPedro F. Giffuni  * SPDX-License-Identifier: BSD-4-Clause
3df57947fSPedro F. Giffuni  *
431a58777SHidetoshi Shimokawa  * Copyright (C) 2002-2004
531a58777SHidetoshi Shimokawa  * 	Hidetoshi Shimokawa. All rights reserved.
631a58777SHidetoshi Shimokawa  *
731a58777SHidetoshi Shimokawa  * Redistribution and use in source and binary forms, with or without
831a58777SHidetoshi Shimokawa  * modification, are permitted provided that the following conditions
931a58777SHidetoshi Shimokawa  * are met:
1031a58777SHidetoshi Shimokawa  * 1. Redistributions of source code must retain the above copyright
1131a58777SHidetoshi Shimokawa  *    notice, this list of conditions and the following disclaimer.
1231a58777SHidetoshi Shimokawa  * 2. Redistributions in binary form must reproduce the above copyright
1331a58777SHidetoshi Shimokawa  *    notice, this list of conditions and the following disclaimer in the
1431a58777SHidetoshi Shimokawa  *    documentation and/or other materials provided with the distribution.
1531a58777SHidetoshi Shimokawa  * 3. All advertising materials mentioning features or use of this software
1631a58777SHidetoshi Shimokawa  *    must display the following acknowledgement:
1731a58777SHidetoshi Shimokawa  *
1831a58777SHidetoshi Shimokawa  *	This product includes software developed by Hidetoshi Shimokawa.
1931a58777SHidetoshi Shimokawa  *
2031a58777SHidetoshi Shimokawa  * 4. Neither the name of the author nor the names of its contributors
2131a58777SHidetoshi Shimokawa  *    may be used to endorse or promote products derived from this software
2231a58777SHidetoshi Shimokawa  *    without specific prior written permission.
2331a58777SHidetoshi Shimokawa  *
2431a58777SHidetoshi Shimokawa  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2531a58777SHidetoshi Shimokawa  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2631a58777SHidetoshi Shimokawa  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2731a58777SHidetoshi Shimokawa  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2831a58777SHidetoshi Shimokawa  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2931a58777SHidetoshi Shimokawa  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3031a58777SHidetoshi Shimokawa  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3131a58777SHidetoshi Shimokawa  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3231a58777SHidetoshi Shimokawa  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3331a58777SHidetoshi Shimokawa  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3431a58777SHidetoshi Shimokawa  * SUCH DAMAGE.
3531a58777SHidetoshi Shimokawa  *
3631a58777SHidetoshi Shimokawa  */
3731a58777SHidetoshi Shimokawa 
38*e2e050c8SConrad Meyer #include <sys/_eventhandler.h>
39*e2e050c8SConrad Meyer 
409953c34cSHidetoshi Shimokawa typedef void (*dcons_poll_fn)(void *, int);
419953c34cSHidetoshi Shimokawa EVENTHANDLER_DECLARE(dcons_poll, dcons_poll_fn);
429953c34cSHidetoshi Shimokawa 
4331a58777SHidetoshi Shimokawa struct dcons_global {
4431a58777SHidetoshi Shimokawa 	struct consdev *cdev;
4531a58777SHidetoshi Shimokawa 	struct dcons_buf *buf;
4631a58777SHidetoshi Shimokawa 	size_t size;
4731a58777SHidetoshi Shimokawa 	bus_dma_tag_t dma_tag;
4831a58777SHidetoshi Shimokawa 	bus_dmamap_t dma_map;
4931a58777SHidetoshi Shimokawa };
5031a58777SHidetoshi Shimokawa extern struct dcons_global *dcons_conf;
51