cvs commit: src/sys/conf files.sparc64 src/sys/dev/fb creator.c src/sys/sparc64/central central.c src/sys/sparc64/fhc fhc.c fhc_central.c fhc_nexus.c fhcvar.h src/sys/sparc64/include bus_private.h iommureg.h nexusvar.h ofw_nexus.h ofw_upa.h ...

Marius Strobl marius at
Wed Mar 7 21:13:52 UTC 2007

marius      2007-03-07 21:13:51 UTC

  FreeBSD src repository

  Modified files:
    sys/conf             files.sparc64 
    sys/dev/fb           creator.c 
    sys/sparc64/central  central.c 
    sys/sparc64/fhc      fhc.c 
    sys/sparc64/include  bus_private.h iommureg.h ofw_nexus.h 
    sys/sparc64/pci      psycho.c psychovar.h 
    sys/sparc64/sbus     sbus.c 
    sys/sparc64/sparc64  bus_machdep.c iommu.c nexus.c 
  Removed files:
    sys/sparc64/fhc      fhc_central.c fhc_nexus.c fhcvar.h 
    sys/sparc64/include  nexusvar.h ofw_upa.h 
  Rototill the sparc64 nexus(4) (actually this brings in the code the
  sun4v nexus(4) in turn is based on):
  o Change nexus(4) to manage the resources of its children so the
    respective device drivers don't need to figure them out of OFW
  o Change nexus(4) to provide the ofw_bus KOBJ interface instead of
    using IVARs for supplying the OFW node and the subset of standard
    properties of its children. Together with the previous change this
    also allows to fully take advantage of newbus in that drivers like
    fhc(4), which attach on multiple parent busses, no longer require
    different bus front-ends as obtaining the OFW node and properties
    as well as resource allocation works the same for all supported
    busses. As such this change also is part 4/4 of allowing creator(4)
    to work in USIII-based machines as it allows this driver to attach
    on both nexus(4) and upa(4). On the other hand removing these IVARs
    breaks API compatibility with the powerpc nexus(4) but which isn't
    that bad as a) sparc64 currently doesn't share any device driver
    hanging off of nexus(4) with powerpc and b) they were no longer
    compatible regarding OFW-related extensions at the pci(4) level
    since quite some time.
  o Provide bus_get_dma_tag methods in nexus(4) and its children in
    order to handle DMA tags in a hierarchical way and get rid of the
    sparc64_root_dma_tag kludge. Together with the previous two items
    this changes also allows to completely get rid of the nexus(4)
    IVAR interface. It also includes:
    - pushing the constraints previously specified by the nexus_dmatag
      down into the DMA tags of psycho(4) and sbus(4) as it's their
      IOMMUs which induce these restrictions (and nothing at the
      nexus(4) or anything that would warrant specifying them there),
    - fixing some obviously wrong constraints of the psycho(4) and
      sbus(4) DMA tags, which happened to not actually be used with
      the sparc64_root_dma_tag kludge in place and therefore didn't
      cause problems so far,
    - replacing magic constants for constraints with macros as far
      as it is obvious as to where they come from.
    This doesn't include taking advantage of the newbus way to get
    the parent DMA tags implemented by this change in order to divorce
    the IOTSBs of the PCI and SBus IOMMUs or for implementing the
    workaround for the DMA sync bug in Sabre (and Tomatillo) bridges,
    yet, though.
  o Get rid of the notion that nexus(4) (mostly) reflects an UPA bus
    by replacing ofw_upa.h and with ofw_nexus.h (which was repo-copied
    from ofw_upa.h) and renaming its content, which actually applies to
    all of Fireplane/Safari, JBus and UPA (in the host bus case), as
  o Just use M_DEVBUF instead of a separate M_NEXUS malloc type for
    allocating the device info for the children of nexus(4). This is
    done in order to not need to export M_NEXUS when deriving drivers
    for subordinate busses from the nexus(4) class.
  o Use the DEFINE_CLASS_0() macro to declare the nexus(4) driver so
    we can derive subclasses from it.
  o Const'ify the nexus_excl_name and nexus_excl_type arrays as well
    as add 'associations' and 'rsc', which are pseudo-devices without
    resources and therefore of no real interest for nexus(4), to the
  o Let the nexus(4) device memory rman manage the entire 64-bit address
    space instead of just the UPA_MEMSTART to UPA_MEMEND subregion as
    Fireplane/Safari- and JBus-based machines use multiple ranges,
    which can't be as easily divided as in the case of UPA (limiting
    the address space only served for sanity checking anyway).
  o Use M_WAITOK instead of M_NOWAIT when allocating the device info
    for children of nexus(4) in order to give one less opportunity
    for adding devices to nexus(4) to fail.
  o While adapting the drivers affected by the above nexus(4) changes,
    change them to take advantage of rman_get_rid() instead of caching
    the RIDs assigned to allocated resources, now that the RIDs of
    resources are correctly set.
  o In iommu(4) and nexus(4) replace hard-coded functions names, which
    actually became outdated in several places, in panic strings and
    status massages with __func__. [1]
  o Use driver_filter_t in prototypes where appropriate.
  o Add my copyright to creator(4), fhc(4), nexus(4), psycho(4) and
    sbus(4) as I changed considerable amounts of these drivers as well
    as added a bunch of new features, workarounds for silicon bugs etc.
  o Fix some white space nits.
  Due to lack of access to Exx00 hardware, these changes, i.e. central(4)
  and fhc(4), couldn't be runtime tested on such a machine. Exx00 are
  currently reported to panic before trying to attach nexus(4) anyway
  PR:             76052 [1]
  Approved by:    re (kensmith)
  Revision  Changes    Path
  1.88      +0 -2      src/sys/conf/files.sparc64
  1.12      +13 -29    src/sys/dev/fb/creator.c
  1.12      +4 -6      src/sys/sparc64/central/central.c
  1.16      +126 -16   src/sys/sparc64/fhc/fhc.c
  1.11      +0 -132    src/sys/sparc64/fhc/fhc_central.c (dead)
  1.10      +0 -147    src/sys/sparc64/fhc/fhc_nexus.c (dead)
  1.7       +0 -59     src/sys/sparc64/fhc/fhcvar.h (dead)
  1.8       +0 -7      src/sys/sparc64/include/bus_private.h
  1.7       +4 -4      src/sys/sparc64/include/iommureg.h
  1.4       +0 -58     src/sys/sparc64/include/nexusvar.h (dead)
  1.7       +14 -14    src/sys/sparc64/include/ofw_nexus.h
  1.6       +0 -54     src/sys/sparc64/include/ofw_upa.h (dead)
  1.64      +67 -85    src/sys/sparc64/pci/psycho.c
  1.15      +0 -1      src/sys/sparc64/pci/psychovar.h
  1.42      +40 -42    src/sys/sparc64/sbus/sbus.c
  1.45      +21 -31    src/sys/sparc64/sparc64/bus_machdep.c
  1.44      +24 -23    src/sys/sparc64/sparc64/iommu.c
  1.20      +235 -125  src/sys/sparc64/sparc64/nexus.c
  1.3       +2 -3      src/sys/sparc64/sparc64/sc_machdep.c

More information about the cvs-src mailing list