ddi_isa.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_DDI_ISA_H
#define _SYS_DDI_ISA_H
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/isa_defs.h>
#include <sys/dditypes.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _KERNEL
/*
* These are the data access functions which the platform
* can choose to define as functions or macro's.
*/
/*
* DDI interfaces defined as macro's
*/
/*
* DDI interfaces defined as functions
*/
#ifdef __STDC__
#ifdef _LP64
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
#else /* _ILP32 */
#define ddi_mem_get8 ddi_mem_getb
#define ddi_mem_get16 ddi_mem_getw
#define ddi_mem_get32 ddi_mem_getl
#define ddi_mem_get64 ddi_mem_getll
void
#define ddi_mem_rep_get8 ddi_mem_rep_getb
void
#define ddi_mem_rep_get16 ddi_mem_rep_getw
void
#define ddi_mem_rep_get32 ddi_mem_rep_getl
void
#define ddi_mem_rep_get64 ddi_mem_rep_getll
void
#define ddi_mem_put8 ddi_mem_putb
void
#define ddi_mem_put16 ddi_mem_putw
void
#define ddi_mem_put32 ddi_mem_putl
void
#define ddi_mem_put64 ddi_mem_putll
void
#define ddi_mem_rep_put8 ddi_mem_rep_putb
void
#define ddi_mem_rep_put16 ddi_mem_rep_putw
void
#define ddi_mem_rep_put32 ddi_mem_rep_putl
void
#define ddi_mem_rep_put64 ddi_mem_rep_putll
#define ddi_io_get8 ddi_io_getb
#define ddi_io_get16 ddi_io_getw
#define ddi_io_get32 ddi_io_getl
void
#define ddi_io_rep_get8 ddi_io_rep_getb
void
#define ddi_io_rep_get16 ddi_io_rep_getw
void
#define ddi_io_rep_get32 ddi_io_rep_getl
void
#define ddi_io_put8 ddi_io_putb
void
#define ddi_io_put16 ddi_io_putw
void
#define ddi_io_put32 ddi_io_putl
void
#define ddi_io_rep_put8 ddi_io_rep_putb
void
#define ddi_io_rep_put16 ddi_io_rep_putw
void
#define ddi_io_rep_put32 ddi_io_rep_putl
#endif /* _LP64 */
/*
* ahi_acc_attr flags
*/
#define DDI_ACCATTR_CONFIG_SPACE 0x1
#define DDI_ACCATTR_IO_SPACE 0x2
#define DDI_ACCATTR_CPU_VADDR 0x4
#define DDI_ACCATTR_DIRECT 0x8
typedef struct ddi_acc_impl {
/*
* Input functions to memory mapped IO
*/
/*
* Output functions to memory mapped IO
*/
void
void
void
void
void
void
void
/*
* Repeated input functions for memory mapped IO
*/
void
void
void
void
void
void
void
/*
* Repeated output functions for memory mapped IO
*/
void
void
void
void
void
void
void
/*
* Input functions to IO space
*/
/*
* Output functions to IO space
*/
void
void
void
void
void
void
void
/*
* Repeated input functions for IO space
*/
void
void
void
void
void
void
void
void
/*
* Repeated output functions for IO space
*/
void
void
void
void
void
void
void
int
int
int
int
i_pci_getb(int b, int d, int f, int r);
i_pci_getw(int b, int d, int f, int r);
i_pci_getl(int b, int d, int f, int r);
void
i_pci_putb(int b, int d, int f, int r, uchar_t v);
void
i_pci_putw(int b, int d, int f, int r, ushort_t v);
void
i_pci_putl(int b, int d, int f, int r, ulong_t v);
/*
* Default fault-checking and notification functions
*/
int
void
#endif /* __STDC__ */
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_DDI_ISA_H */