Commit Graph

82407 Commits

Author SHA1 Message Date
tsutsui
3c612311d0 Use bus_space_map(9) and bus_space_vaddr(9) rather than iomap(). 2006-07-21 18:05:30 +00:00
kent
15c376e363 * azalia_init_corb()
No need to confirm CORBRPRST is set even with ICH6/ICH7
2006-07-21 17:30:26 +00:00
gdamore
01f0465721 Regen. 2006-07-21 17:20:59 +00:00
gdamore
e3a079b540 Update ADMtek pci device ids to match data sheets. While here, add the 9513
device (although I've never seen one, I have a datasheet for it. :-)
2006-07-21 17:20:20 +00:00
ad
3029ac48c7 - Use the LWP cached credentials where sane.
- Minor cosmetic changes.
2006-07-21 16:48:45 +00:00
tsutsui
888ea5adc5 Use macro defined in dioreg.h. 2006-07-21 15:14:11 +00:00
kent
21623cc733 support for EAPD, Balanced I/O, and LR-Swap 2006-07-21 14:40:12 +00:00
yamt
13170f18a9 assert_sleepable: panic if curlwp == NULL. 2006-07-21 10:22:51 +00:00
yamt
696edc2b76 use ASSERT_SLEEPABLE where appropriate. 2006-07-21 10:08:41 +00:00
yamt
9862c5bef2 add ASSERT_SLEEPABLE() macro to assert we can sleep. 2006-07-21 10:07:29 +00:00
tsutsui
7d4b57d7bc Some KNF. 2006-07-21 10:01:39 +00:00
perseant
1e9b73d972 Oops, commit the correct version of lfs_rfw.c. The roll-forward functionality
is known not to work in this version (as it did not previously) but it should
at least compile.
2006-07-20 23:56:27 +00:00
perseant
83771be892 Separate the (non-working) LFS kernel roll-forward code into its own file,
lfs_rfw.c.
2006-07-20 23:49:07 +00:00
bjh21
cf7ce97e4b Silly error: xos_cli() should call XOS_CLI, not OS_CLI. 2006-07-20 23:35:20 +00:00
perseant
20227e112e Note partial segments that are written by the cleaner, to help out the
roll-forward agent.
2006-07-20 23:16:50 +00:00
perseant
186ffd50ab Loop on the check for lfs_nowrap, so we don't allow a process to squeeze by. 2006-07-20 23:15:39 +00:00
perseant
5fdcd70349 Move the kauth checks up front, so that all new LFS fcntl calls are subject
to the check for superuser privilege.
2006-07-20 23:14:09 +00:00
perseant
8c161d1081 Don't try to write all the vnodes, when the cleaner needs a vnode to be
recycled.
2006-07-20 23:12:26 +00:00
christos
cb6bd87d8a PR/34043: mrt at notwork dot org: 3.99.22 kernel crashes at *_vptofh() called
from vfs_composefh_alloc() due to uninitialized "fidsize".
2006-07-20 16:18:14 +00:00
christos
1c50629119 When there are too many empty entries in a row, and we need to try to
read the next block, free the cookie buffer before doing so to avoid
a memory leak. Reported by  Mark Davies.
2006-07-20 15:12:23 +00:00
tsutsui
2e21abf224 Identify models HP362 and HP382. From OpenBSD, tested on my HP382.
Note now options HP362 and options HP382 are required for these models
in your kernel config file.
2006-07-20 13:21:38 +00:00
rumble
ec5b122721 Regen. 2006-07-20 13:12:32 +00:00
rumble
4d3ba0cd44 Beautify. 2006-07-20 13:12:01 +00:00
rumble
db767e167c Add entries for the Phobos G100, G130 and Set Engineering GIO Fast Ethernet
cards.
2006-07-20 13:11:27 +00:00
bjh21
5bdcc8987d -mshort-load-words has been removed in GCC 4. It was only an optimisation,
so just stop using it.
2006-07-20 10:53:12 +00:00
rumble
b0631951f9 Disable haltwo(4) by default. The driver does not properly determine when
the audio hardware is not present and causes a hang on Challenge-S systems.

Approved by pooka@ and sekiya@.
2006-07-20 10:37:25 +00:00
cube
2d03dc4c3e Fix an obvious overlook (struct fileassoc_hook is not defined in
fileassoc.h anymore).  I could say "please compile-test", but then, I'm not
doing it either for that commit.
2006-07-20 09:00:41 +00:00
kochi
c8920f2898 eliminate bogus acpi debug #define symbols 2006-07-20 05:05:26 +00:00
ad
fe65535924 Try again.. Move l_cred into the startzero section, and fix the define.
Doesn't change the layout of struct lwp.
2006-07-20 00:17:10 +00:00
ad
464ac13fb4 Bump version to NetBSD 3.99.23 (LWP creds). 2006-07-19 22:29:25 +00:00
ad
c0f87b2ba1 Move l_acflag into the section that gets zeroed in newlwp(). 2006-07-19 22:06:09 +00:00
ad
2b79369c7e - Hold a reference to the process credentials in each struct lwp.
- Update the reference on syscall and user trap if p_cred has changed.
- Collect accounting flags in the LWP, and collate on LWP exit.
2006-07-19 21:11:37 +00:00
tsutsui
2c2371cf55 Adjust comments. 2006-07-19 19:29:02 +00:00
tsutsui
82cc83ca42 Set cpuspeed for HP_400 and HP_425 explicitly. 2006-07-19 19:25:48 +00:00
tsutsui
4c07c7291c Adapt stand sources to changes of intio device offset macro. 2006-07-19 19:23:56 +00:00
tsutsui
e4b249fede oops, fix typo 2006-07-19 18:28:58 +00:00
tsutsui
d0e89b46cb - strncpy() -> strlcpy()
- adjust buffer length
2006-07-19 18:25:40 +00:00
tsutsui
83ed44a817 some KNF 2006-07-19 17:32:15 +00:00
tsutsui
f94698e954 Define base address offsets of intio devices in intioreg.h
and replace various magic numbers with the macro.
2006-07-19 17:21:23 +00:00
tsutsui
33663964ec Use iobase address passed from attach args. 2006-07-19 17:18:03 +00:00
tsutsui
d72fb94231 - use __arraycount()
- remove parentheses from return values
2006-07-19 16:23:41 +00:00
tsutsui
6b93d0f87d Use CPUFLAGS="-march=vr5000 -mabi=32". 2006-07-19 15:33:53 +00:00
blymn
36c3e07ffa Add destination file vnode to rename checking. 2006-07-19 12:45:19 +00:00
blymn
ee551118c6 Add extra argument to rename check to check destination file. 2006-07-19 12:44:11 +00:00
kent
9f8e1fe441 fix crash by reading a mixer value with AD1981HD codec, which
has invalid connection lists.
2006-07-19 02:40:18 +00:00
itohy
67d67209d7 Make new device (vendor 0x1317, product 0x9511) work as AN983. 2006-07-18 14:26:57 +00:00
itohy
3cb3cfb1dd Regen from pcidevs rev 1.807. 2006-07-18 14:21:02 +00:00
itohy
060bfcacf0 Identify vendor 0x1317, product 0x9511 as ADMtek AN983B,
since OpenSolaris says it is "ADMTek Comet 983b".
2006-07-18 14:19:14 +00:00
tsutsui
fd040c4006 Add and update misc items. 2006-07-18 13:24:39 +00:00
tsutsui
e621e8f3df - always enable options MIPS3_ENABLE_CLOCK_INTR so that spllowerclock(9)
works properly
  (XXX: the real fix is to implement proper CLFK_BASEPRI())
- prepare an independent statclock(9) handler which use MIPS3 CPU internal
  clock interrupt. Enabled by options ENABLE_INT5_STATCLOCK, but not enabled
  by default.
2006-07-18 12:51:01 +00:00
tsutsui
fe55d37a26 Remove obsolete comment. 2006-07-18 12:21:42 +00:00
salo
36848f108e G/C apm_power_print() for APM_POWER_PRINT case, make it compile.
ok <christos>
2006-07-17 21:04:17 +00:00
christos
52f01eaf1c remove lhs cast for gcc4 2006-07-17 19:29:31 +00:00
gdamore
df112a3055 Wait a little longer, because some devices (eg bt3c) take a few seconds to
enable when they are loading firmware so we need to wait a bit longer.

Patch from Iain Hibbert, at his request.
2006-07-17 19:20:16 +00:00
elad
8ee43586ab move the fileassoc_delete_file() call above the VOP_REMOVE() one, yamt@
says vp might not be valid after it.
2006-07-17 19:05:36 +00:00
ad
e7447d9340 - Always make p->p_cred a private copy before modifying.
- Share credentials among processes when forking.
2006-07-17 15:29:06 +00:00
ad
16fc727817 Just use proc0.p_cred where root credentials are needed, instead of
allocating a new kauth_cred_t.
2006-07-17 14:49:16 +00:00
ad
2af3d29e01 - Don't cast kauth_cred_t to (struct ucred *), just set pc_ucred = NULL.
- Fill ucred::cr_ref.
2006-07-17 14:47:02 +00:00
ad
55a5faa1ef - Only acquire cr_lock when changing cr_refcnt.
- When freeing, test the value of cr_refcnt from inside the lock perimiter.
- Change some uint16_t/uint32_t types to u_int.
- KASSERT(cr_refcnt > 0) in appropriate places.
- KASSERT(cr_refcnt == 1) when changing the credential.
2006-07-17 14:37:20 +00:00
christos
ef1750eb29 make APM_POWER_PRINT compile. 2006-07-17 13:23:46 +00:00
martin
5958a5d814 This requires <sys/lock.h> - make it include it directly. 2006-07-17 11:38:56 +00:00
martin
d91f1187f9 Back out previous - it apparently was not even compile tested. 2006-07-17 11:36:50 +00:00
christos
7358f7042d PR/34007: Noriyuki Shiota: vmstat fails on the multiboot kernel booted by
GRUB-0.97. Initialize some previously unititiazed ELF header fields.
2006-07-16 21:16:22 +00:00
elad
77de54cbf0 get rid of CURTAIN() macro. inline the last use of it, together
with a nice XXX comment (assigned to me of course) that we should
be doing this differently.
2006-07-16 21:13:00 +00:00
elad
d4410e6fde CURTAIN() -> KAUTH_GENERIC_CANSEE. 2006-07-16 20:21:42 +00:00
elad
d9a7152c3e add KAUTH_GENERIC_CANSEE, which is like the KAUTH_PROCESS_CANSEE, only
for two kauth_cred_t rather than kauth_cred_t and struct proc *.

advise against using it in the man-page; it should be used only in cases
where we either don't have an object-specific op or when we can't easily
use one.
2006-07-16 20:10:11 +00:00
elad
9be7229906 expose less api; prompted by yamt@. 2006-07-16 19:37:55 +00:00
kardel
e804524e26 fix another t{s,v}tohz() fallout (invalid remaining time)
now passes regression/sys/kern/sleeping
2006-07-16 19:23:11 +00:00
elad
c6d34abf63 oops, forgot to commit that one. thanks Arnaud Lacombe. 2006-07-16 18:49:29 +00:00
cube
b1b29cb4ae Remove that example. It was obsolete even before 3.0 release. 2006-07-16 10:52:22 +00:00
yamt
402cb9eb95 adapt to vfs_copyinfh -> vfs_copyinfh_alloc rename. 2006-07-16 07:52:02 +00:00
rillig
f2634b6a2b Reordered the declaration-specifiers so that "inline" comes before
"int", which fixes a gcc warning.
2006-07-16 06:32:42 +00:00
rillig
07e31b3af5 When debugging output is disabled, define DPRINTF() to a proper
statement expression instead of the empty string. Fixes a gcc warning in
ibcs2_ioctl.c.
2006-07-16 06:31:42 +00:00
rillig
b102417f76 Fixed the gcc warning that "static" should come before "const". 2006-07-16 06:06:20 +00:00
rillig
e769ad7ca4 Added type information for the parameter r of isapnp_read_reg. 2006-07-16 06:01:03 +00:00
gdamore
d5875505ba Remove unused memp. Fixes coverity CID 3713 from run 61. 2006-07-15 20:52:59 +00:00
elad
4f60437127 minor api cleanup, and remove useless VOP_GETATTR() calls. 2006-07-15 20:07:36 +00:00
elad
a904c6895a update my email on the copyright to @netbsd.org 2006-07-15 16:48:51 +00:00
elad
a890e27076 move veriexec_clear() from dev/verified_exec.c to kern/kern_verifiedexec.c 2006-07-15 16:43:35 +00:00
elad
e3f6ad54bf dont use magic numbers. 2006-07-15 16:42:12 +00:00
elad
904a157292 some cleanup and fixes:
- fix possible panic and vfs refcnt issue
  - use log(9) instead of printf(9) where possible
  - indent
  - stop logging fsid/fileid
2006-07-15 16:33:16 +00:00
martin
631d071e84 FHANDLE_SIZE_MIN is an allowed value for the requested size (it happens
to be the old static size on 32bit archs, so the compat_30 code uses it)
2006-07-15 16:32:29 +00:00
tsutsui
970c192eba - configure PCI space for viaide so that DMA will work even if the firmware
doesn't map DMA registers properly
- enable viaide secondary port explicitly which isn't enabled by some firmware

Tested on RaQ and RaQ2.
2006-07-15 08:08:23 +00:00
elad
c4afa933de add (commented out) fileassoc(9) kernel options on some popular archs. 2006-07-15 07:55:20 +00:00
skrll
96bba029ff KNF 2006-07-15 06:44:43 +00:00
yamt
96cfc7d98a remove unused code and add some comments. 2006-07-15 06:33:40 +00:00
yamt
73f44d02f7 do_setresuid, do_setresgid: use the suser privilege only when necessary. 2006-07-15 06:31:34 +00:00
yamt
bfe8806772 kauth_cred_setgroups: fix an assertion. 2006-07-15 05:54:56 +00:00
yamt
b0c4bb36d9 nfs_getreq: fix a kauth fallout.
pointed by nanashi-san.  http://pc8.2ch.net/test/read.cgi/unix/1145181361/786
2006-07-15 05:54:10 +00:00
kardel
7e5391a22a rename boottimebin to timebasebin as this
struct actually keeps the start of the UTC
time scale and not the boot time. the relationship
is: utc-time = up-time + timebase.
background: when doing an ACPI sleep the uptime
freezes and on wakeup the tc_setclock() leads to
a new timebasebin - this had no relationship with
a boottime as the structure was previously called.

discussed on tech-kern@
anomalies (moving boottime, uptime describing running time)
where discovered by Arnaud Lacombe.
2006-07-14 23:01:12 +00:00
kardel
97b1c42feb keep NetBSD boottime semantics:
- only set at boot
- only tracking delta of set-time operations
-> will keep boottime stable across ACPI sleeps
   uptime(1) will report the time since last boot
2006-07-14 22:44:28 +00:00
kardel
9a7410ffff reduce sleep time by slept time for retrys 2006-07-14 22:35:15 +00:00
kardel
ac3f10a8d9 make inittimeleft() and gettimeleft() available (for e. g. kern_event.c) 2006-07-14 22:33:27 +00:00
martin
b9dade0e59 netbsd32_sys___fhstat30 and netbsd32_sys___fhstatvfs have nothing to do
with compat_30 - so use full/variable sized filehandles here too.
Fixes PR kern/34004.
2006-07-14 22:09:01 +00:00
elad
1c8d298b89 move security.setid_core.* to kern.coredump.setid.*, as requested by yamt@. 2006-07-14 21:55:19 +00:00
christos
29b80779c5 make this compile again. 2006-07-14 20:06:57 +00:00
elad
b5d09ef065 okay, since there was no way to divide this to two commits, here it goes..
introduce fileassoc(9), a kernel interface for associating meta-data with
files using in-kernel memory. this is very similar to what we had in
veriexec till now, only abstracted so it can be used more easily by more
consumers.

this also prompted the redesign of the interface, making it work on vnodes
and mounts and not directly on devices and inodes. internally, we still
use file-id but that's gonna change soon... the interface will remain
consistent.

as a result, veriexec went under some heavy changes to conform to the new
interface. since we no longer use device numbers to identify file-systems,
the veriexec sysctl stuff changed too: kern.veriexec.count.dev_N is now
kern.veriexec.tableN.* where 'N' is NOT the device number but rather a
way to distinguish several mounts.

also worth noting is the plugging of unmount/delete operations
wrt/fileassoc and veriexec.

tons of input from yamt@, wrstuden@, martin@, and christos@.
2006-07-14 18:41:40 +00:00
yamt
a1c2fd0906 introduce filehandle size limits:
- FHANDLE_SIZE_MAX: refuse unreasonable size allocation, esp. when
  it's a user-specified value.

- FHANDLE_SIZE_MIN: pad small filehandles with zero for compatibility.
  XXX it might be better to push this into filesystem dependent code so that
  new filesystems can choose smaller handles.
2006-07-14 18:30:35 +00:00
yamt
cf80fa09d3 - sys___getfh30:
- restructure code so that it doesn't try to allocate user-specified
	  unbound amount of memory.
	- don't ignore copyout failure in the case of E2BIG.
- rename vfs_copyinfh to vfs_copyinfh_alloc for consistency.
2006-07-14 18:29:40 +00:00
gdamore
e19a48dbd2 Cleanup old aucom entries. Left marked obsolete in majors, and removed from
dev/DEVNAMES.
2006-07-14 17:44:07 +00:00
yamt
3b9db50e99 oops, fix FHANDLE_SIZE. 2006-07-14 17:31:42 +00:00
gdamore
4c26da3f0e Add support for 10-bit addressing, per i2c specs. This has not been tested
with any actual 10-bit devices (as I don't have any), but it doesn't seem to
impact 7-bit addressing any.  Approved by christos@, briggs@, and thorpej@.
2006-07-14 17:25:17 +00:00
christos
a2f707bc1b factor out common code. 2006-07-14 16:02:45 +00:00
yamt
2d1ef0388d - fix buffer overruns in fhopen and friends.
- share some code among them.
2006-07-14 15:59:29 +00:00
yamt
050993bda6 add some convenient macros for fhandle_t. 2006-07-14 15:58:40 +00:00
christos
199b3952c8 - rename sleepts to sleeptv since it is a timeval.
- don't initialize it needlessly.
- fix the poll code the same way the select code was fixed, so that it
  computes the remaining time to sleep properly.
2006-07-14 15:52:44 +00:00
yamt
e221f55a3b sys___getfh30: fix a vnode lock botch in rev.1.244. 2006-07-14 14:28:58 +00:00
yamt
387e1097ba sys___getfh30: remove unnecessary casts. 2006-07-14 14:00:46 +00:00
seanb
13d47e9c25 Consistently establish / disestablish shutdown hook
in the bus layer and remove from common ath_attach().
Having it in both layers (on some bus architectures)
was causing a double call to ath_stop() on shutdown
which in turn was tickling the bus lockup described
therin on slower machines.
2006-07-14 13:37:25 +00:00
xtraeme
911aafad9f Make this build again and fix the bus_space_tag_t member of the softc,
it's defined in the com_regs struct now.
2006-07-14 05:02:00 +00:00
pavel
7173632277 sys_getfh -> compot_30_sys_getfh 2006-07-13 23:52:55 +00:00
pavel
336e41ffa7 regen (sys_getfh -> compat_30_sys_getfh) 2006-07-13 23:48:08 +00:00
pavel
50a6eaa646 use the COMPAT_30 getfh. 2006-07-13 23:47:17 +00:00
pavel
20d6f5666c regen (sys_getfh -> compat_30_sys_getfh). 2006-07-13 23:45:54 +00:00
pavel
485f2e18be use the COMPAT_30 getfh. And do it always - don't protect it by
#if defined(NFS) || defined(NFSSERVER).
2006-07-13 23:44:34 +00:00
martin
dee43775e6 Small simplification, pointed out by Christian Hattemer in private mail. 2006-07-13 23:43:13 +00:00
pavel
b15a1164c7 regen 2006-07-13 23:40:55 +00:00
pavel
6ac5157e79 request the COMPAT_30 getfh in the master files. (Changes to the generated
ones would be lost.)
2006-07-13 23:38:57 +00:00
pavel
a360a47f63 regenerate again to have correct source RCS Id 2006-07-13 23:26:24 +00:00
pavel
56194475a6 regen. 2006-07-13 23:23:52 +00:00
pavel
037b2fed75 do not protect the getfh syscall by
#if defined(NFS) || defined(NFSSERVER).
The native syscall also isn't.
2006-07-13 23:22:30 +00:00
martin
f8fef2f801 regen 2006-07-13 23:10:40 +00:00
yamt
9cb0d9a9d8 compat_30_sys_getfh: s/fhandle_t/struct compat_30_fhandle/ (fix overrun.) 2006-07-13 23:04:02 +00:00
gdamore
34537908ab Add an option COM_REGMAP to allow com(4) to use an array of register indices.
This allows us to convert aucom to just another com attachment, and cleanup
some code in the com_arbus.c.

Additionally, we use a common com_cleanup routine rather than having a
zillion copies of it in the attachment points.

This has been tested on a number architectures, and it has been shown to get
close to comparable performance when COM_REGMAP is defined, and comparable
when it is not defined.

Approved by core@.  Fixes PR port-evbmips/32362.
2006-07-13 22:56:00 +00:00
pavel
65ace88efa regenerate again to have correct source RCS Id 2006-07-13 22:35:06 +00:00
martin
74709a8860 Apply _KERNEL_OPT 2006-07-13 22:08:00 +00:00
gdamore
b67e43bbbc Register name for "psm" driver. 2006-07-13 22:05:53 +00:00
martin
3fb505e6b2 Version the lfs_cleanerd internal fcntl() for filehandles too,
so old cleaners should work with newer kernels.
2006-07-13 22:05:52 +00:00
martin
edf136d748 fix typo 2006-07-13 21:51:50 +00:00
gdamore
2f446293b4 Activate argpio. Apparently I forgot to commit this change earlier.
Noticed while merging other com(4) changes.
2006-07-13 21:38:24 +00:00
bjh21
642809bdd7 Bump version number for today's changes. 2006-07-13 21:32:12 +00:00
martin
b2fb3338d9 Adapt to getfh versioning 2006-07-13 21:31:31 +00:00
gdamore
ccee3fc76f Revert yamon_getenv() so it returns char *. While this is suboptimal, it is
the only convenient way to use the returned value with numerous library
routines which have not been altered to properly use constified char *.

This was found to be necessary when I extended yamon to hold a string
describing a video mode for use with my experimental radeonfb.
2006-07-13 21:06:18 +00:00
uwe
4c3c91e691 De-__P. ANSIify.
Same object code is generated (except in prf.c, where putchar argument
type was changed to int to match the prototype and one instrcution
changes accordingly).

strategy() in ofdev.c was not ANSIified in this sweep, b/c that
changes code generated at call sites!
2006-07-13 20:03:34 +00:00
garbled
a59f110c72 Rather than hardcode the location of the Interrupt Vector Register, we
try to locate it using the residual data.  On some machines this doesn't
work, so we fall back to hardcoding it.  This should fix isa interrupts
on the 7025-F40, which has the IVR at a different location.
2006-07-13 17:50:37 +00:00
martin
9adca95023 COMPAT_SUNOS* uses COMPAT_30 getfh too 2006-07-13 17:39:47 +00:00
bjh21
0867d7e87d RCS ID header. 2006-07-13 16:48:18 +00:00
bjh21
c5e6021bb2 Pass the argument to OSModule_Free in the correct register. This stops
NBFS leaking memory.
2006-07-13 16:29:46 +00:00
martin
508a062fec Make freebsd_sys_getfh use compat_30_sys_getfh 2006-07-13 16:28:38 +00:00
bjh21
99d7b7bca3 Fix error handling in nbfs_close(). 2006-07-13 16:11:41 +00:00
bjh21
723176de91 Handle Service_FSRedeclare correctly. NBFS now works after restarting
FileSwitch.
2006-07-13 16:09:58 +00:00
bjh21
bd0da079fe Add Service_FSRedeclare. 2006-07-13 16:03:23 +00:00
bjh21
a0121cb653 Sensible error handling, with libsa errors being mapped to useful RISC OS
errors.  Also centralise our filing system number (as yet unassigned) in
nbfs.h.
2006-07-13 15:51:54 +00:00
martin
81b2f47532 Do not automagically UP the interface when setting the address.
Together with previous ifconfig changes, this fixes PR 30694, at
least for pppoe (and other sppp based) interfaces.
2006-07-13 14:04:50 +00:00
martin
8e562bd728 No arg names in prototypes 2006-07-13 13:43:27 +00:00
martin
1db12186aa Welcome to 3.99.22 (getfh(2)/vfs_composefh changed) 2006-07-13 12:01:48 +00:00
martin
a3b5baed42 Fix alignement problems for fhandle_t, exposed by gcc4.1.
While touching all vptofh/fhtovp functions, get rid of VFS_MAXFIDSIZ,
version the getfh(2) syscall and explicitly pass the size available in
the filehandle from userland.

Discussed on tech-kern, with lots of help from yamt (thanks!).
2006-07-13 12:00:24 +00:00
martin
da409b10aa This needs <sys/param.h> for NGROUPS 2006-07-13 11:07:19 +00:00
drochner
dee4b5b02f Map kernel stack and "struct cpuinfo" of secondary processors with
execute permission. (I don't understand yet why the latter is needed.)
This fixes crashes of MP kernels reported by Kurt Schreiner and in
the context of PR port-amd64/33927 (which is about a different problem
otherwise).
MP kernels reported to boot again by Dave Huang and Kurt Schreiner.
2006-07-13 10:53:08 +00:00
simonb
4f3492d966 Add a blank line between two unrelated parts of code. 2006-07-13 07:36:04 +00:00
simonb
580c3efb5a Add ksyms pseudo device. 2006-07-13 04:52:04 +00:00
simonb
d70131b1fd Move the ksyms pseudo device to the miscellaneous section. 2006-07-13 04:50:36 +00:00
kent
c02a4b5cc3 regen for VT82xx HDA 2006-07-13 04:00:13 +00:00
kent
656314001f - add VIA VT8237A/8251 High Definition Audio Controller
- add some tabs
2006-07-13 03:59:29 +00:00
kent
5b129585f8 For MCP55, don't check CORBRPRST flag
a part of PR#33741
2006-07-13 03:57:40 +00:00
ross
afb5180310 wrap as(1)-only elements in #ifdef _LOCORE 2006-07-12 23:52:21 +00:00
he
7a66dda031 Omit specifying the secondary bootloader on the installboot command line
for sparc64 systems.  This should fix PR#33987.

Also adapt to the way sparc64 32-bit kernels now report its CPU
architecture -- these still need the sparc64 boot loader, but now
report hw.machine = sparc.  Adapt by testing machdep.cpu_arch
instead.

Hints from martin and mrg.
2006-07-12 21:34:45 +00:00
garbled
40bedaf4c8 Add support for rebooting 7024 and 7025 models. Since I cannot figure
out how to properly reboot these machines, instead we make use of the
auto-poweron-alarm time, and power cycle the machine to simulate a
reboot.  This is a hack, but until I get documentation on these machines,
at least you will be able to reboot them.
2006-07-12 21:28:33 +00:00
perry
c857ec66f9 Note that people should not be using UFS_DIRHASH. 2006-07-12 18:45:51 +00:00
martin
30b452e3dc Some interfaces are initially created with zero addresses on them
(like pppoe). Make the loop over all interface addresses cope.
Problem reported by Christian Hattemer.
2006-07-12 17:26:11 +00:00
gdamore
2fe9781d59 Initialize batt for gcc 4.x, and while here add $NetBSD$ comment. 2006-07-12 15:03:24 +00:00
yamt
e81b1eeaa7 implement NETRXF_csum_blank/NETTXF_csum_blank tx checksum "offloading". 2006-07-12 15:03:08 +00:00
yamt
897bdba2b9 implement a simple NETTXF_csum_blank/NETRXF_csum_blank workaround
so that we can talk with linux guests at least.
just fill checksum field of received packets if the flag is set.
maybe should be revisited later.
2006-07-12 15:02:15 +00:00
yamt
2b405338d9 revert the previous because it doesn't work without destdir populated.
pointed by Valeriy E. Ushakov.
2006-07-12 14:56:59 +00:00
tron
e12e4b2966 Remove test for M_CSUM_TSOv6 flag which is not (yet) defined in
NetBSD-current.
2006-07-12 14:07:02 +00:00
yamt
ed6b31b9e9 -I${S}/../common/include for libprop. 2006-07-12 13:51:18 +00:00
yamt
4adfbedff5 include stdlib.h for exit(). 2006-07-12 13:50:23 +00:00
hira
7c54838d63 Fix typo (discarge -> discharge). 2006-07-12 13:16:36 +00:00
tron
9563ec16dc Add diagnostic checks for hardware-assisted checksum related flags in
the mbuf which supposed to get sent out:
- Complain in ip_output() if any of the IPv6 related flags are set.
- Complain in ip6_output() if any of the IPv4 related flags are set.
- Complain in both functions if the flags indicate that both a TCP and
  UCP checksum should be calculated by the hardware.
2006-07-12 13:11:27 +00:00
christos
2fbd5d820a Prevent zerodivide (from Kouichirou Hiratsuka) 2006-07-12 11:31:39 +00:00
gson
c14814103c Assert RTS on open. Fixes PR kern/33929. 2006-07-12 07:36:25 +00:00
simonb
cc85b518f1 Remove unused ppc4xx_tlb_unpin() function. 2006-07-12 06:22:17 +00:00
skrll
b819728719 Note this driver is for the i82596CA and i82596DX/SX chips and provide
links to documentation on developers.intel.com
2006-07-12 05:12:06 +00:00
peter
58224a41e7 Add power hooks for "ep* at pcmcia?".
ok christos@
2006-07-11 22:49:47 +00:00
peter
09f0de7ce4 Add power hooks for "ne* at pcmcia?".
ok christos@
2006-07-11 22:48:37 +00:00
tron
8fe4e4040d Clear mbuf checksum flags before passing it to ip6_output(). We might
recycle a mbuf which contained a hardware provided checksum. This
fixes "traceroute6" to a machine which is using a wm(4) interface
that has UDP or TCP checksum offload enabled.
2006-07-11 22:13:56 +00:00
drochner
e16c6a6b67 include machine/bus.h explicitely, fixes build problem 2006-07-11 17:37:14 +00:00
drochner
d94734d110 use timecounter code in dev/ic/acpipmtimer.*,
kill interface attribute in device declaration
2006-07-11 14:47:49 +00:00
yamt
eeb2c6eb23 inittodr: if xen3, add processed_system_time (system_time) to
shadow_tv (wc_sec/nsec) as linux guest does.
2006-07-11 12:26:58 +00:00
perry
39ddc4631d Make sure that the remaining battery life is set to zero if the value
is known to be invalid. Discussed with Christos (and based on his comments).
2006-07-11 02:35:30 +00:00
simonb
8c6707812d Use c99 uintN_t. 2006-07-11 00:25:42 +00:00
simonb
f0b22f966f Sprinkle some KNF. Still a bit more needed... 2006-07-11 00:18:04 +00:00
simonb
22cbf12aca Remove some incorrect licencing goop. 2006-07-11 00:17:34 +00:00
simonb
a4c494b1d1 Remove some incorrect licencing goop. 2006-07-10 23:22:28 +00:00
simonb
52b60673ac Update for timecounters (s/time.tv_sec/time_second/). 2006-07-10 23:20:43 +00:00
christos
358557d37b fix some field names (Arnaud Lacombe) 2006-07-10 22:46:06 +00:00
christos
9dc3ec85f6 Fix gcc4 bogus initialization warnings from Arnaud Lacombe 2006-07-10 22:38:28 +00:00
xtraeme
d0e49918a6 Attach amdpm timer on AMD8111 too, as was suggested by Nicolas Joly. 2006-07-10 20:11:29 +00:00
christos
26115e2d37 PR/33968: Nicolas Joly: amdpm(4) timer, fix and AMD8111 support
Refactor the code to use different variable names to hold each conf register
and avoid reading/witing the conf space multiple times.
2006-07-10 20:03:42 +00:00
gdamore
d3788a855d New psm driver for use on Ultrabook IIi. Right now it supports the power
button and lid switch.  I will add environmentals (battery, etc.) later.
2006-07-10 17:54:08 +00:00
thorpej
55e8bbeb6e Put appropriate prefixes on property names to reduce chances of name
collisions.
2006-07-10 16:28:44 +00:00
peter
b794520dcd Wrap long lines, unwrap a short line. 2006-07-10 15:37:26 +00:00
peter
fac34f3d31 Moves the PF_GENERATED m_tag to the new packet in icmp_error.
This is needed because the pf code can call icmp_error with setting
this tag, but the new packet should not be filtered when it comes back
to pf(4).

ok christos@
2006-07-10 15:35:39 +00:00
fvdl
64d1b810eb kern/33961: add kgdb support and remove some redundant (and incorrect) register
offset definitions from reg.h
2006-07-10 13:09:47 +00:00
freza
75998ff7ee Fix recent ibm4xx/intr.c rework:
- Recalculate masks _after_ new interrupt handler is enqueued, otherwise
  the very last one won't ever be enabled (from hannken@)

- We can't use splhigh() to protect intr_calculatemasks() since it would
  use soon-to-be-invalid mask. Instead, fiddle PSL_EE directly as we do
  in other places.

Reviewed and tested (evbppc/explora) by hannken@
2006-07-10 12:52:13 +00:00
fvdl
6bde80fce7 Do not try to disable link devices (using _DIS) at startup. This causes
problems on some systems. Leave the code commented out, we might want
to revisit this at some point in the future.
2006-07-10 09:18:36 +00:00
christos
d957913795 Fix a bit of debugging code (from Arnaud Lacombe) 2006-07-09 21:31:40 +00:00
christos
bb97a3d660 url for M$ file changed. 2006-07-09 19:25:18 +00:00
mlelstv
8261b32756 move and renumber bthub major to avoid conflicts with other archs 2006-07-09 18:56:35 +00:00
manu
2e26811b6b If the user process requests a non null timeout, make sure we do not turn
it into an infinite timeout because of a conversion
2006-07-09 18:51:28 +00:00