Commit Graph

5265 Commits

Author SHA1 Message Date
simonb
0000c94242 Delete "break"s and "return"s after the math_abort() macro, which itself
finishes with a "return".
2001-11-09 00:38:57 +00:00
christos
c7be54ce17 increase the size up to the max for the floppy. 2001-11-08 02:11:38 +00:00
yamt
4475186a1d correct comment. 2001-11-07 10:52:08 +00:00
yamt
5fa0dfa754 use biosdelay instead of adhoc loop. 2001-11-07 08:46:24 +00:00
enami
03b4b0dfdd Use options<SPC><TAB> consistently (except for GENERIC_ISDN since it is
indented rather differently).
2001-11-06 01:57:06 +00:00
yamt
3eadadcb8a add adv@cardbus.
(commented out if ahc@cardbus is commented out.)
2001-11-04 09:00:38 +00:00
itohy
e8ba741b16 Add mpu at cmpci and opl at cmpci attachment.
I always test it on alpha, and add cmpci entries to alpha config files.
2001-11-04 07:39:40 +00:00
tsutsui
6707f5f39d Add trm at pci. 2001-11-03 17:08:56 +00:00
yamt
7a6b533ba6 add btinfo stuff. 2001-11-03 12:02:28 +00:00
jdolecek
1a92fabcb3 Don't print any warning if the time base was not provided (i.e. given as zero).
Fixes port-i386/1413 by David Carrel.
2001-11-03 11:16:25 +00:00
yamt
375b263ebc - remove debug printf.
- reset the board in EtherStop.
2001-11-03 09:36:47 +00:00
lukem
3343f31154 explicitly pull in sys/types.h 2001-11-03 06:22:54 +00:00
lukem
153d16f7b1 replace __byte_swap_long_variable and __byte_swap_word_variable
#define ({ })  with  static __inline { }
2001-11-02 05:17:59 +00:00
yamt
b7574e5c56 add settings for ne2000.
(commented out)
2001-11-01 09:45:03 +00:00
yamt
3492b7a4c6 add ne2000 standalone driver. 2001-11-01 09:37:17 +00:00
thorpej
66f972ab70 Need byteorder.c for loadfile_elf*.c 2001-10-31 21:39:02 +00:00
jdolecek
159a2b871c use right number of zeroes for Cyrix i386_cpuid_cpus[] entries
reformat the entries with all zeroes to be more easier to verify
2001-10-31 20:35:21 +00:00
jdolecek
6cb3157ebe Add defines for the rest of fasttraps as defined on Solaris8/i386. For
documentation purposes only (though CLOCK_SETTIME a.k.a T_GETHRESTIME
shouldn't be too hard to implement).
2001-10-31 18:20:13 +00:00
jdolecek
f3bfeee0d6 Fix one more place where we need to restore %fs/%gs explicitly. 2001-10-31 18:17:56 +00:00
jdolecek
01d4649f9f Make local INTRENTRY, INTRFASTEXIT match those in locore.s, i.e. store &
restore %fs/%gs appropriately.
Fixes kern/14275 - compat svr4 works on i386 again :)

Thanks to MOCHIDA Shuji for initial investigation on the issue, that helped
to find the bug a lot.
2001-10-31 18:16:02 +00:00
thorpej
e727e3f180 Split elf32 vs. elf64 handling in loadfile(), including support for
each separately and explicitly.  BOOT_ELF is now BOOT_ELF32 and
BOOT_ELF64, and ELFSIZE should no longer be defined in loadfile_machdep.h.
2001-10-31 17:20:45 +00:00
thorpej
4810d73020 Build the loadfile() a.out, ECOFF, and ELF back-ends as separate
objects.
2001-10-31 01:51:42 +00:00
lukem
f4e04ac768 merge in changes from GENERIC revs 1.400 ... 1.432:
- add MTRR
- comment out DIAGNOSTIC
- add commented out SEM{MNI,MNS,UME,MNU} COMPAT_MACH EXEC_MACHO
- comment out EISA stuff
- add commented out MCA stuff
- add audio devices: esl, emuxki, yds
- add pseudo-device bridge
2001-10-30 01:39:15 +00:00
jdolecek
a1a864c05e add missing dot to copyright message 2001-10-28 16:23:56 +00:00
jdolecek
86f5984fd6 Add "Pentium III (Tualatin)" entry to CPUVENDOR_INTEL/CPUCLASS_686.
Make sure the CPUCLASS_686 entry has really 17 (i.e. 16 + default)
name entries as it's supposed to, so that code won't crash when
run on Intel CPUCLASS_686 processor which doesn't have name entry
in the table.

Reported and fix provided by Naoto Morishima in kern/14380.
2001-10-28 16:17:05 +00:00
christos
19c695e204 fix assembler warnings 2001-10-28 01:38:52 +00:00
jdolecek
1d592578e5 make compile with VM86 defined 2001-10-27 18:27:06 +00:00
jdolecek
5d461f21ee Update freebsd_sigcontext to what FreeBSD currently uses, and save/restore
%fs/%gs as appropriate.

XXX Note that the new sigcontext uses the new sigset_t instead of old
int sc_mask. The new FreeBSD sigcontext doesn't contain any backward
compatibility sc_mask, so basically old FreeBSD application making
use of sigcontext are hosed. This can't be fixed in NetBSD compat code.
2001-10-27 12:26:29 +00:00
tron
8aa847844a Don't try to probe PCI mode on kernels without PCI support. Patch suppied
by Rob Windsor in PR port-i386/14364.
2001-10-26 17:07:28 +00:00
jmc
6d536163de Change defaults for kernel compiles. Default all to USETOOLS?=no and have
the etc Makefile override that by putting USETOOLS into $.MAKEOVERRIDES
This way the default for kernel compiles is still to use the installed
toolchain instead of depending on $TOOLDIR. $TOOLDIR can be used by
simply adding USETOOLS=yes to the command line as usual.

Adjust each ports template to set the default no setting and also pull in
bsd.own.mk if they weren't already to ensure they'll build correctly
with the new toolchain setup.
2001-10-26 06:45:33 +00:00
augustss
78ed7b801d If there is no pckbc, but there is a ukbd, try using the latter as console. 2001-10-24 21:05:17 +00:00
soren
3715322bb3 Determine PCI config mode before the ACPI probe; some methods need
to access PCI configuration space early.
2001-10-24 15:53:04 +00:00
thorpej
ba217c4196 Set MACHINE_ARCH explicitly in Makefiles for which it is constant.
Also, since config(8) now explcitly sets MACHINE, there is no need
to do it here in the Makefile.
2001-10-23 19:26:41 +00:00
fvdl
cbc00e701a Until early last year, the i386 port had 256M of kvm, and the max.
amount of kvm used for buffers was set at 70%, some 188M. Then
the total amount of kvm became 1G, and the amount for buffers
thus became some 716M. This is really too much, and some
device drivers want to map quite a bit of kvm these days.

So, cap it at 384M, which gives each buffer a little over 8k (the
default FFS blocksize) physical in an 1G physram configuration.
2001-10-20 00:17:47 +00:00
jdolecek
8507456e91 add emuxki (Creative Labs SBLive!) 2001-10-17 18:41:20 +00:00
ichiro
8bf90d96b4 add entry Intersil Mini-PCI(802.11b)
wi* at pci?
2001-10-13 15:06:12 +00:00
augustss
51f55f21bd Alphabetize PHYs. 2001-10-04 15:51:32 +00:00
jmc
60263432a6 Add the fact that SRCS depends on machine. This way the link is always created
Otherwise trying to do make installboot.o will fail
2001-10-04 04:15:17 +00:00
nathanw
586e98e699 Use a value for APMDEBUG_ANOM distinct from APMDEBUG_ATTACH, so that
the debug flag has the originally intended granularity.

From seebs@plethora.net via port-i386/13674.
2001-10-03 18:22:13 +00:00
jmc
806aee01eb Don't force CFLAGS to -g for all builds. 2001-09-30 23:02:25 +00:00
hubertf
c3a231baa7 add (enabled!) esl for pcmcia audio 2001-09-30 00:57:42 +00:00
hubertf
61ce73735e esl is off by default, so switch off audio@esl and opl@esl too. 2001-09-30 00:56:51 +00:00
augustss
f75a223c4e Add the esl driver. 2001-09-29 18:46:16 +00:00
chs
80373b7e54 don't depend on other headers to include sys/proc.h for us. 2001-09-28 11:59:51 +00:00
thorpej
70f1ab462a Glue in ACPI -- not really for prime-time, but useful for developers. 2001-09-28 03:56:21 +00:00
thorpej
7d89fca881 Add ACPI config glue. 2001-09-28 02:06:55 +00:00
thorpej
3d5c31f282 Bah, fix typo that crept in (tank you vi(1)). 2001-09-28 01:50:04 +00:00
thorpej
abd2c67167 Machine-dependent ACPI CA Osd routines for i386. 2001-09-28 01:46:56 +00:00
thorpej
21056065db Move the code that enumerates the pnpbios device nodes into a
separate function.
2001-09-27 17:13:39 +00:00
fvdl
0596817942 Apparently the old gas doesn't like *(%reg), so revert this one for now,
until everyone's switched to the new toolchain.
2001-09-26 14:07:51 +00:00
fvdl
7b78937c2b More '*' usage in indirect calls/jumps. 2001-09-26 09:58:39 +00:00
sommerfeld
98b0d5654c replace %ecx with %cl to silence new assembler warnings. 2001-09-24 01:09:33 +00:00
tls
9b9300274d GCC 2.95 generates significantly larger code with -O2 than our old compiler did; this can cause the second-stage bootblock to exceed the number of blocks that fit in the list in the first-stage bootblock. I thought we used to explicitly set -Os in here; anyway, with this change, we do now! 2001-09-23 23:43:29 +00:00
jdolecek
f5599abc0a fix typo 2001-09-23 19:59:19 +00:00
tv
ab11c169b5 objcopy -> ${OBJCOPY}; remove redundant definitions of OBJCOPY?= (it is
now in bsd.own.mk).
2001-09-22 03:34:17 +00:00
ad
fcf00dcc00 Add `dpti', which is an I2O vendor extension implementing the DPT/Adaptec
control interface. This makes it possible to run the Linux versions of
dptmgr, raidutil, dptelog and other tools under NetBSD.
2001-09-21 23:44:19 +00:00
fvdl
165dd7f987 Make the newer gas happy by explicitly adding '*' to indirect calls, and
matching mov extensions with register names.
2001-09-21 14:12:50 +00:00
ad
d9f326efb9 Split out the check for a valid disk device into a function. 2001-09-20 22:46:04 +00:00
wiz
d0b8cdc6a9 When using va_list, use vprintf, not printf. 2001-09-20 22:11:30 +00:00
petrov
6b12b0a48f initialize i386_alldisks 2001-09-19 20:25:48 +00:00
simonb
808d23f484 {,u}intptr_t are longs; adjust printf/scanf formats. 2001-09-19 05:23:43 +00:00
thorpej
3792a5d8c5 Add code to frob the MTRR-like registers on the AMD K6-2
and AMD K6-III.
2001-09-19 01:26:18 +00:00
thorpej
d941f3b164 Define UWCCR bits for the AMD K6 (these are its MTRR-like registers). 2001-09-19 00:31:21 +00:00
thorpej
f0d792297e Define the AMD K6 cache/write-combinding control register MSR. 2001-09-19 00:30:11 +00:00
chs
3527d3dfa5 use NENTRY() instead of ENTRY() for fault-recovery stubs to avoid
mcount() clobbering the error left in %eax by trap().
2001-09-18 06:29:08 +00:00
fvdl
aece5a2ae7 Initialize 'soft' copies of MTRRs to 0. Make fixed MTRRs work a lot more
correctly.
2001-09-17 20:44:08 +00:00
drochner
8002eb91a6 -fix botched switch/case nesting which made AGP on i810 in GFX mode fail
-remove the check for i810's internal graphics completely: we'll attach
 AGP whether in GFX or AGP mode anyway, and the SMRAM register test
 was of questionable value (should have masked with 0xc0, but even then
 the builtin graphics appeared enabled although I used an external
 PCI card)
2001-09-17 12:07:32 +00:00
wiz
456dff6cb8 Spell 'occurred' with two 'r's. 2001-09-16 16:34:23 +00:00
chs
64c6d1d2dc a whole bunch of changes to improve performance and robustness under load:
- remove special treatment of pager_map mappings in pmaps.  this is
   required now, since I've removed the globals that expose the address range.
   pager_map now uses pmap_kenter_pa() instead of pmap_enter(), so there's
   no longer any need to special-case it.
 - eliminate struct uvm_vnode by moving its fields into struct vnode.
 - rewrite the pageout path.  the pager is now responsible for handling the
   high-level requests instead of only getting control after a bunch of work
   has already been done on its behalf.  this will allow us to UBCify LFS,
   which needs tighter control over its pages than other filesystems do.
   writing a page to disk no longer requires making it read-only, which
   allows us to write wired pages without causing all kinds of havoc.
 - use a new PG_PAGEOUT flag to indicate that a page should be freed
   on behalf of the pagedaemon when it's unlocked.  this flag is very similar
   to PG_RELEASED, but unlike PG_RELEASED, PG_PAGEOUT can be cleared if the
   pageout fails due to eg. an indirect-block buffer being locked.
   this allows us to remove the "version" field from struct vm_page,
   and together with shrinking "loan_count" from 32 bits to 16,
   struct vm_page is now 4 bytes smaller.
 - no longer use PG_RELEASED for swap-backed pages.  if the page is busy
   because it's being paged out, we can't release the swap slot to be
   reallocated until that write is complete, but unlike with vnodes we
   don't keep a count of in-progress writes so there's no good way to
   know when the write is done.  instead, when we need to free a busy
   swap-backed page, just sleep until we can get it busy ourselves.
 - implement a fast-path for extending writes which allows us to avoid
   zeroing new pages.  this substantially reduces cpu usage.
 - encapsulate the data used by the genfs code in a struct genfs_node,
   which must be the first element of the filesystem-specific vnode data
   for filesystems which use genfs_{get,put}pages().
 - eliminate many of the UVM pagerops, since they aren't needed anymore
   now that the pager "put" operation is a higher-level operation.
 - enhance the genfs code to allow NFS to use the genfs_{get,put}pages
   instead of a modified copy.
 - clean up struct vnode by removing all the fields that used to be used by
   the vfs_cluster.c code (which we don't use anymore with UBC).
 - remove kmem_object and mb_object since they were useless.
   instead of allocating pages to these objects, we now just allocate
   pages with no object.  such pages are mapped in the kernel until they
   are freed, so we can use the mapping to find the page to free it.
   this allows us to remove splvm() protection in several places.

The sum of all these changes improves write throughput on my
decstation 5000/200 to within 1% of the rate of NetBSD 1.5
and reduces the elapsed time for "make release" of a NetBSD 1.5
source tree on my 128MB pc to 10% less than a 1.5 kernel took.
2001-09-15 20:36:31 +00:00
thorpej
e3d4f375aa Give each AGP controller its own attribute, and let the "agpbus"
device (rather, the device that carries that attribute) also
carry one or more attributes indicating which type of controller
it might be.

This will allow systems that might have AGP, but would never have
e.g. an Intel PCI-Host bridge, to trim out code that won't be used.
2001-09-15 01:32:10 +00:00
thorpej
8f077d92cc Move the AGP device declaration stuff into files.agp. 2001-09-15 01:10:09 +00:00
thorpej
0019ea5ce6 Clean up the AGP match/attach code somewhat. 2001-09-15 00:24:59 +00:00
nathanw
718551d644 Change all instances of "[e]isa* at foo?" to "[e]isa0 at foo?".
This prevents attaching multiple [E]ISA buses, which we don't support
(Is there any such thing to support? I'm skeptical) and avoids the
"panic: isaattach: ISA bus already seen" that occurs on some laptops
with docking stations and EISA boxes. Since there is only one [E]ISA bus,
logically, the ISA device probe will still find devices on the
docking station.

This does not address the problem of inserting or removing the docking station
at runtime.

Relevant PRs: kern/6544, port-i386/10392, kern/11627, kern/13557,
install/13865.
2001-09-14 21:44:21 +00:00
thorpej
face3e948d Add "pci" at cdev 83. 2001-09-13 22:08:44 +00:00
tshiozak
5341bac833 correct the set/get trigger code for ALi M1543 interrupt router. 2001-09-13 14:00:52 +00:00
fvdl
43bbb8500a Apparently some ServerWorks Host-PCI bridges only get their memory space
enabled, even though IO space does work. A few drivers (like ahc)
will only work reliably with IO space, so check for this condition
and correct it.
2001-09-12 08:25:17 +00:00
jmc
9185cf1b34 Add mtrr.h to INCS list to get installed on a make includes 2001-09-12 04:44:21 +00:00
chris
0e7661f023 Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

Currently this is a no-op on most platforms, so they should see no difference.

Reviewed by Jason.
2001-09-10 21:19:08 +00:00
fvdl
8e76d96c85 wrap decl in #if NAGP > 0 2001-09-10 10:54:46 +00:00
fvdl
5f5910616d Oops, didn't mean to enable agp by default yet. 2001-09-10 10:19:12 +00:00
fvdl
927ade4753 Add agp* at pchb? 2001-09-10 10:18:37 +00:00
fvdl
5b6f2046cc Add MTRR option. 2001-09-10 10:17:29 +00:00
fvdl
30bd1cf759 Clean up 'volatile' MTRRs owned by a process when it exits. 2001-09-10 10:14:57 +00:00
fvdl
5b0257ed49 Backend for MTRRs on PII and up or Athlon CPUs. The only other implementation
is on the AMD K6.
2001-09-10 10:14:21 +00:00
fvdl
86b144f468 Syscall frontend for mtrr functions. 2001-09-10 10:13:04 +00:00
fvdl
38db8748a4 Initialize MTRRs on startup if they're enabled. 2001-09-10 10:12:16 +00:00
fvdl
78742dd0e0 Add flag to indicate that a process set some mtrrs that need to be
cleaned up automatically on exit.
2001-09-10 10:11:21 +00:00
fvdl
c823d05ca0 Add definitions for mtrr syscalls. 2001-09-10 10:10:57 +00:00
fvdl
e0a68652a8 MTRR include file, based on the one by Bill Sommerfeld from the i386 mp
branch.
2001-09-10 10:10:33 +00:00
fvdl
a46fbfc5a8 Add agp device. 2001-09-10 10:08:40 +00:00
fvdl
d106bb1f19 Add agp files (enabled only on i386, but the main code itself should not
be MD, so could be enabled on other platforms).
2001-09-10 10:08:10 +00:00
fvdl
2c8172cbd3 Attach agp gart support @ pchb. Not very clean, but agp support may
be spread over several devices, and the phcb is usually the main one.

Add agp_machdep.c file which implements MD agp functions (currently
just agp_flush_cache).
2001-09-10 10:06:54 +00:00
perry
edea1a2c17 Make it possible to query each battery individually by making the
APM_IOC_GETPOWER ioctl read/write. Setting the batteryid in the passed
structure returns the data for just that battery. The old ioctl
remains for binary compatibility but has been renamed.

Itojun already did the hard work -- I just added a couple of lines.

reviewed by: thorpej
2001-09-10 05:23:30 +00:00
perry
fe9074d8dc boost maximum MAXUSERS to 128 2001-09-09 18:36:36 +00:00
tls
3d4146e21f Add asm versions of blowfish and des transforms for i386.
This also involved updating the in-kernel DES functions to correspond
to the versions in our in-tree OpenSSL, because the des_SPtrans table
has changed; the asm code will not work with the old permutation table!

C and i386 asm code for the DES, 3DES, and Blowfish CBC modes is also
included; it is not currently built as the ESP processing in esp_core.c
splits the CBC operation and the cipher transform apart.  Hopefully that
will be fixed as there is a substantial performance improvement to be had
from doing so.  It will remain necessary to use the C version of the
Blowfish CBC function on some i386 machines, however, as the asm version
uses bswapl, which ony 486 and later processors have.  The DES CBC code
doesn't have this problem.

Finally, change esp_core.c to use the ecb3_encrypt function instead of
calling ecb_encrypt three times; this improves performance a bit, in
particular in the asm case.
2001-09-09 11:00:59 +00:00
enami
d182b51372 Don't print extra space when printing information about cpu of unknown vendor.
# and minor stylistic change while i'm here.
2001-09-09 02:10:44 +00:00
enami
bab65a8da3 Mix random data directly into the pool and increase entropy instead of
estimating entropy with polling based timing.
2001-09-09 00:48:54 +00:00
lukem
cb33448ead use options SPACE TAB 2001-09-07 00:18:27 +00:00
augustss
283601a95c Comment out tr at pcmcia. 2001-09-06 13:29:29 +00:00
thorpej
47920741b0 Implement bus_space_mmap(). 2001-09-04 02:37:08 +00:00
thorpej
f5c35acc6c Eliminate a needless test, pointed out by Bill Sommerfeld. 2001-09-03 17:49:31 +00:00
drochner
fd065bcd87 add wsfont pseudo device 2001-09-03 17:18:22 +00:00
atatat
97c67a9bae Add bridge pseudo devices to GENERIC configs 2001-09-01 21:52:23 +00:00
ad
d46bbf4926 In the absense of any objection, move the rbus I/O range to 0x600-0x700
in the ARMADA config. On the M700 at least, the SMBus host controller lies
it 0x4000 (the beginning of the range allocated by default to rbus), and
stomping all over it causes bad things to happen.
2001-08-28 09:25:52 +00:00
augustss
494454a87d Comment out the hme driver; it's not totally MI yet. 2001-08-27 22:25:42 +00:00
augustss
b5937bf1d0 Add some missing network drivers. 2001-08-27 22:23:47 +00:00
kanaoka
3b4f143fd8 - Correct a value of subend.
Pointed out by enami tsugutomo <enami@but-b.or.jp>.
2001-08-27 13:02:12 +00:00
augustss
0432180062 Add 7 new PHYs. 2001-08-27 12:08:00 +00:00
haya
31d98218e8 Add support for ALi M1543 in pcibios. 2001-08-27 08:21:20 +00:00
chs
9fa41ab3b9 use cli/sti instead of splhigh/splx for MCOUNT_ENTER/MCOUNT_EXIT.
this makes clearer how much time mcount() is really taking.
2001-08-23 06:17:00 +00:00
hubertf
5366e197e2 More comment changes: 90x[B] -> 90x[BC] 2001-08-22 15:39:04 +00:00
hubertf
d08ed3cb49 90x[B] -> 90x[BC] 2001-08-22 15:28:57 +00:00
enami
b605664b49 Include bsd.own.mk a bit earlier so that make cleandir works. 2001-08-18 12:53:58 +00:00
enami
cebeb402de Fix white space usage. 2001-08-18 12:48:59 +00:00
augustss
596db62c43 Alphabetize two items. Fix one whitespace glitch. 2001-08-14 13:15:45 +00:00
hubertf
1fabbfed1a Sync with GENERIC,v 1.414
XXX We really need a better way to do such things...
XXX For now, please make sure to update this too when editing GENERIC!
2001-08-14 00:27:03 +00:00
itojun
a66997843c sync with GENERIC 1.414. LAMB has no working printer port. 2001-08-13 11:21:40 +00:00
jdolecek
c495131fe3 Move _insque()/_remque() to libkern. Once remaining uses would
be converted to <sys/queue.h> macros, _insque()/_remque() would be eliminated
altogether.
2001-08-12 08:35:31 +00:00
chs
7c661278ee update some comments. 2001-08-12 00:20:32 +00:00
thorpej
013d3a1013 Make some APMDEBUG verbosity only verbose if the INFO debug flag is set. 2001-08-06 07:59:39 +00:00
enami
4b5c6b86d6 Minor tweak to build kernel under a.out environment. 2001-08-04 00:54:30 +00:00
thorpej
518ad20222 Upon further reading of the manual, don't save the MXCSR-at-last-exception.
Its status bits are sticky, and unaffacted by FNINIT.
2001-08-03 01:46:08 +00:00
thorpej
099e93139b In setregs(), initialize the process's MXCSR to the reset-default
value as documented in the IA-32 Instruction Set Reference (in the
description of the LDMXCSR insn).
2001-08-03 01:24:39 +00:00
thorpej
cfb1fd004d Don't clobber the MXCSR when we fake FNINIT. 2001-08-03 01:21:34 +00:00
thorpej
f72ee0a9c6 Remember the MXCSR at last-exception the way we do the FPU SW/TW. 2001-08-03 01:11:49 +00:00
groo
3f5acd41c2 Remove trailing "U" on KERNBASE introduced in last commit.
Breaks assembly of locore.
2001-08-03 01:03:10 +00:00
thorpej
6e331fdd9f Define KERNTEXTOFF in terms of KERNBASE. 2001-08-03 00:47:59 +00:00
thorpej
8f308d671e Adapt to new FPU save format in PCB. 2001-08-03 00:41:46 +00:00
thorpej
f0449fd933 - Rename cpu_use_fxsave to i386_use_fxsave.
- If we detect SSE/SSE2 support in the CPU, enable SSE exceptions
  and set i386_has_{sse,sse2} as appropriate.
- Expose i386_use_fxsave and i386_has_{sse,sse2} through sysctl
  as machdep.{osfsxr,sse,sse2}.
2001-08-02 22:04:28 +00:00
thorpej
99a7f640fe Add support for saving/restoring SSE/SSE2 state using FXSAVE/FXRSTOR.
Reviewed by Frank.
2001-08-02 21:04:43 +00:00
bjh21
ad2c12a28d Bump version numbers of all bootloaders that use loadfile/ELF, to account for
my changes to symbol loading.  I should probably have done this at the time,
but it's better late than never.
2001-08-02 12:24:05 +00:00
ad
aaf3c7c88b Hook in the mly control interface on i386. 2001-08-01 20:54:16 +00:00
thorpej
4b584bf5bb Add several more Intel cache info entries, and fetch the CFLUSH
line size if we have the CFLUSH insn.
2001-08-01 19:50:48 +00:00
thorpej
ebbd9cd428 Add some more CPUID feature bits. 2001-08-01 18:47:38 +00:00
haya
3d57cec099 Add new entry for intel ICH2 LPC interrupt router. It has
upper compatibility with piix.
2001-08-01 09:11:19 +00:00
jdolecek
98cdfa790c fix typo for previous in I386_CPU case 2001-07-31 22:52:44 +00:00
thorpej
c43f8649d2 Set up function pointers for copyin/copyout in preparation for
adding optimized versions for various CPU classes/models.

Split the 386 version of copyout into a separate routine, and
add a 486 version that doesn't have the class/page-writeability
check.
2001-07-31 18:28:58 +00:00
jdolecek
2b7d2123cd Make console polling (cnpollc/cngetc) work on IBM PS/2 keyboard controller
using level triggered interrupts, which livelocks calling intr routine
if the data register is not read in the interrupt routine, as it's case
when polling after interrupts are enabled during boot.

Block all interrupts when polling for keypress, and modify intr routine
to read and store value from data register. The latter one is to avoid
losing a keypress when one would manage to press a key when kernel is
not in spl-guarded code section.

Tested with classic pccons, 'pcconskbd at pckbc' and 'pckbd at pckbc'
configurations, on i386.
2001-07-31 13:15:28 +00:00
jdolecek
2d5bc65e0b enable KERNFS, it's used by installation 2001-07-30 21:50:48 +00:00
jdolecek
b0f8b119a2 fix comment 2001-07-30 20:51:29 +00:00
ad
3b1828355b Add a driver for Mylex AcceleRAID and eXtremeRAID controllers with v6
firmware. Based off the FreeBSD driver, and re-worked by tls, erh and I.
2001-07-30 19:59:04 +00:00
jdolecek
b0178f25e3 Move GENERIC_PS2 to GENERIC_PS2TINY, update comments to reflect this config is
intended for small memory machines.
Update INSTALL_PS2 appropriately.
2001-07-30 18:24:07 +00:00
jdolecek
3531778254 add MCA stuff, for IBM PS/2 2001-07-30 18:03:54 +00:00
christos
b92cbe7184 now that we know what the traps mean, print their name in debug mode. 2001-07-29 19:31:41 +00:00
drochner
23204e4b5f document 3c90xb support
use default settings which make more sense (for me)
2001-07-25 12:51:44 +00:00
drochner
a3cdd518ad make it compile after i82557reg.h changes 2001-07-25 12:47:34 +00:00
wiz
d2cede024b Replace some memcpy()s with probably overlapping arguments with memmove()s. 2001-07-24 22:29:07 +00:00
itojun
71aa31a75a support multiple batteries (currently only # of batteris is visible -
need to tweak ioctl API more).  PR 10545.
2001-07-22 16:05:17 +00:00
wiz
a9356936b4 seperate -> separate 2001-07-22 13:33:58 +00:00
jdolecek
044d2dfafc Move former PS2 config to GENERIC_PS2, mostly so that it fits the
installation snapshot build machinery well; also improve some comments.
Adjust INSTALL_PS2 config accordingly.
2001-07-21 16:26:46 +00:00
jdolecek
c55c49e5e3 Make a bit more like GENERIC - add I586_CPU, NTP, SYSVMSG, SYSVSEM, LKM,
CD9660, INET6, though bunch of entries enabled in GENERIC is commented out,
mostly due they being not appropriate for IBM PS/2.
2001-07-21 16:12:16 +00:00
jdolecek
c013461507 add pcmb\* 2001-07-21 13:22:05 +00:00
jdolecek
230adf61d8 Installation kernel for PS/2 machines. Only wrapper around
PS2 config.
2001-07-21 13:16:23 +00:00
jdolecek
0be60fb28d remove MEMORY_DISK_HOOKS stuff 2001-07-21 13:15:00 +00:00
thorpej
babefc5331 Add BUS_DMA_READ and BUS_DMA_WRITE flags, that hint the back-end
at dmamap load time that the mapping will be used for a unidirectional
transfer of the specified direction.
2001-07-19 15:32:10 +00:00
mrg
ef38b7e874 fix a statementless label that gcc-current picked up. 2001-07-17 13:53:15 +00:00
mrg
6d1680019c use a shift instead of a divide. 2001-07-17 13:52:24 +00:00
fvdl
d68e2c3f12 Redefine evil tXXX register offset defines into the trapframe structure
to use offsetof. These should be completely nuked.

Fixes math_emulate lossage.
2001-07-17 08:13:06 +00:00
thorpej
091e29f94f In i386_softintr_lock(), use splserial() rather than splhigh(),
because of splhigh() braindamage on the i386 port.

Fixes port-i386/13038 and port-i386/12985.
2001-07-16 16:53:00 +00:00
christos
825843808a add MACHO_MACHDEP_CASES 2001-07-14 03:05:51 +00:00
christos
d6cbc8a99d add mach/macho files 2001-07-14 02:18:02 +00:00
christos
747d93e317 new i386 files for macho and mach. 2001-07-14 02:04:25 +00:00
christos
75dabe22c7 Use global descriptor 7 for mach traps. Unfortunately this is already
used by apm 16 bit code segments so we cannot have both at the same time.
2001-07-14 02:02:45 +00:00
christos
661d4f4564 Add COMPAT_MACH and EXEC_MACHO. Code works enough to start running a binary,
but we need to implement a few mach traps before the dynamic linker actually
works.
2001-07-14 02:00:39 +00:00
kristerw
42bb92201c Removed redundant (and slightly wrong) extern declaration of emul_svr4
(newer gcc complains that only one of the declarations are const.)
2001-07-13 23:32:26 +00:00
itojun
ceb069ef00 sync with GENERIC 1.410. mention pkgsrc/sysutils/lambd. 2001-07-13 23:00:32 +00:00
soren
ce3293accb ncr(8) is gone from the tree, so remove ^#ncr*. 2001-07-09 15:05:22 +00:00
perry
4ae18c882f Since setrunqueue and remrunqueue now have documentation, remove my
obnoxious comments saying they should be documented, and reference
setrunqueue(9) and remrunqueue(9) instead. Thanks Nathan!
2001-07-08 19:33:44 +00:00
abs
8b9a19cb3d Leave TCP_DEBUG commented out _everywhere_.
Time to replenish clueon charge with caffine...
2001-07-08 16:36:11 +00:00
abs
01b024cd5b Standardise TCP_COMPAT_42 as commented out, grouped with other COMPAT options,
and with the comment '4.2BSD TCP/IP bug compat. Not recommended'
Add commented out 'TCP_DEBUG # Record last TCP_NDEBUG packets with SO_DEBUG'
(All hail amiga and atari which make some attempt to automate the
multiplicity of config files...)
2001-07-08 16:32:12 +00:00
perry
c3748d9175 b*()->mem*() 2001-07-07 22:57:57 +00:00
tsutsui
df016928f8 Remove (commented out) ncr* at pci? lines. 2001-07-07 17:09:47 +00:00
perry
0d05392733 bzero->memset, bcopy->memcpy 2001-07-07 05:58:12 +00:00
mcr
97eac1b54c context argument added to pci_device_foreach(). 2001-07-06 18:04:58 +00:00
mcr
b44d7d55a5 added some debugging to error message in pci_intr_map(). 2001-07-06 18:04:22 +00:00
mcr
07ba5352f1 extra argument to pci_device_foreach(). 2001-07-06 18:03:47 +00:00
mcr
8c020dd2f7 when fixing up buses, keep track of the parent of each bus,
and the pcitag to access the primary side of that bridge.
2001-07-06 18:03:17 +00:00
mcr
6244484599 added context parameter to pciaddr_resource_{reserve,allocate}
and to pci_device_foreach().
	added new function pci_device_foreach_min().
2001-07-06 18:02:35 +00:00
mcr
b76e5c586a added some error checking on return from rbus_new_root_share(). 2001-07-06 18:01:26 +00:00
mcr
74ed6c9ddb new config file for M700 notebook with Cardbus and CBII support 2001-07-06 18:00:50 +00:00
hubertf
9f773decdf fix typo in comment 2001-07-05 20:54:28 +00:00
itojun
1e8074db2e sort boot flag to alphabetical order. add -c. 2001-07-05 00:58:45 +00:00
soren
882f3b1bd2 Const'ify bootblk_commands[] to match lib/libi386.h change. 2001-06-27 22:58:32 +00:00
darcy
685fb6365d Added the commented lines with the defaults for the system values associated
with System V semaphores.
2001-06-27 13:40:12 +00:00
thorpej
e26fe5cc01 Compute the VM_* constants directly, rather than hard-coding
them (with the formulas in comments).
2001-06-25 16:28:48 +00:00
sommerfeld
f00786e7ab restore fs and gs from sigcontext in sigreturn (correct oversight in
previous commit).
2001-06-19 15:54:48 +00:00
wiz
f3f6c5b675 accessible' only has one a'. 2001-06-19 12:52:20 +00:00
fvdl
b4b5dc533d Add fxsr CR4 bits. 2001-06-19 09:12:49 +00:00
thorpej
9c9eba63ec Add gsip(4), gphyter(4), and sf(4) drivers. 2001-06-18 22:45:54 +00:00
sommerfeld
b10656ba32 Delete dead code.
Mask segment registers from trap frame with 0xffff for cleanliness.
2001-06-18 03:33:59 +00:00
sommerfeld
926b6ff132 since seg regs are 16 bits, toss high order bits from the trapframe 2001-06-18 03:32:14 +00:00
christos
59abdecf4b Add a linux specific trapsignal() function. This is just a passthrough
on all platforms but the i386. On the i386 we look at T_PROTFLT and send
a SIGSEGV instead of SIGBUS. This makes allegro lisp 5.0 and pvs (a proof
verification system) to work.

XXX[1]: We need to go through each architecture and verify that we send
        the correct signal on each trap type.
XXX[2]: trap.c on all other architectures but i386 needs to be modified
        to s/trapsignal/(*p->p_emul->e_trapsignal)/g
2001-06-18 02:04:42 +00:00
christos
0f380fac15 Add an e_trapsignal member to struct emul, so that emulated processes can
send the appropriate signal depending on the trap type.
2001-06-18 02:00:48 +00:00
sommerfeld
7e7d262c34 Add %fs/%gs to trap frame and save/restore them on
trap/interrupt/syscall entry from userspace.

Remove special-case "by hand" validation of fs/gs register values as
well as special handling of them in various signal handling paths.

Now, like %ds and %es, they are validated by the hardware on return to
userland.

This paves the way for the use of %fs for per-cpu data on
multiprocessor systems, and fixes an otherwise difficult-to-fix
interaction between threads/clone(2) and USER_LDT.

Discussed in advance with Frank van der Linden.
2001-06-17 21:01:32 +00:00
sommerfeld
d3249871b5 Rework how user-mode instruction and stack fetches are done.
While we're in here, catch another vm86 protocol botch.
2001-06-15 05:43:40 +00:00
thorpej
8eb3b954f1 Don't need to prototype child_return() here, it's in <sys/proc.h>. 2001-06-14 22:56:55 +00:00
wiz
c03a48d64f withough -> without 2001-06-13 10:45:57 +00:00
perry
df452bb9b8 clean up some comments, per a request from sommerfeld 2001-06-11 22:56:26 +00:00
sommerfeld
0463a8a3d7 Replace magic numbers in trap code with offsetof()
Deal better with traps during register restore.
Explain a bit more about what's going on here.
2001-06-11 20:04:02 +00:00
sommerfeld
b55c21bb0d Copy in segment descriptors all at once rather than one at a time. 2001-06-10 17:30:41 +00:00
simonb
e5bd00e48d For ports that wire up pciide in compatibility mode, have
them define __HAVE_PCIIDE_MACHDEP_COMPAT_INTR_ESTABLISH
in pci_machdep.h and pciide_map_compat_intr() only calls
pciide_machdep_compat_intr_establish() if that preprocessor
define exists.

Ports that don't need to do this no longer need to supply a
dummy function.
2001-06-08 04:48:54 +00:00
lukem
178aeb74a0 work around lint issue (inspired by similar work in sparc port) 2001-06-07 04:44:05 +00:00
thorpej
ec291b503a Allow the text address to be set with makeoptions. 2001-06-05 05:05:46 +00:00
tsutsui
ad811093a3 Add iha at pci . 2001-06-03 13:46:57 +00:00
chs
821ec03ed9 replace vm_map{,_entry}_t with struct vm_map{,_entry} *. 2001-06-02 18:09:08 +00:00
jdolecek
4db9600c94 use hd0a instead sd0a in 'help' command example 2001-06-02 14:56:13 +00:00
jdolecek
40033835d8 Comment DIAGNOSTIC, DEBUG out
Use the 'root on ? type ?' config by default, leave the nfs one commented out,
add line for root on ed0a
2001-06-02 10:37:27 +00:00
jdolecek
f6af05f407 Back the last revision off, upon Bill Sommerfeld's request 2001-06-02 00:46:00 +00:00
jdolecek
5dbe622e77 When polling, raise priority level to tty, to block keyboard interrupts
when the system is "warm", i.e. interrupts are not blocked anymore.
This seems to be necessary on my PS/2 Model 70 keyboard - without this,
system ends up in endless loop calling the keyboard intr routine if a key
is pressed when polling. This _may_ be just specific to level-triggered
interrupts PS/2 MCA uses, though it's more likely it's just the way the
particular keyboard controller works.

Discussed on tech-kern@.
2001-06-02 00:01:04 +00:00
jdolecek
b001ce9b90 g/c COMPAT_OLDBOOT from bootblocks, sprinkle some const
bump bootblock version to 2.10
2001-06-01 23:26:30 +00:00
itojun
5fbaedc40d sync with GENERIC 1.405 2001-06-01 16:50:31 +00:00
lukem
d84d2c6c85 add missing #include "opt_kgdb.h" 2001-05-30 15:24:23 +00:00
mrg
67afbd6270 use _KERNEL_OPT 2001-05-30 11:57:16 +00:00
mrg
3783ca5d30 define _KERNEL_OPT as well as _KERNEL. we will use this in the future to
get kernel "opt_foo.h" headers, rather than _KERNEL && !_LKM.
2001-05-29 02:20:20 +00:00
sommerfeld
7d1ef74930 Fix kern/13049: missing unlock on failure exit from pmap_enter() 2001-05-27 14:31:27 +00:00
chs
e44e9dec8a replace vm_page_t with struct vm_page *. 2001-05-26 21:27:02 +00:00
sommerfeld
bdecf91bef Add infrastructure to allow ports to override build of in6_cksum.c by
enabling the INET6_MD_CKSUM option, which is defopted into opt_inet.h.
Supply an i386 assembly version of in6_cksum in in_cksum.s; on
P6-family cpu's, this is is roughly 20% faster than the C code in
sys/netinet6 for ethernet-mtu-sized mbufs in L1 cache.  Turn on
INET6_MD_CKSUM in i386/conf/std.i386

While we're here, also nuke some now-obsolete XXX comments from
in_cksum.s.
2001-05-26 17:46:11 +00:00
chs
118ddca24a replace {simple_,}lock{_data,}_t with struct {simple,}lock {,*}. 2001-05-26 16:32:40 +00:00
oki
0cc97f1b55 Fixed panic on the cpu made by unknown vendor,
such as Transmeta Crusoe.
2001-05-25 04:39:33 +00:00
sommerfeld
e171bbe08e Correct handling of nxt==0 (skip pseudoheader) case.
(It helps a lot if registers contain the expected values)
While we're in here, also correct parameter names in the lint goo.
2001-05-23 15:56:51 +00:00
sommerfeld
8676150cb7 In kern/12554 workaround in pmap_page_remove, don't forget to unmap
(and unlock) the other pmap's pte's before continuing to the next
pmap.  Avoids pmap lock leaks (generates LOCKDEBUG warning, deadlocks
MULTIPROCESSOR).
2001-05-23 04:25:35 +00:00
perry
cdc294674b add LINTSTUBs 2001-05-21 06:13:12 +00:00
perry
c8057dc287 remove needless externs in front of function prototypes 2001-05-21 04:47:35 +00:00
jdolecek
e3daef46ec Add some IBM PS/2 support bits:
* recognize PS/2 L40 via biosmca() and biosmca_ps2model in gatea20.c, instead
  of being a compile time option
* if the system is PS/2 with MCA bus, map DTYPE_ESDI disks to ed(4) for
  COMPAT_OLDBOOT

The new code is conditional on SUPPORT_PS2 define, which is on by default
for biosboot-based bootblocks.
2001-05-19 18:15:14 +00:00
jdolecek
2a7ff4a9ab Add biosmca.S if I386_INCLUDE_PS2 variable is "yes" (default, overridable) 2001-05-19 17:53:30 +00:00
thorpej
e6d4fd2a55 Don't compute pseudo header checksum if nxt == 0. 2001-05-19 00:36:37 +00:00
lukem
9c92176b44 don't bother providing duplicate code for {read,write}_eflags() since it's in cpufuncs.h anyway 2001-05-17 16:35:06 +00:00
perry
6859233343 bcopy is dead on i386. the one use left in the kernel was in locore.s
itself, and that got replaced with a call to memcpy. Ross deserves
most of the credit.
note that if you've seen bcopy elsewhere in the kernel, systm.h
defines it as a macro...
2001-05-16 22:09:36 +00:00
kanaoka
aa09aa91c7 Search the entire device-space of bus 0 if the router device
address is set to 000:00:0, and the compatible router entry
is undefined.

  Patch PR port-i386/12880 by Dave Sainty <dave@dtsp.co.nz>.
2001-05-16 08:10:36 +00:00
perry
4201bf1ae0 nuke bcopyw and bcopyb. It is unclear what they were for, and nothing
called them.
2001-05-16 05:01:28 +00:00
perry
e266791dab Add a couple of include LINTSTUBs and fix some LINTSTUB prototypes.
Still exits hard because of bcopy/memcpy problem, but that is a
legitimate problem. bcopy should go and be replaced with memcpy to fix this.
2001-05-16 04:18:52 +00:00
lukem
f1362289d2 changes to lint invocation:
- sort lint flags
- add flags -F (full pathname), -g (gcc extensions; XXX for now)
- lint CFILES before LINTSTUBS
- don't -Dvolatile=
- don't grep -v 'static function.*unused'
2001-05-16 03:48:45 +00:00
perry
098ba22210 1) Add infrastructure to generate lint stub files from stylized
comments in .S files.
2) Update "make lint" target to use generated lint stubs.
2001-05-15 22:34:36 +00:00
perry
e69a194db2 1) Add stylized comments (used by new lint stub generation
infrastructure) to indicate what C stubs should be generated for
   various entry points.
2) Add comments noting various artifacts discovered while performing
   task 1), including a bunch of stuff that may very well no longer be
   used.
2001-05-15 22:31:38 +00:00
lukem
103a49d158 delint: don't try & return something from void eisa_intr_disestablish() 2001-05-15 15:07:37 +00:00
lukem
33e8c1a04f delint: don't try & return something from void pci_intr_disestablish() 2001-05-15 14:48:57 +00:00
jdolecek
a97bf5e6b4 Change biosmca() to export the model number via biosmca_ps2model
variable, if the machine has a MCA bus according to info returned
by BIOS (i.e. on machines without MCA bus, biosmca_ps2model would be zero).

biosmca() is expected to be called on beginning the initialization,
and biosmca_ps2model is then used for further checks.
2001-05-14 22:14:47 +00:00
jdolecek
6c225c676c Compact the BIOS CFG printout 2001-05-14 14:14:09 +00:00
tron
74cc245bbe Fix typo: Pnp -> PnP 2001-05-10 22:12:38 +00:00
kleink
dd4df24b01 Make the set of machine state restored by setmcontext() identical to that of
sigreturn().
2001-05-09 20:31:00 +00:00
ad
ae9cc4fa8a Add an (untested) EISA front-end for the `mlx' driver. 2001-05-06 19:54:59 +00:00
jdolecek
3cacf40566 recognize ed as boot device 2001-05-05 17:53:59 +00:00
jdolecek
97500f67b8 print the model numbers slighly different way 2001-05-04 07:22:07 +00:00
thorpej
5871a60118 The AMD-K5 Model 0 gets the PGE bit in the CPU features word wrong
using the APIC bit instead, according to the AMD Processor Recognition
App. Note.  Add a fixup routine to patch up cpu_feature in this case.

XXX Need a way to kick the pmap to enable pmap_pg_g -- look at how the
MP branch deals with this.
2001-05-04 03:19:33 +00:00
thorpej
61ac6af20b - Fix a couple of botches in the AMD L2 cache info fetching.
- Start with 2 initial color bins, and recolor once we've determined
  the number of color bins based on the formula:
	(largest_cache_size / associativity) / PAGE_SIZE
2001-05-03 16:55:32 +00:00
thorpej
7049d99bc5 Oops, forgot to fill in function pointer in previous. 2001-05-03 16:04:26 +00:00
thorpej
5c15afd718 Rearrange the cache info fetching code some more, and add support
for fetching cache info for AMD processors.
2001-05-03 00:35:37 +00:00
thorpej
f89ed957f1 - Keep cache/tlb info in the cpu_info structure.
- Add "associativity" to the cache_info structure.
- Add a (*cpu_cacheinfo)() function pointer, like we have a
  (*cpu_setup)() function pointer.  Cache info in the `cpuid'
  is vendor-specific.
2001-05-02 21:07:01 +00:00
jdolecek
7cb5602067 Nuke biosboot_ps2 2001-05-02 13:43:10 +00:00
jdolecek
7e111aa959 Add function which uses bios call to get system configuration; this can
be used for presence of MCA bus, if ever needed to be done in bootblocks.
Not used at the moment, but may be in future.
2001-05-02 13:41:07 +00:00