Commit Graph

120866 Commits

Author SHA1 Message Date
David Xu
8429e73473 Hide umtx API symbols as well. 2005-12-21 03:53:29 +00:00
David Xu
cf905a1575 1. Retire macro SCLASS, instead simply use language keyword and
put variables in thr_init.c.
2. Hide all global symbols which won't be exported.
2005-12-21 03:14:06 +00:00
Sam Leffler
52b321acb3 add LINT build
Discussed with:	grehan
MFC after:	1 week
2005-12-21 02:51:41 +00:00
David Xu
7a65760923 Follow the mistake in libpthread, the first version name in libpthread
is LIBTHREAD_1_0, but really it should be LIBPTHREAD_1_0.
Fix it so libmap.conf works again (it was broken by recent versioning
code in rtld_elf).
2005-12-21 02:34:20 +00:00
Xin LI
6f229bd3ae Use size_t for length. 2005-12-21 02:25:59 +00:00
Maxim Sobolev
e4f5866fd5 For the cases when loading bzip2-compressed kernels enabled use last
3MB of physical memory for heap instead of range between 1MB and 4MB.
This makes this feature working with PAE and amd64 kernels, which are
loaded at 2MB. Teach i386_copyin() to avoid using range allocated by
heap in such case, so that it won't trash heap in the low memory
conditions.

This should make loading bzip2-compressed kernels/modules/mfs images
generally useable, so that re@ team is welcome to evaluate merits
of using this feature in the installation CDs.

Valuable suggestions by:	jhb
2005-12-21 02:17:58 +00:00
Doug Barton
d6209fadb2 REQUIRE: syslogd and BEFORE: NETWORKING are now antithetical,
and including both in this file had nasty side effects on the
ordering of syslogd, as well as producing an error when running
rcorder. Remove the more bogus of the two options, which restores
proper ordering and removes the error.

There is an open question as to whether scripts with the nostart
KEYWORD should even have REQUIRE/BEFORE lines, and indeed, whether
they should be in /etc/rc.d at all, but that's for another time.
2005-12-21 01:19:20 +00:00
Sam Leffler
af72fe981b don't assume char is signed
MFC after:	1 week
2005-12-21 00:19:08 +00:00
Sam Leffler
1528156d71 bandaid assumption that char is signed
MFC after:	1 week
2005-12-21 00:09:11 +00:00
Alan Cox
ff6f03c7cd Eliminate an unneeded (vm_prot_t) parameter from two functions. Eliminate
unnecessary uses of a local variable.

Reviewed by: tegge
2005-12-20 23:42:18 +00:00
Doug Barton
2092fca981 Include a somewhat hackish way to make sure that we *always* test the
new clear_tmp_X variable when start'ing.
2005-12-20 23:22:47 +00:00
Pav Lucistnik
612477f7ac - Fix type in previous commit; unbreak build
Approved by:	ssouhlal
Pointy hat to:	pav
2005-12-20 23:07:38 +00:00
Warner Losh
b7b34cdbb4 Mention PC Card support for the cs device 2005-12-20 23:05:50 +00:00
Warner Losh
b0493a9984 Move device 'cs' into i386/pc98 specific NOTES. It is broken on ppc
because it uses i386 specific calls.  Maybe it could be added to
amd64, but I'm not so sure it would work there so I've not added it
there.
2005-12-20 23:00:11 +00:00
John Baldwin
33181681c7 - Use PCIR_BAR() macro for the BAR for the aperture.
- Axe macros used for walking PCI capabilities list.  We now ask the PCI
  bus to find caps for us rather than doing it in the drm and agp drivers.
2005-12-20 22:45:24 +00:00
John Baldwin
e9aa66d283 - Bump FreeBSD version for the hostb(4) and vgapci(4) drivers as well as
the addition of pci_find_extcap().
- Change the drm drivers to attach to vgapci.  This is #ifdef'd so the
  code can be shared across branches.
- Use pci_find_extcap() to look for AGP and PCIE capabilities in drm.
- GC all the drmsub stuff for i810/i830/i915.  The agp and drm devices are
  now both children of vgapci.
2005-12-20 22:44:36 +00:00
John Baldwin
a1ee13ef19 Attach to the vgapci device rather than pci. 2005-12-20 22:42:16 +00:00
John Baldwin
8e8e46ccfc Add a vgapci(4) stub device driver for VGA PCI devices. This device serves
as a bus so that other drivers such as drm(4), acpi_video(4), and agp(4)
can attach to it thus allowing multiple drivers for the same device.  It
also removes the need for the drmsub hack for the i8[13]0/i915 drm and agp
drivers.
2005-12-20 22:41:33 +00:00
John Baldwin
2aacedb237 Add a vgapci(4) stub device driver for VGA PCI devices. This device serves
as a bus so that other drivers such as drm(4), acpi_video(4), and agp(4)
can attach to it thus allowing multiple drivers for the same device.  It
also removes the need for the drmsub hack for the i8[13]0/i915 drm and agp
drivers.
2005-12-20 22:35:39 +00:00
Paul Saab
efbbe8fa79 Remove GIANT from device random.
Submitted by:	ups
2005-12-20 21:41:52 +00:00
Christian Brueffer
13ae4dad3a First step in bringing this page up to speed:
Update list of supported bridges and controllers, use markup similar to
ata.4 to display them and replace an XFree86 xref with Xorg.

MFC after:	1 week
2005-12-20 21:40:25 +00:00
John Baldwin
c626f1fe9a Change the various AGP drivers that attach to the Host-PCI bridge device to
attach to the hostb driver instead.  This means that agp can now be loaded
at runtime (in theory at least).  Also, the drivers no longer have to
explicity call device_verbose() to cancel out any earlier calls to
device_quiet() by the hostb(4) driver (this shows a limitation in new-bus,
drivers really shouldn't be doing device_quiet() until they know they are
going to drive that device, i.e. in attach).
2005-12-20 21:12:26 +00:00
John Baldwin
5b2119223e Move the hostb driver out of the i386 and amd64 PCI code (where it was
duplicated anyways) and into a single MI driver.  Extend the driver a bit
to implement the bus and PCI kobj interfaces such that other drivers can
attach to it and transparently act as if their parent device is the PCI
bus (for the most part).
2005-12-20 21:09:45 +00:00
Ruslan Ermilov
9a77af905e Create "smb" device when "smbus" device is attached, so that it's
possible to load/unload smb.ko and smbus-implementing driver in
any order, and get expected results.
2005-12-20 21:06:57 +00:00
John Baldwin
c8d81a41f4 Change the agp_find_device() to return the first agp device that has been
attached to a driver rather than always returning agp0.
2005-12-20 21:06:43 +00:00
Olivier Houchard
b861e5bd43 Rather than appending it at the end of the kernel build process, give the
ELF trampoline build its own target, "trampoline".
It makes it possible to construct a bootable gzipped kernel without having
to build in the same process.
2005-12-20 20:57:20 +00:00
Doug Barton
aa5affaf3b Brooks pointed out a potential problem with disabling the X cleaning
by default, so add a new knob that is on by default, and check that
knob in start_precmd so that it can run even if cleaning /tmp is
not enabled. This has the advantage of not violating POLA, while
still allowing the user to disable this behavior if they wish (for
example on a server that will never run X).
2005-12-20 20:36:48 +00:00
John Baldwin
5bcf484019 Don't map the AGP aperture into contiguous KVA. The various graphics
drivers already map sections into KVA as needed anyway.  Note that this
will probably break the nvidia driver, but I will coordinate to get that
fixed.

MFC after:	2 weeks
2005-12-20 20:05:21 +00:00
John Baldwin
4c2546c1a9 Destroy the /dev device before destroying the mutex or releasing resources
rather than afterwards.

MFC after:	1 week
2005-12-20 20:03:16 +00:00
John Baldwin
04d6a912e4 Use pci_find_extcap() to search for AGP capabilities (PCIY_AGP). 2005-12-20 19:58:28 +00:00
John Baldwin
4f9795b9fe Add a new method PCI_FIND_EXTCAP() to the pci bus interface that is used
to search for a specific extended capability.  If the specified capability
is found for the given device, then the function returns success and
optionally returns the offset of that capability.  If the capability is
not found, the function returns an error.
2005-12-20 19:57:47 +00:00
Maxim Konovalov
52146665a5 o Remove rev. 1.14 debug printf(3) leftovers.
PR:		bin/90389
Submitted by:	Gavin Atkinson
OK'ed by:	phk
2005-12-20 18:18:37 +00:00
Pav Lucistnik
f651aa2d2f - Ignore incorrect CSW signatures on my PURE PocketDab 2000 player
Approved by:	ssouhlal
MFC after:	1 week
2005-12-20 16:21:17 +00:00
Ruslan Ermilov
d01c2eedae Stop creating duplicate "smb" devices when unloading/loading smb.ko,
using the protection mechanisms described in device_add_child(9).
2005-12-20 14:26:47 +00:00
Tor Egge
b898bb1be3 Don't access fs->first_object after dropping reference to it.
The result could be a missed or extra giant unlock.

Reviewed by:	alc
2005-12-20 12:27:59 +00:00
Ceri Davies
7881e1ee07 Liberation Day is no longer celebrated in Romania; rather a national
holiday is now celebrated on December 1st.  From the PR:

December 1 was adopted as National Day in 1990, being the day of
celebration of the Great Assembly of Alba Iulia which voted for the
union of Transylvania with Romania and which symbolise the union of all
Romanians within a single state and the achievement of the unity of
Romanian national state. [1]

[1] LAW Number 10 from July 31st, 1990
Regarding the proclamation of the National Day of Romania
http://www.1decembrie.ro/en/index.php?option=com_content&task=view&id=1&Itemid=4

PR:				docs/90673
Submitted by:			Ion-Mihai "IOnut" Tetcu
Originally pointed out by:	Cornel Ilie <cornel dot c punkt ilie at gmail punkt com>
2005-12-20 11:04:01 +00:00
Xin LI
92e0a4a2a4 Use consistent indent character as other IPPROTO_* lines did. 2005-12-20 09:38:03 +00:00
George V. Neville-Neil
496f9fc522 Add protocol number for SCTP.
Submitted by:	Randall Stewart rrs at cisco.com
MFC after:	1 week
2005-12-20 09:24:04 +00:00
Maxim Sobolev
90ec8e27c3 Unbreak pc98 after my last changes to i386. 2005-12-20 08:54:30 +00:00
Olivier Houchard
796baad9e6 - Disable the instruction cache very early, until it's time to enable it again.
- Revamp the code that jumps from physical to virtual address.
2005-12-20 01:29:17 +00:00
Olivier Houchard
fe516e3c17 Make the elf trampoline disable the MMU, and link it at physical address,
to avoid bad surprises.
2005-12-20 01:28:17 +00:00
Bruce Evans
5776f433ab Extract the high and low words together. With gcc-3.4 on uniformly
distributed non-large args, this saves about 14 of 134 cycles for
Athlon64s and about 5 of 199 cycles for AthlonXPs.

Moved the check for x == 0 inside the check for subnormals.  With
gcc-3.4 on uniformly distributed non-large args, this saves another
5 cycles on Athlon64s and loses 1 cycle on AthlonXPs.

Use INSERT_WORDS() and not SET_HIGH_WORD() when converting the first
approximation from bits to double.  With gcc-3.4 on uniformly distributed
non-large args, this saves another 4 cycles on both Athlon64s and and
AthlonXPs.

Accessing doubles as 2 words may be an optimization on old CPUs, but on
current CPUs it tends to cause extra operations and pipeline stalls,
especially for writes, even when only 1 of the words needs to be accessed.

Removed an unused variable.
2005-12-20 01:21:30 +00:00
Pawel Jakub Dawidek
c505fe7a0f Reduce Giant scope a bit, as fdrop() is believed to be MPSAFE.
The purpose of this change is consistency (not performance improvement:)),
as it was hard to tell if fdrop() is MPSAFE or not when I saw it sometimes
under the Giant and sometimes without it.

Glanced at by:	ssouhlal, kan
2005-12-20 00:49:59 +00:00
Pawel Jakub Dawidek
ade9b797a0 vfs_mount_alloc() always returns 0, but what we really want is newly
allocated 'struct mount *' pointer, so simplify code a bit and return
the pointer directly.

Reviewed by:	ssouhlal
2005-12-20 00:43:51 +00:00
Max Laier
602d8f4030 Move PFSTATE_EXPIRING from sync_flags to a new local_flags. sync_flags has
special handling when zero.  This caused no PFSYNC_ACT_DEL message and thus
disfunction of pfflowd and state synchronisation in general.

Discovered by:	thompsa
Good catch by:	thompsa
MFC after:	7 days
2005-12-20 00:33:33 +00:00
Marcel Moolenaar
f56d8bf106 o Add the GNU symbol versioning section constants (SHT_GNU_verdef,
SHT_GNU_verneed, SHT_GNU_versym),
o  Fix the definition of DT_HIOS -- it was short an 'f'...
2005-12-19 20:20:36 +00:00
Maxim Sobolev
ddacef9fc2 (forced)
We loaded PAE kernels at 2MB and non-PAE kernels at 4MB to skip
the first PSE page (PSE pages are 2MB on PAE), not at 8MB as it
was incorrectly specified in the previous commit.

Submitted by:	jhb
2005-12-19 18:39:01 +00:00
Pawel Jakub Dawidek
003ba8a000 Use 'td' instead of 'curthread'. 2005-12-19 16:27:13 +00:00
Doug Barton
ea871df08c Clear up problems with /etc/rc.d/{abi|cleanvar|cleartmp} brought
to light by the PR.  Specifically, convert these three scripts
into good rc.d citizens, making sure that their functionality
is preserved, but the rc.d framework rules are not broken.

Add support for cleanvar as a regular rc.d script in the
default rc.conf, and document this in the man page.

Add a descriptive comment to rc.conf that regarding the
three emulation/compatibility services provided by abi
so users will not be confused by these services not having
their own startup scripts.

PR:		conf/84574
Submitted by:	Alexander Botero-Lowry
2005-12-19 10:57:00 +00:00
Maxim Sobolev
f668cd5df7 If LOADER_BZIP2_SUPPORT is defined allocate heap in the 1MB-4MB range to
provide enough room for decompression (up to 2.5MB is necessary). This
should be safe to do since we load i386 kernels after 8MB mark now, so
that 16MB is the minimum amount of RAM necessary to even boot FreeBSD.

This makes bzip2-support  practically useable.
2005-12-19 09:26:42 +00:00