Added PR kern/7177 for SECAM Video Highway Xtreme with single crystal
PLL configuration submitted by Vsevolod Lobko <seva@alex-ua.com>.
In kernel configuration file add
options OVERRIDE_CARD=2
options OVERRIDE_TUNER=11
options BKTR_USE_PLL
Submitted by: Roger Hardiman <roger@cs.strath.ac.uk>
Normally the full 640x480 (768x576 PAL) image is grabbed. This ioctl
allows a smaller area from anywhere within the video image to be
grabbed, eg a 400x300 image from (50,10).
See restrictions in BT848SCAPAREA.
Submitted by: Roger Hardiman <roger@cs.strath.ac.uk>
- moved definition of MACHINE_ARCH from cpu.h to parm.h as alpha.
- Added definitions of _MACHINE and _MACHINE_ARCH.
- Added hw.ispc98. The hw.ispc98 is 1 in PC98 kernel and is 0 in
IBM-PC kernel.
Discussed with: John Birrell <jb@FreeBSD.ORG>
XFree86 server, users need to create the following links in their
/compat/linux/dev directory (assuming kernel configured with 4 VTs).
lrwxrwxrwx 1 root wheel 7 Aug 30 22:59 tty0 -> console
lrwxrwxrwx 1 root wheel 5 Aug 30 22:45 tty1 -> ttyv0
lrwxrwxrwx 1 root wheel 5 Aug 30 22:45 tty2 -> ttyv1
lrwxrwxrwx 1 root wheel 5 Aug 30 22:45 tty3 -> ttyv2
lrwxrwxrwx 1 root wheel 5 Aug 30 22:45 tty4 -> ttyv3
VT switching is still not yet supported. Attempting to switch VT
currently will cause Xserver bus error.
Submitted by: Chain Lee <chain@110.net>
a kernel be built and installed at just the right time. If the system
were to be rebooted after installing the 3.0 binaries without the
new kernel, the system is hosed.
The addition of this config file reserves the name of the config file
that the upgrade procedure uses. If an upgrade is to be performed on
a 2.2.5/6/7 system system for which a GENERIC kernel is inadequate,
this config file must be replace with a suitable one before performing
the upgrade.
On systems which report 'uname -r' as 3.0-CURRENT, the kernel build
is not performed and this file is ignored.
Add a sysctl 'machdep.cs_recv_delay' to specify how long to wait after
receiving a packet in order to check for a subsequent (back-to-back)
packet. The cs8900 has a very small receive buffer, so this helps avoid
overflows at the cost of some extra CPU overhead.
Submitted by: Oleg Sharoiko <os@rsu.ru>, MIHIRA "Sanpei" Yoshiro <sanpei@sanpei.org>
Add some overflow checks to read/write (from bde).
Change all modifications to vm_page::flags, vm_page::busy, vm_object::flags
and vm_object::paging_in_progress to use operations which are not
interruptable.
Reviewed by: Bruce Evans <bde@zeta.org.au>
for the Lite2 fix for always returning EIO in dead_read().
Cleaned up the cdevswitch initializers for all tty drivers.
Removed explicit calls to ttsetwater() from all (tty) drivers. ttsetwater()
is now called centrally for opens, not just for parameter changes.
The check for dropping unicast packets not sent to our ethernet
address is after the bpf tap, but not conditioned on it. All packets
received should get handed to bpf, and unicast packets not to us (mac)
should get dropped whether or not there is a bpf listener. I believe
that the common optimization that the interface is in hw promisc mode
iff there is a bpf listener is in general wrong, but more frequently
so on wavelans.
I think Max's fix makes bpf listeners not see unicast packets sent to
others, but I'm not sure.
One can argue that checking on MOD_ENAL is wrong, but the code only
drops packets that shouldn't be received. The correctness condition
is that it be run whenever unicast packets without our mac address can
be received.
PR: kern/7144
Submitted by: Greg Troxel <gdt@ir.bbn.com>
for 1 second's worth of input) and larger tty output buffers. The
interrupt-level buffers are still too small for speeds above 115200
bps (only a little too small for 230400 bps if RTS flow control is
enabled).
Don't call ttsetwater() explicitly in open(). It is now called for
the TTYDISC l_open() and should be static.
Don't attempt to register the cdevsw more than once.
I don't have access to a real VT220 to verify this against.
However, I'm committing the patch in `good faith' because
(a) getting hold of a real VT220 is going to be increasingly difficult
the longer the PR sits around,
(b) some one was troubled enough to in a PR and
(c) the fix is minor and has no other implications.
PR: 7559
Submitted by: Christian Weisgerber <naddy@mips.rhein-neckar.de>
in a SMP system. Unexpected things could happen if each cpu
has a different ldt setting and one cpu tries to use value
of currentldt set by another cpu.
The fix is to move currentldt to the per-cpu area. It includes
patches I filed in PR i386/6219 which are also user ldt related.
PR: i386/7591, i386/6219
Submitted by: Luoqi Chen <luoqi@watermarkgroup.com>
not the necessarily the same as the seconds part of getmicrotime()
yet, and anyway, we should have used `time_second' if we only wanted
a sloppy value for the seconds part. There is no point in making
ibcs2's time(2) more efficient than FreeBSD's time(3).
stability now. ALso modify /sys/conf/files, /sys/i386/conf/GENERIC
and /sys/i386/conf/LINT to add entries for the XL driver. Deactivate
support for the XL adapters in the vortex driver. LAstly, add a man
page.
(Also added an MLINKS entry for the ThunderLAN man page which I forgot
previously.)
applications. Here's how it works.
The kernel should include <machine/elf.h> to get the definitions
for the native architecture. It can reference the various ELF
structures with generic names like Elf_Sym, Elf_Shdr, etc. A define
__ELF_WORD_SIZE is also available with the value 32 or 64 as
appropriate for the native architecture.
Generic applications should include <elf.h>, which is just a wrapper
for <machine/elf.h>.
Applications such as object file dumpers that need to deal with
foreign ELF files can include <sys/elf32.h> and/or <sys/elf64.h>.
Both can be included from the same source file if desired. The
structure names must be referenced using wordsize-specific names
like Elf32_Sym, Elf64_Shdr, etc.
I haven't change the alpha stuff, but I haven't broken it either.
Cast pointers to (vm_offset_t) instead of to (u_long) (as before) or to
(uintptr_t)(void *) (as would be more correct). Don't cast vm_offset_t's
to (u_long) just to do arithmetic on them.
mp_machdep.c:
Cast pointers to (uintptr_t) instead of to (u_long). Don't forget
to cast pointers to (void *) first or to recover from integral
possible integral promotions, although this is too much work for
machine-dependent code.
vm code generally avoids warnings for pointer vs long size mismatches
by using vm_offset_t to represent pointers; pmap.c often uses plain
`unsigned int' instead of vm_offset_t and didn't use u_long elsewhere,
but this style was messed up by code apparently imported from mp_machdep.c.
address constants. This fixes some warnings for conversions from
64-bit integers to 32-bit pointers on i386's with 64-bit longs.
vm86 still uses too many u_longs.
It can be integral or a struct in POSIX, so it is difficult to print,
but it is actually declared as unsigned long. Assume that it is
unsigned integral.
of invariants to cyattach().
Fixed minor bugs:
- cyparam() returned without restoring the ipl in the error cases. This
was harmless because cyparam() is always called at spltty().
- one check for "rev. J or higher" actually checked for precisely rev. J.
swapped RTS/DTR). Merge the vendor's modification of the 2.2.6-release
version into -current for reference. Will be cleaned up in next commit.
Obtained from: ftp://ftp.cyclades.com/pub/cyclades/cyclom-y/freebsd/2.2.6/cyy226.tar.gz
instead of at compile time using ifdefs.
Use _swi_null instead of dummycamisr. CAM and dpt should call
register_swi() instead of hacking on ihandlers[] directly.
instead of 0) was "restored" after handling a trap that occurred while
returning to user mode. This bug was most noticeable for VM86 and is
still detected and fixed up (on return from the next exception) in doreti
if VM86 is configured.
in ddb) which I broke by changing %8[l]x to %8p. Hacked the central
printf routine to not add an "0x" prefix for %p formats if the field
width is nonzero. The tables are still horribly misformatted on
64-bit machines.
Use %p instead of %8p to print pointers when the field width isn't
important.
chip.
It has been observed that the problem is most apparent:
a) in notebook computers,
b) and/or in the systems with C&T video chips.
Define the new configuration option SC_BAD_FLICKER in the kernel
configuration file to remove outb()/outw() calls in question.
DOS partition type 15 (Extended DOS, LBA) as a container for
DOS logical volumes, so the appropriate slices (e.g. sd1s5)
are not initialized.
PR: 7549
PR: 4120
Reviewed by: phk
Submitted by: Jim Mattson <jmattson@sonic.net>
Fixed nearby bugs (in linux_alarm()):
- the itimer for the alarm was relative to the epoch instead of relative
to the boot time. This was harmless because the itimer's interval is 0.
- the seconds arg was not checked for validity before converting it to a
possibly different value.
- printf format errors.
Improvements:
Don't use splclock(). splsoftclock() suffices. Don't complicate things
by micro-optimizing interrupt latency.
Minor improvements:
Various micro-optimizations to exploit the specialness of the alarm itimer
and the value 0.
- ppbus now supports PLIP via the if_plip driver
- ieee1284 infrastructure added, including parallel-port PnP
- port microsequencer added, for scripting the sort of port I/O
that is common with parallel devices without endless calls up and down
through the driver structure.
- improved bus ownership behaviour among the ppbus-using drivers.
- improved I/O chipset feature detection
The vpo driver is now implemented using the microsequencer, leading to
some performance improvements as well as providing an extensive example
of its use.
Reviewed by: msmith
Submitted by: Nicolas Souchu <Nicolas.Souchu@prism.uvsq.fr>
saver and splash screen can all work properly with syscons. Note that
the splash screen option (SC_SPLASH_SCREEN) does not work yet, as it
requires additional code from msmith.
- Reorganized the splash screen code to match the latest development
in this area.
- Delay screen switch in `switch_scr()' until the screen saver is
stopped, if one is running,
- Start the screen saver immediately, if any, when the `saver' key is
pressed. (There will be another commit for `kbdcontrol' to support
this keyword in the keymap file.)
- Do not always stop the screen saver when mouse-related ioctls
are called. Stop it only if the mouse is moved or buttons are
clicked; don't stop it if any other mouse ioctls are called.
2. Added provision to write userland screen savers. (Contact me if you
are interested in writing one.)
- Added CONS_IDLE, CONS_SAVERMODE, and CONS_SAVERSTART ioctls to
support userland screen savers.
3. Some code clean-ups.
the screen mode is changed even if another vty has larger size.
Reallocate the buffer only when the new screen size is larger than
the current cut buffer size.
When bell is of "quiet" types, the console won't ring (or flush)
if the ringing process is in a background vty.
PR: i386/2853
- Modify the escape sequence 'ESC[=%d;%dB' so that bell pitch and
duration are set in hertz and msecs by kbdcontrol(1).
There will be a corresponding kbdcontrol patch.
PR: bin/6037
Submitted by: Kouichi Hirabayashi (kh@eve.mogami-wire.co.jp)
and DSO_NOLABELS flags prevent searching for slices and labels
respectively. Current drivers don't set these flags. When
DSO_NOLABELS is set, the in-core label for the whole disk is cloned
to create an in-core label for each slice. This gives the correct
result (a good in-core label for the compatibility slice) if
DSO_ONESLICE is set or only one slice is found, but usually gives
broken labels otherwise, so DSO_ONESLICE should be set if DSO_NOLABELS
is set.
- Call isa_dmadone() whenever necessary to stop DMA and/or free bounce
buffers. Undead DMA corrupted the malloc freelist fairly consistently
in the following configuration: SLICE kernel, 2 floppy drives, no disk
in fd0, disk in fd1.
- Don't call fdc_reset() from fd_timeout(). Doing so gave an "extra"
interrupt which was usually misinterpreted as being for completion
of the next FDC command; the interrupt for completion of the next
FDC command was then usually misinterpreted... There were further
complications for interrupts latched by the soft-spl mechanism so
that they were delivered after all the h/w interrupts went away.
This caused at least wrong head settle delays and may be why the
FreeBSD floppy driver seems to munch floppies more than most floppy
drivers. The reset was unnecessary anyway in cases that didn't have
the bug described next, since is was repeated a little later for
the IOTIMEDOUT state. The state machine has complications to handle
resets correctly, so just use it.
- Don't call retrier() from fd_timeout(). The IOTIMEDOUT state needs
to be processed next, and it isn't valid to set to that state if
retrier() has aborted the current transfer. Doing so caused null
pointer panics after the previous bug was fixed.
Improved error handling:
- If an i/o is aborted, arrange to reset in the state machine before
doing the next i/o. New fdc flag for this. This fixes spurious
warnings and lengthy busy-waiting for the next i/o.
- Split STARTRECAL into RESETCOMPLETE and STARTRECAL and only check
for the results from reset if we actually reset. This fixes spurious
warnings for other paths to STARTRECAL. [Oops, it may break reset
handling for motor-off resets.]
Cleanups in fd_timeout():
- Renamed to fd_iotimeout() to make it clearer that it is only used
for i/o.
- Don't handle the bp == 0 case. This case can't happen for i/o.
- Don't check for controller-busy. We know it must be.
- Don't print anything. retrier() already prints too much for normal
errors.
- Fudge the state differently so that the state machine advances
fdc->retry and the status is invalid (perhaps this should fudge a
valid state like the one for WP).
- Style fixes.
fork_trampoline() if switchtime is valid. This fixes not accounting
for the time between the previous context switch and and the current
time (when the forked child starts up here) in most cases - the time
is now counted in the child's runtime. I think it actually fixes
all cases, and switchtime is always valid here, since there must have
been a context switch just before the forked child starts up. Some
code should be removed if this is correct. The check that switchtime
is valid sometimes gives a false negative because the check isn't
correct until the after the first context switch after the system
has been up for >= 1 second.
potentially re-use the stack page.
Cosmetic cleanup of the code to de-obfuscate it and make it easier
to follow. There should be no functional changes in this commit.
small part of a bug suite beginning in the SLICE probes but mostly in the
floppy driver. This is a quick fix: the auto case shouldn't be special;
DMA should also be stopped in isa_dma_release(); isa_dmastop() probably
shouldn't exist; common DMA registers should not be accessed without
locking.
controller reports a successful seek, it is very unlikely to report
seeking to a cylinder other than the one requested, but we check for
this, and botched the error handling for the requested_cylinder != 0
case. This error happened when the bug fixed in rev.1.52 of <sys/buf.h>
caused the head of buffer queue to change to one starting on a different
cylnder - the requested cylinder was found, but it wasn't what we
thought we requested. The fix is simply to arrange to reset the state
machine.
Corruption of the buffer queue seems to only have been a problem in the
floppy driver. Other drivers dequeue the head of the queue before doing
physical i/o on it, so the corruption at worse broke the elevator sort
order. Dequeueing breaks it anyway.
These asm statments are not quite as pessimal as when I complained
about them in rev.1.9 of audio.c. They seem to be only 40% slower
than the C version on P5's and the same speed on K6's.
to int32_t's and all unsigned longs to u_int32_t's. Fixed the one
printf format broken by this. The old math emulator now compiles
cleanly on i386's with 64-bit longs. It may even work, provided
suword() doesn't actually write a long.
suitable for holding object pointers (ptrint_t -> uintptr_t).
Added corresponding signed type (intptr_t). Changed/added
corresponding non-C9x types for function pointers to match. Don't
use nonstandard types to implement these types, and don't comment
on them in <machine/types.h>.
interupt level events. This needs a lot of cleanup, but has been working
here for a month or two.. originally needed for CAM integration
but that hasn't happenned yet. The probing state machines for each
handler should be replaced by a more generic state-service. It's
still quite messy in there..
mostly for objects that have the fewest dependencies on `Makefile'
(since they were mostly for utilities and objects generated from *.s
and these don't depend on profiling flags).
Give an explicit rule for building vnode_if.o. This fixes building
it without ${PROF}.
Use .ORDER instead of a stamp file to avoid building vnode_if.[ch]
concurrently.
Removed explicit dependencies that will be generated by `make' (.c.o)
or will be generated by mkdep.
Added missing dependencies of special objects on opt_global.h.
Use ${NORMAL_C} instead of special rules for special objects where
possible.
FIxed dependencies of vers.o.
just to ensure 32-bit variables. Doing so broke and/or pessimized
i386's with 64-bit longs (unnecessary use of 64-bit variables
caused remarkably few problems in C code, but the inline asm here
tended to fail because there are no 64-bit registers). Since the
interfaces here are very machine-dependent and shouldn't be used
outside of the kernel, use a standard types of "known" width instead
of fixed-width types.
Changed all quad_t's to u_int64_t's. quad_t isn't standard, and
using signed types for 64-bit registers was bogus (but made no
difference).
to ensure 32-bit variables. Doing so broke i386's with 64-bit
longs. Use fixed-size integral types instead of plain ints, shorts,
chars and pointers since the bootinfo struct layout is a binary
interface. The boot blocks could reasonably be implemented using
16-bit code.
least unsuitable for holding an object pointer. This should have been
used to fix warnings about casts between pointers and ints on alphas.
Moved corresponding existing general typedef (fptrint_t) for function
pointers from the i386 <machine/profile.h> to a kernel-only typedef
in <machine/types.h>. Kludged libc/gmon/mcount.c so that it can
still see this typedef.
is the kernel part of my commits, the userlevel stuff will be done in
a separate commit. Add the ability to suspend as well as hibernate to
syscons. Create a new virtual key like hibernate for suspend. Update
apm_bios.h to define more apm bios goodies.
There is only cdevsw (which should be renamed in a later edit to deventry
or something). cdevsw contains the union of what were in both bdevsw an
cdevsw entries. The bdevsw[] table stiff exists and is a second pointer
to the cdevsw entry of the device. it's major is in d_bmaj rather than
d_maj. some cleanup still to happen (e.g. dsopen now gets two pointers
to the same cdevsw struct instead of one to a bdevsw and one to a cdevsw).
rawread()/rawwrite() went away as part of this though it's not strictly
the same patch, just that it involves all the same lines in the drivers.
cdroms no longer have write() entries (they did have rawwrite (?)).
tapes no longer have support for bdev operations.
Reviewed by: Eivind Eklund and Mike Smith
Changes suggested by eivind.
Kapok Computer Co. notebook with AMI 'WinBIOS' which seems to insist
on having a short jump and nop as the first instructions in the
boot sector code. The prevailing theory is that the BIOS is doing
some sort of boot sector virus detection and refusing to run any
boot block that doesn't start with the same instruction sequence as
MS-DOG boot sector code. If this is the case, it would be nice if it
actually printed an error message to this effect instead of just
saying 'FAILED.'
This workaround has no effect on the boot sector code other than to
increase its size by three bytes.
code. Apart from the first one, none really affect typical configurations
but are nevertheless unnecessary limitations. We use netbooted PCs as
student X-terminals and all of the below fixes have been useful. Apologies
for including them all in one PR, but some are just too silly or trivial
to send on their own!
a) Newer SMC cards have hardware addresses starting with 00:E0.
Netboot compares the MAC address with 00:00:C0 to determine
if it is a WD/SMC card, so it fails to detect these.
b) Netboot is unable to boot kzipped kernels, as it assumes that
the kernel load address is 0x100000.
c) Users can abort the booting process and enter arbitrary network
addresses, or boot from a floppy disk. This can be a problem when
netbooted machines are used in a student environment.
d) It is not possible to set all options via bootp. For example there
is no way to remotely force a client to boot from disk. With both
SECURE_BOOT(patch below) and NO_TFTP defined, short of unplugging
the eprom there is no way at all to get the client to boot locally.
A generic solution is to allow complete netboot commands to be sent
using bootp lines such as:
:T132="diskboot":
e) The last character of netboot command names is not checked. You
can type 'iz 10.0.0.1' and it will be interpreted as 'ip'. This
is only important if you try to add a new command which is the
same as an existing one except for the last character.
f) We have a configuration where multiple servers are willing to serve
a diskless client. The tftp config file, or the bootptab entry on
each server must specify the root and swap filesystems as 'ip:/fs'
even though 'ip' will usually be the responding server's IP address.
It would be nice if netboot could automatically prepend the server's
IP address to an entry specified as just '/fs', so that multiple
servers can use the same tftp or bootp configuration files. Admittedly
this is hardly a major problem!
PR: 7098
Submitted by: Ian Dowse <iedowse@maths.tcd.ie>
NFS_MINATTRTIMO VREG attrib cache timeout in sec
NFS_MAXATTRTIMO
NFS_MINDIRATTRTIMO VDIR attrib cache timeout in sec
NFS_MAXDIRATTRTIMO
NFS_GATHERDELAY Default write gather delay (msec)
NFS_UIDHASHSIZ Tune the size of nfssvc_sock with this
NFS_WDELAYHASHSIZ and with this
NFS_MUIDHASHSIZ Tune the size of nfsmount with this
NFS_NOSERVER (already documented in LINT)
NFS_DEBUG turn on NFS debugging
also, because NFS_ROOT is used by very different files, it has been
renamed to opt_nfsroot.h instead of the old opt_nfs.h....
end of the main options section.
Turned on documented option OVERRIDE_TUNER. LINT is primarily
for turning on options, not for documenting them.
Don't list IPFILTER twice (once as broken).
mmioctl() to fix hundreds of style bugs and a few error handling bugs
(don't check for superuser privilege for inappropriate ioctls, don't
check the input arg for the output-only MEM_RETURNIRQ ioctl, and don't
return EPERM for null changes).
`void *' arg. Fixed or hid most of the resulting type mismatches.
Handlers can now be updated locally (except for reworking their
global declarations in isa_device.h).
Don't generate declarations for isa interrupt handlers at all.
Isa interrupt handlers are now declared in <i386/isa/isa_device.h>
but should be converted take a `void *' arg and staticized as
soon as possible.
Updated CONFIGVERS. New configs are very incompatible with
previous versions.
and don't depend on them being declared there. This will cause lots of
warnings for a few minutes until config is updated. Interrupt handlers
should never have been configured by config, and the machine generated
declarations get in the way of changing the arg type from int to void *.
over from the probe are now expected for incompatible UARTs that
deliver IRQs as a strobe (low) instead of a level (high).
Discard events on going-away devices too. Endless loops may have
been possible when an active pccard was removed.
Submitted by: Randall Hopper <rhh@ct.picker.com>
The patch supports using the X10 Mouse Remote in both stand-alone and
pass-through configurations, so you can plug your mouse and remote into the
same serial port, use the mouse for X, and use the remote for other apps
like Fxtv. For instance, we can now control fxtv via the remote control
just like a TV : change channels, mute, increase volume, zoom video,
freeze frame 8)
The mouse events are channeled through the syscons/sysmouse I/F like
normal, and the remote buttons are "syphoned off" to a UNIX-domain stream
socket (defined as _PATH_MOUSEREMOTE in <machine/mouse.h>) for a
remote-aware app to grab and use.
For further info on the X10 Mouse Remote see:
http://www.x10.com/products/x10_mk19a.htm
Define an unsigned version of off_t (uoff_t) if KERNEL is defined.
This is useful for micro-optimizing expressions involving off_t's
where you know that the values are non-negative but the compiler
doesn't know it.
Fixed a gratuitous ANSIism.
explicit use of `[unsigned] long long' and `[u]quad_t'.
Fixed disorder of and lack of comments for the types added in the previous
two commits. Improved some comments. The comments should be elswhere
(not duplicated in every MD file).
machine-independent code and try mounting the devices in the
lists instead of guessing alternative root devices in a machine-
dependent way.
autoconf.c:
Reject preposterous slice numbers instead of silently converting
them to COMPATIBILITY_SLICE.
Don't forget to force slice = COMPATIBILITY_SLICE in the floppy
device name.
Eliminated most magic numbers and magic device names in setroot().
Fixed dozens of style bugs.
vfs_conf.c:
Put the actual root device name instead of "root_device" in the
mount struct if the actual name is available. This is useful after
booting with -s. If it were set in all cases then it could be used
to do mount(8)'s ROOTSLICE_HUNT and fsck(8)'s hotroot guess better.