Commit Graph

74312 Commits

Author SHA1 Message Date
Marcel Moolenaar
87f4470620 Don't create more partitions than can fit in the table by checking
that the index is within bounds.
2009-09-24 06:00:49 +00:00
Jung-uk Kim
19de5df5e5 Move sys/dev/x86bios to sys/compat/x86bios.
It may not be optimal but it is clearly better than the old place.

OK'ed by:	delphij, paradox (ddkprog yahoo com)
2009-09-23 20:49:14 +00:00
Jung-uk Kim
9747418cc4 - Use spin lock instead of default mutex for safety. INT/IRET instructions
save/clear/restore flags but emulated flags have no effect on the host.
I believe BIOS writers never meant to run their code in emulated
environment with interrupt enabled. :-)
- Use memcpy(3) instead of copying individual members.  I believe struct
x86regs was intentionally copied from the first half of struct x86emu_regs
for this very purpose.
- Fix some style nits and consistencies.

Reviewed by:	delphij, paradox (ddkprog yahoo com)
2009-09-23 20:13:36 +00:00
Rui Paulo
0be3021195 Replace 'can not' with 'cannot' so that we use 'cannot' everywhere. 2009-09-23 17:48:16 +00:00
John Baldwin
d95e7f5a7a Extract the code to find and map the MADT ACPI table during early kernel
startup and genericize it so it can be reused to map other tables as well:
- Add a routine to walk a list of ACPI subtables such as those used in the
  APIC and SRAT tables in the MI acpi(4) driver.
- Move the routines for mapping and unmapping an ACPI table as well as
  mapping the RSDT or XSDT and searching for a table with a given signature
  out into acpica_machdep.c for both amd64 and i386.
2009-09-23 15:42:35 +00:00
John Baldwin
36a888a17f Uninline an instance of STAILQ_FOREACH_SAFE(). 2009-09-23 15:39:54 +00:00
Edward Tomasz Napierala
c40502ccd0 In VOP_SETACL(9) and VOP_GETACL(9), specifying wrong ACL type should result
in EINVAL, not EOPNOTSUPP.
2009-09-23 15:09:34 +00:00
Max Laier
23250941e8 Improve on r197334:
Find the most recently merged svn revision, too. If we get a svn revision
that matches HEAD use rXXX=GIT otherwise use rXXX+GIT.

Submitted by:	avg
MFC after:	3 days
X-MFC:		not stable/8 before 8.0
2009-09-23 14:48:13 +00:00
Stanislav Sedov
50989f36fc - Bump __FreeBSD_version to reflect the point when EVFILT_USER kevent filter
has been implemented.
2009-09-23 12:33:32 +00:00
Konstantin Belousov
17dfbc1c43 Add per-process osrel node to the procfs, to allow read and set p_osrel
value for the process.

Approved by:	des (procfs maintainer)
MFC after:	3 weeks
2009-09-23 12:08:08 +00:00
Pawel Jakub Dawidek
eb03c3cdfb Restore BSD behaviour - when creating new directory entry use parent directory
gid to set group ownership and not process gid.

This was overlooked during v6 -> v13 switch.

PR:		kern/139076
Reported by:	Sean Winn <sean@gothic.net.au>
MFC after:	3 days
2009-09-23 09:18:16 +00:00
Xin LI
f27b147e40 Initialize registers to zero before calling the interrupt handlers inside
emulator.  This fixes VESA related freeze observed on some systems.

Submitted by:	paradox <ddkprog yahoo com>
2009-09-23 02:45:02 +00:00
Alexander Motin
01a967e266 MFp4:
If on sense request device returns no sence, give up and return,
or we may loop forever.
2009-09-22 22:23:52 +00:00
Alexander Motin
3ba45aaa60 Lock bus scan. 2009-09-22 22:20:43 +00:00
Xin LI
bacfa53de3 Temporarily disable typematic retrieving code until we get a real fix,
which currently causes hangs in some configurations.

Reported by:	joel
Submitted by:	swell.k at gmail.com
2009-09-22 20:12:10 +00:00
John Baldwin
fd0a5b2f1e The elements in the component arrays may be direct Package objects rather
than references to objects.  In that case, simply use the Package directly.

I think a recent change to ACPI-CA is causing the interpreter to
automatically expand these references.

Reported by:	Olivier Smedts  olivier gid0 org
MFC after:	3 days
2009-09-22 18:34:23 +00:00
Rui Paulo
c77735e28f Update 802.11s mesh support to draft 3.03. This includes a revised frame
format for peering and changes to the PERR frames.
Note that this is incompatible with the previous code.

Reviewed by:	sam
MFC after:	1 week
2009-09-22 18:18:14 +00:00
Rui Paulo
f0fda3a508 Reserve events for XScale.
Reviewed by:	jkoshy, gnn
MFC after:	1 week
2009-09-22 17:45:28 +00:00
John Baldwin
07ee969179 - Split the logic to parse an SMAP entry out into a separate function on
amd64 similar to i386.  This fixes a bug on amd64 where overlapping
  entries would not cause the SMAP parsing to stop.
- Change the SMAP parsing code to do a sorted insertion into physmap[]
  instead of an append to support systems with out-of-order SMAP entries.

PR:		amd64/138220
Reported by:	James R. Van Artsdalen  james of jrv org
MFC after:	3 days
2009-09-22 16:51:00 +00:00
Roman Divacky
fd3c9374ff Change the command argument to ioctl routines to u_long to avoid
truncating the command to 32bit on 64bit archs where int is 32bit
(ie. amd64).

Approved by:	scottl
Approved by:	ed (mentor, implicit)
2009-09-22 16:28:07 +00:00
Roman Divacky
e0a770a01d Don't build ufs_gjournal.c at all if UFS_GJOURNAL option is not given
instead of building an almost empty C file.

Approved by:	pjd
Approved by:	ed (mentor, implicit)
2009-09-22 16:22:05 +00:00
Roman Divacky
1c2825bd80 Change unsigned foo to u_foo as required by style(9).
Requested by:	bde
Approved by:	ed (mentor)
2009-09-22 16:16:02 +00:00
John Baldwin
ce95033db7 Don't reread the command register to see if enabling I/O or memory
decoding "took".  Other OS's that I checked do not do this and it breaks
some amdpm(4) devices.  Prior to 7.2 we did not honor the error returned
when this failed anyway, so this in effect restores previous behavior.

PR:		kern/137668
Tested by:	Aurelien Mere  aurelien.mere  amc-os.com
MFC after:	3 days
2009-09-22 15:43:03 +00:00
Edward Tomasz Napierala
a9315dded6 Add pieces of infrastructure required for NFSv4 ACL support in UFS.
Reviewed by:	rwatson
2009-09-22 15:15:03 +00:00
Joel Dahl
2ee4e98c7e Move es137x.c and es137x.h to a 2-clause BSD license. Also move a few
comments.

Submitted by:	Joachim Kuebart
Approved by:	core, Russell Cattelan <cattelan@thebarn.com>
2009-09-22 13:23:59 +00:00
Coleman Kane
52d75a271f The ndis_scan function may be started after ndis vap have been destroyed
PR:		kern/138632
Submitted by:	Paul B. Mahol <onemda at gmail.com>
MFC after:	3 days
2009-09-22 12:36:51 +00:00
Marius Strobl
4640348546 - Add missing bus_dmamap_sync(9) calls for the work DMA map. Previously
the work area was totally unsynchronized which means this driver only
  had a chance of working on x86 when no bounce buffers were involved,
  which isn't that likely given that support for 64-bit DMA is currently
  broken throughout ata(4).
- Add necessary little-endian conversion of accesses to the work area,
  making this driver work on big-endian hosts. While at it, use the
  alignment-agnostic byte order encoders in order to be on the safe side.
- Clear the reserved member of the SG list entries in order to be on the
  safe side. [1]

Submitted by:	yongari [1]
Reviewed by:	yongari
MFC after:	3 days
2009-09-22 11:47:21 +00:00
Marius Strobl
eb811915d2 - According to Linux, the ALi M5451 can do 31-bit DMA instead of just
30-bit like the reset of the controllers supported by this driver.
  Actually ALi M5451 can be setup up to generate 32-bit addresses by
  setting the 31st bit via the accompanying ISA bridge, which allows
  it to work in sparc64 machines whose IOMMU require at least 32-bit
  DMA. Even though other architectures would also benefit from 32-bit
  DMA, enabling this bit is limited to sparc64 as bus_dma(9) doesn't
  generally guarantee that a low address of BUS_SPACE_MAXADDR_32BIT
  results in a buffer in the 32-bit range.
- According to Tatsuo YOKOGAWA's ali(4), the the DMA transfer size of
  ALi M5451 is fixed to 64k and in fact using the default size of 4k
- The 4DWAVE DX and NX require the recording buffer to be 8-byte
  aligned so adjust the bus_dma_tag_create(9) accordingly.
- Unlike the rest of the controllers supported by this driver, the
  ALi M5451 only has 32 hardware channels instead of 64 so limit the
  loop in tr_intr() accordingly. [1]

Submitted by:	yongari [1]
Reviewed by:	yongari (superset of what is committed)
MFC after:	3 days
2009-09-22 11:38:45 +00:00
Ed Schouten
052002e6f2 Use an unsigned integer for storing the key code.
It seems Clang breaks when checking for SPCLKEY, which is now
0x80000000. Using an unsigned integer fixes this. This is also
consistent with other pieces of kbd/syscons code, because these also use
u_int.

Submitted by:	rdivacky
2009-09-22 11:29:11 +00:00
Xin LI
2f66eb1e60 Hide x86bios stuff in i386/amd64 specific files as atkbdc would get
these stuff into build.
2009-09-22 07:10:23 +00:00
Xin LI
a57707e712 Build x86bios only for i386/amd64 for now. More work is required
to make these functional on other architectures, and the current
code breaks sparc64 and powerpc.

Spotted by:	tinderbox via des
2009-09-21 23:58:29 +00:00
Andrew Gallatin
a393336b87 Improve mxge watchdog routine's ability to reliably reset a failed NIC:
- Mark the link as down, so if watchdog reset fails, link watching
    failover software can notice it
- Don't send MXGEFW_CMD_ETHERNET_DOWN if the NIC has been reset, it is
    not needed, and will fail on a freshly reset NIC.
- Ensure the transmit routines aren't attempting to PIO write to doorbells
    while the NIC is being reset.
- Download the correct f/w, rather than using the EEPROM f/w after reset.
- Export a count of the number of watchdog resets via sysctl
- Zero all f/w stats at reset.  This will lead to less confusing
    diagnostic output when investigating NIC failures.

MFC after:	3 days
2009-09-21 20:16:10 +00:00
Andrew Gallatin
65c690668b Add support for throttling transmit bandwidth. This is most commonly
used to reduce packet loss on high delay (WAN) paths with a
slow link.
2009-09-21 14:41:07 +00:00
Konstantin Belousov
51a6ef34fb Remove forward_roundrobin(), it is unused for quite some time.
Reviewed by:	jhb
MFC after:	1 week
2009-09-21 13:09:56 +00:00
Konstantin Belousov
a1bfaca761 If CPU happens to be in usermode when a T_RESERVED trap occured,
then trapsignal is called with ksi.ksi_signo = 0. For debugging kernels,
that should end up in panic, for non-debugging kernels behaviour is
undefined.

Do panic regardeless of execution mode at the moment of trap.

Reviewed by:	jhb
MFC after:	1 month
2009-09-21 09:41:51 +00:00
Xin LI
65553dd979 To be safe, make this module initialize earlier by specifying SI_SUB_CPU
instead of SI_SUB_KLD.  Note that we don't believe that there is any
consumers of x86bios that would be triggered in the early stage of boot,
so this is more or less just a safebelt.

Submitted by:	swell.k at gmail.com
2009-09-21 09:09:55 +00:00
Xin LI
13c937f899 Style(9) fixes.
Submitted by:	swell.k at gmail.com
2009-09-21 08:53:26 +00:00
Xin LI
0a2e9846fd Use __FBSDID to embed RCS ID. 2009-09-21 08:37:57 +00:00
Xin LI
8b1620e069 Allow atkbd to obtain keyboard repeat rate from BIOS on amd64.
Submitted by:	swell.k at gmail.com
2009-09-21 08:24:22 +00:00
Xin LI
205d67b00d Collapase interrupt supporting functions to a new module, and switch from
x86emu to this new module.

This changeset also brings a fix for bugs introduced with the initial
x86emu commit, which prevents the user from using some display mode or
cause instant reboots during mode switch.

Submitted by:	paradox <ddkprog yahoo com>
2009-09-21 08:17:57 +00:00
Xin LI
91d345423d Revert part that should not be in my previous commit.
Pointy hat to:	delphij
2009-09-21 07:38:50 +00:00
Xin LI
6abad12dfe Automatically depend on x86emu when vesa or dpms is being built into
kernel.  With this change the user no longer need to remember building
this option.

Submitted by:	swell.k at gmail.com
2009-09-21 07:08:20 +00:00
Xin LI
372c733759 Enable s3pci on amd64 which works on top of VESA, and allow
static building it into kernel on i386 and amd64.

Submitted by:	swell.k at gmail.com
2009-09-21 07:05:48 +00:00
Matt Jacob
cb8461c836 (semiforced commit to add comment missed in last delta)
Add a maximum response length for FCP RSPNS IUs.

Clarify some of the FC option words for setting parameters
and try and disable automatic PRLI when in target mode- this
should correct some cases of N-port topologies with 23XX cards
where we put out an illegal PRLI (in target mode only we're
not supposed to put out a PRLI).
2009-09-21 01:41:19 +00:00
Matt Jacob
e3ec25e2aa Remove file unused in freebsd. 2009-09-21 01:38:22 +00:00
Qing Li
46e7f9838b A wrong variable is used when setting up the interface
address route, which broke source address selection in
some code paths.

Submitted by:	noted by bz
Reviewed by:	hrs
MFC after:	immediately
2009-09-20 17:22:19 +00:00
Pawel Jakub Dawidek
c4be11d7fc Purge namecache in the same place OpenSolaris does. 2009-09-20 13:28:29 +00:00
John Baldwin
5c84347532 Re-remove the IBM0057 ID used for PS/2 mouse controllers. The asl for the
61p includes the hotkey device as IBM0068 and the mouse as IBM0057 similar
to other systems.

Submitted by:	marius
MFC after:	3 days
2009-09-20 13:28:19 +00:00
Konstantin Belousov
497a82382b Old (a.out) rtld attempts to mmap zero-length region, e.g. when bss
of the linked object is zero-length. More old code assumes that mmap
of zero length returns success.

For a.out and pre-8 ELF binaries, allow the mmap of zero length.

Reported by:	tegge
Reviewed by:	tegge, alc, jhb
MFC after:	3 days
2009-09-20 12:40:56 +00:00
Michael Tuexen
4b6492f5ab Fix handling of sctp_drain().
Approved by: rrs (mentor)
MFC after: 2 month
2009-09-20 11:33:39 +00:00