Commit Graph

37130 Commits

Author SHA1 Message Date
Søren Schmidt
fb02f8eeb8 Dont attach a Promise chip located behind a i960 bridge/chip.
This makes it possible to run a Promise SuperTrak SX6000 with
OS type set to "Other" as well as "Linux".
2003-01-08 17:44:36 +00:00
Søren Schmidt
4b4f97ae4c Add support for the nVidia nForce2 ATA part.
Fix support for the nForce1 as well, registers are offset 0x10
against the AMD/VIA parts.
2003-01-08 16:51:41 +00:00
John Baldwin
5b1e7cb257 - Use cpu_exthigh instead of executing cpuid again to retrieve it for the
print_AMD_foo() functions.
- Add a brand name table for the brand index provided on Intel CPU's in
  %ebx after cpuid 1.
- For Intel CPUs, if we don't get a processor name from the extended cpuid
  then use the brand index in cpuid_cpuinfo to pick a name from the brand
  table and copy that name into cpu_brand.
- Replace the duplicated code to use the extended cpuid to replace
  cpu_model with the processor name in the AMD and Transmeta sections of
  printcpuinfo() with generic code that replaces cpu_model with
  cpu_brand if cpu_brand is not an empty string.  We also trim leading
  spaces from cpu_brand prior to doing this since at least some processor
  names (notably those of Intel CPUs) have leading spaces in the name.
- Give print_AMD_features() its own private regs[] array since
  printcpuinfo() doesn't use the one it has anymore.
2003-01-08 16:41:48 +00:00
John Baldwin
26aa6d02bf - Add a cpu_exthigh variable to hold the highest extended cpuid value
returned from cpuid 0x80000000.
- Add a cpu_brand char array to hold the processor name returned by
  cpuid 0x80000002-0x80000004 on AMD, Intel, Transmeta, and possibly
  other CPUs.
- Use cpuid to set cpu_exthigh and read the processor name if it is present
  in identify_cpu().
2003-01-08 16:35:59 +00:00
John Baldwin
b33c8e3ded Bah, get the test for more than one logical CPU right so we don't bogusly
claim a CPU has HT support when it lists 0 or 1 logical CPU's per physical
processor.
2003-01-08 16:33:03 +00:00
Peter Grehan
7d13e76928 Add page queues locking to vunmapbuf().
Obtained from: sparc64
Approved by:  benno
2003-01-08 12:29:59 +00:00
Peter Grehan
d2e30522fe Sync the i-cache after copying down the interrupt code
Approved by:  benno
2003-01-08 12:27:47 +00:00
Peter Grehan
9e283cf9a2 Be more conservative about re-enabling interrupts during trap processing
until atomic issues are fully sorted.

Approved by:  benno
2003-01-08 12:20:46 +00:00
Peter Grehan
b744fccd8a Fix incorrect error returns and sign-extension.
Approved by:  benno
2003-01-08 12:19:37 +00:00
Peter Grehan
18ca618548 Fetch the initial time from the rtc OpenFirmware node. This is a short-term
measure until the rtc h/w driver is written, and it's a lot better
than having "jan 1 1970" on filesys times.

Approved by:  benno
2003-01-08 12:17:44 +00:00
Peter Grehan
6dacd14d2a Remove obsolete NFS_ROOT conditional.
Approved by:  benno
2003-01-08 12:15:54 +00:00
Peter Grehan
dedc660361 Implement bus_dmamap_load_mbuf/bus_dmamap_load_uio.
Tested load_mbuf with GEM ethernet driver.

Submitted by: Hiten Pandya <hiten@unixdaemons.com> (modified by grehan)
2003-01-08 11:46:53 +00:00
Peter Grehan
a5550be852 - define HAS_STREAM_METHODS correctly
- dmamap_load_mbuf/load_uio prototypes

Submitted partly by:  Hiten Pandya <hiten@unixdaemons.com>
2003-01-08 11:43:36 +00:00
Søren Schmidt
837832bc18 Add code that works around the problem that the older Promise
controllers (ultra/fasttrak-66/100) fails on 48bit accesses.
2003-01-08 10:03:31 +00:00
Scott Long
adb0a47475 Destroy the management device when detaching the driver. 2003-01-08 06:30:34 +00:00
Matthew N. Dodd
dd815daba5 - Add acpi module binding.
- Restore speed and format settings on resume for CS423x and
  CS423x-PCI devices.
2003-01-08 06:24:25 +00:00
David Xu
ce5c58974a Retry to get full device descriptor, this let my slow CD Tower device work. 2003-01-08 05:03:35 +00:00
David Xu
b47679ccff Some KSE syscalls are MPSAFE. 2003-01-08 04:57:53 +00:00
Jake Burkholder
a6517875d0 Use bus_space_subregion to add offsets to bus handles instead of doing
it manually.
2003-01-08 04:30:30 +00:00
Jake Burkholder
88a8ca8569 Implement bus_space_subregion. 2003-01-08 04:29:00 +00:00
John Baldwin
f4b4a64293 Enumerate logical hyperthread CPUs manually if they aren't already listed
in the mptable.  The way this works is that we determine if the system
has hyperthreading and how many logical CPU's should be in each physical
CPU by using the information returned by cpuid.  During the first pass of
the mptable, we build a bitmask of the APIC IDs of the CPUs listed in the
mptable.  We then scan that bitmask to see if the CPUs are already listed
by the mptable, or if there are any APIC IDs already in use that would
conflict with the APIC IDs of the logical CPUs.  If that test succeeds,
then we fixup the count of application processors.  Later on during the
second pass of the mptable we create fake processor entries for logical
CPUs and add them to the system.

We only need this type of fixup hack when using the mptable to enumerate
CPUs.  The ACPI MADT table properly enumerates all logical CPUs.
2003-01-08 01:33:18 +00:00
John Baldwin
5460753d55 If the boot processor supports hyperthreading and contains more than one
logical CPU, display the number of logical CPUs per physical processor
underneath the list of CPU features.
2003-01-08 01:23:16 +00:00
John Baldwin
fa896b7280 Add a cpuid_cpuinfo variable to hold the results of %ebx from cpuid with
%eax of 1 and set it in identify_cpu().
2003-01-08 01:20:05 +00:00
John Baldwin
72a1e0e226 - Fix the name of the hyperthreading cpuid feature flag to be HTT instead
of HHT.
- Document fields returned in %ebx by a cpuid with %eax of 1.
2003-01-08 01:15:26 +00:00
Peter Wemm
2488f30980 Move the MOD_SHUTDOWN event from shutdown_post_sync to shutdown_final,
so that entities that want to use the post_sync hook to write stuff
to devices and other tidy-up can do so before the device tree is
shot down.  eg: da doing a SYNC_CACHE etc.  This should get crashdumps
working on mpt devices again, and stops the ia64 boxes locking up
on regular shutdown when da tries to issue the scsi commands to mpt.

Obtained from:  njl, gibbs
2003-01-07 22:24:13 +00:00
Brian Feldman
c579babe54 In vn_open(), unset ndp->ni_vp when returning failure so that code
which expects it to be NULL unless the return value was 0 will work.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-01-07 20:59:55 +00:00
Alfred Perlstein
a11acc6f8a Use copyout to access user memory.
Submittted by: pho
MFC After: 2 days
2003-01-07 20:10:04 +00:00
Alan Cox
1f17965656 Make bogus_offset local to bufinit(). 2003-01-07 19:55:08 +00:00
Prafulla Deuskar
bddfcc8792 The README refers to a LICENSE file, so add that file too.
BTW the license is also embedded in the source files.

MFC after:	1 day
2003-01-07 19:36:00 +00:00
Poul-Henning Kamp
c49bddce94 Fix warnings & errors caused by my last commit. 2003-01-07 19:09:10 +00:00
Kirk McKusick
fa06a012cd This patch fixes a problem caused by applications that rapidly and
repeatedly truncate the same file. Each time the file is truncated,
a buffer is grabbed to store the indirect block numbers that need
to be freed. Those blocks cannot be freed until the inode claiming
them is written to disk. Thus, the number of buffers being held by
soft updates explodes and in extreme cases can run the kernel out
of buffers. The problem can be avoided by doing an fsync on the
file every debug.maxindirdep truncates (currently defaulted to 50).
The fsync causes the inode to be written so that the held buffers
can be freed. The check for excessive buffers is checked as part
of the existing hook for excessive dependencies (softdep_slowdown)
in the truncate code.

Reported by:	David Schultz <dschultz@uclink.Berkeley.EDU>
Sponsored by:   DARPA & NAI Labs.
MFC after:	3 weeks
2003-01-07 18:23:50 +00:00
John Baldwin
377a66bc40 Cast the integer read as the first argument for %b to an unsigned integer
so it's value is not sign extended when assigned to the uintmax_t variable
used internally by printf.  For example, if bit 31 is set in the cpuid
feature word, then %b would print out the initial value as a 16 character
hexadecimal value.  Now it only prints out an 8 character value.

Reviewed by:	bde
2003-01-07 18:17:18 +00:00
Hidetoshi Shimokawa
9a7d0adfaa - Fix print format for FreeBSD-4
- Reduce debug message.
2003-01-07 12:58:08 +00:00
David Xu
45f603e21c Clear some KSE fields after kse mode was turned off. 2003-01-07 06:56:43 +00:00
David Xu
b81c4d1e8c Forgot to call setrunnable() for un-idled thread. 2003-01-07 06:04:33 +00:00
David Xu
ea5ab16eba Check signals for idled threads. 2003-01-07 05:56:38 +00:00
Warner Losh
d90656e720 We've had something like this file since 1992, so therefore this file
is a derivitive work, so the copyright notice in the file should say
1992-2003.
2003-01-07 04:37:40 +00:00
Hidetoshi Shimokawa
64666ed6e7 Don't call fw_bus_probe() twice when successive self-id packets received.
This change should stabilize SBP-II device probing.
2003-01-07 04:26:45 +00:00
John Polstra
029e2ee3ee Put the ASIC revision into the device description string so it appears
in the dmesg output.

MFC after:	3 days
2003-01-07 01:33:03 +00:00
Maxime Henrion
d21682e5d3 o Only try to recopy the mbuf into an mbuf cluster if
bus_dmamap_load_mbuf() returned EFBIG.
o Fix mbuf leaks in an error (rare) code path.
o Reuse the TX descriptor if xl_encap() failed instead of
  just picking the next one.
o Better error messages.
2003-01-07 01:01:20 +00:00
John Polstra
671116122b Don't reference the maxlen and flags fields in the ring control blocks
as separate 16-bit entities.  Some of the ring control blocks are
in NIC memory, so they must be referenced using 32-bit accesses.
Smaller accesses have been observed to fail under some conditions.
This caused the rings to be set up wrong, leading to writes by the
card outside of the intended bounds of the rings.  This problem was
diagnosed by Michael Barthelow.  Don Bowman submitted a patch which
fixed the problem using a slightly different approach.

Reference ring control blocks in NIC memory using a pointer to
volatile.

Parenthesize the BGE_HOSTADDR macro definition properly.

MFC after:	3 days
2003-01-06 23:46:47 +00:00
Thomas Moestl
195530b9dd Convert to use bus_dmamap_load_mbuf(); decouple software TX descriptors
from the hardware descriptors to avoid the overhead of having a DMA
map for each of them. Bump the number of hardware descriptors to 128,
and use half as many software descriptors for now.
Some minor cleanups.
2003-01-06 22:12:57 +00:00
Thomas Moestl
305f2c0632 - Convert to use bus_dmamap_load_mbuf().
- remove DPRINTF(), there is a CTR*() for any of them, and KTR is
  far more useful to debug this driver.
- some cleanups; remove some unused code and definitions.
2003-01-06 22:09:01 +00:00
Thomas Moestl
fe461235a2 Change the iommu code to be able to handle more than one DVMA area per
map. Use this new feature to implement iommu_dvmamap_load_mbuf() and
iommu_dvmamap_load_uio() functions in terms of a new helper function,
iommu_dvmamap_load_buffer(). Reimplement the iommu_dvmamap_load()
to use it, too.
This requires some changes to the map format; in addition to that,
remove unused or redundant members.
Add SBus and Psycho wrappers for the new functions, and make them
available through the respective DMA tags.
2003-01-06 21:59:54 +00:00
Sam Leffler
53d96a08a4 don't reference a pkthdr after M_MOVE_PKTHDR has "remove it"; instead
reference the pkthdr now in the destination of the move

Sponsored by:	Vernier Networks
2003-01-06 21:33:54 +00:00
Sam Leffler
0e7dea8326 purge extraneous clears of M_PKTHDR since M_MOVE_PKTHDR does this already 2003-01-06 21:29:27 +00:00
Sam Leffler
45a0c8fe56 fix memory allocation problems and collateral damage:
o create a separate tag for each object allocated with bus_dmamem_alloc so
  the tag's maxsize is setup appropriately; this reduces memory allocation
  for the queue descriptors from 16M to what it should be and also fixes
  memory allocation for public key operands
o release bus dma resources on detach so module usage doesn't leak
o remove public key op disable now that bus dma memory allocation is fixed
o collect attach error handling in one place

Sponsored by:	Vernier Networks
2003-01-06 21:23:06 +00:00
Thomas Moestl
702f83a807 - remove the unused parent DMA tag argument from
_nexus_dmamap_load_buffer()
- implement nexus_dmamap_load() in terms of _nexus_dmamap_load_buffer().
  Note that this is untested, as this code is not currently used (but
  might be later for UPA devices).
- move BUS_DMAMAP_NSEGS to bus_private.h
- disable the ecache flushing in nexus_dmamap_sync(); it should not be
  needed, although the docs are not entirely clear on that.
2003-01-06 20:54:07 +00:00
Poul-Henning Kamp
51a5c572a6 BSD disklabels expose the controling label though the 'c' partition, and
some trick is necessary to prevent further BSD geoms from attaching to
that.  Our old trick was to make sure we don't attach to a geom from
the "BSD" class, but this doesn't work if an intermediary geom obscures
this fact.  Instead, calculate the MD5 checksum of the label we target
and ask if anybody below us loves that label.  If they do we don't.

Coded by:       gordon.
2003-01-06 20:10:41 +00:00
Poul-Henning Kamp
72384683ad In userland case include <errno.h>, not <err.h>. This is needed to make
the src/tools/regression/geom stuff compile.
2003-01-06 20:05:45 +00:00