Redirect a few includes to x86/foo.h

This commit is contained in:
fvdl 2003-02-26 21:29:34 +00:00
parent a33bcafdf1
commit 1fe3d0e71c
16 changed files with 44 additions and 1855 deletions

View File

@ -1,15 +1,3 @@
/* $NetBSD: aout_machdep.h,v 1.1 2001/06/19 00:20:09 fvdl Exp $ */
/* $NetBSD: aout_machdep.h,v 1.2 2003/02/26 21:29:34 fvdl Exp $ */
#ifndef _X86_64_AOUT_H_
#define _X86_64_AOUT_H
/*
* Only needed for 32 bit binaries in compatibility mode.
*/
#ifdef _KERNEL
#include <i386/include/aout_machdep.h>
#else
#include <i386/aout_machdep.h>
#endif
#endif /* _X86_64_AOUT_H */
#include <x86/aout_machdep.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: asm.h,v 1.2 2002/06/05 19:17:34 fvdl Exp $ */
/* $NetBSD: asm.h,v 1.3 2003/02/26 21:29:34 fvdl Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -52,6 +52,8 @@
# define _C_LABEL(x) x
#define _ASM_LABEL(x) x
#define CVAR(x) x(%rip)
#ifdef __STDC__
# define __CONCAT(x,y) x ## y
# define __STRING(x) #x

View File

@ -1,12 +1,3 @@
/* $NetBSD: bios32.h,v 1.1 2001/06/19 00:20:09 fvdl Exp $ */
/* $NetBSD: bios32.h,v 1.2 2003/02/26 21:29:34 fvdl Exp $ */
/*
* XXXfvdl paddr_t, etc, isn't right in bios32 structures, use explicit
* sizes
*/
#ifdef _KERNEL
#include <i386/include/bios32.h>
#else
#include <i386/bios32.h>
#endif
#include <x86/bios32.h>

View File

@ -1,16 +1,10 @@
/* $NetBSD: bootinfo.h,v 1.1 2001/06/19 00:20:10 fvdl Exp $ */
/* $NetBSD: bootinfo.h,v 1.2 2003/02/26 21:29:34 fvdl Exp $ */
#ifndef _X86_64_BOOTINFO_H_
#define _X86_64_BOOTINFO_H_
/*
* Only the plain i386 info for now, could add more later, but that depends
* on the eventual architecture of the systems.
*/
#ifdef _KERNEL
#include <i386/include/bootinfo.h>
#else
#include <i386/bootinfo.h>
#endif
#ifndef _X86_64_BOOTINFO_H
#define _X86_64_BOOTINFO_H
#include <x86/bootinfo.h>
#define VAR32_SIZE 4096
#endif /* _X86_64_BOOTINFO_H_ */

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +1,3 @@
/* $NetBSD: float.h,v 1.1 2001/06/19 00:20:10 fvdl Exp $ */
/* $NetBSD: float.h,v 1.2 2003/02/26 21:29:35 fvdl Exp $ */
#ifndef _X86_64_FLOAT_H_
#define _X86_64_FLOAT_H_
#ifdef _KERNEL
#include <i386/include/float.h>
#else
#include <i386/float.h>
#endif
#endif /* _X86_64_FLOAT_H_ */
#include <x86/float.h>

View File

@ -1,7 +1,3 @@
/* $NetBSD: ieee.h,v 1.1 2001/06/19 00:20:11 fvdl Exp $ */
/* $NetBSD: ieee.h,v 1.2 2003/02/26 21:29:35 fvdl Exp $ */
#ifdef _KERNEL
#include <i386/include/ieee.h>
#else
#include <i386/ieee.h>
#endif
#include <x86/ieee.h>

View File

@ -1,12 +1,3 @@
/* $NetBSD: ieeefp.h,v 1.1 2001/06/19 00:20:11 fvdl Exp $ */
/* $NetBSD: ieeefp.h,v 1.2 2003/02/26 21:29:35 fvdl Exp $ */
#ifndef _X86_64_IEEEFP_H_
#define _X86_64_IEEEFP_H_
#ifdef _KERNEL
#include <i386/include/ieeefp.h>
#else
#include <i386/ieeefp.h>
#endif
#endif /* _X86_64_IEEEFP_H_ */
#include <x86/ieeefp.h>

View File

@ -1,176 +1,3 @@
/* $NetBSD: intr.h,v 1.4 2002/12/03 22:03:01 fvdl Exp $ */
/* $NetBSD: intr.h,v 1.5 2003/02/26 21:29:35 fvdl Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by Charles M. Hannum.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the NetBSD
* Foundation, Inc. and its contributors.
* 4. Neither the name of The NetBSD Foundation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/*
* XXXfvdl copy of i386 right now. Might change later.
*/
#ifndef _X86_64_INTR_H_
#define _X86_64_INTR_H_
/* Interrupt priority `levels'. */
#define IPL_NONE 9 /* nothing */
#define IPL_SOFTCLOCK 8 /* timeouts */
#define IPL_SOFTNET 7 /* protocol stacks */
#define IPL_BIO 6 /* block I/O */
#define IPL_NET 5 /* network */
#define IPL_SOFTSERIAL 4 /* serial */
#define IPL_TTY 3 /* terminal */
#define IPL_IMP 3 /* memory allocation */
#define IPL_AUDIO 2 /* audio */
#define IPL_CLOCK 1 /* clock */
#define IPL_HIGH 1 /* everything */
#define IPL_SERIAL 0 /* serial */
#define NIPL 10
/* Interrupt sharing types. */
#define IST_NONE 0 /* none */
#define IST_PULSE 1 /* pulsed */
#define IST_EDGE 2 /* edge-triggered */
#define IST_LEVEL 3 /* level-triggered */
/* Soft interrupt masks. */
#define SIR_CLOCK 31
#define SIR_NET 30
#define SIR_SERIAL 29
/* Hack for CLKF_INTR(). */
#define IPL_TAGINTR 28
#define NUM_LEGACY_IRQS 16
#define ICU_OFFSET 32
#define IRQ_SLAVE 2
#ifndef _LOCORE
volatile int cpl, ipending, astpending;
int imask[NIPL];
extern void Xspllower __P((void));
static __inline int splraise __P((int));
static __inline void spllower __P((int));
static __inline void softintr __P((int));
#define __splbarrier() __asm __volatile("":::"memory")
/*
* Add a mask to cpl, and return the old value of cpl.
*/
static __inline int
splraise(ncpl)
register int ncpl;
{
register int ocpl = cpl;
cpl = ocpl | ncpl;
__splbarrier();
return (ocpl);
}
/*
* Restore a value to cpl (unmasking interrupts). If any unmasked
* interrupts are pending, call Xspllower() to process them.
*/
static __inline void
spllower(ncpl)
register int ncpl;
{
__splbarrier();
cpl = ncpl;
if (ipending & ~ncpl)
Xspllower();
}
/*
* Hardware interrupt masks
*/
#define splbio() splraise(imask[IPL_BIO])
#define splnet() splraise(imask[IPL_NET])
#define spltty() splraise(imask[IPL_TTY])
#define splaudio() splraise(imask[IPL_AUDIO])
#define splclock() splraise(imask[IPL_CLOCK])
#define splstatclock() splclock()
#define splserial() splraise(imask[IPL_SERIAL])
#define spllpt() spltty()
/*
* Software interrupt masks
*
* NOTE: splsoftclock() is used by hardclock() to lower the priority from
* clock to softclock before it calls softclock().
*/
#define spllowersoftclock() spllower(imask[IPL_SOFTCLOCK])
#define splsoftclock() splraise(imask[IPL_SOFTCLOCK])
#define splsoftnet() splraise(imask[IPL_SOFTNET])
#define splsoftserial() splraise(imask[IPL_SOFTSERIAL])
/*
* Miscellaneous
*/
#define splimp() splraise(imask[IPL_IMP])
#define splvm() splraise(imask[IPL_IMP])
#define splhigh() splraise(imask[IPL_HIGH])
#define splipi() splhigh()
#define splsched() splhigh()
#define spllock() splhigh()
#define spl0() spllower(0)
#define splx(x) spllower(x)
/*
* Software interrupt registration
*
* We hand-code this to ensure that it's atomic.
*/
static __inline void
softintr(mask)
register int mask;
{
__asm __volatile("orl %1, %0" : "=m"(ipending) : "ir" (1 << mask));
}
#define setsoftast() (astpending = 1)
#define setsoftclock() softintr(SIR_CLOCK)
#define setsoftnet() softintr(SIR_NET)
#define setsoftserial() softintr(SIR_SERIAL)
#endif /* !_LOCORE */
#endif /* !_X86_64INTR_H_ */
#include <x86/intr.h>

View File

@ -1,7 +1,3 @@
/* $NetBSD: mtrr.h,v 1.1 2002/06/18 08:31:42 fvdl Exp $ */
/* $NetBSD: mtrr.h,v 1.2 2003/02/26 21:29:35 fvdl Exp $ */
#ifdef _KERNEL
#include <i386/include/mtrr.h>
#else
#include <i386/mtrr.h>
#endif
#include <x86/mtrr.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: param.h,v 1.4 2002/12/10 17:57:19 fvdl Exp $ */
/* $NetBSD: param.h,v 1.5 2003/02/26 21:29:35 fvdl Exp $ */
#ifdef _KERNEL
#ifdef _LOCORE
@ -135,17 +135,16 @@
/*
* Mach derived conversion macros
*/
#define x86_64_round_pdr(x) \
#define x86_round_pdr(x) \
((((unsigned long)(x)) + (NBPD_L2 - 1)) & ~(NBPD_L2 - 1))
#define x86_64_trunc_pdr(x) ((unsigned long)(x) & ~(NBPD_L2 - 1))
#define x86_64_btod(x) ((unsigned long)(x) >> L2_SHIFT)
#define x86_64_dtob(x) ((unsigned long)(x) << L2_SHIFT)
#define x86_64_round_page(x) ((((unsigned long)(x)) + PGOFSET) & ~PGOFSET)
#define x86_64_trunc_page(x) ((unsigned long)(x) & ~PGOFSET)
#define x86_64_btop(x) ((unsigned long)(x) >> PGSHIFT)
#define x86_64_ptob(x) ((unsigned long)(x) << PGSHIFT)
#define x86_trunc_pdr(x) ((unsigned long)(x) & ~(NBPD_L2 - 1))
#define x86_btod(x) ((unsigned long)(x) >> L2_SHIFT)
#define x86_dtob(x) ((unsigned long)(x) << L2_SHIFT)
#define x86_round_page(x) ((((unsigned long)(x)) + PGOFSET) & ~PGOFSET)
#define x86_trunc_page(x) ((unsigned long)(x) & ~PGOFSET)
#define x86_btop(x) ((unsigned long)(x) >> PGSHIFT)
#define x86_ptob(x) ((unsigned long)(x) << PGSHIFT)
#define btop(x) x86_64_btop(x)
#define ptob(x) x86_64_ptob(x)
#define x86_trunc_page(x) x86_64_trunc_page(x)
#define round_pdr(x) x86_64_round_pdr(x)

View File

@ -1,112 +1,3 @@
/* $NetBSD: pci_machdep.h,v 1.2 2002/05/15 19:23:57 thorpej Exp $ */
/* $NetBSD: pci_machdep.h,v 1.3 2003/02/26 21:29:35 fvdl Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
* Copyright (c) 1994 Charles M. Hannum. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Charles M. Hannum.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
* Machine-specific definitions for PCI autoconfiguration.
*/
#define __HAVE_PCIIDE_MACHDEP_COMPAT_INTR_ESTABLISH
/*
* x86_64-specific PCI structure and type definitions.
* NOT TO BE USED DIRECTLY BY MACHINE INDEPENDENT CODE.
*
* Configuration tag; created from a {bus,device,function} triplet by
* pci_make_tag(), and passed to pci_conf_read() and pci_conf_write().
* We could instead always pass the {bus,device,function} triplet to
* the read and write routines, but this would cause extra overhead.
*
* Mode 2 is historical and deprecated by the Revision 2.0 specification.
*/
union x86_64_pci_tag_u {
u_int32_t mode1;
struct {
u_int16_t port;
u_int8_t enable;
u_int8_t forward;
} mode2;
};
extern struct x86_64_bus_dma_tag pci_bus_dma_tag;
/*
* Types provided to machine-independent PCI code
*/
typedef void *pci_chipset_tag_t;
typedef union x86_64_pci_tag_u pcitag_t;
typedef int pci_intr_handle_t;
/*
* x86_64-specific PCI variables and functions.
* NOT TO BE USED DIRECTLY BY MACHINE INDEPENDENT CODE.
*/
extern int pci_mode;
int pci_mode_detect(void);
int pci_bus_flags(void);
struct pci_attach_args;
/*
* Functions provided to machine-independent PCI code.
*/
void pci_attach_hook(struct device *, struct device *,
struct pcibus_attach_args *);
int pci_bus_maxdevs(pci_chipset_tag_t, int);
pcitag_t pci_make_tag(pci_chipset_tag_t, int, int, int);
void pci_decompose_tag(pci_chipset_tag_t, pcitag_t,
int *, int *, int *);
pcireg_t pci_conf_read(pci_chipset_tag_t, pcitag_t, int);
void pci_conf_write(pci_chipset_tag_t, pcitag_t, int,
pcireg_t);
int pci_intr_map(struct pci_attach_args *, pci_intr_handle_t *);
const char *pci_intr_string(pci_chipset_tag_t, pci_intr_handle_t);
const struct evcnt *pci_intr_evcnt(pci_chipset_tag_t, pci_intr_handle_t);
void *pci_intr_establish(pci_chipset_tag_t, pci_intr_handle_t,
int, int (*)(void *), void *);
void pci_intr_disestablish(pci_chipset_tag_t, void *);
#define pci_enumerate_bus(sc, m, p) \
pci_enumerate_bus_generic((sc), (m), (p))
/*
* ALL OF THE FOLLOWING ARE MACHINE-DEPENDENT, AND SHOULD NOT BE USED
* BY PORTABLE CODE.
*/
/*
* XXXfvdl will need to check if this is still valid once the
* real hardware is there.
*/
/*
* Section 6.2.4, `Miscellaneous Functions' of the PCI Specification,
* says that 255 means `unknown' or `no connection' to the interrupt
* controller on a PC.
*/
#define X86_64_PCI_INTERRUPT_LINE_NO_CONNECTION 0xff
#include <x86/pci_machdep.h>

View File

@ -1,233 +1,3 @@
/* $NetBSD: pio.h,v 1.2 2001/12/28 06:42:40 thorpej Exp $ */
/* $NetBSD: pio.h,v 1.3 2003/02/26 21:29:36 fvdl Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by Charles M. Hannum.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the NetBSD
* Foundation, Inc. and its contributors.
* 4. Neither the name of The NetBSD Foundation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/*
* XXXfvdl plain copy of i386. Since pio didn't change, this should
* probably be shared.
*/
#ifndef _X86_64_PIO_H_
#define _X86_64_PIO_H_
/*
* Functions to provide access to i386 programmed I/O instructions.
*
* The in[bwl]() and out[bwl]() functions are split into two varieties: one to
* use a small, constant, 8-bit port number, and another to use a large or
* variable port number. The former can be compiled as a smaller instruction.
*/
#ifdef __OPTIMIZE__
#define __use_immediate_port(port) \
(__builtin_constant_p((port)) && (port) < 0x100)
#else
#define __use_immediate_port(port) 0
#endif
#define inb(port) \
(__use_immediate_port(port) ? __inbc(port) : __inb(port))
static __inline u_int8_t
__inbc(int port)
{
u_int8_t data;
__asm __volatile("inb %w1,%0" : "=a" (data) : "id" (port));
return data;
}
static __inline u_int8_t
__inb(int port)
{
u_int8_t data;
__asm __volatile("inb %w1,%0" : "=a" (data) : "d" (port));
return data;
}
static __inline void
insb(int port, void *addr, int cnt)
{
void *dummy1;
int dummy2;
__asm __volatile("cld\n\trepne\n\tinsb" :
"=D" (dummy1), "=c" (dummy2) :
"d" (port), "0" (addr), "1" (cnt) :
"memory");
}
#define inw(port) \
(__use_immediate_port(port) ? __inwc(port) : __inw(port))
static __inline u_int16_t
__inwc(int port)
{
u_int16_t data;
__asm __volatile("inw %w1,%0" : "=a" (data) : "id" (port));
return data;
}
static __inline u_int16_t
__inw(int port)
{
u_int16_t data;
__asm __volatile("inw %w1,%0" : "=a" (data) : "d" (port));
return data;
}
static __inline void
insw(int port, void *addr, int cnt)
{
void *dummy1;
int dummy2;
__asm __volatile("cld\n\trepne\n\tinsw" :
"=D" (dummy1), "=c" (dummy2) :
"d" (port), "0" (addr), "1" (cnt) :
"memory");
}
#define inl(port) \
(__use_immediate_port(port) ? __inlc(port) : __inl(port))
static __inline u_int32_t
__inlc(int port)
{
u_int32_t data;
__asm __volatile("inl %w1,%0" : "=a" (data) : "id" (port));
return data;
}
static __inline u_int32_t
__inl(int port)
{
u_int32_t data;
__asm __volatile("inl %w1,%0" : "=a" (data) : "d" (port));
return data;
}
static __inline void
insl(int port, void *addr, int cnt)
{
void *dummy1;
int dummy2;
__asm __volatile("cld\n\trepne\n\tinsl" :
"=D" (dummy1), "=c" (dummy2) :
"d" (port), "0" (addr), "1" (cnt) :
"memory");
}
#define outb(port, data) \
(__use_immediate_port(port) ? __outbc(port, data) : __outb(port, data))
static __inline void
__outbc(int port, u_int8_t data)
{
__asm __volatile("outb %0,%w1" : : "a" (data), "id" (port));
}
static __inline void
__outb(int port, u_int8_t data)
{
__asm __volatile("outb %0,%w1" : : "a" (data), "d" (port));
}
static __inline void
outsb(int port, void *addr, int cnt)
{
void *dummy1;
int dummy2;
__asm __volatile("cld\n\trepne\n\toutsb" :
"=S" (dummy1), "=c" (dummy2) :
"d" (port), "0" (addr), "1" (cnt));
}
#define outw(port, data) \
(__use_immediate_port(port) ? __outwc(port, data) : __outw(port, data))
static __inline void
__outwc(int port, u_int16_t data)
{
__asm __volatile("outw %0,%w1" : : "a" (data), "id" (port));
}
static __inline void
__outw(int port, u_int16_t data)
{
__asm __volatile("outw %0,%w1" : : "a" (data), "d" (port));
}
static __inline void
outsw(int port, void *addr, int cnt)
{
void *dummy1;
int dummy2;
__asm __volatile("cld\n\trepne\n\toutsw" :
"=S" (dummy1), "=c" (dummy2) :
"d" (port), "0" (addr), "1" (cnt));
}
#define outl(port, data) \
(__use_immediate_port(port) ? __outlc(port, data) : __outl(port, data))
static __inline void
__outlc(int port, u_int32_t data)
{
__asm __volatile("outl %0,%w1" : : "a" (data), "id" (port));
}
static __inline void
__outl(int port, u_int32_t data)
{
__asm __volatile("outl %0,%w1" : : "a" (data), "d" (port));
}
static __inline void
outsl(int port, void *addr, int cnt)
{
void *dummy1;
int dummy2;
__asm __volatile("cld\n\trepne\n\toutsl" :
"=S" (dummy1), "=c" (dummy2) :
"d" (port), "0" (addr), "1" (cnt));
}
#endif /* _X86_64_PIO_H_ */
#include <x86/pio.h>

View File

@ -1,7 +1,3 @@
/* $NetBSD: psl.h,v 1.1 2001/06/19 00:20:12 fvdl Exp $ */
/* $NetBSD: psl.h,v 1.2 2003/02/26 21:29:36 fvdl Exp $ */
#ifdef _KERNEL
#include <i386/include/psl.h>
#else
#include <i386/psl.h>
#endif
#include <x86/psl.h>

View File

@ -1,10 +1,6 @@
/* $NetBSD: specialreg.h,v 1.2 2002/05/28 23:11:38 fvdl Exp $ */
/* $NetBSD: specialreg.h,v 1.3 2003/02/26 21:29:36 fvdl Exp $ */
#ifdef _KERNEL
#include <i386/include/specialreg.h>
#else
#include <i386/specialreg.h>
#endif
#include <x86/specialreg.h>
/*
* Extended Feature Enable Register of the x86-64

View File

@ -1,7 +1,3 @@
/* $NetBSD: trap.h,v 1.1 2001/06/19 00:20:13 fvdl Exp $ */
/* $NetBSD: trap.h,v 1.2 2003/02/26 21:29:36 fvdl Exp $ */
#ifdef _KERNEL
#include <i386/include/trap.h>
#else
#include <i386/trap.h>
#endif
#include <x86/trap.h>