Commit Graph

97702 Commits

Author SHA1 Message Date
pooka
48d146fba6 cwd is logically a vfs concept, so take it out from the bosom of
kern_descrip and into vfs_cwd.  No functional change.
2008-11-18 11:36:58 +00:00
jnemeth
cc34b6178d PR/39947 - Juan RP -- dbcool_detach implicitly called
sysmon_envsys_destroy() twice
2008-11-18 10:49:45 +00:00
nonaka
df1a68c144 enable _DEV_ZERO_oARM case, when only COMPAT_16 defined. 2008-11-18 09:52:43 +00:00
cegger
db189eeadc SATA GEN3 speed is 6.0Gb/s 2008-11-18 09:52:10 +00:00
chris
d1214474bc Fix Yukon EC Ultra cold power up issue.
For the EC Ultra it is necessary to update some extra registers during
reset.  Without doing so causes the system to hang at boot.  The only
workaround I found was to PXE boot before booting into NetBSD.

This change is based on the code from FreeBSD's if_msk.c.  Specifically the
msk_phy_power function.

Also add an splnet/splx across mii_tick.  This matches most other network
drivers.

Change posted for review on 3rd Oct 2008 to tech-net.  No feedback
received.
2008-11-18 09:30:43 +00:00
cliff
17a4a4425b fix "adapted from" (iq31244) and remove iq31244-specific jumper comment 2008-11-17 23:51:30 +00:00
matt
bcb2caec0b Regen. 2008-11-17 23:35:24 +00:00
matt
eadd097264 Store pcidevs in a more compact manner. Instead of many string with duplicate
words, store each word individual in a long string and then store offsets
in the string to that word.  This reduces the space needed by half.
2008-11-17 23:33:41 +00:00
joerg
a5be52d405 On resum-from-RAM explicitly restore PCI link device state before
reenabling interrupts. At least one BIOS doesn't do this automatically
as reported by Christoph Egger.
2008-11-17 23:29:49 +00:00
joerg
c42112239b In wapbl_replay_write just iterate over the hash table and not the
transactions. The initial prescan has already sorted out what blocks are
in the journal and removed any revoced blocks, so the hash table is
authorative.
2008-11-17 22:08:09 +00:00
bouyer
5a45b84ca9 If we return an error make sure we don't return a b_resid of 0; or this
will trigger a KASSERT in physio_done(). Fix issue reported by Todd Kover
on tech-kern@
2008-11-17 21:19:03 +00:00
joerg
c42fa4ab26 Remove debug printf. 2008-11-17 19:36:11 +00:00
joerg
bea450f881 Ensure that block records are correctly padded. 2008-11-17 19:31:47 +00:00
martin
ae7357a3ad PR port-sparc/39942: ifdef ch0_is_cons declaration and all uses consistently 2008-11-17 18:32:08 +00:00
cegger
a61fa1fd53 build fix: include <sys/buf.h> 2008-11-17 16:32:04 +00:00
cegger
3611a745ae build fix: include <sys/buf.h> 2008-11-17 14:12:52 +00:00
pooka
d76a9369e5 Remove rump_vp locking interfaces, use RUMP_VOP instead. 2008-11-17 13:24:14 +00:00
pooka
11a6424f3c regen 2008-11-17 13:20:39 +00:00
pooka
b81cfcf61f adjust comments out of lock.h 2008-11-17 13:20:22 +00:00
pooka
a1e0d479f4 regen 2008-11-17 13:11:24 +00:00
pooka
aab859210b include those appetizing lockmanger flags 2008-11-17 13:10:44 +00:00
ad
7369e64e54 LINUX_GCC_SIGNATURE also matches NetBSD/i386 ELF binaries, so disable it. 2008-11-17 13:03:42 +00:00
is
b0a97c29c0 Add pppoe, tap, ppp, gre; avoids leaving the user without internet
connection when upgrading such a box as the router and configuration
file merging fails.
2008-11-17 11:18:30 +00:00
pooka
50cbbdb2d5 No need to .WAIT anymore: headers are done in a separate pass and
binaries are no longer in this subtree.
2008-11-17 10:21:44 +00:00
pooka
e349d81775 Tune CFLAGS to a consistent default. 2008-11-17 09:03:51 +00:00
pooka
fa86dc99d5 reregen to get those most important rcsids right 2008-11-17 08:59:33 +00:00
pooka
d55ddff727 update namei target to new syntax 2008-11-17 08:57:23 +00:00
pooka
8299c3166a regen 2008-11-17 08:56:02 +00:00
pooka
e45e5fef43 Descend into include/rump and install headers. 2008-11-17 08:54:39 +00:00
pooka
20a993658a Move rump public headers to include/rump 2008-11-17 08:53:12 +00:00
pooka
85eff24b94 regen 2008-11-17 08:52:18 +00:00
pooka
0a380919d5 Add script to statically generate rumpdefs.h instead of doing it buildtime. 2008-11-17 08:49:55 +00:00
pooka
d72a5b8e49 Make this generate rump_namei.h. 2008-11-17 08:47:20 +00:00
pooka
cc4373b56d Use rump/include/rump as the rump_syscalls.h directory. 2008-11-17 08:46:42 +00:00
pooka
f1f9c07ac7 Make this generate the rump vnode interface files. 2008-11-17 08:46:03 +00:00
pooka
e5da604114 Add more verbose commentage to the module thread non-creation. 2008-11-17 08:43:41 +00:00
pooka
80610738b1 Ignore the module unload thread. 2008-11-17 08:41:28 +00:00
pooka
08b3388013 regen 2008-11-17 07:20:54 +00:00
pooka
f76cc54c1f Add NOCHROOT from namei.h (hi ad) 2008-11-17 07:20:37 +00:00
dyoung
ddbd8176f9 Reduce code duplication: most PHY drivers call mii_phy_add_media()
when they attach to the device tree, so call pmf_device_register(9)
once there instead of once in more than twenty drivers.
2008-11-17 03:04:27 +00:00
uwe
e1bf976dc6 Provide empty module_init_md() so that modular kernel links. 2008-11-17 01:55:00 +00:00
bouyer
92e5f85303 Make sure xen_idt is writable before trying to write to it (issue previously
masked by defined(COMPAT_10) || defined(COMPAT_IBCS2)). Make amd64xen kernel
boot again.
2008-11-16 20:13:50 +00:00
veego
02a39d849b Traverse rump for a make cleandir. 2008-11-16 19:55:38 +00:00
pooka
010ce4930e more <sys/buf.h> police 2008-11-16 19:34:29 +00:00
joerg
92a83dd9cf Backout revision 1.212 and add a comment that short-cutting the WAPBL
case is not possible. The buffer length has changed and the rounded size
may not have, essentially changing the transaction size. Reported by
various users and in PR 39898.
2008-11-16 19:34:19 +00:00
bouyer
99f68f2ca2 cpu_intr_p() doesn't account for software interrupts (e.g. callouts) so
we can't use it here. Rssurect ATACH_TH_RUN, backing out
src/sys/dev/ata/ata.c 1.101
src/sys/dev/ata/ata_wdc.c 1.90
src/sys/dev/ata/atavar.h 1.77
src/sys/dev/ic/wdc.c 1.255
src/sys/dev/scsipi/atapi_wdc.c 1.108
Should fix kern/39927 and kern/39725.
2008-11-16 19:31:21 +00:00
pooka
98bf46c51a <sys/buf.h> police 2008-11-16 18:44:07 +00:00
pooka
9c3d490eb5 regen 2008-11-16 18:41:05 +00:00
pooka
786ff94e12 <rump/rump_syscalls.h>, not "rump_syscalls.h" 2008-11-16 18:40:13 +00:00
pooka
ab7329f0f7 explicitly include <sys/buf.h> since we explicitly use it 2008-11-16 18:37:28 +00:00
bouyer
5c26c1f703 Do not depend on physmem for pci_dma64_available(). On some systems (e.g. Xen,
or any system with non-contigous physical memory), physmem may not represent
the hightest physical address available.
Discussed on tech-kern@ some weeks ago.
2008-11-16 17:31:03 +00:00
ad
38cbe1484b Another fix to previous. 2008-11-16 16:23:58 +00:00
ad
c6555ead19 Our qsort() is inappropriate for kernel use because it makes recursive
calls. Replace it with a kheapsort() function in kernel. Pointed out
by tron@.
2008-11-16 16:15:58 +00:00
ad
974cf03d8d Fail to load if there is no embedded file system image. 2008-11-16 15:47:35 +00:00
ad
15fabc9984 Return EOPNOTSUPP for unload. 2008-11-16 15:46:10 +00:00
ad
c94326aee4 +lfs_itimes.c 2008-11-16 15:39:19 +00:00
ad
7bdea38e00 Remove unneeded includes. 2008-11-16 15:29:53 +00:00
ad
b766740610 Fix ksyms_getname() broken in previous. 2008-11-16 15:28:15 +00:00
martin
42cab0447c Make it compile 2008-11-16 15:17:05 +00:00
ad
9485f42356 - Local symbols could shadow globals in some instances. Fix it.
- mutex_enter() from ksyms_getval() could panic due to a change made
  in revision 1.40. Fix it.

- Replace the p-tree with a binary search of global symbols. Saves about
  250kB of wired memory on i386 and allows for faster lookups within
  module symbol tables.
2008-11-16 15:13:35 +00:00
ad
e5c4df967a Make qsort() available in libkern. 2008-11-16 15:01:26 +00:00
ad
e2a270368e Correction to previous. 2008-11-16 14:55:42 +00:00
pgoyette
3dbe765413 For DDR3, the number of physical banks stored in the EEPROM needs to be
incremented by 1.
2008-11-16 14:03:48 +00:00
ad
d89eff7233 Do not look up any given symbol more than once. Does away with the vast
majority of symbol table lookups.
2008-11-16 11:26:28 +00:00
macallan
cfce4b5539 make this work right with WSDISPLAY_SCROLLSUPPORT 2008-11-16 05:10:46 +00:00
tsutsui
2a3ae26e88 Fix tyop in #ifdef TLDEBUG part. 2008-11-16 02:11:29 +00:00
abs
b53939be13 To be safe, do not use DMA for Falcon - from Tuomo 2008-11-15 21:35:31 +00:00
abs
5dd888f5c3 Since dl.d_type is always "unknown" now, pick the type of bootblock to
install based on the device name: eg /dev/fd0c would be floppy
2008-11-15 21:33:12 +00:00
abs
58051692c8 Remove bogus DEBUG uvm_map() calls - (sync with amiga pmap). From Tuomo 2008-11-15 21:30:50 +00:00
abs
85609809d6 Regenerate: Increase min ST_POOL_SIZE from 22 to 24 to avoid out of ST memory issues. Tested by Tuomo 2008-11-15 21:22:03 +00:00
abs
53aa0265b2 Increase min ST_POOL_SIZE from 22 to 24 to avoid out of ST memory issues. Tested by Tuomo 2008-11-15 21:21:23 +00:00
pooka
e0a026a434 vpp is not logically passed in IN with lookup, so INOUT -> OUT.
No functional change, but consistent with the rest.
2008-11-15 19:08:12 +00:00
reinoud
a597e786dd Specify blobsize as the `pagingsize' of the eccline blob pool. This will relax
the requirements of the pagingsize.
2008-11-15 18:26:50 +00:00
ad
4ed3ae6f9c Remove trivial compat ifdefs. 2008-11-15 11:21:41 +00:00
ad
ea8343610a No point wrapping the Ultrix disklabel stuff in COMPAT_ULTRIX 2008-11-15 11:19:07 +00:00
ad
a471d58a44 Remove compat ifdef. 2008-11-15 11:15:22 +00:00
ad
3f1c80da0a Remove compat ifdef. 2008-11-15 11:04:39 +00:00
skrll
1041d3756c s/process/LWP/ in comments where appropriate. 2008-11-15 10:54:32 +00:00
skrll
624f050b49 Typo in comment. 2008-11-15 10:47:53 +00:00
joerg
8b27a04420 Fix typo in comment. 2008-11-15 10:04:31 +00:00
mrg
c10479b8ff explicitly include <sys/ioctl_compat.h> since we explicitly use
symbols defined in it.  fixes various build issues.
2008-11-15 05:58:33 +00:00
cliff
e08eff944b further abstraction of LPC bus 2008-11-15 05:48:34 +00:00
njoly
ef05808702 Do not call namei anymore, but use the result from the previous
emul_find_interp call instead. This make dynamic executables work
again under compat OSF1 (fix PR/39255).

ok by christos.
2008-11-15 00:49:53 +00:00
ad
13de59a192 ifdef AIO 2008-11-14 23:37:50 +00:00
ad
9b83143a6a +ifdef AIO
XXX ddb needs a way to register commands at runtime!
2008-11-14 23:37:30 +00:00
ad
fc5b697224 Regen. 2008-11-14 23:34:23 +00:00
ad
e6a3385171 Make POSIX AIO loadable as a module. 2008-11-14 23:33:45 +00:00
ad
d3d0b437b0 - Conditionalise POSIX aio and mqueue, but include them by default.
- Add a COMPAT_NETBSD attribute. Emit if any compat options are used.
2008-11-14 23:28:30 +00:00
ad
2024f61eff Fix a comment. 2008-11-14 23:13:02 +00:00
ad
57de28fac5 - Move some more compat code into sys/compat.
- Split 4.3BSD ifioctl stuff into its own file.
- Remove some ifdefs that include small fragments of vfs compat code
  which are difficult to relocate elsewhere.
2008-11-14 23:10:57 +00:00
ad
79d9beffc8 - If the system encounters a severe memory shortage, start unloading
unused kernel modules.
- Try to unload any autoloaded kernel modules 10 seconds after their
  load was successful.
- Keep a counter to track module load/unload events.
2008-11-14 23:06:45 +00:00
ad
7cd41bb376 Remove unneeded compat ifdef. 2008-11-14 23:04:42 +00:00
ad
6b88fdc0eb Use NOCHROOT when doing the lookup against the standard module path.
Prevents abuse of chroots to load tainted kernel modules.
2008-11-14 22:00:23 +00:00
ad
66d39172b9 Correction to previous. 2008-11-14 21:59:15 +00:00
ad
d42ef3dc29 Add a NOCHROOT flag for namei(). Looks outside any chroot and performs the
lookup from the root directory if given an absolute path.
2008-11-14 21:57:14 +00:00
ad
7dbfda5cca Unneeded ifdef 2008-11-14 15:56:17 +00:00
ad
7bd1ee08d6 Regen. 2008-11-14 15:50:01 +00:00
ad
18e73e1ebe Replace semid_t with intptr_t. No function change. This is a libc/kernel
private interface and so the name change should not affect any third
party code.
2008-11-14 15:49:20 +00:00
ad
a44212844f Remove unneeded ifdefs. 2008-11-14 15:03:44 +00:00
pooka
e6f5280c8d Add comments on how to do tap and bridging required for sensible
full networking stack operation.
2008-11-14 14:24:00 +00:00
pooka
1941578e57 slap some sort of copyright here 2008-11-14 14:17:53 +00:00
ad
6aba15a013 _KERNEL_OPT 2008-11-14 14:00:11 +00:00
ad
b44ad8800b Remove a compat ifdef that's not worth the hassle. 2008-11-14 13:59:10 +00:00
ad
e1623d0beb Update a couple of comments. 2008-11-14 13:35:25 +00:00
ad
df8183316d Remove COMPAT ifdefs that might as well be comments (i.e., they cost us
almost nothing).
2008-11-14 13:33:55 +00:00
ad
c5122072aa _KERNEL_OPT 2008-11-14 13:10:33 +00:00
ad
8537937e0b Wrap sigframe_sigcontext in _KERNEL 2008-11-14 13:05:34 +00:00
ad
8fe49e035f PR kern/39913 exec, fork, exit hooks need locking
Acquire exec_lock where needed.
2008-11-14 13:01:18 +00:00
pooka
39beb124fd In case writing past EOF, fail if extending the file fails (most
likely due to the file system being full).

Otherwise we'd fail in VOP_PUTPAGES(), which might not happen during
VOP_WRITE(), thus giving the caller the wrong impression that
writing was succesful.
2008-11-14 12:59:44 +00:00
ad
c475578182 Remove some compat ifdefs that aren't really needed. 2008-11-14 12:53:18 +00:00
pooka
fe762e15b2 Clearly state that VOP_BMAP panic in putpages is because I'm a lazy bum.
(although I can't really think of any scenario where VOP_BMAP could
legally fail)
2008-11-14 11:57:07 +00:00
cegger
b23cd354e0 merge BIOS memmap code from i386/i386/machdep.c:init386() and amd64/amd64/machdep.c:init_x86_64 into x86/x86/x86_machdep.c 2008-11-14 00:41:36 +00:00
martin
e6d2ca8863 Pass SIOCAIFADDR to ifioctl_common, fixes PR kern/39900. 2008-11-13 22:22:24 +00:00
bouyer
c0e4281b32 Remove a debug printf(). It will call splx(), which may panic in spllowwer()
on KASSERT(psl == 0);
2008-11-13 21:39:29 +00:00
dyoung
087533b28c Only define 'struct device' if _KERNEL is #defined, so that I can
add a kmutex_t and a kcondvar_t to struct device, later, without
breaking userland.  Userland does not use struct device.
2008-11-13 21:15:01 +00:00
dyoung
4c565dbf95 Bump kernel version to 5.99.02 for ifioctl changes. 2008-11-13 20:24:17 +00:00
dyoung
90a821d0b5 To fix compilation, consistently use 'cmd' instead of 'command'
for the ioctl command code.  Thanks he@.
2008-11-13 19:44:02 +00:00
cegger
5bed9654a4 Finish preparation to new interface.
New interface not yet used by default. It needs some testing first.
2008-11-13 18:44:51 +00:00
cegger
f3a877306a add platform_op hypercall (already exists for amd64) 2008-11-13 18:35:20 +00:00
ad
f34e8d4f6b ndis module. Deliberately not enabled as part of the build. 2008-11-13 12:11:54 +00:00
ad
a682ddf568 Make it build again. 2008-11-13 12:09:52 +00:00
blymn
a920095679 Actually declare the structures used in iwn_scan_hdr instead of using
pointer arithmetic to create the elements on the fly.

Other changes to scan routine taken from FreeBSD driver.
2008-11-13 12:04:09 +00:00
ad
2f839a2253 These depend on ffs. 2008-11-13 11:10:41 +00:00
ad
bed0008a9a Remove #ifdef LFS from the ufs code. 2008-11-13 11:09:45 +00:00
ad
5b57d1bcce LKM -> MODULAR 2008-11-13 10:51:23 +00:00
ad
05844d020c PR kern/39263 $ufs kernel module dependency problems
Pull in the ufs stuff and enable features to make this module useful.
2008-11-13 10:50:26 +00:00
ad
d7360a07e4 _KERNEL_OPT 2008-11-13 10:48:52 +00:00
ad
03dacfd7f4 +compat_ossaudio 2008-11-13 10:15:52 +00:00
ad
669263e5c2 _KERNEL_OPT 2008-11-13 10:14:55 +00:00
ad
c3499e89ad Add a note:
Do not automatically install modules that would fundamentally alter system
behaviour or create a security hole, as the system may automatically load
modules.
2008-11-13 10:06:46 +00:00
ad
b11cbdbb9d compat_ossaudio module, so others can depend on it. 2008-11-13 10:05:52 +00:00
ad
57d1c37e21 Add missing ksem makefile. 2008-11-13 10:03:22 +00:00
cliff
0fbe2f865b add option GEMINI_BUSBASE to define kernel offset between
kernel physical addr and (DMA master) bus addr
2008-11-13 07:21:59 +00:00
matt
b0aa811639 Sort the kernel objects. 2008-11-13 06:48:38 +00:00
cliff
06c16f2497 on the Slave CPU where memory is remaped, use 'struct arm32_dma_range'
to manage kernel physical address unequal to DMA master bus address.

when Slave CPU configures PCI bus, program PCI memory window
to allow only bus addresses into memory owned by the Slave CPU.

Note: this code assumes that the CPU performing
PCI bus configuration has exclusive use of that bus.
2008-11-13 05:03:05 +00:00
cegger
cc63733c55 prepare move to new interface 2008-11-13 01:45:48 +00:00
cliff
3370523d4f - add "wm" interface and "makphy"
- add "re" interface and "rgephy"
2008-11-13 01:39:23 +00:00
cliff
54739f3c1c - comment out wdc, atabus, wd by default; can turn these on if/when wanted.
- add "wm" interface and "makphy"
2008-11-13 01:38:09 +00:00
cliff
bd82d08586 add gemini_cpu1_start() so Master CPU can release Slave to boot.
this gets called early in initarm(); this is as early as reasonable
for now; we might have to puch it back if the Slave ever depends
on the Master to do some setup work or something.
2008-11-13 01:32:48 +00:00
thorpej
7077ca222a Don't use sizeof(struct gpt_hdr). It will pad the structure on x86-64,
which causes some systems to reject the GPT.

kern/38997
2008-11-12 22:50:22 +00:00
phx
3e7e644efc Added missing #include <net/if_ether.h> for ether_ioctl(). 2008-11-12 21:15:49 +00:00
uwe
7d798e4789 Add commented out "options MODULAR" (doesn't work yet). 2008-11-12 19:41:30 +00:00
joerg
4c4dba8748 Cache wpi firmware in memory, free it only on invalid content or when
the last user is detached. This stops wpi from accessing the disk on
resume.
2008-11-12 18:23:08 +00:00
njoly
7712a0fc6c Regen for nanosleep(2) fix. 2008-11-12 18:09:22 +00:00
njoly
cf19223289 Fix nanosleep(2) on 64-bit archs. Do not call native nanosleep
syscall, but rather a modified version the will take care of `struct
timespec' conversions.
2008-11-12 18:07:40 +00:00
njoly
1eff3fc2c0 Add missing sys/syscall.h include for SYS_ptrace definition. 2008-11-12 15:22:18 +00:00
ad
5c0480d3c9 Comment out P1003_1B_SEMAPHORE. The ksem module will now be autoloaded from
the file system if POSIX semaphores are used.
2008-11-12 14:36:31 +00:00
ad
ae2b96cc5e Regen. 2008-11-12 14:34:42 +00:00
ad
0b7375c9af Allow the POSIX semaphore code to be loaded as a module. 2008-11-12 14:32:34 +00:00
ad
119366618e Atomic insertion/removal of groups of system call vectors at runtime with
a basic facility for rollback.

Proposed on tech-kern@.
2008-11-12 14:29:31 +00:00
ad
307004b54f Don't try appending ".o" to the module path. 2008-11-12 14:22:17 +00:00
ad
ec0326f0cf Correct check for autoloaded modules. 2008-11-12 13:50:52 +00:00
jmcneill
d6b7340a23 Add support for Realtek ALC269 as found in Eee PC 1000HA. 2008-11-12 13:33:10 +00:00
jmcneill
e50d66855f Add support for enhanced speedstep on Intel Atom CPUs 2008-11-12 13:00:08 +00:00
ad
0efea177e3 Remove LKMs and switch to the module framework, pass 1.
Proposed on tech-kern@.
2008-11-12 12:35:50 +00:00
cegger
30fc40a83e reduce diff to i386/i386/machdep.c:init386()
- introduce add_mem_cluster() as done in i386
- apply rev. 1.480 from i386/i386/machdep.c: fixes PR 17199 for amd64
- apply rev. 1.492 from i386/i386/machdep.c: fixes PR 13399 for amd64
2008-11-12 01:33:44 +00:00
cegger
90fdd18b98 cosmetic change (mostly to reduce diff to i386/i386/machdep.c:initi386):
#if DEBUG_MEMLOAD -> #ifdef DEBUG_MEMLOAD
use PRIx64 rather %qx
No functional changes intended.
2008-11-12 01:17:16 +00:00
cegger
3d7e0ad77e cosmetic changes:
use PRIx64 rather %qx
cache bootinfo addr and size as done in amd64/amd64/machdep.c:init_x86_64()
No functional change intended.
2008-11-12 01:14:01 +00:00
rmind
9204531a37 - Optimise by avoiding few memory barriers, when atomic operations
performs that for us.  OK by <matt>.
- Add RCS ID, and a bit of KNF.
2008-11-11 21:45:33 +00:00
joerg
e09eb39f96 wapbl_replay_free needs the reply to have been stopped, so make sure
that the changes happen in the right order. Reported by veego@
2008-11-11 21:02:54 +00:00
snj
351a2e6266 Fix a couple spelling mistakes in comments. 2008-11-11 20:37:15 +00:00
matt
c8d306e353 Add generic producer/consumer queue code. 2008-11-11 20:17:27 +00:00
cliff
01b65de4cd - add option GEMINI_SINGLE for single-core system model
- add "re" interface to GEMINI configuration
2008-11-11 19:54:38 +00:00
pgoyette
438c6057be Fix typo in previous, and wrap a panic with #ifdef DIAGNOSTIC 2008-11-11 19:03:06 +00:00
pgoyette
0ba7ea9569 Initialize event's "previous sent state" based on the event monitor type,
regardless of sensor type.  Fixes spurious "device: normal state on
'sensor-name' messages (reported by ad@) which interfere with sysinst.
2008-11-11 16:55:01 +00:00
ad
9b4d249497 Avoid recursive mutex_enter() when the system is low on KVA.
Should fix crash reported by riz on current-users.
2008-11-11 16:13:03 +00:00
ad
c269b07b80 PR port-i386/39299 FPU use in signal handlers is unsafe 2008-11-11 15:53:53 +00:00
ad
4903bac4b2 PR port-amd64/38293 panic: fp_save ipi didn't
Fix race conditions in FPU IPI handling.
2008-11-11 14:40:18 +00:00
ad
70f38482aa PR port-amd64/38293 panic: fp_save ipi didn't
Kill the FP flush IPI and always save. The synchronization here isn't strong
and we could easily pull the chain on an innocent LWP's FP state.

Another fix to follow.
2008-11-11 13:45:10 +00:00
joerg
5a646249d2 Add prototype for wapbl_replay_can_read, it should have gone in with the
rest of the commit.
2008-11-11 12:45:40 +00:00
joerg
b9400f6fd4 Move WAPL replay handling from bread() into ufs_strategy.
This changes the order of hook processing as the copy-on-write handlers
are called after the journal processing. This makes more sense as the
journal overwrite is logically part of the disk IO.
2008-11-11 08:29:58 +00:00
dyoung
94d985722a It is not appropriate to call pmf_system_shutdown(9) from
doshutdownhooks(9): shutdown hooks registered by shutdownhook_establish(9)
expect to be called with interrupts disabled, but shutdown hooks
registered with pmf_device_register1(9) expect to be called with
interrupts enabled.  So I have made two changes:

1 Do not call pmf_system_shutdown() from doshutdownhooks().  Instead,
change every call to doshutdownhooks() to a call to doshutdownhooks()
followed by a call to pmf_system_shutdown().  No functional change
is intended by this change.

2 Make i386 re-enable interrupts briefly while it calls
pmf_system_shutdown().  I leave it to others either to fix the
other ports, or to factor out some MI shutdown code, as joerg@
suggests, and fix that.  Note that a functional change *is* intended
by this change.

I hope that this patch will stop us from flip-flopping between
calling doshutdownhooks() and pmf_system_shutdown() sometimes with
and sometimes without interrupts enabled.
2008-11-11 06:46:40 +00:00
cliff
283b08193e remove extra 0x10000000 in Ltemp_l1_table value
is leftover from whe we were loading at 0x10200000.
if slave CPU uses this, he will paste his temporary
L1 table in to the master's data.  bad slave!
2008-11-11 06:39:00 +00:00
cliff
ba1eaeccf6 constrain MEMSIZE to avoid stepping out of smallest-case
Gemini CPU Remap Control remapped-private memory size
"bad" things can happen if the gzboot heap is in
non-core-private memory.
2008-11-11 06:32:15 +00:00
cegger
e60c84c6c6 PR kern/39608: bge(4) constant freeze on BCM5906M:
Correct DMA values. Patch from Karl Uwe Lockhoff via tech-kern.
2008-11-10 22:50:18 +00:00
joerg
d1cd6d3433 If the size of the buffer didn't change, don't bother updating the WAPBL
accounting as it won't change either.
2008-11-10 21:02:15 +00:00
joerg
8800d320f1 Define wapbl_flush_fn_t only for the kernel. 2008-11-10 20:30:31 +00:00
cliff
b5cb47739c - nullcom.c provides nulldev-like console device for silent gzboot
- GEMINI_dram_0x01600000/Makefile uses nullcom, shhh
2008-11-10 20:30:12 +00:00
joerg
3fbdfc8af9 Reduce internals of WAPBL exposed to the rest of the system. 2008-11-10 20:12:13 +00:00
joerg
5787d39971 Fix typo in fw name. 2008-11-10 18:05:12 +00:00
cegger
cf508a059b mainbus_attach: reduce diff a little between i386 and amd64 2008-11-10 14:36:59 +00:00
cliff
ac51de51b3 - slave CPU using LPC UART or console
- don't use VERBOSE_INIT_ARM
- dont configure obio UART
- using intr -1 for now, causes callout interrupt polling
  can use that until serirq from 8712 works
2008-11-10 04:39:43 +00:00
cliff
129e7690e8 master cpu does not need LPC stuff, comment out for now 2008-11-10 04:37:14 +00:00
cliff
3b02e84035 - GEMINI_CONSOLE_VBASE renamed to GEMINI_UART_VBASE 2008-11-10 04:35:25 +00:00
cliff
5f656fb56e - use actual device address defines instead of abstract console defines
in mmu_init_table\gemini_start.S and devmap[]\gemini_machdep.c;
  this allows some flexibility e.g. to map 'em all, which is useful
  e.g. when using obio uart to debug lpc uart.

- add mmu_init_table entries for Gemini global regs, lpchc, and lpcio
  these are needed to consinit() when console is lpc uart
2008-11-10 04:33:42 +00:00
cliff
23f46ff40f - use actual device address defines instead of abstract console defines for in mmu_init_table\gemini_start.S and devmap[]\gemini_machdep.c;
this allows some flexibility e.g. to map 'em all, which is useful
  e.g. when using obio uart to debug lpc uart.

- add mmu_init_table entries for Gemini global regs, lpchc, and lpcio
  these are needed to consinit() when console is lpc uart

- now have 2 versions of consinit, one for obio uart,
  the other for lpc uart; we use CONSADDR to determine
  which gets compiled.

- remove a useless bus_space map/unmap from obio uart version of consinit
  comcnattach() will do his own...
2008-11-10 04:30:46 +00:00
cliff
a8ab989c8b in critical_devs[], master cpu gets com0;
slave cpu gets geminilpchc0 (and children)
2008-11-10 04:11:17 +00:00
cliff
332c188109 reduce callout polling period to (hz/16)
once we get serial irq from 8712 uart working
this should become a non-issue
2008-11-10 04:07:30 +00:00
cliff
f5b85be633 gemini_lpc_bus_ops is needed for consinit(), so remove 'static' 2008-11-10 04:05:35 +00:00
uebayasi
ed729f9508 Whitespace. 2008-11-10 01:06:43 +00:00
bouyer
71d4948e50 Fix kern/39769: race condition in TCP timers
When a TCP timer is disarmed (with callout_stop()) in the general case
callout_invoking() isn't checked, so the timer handler could be called run
when the current interrupt handler exits, athough the timer is disarmed.
This case cause bad things like TCPT_REXMT and TCPT_PERSIST being both pending,
causing a panic (see the PR for details).
Close the issue by aborting the handler if the timer is not callout_expired().
(the EXPIRED flag being cleared by callout_stop()).
2008-11-09 17:32:38 +00:00
martin
3ab32a0a5e KNF is nice, but not if it causes a warning that breaks compilation :-) 2008-11-09 15:48:13 +00:00
cegger
76d489193e struct device * -> device_t 2008-11-09 15:34:14 +00:00
bjs
8b2e3ec035 Use agp_flush_cache() instead of wbinvd(). 2008-11-09 14:26:14 +00:00
cegger
32c1f8c732 Nuke last parameter from mpaci_scan_apics() and mpbios_scan().
It is unused.
2008-11-09 14:24:14 +00:00
pgoyette
7355d18b97 Leave the task of displaying sensor states to envsys_sysmon() unless we
are in debug mode.
2008-11-09 13:54:06 +00:00
bouyer
5da863e7e9 Assert that bp->b_error == 0 if all data have been transfered in
physio_biodone(). We have more chance to have the fauly code in the
stack trace when doing the check here than in physio_done().
2008-11-09 12:18:07 +00:00
cliff
fe95ceb60e these kernel configs are lmeant to be used to create flashable memory disk rooted
embedded kernels using non-SMP master/slave dual core division of resources.
still very much in progress at this time.
2008-11-09 09:39:18 +00:00
cliff
443abea81b - use option GEMINI_MASTER to pick up clock, icu
- ATADEBUG now here but commented out
- deconfigure timer#1 now that system clock and stat clock are combined
- add umass and wd for use w/ ehci
- uncomment wdc0, wd1; add atabus and wd* for use w/ wdc
- warning the gzipped binary GEMINI kernel image will not fit  in a 1MB flash area, even gzipped
2008-11-09 09:36:08 +00:00
cliff
bd4b8f9765 - add autoconfig support for wdc at Gemini obio
- add autoconfig support for com type UART on IT8712 superio chip
  attached at lpc bus at lpc host controller at Gemini obio.
2008-11-09 09:19:44 +00:00
cliff
2842dccfaa preliminary support for com type UART in IT8712 superio chip
attached at LPC bus at Gemini LPC Host Controller at obio on Gemini.
2008-11-09 09:15:42 +00:00
cliff
3100fdac39 - we are combining stat and system clocks to use the same timer
the master and slave CPU each get one timer for those functions;
  both CPUs can use the free-running ref timer;
  it is initialized by CPU#0 and after that all access is read-only
- use correct OBIO_*_DEFAULT locator indicies
2008-11-09 09:11:09 +00:00
cliff
694f117a78 - use #if NPCI > 0 arond pci stuff so we can compile when pci is not configured
- in critical_devs[], divide up timers attachment between master and slave CPUs
  and provide icu#1 attachment for slave cpu
2008-11-09 09:04:33 +00:00
cliff
6a1577ee20 autoconfig glue for wdc at obio on Gemini 2008-11-09 08:59:05 +00:00
cliff
fcb80bc9f2 - we are combining stat and system clocks, so STATHZ is now HZ 2008-11-09 08:56:47 +00:00
cliff
7a2b04a933 - GEMINI_LPCP_BASE is renamed GEMINI_LPCIO_BASE
- add some minimal Gemini GLOBAL reg defines
- add Gemini LPC Host Controller reg defines
- add Gemini MIDE Controller reg defines
2008-11-09 08:54:46 +00:00
cliff
ed27a42072 - initarm progress putchars and printfs are now #ifdef VERBOSE_INIT_ARM
- use GEMINI_SLAVE, GEMINI_MASTER defines to distinguish between
  primary and secondary CPUs, who owns what devices, etc.
- add short delay()s to allow console printf output to drain before reset
  unless if ref_sc is not yet initialized, in which case tough.
- add devmap entriy for LPC
- add devmap entry for RAMDISK if MEMORY_DISK_DYNAMIC is defined
  i.e. if the ramdisk is external to the kernel, in which case
  we "know" where is lives by agreement with firmware.
- call md_root_setconf() if MEMORY_DISK_DYNAMIC is defined
2008-11-09 08:49:40 +00:00
cliff
a80e63a8a0 add defines for LPC and RAMDISK VADDRs for use in devmap 2008-11-09 08:40:59 +00:00
cliff
8e3f3d7b7b those progress putchars are now #ifdef VERBOSE_INIT_ARM 2008-11-09 08:39:31 +00:00
abs
66b0aa634e Regenerate from GENERIC.in 1.75
Enable 68060 support in FALCON & BOOTX kernels for CT60/63 upgrades
Drop KERNFS from INSTALL kernels
Drop 68040 support from ATARITT kernels
2008-11-09 07:50:39 +00:00
abs
0282f5b26e Enable 68060 support in FALCON & BOOTX kernels for CT60/63 upgrades
Drop KERNFS from INSTALL kernels
Drop 68040 support from ATARITT kernels
2008-11-09 07:49:59 +00:00
tsutsui
9f2a500c35 Make compile this with options DIAGNOSTIC. 2008-11-09 07:01:42 +00:00
pgoyette
18913ef363 Temp sensor should report a critical-overtemp condition (ENVSYS_SCRITOVER)
not a simple critical (ENVSYS_SCRITICAL) condition.
2008-11-09 03:36:04 +00:00
christos
4c2b1bf33a PR/39885: Sébastien Bocahu: add R500 chips support 2008-11-09 02:35:42 +00:00
christos
2688948f51 regen. 2008-11-08 17:27:15 +00:00
christos
71ede8ab96 Support for Intel G35 as found on Asus P5E-VM HDMI motherboard from
Milos Negovanovic
2008-11-08 17:26:28 +00:00
he
ddda8f3c69 Bump install ramdisk image size from 1440k to 1500k, so that it fits again.
The install kernel is subsequently compressed, so there should be nothing
magic about the 1440k constant.
2008-11-08 10:24:23 +00:00
he
22d492ac84 Adapt to changes in arm/arm32/mem.c -- use a mutex to control
access to DEV_MEM.  OK'ed by matt.
2008-11-08 10:18:10 +00:00
cliff
583e22f8aa remove (unused) KERNEL_BASE_EXT option 2008-11-08 09:42:46 +00:00
cliff
15bc29b700 on-chip gemini uart is a COM_TYPE_16550_NOERS 2008-11-08 09:39:27 +00:00
cliff
56126c94ae use correct OBIOCF_*_DEFAULT locator values 2008-11-08 09:37:13 +00:00
dyoung
8e791deb98 To finish the device_t/softc split, convert some casts to struct
auich_softc * to device_private() calls.
2008-11-08 00:26:35 +00:00
cegger
83fde857cc buildfix: use PRIxPTR rather %lx. 2008-11-07 19:50:00 +00:00
he
761f38db5c In wsdisplay_kbdholdscreen(), just return if sc->sc_focus is NULL.
There is apparently no guarantee sc->sc_focus will be non-NULL,
as proved by a crash I experienced earlier today (admittedly on 4.0.1).
2008-11-07 19:33:13 +00:00
rafal
dd332648f3 Let hpcboot load kernels linked with PA != VA; use the PA addresses specified
instead of the VA addresses.  Should make no difference for kernels where the
physical and virtual addresses are the same.
2008-11-07 16:28:26 +00:00
rafal
dba38eab03 Explicitly set LOADADDR of bss/sbss so naiive bootloaders (cough, hpcboot)
can deal with the BSS/SBSS of kernels linked with PA != VA.
2008-11-07 16:23:58 +00:00
rafal
9a83d246e7 Make stray interrupt handler get the minimum IRQ number based on the current
CPU type vs. hardcoding it for pxa270.
2008-11-07 16:14:37 +00:00
rafal
155980bdb0 Remove parameter checks from under DEBUG; bad gpio pin numbers will cause
the kernel to fall over rather quickly anyway with memory faults, so a panic
with a hint as to what's wrong seems much better.
2008-11-07 16:13:16 +00:00
joerg
866b295da8 Match image name with upstream distfiles. 2008-11-07 14:58:27 +00:00
rafal
ca70a1c015 Pass / log return address in a few more places; proposed on tech-kern and
ok'd by ad@ about 6 months ago.
2008-11-07 02:40:35 +00:00
dyoung
de87fe677d *** Summary ***
When a link-layer address changes (e.g., ifconfig ex0 link
02🇩🇪ad:be:ef:02 active), send a gratuitous ARP and/or a Neighbor
Advertisement to update the network-/link-layer address bindings
on our LAN peers.

Refuse a change of ethernet address to the address 00:00:00:00:00:00
or to any multicast/broadcast address.  (Thanks matt@.)

Reorder ifnet ioctl operations so that driver ioctls may inherit
the functions of their "class"---ether_ioctl(), fddi_ioctl(), et
cetera---and the class ioctls may inherit from the generic ioctl,
ifioctl_common(), but both driver- and class-ioctls may override
the generic behavior.  Make network drivers share more code.

Distinguish a "factory" link-layer address from others for the
purposes of both protecting that address from deletion and computing
EUI64.

Return consistent, appropriate error codes from network drivers.

Improve readability.  KNF.

*** Details ***

In if_attach(), always initialize the interface ioctl routine,
ifnet->if_ioctl, if the driver has not already initialized it.
Delete if_ioctl == NULL tests everywhere else, because it cannot
happen.

In the ioctl routines of network interfaces, inherit common ioctl
behaviors by calling either ifioctl_common() or whichever ioctl
routine is appropriate for the class of interface---e.g., ether_ioctl()
for ethernets.

Stop (ab)using SIOCSIFADDR and start to use SIOCINITIFADDR.  In
the user->kernel interface, SIOCSIFADDR's argument was an ifreq,
but on the protocol->ifnet interface, SIOCSIFADDR's argument was
an ifaddr.  That was confusing, and it would work against me as I
make it possible for a network interface to overload most ioctls.
On the protocol->ifnet interface, replace SIOCSIFADDR with
SIOCINITIFADDR.  In ifioctl(), return EPERM if userland tries to
invoke SIOCINITIFADDR.

In ifioctl(), give the interface the first shot at handling most
interface ioctls, and give the protocol the second shot, instead
of the other way around. Finally, let compatibility code (COMPAT_OSOCK)
take a shot.

Pull device initialization out of switch statements under
SIOCINITIFADDR.  For example, pull ..._init() out of any switch
statement that looks like this:

        switch (...->sa_family) {
        case ...:
                ..._init();
                ...
                break;
        ...
        default:
                ..._init();
                ...
                break;
        }

Rewrite many if-else clauses that handle all permutations of IFF_UP
and IFF_RUNNING to use a switch statement,

        switch (x & (IFF_UP|IFF_RUNNING)) {
        case 0:
                ...
                break;
        case IFF_RUNNING:
                ...
                break;
        case IFF_UP:
                ...
                break;
        case IFF_UP|IFF_RUNNING:
                ...
                break;
        }

unifdef lots of code containing #ifdef FreeBSD, #ifdef NetBSD, and
#ifdef SIOCSIFMTU, especially in fwip(4) and in ndis(4).

In ipw(4), remove an if_set_sadl() call that is out of place.

In nfe(4), reuse the jumbo MTU logic in ether_ioctl().

Let ethernets register a callback for setting h/w state such as
promiscuous mode and the multicast filter in accord with a change
in the if_flags: ether_set_ifflags_cb() registers a callback that
returns ENETRESET if the caller should reset the ethernet by calling
if_init(), 0 on success, != 0 on failure.  Pull common code from
ex(4), gem(4), nfe(4), sip(4), tlp(4), vge(4) into ether_ioctl(),
and register if_flags callbacks for those drivers.

Return ENOTTY instead of EINVAL for inappropriate ioctls.  In
zyd(4), use ENXIO instead of ENOTTY to indicate that the device is
not any longer attached.

Add to if_set_sadl() a boolean 'factory' argument that indicates
whether a link-layer address was assigned by the factory or some
other source.  In a comment, recommend using the factory address
for generating an EUI64, and update in6_get_hw_ifid() to prefer a
factory address to any other link-layer address.

Add a routing message, RTM_LLINFO_UPD, that tells protocols to
update the binding of network-layer addresses to link-layer addresses.
Implement this message in IPv4 and IPv6 by sending a gratuitous
ARP or a neighbor advertisement, respectively.  Generate RTM_LLINFO_UPD
messages on a change of an interface's link-layer address.

In ether_ioctl(), do not let SIOCALIFADDR set a link-layer address
that is broadcast/multicast or equal to 00:00:00:00:00:00.

Make ether_ioctl() call ifioctl_common() to handle ioctls that it
does not understand.

In gif(4), initialize if_softc and use it, instead of assuming that
the gif_softc and ifp overlap.

Let ifioctl_common() handle SIOCGIFADDR.

Sprinkle rtcache_invariants(), which checks on DIAGNOSTIC kernels
that certain invariants on a struct route are satisfied.

In agr(4), rewrite agr_ioctl_filter() to be a bit more explicit
about the ioctls that we do not allow on an agr(4) member interface.

bzero -> memset.  Delete unnecessary casts to void *.  Use
sockaddr_in_init() and sockaddr_in6_init().  Compare pointers with
NULL instead of "testing truth".  Replace some instances of (type
*)0 with NULL.  Change some K&R prototypes to ANSI C, and join
lines.
2008-11-07 00:20:01 +00:00
joerg
220377354c Don't use do {} while(0) for a single function call. 2008-11-07 00:15:42 +00:00
joerg
ecbfc2933c Remove XXXUBC code for ffs_reallocblks, that has been conditionalized in
2002 and #if 0'ed in 2005. It would need a considerable amount of work
to bring back and obscures the more important block allocation.
2008-11-06 22:31:08 +00:00
macallan
9263b0c23b add a couple more registers 2008-11-06 22:16:03 +00:00
macallan
61277fe87d install crmfbreg.h 2008-11-06 22:15:39 +00:00
cegger
4b9b87ae5b Link cpus in the order they are attaching and not in inverse order. 2008-11-06 19:29:46 +00:00
cegger
1f7782b4ba wrap lines. no functional change. 2008-11-06 17:50:59 +00:00
abs
96dc40fee6 Add the following note to README:
Please commit changes to 'GENERIC.in' and other source files *first*, then
 run 'makeconf' and commit the generated files to ensure the 'Created from:'
 tags are correct.

Then follow it. Noted by tsutsui@
2008-11-06 17:12:20 +00:00
rmind
9d3a4ed2de cpuctl_ioctl: use cpu_index(), instead of cpuid.
Fixes cpuctl(8) on some processors.
2008-11-06 16:48:51 +00:00
blymn
3286a94bad Move init of essid to the attach code. 2008-11-06 12:03:43 +00:00
darrenr
552614e264 38456 ipf mostly ignores locking in NetBSD 2008-11-06 09:51:57 +00:00
darrenr
60886a044c 38456 ipf mostly ignores locking in NetBSD
...plus some cleanup of fastroute code.
2008-11-06 09:49:59 +00:00
dyoung
41215a0ab5 Use DVUNIT_ANY instead of the anonymous constant -1. 2008-11-06 03:40:04 +00:00
dyoung
44a13e6f88 Cosmetic: change (type *)0 to NULL. 2008-11-06 03:34:37 +00:00
dyoung
0703ab0f27 Fix typo: IEEE80211_DUR_DIFS -> IEEE80211_DUR_DS_DIFS. 2008-11-06 03:28:59 +00:00
dyoung
5c0c1b5199 Use NULL instead of (bus_dma_tag_t)0. 2008-11-06 01:17:24 +00:00
dyoung
557e8919c2 Compute tags over the ACPI sources. 2008-11-06 00:41:52 +00:00
abs
09149f66a7 Add a note that SERCONSOLE breaks on the Falcon, and remove from
FALCON config.
2008-11-05 23:55:06 +00:00
bouyer
b9e39927ac evtchn_do_event(): in our C implementation of spllower(), if a handler fails
to restore the spl (shouldn't happen, but ...), we could end up with a
higther pending ipl set and never cleared because iplbit already
handled this level. while (iplmask != 0) {} would then never be true,
and we'd end up triggering KASSERT(iplbit != 0).
Now print the faultly handler and reset the IPL, and start the whole
pending IPL handling again if needed.
2008-11-05 21:04:05 +00:00
hannken
a797621996 fss_bs_thread: initialize b_error and b_resid.
Before it was possible for fss reads to return bogus b_resid values
leading to "delta > 0" panics from physio().
2008-11-05 19:30:57 +00:00