ANSIfication: u_intN_t -> uintN_t, use ANSI function declarations/definitions
instead of K&R ones.
This commit is contained in:
parent
ecdf0a26f4
commit
d50f0c6274
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: com_ebus.c,v 1.23 2005/12/11 12:19:09 christos Exp $ */
|
||||
/* $NetBSD: com_ebus.c,v 1.24 2006/02/11 17:57:31 cdi Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999, 2000 Matthew R. Green
|
||||
|
@ -33,7 +33,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: com_ebus.c,v 1.23 2005/12/11 12:19:09 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: com_ebus.c,v 1.24 2006/02/11 17:57:31 cdi Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
|
@ -56,8 +56,8 @@ __KERNEL_RCSID(0, "$NetBSD: com_ebus.c,v 1.23 2005/12/11 12:19:09 christos Exp $
|
|||
#include "kbd.h"
|
||||
#include "ms.h"
|
||||
|
||||
int com_ebus_match __P((struct device *, struct cfdata *, void *));
|
||||
void com_ebus_attach __P((struct device *, struct device *, void *));
|
||||
int com_ebus_match(struct device *, struct cfdata *, void *);
|
||||
void com_ebus_attach(struct device *, struct device *, void *);
|
||||
|
||||
CFATTACH_DECL(com_ebus, sizeof(struct com_softc),
|
||||
com_ebus_match, com_ebus_attach, NULL, NULL);
|
||||
|
@ -69,10 +69,7 @@ static const char *com_names[] = {
|
|||
};
|
||||
|
||||
int
|
||||
com_ebus_match(parent, match, aux)
|
||||
struct device *parent;
|
||||
struct cfdata *match;
|
||||
void *aux;
|
||||
com_ebus_match(struct device *parent, struct cfdata *match, void *aux)
|
||||
{
|
||||
struct ebus_attach_args *ea = aux;
|
||||
int i;
|
||||
|
@ -97,9 +94,7 @@ com_ebus_match(parent, match, aux)
|
|||
#define BAUD_BASE (1846200)
|
||||
|
||||
void
|
||||
com_ebus_attach(parent, self, aux)
|
||||
struct device *parent, *self;
|
||||
void *aux;
|
||||
com_ebus_attach(struct device *parent, struct device *self, void *aux)
|
||||
{
|
||||
struct com_softc *sc = (void *)self;
|
||||
struct ebus_attach_args *ea = aux;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ebus.c,v 1.48 2005/12/11 12:19:09 christos Exp $ */
|
||||
/* $NetBSD: ebus.c,v 1.49 2006/02/11 17:57:31 cdi Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999, 2000, 2001 Matthew R. Green
|
||||
|
@ -29,7 +29,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ebus.c,v 1.48 2005/12/11 12:19:09 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ebus.c,v 1.49 2006/02/11 17:57:31 cdi Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
|
||||
|
@ -98,20 +98,19 @@ struct ebus_softc {
|
|||
int sc_nintmap;
|
||||
};
|
||||
|
||||
int ebus_match __P((struct device *, struct cfdata *, void *));
|
||||
void ebus_attach __P((struct device *, struct device *, void *));
|
||||
int ebus_match(struct device *, struct cfdata *, void *);
|
||||
void ebus_attach(struct device *, struct device *, void *);
|
||||
|
||||
CFATTACH_DECL(ebus, sizeof(struct ebus_softc),
|
||||
ebus_match, ebus_attach, NULL, NULL);
|
||||
|
||||
bus_space_tag_t ebus_alloc_bus_tag __P((struct ebus_softc *, int));
|
||||
bus_space_tag_t ebus_alloc_bus_tag(struct ebus_softc *, int);
|
||||
|
||||
int ebus_setup_attach_args __P((struct ebus_softc *, int,
|
||||
struct ebus_attach_args *));
|
||||
void ebus_destroy_attach_args __P((struct ebus_attach_args *));
|
||||
int ebus_print __P((void *, const char *));
|
||||
void ebus_find_ino __P((struct ebus_softc *, struct ebus_attach_args *));
|
||||
int ebus_find_node __P((struct pci_attach_args *));
|
||||
int ebus_setup_attach_args(struct ebus_softc *, int,
|
||||
struct ebus_attach_args *);
|
||||
void ebus_destroy_attach_args(struct ebus_attach_args *);
|
||||
int ebus_print(void *, const char *);
|
||||
void ebus_find_ino(struct ebus_softc *, struct ebus_attach_args *);
|
||||
|
||||
/*
|
||||
* here are our bus space and bus DMA routines.
|
||||
|
@ -123,10 +122,7 @@ static void *ebus_intr_establish __P((bus_space_tag_t, int, int,
|
|||
int (*) __P((void *)), void *, void(*)__P((void))));
|
||||
|
||||
int
|
||||
ebus_match(parent, match, aux)
|
||||
struct device *parent;
|
||||
struct cfdata *match;
|
||||
void *aux;
|
||||
ebus_match(struct device *parent, struct cfdata *match, void *aux)
|
||||
{
|
||||
struct pci_attach_args *pa = aux;
|
||||
char *name;
|
||||
|
@ -166,9 +162,7 @@ ebus_match(parent, match, aux)
|
|||
* after the sbus code which does similar things.
|
||||
*/
|
||||
void
|
||||
ebus_attach(parent, self, aux)
|
||||
struct device *parent, *self;
|
||||
void *aux;
|
||||
ebus_attach(struct device *parent, struct device *self, void *aux)
|
||||
{
|
||||
struct ebus_softc *sc = (struct ebus_softc *)self;
|
||||
struct pci_attach_args *pa = aux;
|
||||
|
@ -247,11 +241,11 @@ ebus_attach(parent, self, aux)
|
|||
}
|
||||
}
|
||||
|
||||
int ebus_setup_attach_args(struct ebus_softc *, int,
|
||||
struct ebus_attach_args *);
|
||||
int
|
||||
ebus_setup_attach_args(sc, node, ea)
|
||||
struct ebus_softc *sc;
|
||||
int node;
|
||||
struct ebus_attach_args *ea;
|
||||
ebus_setup_attach_args(struct ebus_softc *sc, int node,
|
||||
struct ebus_attach_args *ea)
|
||||
{
|
||||
int n, rv;
|
||||
|
||||
|
@ -293,8 +287,7 @@ ebus_setup_attach_args(sc, node, ea)
|
|||
}
|
||||
|
||||
void
|
||||
ebus_destroy_attach_args(ea)
|
||||
struct ebus_attach_args *ea;
|
||||
ebus_destroy_attach_args(struct ebus_attach_args *ea)
|
||||
{
|
||||
|
||||
if (ea->ea_name)
|
||||
|
@ -308,9 +301,7 @@ ebus_destroy_attach_args(ea)
|
|||
}
|
||||
|
||||
int
|
||||
ebus_print(aux, p)
|
||||
void *aux;
|
||||
const char *p;
|
||||
ebus_print(void *aux, const char *p)
|
||||
{
|
||||
struct ebus_attach_args *ea = aux;
|
||||
int i;
|
||||
|
@ -337,9 +328,7 @@ ebus_print(aux, p)
|
|||
* to give the INO for this interrupt.
|
||||
*/
|
||||
void
|
||||
ebus_find_ino(sc, ea)
|
||||
struct ebus_softc *sc;
|
||||
struct ebus_attach_args *ea;
|
||||
ebus_find_ino(struct ebus_softc *sc, struct ebus_attach_args *ea)
|
||||
{
|
||||
u_int32_t hi, lo, intr;
|
||||
int i, j, k;
|
||||
|
@ -395,9 +384,7 @@ next_intr:;
|
|||
* about PCI physical addresses, which also applies to ebus.
|
||||
*/
|
||||
bus_space_tag_t
|
||||
ebus_alloc_bus_tag(sc, type)
|
||||
struct ebus_softc *sc;
|
||||
int type;
|
||||
ebus_alloc_bus_tag(struct ebus_softc *sc, int type)
|
||||
{
|
||||
bus_space_tag_t bt;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: iommu.c,v 1.77 2005/11/24 13:08:34 yamt Exp $ */
|
||||
/* $NetBSD: iommu.c,v 1.78 2006/02/11 17:57:31 cdi Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001, 2002 Eduardo Horvath
|
||||
|
@ -34,7 +34,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: iommu.c,v 1.77 2005/11/24 13:08:34 yamt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: iommu.c,v 1.78 2006/02/11 17:57:31 cdi Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
|
||||
|
@ -72,7 +72,7 @@ int iommudebug = 0x0;
|
|||
STRBUFREG(strbuf_pgflush), (v)); \
|
||||
} while (0)
|
||||
|
||||
static int iommu_strbuf_flush_done __P((struct strbuf_ctl *));
|
||||
static int iommu_strbuf_flush_done(struct strbuf_ctl *);
|
||||
|
||||
/*
|
||||
* initialise the UltraSPARC IOMMU (SBUS or PCI):
|
||||
|
@ -82,11 +82,7 @@ static int iommu_strbuf_flush_done __P((struct strbuf_ctl *));
|
|||
* - create a private DVMA map.
|
||||
*/
|
||||
void
|
||||
iommu_init(name, is, tsbsize, iovabase)
|
||||
char *name;
|
||||
struct iommu_state *is;
|
||||
int tsbsize;
|
||||
u_int32_t iovabase;
|
||||
iommu_init(char *name, struct iommu_state *is, int tsbsize, u_int32_t iovabase)
|
||||
{
|
||||
psize_t size;
|
||||
vaddr_t va;
|
||||
|
@ -196,8 +192,7 @@ iommu_init(name, is, tsbsize, iovabase)
|
|||
* they aren't there when the STRBUF_EN bit does not remain.
|
||||
*/
|
||||
void
|
||||
iommu_reset(is)
|
||||
struct iommu_state *is;
|
||||
iommu_reset(struct iommu_state *is)
|
||||
{
|
||||
int i;
|
||||
struct strbuf_ctl *sb;
|
||||
|
@ -239,11 +234,7 @@ iommu_reset(is)
|
|||
* Here are the iommu control routines.
|
||||
*/
|
||||
void
|
||||
iommu_enter(sb, va, pa, flags)
|
||||
struct strbuf_ctl *sb;
|
||||
vaddr_t va;
|
||||
int64_t pa;
|
||||
int flags;
|
||||
iommu_enter(struct strbuf_ctl *sb, vaddr_t va, int64_t pa, int flags)
|
||||
{
|
||||
struct iommu_state *is = sb->sb_is;
|
||||
int strbuf = (flags & BUS_DMA_STREAMING);
|
||||
|
@ -283,9 +274,7 @@ iommu_enter(sb, va, pa, flags)
|
|||
* Find the value of a DVMA address (debug routine).
|
||||
*/
|
||||
paddr_t
|
||||
iommu_extract(is, dva)
|
||||
struct iommu_state *is;
|
||||
vaddr_t dva;
|
||||
iommu_extract(struct iommu_state *is, vaddr_t dva)
|
||||
{
|
||||
int64_t tte = 0;
|
||||
|
||||
|
@ -305,10 +294,7 @@ iommu_extract(is, dva)
|
|||
* XXX: this function needs better internal error checking.
|
||||
*/
|
||||
void
|
||||
iommu_remove(is, va, len)
|
||||
struct iommu_state *is;
|
||||
vaddr_t va;
|
||||
size_t len;
|
||||
iommu_remove(struct iommu_state *is, vaddr_t va, size_t len)
|
||||
{
|
||||
|
||||
#ifdef DIAGNOSTIC
|
||||
|
@ -344,8 +330,7 @@ iommu_remove(is, va, len)
|
|||
}
|
||||
|
||||
static int
|
||||
iommu_strbuf_flush_done(sb)
|
||||
struct strbuf_ctl *sb;
|
||||
iommu_strbuf_flush_done(struct strbuf_ctl *sb)
|
||||
{
|
||||
struct iommu_state *is = sb->sb_is;
|
||||
struct timeval cur, flushtimeout;
|
||||
|
@ -414,14 +399,8 @@ iommu_strbuf_flush_done(sb)
|
|||
* IOMMU DVMA operations, common to SBUS and PCI.
|
||||
*/
|
||||
int
|
||||
iommu_dvmamap_load(t, sb, map, buf, buflen, p, flags)
|
||||
bus_dma_tag_t t;
|
||||
struct strbuf_ctl *sb;
|
||||
bus_dmamap_t map;
|
||||
void *buf;
|
||||
bus_size_t buflen;
|
||||
struct proc *p;
|
||||
int flags;
|
||||
iommu_dvmamap_load(bus_dma_tag_t t, struct strbuf_ctl *sb, bus_dmamap_t map,
|
||||
void *buf, bus_size_t buflen, struct proc *p, int flags)
|
||||
{
|
||||
struct iommu_state *is = sb->sb_is;
|
||||
int s;
|
||||
|
@ -589,10 +568,7 @@ iommu_dvmamap_load(t, sb, map, buf, buflen, p, flags)
|
|||
|
||||
|
||||
void
|
||||
iommu_dvmamap_unload(t, sb, map)
|
||||
bus_dma_tag_t t;
|
||||
struct strbuf_ctl *sb;
|
||||
bus_dmamap_t map;
|
||||
iommu_dvmamap_unload(bus_dma_tag_t t, struct strbuf_ctl *sb, bus_dmamap_t map)
|
||||
{
|
||||
struct iommu_state *is = sb->sb_is;
|
||||
int error, s;
|
||||
|
@ -630,14 +606,8 @@ iommu_dvmamap_unload(t, sb, map)
|
|||
|
||||
|
||||
int
|
||||
iommu_dvmamap_load_raw(t, sb, map, segs, nsegs, flags, size)
|
||||
bus_dma_tag_t t;
|
||||
struct strbuf_ctl *sb;
|
||||
bus_dmamap_t map;
|
||||
bus_dma_segment_t *segs;
|
||||
int nsegs;
|
||||
int flags;
|
||||
bus_size_t size;
|
||||
iommu_dvmamap_load_raw(bus_dma_tag_t t, struct strbuf_ctl *sb, bus_dmamap_t map,
|
||||
bus_dma_segment_t *segs, int nsegs, int flags, bus_size_t size)
|
||||
{
|
||||
struct iommu_state *is = sb->sb_is;
|
||||
struct vm_page *pg;
|
||||
|
@ -949,13 +919,8 @@ iommu_dvmamap_sync_range(struct strbuf_ctl *sb, vaddr_t va, bus_size_t len)
|
|||
}
|
||||
|
||||
void
|
||||
iommu_dvmamap_sync(t, sb, map, offset, len, ops)
|
||||
bus_dma_tag_t t;
|
||||
struct strbuf_ctl *sb;
|
||||
bus_dmamap_t map;
|
||||
bus_addr_t offset;
|
||||
bus_size_t len;
|
||||
int ops;
|
||||
iommu_dvmamap_sync(bus_dma_tag_t t, struct strbuf_ctl *sb, bus_dmamap_t map,
|
||||
bus_addr_t offset, bus_size_t len, int ops)
|
||||
{
|
||||
bus_size_t count;
|
||||
int i, needsflush = 0;
|
||||
|
@ -1000,14 +965,9 @@ iommu_dvmamap_sync(t, sb, map, offset, len, ops)
|
|||
}
|
||||
|
||||
int
|
||||
iommu_dvmamem_alloc(t, sb, size, alignment, boundary, segs, nsegs, rsegs, flags)
|
||||
bus_dma_tag_t t;
|
||||
struct strbuf_ctl *sb;
|
||||
bus_size_t size, alignment, boundary;
|
||||
bus_dma_segment_t *segs;
|
||||
int nsegs;
|
||||
int *rsegs;
|
||||
int flags;
|
||||
iommu_dvmamem_alloc(bus_dma_tag_t t, struct strbuf_ctl *sb, bus_size_t size,
|
||||
bus_size_t alignment, bus_size_t boundary, bus_dma_segment_t *segs,
|
||||
int nsegs, int *rsegs, int flags)
|
||||
{
|
||||
|
||||
DPRINTF(IDB_BUSDMA, ("iommu_dvmamem_alloc: sz %llx align %llx bound %llx "
|
||||
|
@ -1019,11 +979,8 @@ iommu_dvmamem_alloc(t, sb, size, alignment, boundary, segs, nsegs, rsegs, flags)
|
|||
}
|
||||
|
||||
void
|
||||
iommu_dvmamem_free(t, sb, segs, nsegs)
|
||||
bus_dma_tag_t t;
|
||||
struct strbuf_ctl *sb;
|
||||
bus_dma_segment_t *segs;
|
||||
int nsegs;
|
||||
iommu_dvmamem_free(bus_dma_tag_t t, struct strbuf_ctl *sb,
|
||||
bus_dma_segment_t *segs, int nsegs)
|
||||
{
|
||||
|
||||
DPRINTF(IDB_BUSDMA, ("iommu_dvmamem_free: segp %p nsegs %d\n",
|
||||
|
@ -1036,14 +993,9 @@ iommu_dvmamem_free(t, sb, segs, nsegs)
|
|||
* Check the flags to see whether we're streaming or coherent.
|
||||
*/
|
||||
int
|
||||
iommu_dvmamem_map(t, sb, segs, nsegs, size, kvap, flags)
|
||||
bus_dma_tag_t t;
|
||||
struct strbuf_ctl *sb;
|
||||
bus_dma_segment_t *segs;
|
||||
int nsegs;
|
||||
size_t size;
|
||||
caddr_t *kvap;
|
||||
int flags;
|
||||
iommu_dvmamem_map(bus_dma_tag_t t, struct strbuf_ctl *sb,
|
||||
bus_dma_segment_t *segs, int nsegs, size_t size, caddr_t *kvap,
|
||||
int flags)
|
||||
{
|
||||
struct vm_page *pg;
|
||||
vaddr_t va;
|
||||
|
@ -1100,11 +1052,8 @@ iommu_dvmamem_map(t, sb, segs, nsegs, size, kvap, flags)
|
|||
* Unmap DVMA mappings from kernel
|
||||
*/
|
||||
void
|
||||
iommu_dvmamem_unmap(t, sb, kva, size)
|
||||
bus_dma_tag_t t;
|
||||
struct strbuf_ctl *sb;
|
||||
caddr_t kva;
|
||||
size_t size;
|
||||
iommu_dvmamem_unmap(bus_dma_tag_t t, struct strbuf_ctl *sb, caddr_t kva,
|
||||
size_t size)
|
||||
{
|
||||
|
||||
DPRINTF(IDB_BUSDMA, ("iommu_dvmamem_unmap: kvm %p size %lx\n",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: iommuvar.h,v 1.12 2002/06/20 18:26:24 eeh Exp $ */
|
||||
/* $NetBSD: iommuvar.h,v 1.13 2006/02/11 17:57:31 cdi Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999 Matthew R. Green
|
||||
|
@ -66,28 +66,26 @@ struct iommu_state {
|
|||
};
|
||||
|
||||
/* interfaces for PCI/SBUS code */
|
||||
void iommu_init __P((char *, struct iommu_state *, int, u_int32_t));
|
||||
void iommu_reset __P((struct iommu_state *));
|
||||
void iommu_enter __P((struct strbuf_ctl *, vaddr_t, int64_t, int));
|
||||
void iommu_remove __P((struct iommu_state *, vaddr_t, size_t));
|
||||
paddr_t iommu_extract __P((struct iommu_state *, vaddr_t));
|
||||
void iommu_init(char *, struct iommu_state *, int, u_int32_t);
|
||||
void iommu_reset(struct iommu_state *);
|
||||
void iommu_enter(struct strbuf_ctl *, vaddr_t, int64_t, int);
|
||||
void iommu_remove(struct iommu_state *, vaddr_t, size_t);
|
||||
paddr_t iommu_extract(struct iommu_state *, vaddr_t);
|
||||
|
||||
int iommu_dvmamap_load __P((bus_dma_tag_t, struct strbuf_ctl *,
|
||||
bus_dmamap_t, void *, bus_size_t, struct proc *, int));
|
||||
void iommu_dvmamap_unload __P((bus_dma_tag_t, struct strbuf_ctl *,
|
||||
bus_dmamap_t));
|
||||
int iommu_dvmamap_load_raw __P((bus_dma_tag_t, struct strbuf_ctl *,
|
||||
bus_dmamap_t, bus_dma_segment_t *, int, int, bus_size_t));
|
||||
void iommu_dvmamap_sync __P((bus_dma_tag_t, struct strbuf_ctl *,
|
||||
bus_dmamap_t, bus_addr_t, bus_size_t, int));
|
||||
int iommu_dvmamem_alloc __P((bus_dma_tag_t, struct strbuf_ctl *,
|
||||
bus_size_t, bus_size_t, bus_size_t, bus_dma_segment_t *,
|
||||
int, int *, int));
|
||||
void iommu_dvmamem_free __P((bus_dma_tag_t, struct strbuf_ctl *,
|
||||
bus_dma_segment_t *, int));
|
||||
int iommu_dvmamem_map __P((bus_dma_tag_t, struct strbuf_ctl *,
|
||||
bus_dma_segment_t *, int, size_t, caddr_t *, int));
|
||||
void iommu_dvmamem_unmap __P((bus_dma_tag_t, struct strbuf_ctl *,
|
||||
caddr_t, size_t));
|
||||
int iommu_dvmamap_load(bus_dma_tag_t, struct strbuf_ctl *, bus_dmamap_t,
|
||||
void *, bus_size_t, struct proc *, int);
|
||||
void iommu_dvmamap_unload(bus_dma_tag_t, struct strbuf_ctl *, bus_dmamap_t);
|
||||
int iommu_dvmamap_load_raw(bus_dma_tag_t, struct strbuf_ctl *, bus_dmamap_t,
|
||||
bus_dma_segment_t *, int, int, bus_size_t);
|
||||
void iommu_dvmamap_sync(bus_dma_tag_t, struct strbuf_ctl *, bus_dmamap_t,
|
||||
bus_addr_t, bus_size_t, int);
|
||||
int iommu_dvmamem_alloc(bus_dma_tag_t, struct strbuf_ctl *, bus_size_t,
|
||||
bus_size_t, bus_size_t, bus_dma_segment_t *, int, int *, int);
|
||||
void iommu_dvmamem_free(bus_dma_tag_t, struct strbuf_ctl *,
|
||||
bus_dma_segment_t *, int);
|
||||
int iommu_dvmamem_map(bus_dma_tag_t, struct strbuf_ctl *,
|
||||
bus_dma_segment_t *, int, size_t, caddr_t *, int);
|
||||
void iommu_dvmamem_unmap(bus_dma_tag_t, struct strbuf_ctl *, caddr_t,
|
||||
size_t);
|
||||
|
||||
#endif /* _SPARC64_DEV_IOMMUVAR_H_ */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: kd.c,v 1.35 2005/12/11 12:19:09 christos Exp $ */
|
||||
/* $NetBSD: kd.c,v 1.36 2006/02/11 17:57:31 cdi Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
|
@ -46,7 +46,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: kd.c,v 1.35 2005/12/11 12:19:09 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: kd.c,v 1.36 2006/02/11 17:57:31 cdi Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/proc.h>
|
||||
|
@ -105,9 +105,9 @@ static int kd_is_console;
|
|||
|
||||
static int kdparam(struct tty *, struct termios *);
|
||||
static void kdstart(struct tty *);
|
||||
static void kd_init __P((struct kd_softc *));
|
||||
static void kd_cons_input __P((int));
|
||||
static int kdcngetc __P((dev_t));
|
||||
static void kd_init(struct kd_softc *);
|
||||
static void kd_cons_input(int);
|
||||
static int kdcngetc(dev_t);
|
||||
|
||||
int cons_ocount; /* output byte count */
|
||||
|
||||
|
@ -116,8 +116,7 @@ int cons_ocount; /* output byte count */
|
|||
* XXX - Make this a proper child of kbd?
|
||||
*/
|
||||
void
|
||||
kd_init(kd)
|
||||
struct kd_softc *kd;
|
||||
kd_init(struct kd_softc *kd)
|
||||
{
|
||||
struct tty *tp;
|
||||
char prop[6+1];
|
||||
|
@ -433,21 +432,19 @@ kd_putfb(tp)
|
|||
/*
|
||||
* Default PROM-based console input stream
|
||||
*/
|
||||
static int kd_rom_iopen __P((struct cons_channel *));
|
||||
static int kd_rom_iclose __P((struct cons_channel *));
|
||||
static int kd_rom_iopen(struct cons_channel *);
|
||||
static int kd_rom_iclose(struct cons_channel *);
|
||||
|
||||
static struct cons_channel prom_cons_channel;
|
||||
|
||||
int
|
||||
kd_rom_iopen(cc)
|
||||
struct cons_channel *cc;
|
||||
kd_rom_iopen(struct cons_channel *cc)
|
||||
{
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
kd_rom_iclose(cc)
|
||||
struct cons_channel *cc;
|
||||
kd_rom_iclose(struct cons_channel *cc)
|
||||
{
|
||||
return (0);
|
||||
}
|
||||
|
@ -457,8 +454,7 @@ kd_rom_iclose(cc)
|
|||
* the keyboard driver (dev/sun/kbd.c) at spltty.
|
||||
*/
|
||||
void
|
||||
kd_cons_input(c)
|
||||
int c;
|
||||
kd_cons_input(int c)
|
||||
{
|
||||
struct kd_softc *kd = &kd_softc;
|
||||
struct tty *tp;
|
||||
|
@ -481,10 +477,10 @@ kd_cons_input(c)
|
|||
/* The debugger gets its own key translation state. */
|
||||
static struct kbd_state *kdcn_state;
|
||||
|
||||
static void kdcnprobe __P((struct consdev *));
|
||||
static void kdcninit __P((struct consdev *));
|
||||
static void kdcnputc __P((dev_t, int));
|
||||
static void kdcnpollc __P((dev_t, int));
|
||||
static void kdcnprobe(struct consdev *);
|
||||
static void kdcninit(struct consdev *);
|
||||
static void kdcnputc(dev_t, int);
|
||||
static void kdcnpollc(dev_t, int);
|
||||
|
||||
/* The keyboard driver uses cn_hw to access the real console driver */
|
||||
extern struct consdev consdev_prom;
|
||||
|
@ -550,14 +546,12 @@ kd_attach_input(cc)
|
|||
|
||||
/* We never call this. */
|
||||
static void
|
||||
kdcnprobe(cn)
|
||||
struct consdev *cn;
|
||||
kdcnprobe(struct consdev *cn)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
kdcninit(cn)
|
||||
struct consdev *cn;
|
||||
kdcninit(struct consdev *cn)
|
||||
{
|
||||
#if 0
|
||||
struct kbd_state *ks = kdcn_state;
|
||||
|
@ -581,12 +575,11 @@ kdcninit(cn)
|
|||
}
|
||||
|
||||
static int
|
||||
kdcngetc(dev)
|
||||
dev_t dev;
|
||||
kdcngetc(dev_t dev)
|
||||
{
|
||||
struct kbd_state *ks = kdcn_state;
|
||||
int code, class, data, keysym;
|
||||
extern int prom_cngetc __P((dev_t));
|
||||
extern int prom_cngetc(dev_t);
|
||||
|
||||
|
||||
if (cn_hw->cn_getc == prom_cngetc) return (*cn_hw->cn_getc)(dev);
|
||||
|
@ -626,9 +619,7 @@ out:
|
|||
}
|
||||
|
||||
static void
|
||||
kdcnputc(dev, c)
|
||||
dev_t dev;
|
||||
int c;
|
||||
kdcnputc(dev_t dev, int c)
|
||||
{
|
||||
int s;
|
||||
char c0 = (c & 0x7f);
|
||||
|
@ -639,9 +630,7 @@ kdcnputc(dev, c)
|
|||
}
|
||||
|
||||
static void
|
||||
kdcnpollc(dev, on)
|
||||
dev_t dev;
|
||||
int on;
|
||||
kdcnpollc(dev_t dev, int on)
|
||||
{
|
||||
struct kbd_state *ks = kdcn_state;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: lpt_ebus.c,v 1.19 2005/12/11 12:19:09 christos Exp $ */
|
||||
/* $NetBSD: lpt_ebus.c,v 1.20 2006/02/11 17:57:31 cdi Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999, 2000 Matthew R. Green
|
||||
|
@ -33,7 +33,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: lpt_ebus.c,v 1.19 2005/12/11 12:19:09 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: lpt_ebus.c,v 1.20 2006/02/11 17:57:31 cdi Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
|
@ -48,8 +48,8 @@ __KERNEL_RCSID(0, "$NetBSD: lpt_ebus.c,v 1.19 2005/12/11 12:19:09 christos Exp $
|
|||
|
||||
#include <dev/ic/lptvar.h>
|
||||
|
||||
int lpt_ebus_match __P((struct device *, struct cfdata *, void *));
|
||||
void lpt_ebus_attach __P((struct device *, struct device *, void *));
|
||||
int lpt_ebus_match(struct device *, struct cfdata *, void *);
|
||||
void lpt_ebus_attach(struct device *, struct device *, void *);
|
||||
|
||||
CFATTACH_DECL(lpt_ebus, sizeof(struct lpt_softc),
|
||||
lpt_ebus_match, lpt_ebus_attach, NULL, NULL);
|
||||
|
@ -57,10 +57,7 @@ CFATTACH_DECL(lpt_ebus, sizeof(struct lpt_softc),
|
|||
#define ROM_LPT_NAME "ecpp"
|
||||
|
||||
int
|
||||
lpt_ebus_match(parent, match, aux)
|
||||
struct device *parent;
|
||||
struct cfdata *match;
|
||||
void *aux;
|
||||
lpt_ebus_match(struct device *parent, struct cfdata *match, void *aux)
|
||||
{
|
||||
struct ebus_attach_args *ea = aux;
|
||||
|
||||
|
@ -71,9 +68,7 @@ lpt_ebus_match(parent, match, aux)
|
|||
}
|
||||
|
||||
void
|
||||
lpt_ebus_attach(parent, self, aux)
|
||||
struct device *parent, *self;
|
||||
void *aux;
|
||||
lpt_ebus_attach(struct device *parent, struct device *self, void *aux)
|
||||
{
|
||||
struct lpt_softc *sc = (void *)self;
|
||||
struct ebus_attach_args *ea = aux;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pci_machdep.c,v 1.50 2005/12/11 12:19:09 christos Exp $ */
|
||||
/* $NetBSD: pci_machdep.c,v 1.51 2006/02/11 17:57:31 cdi Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999, 2000 Matthew R. Green
|
||||
|
@ -33,7 +33,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.50 2005/12/11 12:19:09 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.51 2006/02/11 17:57:31 cdi Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
|
@ -97,33 +97,25 @@ ofpci_make_tag(pci_chipset_tag_t pc, int node, int b, int d, int f)
|
|||
*/
|
||||
|
||||
void
|
||||
pci_attach_hook(parent, self, pba)
|
||||
struct device *parent;
|
||||
struct device *self;
|
||||
struct pcibus_attach_args *pba;
|
||||
pci_attach_hook(struct device *parent, struct device *self,
|
||||
struct pcibus_attach_args *pba)
|
||||
{
|
||||
}
|
||||
|
||||
int
|
||||
pci_bus_maxdevs(pc, busno)
|
||||
pci_chipset_tag_t pc;
|
||||
int busno;
|
||||
pci_bus_maxdevs(pci_chipset_tag_t pc, int busno)
|
||||
{
|
||||
|
||||
return 32;
|
||||
}
|
||||
|
||||
pcitag_t
|
||||
pci_make_tag(pc, b, d, f)
|
||||
pci_chipset_tag_t pc;
|
||||
int b;
|
||||
int d;
|
||||
int f;
|
||||
pci_make_tag(pci_chipset_tag_t pc, int b, int d, int f)
|
||||
{
|
||||
struct psycho_pbm *pp = pc->cookie;
|
||||
struct ofw_pci_register reg;
|
||||
pcitag_t tag;
|
||||
int (*valid) __P((void *));
|
||||
int (*valid)(void *);
|
||||
int node, len;
|
||||
#ifdef DEBUG
|
||||
char name[80];
|
||||
|
@ -252,10 +244,7 @@ pci_make_tag(pc, b, d, f)
|
|||
}
|
||||
|
||||
void
|
||||
pci_decompose_tag(pc, tag, bp, dp, fp)
|
||||
pci_chipset_tag_t pc;
|
||||
pcitag_t tag;
|
||||
int *bp, *dp, *fp;
|
||||
pci_decompose_tag(pci_chipset_tag_t pc, pcitag_t tag, int *bp, int *dp, int *fp)
|
||||
{
|
||||
|
||||
if (bp != NULL)
|
||||
|
@ -384,10 +373,7 @@ sparc64_pci_enumerate_bus(struct pci_softc *sc, const int *locators,
|
|||
|
||||
/* assume we are mapped little-endian/side-effect */
|
||||
pcireg_t
|
||||
pci_conf_read(pc, tag, reg)
|
||||
pci_chipset_tag_t pc;
|
||||
pcitag_t tag;
|
||||
int reg;
|
||||
pci_conf_read(pci_chipset_tag_t pc, pcitag_t tag, int reg)
|
||||
{
|
||||
struct psycho_pbm *pp = pc->cookie;
|
||||
struct psycho_softc *sc = pp->pp_sc;
|
||||
|
@ -415,11 +401,7 @@ pci_conf_read(pc, tag, reg)
|
|||
}
|
||||
|
||||
void
|
||||
pci_conf_write(pc, tag, reg, data)
|
||||
pci_chipset_tag_t pc;
|
||||
pcitag_t tag;
|
||||
int reg;
|
||||
pcireg_t data;
|
||||
pci_conf_write(pci_chipset_tag_t pc, pcitag_t tag, int reg, pcireg_t data)
|
||||
{
|
||||
struct psycho_pbm *pp = pc->cookie;
|
||||
struct psycho_softc *sc = pp->pp_sc;
|
||||
|
@ -442,9 +424,7 @@ pci_conf_write(pc, tag, reg, data)
|
|||
}
|
||||
|
||||
static int
|
||||
pci_find_ino(pa, ihp)
|
||||
struct pci_attach_args *pa;
|
||||
pci_intr_handle_t *ihp;
|
||||
pci_find_ino(struct pci_attach_args *pa, pci_intr_handle_t *ihp)
|
||||
{
|
||||
struct psycho_pbm *pp = pa->pa_pc->cookie;
|
||||
struct psycho_softc *sc = pp->pp_sc;
|
||||
|
@ -499,9 +479,7 @@ pci_find_ino(pa, ihp)
|
|||
* XXX: how does this deal with multiple interrupts for a device?
|
||||
*/
|
||||
int
|
||||
pci_intr_map(pa, ihp)
|
||||
struct pci_attach_args *pa;
|
||||
pci_intr_handle_t *ihp;
|
||||
pci_intr_map(struct pci_attach_args *pa, pci_intr_handle_t *ihp)
|
||||
{
|
||||
pcitag_t tag = pa->pa_tag;
|
||||
int interrupts, *intp;
|
||||
|
@ -537,9 +515,7 @@ pci_intr_map(pa, ihp)
|
|||
}
|
||||
|
||||
const char *
|
||||
pci_intr_string(pc, ih)
|
||||
pci_chipset_tag_t pc;
|
||||
pci_intr_handle_t ih;
|
||||
pci_intr_string(pci_chipset_tag_t pc, pci_intr_handle_t ih)
|
||||
{
|
||||
static char str[16];
|
||||
|
||||
|
@ -551,9 +527,7 @@ pci_intr_string(pc, ih)
|
|||
}
|
||||
|
||||
const struct evcnt *
|
||||
pci_intr_evcnt(pc, ih)
|
||||
pci_chipset_tag_t pc;
|
||||
pci_intr_handle_t ih;
|
||||
pci_intr_evcnt(pci_chipset_tag_t pc, pci_intr_handle_t ih)
|
||||
{
|
||||
|
||||
/* XXX for now, no evcnt parent reported */
|
||||
|
@ -561,12 +535,8 @@ pci_intr_evcnt(pc, ih)
|
|||
}
|
||||
|
||||
void *
|
||||
pci_intr_establish(pc, ih, level, func, arg)
|
||||
pci_chipset_tag_t pc;
|
||||
pci_intr_handle_t ih;
|
||||
int level;
|
||||
int (*func) __P((void *));
|
||||
void *arg;
|
||||
pci_intr_establish(pci_chipset_tag_t pc, pci_intr_handle_t ih, int level,
|
||||
int (*func)(void *), void *arg)
|
||||
{
|
||||
void *cookie;
|
||||
struct psycho_pbm *pp = (struct psycho_pbm *)pc->cookie;
|
||||
|
@ -579,9 +549,7 @@ pci_intr_establish(pc, ih, level, func, arg)
|
|||
}
|
||||
|
||||
void
|
||||
pci_intr_disestablish(pc, cookie)
|
||||
pci_chipset_tag_t pc;
|
||||
void *cookie;
|
||||
pci_intr_disestablish(pci_chipset_tag_t pc, void *cookie)
|
||||
{
|
||||
|
||||
DPRINTF(SPDB_INTR, ("pci_intr_disestablish: cookie %p\n", cookie));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sbus.c,v 1.74 2006/02/01 20:21:38 martin Exp $ */
|
||||
/* $NetBSD: sbus.c,v 1.75 2006/02/11 17:57:31 cdi Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999-2002 Eduardo Horvath
|
||||
|
@ -34,7 +34,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: sbus.c,v 1.74 2006/02/01 20:21:38 martin Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sbus.c,v 1.75 2006/02/11 17:57:31 cdi Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
|
||||
|
@ -69,31 +69,31 @@ int sbus_debug = 0;
|
|||
#define DPRINTF(l, s)
|
||||
#endif
|
||||
|
||||
void sbusreset __P((int));
|
||||
void sbusreset(int);
|
||||
|
||||
static bus_dma_tag_t sbus_alloc_dmatag __P((struct sbus_softc *));
|
||||
static int sbus_get_intr __P((struct sbus_softc *, int,
|
||||
struct openprom_intr **, int *, int));
|
||||
static int sbus_overtemp __P((void *));
|
||||
static int _sbus_bus_map __P((
|
||||
static bus_dma_tag_t sbus_alloc_dmatag(struct sbus_softc *);
|
||||
static int sbus_get_intr(struct sbus_softc *, int, struct openprom_intr **,
|
||||
int *, int);
|
||||
static int sbus_overtemp(void *);
|
||||
static int _sbus_bus_map(
|
||||
bus_space_tag_t,
|
||||
bus_addr_t, /*offset*/
|
||||
bus_size_t, /*size*/
|
||||
int, /*flags*/
|
||||
vaddr_t, /* XXX unused -- compat w/sparc */
|
||||
bus_space_handle_t *));
|
||||
static void *sbus_intr_establish __P((
|
||||
bus_space_handle_t *);
|
||||
static void *sbus_intr_establish(
|
||||
bus_space_tag_t,
|
||||
int, /*Sbus interrupt level*/
|
||||
int, /*`device class' priority*/
|
||||
int (*) __P((void *)), /*handler*/
|
||||
int, /*Sbus interrupt level*/
|
||||
int (*)(void *), /*handler*/
|
||||
void *, /*handler arg*/
|
||||
void (*) __P((void)))); /*optional fast trap*/
|
||||
void (*)(void)); /*optional fast trap*/
|
||||
|
||||
|
||||
/* autoconfiguration driver */
|
||||
int sbus_match __P((struct device *, struct cfdata *, void *));
|
||||
void sbus_attach __P((struct device *, struct device *, void *));
|
||||
int sbus_match(struct device *, struct cfdata *, void *);
|
||||
void sbus_attach(struct device *, struct device *, void *);
|
||||
|
||||
|
||||
CFATTACH_DECL(sbus, sizeof(struct sbus_softc),
|
||||
|
@ -104,23 +104,20 @@ extern struct cfdriver sbus_cd;
|
|||
/*
|
||||
* DVMA routines
|
||||
*/
|
||||
int sbus_dmamap_load __P((bus_dma_tag_t, bus_dmamap_t, void *,
|
||||
bus_size_t, struct proc *, int));
|
||||
void sbus_dmamap_unload __P((bus_dma_tag_t, bus_dmamap_t));
|
||||
int sbus_dmamap_load_raw __P((bus_dma_tag_t, bus_dmamap_t,
|
||||
bus_dma_segment_t *, int, bus_size_t, int));
|
||||
void sbus_dmamap_sync __P((bus_dma_tag_t, bus_dmamap_t, bus_addr_t,
|
||||
bus_size_t, int));
|
||||
int sbus_dmamem_alloc __P((bus_dma_tag_t tag, bus_size_t size,
|
||||
bus_size_t alignment, bus_size_t boundary,
|
||||
bus_dma_segment_t *segs, int nsegs, int *rsegs,
|
||||
int flags));
|
||||
void sbus_dmamem_free __P((bus_dma_tag_t tag, bus_dma_segment_t *segs,
|
||||
int nsegs));
|
||||
int sbus_dmamem_map __P((bus_dma_tag_t tag, bus_dma_segment_t *segs,
|
||||
int nsegs, size_t size, caddr_t *kvap, int flags));
|
||||
void sbus_dmamem_unmap __P((bus_dma_tag_t tag, caddr_t kva,
|
||||
size_t size));
|
||||
int sbus_dmamap_load(bus_dma_tag_t, bus_dmamap_t, void *, bus_size_t,
|
||||
struct proc *, int);
|
||||
void sbus_dmamap_unload(bus_dma_tag_t, bus_dmamap_t);
|
||||
int sbus_dmamap_load_raw(bus_dma_tag_t, bus_dmamap_t, bus_dma_segment_t *,
|
||||
int, bus_size_t, int);
|
||||
void sbus_dmamap_sync(bus_dma_tag_t, bus_dmamap_t, bus_addr_t, bus_size_t,
|
||||
int);
|
||||
int sbus_dmamem_alloc(bus_dma_tag_t tag, bus_size_t size,
|
||||
bus_size_t alignment, bus_size_t boundary,
|
||||
bus_dma_segment_t *segs, int nsegs, int *rsegs, int flags);
|
||||
void sbus_dmamem_free(bus_dma_tag_t tag, bus_dma_segment_t *segs, int nsegs);
|
||||
int sbus_dmamem_map(bus_dma_tag_t tag, bus_dma_segment_t *segs, int nsegs,
|
||||
size_t size, caddr_t *kvap, int flags);
|
||||
void sbus_dmamem_unmap(bus_dma_tag_t tag, caddr_t kva, size_t size);
|
||||
|
||||
/*
|
||||
* Child devices receive the Sbus interrupt level in their attach
|
||||
|
@ -170,10 +167,7 @@ sbus_print(args, busname)
|
|||
}
|
||||
|
||||
int
|
||||
sbus_match(parent, cf, aux)
|
||||
struct device *parent;
|
||||
struct cfdata *cf;
|
||||
void *aux;
|
||||
sbus_match(struct device *parent, struct cfdata *cf, void *aux)
|
||||
{
|
||||
struct mainbus_attach_args *ma = aux;
|
||||
|
||||
|
@ -184,10 +178,7 @@ sbus_match(parent, cf, aux)
|
|||
* Attach an Sbus.
|
||||
*/
|
||||
void
|
||||
sbus_attach(parent, self, aux)
|
||||
struct device *parent;
|
||||
struct device *self;
|
||||
void *aux;
|
||||
sbus_attach(struct device *parent, struct device *self, void *aux)
|
||||
{
|
||||
struct sbus_softc *sc = (struct sbus_softc *)self;
|
||||
struct mainbus_attach_args *ma = aux;
|
||||
|
@ -400,13 +391,8 @@ sbus_destroy_attach_args(sa)
|
|||
|
||||
|
||||
int
|
||||
_sbus_bus_map(t, addr, size, flags, v, hp)
|
||||
bus_space_tag_t t;
|
||||
bus_addr_t addr;
|
||||
bus_size_t size;
|
||||
int flags;
|
||||
vaddr_t v;
|
||||
bus_space_handle_t *hp;
|
||||
_sbus_bus_map(bus_space_tag_t t, bus_addr_t addr, bus_size_t size, int flags,
|
||||
vaddr_t v, bus_space_handle_t *hp)
|
||||
{
|
||||
int error;
|
||||
|
||||
|
@ -482,8 +468,7 @@ sbus_establish(sd, dev)
|
|||
* Reset the given sbus.
|
||||
*/
|
||||
void
|
||||
sbusreset(sbus)
|
||||
int sbus;
|
||||
sbusreset(int sbus)
|
||||
{
|
||||
register struct sbusdev *sd;
|
||||
struct sbus_softc *sc = sbus_cd.cd_devs[sbus];
|
||||
|
@ -510,8 +495,7 @@ sbusreset(sbus)
|
|||
* The same needs to be done to PCI controller drivers.
|
||||
*/
|
||||
int
|
||||
sbus_overtemp(arg)
|
||||
void *arg;
|
||||
sbus_overtemp(void *arg)
|
||||
{
|
||||
/* Should try a clean shutdown first */
|
||||
printf("DANGER: OVER TEMPERATURE detected\nShutting down...\n");
|
||||
|
@ -523,12 +507,8 @@ sbus_overtemp(arg)
|
|||
* Get interrupt attributes for an Sbus device.
|
||||
*/
|
||||
int
|
||||
sbus_get_intr(sc, node, ipp, np, slot)
|
||||
struct sbus_softc *sc;
|
||||
int node;
|
||||
struct openprom_intr **ipp;
|
||||
int *np;
|
||||
int slot;
|
||||
sbus_get_intr(struct sbus_softc *sc, int node, struct openprom_intr **ipp,
|
||||
int *np, int slot)
|
||||
{
|
||||
int *ipl;
|
||||
int n, i;
|
||||
|
@ -598,13 +578,8 @@ sbus_get_intr(sc, node, ipp, np, slot)
|
|||
* Install an interrupt handler for an Sbus device.
|
||||
*/
|
||||
void *
|
||||
sbus_intr_establish(t, pri, level, handler, arg, fastvec)
|
||||
bus_space_tag_t t;
|
||||
int pri;
|
||||
int level;
|
||||
int (*handler) __P((void *));
|
||||
void *arg;
|
||||
void (*fastvec) __P((void)); /* ignored */
|
||||
sbus_intr_establish(bus_space_tag_t t, int pri, int level,
|
||||
int (*handler)(void *), void *arg, void (*fastvec)(void))
|
||||
{
|
||||
struct sbus_softc *sc = t->cookie;
|
||||
struct intrhand *ih;
|
||||
|
@ -688,8 +663,7 @@ sbus_intr_establish(t, pri, level, handler, arg, fastvec)
|
|||
}
|
||||
|
||||
static bus_dma_tag_t
|
||||
sbus_alloc_dmatag(sc)
|
||||
struct sbus_softc *sc;
|
||||
sbus_alloc_dmatag(struct sbus_softc *sc)
|
||||
{
|
||||
bus_dma_tag_t sdt, psdt = sc->sc_dmatag;
|
||||
|
||||
|
@ -721,13 +695,8 @@ sbus_alloc_dmatag(sc)
|
|||
}
|
||||
|
||||
int
|
||||
sbus_dmamap_load(tag, map, buf, buflen, p, flags)
|
||||
bus_dma_tag_t tag;
|
||||
bus_dmamap_t map;
|
||||
void *buf;
|
||||
bus_size_t buflen;
|
||||
struct proc *p;
|
||||
int flags;
|
||||
sbus_dmamap_load(bus_dma_tag_t tag, bus_dmamap_t map, void *buf,
|
||||
bus_size_t buflen, struct proc *p, int flags)
|
||||
{
|
||||
struct sbus_softc *sc = (struct sbus_softc *)tag->_cookie;
|
||||
|
||||
|
@ -735,13 +704,8 @@ sbus_dmamap_load(tag, map, buf, buflen, p, flags)
|
|||
}
|
||||
|
||||
int
|
||||
sbus_dmamap_load_raw(tag, map, segs, nsegs, size, flags)
|
||||
bus_dma_tag_t tag;
|
||||
bus_dmamap_t map;
|
||||
bus_dma_segment_t *segs;
|
||||
int nsegs;
|
||||
bus_size_t size;
|
||||
int flags;
|
||||
sbus_dmamap_load_raw(bus_dma_tag_t tag, bus_dmamap_t map,
|
||||
bus_dma_segment_t *segs, int nsegs, bus_size_t size, int flags)
|
||||
{
|
||||
struct sbus_softc *sc = (struct sbus_softc *)tag->_cookie;
|
||||
|
||||
|
@ -749,9 +713,7 @@ sbus_dmamap_load_raw(tag, map, segs, nsegs, size, flags)
|
|||
}
|
||||
|
||||
void
|
||||
sbus_dmamap_unload(tag, map)
|
||||
bus_dma_tag_t tag;
|
||||
bus_dmamap_t map;
|
||||
sbus_dmamap_unload(bus_dma_tag_t tag, bus_dmamap_t map)
|
||||
{
|
||||
struct sbus_softc *sc = (struct sbus_softc *)tag->_cookie;
|
||||
|
||||
|
@ -759,12 +721,8 @@ sbus_dmamap_unload(tag, map)
|
|||
}
|
||||
|
||||
void
|
||||
sbus_dmamap_sync(tag, map, offset, len, ops)
|
||||
bus_dma_tag_t tag;
|
||||
bus_dmamap_t map;
|
||||
bus_addr_t offset;
|
||||
bus_size_t len;
|
||||
int ops;
|
||||
sbus_dmamap_sync(bus_dma_tag_t tag, bus_dmamap_t map, bus_addr_t offset,
|
||||
bus_size_t len, int ops)
|
||||
{
|
||||
struct sbus_softc *sc = (struct sbus_softc *)tag->_cookie;
|
||||
|
||||
|
@ -781,15 +739,9 @@ sbus_dmamap_sync(tag, map, offset, len, ops)
|
|||
}
|
||||
|
||||
int
|
||||
sbus_dmamem_alloc(tag, size, alignment, boundary, segs, nsegs, rsegs, flags)
|
||||
bus_dma_tag_t tag;
|
||||
bus_size_t size;
|
||||
bus_size_t alignment;
|
||||
bus_size_t boundary;
|
||||
bus_dma_segment_t *segs;
|
||||
int nsegs;
|
||||
int *rsegs;
|
||||
int flags;
|
||||
sbus_dmamem_alloc(bus_dma_tag_t tag, bus_size_t size, bus_size_t alignment,
|
||||
bus_size_t boundary, bus_dma_segment_t *segs, int nsegs, int *rsegs,
|
||||
int flags)
|
||||
{
|
||||
struct sbus_softc *sc = (struct sbus_softc *)tag->_cookie;
|
||||
|
||||
|
@ -798,10 +750,7 @@ sbus_dmamem_alloc(tag, size, alignment, boundary, segs, nsegs, rsegs, flags)
|
|||
}
|
||||
|
||||
void
|
||||
sbus_dmamem_free(tag, segs, nsegs)
|
||||
bus_dma_tag_t tag;
|
||||
bus_dma_segment_t *segs;
|
||||
int nsegs;
|
||||
sbus_dmamem_free(bus_dma_tag_t tag, bus_dma_segment_t *segs, int nsegs)
|
||||
{
|
||||
struct sbus_softc *sc = (struct sbus_softc *)tag->_cookie;
|
||||
|
||||
|
@ -809,13 +758,8 @@ sbus_dmamem_free(tag, segs, nsegs)
|
|||
}
|
||||
|
||||
int
|
||||
sbus_dmamem_map(tag, segs, nsegs, size, kvap, flags)
|
||||
bus_dma_tag_t tag;
|
||||
bus_dma_segment_t *segs;
|
||||
int nsegs;
|
||||
size_t size;
|
||||
caddr_t *kvap;
|
||||
int flags;
|
||||
sbus_dmamem_map(bus_dma_tag_t tag, bus_dma_segment_t *segs, int nsegs,
|
||||
size_t size, caddr_t *kvap, int flags)
|
||||
{
|
||||
struct sbus_softc *sc = (struct sbus_softc *)tag->_cookie;
|
||||
|
||||
|
@ -823,10 +767,7 @@ sbus_dmamem_map(tag, segs, nsegs, size, kvap, flags)
|
|||
}
|
||||
|
||||
void
|
||||
sbus_dmamem_unmap(tag, kva, size)
|
||||
bus_dma_tag_t tag;
|
||||
caddr_t kva;
|
||||
size_t size;
|
||||
sbus_dmamem_unmap(bus_dma_tag_t tag, caddr_t kva, size_t size)
|
||||
{
|
||||
struct sbus_softc *sc = (struct sbus_softc *)tag->_cookie;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: zs.c,v 1.56 2005/12/11 12:19:10 christos Exp $ */
|
||||
/* $NetBSD: zs.c,v 1.57 2006/02/11 17:57:31 cdi Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
|
@ -45,7 +45,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.56 2005/12/11 12:19:10 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.57 2006/02/11 17:57:31 cdi Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
|
@ -139,9 +139,9 @@ static u_char zs_init_reg[16] = {
|
|||
};
|
||||
|
||||
/* Console ops */
|
||||
static int zscngetc __P((dev_t));
|
||||
static void zscnputc __P((dev_t, int));
|
||||
static void zscnpollc __P((dev_t, int));
|
||||
static int zscngetc(dev_t);
|
||||
static void zscnputc(dev_t, int);
|
||||
static void zscnpollc(dev_t, int);
|
||||
|
||||
struct consdev zs_consdev = {
|
||||
NULL,
|
||||
|
@ -158,11 +158,11 @@ struct consdev zs_consdev = {
|
|||
****************************************************************/
|
||||
|
||||
/* Definition of the driver for autoconfig. */
|
||||
static int zs_match_sbus __P((struct device *, struct cfdata *, void *));
|
||||
static void zs_attach_sbus __P((struct device *, struct device *, void *));
|
||||
static int zs_match_sbus(struct device *, struct cfdata *, void *);
|
||||
static void zs_attach_sbus(struct device *, struct device *, void *);
|
||||
|
||||
static void zs_attach __P((struct zsc_softc *, struct zsdevice *, int));
|
||||
static int zs_print __P((void *, const char *name));
|
||||
static void zs_attach(struct zsc_softc *, struct zsdevice *, int);
|
||||
static int zs_print(void *, const char *);
|
||||
|
||||
CFATTACH_DECL(zs, sizeof(struct zsc_softc),
|
||||
zs_match_sbus, zs_attach_sbus, NULL, NULL);
|
||||
|
@ -170,18 +170,18 @@ CFATTACH_DECL(zs, sizeof(struct zsc_softc),
|
|||
extern struct cfdriver zs_cd;
|
||||
|
||||
/* Interrupt handlers. */
|
||||
int zscheckintr __P((void *));
|
||||
static int zshard __P((void *));
|
||||
static void zssoft __P((void *));
|
||||
int zscheckintr(void *);
|
||||
static int zshard(void *);
|
||||
static void zssoft(void *);
|
||||
|
||||
static int zs_get_speed __P((struct zs_chanstate *));
|
||||
static int zs_get_speed(struct zs_chanstate *);
|
||||
|
||||
/* Console device support */
|
||||
static int zs_console_flags __P((int, int, int));
|
||||
static int zs_console_flags(int, int, int);
|
||||
|
||||
/* Power management hooks */
|
||||
int zs_enable __P((struct zs_chanstate *));
|
||||
void zs_disable __P((struct zs_chanstate *));
|
||||
int zs_enable(struct zs_chanstate *);
|
||||
void zs_disable(struct zs_chanstate *);
|
||||
|
||||
/* from dev/ic/z8530tty.c */
|
||||
struct tty *zstty_get_tty_from_dev(struct device *);
|
||||
|
@ -190,10 +190,7 @@ struct tty *zstty_get_tty_from_dev(struct device *);
|
|||
* Is the zs chip present?
|
||||
*/
|
||||
static int
|
||||
zs_match_sbus(parent, cf, aux)
|
||||
struct device *parent;
|
||||
struct cfdata *cf;
|
||||
void *aux;
|
||||
zs_match_sbus(struct device *parent, struct cfdata *cf, void *aux)
|
||||
{
|
||||
struct sbus_attach_args *sa = aux;
|
||||
|
||||
|
@ -204,10 +201,7 @@ zs_match_sbus(parent, cf, aux)
|
|||
}
|
||||
|
||||
static void
|
||||
zs_attach_sbus(parent, self, aux)
|
||||
struct device *parent;
|
||||
struct device *self;
|
||||
void *aux;
|
||||
zs_attach_sbus(struct device *parent, struct device *self, void *aux)
|
||||
{
|
||||
struct zsc_softc *zsc = (void *) self;
|
||||
struct sbus_attach_args *sa = aux;
|
||||
|
@ -265,10 +259,7 @@ zs_attach_sbus(parent, self, aux)
|
|||
* SOFT CARRIER, AND keyboard PROPERTY FOR KEYBOARD/MOUSE?
|
||||
*/
|
||||
static void
|
||||
zs_attach(zsc, zsd, pri)
|
||||
struct zsc_softc *zsc;
|
||||
struct zsdevice *zsd;
|
||||
int pri;
|
||||
zs_attach(struct zsc_softc *zsc, struct zsdevice *zsd, int pri)
|
||||
{
|
||||
struct zsc_attach_args zsc_args;
|
||||
struct zs_chanstate *cs;
|
||||
|
@ -418,9 +409,7 @@ zs_attach(zsc, zsd, pri)
|
|||
}
|
||||
|
||||
static int
|
||||
zs_print(aux, name)
|
||||
void *aux;
|
||||
const char *name;
|
||||
zs_print(void *aux, const char *name)
|
||||
{
|
||||
struct zsc_attach_args *args = aux;
|
||||
|
||||
|
@ -437,8 +426,7 @@ zs_print(aux, name)
|
|||
static volatile int zssoftpending;
|
||||
|
||||
static int
|
||||
zshard(arg)
|
||||
void *arg;
|
||||
zshard(void *arg)
|
||||
{
|
||||
struct zsc_softc *zsc = (struct zsc_softc *)arg;
|
||||
int rr3, rval;
|
||||
|
@ -459,8 +447,7 @@ zshard(arg)
|
|||
}
|
||||
|
||||
int
|
||||
zscheckintr(arg)
|
||||
void *arg;
|
||||
zscheckintr(void *arg)
|
||||
{
|
||||
struct zsc_softc *zsc;
|
||||
int unit, rval;
|
||||
|
@ -481,8 +468,7 @@ zscheckintr(arg)
|
|||
* We need this only for TTY_DEBUG purposes.
|
||||
*/
|
||||
static void
|
||||
zssoft(arg)
|
||||
void *arg;
|
||||
zssoft(void *arg)
|
||||
{
|
||||
struct zsc_softc *zsc = (struct zsc_softc *)arg;
|
||||
int s;
|
||||
|
@ -511,8 +497,7 @@ zssoft(arg)
|
|||
* Compute the current baud rate given a ZS channel.
|
||||
*/
|
||||
static int
|
||||
zs_get_speed(cs)
|
||||
struct zs_chanstate *cs;
|
||||
zs_get_speed(struct zs_chanstate *cs)
|
||||
{
|
||||
int tconst;
|
||||
|
||||
|
@ -676,7 +661,7 @@ void zs_write_data(cs, val)
|
|||
* XXX - I think I like the mvme167 code better. -gwr
|
||||
****************************************************************/
|
||||
|
||||
extern void Debugger __P((void));
|
||||
extern void Debugger(void);
|
||||
|
||||
/*
|
||||
* Handle user request to enter kernel debugger.
|
||||
|
@ -785,8 +770,7 @@ zs_putc(arg, c)
|
|||
* Polled console input putchar.
|
||||
*/
|
||||
static int
|
||||
zscngetc(dev)
|
||||
dev_t dev;
|
||||
zscngetc(dev_t dev)
|
||||
{
|
||||
return (zs_getc(zs_conschan_get));
|
||||
}
|
||||
|
@ -795,9 +779,7 @@ zscngetc(dev)
|
|||
* Polled console output putchar.
|
||||
*/
|
||||
static void
|
||||
zscnputc(dev, c)
|
||||
dev_t dev;
|
||||
int c;
|
||||
zscnputc(dev_t dev, int c)
|
||||
{
|
||||
zs_putc(zs_conschan_put, c);
|
||||
}
|
||||
|
@ -805,9 +787,7 @@ zscnputc(dev, c)
|
|||
int swallow_zsintrs;
|
||||
|
||||
static void
|
||||
zscnpollc(dev, on)
|
||||
dev_t dev;
|
||||
int on;
|
||||
zscnpollc(dev_t dev, int on)
|
||||
{
|
||||
/*
|
||||
* Need to tell zs driver to acknowledge all interrupts or we get
|
||||
|
@ -821,10 +801,7 @@ zscnpollc(dev, on)
|
|||
}
|
||||
|
||||
int
|
||||
zs_console_flags(promunit, node, channel)
|
||||
int promunit;
|
||||
int node;
|
||||
int channel;
|
||||
zs_console_flags(int promunit, int node, int channel)
|
||||
{
|
||||
int cookie, flags = 0;
|
||||
char buf[255];
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: bootinfo.h,v 1.2 2006/01/27 18:37:49 cdi Exp $ */
|
||||
/* $NetBSD: bootinfo.h,v 1.3 2006/02/11 17:57:31 cdi Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2005 The NetBSD Foundation, Inc.
|
||||
|
@ -69,7 +69,7 @@
|
|||
* Kernels written for pre-v1.8 ofwboot require first three cells to present
|
||||
* in this particular order, those that rely on v1.9 and higher won't work if
|
||||
* the last pointer is not in the table; therefore, the vector cannot be
|
||||
* shorter than 4 * sizeof(u_int32_t) or 4 * sizeof(u_int64_t) for 32-bit and
|
||||
* shorter than 4 * sizeof(uint32_t) or 4 * sizeof(uint64_t) for 32-bit and
|
||||
* 64-bit boot loader, respectively.
|
||||
*
|
||||
* As of ofwboot v1.9, bootinfo binary object is placed right after the kernel
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cpu.h,v 1.51 2006/01/27 18:37:49 cdi Exp $ */
|
||||
/* $NetBSD: cpu.h,v 1.52 2006/02/11 17:57:31 cdi Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -294,8 +294,8 @@ struct intrhand {
|
|||
char ih_pil; /* interrupt priority */
|
||||
struct intrhand *ih_next; /* global list */
|
||||
struct intrhand *ih_pending; /* interrupt queued */
|
||||
volatile u_int64_t *ih_map; /* Interrupt map reg */
|
||||
volatile u_int64_t *ih_clr; /* clear interrupt reg */
|
||||
volatile uint64_t *ih_map; /* Interrupt map reg */
|
||||
volatile uint64_t *ih_clr; /* clear interrupt reg */
|
||||
};
|
||||
extern struct intrhand *intrhand[];
|
||||
extern struct intrhand *intrlev[MAXINTNUM];
|
||||
|
@ -325,8 +325,8 @@ int statintr __P((void *)); /* level 14 (statclock) interrupt code */
|
|||
struct fpstate64;
|
||||
void savefpstate __P((struct fpstate64 *));
|
||||
void loadfpstate __P((struct fpstate64 *));
|
||||
u_int64_t probeget __P((paddr_t, int, int));
|
||||
int probeset __P((paddr_t, int, int, u_int64_t));
|
||||
uint64_t probeget __P((paddr_t, int, int));
|
||||
int probeset __P((paddr_t, int, int, uint64_t));
|
||||
|
||||
#define write_all_windows() __asm volatile("flushw" : : )
|
||||
#define write_user_windows() __asm volatile("flushw" : : )
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ctlreg.h,v 1.39 2005/12/24 23:24:06 perry Exp $ */
|
||||
/* $NetBSD: ctlreg.h,v 1.40 2006/02/11 17:57:31 cdi Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-2002 Eduardo Horvath
|
||||
|
@ -487,7 +487,7 @@ lduba(paddr_t loc, int asi)
|
|||
{
|
||||
register unsigned int _lduba_v, _loc_hi, _pstate;
|
||||
|
||||
_loc_hi = (((u_int64_t)loc)>>32);
|
||||
_loc_hi = (((uint64_t)loc)>>32);
|
||||
if (PHYS_ASI(asi)) {
|
||||
__asm volatile(
|
||||
"wr %4,%%g0,%%asi; "
|
||||
|
@ -536,7 +536,7 @@ static inline u_short
|
|||
lduha(paddr_t loc, int asi) {
|
||||
register unsigned int _lduha_v, _loc_hi, _pstate;
|
||||
|
||||
_loc_hi = (((u_int64_t)loc)>>32);
|
||||
_loc_hi = (((uint64_t)loc)>>32);
|
||||
|
||||
if (PHYS_ASI(asi)) {
|
||||
__asm volatile(
|
||||
|
@ -602,7 +602,7 @@ lda(paddr_t loc, int asi)
|
|||
{
|
||||
register unsigned int _lda_v, _loc_hi, _pstate;
|
||||
|
||||
_loc_hi = (((u_int64_t)loc)>>32);
|
||||
_loc_hi = (((uint64_t)loc)>>32);
|
||||
if (PHYS_ASI(asi)) {
|
||||
__asm volatile(
|
||||
"wr %4,%%g0,%%asi; "
|
||||
|
@ -636,7 +636,7 @@ ldswa(paddr_t loc, int asi)
|
|||
{
|
||||
register int _lda_v, _loc_hi, _pstate;
|
||||
|
||||
_loc_hi = (((u_int64_t)loc)>>32);
|
||||
_loc_hi = (((uint64_t)loc)>>32);
|
||||
if (PHYS_ASI(asi)) {
|
||||
__asm volatile(
|
||||
"wr %4,%%g0,%%asi; "
|
||||
|
@ -667,7 +667,7 @@ ldswa(paddr_t loc, int asi)
|
|||
|
||||
#ifdef __arch64__
|
||||
/* load 64-bit int from alternate address space -- these should never be used */
|
||||
static inline u_int64_t
|
||||
static inline uint64_t
|
||||
ldda(paddr_t loc, int asi)
|
||||
{
|
||||
register long long _lda_v;
|
||||
|
@ -681,12 +681,12 @@ ldda(paddr_t loc, int asi)
|
|||
}
|
||||
#else
|
||||
/* load 64-bit int from alternate address space */
|
||||
static inline u_int64_t
|
||||
static inline uint64_t
|
||||
ldda(paddr_t loc, int asi)
|
||||
{
|
||||
register long long _lda_v, _loc_hi, _pstate;
|
||||
|
||||
_loc_hi = (((u_int64_t)loc)>>32);
|
||||
_loc_hi = (((uint64_t)loc)>>32);
|
||||
if (PHYS_ASI(asi)) {
|
||||
__asm volatile(
|
||||
"wr %4,%%g0,%%asi; "
|
||||
|
@ -718,7 +718,7 @@ ldda(paddr_t loc, int asi)
|
|||
|
||||
#ifdef __arch64__
|
||||
/* native load 64-bit int from alternate address space w/64-bit compiler*/
|
||||
static inline u_int64_t
|
||||
static inline uint64_t
|
||||
ldxa(paddr_t loc, int asi)
|
||||
{
|
||||
register unsigned long _lda_v;
|
||||
|
@ -732,12 +732,12 @@ ldxa(paddr_t loc, int asi)
|
|||
}
|
||||
#else
|
||||
/* native load 64-bit int from alternate address space w/32-bit compiler*/
|
||||
static inline u_int64_t
|
||||
static inline uint64_t
|
||||
ldxa(paddr_t loc, int asi)
|
||||
{
|
||||
register unsigned long _ldxa_lo, _ldxa_hi, _loc_hi;
|
||||
|
||||
_loc_hi = (((u_int64_t)loc)>>32);
|
||||
_loc_hi = (((uint64_t)loc)>>32);
|
||||
if (PHYS_ASI(asi)) {
|
||||
__asm volatile(
|
||||
"wr %4,%%g0,%%asi; "
|
||||
|
@ -786,7 +786,7 @@ stba(paddr_t loc, int asi, u_char value)
|
|||
{
|
||||
register int _loc_hi, _pstate;
|
||||
|
||||
_loc_hi = (((u_int64_t)loc)>>32);
|
||||
_loc_hi = (((uint64_t)loc)>>32);
|
||||
if (PHYS_ASI(asi)) {
|
||||
__asm volatile(
|
||||
"wr %5,%%g0,%%asi; "
|
||||
|
@ -830,7 +830,7 @@ stha(paddr_t loc, int asi, u_short value)
|
|||
{
|
||||
register int _loc_hi, _pstate;
|
||||
|
||||
_loc_hi = (((u_int64_t)loc)>>32);
|
||||
_loc_hi = (((uint64_t)loc)>>32);
|
||||
if (PHYS_ASI(asi)) {
|
||||
__asm volatile(
|
||||
"wr %5,%%g0,%%asi; "
|
||||
|
@ -877,7 +877,7 @@ sta(paddr_t loc, int asi, u_int value)
|
|||
{
|
||||
register int _loc_hi, _pstate;
|
||||
|
||||
_loc_hi = (((u_int64_t)loc)>>32);
|
||||
_loc_hi = (((uint64_t)loc)>>32);
|
||||
if (PHYS_ASI(asi)) {
|
||||
__asm volatile(
|
||||
"wr %5,%%g0,%%asi; "
|
||||
|
@ -909,7 +909,7 @@ sta(paddr_t loc, int asi, u_int value)
|
|||
/* store 64-bit int to alternate address space */
|
||||
#ifdef __arch64__
|
||||
static inline void
|
||||
stda(paddr_t loc, int asi, u_int64_t value)
|
||||
stda(paddr_t loc, int asi, uint64_t value)
|
||||
{
|
||||
__asm volatile(
|
||||
"wr %2,%%g0,%%asi; "
|
||||
|
@ -919,11 +919,11 @@ stda(paddr_t loc, int asi, u_int64_t value)
|
|||
}
|
||||
#else
|
||||
static inline void
|
||||
stda(paddr_t loc, int asi, u_int64_t value)
|
||||
stda(paddr_t loc, int asi, uint64_t value)
|
||||
{
|
||||
register int _loc_hi, _pstate;
|
||||
|
||||
_loc_hi = (((u_int64_t)loc)>>32);
|
||||
_loc_hi = (((uint64_t)loc)>>32);
|
||||
if (PHYS_ASI(asi)) {
|
||||
__asm volatile(
|
||||
"wr %5,%%g0,%%asi; "
|
||||
|
@ -957,7 +957,7 @@ stda(paddr_t loc, int asi, u_int64_t value)
|
|||
#ifdef __arch64__
|
||||
/* native store 64-bit int to alternate address space w/64-bit compiler*/
|
||||
static inline void
|
||||
stxa(paddr_t loc, int asi, u_int64_t value)
|
||||
stxa(paddr_t loc, int asi, uint64_t value)
|
||||
{
|
||||
__asm volatile(
|
||||
"wr %2,%%g0,%%asi; "
|
||||
|
@ -969,13 +969,13 @@ stxa(paddr_t loc, int asi, u_int64_t value)
|
|||
#else
|
||||
/* native store 64-bit int to alternate address space w/32-bit compiler*/
|
||||
static inline void
|
||||
stxa(paddr_t loc, int asi, u_int64_t value)
|
||||
stxa(paddr_t loc, int asi, uint64_t value)
|
||||
{
|
||||
int _stxa_lo, _stxa_hi, _loc_hi;
|
||||
|
||||
_stxa_lo = value;
|
||||
_stxa_hi = ((u_int64_t)value)>>32;
|
||||
_loc_hi = (((u_int64_t)loc)>>32);
|
||||
_stxa_hi = ((uint64_t)value)>>32;
|
||||
_loc_hi = (((uint64_t)loc)>>32);
|
||||
|
||||
if (PHYS_ASI(asi)) {
|
||||
__asm volatile(
|
||||
|
@ -1013,8 +1013,8 @@ stxa(paddr_t loc, int asi, u_int64_t value)
|
|||
|
||||
#ifdef __arch64__
|
||||
/* native store 32-bit int to alternate address space w/64-bit compiler*/
|
||||
static inline u_int32_t
|
||||
casa(paddr_t loc, int asi, u_int32_t value, u_int32_t oldvalue)
|
||||
static inline uint32_t
|
||||
casa(paddr_t loc, int asi, uint32_t value, uint32_t oldvalue)
|
||||
{
|
||||
__asm volatile(
|
||||
"wr %3,%%g0,%%asi; "
|
||||
|
@ -1025,8 +1025,8 @@ casa(paddr_t loc, int asi, u_int32_t value, u_int32_t oldvalue)
|
|||
return (value);
|
||||
}
|
||||
/* native store 64-bit int to alternate address space w/64-bit compiler*/
|
||||
static inline u_int64_t
|
||||
casxa(paddr_t loc, int asi, u_int64_t value, u_int64_t oldvalue)
|
||||
static inline uint64_t
|
||||
casxa(paddr_t loc, int asi, uint64_t value, uint64_t oldvalue)
|
||||
{
|
||||
__asm volatile(
|
||||
"wr %3,%%g0,%%asi; "
|
||||
|
@ -1039,15 +1039,15 @@ casxa(paddr_t loc, int asi, u_int64_t value, u_int64_t oldvalue)
|
|||
#else
|
||||
#if 0
|
||||
/* native store 64-bit int to alternate address space w/32-bit compiler*/
|
||||
static inline u_int64_t
|
||||
casxa(paddr_t loc, int asi, u_int64_t value, u_int64_t oldvalue)
|
||||
static inline uint64_t
|
||||
casxa(paddr_t loc, int asi, uint64_t value, uint64_t oldvalue)
|
||||
{
|
||||
int _casxa_lo, _casxa_hi, _loc_hi, _oval_hi;
|
||||
|
||||
_casxa_lo = value;
|
||||
_casxa_hi = ((u_int64_t)value)>>32;
|
||||
_oval_hi = ((u_int64_t)oldvalue)>>32;
|
||||
_loc_hi = (((u_int64_t)loc)>>32);
|
||||
_casxa_hi = ((uint64_t)value)>>32;
|
||||
_oval_hi = ((uint64_t)oldvalue)>>32;
|
||||
_loc_hi = (((uint64_t)loc)>>32);
|
||||
|
||||
#ifdef __notyet
|
||||
/*
|
||||
|
@ -1095,7 +1095,7 @@ casxa(paddr_t loc, int asi, u_int64_t value, u_int64_t oldvalue)
|
|||
: "memory");
|
||||
}
|
||||
#endif
|
||||
return (((u_int64_t)_casxa_hi<<32)|(u_int64_t)_casxa_lo);
|
||||
return (((uint64_t)_casxa_hi<<32)|(uint64_t)_casxa_lo);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
@ -1160,7 +1160,7 @@ casxa(paddr_t loc, int asi, u_int64_t value, u_int64_t oldvalue)
|
|||
register u_int _tick_hi = 0, _tick_lo = 0; \
|
||||
__asm volatile("rdpr %%tick, %0; srl %0,0,%1; srlx %0,32,%0 " \
|
||||
: "=r" (_tick_hi), "=r" (_tick_lo) : ); \
|
||||
(((u_int64_t)_tick_hi)<<32)|((u_int64_t)_tick_lo); \
|
||||
(((uint64_t)_tick_hi)<<32)|((uint64_t)_tick_lo); \
|
||||
})
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: netbsd32_machdep.h,v 1.19 2005/12/11 12:19:10 christos Exp $ */
|
||||
/* $NetBSD: netbsd32_machdep.h,v 1.20 2006/02/11 17:57:31 cdi Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998, 2001 Matthew R. Green
|
||||
|
@ -35,7 +35,7 @@
|
|||
|
||||
struct proc;
|
||||
|
||||
typedef u_int32_t netbsd32_pointer_t;
|
||||
typedef uint32_t netbsd32_pointer_t;
|
||||
|
||||
/*
|
||||
* Convert a pointer in the 32-bit world to a valid 64-bit pointer.
|
||||
|
@ -43,7 +43,7 @@ typedef u_int32_t netbsd32_pointer_t;
|
|||
#define NETBSD32PTR64(p32) ((void *)(u_long)(u_int)(p32))
|
||||
|
||||
/* from <arch/sparc/include/signal.h> */
|
||||
typedef u_int32_t netbsd32_sigcontextp_t;
|
||||
typedef uint32_t netbsd32_sigcontextp_t;
|
||||
|
||||
struct netbsd32_sigcontext {
|
||||
int sc_onstack; /* sigstack state to restore */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pcb.h,v 1.13 2005/12/11 12:19:10 christos Exp $ */
|
||||
/* $NetBSD: pcb.h,v 1.14 2006/02/11 17:57:31 cdi Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -151,8 +151,8 @@
|
|||
* change this as soon as the new scheme is debugged.
|
||||
*/
|
||||
struct pcb {
|
||||
u_int64_t pcb_sp; /* sp (%o6) when switch() was called */
|
||||
u_int64_t pcb_pc; /* pc (%o7) when switch() was called */
|
||||
uint64_t pcb_sp; /* sp (%o6) when switch() was called */
|
||||
uint64_t pcb_pc; /* pc (%o7) when switch() was called */
|
||||
caddr_t pcb_onfault; /* for copyin/out */
|
||||
short pcb_pstate; /* %pstate when switch() was called -- may be useful if we support multiple memory models */
|
||||
char pcb_nsaved; /* number of windows saved in pcb */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pci_machdep.h,v 1.17 2005/12/11 12:19:10 christos Exp $ */
|
||||
/* $NetBSD: pci_machdep.h,v 1.18 2006/02/11 17:57:31 cdi Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999 Matthew R. Green
|
||||
|
@ -53,7 +53,7 @@ struct sparc_pci_chipset {
|
|||
* scalar type. But we really need to store both the OFW node and
|
||||
* the bus/device/function info in it. (We'd like to store more,
|
||||
* like all the ofw properties, but we don't need to.) Luckily,
|
||||
* both are 32-bit values, so we can squeeze them into a u_int64_t
|
||||
* both are 32-bit values, so we can squeeze them into a uint64_t
|
||||
* with a little help from some macros.
|
||||
*/
|
||||
|
||||
|
@ -62,9 +62,9 @@ struct sparc_pci_chipset {
|
|||
#define PCITAG_BUS(t) ((PCITAG_OFFSET(t)>>16)&0xff)
|
||||
#define PCITAG_DEV(t) ((PCITAG_OFFSET(t)>>11)&0x1f)
|
||||
#define PCITAG_FUN(t) ((PCITAG_OFFSET(t)>>8)&0x7)
|
||||
#define PCITAG_CREATE(n,b,d,f) (((u_int64_t)(n)<<32)|((b)<<16)|((d)<<11)|((f)<<8))
|
||||
#define PCITAG_CREATE(n,b,d,f) (((uint64_t)(n)<<32)|((b)<<16)|((d)<<11)|((f)<<8))
|
||||
#define PCITAG_SETNODE(t,n) ((t)&0xffffffff)|(((n)<<32)
|
||||
typedef u_int64_t pcitag_t;
|
||||
typedef uint64_t pcitag_t;
|
||||
|
||||
|
||||
void pci_attach_hook(struct device *, struct device *,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pmap.h,v 1.35 2006/01/27 18:37:49 cdi Exp $ */
|
||||
/* $NetBSD: pmap.h,v 1.36 2006/02/11 17:57:31 cdi Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
|
@ -92,10 +92,10 @@
|
|||
* page bits.
|
||||
*/
|
||||
struct page_size_map {
|
||||
u_int64_t mask;
|
||||
u_int64_t code;
|
||||
uint64_t mask;
|
||||
uint64_t code;
|
||||
#ifdef DEBUG
|
||||
u_int64_t use;
|
||||
uint64_t use;
|
||||
#endif
|
||||
};
|
||||
extern struct page_size_map page_size_map[];
|
||||
|
@ -133,9 +133,9 @@ struct pmap {
|
|||
* This comes from the PROM and is used to map prom entries.
|
||||
*/
|
||||
struct prom_map {
|
||||
u_int64_t vstart;
|
||||
u_int64_t vsize;
|
||||
u_int64_t tte;
|
||||
uint64_t vstart;
|
||||
uint64_t vsize;
|
||||
uint64_t tte;
|
||||
};
|
||||
|
||||
#define PMAP_NC 0x001 /* Set the E bit in the page */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pte.h,v 1.15 2005/12/11 12:19:10 christos Exp $ */
|
||||
/* $NetBSD: pte.h,v 1.16 2006/02/11 17:57:31 cdi Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-1999 Eduardo Horvath
|
||||
|
@ -37,11 +37,11 @@
|
|||
* Oh, here's the sun4u TTE for reference:
|
||||
*
|
||||
* struct sun4u_tte {
|
||||
* u_int64 tag_g:1, (global flag)
|
||||
* uint64 tag_g:1, (global flag)
|
||||
* tag_ctxt:15, (context for mapping)
|
||||
* tag_unassigned:6,
|
||||
* tag_va:42; (virtual address bits<64:22>)
|
||||
* u_int64 data_v:1, (valid bit)
|
||||
* uint64 data_v:1, (valid bit)
|
||||
* data_size:2, (page size [8K*8**<SIZE>])
|
||||
* data_nfo:1, (no-fault only)
|
||||
* data_ie:1, (invert endianness [inefficient])
|
||||
|
@ -88,14 +88,14 @@
|
|||
#if 0
|
||||
/* We don't use bitfeilds anyway. */
|
||||
struct sun4u_tag_fields {
|
||||
u_int64_t tag_g:1, /* global flag */
|
||||
uint64_t tag_g:1, /* global flag */
|
||||
tag_ctxt:15, /* context for mapping */
|
||||
tag_unassigned:6,
|
||||
tag_va:42; /* virtual address bits<64:22> */
|
||||
};
|
||||
union sun4u_tag { struct sun4u_tag_fields f; int64_t tag; };
|
||||
struct sun4u_data_fields {
|
||||
u_int64_t data_v:1, /* valid bit */
|
||||
uint64_t data_v:1, /* valid bit */
|
||||
data_size:2, /* page size [8K*8**<SIZE>] */
|
||||
data_nfo:1, /* no-fault only */
|
||||
data_ie:1, /* invert endianness [inefficient] */
|
||||
|
@ -161,7 +161,7 @@ void smp_tlb_flush_all __P((void));
|
|||
|
||||
#define TSB_TAG_CTX(t) ((((int64_t)(t))>>TSB_TAG_CTX_SHIFT)&CTX_MASK)
|
||||
#define TSB_TAG_VA(t) ((((int64_t)(t))<<TSB_TAG_VA_SHIFT))
|
||||
#define TSB_TAG(g,ctx,va) ((((u_int64_t)((g)!=0))<<63)|(((u_int64_t)(ctx)&CTX_MASK)<<TSB_TAG_CTX_SHIFT)|(((u_int64_t)va)>>TSB_TAG_VA_SHIFT))
|
||||
#define TSB_TAG(g,ctx,va) ((((uint64_t)((g)!=0))<<63)|(((uint64_t)(ctx)&CTX_MASK)<<TSB_TAG_CTX_SHIFT)|(((uint64_t)va)>>TSB_TAG_VA_SHIFT))
|
||||
|
||||
/* Page sizes */
|
||||
#define PGSZ_8K 0
|
||||
|
@ -240,7 +240,7 @@ void smp_tlb_flush_all __P((void));
|
|||
"b\3E\0" "b\2P\0" "b\1W\0" "b\0G\0"
|
||||
|
||||
#define TSB_DATA(g,sz,pa,priv,write,cache,aliased,valid,ie) \
|
||||
(((valid)?TLB_V:0LL)|TLB_SZ(sz)|(((u_int64_t)(pa))&TLB_PA_MASK)|\
|
||||
(((valid)?TLB_V:0LL)|TLB_SZ(sz)|(((uint64_t)(pa))&TLB_PA_MASK)|\
|
||||
((cache)?((aliased)?TLB_CP:TLB_CACHE_MASK):TLB_E)|\
|
||||
((priv)?TLB_P:0LL)|((write)?TLB_W:0LL)|((g)?TLB_G:0LL)|((ie)?TLB_IE:0LL))
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sparc64.h,v 1.8 2005/12/11 12:19:10 christos Exp $ */
|
||||
/* $NetBSD: sparc64.h,v 1.9 2006/02/11 17:57:31 cdi Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1996 Wolfgang Solfrank.
|
||||
|
@ -34,21 +34,21 @@
|
|||
#define _MACHINE_SPARC64_H_
|
||||
|
||||
struct mem_region {
|
||||
u_int64_t start;
|
||||
u_int64_t size;
|
||||
uint64_t start;
|
||||
uint64_t size;
|
||||
};
|
||||
|
||||
int prom_set_trap_table (vaddr_t);
|
||||
u_int64_t prom_vtop (vaddr_t);
|
||||
uint64_t prom_vtop (vaddr_t);
|
||||
vaddr_t prom_claim_virt (vaddr_t, int);
|
||||
vaddr_t prom_alloc_virt (int, int);
|
||||
int prom_free_virt (vaddr_t, int);
|
||||
int prom_unmap_virt (vaddr_t, int);
|
||||
int prom_map_phys (u_int64_t, off_t, vaddr_t, int);
|
||||
u_int64_t prom_alloc_phys (int , int);
|
||||
u_int64_t prom_claim_phys (paddr_t, int);
|
||||
int prom_map_phys (uint64_t, off_t, vaddr_t, int);
|
||||
uint64_t prom_alloc_phys (int , int);
|
||||
uint64_t prom_claim_phys (paddr_t, int);
|
||||
int prom_free_phys (paddr_t, int);
|
||||
u_int64_t prom_get_msgbuf (int, int);
|
||||
uint64_t prom_get_msgbuf (int, int);
|
||||
|
||||
void prom_stopself(void);
|
||||
void prom_startcpu(u_int, void *, u_long);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: svr4_32_machdep.h,v 1.6 2005/12/11 12:19:10 christos Exp $ */
|
||||
/* $NetBSD: svr4_32_machdep.h,v 1.7 2006/02/11 17:57:31 cdi Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994 The NetBSD Foundation, Inc.
|
||||
|
@ -53,7 +53,7 @@ typedef struct {
|
|||
svr4_32_greg_t rwin_in[8];
|
||||
} svr4_32_rwindow_t;
|
||||
|
||||
typedef u_int32_t svr4_32_gwindowp_t;
|
||||
typedef uint32_t svr4_32_gwindowp_t;
|
||||
typedef struct {
|
||||
int cnt;
|
||||
netbsd32_intp sp[SVR4_SPARC_MAXWIN];
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: autoconf.c,v 1.107 2006/01/27 18:37:49 cdi Exp $ */
|
||||
/* $NetBSD: autoconf.c,v 1.108 2006/02/11 17:57:32 cdi Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996
|
||||
|
@ -48,7 +48,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.107 2006/01/27 18:37:49 cdi Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.108 2006/02/11 17:57:32 cdi Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
|
@ -128,19 +128,19 @@ extern int kgdb_debug_panic;
|
|||
|
||||
char machine_model[100];
|
||||
|
||||
static char *str2hex __P((char *, int *));
|
||||
static int mbprint __P((void *, const char *));
|
||||
static void crazymap __P((const char *, int *));
|
||||
int st_crazymap __P((int));
|
||||
void sync_crash __P((void));
|
||||
int mainbus_match __P((struct device *, struct cfdata *, void *));
|
||||
static void mainbus_attach __P((struct device *, struct device *, void *));
|
||||
static char *str2hex(register char *, register int *);
|
||||
static int mbprint(void *, const char *);
|
||||
static void crazymap(const char *, int *);
|
||||
int st_crazymap(int);
|
||||
void sync_crash(void);
|
||||
int mainbus_match(struct device *, struct cfdata *, void *);
|
||||
static void mainbus_attach(struct device *, struct device *, void *);
|
||||
static void get_ncpus(void);
|
||||
|
||||
struct bootpath bootpath[8];
|
||||
int nbootpath;
|
||||
static void bootpath_build __P((void));
|
||||
static void bootpath_print __P((struct bootpath *));
|
||||
static void bootpath_build(void);
|
||||
static void bootpath_print(struct bootpath *);
|
||||
|
||||
/*
|
||||
* Kernel 4MB mappings.
|
||||
|
@ -193,9 +193,7 @@ matchbyname(parent, cf, aux)
|
|||
* Depends on ASCII order (this *is* machine-dependent code, you know).
|
||||
*/
|
||||
static char *
|
||||
str2hex(str, vp)
|
||||
register char *str;
|
||||
register int *vp;
|
||||
str2hex(register char *str, register int *vp)
|
||||
{
|
||||
register int v, c;
|
||||
|
||||
|
@ -304,14 +302,14 @@ bootstrap(void *o0, void *bootargs, void *bootsize, void *o3, void *ofw)
|
|||
o3, ofw);
|
||||
|
||||
/* Extract bootinfo pointer */
|
||||
if ((long)bootsize >= (4 * sizeof(u_int64_t))) {
|
||||
if ((long)bootsize >= (4 * sizeof(uint64_t))) {
|
||||
/* Loaded by 64-bit bootloader */
|
||||
bi = (void*)(u_long)(((u_int64_t*)bootargs)[3]);
|
||||
bmagic = (long)(((u_int64_t*)bootargs)[0]);
|
||||
} else if ((long)bootsize >= (4 * sizeof(u_int32_t))) {
|
||||
bi = (void*)(u_long)(((uint64_t*)bootargs)[3]);
|
||||
bmagic = (long)(((uint64_t*)bootargs)[0]);
|
||||
} else if ((long)bootsize >= (4 * sizeof(uint32_t))) {
|
||||
/* Loaded by 32-bit bootloader */
|
||||
bi = (void*)(u_long)(((u_int32_t*)bootargs)[3]);
|
||||
bmagic = (long)(((u_int32_t*)bootargs)[0]);
|
||||
bi = (void*)(u_long)(((uint32_t*)bootargs)[3]);
|
||||
bmagic = (long)(((uint32_t*)bootargs)[0]);
|
||||
} else {
|
||||
printf("Bad bootinfo size.\n"
|
||||
"This kernel requires NetBSD boot loader.\n");
|
||||
|
@ -327,7 +325,7 @@ bootstrap(void *o0, void *bootargs, void *bootsize, void *o3, void *ofw)
|
|||
panic("sparc64_init.");
|
||||
}
|
||||
|
||||
bootinfo = (void*)(u_long)((u_int64_t*)bi)[1];
|
||||
bootinfo = (void*)(u_long)((uint64_t*)bi)[1];
|
||||
LOOKUP_BOOTINFO(bi_kend, BTINFO_KERNEND);
|
||||
|
||||
if (bi_kend->addr == (vaddr_t)0) {
|
||||
|
@ -470,8 +468,7 @@ bootpath_build()
|
|||
*/
|
||||
|
||||
static void
|
||||
bootpath_print(bp)
|
||||
struct bootpath *bp;
|
||||
bootpath_print(struct bootpath *bp)
|
||||
{
|
||||
printf("bootpath: ");
|
||||
while (bp->name[0]) {
|
||||
|
@ -515,9 +512,7 @@ bootpath_store(storep, bp)
|
|||
* target of the (boot) device (i.e., the value in bp->v0val[0]).
|
||||
*/
|
||||
static void
|
||||
crazymap(prop, map)
|
||||
const char *prop;
|
||||
int *map;
|
||||
crazymap(const char *prop, int *map)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -545,8 +540,7 @@ sd_crazymap(n)
|
|||
}
|
||||
|
||||
int
|
||||
st_crazymap(n)
|
||||
int n;
|
||||
st_crazymap(int n)
|
||||
{
|
||||
static int prom_st_crazymap[8]; /* static: compute only once! */
|
||||
static int init = 0;
|
||||
|
@ -641,9 +635,7 @@ clockfreq(freq)
|
|||
|
||||
/* ARGSUSED */
|
||||
static int
|
||||
mbprint(aux, name)
|
||||
void *aux;
|
||||
const char *name;
|
||||
mbprint(void *aux, const char *name)
|
||||
{
|
||||
struct mainbus_attach_args *ma = aux;
|
||||
|
||||
|
@ -657,10 +649,7 @@ mbprint(aux, name)
|
|||
}
|
||||
|
||||
int
|
||||
mainbus_match(parent, cf, aux)
|
||||
struct device *parent;
|
||||
struct cfdata *cf;
|
||||
void *aux;
|
||||
mainbus_match(struct device *parent, struct cfdata *cf, void *aux)
|
||||
{
|
||||
|
||||
return (1);
|
||||
|
@ -674,9 +663,7 @@ mainbus_match(parent, cf, aux)
|
|||
* We also record the `node id' of the default frame buffer, if any.
|
||||
*/
|
||||
static void
|
||||
mainbus_attach(parent, dev, aux)
|
||||
struct device *parent, *dev;
|
||||
void *aux;
|
||||
mainbus_attach(struct device *parent, struct device *dev, void *aux)
|
||||
{
|
||||
extern struct sparc_bus_dma_tag mainbus_dma_tag;
|
||||
extern struct sparc_bus_space_tag mainbus_space_tag;
|
||||
|
@ -915,10 +902,10 @@ getdevunit(name, unit)
|
|||
#define BUSCLASS_XYC 8
|
||||
#define BUSCLASS_FDC 9
|
||||
|
||||
static int bus_class __P((struct device *));
|
||||
static int dev_compatible __P((struct device *, void *, char *));
|
||||
static int instance_match __P((struct device *, void *, struct bootpath *));
|
||||
static void nail_bootdev __P((struct device *, struct bootpath *));
|
||||
static int bus_class(struct device *);
|
||||
static int dev_compatible(struct device *, void *, char *);
|
||||
static int instance_match(struct device *, void *, struct bootpath *);
|
||||
static void nail_bootdev(struct device *, struct bootpath *);
|
||||
|
||||
static struct {
|
||||
const char *name;
|
||||
|
@ -968,10 +955,7 @@ static struct {
|
|||
};
|
||||
|
||||
int
|
||||
dev_compatible(dev, aux, bpname)
|
||||
struct device *dev;
|
||||
void *aux;
|
||||
char *bpname;
|
||||
dev_compatible(struct device *dev, void *aux, char *bpname)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
|
@ -1067,8 +1051,7 @@ dev_compatible(dev, aux, bpname)
|
|||
}
|
||||
|
||||
static int
|
||||
bus_class(dev)
|
||||
struct device *dev;
|
||||
bus_class(struct device *dev)
|
||||
{
|
||||
const char *name;
|
||||
int i, class;
|
||||
|
@ -1089,10 +1072,7 @@ bus_class(dev)
|
|||
}
|
||||
|
||||
int
|
||||
instance_match(dev, aux, bp)
|
||||
struct device *dev;
|
||||
void *aux;
|
||||
struct bootpath *bp;
|
||||
instance_match(struct device *dev, void *aux, struct bootpath *bp)
|
||||
{
|
||||
struct mainbus_attach_args *ma;
|
||||
struct sbus_attach_args *sa;
|
||||
|
@ -1151,9 +1131,7 @@ instance_match(dev, aux, bp)
|
|||
}
|
||||
|
||||
void
|
||||
nail_bootdev(dev, bp)
|
||||
struct device *dev;
|
||||
struct bootpath *bp;
|
||||
nail_bootdev(struct device *dev, struct bootpath *bp)
|
||||
{
|
||||
|
||||
if (bp->dev != NULL)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cache.h,v 1.8 2005/12/11 12:19:14 christos Exp $ */
|
||||
/* $NetBSD: cache.h,v 1.9 2006/02/11 17:57:32 cdi Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996
|
||||
|
@ -73,13 +73,13 @@
|
|||
*/
|
||||
|
||||
/* The following are for I$ and D$ flushes and are in locore.s */
|
||||
void dcache_flush_page __P((paddr_t)); /* flush page from D$ */
|
||||
void icache_flush_page __P((paddr_t)); /* flush page from I$ */
|
||||
void blast_dcache __P((void)); /* Clear entire D$ */
|
||||
void blast_icache __P((void)); /* Clear entire I$ */
|
||||
void dcache_flush_page(paddr_t); /* flush page from D$ */
|
||||
void icache_flush_page(paddr_t); /* flush page from I$ */
|
||||
void blast_dcache(void); /* Clear entire D$ */
|
||||
void blast_icache(void); /* Clear entire I$ */
|
||||
|
||||
/* The following flush a range from the D$ and I$ but not E$. */
|
||||
void cache_flush_phys __P((paddr_t, psize_t, int));
|
||||
void cache_flush_phys(paddr_t, psize_t, int);
|
||||
|
||||
/*
|
||||
* Cache control information.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: clock.c,v 1.76 2005/12/24 20:07:37 perry Exp $ */
|
||||
/* $NetBSD: clock.c,v 1.77 2006/02/11 17:57:32 cdi Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -55,7 +55,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.76 2005/12/24 20:07:37 perry Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.77 2006/02/11 17:57:32 cdi Exp $");
|
||||
|
||||
#include "opt_multiprocessor.h"
|
||||
|
||||
|
@ -114,7 +114,7 @@ int statmin; /* statclock interval - 1/2*variance */
|
|||
int timerok;
|
||||
|
||||
static long tick_increment;
|
||||
int schedintr __P((void *));
|
||||
int schedintr(void *);
|
||||
|
||||
static struct intrhand level10 = { clockintr };
|
||||
static struct intrhand level0 = { tickintr };
|
||||
|
@ -124,13 +124,13 @@ static struct intrhand schedint = { schedintr };
|
|||
/*
|
||||
* clock (eeprom) attaches at the sbus or the ebus (PCI)
|
||||
*/
|
||||
static int clockmatch_sbus __P((struct device *, struct cfdata *, void *));
|
||||
static void clockattach_sbus __P((struct device *, struct device *, void *));
|
||||
static int clockmatch_ebus __P((struct device *, struct cfdata *, void *));
|
||||
static void clockattach_ebus __P((struct device *, struct device *, void *));
|
||||
static int clockmatch_rtc __P((struct device *, struct cfdata *, void *));
|
||||
static void clockattach_rtc __P((struct device *, struct device *, void *));
|
||||
static void clockattach __P((struct mk48txx_softc *, int));
|
||||
static int clockmatch_sbus(struct device *, struct cfdata *, void *);
|
||||
static void clockattach_sbus(struct device *, struct device *, void *);
|
||||
static int clockmatch_ebus(struct device *, struct cfdata *, void *);
|
||||
static void clockattach_ebus(struct device *, struct device *, void *);
|
||||
static int clockmatch_rtc(struct device *, struct cfdata *, void *);
|
||||
static void clockattach_rtc(struct device *, struct device *, void *);
|
||||
static void clockattach(struct mk48txx_softc *, int);
|
||||
|
||||
|
||||
CFATTACH_DECL(clock_sbus, sizeof(struct mk48txx_softc),
|
||||
|
@ -147,19 +147,17 @@ extern struct cfdriver clock_cd;
|
|||
/* Global TOD clock handle */
|
||||
static todr_chip_handle_t todr_handle = NULL;
|
||||
|
||||
static int timermatch __P((struct device *, struct cfdata *, void *));
|
||||
static void timerattach __P((struct device *, struct device *, void *));
|
||||
static int timermatch(struct device *, struct cfdata *, void *);
|
||||
static void timerattach(struct device *, struct device *, void *);
|
||||
|
||||
struct timerreg_4u timerreg_4u; /* XXX - need more cleanup */
|
||||
|
||||
CFATTACH_DECL(timer, sizeof(struct device),
|
||||
timermatch, timerattach, NULL, NULL);
|
||||
|
||||
int clock_wenable __P((struct todr_chip_handle *, int));
|
||||
int clock_wenable(struct todr_chip_handle *, int);
|
||||
struct chiptime;
|
||||
int chiptotime __P((int, int, int, int, int, int));
|
||||
void timetochip __P((struct chiptime *));
|
||||
void stopcounter __P((struct timer_4u *));
|
||||
void stopcounter(struct timer_4u *);
|
||||
|
||||
int timerblurb = 10; /* Guess a value; used before clock is attached */
|
||||
|
||||
|
@ -173,10 +171,7 @@ void rtc_setcent(struct mc146818_softc *, u_int);
|
|||
* own special match function to call it the "clock".
|
||||
*/
|
||||
static int
|
||||
clockmatch_sbus(parent, cf, aux)
|
||||
struct device *parent;
|
||||
struct cfdata *cf;
|
||||
void *aux;
|
||||
clockmatch_sbus(struct device *parent, struct cfdata *cf, void *aux)
|
||||
{
|
||||
struct sbus_attach_args *sa = aux;
|
||||
|
||||
|
@ -184,10 +179,7 @@ clockmatch_sbus(parent, cf, aux)
|
|||
}
|
||||
|
||||
static int
|
||||
clockmatch_ebus(parent, cf, aux)
|
||||
struct device *parent;
|
||||
struct cfdata *cf;
|
||||
void *aux;
|
||||
clockmatch_ebus(struct device *parent, struct cfdata *cf, void *aux)
|
||||
{
|
||||
struct ebus_attach_args *ea = aux;
|
||||
|
||||
|
@ -195,10 +187,7 @@ clockmatch_ebus(parent, cf, aux)
|
|||
}
|
||||
|
||||
static int
|
||||
clockmatch_rtc(parent, cf, aux)
|
||||
struct device *parent;
|
||||
struct cfdata *cf;
|
||||
void *aux;
|
||||
clockmatch_rtc(struct device *parent, struct cfdata *cf, void *aux)
|
||||
{
|
||||
struct ebus_attach_args *ea = aux;
|
||||
|
||||
|
@ -230,9 +219,7 @@ clockmatch_rtc(parent, cf, aux)
|
|||
|
||||
/* ARGSUSED */
|
||||
static void
|
||||
clockattach_sbus(parent, self, aux)
|
||||
struct device *parent, *self;
|
||||
void *aux;
|
||||
clockattach_sbus(struct device *parent, struct device *self, void *aux)
|
||||
{
|
||||
struct mk48txx_softc *sc = (void *)self;
|
||||
struct sbus_attach_args *sa = aux;
|
||||
|
@ -263,9 +250,7 @@ clockattach_sbus(parent, self, aux)
|
|||
* writers can run simultaneously.
|
||||
*/
|
||||
int
|
||||
clock_wenable(handle, onoff)
|
||||
struct todr_chip_handle *handle;
|
||||
int onoff;
|
||||
clock_wenable(struct todr_chip_handle *handle, int onoff)
|
||||
{
|
||||
struct mk48txx_softc *sc;
|
||||
vm_prot_t prot;
|
||||
|
@ -295,9 +280,7 @@ clock_wenable(handle, onoff)
|
|||
|
||||
/* ARGSUSED */
|
||||
static void
|
||||
clockattach_ebus(parent, self, aux)
|
||||
struct device *parent, *self;
|
||||
void *aux;
|
||||
clockattach_ebus(struct device *parent, struct device *self, void *aux)
|
||||
{
|
||||
struct mk48txx_softc *sc = (void *)self;
|
||||
struct ebus_attach_args *ea = aux;
|
||||
|
@ -324,9 +307,7 @@ clockattach_ebus(parent, self, aux)
|
|||
|
||||
|
||||
static void
|
||||
clockattach(sc, node)
|
||||
struct mk48txx_softc *sc;
|
||||
int node;
|
||||
clockattach(struct mk48txx_softc *sc, int node)
|
||||
{
|
||||
|
||||
sc->sc_model = prom_getpropstring(node, "model");
|
||||
|
@ -379,9 +360,7 @@ rtc_write_reg(struct mc146818_softc *sc, u_int reg, u_int val)
|
|||
|
||||
/* ARGSUSED */
|
||||
static void
|
||||
clockattach_rtc(parent, self, aux)
|
||||
struct device *parent, *self;
|
||||
void *aux;
|
||||
clockattach_rtc(struct device *parent, struct device *self, void *aux)
|
||||
{
|
||||
struct mc146818_softc *sc = (void *)self;
|
||||
struct ebus_attach_args *ea = aux;
|
||||
|
@ -440,10 +419,7 @@ clockattach_rtc(parent, self, aux)
|
|||
* the lame UltraSPARC IIi PCI machines that don't have them.
|
||||
*/
|
||||
static int
|
||||
timermatch(parent, cf, aux)
|
||||
struct device *parent;
|
||||
struct cfdata *cf;
|
||||
void *aux;
|
||||
timermatch(struct device *parent, struct cfdata *cf, void *aux)
|
||||
{
|
||||
struct mainbus_attach_args *ma = aux;
|
||||
|
||||
|
@ -451,9 +427,7 @@ timermatch(parent, cf, aux)
|
|||
}
|
||||
|
||||
static void
|
||||
timerattach(parent, self, aux)
|
||||
struct device *parent, *self;
|
||||
void *aux;
|
||||
timerattach(struct device *parent, struct device *self, void *aux)
|
||||
{
|
||||
struct mainbus_attach_args *ma = aux;
|
||||
u_int *va = ma->ma_address;
|
||||
|
@ -527,8 +501,7 @@ timerattach(parent, self, aux)
|
|||
}
|
||||
|
||||
void
|
||||
stopcounter(creg)
|
||||
struct timer_4u *creg;
|
||||
stopcounter(struct timer_4u *creg)
|
||||
{
|
||||
/* Stop the clock */
|
||||
volatile int discard;
|
||||
|
@ -546,7 +519,7 @@ void
|
|||
cpu_initclocks()
|
||||
{
|
||||
int statint, minint;
|
||||
static u_int64_t start_time;
|
||||
static uint64_t start_time;
|
||||
#ifdef DEBUG
|
||||
extern int intrdebug;
|
||||
#endif
|
||||
|
@ -706,7 +679,7 @@ clockintr(cap)
|
|||
struct cpu_info *ci = curcpu();
|
||||
#ifdef DEBUG
|
||||
static int64_t tick_base = 0;
|
||||
int64_t t = (u_int64_t)tick();
|
||||
int64_t t = (uint64_t)tick();
|
||||
|
||||
if (!tick_base) {
|
||||
tick_base = (time.tv_sec * 1000000LL + time.tv_usec)
|
||||
|
@ -762,7 +735,7 @@ tickintr(cap)
|
|||
int s;
|
||||
|
||||
#if NKBD > 0
|
||||
extern int cnrom __P((void));
|
||||
extern int cnrom(void);
|
||||
extern int rom_console_input;
|
||||
#endif
|
||||
|
||||
|
@ -833,8 +806,7 @@ statintr(cap)
|
|||
}
|
||||
|
||||
int
|
||||
schedintr(arg)
|
||||
void *arg;
|
||||
schedintr(void *arg)
|
||||
{
|
||||
if (curlwp)
|
||||
schedclock(curlwp);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: compat_16_machdep.c,v 1.7 2005/12/11 12:19:14 christos Exp $ */
|
||||
/* $NetBSD: compat_16_machdep.c,v 1.8 2006/02/11 17:57:32 cdi Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -38,7 +38,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.7 2005/12/11 12:19:14 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.8 2006/02/11 17:57:32 cdi Exp $");
|
||||
|
||||
#include "opt_compat_netbsd.h"
|
||||
|
||||
|
@ -324,15 +324,15 @@ compat_16_sys___sigreturn14(l, v, retval)
|
|||
#endif
|
||||
/* take only psr ICC field */
|
||||
#ifdef __arch64__
|
||||
tf->tf_tstate = (u_int64_t)(tf->tf_tstate & ~TSTATE_CCR) | (scp->sc_tstate & TSTATE_CCR);
|
||||
tf->tf_tstate = (uint64_t)(tf->tf_tstate & ~TSTATE_CCR) | (scp->sc_tstate & TSTATE_CCR);
|
||||
#else
|
||||
tf->tf_tstate = (u_int64_t)(tf->tf_tstate & ~TSTATE_CCR) | PSRCC_TO_TSTATE(scp->sc_psr);
|
||||
tf->tf_tstate = (uint64_t)(tf->tf_tstate & ~TSTATE_CCR) | PSRCC_TO_TSTATE(scp->sc_psr);
|
||||
#endif
|
||||
tf->tf_pc = (u_int64_t)scp->sc_pc;
|
||||
tf->tf_npc = (u_int64_t)scp->sc_npc;
|
||||
tf->tf_global[1] = (u_int64_t)scp->sc_g1;
|
||||
tf->tf_out[0] = (u_int64_t)scp->sc_o0;
|
||||
tf->tf_out[6] = (u_int64_t)scp->sc_sp;
|
||||
tf->tf_pc = (uint64_t)scp->sc_pc;
|
||||
tf->tf_npc = (uint64_t)scp->sc_npc;
|
||||
tf->tf_global[1] = (uint64_t)scp->sc_g1;
|
||||
tf->tf_out[0] = (uint64_t)scp->sc_o0;
|
||||
tf->tf_out[6] = (uint64_t)scp->sc_sp;
|
||||
#ifdef DEBUG
|
||||
if (sigdebug & SDB_FOLLOW) {
|
||||
printf("sigreturn14: return trapframe pc=%p sp=%p tstate=%llx\n",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: db_interface.c,v 1.84 2006/01/27 18:37:49 cdi Exp $ */
|
||||
/* $NetBSD: db_interface.c,v 1.85 2006/02/11 17:57:32 cdi Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-2002 Eduardo Horvath. All rights reserved.
|
||||
|
@ -34,7 +34,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.84 2006/01/27 18:37:49 cdi Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.85 2006/02/11 17:57:32 cdi Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
|
||||
|
@ -227,42 +227,41 @@ int db_active = 0;
|
|||
|
||||
extern char *trap_type[];
|
||||
|
||||
void kdb_kbd_trap __P((struct trapframe64 *));
|
||||
void db_prom_cmd __P((db_expr_t, int, db_expr_t, const char *));
|
||||
void db_lwp_cmd __P((db_expr_t, int, db_expr_t, const char *));
|
||||
void db_proc_cmd __P((db_expr_t, int, db_expr_t, const char *));
|
||||
void db_ctx_cmd __P((db_expr_t, int, db_expr_t, const char *));
|
||||
void db_dump_window __P((db_expr_t, int, db_expr_t, const char *));
|
||||
void db_dump_stack __P((db_expr_t, int, db_expr_t, const char *));
|
||||
void db_dump_trap __P((db_expr_t, int, db_expr_t, const char *));
|
||||
void db_dump_fpstate __P((db_expr_t, int, db_expr_t, const char *));
|
||||
void db_dump_ts __P((db_expr_t, int, db_expr_t, const char *));
|
||||
void db_dump_pcb __P((db_expr_t, int, db_expr_t, const char *));
|
||||
void db_dump_pv __P((db_expr_t, int, db_expr_t, const char *));
|
||||
void db_setpcb __P((db_expr_t, int, db_expr_t, const char *));
|
||||
void db_dump_dtlb __P((db_expr_t, int, db_expr_t, const char *));
|
||||
void db_dump_itlb __P((db_expr_t, int, db_expr_t, const char *));
|
||||
void db_dump_dtsb __P((db_expr_t, int, db_expr_t, const char *));
|
||||
void db_dump_itsb __P((db_expr_t, int, db_expr_t, const char *));
|
||||
void db_pmap_kernel __P((db_expr_t, int, db_expr_t, const char *));
|
||||
void db_pload_cmd __P((db_expr_t, int, db_expr_t, const char *));
|
||||
void db_pmap_cmd __P((db_expr_t, int, db_expr_t, const char *));
|
||||
void db_lock __P((db_expr_t, int, db_expr_t, const char *));
|
||||
void db_traptrace __P((db_expr_t, int, db_expr_t, const char *));
|
||||
void db_watch __P((db_expr_t, int, db_expr_t, const char *));
|
||||
void db_pm_extract __P((db_expr_t, int, db_expr_t, const char *));
|
||||
void db_cpus_cmd __P((db_expr_t, int, db_expr_t, const char *));
|
||||
void kdb_kbd_trap(struct trapframe64 *);
|
||||
void db_prom_cmd(db_expr_t, int, db_expr_t, const char *);
|
||||
void db_lwp_cmd(db_expr_t, int, db_expr_t, const char *);
|
||||
void db_proc_cmd(db_expr_t, int, db_expr_t, const char *);
|
||||
void db_ctx_cmd(db_expr_t, int, db_expr_t, const char *);
|
||||
void db_dump_window(db_expr_t, int, db_expr_t, const char *);
|
||||
void db_dump_stack(db_expr_t, int, db_expr_t, const char *);
|
||||
void db_dump_trap(db_expr_t, int, db_expr_t, const char *);
|
||||
void db_dump_fpstate(db_expr_t, int, db_expr_t, const char *);
|
||||
void db_dump_ts(db_expr_t, int, db_expr_t, const char *);
|
||||
void db_dump_pcb(db_expr_t, int, db_expr_t, const char *);
|
||||
void db_dump_pv(db_expr_t, int, db_expr_t, const char *);
|
||||
void db_setpcb(db_expr_t, int, db_expr_t, const char *);
|
||||
void db_dump_dtlb(db_expr_t, int, db_expr_t, const char *);
|
||||
void db_dump_itlb(db_expr_t, int, db_expr_t, const char *);
|
||||
void db_dump_dtsb(db_expr_t, int, db_expr_t, const char *);
|
||||
void db_dump_itsb(db_expr_t, int, db_expr_t, const char *);
|
||||
void db_pmap_kernel(db_expr_t, int, db_expr_t, const char *);
|
||||
void db_pload_cmd(db_expr_t, int, db_expr_t, const char *);
|
||||
void db_pmap_cmd(db_expr_t, int, db_expr_t, const char *);
|
||||
void db_lock(db_expr_t, int, db_expr_t, const char *);
|
||||
void db_traptrace(db_expr_t, int, db_expr_t, const char *);
|
||||
void db_watch(db_expr_t, int, db_expr_t, const char *);
|
||||
void db_pm_extract(db_expr_t, int, db_expr_t, const char *);
|
||||
void db_cpus_cmd(db_expr_t, int, db_expr_t, const char *);
|
||||
|
||||
#ifdef DDB
|
||||
static void db_dump_pmap __P((struct pmap *));
|
||||
static void db_print_trace_entry __P((struct traptrace *, int));
|
||||
static void db_dump_pmap(struct pmap *);
|
||||
static void db_print_trace_entry(struct traptrace *, int);
|
||||
|
||||
/*
|
||||
* Received keyboard interrupt sequence.
|
||||
*/
|
||||
void
|
||||
kdb_kbd_trap(tf)
|
||||
struct trapframe64 *tf;
|
||||
kdb_kbd_trap(struct trapframe64 *tf)
|
||||
{
|
||||
if (db_active == 0 /* && (boothowto & RB_KDB) */) {
|
||||
printf("\n\nkernel: keyboard interrupt tf=%p\n", tf);
|
||||
|
@ -440,24 +439,16 @@ Debugger()
|
|||
}
|
||||
|
||||
void
|
||||
db_prom_cmd(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
int have_addr;
|
||||
db_expr_t count;
|
||||
const char *modif;
|
||||
db_prom_cmd(db_expr_t addr, int have_addr, db_expr_t count, const char *modif)
|
||||
{
|
||||
|
||||
prom_abort();
|
||||
}
|
||||
|
||||
void
|
||||
db_dump_dtlb(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
int have_addr;
|
||||
db_expr_t count;
|
||||
const char *modif;
|
||||
db_dump_dtlb(db_expr_t addr, int have_addr, db_expr_t count, const char *modif)
|
||||
{
|
||||
extern void print_dtlb __P((void));
|
||||
extern void print_dtlb(void);
|
||||
|
||||
if (have_addr) {
|
||||
int i;
|
||||
|
@ -488,13 +479,9 @@ db_dump_dtlb(addr, have_addr, count, modif)
|
|||
}
|
||||
|
||||
void
|
||||
db_dump_itlb(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
int have_addr;
|
||||
db_expr_t count;
|
||||
const char *modif;
|
||||
db_dump_itlb(db_expr_t addr, int have_addr, db_expr_t count, const char *modif)
|
||||
{
|
||||
extern void print_itlb __P((void));
|
||||
extern void print_itlb(void);
|
||||
|
||||
if (have_addr) {
|
||||
int i;
|
||||
|
@ -525,11 +512,7 @@ db_dump_itlb(addr, have_addr, count, modif)
|
|||
}
|
||||
|
||||
void
|
||||
db_pload_cmd(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
int have_addr;
|
||||
db_expr_t count;
|
||||
const char *modif;
|
||||
db_pload_cmd(db_expr_t addr, int have_addr, db_expr_t count, const char *modif)
|
||||
{
|
||||
static paddr_t oldaddr = -1;
|
||||
int asi = ASI_PHYS_CACHED;
|
||||
|
@ -562,11 +545,10 @@ db_pload_cmd(addr, have_addr, count, modif)
|
|||
}
|
||||
}
|
||||
|
||||
int64_t pseg_get __P((struct pmap *, vaddr_t));
|
||||
int64_t pseg_get(struct pmap *, vaddr_t);
|
||||
|
||||
void
|
||||
db_dump_pmap(pm)
|
||||
struct pmap *pm;
|
||||
db_dump_pmap(struct pmap *pm)
|
||||
{
|
||||
/* print all valid pages in the kernel pmap */
|
||||
unsigned long long i, j, k, n, data0, data1;
|
||||
|
@ -604,15 +586,11 @@ db_dump_pmap(pm)
|
|||
}
|
||||
|
||||
void
|
||||
db_pmap_kernel(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
int have_addr;
|
||||
db_expr_t count;
|
||||
const char *modif;
|
||||
db_pmap_kernel(db_expr_t addr, int have_addr, db_expr_t count, const char *modif)
|
||||
{
|
||||
extern struct pmap kernel_pmap_;
|
||||
int i, j, full = 0;
|
||||
u_int64_t data;
|
||||
uint64_t data;
|
||||
|
||||
{
|
||||
register char c;
|
||||
|
@ -650,11 +628,7 @@ db_pmap_kernel(addr, have_addr, count, modif)
|
|||
}
|
||||
|
||||
void
|
||||
db_pm_extract(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
int have_addr;
|
||||
db_expr_t count;
|
||||
const char *modif;
|
||||
db_pm_extract(db_expr_t addr, int have_addr, db_expr_t count, const char *modif)
|
||||
{
|
||||
if (have_addr) {
|
||||
paddr_t pa;
|
||||
|
@ -668,11 +642,7 @@ db_pm_extract(addr, have_addr, count, modif)
|
|||
}
|
||||
|
||||
void
|
||||
db_pmap_cmd(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
int have_addr;
|
||||
db_expr_t count;
|
||||
const char *modif;
|
||||
db_pmap_cmd(db_expr_t addr, int have_addr, db_expr_t count, const char *modif)
|
||||
{
|
||||
struct pmap* pm=NULL;
|
||||
int i, j=0, full = 0;
|
||||
|
@ -708,11 +678,7 @@ db_pmap_cmd(addr, have_addr, count, modif)
|
|||
|
||||
|
||||
void
|
||||
db_lock(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
int have_addr;
|
||||
db_expr_t count;
|
||||
const char *modif;
|
||||
db_lock(db_expr_t addr, int have_addr, db_expr_t count, const char *modif)
|
||||
{
|
||||
#if 0
|
||||
struct lock *l;
|
||||
|
@ -740,11 +706,7 @@ extern int tsbsize;
|
|||
void db_dump_tsb_common(pte_t *);
|
||||
|
||||
void
|
||||
db_dump_dtsb(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
int have_addr;
|
||||
db_expr_t count;
|
||||
const char *modif;
|
||||
db_dump_dtsb(db_expr_t addr, int have_addr, db_expr_t count, const char *modif)
|
||||
{
|
||||
|
||||
db_printf("DTSB:\n");
|
||||
|
@ -752,11 +714,7 @@ db_dump_dtsb(addr, have_addr, count, modif)
|
|||
}
|
||||
|
||||
void
|
||||
db_dump_itsb(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
int have_addr;
|
||||
db_expr_t count;
|
||||
const char *modif;
|
||||
db_dump_itsb(db_expr_t addr, int have_addr, db_expr_t count, const char *modif)
|
||||
{
|
||||
|
||||
db_printf("ITSB:\n");
|
||||
|
@ -786,13 +744,9 @@ db_dump_tsb_common(pte_t *tsb)
|
|||
}
|
||||
}
|
||||
|
||||
void db_page_cmd __P((db_expr_t, int, db_expr_t, const char *));
|
||||
void db_page_cmd(db_expr_t, int, db_expr_t, const char *);
|
||||
void
|
||||
db_page_cmd(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
int have_addr;
|
||||
db_expr_t count;
|
||||
const char *modif;
|
||||
db_page_cmd(db_expr_t addr, int have_addr, db_expr_t count, const char *modif)
|
||||
{
|
||||
|
||||
if (!have_addr) {
|
||||
|
@ -805,11 +759,7 @@ db_page_cmd(addr, have_addr, count, modif)
|
|||
}
|
||||
|
||||
void
|
||||
db_lwp_cmd(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
int have_addr;
|
||||
db_expr_t count;
|
||||
const char *modif;
|
||||
db_lwp_cmd(db_expr_t addr, int have_addr, db_expr_t count, const char *modif)
|
||||
{
|
||||
struct lwp *l;
|
||||
|
||||
|
@ -829,11 +779,7 @@ db_lwp_cmd(addr, have_addr, count, modif)
|
|||
}
|
||||
|
||||
void
|
||||
db_proc_cmd(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
int have_addr;
|
||||
db_expr_t count;
|
||||
const char *modif;
|
||||
db_proc_cmd(db_expr_t addr, int have_addr, db_expr_t count, const char *modif)
|
||||
{
|
||||
struct proc *p = NULL;
|
||||
|
||||
|
@ -859,11 +805,7 @@ db_proc_cmd(addr, have_addr, count, modif)
|
|||
}
|
||||
|
||||
void
|
||||
db_ctx_cmd(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
int have_addr;
|
||||
db_expr_t count;
|
||||
const char *modif;
|
||||
db_ctx_cmd(db_expr_t addr, int have_addr, db_expr_t count, const char *modif)
|
||||
{
|
||||
struct proc *p;
|
||||
struct lwp *l;
|
||||
|
@ -888,11 +830,7 @@ db_ctx_cmd(addr, have_addr, count, modif)
|
|||
}
|
||||
|
||||
void
|
||||
db_dump_pcb(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
int have_addr;
|
||||
db_expr_t count;
|
||||
const char *modif;
|
||||
db_dump_pcb(db_expr_t addr, int have_addr, db_expr_t count, const char *modif)
|
||||
{
|
||||
struct pcb *pcb;
|
||||
int i;
|
||||
|
@ -934,11 +872,7 @@ db_dump_pcb(addr, have_addr, count, modif)
|
|||
|
||||
|
||||
void
|
||||
db_setpcb(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
int have_addr;
|
||||
db_expr_t count;
|
||||
const char *modif;
|
||||
db_setpcb(db_expr_t addr, int have_addr, db_expr_t count, const char *modif)
|
||||
{
|
||||
struct proc *p, *pp;
|
||||
|
||||
|
@ -969,9 +903,7 @@ db_setpcb(addr, have_addr, count, modif)
|
|||
}
|
||||
|
||||
static void
|
||||
db_print_trace_entry(te, i)
|
||||
struct traptrace *te;
|
||||
int i;
|
||||
db_print_trace_entry(struct traptrace *te, int i)
|
||||
{
|
||||
db_printf("%d:%d p:%d tt:%x:%llx:%llx %llx:%llx ", i,
|
||||
(int)te->tl, (int)te->pid,
|
||||
|
@ -988,11 +920,7 @@ db_print_trace_entry(te, i)
|
|||
}
|
||||
|
||||
void
|
||||
db_traptrace(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
int have_addr;
|
||||
db_expr_t count;
|
||||
const char *modif;
|
||||
db_traptrace(db_expr_t addr, int have_addr, db_expr_t count, const char *modif)
|
||||
{
|
||||
int i, start = 0, full = 0, reverse = 0;
|
||||
struct traptrace *end;
|
||||
|
@ -1050,11 +978,7 @@ db_traptrace(addr, have_addr, count, modif)
|
|||
* control register.
|
||||
*/
|
||||
void
|
||||
db_watch(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
int have_addr;
|
||||
db_expr_t count;
|
||||
const char *modif;
|
||||
db_watch(db_expr_t addr, int have_addr, db_expr_t count, const char *modif)
|
||||
{
|
||||
int phys = 0;
|
||||
int read = 0;
|
||||
|
@ -1066,9 +990,9 @@ db_watch(addr, have_addr, count, modif)
|
|||
#define WATCH_PR (1L<<24)
|
||||
#define WATCH_PW (1L<<23)
|
||||
#define WATCH_PM_SHIFT 33
|
||||
#define WATCH_PM (((u_int64_t)0xffffL)<<WATCH_PM_SHIFT)
|
||||
#define WATCH_PM (((uint64_t)0xffffL)<<WATCH_PM_SHIFT)
|
||||
#define WATCH_VM_SHIFT 25
|
||||
#define WATCH_VM (((u_int64_t)0xffffL)<<WATCH_VM_SHIFT)
|
||||
#define WATCH_VM (((uint64_t)0xffffL)<<WATCH_VM_SHIFT)
|
||||
|
||||
{
|
||||
register char c;
|
||||
|
@ -1142,11 +1066,7 @@ db_watch(addr, have_addr, count, modif)
|
|||
}
|
||||
|
||||
void
|
||||
db_cpus_cmd(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
int have_addr;
|
||||
db_expr_t count;
|
||||
const char *modif;
|
||||
db_cpus_cmd(db_expr_t addr, int have_addr, db_expr_t count, const char *modif)
|
||||
{
|
||||
struct cpu_info *ci;
|
||||
|
||||
|
@ -1159,16 +1079,15 @@ db_cpus_cmd(addr, have_addr, count, modif)
|
|||
|
||||
#include <uvm/uvm.h>
|
||||
|
||||
void db_uvmhistdump __P((db_expr_t, int, db_expr_t, const char *));
|
||||
extern void uvmhist_dump __P((struct uvm_history *));
|
||||
void db_uvmhistdump(db_expr_t, int, db_expr_t, const char *);
|
||||
/*extern void uvmhist_dump __P((struct uvm_history *));*/
|
||||
#ifdef UVMHIST
|
||||
extern void uvmhist_dump(struct uvm_history *);
|
||||
#endif
|
||||
extern struct uvm_history_head uvm_histories;
|
||||
|
||||
void
|
||||
db_uvmhistdump(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
int have_addr;
|
||||
db_expr_t count;
|
||||
const char *modif;
|
||||
db_uvmhistdump(db_expr_t addr, int have_addr, db_expr_t count, const char *modif)
|
||||
{
|
||||
|
||||
uvmhist_dump(LIST_FIRST(&uvm_histories));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: db_trace.c,v 1.30 2005/12/11 12:19:14 christos Exp $ */
|
||||
/* $NetBSD: db_trace.c,v 1.31 2006/02/11 17:57:32 cdi Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-2002 Eduardo Horvath. All rights reserved.
|
||||
|
@ -28,7 +28,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.30 2005/12/11 12:19:14 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.31 2006/02/11 17:57:32 cdi Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/proc.h>
|
||||
|
@ -42,12 +42,12 @@ __KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.30 2005/12/11 12:19:14 christos Exp $
|
|||
#include <ddb/db_interface.h>
|
||||
#include <ddb/db_output.h>
|
||||
|
||||
void db_dump_fpstate __P((db_expr_t, int, db_expr_t, const char *));
|
||||
void db_dump_window __P((db_expr_t, int, db_expr_t, const char *));
|
||||
void db_dump_stack __P((db_expr_t, int, db_expr_t, const char *));
|
||||
void db_dump_trap __P((db_expr_t, int, db_expr_t, const char *));
|
||||
void db_dump_ts __P((db_expr_t, int, db_expr_t, const char *));
|
||||
void db_print_window __P((u_int64_t));
|
||||
void db_dump_fpstate(db_expr_t, int, db_expr_t, const char *);
|
||||
void db_dump_window(db_expr_t, int, db_expr_t, const char *);
|
||||
void db_dump_stack(db_expr_t, int, db_expr_t, const char *);
|
||||
void db_dump_trap(db_expr_t, int, db_expr_t, const char *);
|
||||
void db_dump_ts(db_expr_t, int, db_expr_t, const char *);
|
||||
void db_print_window(uint64_t);
|
||||
|
||||
#if 0
|
||||
#define INKERNEL(va) (((vaddr_t)(va)) >= USRSTACK) /* Not really true, y'know */
|
||||
|
@ -64,7 +64,7 @@ db_stack_trace_print(addr, have_addr, count, modif, pr)
|
|||
int have_addr;
|
||||
db_expr_t count;
|
||||
const char *modif;
|
||||
void (*pr) __P((const char *, ...));
|
||||
void (*pr) (const char *, ...);
|
||||
{
|
||||
vaddr_t frame;
|
||||
boolean_t kernel_only = TRUE;
|
||||
|
@ -174,14 +174,10 @@ db_stack_trace_print(addr, have_addr, count, modif, pr)
|
|||
|
||||
|
||||
void
|
||||
db_dump_window(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
int have_addr;
|
||||
db_expr_t count;
|
||||
const char *modif;
|
||||
db_dump_window(db_expr_t addr, int have_addr, db_expr_t count, const char *modif)
|
||||
{
|
||||
int i;
|
||||
u_int64_t frame = DDB_TF->tf_out[6];
|
||||
uint64_t frame = DDB_TF->tf_out[6];
|
||||
|
||||
/* Addr is really window number */
|
||||
if (!have_addr)
|
||||
|
@ -190,8 +186,8 @@ db_dump_window(addr, have_addr, count, modif)
|
|||
/* Traverse window stack */
|
||||
for (i=0; i<addr && frame; i++) {
|
||||
if (frame & 1)
|
||||
frame = (u_int64_t)((struct frame64 *)(u_long)(frame + BIAS))->fr_fp;
|
||||
else frame = (u_int64_t)((struct frame32 *)(u_long)frame)->fr_fp;
|
||||
frame = (uint64_t)((struct frame64 *)(u_long)(frame + BIAS))->fr_fp;
|
||||
else frame = (uint64_t)((struct frame32 *)(u_long)frame)->fr_fp;
|
||||
}
|
||||
|
||||
db_printf("Window %lx ", addr);
|
||||
|
@ -199,8 +195,7 @@ db_dump_window(addr, have_addr, count, modif)
|
|||
}
|
||||
|
||||
void
|
||||
db_print_window(frame)
|
||||
u_int64_t frame;
|
||||
db_print_window(uint64_t frame)
|
||||
{
|
||||
if (frame & 1) {
|
||||
struct frame64* f = (struct frame64*)(u_long)(frame + BIAS);
|
||||
|
@ -284,14 +279,10 @@ u_int64_t frame;
|
|||
}
|
||||
|
||||
void
|
||||
db_dump_stack(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
int have_addr;
|
||||
db_expr_t count;
|
||||
const char *modif;
|
||||
db_dump_stack(db_expr_t addr, int have_addr, db_expr_t count, const char *modif)
|
||||
{
|
||||
int i;
|
||||
u_int64_t frame, oldframe;
|
||||
uint64_t frame, oldframe;
|
||||
boolean_t kernel_only = TRUE;
|
||||
char c;
|
||||
const char *cp = modif;
|
||||
|
@ -328,16 +319,16 @@ db_dump_stack(addr, have_addr, count, modif)
|
|||
else
|
||||
frame = ((struct frame64 *)(u_long)frame)->fr_fp;
|
||||
} else {
|
||||
u_int32_t tmp;
|
||||
uint32_t tmp;
|
||||
if (!INKERNEL(((struct frame32 *)(u_long)frame))
|
||||
&& kernel_only) break;
|
||||
db_printf("Window %x ", i);
|
||||
db_print_window(frame);
|
||||
if (!INKERNEL(((struct frame32 *)(u_long)frame))) {
|
||||
copyin(&((struct frame32 *)(u_long)frame)->fr_fp, &tmp, sizeof(tmp));
|
||||
frame = (u_int64_t)tmp;
|
||||
frame = (uint64_t)tmp;
|
||||
} else
|
||||
frame = (u_int64_t)((struct frame32 *)(u_long)frame)->fr_fp;
|
||||
frame = (uint64_t)((struct frame32 *)(u_long)frame)->fr_fp;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -345,11 +336,7 @@ db_dump_stack(addr, have_addr, count, modif)
|
|||
|
||||
|
||||
void
|
||||
db_dump_trap(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
int have_addr;
|
||||
db_expr_t count;
|
||||
const char *modif;
|
||||
db_dump_trap(db_expr_t addr, int have_addr, db_expr_t count, const char *modif)
|
||||
{
|
||||
struct trapframe64 *tf;
|
||||
|
||||
|
@ -430,11 +417,7 @@ db_dump_trap(addr, have_addr, count, modif)
|
|||
}
|
||||
|
||||
void
|
||||
db_dump_fpstate(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
int have_addr;
|
||||
db_expr_t count;
|
||||
const char *modif;
|
||||
db_dump_fpstate(db_expr_t addr, int have_addr, db_expr_t count, const char *modif)
|
||||
{
|
||||
struct fpstate64 *fpstate;
|
||||
|
||||
|
@ -522,11 +505,7 @@ db_dump_fpstate(addr, have_addr, count, modif)
|
|||
}
|
||||
|
||||
void
|
||||
db_dump_ts(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
int have_addr;
|
||||
db_expr_t count;
|
||||
const char *modif;
|
||||
db_dump_ts(db_expr_t addr, int have_addr, db_expr_t count, const char *modif)
|
||||
{
|
||||
struct trapstate *ts;
|
||||
int i, tl;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: emul.c,v 1.15 2005/12/24 20:07:37 perry Exp $ */
|
||||
/* $NetBSD: emul.c,v 1.16 2006/02/11 17:57:32 cdi Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997, 2001 The NetBSD Foundation, Inc.
|
||||
|
@ -37,7 +37,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.15 2005/12/24 20:07:37 perry Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.16 2006/02/11 17:57:32 cdi Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -59,22 +59,19 @@ __KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.15 2005/12/24 20:07:37 perry Exp $");
|
|||
#define IPR(tf, i) ((int32_t *)(u_long)tf->tf_out[6])[i - 16]
|
||||
#define FPR(l, i) ((int32_t) l->l_md.md_fpstate->fs_regs[i])
|
||||
|
||||
static inline int readgpreg __P((struct trapframe64 *, int, void *));
|
||||
static inline int readfpreg __P((struct lwp *, int, void *));
|
||||
static inline int writegpreg __P((struct trapframe64 *, int, const void *));
|
||||
static inline int writefpreg __P((struct lwp *, int, const void *));
|
||||
static inline int decodeaddr __P((struct trapframe64 *, union instr *, void *));
|
||||
static int muldiv __P((struct trapframe64 *, union instr *, int32_t *, int32_t *,
|
||||
int32_t *));
|
||||
static inline int readgpreg(struct trapframe64 *, int, void *);
|
||||
static inline int readfpreg(struct lwp *, int, void *);
|
||||
static inline int writegpreg(struct trapframe64 *, int, const void *);
|
||||
static inline int writefpreg(struct lwp *, int, const void *);
|
||||
static inline int decodeaddr(struct trapframe64 *, union instr *, void *);
|
||||
static int muldiv(struct trapframe64 *, union instr *, int32_t *, int32_t *,
|
||||
int32_t *);
|
||||
|
||||
#define REGNAME(i) "goli"[i >> 3], i & 7
|
||||
|
||||
|
||||
static inline int
|
||||
readgpreg(tf, i, val)
|
||||
struct trapframe64 *tf;
|
||||
int i;
|
||||
void *val;
|
||||
readgpreg(struct trapframe64 *tf, int i, void *val)
|
||||
{
|
||||
int error = 0;
|
||||
if (i == 0)
|
||||
|
@ -89,10 +86,7 @@ readgpreg(tf, i, val)
|
|||
|
||||
|
||||
static inline int
|
||||
writegpreg(tf, i, val)
|
||||
struct trapframe64 *tf;
|
||||
int i;
|
||||
const void *val;
|
||||
writegpreg(struct trapframe64 *tf, int i, const void *val)
|
||||
{
|
||||
int error = 0;
|
||||
|
||||
|
@ -109,10 +103,7 @@ writegpreg(tf, i, val)
|
|||
|
||||
|
||||
static inline int
|
||||
readfpreg(l, i, val)
|
||||
struct lwp *l;
|
||||
int i;
|
||||
void *val;
|
||||
readfpreg(struct lwp *l, int i, void *val)
|
||||
{
|
||||
*(int32_t *) val = FPR(l, i);
|
||||
return 0;
|
||||
|
@ -120,20 +111,14 @@ readfpreg(l, i, val)
|
|||
|
||||
|
||||
static inline int
|
||||
writefpreg(l, i, val)
|
||||
struct lwp *l;
|
||||
int i;
|
||||
const void *val;
|
||||
writefpreg(struct lwp *l, int i, const void *val)
|
||||
{
|
||||
FPR(l, i) = *(const int32_t *) val;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int
|
||||
decodeaddr(tf, code, val)
|
||||
struct trapframe64 *tf;
|
||||
union instr *code;
|
||||
void *val;
|
||||
decodeaddr(struct trapframe64 *tf, union instr *code, void *val)
|
||||
{
|
||||
if (code->i_simm13.i_i)
|
||||
*((int32_t *) val) = code->i_simm13.i_simm13;
|
||||
|
@ -150,10 +135,8 @@ decodeaddr(tf, code, val)
|
|||
|
||||
|
||||
static int
|
||||
muldiv(tf, code, rd, rs1, rs2)
|
||||
struct trapframe64 *tf;
|
||||
union instr *code;
|
||||
int32_t *rd, *rs1, *rs2;
|
||||
muldiv(struct trapframe64 *tf, union instr *code, int32_t *rd, int32_t *rs1,
|
||||
int32_t *rs2)
|
||||
{
|
||||
/*
|
||||
* We check for {S,U}{MUL,DIV}{,cc}
|
||||
|
@ -212,17 +195,17 @@ muldiv(tf, code, rd, rs1, rs2)
|
|||
tf->tf_tstate &= ~(TSTATE_CCR);
|
||||
|
||||
if (*rd == 0)
|
||||
tf->tf_tstate |= (u_int64_t)(ICC_Z|XCC_Z) << TSTATE_CCR_SHIFT;
|
||||
tf->tf_tstate |= (uint64_t)(ICC_Z|XCC_Z) << TSTATE_CCR_SHIFT;
|
||||
else {
|
||||
if (op.bits.sgn && *rd < 0)
|
||||
tf->tf_tstate |= (u_int64_t)(ICC_N|XCC_N) << TSTATE_CCR_SHIFT;
|
||||
tf->tf_tstate |= (uint64_t)(ICC_N|XCC_N) << TSTATE_CCR_SHIFT;
|
||||
if (op.bits.div) {
|
||||
if (*rd * *rs2 != *rs1)
|
||||
tf->tf_tstate |= (u_int64_t)(ICC_V|XCC_V) << TSTATE_CCR_SHIFT;
|
||||
tf->tf_tstate |= (uint64_t)(ICC_V|XCC_V) << TSTATE_CCR_SHIFT;
|
||||
}
|
||||
else {
|
||||
if (*rd / *rs2 != *rs1)
|
||||
tf->tf_tstate |= (u_int64_t)(ICC_V|XCC_V) << TSTATE_CCR_SHIFT;
|
||||
tf->tf_tstate |= (uint64_t)(ICC_V|XCC_V) << TSTATE_CCR_SHIFT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: in4_cksum.c,v 1.7 2005/12/24 20:07:37 perry Exp $ */
|
||||
/* $NetBSD: in4_cksum.c,v 1.8 2006/02/11 17:57:32 cdi Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Matthew R. Green.
|
||||
|
@ -79,7 +79,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: in4_cksum.c,v 1.7 2005/12/24 20:07:37 perry Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: in4_cksum.c,v 1.8 2006/02/11 17:57:32 cdi Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -89,12 +89,12 @@ __KERNEL_RCSID(0, "$NetBSD: in4_cksum.c,v 1.7 2005/12/24 20:07:37 perry Exp $");
|
|||
#include <netinet/ip.h>
|
||||
#include <netinet/ip_var.h>
|
||||
|
||||
extern int in_cksum_internal __P((struct mbuf *, int len, int offset, int sum));
|
||||
extern int in_cksum_internal(struct mbuf *, int len, int offset, int sum);
|
||||
|
||||
int
|
||||
in4_cksum(m, nxt, off, len)
|
||||
struct mbuf *m;
|
||||
u_int8_t nxt;
|
||||
uint8_t nxt;
|
||||
int off, len;
|
||||
{
|
||||
u_char *w;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: intr.c,v 1.48 2005/12/11 12:19:14 christos Exp $ */
|
||||
/* $NetBSD: intr.c,v 1.49 2006/02/11 17:57:32 cdi Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -41,7 +41,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.48 2005/12/11 12:19:14 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.49 2006/02/11 17:57:32 cdi Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "pcons.h"
|
||||
|
@ -68,10 +68,10 @@ __KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.48 2005/12/11 12:19:14 christos Exp $");
|
|||
*/
|
||||
struct intrhand *intrlev[MAXINTNUM];
|
||||
|
||||
void strayintr __P((const struct trapframe64 *, int));
|
||||
int softintr __P((void *));
|
||||
int softnet __P((void *));
|
||||
int intr_list_handler __P((void *));
|
||||
void strayintr(const struct trapframe64 *, int);
|
||||
int softintr(void *);
|
||||
int softnet(void *);
|
||||
int intr_list_handler(void *);
|
||||
|
||||
/*
|
||||
* Stray interrupt handler. Clear it if possible.
|
||||
|
@ -81,9 +81,7 @@ int ignore_stray = 1;
|
|||
int straycnt[16];
|
||||
|
||||
void
|
||||
strayintr(fp, vectored)
|
||||
const struct trapframe64 *fp;
|
||||
int vectored;
|
||||
strayintr(const struct trapframe64 *fp, int vectored)
|
||||
{
|
||||
static int straytime, nstray;
|
||||
int timesince;
|
||||
|
@ -127,11 +125,10 @@ strayintr(fp, vectored)
|
|||
* Soft clock interrupt
|
||||
*/
|
||||
int
|
||||
softintr(fp)
|
||||
void *fp;
|
||||
softintr(void *fp)
|
||||
{
|
||||
#if NPCONS >0
|
||||
extern void pcons_dopoll __P((void));
|
||||
extern void pcons_dopoll(void);
|
||||
|
||||
pcons_dopoll();
|
||||
#endif
|
||||
|
@ -139,8 +136,7 @@ softintr(fp)
|
|||
}
|
||||
|
||||
int
|
||||
softnet(fp)
|
||||
void *fp;
|
||||
softnet(void *fp)
|
||||
{
|
||||
int n, s;
|
||||
|
||||
|
@ -201,8 +197,7 @@ struct intrhand *intrhand[16] = {
|
|||
* a handler to hand out interrupts.
|
||||
*/
|
||||
int
|
||||
intr_list_handler(arg)
|
||||
void * arg;
|
||||
intr_list_handler(void * arg)
|
||||
{
|
||||
int claimed = 0;
|
||||
struct intrhand *ih = (struct intrhand *)arg;
|
||||
|
@ -307,14 +302,14 @@ intr_establish(level, ih)
|
|||
void *
|
||||
softintr_establish(level, fun, arg)
|
||||
int level;
|
||||
void (*fun) __P((void *));
|
||||
void (*fun)(void *);
|
||||
void *arg;
|
||||
{
|
||||
struct intrhand *ih;
|
||||
|
||||
ih = malloc(sizeof(*ih), M_DEVBUF, 0);
|
||||
memset(ih, 0, sizeof(*ih));
|
||||
ih->ih_fun = (int (*) __P((void *)))fun; /* XXX */
|
||||
ih->ih_fun = (int (*)(void *))fun; /* XXX */
|
||||
ih->ih_arg = arg;
|
||||
ih->ih_pil = level;
|
||||
ih->ih_pending = 0;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: intreg.h,v 1.6 2005/12/11 12:19:14 christos Exp $ */
|
||||
/* $NetBSD: intreg.h,v 1.7 2006/02/11 17:57:32 cdi Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -54,5 +54,5 @@
|
|||
|
||||
#ifndef _LOCORE
|
||||
struct intrhand; /* This is in cpu.h if you need it. */
|
||||
void send_softint __P((int cpu, int level, struct intrhand *ih));
|
||||
void send_softint(int cpu, int level, struct intrhand *ih);
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: kgdb_machdep.c,v 1.6 2005/12/24 20:07:37 perry Exp $ */
|
||||
/* $NetBSD: kgdb_machdep.c,v 1.7 2006/02/11 17:57:32 cdi Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
|
@ -128,7 +128,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: kgdb_machdep.c,v 1.6 2005/12/24 20:07:37 perry Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: kgdb_machdep.c,v 1.7 2006/02/11 17:57:32 cdi Exp $");
|
||||
|
||||
#include "opt_kgdb.h"
|
||||
#include "opt_multiprocessor.h"
|
||||
|
@ -149,18 +149,16 @@ __KERNEL_RCSID(0, "$NetBSD: kgdb_machdep.c,v 1.6 2005/12/24 20:07:37 perry Exp $
|
|||
|
||||
#include <sparc/sparc/asm.h>
|
||||
|
||||
extern int64_t pseg_get __P((struct pmap *, vaddr_t));
|
||||
extern int64_t pseg_get(struct pmap *, vaddr_t);
|
||||
|
||||
static inline void kgdb_copy __P((char *, char *, int));
|
||||
static inline void kgdb_zero __P((char *, int));
|
||||
static inline void kgdb_copy(register char *, register char *, register int);
|
||||
static inline void kgdb_zero(register char *, register int);
|
||||
|
||||
/*
|
||||
* This little routine exists simply so that bcopy() can be debugged.
|
||||
*/
|
||||
static inline void
|
||||
kgdb_copy(src, dst, len)
|
||||
register char *src, *dst;
|
||||
register int len;
|
||||
kgdb_copy(register char *src, register char *dst, register int len)
|
||||
{
|
||||
|
||||
while (--len >= 0)
|
||||
|
@ -169,9 +167,7 @@ kgdb_copy(src, dst, len)
|
|||
|
||||
/* ditto for bzero */
|
||||
static inline void
|
||||
kgdb_zero(ptr, len)
|
||||
register char *ptr;
|
||||
register int len;
|
||||
kgdb_zero(register char *ptr, register int len)
|
||||
{
|
||||
while (--len >= 0)
|
||||
*ptr++ = (char) 0;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: kgdb_stub.c,v 1.16 2005/12/11 12:19:14 christos Exp $ */
|
||||
/* $NetBSD: kgdb_stub.c,v 1.17 2006/02/11 17:57:32 cdi Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -93,7 +93,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: kgdb_stub.c,v 1.16 2005/12/11 12:19:14 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: kgdb_stub.c,v 1.17 2006/02/11 17:57:32 cdi Exp $");
|
||||
|
||||
#include "opt_kgdb.h"
|
||||
|
||||
|
@ -129,30 +129,28 @@ int kgdb_debug_panic = 0; /* != 0 waits for remote on panic */
|
|||
#if defined(SUN4M)
|
||||
#define getpte4m(va) lda(((vaddr_t)va & 0xFFFFF000) | \
|
||||
ASI_SRMMUFP_L3, ASI_SRMMUFP)
|
||||
void setpte4m __P((vaddr_t, int));
|
||||
void setpte4m(vaddr_t, int);
|
||||
#endif
|
||||
|
||||
#define getpte4(va) lda(va, ASI_PTE)
|
||||
#define setpte4(va, pte) sta(va, ASI_PTE, pte)
|
||||
|
||||
void kgdb_copy __P((char *, char *, int));
|
||||
void kgdb_zero __P((char *, int));
|
||||
static void kgdb_send __P((u_int, u_char *, int));
|
||||
static int kgdb_recv __P((u_char *, int *));
|
||||
static int computeSignal __P((int));
|
||||
void regs_to_gdb __P((struct trapframe *, u_long *));
|
||||
void gdb_to_regs __P((struct trapframe *, u_long *));
|
||||
int kgdb_trap __P((int, struct trapframe *));
|
||||
int kgdb_acc __P((caddr_t, int, int, int));
|
||||
void kdb_mkwrite __P((caddr_t, int));
|
||||
void kgdb_copy(register char *, register char *, register int);
|
||||
void kgdb_zero(register char *, register int);
|
||||
static void kgdb_send(register u_int, register u_char *, register int);
|
||||
static int kgdb_recv(u_char *, int *);
|
||||
static int computeSignal(int);
|
||||
void regs_to_gdb(struct trapframe *, u_long *);
|
||||
void gdb_to_regs(struct trapframe *, u_long *);
|
||||
int kgdb_trap(int, struct trapframe *);
|
||||
int kgdb_acc(caddr_t, int, int, int);
|
||||
void kdb_mkwrite(register caddr_t, register int);
|
||||
|
||||
/*
|
||||
* This little routine exists simply so that bcopy() can be debugged.
|
||||
*/
|
||||
void
|
||||
kgdb_copy(src, dst, len)
|
||||
register char *src, *dst;
|
||||
register int len;
|
||||
kgdb_copy(register char *src, register char *dst, register int len)
|
||||
{
|
||||
|
||||
while (--len >= 0)
|
||||
|
@ -161,16 +159,14 @@ kgdb_copy(src, dst, len)
|
|||
|
||||
/* ditto for bzero */
|
||||
void
|
||||
kgdb_zero(ptr, len)
|
||||
register char *ptr;
|
||||
register int len;
|
||||
kgdb_zero(register char *ptr, register int len)
|
||||
{
|
||||
while (--len >= 0)
|
||||
*ptr++ = (char) 0;
|
||||
}
|
||||
|
||||
static int (*kgdb_getc) __P((void *));
|
||||
static void (*kgdb_putc) __P((void *, int));
|
||||
static int (*kgdb_getc)(void *);
|
||||
static void (*kgdb_putc)(void *, int);
|
||||
static void *kgdb_ioarg;
|
||||
|
||||
#define GETC() ((*kgdb_getc)(kgdb_ioarg))
|
||||
|
@ -190,10 +186,7 @@ static void *kgdb_ioarg;
|
|||
}
|
||||
|
||||
void
|
||||
kgdb_attach(getfn, putfn, ioarg)
|
||||
int (*getfn) __P((void *));
|
||||
void (*putfn) __P((void *, int));
|
||||
void *ioarg;
|
||||
kgdb_attach(int (*getfn)(void *), void (*putfn)(void *, int), void *ioarg)
|
||||
{
|
||||
|
||||
kgdb_getc = getfn;
|
||||
|
@ -205,10 +198,7 @@ kgdb_attach(getfn, putfn, ioarg)
|
|||
* Send a message. The host gets one chance to read it.
|
||||
*/
|
||||
static void
|
||||
kgdb_send(type, bp, len)
|
||||
register u_int type;
|
||||
register u_char *bp;
|
||||
register int len;
|
||||
kgdb_send(register u_int type, register u_char *bp, register int len)
|
||||
{
|
||||
register u_char csum;
|
||||
register u_char *ep = bp + len;
|
||||
|
@ -228,9 +218,7 @@ kgdb_send(type, bp, len)
|
|||
}
|
||||
|
||||
static int
|
||||
kgdb_recv(bp, lenp)
|
||||
u_char *bp;
|
||||
int *lenp;
|
||||
kgdb_recv(u_char *bp, int *lenp)
|
||||
{
|
||||
register u_char c, csum;
|
||||
register int escape, len;
|
||||
|
@ -298,8 +286,7 @@ restart:
|
|||
* XXX should this be done at the other end?
|
||||
*/
|
||||
static int
|
||||
computeSignal(type)
|
||||
int type;
|
||||
computeSignal(int type)
|
||||
{
|
||||
int sigval;
|
||||
|
||||
|
@ -400,9 +387,7 @@ kgdb_panic()
|
|||
* understood by gdb.
|
||||
*/
|
||||
void
|
||||
regs_to_gdb(tf, gdb_regs)
|
||||
struct trapframe *tf;
|
||||
u_long *gdb_regs;
|
||||
regs_to_gdb(struct trapframe *tf, u_long *gdb_regs)
|
||||
{
|
||||
|
||||
/* %g0..%g7 and %o0..%o7: from trapframe */
|
||||
|
@ -430,9 +415,7 @@ regs_to_gdb(tf, gdb_regs)
|
|||
* Reverse the above.
|
||||
*/
|
||||
void
|
||||
gdb_to_regs(tf, gdb_regs)
|
||||
struct trapframe *tf;
|
||||
u_long *gdb_regs;
|
||||
gdb_to_regs(struct trapframe *tf, u_long *gdb_regs)
|
||||
{
|
||||
|
||||
kgdb_copy((caddr_t)&gdb_regs[1], (caddr_t)&tf->tf_global[1], 15 * 4);
|
||||
|
@ -452,9 +435,7 @@ static u_char outbuffer[SL_RPCSIZE];
|
|||
* a remote gdb.
|
||||
*/
|
||||
int
|
||||
kgdb_trap(type, tf)
|
||||
int type;
|
||||
register struct trapframe *tf;
|
||||
kgdb_trap(int type, register struct trapframe *tf)
|
||||
{
|
||||
register u_long len;
|
||||
caddr_t addr;
|
||||
|
@ -654,9 +635,7 @@ extern char *kernel_map; /* XXX! */
|
|||
* Plus this lets us debug kernacc. (%%% XXX)
|
||||
*/
|
||||
int
|
||||
kgdb_acc(addr, len, rw, usertoo)
|
||||
caddr_t addr;
|
||||
int len, rw, usertoo;
|
||||
kgdb_acc(caddr_t addr, int len, int rw, int usertoo)
|
||||
{
|
||||
int pte;
|
||||
|
||||
|
@ -702,9 +681,7 @@ kgdb_acc(addr, len, rw, usertoo)
|
|||
}
|
||||
|
||||
void
|
||||
kdb_mkwrite(addr, len)
|
||||
register caddr_t addr;
|
||||
register int len;
|
||||
kdb_mkwrite(register caddr_t addr, register int len)
|
||||
{
|
||||
if (CPU_ISSUN4 || CPU_ISSUN4C && kernel_map != NULL) {
|
||||
chgkprot(addr, len, B_WRITE);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: locore.s,v 1.209 2006/01/27 18:37:49 cdi Exp $ */
|
||||
/* $NetBSD: locore.s,v 1.210 2006/02/11 17:57:32 cdi Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-2002 Eduardo Horvath
|
||||
|
@ -6236,7 +6236,7 @@ ENTRY(icache_flush_page)
|
|||
nop
|
||||
|
||||
/*
|
||||
* cache_flush_phys __P((paddr_t, psize_t, int));
|
||||
* cache_flush_phys(paddr_t, psize_t, int);
|
||||
*
|
||||
* Clear a set of paddrs from the D$, I$ and if param3 is
|
||||
* non-zero, E$. (E$ is not supported yet).
|
||||
|
@ -8091,7 +8091,7 @@ ENTRY(subyte)
|
|||
*/
|
||||
|
||||
/*
|
||||
* u_int64_t
|
||||
* uint64_t
|
||||
* probeget(addr, asi, size)
|
||||
* paddr_t addr;
|
||||
* int asi;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: machdep.c,v 1.184 2006/01/27 18:37:49 cdi Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.185 2006/02/11 17:57:32 cdi Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -78,7 +78,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.184 2006/01/27 18:37:49 cdi Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.185 2006/02/11 17:57:32 cdi Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_compat_netbsd.h"
|
||||
|
@ -171,8 +171,8 @@ extern caddr_t msgbufaddr;
|
|||
*/
|
||||
int safepri = 0;
|
||||
|
||||
void dumpsys __P((void));
|
||||
void stackdump __P((void));
|
||||
void dumpsys(void);
|
||||
void stackdump(void);
|
||||
|
||||
|
||||
/*
|
||||
|
@ -200,7 +200,7 @@ cpu_startup()
|
|||
*/
|
||||
printf("%s%s", copyright, version);
|
||||
/*identifycpu();*/
|
||||
format_bytes(pbuf, sizeof(pbuf), ctob((u_int64_t)physmem));
|
||||
format_bytes(pbuf, sizeof(pbuf), ctob((uint64_t)physmem));
|
||||
printf("total memory = %s\n", pbuf);
|
||||
|
||||
minaddr = 0;
|
||||
|
@ -696,7 +696,7 @@ haltsys:
|
|||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
u_int32_t dumpmag = 0x8fca0101; /* magic number for savecore */
|
||||
uint32_t dumpmag = 0x8fca0101; /* magic number for savecore */
|
||||
int dumpsize = 0; /* also for savecore */
|
||||
long dumplo = 0;
|
||||
|
||||
|
@ -756,7 +756,7 @@ dumpsys()
|
|||
const struct bdevsw *bdev;
|
||||
register int psize;
|
||||
daddr_t blkno;
|
||||
register int (*dump) __P((dev_t, daddr_t, caddr_t, size_t));
|
||||
register int (*dump)(dev_t, daddr_t, caddr_t, size_t);
|
||||
int j, error = 0;
|
||||
unsigned long todo;
|
||||
register struct mem_region *mp;
|
||||
|
@ -869,13 +869,12 @@ dumpsys()
|
|||
}
|
||||
}
|
||||
|
||||
void trapdump __P((struct trapframe64*));
|
||||
void trapdump(struct trapframe64*);
|
||||
/*
|
||||
* dump out a trapframe.
|
||||
*/
|
||||
void
|
||||
trapdump(tf)
|
||||
struct trapframe64* tf;
|
||||
trapdump(struct trapframe64* tf)
|
||||
{
|
||||
printf("TRAPFRAME: tstate=%llx pc=%llx npc=%llx y=%x\n",
|
||||
(unsigned long long)tf->tf_tstate, (unsigned long long)tf->tf_pc,
|
||||
|
@ -1600,22 +1599,17 @@ struct sparc_bus_dma_tag mainbus_dma_tag = {
|
|||
/*
|
||||
* Base bus space handlers.
|
||||
*/
|
||||
static int sparc_bus_map __P(( bus_space_tag_t, bus_addr_t,
|
||||
bus_size_t, int, vaddr_t, bus_space_handle_t *));
|
||||
static int sparc_bus_unmap __P((bus_space_tag_t, bus_space_handle_t,
|
||||
bus_size_t));
|
||||
static int sparc_bus_subregion __P((bus_space_tag_t, bus_space_handle_t,
|
||||
bus_size_t, bus_size_t,
|
||||
bus_space_handle_t *));
|
||||
static paddr_t sparc_bus_mmap __P((bus_space_tag_t, bus_addr_t, off_t, int, int));
|
||||
static void *sparc_mainbus_intr_establish __P((bus_space_tag_t, int, int,
|
||||
int (*) __P((void *)),
|
||||
void *, void (*)__P((void))));
|
||||
static int sparc_bus_alloc __P((bus_space_tag_t, bus_addr_t, bus_addr_t,
|
||||
bus_size_t, bus_size_t, bus_size_t, int,
|
||||
bus_addr_t *, bus_space_handle_t *));
|
||||
static void sparc_bus_free __P((bus_space_tag_t, bus_space_handle_t,
|
||||
bus_size_t));
|
||||
static int sparc_bus_map(bus_space_tag_t, bus_addr_t, bus_size_t, int,
|
||||
vaddr_t, bus_space_handle_t *);
|
||||
static int sparc_bus_unmap(bus_space_tag_t, bus_space_handle_t, bus_size_t);
|
||||
static int sparc_bus_subregion(bus_space_tag_t, bus_space_handle_t, bus_size_t,
|
||||
bus_size_t, bus_space_handle_t *);
|
||||
static paddr_t sparc_bus_mmap(bus_space_tag_t, bus_addr_t, off_t, int, int);
|
||||
static void *sparc_mainbus_intr_establish(bus_space_tag_t, int, int,
|
||||
int (*)(void *), void *, void (*)(void));
|
||||
static int sparc_bus_alloc(bus_space_tag_t, bus_addr_t, bus_addr_t, bus_size_t,
|
||||
bus_size_t, bus_size_t, int, bus_addr_t *, bus_space_handle_t *);
|
||||
static void sparc_bus_free(bus_space_tag_t, bus_space_handle_t, bus_size_t);
|
||||
|
||||
vaddr_t iobase = IODEV_BASE;
|
||||
struct extent *io_space = NULL;
|
||||
|
@ -1672,15 +1666,11 @@ bus_space_translate_address_generic(struct openprom_range *ranges, int nranges,
|
|||
}
|
||||
|
||||
int
|
||||
sparc_bus_map(t, addr, size, flags, unused, hp)
|
||||
bus_space_tag_t t;
|
||||
bus_addr_t addr;
|
||||
bus_size_t size;
|
||||
vaddr_t unused;
|
||||
bus_space_handle_t *hp;
|
||||
sparc_bus_map(bus_space_tag_t t, bus_addr_t addr, bus_size_t size,
|
||||
int flags, vaddr_t unused, bus_space_handle_t *hp)
|
||||
{
|
||||
vaddr_t v;
|
||||
u_int64_t pa;
|
||||
uint64_t pa;
|
||||
paddr_t pm_flags = 0;
|
||||
vm_prot_t pm_prot = VM_PROT_READ;
|
||||
int err, map_little = 0;
|
||||
|
@ -1782,12 +1772,8 @@ sparc_bus_map(t, addr, size, flags, unused, hp)
|
|||
}
|
||||
|
||||
int
|
||||
sparc_bus_subregion(tag, handle, offset, size, nhandlep)
|
||||
bus_space_tag_t tag;
|
||||
bus_space_handle_t handle;
|
||||
bus_size_t offset;
|
||||
bus_size_t size;
|
||||
bus_space_handle_t *nhandlep;
|
||||
sparc_bus_subregion(bus_space_tag_t tag, bus_space_handle_t handle,
|
||||
bus_size_t offset, bus_size_t size, bus_space_handle_t *nhandlep)
|
||||
{
|
||||
nhandlep->_ptr = handle._ptr + offset;
|
||||
nhandlep->_asi = handle._asi;
|
||||
|
@ -1796,10 +1782,7 @@ sparc_bus_subregion(tag, handle, offset, size, nhandlep)
|
|||
}
|
||||
|
||||
int
|
||||
sparc_bus_unmap(t, bh, size)
|
||||
bus_space_tag_t t;
|
||||
bus_size_t size;
|
||||
bus_space_handle_t bh;
|
||||
sparc_bus_unmap(bus_space_tag_t t, bus_space_handle_t bh, bus_size_t size)
|
||||
{
|
||||
vaddr_t va = trunc_page((vaddr_t)bh._ptr);
|
||||
vaddr_t endva = va + round_page(size);
|
||||
|
@ -1815,12 +1798,8 @@ sparc_bus_unmap(t, bh, size)
|
|||
}
|
||||
|
||||
paddr_t
|
||||
sparc_bus_mmap(t, paddr, off, prot, flags)
|
||||
bus_space_tag_t t;
|
||||
bus_addr_t paddr;
|
||||
off_t off;
|
||||
int prot;
|
||||
int flags;
|
||||
sparc_bus_mmap(bus_space_tag_t t, bus_addr_t paddr, off_t off, int prot,
|
||||
int flags)
|
||||
{
|
||||
/* Devices are un-cached... although the driver should do that */
|
||||
return ((paddr+off)|PMAP_NC);
|
||||
|
@ -1828,13 +1807,8 @@ sparc_bus_mmap(t, paddr, off, prot, flags)
|
|||
|
||||
|
||||
void *
|
||||
sparc_mainbus_intr_establish(t, pil, level, handler, arg, fastvec)
|
||||
bus_space_tag_t t;
|
||||
int pil;
|
||||
int level;
|
||||
int (*handler)__P((void *));
|
||||
void *arg;
|
||||
void (*fastvec)__P((void)); /* ignored */
|
||||
sparc_mainbus_intr_establish(bus_space_tag_t t, int pil, int level,
|
||||
int (*handler)(void *), void *arg, void (*fastvec)(void) /* ignored */)
|
||||
{
|
||||
struct intrhand *ih;
|
||||
|
||||
|
@ -1850,25 +1824,14 @@ sparc_mainbus_intr_establish(t, pil, level, handler, arg, fastvec)
|
|||
}
|
||||
|
||||
int
|
||||
sparc_bus_alloc(t, rs, re, s, a, b, f, ap, hp)
|
||||
bus_space_tag_t t;
|
||||
bus_addr_t rs;
|
||||
bus_addr_t re;
|
||||
bus_size_t s;
|
||||
bus_size_t a;
|
||||
bus_size_t b;
|
||||
int f;
|
||||
bus_addr_t *ap;
|
||||
bus_space_handle_t *hp;
|
||||
sparc_bus_alloc(bus_space_tag_t t, bus_addr_t rs, bus_addr_t re, bus_size_t s,
|
||||
bus_size_t a, bus_size_t b, int f, bus_addr_t *ap, bus_space_handle_t *hp)
|
||||
{
|
||||
return (ENOTTY);
|
||||
}
|
||||
|
||||
void
|
||||
sparc_bus_free(t, h, s)
|
||||
bus_space_tag_t t;
|
||||
bus_space_handle_t h;
|
||||
bus_size_t s;
|
||||
sparc_bus_free(bus_space_tag_t t, bus_space_handle_t h, bus_size_t s)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -2015,24 +1978,24 @@ cpu_setmcontext(l, mcp, flags)
|
|||
tf->tf_tstate = (tf->tf_tstate & ~TSTATE_CCR) |
|
||||
PSRCC_TO_TSTATE(gr[_REG_PSR]);
|
||||
#endif
|
||||
tf->tf_pc = (u_int64_t)gr[_REG_PC];
|
||||
tf->tf_npc = (u_int64_t)gr[_REG_nPC];
|
||||
tf->tf_y = (u_int64_t)gr[_REG_Y];
|
||||
tf->tf_global[1] = (u_int64_t)gr[_REG_G1];
|
||||
tf->tf_global[2] = (u_int64_t)gr[_REG_G2];
|
||||
tf->tf_global[3] = (u_int64_t)gr[_REG_G3];
|
||||
tf->tf_global[4] = (u_int64_t)gr[_REG_G4];
|
||||
tf->tf_global[5] = (u_int64_t)gr[_REG_G5];
|
||||
tf->tf_global[6] = (u_int64_t)gr[_REG_G6];
|
||||
tf->tf_global[7] = (u_int64_t)gr[_REG_G7];
|
||||
tf->tf_out[0] = (u_int64_t)gr[_REG_O0];
|
||||
tf->tf_out[1] = (u_int64_t)gr[_REG_O1];
|
||||
tf->tf_out[2] = (u_int64_t)gr[_REG_O2];
|
||||
tf->tf_out[3] = (u_int64_t)gr[_REG_O3];
|
||||
tf->tf_out[4] = (u_int64_t)gr[_REG_O4];
|
||||
tf->tf_out[5] = (u_int64_t)gr[_REG_O5];
|
||||
tf->tf_out[6] = (u_int64_t)gr[_REG_O6];
|
||||
tf->tf_out[7] = (u_int64_t)gr[_REG_O7];
|
||||
tf->tf_pc = (uint64_t)gr[_REG_PC];
|
||||
tf->tf_npc = (uint64_t)gr[_REG_nPC];
|
||||
tf->tf_y = (uint64_t)gr[_REG_Y];
|
||||
tf->tf_global[1] = (uint64_t)gr[_REG_G1];
|
||||
tf->tf_global[2] = (uint64_t)gr[_REG_G2];
|
||||
tf->tf_global[3] = (uint64_t)gr[_REG_G3];
|
||||
tf->tf_global[4] = (uint64_t)gr[_REG_G4];
|
||||
tf->tf_global[5] = (uint64_t)gr[_REG_G5];
|
||||
tf->tf_global[6] = (uint64_t)gr[_REG_G6];
|
||||
tf->tf_global[7] = (uint64_t)gr[_REG_G7];
|
||||
tf->tf_out[0] = (uint64_t)gr[_REG_O0];
|
||||
tf->tf_out[1] = (uint64_t)gr[_REG_O1];
|
||||
tf->tf_out[2] = (uint64_t)gr[_REG_O2];
|
||||
tf->tf_out[3] = (uint64_t)gr[_REG_O3];
|
||||
tf->tf_out[4] = (uint64_t)gr[_REG_O4];
|
||||
tf->tf_out[5] = (uint64_t)gr[_REG_O5];
|
||||
tf->tf_out[6] = (uint64_t)gr[_REG_O6];
|
||||
tf->tf_out[7] = (uint64_t)gr[_REG_O7];
|
||||
/* %asi restored above; %fprs not yet supported. */
|
||||
|
||||
/* XXX mcp->__gwins */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: netbsd32_machdep.c,v 1.56 2005/12/24 20:07:37 perry Exp $ */
|
||||
/* $NetBSD: netbsd32_machdep.c,v 1.57 2006/02/11 17:57:32 cdi Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998, 2001 Matthew R. Green
|
||||
|
@ -29,7 +29,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.56 2005/12/24 20:07:37 perry Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.57 2006/02/11 17:57:32 cdi Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_compat_netbsd.h"
|
||||
|
@ -89,7 +89,7 @@ const char machine32[] = "sparc";
|
|||
const char machine_arch32[] = "sparc";
|
||||
|
||||
#if NFIRM_EVENTS > 0
|
||||
static int ev_out32 __P((struct firm_event *, int, struct uio *));
|
||||
static int ev_out32(struct firm_event *, int, struct uio *);
|
||||
#endif
|
||||
|
||||
void netbsd32_upcall(struct lwp *, int, int, int, void *, void *, void *, sa_upcall_t);
|
||||
|
@ -283,7 +283,7 @@ netbsd32_sendsig_sigcontext(const ksiginfo_t *ksi, const sigset_t *mask)
|
|||
tf->tf_global[1] = (long)catcher;
|
||||
tf->tf_pc = addr;
|
||||
tf->tf_npc = addr + 4;
|
||||
tf->tf_out[6] = (u_int64_t)(u_int)(u_long)newsp;
|
||||
tf->tf_out[6] = (uint64_t)(u_int)(u_long)newsp;
|
||||
|
||||
/* Remember that we're now on the signal stack. */
|
||||
if (onstack)
|
||||
|
@ -894,24 +894,24 @@ netbsd32_cpu_setmcontext(l, mcp, flags)
|
|||
/* take only tstate CCR (and ASI) fields */
|
||||
tf->tf_tstate = (tf->tf_tstate & ~TSTATE_CCR) |
|
||||
PSRCC_TO_TSTATE(gr[_REG_PSR]);
|
||||
tf->tf_pc = (u_int64_t)gr[_REG_PC];
|
||||
tf->tf_npc = (u_int64_t)gr[_REG_nPC];
|
||||
tf->tf_y = (u_int64_t)gr[_REG_Y];
|
||||
tf->tf_global[1] = (u_int64_t)gr[_REG_G1];
|
||||
tf->tf_global[2] = (u_int64_t)gr[_REG_G2];
|
||||
tf->tf_global[3] = (u_int64_t)gr[_REG_G3];
|
||||
tf->tf_global[4] = (u_int64_t)gr[_REG_G4];
|
||||
tf->tf_global[5] = (u_int64_t)gr[_REG_G5];
|
||||
tf->tf_global[6] = (u_int64_t)gr[_REG_G6];
|
||||
tf->tf_global[7] = (u_int64_t)gr[_REG_G7];
|
||||
tf->tf_out[0] = (u_int64_t)gr[_REG_O0];
|
||||
tf->tf_out[1] = (u_int64_t)gr[_REG_O1];
|
||||
tf->tf_out[2] = (u_int64_t)gr[_REG_O2];
|
||||
tf->tf_out[3] = (u_int64_t)gr[_REG_O3];
|
||||
tf->tf_out[4] = (u_int64_t)gr[_REG_O4];
|
||||
tf->tf_out[5] = (u_int64_t)gr[_REG_O5];
|
||||
tf->tf_out[6] = (u_int64_t)gr[_REG_O6];
|
||||
tf->tf_out[7] = (u_int64_t)gr[_REG_O7];
|
||||
tf->tf_pc = (uint64_t)gr[_REG_PC];
|
||||
tf->tf_npc = (uint64_t)gr[_REG_nPC];
|
||||
tf->tf_y = (uint64_t)gr[_REG_Y];
|
||||
tf->tf_global[1] = (uint64_t)gr[_REG_G1];
|
||||
tf->tf_global[2] = (uint64_t)gr[_REG_G2];
|
||||
tf->tf_global[3] = (uint64_t)gr[_REG_G3];
|
||||
tf->tf_global[4] = (uint64_t)gr[_REG_G4];
|
||||
tf->tf_global[5] = (uint64_t)gr[_REG_G5];
|
||||
tf->tf_global[6] = (uint64_t)gr[_REG_G6];
|
||||
tf->tf_global[7] = (uint64_t)gr[_REG_G7];
|
||||
tf->tf_out[0] = (uint64_t)gr[_REG_O0];
|
||||
tf->tf_out[1] = (uint64_t)gr[_REG_O1];
|
||||
tf->tf_out[2] = (uint64_t)gr[_REG_O2];
|
||||
tf->tf_out[3] = (uint64_t)gr[_REG_O3];
|
||||
tf->tf_out[4] = (uint64_t)gr[_REG_O4];
|
||||
tf->tf_out[5] = (uint64_t)gr[_REG_O5];
|
||||
tf->tf_out[6] = (uint64_t)gr[_REG_O6];
|
||||
tf->tf_out[7] = (uint64_t)gr[_REG_O7];
|
||||
/* %asi restored above; %fprs not yet supported. */
|
||||
|
||||
/* XXX mcp->__gwins */
|
||||
|
@ -968,10 +968,7 @@ netbsd32_cpu_setmcontext(l, mcp, flags)
|
|||
* Write out a series of 32-bit firm_events.
|
||||
*/
|
||||
int
|
||||
ev_out32(e, n, uio)
|
||||
struct firm_event *e;
|
||||
int n;
|
||||
struct uio *uio;
|
||||
ev_out32(struct firm_event *e, int n, struct uio *uio)
|
||||
{
|
||||
struct firm_event32 e32;
|
||||
int error = 0;
|
||||
|
@ -1239,24 +1236,24 @@ cpu_setmcontext32(struct lwp *l, const mcontext32_t *mcp, unsigned int flags)
|
|||
/* take only tstate CCR (and ASI) fields */
|
||||
tf->tf_tstate = (tf->tf_tstate & ~TSTATE_CCR) |
|
||||
PSRCC_TO_TSTATE(gr[_REG32_PSR]);
|
||||
tf->tf_pc = (u_int64_t)gr[_REG32_PC];
|
||||
tf->tf_npc = (u_int64_t)gr[_REG32_nPC];
|
||||
tf->tf_y = (u_int64_t)gr[_REG32_Y];
|
||||
tf->tf_global[1] = (u_int64_t)gr[_REG32_G1];
|
||||
tf->tf_global[2] = (u_int64_t)gr[_REG32_G2];
|
||||
tf->tf_global[3] = (u_int64_t)gr[_REG32_G3];
|
||||
tf->tf_global[4] = (u_int64_t)gr[_REG32_G4];
|
||||
tf->tf_global[5] = (u_int64_t)gr[_REG32_G5];
|
||||
tf->tf_global[6] = (u_int64_t)gr[_REG32_G6];
|
||||
tf->tf_global[7] = (u_int64_t)gr[_REG32_G7];
|
||||
tf->tf_out[0] = (u_int64_t)gr[_REG32_O0];
|
||||
tf->tf_out[1] = (u_int64_t)gr[_REG32_O1];
|
||||
tf->tf_out[2] = (u_int64_t)gr[_REG32_O2];
|
||||
tf->tf_out[3] = (u_int64_t)gr[_REG32_O3];
|
||||
tf->tf_out[4] = (u_int64_t)gr[_REG32_O4];
|
||||
tf->tf_out[5] = (u_int64_t)gr[_REG32_O5];
|
||||
tf->tf_out[6] = (u_int64_t)gr[_REG32_O6];
|
||||
tf->tf_out[7] = (u_int64_t)gr[_REG32_O7];
|
||||
tf->tf_pc = (uint64_t)gr[_REG32_PC];
|
||||
tf->tf_npc = (uint64_t)gr[_REG32_nPC];
|
||||
tf->tf_y = (uint64_t)gr[_REG32_Y];
|
||||
tf->tf_global[1] = (uint64_t)gr[_REG32_G1];
|
||||
tf->tf_global[2] = (uint64_t)gr[_REG32_G2];
|
||||
tf->tf_global[3] = (uint64_t)gr[_REG32_G3];
|
||||
tf->tf_global[4] = (uint64_t)gr[_REG32_G4];
|
||||
tf->tf_global[5] = (uint64_t)gr[_REG32_G5];
|
||||
tf->tf_global[6] = (uint64_t)gr[_REG32_G6];
|
||||
tf->tf_global[7] = (uint64_t)gr[_REG32_G7];
|
||||
tf->tf_out[0] = (uint64_t)gr[_REG32_O0];
|
||||
tf->tf_out[1] = (uint64_t)gr[_REG32_O1];
|
||||
tf->tf_out[2] = (uint64_t)gr[_REG32_O2];
|
||||
tf->tf_out[3] = (uint64_t)gr[_REG32_O3];
|
||||
tf->tf_out[4] = (uint64_t)gr[_REG32_O4];
|
||||
tf->tf_out[5] = (uint64_t)gr[_REG32_O5];
|
||||
tf->tf_out[6] = (uint64_t)gr[_REG32_O6];
|
||||
tf->tf_out[7] = (uint64_t)gr[_REG32_O7];
|
||||
/* %asi restored above; %fprs not yet supported. */
|
||||
|
||||
/* XXX mcp->__gwins */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ofw_machdep.c,v 1.28 2005/12/11 12:19:15 christos Exp $ */
|
||||
/* $NetBSD: ofw_machdep.c,v 1.29 2006/02/11 17:57:32 cdi Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1996 Wolfgang Solfrank.
|
||||
|
@ -32,7 +32,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ofw_machdep.c,v 1.28 2005/12/11 12:19:15 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ofw_machdep.c,v 1.29 2006/02/11 17:57:32 cdi Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/buf.h>
|
||||
|
@ -62,8 +62,8 @@ __KERNEL_RCSID(0, "$NetBSD: ofw_machdep.c,v 1.28 2005/12/11 12:19:15 christos Ex
|
|||
|
||||
static u_int mmuh = -1, memh = -1;
|
||||
|
||||
static u_int get_mmu_handle __P((void));
|
||||
static u_int get_memory_handle __P((void));
|
||||
static u_int get_mmu_handle(void);
|
||||
static u_int get_memory_handle(void);
|
||||
|
||||
static u_int
|
||||
get_mmu_handle()
|
||||
|
@ -160,7 +160,7 @@ prom_vtop(vaddr)
|
|||
(int)(args.mode>>32), (int)args.mode, (int)(args.phys_hi>>32), (int)args.phys_hi,
|
||||
(int)(args.phys_lo>>32), (int)args.phys_lo);
|
||||
#endif
|
||||
return (paddr_t)((((paddr_t)args.phys_hi)<<32)|(u_int32_t)args.phys_lo);
|
||||
return (paddr_t)((((paddr_t)args.phys_hi)<<32)|(uint32_t)args.phys_lo);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -398,7 +398,7 @@ prom_alloc_phys(len, align)
|
|||
args.len = len;
|
||||
if (openfirmware(&args) != 0)
|
||||
return -1;
|
||||
return (paddr_t)((((paddr_t)args.phys_hi)<<32)|(u_int32_t)args.phys_lo);
|
||||
return (paddr_t)((((paddr_t)args.phys_hi)<<32)|(uint32_t)args.phys_lo);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -441,7 +441,7 @@ prom_claim_phys(phys, len)
|
|||
args.phys_lo = HDL2CELL(phys);
|
||||
if (openfirmware(&args) != 0)
|
||||
return -1;
|
||||
return (paddr_t)((((paddr_t)args.rphys_hi)<<32)|(u_int32_t)args.rphys_lo);
|
||||
return (paddr_t)((((paddr_t)args.rphys_hi)<<32)|(uint32_t)args.rphys_lo);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -538,7 +538,7 @@ prom_get_msgbuf(len, align)
|
|||
args.status = -1;
|
||||
if (openfirmware(&args) == 0 && args.status == 0) {
|
||||
return (((paddr_t)args.phys_hi<<32)|
|
||||
(u_int32_t)args.phys_lo);
|
||||
(uint32_t)args.phys_lo);
|
||||
} else prom_printf("prom_get_msgbuf: SUNW,retain failed\r\n");
|
||||
} else prom_printf("prom_get_msgbuf: test-method failed\r\n");
|
||||
} else prom_printf("prom_get_msgbuf: test failed\r\n");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pmap.c,v 1.169 2006/01/31 20:18:40 nakayama Exp $ */
|
||||
/* $NetBSD: pmap.c,v 1.170 2006/02/11 17:57:32 cdi Exp $ */
|
||||
/*
|
||||
*
|
||||
* Copyright (C) 1996-1999 Eduardo Horvath.
|
||||
|
@ -26,7 +26,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.169 2006/01/31 20:18:40 nakayama Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.170 2006/02/11 17:57:32 cdi Exp $");
|
||||
|
||||
#undef NO_VCACHE /* Don't forget the locked TLB in dostart */
|
||||
#define HWREF
|
||||
|
@ -76,8 +76,8 @@ __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.169 2006/01/31 20:18:40 nakayama Exp $");
|
|||
paddr_t cpu0paddr; /* contigious phys memory preallocated for cpus */
|
||||
|
||||
/* These routines are in assembly to allow access thru physical mappings */
|
||||
extern int64_t pseg_get __P((struct pmap *, vaddr_t));
|
||||
extern int pseg_set __P((struct pmap *, vaddr_t, int64_t, paddr_t));
|
||||
extern int64_t pseg_get(struct pmap *, vaddr_t);
|
||||
extern int pseg_set(struct pmap *, vaddr_t, int64_t, paddr_t);
|
||||
|
||||
/*
|
||||
* Diatribe on ref/mod counting:
|
||||
|
@ -124,10 +124,10 @@ extern int pseg_set __P((struct pmap *, vaddr_t, int64_t, paddr_t));
|
|||
struct pool pmap_pmap_pool;
|
||||
struct pool pmap_pv_pool;
|
||||
|
||||
pv_entry_t pmap_remove_pv __P((struct pmap *, vaddr_t, struct vm_page *));
|
||||
void pmap_enter_pv __P((struct pmap *, vaddr_t, paddr_t, struct vm_page *,
|
||||
pv_entry_t));
|
||||
void pmap_page_cache __P((struct pmap *, paddr_t, int));
|
||||
pv_entry_t pmap_remove_pv(struct pmap *, vaddr_t, struct vm_page *);
|
||||
void pmap_enter_pv(struct pmap *, vaddr_t, paddr_t, struct vm_page *,
|
||||
pv_entry_t);
|
||||
void pmap_page_cache(struct pmap *, paddr_t, int);
|
||||
|
||||
/*
|
||||
* First and last managed physical addresses.
|
||||
|
@ -176,7 +176,7 @@ struct mem_region *phys_installed;
|
|||
|
||||
paddr_t avail_start, avail_end; /* These are used by ps & family */
|
||||
|
||||
static int ptelookup_va __P((vaddr_t va));
|
||||
static int ptelookup_va(vaddr_t va);
|
||||
|
||||
static inline void
|
||||
clrx(void *addr)
|
||||
|
@ -546,7 +546,7 @@ pmap_read_memlist(const char *device, const char *property, void **ml,
|
|||
device, property);
|
||||
prom_halt();
|
||||
}
|
||||
if ( (va = (void*)(* ml_alloc)(size, sizeof(u_int64_t))) == NULL) {
|
||||
if ( (va = (void*)(* ml_alloc)(size, sizeof(uint64_t))) == NULL) {
|
||||
prom_printf("pmap_read_memlist(): Cannot allocate memlist.\n");
|
||||
prom_halt();
|
||||
}
|
||||
|
@ -591,7 +591,7 @@ pmap_bootstrap(kernelstart, kernelend)
|
|||
size_t s, sz;
|
||||
int64_t data;
|
||||
vaddr_t va, intstk;
|
||||
u_int64_t phys_msgbuf;
|
||||
uint64_t phys_msgbuf;
|
||||
paddr_t newp;
|
||||
|
||||
void *prom_memlist;
|
||||
|
@ -768,7 +768,7 @@ pmap_bootstrap(kernelstart, kernelend)
|
|||
pcnt = prom_memlist_size / sizeof(*orig);
|
||||
|
||||
BDPRINTF(PDB_BOOT1, ("Available physical memory:\n"));
|
||||
avail = (struct mem_region*)kdata_alloc(sz, sizeof(u_int64_t));
|
||||
avail = (struct mem_region*)kdata_alloc(sz, sizeof(uint64_t));
|
||||
for (i = 0; i < pcnt; i++) {
|
||||
avail[i] = orig[i];
|
||||
BDPRINTF(PDB_BOOT1, ("memlist start %lx size %lx\n",
|
||||
|
@ -781,7 +781,7 @@ pmap_bootstrap(kernelstart, kernelend)
|
|||
* Allocate and initialize a context table
|
||||
*/
|
||||
numctx = get_maxctx();
|
||||
ctxbusy = (paddr_t *)kdata_alloc(CTXSIZE, sizeof(u_int64_t));
|
||||
ctxbusy = (paddr_t *)kdata_alloc(CTXSIZE, sizeof(uint64_t));
|
||||
memset(ctxbusy, 0, CTXSIZE);
|
||||
LIST_INIT(&pmap_ctxlist);
|
||||
|
||||
|
@ -1007,7 +1007,7 @@ pmap_bootstrap(kernelstart, kernelend)
|
|||
{
|
||||
extern vaddr_t u0[2];
|
||||
extern struct pcb* proc0paddr;
|
||||
extern void main __P((void));
|
||||
extern void main(void);
|
||||
paddr_t pa;
|
||||
|
||||
/* Initialize all the pointers to u0 */
|
||||
|
@ -1134,7 +1134,7 @@ pmap_init()
|
|||
{
|
||||
struct vm_page *pg;
|
||||
struct pglist pglist;
|
||||
u_int64_t data;
|
||||
uint64_t data;
|
||||
paddr_t pa;
|
||||
psize_t size;
|
||||
vaddr_t va;
|
||||
|
@ -2153,7 +2153,7 @@ pmap_dumpsize()
|
|||
*/
|
||||
int
|
||||
pmap_dumpmmu(dump, blkno)
|
||||
int (*dump) __P((dev_t, daddr_t, caddr_t, size_t));
|
||||
int (*dump)(dev_t, daddr_t, caddr_t, size_t);
|
||||
daddr_t blkno;
|
||||
{
|
||||
kcore_seg_t *kseg;
|
||||
|
@ -2193,18 +2193,18 @@ pmap_dumpmmu(dump, blkno)
|
|||
/* Fill in MD segment header (interpreted by MD part of libkvm) */
|
||||
kcpu = (cpu_kcore_hdr_t *)((long)bp + ALIGN(sizeof(kcore_seg_t)));
|
||||
kcpu->cputype = CPU_SUN4U;
|
||||
kcpu->kernbase = (u_int64_t)KERNBASE;
|
||||
kcpu->cpubase = (u_int64_t)CPUINFO_VA;
|
||||
kcpu->kernbase = (uint64_t)KERNBASE;
|
||||
kcpu->cpubase = (uint64_t)CPUINFO_VA;
|
||||
|
||||
/* Describe the locked text segment */
|
||||
kcpu->ktextbase = (u_int64_t)ktext;
|
||||
kcpu->ktextp = (u_int64_t)ktextp;
|
||||
kcpu->ktextsz = (u_int64_t)ektextp - ktextp;
|
||||
kcpu->ktextbase = (uint64_t)ktext;
|
||||
kcpu->ktextp = (uint64_t)ktextp;
|
||||
kcpu->ktextsz = (uint64_t)ektextp - ktextp;
|
||||
|
||||
/* Describe locked data segment */
|
||||
kcpu->kdatabase = (u_int64_t)kdata;
|
||||
kcpu->kdatap = (u_int64_t)kdatap;
|
||||
kcpu->kdatasz = (u_int64_t)ekdatap - kdatap;
|
||||
kcpu->kdatabase = (uint64_t)kdata;
|
||||
kcpu->kdatap = (uint64_t)kdatap;
|
||||
kcpu->kdatasz = (uint64_t)ekdatap - kdatap;
|
||||
|
||||
/* Now the memsegs */
|
||||
kcpu->nmemseg = phys_installed_size;
|
||||
|
@ -2212,7 +2212,7 @@ pmap_dumpmmu(dump, blkno)
|
|||
|
||||
/* Now we need to point this at our kernel pmap. */
|
||||
kcpu->nsegmap = STSZ;
|
||||
kcpu->segmapoffset = (u_int64_t)pmap_kernel()->pm_physaddr;
|
||||
kcpu->segmapoffset = (uint64_t)pmap_kernel()->pm_physaddr;
|
||||
|
||||
/* Note: we have assumed everything fits in buffer[] so far... */
|
||||
bp = (int *)((long)kcpu + ALIGN(sizeof(cpu_kcore_hdr_t)));
|
||||
|
@ -2297,8 +2297,7 @@ int64 GenerateTSBPointer(
|
|||
* for that particular va and return it. IT MAY BE FOR ANOTHER MAPPING!
|
||||
*/
|
||||
int
|
||||
ptelookup_va(va)
|
||||
vaddr_t va;
|
||||
ptelookup_va(vaddr_t va)
|
||||
{
|
||||
long tsbptr;
|
||||
#define TSBBASEMASK (0xffffffffffffe000LL << tsbsize)
|
||||
|
@ -2971,12 +2970,8 @@ ctx_free(pm)
|
|||
*/
|
||||
|
||||
void
|
||||
pmap_enter_pv(pmap, va, pa, pg, npv)
|
||||
struct pmap *pmap;
|
||||
vaddr_t va;
|
||||
paddr_t pa;
|
||||
struct vm_page *pg;
|
||||
pv_entry_t npv;
|
||||
pmap_enter_pv(struct pmap *pmap, vaddr_t va, paddr_t pa, struct vm_page *pg,
|
||||
pv_entry_t npv)
|
||||
{
|
||||
pv_entry_t pvh;
|
||||
|
||||
|
@ -3034,10 +3029,7 @@ pmap_enter_pv(pmap, va, pa, pg, npv)
|
|||
*/
|
||||
|
||||
pv_entry_t
|
||||
pmap_remove_pv(pmap, va, pg)
|
||||
struct pmap *pmap;
|
||||
vaddr_t va;
|
||||
struct vm_page *pg;
|
||||
pmap_remove_pv(struct pmap *pmap, vaddr_t va, struct vm_page *pg)
|
||||
{
|
||||
pv_entry_t pvh, npv, pv;
|
||||
int64_t data = 0;
|
||||
|
@ -3110,10 +3102,7 @@ pmap_remove_pv(pmap, va, pg)
|
|||
* Change all mappings of a page to cached/uncached.
|
||||
*/
|
||||
void
|
||||
pmap_page_cache(pm, pa, mode)
|
||||
struct pmap *pm;
|
||||
paddr_t pa;
|
||||
int mode;
|
||||
pmap_page_cache(struct pmap *pm, paddr_t pa, int mode)
|
||||
{
|
||||
struct vm_page *pg;
|
||||
pv_entry_t pv;
|
||||
|
@ -3203,13 +3192,9 @@ pmap_free_page(paddr_t pa)
|
|||
|
||||
#ifdef DDB
|
||||
|
||||
void db_dump_pv __P((db_expr_t, int, db_expr_t, const char *));
|
||||
void db_dump_pv(db_expr_t, int, db_expr_t, const char *);
|
||||
void
|
||||
db_dump_pv(addr, have_addr, count, modif)
|
||||
db_expr_t addr;
|
||||
int have_addr;
|
||||
db_expr_t count;
|
||||
const char *modif;
|
||||
db_dump_pv(db_expr_t addr, int have_addr, db_expr_t count, const char *modif)
|
||||
{
|
||||
struct vm_page *pg;
|
||||
struct pv_entry *pv;
|
||||
|
@ -3235,7 +3220,7 @@ db_dump_pv(addr, have_addr, count, modif)
|
|||
#ifdef DEBUG
|
||||
/*
|
||||
* Test ref/modify handling. */
|
||||
void pmap_testout __P((void));
|
||||
void pmap_testout(void);
|
||||
void
|
||||
pmap_testout()
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: rbus_machdep.c,v 1.8 2005/12/11 12:19:15 christos Exp $ */
|
||||
/* $NetBSD: rbus_machdep.c,v 1.9 2006/02/11 17:57:32 cdi Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003 Takeshi Nakayama.
|
||||
|
@ -28,7 +28,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: rbus_machdep.c,v 1.8 2005/12/11 12:19:15 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: rbus_machdep.c,v 1.9 2006/02/11 17:57:32 cdi Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/device.h>
|
||||
|
@ -54,7 +54,7 @@ __KERNEL_RCSID(0, "$NetBSD: rbus_machdep.c,v 1.8 2005/12/11 12:19:15 christos Ex
|
|||
# define DPRINTF while (0) printf
|
||||
#endif
|
||||
|
||||
static int pccbb_cardbus_isvalid __P((void *));
|
||||
static int pccbb_cardbus_isvalid(void *);
|
||||
|
||||
int
|
||||
md_space_map(t, bpa, size, flags, bshp)
|
||||
|
@ -213,13 +213,12 @@ pccbb_attach_hook(parent, self, pa)
|
|||
* when a CardBus card is not present or power-off.
|
||||
*/
|
||||
static int
|
||||
pccbb_cardbus_isvalid(arg)
|
||||
void *arg;
|
||||
pccbb_cardbus_isvalid(void *arg)
|
||||
{
|
||||
struct pccbb_softc *sc = arg;
|
||||
bus_space_tag_t memt = sc->sc_base_memt;
|
||||
bus_space_handle_t memh = sc->sc_base_memh;
|
||||
u_int32_t sockstat, sockctrl;
|
||||
uint32_t sockstat, sockctrl;
|
||||
|
||||
/* check CardBus card is present */
|
||||
sockstat = bus_space_read_4(memt, memh, CB_SOCKET_STAT);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sunos32_machdep.c,v 1.18 2005/12/11 12:19:15 christos Exp $ */
|
||||
/* $NetBSD: sunos32_machdep.c,v 1.19 2006/02/11 17:57:32 cdi Exp $ */
|
||||
/* from: NetBSD: sunos_machdep.c,v 1.14 2001/01/29 01:37:56 mrg Exp */
|
||||
|
||||
/*
|
||||
|
@ -30,7 +30,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: sunos32_machdep.c,v 1.18 2005/12/11 12:19:15 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sunos32_machdep.c,v 1.19 2006/02/11 17:57:32 cdi Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_ddb.h"
|
||||
|
@ -76,27 +76,27 @@ __KERNEL_RCSID(0, "$NetBSD: sunos32_machdep.c,v 1.18 2005/12/11 12:19:15 christo
|
|||
#endif
|
||||
|
||||
struct sunos32_sigcontext {
|
||||
u_int32_t sc_onstack; /* sigstack state to restore */
|
||||
u_int32_t sc_mask; /* signal mask to restore (old style) */
|
||||
uint32_t sc_onstack; /* sigstack state to restore */
|
||||
uint32_t sc_mask; /* signal mask to restore (old style) */
|
||||
/* begin machine dependent portion */
|
||||
u_int32_t sc_sp; /* %sp to restore */
|
||||
u_int32_t sc_pc; /* pc to restore */
|
||||
u_int32_t sc_npc; /* npc to restore */
|
||||
u_int32_t sc_psr; /* pstate to restore */
|
||||
u_int32_t sc_g1; /* %g1 to restore */
|
||||
u_int32_t sc_o0; /* %o0 to restore */
|
||||
uint32_t sc_sp; /* %sp to restore */
|
||||
uint32_t sc_pc; /* pc to restore */
|
||||
uint32_t sc_npc; /* npc to restore */
|
||||
uint32_t sc_psr; /* pstate to restore */
|
||||
uint32_t sc_g1; /* %g1 to restore */
|
||||
uint32_t sc_o0; /* %o0 to restore */
|
||||
};
|
||||
|
||||
struct sunos32_sigframe {
|
||||
u_int32_t sf_signo; /* signal number */
|
||||
u_int32_t sf_code; /* code */
|
||||
u_int32_t sf_scp; /* SunOS user addr of sigcontext */
|
||||
u_int32_t sf_addr; /* SunOS compat, always 0 for now */
|
||||
uint32_t sf_signo; /* signal number */
|
||||
uint32_t sf_code; /* code */
|
||||
uint32_t sf_scp; /* SunOS user addr of sigcontext */
|
||||
uint32_t sf_addr; /* SunOS compat, always 0 for now */
|
||||
struct sunos32_sigcontext sf_sc; /* actual sigcontext */
|
||||
};
|
||||
|
||||
#if NFIRM_EVENTS > 0
|
||||
static int ev_out32 __P((struct firm_event *, int, struct uio *));
|
||||
static int ev_out32(struct firm_event *, int, struct uio *);
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -172,14 +172,14 @@ sunos32_sendsig(const ksiginfo_t *ksi, const sigset_t *mask)
|
|||
struct rwindow32 *oldsp, *newsp;
|
||||
struct sunos32_sigframe sf;
|
||||
struct sunos32_sigcontext *scp;
|
||||
u_int32_t addr, oldsp32;
|
||||
uint32_t addr, oldsp32;
|
||||
int onstack;
|
||||
sig_t catcher = SIGACTION(p, sig).sa_handler;
|
||||
|
||||
tf = l->l_md.md_tf;
|
||||
/* Need to attempt to zero extend this 32-bit pointer */
|
||||
oldsp = (struct rwindow32 *)(u_long)(u_int)tf->tf_out[6];
|
||||
oldsp32 = (u_int32_t)(u_long)oldsp;
|
||||
oldsp32 = (uint32_t)(u_long)oldsp;
|
||||
|
||||
/*
|
||||
* Compute new user stack addresses, subtract off
|
||||
|
@ -213,11 +213,11 @@ sunos32_sendsig(const ksiginfo_t *ksi, const sigset_t *mask)
|
|||
* directly in user space....
|
||||
*/
|
||||
sf.sf_signo = sig;
|
||||
sf.sf_code = (u_int32_t)ksi->ksi_trap;
|
||||
sf.sf_code = (uint32_t)ksi->ksi_trap;
|
||||
scp = &fp->sf_sc;
|
||||
if ((u_long)scp >= 0x100000000)
|
||||
printf("sunos32_sendsig: sf_scp overflow %p > 0x100000000\n", scp);
|
||||
sf.sf_scp = (u_int32_t)(u_long)scp;
|
||||
sf.sf_scp = (uint32_t)(u_long)scp;
|
||||
sf.sf_addr = 0; /* XXX */
|
||||
|
||||
/*
|
||||
|
@ -276,10 +276,10 @@ sunos32_sendsig(const ksiginfo_t *ksi, const sigset_t *mask)
|
|||
* Arrange to continue execution at the code copied out in exec().
|
||||
* It needs the function to call in %g1, and a new stack pointer.
|
||||
*/
|
||||
addr = (u_int32_t)(u_long)catcher; /* user does his own trampolining */
|
||||
addr = (uint32_t)(u_long)catcher; /* user does his own trampolining */
|
||||
tf->tf_pc = addr;
|
||||
tf->tf_npc = addr + 4;
|
||||
tf->tf_out[6] = (u_int64_t)(u_int)(u_long)newsp;
|
||||
tf->tf_out[6] = (uint64_t)(u_int)(u_long)newsp;
|
||||
#ifdef DEBUG
|
||||
if ((sigdebug & SDB_KSTACK) && p->p_pid == sigpid) {
|
||||
printf("sunos32_sendsig: about to return to catcher %p thru %p\n",
|
||||
|
@ -374,10 +374,7 @@ sunos32_sys_sigreturn(l, v, retval)
|
|||
* Write out a series of 32-bit firm_events.
|
||||
*/
|
||||
static int
|
||||
ev_out32(e, n, uio)
|
||||
struct firm_event *e;
|
||||
int n;
|
||||
struct uio *uio;
|
||||
ev_out32(struct firm_event *e, int n, struct uio *uio)
|
||||
{
|
||||
struct firm_event32 e32;
|
||||
int error = 0;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sunos_machdep.c,v 1.22 2005/12/11 12:19:15 christos Exp $ */
|
||||
/* $NetBSD: sunos_machdep.c,v 1.23 2006/02/11 17:57:32 cdi Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Matthew R. Green
|
||||
|
@ -29,7 +29,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: sunos_machdep.c,v 1.22 2005/12/11 12:19:15 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sunos_machdep.c,v 1.23 2006/02/11 17:57:32 cdi Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_ddb.h"
|
||||
|
@ -78,7 +78,7 @@ struct sunos_sigcontext {
|
|||
struct sunos_sigframe {
|
||||
int sf_signo; /* signal number */
|
||||
int sf_code; /* code */
|
||||
u_int32_t sf_scp; /* SunOS user addr of sigcontext */
|
||||
uint32_t sf_scp; /* SunOS user addr of sigcontext */
|
||||
int sf_addr; /* SunOS compat, always 0 for now */
|
||||
struct sunos_sigcontext sf_sc; /* actual sigcontext */
|
||||
};
|
||||
|
@ -197,7 +197,7 @@ sunos_sendsig(ksi, mask)
|
|||
addr = (long)catcher; /* user does his own trampolining */
|
||||
tf->tf_pc = addr;
|
||||
tf->tf_npc = addr + 4;
|
||||
tf->tf_out[6] = (u_int64_t)(u_int)(u_long)newsp;
|
||||
tf->tf_out[6] = (uint64_t)(u_int)(u_long)newsp;
|
||||
#ifdef DEBUG
|
||||
if ((sigdebug & SDB_KSTACK) && p->p_pid == sigpid) {
|
||||
printf("sunos_sendsig: about to return to catcher %p thru %p\n",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: svr4_32_machdep.c,v 1.21 2005/12/11 12:19:15 christos Exp $ */
|
||||
/* $NetBSD: svr4_32_machdep.c,v 1.22 2006/02/11 17:57:32 cdi Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994 The NetBSD Foundation, Inc.
|
||||
|
@ -37,7 +37,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: svr4_32_machdep.c,v 1.21 2005/12/11 12:19:15 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: svr4_32_machdep.c,v 1.22 2006/02/11 17:57:32 cdi Exp $");
|
||||
|
||||
#ifndef _LKM
|
||||
#include "opt_ddb.h"
|
||||
|
@ -78,7 +78,7 @@ __KERNEL_RCSID(0, "$NetBSD: svr4_32_machdep.c,v 1.21 2005/12/11 12:19:15 christo
|
|||
#include <machine/vmparam.h>
|
||||
#include <machine/svr4_machdep.h>
|
||||
|
||||
static void svr4_32_getsiginfo __P((union svr4_32_siginfo *, int, u_long, caddr_t));
|
||||
static void svr4_32_getsiginfo(union svr4_32_siginfo *, int, u_long, caddr_t);
|
||||
|
||||
void
|
||||
svr4_32_setregs(l, epp, stack)
|
||||
|
@ -99,12 +99,10 @@ svr4_32_setregs(l, epp, stack)
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_SVR4
|
||||
static void svr4_32_printmcontext __P((const char *, struct svr4_32_mcontext *));
|
||||
static void svr4_32_printmcontext(const char *, struct svr4_32_mcontext *);
|
||||
|
||||
static void
|
||||
svr4_32_printmcontext(fun, mc)
|
||||
const char *fun;
|
||||
struct svr4_32_mcontext *mc;
|
||||
svr4_32_printmcontext(const char *fun, struct svr4_32_mcontext *mc)
|
||||
{
|
||||
svr4_32_greg_t *r = mc->greg;
|
||||
|
||||
|
@ -341,11 +339,8 @@ svr4_32_setmcontext(l, mc, flags)
|
|||
* map the trap code into the svr4 siginfo as best we can
|
||||
*/
|
||||
static void
|
||||
svr4_32_getsiginfo(si, sig, code, addr)
|
||||
union svr4_32_siginfo *si;
|
||||
int sig;
|
||||
u_long code;
|
||||
caddr_t addr;
|
||||
svr4_32_getsiginfo(union svr4_32_siginfo *si, int sig, u_long code,
|
||||
caddr_t addr)
|
||||
{
|
||||
si->si_signo = native_to_svr4_signo[sig];
|
||||
si->si_errno = 0;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: svr4_machdep.c,v 1.38 2005/12/11 12:19:15 christos Exp $ */
|
||||
/* $NetBSD: svr4_machdep.c,v 1.39 2006/02/11 17:57:32 cdi Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994 The NetBSD Foundation, Inc.
|
||||
|
@ -37,7 +37,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: svr4_machdep.c,v 1.38 2005/12/11 12:19:15 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: svr4_machdep.c,v 1.39 2006/02/11 17:57:32 cdi Exp $");
|
||||
|
||||
#ifndef _LKM
|
||||
#include "opt_ddb.h"
|
||||
|
@ -76,7 +76,7 @@ __KERNEL_RCSID(0, "$NetBSD: svr4_machdep.c,v 1.38 2005/12/11 12:19:15 christos E
|
|||
#include <machine/vmparam.h>
|
||||
#include <machine/svr4_machdep.h>
|
||||
|
||||
static void svr4_getsiginfo __P((union svr4_siginfo *, int, u_long, caddr_t));
|
||||
static void svr4_getsiginfo(union svr4_siginfo *, int, u_long, caddr_t);
|
||||
|
||||
void
|
||||
svr4_setregs(l, epp, stack)
|
||||
|
@ -97,12 +97,10 @@ svr4_setregs(l, epp, stack)
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_SVR4
|
||||
static void svr4_printmcontext __P((const char *, struct svr4_mcontext *));
|
||||
static void svr4_printmcontext(const char *, struct svr4_mcontext *);
|
||||
|
||||
static void
|
||||
svr4_printmcontext(fun, mc)
|
||||
const char *fun;
|
||||
struct svr4_mcontext *mc;
|
||||
svr4_printmcontext(const char *fun, struct svr4_mcontext *mc)
|
||||
{
|
||||
svr4_greg_t *r = mc->greg;
|
||||
|
||||
|
@ -361,11 +359,7 @@ svr4_setmcontext(l, mc, flags)
|
|||
* map the trap code into the svr4 siginfo as best we can
|
||||
*/
|
||||
static void
|
||||
svr4_getsiginfo(si, sig, code, addr)
|
||||
union svr4_siginfo *si;
|
||||
int sig;
|
||||
u_long code;
|
||||
caddr_t addr;
|
||||
svr4_getsiginfo(union svr4_siginfo *si, int sig, u_long code, caddr_t addr)
|
||||
{
|
||||
si->si_signo = native_to_svr4_signo[sig];
|
||||
si->si_errno = 0;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sysioreg.h,v 1.2 2003/01/06 20:30:35 wiz Exp $ */
|
||||
/* $NetBSD: sysioreg.h,v 1.3 2006/02/11 17:57:32 cdi Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996
|
||||
|
@ -43,74 +43,74 @@
|
|||
|
||||
struct sysioreg {
|
||||
struct upareg {
|
||||
u_int64_t upa_portid; /* UPA port ID register */ /* 1fe.0000.0000 */
|
||||
u_int64_t upa_config; /* UPA config register */ /* 1fe.0000.0008 */
|
||||
uint64_t upa_portid; /* UPA port ID register */ /* 1fe.0000.0000 */
|
||||
uint64_t upa_config; /* UPA config register */ /* 1fe.0000.0008 */
|
||||
} upa;
|
||||
u_int64_t sys_csr; /* SYSIO control/status register */ /* 1fe.0000.0010 */
|
||||
u_int64_t pad0;
|
||||
u_int64_t sys_ecccr; /* ECC control register */ /* 1fe.0000.0020 */
|
||||
u_int64_t reserved; /* 1fe.0000.0028 */
|
||||
u_int64_t sys_ue_afsr; /* Uncorrectable Error AFSR */ /* 1fe.0000.0030 */
|
||||
u_int64_t sys_ue_afar; /* Uncorrectable Error AFAR */ /* 1fe.0000.0038 */
|
||||
u_int64_t sys_ce_afsr; /* Correctable Error AFSR */ /* 1fe.0000.0040 */
|
||||
u_int64_t sys_ce_afar; /* Correctable Error AFAR */ /* 1fe.0000.0048 */
|
||||
uint64_t sys_csr; /* SYSIO control/status register */ /* 1fe.0000.0010 */
|
||||
uint64_t pad0;
|
||||
uint64_t sys_ecccr; /* ECC control register */ /* 1fe.0000.0020 */
|
||||
uint64_t reserved; /* 1fe.0000.0028 */
|
||||
uint64_t sys_ue_afsr; /* Uncorrectable Error AFSR */ /* 1fe.0000.0030 */
|
||||
uint64_t sys_ue_afar; /* Uncorrectable Error AFAR */ /* 1fe.0000.0038 */
|
||||
uint64_t sys_ce_afsr; /* Correctable Error AFSR */ /* 1fe.0000.0040 */
|
||||
uint64_t sys_ce_afar; /* Correctable Error AFAR */ /* 1fe.0000.0048 */
|
||||
char pad1[0x2000 - 0x50];
|
||||
struct sbusreg {
|
||||
u_int64_t sys_sbus_cr; /* SBUS Control Register */ /* 1fe.0000.2000 */
|
||||
u_int64_t reserved; /* 1fe.0000.2008 */
|
||||
u_int64_t sys_sbus_afsr; /* SBUS AFSR */ /* 1fe.0000.2010 */
|
||||
u_int64_t sys_sbus_afar; /* SBUS AFAR */ /* 1fe.0000.2018 */
|
||||
u_int64_t sys_sbus_config0; /* SBUS Slot 0 config register */ /* 1fe.0000.2020 */
|
||||
u_int64_t sys_sbus_config1; /* SBUS Slot 1 config register */ /* 1fe.0000.2028 */
|
||||
u_int64_t sys_sbus_config2; /* SBUS Slot 2 config register */ /* 1fe.0000.2030 */
|
||||
u_int64_t sys_sbus_config3; /* SBUS Slot 3 config register */ /* 1fe.0000.2038 */
|
||||
u_int64_t sys_sbus_config13; /* Slot 13 config register <audio> */ /* 1fe.0000.2040 */
|
||||
u_int64_t sys_sbus_config14; /* Slot 14 config register <Macio> */ /* 1fe.0000.2048 */
|
||||
u_int64_t sys_sbus_config15; /* Slot 15 config register <slavio> */ /* 1fe.0000.2050 */
|
||||
uint64_t sys_sbus_cr; /* SBUS Control Register */ /* 1fe.0000.2000 */
|
||||
uint64_t reserved; /* 1fe.0000.2008 */
|
||||
uint64_t sys_sbus_afsr; /* SBUS AFSR */ /* 1fe.0000.2010 */
|
||||
uint64_t sys_sbus_afar; /* SBUS AFAR */ /* 1fe.0000.2018 */
|
||||
uint64_t sys_sbus_config0; /* SBUS Slot 0 config register */ /* 1fe.0000.2020 */
|
||||
uint64_t sys_sbus_config1; /* SBUS Slot 1 config register */ /* 1fe.0000.2028 */
|
||||
uint64_t sys_sbus_config2; /* SBUS Slot 2 config register */ /* 1fe.0000.2030 */
|
||||
uint64_t sys_sbus_config3; /* SBUS Slot 3 config register */ /* 1fe.0000.2038 */
|
||||
uint64_t sys_sbus_config13; /* Slot 13 config register <audio> */ /* 1fe.0000.2040 */
|
||||
uint64_t sys_sbus_config14; /* Slot 14 config register <Macio> */ /* 1fe.0000.2048 */
|
||||
uint64_t sys_sbus_config15; /* Slot 15 config register <slavio> */ /* 1fe.0000.2050 */
|
||||
} sbus;
|
||||
char pad2[0x400 - 0x50];
|
||||
struct iommureg {
|
||||
u_int64_t iommu_cr; /* IOMMU control register */ /* 1fe.0000.2400 */
|
||||
u_int64_t iommu_tsb; /* IOMMU TSB base register */ /* 1fe.0000.2408 */
|
||||
u_int64_t iommu_flush; /* IOMMU flush register */ /* 1fe.0000.2410 */
|
||||
uint64_t iommu_cr; /* IOMMU control register */ /* 1fe.0000.2400 */
|
||||
uint64_t iommu_tsb; /* IOMMU TSB base register */ /* 1fe.0000.2408 */
|
||||
uint64_t iommu_flush; /* IOMMU flush register */ /* 1fe.0000.2410 */
|
||||
} iommu;
|
||||
u_int64_t strbuf_ctl; /* streaming buffer control reg */ /* 1fe.0000.2800 */
|
||||
u_int64_t strbuf_pgflush; /* streaming buffer page flush */ /* 1fe.0000.2808 */
|
||||
u_int64_t strbuf_flushsync; /* streaming buffer flush sync */ /* 1fe.0000.2810 */
|
||||
uint64_t strbuf_ctl; /* streaming buffer control reg */ /* 1fe.0000.2800 */
|
||||
uint64_t strbuf_pgflush; /* streaming buffer page flush */ /* 1fe.0000.2808 */
|
||||
uint64_t strbuf_flushsync; /* streaming buffer flush sync */ /* 1fe.0000.2810 */
|
||||
|
||||
u_int64_t sbus_slot0_int; /* SBUS slot 0 interrupt map reg */ /* 1fe.0000.2c00 */
|
||||
u_int64_t sbus_slot1_int; /* SBUS slot 1 interrupt map reg */ /* 1fe.0000.2c08 */
|
||||
u_int64_t sbus_slot2_int; /* SBUS slot 2 interrupt map reg */ /* 1fe.0000.2c10 */
|
||||
u_int64_t sbus_slot3_int; /* SBUS slot 3 interrupt map reg */ /* 1fe.0000.2c18 */
|
||||
uint64_t sbus_slot0_int; /* SBUS slot 0 interrupt map reg */ /* 1fe.0000.2c00 */
|
||||
uint64_t sbus_slot1_int; /* SBUS slot 1 interrupt map reg */ /* 1fe.0000.2c08 */
|
||||
uint64_t sbus_slot2_int; /* SBUS slot 2 interrupt map reg */ /* 1fe.0000.2c10 */
|
||||
uint64_t sbus_slot3_int; /* SBUS slot 3 interrupt map reg */ /* 1fe.0000.2c18 */
|
||||
|
||||
u_int64_t scsi_int_map; /* SCSI interrupt map reg */ /* 1fe.0000.3000 */
|
||||
u_int64_t ether_int_map; /* ethernet interrupt map reg */ /* 1fe.0000.3008 */
|
||||
u_int64_t bpp_int_map; /* parallel interrupt map reg */ /* 1fe.0000.3010 */
|
||||
u_int64_t audio_int_map; /* audio interrupt map reg */ /* 1fe.0000.3018 */
|
||||
u_int64_t power_int_map; /* power fail interrupt map reg */ /* 1fe.0000.3020 */
|
||||
u_int64_t ser_kbd_ms_int_map; /* serial/kbd/mouse interrupt map reg *//* 1fe.0000.3028 */
|
||||
u_int64_t fd_int_map; /* floppy interrupt map reg */ /* 1fe.0000.3030 */
|
||||
u_int64_t therm_int_map; /* thermal warn interrupt map reg */ /* 1fe.0000.3038 */
|
||||
u_int64_t kbd_int_map; /* kbd [unused] interrupt map reg */ /* 1fe.0000.3040 */
|
||||
u_int64_t mouse_int_map; /* mouse [unused] interrupt map reg */ /* 1fe.0000.3048 */
|
||||
u_int64_t serial_int_map; /* second serial interrupt map reg */ /* 1fe.0000.3050 */
|
||||
u_int64_t timer0_int_map; /* timer 0 interrupt map reg */ /* 1fe.0000.3060 */
|
||||
u_int64_t timer1_int_map; /* timer 1 interrupt map reg */ /* 1fe.0000.3068 */
|
||||
u_int64_t ue_int_map; /* UE interrupt map reg */ /* 1fe.0000.3070 */
|
||||
u_int64_t ce_int_map; /* CE interrupt map reg */ /* 1fe.0000.3078 */
|
||||
u_int64_t sbus_int_map; /* SBUS error interrupt map reg */ /* 1fe.0000.3080 */
|
||||
u_int64_t pwrmgt_int_map; /* power mgmt wake interrupt map reg */ /* 1fe.0000.3088 */
|
||||
u_int64_t upagr_int_map; /* UPA graphics interrupt map reg */ /* 1fe.0000.3090 */
|
||||
u_int64_t reserved_int_map; /* SCSI interrupt map reg */ /* 1fe.0000.3098 */
|
||||
uint64_t scsi_int_map; /* SCSI interrupt map reg */ /* 1fe.0000.3000 */
|
||||
uint64_t ether_int_map; /* ethernet interrupt map reg */ /* 1fe.0000.3008 */
|
||||
uint64_t bpp_int_map; /* parallel interrupt map reg */ /* 1fe.0000.3010 */
|
||||
uint64_t audio_int_map; /* audio interrupt map reg */ /* 1fe.0000.3018 */
|
||||
uint64_t power_int_map; /* power fail interrupt map reg */ /* 1fe.0000.3020 */
|
||||
uint64_t ser_kbd_ms_int_map; /* serial/kbd/mouse interrupt map reg *//* 1fe.0000.3028 */
|
||||
uint64_t fd_int_map; /* floppy interrupt map reg */ /* 1fe.0000.3030 */
|
||||
uint64_t therm_int_map; /* thermal warn interrupt map reg */ /* 1fe.0000.3038 */
|
||||
uint64_t kbd_int_map; /* kbd [unused] interrupt map reg */ /* 1fe.0000.3040 */
|
||||
uint64_t mouse_int_map; /* mouse [unused] interrupt map reg */ /* 1fe.0000.3048 */
|
||||
uint64_t serial_int_map; /* second serial interrupt map reg */ /* 1fe.0000.3050 */
|
||||
uint64_t timer0_int_map; /* timer 0 interrupt map reg */ /* 1fe.0000.3060 */
|
||||
uint64_t timer1_int_map; /* timer 1 interrupt map reg */ /* 1fe.0000.3068 */
|
||||
uint64_t ue_int_map; /* UE interrupt map reg */ /* 1fe.0000.3070 */
|
||||
uint64_t ce_int_map; /* CE interrupt map reg */ /* 1fe.0000.3078 */
|
||||
uint64_t sbus_int_map; /* SBUS error interrupt map reg */ /* 1fe.0000.3080 */
|
||||
uint64_t pwrmgt_int_map; /* power mgmt wake interrupt map reg */ /* 1fe.0000.3088 */
|
||||
uint64_t upagr_int_map; /* UPA graphics interrupt map reg */ /* 1fe.0000.3090 */
|
||||
uint64_t reserved_int_map; /* SCSI interrupt map reg */ /* 1fe.0000.3098 */
|
||||
|
||||
u_int64_t sys_svadiag; /* SBUS virtual addr diag reg */ /* 1fe.0000.4400 */
|
||||
u_int64_t iommu_queue_diag[16]; /* IOMMU LRU queue diag */ /* 1fe.0000.4500-457f */
|
||||
u_int64_t tlb_tag_diag[16]; /* TLB tag diag */ /* 1fe.0000.4580-45ff */
|
||||
u_int64_t tlb_data_diag[32]; /* TLB data RAM diag */ /* 1fe.0000.4600-46ff */
|
||||
u_int64_t strbuf_data_diag[128]; /* streaming buffer data RAM diag */ /* 1fe.0000.5000-53f8 */
|
||||
u_int64_t strbuf_error_diag[128]; /* streaming buffer error status diag *//* 1fe.0000.5400-57f8 */
|
||||
u_int64_t strbuf_pg_tag_diag[16]; /* streaming buffer page tag diag */ /* 1fe.0000.5800-5878 */
|
||||
u_int64_t strbuf_ln_tag_diag[16]; /* streaming buffer line tag diag */ /* 1fe.0000.5900-5978 */
|
||||
uint64_t sys_svadiag; /* SBUS virtual addr diag reg */ /* 1fe.0000.4400 */
|
||||
uint64_t iommu_queue_diag[16]; /* IOMMU LRU queue diag */ /* 1fe.0000.4500-457f */
|
||||
uint64_t tlb_tag_diag[16]; /* TLB tag diag */ /* 1fe.0000.4580-45ff */
|
||||
uint64_t tlb_data_diag[32]; /* TLB data RAM diag */ /* 1fe.0000.4600-46ff */
|
||||
uint64_t strbuf_data_diag[128]; /* streaming buffer data RAM diag */ /* 1fe.0000.5000-53f8 */
|
||||
uint64_t strbuf_error_diag[128]; /* streaming buffer error status diag *//* 1fe.0000.5400-57f8 */
|
||||
uint64_t strbuf_pg_tag_diag[16]; /* streaming buffer page tag diag */ /* 1fe.0000.5800-5878 */
|
||||
uint64_t strbuf_ln_tag_diag[16]; /* streaming buffer line tag diag */ /* 1fe.0000.5900-5978 */
|
||||
};
|
||||
|
||||
#define IOMMU_CTL_IMPL 0xf0000000
|
||||
|
@ -136,7 +136,7 @@ struct sysioreg {
|
|||
} while (0)
|
||||
|
||||
/* to pte.h ? */
|
||||
typedef u_int32_t iopte_t;
|
||||
typedef uint32_t iopte_t;
|
||||
|
||||
#define IOPTE_PPN 0xffffff00 /* PA<35:12> */
|
||||
#define IOPTE_C 0x00000080 /* cacheable */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: trap.c,v 1.124 2005/12/24 20:07:37 perry Exp $ */
|
||||
/* $NetBSD: trap.c,v 1.125 2006/02/11 17:57:32 cdi Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-2002 Eduardo Horvath. All rights reserved.
|
||||
|
@ -50,7 +50,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.124 2005/12/24 20:07:37 perry Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.125 2006/02/11 17:57:32 cdi Exp $");
|
||||
|
||||
#define NEW_FPSTATE
|
||||
|
||||
|
@ -374,21 +374,20 @@ const char *trap_type[] = {
|
|||
#define N_TRAP_TYPES (sizeof trap_type / sizeof *trap_type)
|
||||
|
||||
|
||||
void trap __P((struct trapframe64 *tf, unsigned type, vaddr_t pc, long tstate));
|
||||
void data_access_fault __P((struct trapframe64 *tf, unsigned type, vaddr_t pc,
|
||||
vaddr_t va, vaddr_t sfva, u_long sfsr));
|
||||
void data_access_error __P((struct trapframe64 *tf, unsigned type,
|
||||
vaddr_t afva, u_long afsr, vaddr_t sfva, u_long sfsr));
|
||||
void text_access_fault __P((struct trapframe64 *tf, unsigned type,
|
||||
vaddr_t pc, u_long sfsr));
|
||||
void text_access_error __P((struct trapframe64 *tf, unsigned type,
|
||||
vaddr_t pc, u_long sfsr, vaddr_t afva, u_long afsr));
|
||||
void trap(struct trapframe64 *, unsigned int, vaddr_t, long);
|
||||
void data_access_fault(struct trapframe64 *, unsigned int, vaddr_t, vaddr_t,
|
||||
vaddr_t, u_long);
|
||||
void data_access_error(struct trapframe64 *, unsigned int, vaddr_t, u_long,
|
||||
vaddr_t, u_long);
|
||||
void text_access_fault(struct trapframe64 *tf, unsigned int type, vaddr_t pc,
|
||||
u_long sfsr);
|
||||
void text_access_error(struct trapframe64 *, unsigned int, vaddr_t, u_long,
|
||||
vaddr_t, u_long);
|
||||
|
||||
#ifdef DEBUG
|
||||
void print_trapframe __P((struct trapframe64 *));
|
||||
void print_trapframe(struct trapframe64 *);
|
||||
void
|
||||
print_trapframe(tf)
|
||||
struct trapframe64 *tf;
|
||||
print_trapframe(struct trapframe64 *tf)
|
||||
{
|
||||
|
||||
printf("Trapframe %p:\ttstate: %lx\tpc: %lx\tnpc: %lx\n",
|
||||
|
@ -428,11 +427,7 @@ print_trapframe(tf)
|
|||
* (MMU-related traps go through mem_access_fault, below.)
|
||||
*/
|
||||
void
|
||||
trap(tf, type, pc, tstate)
|
||||
struct trapframe64 *tf;
|
||||
unsigned int type;
|
||||
vaddr_t pc;
|
||||
long tstate;
|
||||
trap(struct trapframe64 *tf, unsigned int type, vaddr_t pc, long tstate)
|
||||
{
|
||||
struct lwp *l;
|
||||
struct proc *p;
|
||||
|
@ -997,13 +992,8 @@ kill_user_windows(l)
|
|||
* of them could be recoverable through uvm_fault.
|
||||
*/
|
||||
void
|
||||
data_access_fault(tf, type, pc, addr, sfva, sfsr)
|
||||
struct trapframe64 *tf;
|
||||
unsigned type;
|
||||
vaddr_t pc;
|
||||
vaddr_t addr;
|
||||
vaddr_t sfva;
|
||||
u_long sfsr;
|
||||
data_access_fault(struct trapframe64 *tf, unsigned int type, vaddr_t pc,
|
||||
vaddr_t addr, vaddr_t sfva, u_long sfsr)
|
||||
{
|
||||
u_int64_t tstate;
|
||||
struct lwp *l;
|
||||
|
@ -1251,7 +1241,7 @@ kfault:
|
|||
print_trapframe(tf);
|
||||
}
|
||||
if (trapdebug & (TDB_ADDFLT | TDB_FOLLOW)) {
|
||||
extern void *return_from_trap __P((void));
|
||||
extern void *return_from_trap(void);
|
||||
|
||||
if ((void *)(u_long)tf->tf_pc == (void *)return_from_trap) {
|
||||
printf("Returning from stack datafault\n");
|
||||
|
@ -1268,13 +1258,8 @@ kfault:
|
|||
* special PEEK/POKE code sequence.
|
||||
*/
|
||||
void
|
||||
data_access_error(tf, type, afva, afsr, sfva, sfsr)
|
||||
struct trapframe64 *tf;
|
||||
unsigned type;
|
||||
vaddr_t sfva;
|
||||
u_long sfsr;
|
||||
vaddr_t afva;
|
||||
u_long afsr;
|
||||
data_access_error(struct trapframe64 *tf, unsigned int type, vaddr_t afva,
|
||||
u_long afsr, vaddr_t sfva, u_long sfsr)
|
||||
{
|
||||
u_long pc;
|
||||
u_int64_t tstate;
|
||||
|
@ -1431,11 +1416,8 @@ out:
|
|||
* of them could be recoverable through uvm_fault.
|
||||
*/
|
||||
void
|
||||
text_access_fault(tf, type, pc, sfsr)
|
||||
unsigned type;
|
||||
vaddr_t pc;
|
||||
struct trapframe64 *tf;
|
||||
u_long sfsr;
|
||||
text_access_fault(struct trapframe64 *tf, unsigned int type, vaddr_t pc,
|
||||
u_long sfsr)
|
||||
{
|
||||
u_int64_t tstate;
|
||||
struct lwp *l;
|
||||
|
@ -1568,13 +1550,8 @@ text_access_fault(tf, type, pc, sfsr)
|
|||
* special PEEK/POKE code sequence.
|
||||
*/
|
||||
void
|
||||
text_access_error(tf, type, pc, sfsr, afva, afsr)
|
||||
struct trapframe64 *tf;
|
||||
unsigned type;
|
||||
vaddr_t pc;
|
||||
u_long sfsr;
|
||||
vaddr_t afva;
|
||||
u_long afsr;
|
||||
text_access_error(struct trapframe64 *tf, unsigned int type, vaddr_t pc,
|
||||
u_long sfsr, vaddr_t afva, u_long afsr)
|
||||
{
|
||||
int64_t tstate;
|
||||
struct lwp *l;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: vm_machdep.c,v 1.62 2005/12/11 12:19:15 christos Exp $ */
|
||||
/* $NetBSD: vm_machdep.c,v 1.63 2006/02/11 17:57:32 cdi Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-2002 Eduardo Horvath. All rights reserved.
|
||||
|
@ -50,7 +50,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.62 2005/12/11 12:19:15 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.63 2006/02/11 17:57:32 cdi Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -185,7 +185,7 @@ cpu_lwp_fork(l1, l2, stack, stacksize, func, arg)
|
|||
register struct lwp *l1, *l2;
|
||||
void *stack;
|
||||
size_t stacksize;
|
||||
void (*func) __P((void *));
|
||||
void (*func)(void *);
|
||||
void *arg;
|
||||
{
|
||||
struct pcb *opcb = &l1->l_addr->u_pcb;
|
||||
|
@ -259,7 +259,7 @@ cpu_lwp_fork(l1, l2, stack, stacksize, func, arg)
|
|||
* If specified, give the child a different stack.
|
||||
*/
|
||||
if (stack != NULL)
|
||||
tf2->tf_out[6] = (u_int64_t)(u_long)stack + stacksize;
|
||||
tf2->tf_out[6] = (uint64_t)(u_long)stack + stacksize;
|
||||
|
||||
/* Set return values in child mode */
|
||||
tf2->tf_out[0] = 0;
|
||||
|
@ -298,7 +298,7 @@ cpu_lwp_fork(l1, l2, stack, stacksize, func, arg)
|
|||
void
|
||||
cpu_setfunc(l, func, arg)
|
||||
struct lwp *l;
|
||||
void (*func) __P((void *));
|
||||
void (*func)(void *);
|
||||
void *arg;
|
||||
{
|
||||
struct pcb *npcb = &l->l_addr->u_pcb;
|
||||
|
|
Loading…
Reference in New Issue