Commit Graph

3971 Commits

Author SHA1 Message Date
Tor Egge
7bcc0f3d66 Allow the kernel configuration file to override the amount of memory
available to the kernel (VM_KMEM_SIZE). The default (32 MB) is too low
when having 512 MB or more physical memory in a server environment. This is
relevant on systems where "panic: kmem_malloc: kmem_map too small" is a
problem.
1997-06-25 20:18:58 +00:00
Tor Egge
a4ec81c7d0 Allow kernel configuration file to override PMAP_SHPGPERPROC. The default
value (200) is too low in some environments, causing a fatal
"panic: get_pv_entry: cannot get a pv_entry_t". The same panic might
still occur due to temporary shortage of free physical memory
(cf. PR i386/2431).
1997-06-25 20:07:50 +00:00
Tor Egge
9facf4a0d9 Block some interrupts during the call to pmap_zero_page in
vm_page_zero_idle. This fixes some occurences of the problem
reported in PR kern/3216: "panic: pmap_zero_page: CMAP busy"
1997-06-25 19:49:45 +00:00
Sean Eric Fagan
61ef57aaf2 Do The Right Thing when an iBCS2 program does getgroups(0, whatever) -- we
were returning EFAULT, when it is a completely acceptable thing to do.
Also, at the same time, be a *bit* optimizing and don't allocate any
"stackgrap" memory if we're not going to use it.

This is another Oracle-discovered problem.

Submitted by:	Steven Wallace
1997-06-25 01:01:21 +00:00
Tor Egge
3b5d3246bf Ensure that the boot CPU honours write protection in kernel mode.
This fixes one of the problems noted in PR kern/3688.
1997-06-24 17:26:07 +00:00
KATO Takenori
7367854ebc Recognize AMD K5 PR166 and PR200 CPUs. 1997-06-24 09:45:35 +00:00
Steve Passe
ee889b3ba0 Fix calculation of initial mplock value.
We now use LOGICAL, not PHYSICAL, IDs to calculate the mplock.
1997-06-24 07:48:02 +00:00
Steve Passe
afbe6f7b6e Fixed breakage for "default" configurations in mptable_pass1(). 1997-06-24 06:55:30 +00:00
Sean Eric Fagan
c6d139318e For the xenix_ftime() routine, don't use the native version of the struct --
the XENIX version is packed, and two bytes smaller than ours.  So, define
the structure, and have it packed.  I used the __attribte__((packed))
modifier for this; I could also have surrounded the struct definition with
#pragma pack(2) -- but that would have meant making ibcs2_timeb's definition
outside the function.  This may need to be revisited if we ever want to
compile with a compiler other than gcc.  (I also used 'unsigned long'
instead of 'time_t' because I am writing to match an external specification
-- and the definition of time_t could change.)

Reviewed by:	Steven Wallace
1997-06-22 19:04:03 +00:00
Peter Wemm
b3196e4b9f Preliminary support for per-cpu data pages.
This eliminates a lot of #ifdef SMP type code.  Things like _curproc reside
in a data page that is unique on each cpu, eliminating the expensive macros
like:    #define curproc (SMPcurproc[cpunumber()])

There are some unresolved bootstrap and address space sharing issues at
present, but Steve is waiting on this for other work.  There is still some
strictly temporary code present that isn't exactly pretty.

This is part of a larger change that has run into some bumps, this part is
standalone so it should be safe.  The temporary code goes away when the
full idle cpu support is finished.

Reviewed by: fsmp, dyson
1997-06-22 16:04:22 +00:00
Peter Wemm
3b18caba29 Kill some stale leftovers from the earlier attempts at SMP per-cpu pages 1997-06-22 15:47:16 +00:00
Mike Smith
0231d9ebb6 From the submitted patch :
The kernel with USERCONFIG_BOOT and VISUAL_USERCONFIG option presents
the user the kernel configuration menu upon boot.

The user can navigate the menu with cursor keys. I think it would be
nice if the user can navigate and select a menu item with regular keys
as well, so that the user who is using a serial console which is not
so capable of esc sequences still can choose a menu item.

With the following patch we can select an item by typing an item
number, 1, 2, or 3, or mnemonic `s' to skip UserConfig, 'v' to enter
the visual mode, and `c' to start the CLI mode. `p', `u', `n', and `d'
will move cursor up and down.

Submitted by:	yokota
1997-06-22 13:51:04 +00:00
Kazutaka YOKOTA
124ff4169d The syscons driver doesn't really check the presence of the display
adapter during the system boot. It always assumes there is at least a
monochrome adapter.

This is rather strange assumption. If there is no dispaly adapter, the
console driver cannot be any good...

In this patch, scinit() is split into two parts; the first part is
now called scvidprobe() which will detect the presence of video card
at the CGA or MONO buffer address and returns TRUE if found. It is
called during sccnprobe() and scprobe(). Both will fail if no video
card is found.

The second part, whose name stays the same as before, scinit(), is
called from sccninit() and scattach() to complete initialization of
the found video card.

The keyboard probe code is moved from scprobe() to sckbdprobe();
scprobe() now calls scvidprobe() and sckbdprobe() to carry out device
probe. (This is rather a cosmetic change, but it sure makes the code
look better organized.)

The problem pointed out by Joerg.
1997-06-22 12:04:36 +00:00
Bruce Evans
c8f8a520f6 Fixed va_arg() to work for small args (as in stdarg.h). 1997-06-21 16:20:55 +00:00
Bruce Evans
ce93f47a1e Don't attempt to generate errors for unpromoted types in va_arg(),
since it is impossible to distinguish unpromoted types from small
(struct) types.  Renamed __va_promote() to __va_size() since it is
related to sizes of args on the stack and not to promotion.

PR:		3884
Submitted by:	mostly by arnej@math.ntnu.no (Arne Henrik Juul)
Obtained from:	name of__va_size and some parentheses fixes from NetBSD
1997-06-21 15:45:13 +00:00
Garrett Wollman
a8da31fc3e Fix crash when halting where APM was configured but not enabled
by checking whether APM is active in apm_power_off() and returning
if not.  (The code was already written with the expectation that
this function would return if it fails.)
1997-06-19 00:25:03 +00:00
Kenjiro Cho
3cbceb8234 correct the wrong ATM option name for native atm access
NETNATM --> NATM

reported by Bruce Evans.

Bruce also pointed out that NATM is confusing since config(8) defines
NATM as the number of atm pseudo device in "BUILD_DIR/atm.h".
We might change the name in the future but leave it as it is for now.
1997-06-17 05:58:15 +00:00
Philippe Charnier
91463ae299 Fix 2 typos. 1997-06-16 06:32:51 +00:00
Garrett Wollman
b551bf4430 Fix another power down braino. 1997-06-15 02:24:06 +00:00
Garrett Wollman
dd57c0981c Fix definition of apm_power off (was suffering from cut&paste syndrome). 1997-06-15 02:19:40 +00:00
Garrett Wollman
3f7773458e When APM is configured, turn off the power when halting for good. 1997-06-15 02:03:03 +00:00
Bruce Evans
9edc7ccf77 Fixed the type of a timeout function and removed casts that hid the
problem.  There was no problem in practice (at least on 386's).
1997-06-14 14:54:55 +00:00
Bruce Evans
fec712543d Load the kernel config file where userconfig (with option USERCONFIG_BOOT)
will see it.  The name of the file is obtained by appending ".config"
to the name of the kernel file.  If the file doesn't exist, then an
annoying message is printed.

Reduced the command line buffer size yet again from 4096 to 1024.  It is
oversized to defend against overrun in gets(), but data space is starting
to run out so the buffer size can't be as grossly oversized as before.
1997-06-14 10:00:42 +00:00
Tor Egge
43f83f0b47 Use ETHER_ADDR_LEN instead of ETHER_ADDR_SIZE. 1997-06-12 19:20:53 +00:00
Justin T. Gibbs
9996b3a56a Fix two typos in this driver that prevented it from working properly.
PR: kern/3776
Submitted by: flash@hway.ru
1997-06-10 16:07:22 +00:00
Bruce Evans
e49dd0c779 This should have been committed with the changes to boot.c yesterday.
- Added support for "dual" internal/serial consoles (-D flag).  If -D is set,
  then all i/o from the boot blocks is to and from both the internal console
  and the serial console.  -D has no effect on the kernel (-h decides the
  kernel serial console as usual).  -D should normally be set in /boot.config.
- Get help messages from /boot.help.  You should copy boot.help from the
  biosboot directory to the root directory on the boot drive when you
  install new boot blocks.
- New, less invasive keyboard probe.  Enable keyboard probe dynamically (-P
  flag).  Should probably never be used (use -h instead).
- Fixed/improved initialization from boot.config.  It didn't interact correctly
  with the NAMEBLOCK option, and the initialization of the drive/unit/partition
  didn't stick when a non-default kernel name was entered.
- Don't reset or forget the default drive/unit/... or kernel name so often.
- Set the default kernel name to something unbootable after `?'.
- Display the defaults better.
- Removed PROBE_KEYBOARD_LOCK option (use -h instead).,
- Removed BOOT_FORCE_COMCONSOLE option (use device flag 0x20 instead).
- Removed -a (RB_HALT) flag.  This flag is only used for reboots.
Submitted by:	about 2/3 by yokota
1997-06-10 01:40:32 +00:00
Bruce Evans
de2cf96615 - Added support for "dual" internal/serial consoles (-D flag). If -D is set,
then all i/o from the boot blocks is to and from both the internal console
  and the serial console.  -D has no effect on the kernel (-h decides the
  kernel serial console as usual).  -D should normally be set in /boot.config.
- Get help messages from /boot.help.  You should copy boot.help from the
  biosboot directory to the root directory on the boot drive when you
  install new boot blocks.
- New, less invasive keyboard probe.  Enable keyboard probe dynamically (-P
  flag).  Should probably never be used (use -h instead).
- Fixed/improved initialization from boot.config.  It didn't interact correctly
  with the NAMEBLOCK option, and the initialization of the drive/unit/partition
  didn't stick when a non-default kernel name was entered.
- Don't reset or forget the default drive/unit/... or kernel name so often.
- Set the default kernel name to something unbootable after `?'.
- Display the defaults better.
- Removed PROBE_KEYBOARD_LOCK option (use -h instead).,
- Removed BOOT_FORCE_COMCONSOLE option (use device flag 0x20 instead).
- Removed -a (RB_HALT) flag.  This flag is only used for reboots.
Submitted by:	about 2/3 by yokota
1997-06-09 05:10:56 +00:00
Andrey A. Chernov
833bdc932c While deciding to install irq with unneded "conflicts" keyword,
additionly check that intr vector is non-NULL
1997-06-09 00:53:48 +00:00
Andrey A. Chernov
7f533ff73f Add safety check in case "conflicts" keyword specified more times than
needed
1997-06-08 17:15:31 +00:00
Andrey A. Chernov
1886f4968c Make "conflicts" keyword work again 1997-06-08 16:43:37 +00:00
Andrey A. Chernov
0b3a25d648 Remove no irq -> irq 31 conversion 1997-06-08 12:55:26 +00:00
Bruce Evans
7b3c84247b Preserve %fs and %gs across context switches. This has a relatively low
cost since it is only done in cpu_switch(), not for every exception.
The extra state is kept in the pcb, and handled much like the npx state,
with similar deficiencies (the state is not preserved across signal
handlers, and error handling loses state).
1997-06-07 04:36:10 +00:00
Bruce Evans
4d775b7759 Removed #include of <i386/isa/isa_device.h>. inthand2_t is declared in a
better place now.
1997-06-07 00:57:26 +00:00
Bruce Evans
f0a2dcf23d Updated comments. 1997-06-07 00:49:45 +00:00
Jordan K. Hubbard
818de095b4 YAMF22 - XSERVER comment changes. 1997-06-06 12:24:43 +00:00
Paul Traina
562d05dfae Document a non-standard gdbremote protocol extension (kludge, really)
that I snuck in to our GDB last year.  This allows you to debug headless
machines by sharing the console port between the debugger and the system
console.  It's not 100% reliabile, but it works well.  It's optional
and disabled by default.
Submitted by:	Juniper Networks
1997-06-04 16:44:29 +00:00
Paul Traina
5ea6cb03f3 Bring back CONSPEED as a last-ditch default if you can't change the speed
any other way.

Requested by: dfr
1997-06-04 16:25:15 +00:00
Paul Traina
69d2ceed21 CONSPEED is defunct. 1997-06-04 04:55:26 +00:00
Paul Traina
2334749d02 If the boot blocks were using the serial port, read the system console
speed using the boot blocks, instead of a hardcoded value stuck in the
kernel.  This way, you can have systems using the same kernel but different
console speeds.

Add a sysctl entry for changing the system console speed.
Lock the user tty speed to match the system console speed.

Nuke CONSPEED.
Reviewed by:	bde
1997-06-04 04:52:40 +00:00
KATO Takenori
6670f8f6e7 Fixed mu-law data. Originator's patch was applied.
PR:		1950
Submitted by:	NAGAO Tadaaki <nagao@cs.titech.ac.jp>
1997-06-03 10:34:40 +00:00
KATO Takenori
b7b905e770 Fixed order of data transfer.
Reviewed by:	NAGAO Tadaaki <nagao@cs.titech.ac.jp>
Submitted by:	Takuya SHIOZAKI <tshiozak@makino.ise.chuo-u.ac.jp>
1997-06-03 10:25:41 +00:00
KATO Takenori
eeef1264c6 Include <sys/conf.h> 1997-06-03 08:23:26 +00:00
Peter Wemm
2895de58f2 Fill in some gaps in the cpuid features list..
bit 10 is the old bit for MTRR (presumably this changed, an older P5 I
have has got it, the newer cpus have the new MTRR bit set)
bit 11 is SEP (fast syscalls),  bit 23 is MMX
Fill in the other reserved ones with a stub so that we can see them if
they turn up.

Obtained from: Intel AP-485 rev.06
1997-06-02 18:55:44 +00:00
KATO Takenori
40b2de1758 Added PC-98 code. 1997-06-02 15:28:10 +00:00
Doug Rabson
6d47a3a499 Change isa_device.h to intr_machdep.h 1997-06-02 10:44:08 +00:00
Doug Rabson
50ef24000a Make this thing actually compile. 1997-06-02 10:43:41 +00:00
Doug Rabson
683523378c Move interrupt handling code from isa.c to a new file. This should make
isa.c (slightly) more portable and will make my life developing the really
portable version much easier.

Reviewed by:	peter, fsmp
1997-06-02 08:19:06 +00:00
Mike Smith
10484b859e Grr. Remove not-ready LDT modification fluff that also crept in with
the last commit.
1997-06-02 06:45:17 +00:00
Mike Smith
88e2b22c9f Oops, remove some bogus debugging code that crept in with the last commit. 1997-06-02 06:33:22 +00:00
Mike Smith
3713cbff75 Add support for the SIOCGIFHWADDR ioctl, commonly used by
license managers to obtain the host's ethernet address as
a key.

Note that this implementation takes the first hardware address for
the first ethernet interface found, and disregards the interface name
that may be passed in, as linux ethernet devices are all "ethX".
1997-06-02 06:31:49 +00:00