Commit Graph

2971 Commits

Author SHA1 Message Date
Bill Paul
31e0d8b925 Tiny printf formatting change: if we have no cpu_vendor or cpu_id info,
don't generate a newline. (Yeah, I'm picking nits, but that empty line
I get on my 386 just looks dumb, okay? :)
1995-04-22 03:58:46 +00:00
Julian Elischer
220112c567 Submitted by: bde@freebsd.org 1995-04-21 22:20:34 +00:00
Bruce Evans
8da0f3b87a Make some functions static like they always should have been.
Change the interfaces of these functions to save space.  The code
that takes the least amount of space is often the opposite to what
you might expect.  E.g., it helps to waste a few bytes passing
pointers so that the compiler can't see that certain addresses
are identical (gcc likes to waste space by reloading fat constants
even when the constant is already in a register).

Rewrite getbootdev() to save 80 bytes of space and to make it less
ugly.  32 bytes were saved simply by omitting the continue statements
in the pseudo-switch.
1995-04-21 16:50:32 +00:00
Bruce Evans
34951155ae Update the pseudo-prototype for serial_putc() to match the actual prototype. 1995-04-21 16:30:18 +00:00
Bruce Evans
a9ef92e638 Never pass char or short args to functions. This saves 64 bytes of
recently introduced bloat in just 2 calls to biosread(), although
very little in calls to putc() and serial_putc().  Gcc produces
amazingly bad code for unnecessary conversions.  E.g., if it has
`int x' in register %edx and wants to pass a char, then it could
simply push %edx and access only one byte in the callee.  Instead,
it sometimes unnecessarily spills %edx; it always sign extends
%edx and pushes the result.

Remove useless `extern' in function prototypes.

Remove unused declaration of `end'.

Declare pbzero() and pcpy() like the library bzero and bcopy().

Declare printf() properly.
1995-04-21 16:07:12 +00:00
John Dyson
e0a4d029a5 Slight re-ordering of the creation of a vmio object to fix a condition
that can cause NFS I/O failures.
1995-04-21 02:58:49 +00:00
John Dyson
7e15fd2757 Fixed a problem in _vm_object_page_clean that could cause an
infinite loop.
1995-04-21 02:48:40 +00:00
Joerg Wunsch
9c6e0c69be . Make Poul's boot2 overflow warning less noisy in case the blocks
do fit, and beeping in case of an overflow.

.  Drop a comment about the ``FORCE_COMCONSOLE'' option into
   README.serial.

.  Increase the name buffer for the root directory from 100 bytes
   to 8 KB;  this is in no way ideal, but (IMHO) the best that can
   be done by now.  People did encounter problems with their root
   dir name listing overflowing the allocated buffer space.  Once
   we've got the three-stage boot, we should implement some basic
   malloc().  Swap space is already getting tight now, perhaps the
   swap should go into another 64 KB segment instead.

.  Make the keyboard probe less paranoid.  It should not give up in
   case of a keyboard that's continuously demanding RESEND's.  Even
   though the keyboard reset apparently has not been reported to be
   complete, it's at the very least proven that there IS something
   like a keyboard available.

   This solves problems with the ``Gateway-2000 AllKey programmable''
   (sp?) keyboard, that experienced a total hang with the previous
   probe.

   Thanks goes to Scott Blachowicz <scott@statsci.com> for his
   extensive testing of my various interim (debugging) bootblocks
   to get this working.
1995-04-20 23:15:10 +00:00
Julian Elischer
c9755763d9 Add an option to make it easy to default to the hd1 mode
also save a few bytes
1995-04-20 23:05:23 +00:00
Julian Elischer
9d55f6fd25 remove note about 'find' now that it's fixed. 1995-04-20 22:02:05 +00:00
Julian Elischer
b9494fba51 Submitted by: phk@freebsd.org
Reviewed by:	Julian
fixes the 'find' anomaly mentionned in the README
(hmm I guess I should fix that too..)

diff -r1.2 devfs_vnops.c
905a906
>                       dirent.d_type = DT_DIR;
914a916
>                       dirent.d_type = DT_DIR;
920a923,941
>                       switch(name_node->dnp->type) {
>                       case DEV_BDEV:
>                               dirent.d_type = DT_BLK;
>                               break;
>                       case DEV_CDEV:
>                               dirent.d_type = DT_CHR;
>                               break;
>                       case DEV_DDEV:
>                               dirent.d_type = DT_SOCK; /*XXX*/
>                               break;
>                       case DEV_DIR:
>                               dirent.d_type = DT_DIR;
>                               break;
>                       case DEV_SLNK:
>                               dirent.d_type = DT_LNK;
>                               break;
>                       default:
>                               dirent.d_type = DT_UNKNOWN;
>                       }
1995-04-20 22:00:05 +00:00
Poul-Henning Kamp
3226e381f8 Added a check so compilation fails if the bootblocks are too big.
replaces a switch with ifs to reduce size.
1995-04-20 18:36:14 +00:00
Julian Elischer
072506ba00 Submitted by: julian
@#%$#@ ftp -p corrupted the file in transfer..
(cut off the last 2 lines).. fix this
1995-04-20 07:42:41 +00:00
Julian Elischer
b79223f61b Submitted by: julian
I did a cleanup on the code..
(why didn't I do that before I checked it in? I hear you ask..)
1995-04-20 07:34:55 +00:00
Poul-Henning Kamp
d7e591aeab The -current system with 'zp' driver hangs up when resumed from
suspended mode.  The patch for this bug follows.

Reviewed by:
Submitted by:	<hosokawa@mt.cs.keio.ac.jp>
1995-04-20 07:22:04 +00:00
Julian Elischer
adf18d3b60 Reviewed by:
Submitted by:	julian
oops rename doc file to README as agreed
1995-04-20 06:36:36 +00:00
Poul-Henning Kamp
16b560a716 Added -C option to set RB_CDROM, so that we use our cdrom as root. 1995-04-20 06:08:27 +00:00
Poul-Henning Kamp
709471e7e8 Added RB_CDROM flag, meaning "use CDROM as root". 1995-04-20 06:06:42 +00:00
Poul-Henning Kamp
804e33a872 Add wd2 and wd3 as swap-devices too. 1995-04-20 06:05:17 +00:00
Poul-Henning Kamp
f4d1e3d1e7 Remove the slice for the first 63 sectors for the OnTrack case, it's useless
and nobody care about it anyway.
1995-04-20 06:01:51 +00:00
Bill Paul
de2a1afc47 Undo the stupidity I inflicted on these files and replace it with
some (hopefully) less offensive stupidity:

If we detect that a user has loaded a module that fails to initialize
itself correctly, panic. There really isn't a safe way to recover from
something like this; we can't know that the module is bad until after
the entry point is called, by which time it's too late to do anything
about it.
1995-04-20 05:08:53 +00:00
Julian Elischer
e902d016a6 Reviewed by: no-one yet, but nonintrusive until configed in.. :)
Submitted by:	julian@freebsd.org
Obtained from:	written from scratch
1995-04-20 03:31:34 +00:00
Julian Elischer
999422d707 Reviewed by: no-one yet, but non-intrusive
Submitted by:	julian@tfs.com
Obtained from:	written from scratch

slight changes to make space for devfs..
(also conditional test code in i386/isa/fd.c)

===================================================================
RCS file: /home/ncvs/src/sys/sys/malloc.h,v
retrieving revision 1.7
diff -r1.7 malloc.h
113a114,117
> #define M_DEVFSMNT    62      /* DEVFS mount structure */
> #define M_DEVFSBACK   63      /* DEVFS Back node */
> #define M_DEVFSFRONT  64      /* DEVFS Front node */
> #define M_DEVFSNODE   65      /* DEVFS node */
184c188,192
<       NULL, NULL, NULL, NULL, NULL, \
---
>       "DEVFS mount",  /* 62 M_DEVFSMNT */ \
>       "DEVFS back",   /* 63 M_DEVFSBACK */ \
>       "DEVFS front",  /* 64 M_DEVFSFRONT */ \
>       "DEVFS node",   /* 65 M_DEVFSNODE */ \
>       NULL, \
Index: sys/mount.h
===================================================================
RCS file: /home/ncvs/src/sys/sys/mount.h,v
retrieving revision 1.16
diff -r1.16 mount.h
100c100,101
< #define       MOUNT_MAXTYPE   15
---
> #define MOUNT_DEVFS   16      /* existing device Filesystem */
> #define       MOUNT_MAXTYPE   16
118a120
>       "devfs",        /* 15 MOUNT_DEVFS */ \
Index: sys/vnode.h
===================================================================
RCS file: /home/ncvs/src/sys/sys/vnode.h,v
retrieving revision 1.19
diff -r1.19 vnode.h
61c61
<       VT_UNION, VT_MSDOSFS
---
>       VT_UNION, VT_MSDOSFS, VT_DEVFS
1995-04-20 03:18:19 +00:00
Julian Elischer
836aa5b77e Reviewed by: no-one yet, but non-intrusive
Submitted by:	julian@tfs.com
Obtained from:	written from scratch

slight changes to make space for devfs..
(also conditional test code in i386/isa/fd.c)
why casn't cvs picked up these changes and shown them here?
is this going to be a NULL commit?
who knows? (it scanned all the dirs)


===================================================================
RCS file: /home/ncvs/src/sys/sys/malloc.h,v
retrieving revision 1.7
diff -r1.7 malloc.h
113a114,117
> #define M_DEVFSMNT    62      /* DEVFS mount structure */
> #define M_DEVFSBACK   63      /* DEVFS Back node */
> #define M_DEVFSFRONT  64      /* DEVFS Front node */
> #define M_DEVFSNODE   65      /* DEVFS node */
184c188,192
<       NULL, NULL, NULL, NULL, NULL, \
---
>       "DEVFS mount",  /* 62 M_DEVFSMNT */ \
>       "DEVFS back",   /* 63 M_DEVFSBACK */ \
>       "DEVFS front",  /* 64 M_DEVFSFRONT */ \
>       "DEVFS node",   /* 65 M_DEVFSNODE */ \
>       NULL, \
Index: sys/mount.h
===================================================================
RCS file: /home/ncvs/src/sys/sys/mount.h,v
retrieving revision 1.16
diff -r1.16 mount.h
100c100,101
< #define       MOUNT_MAXTYPE   15
---
> #define MOUNT_DEVFS   16      /* existing device Filesystem */
> #define       MOUNT_MAXTYPE   16
118a120
>       "devfs",        /* 15 MOUNT_DEVFS */ \
Index: sys/vnode.h
===================================================================
RCS file: /home/ncvs/src/sys/sys/vnode.h,v
retrieving revision 1.19
diff -r1.19 vnode.h
61c61
<       VT_UNION, VT_MSDOSFS
---
>       VT_UNION, VT_MSDOSFS, VT_DEVFS
1995-04-20 03:16:31 +00:00
Poul-Henning Kamp
0e175c5ef0 Added support for disks which "OnTrack Disk Manager" has munged.
I suggest you do all partitioning using the OnTrack SW, to avoid
confusing it.
1995-04-20 01:21:51 +00:00
David Greenman
aba8f38eb9 New flag: B_PAGING. Added as part of the vn driver hack. 1995-04-19 10:32:11 +00:00
David Greenman
334095ef1c Escentially a rewrite by John Dyson. This is disgusting, and John agrees,
but the whole thing is, so what the hell. :-) This version is expected to
work.
1995-04-19 10:31:18 +00:00
Andras Olah
c4575b2416 Include <sys/queue.h> because <netinet/in_pcb.h> (also included
later in tcp_debug.c) requires it due to the pcb changes of DavidG.
1995-04-19 10:26:04 +00:00
Rodney W. Grimes
781434c1fc Reapply my fix for this:
Output the CPU features line during the probe on a seperate line, for
folks with lots of features the output use to wrap and look ugle.
1995-04-18 23:55:26 +00:00
Bill Paul
e1797c1a96 Couple of small cosmetic changes:
- Add $Id$ string.
- Fix comment ("we might *not* be able to unload the
module afterwards without panicking...")
- Get rid of variable 'j' that I used in name checking
for(;;) loop and use 'i' instead (I thought there'd be
a problem with this, but there isn't).
1995-04-18 14:10:21 +00:00
Jordan K. Hubbard
fe16ad72f3 Matt says that no pre-2.3 pass boards were supposed to ship, but I certainly
got a 2.2 version DC21040 chip in my SMC ethernet card!  He suggests bumping
the check all the way down to 2.0 since it's pre-2.0 we're actually guarding
against.
Submitted by:   Matt Thomas <matt@lkg.dec.com>
1995-04-18 12:54:30 +00:00
Andrey A. Chernov
b6b8f81ead Add quotes around TUNE_1542 1995-04-18 11:02:22 +00:00
Bill Paul
f13524346b Fix module handling to stop oddball modules (if_ppp_mod, if_sl_mod,
if_tun_mod, etc...) from crashing the system. These modules are useful,
but because they don't yet have proper load()/unload() functions,
they can lead to panics: if, for example, you load the if_ppp module,
any user can panic the system by running modstat.

You can also hang the system outright if you try to unload the PPP
module too.

Changes are as follows:

- Save the name passed to us during the RESERVE stage for name matching
(we can't load if_ppp_mod twice: we've have two ppp0's and two ppp1's,
which is beyond strange). This makes the lkmexists() cheks somewhat
redundant, but there's no way around it that I can see.

- If we call the module entry point and find that we have no lkm_any
structure in our 'private' section, create a fake one. This keeps
modstat happy. We mark such modules as LM_UNKNOWN.

- Don't allow LM_UNLOAD modules to be unloaded: it just ain't
possible. (Unless someone wants to write a pppunattach() function. :( )

- In lkmunreserve(), mark private.lkm_any as NULL so we don't get
confused later. I think this is bogus, but I can't prove it.

XXX: the name matching used to keep the user from loading two
instances of the same module can easily be defeated simply by
changing the module name or, in the case of the oddball modules,
simply by renaming the module files. I haven't found a nice simple
way to tell one module from another.
1995-04-18 02:29:26 +00:00
Bill Paul
4ec3b3ddf3 Add LM_UNKNOWN type for oddball modules (if_ppp_mod, if_sl_mod, etc...)
that haven't yet learned how to do the Right Thing when installing
themselves.
1995-04-18 02:17:15 +00:00
Jordan K. Hubbard
8c409a2969 Extensive updates to this package.
Submitted by:   Gene Stark <gene@starkhome.cs.sunysb.edu>
1995-04-18 02:00:01 +00:00
Poul-Henning Kamp
8425684b90 Print the BIOS geometries in a human-readable format. 1995-04-17 16:49:50 +00:00
Gary Palmer
a058021a86 Bump to 2.0-950418-SNAP 1995-04-17 10:19:31 +00:00
David Greenman
4c1f8ee9b8 Fixed a logic bug that caused the vmdaemon to not wake up when intended.
Submitted by:	John Dyson
1995-04-17 10:00:55 +00:00
David Greenman
4ed452a631 Changed minimum supported rev of DC21040 to pass 2.2. 1995-04-17 08:16:14 +00:00
Bruce Evans
1b20a52866 Fix compiler warnings about benign overflow in initializers. 1995-04-17 05:52:17 +00:00
David Greenman
7c0414d074 Removed obsolete/unused variable declarations. Killed externs and included
appropriate include files.
1995-04-16 14:12:15 +00:00
David Greenman
64abb5a522 Removed obsolete/unused variable declarations.
Removed some extern declarations and included the correct include files.
1995-04-16 13:58:42 +00:00
Joerg Wunsch
afb7eb14a5 Remove the #ifdef REDUNDANT crud. This could be looked up in CVS by
interested parties.

Make the loader refuse to load anything below 1 MB -- we didn't
support it since FreeBSD 2.0R.  Avoid gratuitously wiping out the BIOS
variables or the loader.
1995-04-16 13:02:52 +00:00
David Greenman
c3cb3e12f5 Moved some zero-initialized variables into .bss. Made code intended to be
called only from DDB #ifdef DDB. Removed some completely unused globals.
1995-04-16 12:56:22 +00:00
David Greenman
5baf11ce97 Removed unused & empty bufstats() function. 1995-04-16 12:02:42 +00:00
David Greenman
8c3d9c403c Removed gratuitous m->blah=0 assignments when initializing the vm_page
structs in vm_page_startup(). The vm_page structs are already completely
zeroed.
1995-04-16 11:50:45 +00:00
David Greenman
cece489df8 Killed gratuitous b_vp=NULL in bufinit. The entire buffer is already
bzero()'d.
1995-04-16 11:45:30 +00:00
David Greenman
1a477b0c27 Changed #ifdef around printlockedvnodes() from DEBUG to DDB. 1995-04-16 11:33:33 +00:00
David Greenman
5291a9a0ac Make vegetarian and animal rights people happy and use 0xdeadc0de instead
of 0xdeadbeef as the 'spare' value.
1995-04-16 11:25:47 +00:00
David Greenman
5124d59831 Make vegetarian and animal rights people happy and use 0xdeadc0de instead
of 0xdeadbeef as the fill pattern. Decreased MAX_COPY to 64 (256 was a bit
overzealous in most cases).
1995-04-16 11:25:15 +00:00