Commit Graph

2349 Commits

Author SHA1 Message Date
wiz
0ec178eea9 Spell "relevant" correctly. From Zafer Aydogan. 2006-12-25 18:31:18 +00:00
yamt
8bf7662829 merge yamt-splraiseipl branch.
- finish implementing splraiseipl (and makeiplcookie).
	  http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
	- complete workqueue(9) and fix its ipl problem, which is reported
	  to cause audio skipping.
	- fix netbt (at least compilation problems) for some ports.
	- fix PR/33218.
2006-12-21 15:55:21 +00:00
yamt
b0a14e5934 - remove a static configuration, FILEASSOC_NHOOKS. do it dynamically instead.
- make fileassoc_t a pointer and remove FILEASSOC_INVAL.
- clean up kern_fileassoc.c.  unify duplicated code.
- unexport fileassoc_init using RUN_ONCE(9).
- plug memory leaks in fileassoc_file_delete and fileassoc_table_delete.
- always call callbacks, regardless of the value of the associated data.

ok'ed by elad.
2006-12-11 15:24:27 +00:00
martin
fe8307c191 Enable the .note.netbsd section 2006-12-05 16:17:20 +00:00
elad
ca185532f5 sparc64: don't enable PaX MPROTECT by default for now.
sparc: add commented out 'FILEASSOC'.
2006-12-04 23:43:35 +00:00
dyoung
571fae988f Compile gre(4) into the GENERIC kernel. 2006-12-04 01:30:56 +00:00
tsutsui
e2e52f2716 - add working vge* at pci? and ciphy* at mii?
- remove an obsolete comment
2006-11-26 16:14:03 +00:00
wiz
09cb1d6f1c s/existance/existence/, from Zafer. 2006-11-24 22:52:16 +00:00
wiz
6919c6578c s/independant/independent/, from Zafer. 2006-11-24 22:04:21 +00:00
christos
1665d5e960 fix spelling of accommodate; from Zapher. 2006-11-24 19:46:58 +00:00
christos
887f588c92 adjust limits takes struct proc again. 2006-11-21 15:02:18 +00:00
christos
1882355e27 From Nicolas Joly:
> It seems that 32bits programs, running under compat_netbsd32, using
> setrlimit force all other programs to have their maximum data size
> fixed at 3GB, where native 64bits apps used 8GB previously.

I tracked this one to the `netbsd32_adjust_limits()' function (called
when creating a new process under compat_netbsd32), where data and
stack limits are set without checking for shared `p_limit' structure
(p_limit->p_refcnt > 1). This explain the side effect where processes
have their limits changed when a compat_netbsd32 (or compat_linux32)
program is run.

The fix is to use `dosetrlimit()' to ensure the needed copy-on-write
behaviour for shared structure.
2006-11-21 14:32:27 +00:00
christos
168cd830d2 __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
jmmv
fb3e66fdb3 Enable TMPFS by default. OK'ed by core@.
I'm leaving those platforms with few users and those whose machines are
not very powerful untouched per uwe@'s suggestion.  The port masters or
the real users of those ports are better suited to make the decision of
enabling it.
2006-11-11 19:00:16 +00:00
jmmv
7a13fe4abf Remove tmpfs's experimental status. OK'ed by core@. 2006-11-11 18:47:08 +00:00
tsutsui
36fcb0cbe4 Add rgephy at mii and rlphy at mii.
Tested on Ultra5 with RTL8139C (not plus) and RTL8169S.
2006-11-09 15:23:42 +00:00
tsutsui
2ae6e40c03 More cleanup of sparc64 clock stuff:
- split mkclock attachment from sparc64/clock.c into dev/mkclock.c
  (now clock.s only contains clock interrupt and timecounter stuff)
- rename match/attach functions of rtc at ebus to match the device name
- update some comments around clock devices in GENERIC

No objection on port-sparc64 for a month.
2006-11-09 15:08:04 +00:00
elad
d70e6d1b25 Compile in Veriexec by default on some popular archs (amd64, i386, sparc64)
so it's more accessible and less of a hassle to put to use. Also enable
fileassoc(9) by default as a result, which for itself may open the door for
a lot of cool stuff. (stay tuned. :)

I recommend port masters of other archs to consider doing the same.
Personally I don't know which ports are considered more of a legacy than
in-production, so I'm leaving it for someone else for now...

No objections on tech-kern.
2006-10-26 11:48:38 +00:00
macallan
4c4d8037a9 Take into accout that SCSI controllers may attach to other things than
pci or sbus, like esp at dma.
So now my U1 can find its boot device again.
2006-10-26 00:19:44 +00:00
mrg
66365a4f3c - note that __idle_u should go away but doing so breaks things
- fix several comments to reality
- clean up the #ifdef NO_VCACHE code slightly
- use call instead of set/jmpl
- remove a couple of unnecessary stores to curlwp
2006-10-25 11:56:56 +00:00
martin
f559eee297 In the INTSTACK and KSTACK_VA special case treatment in pmap_exctract,
do not add the offset to the result - the calculated PA is the right
value - not the start of the page as in the other cases.
This fixes DMA to kernel stack, and avoids "fabricating a geometry"
warnings.
2006-10-24 21:11:58 +00:00
pooka
362b187ff0 constify in cpu_setmcontext() 2006-10-22 13:59:14 +00:00
mrg
592435f965 don't drop const in cpu_setmcontext32(). 2006-10-22 10:50:44 +00:00
mrg
1b262f1cb0 correct a debug statement. 2006-10-22 00:24:23 +00:00
mrg
9631418f8f remove "struct cacheline" and the "cacheline" variable. (it was only set
in cpu_attach(), overwritten by multiple cpus, and only one member of the
12 or more were ever used again.)  add an ecache_min_line_size to replace
this functionality.

clean up some non-SMP friendly code from cpu_attach():
	- only reset the fpu state on the boot cpu
	- don't bother printing "FPU version 0" always
	- don't call getver() and ignore the result
	- print the UPA id on the first cpu0: line

only print mp_tramp address #ifdef DEBUG.

reset the fpu state in cpu_hatch(), like cpu_attach() does for the boot cpu.


cpu_attach() is now free of SMP-unfriendly code.
2006-10-21 23:49:29 +00:00
bouyer
154d613f0b Add support for the Intel 80003 Gigabit Ethernet controller (found e.g. in
newer server chipsets) to wm(4), from the FreeBSD em(4) driver.
While there, add a few other Intel Ethernet controller that should work as
is.
Properly update the RX error and TX collision counters.
Add ikphy(4), a driver for the Intel i82563 Kumeran 10/100/1000 Ethernet PHYs
2006-10-21 14:10:32 +00:00
mrg
877957f469 add a "mach sir" command to call sir instruction ('software initiated
reset').  this is a much more drastic way to do "mach prom", but it
works when used from cpu>0, which "mach prom" currently does not.
2006-10-21 03:16:05 +00:00
mrg
e54ce8ca38 avoid yet another GCC uninitialised warning at -O3. 2006-10-20 22:12:57 +00:00
martin
d55cb18cdc A few -Wextra nits 2006-10-20 18:26:26 +00:00
martin
06f6d1ebf7 Sync (commented out) kgdb options with reality.
(Not that it works at all - the locore.s support is not done yet)
2006-10-19 22:01:18 +00:00
martin
6caa94ff4b kgdb support for sabtty 2006-10-19 21:52:12 +00:00
martin
860142f506 Remove unsued file 2006-10-19 21:44:51 +00:00
martin
8c154addc5 Remove obsolete (and partially accidently commited) kgdb parts 2006-10-19 21:09:46 +00:00
martin
ab081bc491 Ooops, array initialization for the page size map differs in DEBUG and
other kernels - hide details in a macro.
Pointed out by Matthias Scheler.
2006-10-18 15:28:39 +00:00
martin
27bbd80a3d Initializers 2006-10-18 09:18:22 +00:00
rjs
ddc28f5427 Clean up some comments. Cosmetic change to use correct structure
offset names.

Optimize out two instructions from sparc64_ipi_save_fpstate and
sparc64_ipi_drop_fpstate.
2006-10-18 01:41:38 +00:00
mrg
d7ad3f5fab allocate 128KB (as opposed to 64KB) per-cpu, and place the interrupt
stack, cpu_info structure, panicstack, idle uarea and normal kernel
stack in here.  the idle uarea and kernel stack are in the 2nd 64KB
page.  the interrupt stack and cpu_info structure are as the same
place in the 1st 64KB page, and the panicstack grows down from the
top of this page.  update comments in param.h to suit (XXX: a lot
of these constants should move to a header file that will not pollute
the name space so much.)  map these pages identically between
cpu_initialise() and cpu_mp_startup(), and deal with the two 64KB
pages in pmap_extract().  keep an unmapped 64KB page between them.

don't initialise the unused "ci_eintstack" member of the cpu_info
structure

use constants to initialise many addresses in the cpu_info structure,
consolidating these assignments from cpu0 and cpu>0

delete u0/estack0/panicstack from locore.s

clean up some wrong comments in locore.s

fix a 32bit-only bug in cpu_mp_startup().

delete 'u0' entirely.


this fixes recent random lossage seen on port-sparc64: processes
stuck in RUN state, data faults, and hangs.
2006-10-17 22:26:05 +00:00
martin
05a4f3ccd9 Remove obsolet kgdb parts 2006-10-16 22:21:52 +00:00
martin
25af9d05c1 Remove obsolete kgdb prototypes. 2006-10-16 22:07:11 +00:00
martin
6b3bb75f5c Initializers 2006-10-16 21:57:10 +00:00
martin
e4354c85e7 Initializers 2006-10-16 20:31:45 +00:00
martin
5c0b67304d Missing initializer 2006-10-16 20:27:40 +00:00
martin
7549c09e6a do not test unsigned values for < 0 2006-10-16 20:23:24 +00:00
martin
387e642293 Debugger() is only available if we compile with DDB 2006-10-16 20:21:46 +00:00
martin
4367e285ad Make -Wextra save 2006-10-15 21:07:45 +00:00
martin
7815b7efa3 Missing initializers 2006-10-15 21:01:03 +00:00
martin
c8f99f6db4 Missing initializer 2006-10-15 20:59:53 +00:00
martin
1f9d7be4f6 Initializers 2006-10-15 20:57:13 +00:00
martin
e279a26eb5 Missing initializers 2006-10-15 19:59:50 +00:00
martin
9384ee0db9 Missing initializer 2006-10-15 19:53:27 +00:00
martin
6bac574e23 Missing initializers 2006-10-15 19:50:53 +00:00
martin
4183890e73 Initialize struct consdev in C99 style 2006-10-15 19:38:45 +00:00
martin
3176f67f9e Sprinkle some __unused 2006-10-15 19:22:59 +00:00
martin
cb5d206224 __unused policy 2006-10-15 19:22:17 +00:00
tsutsui
aa360516de Remove eeprom and clock at mainbus stuff.
They are available only on sun4 or sun4c.
2006-10-10 12:43:11 +00:00
tsutsui
4e4ba0146c Print ofboottarget and ofbootpartition on DEBUG even if they are not set. 2006-10-10 12:41:56 +00:00
martin
e8a3d86579 Ooops, stupid typo prevented recognizing wd* as boot device
(and stupid me tested on a machine with RAID 1 autoconfigured as root).
While there, make -Wextra ready and add another debug message.
2006-10-09 22:16:33 +00:00
martin
505e0ced00 Missing initializers 2006-10-09 21:50:27 +00:00
martin
9e7dc0ba61 More debug output for matching the boot device. 2006-10-09 07:36:09 +00:00
tsutsui
0f4d7bb188 Update comment for recent reorganization of 64bit/32bit kernel configurations. 2006-10-09 06:20:05 +00:00
mrg
273c5b01ad avoid bringing in mc146818 routines for kernels that do not have the
'rtc'-style clock linked in.  put the rtc code in it's own file and
only link it in if it is actually configured.  fixes PR#23342.
2006-10-09 03:34:56 +00:00
rjs
69dfdd82db Allow kernel to build with KGDB enabled. 2006-10-07 18:14:42 +00:00
rjs
71d88cb355 Make it build without debugger. 2006-10-07 18:11:36 +00:00
jnemeth
6238d5fa66 Initial support for floppy drives on sparc64. This has been tested
on an Ultra 2 and works fine, apart from formatting which is known
to be broken.  It failed to work on an ebus machine.  The ebus
support compiles fine, but I don't have hardware for testing.  This
code is based on the sparc driver with hints from OpenBSD on how
to do the sbus and ebus attachments, along with help from martin@
and mrg@.

Initial commit approved by martin@

TODO:
- fix ebus support
- fix XXX issues
- check resource deallocation
- fix formatting
- merge remaining differences from sparc driver
- split out back end chip support
- have sparc driver use new common back end chip support
- adapt to newlock when branch is ready
- adapt to "disk-info" property dictionary
2006-10-06 08:44:59 +00:00
martin
0d3d26d9e7 After detecting wedges, close the disk vnode - otherwise things like
root on raid 1 will not be happy - fixes PR kern/34696.
2006-10-05 22:41:31 +00:00
chs
33c1fd1917 add support for O_DIRECT (I/O directly to application memory,
bypassing any kernel caching for file data).
2006-10-05 14:48:32 +00:00
tnozaki
44eb8f042e fix gcc -Werror -Wmissing-braces problem
mbstate_t(this is opaque object)'s initializer should be ``{ 0 }'',
so changed 1st field of union from character array to integer.
2006-10-04 13:51:59 +00:00
mrg
6ea0a43f25 use call instead of set/jmpl. add an entry point for idle that expects
sched_lock to be unlocked, and use this for non-boot cpu's.  complete a
comment describing how registers in idle_switch are expected to be set.
2006-10-04 05:00:39 +00:00
mrg
0b76b71214 redo previous: print these int64_t with PRIx64. 2006-10-03 23:39:03 +00:00
mrg
c8ead6a43b use the same SAVE_LOCALS_INS definition for 32 bit and 64 bit kernels.
refactor TRAP_SETUP() a little between these two versions to be more alike.
2006-10-03 23:34:52 +00:00
mrg
ca8f51da8c use the correct size/type for MP variables (pointers and longs).
a 32 bit MULTIPROCESSOR kernel now builds (and crashes quickly.)
2006-10-03 23:05:53 +00:00
mrg
9c88746805 need a (u_long) in the middle to go from 64 bit value to pointer value. 2006-10-03 22:37:51 +00:00
mrg
5552365a11 in pmap_mp_init(), tag & data are 64 bit int's, print them as such.
also, fix up some comments and function names.
2006-10-03 22:36:21 +00:00
mrg
4171072ea1 need an extra (u_long) to convert a 32 bit pointer to a cell_t. 2006-10-03 21:06:58 +00:00
mrg
5e4d079944 ddb_suspend() takes a struct trapframe64 *. 2006-10-03 21:05:46 +00:00
mrg
7aeb862201 cb_cpuinfo member is a paddr_t - make it printable as 64bits in 32bit mode. 2006-10-03 21:05:22 +00:00
mrg
09e5a0bb3a make get_ncpus() set sparc_ncpus = 1 in the !MULTIPROCESSOR case. 2006-10-03 21:04:47 +00:00
mrg
71bff15ee0 in the 64bit version of SAVE_LOCAL_INS, s/BIAS/STKB/ to allow future
sharing of the 32 and 64 bit versions of the {TRAP,INTR}_SETUP macros.
2006-10-03 20:01:19 +00:00
mrg
fa535729f9 remove some sparc v8 only definitions. 2006-10-02 23:22:52 +00:00
chs
e8295642bd remove MALLOC_NOINLINE, it doesn't do anything anymore. 2006-10-02 03:28:29 +00:00
elad
65792a0340 More from Matt Fleming:
Adapt to KAUTH_DEVICE_TTY_PRIVSET and KAUTH_DEVICE_TTY_OPEN.
2006-10-01 20:31:49 +00:00
elad
e8373398dc Adapt MD code to KAUTH_DEVICE_TTY_OPEN. Patch from Matt Fleming, thanks! 2006-10-01 18:56:21 +00:00
martin
787035550f When setting parameters, we should not only calculate the settings but
better write them back to the chip.
2006-10-01 17:31:47 +00:00
martin
d53ffe65a4 Use device_xname() accessor 2006-10-01 17:21:29 +00:00
martin
3cda2d1ef3 Oops, now *realy* do print the non-truncated firmware boot path 2006-10-01 10:15:24 +00:00
martin
6125ef30d2 Print the raw bootpath value 2006-10-01 10:04:13 +00:00
martin
9842f0088d Use more device_ accessor macros 2006-10-01 10:02:28 +00:00
itohy
b2d7fb48f1 Use ATA timing, instead of busmaster wait, for adding waits.
Use default wait value 0x01.
2006-10-01 09:53:08 +00:00
martin
90924281b7 Sysinst now properly ignores eon0 interfaces - so there is no need to
avoid ISO networking and EON in this kernel anymore.
2006-09-29 10:44:31 +00:00
manu
f309b668fd - Document COMPAT_15 as doing nothing
- Add COMPAT_15 to all the kernel that had COMPAT_14, for the sake of coherency
- Remove the only occurences of #ifdef COMPAT_15 in the tree: for the ARM
ports, COMPAT_15 was always used in conjunction with EXEC_AOUT. Only EXEC_AOUT
matters here.

This address kern/18407
2006-09-27 21:42:04 +00:00
martin
73962fd960 Minor cosmetics and error checking for probably impossible corner
cases.
2006-09-26 19:06:46 +00:00
thorpej
68c8876e88 device_setofnode(): Release the number object after storing it in the
device properties dictionary.  The dictionary also retains the object,
so if we don't release it, the initial reference leaks.
2006-09-26 16:11:02 +00:00
elad
2f417d0f92 Oops! forgot "options" in previous commit. Pointed out by freza@, thanks! 2006-09-26 14:30:26 +00:00
elad
8b4adae65a Make PaX mprotect(2) restrictions more accessible.
On amd64, sparc64, i386, and alpha, they will be compiled in and disabled
by default. That means that to use them you either enable the "global"
knob with sysctl, or use paxctl(1) to enable it on a per-program basis.

On sparc and macppc just include a commentd out line in the GENERIC kernel.
2006-09-26 14:08:18 +00:00
martin
931c60dde9 Rework boot device matching to get rid of lots of special case code
and tables to map fimware names to driver names. Based on a suggestion
from Eduardo (quite some time ago).
Each device (on busses we can handle and care about) gets a device property
storing the devices OpenFirmware package handle. To match the boot device,
the phandle of the chosen bootpath is compared against this property,
plus some additional string matching for disk/cd devices (where OF only
provides a node for the device class, not each instance).
2006-09-26 09:45:57 +00:00
mrg
8dd1169cb4 print the cpu number in a bunch of fault handler debug messages. 2006-09-25 05:52:34 +00:00
martin
8c0de790f8 Cosmetic nit - print the correct cpu number in the spin up message 2006-09-20 20:09:42 +00:00
mrg
62f1521a0b - remove some way old FP setup/teardown code
- put the block memcpy/memset inside #ifdef USE_BLOCK_STORE_LOAD which
  is (now) defined.

no functional change, same .o is generated.
2006-09-19 18:42:35 +00:00
mrg
349c05c4c3 re-order the changes in rev 1.217 to give registers a little bit of
time to settle between usage, like it was before hand.
2006-09-19 18:00:27 +00:00
mrg
ab182fe706 remove unused dump_rtf_info variable. 2006-09-19 06:43:11 +00:00