Commit Graph

50923 Commits

Author SHA1 Message Date
augustss
80c2d1c262 Regen. 2001-11-06 12:59:45 +00:00
augustss
0c8d23832b Add DMI CD/RW drive (my first USB 2.0 device!). 2001-11-06 12:59:17 +00:00
augustss
4469f30685 Add some USB 2 related definitions. 2001-11-06 12:29:48 +00:00
itojun
087b694325 too many curly brace. 2001-11-06 08:14:27 +00:00
chs
2ed88fe090 several changes prompted by loaning problems:
- fix the loaned case in uvm_pagefree().
 - redo uvmexp.swpgonly accounting to work with page loaning.
   add an assertion before each place we adjust uvmexp.swpgonly.
 - fix uvm_km_pgremove() to always free any swap space associated with
   the range being removed.
 - get rid of UVM_LOAN_WIRED flag.  instead, we just make sure that
   pages loaned to the kernel are never on the page queues.
   this allows us to assert that pages are not loaned and wired
   at the same time.
 - add yet more assertions.
2001-11-06 08:07:49 +00:00
chs
6fbca7d0fc use pmap_kenter_pa() instead of pmap_enter(), this is required for
pages loaned to the kernel.  this implies that we also need to
call pmap_kremove() before uvm_km_free().

other general cleanup:  remove argument names from prototypes,
rename some variables, etc.
2001-11-06 07:30:14 +00:00
simonb
cf63a6b052 Remove some variables that are set but never used. 2001-11-06 07:20:37 +00:00
simonb
86c9e7e6d2 In procfs_domem() the addr variable is only needed if PMAP_NEED_PROCWR is
defined.
2001-11-06 07:20:08 +00:00
simonb
9b90ed2100 Remove some variables that are set but never used. 2001-11-06 07:18:14 +00:00
simonb
fa50959ec6 Remove a variable that is set but never used. 2001-11-06 07:15:34 +00:00
simonb
c56d879335 Remove some variables that are set but never used. 2001-11-06 07:11:29 +00:00
simonb
915441c64b Use the sector size from the partition info, not a hard-coded value. 2001-11-06 07:09:39 +00:00
simonb
ecf09baab6 Remove a variable that is set but never used. 2001-11-06 07:08:09 +00:00
simonb
bb57e2c53c Remove some bogus checks for unsigned variables < 0. 2001-11-06 06:59:05 +00:00
simonb
6129c87d2e Remove superfluous semicolon. 2001-11-06 06:40:44 +00:00
simonb
82649768b7 Change some unsigned int variables and parameters to plain ints so
that all usages of those agree on unsigned vs. signed.
2001-11-06 06:31:06 +00:00
simonb
819bb532e6 Remove some variables that are set but never used. 2001-11-06 06:28:22 +00:00
matt
b26f63f404 Fix pr#14481 2001-11-06 06:26:34 +00:00
matt
1f09ca6e53 Fix a small buglet in syncicache (if the area to sync crosses the
segment 0 boundary).
2001-11-06 06:25:28 +00:00
chs
6e1dd2fa31 add an assert and rename some variables. 2001-11-06 05:44:25 +00:00
chs
d8cbdbb0da in uvm_exit(), don't bother to unwire the uarea before we free it,
the pages will be freed anyway.
2001-11-06 05:34:42 +00:00
chs
07d2ec83fe don't call pmap_copy() from uvmspace_fork().
a new process is very likely to call execve() immediately after fork(),
so most of the time copying the pmap mappings is wasted effort.
2001-11-06 05:27:17 +00:00
simonb
15a42388c0 In pmap_enter(), sync the instruction cache if VM_PROT_EXECUTE. Fixes
problems when executing programs where text is copied to a page without
a dma sync (like NFS data bcopy'd to a buffer cache page).

From discussion with Jason Thorpe and Eduardo Horvath.
2001-11-06 04:49:49 +00:00
augustss
cd86b27aad ehci can attach to cardbus too. 2001-11-06 03:18:53 +00:00
augustss
58de8e2de6 Add ca_bus field. 2001-11-06 03:18:18 +00:00
augustss
7ae1e6394f Add some data structures to keep enable finding companion controllers
for EHCI.
2001-11-06 03:17:36 +00:00
augustss
c342a3beab Add some useful macros. 2001-11-06 03:16:17 +00:00
augustss
d8cebea1fc Make some messages only appear with bootverbose.
Add bus number to attach args.
2001-11-06 03:11:10 +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
simonb
e716956a0e Calculate the hardware interrupt to irq mapping array and irq mask from
the irq to hardware interrupt mask map instead of using two different
interrelated arrays and a bit mask that I've got wrong more than once
when updating by hand (including when I recently added the keyboard/mouse
interrupt mappings).  Now only the galaxy_intr_map[] array needs to
be updated when adding extra interrupts.
2001-11-06 01:26:47 +00:00
thorpej
af0d2bf570 Config info for the i80312 XScale companion I/O chip. 2001-11-05 23:38:55 +00:00
thorpej
20b742fd48 RCS ID. 2001-11-05 23:38:05 +00:00
thorpej
49951f6d12 Prototypes for i80312 routines. 2001-11-05 23:37:41 +00:00
thorpej
22514e4c7d Routines for handling the i80312 memory controller for XScale.
Currently includes a routine to determine memory size from the
SDRAM configuration registers.
2001-11-05 23:37:01 +00:00
fvdl
7812d678d8 Initialize the cn_magic goo for kgdb (bah, that should really not
be necessary).
2001-11-05 21:39:24 +00:00
fvdl
b16adc3043 Make cn_isconsole check if cn_tab is NULL. 2001-11-05 21:38:14 +00:00
aymeric
a2cea87aee defopt SERCONSOLE 2001-11-05 21:29:43 +00:00
matt
b5e785f38d Switch to using queue access macros instead of refering to the member
fields explicitly.
2001-11-05 18:02:15 +00:00
enami
480bb2c9a8 Fix typo in comment. 2001-11-05 08:22:24 +00:00
matt
a696291eab Fix bug in pte_spill (wasn't searching the right pvo_table list for the
victim PTE is the PTE was a secondary entry).
2001-11-05 06:44:11 +00:00
matt
4f3943d89a Test the right bit for wired in the PVO. 2001-11-05 06:24:55 +00:00
matt
f02b548314 Don't try to pool_putting a PVO when re-entering a mapping. Since the
PVO_MANAGED may get munged, we can possible put this into the wrong pool.
2001-11-05 01:25:38 +00:00
tsutsui
8dd30af8d3 Add trm at pci. 2001-11-05 01:23:17 +00:00
matt
8a49af3cec Need to use a separate variable for return value of pmap_pte_inset in
pte_spill.  Make off the high bit of the MFTB().
2001-11-04 22:39:08 +00:00
matt
3ca8d91fc8 Add few a more PMAP_PVO_CHECKs in pte_spill; print pte addr of unmatched
pte in panicstr.
2001-11-04 21:15:03 +00:00
matt
da5a70805c Convert netinet to not use the internal <sys/queue.h> field names
but instead the access macros.  Use the FOREACH macros where appropriate.
2001-11-04 20:55:25 +00:00
matt
8fef52258f Eliminate local extern declartion for inetctlerrmap 2001-11-04 20:52:39 +00:00
thorpej
fe988b60bb Add PCI window addresses. 2001-11-04 19:32:32 +00:00
tsutsui
3b0f229027 Fix a couple of bugs:
- make sure to allocate memory for sc_tempsrb properly.
 - correct links of SRB queue in trm_link_srb().
Now trm driver works on arc.
2001-11-04 17:17:22 +00:00
tsutsui
882785d057 Cast pa values to u_long in DEBUG printfs for _MIPS_PADDR_T_64BIT ports.
XXX should use unsigned long long format?
2001-11-04 14:07:13 +00:00
tsutsui
c143d7c33a Fix printf format in #ifdef DEBUG part. 2001-11-04 14:01:42 +00:00
matt
47577dca93 Change a few variable/tables to const since they are read-only. 2001-11-04 13:42:27 +00:00
matt
af71a3871d Keep only one mtu_table (the two were identical except for
one value - 65280).
2001-11-04 13:38:50 +00:00
tsutsui
064be15283 Use common macro to check message length. 2001-11-04 12:03:41 +00:00
tsutsui
5e6dd3ae03 Add common macro to check message length. 2001-11-04 12:03:03 +00:00
itohy
4972418390 Add midi at opl and midi at mpu 2001-11-04 10:27:15 +00:00
yamt
3eadadcb8a add adv@cardbus.
(commented out if ahc@cardbus is commented out.)
2001-11-04 09:00:38 +00:00
itohy
c0f59fbbeb AD1845 on my AlphaStation 255 doesn't match the AD1845 doc.
Try to detect AD1845 (unfortunately this is not always correct)
and work around the problems.
2001-11-04 08:08:25 +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
itohy
bd78bc67aa Re-implement the mixer
o  Implement SPDIF selection/monitoring function.
    Now, say, playback to both analog output and SPDIF is possible.

 o  Implement support of AUX input, MIC preamp and MIC recording gain.

 o  L-R selection of record source doesn't seem to work on cmpci.
    Therefore, the *.swap mixer functions are and deleted.

 o  Following SB mixer registers don't exist on cmpci, and they are removed.
	input gain, output gain, AGC, equalization (bass, treble)

 o  Other mixer changes, including
	inputs.XXX.mute -> (deleted)
	outputs.XXX.mute -> inputs.XXX.mute
	inputs.pc_speaker -> inputs.speaker
	spdif.* -> reorganized to spdif.input.*, spdif.output.*

 o  Current status:
      I have tested these and confirmed to work fine.
	- Output and recording from Line-in, AUX, CD and MIC analog inputs,
	- Output and recording from FM synthesizer,
	- Output from PC speaker input,
	- Output wave playback.
	- SPDIF (44.1kHz) input selection (#1, #2 (6ch version only),
	  wave to spdin), phase selection, monitoring and recording,
	- SPDIF (44.1kHz) playback, through (SPDIF in to SPDIF out)
	  and monitoring.

      I haven't tested these but may work.
	- SPDIF 48kHz input and output,
	- Full-duplex operation,
	- Recording wave output.

      I don't think these are working.
	- Legacy (wave + FM synthesizer) to SPDIF output (and the monitoring),
	- Exchanging front and rear outputs,
	- Surround.

      These are not implemented.
	- 4ch / 6ch support,
	- Joystick port support.
2001-11-04 06:57:40 +00:00
itohy
ab43d67621 Introduce "flags 1", which causes left and right channels swapped. 2001-11-04 06:44:31 +00:00
thorpej
c88c2c4852 Don't require the IQ80310 option. Made possible by files.<board>. 2001-11-04 03:01:19 +00:00
thorpej
ddb2e9f4cb Don't require INTEGRATOR or INTEGRATOR_FPGA options. Made possible
by files.<board>.
2001-11-04 02:56:13 +00:00
thorpej
9ef485f568 Garbage-collect a bunch of stuff that's not used/needed in
eval board environments.
2001-11-04 02:38:28 +00:00
thorpej
b8d49fac16 Move board-specific config definitions into files.<board>, allowing
each board type to have its own device namespace.
2001-11-04 02:20:22 +00:00
thorpej
95a9886f49 Add a comment describing what this file is. 2001-11-04 01:23:49 +00:00
thorpej
8f626436b6 Add missing RCS ID, add missing name. 2001-11-04 01:16:01 +00:00
augustss
069ab256ae Don't generate an error if setting the gid/uid doesn't actually change
the gid/uid.  Among other things, this eliminates tons of warnings when
unpacking a tar file in an msdos fs.
2001-11-03 23:49:58 +00:00
wiz
a1264327ae Sort alphabetically. 2001-11-03 22:39:25 +00:00
wiz
f56dfeb08b add trm (MI) 2001-11-03 22:35:33 +00:00
thorpej
88ff68974a Changes from Martin Husemann and myself:
- Make the 32-bit SPARC profile support work with the GCC 2.95.3
  SPARC ELF compiler, which uses a different name for mcount.
- Make the 64-bit SPARC profile support header look more like the 32-bit
  SPARC header (no functional change -- 64-bit SPARC already used the
  correct mcount name).
2001-11-03 20:24:42 +00:00
tsutsui
1b197161d4 Add iha and trm at pci, and mark untested SCSI controllers "UT". 2001-11-03 17:22:39 +00:00
tsutsui
f88a1097c3 Add trm at pci.
BTW, should we also add it into INSTALL?
I guess there is no trm adapter which has Openfirmware..
2001-11-03 17:16:17 +00:00
tsutsui
6707f5f39d Add trm at pci. 2001-11-03 17:08:56 +00:00
tsutsui
d3701fc18a Add a driver for the Tekram DC-395U/UW/F and DC-315/U SCSI host adapters,
which have the Tekram TRM-S1040 ASIC.
This driver is written by Rui-Xiang Guo <rxg@ms25.url.com.tw>,
and a number of cosmetic changes by me.
Tested on i386 by the author, and on macppc and sparc64 by me.

XXX On arc, kernel got panic in ltsleep() called from scsipi_execute_xs(),
XXX but I'm not sure what is wrong...
2001-11-03 17:01:16 +00:00
tsutsui
f82eb7bfa1 Replace a magic number with macro. 2001-11-03 15:52:03 +00:00
jdolecek
787ee522f9 Ignore windows-style FAT directory entries if we don't expect any more
file name data and the entry starts with \0\0. Apparently this happens
occasionally, don't know if it's mtools (probably), MS Windows or
NetBSD msdosfs fault. When this happens, NetBSD msdosfs was not
able to open the file, where neither mtools nor MS Windows had any
problem with it. So, it's appropriate to add this fix in any case.
2001-11-03 14:53:37 +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
reinoud
9be624a530 Not used in this port yet but since it is supposed to be a generic machine
dependend loadfile extention i copied it from arch/arm32/include where it
was committed as part of the ofwboot for sharks where Jason is working on.
2001-11-03 02:12:37 +00:00
rearnsha
e4fff4a560 Replace most uses of pmap_pde_p with pmap_pde_page, since that is what
we need later in the code.  This fixes a fatal kernel fault in
pmap_modified_emulation if a user application tries to access a kernel
address that is section-mapped.

Add a diagnostic that detects attempts to call pmap_kenter_pa with a
va that is section-mapped.
2001-11-03 00:06:02 +00:00
rearnsha
64c191c269 Define boolean predicates pmap_pde_page, pmap_pde_section & pmap_pde_fpage,
which return true if their pde argument is a coarse page, section or
fine page respectively.
2001-11-03 00:01:23 +00:00
rearnsha
6dcc9636dc Define L1_FPAGE for fine page entries in L1 page table. 2001-11-02 23:58:46 +00:00
thorpej
8526824bce Fix the LOADADDR() macro. 2001-11-02 23:43:13 +00:00
thorpej
efe39dc997 The a.out header is at the beginning of the .text segment in
ZMAGIC images, so use the correct constant (KERNEL_TEXT_BASE)
to find it.
2001-11-02 21:51:57 +00:00
thorpej
428018d519 The a.out header is at the beginning of the .text segment in
ZMAGIC images, so use the correct constant (KERNEL_TEXT_BASE)
to find it.
2001-11-02 21:19:10 +00:00
thorpej
b563250dbb Couple of changes:
- Set MARK_START to where we expect to be loading the kernel (0xf0100000).
- The ARM OpenFirmare bindings document describes how the client
  program is loaded: OFW allocates and maps 6MB of memory at load-base
  (0xf0000000), loads the client program, and then unmaps the memory from
  the end of the client program to the end of the allocated region.  Then
  transfers control to the client program.  We must emulate this behavior
  to load the kernel: allocate 5MB at 0xf0100000 (where we expect to load
  the kernel), load the kernel, then unmap the area after the kernel.

We can now load DHCP and load the kernel via NFS before getting the
dreaded Data Abort.
2001-11-02 20:24:37 +00:00
thorpej
f0be361fce Make this build again with ALLOC_TRACE, and enable freeall(). 2001-11-02 19:58:52 +00:00
atatat
6568927550 The cloning devices only needs-flag, not needs-count 2001-11-02 18:39:06 +00:00
augustss
d1ff85c9aa Improve debug messages a little. 2001-11-02 13:02:20 +00:00
itojun
d54922c799 check offset overrun in ip6_nexthdr. 2001-11-02 08:05:48 +00:00
lukem
cf524d2464 replace __byte_swap_long_variable and __byte_swap_word_variable
#define ({ })  with  static __inline { }
2001-11-02 05:23:48 +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
itojun
9d7baa72da recognize fxp on IBM thinkpad T23. from akimichi@wide.ad.jp 2001-11-02 03:40:47 +00:00
haya
2c903bf2c0 Add PCI power management control. If the power state of a bridge is
not D0 at device attaching or resuming, set the bridge D0 mode.
2001-11-02 03:32:33 +00:00
itojun
e4b5b62a3d array boundary overflow on the use of IPv4 mapped address. from simonb 2001-11-02 02:37:50 +00:00
matt
767a35ff99 Indirect labels should start with L 2001-11-02 02:36:57 +00:00
thorpej
da9b5f3614 loadfile() support for the Shark. 2001-11-02 01:27:41 +00:00
thorpej
4cbfdf4a51 Correct a kernel name. 2001-11-01 22:55:25 +00:00
thorpej
13d619a803 Check in of work-in-progress ofwboot for the Shark. Starts, does a
DHCP, attempts to load kernel, gets a Data Abort.
2001-11-01 22:50:18 +00:00
jdolecek
d1842b740a Restructure to the lkm/compat/Makefile way - the tested & installed
modules are on top, rest is added .if !make(install). This will avoid
such silly mistakes as rev. 1.7/1.8.
2001-11-01 19:32:53 +00:00
uch
6195437083 missing NBPFILTER > 0 2001-11-01 17:32:33 +00:00
augustss
41756e36f8 Regen. 2001-11-01 17:25:37 +00:00
augustss
16c1f136e5 Reorder two entries in numerical order. 2001-11-01 17:25:05 +00:00
rearnsha
87cb8af648 When clearing the modified bit for modified emulation, don't turn
caching on for a page just because we are clearing the writable bit in
the PTE: this is incompatible with the way pmap_vac_me_harder works,
and the code in the modified emulation handler doesn't know about
recalculating the cachable attributes (nor should it, IMO).

Also, if we are invalidating a page, flush its TLB entry; for some
reason we were only doing this when clearing the Write or modified
bits.

These patches together seem to solve the random seg-faults that were
still occuring occasionally under heavy paging.
2001-11-01 15:49:16 +00:00
tron
7a726f828b Fix botch in last commit which caused some of the "exec" LKMs not to be
built.
2001-11-01 13:41:42 +00:00
drochner
b4d5b7d621 protect against multiple inclusion 2001-11-01 12:54:35 +00:00
augustss
492a03edae Regen. 2001-11-01 11:06:45 +00:00
augustss
44345ed1ac New device (from OpenBSD). 2001-11-01 11:06:18 +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
chs
fa6e18a029 in pmap_extract(), detect unmapped users addresses too. 2001-11-01 07:37:36 +00:00
chs
550caf0ce3 allow SWAP_GETDUMPDEV for all users.
use {LIST,TAILQ}_FOREACH where appropriate.
2001-11-01 03:49:30 +00:00
imp
fdf7743003 Add Intel PRO WLAN 2011. 2001-11-01 03:00:51 +00:00
fvdl
f8ff451a0a Fix reversed wait/nowait logic. 2001-10-31 22:23:18 +00:00
thorpej
44f1c938e8 Don't actually need elf64 support in installboot(8). 2001-10-31 22:13:03 +00:00
thorpej
66f972ab70 Need byteorder.c for loadfile_elf*.c 2001-10-31 21:39:02 +00:00
thorpej
0971f93345 Make the ELF loadfile routines byte-order independent when used in
a non-_STANDALONE environment (e.g. installboot(8)): internalize and
externalize the exec, program, and section headers as necessary.

Reviewed and OK'd by Christos.
2001-10-31 21:24:09 +00:00
jdolecek
d58125dd1f kill one more duplicate 2001-10-31 21:15:43 +00:00
jdolecek
f15ae836f3 kill duplicates 2001-10-31 21:13:23 +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
thorpej
a43b4351a8 Oops, committed wrong copy of file in previous revision. 2001-10-31 20:22:22 +00:00
thorpej
90aee7593a Add standalone 64-bit to/from {big,little}-endian routines. 2001-10-31 20:19:52 +00:00
atatat
6e885d365a Turn the tun device/network interface into a cloning device. 2001-10-31 20:08:17 +00:00
jdolecek
76dc75c365 svr4 compat LKMs work on i386 2001-10-31 18:30:18 +00:00
jdolecek
2b5db1a8bb add the compat_util.c goo
XXX should prolly share this with lkm/compat, which has the same thing
2001-10-31 18:28:50 +00:00
jdolecek
060f8eead1 Add the COMPAT_UTIL_OVERRIDE stuff, and (commented out) COMPAT_43 stuff 2001-10-31 18:27:31 +00:00
jdolecek
af8a31dd42 For i386, set gate for fasttraps appropriately when loaded (and
unset on unload), similarily to what i386/machdep.c does #ifdef
COMPAT_SVR4. This makes the svr4 LKM actually work on i386.
XXX kind of ugly, but doing this more generic way would be overkill
2001-10-31 18:25:53 +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
d42a6dc5c2 Rather than using a NetBSD-specific header file <machine/int_types.h>
and non-standard inttype-like types, pull in <sys/types.h> if
_KERNEL or _STANDALONE and <inttypes.h> otherwise, and use standard
inttype types.

Discussed with and OK'd by Christos.
2001-10-31 18:05:35 +00:00
bjh21
54edd2d848 Define BOOT_ELF32. Don't define ELFSIZE. 2001-10-31 17:59:38 +00:00
bjh21
82b2265851 Add loadfile_machdep.h, which has been missing since I committed boot26. 2001-10-31 17:58:54 +00:00
thorpej
6d2e0bcbc2 Use <machine/elf_machdep.h> to override Elf64_Word and Elf64_Sword
on the Alpha (which uses a non-standard definitions for historical
reasons), rather than #ifdef __alpha__ (which is not cross-tool safe).
2001-10-31 17:44:42 +00:00
thorpej
d973bb96f1 Include <machine/elf_machdep.h> earlier, at the beginning of the file,
after the inttypes header.
2001-10-31 17:35:06 +00:00
thorpej
6797e85570 Include support for elf64. 2001-10-31 17:21:47 +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
reinoud
88ca038117 Change MACHINE_ARCH to arm making it ELF now. 2001-10-31 02:10:35 +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
thorpej
91626c3515 Split the exec formats included by loadfile() into separate files.
Primary goal: explcitly select which ELF format (elf32 or elf64) to
support for a cross tool which uses loadfile().
2001-10-30 23:51:03 +00:00
thorpej
715b4d636e Use the standalone byteorder routines. 2001-10-30 23:39:08 +00:00
thorpej
74eebee33c Add standalone byte-swapping routines that don't require testing
the system's byte-order:
- host to {big,little}-endian {16,32}
- {big,little}-endian {16,32} to host

These are not intended to be used in libsa directly, but are rather
intended to be used by host tools which may use libsa routines (such
as loadfile()) which need to use explicit byte-ordering.
2001-10-30 23:35:33 +00:00
manu
40c8c13901 Made syscallargs.h lint-friendly, so that it can be included in libc sources
more easily.
2001-10-30 21:52:26 +00:00
thorpej
f67e15c839 uvm_map_protect(): Don't allow VM_PROT_EXECUTE to be set on entries
(either the current protection or the max protection) that reference
vnodes associated with a file system mounted with the NOEXEC option.

uvm_mmap(): Don't allow PROT_EXEC mappings to be established of vnodes
which are associated with a file system mounted with the NOEXEC option.
2001-10-30 19:05:26 +00:00
thorpej
a2cd7623d4 Correct a comment. 2001-10-30 18:52:17 +00:00
thorpej
e8ee04475d - Add a new vnode flag VEXECMAP, which indicates that a vnode has
executable mappings.  Stop overloading VTEXT for this purpose (VTEXT
  also has another meaning).
- Rename vn_marktext() to vn_markexec(), and use it when executable
  mappings of a vnode are established.
- In places where we want to set VTEXT, set it in v_flag directly, rather
  than making a function call to do this (it no longer makes sense to
  use a function call, since we no longer overload VTEXT with VEXECMAP's
  meaning).

VEXECMAP suggested by Chuq Silvers.
2001-10-30 15:32:01 +00:00
itohy
36a6ce75fe Fix memory leak if
- ktrace enabled for I/O operaion, and
 - readv() causes an error.
2001-10-30 13:37:21 +00:00
kml
77c99e8c60 Add in support for timing out IPv4 routes added due to redirects,
as discussed in tech-net several weeks ago.  It turned out that
KAME had already added this functionality to the IPv6 stack, so
I followed their example in adding the sysctl variables
net.inet.icmp.rediraccept and net.inet.icmp.redirtimeout.
2001-10-30 06:41:09 +00:00
thorpej
380b5498e9 Make sure to load/store bbinfo values as big-endian. 2001-10-30 05:52:30 +00:00
thorpej
f16413a699 Rather than using nlist(3), use a magic structure with a magic
number that installboot(8) can search for.  Suggested by cgd@netbsd.org.
2001-10-30 05:13:09 +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
thorpej
0896046ab3 Attempt at making Type 1 config cycles work, based on "see config-map". 2001-10-30 01:21:24 +00:00
lukem
b3b9740195 add __KERNEL_RCSID() 2001-10-30 01:11:53 +00:00
thorpej
6fd8d278ed pci_conf_interrupt() takes bus/dev/pin, not bus/dev/func. 2001-10-29 23:33:42 +00:00
thorpej
7285b2c290 uvm_mmap(): If a vnode mapping is established with PROT_EXEC, mark the
vnode as VTEXT.

uvm_map_protect(): When VM_PROT_EXECUTE is added to a VA range, mark
all the vnodes mapped by the range as VTEXT.
2001-10-29 23:06:03 +00:00
thorpej
ccb78392f1 Check in of work-in-progress of Firepower native device support.
We can find devices in PCI configuration space, but not much else.
2001-10-29 22:28:37 +00:00
simonb
243a8aa895 Add EM_NS32K for the ns32k series CPUs. 2001-10-29 21:30:54 +00:00
martin
4e61daf35e In preparation for further changes: remove big parts of the ifdef mess
for OSes we no longer share this file with.
2001-10-29 19:15:48 +00:00
thorpej
2d06f95095 Add/rework infrastructure that will allow us to support native
device drivers:
- Various native device entries in cdevsw/bdevsw.
- Rework the interrupt infrastructure to provide more flexibility to
  the platform-dependent back-end.  Rewrite the "ofwgen" simulated
  interrupt routines to reflect the changes.
- Clear out the BAT registers and set the fixed battable entries before
  calling the platform init routine.  The platform init routine is allowed
  to set entries in the battable.
- Don't call the platform cons_init routine until after translation is
  enabled -- we might need translation to work in order to access bus
  space.
2001-10-29 19:04:24 +00:00
thorpej
61438ef172 For System registers which are not 32-bits wide, they are "left justified"
within the 32-bit word.  Add CSR_{READ,WRITE} macros which compensate for
this.
2001-10-29 18:57:15 +00:00
matt
3a74f9105b root finds ofbus, not ofroot (just like the shark/dnard) 2001-10-29 17:32:57 +00:00
matt
40296b7cc8 Use Lirqhandler (same bug/fix as in the footbridge_irq.S) 2001-10-29 17:30:26 +00:00
rearnsha
05885de5fc Garbage collect some early debug hacks that should not have been
committed in the first place and prevent linking.
2001-10-29 14:23:35 +00:00
lukem
80ac606906 ffs_sb_swap() fixes:
- calculate the offset and length of the postbl before byteswapping.
  problem noted by der Mouse.
- use offsetof() to determine # of fields to calculate in initial
  loop, rather than hard-coding in `52 fields'
- improve comments.
2001-10-29 11:26:35 +00:00
simonb
5f717f7c33 Don't need to include <uvm/uvm_extern.h> just to include <sys/sysctl.h>
anymore.
2001-10-29 07:02:30 +00:00
itojun
7b1918bdc8 always check extension header length. 2001-10-29 05:23:17 +00:00
thorpej
b5ae57acc0 Fix a typo, add some UL suffixes to memory map constants. 2001-10-29 04:48:21 +00:00
simonb
163e969b09 Include bit definitions for the Debug Status Register; from Artem Belevich
at Riverstone Networks.
2001-10-29 02:02:19 +00:00
simonb
545af90346 Don't return at the end of a void function. 2001-10-29 02:00:01 +00:00
simonb
f7144c4462 G/C unused enable_intr and disable_intr functions. Fix a whitespace nit. 2001-10-29 01:57:49 +00:00
simonb
46cb54843c Whitespace nit. 2001-10-29 01:53:59 +00:00
simonb
5f47f77815 Use wrteei to enable interrupts.
From Artem Belevich at Riverstone Networks.
2001-10-29 01:52:09 +00:00
simonb
6596d92841 Use the Walnut FPGA register offsets instead if the i8042 offsets for
the keyboard/mouse command and data ports (whee! they probe now), and
set up keyboard & mouse interrupts (untested for now).
2001-10-29 01:42:11 +00:00
simonb
90a347de11 If a pckbc is configured in, configure the FPGA so that separate
interrupts are used for the keyboard and mouse, interrupts are high
and level triggered (and enabled).
2001-10-29 01:37:29 +00:00
simonb
cc4d8c1285 Set up irq16 (FPGA interrupt) and irq17 (SMI interrupt) for the keyboard
and mouse.
2001-10-29 01:32:59 +00:00
simonb
ad762e99bf Expose (and augment) the FPGA registers, and add the static RAM address
and size.
2001-10-29 01:31:11 +00:00
augustss
246b858752 Inject events in the right place in the buffer. 2001-10-29 01:02:11 +00:00
jdolecek
24ba90929c Avoid using microtime(9) for atime/mtime, we don't need to have it
THAT accurate and microtime(9) is painlessly slow on i386 currently.
This speeds up small transfers much. The gain for large transfers
is less significant, but notable too.
Bottleneck was found by Andreas Persson (Re: kern/14246).

Performance improvement with PIII on 661 Mhz according to hbench (with
PIPE_MINDIRECT=8192):

buffersize     before    after
512            17        49
1024           33        110
2048           52        143
4096           77        163
8192           142       190
64K            577       662
128K           372       392
2001-10-28 20:47:15 +00:00
jdolecek
47ea6cbd85 Use hardcoded 8192 for PIPE_MINDIRECT, rather than being dependant
on PAGE_SIZE. The overhead of setting up Page Loan is pretty much constant
irregardless of page size, so it makes more sense to use fixed constant.

According to hbench, the overhead of Page Loan setup is still significantly
bigger than the performance gain for 4096 byte buffers on i386
(PIII/600Mhz). The difference is smaller on 386DX, but Page Loan is
still not faster for this case.

Also, there is some other code out there which expects 4KB writes
to not block even for 'blocking' write, since it works this
way on some other operating systems.
Partially addresses kern/14246 by Andreas Persson.
2001-10-28 20:27:55 +00:00
augustss
46679564db Add a DIAGNOSTIC test. 2001-10-28 17:16:58 +00:00
manu
6d572de955 Added character devices #60 and #61 to chrtoblktbl[]. They were missing,
and it introduced problems (EBUSY error when opening the driver for
writing in securelevel >= 1, plus manipulating some unitialized data at
the end of chrtoblktbl[])
2001-10-28 17:11:56 +00:00
augustss
3deca4b069 Use the usb callout macros. 2001-10-28 16:53:21 +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
augustss
87746219bd Put in some tests to see if the input source is NULL before using it.
Suggested by Havard Eidnes <he@netbsd.org>.
2001-10-28 10:30:22 +00:00
martin
d1f0e4f6e4 Don't call if_alloc_sadl when creating the pppoe interface, it's called
from sppp_attach.
When destroying the interface, call sppp_detach for proper cleanup.
This avoids a crash from the slow timeout handler for no longer existing
interfaces (spotted by Rémi Zara).
2001-10-28 09:48:20 +00:00
isaki
12707fe416 fix typo s/X86K/X68K/ in comment. 2001-10-28 07:05:51 +00:00
christos
2a64b3cc60 use the copy of path stashed in pack->ep_emul_arg and free it.
also don't allocate the emul path, because it is causing a memory leak.
2001-10-28 04:47:27 +00:00
christos
f7cb99f9c6 make a copy of the epp->ep_path, because it is too late to use it when
copyargs is called since we've swapped vmspaces.
2001-10-28 04:46:42 +00:00
christos
19c695e204 fix assembler warnings 2001-10-28 01:38:52 +00:00
he
90d849dc54 Pull down revision 1.24.4.1 from the netbsd-1-5 branch:
Make sure that an unlabeled device gets at least RAW_PART
in the default in-core disklabel, instead of only a single
partition, so that applying a new disklabel can work normally.
2001-10-27 18:32:35 +00:00
jdolecek
1d592578e5 make compile with VM86 defined 2001-10-27 18:27:06 +00:00
darrenr
b6e4899865 fix so it compiles on a system without 'options SUN4M' 2001-10-27 17:44:18 +00:00
rearnsha
839525d027 When creating section maps, use pte_cache_mode for setting the
page attributes of cacheable pages.
2001-10-27 16:51:44 +00:00
rearnsha
b044d8f60c Add a couple more diagnostics. 2001-10-27 16:48:50 +00:00
rearnsha
e185c586c3 Export pte_cache_mode. Define PT_CACHEABLE in terms of it. 2001-10-27 16:45:35 +00:00
rearnsha
3fd2995a76 Declare the plcom device. 2001-10-27 16:42:37 +00:00
rearnsha
9a322ae54f Set initial spl level to SPL_SERIAL, which for some strange reason
is higher than SPL_HIGH (maybe we should be fixing SPL_HIGH).

If IPL_STATCLOCK is defined, initialize spl_masks[_SPL_STATCLOCK] from
it; otherwise initialize use IPL_CLOCK.
2001-10-27 16:41:00 +00:00
rearnsha
85123cf6bf Add new spl level -- _SPL_STATCLOCK. 2001-10-27 16:37:24 +00:00
rearnsha
8a92dcdaa8 Pull in machine/conf.h to find out if we have the plcom serial driver.
If so, then call plcomsoft when appropriate.
2001-10-27 16:34:12 +00:00
rearnsha
4487810503 Add the IFPGA console device. 2001-10-27 16:29:23 +00:00
rearnsha
4aeabfe53e Build tags files for the evbarm subtree. 2001-10-27 16:23:05 +00:00
rearnsha
19cf921b2c Support for the PrimeCell PL010 UART. Similar in behaviour to
the normal com driver, but with competely different bit and register
assignments.
2001-10-27 16:22:06 +00:00
rearnsha
27bfd8adf2 Register definitions for the v360 PCI-localbus bridge, as used
on the Integrator/AP.
2001-10-27 16:20:29 +00:00
rearnsha
00a19aff1d Support for the Integrator/AP core-logic FPGA. 2001-10-27 16:19:08 +00:00
rearnsha
65f54d13cc Basic support for the Integrator/AP board. 2001-10-27 16:17:51 +00:00
rearnsha
e882c399b9 Add SCSI PCI and support for the integrator console. 2001-10-27 16:15:50 +00:00
rearnsha
b7203fd4cb Configuration for Integrator boards. 2001-10-27 16:14:44 +00:00
rearnsha
682379120f Integrator boards need a special start-up file to reposition the
kernel image.
2001-10-27 16:14:04 +00:00
rearnsha
3444679bb4 Define BOARDTYPE in the Makefile so that the target-specific
Makefile fragment (to be added shortly) can DTRT based on the
board we are building a kernel for.
2001-10-27 16:12:33 +00:00
rearnsha
dfab106e99 Add Integrator files. 2001-10-27 16:10:12 +00:00
rearnsha
cd6b6b2576 Pick up arm/psl.h if not NEWINTR. 2001-10-27 16:08:16 +00:00
rearnsha
5431825a48 Add code to support machines that don't use NEWINTR. 2001-10-27 16:07:45 +00:00
rearnsha
267e45bb0f Temporary file, until such time as the integrator is made to
work with NEWINTR.
2001-10-27 16:06:57 +00:00
rearnsha
a6fe9fcb48 Include arm/pci_machdep.h. 2001-10-27 16:06:15 +00:00
rearnsha
4d7eb9deff Fix a comment. EV boards don't always use a Footbridge. 2001-10-27 16:05:03 +00:00
augustss
546b6e4434 Cosmetics. 2001-10-27 13:52:57 +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
jdolecek
36b128126e change obsolete comment
both freebsd_aout and freebsd_elf were confirmed to work, install them
2001-10-27 12:11:17 +00:00
jdolecek
899455e34e freebsd LKM works too 2001-10-27 12:10:02 +00:00
jdolecek
a24e94e460 Move the compat_util.c handling to lkm/compat/Makefile.inc. The users
are expected to set COMPAT_UTIL_OVERRIDE to preferred emulation name
prefix.
Use this for compat_freebsd and compat_linux LKMs.
2001-10-27 12:09:34 +00:00
jdolecek
9f2548a603 Regen:
Hook in minherit(2), fhstatfs(2), fhopen(2), fhstat(2).
Adresses kern/8622 by Paul Shupak.
2001-10-27 10:02:57 +00:00
jdolecek
084e319b3f Hook in minherit(2), fhstatfs(2), fhopen(2), fhstat(2).
Adresses kern/8622 by Paul Shupak.
2001-10-27 10:00:55 +00:00
jdolecek
dab7dee0f2 Add a comment regarding the ELFOSABI_FREEBSD thing,
and reformat the condition a bit to avoid nested if
2001-10-27 09:50:22 +00:00
ichiro
8f9f77356d add entry ELSA XI-800 CF wavelan card 2001-10-27 08:16:17 +00:00
ichiro
3fc98e32f6 regen 2001-10-27 08:15:22 +00:00
ichiro
bfc10c9a50 add ELSA CF wavelan card
XI-800
2001-10-27 08:05:21 +00:00
shin
4843675231 fix virtual alias problem in pmap_copy_page().
to eliminate virtual alias, source page should also be flushed.
fixes PR/13587.
2001-10-27 05:44:45 +00:00
chs
a54f8441f8 in cache_lookup(), if we get a cache hit but then fail to vget() the found
vnode, we should not attempt to remove the namecache entry.  this is because
vget() can sleep (eg. if VXLOCK is set because the vnode is being reclaimed),
and so multiple threads can end up in this context at the same time.
if this happens, each thread ends up removing the cache entry, but
the code to remove the entry assumes that the entry is still valid.
so we should just leave the (now stale) entry in the cache.
if another thread finds the entry again before it is reused,
that thread will notice that the entry is stale and remove it safely.
fixes PR 14042.
2001-10-27 04:53:38 +00:00
msaitoh
32b3143333 Fix incorrect kernelmode check in INTRENTRY macro.
Broken INTRENTRY causes CPU reset when sigaltstack is used.
2001-10-27 03:46:19 +00:00
augustss
14fc12f3b4 Cosmetics. 2001-10-27 00:39:29 +00:00
augustss
b609967aa7 Don't enable/disable kbds that belong to a display; they are always enabled. 2001-10-27 00:35:48 +00:00
augustss
48673c604a Having a display does not preclude the mux from being open. 2001-10-27 00:34:57 +00:00
matt
c62d330ad1 Netwinder's MACHINE_ARCH is arm, not arm32. 2001-10-26 23:21:31 +00:00
augustss
49c2ea7a87 Compare against coreect value to determine if we belong to a mux. 2001-10-26 20:48:47 +00:00
augustss
eadca0dfa3 Remove TODO list. 2001-10-26 20:45:05 +00:00
augustss
a5d3f7530d Small rearrangement and more error checking. 2001-10-26 20:36:27 +00:00
augustss
6d55fe438e Change a debug message. 2001-10-26 20:35:55 +00:00
augustss
17ba384efc s/usbd_alloc_report_desc/usbd_read_report_desc/ 2001-10-26 17:58:21 +00:00
augustss
dc901ef1f3 Compare pointer with NULL instead of using them as a condition. 2001-10-26 17:53:59 +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
augustss
53adfd4111 Add Via KT266 as an ATA100 controller. 2001-10-26 10:38:12 +00:00
shin
e003f33738 remove " in assignment of ENDIAN.
fixes mipseb link breakage.
2001-10-26 08:25:54 +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
lukem
6f39841c03 - pull in ufsmount.h after inode.h, because the latter pulls in
quota.h which the former needs, and this makes the usage consistent
  with other files anyway
- expand the details in a few panic strings
2001-10-26 06:37:55 +00:00
lukem
99147a7648 remove #include <ufs/ufs/quota.h> where it was just to appease
<ufs/ufs/inode.h>, since the latter now includes the former.  leave the former
in source that obviously uses specific bits of it (for completeness.)
2001-10-26 05:56:06 +00:00
lukem
d0dc904dae this needs <ufs/ufs/quota.h>, so pull it in 2001-10-26 05:46:57 +00:00