Commit Graph

9019 Commits

Author SHA1 Message Date
Poul-Henning Kamp
c441cdb88a Add machdep.elan_freq sysctl which can be used to set the CPU clock
frequency in Hz.  The default is still 33.333 MHz.  Please notice
that the number is round to a multiple of four internally so it may
not read back exactly the same as written.

Add compile time ELAN_XTAL option to override the 33.333 MHz default.

Add compile time ELAN_PPS option to enable code for high precision
(250 nanoseconds) timestamping of external signals.
2003-01-15 20:15:33 +00:00
Matthew N. Dodd
e2fdcaf285 - Add inline functions for {ll,l,}abs() to libkern.
- Remove hand rolled abs() functions.
2003-01-15 02:02:33 +00:00
Matthew Dillon
48e3128b34 Bow to the whining masses and change a union back into void *. Retain
removal of unnecessary casts and throw in some minor cleanups to see if
anyone complains, just for the hell of it.
2003-01-13 00:33:17 +00:00
Matthew Dillon
cd72f2180b Change struct file f_data to un_data, a union of the correct struct
pointer types, and remove a huge number of casts from code using it.

Change struct xfile xf_data to xun_data (ABI is still compatible).

If we need to add a #define for f_data and xf_data we can, but I don't
think it will be necessary.  There are no operational changes in this
commit.
2003-01-12 01:37:13 +00:00
John Baldwin
0d238da886 Remove earlysetcpuclass() as it has been OBE.
Suggested by:	bde
2003-01-09 19:59:28 +00:00
John Baldwin
f85b149dae Rework part of the previous processor name changes so that we read
cpu_exthigh and cpu_brand in printcpuinfo() instead of in identify_cpu().
We also only do it for known-good values of cpu_vendor which is a bit more
conservative.

Reviewed by:	bde (mostly)
2003-01-09 19:54:49 +00:00
John Baldwin
338633abf8 Consistently use spaces in between arguments to strcmp(). Whitespace
only.
2003-01-08 19:16:11 +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
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
John Baldwin
bb69b35d8d Document bit 31 of the cpuid features word as PBE (Pending Break Enable). 2003-01-03 18:54:59 +00:00
Jens Schweikhardt
9d5abbddbf Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,
especially in troff files.
2003-01-01 18:49:04 +00:00
Nate Lawson
d9ce8f5c47 Return an error when r/w is requested on an unsupported device instead of
looping.

Submitted by:	Sean Kelly <smkelly@zombie.org>
Pointed out by:	bde
2002-12-31 21:44:38 +00:00
Jens Schweikhardt
d64ada501a Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/
Add FreeBSD Id tag where missing.
2002-12-30 21:18:15 +00:00
David E. O'Brien
525d98afd8 Change the ident so people know a kernel built with this has SMP support. 2002-12-30 11:36:17 +00:00
David E. O'Brien
5fb4613b6b Sync with GENERIC rev 1.371. 2002-12-30 11:34:45 +00:00
David E. O'Brien
83d06d0529 Using our new wonderful include directive, save our x86 SMP users from
having to edit GENERIC to build a useful kernel.  This also opens the
possibility of including an SMP kernel in the release.
2002-12-30 11:31:58 +00:00
Scott Long
b4b9c52ca4 Add the if_bge driver. I can't find any reason why it's not here, and it's
pretty common on Dell servers and other high-end boxes.
2002-12-28 06:22:17 +00:00
Julian Elischer
93a7aa79d6 Add code to ddb to allow backtracing an arbitrary thread.
(show thread {address})

Remove the IDLE kse state and replace it with a change in
the way threads sahre KSEs. Every KSE now has a thread, which is
considered its "owner" however a KSE may also be lent to other
threads in the same group to allow completion of in-kernel work.
n this case the owner remains the same and the KSE will revert to the
owner when the other work has been completed.

All creations of upcalls etc. is now done from
kse_reassign() which in turn is called from mi_switch or
thread_exit(). This means that special code can be removed from
msleep() and cv_wait().

kse_release() does not leave a KSE with no thread any more but
converts the existing thread into teh KSE's owner, and sets it up
for doing an upcall. It is just inhibitted from being scheduled until
there is some reason to do an upcall.

Remove all trace of the kse_idle queue since it is no-longer needed.
"Idle" KSEs are now on the loanable queue.
2002-12-28 01:23:07 +00:00
Alan Cox
84cdcd85a0 Assert that the page queues lock is held in pmap_testbit(). 2002-12-28 00:19:40 +00:00
David Xu
4b2d2f604c Set %bx register instead of %di register, see vbe3.0, page 45. 2002-12-26 13:20:58 +00:00
Alan Cox
11a2911cec - Hold the page queues lock around calls to vm_page_wakeup() and
vm_page_flag_clear().
2002-12-24 07:32:38 +00:00
Poul-Henning Kamp
152e80d952 Outdent the string rather than use concatenation. 2002-12-23 22:12:17 +00:00
Tim J. Robbins
b30a7779d4 MB_LEN_MAX is not MD, move it to the MI limits.h. 2002-12-22 06:38:45 +00:00
Marcel Moolenaar
91c71b46ed Export the physical address of the RSDP to userland by means
of the `machdep.acpi_root' sysctl. This is required on ia64
because the root pointer hardly ever, if at all, lives in the
first MB of memory and also because scanning the first MB of
memory can cause machine checks.
This provides a save and reliable way for ACPI tools to work
with the tables if ACPI support is present in the kernel. On
ia64 ACPI is non-optional.
2002-12-18 08:47:07 +00:00
Nate Lawson
e38cfb14fe Back out 1.19 to rethink approach
Requested by:	julian@
2002-12-17 05:55:36 +00:00
Nate Lawson
1df5f8294f Automatically issue a "continue" along with the "detach" command. This
fixes the problem of cleanly restarting a target after entering gdb mode.

Reviewed by:	archie@
2002-12-17 01:32:11 +00:00
Julian Elischer
4706b50a40 Reformat last change
Requested by: nate@
2002-12-16 23:25:12 +00:00
Julian Elischer
6b8fc51d28 Don't dump core into a partition that is too small for it.
If we do, we usually wrote backwareds into the proceeding partititon
which is usually the root partition.
2002-12-16 23:04:54 +00:00
Olivier Houchard
47770b6fd5 Add the trm(4) driver.
MFC after:	1 day
2002-12-16 18:47:37 +00:00
Poul-Henning Kamp
a0b3173215 Only dump the BIOS geometry table from bootinfo on PC98, we don't use
the contents on i386 anymore.
2002-12-14 16:11:28 +00:00
Alan Cox
0ced3981d1 Add page locking to pmap_mincore().
Submitted (in part) by:	tjr@
2002-12-14 07:06:27 +00:00
Alfred Perlstein
d1e405c5ce SCARGS removal take II. 2002-12-14 01:56:26 +00:00
Alfred Perlstein
bc9e75d7ca Backout removal SCARGS, the code freeze is only "selectively" over. 2002-12-13 22:41:47 +00:00
Alfred Perlstein
0bbe7292e1 Remove SCARGS.
Reviewed by: md5
2002-12-13 22:27:25 +00:00
Julian Elischer
696058c3c5 Unbreak the KSE code. Keep track of zobie threads using the Per-CPU storage
during the context switch. Rearrange thread cleanups
to avoid problems with Giant. Clean threads when freed or
when recycled.

Approved by:	re (jhb)
2002-12-10 02:33:45 +00:00
John Baldwin
55d7b94047 Add "disabled" hints to all of the uncommon ISA devices that are in
GENERIC.  Each device can be re-enabled at startup time by unsetting the
disabled hint in the loader.

Requested by:	mdodd
Approved by:	re
Prodded by:	rwatson
2002-12-05 22:49:47 +00:00
Alan Cox
a597332c22 Hold the page queues lock around calls to pmap_remove().
Approved by:	re
2002-12-04 18:40:39 +00:00
Poul-Henning Kamp
92a306a2b6 Use the correct value when writing the Day Of Week byte in the CMOS.
The correct range is [1...7] with Sunday=1, but we have been writing
[0...6] with Sunday=0.

The Soekris computers flagged the zero, zapped the date, so if you
rebooted your soekris on a sunday, it would come up with a wrong
date.

Bruce has a more extensive rework of this code, but we will stick with
the minimalist fix for now.

Spotted by:	Soren Kristensen <soren@soekris.com>
Thanks to:	Michael Sierchio <kudzu@tenebras.com>.
Confirmed by:	bde
Approved by:	re
2002-12-04 13:46:49 +00:00
Alan Cox
f4dcf9555e Avoid recursive acquisition of the page queues lock in pmap_unuse_pt().
Approved by:	re
2002-12-03 04:00:42 +00:00
Daniel Eischen
a3dca4517e Align the FPU state in the ucontext and sigcontext to 16 bytes
to accomodate the new SSE/XMM floating point save/restore
instructions.

This commit is mostly from bde and includes some style nits.

Approved by:	re (jhb)
2002-12-02 19:58:55 +00:00
Alan Cox
d79ebb6026 Hold the page queues lock when calling pmap_unwire_pte_hold() or
pmap_remove_pte().  Use vm_page_sleep_if_busy() in
_pmap_unwire_pte_hold() so that the page queues lock is released
when sleeping.

Approved by:	re (blanket)
2002-12-02 04:54:21 +00:00
Alan Cox
e6c90801b3 Assert that the page queues lock is held in pmap_changebit()
and pmap_ts_referenced().

Approved by:	re (blanket)
2002-12-01 00:08:14 +00:00
Alan Cox
0d51d232e5 Assert that the page queues lock is held in pmap_page_exists_quick().
Approved by:	re (blanket)
2002-11-30 17:46:59 +00:00
David E. O'Brien
6380ce4de1 Fix for non-GCC compilers.
Approved by:	re (jhb)
2002-11-27 16:28:18 +00:00
Alan Cox
ffb309581f Assert that the page queues lock is held in pmap_remove_pages().
Approved by:	re (blanket)
2002-11-25 04:45:03 +00:00