Commit graph

4311 commits

Author SHA1 Message Date
Alexander Leidinger 3df129097b The file machine/ieeefp.h needs sys/cdefs.h on amd64 and i386 after my
compiler features tests. This is ok, since machine/ieeefp.h is an internal
interface. But floatingpoint.h is a public interface and some ports use it,
so include sys/cdefs.h in the amd64 and i386 version of floatingpoint.h.

Note: some architectures don't provide recursive inclusion protection in
floatingpoint.h, namely alpha and ia64. Except for this part and now the
include of sys/cdefs.h, all those files are equal (from a compiler POV),
so they could be moved to only one version in src/include/.

Approved by:	joerg
2005-04-02 17:31:42 +00:00
John Baldwin 3dde27da5e - Use a custom version of copyinuio() to implement readv/writev using
kern_readv/writev.
- Use kern_sched_rr_get_interval() rather than the stackgap.
2005-03-31 22:57:21 +00:00
John Baldwin db8a98353d - Fix some sign extension problems with implicit 32 to 64 bit conversions.
- Fix the mmap2() wrapper to not truncate high addresses.

Submitted by:	Christian Zander
2005-03-31 22:47:18 +00:00
David E. O'Brien 503e759c5d MFR5: rev 1.421.2.6: Enable support for 32-bit Linux binaries by default.
There are too many questions in freebsd-amd64@ about how to enable Linux
support that it seems a required piece of functionality.  Thus we should
just have it on by default.
2005-03-31 20:55:10 +00:00
Scott Long d0885ac3cf Glue the arcmsr driver into the tree. 2005-03-31 20:21:43 +00:00
Peter Wemm 58aa36f31e Checkpoint today's tidy-up of the WIP disassembler. It now agrees with
objdump --disassemble when disassembling itself in userland.  I've added
the cmovCC instruction group and tweaked a bunch of size sensitive array
indexes to either fix my mistakes and/or force it to work by any means
necessary.

I'm committing this because it is usable enough to see what is going on
when single stepping via ddb.

It might still tell lies, but its lies will be far more subtle now.  I'm
not sure that this is a good thing or not.
2005-03-30 22:57:41 +00:00
Peter Wemm dc37635d6a Commit my checkpoint of db_disasm.c that I hacked to understand some amd64
instructions as it was when I dropped it back in May 31, 2003.  I'm
committing this as an intermediate stage because back then I thought I
understood what I was doing with this file.
2005-03-30 22:52:27 +00:00
David Schultz f2c7668eb1 Make ps_nargvstr and ps_nenvstr unsigned. This fixes an input
validation error in procfs/linprocfs that can be exploited by local
users to cause a kernel panic.  All versions of FreeBSD with the patch
referenced in SA-04:17.procfs have this bug, but versions without that
patch have a more serious bug instead.  This problem only affects
systems on which procfs or linprocfs is mounted.

Found by:	Coverity Prevent analysis tool
Security:	Local DOS
2005-03-23 08:27:59 +00:00
Maxim Sobolev 6bcf003260 Add USB Communication Device Class Ethernet driver. Originally written for
FreeBSD based on aue(4) it was picked by OpenBSD, then from OpenBSD ported
to NetBSD and finally NetBSD version merged with original one goes into
FreeBSD.

Obtained from:  http://www.gank.org/freebsd/cdce/
                NetBSD
                OpenBSD
2005-03-22 14:52:40 +00:00
Murray Stokely 991f5121f0 Add a comment to note that pseudo-device bpf is required for DHCP.
This is mentioned in the Handbook but it is not as obvious to new
users why bpf is needed compared to the other largely self-explanatory
items in GENERIC.

PR:		conf/40855
MFC after:	1 week
2005-03-18 15:24:00 +00:00
Poul-Henning Kamp be1bf4d2b8 s/SLIST/STAILQ/
/imp/a\
pointy hat
.
2005-03-18 11:57:44 +00:00
Warner Losh bdb111b85c Remove comments relevant only to pc98 as there are no amd64 pc98 machines. 2005-03-16 20:55:15 +00:00
David E. O'Brien bf6fabdd60 Make it clear nve needs mii, and shorten long comment line. 2005-03-16 20:23:31 +00:00
Ian Dowse 7fe25a5726 Enable ehci by default on i386 and amd64. It had got to the stage
where having this disabled was actually hurting us, since so many
BIOSes include legacy USB emulation that takes control of all usb
ports and only the ehci driver knows how to disable it.
2005-03-16 02:34:50 +00:00
David Schultz 7b74e4a759 Remove fpsetsticky(). This was added for SysV compatibility, but due
to mistakes from day 1, it has always had semantics inconsistent with
SVR4 and its successors.  In particular, given argument M:

- On Solaris and FreeBSD/{alpha,sparc64}, it clobbers the old flags
  and *sets* the new flag word to M.  (NetBSD, too?)
- On FreeBSD/{amd64,i386}, it *clears* the flags that are specified in M
  and leaves the remaining flags unchanged (modulo a small bug on amd64.)
- On FreeBSD/ia64, it is not implemented.

There is no way to fix fpsetsticky() to DTRT for both old FreeBSD apps
and apps ported from other operating systems, so the best approach
seems to be to kill the function and fix any apps that break.  I
couldn't find any ports that use it, and any such ports would already
be broken on FreeBSD/ia64 and Linux anyway.

By the way, the routine has always been undocumented in FreeBSD,
except for an MLINK to a manpage that doesn't describe it.  This
manpage has stated since 5.3-RELEASE that the functions it describes
are deprecated, so that must mean that functions that it is *supposed*
to describe but doesn't are even *more* deprecated.  ;-)

Note that fpresetsticky() has been retained on FreeBSD/i386.  As far
as I can tell, no other operating systems or ports of FreeBSD
implement it, so there's nothing for it to be inconsistent with.

PR:		75862
Suggested by:	bde
2005-03-15 15:53:39 +00:00
Scott Long 5974e5c71c Refactor the bus_dma header files so that the interface is described in
sys/bus_dma.h instead of being copied in every single arch.  This slightly
reorders a flag that was specific to AXP and thus changes the ABI there.
The interface still relies on bus_space definitions found in <machine/bus.h>
so it cannot be included on its own yet, but that will be fixed at a later
date.  Add an MD <machine/bus_dma.h> for ever arch for consistency and to
allow for future MD augmentation of the API.  sparc64 makes heavy use of
this right now due to its different bus_dma implemenation.
2005-03-14 16:46:28 +00:00
Scott Long 46ac170425 MFCi386: Prevent integer underflow that could result in all memory being
consumed.
2005-03-12 07:05:59 +00:00
David E. O'Brien 1b1a07ad8b FreeBSD consumer bits of the nForce MCP NIC binary blob.
Demanded by:	DES
Encouraged by:	scottl
Obtained from:	q@onthenet.com.au (partially)
KNF'ed by:	obrien
2005-03-12 00:29:30 +00:00
Peter Wemm cf4e1c4613 Remove diffs to i386 version that came in via the compiler support ifdefs.
This changes things like whitespace, inconsistent use of #ifndef vs
#if !defined(), different macro argument orders, mismatched comments, etc.
2005-03-11 22:16:09 +00:00
Peter Wemm 9e647d9629 MFi386: reduce apic clock interrupt rate 2005-03-11 22:12:38 +00:00
Peter Wemm 8e93ce1a1b Fix a mismerge of i386 rev 1.209 2005-03-11 21:57:38 +00:00
Peter Wemm 639ac97a88 Match i386 rev 1.38 with __cplusplus support 2005-03-11 21:46:01 +00:00
Maxime Henrion 68d9d1e64e Fixup KTR traces. 2005-03-08 14:49:05 +00:00
Maxime Henrion 5d18cf7825 Use __func__ in the KTR_BUSDMA traces. This avoids copy and paste
errors like in the bus_dmamap_load_mbuf_sg() case where we were wrongly
displaying the function name as bus_dmamap_load_mbuf.
2005-03-08 11:18:14 +00:00
Scott Long 8bf0837c7a Remove dead code. 2005-03-07 02:18:52 +00:00
Maxim Sobolev ecab0de7c1 Regen after addition of linux_nosys handler. 2005-03-07 00:23:58 +00:00
Maxim Sobolev e3478fe000 Handle unimplemented syscall by instantly returning ENOSYS instead of sending
signal first and only then returning ENOSYS to match what real linux does.

PR:		kern/74302
Submitted by:	Travis Poppe <tlp@LiquidX.org>
2005-03-07 00:18:06 +00:00
Dag-Erling Smørgrav 1e8c38a6cc MFi386: use TUNABLE_ULONG_FETCH to retrieve hw.physmem. 2005-03-05 18:57:30 +00:00
Dag-Erling Smørgrav 96a757bcf1 Replace goto with continue. 2005-03-05 18:14:44 +00:00
Joerg Wunsch a5f50ef9e4 netchild's mega-patch to isolate compiler dependencies into a central
place.

This moves the dependency on GCC's and other compiler's features into
the central sys/cdefs.h file, while the individual source files can
then refer to #ifdef __COMPILER_FEATURE_FOO where they by now used to
refer to #if __GNUC__ > 3.1415 && __BARC__ <= 42.

By now, GCC and ICC (the Intel compiler) have been actively tested on
IA32 platforms by netchild.  Extension to other compilers is supposed
to be possible, of course.

Submitted by:	netchild
Reviewed by:	various developers on arch@, some time ago
2005-03-02 21:33:29 +00:00
David E. O'Brien cb950c23b2 Catch up with the "physical memory" sysctl change.
(MFi386: rev 1.608)
2005-03-01 04:18:32 +00:00
Peter Wemm 8a7572e0e7 MFi386: Sync whitespace and an abbreviation 2005-02-28 23:39:58 +00:00
Peter Wemm e73976812c MFi386: Update alc's copyright notice 2005-02-28 23:38:15 +00:00
Peter Wemm c29f1e2b3b MFi386: Bring over John's local apic timer code 2005-02-28 23:37:35 +00:00
Pawel Jakub Dawidek 9b770d2634 Typo. 2005-02-28 08:55:53 +00:00
David E. O'Brien 9bec0bd88c Spell "options" correctly as "options ". 2005-02-28 00:58:06 +00:00
David E. O'Brien fdbbb288dd Connect "options MP_WATCHDOG" to the LINT builds. 2005-02-28 00:55:16 +00:00
David E. O'Brien 94a31c6325 MFi386: rev 1.3:
- Add debug.watchdog tunable, so we can specify watchdog CPU from loader
  which will help to debug hangs on boot.
- Remove 'U' from debug.watchdog sysctl definition, so if we set it to '-1'
  it really shows '-1'.
- Fix comment.
2005-02-27 22:31:35 +00:00
Tom Rhodes 183a16a3ec Remove recently added note about DEVICE_POLLING not working with SMP.
Remove warning from kern_poll.c to allow DEVICE_POLLING to be built with SMP.

Discussed with:	ru, glebius
2005-02-25 22:07:51 +00:00
Xin LI 130d7d9ffb Remove acpi_perf from {ARCH}/conf/NOTES, to make tinderbox happy.
Reported by:	tinderbox
Inspired by:	acpi_perf build structure removal commit
2005-02-25 07:10:37 +00:00
Tom Rhodes fda9ad60e4 According to kern_poll.c, you cannot use DEVICE_POLLING with SMP. Add a
commen about this in every NOTES file which lists DEVICE_POLLING.

PR:	46793
MFC:	1 day
2005-02-23 04:13:11 +00:00
John Baldwin 470273d7d9 MFi386: r1.17: Treat pin 0 as IRQ 0 rather than ExtINT if mixed mode is not
enabled by the enumerator.
2005-02-22 22:17:03 +00:00
John Baldwin 373dd87688 - Add a new quirk to indicate that pin 0 of the first I/O APIC is really
IRQ 0 and not an ExtINT pin.  The MADT enumerators ignore the PC-AT flag
  and ignore overrides that map IRQ 0 to pin 2 when this quirk is present.
- Add a block comment above the quirks to document each quirk so that we
  can use more verbose descriptions quirks.

MFC after:	2 weeks
2005-02-22 21:52:52 +00:00
Ruslan Ermilov 3971d2cf5e Use a common multi-inclusion protection, and add such a
protection to alpha/include/exec.h.
2005-02-19 21:16:48 +00:00
John Baldwin 1d15fdd97b - Add a custom version of exec_copyin_args() to deal with the 32-bit
pointers in argv and envv in userland and use that together with
  kern_execve() and exec_free_args() to implement linux_execve() for the
  amd64/linux32 ABI without using the stackgap.
- Implement linux_nanosleep() using the recently added kern_nanosleep().
- Use linux_emul_convpath() instead of linux_emul_find() in
  exec_linux_imgact_try().

Tested by:	cokane
Silence on:	amd64
2005-02-18 18:51:59 +00:00
Nate Lawson 31e3d3f5b9 MFi386 rev 1.61: Fix a few bugs in the legacy cpu attachment ivars. 2005-02-15 07:26:28 +00:00
Peter Wemm 699a8a09d6 MFi386: read from RTC_INTR after writing to RTC_STATUSB 2005-02-08 01:21:24 +00:00
Poul-Henning Kamp 0c3c54da63 Since we are quite unlikely to ever face another platform which
uses the i8237 without trying to emulate the PC architecture move
the register definitions for the i8237 chip into the central include
file for the chip, except for the PC98 case which is magic.

Add new isa_dmatc() function which tells us as cheaply as possible
if the terminal count has been reached for a given channel.
2005-02-06 13:46:39 +00:00
Nate Lawson 3045c8af3f Staticize the legacy cpu devclasses and revert the name for the acpi_cpu
devclass.  As pointed out by dfr@, devclasses don't have to share the same
linkage if multiple drivers have the same name.  Newbus should match the
devclasses based on name and allocate non-conflicting unit numbers.
2005-02-06 07:36:08 +00:00
Nate Lawson 3888a87205 Finish the job of sorting all includes and fix the build by including
malloc.h before proc.h on sparc64.  Noticed by das@

Compiled on:	alpha, amd64, i386, pc98, sparc64
2005-02-06 01:55:08 +00:00