diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2002-07-24 19:10:55 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2002-07-24 19:10:55 +0000 |
commit | 4066629ddad110d60da35dfcdf391bad07dfe3b6 (patch) | |
tree | b44bde3e8f066d908f9075980af655a3858fc454 /sys/arch | |
parent | 0974c4b4c97cdbdad12f7df3f978ab96b6ac4f76 (diff) |
add support for schizo streaming buffers (per PBM), but leave the buffers disabled for now
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/sparc64/dev/schizo.c | 18 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/schizoreg.h | 35 |
2 files changed, 40 insertions, 13 deletions
diff --git a/sys/arch/sparc64/dev/schizo.c b/sys/arch/sparc64/dev/schizo.c index 366a9510b76..6f29a88e5a6 100644 --- a/sys/arch/sparc64/dev/schizo.c +++ b/sys/arch/sparc64/dev/schizo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: schizo.c,v 1.4 2002/07/18 16:45:08 jason Exp $ */ +/* $OpenBSD: schizo.c,v 1.5 2002/07/24 19:10:54 jason Exp $ */ /* * Copyright (c) 2002 Jason L. Wright (jason@thought.net) @@ -215,11 +215,21 @@ schizo_init_iommu(sc, pbm) char *name; is->is_bustag = pbm->sp_sc->sc_bust; - is->is_sb[0] = is->is_sb[1] = NULL; - if (pbm->sp_bus_a) + if (pbm->sp_bus_a) { is->is_iommu = &pbm->sp_sc->sc_regs->pbm_a.iommu; - else + is->is_sb[0] = &pbm->sp_sc->sc_regs->pbm_a.strbuf; + } else { is->is_iommu = &pbm->sp_sc->sc_regs->pbm_b.iommu; + is->is_sb[0] = &pbm->sp_sc->sc_regs->pbm_b.strbuf; + } + +#if 1 + /* XXX disable the streaming buffers for now */ + is->is_sb[0]->strbuf_ctl &= ~STRBUF_EN; + is->is_sb[0] = NULL; +#endif + is->is_sb[1] = NULL; + printf("buffers %p & %p\n", is->is_sb[0], is->is_sb[1]); name = (char *)malloc(32, M_DEVBUF, M_NOWAIT); if (name == NULL) diff --git a/sys/arch/sparc64/dev/schizoreg.h b/sys/arch/sparc64/dev/schizoreg.h index 47be082af2b..838fde899f3 100644 --- a/sys/arch/sparc64/dev/schizoreg.h +++ b/sys/arch/sparc64/dev/schizoreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: schizoreg.h,v 1.4 2002/07/18 16:45:08 jason Exp $ */ +/* $OpenBSD: schizoreg.h,v 1.5 2002/07/24 19:10:54 jason Exp $ */ /* * Copyright (c) 2002 Jason L. Wright (jason@thought.net) @@ -31,14 +31,19 @@ * POSSIBILITY OF SUCH DAMAGE. */ struct schizo_pbm_regs { - u_int64_t unused1[64]; + u_int64_t _unused1[64]; struct iommureg iommu; u_int64_t iommu_ctxflush; - u_int64_t unused2[5228]; + u_int64_t _unused2[1212]; + struct iommu_strbuf strbuf; + u_int64_t strbuf_ctxflush; + u_int64_t _unused3[4012]; u_int64_t iommu_tag; - u_int64_t unused3[15]; + u_int64_t _unused4[15]; u_int64_t iommu_data; - u_int64_t unusedN[125759]; + u_int64_t _unused5[2879]; + u_int64_t strbuf_ctxmatch; + u_int64_t _unusedN[122879]; }; struct schizo_regs { @@ -82,10 +87,22 @@ struct schizo_regs { #define SCZ_CE_AFSR 0x10040 #define SCZ_CE_AFAR 0x10048 -#define SCZ_PCI_IMAP_BASE 0x1000 -#define SCZ_PCI_ICLR_BASE 0x1400 -#define SCZ_PCI_AFSR 0x2010 -#define SCZ_PCI_AFAR 0x2018 +/* These are relative to the PBM */ +#define SCZ_PCI_IOMMU_CTRL 0x00200 +#define SCZ_PCI_IOMMU_TSBBASE 0x00208 +#define SCZ_PCI_IOMMU_FLUSH 0x00210 +#define SCZ_PCI_IOMMU_CTXFLUSH 0x00218 +#define SCZ_PCI_IMAP_BASE 0x01000 +#define SCZ_PCI_ICLR_BASE 0x01400 +#define SCZ_PCI_AFSR 0x02010 +#define SCZ_PCI_AFAR 0x02018 +#define SCZ_PCI_STRBUF_CTRL 0x02800 +#define SCZ_PCI_STRBUF_FLUSH 0x02808 +#define SCZ_PCI_STRBUF_FSYNC 0x02810 +#define SCZ_PCI_STRBUF_CTXFLUSH 0x02818 +#define SCZ_PCI_IOMMU_TAG 0x0a580 +#define SCZ_PCI_IOMMU_DATA 0x0a600 +#define SCZ_PCI_STRBUF_CTXMATCH 0x10000 #define SCZ_ECCCTRL_EE 0x8000000000000000UL #define SCZ_ECCCTRL_UE 0x4000000000000000UL |