Commit Graph

1357 Commits

Author SHA1 Message Date
njoly 4a85854e5e Do mask the upper 16 bits, when sanity checking fs/gs register values.
Fix my own PR/43842.
2011-01-26 21:44:31 +00:00
pooka d13f306052 Add bwi from PR kern/40279. There is no know case of testing the
driver on amd64/i386, but if it doesn't work at least we're more
likely to get a PR instead of people wondering about lacking driver
support.
2011-01-26 00:25:55 +00:00
jmcneill b9c99a1608 add acpiwdrt 2011-01-17 15:56:03 +00:00
rmind 7146b2f61d Retire struct user, remove sys/user.h inclusions. Note sys/user.h header
as obsolete.  Remove USER_TO_UAREA/UAREA_TO_USER macros.

Various #include fixes and review by matt@.
2011-01-14 02:06:22 +00:00
joerg d3a052c472 Allow use of traditional CPP to be set on a per platform base in sys.mk.
Honour this for dependency processing in bsd.dep.mk.  Switch i386 and
amd64 assembly to use ISO C90 preprocessor concat and drop the
-traditional-cpp on this platform.
2011-01-12 23:12:10 +00:00
jruoho 013c599031 Restore the interrupt level in cpu_reboot() before calling the
acpi_enter_sleep_state() function.
2011-01-11 21:10:17 +00:00
jruoho 37f5de3ab8 Add a dummy-driver for ACPI fans. 2011-01-09 15:12:33 +00:00
jruoho a134245aa1 Remove APM. (Already commented out.) 2011-01-09 08:05:47 +00:00
jruoho e067d18bf0 Add a driver for ACPI power meters. 2011-01-05 20:08:12 +00:00
tsutsui a9ce633ac2 Xref module(7) in comments. 2011-01-03 06:07:42 +00:00
jmcneill 1fe6c4002d add 'uaudio* at usbifif?' so uaudio can attach to something other than
a hub
2010-12-27 15:56:50 +00:00
njoly 1fb70a6a63 __HAVE_CPU_INFO_FIRST -> __HAVE_CPU_DATA_FIRST. 2010-12-22 22:08:47 +00:00
christos 1101fc9115 Make __HAVE_CPU_DATA_FIRST true 2010-12-22 04:15:01 +00:00
joerg 3e11e26976 Consistently use .gnu.warning with .pushsectio and .popsection on all
architectures instead of obsolete STABS frames for linker warnings.
2010-12-20 21:11:24 +00:00
matt 6a66466f0c Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits.  Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
2010-12-20 00:25:23 +00:00
jym 7fdc4ddf74 Free tables are already zeroed in xen_pmap_bootstrap. No need to
do it a second time in assembly code.
2010-12-18 13:53:34 +00:00
christos d410526d61 add ihphy 2010-11-27 20:18:46 +00:00
hannken afdfce8e3b Remove unused count from pseudo-device md. 2010-11-23 11:13:52 +00:00
dholland 826407be7c Fix build with COMPAT_13. 2010-11-17 18:22:17 +00:00
uebayasi b60ff11a9a struct lwp * and struct proc * derefs. 2010-11-15 06:12:28 +00:00
uebayasi 5d7952a5d1 Move struct vm_page_md definition from vmparam.h to pmap.h, because
it's used only by pmap.  vmparam.h has definitions for wider
audience.

All GENERIC kernels build tested, except ia64.

powerpc/include/booke/vmparam.h has one too, but it has no pmap.h,
so it's left as is.
2010-11-14 13:33:20 +00:00
jnemeth bf88591aa0 Add new et(4)/etphy(4) devices. 2010-11-13 09:48:54 +00:00
uebayasi 52232a9d0d Pull in uvm/uvm.h where UVM's page level interface is used. 2010-11-12 13:18:56 +00:00
dholland c6a2fe972d <space><tab>
I went and wrote a gizmo to automate this a while back, but I seem to
have *lost* the thing. grr.
2010-11-10 10:07:44 +00:00
uebayasi 04cf143fd6 Use more VM_PHYSMEM_*() accessors. No functional changes. 2010-11-10 09:27:21 +00:00
uebayasi 41e5df6d3e Remove incomplete, never worked dynamic run-time memory registration
(uvm_page_physload(9)).  This functionality will be re-added later.
2010-11-06 15:42:43 +00:00
jakllsch c599081aa1 Enable siisata(4) in Xen dom0 kernels. 2010-11-06 15:08:59 +00:00
gsutre e0b5016656 Merge ACPI Fujitsu Driver. Provides support for hotkeys and other
built-in components through vendor-specific ACPI devices.

ok jruoho@
2010-11-05 10:28:20 +00:00
christos adf584bad0 add otus 2010-11-03 20:09:09 +00:00
jruoho 117351d1b6 Add acpiwmi(4) mappings for MSI laptops.
XXX: It may be necessary to fix PR # 43659 before this works on all models.
2010-10-24 08:54:14 +00:00
jruoho c99562cb83 Simplify acpi_enter_sleep_state() and guard it against NULL pointer
dereferences. Try to avoid referencing the global acpi_softc, which should
really be static or at least internal to acpi(4).
2010-10-24 07:53:04 +00:00
yamt 0356d9d499 Xosyscall: sync with Xsyscall. 2010-10-21 11:43:22 +00:00
yamt 0320f1268a Xsyscall: remove a stale comment. 2010-10-21 11:42:26 +00:00
yamt ce54ddc1de Xsyscall: remove an unused label. 2010-10-21 11:41:31 +00:00
yamt cc2d727ec3 Xsyscall: save %es before enabling interrupts. otherwise it can be
clobbered by preemption.  PR/43903.
2010-10-21 11:39:45 +00:00
yamt c97e27eb0e cpu_setmcontext: add a comment 2010-10-21 11:28:34 +00:00
yamt f34d0e9eb1 cpu_fsgs_zero: clear %fs and %gs even in the case of !PK_32. 2010-10-21 11:27:46 +00:00
yamt 7cee2df796 cpu_fsgs_zero: always clear tf_fs and tf_gs. 2010-10-21 11:22:55 +00:00
yamt 9dbb22af20 don't forget to call nmi_init. 2010-10-21 11:17:54 +00:00
gsutre e28e04ce32 Merge ACPI display driver. Provides generic support for brightness
control and output switching, through ACPI video extensions.

TODO: use wsconsctl(8) instead of sysctl(8) for brightness control.

ok jruoho@
also discussed with cegger@ and jmcneill@
2010-10-12 19:10:49 +00:00
jakllsch 4e26f773f2 Avoid fault if acpi_softc is NULL at attempted power-off.
XXX at least some of this should be factored off into arch/x86.
2010-09-22 16:16:51 +00:00
chs bf2af3b9b5 accept the LDT selector in check_sigcontext32() too. 2010-09-05 20:52:38 +00:00
chs dfffc13a65 in check_mcontext32(), accept the LDT selector for 32-bit user code
as well as the GDT selector.  fixes PR 43835.
2010-09-05 20:14:39 +00:00
rmind 2e6f2099c6 Import NPF - a packet filter. Some features:
- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
  Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
  supporting generic RISC-like and specific CISC-like instructions for
  common patterns (e.g. IPv4 address matching).  See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@
2010-08-22 18:56:18 +00:00
haad 15b01eef79 dd dm driver to XEN configs because they do not have modules working yet.
This will enable using LVM by default on XEN DOM0 hostings running NetBSD.

Change suggested by Sam Fourman.
2010-08-12 20:16:27 +00:00
chs 6b187f6957 add more (commented-out) spdmem instances for HP xw-series workstations. 2010-08-08 18:28:00 +00:00
chs 0c9fb0464e Fix several panics that can be caused by applications using
bad segment register values with setcontext() or sigreturn().
2010-08-08 18:13:54 +00:00
jruoho 6745d5be67 Do not try to disable ACPI if we can not enter to legacy mode. While it is
safe to call AcpiDisable() even if a system operates only in ACPI mode, this
leads to unpleasantly verbose error messages in ACPICA.
2010-08-07 20:07:25 +00:00
joerg 7f1183f226 Add support for fenv.h interface for i386 and amd64.
Submitted by Stathis Kamperis as part of GSoC 2010 and ported from
FreeBSD.
2010-07-31 21:47:52 +00:00
joerg 4f423e005b Add machdep.fpu_present, machdep.sse and machdep.sse2 sysctls for
compatibility with i386 and compat32.
2010-07-31 18:38:32 +00:00
christos f0a414ccfb follow suit with the i386, and correct the siginfo codes for integer overflow
and zerodivide.
2010-07-26 12:39:04 +00:00
njoly 744259c24f Pull i386 pte.h on amd64 for 32bit compat. 2010-07-24 17:43:47 +00:00
jakllsch 897b6b7d94 Almost entirely rework Intel Firmware Hub random number generator support.
This introduces fwhrng(4) which attaches via ichlpcib(4), replacing
the rnd(4) support in pchb(4).
2010-07-23 00:43:20 +00:00
jruoho 4d861e5bb4 Merge a driver for ACPI CPUs with basic support for processor power states,
also known as C-states. The code is modular and provides an easy way to add
the remaining functionality later (namely throttling and P-states).

Remarks:

  1.	Commented out in the GENERICs; more testing exposure is needed.

  2.	The C3-state is disabled for the time being because it turns off
	timers, among them the local APIC timer. This may not be universally
	true on all x86 processors; define ACPICPU_ENABLE_C3 to test.

  3.	The algorithm used to choose a power state may need tuning. When
	evaluating the appropriate state, the implementation uses the
	previous sleep time as an indicator. Additional hints would include
	for example the system load.

	Also bus master activity is evaluated when choosing a state. The
	usb(4) stack is notorious for such activity even when unused.
	Typically it must be disabled in order to reach the C3-state,
	but it may also prevent the use of C2.

  4.	While no extensive empirical measurements have been carried out, the
	power savings are somewhere between 1-2 W with C1 and C2, depending
	on the processor, firmware, and load. With C3 even up to 4 W can be
	saved.  The less something ticks, the more power is saved.

ok jmcneill@, joerg@, and discussed with various people.
2010-07-18 09:29:11 +00:00
rmind 7c940b718e Unify i386 and amd64 procfs MD code into x86. 2010-07-08 11:24:59 +00:00
chs b9075fd7d9 clean up the check for tracing into a syscall handler. 2010-07-07 01:15:34 +00:00
chs ffa744f452 add the guts of TLS support on amd64. based on joerg's patch,
reworked by me to support 32-bit processes as well.
we now keep %fs and %gs loaded with the user values
while in the kernel, which means we don't need to
reload them when returning to user mode.
2010-07-07 01:14:52 +00:00
chs 1842e935a4 fix more bugs in ucas_*():
move the "old" value to %*ax so that cmpxchg* can work.
remove the PCB_ONFAULT stuff, onfault_handler() handles this already.
return the error from fault handler in ucas_fault rather than forcing EFAULT.
2010-07-07 01:13:29 +00:00
cegger a63798ea7c Turn PMAP_NOCACHE into MI flag.
Add MI flags PMAP_WRITE_COMBINE, PMAP_WRITE_BACK, PMAP_NOCACHE_OVR.
Update pmap(9) manpage.

hppa: Remove MD PMAP_NOCACHE flag as it exists as MI flag
mips: Rename MD PMAP_NOCACHE to PGC_NOCACHE.

x86: Implement new MI flags using Page-Attribute Tables.
x86: Implement BUS_SPACE_MAP_PREFETCHABLE.

Patch presented on tech-kern@:
http://mail-index.netbsd.org/tech-kern/2010/06/30/msg008458.html

No comments on this last version.
2010-07-06 20:50:33 +00:00
cherry c971211b47 The Xen balloon driver enables growing and shrinking
PV domains on the fly, by collaborating with UVM and the hypervisor
2010-07-06 15:00:09 +00:00
rmind 3c507045e2 Remove pfind() and pgfind(), fix locking in various broken uses of these.
Rename real routines to proc_find() and pgrp_find(), remove PFIND_* flags
and have consistent behaviour.  Provide proc_find_raw() for special cases.
Fix memory leak in sysctl_proc_corename().

COMPAT_LINUX: rework ptrace() locking, minimise differences between
different versions per-arch.

Note: while this change adds some formal cosmetics for COMPAT_DARWIN and
COMPAT_IRIX - locking there is utterly broken (for ages).

Fixes PR/43176.
2010-07-01 02:38:26 +00:00
bouyer f249dc1977 Sync DKWEDGE options with GENERIC 2010-06-26 13:08:37 +00:00
rmind 518a6c84b7 Fix ucas_32/ucas_64 on amd64. 2010-06-22 18:26:05 +00:00
tnozaki 9efec5bce3 1. MB_LEN_MAX switch MD to MI.
2. unfortunately hppa's MB_LEN_MAX is defined incorrectly 6 instead of 32
   so we have to add more setlocale(3) __RENAME func, __setlocale50.
3. move setlocale1.c and setlocale32.c to lib/libc/compat/locale/*
   prepareing for next libc major crunk.
4. bump libc minor version.
2010-06-07 13:52:28 +00:00
dholland 90345ac358 Remove orphaned heading "Mice" 2010-06-02 18:05:28 +00:00
dholland 7af6d770a0 COMPAT_43 should not be sorted between COMPAT_40 and COMPAT_50. 2010-06-02 18:02:57 +00:00
mjf e0e10b0607 Add __cacheline_aligned and __read_mostly annotations.
These annotations help to mitigate false sharing on multiprocessor
systems.

Variables annotated with __cacheline_aligned are placed into the
.data.cacheline_aligned section in the kernel. Each item in this
section is aligned on a cachline boundary - this avoids false
sharing. Highly contended global locks are a good candidate for
__cacheline_aligned annotation.

Variables annotated with __read_mostly are packed together tightly
into a .data.read_mostly section in the kernel. The idea here is that
we can pack infrequently modified data items into a cacheline and
avoid having to purge the cache, which would happen if read mostly
data and write mostly data shared a cachline. Initialisation variables
are a prime candiate for __read_mostly annotations.
2010-06-01 22:13:30 +00:00
tnozaki dc71c99d49 fix wrong integer promotion rule(removed U suffix from UINT{8,16}_C).
see ISO/IEC 9899:1999 7.18.4.3.
2010-05-29 17:33:57 +00:00
plunky c938c0405b add btmagic(4) where other Bluetooth drivers are listed 2010-05-22 19:02:07 +00:00
joerg 4a30c591eb Fix indentation 2010-05-11 02:34:39 +00:00
mrg 309c6e11b7 enable IPFILTER_COMPAT in all kernels that have ipfilter already.
canonicalise several of the ipf option segments in various files
(this mostly means adding commented out IPFILTER_DEFAULT_BLOCK,
or adding commented or uncommented IPFILTER_LOG or IPFILTER_LOOKUP
option statements.)

i built about 20 of these kernels to check, but not all of them.
2010-05-08 22:16:25 +00:00
dyoung 42360ba78f As Andrew Doran points out, _ALIGN_TEXT is unused, and to test that
X86_BUS_SPACE_IO equals 0 is no longer necessary.  Get rid of the
_ALIGN_TEXT definition, and do not "assert" that X86_BUS_SPACE_IO == 0.
2010-05-05 16:53:57 +00:00
jym d66ce3b289 Enable the NX bit feature for Xen i386pae and amd64 kernels.
Tested with Xen 3.1 and Xen 3.3, dom0 and domU, by bouyer@ and jym@.

Ok bouyer@.
2010-05-04 23:27:13 +00:00
dyoung 07637c55fc Fix 'tags' target. 2010-04-28 20:22:46 +00:00
dyoung 30b2d68d20 On x86, change the bus_space_tag_t to a pointer to a struct
bus_space_tag.  For now, bus_space_tag's only member is
bst_type, the type of space, which is either X86_BUS_SPACE_IO
or X86_BUS_SPACE_MEM.  In the future, new bus_space_tag members
will refer to override-functions installed by a new function,
bus_space_tag_create(9).

Add pointers to constant struct bus_space_tag, x86_bus_space_io and
x86_bus_space_mem.  Use them to replace most uses of X86_BUS_SPACE_IO
and X86_BUS_SPACE_MEM.

Add an x86-specific bus_space_is_equal(9) implementation that compares
the two tags' bst_type.
2010-04-28 19:17:03 +00:00
rmind 13f624ca0f Remove lwp_uc_pool, replace it with kmem(9), plus add some consistency.
As discussed, a while ago, with ad@.
2010-04-23 19:18:09 +00:00
jym 6e8e516ce0 Enable the NX bit feature early in the MP trampoline code (do not rely on
cpu_init_msrs() to do it). Having NX bit set on a page will raise a #GP
on fetch if NXE is not enabled, which can happen early when structures
(like idlelwp) are allocated with just rw- rights.
2010-04-20 15:42:21 +00:00
jym bc0420413d This patch fixes the NX regression issue observed on amd64 kernels, where
per-page execution right was disabled (therefore leading to the inability
of the kernel to detect fraudulent use of memory mappings marked as not
being executable).

- replace cpu_feature and ci_feature_flags variables by cpu_feature and
ci_feat_val arrays. This makes it cleaner and brings kernel code closer
to the design of cpuctl(8). A warning will be raised for each CPU that
does not expose the same features as the Boot Processor (BP).

- the blacklist of CPU features is now a macro defined in the
specialreg.h header, instead of hardcoding it inside MD initialization
code; fix comments.

- replace checks against CPUID_TSC with the cpu_hascounter() function.

- clean up the code in init_x86_64(), as cpu_feature variables are set
inside cpu_probe().

- use cpu_init_msrs() for i386. It will be eventually used later for NX
feature under i386 PAE kernels.

- remove code that checks for CPUID_NOX in amd64 mptramp.S, this is already
performed by cpu_hatch() through cpu_init_msrs().

- remove cpu_signature and feature_flags members from struct mpbios_proc
(they were never used).

This patch was tested with i386 MONOLITHIC, XEN3PAE_DOM0 and XEN3_DOM0 under
a native i386 host, and amd64 GENERIC, XEN3_DOM0 via QEMU virtual machines.

XXX Should kernel rev be bumped?

XXX A similar patch should be pulled-up for NetBSD-5, hopefully tomorrow.
2010-04-18 23:47:50 +00:00
jym c74bd00ba1 When kernel remaps to high memory in amd64 locore, the GDT used before
becomes invalid. As such, split it in two parts, one for use when system
boots in low memory, and one for use when it jumps to high memory.
2010-04-18 15:24:54 +00:00
pooka 835e533be4 Remove unused count (invariably "4") from pseudo-device fss. 2010-04-16 13:48:27 +00:00
ahoka 5b74e5d788 revert last change, amd64 doesnt have monolith so dont remove pad. 2010-04-09 14:37:57 +00:00
ahoka 42b95af124 Remove pad from GENERIC, add to MONOLITH, we have it as a module now. 2010-04-09 14:02:05 +00:00
jruoho 5a858cc492 Add WMI mappings for HP laptops. Requested by cegger@.
Thanks to apb@ and cegger@ for initial testing.

XXX: This conflicts with hpqlb(4). Someone with the suitable hardware needs
     to complete the list of hotkeys before -- and if -- this can replace
     hpqlb(4). For now, the driver was left uncommented in the GENERICs.
2010-04-08 17:32:30 +00:00
jruoho 496980a056 Add wmidell(4). 2010-04-08 09:45:17 +00:00
dholland 33b963cb18 sort a couple things 2010-03-28 00:00:07 +00:00
tnozaki 377cb4e4f9 1. {wctype,wctrans,mbstate}_t: switch MD to MI like other
libc implementation (such as *BSD and glibc2).

2. don't typedef void * wc{type,trans}_t, suggested by soda@-san.
   it may pass through compiler type check, it's harmful.
   so i introduce dummy struct __tag_wc{type,trans}_t(iconv_t already does).

no ABI change was made.
2010-03-27 22:14:09 +00:00
cegger d03d022556 buildfix: invert comparison to get the 64bit defines by default.
Fixes 'i386/elf_machdep.h: No such file or directory error' when compiling
amd64 toolchain on OSX.
2010-03-18 08:28:33 +00:00
plunky 04e2ab6ae6 add uhso(4) device where appropriate
- follow the lead of other USB driver declarations wrt commented out
    - (cross-)build tested all these kernels
2010-03-07 09:39:42 +00:00
plunky c269ebf72f use a MI major number for uhso(4) driver
(requested by mrg)
2010-03-06 23:45:38 +00:00
plunky 4677f8289f add major device for usho(4) driver 2010-03-06 21:31:50 +00:00
cnst 213f4eaf44 remove aiboost(4) from GENERICs, since it cannot win in autoconf(9) over aibs(4); ok pgoyette 2010-03-06 04:28:53 +00:00
jym 1e1cc23e07 Do not forget that ptoa() casts the result to vaddr_t, which is bad
for paddr_t values under i386 PAE. Use ctob() instead.

Although amd64 is not affected by this vaddr_t vs paddr_t issue (both
having the same size), for the sake of completeness, switch to
ctob() when manipulating paddr_t/psize_t entities in amd64 machdep.c.

Compile tested for i386 and amd64. No regression expected.
2010-03-01 01:35:11 +00:00
jym 42e5342a52 Fixes regarding paddr_t/pd_entry_t types in MD x86 code, exposed by PAE:
- NBPD_* macros are set to the types that better match their architecture
(UL for i386 and amd64, ULL for i386 PAE) - will revisit when paddr_t is
set to 64 bits for i386 non-PAE.

- type fixes in printf/printk messages (Use PRIxPADDR when printing paddr_t
values, instead of %lx - paddr_t/pd_entry_t being 64 bits with PAE)

- remove casts that are no more needed now that Xen2 support has been dropped

Some fixes are from jmorse@ patches for PAE.

Compile + tested for i386 GENERIC and XEN3 kernels. Only compile tested for
amd64.

Reviewed by bouyer@.

See also http://mail-index.netbsd.org/tech-kern/2010/02/22/msg007373.html
2010-02-26 19:25:07 +00:00
cegger 71e3b44a06 dtrace kernel hooks
ok darran@
2010-02-23 06:27:40 +00:00
cegger 6db342e072 include opt_xen.h 2010-02-23 00:23:36 +00:00
pgoyette ad945e1f49 Correct spelling of smscmon and add (commented out) to GENERICs 2010-02-22 13:42:04 +00:00
ahoka 4c65a125fc Add SPLASH example, like in i386. 2010-02-22 05:59:04 +00:00
cnst 51998ed2d7 New wbsio(4) driver for Winbond Super I/O attachment of lm(4) on any port.
http://mail-index.netbsd.org/tech-kern/2010/02/17/msg007338.html

Reviewed by <pgoyette>, <tech-kern>.
2010-02-21 05:16:29 +00:00
dyoung 2e4dbd90d6 Don't use the global variable pci_mode, but use a local copy of
the return value of pci_mode_detect(), instead.
2010-02-15 23:53:07 +00:00
cnst 1c23afa3cb New aibs(4) driver for ASUSTeK AI Booster (ACPI ATK0110) hardware monitor
with limit support.

        http://thread.gmane.org/gmane.os.netbsd.devel.kernel/35654

Reviewed by <pgoyette>, <jruoho> and <tech-kern>.
2010-02-09 03:19:50 +00:00
pgoyette b6f86abdfe Add flags to all instances of lm(4), add a reference to man page 2010-02-08 21:45:31 +00:00
joerg d621e29eca Remove separate mb_map. The nmbclusters is computed at boot time based
on the amount of physical memory and limited by NMBCLUSTERS if present.
Architectures without direct mapping also limit it based on the kmem_map
size, which is used as backing store. On i386 and ARM, the maximum KVA
used for mbuf clusters is limited to 64MB by default.

The old default limits and limits based on GATEWAY have been removed.
key_registered_sb_max is hard-wired to a value derived from 2048
clusters.
2010-02-08 19:02:25 +00:00
pgoyette c26849053d Add acpismbus enries - commented out! 2010-02-06 20:12:32 +00:00
jruoho 084261a156 Remove ACPICA_PEDANTIC. 2010-01-31 12:20:22 +00:00
mbalmer 45aabfbe67 Fix language. 2010-01-28 14:05:03 +00:00
rmind df63e73c6a Reduce the difference between i386 and amd64 procfs MD code.
Prepare for the merge, no functional changes intended.
2010-01-18 22:31:14 +00:00
njoly 0c51147662 Do not check more than 32 bits against ci_feature_flags, to avoid printing
bogus data on /proc/cpuinfo flags line.
2010-01-18 21:55:40 +00:00
joerg a6cc3b46f7 Provide inline assembly version of bswap64. 2010-01-14 02:06:04 +00:00
tnn 9ecd6e9551 uhmodem(4) is superseded by u3g(4) and u3ginit(4).
Prepare for uhmodem(4) removal by not building it anymore.
This may fix PR kern/41174.
2010-01-07 18:49:30 +00:00
martin c67e811ad6 Add the u3ginit driver to all configs which have the u3g driver 2010-01-07 00:18:47 +00:00
jym df07ada91c Use banner() instead of amd64's custom use of printf's for copyright
notice and total/available memory.
2009-12-31 01:11:28 +00:00
pooka bb27c3b9ac unifdef -D UGEN_BULK_RA_WB
Default behaviour unchanged, the feature must still be explicitly
enabled for a ugen fd.
2009-12-23 01:04:45 +00:00
jym 87333291ab Compile in PaX support for Xen x86 kernels (dom0 and domU).
ok bouyer@. Compiled and tested by me under i386. Only compile tested for
amd64.
2009-12-17 23:53:24 +00:00
snj be360188fc Move to 2-clause license. Approved by HAYAKAWA Koichi (copyright holder). 2009-12-15 22:17:12 +00:00
matt 0a8b38422e Add PRIx{P,V}{ADDR,SIZE}, PRIu{P,V}SIZE, and PRIxREGISTER{,32,64} for all
(except where they will be added via merge).  These should be used to print
{p,v}{addr,size}_t and register*_t as appropriate.
2009-12-11 05:52:03 +00:00
matt 6a9e4e8eeb Change u_long to vaddr_t/vsize_t in exec code where appropriate (mostly
involves setregs and vmcmds).  Should result in no code differences.
2009-12-10 14:13:48 +00:00
pooka 70d4493c77 Remove the portalfs kernel file system driver. Replace mount_portal(8)
with a version based on puffs.  User functionality remains the same.
2009-12-05 20:11:01 +00:00
sborrill d47b1ae24d Add udl(4) 2009-12-03 11:37:55 +00:00
rmind ce313d4fb1 Replace l_addr with uvm_lwp_getuarea() in various MD code, mostly cpu_lwp_fork(). 2009-11-29 04:15:42 +00:00
pooka 972900e4ca Move -mcmodel=kernel CFLAGS from bsd.klinks.mk to amd64/include/Makefile.inc
to avoid having the kernel toolchain flags split over a billion different
files.
2009-11-27 13:50:29 +00:00
rmind 3f18fe8123 - Use uvm_lwp_setuarea() instead of directly setting address to lwp_t::l_addr.
- Replace most remaining uses of l_addr with uvm_lwp_getuarea() or lwp_getpcb().
- Amend assembly in ports where it accesses PCB via struct user.
- Rename L_ADDR to L_PCB in few places.  Reduce sys/user.h inclusions.
2009-11-27 03:23:03 +00:00
matt 11af2f9cfa Kill proc0paddr. Use lwp0.l_addr instead. 2009-11-26 00:19:11 +00:00
tron 7395068839 Enable SSP (Stack Smash Protection) in x86 kernels by default (except
in i386 *TINY kernels). The NetBSD/i386 "ALL" kernel is unconditionally
compiled with SSP enabled.

Change approved by the core team.
2009-11-25 17:08:08 +00:00
rmind 9303fb5a00 Remove IPL_LPT and IPL_IPI aliases, use the actual IPLs.
Fix some broken comments.
2009-11-25 14:28:49 +00:00
pooka 09dbb89b44 If cpu_disklabel includes struct dkbad, define __HAVE_DISKLABEL_DKBAD.
This allows use of subr_disk_mbr on all archs.  Default to it for
the rump disk component.  No functional change for regular kernels.
(The other option would've been to include dkbad in disklabels
everywhere, but arguably this approach has less possible side-effects,
especially given that wedges and related magic will take over the
world any second now).
2009-11-23 13:40:08 +00:00
bouyer e0e426bb85 For amd64, introduce a third free list distinct from the default free list
for memory between 16M and 4G. On large memory machine, this avoids
the 32bit-accessible memory being eaten by various kernel early allocation,
causing 32bit bus_dma(9) memory allocation to fail at boot time.
Tested on a system with 48GB RAM; based on netbsd-5 patch proposed on
port-amd64 3 days ago.
2009-11-22 21:41:03 +00:00
rmind 3c2bd91e81 Use lwp_getpcb() on x86 MD code, clean from struct user usage. 2009-11-21 03:11:00 +00:00
dholland 470c8bf181 Declare trap name array as extern const char *const [] to match how
it's defined in trap.c. (Should really be in a header, of course.)
Compile-tested.
2009-11-15 18:41:31 +00:00
dsl 659c7fee7d tlbstate is 'int', so use 'cmpl' not 'cmpq'.
Fixes gprof on amd64 PR/40960.
2009-11-13 22:49:46 +00:00
haad dd6f356cec Reert change which was not meant to be comitted. 2009-11-11 23:59:36 +00:00
haad 14ad4d5b1e Build kernel modules with -mno-red-zone like kernel is build. This fixes
frequent panics in amd64 zfs module. This should also fix problem reported
by Nicolas Joly in:

http://mail-index.netbsd.org/port-amd64/2008/12/09/msg000646.html

Thanks to cube@ for his help with this.
2009-11-11 23:53:38 +00:00
cegger 9480c51b04 Add a flags argument to pmap_kenter_pa(9).
Patch showed on tech-kern@ http://mail-index.netbsd.org/tech-kern/2009/11/04/msg006434.html
No objections.
2009-11-07 07:27:40 +00:00
rmind 0d5ca7ed05 Make pcb_ldt_sel, in amd64, an unused field. Unlike in i386, it was
missed during clean-up of LDT handling.
2009-10-27 03:05:27 +00:00
rmind 40cf6f3659 Remove uarea swap-out functionality:
- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code.  Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.
2009-10-21 21:11:57 +00:00
bouyer 6d07b400dc Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !
2009-10-19 18:41:07 +00:00
snj 065c5ae0d0 Move Matthias Pfaller's files to 2-clause license. OK matthias@. 2009-10-18 18:13:59 +00:00
rmind b619d660f4 Remove X86_IPI_WRITE_MSR (and msr_ipifuncs.c), replace all uses in drivers
with xc_broadcast().  AMD K8 PowerNow driver tested by <jakllsch>, thanks!

Closes PR/37665.
2009-10-05 23:59:30 +00:00
jmcneill 23e8227b7c PR# kern/42139: ACPI WMI: new driver
Import acpiwmi(4) from Jukka Ruohonen. From the PR:

Attached is a driver that implements ACPI WMI API:

http://www.microsoft.com/whdc/system/pnppwr/wmi/wmi-acpi.mspx

The WMI is used to provide a generic interface for OEMs to use certain
platform/laptop-specific additions to the standard ACPI in a somewhat
portable way. These can be hotkeys for additional buttons, different event
handlers (wireless kill switch, lid switch, etc.), and so on. At least HP
and Acer use it by default nowadays.

The benefit of this interface would be portability. For an example, instead
of hpqlb(4) that works only with certain HP models, we could have a generic
HP WMI-driver that should work in theory across all HP laptops. On many new
laptops WMI may also be the only way to access laptop/manufacturer-specific
features.
2009-10-02 16:47:52 +00:00
skrll 980b1066f3 It's -z max-page-size, not -z maxpagesize. 2009-10-02 10:14:20 +00:00
skrll 1521a0436b MAXPAGESIZE got bumped to 0x200000. Use -z maxpagesize=0x100000 until
someone(tm) decides that kernels should have that alignment, etc.
2009-10-01 09:15:19 +00:00
skrll a5f3419efe Fix up mwait/monitor now that gas has been fixed. 2009-10-01 09:13:54 +00:00
jmcneill c05491c171 Need sdmmc* at wb? 2009-09-30 22:19:00 +00:00
jmcneill e7a9e26c28 wss@acpi doesn't make much sense on amd64, so remove it 2009-09-30 20:49:07 +00:00
jmcneill beb3879990 add and enable wb(4) 2009-09-30 20:47:09 +00:00
mlelstv f4d53c7199 Ensure FP state is reset, if FP is used in a signal handler.
Fixes PR kern/39299 for 32bit code.
2009-09-25 13:56:32 +00:00
christos 68b7139cf2 add toshide 2009-09-20 01:14:31 +00:00
jmcneill 68aba25e22 Switch on hdaudio(4) 2009-09-07 22:59:09 +00:00
jmcneill ad5f1845fb Refer to hdaudio as 'High Definition Audio', not
'Intel High Definition Audio' as many vendors implement the HD audio spec.
2009-09-07 10:40:54 +00:00
sborrill b88195cfa1 hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio*	at pci? dev ? function ?
hdafg*		at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio
2009-09-06 17:25:55 +00:00
jmcneill dd324f8480 Add definition for WAKEUP_vesa_modenum 2009-08-24 22:06:50 +00:00