cvs commit: src/sys/amd64/acpica acpi_machdep.c src/sys/amd64/amd64 legacy.c nexus.c src/sys/amd64/include nexusvar.h src/sys/dev/acpica acpi.c acpivar.h src/sys/i386/acpica acpi_machdep.c src/sys/i386/i386 legacy.c nexus.c ...

John Baldwin jhb at
Thu Mar 13 13:39:05 PDT 2008

jhb         2008-03-13 20:39:04 UTC

  FreeBSD src repository

  Modified files:
    sys/amd64/acpica     acpi_machdep.c 
    sys/amd64/amd64      legacy.c nexus.c 
    sys/dev/acpica       acpi.c acpivar.h 
    sys/i386/acpica      acpi_machdep.c 
    sys/i386/i386        legacy.c nexus.c 
    sys/ia64/ia64        nexus.c 
  Added files:
    sys/amd64/include    nexusvar.h 
    sys/i386/include     nexusvar.h 
  Rework how the nexus(4) device works on x86 to better handle the idea of
  different "platforms" on x86 machines.  The existing code already handles
  having two platforms: ACPI and legacy.  However, the existing approach was
  rather hardcoded and difficult to extend.  These changes take the approach
  that each x86 hardware platform should provide its own nexus(4) driver (it
  can inherit most of its behavior from the default legacy nexus(4) driver)
  which is responsible for probing for the platform and performing
  appropriate platform-specific setup during attach (such as adding a
  platform-specific bus device).  This does mean changing the x86 platform
  busses to no longer use an identify routine for probing, but to move that
  logic into their matching nexus(4) driver instead.
  - Make the default nexus(4) driver in nexus.c on i386 and amd64 handle the
    legacy platform.  It's probe routine now returns BUS_PROBE_GENERIC so it
    can be overriden.
  - Expose a nexus_init_resources() routine which initializes the various
    resource managers so that subclassed nexus(4) drivers can invoke it from
    their attach routine.
  - The legacy nexus(4) driver explicitly adds a legacy0 device in its
    attach routine.
  - The ACPI driver no longer contains an new-bus identify method.  Instead
    it exposes a public function (acpi_identify()) which is a probe routine
    that the MD nexus(4) drivers can use to probe for ACPI.  All of the
    probe logic in acpi_probe() is now moved into acpi_identify() and
    acpi_probe() is just a stub.
  - On i386 and amd64, an ACPI-specific nexus(4) driver checks for ACPI via
    acpi_identify() and claims the nexus0 device if the probe succeeds.  It
    then explicitly adds an acpi0 device in its attach routine.
  - The legacy(4) driver no longer knows anything about the acpi0 device.
  - On ia64 if acpi_identify() fails you basically end up with no devices.
    This matches the previous behavior where the old acpi_identify() would
    fail to add an acpi0 device again leaving you with no devices.
  Discussed with: imp
  Silence on:     arch@
  Revision  Changes    Path
  1.18      +44 -0     src/sys/amd64/acpica/acpi_machdep.c
  1.63      +0 -21     src/sys/amd64/amd64/legacy.c
  1.79      +24 -17    src/sys/amd64/amd64/nexus.c
  1.1       +45 -0     src/sys/amd64/include/nexusvar.h (new)
  1.247     +38 -45    src/sys/dev/acpica/acpi.c
  1.109     +1 -0      src/sys/dev/acpica/acpivar.h
  1.38      +43 -0     src/sys/i386/acpica/acpi_machdep.c
  1.65      +0 -21     src/sys/i386/i386/legacy.c
  1.74      +24 -17    src/sys/i386/i386/nexus.c
  1.4       +45 -0     src/sys/i386/include/nexusvar.h (new)
  1.19      +6 -0      src/sys/ia64/ia64/nexus.c

More information about the cvs-src mailing list