Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sandpoint Support for the Motorola Sandpoint refere...



details:   https://anonhg.NetBSD.org/src/rev/a4d5c2fb11d5
branches:  trunk
changeset: 503298:a4d5c2fb11d5
user:      briggs <briggs%NetBSD.org@localhost>
date:      Sun Feb 04 18:32:10 2001 +0000

description:
Support for the Motorola Sandpoint reference platform using the
MPC8240 processor module.  See the README for more information.

diffstat:

 sys/arch/sandpoint/Makefile                   |     5 +
 sys/arch/sandpoint/README                     |   141 +++
 sys/arch/sandpoint/conf/GENERIC               |    94 ++
 sys/arch/sandpoint/conf/Makefile.sandpoint    |   218 ++++
 sys/arch/sandpoint/conf/files.sandpoint       |   104 ++
 sys/arch/sandpoint/conf/std.sandpoint         |    10 +
 sys/arch/sandpoint/include/Makefile           |    14 +
 sys/arch/sandpoint/include/ansi.h             |     3 +
 sys/arch/sandpoint/include/aout_machdep.h     |     3 +
 sys/arch/sandpoint/include/asm.h              |     3 +
 sys/arch/sandpoint/include/bat.h              |     3 +
 sys/arch/sandpoint/include/bootinfo.h         |    70 +
 sys/arch/sandpoint/include/bswap.h            |     3 +
 sys/arch/sandpoint/include/bus.h              |  1130 +++++++++++++++++++++++++
 sys/arch/sandpoint/include/cdefs.h            |     3 +
 sys/arch/sandpoint/include/conf.h             |    63 +
 sys/arch/sandpoint/include/cpu.h              |    86 +
 sys/arch/sandpoint/include/cpufunc.h          |     2 +
 sys/arch/sandpoint/include/db_machdep.h       |     3 +
 sys/arch/sandpoint/include/disklabel.h        |    55 +
 sys/arch/sandpoint/include/elf_machdep.h      |     3 +
 sys/arch/sandpoint/include/endian.h           |     3 +
 sys/arch/sandpoint/include/endian_machdep.h   |     3 +
 sys/arch/sandpoint/include/float.h            |     3 +
 sys/arch/sandpoint/include/fpu.h              |     3 +
 sys/arch/sandpoint/include/frame.h            |     3 +
 sys/arch/sandpoint/include/ieee.h             |     3 +
 sys/arch/sandpoint/include/ieeefp.h           |     3 +
 sys/arch/sandpoint/include/int_types.h        |     3 +
 sys/arch/sandpoint/include/intr.h             |   255 +++++
 sys/arch/sandpoint/include/ipkdb.h            |     3 +
 sys/arch/sandpoint/include/isa_machdep.h      |   249 +++++
 sys/arch/sandpoint/include/isapnp_machdep.h   |    46 +
 sys/arch/sandpoint/include/kcore.h            |     3 +
 sys/arch/sandpoint/include/kgdb.h             |    80 +
 sys/arch/sandpoint/include/limits.h           |     3 +
 sys/arch/sandpoint/include/loadfile_machdep.h |    55 +
 sys/arch/sandpoint/include/lock.h             |     4 +
 sys/arch/sandpoint/include/machine_type.h     |     3 +
 sys/arch/sandpoint/include/math.h             |     3 +
 sys/arch/sandpoint/include/openpicreg.h       |    63 +
 sys/arch/sandpoint/include/param.h            |   139 +++
 sys/arch/sandpoint/include/pcb.h              |     3 +
 sys/arch/sandpoint/include/pci_machdep.h      |    73 +
 sys/arch/sandpoint/include/pio.h              |   327 +++++++
 sys/arch/sandpoint/include/pmap.h             |     3 +
 sys/arch/sandpoint/include/powerpc.h          |    53 +
 sys/arch/sandpoint/include/proc.h             |     3 +
 sys/arch/sandpoint/include/profile.h          |     3 +
 sys/arch/sandpoint/include/psl.h              |     3 +
 sys/arch/sandpoint/include/pte.h              |     3 +
 sys/arch/sandpoint/include/ptrace.h           |     3 +
 sys/arch/sandpoint/include/reg.h              |     3 +
 sys/arch/sandpoint/include/reloc.h            |     3 +
 sys/arch/sandpoint/include/rnd.h              |     3 +
 sys/arch/sandpoint/include/setjmp.h           |     3 +
 sys/arch/sandpoint/include/signal.h           |     3 +
 sys/arch/sandpoint/include/spkr.h             |    14 +
 sys/arch/sandpoint/include/stdarg.h           |     3 +
 sys/arch/sandpoint/include/trap.h             |     3 +
 sys/arch/sandpoint/include/types.h            |     5 +
 sys/arch/sandpoint/include/varargs.h          |     3 +
 sys/arch/sandpoint/include/vmparam.h          |   106 ++
 sys/arch/sandpoint/isa/icu.h                  |    53 +
 sys/arch/sandpoint/isa/isa_machdep.c          |   371 ++++++++
 sys/arch/sandpoint/isa/isaclock.c             |   381 ++++++++
 sys/arch/sandpoint/isa/isadma_machdep.c       |   662 ++++++++++++++
 sys/arch/sandpoint/isa/isapnp_machdep.c       |   165 +++
 sys/arch/sandpoint/isa/nvram.h                |    86 +
 sys/arch/sandpoint/isa/spkr.c                 |   556 ++++++++++++
 sys/arch/sandpoint/isa/spkrreg.h              |    11 +
 sys/arch/sandpoint/pci/pchb.c                 |   101 ++
 sys/arch/sandpoint/pci/pci_machdep.c          |   296 ++++++
 sys/arch/sandpoint/pci/pcib.c                 |   141 +++
 sys/arch/sandpoint/sandpoint/autoconf.c       |   135 ++
 sys/arch/sandpoint/sandpoint/bus_dma.c        |   625 +++++++++++++
 sys/arch/sandpoint/sandpoint/clock.c          |   183 ++++
 sys/arch/sandpoint/sandpoint/conf.c           |   372 ++++++++
 sys/arch/sandpoint/sandpoint/disksubr.c       |   514 +++++++++++
 sys/arch/sandpoint/sandpoint/extintr.c        |   424 +++++++++
 sys/arch/sandpoint/sandpoint/genassym.cf      |    73 +
 sys/arch/sandpoint/sandpoint/kgdb_glue.c      |    95 ++
 sys/arch/sandpoint/sandpoint/locore.s         |   405 ++++++++
 sys/arch/sandpoint/sandpoint/machdep.c        |   830 ++++++++++++++++++
 sys/arch/sandpoint/sandpoint/mainbus.c        |   132 ++
 sys/arch/sandpoint/sandpoint/procfs_machdep.c |    20 +
 86 files changed, 10200 insertions(+), 0 deletions(-)

diffs (truncated from 10544 to 300 lines):

diff -r edcb3a973ff5 -r a4d5c2fb11d5 sys/arch/sandpoint/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/sandpoint/Makefile       Sun Feb 04 18:32:10 2001 +0000
@@ -0,0 +1,5 @@
+#      $NetBSD: Makefile,v 1.1 2001/02/04 18:32:10 briggs Exp $
+
+SUBDIR=        include
+
+.include <bsd.subdir.mk>
diff -r edcb3a973ff5 -r a4d5c2fb11d5 sys/arch/sandpoint/README
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/sandpoint/README Sun Feb 04 18:32:10 2001 +0000
@@ -0,0 +1,141 @@
+Overview
+
+This is a port to the Motorola "SandPoint" evaluation system.  The
+SandPoint is the successor to the "Yellowknife" system.  The system
+can be fitted with different PMCs (Processor Mezzanine Cards).  This
+port is specifically for the rev X2 motherboard system with the PPC
+8240 PMC rev X4 installed.
+
+All references (cf) listed here are for the MPC8240 Integrated Processor
+User's Manual.
+
+
+
+SandPoint Hardware Configuration
+
+This port was developed on a Sandpoint X2 motherboard with a Unity X4 PMC.
+
+This port assumes that the jumpers are set as follows:
+       S3/S4   - Mode 1: PMC w/o IDE (switches opposite, one nearest PCI
+                 slot toward near edge)
+       S5      - Interrupt to PMC normal (switch toward near edge)
+       S6      - Local I/O shared with slot 2 (switch toward near edge)
+
+Mode 0 (PMC w/ IDE) does not appear to work right with ISA interrupts.  The
+interrupts from the Winbond chip do not appear at the PMC.
+
+On the PPMC, we assume a 100MHz clock.
+on PPMC: (C == closed, or "on")
+    SW2:
+       C       ROM on PCI bus (DINK32 on mainboard)
+       -       Map "B": CHRP
+       C       Motorola PPMC
+       C       Wait for initialization (peripheral mode)
+       -       Program mode: Normal mode
+       -       Select normal ROM
+       -       33 MHz only
+       -       COP only resets local CPU/MPC107
+    SW3:
+       -C--C   PCI 33, Mem 66, PPC 266
+       --      0.5 - 0.9 ns PCI hold time
+       C       25 ohm PCI drive strength
+
+
+Address Map
+
+For this port, we choose the "Address Map B" (CHRP-compatible) for the
+system (see SW2, #2, above):
+
+ (Processor View)
+0000 0000   0009 FFFF  System Memory
+000A 0000   000F FFFF  Compatibility Hole (programmable to go to PCI space
+                       or system memory--programmed for system memory--cf 5.8)
+0010 0000   3FFF FFFF  System memory
+4000 0000   7FFF FFFF  Reserved (programmed to give a memory select
+                       error if accessed--cf 5.7.2)
+8000 0000   FCFF FFFF  PCI memory space
+FD00 0000   FDFF FFFF  PCI/ISA memory space (see 5.8, CPU_FD_ALIAS_EN)
+FE00 0000   FE7F FFFF  PCI/ISA I/O space (Forwarded to PCI address space
+                       with high byte zeroed, but FE01 0000 and up are
+                       reserved)
+FE80 0000   FEBF FFFF  PCI I/O space (Forwarded to PCI I/O space with high
+                       byte zeroed)
+FEC0 0000   FEDF FFFF  PCI configuration address register (Each word in this
+                       range is aliased to the PCI CONFIG_ADDR register)
+FEE0 0000   FEEF FFFF  PCI configuration data register (Each word in this
+                       range is aliased to the PCI CONFIG_DATA register)
+FEF0 0000   FEFF FFFF  PCI interrupt acknowledge
+FF00 0000   FF7F FFFF  32- or 64-bit Flash/ROM space (Can hit either local
+                       memory or PCI bus -- cf. 5.6)
+FF80 0000   FFFF FFFF  8-, 32- or 64-bit Flash/ROM space (Can hit either
+                       local memory or PCI bus -- cf. 5.6)
+
+This is a host-mode port, so the inbound and output translation windows
+are unused.
+
+The Embedded Utilities Memory Block (EUMB) is set to be 1M below the end
+of the PCI memory space: FCF0 0000, so EUMBBAR is FCF0 0000, giving us
+
+Message unit (I2O) base        : FCF0 0000     (cf. 10.2, 10.2.3, 10.3)
+DMA base               : FCF0 1000     (cf. 9.2)
+ATU base               : FCF0 2000     (cf. 4.3.3)
+I2C base               : FCF0 3000     (cf. 11.3)
+EPIC base              : FCF4 0000     (cf. 12.2)
+
+
+
+Boot Information
+
+The SandPoint ships with the Motorola DINK32 ROM.  This is a rather
+basic ROM with only serial-download (S-Record) capability for
+loading the kernel.  Basically, the kernel is loaded to a specified
+address and you jump to it.  The ROM takes care of initializing
+the MICRs and MCCRs.  There is really no boot information to pass.
+
+It would be nice to have a much more complete ROM interface, allowing
+settings for, say, bootp/tftp boot, automatic boot, and persistent
+settings (for console rate, auto boot, bootp, etc), and that might
+be provided at some point, but that's not available as of this
+writing.
+
+So, the kernel is hard-coded to boot w/ 64MB for now.
+
+
+
+Interrupt Configuration
+
+The 8240 has the internal EPIC.  For the SandPoint, the EPIC is programmed
+in mixed-mode (GCR) with direct interrupts (EICR).  With this configuration,
+there are 13 available interrupts:
+       4 global timers
+       5 direct IRQs
+               IRQ0 - PCI Slot #0 INTA#
+               IRQ1 - PCI Slot #1 INTA# / shared with WinBond I/O
+               IRQ2 - PCI Slot #2 INTA#
+               IRQ3 - PCI Slot #3 INTA#
+               IRQ4 - On-PPMC 16552 interrupt (Unity X2)
+               IRQ4 - pulled down w/ resistor (Unity X4)
+       4 internal interrupts
+               I2C
+               DMA Ch0
+               DMA Ch1
+               I2O message unit
+
+The SandPoint can run in one of 4 interrupt modes:
+  0 - PMC host with IDE (3.3v PCI slots are unavailable)
+  1 - PMC host w/o IDE (all PCI slots are available)
+  2 - PMC agent, Winbond providing arbitration & interrupt to INTA# on PMC
+  3 - Yellowknife mode--just like #2, except drives INTA# on 4th PCI slot
+
+We choose to run in mode 1 as Motorola recommends modes 0 or 1 for
+all new development.  Unfortunately, mode 0 does not appear to
+work--"ISA" interrupts are lost.  In this mode, with interrupts
+routed to PCI slot 3, we have to check for both a Winbond (ISA)
+interrupt, and a PCI slot interrupt.  So basically, we have a
+two-level interrupt configuration for Winbond interrupts.  The ISA
+bus attachment registers an interrupt for PCI slot 3 with its own
+interrupt handler.  Drivers for ISA devices on the Winbond will
+register interrupts with the ISA interrupt handler.  The sticky
+part of this is how to deal with one global interrupt priority.
+
+
diff -r edcb3a973ff5 -r a4d5c2fb11d5 sys/arch/sandpoint/conf/GENERIC
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/sandpoint/conf/GENERIC   Sun Feb 04 18:32:10 2001 +0000
@@ -0,0 +1,94 @@
+#      $NetBSD: GENERIC,v 1.1 2001/02/04 18:32:10 briggs Exp $
+#
+# GENERIC for Motorola Sandpoint
+#
+
+include "arch/sandpoint/conf/std.sandpoint"
+
+#ident                 "GENERIC-$Revision: 1.1 $"
+
+maxusers       32
+
+#options       IPKDBUSERHACK   # Allow access to mapped memory via kgdb
+#options       DEBUG_BY_TOOLS  # Allow debugging from toolsnet
+# HMAC key to be used for debugging sessions
+#options       IPKDBKEY="\"HMAC pass phrase text\""
+#options       IPKDBSECURE     # Allow debugging even when securelevel > 0
+makeoptions    DEBUG="-g"
+
+options        DEBUG
+options        DIAGNOSTIC
+options        TRAP_PANICWAIT
+options        DDB
+#options       DDB_HISTORY_SIZE=100    # Enable history editing in DDB
+options        KTRACE
+
+options        TCP_COMPAT_42
+options        COMPAT_43
+options        COMPAT_09
+options        COMPAT_10
+options        COMPAT_12
+options        COMPAT_13
+options        COMPAT_14
+options        COMPAT_386BSD_MBRPART   # recognize old partition ID
+
+file-system    FFS
+file-system    MFS
+file-system    NFS
+file-system    CD9660
+file-system    MSDOSFS
+file-system    FDESC
+file-system    KERNFS
+file-system    NULLFS
+file-system    OVERLAY
+file-system    PORTAL
+file-system    PROCFS
+file-system    UMAPFS
+file-system    UNION
+
+options        SOFTDEP         # FFS soft updates support.
+
+options        INET
+
+options                NFS_BOOT_BOOTPARAM,NFS_BOOT_BOOTP
+
+config         netbsd  root on ? type ?
+
+pseudo-device  vnd             4
+pseudo-device  loop
+pseudo-device  bpfilter        8       # packet filter
+pseudo-device  pty             64      # pseudo-terminals
+
+# random number generator pseudo-device
+pseudo-device  rnd                     # /dev/random and in-kernel generator
+
+#
+# device
+#
+options        RTC_OFFSET=0    # hardware clock is this many mins. west of GMT
+
+options        PCIVERBOSE      # verbose PCI device messages
+#options       PCI_CONFIG_DUMP # verbosely dump PCI config space
+
+mainbus0 at root
+
+pci*   at mainbus0 bus ?
+
+pchb*  at pci? dev ? function ?        # PCI host bridge
+pcib*  at pci? dev ? function ?        # Winbond 83c553 PCI-ISA bridges
+
+isa*   at pcib?                        # ISA on PCI-ISA bridge
+
+#pciide* at pci? dev ? function ?      # Winbond/Symphony IDE interface
+
+vga*   at pci?
+wsdisplay*     at vga? console ?
+
+ep*    at pci? dev ? function ?        # 3Com 3c59x
+ex*    at pci? dev ? function ?        # 3Com 90x[B]
+
+ukphy* at mii? phy ?                   # generic unknown PHYs
+exphy* at mii? phy ?                   # 3Com internal PHYs
+
+com0   at isa? port 0x3f8 irq 4        # standard PC serial ports
+com1   at isa? port 0x2f8 irq 3
diff -r edcb3a973ff5 -r a4d5c2fb11d5 sys/arch/sandpoint/conf/Makefile.sandpoint
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/sandpoint/conf/Makefile.sandpoint        Sun Feb 04 18:32:10 2001 +0000
@@ -0,0 +1,218 @@
+#      $NetBSD: Makefile.sandpoint,v 1.1 2001/02/04 18:32:11 briggs Exp $
+
+# Makefile for NetBSD
+#
+# This makefile is constructed from a machine description:
+#      config machineid
+# Most changes should be made in the machine description
+#      /sys/arch/sandpoint/conf/``machineid''
+# after which you should do
+#      config machineid
+# Machine generic makefile changes should be made in
+#      /sys/arch/sandpoint/conf/Makefile.sandpoint
+# after which config should be rerun for all machines of that type.
+#
+# N.B.: NO DEPENDENCIES ON FOLLOWING FLAGS ARE VISIBLE TO MAKEFILE
+#      IF YOU CHANGE THE DEFINITION OF ANY OF THESE RECOMPILE EVERYTHING
+#
+# -DTRACE      compile in kernel tracing hooks
+# -DQUOTA      compile in file system quotas
+
+.include <bsd.own.mk>
+
+# DEBUG is set to -g if debugging.
+# PROF is set to -pg if profiling.
+
+AR?=   ar
+AS?=   as
+CC?=   cc
+CPP?=  cpp
+LD?=   ld
+LORDER?=lorder
+MKDEP?=        mkdep
+NM?=   nm
+RANLIB?=ranlib
+SIZE?= size
+STRIP?=        strip
+TSORT?=        tsort -q
+OBJCOPY?= objcopy
+
+COPTS?=        -O2
+
+# source tree is located via $S relative to the compilation directory
+.ifndef S
+S!=    cd ../../../..; pwd



Home | Main Index | Thread Index | Old Index