Commit Graph

97557 Commits

Author SHA1 Message Date
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
blymn
57e1492b11 * Disable aborting the scan for the moment - it causes a firmware error if
a scan was never initiated which breaks WEP and open wireless connections
* Make sure the ESSID is cleared.
2008-11-05 09:42:20 +00:00
pgoyette
287fe7d56d Fix cut&paste error in prev 2008-11-04 22:16:15 +00:00
pgoyette
3880525312 Restore previous behavior concerning CRITICAL events. Send an event
whenever state enters or exits CRITICAL, or whenever value of sensor
changes while the state is CRITICAL.
2008-11-04 22:06:10 +00:00
darrenr
7f27612b9c wakeup is not the macro WAKEUP everywhere 2008-11-04 21:41:11 +00:00
cliff
477562543e use device_private(self) instead of cast to get sc 2008-11-04 19:47:00 +00:00
abs
d36d67412b Another fix from Tuomo Makinen - Use brelse() to unbusy bp buffer
to allow user to swap floppy disks when prompted.
2008-11-04 17:08:45 +00:00
abs
7bb734ab12 Move tc_init(&clk_timecounter); to stop the "timecounter:" message
appearing in the middle of the clock0 attach message. Tested by
Tuomo Makinen
2008-11-04 16:43:47 +00:00
reinoud
97c1950356 Don't dereference bp->b_vp->v_mount if its vnode type is VT_VNON. I dont
know if this masks a bug but with a machine having a ffs+wapbl mount, NFS
mounts and a ntfs mount this paniced the machine on suspend.
2008-11-04 16:08:41 +00:00
reinoud
3a0f6cde46 Implement powersave for ixpide(4). Tested it on an Asus IXP250 with IGP.
It seems to sleep and awake fine now without errors or warnings.
2008-11-04 16:05:29 +00:00
joerg
47066a311f Make x86 installation use tmpfs. 2008-11-04 14:21:39 +00:00
cegger
bae2482c7f regen. 2008-11-04 13:23:41 +00:00
cegger
982f9b9410 fix typo in previous: prodcut -> product 2008-11-04 13:22:29 +00:00
cegger
b8c4e4c3fe regen. 2008-11-04 12:30:54 +00:00
cegger
2fdc34ba95 add ATI RD790 and RD890 chipset ids 2008-11-04 12:30:07 +00:00
matt
631af3647b Just move the mutex ops into the DEV_MEM case. 2008-11-04 07:31:44 +00:00
matt
420b992a4b Use a mutex to control access DEV_MEM. 2008-11-04 07:21:24 +00:00
matt
2e462089c1 Protect some code with if (pg) { .. } 2008-11-04 07:10:01 +00:00
bjs
bedd1969ee Allow writing to register R300_VAP_PVS_WAITIDLE; allows
r300 driver to work with Mesa-7.2!
2008-11-04 02:26:44 +00:00
christos
b8b90de20c If ipmi failed to attach we would crash because we would end up using callouts
while cold. If cold, wait 10 times longer, and if we spinout fail instead of
trying to poll. Makes my machine boot again.
2008-11-03 22:44:42 +00:00
rjs
d2f451aa63 Use aprint_* instead of printf, device_t/softc split. 2008-11-03 15:13:16 +00:00
cegger
cbc3aa97ef unbreak previous. this change wasn't intended. 2008-11-03 12:33:08 +00:00
cegger
cfeb108e60 The functions called from ipmi_match use the DEVNAME macro. But the softc is allocated on the stack and the accessed sc_dev member is not initialized.
Initialize the sc_dev.dv_xname in ipmi_match, which is enough to make DEVNAME work. Finally this also allows the device_t/softc split.
2008-11-03 12:25:53 +00:00
cegger
3c17eae58b ipmi_match: remove one indentation level 2008-11-03 12:19:06 +00:00
tls
ccd72c0274 Remove include of useless i386/include/clock.h which broke builds on
other architectures.
2008-11-03 04:31:01 +00:00
hans
844d9a4743 call pmf_device_deregister in detach functions. requested by jmcneill. 2008-11-03 00:52:07 +00:00
hans
32ffdb16fe Add NULL pmf handlers. OK by cube. 2008-11-02 14:46:55 +00:00
reinoud
69f1577429 Introduce an extra state to wich all pushed ecclines are pushed on. This
extra state has a holding time in wich no writeouts will be done
effectively collecting more sectors before its even sheduled for writing.
2008-11-01 23:51:25 +00:00
hans
f8681c958c Initialize sc->sc_dev before using it, and use it as argument for the
interrupt handler. Makes this work again. OK by christos.
2008-11-01 20:31:26 +00:00
reinoud
e9d599f49d Explicitly set buffer's block numbers. Blocks were always read/written
correctly only the sheduling could go less than optimal.
2008-11-01 19:50:32 +00:00
hans
f86fa4502c Make the driver work (except for setting display brightness) on older
machines by removing the check for the CMOS method from thinkpad_match.
OK by jmcneill.
2008-11-01 19:22:25 +00:00
cliff
e88243d4c8 rip out some more brinngup debug cruft 2008-11-01 07:58:33 +00:00
cliff
84dc474c3c in initarm(), remove some bringup debug stuff, and clean up
progress markers; they are still useful for now.
in cpu_reboot() use Gemini Global Reset Control register to reboot system
geminiwdt_reboot() is no longer needed, removed.
2008-11-01 07:43:19 +00:00
wrstuden
ab61b53b27 Adjust the sleeps in lwpcache and lwpublk. Make them uninterruptable
for now. This will prevent signals from waking them. Adjust
exit_lwps() to explicitly add LW_SINTR to all of them, so that
the process exit code can wake them up.

This is needed as threads in both of these wait channels die once
they are woken. So they aren't interruptable in the typical sense.

I am now able to suspend & resume firefox successfully now.
2008-11-01 05:59:33 +00:00
christos
2a274197af - allocate 8 pointers on the stack to avoid stack overflow in nfs.
- make that 8 a constant
- remove bogus panic
2008-10-31 20:42:41 +00:00
christos
1c6aec2060 Import syslogd SoC project by Martin Schuette:
- new syslog protocol api syslogp(3) that supports structured data
	  and draft-rfc timestamps
	- reliable tcp connections with queueing
	- encrypted connections
2008-10-31 16:12:18 +00:00
reinoud
54977cd016 Clarify the dirhash locking protocol and remove unnessiary #ifdef DEBUG
flag.
2008-10-31 16:04:59 +00:00
reinoud
a2a624b32c Protect the dirhash_queue when purging hashed directories on memory
overflow situations.
2008-10-31 15:48:39 +00:00
cliff
87a4aaf787 in geminiwdt_attach, put watchdog device in known (disabled) state,
then register this driver with sysmon_wdog_register.
rip out temp debug stuff from bringup.
2008-10-31 15:29:14 +00:00
reinoud
afc9c8a1c7 Remove old KASSERTS that were commented out. Since the dirhash structure is
considered part of the vnode/*_node structure it sure has to be locked or
the code using it is playing russian roulette.
2008-10-31 15:13:55 +00:00
reinoud
4ea6ec31b8 Cleanup dirhash and make use of the standard hash32_strn() instead of the
handcrafted one.

Note it uses hash32_strn() since arguments can be passed from namei
arguments and thus don't have to be null terminated.
2008-10-31 15:01:12 +00:00
rmind
8f1873ea3b - Avoid the race with CPU online/offline state changes, when setting the
affinity (cpu_lock protects these operations now).
- Disallow setting of state of CPU to to offline, if there are bound LWPs,
  which have no CPU to migrate.
- Disallow setting of affinity for the LWP(s), if all CPUs in the dynamic
  CPU-set are offline.
- sched_setaffinity: fix invalid check of kcpuset_isset().
- Rename cpu_setonline() to cpu_setstate().

Should fix PR/39349.
2008-10-31 00:36:22 +00:00
matt
11582641c8 Welcome to 5.99.1! 2008-10-31 00:12:51 +00:00
rmind
1a7b9dcc69 No need to name arguments in function prototypes; and a bit of cosmetics. 2008-10-30 23:02:12 +00:00
cegger
21b01532c7 prepare for device_t/softc split, but actually don't do it: ipmi_match() wants to access sc_dev before we have chance to initialize it 2008-10-30 20:28:02 +00:00
joerg
77a5d43962 New assym.h dependency. 2008-10-30 20:07:01 +00:00