DragonFly BSD

CVS log for src/sys/bus/pci/pci.c

[BACK] Up to [DragonFly] / src / sys / bus / pci

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.58: download - view: text, markup, annotated - select for diffs
Sun Nov 16 18:44:00 2008 UTC (5 years, 5 months ago) by swildner
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.57: preferred, unified
Changes since revision 1.57: +1 -1 lines
Fix some typos in user visible messages.

Revision 1.57: download - view: text, markup, annotated - select for diffs
Sun Oct 19 09:13:58 2008 UTC (5 years, 6 months ago) by sephe
Branches: MAIN
Diff to: previous 1.56: preferred, unified
Changes since revision 1.56: +30 -0 lines
Add pcie_set_max_readrq() to avoid code duplication between various network
device drivers.

Revision 1.56: download - view: text, markup, annotated - select for diffs
Mon Sep 8 10:16:23 2008 UTC (5 years, 7 months ago) by hasso
Branches: MAIN
Diff to: previous 1.55: preferred, unified
Changes since revision 1.55: +7 -0 lines
Turn power off for detached (module unloaded) PCI devices. No power down is
done by default, you have to use hw.pci.do_power_nodriver sysctl.

Revision 1.55: download - view: text, markup, annotated - select for diffs
Sat Sep 6 21:18:39 2008 UTC (5 years, 7 months ago) by hasso
Branches: MAIN
Diff to: previous 1.54: preferred, unified
Changes since revision 1.54: +70 -40 lines
Sync pci_[gs]et_powerstate_method with FreeBSD which makes things a little
bit more friendly to devices.

Obtained-from: FreeBSD

Revision 1.54: download - view: text, markup, annotated - select for diffs
Fri Sep 5 10:39:36 2008 UTC (5 years, 7 months ago) by hasso
Branches: MAIN
Diff to: previous 1.53: preferred, unified
Changes since revision 1.53: +180 -1 lines
Quite minimal patchset to help to save some more power - put unused PCI
devices (devices with no drivers) into D3 state. Device has to support it
of course.

Obtained-from: FreeBSD

Revision 1.53: download - view: text, markup, annotated - select for diffs
Sat Aug 2 01:14:40 2008 UTC (5 years, 8 months ago) by dillon
Branches: MAIN
Diff to: previous 1.52: preferred, unified
Changes since revision 1.52: +1 -3 lines
Create an #include layer for bus/pci and bus/isa so source files do not
have to dive into bus/xxx/i386 to access header files.

Revision 1.52: download - view: text, markup, annotated - select for diffs
Thu Jun 5 18:06:31 2008 UTC (5 years, 10 months ago) by swildner
Branches: MAIN
CVS tags: DragonFly_RELEASE_2_0_Slip, DragonFly_RELEASE_2_0, DragonFly_Preview
Diff to: previous 1.51: preferred, unified
Changes since revision 1.51: +1 -1 lines
* Fix some cases where NULL was used but 0 was meant (and vice versa).

* Remove some bogus casts of NULL to (void *).

Revision 1.51: download - view: text, markup, annotated - select for diffs
Sun Jan 6 16:55:49 2008 UTC (6 years, 3 months ago) by swildner
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_12_Slip, DragonFly_RELEASE_1_12
Diff to: previous 1.50: preferred, unified
Changes since revision 1.50: +0 -6 lines
Remove bogus checks after kmalloc(M_WAITOK) which never returns NULL.

Reviewed-by: hasso

Revision 1.50: download - view: text, markup, annotated - select for diffs
Wed Nov 28 11:35:40 2007 UTC (6 years, 4 months ago) by sephe
Branches: MAIN
Diff to: previous 1.49: preferred, unified
Changes since revision 1.49: +55 -34 lines
- Factor out pcie_slotimpl() to check whether PCI Express slot is implemented.
- Add external function to test whether PCI Express slot is implemented; this
  external function is sheer wrapper of pcie_slotimpl().
- Rename port type macros.
- Add some comment.
- Disable all hot-plug related interrupts on PCI Express root/downstream port.
  Add XXX comment about it.
  Reminded-by: joerg@

Revision 1.49: download - view: text, markup, annotated - select for diffs
Sun Nov 25 10:31:40 2007 UTC (6 years, 5 months ago) by sephe
Branches: MAIN
Diff to: previous 1.48: preferred, unified
Changes since revision 1.48: +11 -0 lines
- Cache PCI-X capability PTR.
- Add IVARs to read PCI Express and PCI-X capability PTR.
- Add convenient functions to test whether a device is PCI Express based
  or is PCI-X based.

Revision 1.48: download - view: text, markup, annotated - select for diffs
Sun Nov 25 04:08:42 2007 UTC (6 years, 5 months ago) by sephe
Branches: MAIN
Diff to: previous 1.47: preferred, unified
Changes since revision 1.47: +114 -0 lines
Cache following information for PCI Express capability:
- Capability PTR
- PCI Express Capabilities register
- Slot Capabilities register
Print them if 'bootverbose'.

Above information should be enough for identifying PCI Express hot-plug
support, e.g. ExpressCard

Revision 1.47: download - view: text, markup, annotated - select for diffs
Sun Nov 25 02:17:56 2007 UTC (6 years, 5 months ago) by sephe
Branches: MAIN
Diff to: previous 1.46: preferred, unified
Changes since revision 1.46: +32 -17 lines
Factor out a function to read power management capability

Revision 1.46: download - view: text, markup, annotated - select for diffs
Sat Nov 24 13:21:32 2007 UTC (6 years, 5 months ago) by sephe
Branches: MAIN
Diff to: previous 1.45: preferred, unified
Changes since revision 1.45: +3 -3 lines
Rename pci_read_extcap() to pci_read_capabilities() to avoid possible
confusion between PCI "capability" and PCI Express "extended capability".

Revision 1.45: download - view: text, markup, annotated - select for diffs
Sat Nov 24 13:04:16 2007 UTC (6 years, 5 months ago) by sephe
Branches: MAIN
Diff to: previous 1.44: preferred, unified
Changes since revision 1.44: +2 -2 lines
White space

Revision 1.44: download - view: text, markup, annotated - select for diffs
Sat Nov 24 06:47:37 2007 UTC (6 years, 5 months ago) by sephe
Branches: MAIN
Diff to: previous 1.43: preferred, unified
Changes since revision 1.43: +50 -36 lines
- Factor out pci_fixup_nextptr().
- The checking about whether 'data' register of power management capability
  exists or not is incorrect, according to PCI local bus spec:
    1) Next capability is not necessarily at a higher location than the
       current capability.
    2) Two capabilities are not necessarily consecutive.
  Set it to 0 for now (it is not used at all) and add comment about a possible
  way to test the existence of this register in power management capability.
- Clean up pci_read_extcap() a little bit.

Revision 1.43: download - view: text, markup, annotated - select for diffs
Sat Nov 24 03:42:24 2007 UTC (6 years, 5 months ago) by sephe
Branches: MAIN
Diff to: previous 1.42: preferred, unified
Changes since revision 1.42: +35 -9 lines
- Push PCI status "capability list bit" checking down into pci_read_extcap().
- Mask bottom two bits of "next pointer", add comment about it.
- If "next pointer" is not 0 and is less than 0x40 (standard PCI configuration
  space size), then it is illegal, bark out loudly and terminate the capability
  iteration.

Revision 1.42: download - view: text, markup, annotated - select for diffs
Fri Nov 23 14:36:17 2007 UTC (6 years, 5 months ago) by sephe
Branches: MAIN
Diff to: previous 1.41: preferred, unified
Changes since revision 1.41: +16 -12 lines
Create structure to group PCI power management configuration

Obtained-from: FreeBSD

Revision 1.41: download - view: text, markup, annotated - select for diffs
Fri Nov 23 13:40:58 2007 UTC (6 years, 5 months ago) by sephe
Branches: MAIN
Diff to: previous 1.40: preferred, unified
Changes since revision 1.40: +4 -3 lines
- Add CAP_PTR macro for type 2 devices (cardbus)
- Less magic values in pci_read_extcap()

Obtained-from: FreeBSD

Revision 1.40: download - view: text, markup, annotated - select for diffs
Thu Jul 5 12:08:53 2007 UTC (6 years, 9 months ago) by sephe
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_10_Slip, DragonFly_RELEASE_1_10
Diff to: previous 1.39: preferred, unified
Changes since revision 1.39: +1 -1 lines
Update cardbus/pccard support.

The original patch was done by joerg@; I seemed to "maintain"
it for quite a long time :P

Obtained-from: FreeBSD
Tested-by: many (intermittently tho)

Revision 1.39: download - view: text, markup, annotated - select for diffs
Sat Jun 2 18:48:40 2007 UTC (6 years, 10 months ago) by dillon
Branches: MAIN
Diff to: previous 1.38: preferred, unified
Changes since revision 1.38: +3 -1 lines
Bring in 1.343 from FreeBSD.  FreeBSD commit message:
"Add support for chipsets that has NULL'd BAR's for legacy ports.
This allows DMA to be used on a fine little geode system I got here and
most like on lots of older systems like that."

Obtained-from: FreeBSD / sos

Revision 1.38: download - view: text, markup, annotated - select for diffs
Fri May 4 17:25:04 2007 UTC (6 years, 11 months ago) by dillon
Branches: MAIN
Diff to: previous 1.37: preferred, unified
Changes since revision 1.37: +3 -5 lines
pci_get_resource_list() was returning an illegal pointer instead of NULL
in cases where no resource list is present.

Reported-by: Martin <dragonfly@wommm.nl>

Revision 1.37: download - view: text, markup, annotated - select for diffs
Sun Feb 11 01:51:28 2007 UTC (7 years, 2 months ago) by swildner
Branches: MAIN
Diff to: previous 1.36: preferred, unified
Changes since revision 1.36: +0 -1 lines
Remove ancient SimOS support.

Revision 1.36: download - view: text, markup, annotated - select for diffs
Fri Dec 22 23:12:17 2006 UTC (7 years, 4 months ago) by swildner
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_8_Slip, DragonFly_RELEASE_1_8
Diff to: previous 1.35: preferred, unified
Changes since revision 1.35: +27 -27 lines
Rename printf -> kprintf in sys/ and add some defines where necessary
(files which are used in userland, too).

Revision 1.35: download - view: text, markup, annotated - select for diffs
Wed Dec 20 23:29:17 2006 UTC (7 years, 4 months ago) by tgen
Branches: MAIN
Diff to: previous 1.34: preferred, unified
Changes since revision 1.34: +200 -5 lines
Add the PCI_MAP_FIXUP code as proposed two weeks ago. The code is only
enabled with options PCI_MAP_FIXUP in your kernel, and should only be used
when using nata.

Revision 1.34: download - view: text, markup, annotated - select for diffs
Wed Dec 20 18:14:37 2006 UTC (7 years, 4 months ago) by dillon
Branches: MAIN
Diff to: previous 1.33: preferred, unified
Changes since revision 1.33: +2 -2 lines
Rename sprintf  -> ksprintf
Rename snprintf -> knsprintf

Make allowances for source files that are compiled for both userland and
the kernel.

Revision 1.33: download - view: text, markup, annotated - select for diffs
Wed Oct 25 20:55:51 2006 UTC (7 years, 6 months ago) by dillon
Branches: MAIN
Diff to: previous 1.32: preferred, unified
Changes since revision 1.32: +0 -2 lines
Do a major clean-up of the BUSDMA architecture.  A large number of
essentially machine-independant drivers use the structures and definitions
in machine-dependant directories that are really machine-independant in
nature.

Split <machine/bus_dma.h> into machine-depdendant and machine-independant parts
and make the primary access run through <sys/bus_dma.h>.

Remove <machine/bus.h>, <machine/bus_memio.h> and <machine/bus_pio.h>.  The
optimizations related to bus_memio.h and bus_pio.h made a huge mess,
introduced machine-specific knowledge into essentially machine-independant
drivers, and required specific #include file orderings to do their job.
They may be reintroduced in some other form later on.

Move <machine/resource.h> to <sys/bus_resource.h>.  The contents of the file
is machine-independant or can be made a superset across many platforms.

Make <sys/bus.h> include <sys/bus_dma.h> and <sys/bus_resource.h> and
include <sys/bus.h> where necessary. Remove all #include's of
<machine/resource.h> and <machine/bus.h>.  That is, make the BUSDMA
infrastructure integral to I/O-mapped and memory-mapped accesses to devices
and remove a large chunk of machine-specific dependancies from drivers.
bus_if.h and device_if.h are now required to be present when using <sys/bus.h>.

Revision 1.32: download - view: text, markup, annotated - select for diffs
Tue Sep 5 00:55:36 2006 UTC (7 years, 7 months ago) by dillon
Branches: MAIN
Diff to: previous 1.31: preferred, unified
Changes since revision 1.31: +8 -8 lines
Rename malloc->kmalloc, free->kfree, and realloc->krealloc.  Pass 1

Revision 1.31: download - view: text, markup, annotated - select for diffs
Fri Aug 25 22:37:08 2006 UTC (7 years, 8 months ago) by swildner
Branches: MAIN
Diff to: previous 1.30: preferred, unified
Changes since revision 1.30: +0 -1 lines
Remove more DEC Alpha support.

Revision 1.30: download - view: text, markup, annotated - select for diffs
Fri Jul 28 02:17:34 2006 UTC (7 years, 8 months ago) by dillon
Branches: MAIN
Diff to: previous 1.29: preferred, unified
Changes since revision 1.29: +16 -29 lines
MASSIVE reorganization of the device operations vector.  Change cdevsw
to dev_ops.  dev_ops is a syslink-compatible operations vector structure
similar to the vop_ops structure used by vnodes.

Remove a huge number of instances where a thread pointer is still being
passed as an argument to various device ops and other related routines.
The device OPEN and IOCTL calls now take a ucred instead of a thread pointer,
and the CLOSE call no longer takes a thread pointer.

Revision 1.29: download - view: text, markup, annotated - select for diffs
Fri Nov 4 08:57:22 2005 UTC (8 years, 5 months ago) by dillon
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_6_Slip, DragonFly_RELEASE_1_6, DragonFly_RELEASE_1_4_Slip, DragonFly_RELEASE_1_4
Diff to: previous 1.28: preferred, unified
Changes since revision 1.28: +5 -4 lines
Allow 'options SMP' *WITHOUT* 'options APIC_IO'.  That is, an ability to
produce an SMP-capable kernel that uses the PIC/ICU instead of the IO APICs
for interrupt routing.

SMP boxes with broken BIOSes (namely my Shuttle XPC SN95G5) could very well
have serious interrupt routing problems when operating in IO APIC mode.
One solution is to not use the IO APICs.  That is, to run only the Local
APICs for the SMP management.

* Don't conditionalize NIDT.  Just set it to 256

* Make the ICU interrupt code MP SAFE.  This primarily means using the
  imen_spinlock to protect accesses to icu_imen.

* When running SMP without APIC_IO, set the LAPIC TPR to prevent unintentional
  interrupts.  Leave LINT0 enabled (normally with APIC_IO LINT0 is disabled
  when the IO APICs are activated).  LINT0 is the virtual wire between the
  8259 and LAPIC 0.

* Get rid of NRSVIDT.  Just use IDT_OFFSET instead.

* Clean up all the APIC_IO tests which should have been SMP tests, and all
  the SMP tests which should have been APIC_IO tests.  Explicitly #ifdef
  out all code related to the IO APICs when APIC_IO is not set.

Revision 1.28: download - view: text, markup, annotated - select for diffs
Sun Oct 30 04:41:10 2005 UTC (8 years, 5 months ago) by dillon
Branches: MAIN
Diff to: previous 1.27: preferred, unified
Changes since revision 1.27: +28 -3 lines
Add another parameter to BUS_ADD_CHILD to allow children to inherit
code from grandparents.

Formalize and document the IDENTIFY mechanism and actually use it properly
to add PCI busses rather then the severe hacks that existed before.

Instead of attaching PCI busses (pcib) directly to nexus, create a pass-through
bus layer under nexus called 'legacypci' and attach the PCI busses to that.
Use the new BUS_ADD_CHILD and IVARS recursion capability to still allow
the pcib's under legacypci to get nexus generated IVARS.

NOTE ON IVARS:  These can be utterly confusing because a BUS device may
manage and control the IVARS attached to its children.  In addition, if the
BUS method for the device accessing the IVARs does not properly match up
with or recurse to the device that actually created the ivars, mass
confusion can result.  I have attempted to document the issue but XXX it
needs some sanity check code.

Add a 'pcib_owner' global that is used to determine which of the several
possible PCI mainbus subsystems actually own the PCI mainbus.  This is not
yet tied into ACPI but will be soon.  No longer add legacy "pcib" busses
if it is detected that another subsystem controls the mainbus.  Before
the busses were added but then simply not scanned later on, creating
confusing pcibX designations.  Now the busses aren't added... legacypci
stops cold if it doesn't own the PCI mainbus.  Get rid of the twisted
checks for "pci" devices that used to handle this job.

Document many aspects of the PCI code and redo some of the APIs slightly
to make them more obvious.  In particular, document the odd fact that
pci_*() accessor function actually operate on a pci function code based
sub-device of the "pci" driver and call device_get_parent() to get to the
pci" driver layer.  This sub layer really needs its own formal designation.

Change "pciX" attachments to "pcibY" busses.  Use the secondary bus id
for 'X' and require it to be unique.  Also reorder "pcibY" attachments
so the physical bus number tends to (but is not guarenteed to be) the
same 'Y' in pcibY.

Change IVARS access for bridges.  Require that the device representing the
"pcib" device be passed to pcib_get/set_*() routines instead of children
of said device.

Add a function devclass_find_unit() to shortcut the more complex operation
of locating the devclass by name and then getting the device relative to
the devclass.

Add numerous bus_generic_*() BUS methods which now recurse through the
parent instead of terminate with an error.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Tue Jun 14 16:35:42 2005 UTC (8 years, 10 months ago) by joerg
Branches: MAIN
Diff to: previous 1.26: preferred, unified
Changes since revision 1.26: +2 -0 lines
Add missing breaks.

Revision 1.26: download - view: text, markup, annotated - select for diffs
Tue Jun 14 12:24:04 2005 UTC (8 years, 10 months ago) by joerg
Branches: MAIN
Diff to: previous 1.25: preferred, unified
Changes since revision 1.25: +30 -14 lines
Enable port and memory-mapped IO in the PCI layer when the associated
resources are allocated.

Obtained-from: FreeBSD

Revision 1.25: download - view: text, markup, annotated - select for diffs
Sat Apr 30 23:04:21 2005 UTC (8 years, 11 months ago) by swildner
Branches: MAIN
Diff to: previous 1.24: preferred, unified
Changes since revision 1.24: +0 -7 lines
Remove DEC Alpha support.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Wed Apr 20 10:51:24 2005 UTC (9 years ago) by joerg
Branches: MAIN
CVS tags: DragonFly_Stable
Diff to: previous 1.23: preferred, unified
Changes since revision 1.23: +2 -0 lines
Add support for ServerWorks chipsets.

Obtained-from: FreeBSD

Revision 1.23: download - view: text, markup, annotated - select for diffs
Fri Feb 4 02:52:15 2005 UTC (9 years, 2 months ago) by dillon
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_2_Slip, DragonFly_RELEASE_1_2
Diff to: previous 1.22: preferred, unified
Changes since revision 1.22: +72 -2 lines
Annotate the class byte with a class name in the bootverbose pci "found->"
bus logging code.  Numbers are fine, but when there are thousands of them
on the screen you need a bit of human readable context.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Fri Aug 13 08:27:02 2004 UTC (9 years, 8 months ago) by joerg
Branches: MAIN
CVS tags: DragonFly_Snap29Sep2004, DragonFly_Snap13Sep2004
Diff to: previous 1.21: preferred, unified
Changes since revision 1.21: +2 -1 lines
Add MODULE_VERSION(pci, 1), e.g. agp(4) can't be loaded as module otherwise.

Suggested-by: corecode

While at it, de-static pci_alloc_resource to match the prototyp. ACPI5
depends on it.

Revision 1.21: download - view: text, markup, annotated - select for diffs
Wed May 19 22:52:39 2004 UTC (9 years, 11 months ago) by dillon
Branches: MAIN
CVS tags: DragonFly_1_0_REL, DragonFly_1_0_RC1, DragonFly_1_0A_REL
Diff to: previous 1.20: preferred, unified
Changes since revision 1.20: +4 -6 lines
Device layer rollup commit.

* cdevsw_add() is now required.  cdevsw_add() and cdevsw_remove() may specify
  a mask/match indicating the range of supported minor numbers.  Multiple
  cdevsw_add()'s using the same major number, but distinctly different
  ranges, may be issued.  All devices that failed to call cdevsw_add() before
  now do.

* cdevsw_remove() now automatically marks all devices within its supported
  range as being destroyed.

* vnode->v_rdev is no longer resolved when the vnode is created.  Instead,
  only v_udev (a newly added field) is resolved.  v_rdev is resolved when
  the vnode is opened and cleared on the last close.

* A great deal of code was making rather dubious assumptions with regards
  to the validity of devices associated with vnodes, primarily due to
  the persistence of a device structure due to being indexed by (major, minor)
  instead of by (cdevsw, major, minor).  In particular, if you run a program
  which connects to a USB device and then you pull the USB device and plug
  it back in, the vnode subsystem will continue to believe that the device
  is open when, in fact, it isn't (because it was destroyed and recreated).

  In particular, note that all the VFS mount procedures now check devices
  via v_udev instead of v_rdev prior to calling VOP_OPEN(), since v_rdev
  is NULL prior to the first open.

* The disk layer's device interaction has been rewritten.  The disk layer
  (i.e. the slice and disklabel management layer) no longer overloads
  its data onto the device structure representing the underlying physical
  disk.  Instead, the disk layer uses the new cdevsw_add() functionality
  to register its own cdevsw using the underlying device's major number,
  and simply does NOT register the underlying device's cdevsw.  No
  confusion is created because the device hash is now based on
  (cdevsw,major,minor) rather then (major,minor).

  NOTE: This also means that underlying raw disk devices may use the entire
  device minor number instead of having to reserve the bits used by the disk
  layer, and also means that can we (theoretically) stack a fully
  disklabel-supported 'disk' on top of any block device.

* The new reference counting scheme prevents this by associating a device
  with a cdevsw and disconnecting the device from its cdevsw when the cdevsw
  is removed.  Additionally, all udev2dev() lookups run through the cdevsw
  mask/match and only successfully find devices still associated with an
  active cdevsw.

* Major work on MFS:  MFS no longer shortcuts vnode and device creation.  It
  now creates a real vnode and a real device and implements real open and
  close VOPs.  Additionally, due to the disk layer changes, MFS is no longer
  limited to 255 mounts.  The new limit is 16 million.  Since MFS creates a
  real device node, mount_mfs will now create a real /dev/mfs<PID> device
  that can be read from userland (e.g. so you can dump an MFS filesystem).

* BUF AND DEVICE STRATEGY changes.  The struct buf contains a b_dev field.
  In order to properly handle stacked devices we now require that the b_dev
  field be initialized before the device strategy routine is called.  This
  required some additional work in various VFS implementations.  To enforce
  this requirement, biodone() now sets b_dev to NODEV.  The new disk layer
  will adjust b_dev before forwarding a request to the actual physical
  device.

* A bug in the ISO CD boot sequence which resulted in a panic has been fixed.

Testing by: lots of people, but David Rhodus found the most aggregious bugs.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Thu May 13 23:49:13 2004 UTC (9 years, 11 months ago) by dillon
Branches: MAIN
Diff to: previous 1.19: preferred, unified
Changes since revision 1.19: +1 -1 lines
device switch 1/many: Remove d_autoq, add d_clone (where d_autoq was).

d_autoq was used to allow the device port dispatch to mix old-style synchronous
calls with new style messaging calls within a particular device.  It was never
used for that purpose.

d_clone will be more fully implemented as work continues.  We are going to
install d_port in the dev_t (struct specinfo) structure itself and d_clone
will be needed to allow devices to 'revector' the port on a minor-number
by minor-number basis, in particular allowing minor numbers to be directly
dispatched to distinct threads.  This is something we will be needing later
on.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Tue Feb 24 11:52:31 2004 UTC (10 years, 2 months ago) by joerg
Branches: MAIN
Diff to: previous 1.18: preferred, unified
Changes since revision 1.18: +5 -0 lines
Add missing make_dev

Revision 1.18: download - view: text, markup, annotated - select for diffs
Sat Feb 21 09:16:27 2004 UTC (10 years, 2 months ago) by dillon
Branches: MAIN
Diff to: previous 1.17: preferred, unified
Changes since revision 1.17: +8 -25 lines
Fix a bug in the last commit.  4.x improperly tries to add the children
of a PCI bus during the probe phase.  This doesn't mix well with 5.x's
bus code which adds the children in the attach phase.  Clean up
pci_probe().  The code, unfortunately, is still quite fragile.

Cleanup pci_read_device().

Bring in pcib_*() routines from 5.x into pcisupport.c.  Add support for
bridges which do not support particular PCI mapping types (from FreeBSD 5.x).

Fix a bug in the pcib_route_interrupt() method.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Sat Feb 21 06:37:05 2004 UTC (10 years, 2 months ago) by dillon
Branches: MAIN
Diff to: previous 1.16: preferred, unified
Changes since revision 1.16: +206 -41 lines
Synchronize a bunch of things from FreeBSD-5 in preparation for the new
ACPICA driver support.

* Bring in a lot of new bus and pci DEV_METHODs from FreeBSD-5
* split apic.h into apicreg.h and apicio.h
* rename INTR_TYPE_FAST -> INTR_FAST and move the #define
* rename INTR_TYPE_EXCL -> INTR_EXCL and move the #define
* rename some PCIR_ registers and add additional macros from FreeBSD-5
* note: new pcib bus call, host_pcib_get_busno() imported.
* kern/subr_power.c no longer optional.

Other changes:

* machine/smp.h machine smp/smptests.h can now be #included unconditionally,
  and some APIC_IO vs SMP separation has been done as well.
* gd_acpi_id and gd_apic_id added to machine/globaldata.h prep for new
  ACPI code.

Despite all the changes, the generated code should be virtually the same.
These were mostly additions which the pre-existing code does not (yet) use.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Mon Feb 16 18:51:01 2004 UTC (10 years, 2 months ago) by joerg
Branches: MAIN
Diff to: previous 1.15: preferred, unified
Changes since revision 1.15: +8 -0 lines
Add pci_get_ether and pci_set_ether for FreeBSD 5 compatibility

Revision 1.15: download - view: text, markup, annotated - select for diffs
Fri Feb 6 23:09:36 2004 UTC (10 years, 2 months ago) by joerg
Branches: MAIN
Diff to: previous 1.14: preferred, unified
Changes since revision 1.14: +9 -12 lines
Adjust infrastructure for NEWCARD

Revision 1.14: download - view: text, markup, annotated - select for diffs
Fri Jan 16 20:21:42 2004 UTC (10 years, 3 months ago) by joerg
Branches: MAIN
Diff to: previous 1.13: preferred, unified
Changes since revision 1.13: +1 -1 lines
Fix PCI deadlock on boot

Revision 1.13: download - view: text, markup, annotated - select for diffs
Fri Jan 16 13:07:18 2004 UTC (10 years, 3 months ago) by joerg
Branches: MAIN
Diff to: previous 1.12: preferred, unified
Changes since revision 1.12: +2 -2 lines
Fix compile errors introduced with last commit

Revision 1.12: download - view: text, markup, annotated - select for diffs
Thu Jan 15 21:18:18 2004 UTC (10 years, 3 months ago) by joerg
Branches: MAIN
Diff to: previous 1.11: preferred, unified
Changes since revision 1.11: +201 -187 lines
Replace pci_cfgread and pci_cfgwrite with PCIB_READ_CONFIG and
PCIB_WRITE_CONFIG.

Merged in FreeBSD rev 1.167, without 1.162 and 1.166.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Thu Jan 15 20:35:06 2004 UTC (10 years, 3 months ago) by joerg
Branches: MAIN
Diff to: previous 1.10: preferred, unified
Changes since revision 1.10: +0 -15 lines
Remove HOSE support which should be implemented in the bus function when
Alpha support is re-enabled.
Add BUS pcib ivar.
Add pcib interface functions.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Thu Jan 15 08:05:40 2004 UTC (10 years, 3 months ago) by joerg
Branches: MAIN
Diff to: previous 1.9: preferred, unified
Changes since revision 1.9: +3 -2 lines
Sync pci_cfgreg.c with FreeBSD 5, rev. 1.101. This makes the PCI interrupt
routing code more robust. Also copied pci_cfgreg.h into bus/pci/i386, the
other instance in machine/pci_cfgreg.h will go later.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Wed Jan 14 18:20:18 2004 UTC (10 years, 3 months ago) by joerg
Branches: MAIN
Diff to: previous 1.8: preferred, unified
Changes since revision 1.8: +1 -0 lines
Drop chip driver and merge the functionality into pci_probe_nomatch.
Adjust return value of pcib_probe to -1000 for conformance to other
default matches. Do some general cleanup.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Thu Jan 8 18:48:07 2004 UTC (10 years, 3 months ago) by asmodai
Branches: MAIN
Diff to: previous 1.7: preferred, unified
Changes since revision 1.7: +1 -1 lines
Spell 'weird' the way English expects it.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Wed Jan 7 18:13:19 2004 UTC (10 years, 3 months ago) by joerg
Branches: MAIN
Diff to: previous 1.6: preferred, unified
Changes since revision 1.6: +4 -102 lines
Move the FreeBSD 2.2 and 3.x PCI compatibility code into pci_compat.c and let it
depend on COMPAT_OLDPCI. Adjust LINT to accordingly.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Mon Nov 17 00:54:39 2003 UTC (10 years, 5 months ago) by asmodai
Branches: MAIN
Diff to: previous 1.5: preferred, unified
Changes since revision 1.5: +1 -1 lines
Factor out the object system from new-bus so that it can be used by
non-device code.

Re-implement the method dispatch to improve efficiency. The new system
takes about 40ns for a method dispatch on a 300Mhz PII which is only 10ns
slower than a direct function call on the same hardware.

This is all based on Doug Rabson's work in April and May of 2000.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Thu Aug 7 21:16:47 2003 UTC (10 years, 8 months ago) by dillon
Branches: MAIN
Diff to: previous 1.4: preferred, unified
Changes since revision 1.4: +2 -2 lines
kernel tree reorganization stage 1: Major cvs repository work (not logged as
commits) plus a major reworking of the #include's to accomodate the
relocations.

    * CVS repository files manually moved.  Old directories left intact
      and empty (temporary).

    * Reorganize all filesystems into vfs/, most devices into dev/,
      sub-divide devices by function.

    * Begin to move device-specific architecture files to the device
      subdirs rather then throwing them all into, e.g. i386/include

    * Reorganize files related to system busses, placing the related code
      in a new bus/ directory.  Also move cam to bus/cam though this may
      not have been the best idea in retrospect.

    * Reorganize emulation code and place it in a new emulation/ directory.

    * Remove the -I- compiler option in order to allow #include file
      localization, rename all config generated X.h files to use_X.h to
      clean up the conflicts.

    * Remove /usr/src/include (or /usr/include) dependancies during the
      kernel build, beyond what is normally needed to compile helper
      programs.

    * Make config create 'machine' softlinks for architecture specific
      directories outside of the standard <arch>/include.

    * Bump the config rev.

    WARNING! after this commit /usr/include and /usr/src/sys/compile/*
    should be regenerated from scratch.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Mon Jul 21 05:50:46 2003 UTC (10 years, 9 months ago) by dillon
Branches: MAIN
Diff to: previous 1.3: preferred, unified
Changes since revision 1.3: +8 -6 lines
DEV messaging stage 1/4: Rearrange struct cdevsw and add a message port
and auto-queueing mask.  The mask will tell us which message functions
can be safely queued to another thread and which still need to run in the
context of the caller.   Primary configuration fields (name, cmaj, flags,
port, autoq mask) are now at the head of the structure.  Function vectors,
which may eventually go away, are at the end.  The port and autoq fields
are non-functional in this stage.

The old BDEV device major number support has also been removed from cdevsw,
and code has been added to translate the bootdev passed from the boot code
(the boot code has always passed the now defunct block device major numbers
and we obviously need to keep that compatibility intact).

Revision 1.3: download - view: text, markup, annotated - select for diffs
Mon Jun 23 17:55:49 2003 UTC (10 years, 10 months ago) by dillon
Branches: MAIN
CVS tags: PRE_MP
Diff to: previous 1.2: preferred, unified
Changes since revision 1.2: +4 -4 lines
proc->thread stage 2: MAJOR revamping of system calls, ucred, jail API,
and some work on the low level device interface (proc arg -> thread arg).
As -current did, I have removed p_cred and incorporated its functions
into p_ucred.  p_prison has also been moved into p_ucred and adjusted
accordingly.  The jail interface tests now uses ucreds rather then processes.

The syscall(p,uap) interface has been changed to just (uap).  This is inclusive
of the emulation code.  It makes little sense to pass a proc pointer around
which confuses the MP readability of the code, because most system call code
will only work with the current process anyway.  Note that eventually
*ALL* syscall emulation code will be moved to a kernel-protected userland
layer because it really makes no sense whatsoever to implement these
emulations in the kernel.

suser() now takes no arguments and only operates with the current process.
The process argument has been removed from suser_xxx() so it now just takes
a ucred and flags.

The sysctl interface was adjusted somewhat.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Tue Jun 17 04:28:57 2003 UTC (10 years, 10 months ago) by dillon
Branches: MAIN
Diff to: previous 1.1: preferred, unified
Changes since revision 1.1: +1 -0 lines
Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids.  Most
ids have been removed from !lint sections and moved into comment sections.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Tue Jun 17 02:55:47 2003 UTC (10 years, 10 months ago) by dillon
Branches: MAIN
CVS tags: FREEBSD_4_FORK
import from FreeBSD RELENG_4 1.141.2.15

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options