Commit Graph

12566 Commits

Author SHA1 Message Date
kato
f09370e8b5 Sync with sys/i386/conf/Makefile.i386 revision 1.127. 1998-10-28 10:48:37 +00:00
jkh
d68de0ddb3 Clarify a rather ambiguous debugging message. 1998-10-28 10:37:54 +00:00
dfr
49507bba0e Add BUS_DEBUG option in opt_bus.h 1998-10-28 08:37:10 +00:00
rnordier
25598ad6e0 Avoid interruptions while talking to keyboard controller. 1998-10-27 20:19:24 +00:00
rnordier
b845950ce7 biosboot compatibility fix: change behavior of backspace in getstr().
Noticed by: abial

Optimize away a few bytes to make space for the above.
1998-10-27 20:16:36 +00:00
dg
7850189506 Added needed splvm() protection around object page traversal in
vm_object_terminate().
1998-10-27 13:22:51 +00:00
bde
bd7a76a938 Oops, the redundant tests for major numbers weren't redundant here.
They checked for the magic major number for the "device" behind mfs
mount points.  Use a more obvious check for this device.

Debugged by:		Andrew Gallatin <gallatin@cs.duke.edu>
1998-10-27 11:47:08 +00:00
dfr
779bdcf310 Lots of debugging code and some bugfixes.
Submitted by: Nick Hibma <nick.hibma@jrc.it>
1998-10-27 09:21:43 +00:00
dfr
4131cb7a36 Some optimisations to the fragment reassembly code.
Submitted by: Don Lewis <Don.Lewis@tsc.tdk.com>
1998-10-27 09:19:03 +00:00
dfr
a5bf24db74 Fix a bug in the new fragment reassembly code which was tickled by recieving
a fragment which wholly overlapped one or more existing fragments.

Submitted by: Don Lewis <Don.Lewis@tsc.tdk.com>
1998-10-27 09:11:41 +00:00
bde
873d7be484 Removed redundant bitrotted checks for major numbers instead of updating
them.
1998-10-26 08:53:13 +00:00
bde
285a46e7e4 Updated the major number check in vfs_object_create(). It's not
clear if the check is necessary, but vfs_object_create() is called
for all vnodes and it was silly to create objects for VBLK vnodes
that don't even have a driver.
1998-10-26 08:07:00 +00:00
bde
84009a0905 Check the major number of the boot device more carefully. There was only
a problem if the boot blocks passed bad data.

Check the major number of the dump device consistently.
1998-10-26 07:05:34 +00:00
bde
1fcef92d07 Fixed breakage of the GPROF case of statclock() in the previous commit. 1998-10-26 06:13:18 +00:00
bde
2fee4bebdc Oops, back out some local changes that shouldn't have been in the
previous commit.
1998-10-25 20:11:36 +00:00
bde
1dabb16c3c Fixed breakage of the !SMP case of roundrobin() in the previous commit. 1998-10-25 19:57:23 +00:00
bde
558766fa94 Don't follow null bdevsw pointers. The `major(dev) < nblkdev' test rotted
when bdevsw[] became sparse.  We still depend on magic to avoid having to
check that (v_rdev) device numbers in vnodes are not NODEV.
1998-10-25 19:26:18 +00:00
bde
9fafc47653 Don't follow null bdevsw pointers. The `major(dev) < nblkdev' test rotted
when bdevsw[] became sparse.  We still depend on magic to avoid having to
check that (v_rdev) device numbers in vnodes are not NODEV.

Removed a redundant `major(dev) < nblkdev' test instead of updating it.

Don't follow a garbage bdevsw pointer for attempts to swap on empty
regular files.  This case currently can't happen.  Swapping on regular
files is ifdefed out in swapon() and isn't attempted for empty files
in nfs_mountroot().
1998-10-25 19:24:04 +00:00
bde
5a7ea1209a Don't follow null bdevsw pointers. The `major(dev) < nblkdev' test rotted
when bdevsw[] became sparse.  We still depend on magic to avoid having to
check that (v_rdev) device numbers in vnodes are not NODEV.

Removed redundant `major(dev) < nblkdev' tests instead of updating them.
1998-10-25 19:02:48 +00:00
phk
13c66194f4 Nitpicking and dusting performed on a train. Removes trivial warnings
about unused variables, labels and other lint.
1998-10-25 17:44:59 +00:00
bde
b17bde009a Fixed device number checking in bdevvp():
- dev != NODEV was checked for, but 0 was returned on failure.  This was
  fixed in Lite2 (except the return code was still slightly wrong (ENODEV
  instead of ENXIO)) but the changes were not merged.  This case probably
  doesn't actually occur under FreeBSD.
- major(dev) was not checked to have a valid non-NULL bdevsw entry.  This
  caused panics when the driver for the root device didn't exist.

Fixed minor misformattings in bdevvp().  Rev.1.14 consisted mainly of
gratuitous reformattings that seem to have caused many Lite2 merge
errors.

PR:			8417
1998-10-25 16:11:49 +00:00
bde
cccbefc35f Fixed sysctl attachment for statically configured vfs's.
Broken in:		previous commit
1998-10-25 10:52:34 +00:00
phk
d38224a611 Add some missing dependencies.
Grumbled about in principle:	bde
1998-10-25 07:23:32 +00:00
paul
138aad3569 Fix the interrupt mask generated for enabling/disabling interrupts 8 to 15. 1998-10-25 01:30:16 +00:00
phk
bfaec8d4e5 Update to current reality. We can now track several LORSTA on separate
minor devices.

Improve PLL/OCXO DAC dithering.

General remodeling.

Performance is now 2.5e-11 in frequency and +/- 100 nsec in time, both
of which are actually the limits of the transmitted signal.
1998-10-24 19:55:09 +00:00
phk
14fa987f11 Update and add timekeeping code. 1998-10-24 19:47:42 +00:00
phk
a3db931d4a Header file for XRPU devices. 1998-10-24 19:47:29 +00:00
msmith
f91e4bda2a Don't complain about SIOCGIFMEDIA; it's harmless and not something
useful here yet.

Submitted by:	markm and others
1998-10-24 18:55:53 +00:00
msmith
17ba85d5a0 Don't put 0x in front of %p, it does it already.
Submitted by:	 Brian Feldman <green@janus.syracuse.net>
1998-10-24 18:35:09 +00:00
msmith
2dd69edc85 Reserve some space for the stack in the region we recover from the initial
bootloader.
Submitted by:	dfr
1998-10-24 00:31:21 +00:00
msmith
2ca24369c0 Clean the ${BASE}.sym file as well. 1998-10-23 22:32:27 +00:00
msmith
15fb469d2d Remove a debugging copy of offsetof() that snuck in. 1998-10-23 22:30:52 +00:00
msmith
0fc1f23a6a Enable the PCI BIOS PnP enumerator. 1998-10-23 22:29:19 +00:00
msmith
186b62dab2 PnP enumerator using the PCI BIOS. This is needlessly complex due to the
lack of a simple "enumerate all PCI devices" function.
1998-10-23 22:29:08 +00:00
bde
b35bd08816 Ignore `vector xxxintr' specifications except for checking their syntax.
Interrupt handlers are now configured in drivers.

Didn't update config/SMM.doc.  It doesn't have any i386 examples (not
even `isa').

Bumped CONFIGVERS.  This is not necessary for -current yet, but using
the new config with old system sources gives null pointers for all
vectors.
1998-10-23 17:05:06 +00:00
kato
e5f2c0e337 Sync with sys/i386/isa/clock.c revision 1.128. 1998-10-23 13:13:43 +00:00
peter
ad78851424 Refer to vinum driver sources in a single location (outside of the
kernel src/sys tree, sigh - it should really be sys/dev/vinum/*).
1998-10-23 11:56:45 +00:00
peter
b08b3e4285 Move the kld stuff to here. 1998-10-23 11:49:47 +00:00
phk
2e36499ddf Update timecounters to new interface. 1998-10-23 10:46:20 +00:00
phk
8419aeb4de Change the way we simulate stable storage for timecounters.
If you have problems with the "calcru" messages and processes being
killed for excessive cpu time, try to increase the NTIMECOUNTER
#define and report your findings.
1998-10-23 10:44:52 +00:00
phk
e7a8171566 Remove the tc_cost field from timecounters. 1998-10-23 10:42:42 +00:00
dg
b898ae170b Oops, revert part of last fix. vm_pager_dealloc() can't be called until
after the pages are removed from the object...so fix the problem by
not printing the diagnostic for wired fictitious pages (which is normal).
1998-10-23 05:43:13 +00:00
dg
599836ef43 Fixed two bugs in recent commit: in vm_object_terminate, vm_pager_dealloc
needs to be called prior to freeing remaining pages in the object so that
the device pager has an opportunity to grab its "fake" pages. Also, in
the case of wired pages, the page must be made busy prior to calling
vm_page_remove. This is a difference from 2.2.x that I overlooked when
I brought these changes forward.
1998-10-23 05:25:49 +00:00
ken
123c4e5742 Fix a problem with the way we handled device invalidation when attaching
to a device failed.

In theory, the same steps that happen when we get an AC_LOST_DEVICE async
notification should have been taken when a driver fails to attach.  In
practice, that wasn't the case.

This only affected the da, cd and ch drivers, but the fix affects all
peripheral drivers.

There were several possible problems:
 - In the da driver, we didn't remove the peripheral's softc from the da
   driver's linked list of softcs.  Once the peripheral and softc got
   removed, we'd get a kernel panic the next time the timeout routine
   called dasendorderedtag().
 - In the da, cd and possibly ch drivers, we didn't remove the
   peripheral's devstat structure from the devstat queue.  Once the
   peripheral and softc were removed, this could cause a panic if anyone
   tried to access device statistics.  (one component of the linked list
   wouldn't exist anymore)
 - In the cd driver, we didn't take the peripheral off the changer run
   queue if it was scheduled to run.  In practice, it's highly unlikely,
   and maybe impossible that the peripheral would have been on the
   changer run queue at that stage of the probe process.

The fix is:
 - Add a new peripheral callback function (the "oninvalidate" function)
   that is called the first time cam_periph_invalidate() is called for a
   peripheral.

 - Create new foooninvalidate() routines for each peripheral driver.  This
   routine is always called at splsoftcam(), and contains all the stuff
   that used to be in the AC_LOST_DEVICE case of the async callback
   handler.

 - Move the devstat cleanup call to the destructor/cleanup routines, since
   some of the drivers do I/O in their close routines.

 - Make sure that when we're flushing the buffer queue, we traverse it at
   splbio().

 - Add a check for the invalid flag in the pt driver's open routine.

Reviewed by:	gibbs
1998-10-22 22:16:56 +00:00
msmith
6149131893 PnP BIOS enumerator; mostly useful for hunting PnP devices that are supported
by the system BIOS rather than supporting ISA PnP.
1998-10-22 20:25:06 +00:00
msmith
2cb346f288 Add a dependancy on the BTX crt0 object
Add the biospnp handler to the pnp handler array
Drop some old debugging code
1998-10-22 20:23:58 +00:00
msmith
0d28177be8 Add biospnp.c 1998-10-22 20:23:15 +00:00
msmith
472b37dea8 Pop the return address off the stack before making a V86_CALLF call;
this allows us to implement what look like C function calls from user
space "directly" to v86 mode code.  (Used for calling the PnP BIOS)
1998-10-22 20:22:07 +00:00
msmith
973bf97487 Export an interface for presetting the ISA PnP read port address.
Make the EISA ID formatter generally available
1998-10-22 20:20:51 +00:00
wpaul
12c7722945 Close PR #8409:
Fix syntax errors inside #ifdef FORCE_AUTONEG_TFOUR.
1998-10-22 16:46:26 +00:00
bde
4622a6c44b Removed all `vector xxxintr' specifications. Interrupt handlers are now
configured in drivers.

Don't quote port names that don't have a digit in them.
1998-10-22 16:16:02 +00:00
wpaul
5889df5c8e Close PR #8384:
Revert the transmission packet queueing strategy changes. Clearly I missed
something while debugging this, although I never encountered any problems
on my test machines.

Also make one other minor change: jack up the TX reclaim threshold for
3c90xB adapters in order to stave off 'transmission error: 82' errors.

Document the existence of the tx reclaim register (for inspecting the
current reclaim threshold) in register window 5 (if_xlreg.h).
1998-10-22 15:52:25 +00:00
bde
d58c79316c Removed all `vector xxxintr' specifications. Interrupt handlers are now
configured in drivers.
1998-10-22 15:39:35 +00:00
bde
ea9f5ec2f0 Removed all `vector xxxintr' specifications. Interrupt handlers are now
configured in drivers.
1998-10-22 15:31:33 +00:00
bde
f89f94ea93 Quote port names that have a digit in them. IO_TIMER1 was lexed as
{ port_name = "IO_TIMER", port_number = 1 } and only worked because
it was reassembled to "IO_TIMER1".  Trailing digits always work, but
this is too magic to depend on.

Don't quote port names that don't have a digit in them.
1998-10-22 13:49:51 +00:00
bde
041b424399 Removed all `vector xxxintr' specifications. Interrupt handlers are now
configured in drivers.
1998-10-22 12:23:04 +00:00
bde
26033041e3 Fixed the ifdef for `uart' driver being present. The sound-driver-specific
ifdef used in uart6850.c is bogus.

Reported by:	Paul Allenby <pallenby@mikom.csir.co.za>
1998-10-22 11:41:22 +00:00
kato
c3cf05a4e9 Added rl driver. 1998-10-22 11:29:58 +00:00
luigi
b4eeb12a4c Fix behaviour of the driver with small files -- due to a stupid
bug sound was not played if the total amount of data written to
the device was less than one blocksize

Noticed by: NABETANI Masaki and FreeBSD-users-jp
1998-10-22 11:20:33 +00:00
bde
8bfaa707a6 The previous change was much too simple to actually compensate for
braindamage in sound driver confiruration.  Attempt to only reference
interrupt handlers if their driver is configured.
1998-10-22 10:34:11 +00:00
bde
df88297cad Initialize isa_devtab entries for interrupt handlers in individual
device drivers, not in ioconf.c.  Use a different hack in isa_device.h
so that a new config(8) is not required yet.

pc98 parts approved by: kato
1998-10-22 05:58:45 +00:00
dg
b8a68d9fd9 Make the VM system handle the case where a terminating object contains
legitimately wired pages. Currently we print a diagnostic when this
happens, but this will be removed soon when it will be common for this
to occur with zero-copy TCP/IP buffers.
1998-10-22 02:16:53 +00:00
dg
b173a5087c Defer rundown (m_freem) of completed transmit buffers for no longer
than 1 second.
1998-10-22 02:00:49 +00:00
dg
e51a9e30ea Convert fake page allocs to use the zone allocator, thus eliminating the
private pool management code in here.
1998-10-22 01:45:29 +00:00
dg
268ea3fc13 Set m->object to NULL in dev_pager_getfake(). 1998-10-21 23:06:50 +00:00
msmith
238c591219 Bye-bye setdefs. 1998-10-21 20:11:03 +00:00
msmith
edf2081f84 - Enable PnP and ISA PnP code.
- Use the ISA PnP enumerator.
 - Use the new linker set code, throw out the gensetdefs stuff.
 - Produce an intermediate loader image that has symbols stripped, to aid
 - in debugging.
 - Supply ISA port access functions required for ISA PnP
1998-10-21 20:10:33 +00:00
msmith
702529216c Don't depend on being part of the kernel tree. If we are, use the kernel's
<machine> includes rather than the system's.
1998-10-21 20:07:57 +00:00
msmith
880061ca43 Make ISA PnP work. This successfully enumerates as many ISA devices as I
can fit into my test machine.

 - Move to using STAILQs rather than ad-hoc singly-linked lists.
 - Use a mostly procedural interface to the PnP information.  This
   improves data-hiding.

Implement a new linker-set technique (currently on i386 only but should work
on Alpha as well).  This is a good candidate for replacing the current
gensetdefs cruft completely.
1998-10-21 20:07:05 +00:00
rnordier
34b1dd6005 Get things limping along again for the 80386 and friends. The
ELF assembler emits a redundant operand-size prefix for the
fnstsw %ax instruction, and this stops the show for 3.0-RELEASE.
1998-10-21 17:10:49 +00:00
jdp
74b341f8c8 Eliminate a superfluous comment. 1998-10-21 16:31:38 +00:00
dg
92891f8e3d Nuked PG_TABLED flag. Replaced with m->object != NULL. 1998-10-21 14:46:42 +00:00
dg
bbfdc21592 Add a diagnostic printf for freeing a wired page. This will eventually
be turned into a panic, but I want to make sure that all cases of freeing
pages with wire_count==1 (which is/was allowed) have first been fixed.
1998-10-21 11:43:04 +00:00
dg
3bb5ec13b6 Decrement the now unused page table page's wire_count prior to freeing it.
It will soon be required that pages have a zero wire_count when being
freed.
1998-10-21 11:38:14 +00:00
grog
c4f583ab45 config.c:
config_drive:
    Catch an instance of anonymous drives.  Doubtless many remain.

interrupt.c:
  complete_rqe:
    Call logrq to log iodone events if DEBUG_LASTREQS is set.

    Call set_sd_state with setstate_noupdate to avoid buffered I/O out
    of interrupt context.

    Use define DEBUG_RESID instead of constant.

memory.c:
  Remove dead expandrq() function

  Malloc:
    Remove directory component of file names in malloc table.

  Add function vinum_rqinfo (part of the request tracing stuff).

request.c:
  Add function logrq (part of the request tracing stuff).

  vinumstrategy:
    Check whether config needs to be written to disk, do it if so.
    This is a stopgap until the Vinum daemon (bacchusd?  oenologistd?)
    is written.

    If DEBUG_LASTREQS is set, call logrq to log user buffer headers.

  launch_requests:
    Correct format of debug output to console.

    If DEBUG_LASTREQS is set, call logrq to log request elements.

request.h:
  Add definitions for request trace.

state.c:
  set_sd_state:
    Check flags for setstate_noupdate.  If set, don't write the config
    to disk, just set global VF_DIRTYCONFIG flag.  This is part of the
    kludge to avoid writing config from an interrupt context.

vinumext.h:
    Add declaration for vinum_rqinfo, put inside #ifdef DEBUG
    Remove dead macro expandrq

vinumio.h:
  Increase maximum ioctl reply length to 4 kB if DEBUG is set.
  Define VINUM_RQINFO ioctl if DEBUG is set.

vinumioctl.c:
  vinumioctl:
    Change implementation of VINUM_DEBUG ioctl: use a debug flag
    (DEBUG_REMOTEGDB) to decide whether to go into remote debugging or
    not.

    Implement VINUM_RQINFO.

vinumkw.h:
  Define kw_info even when not debugging.

vinumvar.h:
  Define VF_DIRTYCONFIG
  Add pointers to request info to vinum_info if DEBUG is set.
  Define setstate_noupdate
  Define additional debug bits DEBUG_RESID, DEBUG_LASTREQS and
  DEBUG_REMOTEGDB.
1998-10-21 08:32:32 +00:00
rnordier
f8807b8fc1 Make serial port, data format, and bps configurable. 1998-10-20 20:20:48 +00:00
msmith
387d413043 Hex constants should only have one '0x' prefix. 1998-10-20 02:43:28 +00:00
wpaul
3c0d8db921 Modify the transmit packet queuing strategy a bit to be a little less
agressive. With the old code, if a descriptor chain was already on its
way to the chip, xl_start() would try to splice new chains onto the end
of the current chain by stopping the transmitter, modifying the tail
pointer of the current chain to point to the head of the new chain, then
restart the transmitter. The manual says you're allowed to do this and
it works, but I'm not too keen on it anymore.

The new code waits until the eixsting chain has been sent and then
queues the next waiting chain in the 'transmit ok' handler.

Performance still looks good one way or the other.
1998-10-19 22:08:56 +00:00
rnordier
59abe72c15 Make configurable (a) whether to use int 0x13 extensions; (b) timeout
value.  Ignore failure to update mbr sector.  Disable interrupts while
using extended registers.  Default to F1 not F2.
1998-10-19 19:13:53 +00:00
dfr
5e48f3a376 Reclaim the 48k used by the first bootstrap stage by adding it to the malloc
pool.
1998-10-19 09:12:41 +00:00
dfr
11bd3a0836 Rename boot2 to loader. 1998-10-18 19:05:07 +00:00
dfr
dc962160ec R_ALPHA_RELATIVE relocations need to add the value to the existing memory
contents.
1998-10-18 19:04:13 +00:00
wpaul
dd72da46f8 Add driver support for PCI fast ethernet adapters based on the
RealTek 8129/8139 chipset like I've been threatening. Update kernel
configs, userconfig.c, relnotes and sysinstall. No man page yet;
comming soon.

I consider this driver stable enough that I want to give it some
exposure in -current.
1998-10-18 16:24:34 +00:00
kato
4bd11d7633 Commented out aic. 1998-10-18 15:55:20 +00:00
peter
20984da255 Some cleanups and optimizations:
- Use the system headers method for Elf32/Elf64 symbol compatability
- get rid of the UPRINTF debugging.
- check the ELF header for compatability much more completely
- optimize the section mapper.  Use the same direct VM interfaces that
  imgact_aout.c and kern_exec.c use.
- Check the return codes from the vm_* functions better.  Some return
  KERN_* results, not an errno.
- prefault the page tables to reduce startup faults on page tables like
  a.out does.
- reset the segment protection to zero for each loop, otherwise each
  segment could get progressively more privs. (eg: if the first was
  read/write/execute, and the second was meant to be read/execute, the
  bug would make the second r/w/x too.  In practice this was not a
  problem because executables are normally laid out with text first.)
- Don't impose arbitary limits.  Use the limits on headers imposed by
  the need to fit them into one page.
- Remove unused switch() cases now that the verbose debugging is gone.

I've been using an earlier version of this for a month or so.
This sped up ELF exec speed a bit for me but I found it hard to get
consistant benchmarks when I tested it last (a few weeks ago).
I'm still bothered by the page read out of order caused by the
transition from data to bss. This which requires either part filling the
transition page or clearing the remainder.
1998-10-18 15:55:12 +00:00
peter
6f3b588dc2 Add an ELF_MACHINE_OK() macro for compatability with the Alpha version. 1998-10-18 15:31:23 +00:00
kato
2aa1d02474 Update SMP-GENERIC98 to something a bit more recent based on GENERIC98. 1998-10-18 14:02:43 +00:00
kato
d42fb5118d Sync with sys/i386/conf/GENERIC revision 1.125. 1998-10-18 13:58:16 +00:00
phk
90527e8470 Add a missing ++.
Noticed by:	gcc via phk
Submitted by:	Mike Spengler <mks@networkcs.com>
1998-10-18 11:58:57 +00:00
phk
9b06553dba Added missing dependency for bus_if.o on bus_if.h 1998-10-18 10:57:55 +00:00
peter
a7c8a51854 Initialize earlier (ie: before npx) in case it makes any difference.
Print a message when it attaches to pmath_emulate if bootverbose so that
we can be sure it's online.
1998-10-18 07:44:33 +00:00
peter
a49ba65081 Print a message if bootverbose that the emulator is present in the kernel.
Move the initialization before isa_configure() and npx, in case npx does
something to initialize the state of the emulator somehow.

I do not have any machines without a FPU so that I can test this with -
except an old 386sx motherboard in a box somewhere that might work...
1998-10-18 07:40:29 +00:00
peter
d41a8c5309 OOPS!
Supply the moduledata handle rather than the event dispatcher function.
This should explain the panic on boot problem that's been discussed in
-current at the moment.  Both machines had GNU_MATH_EMULATE.
1998-10-18 04:36:58 +00:00
rnordier
d3a9e969df Set BINMODE to 444. 1998-10-17 14:20:25 +00:00
rnordier
8671c8b39b Fix some glitches in the input routine:
Don't display a \b if not acting on it.
Don't process binary zero chars (which result from pressing function
keys, etc. on the PC).
1998-10-17 11:25:05 +00:00
rnordier
ce63af0fef Having probed the keyboard, turn off the -P flag. 1998-10-17 10:35:15 +00:00
rnordier
638a858945 Treat all options as toggles (ie. -c -c is the same no -c). Since
the boot.config settings are persistent, this seems to provide a
useful override capability, and should break only on broken
boot.config's.

Output a cosmetic newline if booting with no input.
1998-10-17 09:50:09 +00:00
bde
1be558ae51 Overload the correct errno for attempts to set an in-core label with
a raw partition at a nonzero offset (EINVAL should have been EXDEV;
DIOCSDINFO was broken, and DIOCWDINFO was broken because it depended
on DIOCSDINFO).

A zero offset for the raw partition should probably be enforced in
setdisklabel(), and DIOCWDINFO should probably always be handled by
first calling setdisklabel() so that writedisklabel() doesn't need to
enforce it, but this has never been done; dsioctl() has a special
check.  Changes in this commit are limited to dsioctl() to preserve
bug for bug compatibility in drivers that don't use the slice code
(notably the ccd driver, which allows setting a bogus label in
DIOCWDINFO and doesn't undo the setting when writedisklabel() fails).
1998-10-17 09:46:42 +00:00
rnordier
19b83af292 biosboot compatibility fix:
If we have a boot.config command, display it.
1998-10-17 09:16:01 +00:00
rnordier
ebcd17d6c6 biosboot compatibility fix:
Read boot.help before parsing boot.config.  We were parsing
boot.config first, which could result in boot.help being read
from a different location (or not found), which would probably
just cause surprise, without being useful.
1998-10-17 09:01:13 +00:00
bde
b92f5250f9 Use only the correct raw partition for writing labels. Don't use the
partition that the label ioctl is being done on just because it has
offset 0, since there is no guarantee that such a partition is large
enough to contain the label.  Don't use the wrong raw partition (0
instead of RAW_PART).

This fixes problems rewriting bizarre labels (with a nonzero offset
for the 'a' partition) in newfs(8).  Such labels shouldn't normally
be used, but creating them was allowed if the ioctl was done on the
raw partition, and sysinstall creates them if the root partition isn't
allocated first.

Note that allowing write access to a partition other than the one that
has been checked for write access doesn't increase security holes
significantly, since write access to any partition already allows
changing the in-core label.

This fix should be in 3.0R.  Rev.1.26 of newfs/newfs.c shouldn't be
in 3.0R.
1998-10-17 07:49:04 +00:00
peter
37e9ac7609 Load the first page of the file and use the headers in it. This should
avoid the need to seek back to offset zero which is causing trouble on
the Alpha with a gzipped kernel.
1998-10-17 03:06:38 +00:00
alex
e51cdb65fb Complete the description of sio flag 0x40.
Reviewed by:	bde
1998-10-16 22:26:19 +00:00
msmith
0250d0a60a Turn of disk debugging by default (suppress annoying "partition marked as
unused" diagnostic on floppies).
1998-10-16 19:26:11 +00:00
kato
fabfe75171 Commented out bs driver. 1998-10-16 16:22:35 +00:00
jkh
f598ae3929 fixup for alpha. 1998-10-16 10:14:21 +00:00
jkh
725fd5a896 fixup for the alpha. tag slid forward, since it's benign for the x86. 1998-10-16 10:13:09 +00:00
jkh
ef590ab720 Back to -current again. 1998-10-16 06:55:36 +00:00
jkh
756fa48ea6 post-tag version bump. We're now back at 3.0-current! 1998-10-16 06:55:07 +00:00
peter
fadc81aa18 Update SMP-GENERIC to something a bit more recent based on GENERIC.
Approved by: jkh
1998-10-16 04:44:05 +00:00
peter
c10eb805a7 Missed this file. 1998-10-16 04:31:35 +00:00
peter
ac52f6b758 Sample initial set of kld-ified modules. Not all have been completely
converted yet.  These are more of a starting point.  This is NOT connected
to the parent Makefile.

OK'ed by jkh (who is ever so patiently waiting)
1998-10-16 04:30:52 +00:00
jkh
a42506e5fa Bump freebsd version #. 1998-10-16 04:28:04 +00:00
peter
464de37ce6 *gulp*. Jordan specifically OK'ed this..
This is the bulk of the support for doing kld modules.  Two linker_sets
were replaced by SYSINIT()'s.  VFS's and exec handlers are self registered.
kld is now a superset of lkm.  I have converted most of them, they will
follow as a seperate commit as samples.
This all still works as a static a.out kernel using LKM's.
1998-10-16 03:55:01 +00:00
peter
ad0030e392 Fix some bugs in link_aout.c caused by using uninitialized malloc space.
Pre-Approved by:  jkh
1998-10-16 03:45:35 +00:00
peter
657e5a0406 Update the kld glue
Pre-Approved by: jkh
1998-10-16 03:32:03 +00:00
peter
a8354e7057 "fix" the gzipped kernel load problem by having the loader check that it
can seek back to the first PT_LOAD and doing a close/reopen if it cannot.
This is because the first PT_LOAD section includes the ELF headers.
This fixes gzipped kernels on the i386, it should solve mike's problem
for the Alpha.
1998-10-16 03:04:15 +00:00
jkh
f6a4576494 Change to 3.0-RELEASE in anticipation of the tag. 1998-10-16 02:08:20 +00:00
obrien
ee74ab62dd Add commented out bpf entry. (DHCP is popular here, and this is required).
Ok'ed by:	jkh
1998-10-16 01:30:11 +00:00
gibbs
335fec2c78 -Wunused cleanup.
Correct a problem where an external bus reset on the 'background' channel of
a Twin Channel EISA controller could put the driver into an infinite loop.

Noticed by: Twin Channel bug, Joerg Wunsch <joerg@FreeBSD.org>
Submitted by: -Wunused, Poul-Henning Kamp <phk@freebsd.org>
1998-10-15 23:49:27 +00:00
gibbs
ef8c2c33b6 -Wunused cleanup.
Fixed bug in advansys.c where we did not properly clean up ccb_info data
structures in softc teardown.

Submitted by:	Poul-Henning Kamp <phk@freebsd.org>
1998-10-15 23:47:14 +00:00
gibbs
8111be0235 -Wunused cleanup.
Submitted by:	Poul-Henning Kamp <phk@freebsd.org>
1998-10-15 23:46:33 +00:00
gibbs
f3dbbe3c84 Honor CAM_TAG_ACTION_NONE. 1998-10-15 23:17:58 +00:00
gibbs
391b30cdfa Add a mechanism to send a non-tagged transaction even if a device is
currently operating in a tagged mode.  The SIM driver should determine
if a device is in tag mode by looking at the CAM_TAG_ACTION_VALID flag
in the ccb header.  If the flag is set, the tag_action field is either
a SCSI II tag message (simple, ordered, head) or CAM_TAG_ACTION_NONE
to specify that no tagging should be performed.
1998-10-15 23:17:35 +00:00
rnordier
764f911a88 Fix path to sio.s 1998-10-15 22:08:13 +00:00
dfr
8d976b1320 Fix a typo preventing the correct value of kernend from being picked up
from the bootstrap.  Also change some debug printfs from #if 0 to
#ifdef DEBUG_CLUSTER to make it easier to debug startup memory problems.
1998-10-15 22:00:54 +00:00
dfr
69efe6cf4e Change some printfs so that ELF_VERBOSE prints meaningful values on the alpha. 1998-10-15 21:56:47 +00:00
dfr
8c5d5288fb Fix the bootinfo so that the right values actual make it into the kernel. 1998-10-15 21:55:58 +00:00
rnordier
0b71e4f0b7 Add serial, dual, and probe-keyboard support. 1998-10-15 20:04:21 +00:00
imp
a0e096d460 Reduce the number of ccbs to 16, per the aha documentation. Move
bogus comment to proper place.

This should fix the hangs people are seeing under very heavy load, at
least it does for me.  Please let me know if you continue to have
problems.
1998-10-15 19:53:30 +00:00
ken
4af1fad569 Fix several potential buffer overrun conditions. These changes have been
tested both in the kernel and in userland.  Also, fix a couple of printf
warnings that show up when CAMDEBUG is defined.

Reviewed by:		imp
Partially submitted by:	imp
1998-10-15 19:08:58 +00:00
gibbs
9ede5f09d8 Bring back support for honoring the primary channel setting for twin channel
EISA adapters.  This could have caused the system to find the wrong root
disk.

Reviewed by:	 J Wunsch <j@ida.interface-business.de>
1998-10-15 18:21:50 +00:00
ken
8c808a1f97 Clean up some unused variables.
Reviewed by:	ken
Submitted by:	phk
1998-10-15 17:46:26 +00:00
peter
5e2d525772 - bzero() after malloc() bug fix
- look up relocation symbol names in correct table bugfix.
- remove unused (initialized to 0) variable and conditional free() of it.
1998-10-15 17:16:24 +00:00
peter
1ced1025f2 - bzero() after malloc(). This is especially obvious when kern_malloc is
compiled with DIAGNOSTIC.
- Don't break from the preload module processing loop prematurely.
1998-10-15 17:12:12 +00:00
peter
184dca28fb Fix sysinit_add().
- Don't include multiple copies of the previous sysinit in the new one.
- Leave space for and explicitly null terminate the new list.
1998-10-15 17:09:19 +00:00
peter
d1bde99276 Get the last used address via a more conservative method, don't depend
on the module chain being in increasing address order.
1998-10-15 17:06:36 +00:00
dfr
87a0ba4fba Change a bogus cast to the correct one. 1998-10-15 09:53:27 +00:00
dfr
ca8fc41182 Don't frob the user stack directly, use suword instead. This fixes the
elf_freebsd_fixup() panic which many people have noticed on the alpha.
1998-10-15 09:52:19 +00:00
dfr
7fffd12601 Use the interface name as well as the method name when creating the method
description.

Submitted by: Nick Hibma <nick.hibma@jrc.it>
1998-10-15 09:50:45 +00:00
sos
42b4d56210 Make the next_writeable address specific for each drive, there might
be more than one burner online.
1998-10-15 08:11:55 +00:00
peter
d13c281654 Forgot to commit this; the alpha uses the kld symbol interface now. The
tables that db_elf.c is expecting are not loaded in that format any more.
1998-10-15 02:01:50 +00:00
ken
65106e9e36 Narrow the quirk entry for the Seagate Elite 9 a bit to just cover drives
with 71* firmware revisions.  Scott Mace <smace@intt.ORG> reports that
drives with 00* firmware revisions do tagged queueing just fine.
1998-10-14 22:51:51 +00:00
ken
6149411f1d Disable tagged queueing for the Seagate Elite 9GB drives. They tend to get
hung up when you send tags to them too quickly.  (CAM is able to recover
from the problem, but this just avoids it altogether.)

Reviewed by:	gibbs
Reported by:	Bret Ford <bford@uop.cs.uop.edu>
	and:	Martin Renters <martin@tdc.on.ca>
1998-10-14 21:17:39 +00:00
ken
f6b726eb48 Disable the 'devstat_end_transaction' busy count printf until after 3.0
release goes out the door.  We know there's a bug in the devstat
implementation in the wd driver, but bde and msmith haven't been able to
fix it yet.

So, disable the printf to avoid confusing/worrying people.

Suggested by:	msmith
1998-10-14 20:44:05 +00:00
rnordier
fa52c3954a Activate boot2. 1998-10-14 20:40:56 +00:00
mjacob
79798ff9eb Andrew Gallatin reported some internal queue overflows with MAXISPREQUEST
at 256. So- to be safe, let's roll back to 64 while we do some more
investigating.
1998-10-14 16:55:00 +00:00
dt
1f69c742ab Backed out rev. 1.164. It caused problems on SMP.
PR:		8309
1998-10-14 15:05:52 +00:00
peter
1a9a80c3f7 Link fdboot to boot1 as well. 1998-10-14 13:19:52 +00:00
peter
9a0107aa1b Fix a warning I missed before. 1998-10-14 10:08:35 +00:00
peter
4523e75227 Typo fix. 1998-10-14 10:04:32 +00:00
peter
a6df719969 Initial attempt to update the Alpha loader and kernel to use the machine
independent elf loader and have access to kld modules.  Jordan and I were
not sure how to create boot floppies, and the things we tried just made
SRM laugh in our faces - but it was upset at boot1 which was not touched
by these changes.  Essentially this has been untested. :-(

What this does is to steal the last three slots from the nine spare longs
in the bootinfo_v1 struct to pass the module base pointer through.

The startup code now to set up and fills in the module and environment
structures, hopefully close enough to the i386 layout to be able to use
the same kernel code.  We now pass though the updated end of the kernel
space used, rather than _end. (like the i386).

If this does not work, it needs to be beaten into shape pronto.  Otherwise
it should be backed out before 3.0.

Pre-approved in principle by: dfr
1998-10-14 09:53:25 +00:00
peter
5b60e1fc6a Revert part of previous commit. vaddr_t doesn't exist on FreeBSD. This
didn't affect the x86 kernel due to #ifdefs.  It broke FreeBSD/Alpha
kernel compiles though.
1998-10-14 08:31:27 +00:00
peter
5e3acbf57e Try and get the sys/* and machine/* includes via relative paths. This
saves having to do a 'make includes' after touching any header file for
the boot code.
1998-10-14 07:08:16 +00:00
peter
0966fead52 Align to sizeof(long) rather than sizeof(int32_t). It needs to be
long because this code is shared with the alpha.  I hope the alpha can
read 32 bit ints at 32 bit alignment (vs. 64 bit alignment).
1998-10-14 05:07:23 +00:00
peter
2a0b7f6488 Support encapsulating ELF linker sets for KLD modules via gensetdefs.
Support name based dependencies at build time.  This is a hack.
These only affect KLD modules.
1998-10-14 04:04:22 +00:00
rnordier
f844028be7 Fix btx include path. 1998-10-14 01:53:56 +00:00
jkh
b9d923f32c DB_ELF_SYMBOLS doesn't appear to do anything yet, or if it does it's
not been added to the appropriate options file.  Comment it out to
prevent config(8) warnings.
1998-10-14 00:42:02 +00:00
peter
b059e72205 Tweak the output one more time again. The kernel or module pathname
is useful, and usually fits all on one line with the load sizes.
1998-10-14 00:41:17 +00:00
rnordier
e4f3dfea8d Include <bsd.prog.mk>. Add install target (to /boot for now). 1998-10-14 00:24:16 +00:00
rnordier
828b808519 Fix flow of control after directory listing; enable EDD support;
cosmetics.
1998-10-13 23:43:38 +00:00
ken
c27186df49 Disable cache syncs for a broken NEC drive.
Reviewed by:	gibbs
Submitted by:	Blaz Zupan <blaz@gold.amis.net>
1998-10-13 23:34:54 +00:00
rnordier
0cb607c6dc Make v86.ctl default more explicit; simplify read error-handling;
twiddle.
1998-10-13 23:00:47 +00:00
rnordier
a168d3cb17 Adjust NDEV value.
Optimize reading of system time.
1998-10-13 22:17:05 +00:00
ken
3edc6b1249 Fix a bug in the error recovery code. It was possible to have more than
one error recovery action oustanding for a given peripheral.

This is bad for several reasons.  The first problem is that the error
recovery actions would likely be to fix the same problem.  (e.g., we
queue 5 CCBs to a disk, and the first one comes back with 0x04,0x02.  We
start error recovery, and the second one comes back with the same status.
Then the third one comes back, and so on.  Each one causes the drive to get
nailed with a start unit, when we really only need one.)

The other problem is that we only have space to store one CCB while we're
doing error recovery.  The subsequent error recovery actions that got
started were over-writing the CCBs from previous error recovery actions,
but we still tried to call the done routine N times for N error recovery
actions.  Each call to dadone() was done with the same CCB, though.  So on
the second one, we got a "biodone: buffer not busy" panic, since the buffer
in question had already been through biodone().

In any case, this fixes things so that any any given time, there's only one
error recovery action outstanding for any given peripheral driver.

Reviewed by:	gibbs
Reported by:	Philippe Regnauld <regnauld@deepo.prosa.dk>
[ Philippe wins the "bug finder of the week" award ]
1998-10-13 21:41:32 +00:00
jkh
4c78bf40b0 Sync up with some needed x86 options. 1998-10-13 21:38:46 +00:00
rnordier
4c49cf4675 Change to a 15-sector boot2.
Refine slice-handling.
1998-10-13 21:35:42 +00:00
ken
cdb18fc927 Fix a bug in the scan lun code that showed up when we did the following
sequence of things:

- spin up a disk
  - send an async event to refresh the inquiry data
    - run through xpt_scan_lun() to re-probe the device
        - eventually finish the probe, but panic in xpt_done() because the
          periph pointer wasn't set.

Reviewed by:	gibbs
Reported by:	Philippe Regnauld <regnauld@deepo.prosa.dk>
1998-10-13 21:29:04 +00:00
rnordier
05e05b3c64 Don't use an absolute path to objcopy.
Noticed by: Scott Mace <smace@intt.org>
1998-10-13 18:29:18 +00:00
rnordier
38a0335208 Improve drive recognition and handling. 1998-10-13 17:41:06 +00:00
bde
8ccf93af58 Fixed bloatage of `struct inode'. We used 5 "spare" fields for ext2fs,
but when i_effnlink was added to support soft updates, there was only
room for 4 spares.  The number of spares was not reduced, so the inode
size became 260 (on i386's), or 512 after rounding up by malloc().
Use one spare field in `struct dinode' instead of the 5th spare field
in the inode and reduced to 4 spares in the inode so that the size is
256 again.

Changed the types of the spares in the inode from int to u_int32_t
so that the inode size has more chance of being <= 256 under other
arches, and downdated ext2fs to match (it was broken to use ints
before rev.1.1).
1998-10-13 15:45:43 +00:00
kato
a0bd27d4cf Sync with sys/i386/isa/isa.c and wd.c revisions 1.115 and 1.177,
respectively.
1998-10-13 09:44:09 +00:00
kato
49bb740f0c Sync with sys/i386/i386/userconfig.c revision 1.112. 1998-10-13 09:43:09 +00:00
peter
a368279cfc Load the full symbol tables if they are present. This means that ddb
and tracebacks have access to local symbols.  This is particularly
important for the Alpha.
1998-10-13 09:27:00 +00:00
peter
f266373595 Make the ELF load messages cleaner. 1998-10-13 09:25:27 +00:00
peter
0a85490bea Update from NetBSD if_de.c 1.72 to 1.80. This is mostly bugfixes, and
looks like it will have most effect on decoding device capabilities and
configuration.

Approved by: jkh
1998-10-13 09:05:58 +00:00
dg
3defb6d13f Fixed two potentially serious classes of bugs:
1) The vnode pager wasn't properly tracking the file size due to
   "size" being page rounded in some cases and not in others.
   This sometimes resulted in corrupted files. First noticed by
   Terry Lambert.
   Fixed by changing the "size" pager_alloc parameter to be a 64bit
   byte value (as opposed to a 32bit page index) and changing the
   pagers and their callers to deal with this properly.
2) Fixed a bogus type cast in round_page() and trunc_page() that
   caused some 64bit offsets and sizes to be scrambled. Removing
   the cast required adding casts at a few dozen callers.
   There may be problems with other bogus casts in close-by
   macros. A quick check seemed to indicate that those were okay,
   however.
1998-10-13 08:24:45 +00:00
kato
3280e5edc1 Commented out aic driver. 1998-10-13 08:14:33 +00:00
yokota
dbc1db2955 Added a workaround for yet-another, less-than-compatible keyboard controller.
This one returns 0xfa (ACK) for TEST_KBD_PORT and TEST_AUX_PORT commands.
The compatible controllers expected to return 0.
1998-10-13 07:56:38 +00:00
kato
cc59ab7388 Fix for wrap arround. 1998-10-13 03:24:01 +00:00
kato
3bc4b35da0 Implement TSC clock calibration for PC-98. 1998-10-13 02:33:21 +00:00
alex
4d7dc29a1d Bring in _BSD_UINT8_T_, _BSD_UINT16_T_, and _BSD_UINT32_T from the i386
ansi.h.
1998-10-12 23:57:58 +00:00
jkh
cfc27182a2 Add adw device.
Noticed by:	phk
1998-10-12 23:14:28 +00:00
ken
9cc9919f68 Add a "dummy light" (actually two dummy lights) to catch people who don't
have the passthrough device configured in their kernel.

This will hopefully reduce the number of people complaining that they can't
get {camcontrol, xmcd, tosha, cdrecord, etc.} to work.

Reviewed by:	gibbs
1998-10-12 21:54:13 +00:00
rnordier
e3811b3bae This commit was generated by cvs2svn to compensate for changes in r40269,
which included commits to RCS files with non-trunk default branches.
1998-10-12 21:16:26 +00:00
rnordier
0a456c31da New boot blocks: support for /boot/loader; a.out & ELF; cyl > 1023;
multiple 0xa5 slices; etc.
1998-10-12 21:16:26 +00:00
rnordier
c4aec13535 New boot blocks: support for /boot/loader; a.out & ELF; cyl > 1023;
multiple 0xa5 slices; etc.
1998-10-12 21:16:26 +00:00
dt
016509e247 UnVMIO vnodes of block devices when they are no longer in use. (Some
things, like msdosfs, do not work (panic) on devices with VMIO enabled.
FFS enable VMIO on mounted devices, and nothing previously disabled it, so,
after you mounted FFS floppy, you could not mount msdosfs floppy anymore...)

This is mostly a quick before-release fix.

Reviewed by:	bde
1998-10-12 20:14:09 +00:00
imp
ffd3a45361 Fix breakage introduced by last patch. bde has added CC_QUIET flag to
hasseen_isadev so this will be less noisy when conflicts do exist.
Also eliminate redundant warnings about conflicts.

Requested by: bde
Reviewed by: gibbs
1998-10-12 18:53:33 +00:00
ken
404d9ee9f6 Add quirk entries to disable the synchronize cache command for Micropolis
2217's (reported by Matthew Jacob in NetBSD PR kern/6027) and Fujitsu
M2954's (reported by Tom Jackson).

Some of the Fujitsus at least hang when they get a cache sync command.
(Others just return illegal request.)

Also, make error printing in dashutdown() a little more selective.  Don't
print any error when the sense key is illegal request.  Drives that don't
support the synchronize cache command usually return illegal request.
Also, make sure the scsi status is check condition before going into
scsi_sense_print().

Reviewed by:	gibbs
1998-10-12 17:16:47 +00:00
ken
2543811159 Bring over a quirk entry from the old SCSI code for a Chinon CDROM drive
that returns track numbers in BCD.

Reviewed by:	gibbs
1998-10-12 17:02:37 +00:00
kato
d6be4d69fc Sync with sys/i386/isa/isa.c revision 1.114. 1998-10-12 15:06:02 +00:00
bde
e23991ad03 Don't print conflict messages in haveseen_isadev() if CC_QUIET is
specified.  This makes haveseen_isadev() useful for searching for a
free resource.  This increases the bitrot in the pci RESOURCE_CHECK
code.

Fixed the pre-attach conflict message.  The flag for distinguishing
pre-attach conflict checks from pre-probe ones was never set.
1998-10-12 13:12:45 +00:00
bde
aa283c7d36 Fixed bitrot in mfs options. MFS_ROOT split into MFS_ROOT and
MFS_ROOT_SIZE, and MFS_AUTOLOAD went away.
1998-10-12 12:27:24 +00:00
bde
dac30ef086 Added flag CC_QUIET for quiet conflict checking.
Fixed corrupted tabs.
1998-10-12 11:32:35 +00:00
peter
b7f5f65708 Only print kernel entry point during load.
Drastically quieten down the verbose load progress messages.  They were
more useful for debugging than anything, but are beyond a joke when loading
a few dozen modules.
Simplify the ELF extended symbol table load format.  Just take the main
symbol table and the string table that corresponds.  This is what we will
be getting local symbols from.  (needed for the alpha stack tracebacks).
Use the (optional) full symbol tables in lookups.  This means we have to
furhter distinguish between symbols that can come from the dynamic linking
table and the complete table.
The alpha boot code now needs to be adapted as ddb/db_elf.c cannot use
the simpler format.
I have not implemented loading the extended symbol tables from the syscall
interface yet, just for preloaded modules.
I am not sure about the symbol resolution.  I *think* it's possible that
a local symbol can be found in preference to a global, depending on the
search sequence and dependency tree.
1998-10-12 09:13:50 +00:00
peter
8834a794bd Only print filename and entry address for the kernel itself. The rest
have a meaningless entry as they are relocatable.
1998-10-12 09:05:12 +00:00
peter
92850399d4 Relocate a few extra addresses that are stored as physical addresses via
the boot loader.
1998-10-12 09:03:48 +00:00
peter
71fd6ef94b "fix" a warning 1998-10-12 09:02:19 +00:00
rnordier
e0698462f3 Drop .MAKEFLAGS: hack. 1998-10-12 02:05:44 +00:00