1*e93d43b4Smaxv /* $NetBSD: pio.h,v 1.10 2019/11/15 09:03:26 maxv Exp $ */ 28375b2d9Sfvdl 38375b2d9Sfvdl /*- 48375b2d9Sfvdl * Copyright (c) 1998 The NetBSD Foundation, Inc. 58375b2d9Sfvdl * All rights reserved. 68375b2d9Sfvdl * 78375b2d9Sfvdl * This code is derived from software contributed to The NetBSD Foundation 88375b2d9Sfvdl * by Charles M. Hannum. 98375b2d9Sfvdl * 108375b2d9Sfvdl * Redistribution and use in source and binary forms, with or without 118375b2d9Sfvdl * modification, are permitted provided that the following conditions 128375b2d9Sfvdl * are met: 138375b2d9Sfvdl * 1. Redistributions of source code must retain the above copyright 148375b2d9Sfvdl * notice, this list of conditions and the following disclaimer. 158375b2d9Sfvdl * 2. Redistributions in binary form must reproduce the above copyright 168375b2d9Sfvdl * notice, this list of conditions and the following disclaimer in the 178375b2d9Sfvdl * documentation and/or other materials provided with the distribution. 188375b2d9Sfvdl * 198375b2d9Sfvdl * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 208375b2d9Sfvdl * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 218375b2d9Sfvdl * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 228375b2d9Sfvdl * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 238375b2d9Sfvdl * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 248375b2d9Sfvdl * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 258375b2d9Sfvdl * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 268375b2d9Sfvdl * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 278375b2d9Sfvdl * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 288375b2d9Sfvdl * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 298375b2d9Sfvdl * POSSIBILITY OF SUCH DAMAGE. 308375b2d9Sfvdl */ 318375b2d9Sfvdl 328375b2d9Sfvdl #ifndef _X86_PIO_H_ 338375b2d9Sfvdl #define _X86_PIO_H_ 348375b2d9Sfvdl 358375b2d9Sfvdl /* 368375b2d9Sfvdl * Functions to provide access to x86 programmed I/O instructions. 378375b2d9Sfvdl */ 388375b2d9Sfvdl 3983b36637Schristos uint8_t inb(unsigned); 409c412e0cSad uint16_t inw(unsigned); 419c412e0cSad uint32_t inl(unsigned); 428375b2d9Sfvdl 439c412e0cSad void outb(unsigned, uint8_t); 449c412e0cSad void outw(unsigned, uint16_t); 459c412e0cSad void outl(unsigned, uint32_t); 468375b2d9Sfvdl 478375b2d9Sfvdl #endif /* _X86_PIO_H_ */ 48