The NetBSD Project

CVS log for src/sys/arch/i386/i386/machdep.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / arch / i386 / i386

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.841 / (download) - annotate - [select for diffs], Tue Mar 5 14:15:32 2024 UTC (5 weeks, 4 days ago) by thorpej
Branch: MAIN
CVS Tags: HEAD
Changes since 1.840: +2 -11 lines
Diff to previous 1.840 (colored)

Move the at-shutdown call to resettodr() from cpu_reboot() to kern_reboot().

It's a small step, but it's a step.

Revision 1.840 / (download) - annotate - [select for diffs], Sun Jul 16 19:55:43 2023 UTC (8 months, 4 weeks ago) by riastradh
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation
Changes since 1.839: +77 -4 lines
Diff to previous 1.839 (colored)

x86: Sprinkle extensive commentary about %fs/%gs initialization.

Plus some other side quests like the three-stage GDT metamorphosis
lifecycle.

No functional change intended.

Revision 1.839 / (download) - annotate - [select for diffs], Wed Oct 26 23:38:07 2022 UTC (17 months, 2 weeks ago) by riastradh
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10
Changes since 1.838: +5 -8 lines
Diff to previous 1.838 (colored)

ddb/db_active.h: New home for extern db_active.

This can be included unconditionally, and db_active can then be
queried unconditionally; if DDB is not in the kernel, then db_active
is a constant zero.  Reduces need for #include opt_ddb.h, #ifdef DDB.

Revision 1.838 / (download) - annotate - [select for diffs], Wed Oct 26 23:23:52 2022 UTC (17 months, 2 weeks ago) by riastradh
Branch: MAIN
Changes since 1.837: +3 -4 lines
Diff to previous 1.837 (colored)

sys: Put externs for time_adjtime and time_adjusted in .h files.

time_adjtime: sys/timex.h (defined in ntp code)
time_adjusted: sys/timevar.h (defined in non-ntp code)

(Not really sure this is a valuable distinction to maintain; there's
non-ntp code that uses time_adjtime too.)

Revision 1.837 / (download) - annotate - [select for diffs], Sat Aug 20 23:48:50 2022 UTC (19 months, 3 weeks ago) by riastradh
Branch: MAIN
CVS Tags: bouyer-sunxi-drm-base, bouyer-sunxi-drm
Changes since 1.836: +3 -2 lines
Diff to previous 1.836 (colored)

x86: Split most of pmap.h into pmap_private.h or vmparam.h.

This way pmap.h only contains the MD definition of the MI pmap(9)
API, which loads of things in the kernel rely on, so changing x86
pmap internals no longer requires recompiling the entire kernel every
time.

Callers needing these internals must now use machine/pmap_private.h.
Note: This is not x86/pmap_private.h because it contains three parts:

1. CPU-specific (different for i386/amd64) definitions used by...

2. common definitions, including Xenisms like xpmap_ptetomach,
   further used by...

3. more CPU-specific inlines for pmap_pte_* operations

So {amd64,i386}/pmap_private.h defines 1, includes x86/pmap_private.h
for 2, and then defines 3.  Maybe we should split that out into a new
pmap_pte.h to reduce this trouble.

No functional change intended, other than that some .c files must
include machine/pmap_private.h when previously uvm/uvm_pmap.h
polluted the namespace with pmap internals.

Note: This migrates part of i386/pmap.h into i386/vmparam.h --
specifically the parts that are needed for several constants defined
in vmparam.h:

VM_MAXUSER_ADDRESS
VM_MAX_ADDRESS
VM_MAX_KERNEL_ADDRESS
VM_MIN_KERNEL_ADDRESS

Since i386 needs PDP_SIZE in vmparam.h, I added it there on amd64
too, just to keep things parallel.

Revision 1.836 / (download) - annotate - [select for diffs], Sat Aug 20 23:15:36 2022 UTC (19 months, 3 weeks ago) by riastradh
Branch: MAIN
Changes since 1.835: +3 -2 lines
Diff to previous 1.835 (colored)

x86: Split bootspace out of x86/pmap.h into new x86/bootspace.h.

Revision 1.835 / (download) - annotate - [select for diffs], Tue May 31 18:04:11 2022 UTC (22 months, 1 week ago) by bouyer
Branch: MAIN
Changes since 1.834: +4 -2 lines
Diff to previous 1.834 (colored)

For some reason on my system, the guest starts with a pending event in
the shared structure. On i386, this cause hypervisor_callback to be
entered before cpu_info_primary is fully initialised, especially on i386
ci_intrstack is still NULL, which cause a crash when we try to use it.
Work around by recycling the boot's tmp stack for this until cpu_attach()
is called.

Revision 1.834 / (download) - annotate - [select for diffs], Sun Dec 26 21:33:48 2021 UTC (2 years, 3 months ago) by riastradh
Branch: MAIN
Changes since 1.833: +11 -4 lines
Diff to previous 1.833 (colored)

sys: Skip suspendsched on cpu_reboot if we're in ddb.

If we're in ddb, the scheduler and all other CPUs are quiesced
anyway.  But suspendsched will try to take an adaptive lock, which
causes it to crash and re-enter ddb, which isn't very useful for
rebooting.

Revision 1.833 / (download) - annotate - [select for diffs], Thu Oct 28 10:46:05 2021 UTC (2 years, 5 months ago) by riastradh
Branch: MAIN
Changes since 1.832: +11 -4 lines
Diff to previous 1.832 (colored)

x86: Move RNG initialization to after consinit.

This ensures we have the opportunity to get feedback about early
entropy.

Revision 1.832 / (download) - annotate - [select for diffs], Thu Oct 28 10:45:48 2021 UTC (2 years, 5 months ago) by riastradh
Branch: MAIN
Changes since 1.831: +3 -2 lines
Diff to previous 1.831 (colored)

x86: Process bootloader rndseed much sooner.

Revision 1.831 / (download) - annotate - [select for diffs], Tue Jul 14 00:45:52 2020 UTC (3 years, 9 months ago) by yamaguchi
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-futex, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.830: +69 -9 lines
Diff to previous 1.830 (colored)

Introduce per-cpu IDTs

This is realized by following modifications:
- Add IDT pages and its allocation maps for each cpu in "struct cpu_info"
- Load per-cpu IDTs at cpu_init_idt(struct cpu_info*)
- Copy the IDT entries for cpu0 to other CPUs at attach
   - These are, for example, exceptions, db, system calls, etc.

And, added a kernel option named PCPU_IDT to enable the feature.

Revision 1.830 / (download) - annotate - [select for diffs], Fri May 8 00:52:29 2020 UTC (3 years, 11 months ago) by riastradh
Branch: MAIN
Changes since 1.829: +3 -3 lines
Diff to previous 1.829 (colored)

Move cpu_rng_init a little later, just after cpu_init_msrs, on x86.

This way curcpu() and curlwp are available, so that we no longer need
any annoying conditionalization in kern_entropy.c.

Revision 1.829 / (download) - annotate - [select for diffs], Sat May 2 16:44:35 2020 UTC (3 years, 11 months ago) by bouyer
Branch: MAIN
Changes since 1.828: +22 -6 lines
Diff to previous 1.828 (colored)

Introduce Xen PVH support in GENERIC.
This is compiled in with
options XENPVHVM
x86 changes:
- add Xen section and xen pvh entry points to locore.S. Set vm_guest
  to VM_GUEST_XENPVH in this entry point.
  Most of the boot procedure (especially page table setup and switch to
  paged mode) is shared with native.
- change some x86_delay() to delay_func(), which points to x86_delay() for
  native/HVM, and xen_delay() for PVH

Xen changes:
- remove Xen bits from init_x86_64_ksyms() and init386_ksyms()
  and move to xen_init_ksyms(), used for both PV and PVH
- set ISA no-legacy-devices property for PVH
- factor out code from Xen's cpu_bootconf() to xen_bootconf()
  in xen_machdep.c
- set up a specific pvh_consinit() which starts with printk()
  (which uses a simple hypercall that is available early) and switch to
  xencons when we can use pmap_kenter_pa().

Revision 1.828 / (download) - annotate - [select for diffs], Thu Apr 30 03:29:19 2020 UTC (3 years, 11 months ago) by riastradh
Branch: MAIN
Changes since 1.827: +4 -2 lines
Diff to previous 1.827 (colored)

Simplify Intel RDRAND/RDSEED and VIA C3 RNG API.

Push it all into MD x86 code to keep it simpler, until we have other
examples on other CPUs.  Simplify RDSEED-to-RDRAND fallback.
Eliminate cpu_earlyrng in favour of just using entropy_extract, which
is available early now.

Revision 1.827 / (download) - annotate - [select for diffs], Sat Apr 25 15:26:17 2020 UTC (3 years, 11 months ago) by bouyer
Branch: MAIN
Changes since 1.826: +10 -23 lines
Diff to previous 1.826 (colored)

Merge the bouyer-xenpvh branch, bringing in Xen PV drivers support under HVM
guests in GENERIC.
Xen support can be disabled at runtime with
boot -c
disable hypervisor

Revision 1.825.4.4 / (download) - annotate - [select for diffs], Sat Apr 25 11:23:56 2020 UTC (3 years, 11 months ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.825.4.3: +5 -6 lines
Diff to previous 1.825.4.3 (colored) to branchpoint 1.825 (colored) next main 1.826 (colored)

Sync with bouyer-xenpvh-base2 (HEAD)

Revision 1.826 / (download) - annotate - [select for diffs], Tue Apr 21 20:13:39 2020 UTC (3 years, 11 months ago) by jdolecek
Branch: MAIN
CVS Tags: bouyer-xenpvh-base2
Changes since 1.825: +5 -6 lines
Diff to previous 1.825 (colored)

convert to newer HYPERVISOR_physdev_op() interface, now command and the
arg are separate arguments - this is needed for newer physdev_op commands

remove code for PHYSDEVOP_IRQ_UNMASK_NOTIFY, it is obsolete since
interface version 0x00030202 and is unsupported by newer versions of Xen

confirmed working on amd64 Dom0, i386 compile-tested only

Revision 1.825.4.3 / (download) - annotate - [select for diffs], Sat Apr 18 14:47:55 2020 UTC (3 years, 11 months ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.825.4.2: +2 -17 lines
Diff to previous 1.825.4.2 (colored) to branchpoint 1.825 (colored)

Centralize initialisations of delay_func and initclock_func
in x86_machdep.c and export from <x86/machdep.h>
Introduce a x86_dummy_initclock() and a x86_cpu_initclock_func pointer,
to be used later for Xen HVM native clock support.
rename rtclock_tval to x86_rtclock_tval and export from <x86/machdep.h>,
for the benefit of lapic.c

Revision 1.825.4.2 / (download) - annotate - [select for diffs], Thu Apr 16 08:46:34 2020 UTC (3 years, 11 months ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.825.4.1: +4 -4 lines
Diff to previous 1.825.4.1 (colored) to branchpoint 1.825 (colored)

Reorganise sources to make it possible to include Xen PVHVM support in
native kernels. Among others:
- move xen/include/amd64/hypercall.h to amd64/include/xen and
  xen/include/i386/hypercall.h to i386/include/xen
- exclude some native files from the build for xenpv
- add xen to "machine" config statement for amd64 and i386
- split arch/xen/conf/files.xen to arch/xen/conf/files.xen (for pv drivers)
  and arch/xen/conf/files.xen.pv (for full pv support)
- add GENERIC_XENHVM kernel config which includes GENERIC and add Xen PV
  drivers.

Revision 1.806.2.3 / (download) - annotate - [select for diffs], Mon Apr 13 08:03:52 2020 UTC (4 years ago) by martin
Branch: phil-wifi
Changes since 1.806.2.2: +17 -16 lines
Diff to previous 1.806.2.2 (colored) to branchpoint 1.806 (colored) next main 1.807 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.825.4.1 / (download) - annotate - [select for diffs], Thu Apr 9 16:12:50 2020 UTC (4 years ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.825: +8 -6 lines
Diff to previous 1.825 (colored)

For RB_POWERDONW, call HYPERVISOR_shutdown() in all cases where the
hypercall page is available. A PVHHVM domU now properly exits on
halt -p

Revision 1.806.2.2 / (download) - annotate - [select for diffs], Wed Apr 8 14:07:40 2020 UTC (4 years ago) by martin
Branch: phil-wifi
Changes since 1.806.2.1: +4 -4 lines
Diff to previous 1.806.2.1 (colored) to branchpoint 1.806 (colored)

Merge changes from current as of 20200406

Revision 1.824.2.1 / (download) - annotate - [select for diffs], Sat Feb 29 20:18:25 2020 UTC (4 years, 1 month ago) by ad
Branch: ad-namecache
Changes since 1.824: +3 -3 lines
Diff to previous 1.824 (colored) next main 1.825 (colored)

Sync with head.

Revision 1.825 / (download) - annotate - [select for diffs], Fri Jan 31 08:21:11 2020 UTC (4 years, 2 months ago) by maxv
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp, bouyer-xenpvh-base1, bouyer-xenpvh-base, ad-namecache-base3
Branch point for: bouyer-xenpvh
Changes since 1.824: +3 -3 lines
Diff to previous 1.824 (colored)

constify

Revision 1.824 / (download) - annotate - [select for diffs], Tue Dec 10 18:04:54 2019 UTC (4 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Changes since 1.823: +3 -3 lines
Diff to previous 1.823 (colored)

pg->phys_addr -> VM_PAGE_TO_PHYS(pg)

Revision 1.823 / (download) - annotate - [select for diffs], Fri Oct 18 01:38:28 2019 UTC (4 years, 5 months ago) by manu
Branch: MAIN
CVS Tags: phil-wifi-20191119
Changes since 1.822: +8 -4 lines
Diff to previous 1.822 (colored)

Multiboot2 kernel support for i386

That implementation works either with BIOS or UEFI bootstrap

This requires the following kernel changes:

Add UEFI boot services and I/O method protoypes
src/sys/arch/x86/include/efi.h 1.8 - 1.9

Fix EFI system table mapping in virtual space
src/sys/arch/x86/x86/efi.c 1.19 - 1.20

Make sure no bioscall is issued when booting off UEFI system
src/sys/arch/i386/i386/machdep.c 1.821 - 1.822
src/sys/arch/i386/pci/piixpcib.c 1.22 - 1.23

And the following bootstrap changes:

Add kernel symbols for multiboot1
src/sys/arch/i386/stand/lib/exec_multiboot1.c 1.2 - 1.3
src/sys/arch/i386/stand/lib/libi386.h 1.45 - 1.47

Fix kernel symbols for multiboot2
src/sys/arch/i386/stand/lib/exec_multiboot2.c 1.2 - 1.3

Revision 1.822 / (download) - annotate - [select for diffs], Fri Oct 18 01:00:24 2019 UTC (4 years, 5 months ago) by manu
Branch: MAIN
Changes since 1.821: +12 -5 lines
Diff to previous 1.821 (colored)

Make sure no bioscall is issued when booting off UEFI system

Revision 1.821 / (download) - annotate - [select for diffs], Sat Oct 12 06:31:03 2019 UTC (4 years, 6 months ago) by maxv
Branch: MAIN
Changes since 1.820: +3 -13 lines
Diff to previous 1.820 (colored)

Rewrite the FPU code on x86. This greatly simplifies the logic and removes
the dependency on IPL_HIGH. NVMM is updated accordingly. Posted on
port-amd64 a week ago.

Bump the kernel version to 9.99.16.

Revision 1.806.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:06:20 2019 UTC (4 years, 10 months ago) by christos
Branch: phil-wifi
Changes since 1.806: +81 -113 lines
Diff to previous 1.806 (colored)

Sync with HEAD

Revision 1.820 / (download) - annotate - [select for diffs], Sun May 19 08:46:15 2019 UTC (4 years, 10 months ago) by maxv
Branch: MAIN
CVS Tags: phil-wifi-20190609, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9
Changes since 1.819: +4 -4 lines
Diff to previous 1.819 (colored)

Rename

	fpu_save_area_clear -> fpu_clear
	fpu_save_area_reset -> fpu_sigreset

Clearer, and reduces a future diff. No real functional change.

Revision 1.819 / (download) - annotate - [select for diffs], Sun May 19 08:17:02 2019 UTC (4 years, 10 months ago) by maxv
Branch: MAIN
Changes since 1.818: +7 -8 lines
Diff to previous 1.818 (colored)

Misc changes in the x86 FPU code. Reduces a future diff. No real functional
change.

Revision 1.818 / (download) - annotate - [select for diffs], Sat Mar 9 08:42:25 2019 UTC (5 years, 1 month ago) by maxv
Branch: MAIN
CVS Tags: isaki-audio2-base, isaki-audio2
Changes since 1.817: +4 -4 lines
Diff to previous 1.817 (colored)

Start replacing the x86 PTE bits.

Revision 1.817 / (download) - annotate - [select for diffs], Thu Mar 7 13:26:24 2019 UTC (5 years, 1 month ago) by maxv
Branch: MAIN
Changes since 1.816: +3 -3 lines
Diff to previous 1.816 (colored)

Drop PG_RO, PG_KR and PG_PROT, they are useless and create confusion.

Revision 1.816 / (download) - annotate - [select for diffs], Thu Feb 14 08:18:25 2019 UTC (5 years, 1 month ago) by cherry
Branch: MAIN
Changes since 1.815: +4 -4 lines
Diff to previous 1.815 (colored)

Welcome XENPVHVM mode.

It is UP only, has xbd(4) and xennet(4) as PV drivers.

The console is com0 at isa and the native portion is very
rudimentary AT architecture, so is probably suboptimal to
run without PV support.

Revision 1.815 / (download) - annotate - [select for diffs], Mon Feb 11 14:59:32 2019 UTC (5 years, 2 months ago) by cherry
Branch: MAIN
Changes since 1.814: +46 -46 lines
Diff to previous 1.814 (colored)

We reorganise definitions for XEN source support as follows:

XEN - common sources required for baseline XEN support.
XENPV - sources required for support of XEN in PV mode.
XENPVHVM - sources required for support for XEN in HVM mode.
XENPVH - sources required for support for XEN in PVH mode.

Revision 1.752.8.3 / (download) - annotate - [select for diffs], Wed Jan 30 13:32:57 2019 UTC (5 years, 2 months ago) by martin
Branch: netbsd-7-0
Changes since 1.752.8.2: +3 -3 lines
Diff to previous 1.752.8.2 (colored) to branchpoint 1.752 (colored) next main 1.753 (colored)

Pull up following revision(s) (requested by maxv in ticket #1677):

	sys/arch/hppa/hppa/sig_machdep.c: revision 1.26
	sys/arch/arm/arm/sig_machdep.c: revision 1.51
	sys/arch/i386/i386/machdep.c: revision 1.813
	sys/arch/alpha/alpha/machdep.c: revision 1.352
	sys/arch/m68k/m68k/sig_machdep.c: revision 1.50
	sys/arch/usermode/target/i386/cpu_i386.c: revision 1.8
	sys/arch/sparc64/sparc64/machdep.c: revision 1.289
	sys/arch/sparc64/sparc64/netbsd32_machdep.c: revision 1.111
	sys/arch/powerpc/powerpc/sig_machdep.c: revision 1.46
	sys/arch/amd64/amd64/netbsd32_machdep.c: revision 1.117
	sys/arch/sh3/sh3/sh3_machdep.c: revision 1.106
	sys/arch/mips/mips/netbsd32_machdep.c: revision 1.16
	sys/arch/mips/mips/sig_machdep.c: revision 1.24
	sys/arch/usermode/target/x86_64/cpu_x86_64.c: revision 1.7
	sys/arch/vax/vax/sig_machdep.c: revision 1.23

Fix widespread leak in the sendsig_siginfo() functions. sigframe_siginfo
has padding, so zero it out properly. While here I'm also zeroing out some
other things in several ports, for safety. Same problem in netbsd32, so
fix that too.

I can't compile-test on each architecture, but there should be no
breakage (tm).

Overall this fixes at least 14 info leaks. Prompted by the discovery by
KLEAK of a leak in amd64's sendsig_siginfo.

Revision 1.752.12.3 / (download) - annotate - [select for diffs], Wed Jan 30 13:29:51 2019 UTC (5 years, 2 months ago) by martin
Branch: netbsd-7-1
Changes since 1.752.12.2: +3 -3 lines
Diff to previous 1.752.12.2 (colored) to branchpoint 1.752 (colored) next main 1.753 (colored)

Pull up following revision(s) (requested by maxv in ticket #1677):

	sys/arch/hppa/hppa/sig_machdep.c: revision 1.26
	sys/arch/arm/arm/sig_machdep.c: revision 1.51
	sys/arch/i386/i386/machdep.c: revision 1.813
	sys/arch/alpha/alpha/machdep.c: revision 1.352
	sys/arch/m68k/m68k/sig_machdep.c: revision 1.50
	sys/arch/usermode/target/i386/cpu_i386.c: revision 1.8
	sys/arch/sparc64/sparc64/machdep.c: revision 1.289
	sys/arch/sparc64/sparc64/netbsd32_machdep.c: revision 1.111
	sys/arch/powerpc/powerpc/sig_machdep.c: revision 1.46
	sys/arch/amd64/amd64/netbsd32_machdep.c: revision 1.117
	sys/arch/sh3/sh3/sh3_machdep.c: revision 1.106
	sys/arch/mips/mips/netbsd32_machdep.c: revision 1.16
	sys/arch/mips/mips/sig_machdep.c: revision 1.24
	sys/arch/usermode/target/x86_64/cpu_x86_64.c: revision 1.7
	sys/arch/vax/vax/sig_machdep.c: revision 1.23

Fix widespread leak in the sendsig_siginfo() functions. sigframe_siginfo
has padding, so zero it out properly. While here I'm also zeroing out some
other things in several ports, for safety. Same problem in netbsd32, so
fix that too.

I can't compile-test on each architecture, but there should be no
breakage (tm).

Overall this fixes at least 14 info leaks. Prompted by the discovery by
KLEAK of a leak in amd64's sendsig_siginfo.

Revision 1.752.4.3 / (download) - annotate - [select for diffs], Wed Jan 30 13:27:27 2019 UTC (5 years, 2 months ago) by martin
Branch: netbsd-7
Changes since 1.752.4.2: +3 -3 lines
Diff to previous 1.752.4.2 (colored) to branchpoint 1.752 (colored) next main 1.753 (colored)

Pull up following revision(s) (requested by maxv in ticket #1677):

	sys/arch/hppa/hppa/sig_machdep.c: revision 1.26
	sys/arch/arm/arm/sig_machdep.c: revision 1.51
	sys/arch/i386/i386/machdep.c: revision 1.813
	sys/arch/alpha/alpha/machdep.c: revision 1.352
	sys/arch/m68k/m68k/sig_machdep.c: revision 1.50
	sys/arch/usermode/target/i386/cpu_i386.c: revision 1.8
	sys/arch/sparc64/sparc64/machdep.c: revision 1.289
	sys/arch/sparc64/sparc64/netbsd32_machdep.c: revision 1.111
	sys/arch/powerpc/powerpc/sig_machdep.c: revision 1.46
	sys/arch/amd64/amd64/netbsd32_machdep.c: revision 1.117
	sys/arch/sh3/sh3/sh3_machdep.c: revision 1.106
	sys/arch/mips/mips/netbsd32_machdep.c: revision 1.16
	sys/arch/mips/mips/sig_machdep.c: revision 1.24
	sys/arch/usermode/target/x86_64/cpu_x86_64.c: revision 1.7
	sys/arch/vax/vax/sig_machdep.c: revision 1.23

Fix widespread leak in the sendsig_siginfo() functions. sigframe_siginfo
has padding, so zero it out properly. While here I'm also zeroing out some
other things in several ports, for safety. Same problem in netbsd32, so
fix that too.

I can't compile-test on each architecture, but there should be no
breakage (tm).

Overall this fixes at least 14 info leaks. Prompted by the discovery by
KLEAK of a leak in amd64's sendsig_siginfo.

Revision 1.782.6.7 / (download) - annotate - [select for diffs], Sun Jan 27 18:43:08 2019 UTC (5 years, 2 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1
Changes since 1.782.6.6: +3 -3 lines
Diff to previous 1.782.6.6 (colored) to branchpoint 1.782 (colored) next main 1.783 (colored)

Pull up following revision(s) (requested by maxv in ticket #1173):
	sys/arch/hppa/hppa/sig_machdep.c: revision 1.26
	sys/arch/arm/arm/sig_machdep.c: revision 1.51
	sys/arch/i386/i386/machdep.c: revision 1.813
	sys/arch/alpha/alpha/machdep.c: revision 1.352
	sys/arch/m68k/m68k/sig_machdep.c: revision 1.50
	sys/arch/usermode/target/i386/cpu_i386.c: revision 1.8
	sys/arch/sparc64/sparc64/machdep.c: revision 1.289
	sys/arch/sparc64/sparc64/netbsd32_machdep.c: revision 1.111
	sys/arch/powerpc/powerpc/sig_machdep.c: revision 1.46
	sys/arch/amd64/amd64/netbsd32_machdep.c: revision 1.117
	sys/arch/sh3/sh3/sh3_machdep.c: revision 1.106
	sys/arch/mips/mips/netbsd32_machdep.c: revision 1.16
	sys/arch/mips/mips/sig_machdep.c: revision 1.24
	sys/arch/riscv/riscv/sig_machdep.c: revision 1.2
	sys/arch/usermode/target/x86_64/cpu_x86_64.c: revision 1.7
	sys/arch/vax/vax/sig_machdep.c: revision 1.23

Fix widespread leak in the sendsig_siginfo() functions. sigframe_siginfo
has padding, so zero it out properly. While here I'm also zeroing out some
other things in several ports, for safety. Same problem in netbsd32, so
fix that too.

I can't compile-test on each architecture, but there should be no
breakage (tm).

Overall this fixes at least 14 info leaks. Prompted by the discovery by
KLEAK of a leak in amd64's sendsig_siginfo.

Revision 1.803.2.6 / (download) - annotate - [select for diffs], Wed Dec 26 14:01:38 2018 UTC (5 years, 3 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.803.2.5: +3 -4 lines
Diff to previous 1.803.2.5 (colored) to branchpoint 1.803 (colored) next main 1.804 (colored)

Sync with HEAD, resolve a few conflicts

Revision 1.814 / (download) - annotate - [select for diffs], Mon Dec 10 15:08:23 2018 UTC (5 years, 4 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226
Changes since 1.813: +2 -3 lines
Diff to previous 1.813 (colored)

Remove unused mbuf.h includes.

Revision 1.813 / (download) - annotate - [select for diffs], Tue Nov 27 14:09:53 2018 UTC (5 years, 4 months ago) by maxv
Branch: MAIN
Changes since 1.812: +3 -3 lines
Diff to previous 1.812 (colored)

Fix widespread leak in the sendsig_siginfo() functions. sigframe_siginfo
has padding, so zero it out properly. While here I'm also zeroing out some
other things in several ports, for safety. Same problem in netbsd32, so
fix that too.

I can't compile-test on each architecture, but there should be no
breakage (tm).

Overall this fixes at least 14 info leaks. Prompted by the discovery by
KLEAK of a leak in amd64's sendsig_siginfo.

Revision 1.803.2.5 / (download) - annotate - [select for diffs], Sat Oct 20 06:58:28 2018 UTC (5 years, 5 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.803.2.4: +3 -3 lines
Diff to previous 1.803.2.4 (colored) to branchpoint 1.803 (colored)

Sync with head

Revision 1.812 / (download) - annotate - [select for diffs], Thu Oct 18 04:22:22 2018 UTC (5 years, 5 months ago) by cherry
Branch: MAIN
CVS Tags: pgoyette-compat-1126, pgoyette-compat-1020
Changes since 1.811: +3 -3 lines
Diff to previous 1.811 (colored)

Use memory allocated for the ldt, not the idt.

This must have been a typo that we got away with because we were not
using the idt[] so far.

This fix should now allow -current i386 XEN to boot, as before.

Revision 1.803.2.4 / (download) - annotate - [select for diffs], Sun Sep 30 01:45:44 2018 UTC (5 years, 6 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.803.2.3: +30 -52 lines
Diff to previous 1.803.2.3 (colored) to branchpoint 1.803 (colored)

Ssync with HEAD

Revision 1.811 / (download) - annotate - [select for diffs], Sat Sep 29 07:00:20 2018 UTC (5 years, 6 months ago) by cherry
Branch: MAIN
CVS Tags: pgoyette-compat-0930
Changes since 1.810: +4 -4 lines
Diff to previous 1.810 (colored)

Fix "use before init" of *idt.
This should fix boot time pagefaulting and panic(9)
on XEN kernels due to the boottime idt API reorg.

Revision 1.810 / (download) - annotate - [select for diffs], Sun Sep 23 15:28:48 2018 UTC (5 years, 6 months ago) by cherry
Branch: MAIN
Changes since 1.809: +7 -6 lines
Diff to previous 1.809 (colored)

Fix for i386, functionality intended in:
http://mail-index.netbsd.org/source-changes/2018/09/23/msg099357.html

This should fix the build for both GENERIC and XEN3PAE_DOM0

This has not been boot tested on native or xen3pae

Notes: pmap_changeprot_local() seems to be x86_64 only.
I was a bit surprised by this initially, but I suspect that the table
protections are enforced via ring0/ring1 fencing rather than page protections

the gdt registration code in i386 is still messy. I will leave it as is
for now - to avoid a rabbit hole.

Revision 1.809 / (download) - annotate - [select for diffs], Sun Sep 23 00:59:59 2018 UTC (5 years, 6 months ago) by cherry
Branch: MAIN
Changes since 1.808: +27 -50 lines
Diff to previous 1.808 (colored)

Make XEN use the same api as native, for idt vector allocation
and registration.

lidt() placed in xenfunc() on maxv@ suggestion.

There should be no functional change due to this commit.

Tested on amd64 native and XEN.

Revision 1.803.2.3 / (download) - annotate - [select for diffs], Sat Jul 28 04:37:34 2018 UTC (5 years, 8 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.803.2.2: +5 -13 lines
Diff to previous 1.803.2.2 (colored) to branchpoint 1.803 (colored)

Sync with HEAD

Revision 1.808 / (download) - annotate - [select for diffs], Thu Jul 26 09:29:08 2018 UTC (5 years, 8 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-0906, pgoyette-compat-0728
Changes since 1.807: +4 -8 lines
Diff to previous 1.807 (colored)

Rework dbregs, to switch the registers during context switches, and not on
each user->kernel transition via userret. Reloads of DR6/DR7 are expensive
on both native and xen.

Revision 1.807 / (download) - annotate - [select for diffs], Sun Jul 22 15:02:51 2018 UTC (5 years, 8 months ago) by maxv
Branch: MAIN
Changes since 1.806: +4 -8 lines
Diff to previous 1.806 (colored)

Clean up dbregs; remove useless comments, remove arguments from prototypes,
style, add KASSERT and move x86_dbregspl into dbregs.c. No real functional
change.

Revision 1.782.6.6 / (download) - annotate - [select for diffs], Sat Jun 9 15:12:21 2018 UTC (5 years, 10 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-0-RELEASE, netbsd-8-0-RC2
Changes since 1.782.6.5: +5 -2 lines
Diff to previous 1.782.6.5 (colored) to branchpoint 1.782 (colored)

Pullup the following revisions, requested by maxv in ticket #865:

	sys/arch/amd64/amd64/machdep.c		1.303 (patch)
	sys/arch/amd64/conf/GENERIC		1.492 (patch)
	sys/arch/amd64/conf/files.amd64		1.103 (patch)
	sys/arch/i386/i386/machdep.c		1.806 (patch)
	sys/arch/i386/conf/GENERIC		1.1179 (patch)
	sys/arch/i386/conf/files.i386		1.393 (patch)
	sys/arch/x86/include/cpu.h		1.91 (patch)
	sys/arch/x86/include/specialreg.h	upto 1.126 (patch)
	sys/arch/x86/x86/x86_machdep.c		upto 1.115 (patch, adapted)
	sys/arch/x86/x86/spectre.c		upto 1.19 (patch, adapted,
						no IBRS,
						SpectreV2 mitigations not
						enabled	by default)

Backport the hardware SpectreV2 and SpectreV4 mitigations.

Revision 1.803.2.2 / (download) - annotate - [select for diffs], Sat Apr 7 04:12:13 2018 UTC (6 years ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.803.2.1: +7 -4 lines
Diff to previous 1.803.2.1 (colored) to branchpoint 1.803 (colored)

Sync with HEAD.  77 conflicts resolved - all of them $NetBSD$

Revision 1.782.6.5 / (download) - annotate - [select for diffs], Thu Apr 5 18:15:02 2018 UTC (6 years ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-0-RC1
Changes since 1.782.6.4: +4 -4 lines
Diff to previous 1.782.6.4 (colored) to branchpoint 1.782 (colored)

Pull up following revision(s) (requested by christos in ticket #696):

	sys/arch/amd64/amd64/vector.S: revision 1.62 (patch)
	sys/arch/x86/include/intr.h: revision 1.55
	sys/arch/i386/i386/vector.S: revision 1.77
	sys/arch/i386/i386/db_interface.c: revision 1.82 (patch)
	sys/arch/amd64/amd64/spl.S: revision 1.34 (patch)
	sys/arch/amd64/amd64/db_interface.c: revision 1.33 (patch)
	sys/arch/x86/x86/intr.c: revision 1.125
	sys/arch/i386/i386/spl.S: revision 1.43 (patch)
	sys/arch/i386/i386/machdep.c: revision 1.805 (patch)
	sys/arch/x86/x86/lapic.c: revision 1.66 (patch)

Rename the DDB IPI IDT vectors for consistency. ok maxv@

Rename Xpreempt{recurse,resume} -> X{recurse,resume}_preempt so that
they fit the pattern. Also the debugger trap sniffer matches them
without adding special entries...

XXX: pullup-8.

Revision 1.806 / (download) - annotate - [select for diffs], Thu Apr 5 08:43:07 2018 UTC (6 years ago) by maxv
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407
Branch point for: phil-wifi
Changes since 1.805: +5 -2 lines
Diff to previous 1.805 (colored)

Call cpu_speculation_init on i386 too. We don't have IBRS for i386, but
we do have the AMD DIS_IND method.

Revision 1.805 / (download) - annotate - [select for diffs], Tue Apr 3 07:20:52 2018 UTC (6 years ago) by christos
Branch: MAIN
Changes since 1.804: +4 -4 lines
Diff to previous 1.804 (colored)

Rename the DDB IPI IDT vectors for consistency. ok maxv@

Revision 1.803.2.1 / (download) - annotate - [select for diffs], Thu Mar 22 01:44:45 2018 UTC (6 years ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.803: +2 -12 lines
Diff to previous 1.803 (colored)

Synch with HEAD, resolve conflicts

Revision 1.804 / (download) - annotate - [select for diffs], Fri Mar 16 12:48:54 2018 UTC (6 years ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-0330, pgoyette-compat-0322
Changes since 1.803: +2 -12 lines
Diff to previous 1.803 (colored)

Remove ipkdb from i386. Also remove unused references in amd64.

I already talked about doing that six months ago on port-i386@. Back then
it was as general cleanup, but now, with SVS etc, we do actually have
good reasons for simplifying the entry points.

Ok kamil@. (christos@ was in the conversation too)

Revision 1.782.6.4 / (download) - annotate - [select for diffs], Tue Mar 13 15:47:45 2018 UTC (6 years, 1 month ago) by martin
Branch: netbsd-8
Changes since 1.782.6.3: +25 -15 lines
Diff to previous 1.782.6.3 (colored) to branchpoint 1.782 (colored)

Pullup the following revisions via patch, requested by maxv in ticket #629:

	sys/arch/amd64/amd64/genassym.cf		1.63,1.64
	sys/arch/amd64/amd64/locore.S			1.144
	sys/arch/amd64/amd64/machdep.c			1.281-1.283
	sys/arch/i386/i386/genassym.cf			1.105-1.106
	sys/arch/i386/i386/locore.S			1.155
	sys/arch/i386/i386/machdep.c			1.802 (adapted),1.803
	sys/arch/x86/include/cpu.h			1.85
	sys/arch/x86/x86/intr.c				1.115-1.116
	sys/arch/x86/x86/pmap.c				1.275
	sys/arch/x86/x86/sys_machdep.c			1.45
	sys/arch/xen/x86/cpu.c				1.117

Stop sharing the double-fault stack.
Merge the TSS structures into one single cpu_tss structure, and
allocate it dynamically.

Revision 1.782.6.3 / (download) - annotate - [select for diffs], Thu Mar 8 11:33:15 2018 UTC (6 years, 1 month ago) by martin
Branch: netbsd-8
Changes since 1.782.6.2: +74 -4 lines
Diff to previous 1.782.6.2 (colored) to branchpoint 1.782 (colored)

Pull up following revision(s) (requested by maxv in ticket #611):
	sys/arch/x86/x86/cpu.c: revision 1.134 (patch)
	sys/arch/x86/include/cpu.h: revision 1.78 (patch)
	sys/arch/i386/i386/machdep.c: revision 1.792 (patch)

style, and move some i386-specific code into i386/

Revision 1.717.2.7.4.2 / (download) - annotate - [select for diffs], Mon Feb 19 20:55:44 2018 UTC (6 years, 1 month ago) by snj
Branch: netbsd-6-0
Changes since 1.717.2.7.4.1: +3 -3 lines
Diff to previous 1.717.2.7.4.1 (colored) to branchpoint 1.717.2.7 (colored) next main 1.717.2.8 (colored)

Pull up following revision(s) (requested by maxv in ticket #1517):
	sys/arch/amd64/amd64/machdep.c: 1.280 via patch
	sys/arch/amd64/include/segments.h: 1.34 via patch
	sys/arch/i386/i386/machdep.c: 1.800
	sys/arch/i386/include/segments.h: 1.64
	sys/arch/x86/x86/vm_machdep.c: 1.30
Fix a huge privilege separation vulnerability in Xen-amd64.
On amd64 the kernel runs in ring3, like userland, and therefore SEL_KPL
equals SEL_UPL. While Xen can make a distinction between usermode and
kernelmode in %cs, it can't when it comes to iopl. Since we set SEL_KPL
in iopl, Xen sees SEL_UPL, and allows (unprivileged) userland processes
to read and write to the CPU ports.
It is easy, then, to completely escalate privileges; by reprogramming the
PIC, by reading the ATA disks, by intercepting the keyboard interrupts
(keylogger), etc.
Declare IOPL_KPL, set to 1 on Xen-amd64, which allows the kernel to use
the ports but not userland. I didn't test this change on i386, but it
seems fine enough.

Revision 1.717.2.7.6.2 / (download) - annotate - [select for diffs], Mon Feb 19 20:54:53 2018 UTC (6 years, 1 month ago) by snj
Branch: netbsd-6-1
Changes since 1.717.2.7.6.1: +3 -3 lines
Diff to previous 1.717.2.7.6.1 (colored) to branchpoint 1.717.2.7 (colored) next main 1.717.2.8 (colored)

Pull up following revision(s) (requested by maxv in ticket #1517):
	sys/arch/amd64/amd64/machdep.c: 1.280 via patch
	sys/arch/amd64/include/segments.h: 1.34 via patch
	sys/arch/i386/i386/machdep.c: 1.800
	sys/arch/i386/include/segments.h: 1.64
	sys/arch/x86/x86/vm_machdep.c: 1.30
Fix a huge privilege separation vulnerability in Xen-amd64.
On amd64 the kernel runs in ring3, like userland, and therefore SEL_KPL
equals SEL_UPL. While Xen can make a distinction between usermode and
kernelmode in %cs, it can't when it comes to iopl. Since we set SEL_KPL
in iopl, Xen sees SEL_UPL, and allows (unprivileged) userland processes
to read and write to the CPU ports.
It is easy, then, to completely escalate privileges; by reprogramming the
PIC, by reading the ATA disks, by intercepting the keyboard interrupts
(keylogger), etc.
Declare IOPL_KPL, set to 1 on Xen-amd64, which allows the kernel to use
the ports but not userland. I didn't test this change on i386, but it
seems fine enough.

Revision 1.717.2.9 / (download) - annotate - [select for diffs], Mon Feb 19 20:54:38 2018 UTC (6 years, 1 month ago) by snj
Branch: netbsd-6
Changes since 1.717.2.8: +3 -3 lines
Diff to previous 1.717.2.8 (colored) to branchpoint 1.717 (colored) next main 1.718 (colored)

Pull up following revision(s) (requested by maxv in ticket #1517):
	sys/arch/amd64/amd64/machdep.c: 1.280 via patch
	sys/arch/amd64/include/segments.h: 1.34 via patch
	sys/arch/i386/i386/machdep.c: 1.800
	sys/arch/i386/include/segments.h: 1.64
	sys/arch/x86/x86/vm_machdep.c: 1.30
Fix a huge privilege separation vulnerability in Xen-amd64.
On amd64 the kernel runs in ring3, like userland, and therefore SEL_KPL
equals SEL_UPL. While Xen can make a distinction between usermode and
kernelmode in %cs, it can't when it comes to iopl. Since we set SEL_KPL
in iopl, Xen sees SEL_UPL, and allows (unprivileged) userland processes
to read and write to the CPU ports.
It is easy, then, to completely escalate privileges; by reprogramming the
PIC, by reading the ATA disks, by intercepting the keyboard interrupts
(keylogger), etc.
Declare IOPL_KPL, set to 1 on Xen-amd64, which allows the kernel to use
the ports but not userland. I didn't test this change on i386, but it
seems fine enough.

Revision 1.752.4.2 / (download) - annotate - [select for diffs], Mon Jan 22 19:41:08 2018 UTC (6 years, 2 months ago) by snj
Branch: netbsd-7
CVS Tags: netbsd-7-2-RELEASE
Changes since 1.752.4.1: +3 -3 lines
Diff to previous 1.752.4.1 (colored) to branchpoint 1.752 (colored)

Pull up following revision(s) (requested by maxv in ticket #1550):
	sys/arch/amd64/amd64/machdep.c: revision 1.280 via patch
	sys/arch/amd64/include/segments.h: revision 1.34 via patch
	sys/arch/i386/i386/machdep.c: revision 1.800 via patch
	sys/arch/i386/include/segments.h: revision 1.64 via patch
	sys/arch/x86/x86/vm_machdep.c: revision 1.30 via patch
Fix a huge privilege separation vulnerability in Xen-amd64.
On amd64 the kernel runs in ring3, like userland, and therefore SEL_KPL
equals SEL_UPL. While Xen can make a distinction between usermode and
kernelmode in %cs, it can't when it comes to iopl. Since we set SEL_KPL
in iopl, Xen sees SEL_UPL, and allows (unprivileged) userland processes
to read and write to the CPU ports.
It is easy, then, to completely escalate privileges; by reprogramming the
PIC, by reading the ATA disks, by intercepting the keyboard interrupts
(keylogger), etc.
Declare IOPL_KPL, set to 1 on Xen-amd64, which allows the kernel to use
the ports but not userland. I didn't test this change on i386, but it
seems fine enough.

Revision 1.752.12.2 / (download) - annotate - [select for diffs], Mon Jan 22 19:40:58 2018 UTC (6 years, 2 months ago) by snj
Branch: netbsd-7-1
CVS Tags: netbsd-7-1-2-RELEASE
Changes since 1.752.12.1: +3 -3 lines
Diff to previous 1.752.12.1 (colored) to branchpoint 1.752 (colored)

Pull up following revision(s) (requested by maxv in ticket #1550):
	sys/arch/amd64/amd64/machdep.c: revision 1.280 via patch
	sys/arch/amd64/include/segments.h: revision 1.34 via patch
	sys/arch/i386/i386/machdep.c: revision 1.800 via patch
	sys/arch/i386/include/segments.h: revision 1.64 via patch
	sys/arch/x86/x86/vm_machdep.c: revision 1.30 via patch
Fix a huge privilege separation vulnerability in Xen-amd64.
On amd64 the kernel runs in ring3, like userland, and therefore SEL_KPL
equals SEL_UPL. While Xen can make a distinction between usermode and
kernelmode in %cs, it can't when it comes to iopl. Since we set SEL_KPL
in iopl, Xen sees SEL_UPL, and allows (unprivileged) userland processes
to read and write to the CPU ports.
It is easy, then, to completely escalate privileges; by reprogramming the
PIC, by reading the ATA disks, by intercepting the keyboard interrupts
(keylogger), etc.
Declare IOPL_KPL, set to 1 on Xen-amd64, which allows the kernel to use
the ports but not userland. I didn't test this change on i386, but it
seems fine enough.

Revision 1.752.8.2 / (download) - annotate - [select for diffs], Mon Jan 22 19:40:25 2018 UTC (6 years, 2 months ago) by snj
Branch: netbsd-7-0
Changes since 1.752.8.1: +3 -3 lines
Diff to previous 1.752.8.1 (colored) to branchpoint 1.752 (colored)

Pull up following revision(s) (requested by maxv in ticket #1550):
	sys/arch/amd64/amd64/machdep.c: revision 1.280 via patch
	sys/arch/amd64/include/segments.h: revision 1.34 via patch
	sys/arch/i386/i386/machdep.c: revision 1.800 via patch
	sys/arch/i386/include/segments.h: revision 1.64 via patch
	sys/arch/x86/x86/vm_machdep.c: revision 1.30 via patch
Fix a huge privilege separation vulnerability in Xen-amd64.
On amd64 the kernel runs in ring3, like userland, and therefore SEL_KPL
equals SEL_UPL. While Xen can make a distinction between usermode and
kernelmode in %cs, it can't when it comes to iopl. Since we set SEL_KPL
in iopl, Xen sees SEL_UPL, and allows (unprivileged) userland processes
to read and write to the CPU ports.
It is easy, then, to completely escalate privileges; by reprogramming the
PIC, by reading the ATA disks, by intercepting the keyboard interrupts
(keylogger), etc.
Declare IOPL_KPL, set to 1 on Xen-amd64, which allows the kernel to use
the ports but not userland. I didn't test this change on i386, but it
seems fine enough.

Revision 1.803 / (download) - annotate - [select for diffs], Sat Jan 13 14:12:57 2018 UTC (6 years, 3 months ago) by bouyer
Branch: MAIN
CVS Tags: pgoyette-compat-base, pgoyette-compat-0315
Branch point for: pgoyette-compat
Changes since 1.802: +8 -4 lines
Diff to previous 1.802 (colored)

Xen now needs cpu_init_tss() too. Makes XEN3PAE_DOMU boot again.

Revision 1.802 / (download) - annotate - [select for diffs], Thu Jan 4 13:36:30 2018 UTC (6 years, 3 months ago) by maxv
Branch: MAIN
Changes since 1.801: +17 -12 lines
Diff to previous 1.801 (colored)

Allocate the TSS area dynamically. This way cpu_info and cpu_tss can be
put in separate pages.

Revision 1.801 / (download) - annotate - [select for diffs], Thu Jan 4 12:34:15 2018 UTC (6 years, 3 months ago) by maxv
Branch: MAIN
Changes since 1.800: +7 -7 lines
Diff to previous 1.800 (colored)

Group the different TSSes into a cpu_tss structure. And pack this
structure to make sure there is no padding between 'tss' and 'iomap'.

Revision 1.782.6.2 / (download) - annotate - [select for diffs], Mon Jan 1 19:09:03 2018 UTC (6 years, 3 months ago) by snj
Branch: netbsd-8
Changes since 1.782.6.1: +3 -3 lines
Diff to previous 1.782.6.1 (colored) to branchpoint 1.782 (colored)

Pull up following revision(s) (requested by maxv in ticket #477):
	sys/arch/amd64/amd64/machdep.c: revision 1.280
	sys/arch/amd64/include/segments.h: revision 1.34
	sys/arch/i386/i386/machdep.c: revision 1.800
	sys/arch/i386/include/segments.h: revision 1.64 via patch
	sys/arch/x86/x86/vm_machdep.c: revision 1.30
Fix a huge privilege separation vulnerability in Xen-amd64.
On amd64 the kernel runs in ring3, like userland, and therefore SEL_KPL
equals SEL_UPL. While Xen can make a distinction between usermode and
kernelmode in %cs, it can't when it comes to iopl. Since we set SEL_KPL
in iopl, Xen sees SEL_UPL, and allows (unprivileged) userland processes
to read and write to the CPU ports.
It is easy, then, to completely escalate privileges; by reprogramming the
PIC, by reading the ATA disks, by intercepting the keyboard interrupts
(keylogger), etc.
Declare IOPL_KPL, set to 1 on Xen-amd64, which allows the kernel to use
the ports but not userland. I didn't test this change on i386, but it
seems fine enough.

Revision 1.800 / (download) - annotate - [select for diffs], Sun Dec 31 08:29:38 2017 UTC (6 years, 3 months ago) by maxv
Branch: MAIN
Changes since 1.799: +3 -3 lines
Diff to previous 1.799 (colored)

Fix a huge privilege separation vulnerability in Xen-amd64.

On amd64 the kernel runs in ring3, like userland, and therefore SEL_KPL
equals SEL_UPL. While Xen can make a distinction between usermode and
kernelmode in %cs, it can't when it comes to iopl. Since we set SEL_KPL
in iopl, Xen sees SEL_UPL, and allows (unprivileged) userland processes
to read and write to the CPU ports.

It is easy, then, to completely escalate privileges; by reprogramming the
PIC, by reading the ATA disks, by intercepting the keyboard interrupts
(keylogger), etc.

Declare IOPL_KPL, set to 1 on Xen-amd64, which allows the kernel to use
the ports but not userland. I didn't test this change on i386, but it
seems fine enough.

Revision 1.730.2.4 / (download) - annotate - [select for diffs], Sun Dec 3 11:36:17 2017 UTC (6 years, 4 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.730.2.3: +306 -346 lines
Diff to previous 1.730.2.3 (colored) next main 1.731 (colored)

update from HEAD

Revision 1.799 / (download) - annotate - [select for diffs], Sat Nov 11 12:51:06 2017 UTC (6 years, 5 months ago) by maxv
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202
Changes since 1.798: +20 -13 lines
Diff to previous 1.798 (colored)

Modify the layout of the bootspace structure, in such a way that it can
contain several kernel segments of the same type (eg several .text
segments). Some parts are still a bit messy but will be cleaned up soon.

I cannot compile-test this change on i386, but it seems fine enough.

NOTE: you need to rebuild and reinstall a new prekern after this change.

Revision 1.798 / (download) - annotate - [select for diffs], Sat Nov 4 08:50:47 2017 UTC (6 years, 5 months ago) by cherry
Branch: MAIN
Changes since 1.797: +4 -2 lines
Diff to previous 1.797 (colored)

In XEN PV, the idt vector table is not required to be altered at
runtime, since only entries for exceptions/traps are registered with
the hypervisor and interrupts are managed via a completely different
mechanism.

This change uses the idt_vec_reserve() mechanism nevertheless,
modifying it slightly to only do namespace management in XEN, while on
native it will continue to do idt entry init as before.

Rationale: Consistent API usage and potential future merging of
XEN/non-XEN code.

There are no functional changes in this commit.

Revision 1.797 / (download) - annotate - [select for diffs], Sun Oct 29 10:01:21 2017 UTC (6 years, 5 months ago) by maxv
Branch: MAIN
Changes since 1.796: +4 -0 lines
Diff to previous 1.796 (colored)

Add a fifth region, called "head". On kaslr kernels it contains the ELF
Header and the ELF Section Headers. On normal kernels it is empty (the
headers are in the "boot" region).

Note: if you're using GENERIC_KASLR, you also need to rebuild the prekern.

Revision 1.796 / (download) - annotate - [select for diffs], Mon Oct 9 17:49:27 2017 UTC (6 years, 6 months ago) by maya
Branch: MAIN
Changes since 1.795: +2 -3 lines
Diff to previous 1.795 (colored)

GC i386_fpu_present. no FPU x86 is not supported.

Also delete newly unused send_sigill

Revision 1.795 / (download) - annotate - [select for diffs], Sat Sep 30 11:43:57 2017 UTC (6 years, 6 months ago) by maxv
Branch: MAIN
Changes since 1.794: +50 -51 lines
Diff to previous 1.794 (colored)

Add a bootspace structure. It describes the physical and virtual space
layout created by the early kernel bootstrap code. Start using it, and
eliminate several references to KERNBASE and other global symbols. While
here clean up xen-i386, it's really tiring.

Revision 1.794 / (download) - annotate - [select for diffs], Sun Sep 17 09:41:35 2017 UTC (6 years, 6 months ago) by maxv
Branch: MAIN
Changes since 1.793: +3 -3 lines
Diff to previous 1.793 (colored)

Remove the second argument from USERMODE and KERNELMODE, it is unused
now that we don't have vm86 anymore.

Revision 1.793 / (download) - annotate - [select for diffs], Sun Sep 17 09:04:51 2017 UTC (6 years, 6 months ago) by maxv
Branch: MAIN
Changes since 1.792: +2 -9 lines
Diff to previous 1.792 (colored)

Remove TRAPLOG from i386. Nowadays there are better instrumentation tools,
in both software and hardware.

Revision 1.752.6.7 / (download) - annotate - [select for diffs], Mon Aug 28 17:51:40 2017 UTC (6 years, 7 months ago) by skrll
Branch: nick-nhusb
Changes since 1.752.6.6: +88 -139 lines
Diff to previous 1.752.6.6 (colored) to branchpoint 1.752 (colored) next main 1.753 (colored)

Sync with HEAD

Revision 1.792 / (download) - annotate - [select for diffs], Sun Aug 27 09:32:12 2017 UTC (6 years, 7 months ago) by maxv
Branch: MAIN
Changes since 1.791: +76 -4 lines
Diff to previous 1.791 (colored)

style, and move some i386-specific code into i386/

Revision 1.791 / (download) - annotate - [select for diffs], Sat Aug 12 19:06:23 2017 UTC (6 years, 8 months ago) by kre
Branch: MAIN
CVS Tags: nick-nhusb-base-20170825
Changes since 1.790: +2 -3 lines
Diff to previous 1.790 (colored)


Remove what is now an unused variable.   One less build issue...

Revision 1.790 / (download) - annotate - [select for diffs], Sat Aug 12 13:16:14 2017 UTC (6 years, 8 months ago) by maxv
Branch: MAIN
Changes since 1.789: +2 -4 lines
Diff to previous 1.789 (colored)

Remove references to PSL_VM (implicitly vm86).

Revision 1.789 / (download) - annotate - [select for diffs], Sat Aug 12 07:07:53 2017 UTC (6 years, 8 months ago) by maxv
Branch: MAIN
Changes since 1.788: +20 -54 lines
Diff to previous 1.788 (colored)

Remove vm86. Simplifies a number of critical places.

Pass 2.

Revision 1.788 / (download) - annotate - [select for diffs], Thu Aug 10 12:49:11 2017 UTC (6 years, 8 months ago) by maxv
Branch: MAIN
Changes since 1.787: +2 -3 lines
Diff to previous 1.787 (colored)

Don't include opt_compat_ibcs2.h. No idea what it was doing in amd64,
since it never got implemented there.

Revision 1.717.2.8 / (download) - annotate - [select for diffs], Tue Aug 8 12:00:35 2017 UTC (6 years, 8 months ago) by martin
Branch: netbsd-6
Changes since 1.717.2.7: +2 -7 lines
Diff to previous 1.717.2.7 (colored) to branchpoint 1.717 (colored)

Pull up following revision(s) (requested by maxv in ticket #1464):

	sys/arch/i386/i386/trap.c:     revision 1.288		(patch)
	sys/arch/i386/i386/machdep.c:  revision 1.783		(patch)
	sys/arch/i386/i386/locore.S:   revision 1.146		(patch)
	sys/arch/amd64/amd64/locore.S: revision 1.122,1.124	(patch)
	sys/arch/amd64/amd64/machdep.c revision 1.254		(patch)
	sys/arch/amd64/amd64/trap.c:   revision 1.95-1.96	(patch)

Remove the osyscall call gate and emulate it. There is a
one-instruction race in it that could panic the kernel.

Restore the ability to run netbsd 1.0 32-bit executables by checking
for the relevant lcall instruction in the trap handler and treating it
as a syscall.

Revision 1.717.2.7.6.1 / (download) - annotate - [select for diffs], Tue Aug 8 11:59:16 2017 UTC (6 years, 8 months ago) by martin
Branch: netbsd-6-1
Changes since 1.717.2.7: +2 -7 lines
Diff to previous 1.717.2.7 (colored)

Pull up following revision(s) (requested by maxv in ticket #1464):

	sys/arch/i386/i386/trap.c:     revision 1.288		(patch)
	sys/arch/i386/i386/machdep.c:  revision 1.783		(patch)
	sys/arch/i386/i386/locore.S:   revision 1.146		(patch)
	sys/arch/amd64/amd64/locore.S: revision 1.122,1.124	(patch)
	sys/arch/amd64/amd64/machdep.c revision 1.254		(patch)
	sys/arch/amd64/amd64/trap.c:   revision 1.95-1.96	(patch)

Remove the osyscall call gate and emulate it. There is a
one-instruction race in it that could panic the kernel.

Restore the ability to run netbsd 1.0 32-bit executables by checking
for the relevant lcall instruction in the trap handler and treating it
as a syscall.

Revision 1.717.2.7.4.1 / (download) - annotate - [select for diffs], Tue Aug 8 11:55:20 2017 UTC (6 years, 8 months ago) by martin
Branch: netbsd-6-0
Changes since 1.717.2.7: +2 -7 lines
Diff to previous 1.717.2.7 (colored)

Pull up following revision(s) (requested by maxv in ticket #1464):

	sys/arch/i386/i386/trap.c:     revision 1.288		(patch)
	sys/arch/i386/i386/machdep.c:  revision 1.783		(patch)
	sys/arch/i386/i386/locore.S:   revision 1.146		(patch)
	sys/arch/amd64/amd64/locore.S: revision 1.122,1.124	(patch)
	sys/arch/amd64/amd64/machdep.c revision 1.254		(patch)
	sys/arch/amd64/amd64/trap.c:   revision 1.95-1.96	(patch)

Remove the osyscall call gate and emulate it. There is a
one-instruction race in it that could panic the kernel.

Restore the ability to run netbsd 1.0 32-bit executables by checking
for the relevant lcall instruction in the trap handler and treating it
as a syscall.

Revision 1.787 / (download) - annotate - [select for diffs], Sat Jul 29 11:54:14 2017 UTC (6 years, 8 months ago) by maxv
Branch: MAIN
Changes since 1.786: +2 -16 lines
Diff to previous 1.786 (colored)

Drop support for svr4 on i386. This feature is not maintained, not
reliable, and of a limited use case. Most svr4 applications got time to be
ported to linux, and we do have a functional, maintained linux emulation.

Reduces the number of entry points into the kernel, the number of
places that need special care (cpu context).

Note that compat_svr4 is still available on sparc.

Revision 1.786 / (download) - annotate - [select for diffs], Sat Jul 29 06:29:32 2017 UTC (6 years, 8 months ago) by maxv
Branch: MAIN
Changes since 1.785: +2 -10 lines
Diff to previous 1.785 (colored)

Remove the remaining parts of compat_oldboot.

Revision 1.785 / (download) - annotate - [select for diffs], Sat Jul 22 09:01:46 2017 UTC (6 years, 8 months ago) by maxv
Branch: MAIN
Changes since 1.784: +6 -5 lines
Diff to previous 1.784 (colored)

Call _proc0_tss_ldt_init only once, and rename them.

Revision 1.784 / (download) - annotate - [select for diffs], Sat Jul 22 08:23:18 2017 UTC (6 years, 8 months ago) by maxv
Branch: MAIN
Changes since 1.783: +5 -9 lines
Diff to previous 1.783 (colored)

Initialize these kpm fields in pmap_bootstrap.

Revision 1.752.4.1 / (download) - annotate - [select for diffs], Thu Jul 20 01:43:40 2017 UTC (6 years, 8 months ago) by snj
Branch: netbsd-7
Changes since 1.752: +2 -7 lines
Diff to previous 1.752 (colored)

Pull up following revision(s) (requested by maxv in ticket #1441):
	sys/arch/i386/i386/trap.c: revision 1.288 via patch
	sys/arch/i386/i386/machdep.c: revision 1.783 via patch
	sys/arch/i386/i386/locore.S: revision 1.146 via patch
	sys/arch/amd64/amd64/locore.S: revision 1.124 via patch
Remove the osyscall call gate on i386, and emulate it. There is a one-
instruction race in it that could panic the kernel.

Revision 1.752.12.1 / (download) - annotate - [select for diffs], Thu Jul 20 01:43:10 2017 UTC (6 years, 8 months ago) by snj
Branch: netbsd-7-1
CVS Tags: netbsd-7-1-1-RELEASE
Changes since 1.752: +2 -7 lines
Diff to previous 1.752 (colored)

Pull up following revision(s) (requested by maxv in ticket #1441):
	sys/arch/i386/i386/trap.c: revision 1.288 via patch
	sys/arch/i386/i386/machdep.c: revision 1.783 via patch
	sys/arch/i386/i386/locore.S: revision 1.146 via patch
	sys/arch/amd64/amd64/locore.S: revision 1.124 via patch
Remove the osyscall call gate on i386, and emulate it. There is a one-
instruction race in it that could panic the kernel.

Revision 1.752.8.1 / (download) - annotate - [select for diffs], Thu Jul 20 01:42:39 2017 UTC (6 years, 8 months ago) by snj
Branch: netbsd-7-0
Changes since 1.752: +2 -7 lines
Diff to previous 1.752 (colored)

Pull up following revision(s) (requested by maxv in ticket #1441):
	sys/arch/i386/i386/trap.c: revision 1.288 via patch
	sys/arch/i386/i386/machdep.c: revision 1.783 via patch
	sys/arch/i386/i386/locore.S: revision 1.146 via patch
	sys/arch/amd64/amd64/locore.S: revision 1.124 via patch
Remove the osyscall call gate on i386, and emulate it. There is a one-
instruction race in it that could panic the kernel.

Revision 1.782.6.1 / (download) - annotate - [select for diffs], Wed Jul 5 19:59:29 2017 UTC (6 years, 9 months ago) by snj
Branch: netbsd-8
CVS Tags: matt-nb8-mediatek-base, matt-nb8-mediatek
Changes since 1.782: +2 -8 lines
Diff to previous 1.782 (colored)

Pull up following revision(s) (requested by maxv in ticket #88):
	sys/arch/amd64/amd64/locore.S: revision 1.124
	sys/arch/i386/i386/locore.S: revision 1.146
	sys/arch/i386/i386/machdep.c: revision 1.783
	sys/arch/i386/i386/trap.c: revision 1.288
Remove the osyscall call gate on i386, and emulate it. There is a one-
instruction race in it that could panic the kernel.

Revision 1.783 / (download) - annotate - [select for diffs], Sat Jul 1 10:44:42 2017 UTC (6 years, 9 months ago) by maxv
Branch: MAIN
CVS Tags: perseant-stdc-iso10646-base, perseant-stdc-iso10646
Changes since 1.782: +2 -8 lines
Diff to previous 1.782 (colored)

Remove the osyscall call gate on i386, and emulate it. There is a one-
instruction race in it that could panic the kernel.

Revision 1.758.2.5 / (download) - annotate - [select for diffs], Wed Apr 26 02:53:03 2017 UTC (6 years, 11 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.758.2.4: +4 -7 lines
Diff to previous 1.758.2.4 (colored) to branchpoint 1.758 (colored) next main 1.759 (colored)

Sync with HEAD

Revision 1.776.2.1 / (download) - annotate - [select for diffs], Fri Apr 21 16:53:28 2017 UTC (6 years, 11 months ago) by bouyer
Branch: bouyer-socketcan
Changes since 1.776: +66 -48 lines
Diff to previous 1.776 (colored) next main 1.777 (colored)

Sync with HEAD

Revision 1.782 / (download) - annotate - [select for diffs], Fri Mar 24 17:09:36 2017 UTC (7 years ago) by maxv
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, netbsd-8-base, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1
Branch point for: netbsd-8
Changes since 1.781: +2 -5 lines
Diff to previous 1.781 (colored)

Don't compile PMCs on Xen.

Revision 1.781 / (download) - annotate - [select for diffs], Thu Mar 23 18:08:06 2017 UTC (7 years ago) by maxv
Branch: MAIN
Changes since 1.780: +4 -4 lines
Diff to previous 1.780 (colored)

Remove PG_k completely.

Revision 1.758.2.4 / (download) - annotate - [select for diffs], Mon Mar 20 06:57:14 2017 UTC (7 years ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.758.2.3: +70 -49 lines
Diff to previous 1.758.2.3 (colored) to branchpoint 1.758 (colored)

Sync with HEAD

Revision 1.780 / (download) - annotate - [select for diffs], Thu Feb 23 03:34:22 2017 UTC (7 years, 1 month ago) by kamil
Branch: MAIN
CVS Tags: pgoyette-localcount-20170320
Changes since 1.779: +19 -6 lines
Diff to previous 1.779 (colored)

Introduce PT_GETDBREGS and PT_SETDBREGS in ptrace(2) on i386 and amd64

This interface is modeled after FreeBSD API with the usage.

This replaced previous watchpoint API. The previous one was introduced
recently in NetBSD-current and remove its spurs without any
backward-compatibility.

Design choices for Debug Register accessors:
 - exec() (TRAP_EXEC event) must remove debug registers from LWP
 - debug registers are only per-LWP, not per-process globally
 - debug registers must not be inherited after (v)forking a process
 - debug registers must not be inherited after forking a thread
 - a debugger is responsible to set global watchpoints/breakpoints with the
   debug registers, to achieve this PTRACE_LWP_CREATE/PTRACE_LWP_EXIT event
   monitoring function is designed to be used
 - debug register traps must generate SIGTRAP with si_code TRAP_DBREG
 - debugger is responsible to retrieve debug register state to distinguish
   the exact debug register trap (DR6 is Status Register on x86)
 - kernel must not remove debug register traps after triggering a trap event
   a debugger is responsible to detach this trap with appropriate PT_SETDBREGS
   call (DR7 is Control Register on x86)
 - debug registers must not be exposed in mcontext
 - userland must not be allowed to set a trap on the kernel

Implementation notes on i386 and amd64:
 - the initial state of debug register is retrieved on boot and this value is
   stored in a local copy (initdbregs), this value is used to initialize dbreg
   context after PT_GETDBREGS
 - struct dbregs is stored in pcb as a pointer and by default not initialized
 - reserved registers (DR4-DR5, DR9-DR15) are ignored

Further ideas:
 - restrict this interface with securelevel

Tested on real hardware i386 (Intel Pentium IV) and amd64 (Intel i7).

This commit enables 390 debug register ATF tests in kernel/arch/x86.
All tests are passing.

This commit does not cover netbsd32 compat code. Currently other interface
PT_GET_SIGINFO/PT_SET_SIGINFO is required in netbsd32 compat code in order to
validate reliably PT_GETDBREGS/PT_SETDBREGS.

This implementation does not cover FreeBSD specific defines in their
<x86/reg.h>: DBREG_DR7_LOCAL_ENABLE, DBREG_DR7_GLOBAL_ENABLE, DBREG_DR7_LEN_1
etc. These values tend to be reinvented by each tracer on its own. GNU
Debugger (GDB) works with NetBSD debug registers after adding this patch:

--- gdb/amd64bsd-nat.c.orig	2016-02-10 03:19:39.000000000 +0000
+++ gdb/amd64bsd-nat.c
@@ -167,6 +167,10 @@ amd64bsd_target (void)

 #ifdef HAVE_PT_GETDBREGS

+#ifndef DBREG_DRX
+#define	DBREG_DRX(d,x)	((d)->dr[(x)])
+#endif
+
 static unsigned long
 amd64bsd_dr_get (ptid_t ptid, int regnum)
 {


Another reason to stop introducing unpopular defines covering machine
specific register macros is that these value varies across generations of
the same CPU family.

GDB demo:
  (gdb) c
  Continuing.

  Watchpoint 2: traceme

  Old value = 0
  New value = 16
  main (argc=1, argv=0x7f7fff79fe30) at test.c:8
  8               printf("traceme=%d\n", traceme);

(Currently the GDB interface is not reliable due to NetBSD support bugs)

Sponsored by <The NetBSD Foundation>

Revision 1.779 / (download) - annotate - [select for diffs], Fri Feb 17 12:10:40 2017 UTC (7 years, 1 month ago) by maxv
Branch: MAIN
Changes since 1.778: +5 -2 lines
Diff to previous 1.778 (colored)

Support PMCs on multi-processor systems. Still several things to fix, but
at least it works a little. Will be improved and moved into x86/ soon.

Revision 1.752.6.6 / (download) - annotate - [select for diffs], Sun Feb 5 13:40:12 2017 UTC (7 years, 2 months ago) by skrll
Branch: nick-nhusb
Changes since 1.752.6.5: +31 -83 lines
Diff to previous 1.752.6.5 (colored) to branchpoint 1.752 (colored)

Sync with HEAD

Revision 1.778 / (download) - annotate - [select for diffs], Sun Feb 5 10:42:21 2017 UTC (7 years, 2 months ago) by maxv
Branch: MAIN
Changes since 1.777: +45 -40 lines
Diff to previous 1.777 (colored)

Rename ldt->ldtstore and gdt->gdtstore on i386. It reduces the diff with
amd64, and makes it easier to track down these variables on nxr - 'ldt'
and 'gdt' being common keywords.

Revision 1.777 / (download) - annotate - [select for diffs], Sun Jan 22 20:17:10 2017 UTC (7 years, 2 months ago) by maxv
Branch: MAIN
CVS Tags: nick-nhusb-base-20170204
Changes since 1.776: +6 -6 lines
Diff to previous 1.776 (colored)

Use xpmap_pg_nx. Not tested (due to some unrelated panic I'm getting), but
obvious enough.

Revision 1.758.2.3 / (download) - annotate - [select for diffs], Sat Jan 7 08:56:18 2017 UTC (7 years, 3 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.758.2.2: +31 -81 lines
Diff to previous 1.758.2.2 (colored) to branchpoint 1.758 (colored)

Sync with HEAD.  (Note that most of these changes are simply $NetBSD$
tag issues.)

Revision 1.776 / (download) - annotate - [select for diffs], Mon Dec 26 17:54:06 2016 UTC (7 years, 3 months ago) by cherry
Branch: MAIN
CVS Tags: pgoyette-localcount-20170107, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Changes since 1.775: +3 -55 lines
Diff to previous 1.775 (colored)

the i386 and amd64 boot time msgbuf init code is nearly identical.

Unify them into x86/x86_machdep.c:init_x86_msgbuf()

Boot tested on GENERIC (i386, amd64), XEN3_DOM0 (amd64)

Revision 1.775 / (download) - annotate - [select for diffs], Mon Dec 26 15:47:48 2016 UTC (7 years, 3 months ago) by cherry
Branch: MAIN
Changes since 1.774: +37 -21 lines
Diff to previous 1.774 (colored)

Make the msgbuf initialisation track closer to the original
pre-uvm_physseg.h one.

To see the exact changes with the original, line for line, do:

cvs rdiff -u -r1.772 -r1.775 src/sys/arch/i386/i386/machdep.c

Revision 1.774 / (download) - annotate - [select for diffs], Fri Dec 23 09:24:57 2016 UTC (7 years, 3 months ago) by maya
Branch: MAIN
Changes since 1.773: +4 -4 lines
Diff to previous 1.773 (colored)

Use PRIxPSIZE when printing psize_t.

Fixes i386 kernels build.

Revision 1.773 / (download) - annotate - [select for diffs], Fri Dec 23 07:15:27 2016 UTC (7 years, 3 months ago) by cherry
Branch: MAIN
Changes since 1.772: +21 -48 lines
Diff to previous 1.772 (colored)

"Make NetBSD great again!"

Introduce uvm_hotplug(9) to the kernel.

Many thanks, in no particular order to:

TNF, for funding the project.

Chuck Silvers - for multiple API reviews and feedback.
Nick Hudson - for testing on multiple architectures and bugfix patches.
Everyone who helped with boot testing.

KeK (http://www.kek.org.in) for hosting the primary developers.

Revision 1.772 / (download) - annotate - [select for diffs], Thu Dec 22 16:29:05 2016 UTC (7 years, 3 months ago) by bouyer
Branch: MAIN
Changes since 1.771: +5 -3 lines
Diff to previous 1.771 (colored)

Xen doens't need lapic so don't allocate a lapic VA/PA for Xen.
As a side effect this makes XEN3PAE boot again but I don't know why ...

Revision 1.771 / (download) - annotate - [select for diffs], Thu Dec 22 14:47:58 2016 UTC (7 years, 3 months ago) by cherry
Branch: MAIN
Changes since 1.770: +3 -6 lines
Diff to previous 1.770 (colored)

switch all ports to use uvm_init.c:uvm_md_init()

uvm_setpagesize() is now subsumed within this funciton.

Revision 1.770 / (download) - annotate - [select for diffs], Tue Dec 20 14:03:15 2016 UTC (7 years, 3 months ago) by maxv
Branch: MAIN
Changes since 1.769: +7 -6 lines
Diff to previous 1.769 (colored)

When the i386 port was designed, the bootstrap code needed little physical
memory, and taking it below the kernel image was fine: we had 160 free
pages, and never allocated more than 20. With amd64 however, we create a
direct map, and for this map we need a number of page table pages that is
mostly proportionate to the number of physical addresses available, which
implies that these 160 free pages may not be enough.

In particular, if the CPU does not support 1GB superpages, each 1GB chunk
of physical memory needs a 4k page in the direct map, which means that if
a machine has 160GB of ram, the bootstrap code allocates more than 160
pages, thereby overwriting the I/O mem area. If we push a little further,
if a machine has 512GB of ram, we allocate ~525 pages, and start
overwriting the kernel text, causing the system to go crazy at boot time.

Fix this moving the physical allocation area from below the kernel to above
it. avail_start is now beyond the kernel, and lowmem_rsvd indicates the
reserved low-memory pages. The area [lowmem_rsvd; IOM_BEGIN[ is
internalized into UVM, so there is no pa loss.

The only limit now is the pa of LAPIC, which is located at ~4GB of memory,
so it is perfectly fine.

This change theoretically adds va support for 512GB of ram; and it is a
prerequisite if we want to support more memory anyway.

Revision 1.769 / (download) - annotate - [select for diffs], Sat Dec 17 14:27:53 2016 UTC (7 years, 3 months ago) by maxv
Branch: MAIN
Changes since 1.768: +4 -4 lines
Diff to previous 1.768 (colored)

Put a limit in the percpu segment, so we can detect overflows on %fs.

Revision 1.768 / (download) - annotate - [select for diffs], Fri Dec 16 19:52:22 2016 UTC (7 years, 3 months ago) by maxv
Branch: MAIN
Changes since 1.767: +5 -5 lines
Diff to previous 1.767 (colored)

The way the xen dummy page is taken care of makes absolutely no sense at
all, with magic offsets here and there in different layers of the system.
It is just blind luck that everything has always worked as expected so
far.

Due to this wrong design we have a problem now: we allocate one physical
page for lapic, and it happens to overlap with the dummy page, which
causes the system to crash.

Fix this by keeping the dummy va directly in a variable instead of magic
offsets. The asm locore now increments the first pa to hide the dummy page
to machdep and pmap.

Revision 1.767 / (download) - annotate - [select for diffs], Thu Dec 15 12:04:18 2016 UTC (7 years, 3 months ago) by kamil
Branch: MAIN
Changes since 1.766: +5 -2 lines
Diff to previous 1.766 (colored)

Add support for hardware assisted watchpoints/breakpoints API in ptrace(2)

Add new ptrace(2) calls:
 - PT_COUNT_WATCHPOINTS - count the number of available hardware watchpoints
 - PT_READ_WATCHPOINT   - read struct ptrace_watchpoint from the kernel state
 - PT_WRITE_WATCHPOINT  - write new struct ptrace_watchpoint state, this
                          includes enabling and disabling watchpoints

The ptrace_watchpoint structure contains MI and MD parts:

typedef struct ptrace_watchpoint {
	int		pw_index;	/* HW Watchpoint ID (count from 0) */
	lwpid_t		pw_lwpid;	/* LWP described */
	struct mdpw	pw_md;		/* MD fields */
} ptrace_watchpoint_t;

For example amd64 defines MD as follows:
struct mdpw {
	void	*md_address;
	int	 md_condition;
	int	 md_length;
};

These calls are protected with the __HAVE_PTRACE_WATCHPOINTS guard.

Tested on amd64, initial support added for i386 and XEN.

Sponsored by <The NetBSD Foundation>

Revision 1.766 / (download) - annotate - [select for diffs], Sun Dec 11 22:38:50 2016 UTC (7 years, 4 months ago) by martin
Branch: MAIN
Changes since 1.765: +4 -2 lines
Diff to previous 1.765 (colored)

Make kernels w/o ACPICA compile.

Revision 1.765 / (download) - annotate - [select for diffs], Sun Dec 11 08:31:53 2016 UTC (7 years, 4 months ago) by maxv
Branch: MAIN
Changes since 1.764: +8 -2 lines
Diff to previous 1.764 (colored)

Kenter local_apic_va to a fake physical page, because our x86
implementation expects this va to be valid even if no lapic is present;
which probably is a bug in itself, but let's just reproduce the old
behavior and rehide that bug.

Revision 1.752.6.5 / (download) - annotate - [select for diffs], Mon Dec 5 10:54:53 2016 UTC (7 years, 4 months ago) by skrll
Branch: nick-nhusb
Changes since 1.752.6.4: +6 -4 lines
Diff to previous 1.752.6.4 (colored) to branchpoint 1.752 (colored)

Sync with HEAD

Revision 1.764 / (download) - annotate - [select for diffs], Tue Nov 15 15:00:55 2016 UTC (7 years, 4 months ago) by maxv
Branch: MAIN
CVS Tags: nick-nhusb-base-20161204
Changes since 1.763: +4 -2 lines
Diff to previous 1.763 (colored)

Initialize kern_end in amd64 instead of x86.

Revision 1.763 / (download) - annotate - [select for diffs], Fri Nov 11 11:34:51 2016 UTC (7 years, 5 months ago) by maxv
Branch: MAIN
Changes since 1.762: +4 -4 lines
Diff to previous 1.762 (colored)

Rename xen_pmap_bootstrap to xen_locore, it really has nothing to do with
pmap and is just a C version of what amd64 and i386 do in asm.

Revision 1.758.2.2 / (download) - annotate - [select for diffs], Fri Nov 4 14:49:01 2016 UTC (7 years, 5 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.758.2.1: +4 -9 lines
Diff to previous 1.758.2.1 (colored) to branchpoint 1.758 (colored)

Sync with HEAD

Revision 1.752.6.4 / (download) - annotate - [select for diffs], Wed Oct 5 20:55:28 2016 UTC (7 years, 6 months ago) by skrll
Branch: nick-nhusb
Changes since 1.752.6.3: +63 -79 lines
Diff to previous 1.752.6.3 (colored) to branchpoint 1.752 (colored)

Sync with HEAD

Revision 1.762 / (download) - annotate - [select for diffs], Sun Sep 25 12:59:19 2016 UTC (7 years, 6 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-localcount-20161104, nick-nhusb-base-20161004
Changes since 1.761: +4 -9 lines
Diff to previous 1.761 (colored)

Fix outdated comment, and #ifdef.

Revision 1.761 / (download) - annotate - [select for diffs], Sat Aug 27 16:07:26 2016 UTC (7 years, 7 months ago) by maxv
Branch: MAIN
CVS Tags: localcount-20160914
Changes since 1.760: +12 -4 lines
Diff to previous 1.760 (colored)

Map the boot IDT, GDT and LDT in three different pages on x86. It is much
better this way, and it reduces the diff between x86 and Xen. Also, zero
them properly, otherwise we might end up with garbage in several slots.

Revision 1.760 / (download) - annotate - [select for diffs], Sat Aug 27 14:19:47 2016 UTC (7 years, 7 months ago) by maxv
Branch: MAIN
Changes since 1.759: +2 -5 lines
Diff to previous 1.759 (colored)

Remove idt_init.

Revision 1.758.2.1 / (download) - annotate - [select for diffs], Tue Jul 26 03:24:17 2016 UTC (7 years, 8 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.758: +6 -21 lines
Diff to previous 1.758 (colored)

Sync with HEAD

Revision 1.759 / (download) - annotate - [select for diffs], Sat Jul 16 17:02:34 2016 UTC (7 years, 8 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-localcount-20160806, pgoyette-localcount-20160726
Changes since 1.758: +6 -21 lines
Diff to previous 1.758 (colored)

Simplify the way physical pages are internalized into the VM system on x86.
Only two functions are called now: init_x86_clusters, which initializes the
memory clusters from the bootinfo, and init_x86_vm, which inserts the pages
from the clusters into VM.

Revision 1.758 / (download) - annotate - [select for diffs], Wed Jul 13 15:53:27 2016 UTC (7 years, 9 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-localcount-base
Branch point for: pgoyette-localcount
Changes since 1.757: +8 -9 lines
Diff to previous 1.757 (colored)

Reorder some instructions, reduces the diff between amd64 and i386.

Revision 1.757 / (download) - annotate - [select for diffs], Wed Jul 13 15:39:33 2016 UTC (7 years, 9 months ago) by maxv
Branch: MAIN
Changes since 1.756: +0 -1 lines
Diff to previous 1.756 (colored)

Remove msgbuf_paddr.

Revision 1.756 / (download) - annotate - [select for diffs], Wed Jul 13 15:35:56 2016 UTC (7 years, 9 months ago) by maxv
Branch: MAIN
Changes since 1.755: +42 -41 lines
Diff to previous 1.755 (colored)

KNF

Revision 1.752.6.3 / (download) - annotate - [select for diffs], Sun May 29 08:44:17 2016 UTC (7 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.752.6.2: +4 -4 lines
Diff to previous 1.752.6.2 (colored) to branchpoint 1.752 (colored)

Sync with HEAD

Revision 1.755 / (download) - annotate - [select for diffs], Sun May 15 10:35:54 2016 UTC (7 years, 11 months ago) by maxv
Branch: MAIN
CVS Tags: nick-nhusb-base-20160907, nick-nhusb-base-20160529
Changes since 1.754: +4 -4 lines
Diff to previous 1.754 (colored)

Explicitly mention MP_TRAMPOLINE in these comments, so that NXR links them.

Revision 1.752.6.2 / (download) - annotate - [select for diffs], Sat Jun 6 14:40:00 2015 UTC (8 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.752.6.1: +11 -11 lines
Diff to previous 1.752.6.1 (colored) to branchpoint 1.752 (colored)

Sync with HEAD

Revision 1.754 / (download) - annotate - [select for diffs], Fri Apr 24 00:04:04 2015 UTC (8 years, 11 months ago) by khorben
Branch: MAIN
CVS Tags: nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606
Changes since 1.753: +6 -6 lines
Diff to previous 1.753 (colored)

Also use ACPI shutdown on Xen DOM0

No objection on port-xen@
ok gdt@

Revision 1.752.6.1 / (download) - annotate - [select for diffs], Mon Apr 6 15:17:57 2015 UTC (9 years ago) by skrll
Branch: nick-nhusb
Changes since 1.752: +4 -3 lines
Diff to previous 1.752 (colored)

Sync with HEAD

Revision 1.753 / (download) - annotate - [select for diffs], Fri Jan 23 02:52:14 2015 UTC (9 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20150406
Changes since 1.752: +4 -3 lines
Diff to previous 1.752 (colored)

whitespace

Revision 1.730.2.3 / (download) - annotate - [select for diffs], Wed Aug 20 00:03:06 2014 UTC (9 years, 7 months ago) by tls
Branch: tls-maxphys
Changes since 1.730.2.2: +43 -133 lines
Diff to previous 1.730.2.2 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.709.2.5 / (download) - annotate - [select for diffs], Thu May 22 11:39:51 2014 UTC (9 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.709.2.4: +45 -213 lines
Diff to previous 1.709.2.4 (colored) to branchpoint 1.709 (colored) next main 1.710 (colored)

sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.734.4.1 / (download) - annotate - [select for diffs], Sun May 18 17:45:12 2014 UTC (9 years, 10 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.734: +45 -135 lines
Diff to previous 1.734 (colored) next main 1.735 (colored)

sync with head

Revision 1.752 / (download) - annotate - [select for diffs], Sun Feb 23 22:36:43 2014 UTC (10 years, 1 month ago) by dsl
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, nick-nhusb-base, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE
Branch point for: nick-nhusb, netbsd-7-1, netbsd-7-0, netbsd-7
Changes since 1.751: +5 -13 lines
Diff to previous 1.751 (colored)

Avoid unnecessary (and pointless) references to pcb->pcb_savefpu.
They were all in asserts.

Revision 1.751 / (download) - annotate - [select for diffs], Sun Feb 23 12:56:40 2014 UTC (10 years, 1 month ago) by dsl
Branch: MAIN
Changes since 1.750: +2 -43 lines
Diff to previous 1.750 (colored)

Determine whether the cpu supports xsave (and hence AVX).
The result is only written to sysctl nodes at the moment.
I see:
machdep.fpu_save = 3 (implies xsaveopt)
machdep.xsave_size = 832
machdep.xsave_features = 7
Completely common up the i386 and amd64 machdep sysctl creation.

Revision 1.750 / (download) - annotate - [select for diffs], Thu Feb 20 18:19:10 2014 UTC (10 years, 1 month ago) by dsl
Branch: MAIN
Changes since 1.749: +4 -3 lines
Diff to previous 1.749 (colored)

Move the amd64 and i386 pcb to the bottom of the uarea, and move the
  kernel stack to the top.
Change the pcb layouts so that fpu save area is at the end and is
  64byte aligned ready for xsave (saving the ymm registers).
Welcome to 6.99.32

Revision 1.749 / (download) - annotate - [select for diffs], Tue Feb 18 01:00:57 2014 UTC (10 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.748: +7 -4 lines
Diff to previous 1.748 (colored)

CID 1175795:  Unused pointer value

Revision 1.748 / (download) - annotate - [select for diffs], Sat Feb 15 22:20:41 2014 UTC (10 years, 1 month ago) by dsl
Branch: MAIN
Changes since 1.747: +20 -48 lines
Diff to previous 1.747 (colored)

Load and save the fpu registers (for copies to/from userspace) using
  helper functions in arch/x86/x86/fpu.c
They (hopefully) ensure that we write to the entire buffer and don't load
  values that might cause faults in kernel.
Also zero out the 'pad' field of the i386 mcontext fp area that I think
  once contained the registers of any Weitek fpu.
  Dunno why it wasn't pasrt of the union.
Some of these copies could be removed if the code directly copied the save
  area to/from userspace addresses.

Revision 1.747 / (download) - annotate - [select for diffs], Sat Feb 15 10:11:15 2014 UTC (10 years, 1 month ago) by dsl
Branch: MAIN
Changes since 1.746: +34 -54 lines
Diff to previous 1.746 (colored)

Remove all references to MDL_USEDFPU and deferred fpu initialisation.
The cost of zeroing the save area on exec is minimal.
This stops the FP registers of a random process being used the first
  time an lwp uses the fpu.
sendsig_siginfo() and get_mcontext() now unconditionally copy the FP
registers.
I'll remove the double-copy for signal handlers soon.
get_mcontext() might have been leaking kernel memory to userspace - and
  may still do so if i386_use_fxsave is false (short copies).

Revision 1.746 / (download) - annotate - [select for diffs], Tue Feb 4 22:48:26 2014 UTC (10 years, 2 months ago) by dsl
Branch: MAIN
Changes since 1.745: +23 -15 lines
Diff to previous 1.745 (colored)

Now that the sv_xmm and sv_87 fields in the pcb are the same size as the
  hardware ones, and those in the mcontext, ptrace and core files we
  can really safely cast and copy between the types.
Remove a couple of temporary buffers and add CTASSERT()s that the sizes
  do actually match.

Revision 1.745 / (download) - annotate - [select for diffs], Sun Feb 2 22:41:20 2014 UTC (10 years, 2 months ago) by dsl
Branch: MAIN
Changes since 1.744: +2 -7 lines
Diff to previous 1.744 (colored)

Minor fpu initialisation cleanups:
Set default CR) so that the FPU is enabled (unset CR0_EM) and initialise
  i386_fpu_present to 1.
No need to call the npx trap indirectly, rename to fpunda() to match amd64.
Remove the i386_fpu_exception variable and sysctl (It used to indicate
  which irq was used for fpu exceptions, but we only support 'internal'
  now).  Hopefully no one cares.
fpuinit() now only needs to clear TS before the fninit(). Apart from the
  checks for 486SX and the 'fdiv bug' this matches the amd64 version.
Exclude fpuinit() from XEN kernels, they don't call it - which rather begs
  the question as to whether it is needed at all!

Revision 1.744 / (download) - annotate - [select for diffs], Sat Feb 1 18:57:38 2014 UTC (10 years, 2 months ago) by bouyer
Branch: MAIN
Changes since 1.743: +6 -2 lines
Diff to previous 1.743 (colored)

Stopgap measure: set i386_fpu_present to 1 for XEN.
Stop a stream of
npxintr: came from nowherenpxintr: l = 0xc17ba560, curproc = 0xc177d880, fpu_present = 0
when running some ATF tests:
http://www-soc.lip6.fr/~bouyer/NetBSD-tests/xen/HEAD/i386/201401300920Z_anita.txt

XXX this is probably still broken for native i386, at last for older CPUs.
It looks like on newer CPUs (such as the one emulated by qemu) this code path
is not used.

Revision 1.743 / (download) - annotate - [select for diffs], Sun Jan 26 19:16:17 2014 UTC (10 years, 2 months ago) by dsl
Branch: MAIN
Changes since 1.742: +8 -18 lines
Diff to previous 1.742 (colored)

Remove support for 'external' floating point units and the MS-DOS
  compatible method of handling floating point exceptions.
Make kernel support for teh fpu non-optional (486SX should still work).
Only 386 cpus support external fpu, and i386 support was removed years ago.
This means that the npx code no longer uses port 0xf0 or interupt 13.
All the "npx at isa" lines go from the configs, arch/i386/isa/npx.c
  is now mandatory for all i386 kernels.
I've renamed npxinit() to fpuinit() and npxinit_cpu() to fpuinit_cpu()
  to match the very similar amd64 functions.
The fpu of the boot cpu is now initialised by a direct call from
  cpu_configure(), this enables FP emulation for a 486SX.
  (for amd64 the cr0 values are set in locore.S and similar).
This fixes a long-standing bug in linux_setregs() - which did not
  save the fpu regsiters if they were active.
I've test booted a single cpu i386 kernel (using anita).
amd64 builds - none of teh changes should affect it.
The i386 XEN kernels build, but I'm not sure where they set cr0, and
  it might have got lost!

Revision 1.742 / (download) - annotate - [select for diffs], Sun Jan 19 14:30:37 2014 UTC (10 years, 2 months ago) by dsl
Branch: MAIN
Changes since 1.741: +6 -6 lines
Diff to previous 1.741 (colored)

Flatten the floating point register structures bu moving the
  'environment' registers into the main strcuture.
There are x87 instructions that only affect the environment, but that
  is no real excuse for all the sub-structures.
Rename fields so that there are far fewer collisions between the two
  sets of field names.

Revision 1.741 / (download) - annotate - [select for diffs], Thu Jan 9 00:57:25 2014 UTC (10 years, 3 months ago) by dholland
Branch: MAIN
Changes since 1.740: +3 -2 lines
Diff to previous 1.740 (colored)

Make the amd64 post-halt-press-a-key code match i386, and introduce
into both a message for the case where cngetc() doesn't work. If
there's no console attached, this won't accomplish anything; but if
there's a screen but no keyboard, or the keyboard's wedged, or
whatever, it might provide useful information.

Suggested back in 2009 by some stuff in PR 37924 and has been hanging
about in one of my trees ever since.

Revision 1.740 / (download) - annotate - [select for diffs], Sun Dec 8 20:45:30 2013 UTC (10 years, 4 months ago) by dsl
Branch: MAIN
Changes since 1.739: +4 -4 lines
Diff to previous 1.739 (colored)

Rename the fields of 'struct envxmm' (itself badly named) so that they
  are different from those used for the x87 fpu.
Use a union to describe the 64bit 'address' field so that it correctly
  spilt for 32bit binaries.
The freebsd emulation defined its own 'struct freebsd_env87' that the
  code just assumed matched the netbsd one.
  Since this is a hardware structure, just use the netbsd one.
This shouldn't change the binaries except that 'en_fos' used to be
  incorrectly a 32bit field.

Revision 1.739 / (download) - annotate - [select for diffs], Sun Dec 1 01:05:16 2013 UTC (10 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.738: +35 -14 lines
Diff to previous 1.738 (colored)

revert fpu/pcu changes until we figure out what's wrong; they cause random
freezes

Revision 1.738 / (download) - annotate - [select for diffs], Mon Nov 11 11:10:45 2013 UTC (10 years, 5 months ago) by joerg
Branch: MAIN
Changes since 1.737: +10 -4 lines
Diff to previous 1.737 (colored)

NetBSD 6.99.26: Switch i386 and amd64 to the x87 default control word
as initial value for new processes. This means that long double
computations get the expected 63bit mantissa. Binaries tagged as
compiled for 6.99.25 and older get the old value.

Add a simple test case to ensure that double and long double computation
are working correctly.

Revision 1.737 / (download) - annotate - [select for diffs], Fri Nov 8 03:12:48 2013 UTC (10 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.736: +3 -4 lines
Diff to previous 1.736 (colored)

fix unused variable warnings

Revision 1.736 / (download) - annotate - [select for diffs], Fri Nov 8 02:24:11 2013 UTC (10 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.735: +4 -4 lines
Diff to previous 1.735 (colored)

Fix unused variable warnings

Revision 1.735 / (download) - annotate - [select for diffs], Wed Oct 23 20:18:50 2013 UTC (10 years, 5 months ago) by drochner
Branch: MAIN
Changes since 1.734: +14 -35 lines
Diff to previous 1.734 (colored)

Use the MI "pcu" framework for bookkeeping of npx/fpu states on x86.
This reduces the amount of MD code enormously, and makes it easier
to implement support for newer CPU features which require more fpu
state, or for fpu usage by the kernel.
For access to FPU state across CPUs, an xcall kthread is used now
rather than a dedicated IPI.
No user visible changes intended.

Revision 1.730.2.2 / (download) - annotate - [select for diffs], Sun Jun 23 06:20:06 2013 UTC (10 years, 9 months ago) by tls
Branch: tls-maxphys
Changes since 1.730.2.1: +6 -84 lines
Diff to previous 1.730.2.1 (colored)

resync from head

Revision 1.734 / (download) - annotate - [select for diffs], Fri Apr 12 16:59:38 2013 UTC (11 years ago) by christos
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900
Branch point for: rmind-smpnet
Changes since 1.733: +6 -84 lines
Diff to previous 1.733 (colored)

de-duplication police arrests sysctl.

Revision 1.730.2.1 / (download) - annotate - [select for diffs], Tue Nov 20 03:01:27 2012 UTC (11 years, 4 months ago) by tls
Branch: tls-maxphys
Changes since 1.730: +3 -23 lines
Diff to previous 1.730 (colored)

Resync to 2012-11-19 00:00:00 UTC

Revision 1.709.2.4 / (download) - annotate - [select for diffs], Tue Oct 30 17:19:49 2012 UTC (11 years, 5 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.709.2.3: +5 -27 lines
Diff to previous 1.709.2.3 (colored) to branchpoint 1.709 (colored)

sync with head

Revision 1.733 / (download) - annotate - [select for diffs], Wed Oct 3 18:58:32 2012 UTC (11 years, 6 months ago) by dsl
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, agc-symver-base, agc-symver
Changes since 1.732: +3 -3 lines
Diff to previous 1.732 (colored)

Remove all references to KVM86.
It was only ever used by APMBIOS - and then only if an option was selected.
Probably didn't work well at all!

Revision 1.732 / (download) - annotate - [select for diffs], Sun Sep 30 20:54:52 2012 UTC (11 years, 6 months ago) by dsl
Branch: MAIN
Changes since 1.731: +2 -3 lines
Diff to previous 1.731 (colored)

Fix build.
I've removed 'option apmbios' so config no longer generates apmbios.h
Not to be confused with dev/apm/apmbios.h :-)

Revision 1.731 / (download) - annotate - [select for diffs], Sun Sep 30 20:19:51 2012 UTC (11 years, 6 months ago) by dsl
Branch: MAIN
Changes since 1.730: +2 -21 lines
Diff to previous 1.730 (colored)

Remove the obvious parts of i386 Advanced power management 'apm' support.
This is the code that predates ACPI, and might once have been able to
  power down some laptops.
It hasn't been compiled for ages (it isn't it i386/ALL or any other
  standard kernel) and hasn't worked for even longer.
The APM specification was made obsolete by ACPI before it was widely
  implemented.
This will allow some other, even more dubious code be removed.
Unfortunately apmbios.h is used by the world !

Revision 1.730 / (download) - annotate - [select for diffs], Fri Jul 27 22:55:29 2012 UTC (11 years, 8 months ago) by drochner
Branch: MAIN
Branch point for: tls-maxphys
Changes since 1.729: +2 -4 lines
Diff to previous 1.729 (colored)

gcc -fno-common fallout

Revision 1.729 / (download) - annotate - [select for diffs], Wed Jun 27 00:37:08 2012 UTC (11 years, 9 months ago) by jym
Branch: MAIN
Changes since 1.728: +3 -3 lines
Diff to previous 1.728 (colored)

Retire XEN_COMPAT_030001 as detailed on port-xen@:

http://mail-index.netbsd.org/port-xen/2012/06/25/msg007431.html

The xen_p2m API comes next.

ok bouyer@.
Tested on i386 PAE and amd64 (Xen 3.3 on private test bed, and
Xen 3.4 for Amazon EC2).

FWIW, Amazon always reported:

hypervisor0 at mainbus0: Xen version 3.4.3-kaos_t1micro

multiple times for Europe and US West-1, so I guess they are now at
3.4 (32 and 64 bits).

Revision 1.728 / (download) - annotate - [select for diffs], Sat Jun 2 21:36:41 2012 UTC (11 years, 10 months ago) by dsl
Branch: MAIN
Changes since 1.727: +3 -3 lines
Diff to previous 1.727 (colored)

Add some pre-processor magic to verify that the type of the data item
  passed to sysctl_createv() actually matches the declared type for
  the item itself.
In the places where the caller specifies a function and a structure
  address (typically the 'softc') an explicit (void *) cast is now needed.
Fixes bugs in sys/dev/acpi/asus_acpi.c sys/dev/bluetooth/bcsp.c
  sys/kern/vfs_bio.c sys/miscfs/syncfs/sync_subr.c and setting
  AcpiGbl_EnableAmlDebugObject.
(mostly passing the address of a uint64_t when typed as CTLTYPE_INT).
I've test built quite a few kernels, but there may be some unfixed MD
  fallout. Most likely passing &char[] to char *.
Also add CTLFLAG_UNSIGNED for unsiged decimals - not set yet.

Revision 1.714.2.6 / (download) - annotate - [select for diffs], Sat Jun 2 11:09:01 2012 UTC (11 years, 10 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.714.2.5: +27 -16 lines
Diff to previous 1.714.2.5 (colored) to branchpoint 1.714 (colored) next main 1.715 (colored)

sync to latest -current.

Revision 1.709.2.3 / (download) - annotate - [select for diffs], Wed May 23 10:07:44 2012 UTC (11 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.709.2.2: +27 -16 lines
Diff to previous 1.709.2.2 (colored) to branchpoint 1.709 (colored)

sync with head.

Revision 1.717.2.7 / (download) - annotate - [select for diffs], Mon May 21 15:25:58 2012 UTC (11 years, 10 months ago) by riz
Branch: netbsd-6
CVS Tags: netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Branch point for: netbsd-6-1, netbsd-6-0
Changes since 1.717.2.6: +27 -16 lines
Diff to previous 1.717.2.6 (colored) to branchpoint 1.717 (colored)

Pull up following revision(s) (requested by martin in ticket #274):
	sys/arch/amd64/amd64/process_machdep.c: revision 1.20
	sys/kern/sys_lwp.c: revision 1.54
	sys/arch/sparc64/sparc64/machdep.c: revision 1.267
	sys/arch/mips/mips/cpu_subr.c: revision 1.16
	sys/arch/vax/vax/machdep.c: revision 1.188
	sys/sys/lwp.h: revision 1.161
	sys/arch/sparc64/sparc64/netbsd32_machdep.c: revision 1.98
	sys/arch/alpha/alpha/machdep.c: revision 1.339
	sys/compat/sys/ucontext.h: revision 1.6
	sys/arch/hppa/hppa/hppa_machdep.c: revision 1.28
	distrib/sets/lists/tests/mi: revision 1.469
	sys/arch/powerpc/powerpc/sig_machdep.c: revision 1.42
	tests/lib/libc/sys/t_lwp_create.c: revision 1.1
	tests/lib/libc/sys/Makefile: revision 1.23
	sys/arch/arm/arm/sig_machdep.c: revision 1.42
	sys/arch/amd64/include/mcontext.h: revision 1.15
	sys/arch/amd64/amd64/machdep.c: revision 1.183
	sys/arch/sh3/sh3/sh3_machdep.c: revision 1.99
	sys/arch/i386/i386/machdep.c: revision 1.727
	sys/compat/netbsd32/netbsd32_lwp.c: revision 1.13
	sys/arch/sparc/sparc/machdep.c: revision 1.319
	sys/arch/amd64/amd64/netbsd32_machdep.c: revision 1.76
	sys/arch/m68k/m68k/sig_machdep.c: revision 1.49
	sys/sys/ucontext.h: revision 1.16
	sys/arch/mips/mips/netbsd32_machdep.c: revision 1.9
	lib/libc/sys/_lwp_create.2: revision 1.5
Calling _lwp_create() with a bogus ucontext could trigger a kernel
assertion failure (and thus a crash in DIAGNOSTIC kernels). Independently
discovered by YAMAMOTO Takashi and Joel Sing.
To avoid this, introduce a cpu_mcontext_validate() function and move all
sanity checks from cpu_setmcontext() there. Also untangle the netbsd32
compat mess slightly and add a cpu_mcontext32_validate() cousin there.
Add an exhaustive atf test case, based partly on code from Joel Sing.
Should finally fix the remaining open part of PR kern/43903.

Revision 1.727 / (download) - annotate - [select for diffs], Mon May 21 14:15:17 2012 UTC (11 years, 10 months ago) by martin
Branch: MAIN
CVS Tags: yamt-pagecache-base5, jmcneill-usbmp-base10
Changes since 1.726: +27 -16 lines
Diff to previous 1.726 (colored)

Calling _lwp_create() with a bogus ucontext could trigger a kernel
assertion failure (and thus a crash in DIAGNOSTIC kernels). Independently
discovered by YAMAMOTO Takashi and Joel Sing.

To avoid this, introduce a cpu_mcontext_validate() function and move all
sanity checks from cpu_setmcontext() there. Also untangle the netbsd32
compat mess slightly and add a cpu_mcontext32_validate() cousin there.

Add an exhaustive atf test case, based partly on code from Joel Sing.

Should finally fix the remaining open part of PR kern/43903.

Revision 1.709.2.2 / (download) - annotate - [select for diffs], Tue Apr 17 00:06:29 2012 UTC (11 years, 11 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.709.2.1: +124 -148 lines
Diff to previous 1.709.2.1 (colored) to branchpoint 1.709 (colored)

sync with head

Revision 1.717.2.6 / (download) - annotate - [select for diffs], Thu Mar 22 22:50:48 2012 UTC (12 years ago) by riz
Branch: netbsd-6
Changes since 1.717.2.5: +10 -10 lines
Diff to previous 1.717.2.5 (colored) to branchpoint 1.717 (colored)

Pull up following revision(s) (requested by mrg in ticket #126):
	sys/arch/amd64/amd64/machdep.c: revision 1.180
	sys/arch/i386/i386/machdep.c: revision 1.724
make i386 and amd64 cpu_reboot() more similar.  in particular, bring
in the unmount/sync code from i386 to amd64, and call doshutdownhooks()
for i386.  the amd64 changes avoid umass triggering an assert later
when sd@umass is trying to sync the cache.
XXX merge x86 cpu_reboot(), but there's non-trivially different still.

Revision 1.644.4.13 / (download) - annotate - [select for diffs], Wed Mar 21 21:29:31 2012 UTC (12 years ago) by jdc
Branch: netbsd-5
CVS Tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2
Changes since 1.644.4.12: +8 -12 lines
Diff to previous 1.644.4.12 (colored) to branchpoint 1.644 (colored) next main 1.645 (colored)

Apply patch (requested by bouyer in ticket #1738).

Do not special-case XEN and always use the proper selectors for %fs and %gs
in buildcontext() and setregs(). The consequence was that signal handlers
would have the wrong %fs/%gs. Found by running atf tests under Xen/i386.

Revision 1.717.2.5 / (download) - annotate - [select for diffs], Wed Mar 7 23:31:41 2012 UTC (12 years, 1 month ago) by riz
Branch: netbsd-6
Changes since 1.717.2.4: +8 -7 lines
Diff to previous 1.717.2.4 (colored) to branchpoint 1.717 (colored)

Pull up following revision(s) (requested by bouyer in ticket #93):
	sys/arch/i386/i386/machdep.c: revision 1.725
cast xen_start_info.nr_pages to paddr_t, so that ctob() won't truncate
the addresses to 32bits. Fix avail memory when allocating more than 4GB
to a XEN3PAE domU.

Revision 1.714.2.5 / (download) - annotate - [select for diffs], Tue Mar 6 18:26:37 2012 UTC (12 years, 1 month ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.714.2.4: +46 -36 lines
Diff to previous 1.714.2.4 (colored) to branchpoint 1.714 (colored)

sync to -current

Revision 1.714.2.4 / (download) - annotate - [select for diffs], Tue Mar 6 09:56:08 2012 UTC (12 years, 1 month ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.714.2.3: +27 -40 lines
Diff to previous 1.714.2.3 (colored) to branchpoint 1.714 (colored)

sync to -current

Revision 1.717.2.4 / (download) - annotate - [select for diffs], Mon Mar 5 20:18:02 2012 UTC (12 years, 1 month ago) by sborrill
Branch: netbsd-6
Changes since 1.717.2.3: +32 -9 lines
Diff to previous 1.717.2.3 (colored) to branchpoint 1.717 (colored)

Pull up the following revisions(s) (requested by bouyer in ticket #80):
	sys/arch/xen/x86/x86_xpmap.c:	revision 1.42
	sys/arch/x86/include/specialreg.h:	revision 1.56
	sys/arch/amd64/amd64/machdep.c:	revision 1.179
	sys/arch/i386/i386/locore.S:	revision 1.97
	sys/arch/i386/i386/machdep.c:	revision 1.723 via patch
	sys/arch/x86/include/cpu.h:	revision 1.49

Fix possible FPU registers corruption on context switches.
Fix type of pointers passed to some hypercalls.

Revision 1.726 / (download) - annotate - [select for diffs], Sun Mar 4 20:44:17 2012 UTC (12 years, 1 month ago) by bouyer
Branch: MAIN
CVS Tags: yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6
Changes since 1.725: +2 -6 lines
Diff to previous 1.725 (colored)

Don't try to uvm_page_physload() the tmpgdt page: this always fails because
only one physical segment is configured for Xen, and it's probably not
worth it to create a second physseg with a single page (uvm has optimisations
for the VM_PHYSSEG_MAX == 1 case)

Revision 1.725 / (download) - annotate - [select for diffs], Sun Mar 4 15:56:09 2012 UTC (12 years, 1 month ago) by bouyer
Branch: MAIN
Changes since 1.724: +8 -7 lines
Diff to previous 1.724 (colored)

cast xen_start_info.nr_pages to paddr_t, so that ctob() won't truncate
the addresses to 32bits. Fix avail memory when allocating more than 4GB
to a XEN3PAE domU.

Revision 1.714.2.3 / (download) - annotate - [select for diffs], Sun Mar 4 00:46:09 2012 UTC (12 years, 1 month ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.714.2.2: +77 -45 lines
Diff to previous 1.714.2.2 (colored) to branchpoint 1.714 (colored)

sync to latest -current.

Revision 1.724 / (download) - annotate - [select for diffs], Sat Mar 3 23:43:17 2012 UTC (12 years, 1 month ago) by mrg
Branch: MAIN
CVS Tags: jmcneill-usbmp-base4
Changes since 1.723: +10 -10 lines
Diff to previous 1.723 (colored)

make i386 and amd64 cpu_reboot() more similar.  in particular, bring
in the unmount/sync code from i386 to amd64, and call doshutdownhooks()
for i386.  the amd64 changes avoid umass triggering an assert later
when sd@umass is trying to sync the cache.

XXX merge x86 cpu_reboot(), but there's non-trivially different still.

Revision 1.723 / (download) - annotate - [select for diffs], Fri Mar 2 16:43:31 2012 UTC (12 years, 1 month ago) by bouyer
Branch: MAIN
Changes since 1.722: +32 -9 lines
Diff to previous 1.722 (colored)

Follow locore.S and move FPU handling from x86_64_switch_context() to
x86_64_tls_switch(); raise IPL to IPL_HIGH in x86_64_switch_context()
and test ci_fpcurlwp to decide to disable FPU or not.
Change the Xen i386 context switch code to be like the amd64 one.

Revision 1.717.2.3 / (download) - annotate - [select for diffs], Mon Feb 27 20:29:36 2012 UTC (12 years, 1 month ago) by riz
Branch: netbsd-6
Changes since 1.717.2.2: +2 -12 lines
Diff to previous 1.717.2.2 (colored) to branchpoint 1.717 (colored)

Pull up following revision(s) (requested by bouyer in ticket #60):
	sys/arch/i386/i386/machdep.c: revision 1.722
Do not special-case XEN and always use the proper selectors for %fs and %gs
in buildcontext() and setregs(). The consequence was that signal handlers
would have the wrong %fs/%gs. Found by running atf tests under Xen/i386.

Revision 1.722 / (download) - annotate - [select for diffs], Mon Feb 27 19:52:59 2012 UTC (12 years, 1 month ago) by bouyer
Branch: MAIN
Changes since 1.721: +2 -12 lines
Diff to previous 1.721 (colored)

Do not special-case XEN and always use the proper selectors for %fs and %gs
in buildcontext() and setregs(). The consequence was that signal handlers
would have the wrong %fs/%gs. Found by running atf tests under Xen/i386.

Revision 1.714.2.2 / (download) - annotate - [select for diffs], Fri Feb 24 09:11:29 2012 UTC (12 years, 1 month ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.714.2.1: +3 -46 lines
Diff to previous 1.714.2.1 (colored) to branchpoint 1.714 (colored)

sync to -current.

Revision 1.721 / (download) - annotate - [select for diffs], Fri Feb 24 08:06:07 2012 UTC (12 years, 1 month ago) by cherry
Branch: MAIN
CVS Tags: jmcneill-usbmp-base5
Changes since 1.720: +42 -23 lines
Diff to previous 1.720 (colored)

(xen) - remove the (*xpq_cpu)() shim.We hasten the %fs/%gs setup process during boot.Although this is hacky, it lets us use the non-xen specificpmap_pte_xxx() functions in pmap code (and others).

Revision 1.717.2.2 / (download) - annotate - [select for diffs], Thu Feb 23 18:37:32 2012 UTC (12 years, 1 month ago) by riz
Branch: netbsd-6
Changes since 1.717.2.1: +2 -4 lines
Diff to previous 1.717.2.1 (colored) to branchpoint 1.717 (colored)

Pull up following revision(s) (requested by chs in ticket #38):
	sys/arch/amd64/amd64/machdep.c: revision 1.178
	sys/arch/x86/x86/identcpu.c: revision 1.30
	sys/arch/i386/i386/machdep.c: revision 1.720
move XEN CPU feature masking into cpu_probe() so that it's applied
to all CPUs, not just the boot CPU.

Revision 1.720 / (download) - annotate - [select for diffs], Thu Feb 23 14:45:55 2012 UTC (12 years, 1 month ago) by chs
Branch: MAIN
CVS Tags: jmcneill-usbmp-base3
Changes since 1.719: +2 -4 lines
Diff to previous 1.719 (colored)

move XEN CPU feature masking into cpu_probe() so that it's applied
to all CPUs, not just the boot CPU.

Revision 1.717.2.1 / (download) - annotate - [select for diffs], Wed Feb 22 19:07:12 2012 UTC (12 years, 1 month ago) by riz
Branch: netbsd-6
Changes since 1.717: +3 -4 lines
Diff to previous 1.717 (colored)

Pull up following revision(s) (requested by bouyer in ticket #32):
	sys/arch/i386/i386/machdep.c: revision 1.719
i386_switch_context(): mimic code in cpu_switchto() and compare pcb->pcb_fpcpu
against ci to decide if we need to turn off FPU. Fix FPU corruption, e.g.
paranoia occasionally reporting flaws on Xen/MP systems.
XXX is ci_fpused still needed at all ?

Revision 1.719 / (download) - annotate - [select for diffs], Wed Feb 22 18:35:26 2012 UTC (12 years, 1 month ago) by bouyer
Branch: MAIN
Changes since 1.718: +3 -4 lines
Diff to previous 1.718 (colored)

i386_switch_context(): mimic code in cpu_switchto() and compare pcb->pcb_fpcpu
against ci to decide if we need to turn off FPU. Fix FPU corruption, e.g.
paranoia occasionally reporting flaws on Xen/MP systems.

XXX is ci_fpused still needed at all ?

Revision 1.718 / (download) - annotate - [select for diffs], Sun Feb 19 21:06:08 2012 UTC (12 years, 1 month ago) by rmind
Branch: MAIN
Changes since 1.717: +2 -42 lines
Diff to previous 1.717 (colored)

Remove COMPAT_SA / KERN_SA.  Welcome to 6.99.3!
Approved by core@.

Revision 1.714.2.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:32:21 2012 UTC (12 years, 1 month ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.714: +44 -5 lines
Diff to previous 1.714 (colored)

merge to -current.

Revision 1.717 / (download) - annotate - [select for diffs], Thu Jan 12 19:49:37 2012 UTC (12 years, 3 months ago) by cherry
Branch: MAIN
CVS Tags: netbsd-6-base, jmcneill-usbmp-base2
Branch point for: netbsd-6
Changes since 1.716: +4 -2 lines
Diff to previous 1.716 (colored)

relocate pte_lock initialisation to the earliest points after %fs is first usable in the XEN bootpath

Revision 1.716 / (download) - annotate - [select for diffs], Thu Jan 12 19:37:45 2012 UTC (12 years, 3 months ago) by cherry
Branch: MAIN
Changes since 1.715: +7 -5 lines
Diff to previous 1.715 (colored)

re-order call to x86_bus_space_init() until after %fs is initialised via initgdt().

x86_bus_space_init() uses mutex(9) since it uses extent(9), which requires %fs to be setup before use.

Revision 1.715 / (download) - annotate - [select for diffs], Fri Dec 30 17:57:49 2011 UTC (12 years, 3 months ago) by cherry
Branch: MAIN
Changes since 1.714: +37 -2 lines
Diff to previous 1.714 (colored)

Move the per-cpu l3 page allocation code to a separate MD function. Avoids code duplication for xen PAE

Revision 1.714 / (download) - annotate - [select for diffs], Tue Nov 29 11:12:26 2011 UTC (12 years, 4 months ago) by martin
Branch: MAIN
CVS Tags: jmcneill-usbmp-pre-base2, jmcneill-usbmp-base
Branch point for: jmcneill-usbmp
Changes since 1.713: +3 -3 lines
Diff to previous 1.713 (colored)

Explicitly cast the result of ptoa() to unsigned long for printf,
to fix build failure on xen.

Revision 1.713 / (download) - annotate - [select for diffs], Fri Nov 18 22:18:08 2011 UTC (12 years, 4 months ago) by jmcneill
Branch: MAIN
CVS Tags: jmcneill-audiomp3-base, jmcneill-audiomp3
Changes since 1.712: +2 -51 lines
Diff to previous 1.712 (colored)

remove Xbox support

Revision 1.709.2.1 / (download) - annotate - [select for diffs], Thu Nov 10 14:31:40 2011 UTC (12 years, 5 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.709: +17 -8 lines
Diff to previous 1.709 (colored)

sync with head

Revision 1.712 / (download) - annotate - [select for diffs], Thu Nov 10 00:12:04 2011 UTC (12 years, 5 months ago) by jym
Branch: MAIN
CVS Tags: yamt-pagecache-base3
Changes since 1.711: +7 -5 lines
Diff to previous 1.711 (colored)

Turn the 'i386_use_pae' variable into simply 'use_pae'. Technically
speaking we are also running with PAE enabled in long mode under amd64,
so this variable will be used in various places across x86 machdep to
branch at runtime to functions that require extra handling for PAE mode.

Revision 1.711 / (download) - annotate - [select for diffs], Sun Nov 6 15:35:29 2011 UTC (12 years, 5 months ago) by cherry
Branch: MAIN
CVS Tags: yamt-pagecache-base2
Changes since 1.710: +3 -3 lines
Diff to previous 1.710 (colored)

DTRT when initialising pmap_pa_end.

Revision 1.710 / (download) - annotate - [select for diffs], Sun Nov 6 11:40:46 2011 UTC (12 years, 5 months ago) by cherry
Branch: MAIN
Changes since 1.709: +11 -4 lines
Diff to previous 1.709 (colored)

[merging from cherry-xenmp] Make the xen MMU op queue locking api private. Implement per-cpu queues.

Revision 1.702.2.7 / (download) - annotate - [select for diffs], Tue Sep 20 18:57:51 2011 UTC (12 years, 6 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.702.2.6: +2 -4 lines
Diff to previous 1.702.2.6 (colored) to branchpoint 1.702 (colored) next main 1.703 (colored)

Remove the "xpq lock", since we have per-cpu mmu queues now. This may need further testing. Also add some preliminary locking around queue-ops in the network backend driver

Revision 1.702.2.6 / (download) - annotate - [select for diffs], Tue Aug 30 12:53:45 2011 UTC (12 years, 7 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.702.2.5: +11 -2 lines
Diff to previous 1.702.2.5 (colored) to branchpoint 1.702 (colored)

Add per-cpu mmu queues

Revision 1.659.2.8 / (download) - annotate - [select for diffs], Sat Aug 27 15:37:25 2011 UTC (12 years, 7 months ago) by jym
Branch: jym-xensuspend
Changes since 1.659.2.7: +80 -17 lines
Diff to previous 1.659.2.7 (colored) next main 1.660 (colored)

Sync with HEAD. Most notably: uvm/pmap work done by rmind@, and MP Xen
work of cherry@.

No regression observed on suspend/restore.

Revision 1.702.2.5 / (download) - annotate - [select for diffs], Sat Aug 20 19:22:46 2011 UTC (12 years, 7 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.702.2.4: +3 -3 lines
Diff to previous 1.702.2.4 (colored) to branchpoint 1.702 (colored)

PAE MP support (preliminary), amd64 per-cpu L4 model redesigned, i386 pmap_pa_start/end fixup

Revision 1.709 / (download) - annotate - [select for diffs], Sat Aug 13 12:09:38 2011 UTC (12 years, 8 months ago) by cherry
Branch: MAIN
CVS Tags: yamt-pagecache-base, jym-xensuspend-nbase, jym-xensuspend-base
Branch point for: yamt-pagecache
Changes since 1.708: +4 -2 lines
Diff to previous 1.708 (colored)

Add locking around ops to the hypervisor MMU "queue".

Revision 1.708 / (download) - annotate - [select for diffs], Thu Aug 11 18:11:17 2011 UTC (12 years, 8 months ago) by cherry
Branch: MAIN
Changes since 1.707: +3 -7 lines
Diff to previous 1.707 (colored)

Hide the MD details of specific IPIs behind semantically pleasing functions. This cleans up a couple of #ifdef XEN/#endif pairs

Revision 1.707 / (download) - annotate - [select for diffs], Wed Aug 10 06:38:02 2011 UTC (12 years, 8 months ago) by cherry
Branch: MAIN
Changes since 1.706: +42 -10 lines
Diff to previous 1.706 (colored)

tweak the xen specific startup path to not use %fs before it is setup. Minor refactoring. Use Xen specific ipi calls.

Revision 1.702.2.4 / (download) - annotate - [select for diffs], Sun Aug 7 19:48:07 2011 UTC (12 years, 8 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.702.2.3: +3 -3 lines
Diff to previous 1.702.2.3 (colored) to branchpoint 1.702 (colored)

Fix XEN3PAE_DOMx build

Revision 1.702.2.3 / (download) - annotate - [select for diffs], Sat Aug 6 21:06:34 2011 UTC (12 years, 8 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.702.2.2: +8 -2 lines
Diff to previous 1.702.2.2 (colored) to branchpoint 1.702 (colored)

Update cpu local GDT entries for TLS registers %gs and %fs

Revision 1.702.2.2 / (download) - annotate - [select for diffs], Sun Jul 31 20:49:10 2011 UTC (12 years, 8 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.702.2.1: +38 -10 lines
Diff to previous 1.702.2.1 (colored) to branchpoint 1.702 (colored)

grow MP support for i386. boots to single user

Revision 1.706 / (download) - annotate - [select for diffs], Fri Jul 1 18:14:15 2011 UTC (12 years, 9 months ago) by dyoung
Branch: MAIN
Changes since 1.705: +3 -3 lines
Diff to previous 1.705 (colored)

#include <sys/bus.h> instead of <machine/bus.h>.

Revision 1.705 / (download) - annotate - [select for diffs], Thu Jun 30 23:28:03 2011 UTC (12 years, 9 months ago) by joerg
Branch: MAIN
Changes since 1.704: +3 -3 lines
Diff to previous 1.704 (colored)

Fix sizeof() usage in memcpy, curtesy of the new warning in clang.

Revision 1.702.2.1 / (download) - annotate - [select for diffs], Thu Jun 23 14:19:14 2011 UTC (12 years, 9 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.702: +39 -6 lines
Diff to previous 1.702 (colored)

Catchup with rmind-uvmplock merge.

Revision 1.704 / (download) - annotate - [select for diffs], Sun Jun 12 03:35:42 2011 UTC (12 years, 10 months ago) by rmind
Branch: MAIN
Changes since 1.703: +37 -4 lines
Diff to previous 1.703 (colored)

Welcome to 5.99.53!  Merge rmind-uvmplock branch:

- Reorganize locking in UVM and provide extra serialisation for pmap(9).
  New lock order: [vmpage-owner-lock] -> pmap-lock.

- Simplify locking in some pmap(9) modules by removing P->V locking.

- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
  the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).

- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
  Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.

- Unify /dev/mem et al in MI code and provide required locking (removes
  kernel-lock on some ports).  Also, avoid cache-aliasing issues.

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.

Revision 1.684.2.5 / (download) - annotate - [select for diffs], Sun Jun 12 00:23:58 2011 UTC (12 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.684.2.4: +2 -2 lines
Diff to previous 1.684.2.4 (colored) to branchpoint 1.684 (colored) next main 1.685 (colored)

sync with head

Revision 1.703 / (download) - annotate - [select for diffs], Tue Jun 7 14:53:03 2011 UTC (12 years, 10 months ago) by bouyer
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base
Changes since 1.702: +4 -4 lines
Diff to previous 1.702 (colored)

Don't call psignal() without holding proc_lock. This is the cause of
the reboot of PR port-xen/45028
Now that Xen2 is gone, handle FPU context switches the same way as
amd64. This makes all tests in /usr/tests/lib/libc/ieeefp pass.

Revision 1.699.2.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:05:49 2011 UTC (12 years, 10 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.699: +9 -11 lines
Diff to previous 1.699 (colored) next main 1.700 (colored)

Sync with HEAD.

Revision 1.684.2.4 / (download) - annotate - [select for diffs], Tue May 31 03:04:04 2011 UTC (12 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.684.2.3: +0 -8 lines
Diff to previous 1.684.2.3 (colored) to branchpoint 1.684 (colored)

sync with head

Revision 1.644.4.10.4.2 / (download) - annotate - [select for diffs], Fri May 20 08:11:20 2011 UTC (12 years, 10 months ago) by matt
Branch: matt-nb5-mips64
Changes since 1.644.4.10.4.1: +4 -8 lines
Diff to previous 1.644.4.10.4.1 (colored) to branchpoint 1.644.4.10 (colored) next main 1.644.4.11 (colored)

bring matt-nb5-mips64 up to date with netbsd-5-1-RELEASE (except compat).

Revision 1.659.2.7 / (download) - annotate - [select for diffs], Mon May 2 22:49:55 2011 UTC (12 years, 11 months ago) by jym
Branch: jym-xensuspend
Changes since 1.659.2.6: +2 -10 lines
Diff to previous 1.659.2.6 (colored)

Sync with head.

Revision 1.702 / (download) - annotate - [select for diffs], Tue Apr 26 15:51:23 2011 UTC (12 years, 11 months ago) by joerg
Branch: MAIN
CVS Tags: cherry-xenmp-base
Branch point for: cherry-xenmp
Changes since 1.701: +2 -10 lines
Diff to previous 1.701 (colored)

Remove Darwin, MACH and Mach-O support.

Revision 1.659.2.6 / (download) - annotate - [select for diffs], Mon Mar 28 23:04:41 2011 UTC (13 years ago) by jym
Branch: jym-xensuspend
Changes since 1.659.2.5: +15 -4 lines
Diff to previous 1.659.2.5 (colored)

Sync with HEAD. TODO before merge:
- shortcut for suspend code in sysmon, when powerd(8) is not running.
Borrow ``xs_watch'' thread context?
- bug hunting in xbd + xennet resume. Rings are currently thrashed upon
resume, so current implementation force flush them on suspend. It's not
really needed.

Revision 1.684.2.3 / (download) - annotate - [select for diffs], Sat Mar 5 20:50:40 2011 UTC (13 years, 1 month ago) by rmind
Branch: rmind-uvmplock
Changes since 1.684.2.2: +54 -22 lines
Diff to previous 1.684.2.2 (colored) to branchpoint 1.684 (colored)

sync with head

Revision 1.699.4.1 / (download) - annotate - [select for diffs], Sat Mar 5 15:09:43 2011 UTC (13 years, 1 month ago) by bouyer
Branch: bouyer-quota2
Changes since 1.699: +9 -3 lines
Diff to previous 1.699 (colored) next main 1.700 (colored)

Sync with HEAD

Revision 1.701 / (download) - annotate - [select for diffs], Fri Mar 4 22:25:26 2011 UTC (13 years, 1 month ago) by joerg
Branch: MAIN
CVS Tags: bouyer-quota2-nbase
Changes since 1.700: +3 -3 lines
Diff to previous 1.700 (colored)

Refactor ps_strings access. Based on PK_32, write either the normal
version or the 32bit compat layout in execve1. Introduce a new function
copyin_psstrings for reading it back from userland and converting it to
the native layout. Refactor procfs to share most of the code with the
kern.proc_args sysctl handler.

This material is based upon work partially supported by
The NetBSD Foundation under a contract with Joerg Sonnenberger.

Revision 1.700 / (download) - annotate - [select for diffs], Thu Feb 24 04:28:46 2011 UTC (13 years, 1 month ago) by joerg
Branch: MAIN
Changes since 1.699: +8 -2 lines
Diff to previous 1.699 (colored)

Allow storing and receiving the LWP private pointer via ucontext_t
on all platforms except VAX and IA64. Add fast access via register for
AMD64, i386 and SH3 ports. Use this fast access in libpthread to replace
the stack based pthread_self(). Implement skeleton support for Alpha,
HPPA, PowerPC, SPARC and SPARC64, but leave it disabled.

Ports that support this feature provide __HAVE____LWP_GETPRIVATE_FAST in
machine/types.h and a corresponding __lwp_getprivate_fast in
machine/mcontext.h.

This material is based upon work partially supported by
The NetBSD Foundation under a contract with Joerg Sonnenberger.

Revision 1.699 / (download) - annotate - [select for diffs], Tue Jan 11 21:10:17 2011 UTC (13 years, 3 months ago) by jruoho
Branch: MAIN
CVS Tags: uebayasi-xip-base7, jruoho-x86intr-base, bouyer-quota2-base
Branch point for: jruoho-x86intr, bouyer-quota2
Changes since 1.698: +8 -3 lines
Diff to previous 1.698 (colored)

Restore the interrupt level in cpu_reboot() before calling the
acpi_enter_sleep_state() function.

Revision 1.659.2.5 / (download) - annotate - [select for diffs], Mon Jan 10 00:37:29 2011 UTC (13 years, 3 months ago) by jym
Branch: jym-xensuspend
Changes since 1.659.2.4: +7 -7 lines
Diff to previous 1.659.2.4 (colored)

Sync with HEAD

Revision 1.698 / (download) - annotate - [select for diffs], Fri Nov 12 13:18:57 2010 UTC (13 years, 5 months ago) by uebayasi
Branch: MAIN
CVS Tags: uebayasi-xip-base6, matt-mips64-premerge-20101231
Changes since 1.697: +1 -1 lines
Diff to previous 1.697 (colored)

Pull in uvm/uvm.h where UVM's page level interface is used.

Revision 1.697 / (download) - annotate - [select for diffs], Wed Nov 10 09:27:22 2010 UTC (13 years, 5 months ago) by uebayasi
Branch: MAIN
Changes since 1.696: +6 -6 lines
Diff to previous 1.696 (colored)

Use more VM_PHYSMEM_*() accessors.  No functional changes.

Revision 1.681.2.7 / (download) - annotate - [select for diffs], Wed Nov 10 08:59:13 2010 UTC (13 years, 5 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.681.2.6: +1 -1 lines
Diff to previous 1.681.2.6 (colored) to branchpoint 1.681 (colored) next main 1.682 (colored)

Fix thinko; make vm_physseg ptr swap really work.

Revision 1.681.2.6 / (download) - annotate - [select for diffs], Wed Nov 10 03:36:27 2010 UTC (13 years, 5 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.681.2.5: +3 -3 lines
Diff to previous 1.681.2.5 (colored) to branchpoint 1.681 (colored)

Always use VM_PHYSMEM_PTR().

Revision 1.681.2.5 / (download) - annotate - [select for diffs], Sat Nov 6 08:08:18 2010 UTC (13 years, 5 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.681.2.4: +3 -6 lines
Diff to previous 1.681.2.4 (colored) to branchpoint 1.681 (colored)

Sync with HEAD.

Revision 1.659.2.4 / (download) - annotate - [select for diffs], Sun Oct 24 22:48:01 2010 UTC (13 years, 5 months ago) by jym
Branch: jym-xensuspend
Changes since 1.659.2.3: +88 -77 lines
Diff to previous 1.659.2.3 (colored)

Sync with HEAD

Revision 1.696 / (download) - annotate - [select for diffs], Sun Oct 24 07:53:04 2010 UTC (13 years, 5 months ago) by jruoho
Branch: MAIN
CVS Tags: uebayasi-xip-base5, uebayasi-xip-base4
Changes since 1.695: +3 -6 lines
Diff to previous 1.695 (colored)

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).

Revision 1.681.2.4 / (download) - annotate - [select for diffs], Fri Oct 22 07:21:20 2010 UTC (13 years, 5 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.681.2.3: +13 -0 lines
Diff to previous 1.681.2.3 (colored) to branchpoint 1.681 (colored)

Sync with HEAD (-D20101022).

Revision 1.695 / (download) - annotate - [select for diffs], Thu Oct 21 11:17:55 2010 UTC (13 years, 5 months ago) by yamt
Branch: MAIN
CVS Tags: uebayasi-xip-base3
Changes since 1.694: +4 -2 lines
Diff to previous 1.694 (colored)

don't forget to call nmi_init.

Revision 1.629.2.7 / (download) - annotate - [select for diffs], Sat Oct 9 03:31:47 2010 UTC (13 years, 6 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.629.2.6: +13 -2 lines
Diff to previous 1.629.2.6 (colored) to branchpoint 1.629 (colored) next main 1.630 (colored)

sync with head

Revision 1.694 / (download) - annotate - [select for diffs], Tue Aug 17 22:24:04 2010 UTC (13 years, 7 months ago) by jym
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11
Changes since 1.693: +4 -3 lines
Diff to previous 1.693 (colored)

Use SYSCTL_DESCR()

Revision 1.681.2.3 / (download) - annotate - [select for diffs], Tue Aug 17 06:44:36 2010 UTC (13 years, 8 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.681.2.2: +20 -10 lines
Diff to previous 1.681.2.2 (colored) to branchpoint 1.681 (colored)

Sync with HEAD.

Revision 1.693 / (download) - annotate - [select for diffs], Mon Aug 16 19:39:06 2010 UTC (13 years, 8 months ago) by jym
Branch: MAIN
Changes since 1.692: +12 -2 lines
Diff to previous 1.692 (colored)

Add machdep.pae sysctl(7) for i386. Thanks to Paul and Joerg for their
reviews.

In kernel, it matches the 'i386_use_pae' variable (0: kernel does not use
PAE, 1: kernel uses PAE). Will be used by i386 kvm(3) to know the functions
that should get called for VA => PA translations.

Revision 1.629.2.6 / (download) - annotate - [select for diffs], Wed Aug 11 22:52:11 2010 UTC (13 years, 8 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.629.2.5: +30 -24 lines
Diff to previous 1.629.2.5 (colored) to branchpoint 1.629 (colored)

sync with head.

Revision 1.692 / (download) - annotate - [select for diffs], Sat Aug 7 20:07:26 2010 UTC (13 years, 8 months ago) by jruoho
Branch: MAIN
CVS Tags: yamt-nfs-mp-base10, uebayasi-xip-base2
Changes since 1.691: +3 -3 lines
Diff to previous 1.691 (colored)

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.

Revision 1.691 / (download) - annotate - [select for diffs], Sat Jul 24 00:45:54 2010 UTC (13 years, 8 months ago) by jym
Branch: MAIN
Changes since 1.690: +17 -6 lines
Diff to previous 1.690 (colored)

Welcome PAE inside i386 current.

This patch is inspired by work previously done by Jeremy Morse, ported by me
to -current, merged with the work previously done for port-xen, together with
additionals fixes and improvements.

PAE option is disabled by default in GENERIC (but will be enabled in ALL in
the next few days).

In quick, PAE switches the CPU to a mode where physical addresses become
36 bits (64 GiB). Virtual address space remains at 32 bits (4 GiB). To cope
with the increased size of the physical address, they are manipulated as
64 bits variables by kernel and MMU.

When supported by the CPU, it also allows the use of the NX/XD bit that
provides no-execution right enforcement on a per physical page basis.

Notes:

- reworked locore.S

- introduce cpu_load_pmap(), used to switch pmap for the curcpu. Due to the
different handling of pmap mappings with PAE vs !PAE, Xen vs native, details
are hidden within this function. This helps calling it from assembly,
as some features, like BIOS calls, switch to pmap_kernel before mapping
trampoline code in low memory.

- some changes in bioscall and kvm86_call, to reflect the above.

- the L3 is "pinned" per-CPU, and is only manipulated by a
reduced set of functions within pmap. To track the L3, I added two
elements to struct cpu_info, namely ci_l3_pdirpa (PA of the L3), and
ci_l3_pdir (the L3 VA). Rest of the code considers that it runs "just
like" a normal i386, except that the L2 is 4 pages long (PTP_LEVELS is
still 2).

- similar to the ci_pae_l3_pdir{,pa} variables, amd64's xen_current_user_pgd
becomes an element of cpu_info (slowly paving the way for MP world).

- bootinfo_source struct declaration is modified, to cope with paddr_t size
change with PAE (it is not correct to assume that bs_addr is a paddr_t when
compiled with PAE - it should remain 32 bits). bs_addrs is now a
void * array (in bootloader's code under i386/stand/, the bs_addrs
is a physaddr_t, which is an unsigned long).

- fixes in multiboot code (same reason as bootinfo): paddr_t size
change. I used Elf32_* types, use RELOC() where necessary, and move the
memcpy() functions out of the if/else if (I do not expect sym and str tables
to overlap with ELF).

- 64 bits atomic functions for pmap

- all pmap_pdirpa access are now done through the pmap_pdirpa macro. It
hides the L3/L2 stuff from PAE, as well as the pm_pdirpa change in
struct pmap (it now becomes a PDP_SIZE array, with or without PAE).

- manipulation of recursive mappings ( PDIR_SLOT_{,A}PTEs ) is done via
loops on PDP_SIZE.

See also http://mail-index.netbsd.org/port-i386/2010/07/17/msg002062.html

No objection raised on port-i386@ and port-xen@R for about a week.

XXX kvm(3) will be fixed in another patch to properly handle both PAE and !PAE
kernel dumps (VA => PA macros are slightly different, and need proper 64 bits
PA support in kvm_i386).

XXX Mixing PAE and !PAE modules may lead to unwanted/unexpected results. This
cannot be solved easily, and needs lots of thinking before being declared
safe (paddr_t/bus_addr_t size handling, PD/PT macros abstractions).

Revision 1.690 / (download) - annotate - [select for diffs], Thu Jul 15 23:20:34 2010 UTC (13 years, 9 months ago) by jym
Branch: MAIN
Changes since 1.689: +4 -4 lines
Diff to previous 1.689 (colored)

With Xen, PDPpaddr should contain a guest physical address (== PFN).

Revision 1.689 / (download) - annotate - [select for diffs], Thu Jul 15 22:19:19 2010 UTC (13 years, 9 months ago) by jym
Branch: MAIN
Changes since 1.688: +3 -3 lines
Diff to previous 1.688 (colored)

pte0 is used to map the page required by bioscall() trampoline code, so
add VM_PROT_EXECUTE protection for it.

Currently, this does not change much, as page execute permission is not
enforced for i386 (except for Xen, where BIOS calls are not used anyway).

Revision 1.688 / (download) - annotate - [select for diffs], Wed Jul 14 14:42:40 2010 UTC (13 years, 9 months ago) by jym
Branch: MAIN
Changes since 1.687: +3 -3 lines
Diff to previous 1.687 (colored)

Fix typo in comment.

Revision 1.684.2.2 / (download) - annotate - [select for diffs], Sun May 30 05:16:53 2010 UTC (13 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.684.2.1: +10 -15 lines
Diff to previous 1.684.2.1 (colored) to branchpoint 1.684 (colored)

sync with head

Revision 1.687 / (download) - annotate - [select for diffs], Tue May 4 23:27:13 2010 UTC (13 years, 11 months ago) by jym
Branch: MAIN
Changes since 1.686: +2 -3 lines
Diff to previous 1.686 (colored)

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@.

Revision 1.681.2.2 / (download) - annotate - [select for diffs], Fri Apr 30 14:39:29 2010 UTC (13 years, 11 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.681.2.1: +15 -26 lines
Diff to previous 1.681.2.1 (colored) to branchpoint 1.681 (colored)

Sync with HEAD.

Revision 1.681.2.1 / (download) - annotate - [select for diffs], Wed Apr 28 08:31:06 2010 UTC (13 years, 11 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.681: +6 -6 lines
Diff to previous 1.681 (colored)

Always use struct vm_physseg *vm_physmem_ptrs[] in MD code.

Revision 1.686 / (download) - annotate - [select for diffs], Fri Apr 23 16:07:33 2010 UTC (13 years, 11 months ago) by joerg
Branch: MAIN
CVS Tags: uebayasi-xip-base1
Changes since 1.685: +6 -6 lines
Diff to previous 1.685 (colored)

Use struct segment_descriptor for pcb_fsd and pcb_gsd instead of int[2].

Revision 1.644.4.10.2.1 / (download) - annotate - [select for diffs], Fri Apr 23 04:17:29 2010 UTC (13 years, 11 months ago) by snj
Branch: netbsd-5-0
Changes since 1.644.4.10: +4 -8 lines
Diff to previous 1.644.4.10 (colored) next main 1.644.4.11 (colored)

Apply patch (requested by jym in ticket #1380):
Fix 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).

Revision 1.644.4.12 / (download) - annotate - [select for diffs], Thu Apr 22 20:02:48 2010 UTC (13 years, 11 months ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, matt-nb5-pq3-base, matt-nb5-pq3
Changes since 1.644.4.11: +4 -8 lines
Diff to previous 1.644.4.11 (colored) to branchpoint 1.644 (colored)

Apply patch (requested by jym in ticket #1380):
Fix 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).

Revision 1.644.4.10.4.1 / (download) - annotate - [select for diffs], Wed Apr 21 00:33:50 2010 UTC (13 years, 11 months ago) by matt
Branch: matt-nb5-mips64
CVS Tags: matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-k15
Changes since 1.644.4.10: +10 -11 lines
Diff to previous 1.644.4.10 (colored)

sync to netbsd-5

Revision 1.685 / (download) - annotate - [select for diffs], Sun Apr 18 23:47:51 2010 UTC (13 years, 11 months ago) by jym
Branch: MAIN
Changes since 1.684: +7 -11 lines
Diff to previous 1.684 (colored)

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.

Revision 1.684.2.1 / (download) - annotate - [select for diffs], Thu Mar 18 04:36:49 2010 UTC (14 years, 1 month ago) by rmind
Branch: rmind-uvmplock
Changes since 1.684: +37 -4 lines
Diff to previous 1.684 (colored)

Unify /dev/{mem,kmem,zero,null} implementations in MI code.  Based on patch
from Joerg Sonnenberger, proposed on tech-kern@, in February 2008.

Work and depression still in progress.

Revision 1.629.2.5 / (download) - annotate - [select for diffs], Thu Mar 11 15:02:28 2010 UTC (14 years, 1 month ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.629.2.4: +48 -57 lines
Diff to previous 1.629.2.4 (colored) to branchpoint 1.629 (colored)

sync with head

Revision 1.684 / (download) - annotate - [select for diffs], Mon Mar 1 01:35:11 2010 UTC (14 years, 1 month ago) by jym
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9
Branch point for: rmind-uvmplock
Changes since 1.683: +7 -7 lines
Diff to previous 1.683 (colored)

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.

Revision 1.683 / (download) - annotate - [select for diffs], Mon Mar 1 01:15:23 2010 UTC (14 years, 1 month ago) by jym
Branch: MAIN
Changes since 1.682: +3 -3 lines
Diff to previous 1.682 (colored)

Change rbus_min_start_hint() semantic for i386. "ram" is now psize_t
(instead of size_t) to avoid possible overflow when system may have more
than 4GB of memory (like PAE).

The behavior of rbus_min_start_hint() remains the same. While here, fix
printf's format strings (paddr_t => PRIxPADDR).

Use ctob() and cast physmem to psize_t to avoid losing bits above 4GB.

Comes from PAE patch from Jeremy Morse; adaptation by me.

Compile tested for GENERIC only. No regression expected.

Revision 1.682 / (download) - annotate - [select for diffs], Mon Feb 8 19:02:29 2010 UTC (14 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.681: +2 -9 lines
Diff to previous 1.681 (colored)

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.

Revision 1.681 / (download) - annotate - [select for diffs], Thu Dec 10 14:13:50 2009 UTC (14 years, 4 months ago) by matt
Branch: MAIN
CVS Tags: uebayasi-xip-base, matt-premerge-20091211
Branch point for: uebayasi-xip
Changes since 1.680: +3 -3 lines
Diff to previous 1.680 (colored)

Change u_long to vaddr_t/vsize_t in exec code where appropriate (mostly
involves setregs and vmcmds).  Should result in no code differences.

Revision 1.680 / (download) - annotate - [select for diffs], Sun Nov 29 04:15:42 2009 UTC (14 years, 4 months ago) by rmind
Branch: MAIN
Changes since 1.679: +7 -10 lines
Diff to previous 1.679 (colored)

Replace l_addr with uvm_lwp_getuarea() in various MD code, mostly cpu_lwp_fork().

Revision 1.679 / (download) - annotate - [select for diffs], Fri Nov 27 03:23:10 2009 UTC (14 years, 4 months ago) by rmind
Branch: MAIN
Changes since 1.678: +5 -5 lines
Diff to previous 1.678 (colored)

- 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.

Revision 1.678 / (download) - annotate - [select for diffs], Thu Nov 26 00:19:18 2009 UTC (14 years, 4 months ago) by matt
Branch: MAIN
Changes since 1.677: +6 -8 lines
Diff to previous 1.677 (colored)

Kill proc0paddr.  Use lwp0.l_addr instead.

Revision 1.677 / (download) - annotate - [select for diffs], Wed Nov 25 14:28:50 2009 UTC (14 years, 4 months ago) by rmind
Branch: MAIN
Changes since 1.676: +3 -3 lines
Diff to previous 1.676 (colored)

Remove IPL_LPT and IPL_IPI aliases, use the actual IPLs.
Fix some broken comments.

Revision 1.676 / (download) - annotate - [select for diffs], Mon Nov 23 05:01:12 2009 UTC (14 years, 4 months ago) by dholland
Branch: MAIN
Changes since 1.675: +3 -3 lines
Diff to previous 1.675 (colored)

When converting an if/panic to a KASSERT it's necessary to reverse the
sense of the test. Makes i386 boot again.

HI RMIND

Revision 1.675 / (download) - annotate - [select for diffs], Sat Nov 21 15:38:43 2009 UTC (14 years, 4 months ago) by rmind
Branch: MAIN
Changes since 1.674: +3 -3 lines
Diff to previous 1.674 (colored)

Missed fix for Xen builds.

Revision 1.674 / (download) - annotate - [select for diffs], Sat Nov 21 03:11:00 2009 UTC (14 years, 4 months ago) by rmind
Branch: MAIN
Changes since 1.673: +29 -23 lines
Diff to previous 1.673 (colored)

Use lwp_getpcb() on x86 MD code, clean from struct user usage.

Revision 1.673 / (download) - annotate - [select for diffs], Sat Nov 7 07:27:44 2009 UTC (14 years, 5 months ago) by cegger
Branch: MAIN
Changes since 1.672: +9 -8 lines
Diff to previous 1.672 (colored)

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.

Revision 1.659.2.3 / (download) - annotate - [select for diffs], Sun Nov 1 13:58:21 2009 UTC (14 years, 5 months ago) by jym
Branch: jym-xensuspend
Changes since 1.659.2.2: +7 -28 lines
Diff to previous 1.659.2.2 (colored)

Sync with HEAD.

Revision 1.586.2.6 / (download) - annotate - [select for diffs], Sun Oct 18 15:20:42 2009 UTC (14 years, 5 months ago) by bouyer
Branch: netbsd-4
Changes since 1.586.2.5: +8 -2 lines
Diff to previous 1.586.2.5 (colored) to branchpoint 1.586 (colored) next main 1.587 (colored)

Pull up following revision(s) (requested by mlelstv in ticket #1363):
	sys/arch/i386/isa/npx.c: revision 1.132 via patch
	sys/arch/amd64/amd64/fpu.c: revision 1.29 via patch
	sys/arch/amd64/amd64/machdep.c: revision 1.105 via patch
	sys/arch/i386/i386/machdep.c: revision 1.647 via patch
PR port-i386/39299 FPU use in signal handlers is unsafe
Ensure FP state is reset, if FP is used in a signal handler.
Fixes PR kern/39299 for 32bit code.

Revision 1.672 / (download) - annotate - [select for diffs], Mon Oct 5 23:59:30 2009 UTC (14 years, 6 months ago) by rmind
Branch: MAIN
Changes since 1.671: +2 -6 lines
Diff to previous 1.671 (colored)

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.

Revision 1.644.4.11 / (download) - annotate - [select for diffs], Sat Oct 3 23:49:50 2009 UTC (14 years, 6 months ago) by snj
Branch: netbsd-5
Changes since 1.644.4.10: +10 -11 lines
Diff to previous 1.644.4.10 (colored) to branchpoint 1.644 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1054):
	sys/arch/amd64/amd64/machdep.c: revision 1.124
	sys/arch/i386/i386/machdep.c: revision 1.660
Prepare for PCI frontend support in Xen3 domUs:
call x86_bus_space_init() and x86_bus_space_mallocok() if we have ISA or PCI
  devices configured; not only for non-Xen or dom0 Xen
On Xen, always call PHYSDEVOP_SET_IOPL on context switch
on amd64, also call PHYSDEVOP_SET_IOPL from x86_64_proc0_tss_ldt_init()

Revision 1.629.2.4 / (download) - annotate - [select for diffs], Wed Aug 19 18:46:19 2009 UTC (14 years, 7 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.629.2.3: +7 -24 lines
Diff to previous 1.629.2.3 (colored) to branchpoint 1.629 (colored)

sync with head.

Revision 1.671 / (download) - annotate - [select for diffs], Tue Aug 18 16:41:02 2009 UTC (14 years, 7 months ago) by jmcneill
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7
Changes since 1.670: +6 -6 lines
Diff to previous 1.670 (colored)

Switch to ACPICA 20090730, and update for API changes.

Revision 1.670 / (download) - annotate - [select for diffs], Wed Jul 29 12:02:05 2009 UTC (14 years, 8 months ago) by cegger
Branch: MAIN
Changes since 1.669: +3 -20 lines
Diff to previous 1.669 (colored)

remove Xen2 support.
ok bouyer@

Revision 1.659.2.2 / (download) - annotate - [select for diffs], Thu Jul 23 23:31:36 2009 UTC (14 years, 8 months ago) by jym
Branch: jym-xensuspend
Changes since 1.659.2.1: +52 -27 lines
Diff to previous 1.659.2.1 (colored)

Sync with HEAD.

Revision 1.629.2.3 / (download) - annotate - [select for diffs], Sat Jul 18 14:52:53 2009 UTC (14 years, 8 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.629.2.2: +52 -27 lines
Diff to previous 1.629.2.2 (colored) to branchpoint 1.629 (colored)

sync with head.

Revision 1.669 / (download) - annotate - [select for diffs], Fri Jun 26 23:40:27 2009 UTC (14 years, 9 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-nfs-mp-base6, jymxensuspend-base
Changes since 1.668: +52 -27 lines
Diff to previous 1.668 (colored)

During a normal shutdown, gracefully tear down arbitrary stacks of
filesystems and (pseudo-)devices, according to the algorithm at A3
and A4, below.

Proposed and discussed at
<http://mail-index.netbsd.org/tech-kern/2009/04/20/msg004864.html>.  No
objections.

During an emergency shutdown (e.g., shutdown -n, or after a panic),
shutdown is simple as always: filesystems are not sync'd or unmounted,
and devices are not detached.

It was necessary to change the order of operations during shutdown,
but the new order is more sensible: if a core dump is desired, then
cpu_reboot(9) dumps it first.  cpu_reboot(9) does not call legacy
shutdown hooks any longer: they can interfere with device detachment
and PMF shutdown, and very few legacy hooks remain.

Here is the old order of operations:

B1 sync filesystems and TOD clock
B2 unmount filesystems
B3 dump core
B4 detach devices
B5 run legacy shutdown hooks
B6 run PMF shutdown hooks
B7 suspend interrupts
B8 MD reboot/shutdown/powerdown

And here is the new order:

A1 dump core
A2 sync filesystems and TOD clock
A3 unmount one or more filesystems OR
   detach one or more devices OR
   forcefully unmount one filesystem OR
   skip to 5
A4 repeat at 3
A5 run PMF shutdown hooks
A6 suspend interrupts
A7 MD reboot/shutdown/powerdown

Tested on Dell Dimension 3000, Dell PowerEdge 1950, Sun Fire V120,
Soekris net4521 and net4801.

VS: ----------------------------------------------------------------------

Revision 1.659.2.1 / (download) - annotate - [select for diffs], Wed May 13 17:17:49 2009 UTC (14 years, 11 months ago) by jym
Branch: jym-xensuspend
Changes since 1.659: +38 -37 lines
Diff to previous 1.659 (colored)

Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.

Revision 1.629.2.2 / (download) - annotate - [select for diffs], Mon May 4 08:11:16 2009 UTC (14 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.629.2.1: +133 -550 lines
Diff to previous 1.629.2.1 (colored) to branchpoint 1.629 (colored)

sync with head.

Revision 1.644.2.3 / (download) - annotate - [select for diffs], Tue Apr 28 07:34:08 2009 UTC (14 years, 11 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.644.2.2: +20 -24 lines
Diff to previous 1.644.2.2 (colored) to branchpoint 1.644 (colored) next main 1.645 (colored)

Sync with HEAD.

Revision 1.644.4.10 / (download) - annotate - [select for diffs], Sat Apr 4 17:39:09 2009 UTC (15 years ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20091211, matt-nb4-mips64-k7-u2a-k9b
Branch point for: netbsd-5-0, matt-nb5-mips64
Changes since 1.644.4.9: +11 -10 lines
Diff to previous 1.644.4.9 (colored) to branchpoint 1.644 (colored)

Pull up following revision(s) (requested by ad in ticket #656):
	sys/arch/amd64/amd64/gdt.c: revision 1.21 via patch
	sys/arch/amd64/amd64/machdep.c: revision 1.129 via patch
	sys/arch/i386/i386/gdt.c: revision 1.47 via patch
	sys/arch/i386/i386/kvm86.c: revision 1.17 via patch
	sys/arch/i386/i386/locore.S: revision 1.85 via patch
	sys/arch/i386/i386/machdep.c: revision 1.666 via patch
	sys/arch/i386/i386/vector.S: revision 1.45 via patch
	sys/arch/i386/include/pcb.h: revision 1.47 via patch
	sys/arch/x86/include/pmap.h: revision 1.22 via patch
	sys/arch/x86/include/sysarch.h: revision 1.8 via patch
	sys/arch/x86/x86/pmap.c: revision 1.80 via patch
	sys/arch/x86/x86/sys_machdep.c: revision 1.17 via patch
	sys/compat/linux/arch/i386/linux_machdep.c: revision 1.143 via patch
	sys/kern/init_main.c: revision 1.384 via patch
PR port-i386/40143 Viewing an mpeg transport stream with mplayer causes crash
Fix numerous problems:
1. LDT updates are not atomic.
2. Number of processes running with private LDTs and/or I/O bitmaps
   is not capped. System with high maxprocs can be paniced.
3. LDTR can be leaked over context switch.
4. GDT slot allocations can race, giving the same LDT slot to two procs.
5. Incomplete interrupt/trap frames can be stacked.
6. In some rare cases segment faults are not handled correctly.

Revision 1.668 / (download) - annotate - [select for diffs], Wed Apr 1 03:56:54 2009 UTC (15 years ago) by tls
Branch: MAIN
CVS Tags: yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base
Changes since 1.667: +3 -2 lines
Diff to previous 1.667 (colored)

Fix probe for VIA C3 and successors -- these are CPU family 6, not 5.
The broken probe was causing the VIA padlock driver to never attach!
Now we can see that its AES appears to be broken -- it makes FAST_IPSEC
ESP not work, on systems where it works fine with cryptosoft.

Rework code to detect and (if necessary) enable VIA crypto and RNG.
Add RNG support to VIA padlock driver.  In the process, have a quick
go at debugging the AES support but no luck thus far.

Revision 1.667 / (download) - annotate - [select for diffs], Sun Mar 29 10:58:54 2009 UTC (15 years ago) by ad
Branch: MAIN
Changes since 1.666: +5 -11 lines
Diff to previous 1.666 (colored)

Make i386 use banner(). amd64 not converted yet as it seems to trip into
a bug in format_bytes().

Revision 1.666 / (download) - annotate - [select for diffs], Sat Mar 21 14:41:29 2009 UTC (15 years ago) by ad
Branch: MAIN
Changes since 1.665: +11 -10 lines
Diff to previous 1.665 (colored)

PR port-i386/40143 Viewing an mpeg transport stream with mplayer causes crash

Fix numerous problems:

1. LDT updates are not atomic.

2. Number of processes running with private LDTs and/or I/O bitmaps
   is not capped. System with high maxprocs can be paniced.

3. LDTR can be leaked over context switch.

4. GDT slot allocations can race, giving the same LDT slot to two procs.

5. Incomplete interrupt/trap frames can be stacked.

6. In some rare cases segment faults are not handled correctly.

Revision 1.665 / (download) - annotate - [select for diffs], Mon Mar 16 09:37:35 2009 UTC (15 years, 1 month ago) by cegger
Branch: MAIN
Changes since 1.664: +7 -7 lines
Diff to previous 1.664 (colored)

ansify function definitions

Revision 1.644.2.2 / (download) - annotate - [select for diffs], Tue Mar 3 18:28:59 2009 UTC (15 years, 1 month ago) by skrll
Branch: nick-hppapmap
Changes since 1.644.2.1: +22 -25 lines
Diff to previous 1.644.2.1 (colored) to branchpoint 1.644 (colored)

Sync with HEAD.

Revision 1.644.4.9 / (download) - annotate - [select for diffs], Mon Mar 2 20:09:04 2009 UTC (15 years, 1 month ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-0-RC3
Changes since 1.644.4.8: +6 -6 lines
Diff to previous 1.644.4.8 (colored) to branchpoint 1.644 (colored)

Pull up following revision(s) (requested by jmcneill in ticket #529):
	sys/arch/i386/i386/machdep.c: revision 1.664
PR# port-i386/38936: system can not power down via acpi
Merge change from amd64 machdep.c revision 1.42:
in cpu_reboot(), only halt the other CPUs after we've done the powerdown stuff.
the ACPI code may end up removing some pmap entries, which wants the other
CPUs to still be running to handle TLB invalidations.

Revision 1.644.4.8 / (download) - annotate - [select for diffs], Mon Mar 2 20:00:20 2009 UTC (15 years, 1 month ago) by snj
Branch: netbsd-5
Changes since 1.644.4.7: +6 -2 lines
Diff to previous 1.644.4.7 (colored) to branchpoint 1.644 (colored)

Pull up following revision(s) (requested by jmcneill in ticket #526):
	sys/arch/amd64/amd64/machdep.c: revision 1.128
	sys/arch/i386/i386/machdep.c: revision 1.663
PR# port-i386/40751: power button does not work after halt
PR# kern/37506: Have to hold power button for 5 seconds to turn off Laptop
    after "halt" command.
Transfer the system from ACPI to Legacy mode if RB_HALT is set.

Revision 1.664 / (download) - annotate - [select for diffs], Thu Feb 26 15:07:33 2009 UTC (15 years, 1 month ago) by jmcneill
Branch: MAIN
CVS Tags: nick-hppapmap-base2
Changes since 1.663: +6 -6 lines
Diff to previous 1.663 (colored)

PR# port-i386/38936: system can not power down via acpi

Merge change from amd64 machdep.c revision 1.42:

in cpu_reboot(), only halt the other CPUs after we've done the powerdown stuff.
the ACPI code may end up removing some pmap entries, which wants the other
CPUs to still be running to handle TLB invalidations.

Revision 1.663 / (download) - annotate - [select for diffs], Thu Feb 26 13:56:46 2009 UTC (15 years, 1 month ago) by jmcneill
Branch: MAIN
Changes since 1.662: +6 -2 lines
Diff to previous 1.662 (colored)

PR# port-i386/40751: power button does not work after halt
PR# kern/37506: Have to hold power button for 5 seconds to turn off Laptop
    after "halt" command.

Transfer the system from ACPI to Legacy mode if RB_HALT is set.

Revision 1.644.4.7 / (download) - annotate - [select for diffs], Wed Feb 25 03:21:56 2009 UTC (15 years, 1 month ago) by snj
Branch: netbsd-5
Changes since 1.644.4.6: +3 -2 lines
Diff to previous 1.644.4.6 (colored) to branchpoint 1.644 (colored)

Apply patch (requested by ahoka in ticket #489):
Add missing opt_multiboot.h.  Fixes issues when using a multiboot
bootloader, like GRUB:
- dmesg did not contain the information about the loader
- /dev/ksyms did not work

Revision 1.662 / (download) - annotate - [select for diffs], Sun Feb 22 18:05:42 2009 UTC (15 years, 1 month ago) by ahoka
Branch: MAIN
Changes since 1.661: +3 -2 lines
Diff to previous 1.661 (colored)

Add a missing opt_multiboot.h into sys/arch/i386/i386/machdep.c.
Also do the missed rename of multiboot_ksyms_init to
multiboot_ksyms_addsyms_elf to compile with MULTIBOOT set.

This caused a minor and a more serious bug in the past:
- dmesg did not contain the information about the loader
- /dev/ksyms did not work when the kernel was booted with a
  multiboot bootloader (grub for example)

Ok by jmcneill, joerg.

Revision 1.661 / (download) - annotate - [select for diffs], Fri Feb 13 22:41:02 2009 UTC (15 years, 2 months ago) by apb
Branch: MAIN
Changes since 1.660: +3 -2 lines
Diff to previous 1.660 (colored)

Use "defopt MODULAR" in sys/conf/files, and #include "opt_modular.h"
in all kernel sources that use the MODULAR option.
Proposed in tech-kern on 18 Jan 2009.

Revision 1.660 / (download) - annotate - [select for diffs], Fri Feb 13 20:42:24 2009 UTC (15 years, 2 months ago) by bouyer
Branch: MAIN
Changes since 1.659: +10 -11 lines
Diff to previous 1.659 (colored)

Prepare for PCI frontend support in Xen3 domUs:
call x86_bus_space_init() and x86_bus_space_mallocok() if we have ISA or PCI
  devices configured; not only for non-Xen or dom0 Xen
On Xen, always call PHYSDEVOP_SET_IOPL on context switch
on amd64, also call PHYSDEVOP_SET_IOPL from x86_64_proc0_tss_ldt_init()

Revision 1.659 / (download) - annotate - [select for diffs], Thu Feb 5 22:26:53 2009 UTC (15 years, 2 months ago) by dyoung
Branch: MAIN
Branch point for: jym-xensuspend
Changes since 1.658: +3 -3 lines
Diff to previous 1.658 (colored)

Explicitly initialize mem_cluster_cnt to 0 for my peace of mind.

Revision 1.644.4.6 / (download) - annotate - [select for diffs], Mon Feb 2 21:42:07 2009 UTC (15 years, 2 months ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-0-RC2
Changes since 1.644.4.5: +2 -4 lines
Diff to previous 1.644.4.5 (colored) to branchpoint 1.644 (colored)

Pull up following revision(s) (requested by ad in ticket #396):
	sys/arch/i386/i386/machdep.c: revision 1.658
remove extra variable

Revision 1.644.4.5 / (download) - annotate - [select for diffs], Mon Feb 2 21:38:50 2009 UTC (15 years, 2 months ago) by snj
Branch: netbsd-5
Changes since 1.644.4.4: +3 -40 lines
Diff to previous 1.644.4.4 (colored) to branchpoint 1.644 (colored)

Pull up following revision(s) (requested by ad in ticket #396):
	sys/arch/amd64/amd64/machdep.c: revision 1.122
	sys/arch/i386/i386/machdep.c: revision 1.657
	sys/arch/x86/include/cpufunc.h: revision 1.11
	sys/arch/x86/x86/x86_machdep.c: revision 1.28
factor out common reset code.

Revision 1.644.4.4 / (download) - annotate - [select for diffs], Mon Feb 2 21:26:18 2009 UTC (15 years, 2 months ago) by snj
Branch: netbsd-5
Changes since 1.644.4.3: +6 -4 lines
Diff to previous 1.644.4.3 (colored) to branchpoint 1.644 (colored)

Pull up following revision(s) (requested by ad in ticket #396):
	sys/arch/amd64/amd64/machdep.c: revision 1.121
	sys/arch/i386/i386/machdep.c: revision 1.656
Make previous compile.

Revision 1.644.4.3 / (download) - annotate - [select for diffs], Mon Feb 2 21:24:31 2009 UTC (15 years, 2 months ago) by snj
Branch: netbsd-5
Changes since 1.644.4.2: +31 -2 lines
Diff to previous 1.644.4.2 (colored) to branchpoint 1.644 (colored)

Pull up following revision(s) (requested by ad in ticket #396):
	sys/arch/i386/i386/machdep.c: revision 1.655
Attempt to force resets using two more methods:
1. Reset Control register at I/O port 0xcf9
2. Fast A20 and Init register at I/O port 0x92
Requested by ad@

Revision 1.658 / (download) - annotate - [select for diffs], Tue Jan 27 22:00:12 2009 UTC (15 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.657: +2 -4 lines
Diff to previous 1.657 (colored)

remove extra variable

Revision 1.657 / (download) - annotate - [select for diffs], Tue Jan 27 21:59:24 2009 UTC (15 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.656: +3 -40 lines
Diff to previous 1.656 (colored)

factor out common reset code.

Revision 1.656 / (download) - annotate - [select for diffs], Tue Jan 27 21:13:57 2009 UTC (15 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.655: +6 -4 lines
Diff to previous 1.655 (colored)

Make previous compile.

Revision 1.655 / (download) - annotate - [select for diffs], Tue Jan 27 16:13:13 2009 UTC (15 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.654: +31 -2 lines
Diff to previous 1.654 (colored)

Attempt to force resets using two more methods:
1. Reset Control register at I/O port 0xcf9
2. Fast A20 and Init register at I/O port 0x92

Requested by ad@

Revision 1.644.2.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:16:15 2009 UTC (15 years, 2 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.644: +45 -500 lines
Diff to previous 1.644 (colored)

Sync with HEAD.

Revision 1.626.6.6 / (download) - annotate - [select for diffs], Sat Jan 17 13:28:03 2009 UTC (15 years, 2 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.626.6.5: +77 -492 lines
Diff to previous 1.626.6.5 (colored) to branchpoint 1.626 (colored) next main 1.627 (colored)

Sync with HEAD.

Revision 1.654 / (download) - annotate - [select for diffs], Mon Dec 15 22:20:52 2008 UTC (15 years, 4 months ago) by cegger
Branch: MAIN
CVS Tags: mjf-devfs2-base
Changes since 1.653: +3 -3 lines
Diff to previous 1.653 (colored)

cleanup BIOS memmap code:
- get rid of some nested externs
- reduce dependency on global variables
- some preparations for upcoming pmem(9)

Revision 1.637.2.2 / (download) - annotate - [select for diffs], Sat Dec 13 01:13:14 2008 UTC (15 years, 4 months ago) by haad
Branch: haad-dm
Changes since 1.637.2.1: +46 -501 lines
Diff to previous 1.637.2.1 (colored) to branchpoint 1.637 (colored) next main 1.638 (colored)

Update haad-dm branch to haad-dm-base2.

Revision 1.653 / (download) - annotate - [select for diffs], Sun Nov 30 18:21:34 2008 UTC (15 years, 4 months ago) by martin
Branch: MAIN
CVS Tags: haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Changes since 1.652: +5 -5 lines
Diff to previous 1.652 (colored)

As discussed on tech-kern: mutex_init is too heavyweight for early bootstrap
phases, so move the initialization of the ksyms mutex back into main via
a function called ksyms_init. Rename the existing (but quite different)
ksyms_init* variations into ksyms_addsyms_elf() and ksyms_addsyms_explicit()
and adapt machdep code accordingly.

Revision 1.652 / (download) - annotate - [select for diffs], Thu Nov 20 10:53:09 2008 UTC (15 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.651: +2 -96 lines
Diff to previous 1.651 (colored)

Put the COMPAT_NOMID stuff into its own file.

Revision 1.644.4.2 / (download) - annotate - [select for diffs], Thu Nov 20 03:45:29 2008 UTC (15 years, 4 months ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-0-RC1
Changes since 1.644.4.1: +13 -16 lines
Diff to previous 1.644.4.1 (colored) to branchpoint 1.644 (colored)

Pull up following revision(s) (requested by ad in ticket #71):
	sys/arch/i386/isa/npx.c: revision 1.132
	sys/arch/amd64/amd64/fpu.c: revision 1.29
	sys/arch/amd64/amd64/machdep.c: revision 1.105
	sys/arch/i386/i386/machdep.c: revision 1.647
PR port-i386/39299 FPU use in signal handlers is unsafe

Revision 1.651 / (download) - annotate - [select for diffs], Wed Nov 19 18:35:59 2008 UTC (15 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.650: +8 -36 lines
Diff to previous 1.650 (colored)

Make the emulations, exec formats, coredump, NFS, and the NFS server
into modules. By and large this commit:

- shuffles header files and ifdefs
- splits code out where necessary to be modular
- adds module glue for each of the components
- adds/replaces hooks for things that can be installed at runtime

Revision 1.644.4.1 / (download) - annotate - [select for diffs], Mon Nov 17 18:53:54 2008 UTC (15 years, 4 months ago) by snj
Branch: netbsd-5
Changes since 1.644: +3 -3 lines
Diff to previous 1.644 (colored)

Pull up following revision(s) (requested by ad in ticket #74):
	sys/arch/i386/isa/npx.c: revision 1.131
	sys/arch/amd64/amd64/fpu.c: revision 1.28
	sys/arch/i386/i386/genassym.cf: revision 1.77
	sys/arch/i386/i386/autoconf.c: revision 1.93
	sys/arch/amd64/amd64/locore.S: revision 1.48
	sys/arch/amd64/amd64/machdep.c: revision 1.104
	sys/arch/i386/i386/machdep.c: revision 1.646
	sys/arch/amd64/amd64/genassym.cf: revision 1.38
	sys/arch/i386/i386/locore.S: revision 1.79
PR port-amd64/38293 panic: fp_save ipi didn't
Fix race conditions in FPU IPI handling.

Revision 1.650 / (download) - annotate - [select for diffs], Fri Nov 14 00:41:36 2008 UTC (15 years, 5 months ago) by cegger
Branch: MAIN
Changes since 1.649: +10 -354 lines
Diff to previous 1.649 (colored)

merge BIOS memmap code from i386/i386/machdep.c:init386() and amd64/amd64/machdep.c:init_x86_64 into x86/x86/x86_machdep.c

Revision 1.649 / (download) - annotate - [select for diffs], Wed Nov 12 12:36:02 2008 UTC (15 years, 5 months ago) by ad
Branch: MAIN
Changes since 1.648: +3 -3 lines
Diff to previous 1.648 (colored)

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.

Revision 1.648 / (download) - annotate - [select for diffs], Wed Nov 12 01:14:01 2008 UTC (15 years, 5 months ago) by cegger
Branch: MAIN
Changes since 1.647: +27 -23 lines
Diff to previous 1.647 (colored)

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.

Revision 1.647 / (download) - annotate - [select for diffs], Tue Nov 11 15:53:53 2008 UTC (15 years, 5 months ago) by ad
Branch: MAIN
Changes since 1.646: +13 -16 lines
Diff to previous 1.646 (colored)

PR port-i386/39299 FPU use in signal handlers is unsafe

Revision 1.646 / (download) - annotate - [select for diffs], Tue Nov 11 14:40:18 2008 UTC (15 years, 5 months ago) by ad
Branch: MAIN
Changes since 1.645: +3 -3 lines
Diff to previous 1.645 (colored)

PR port-amd64/38293 panic: fp_save ipi didn't

Fix race conditions in FPU IPI handling.

Revision 1.645 / (download) - annotate - [select for diffs], Tue Nov 11 06:46:42 2008 UTC (15 years, 5 months ago) by dyoung
Branch: MAIN
Changes since 1.644: +13 -3 lines
Diff to previous 1.644 (colored)

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.

Revision 1.644 / (download) - annotate - [select for diffs], Tue Oct 21 15:46:32 2008 UTC (15 years, 5 months ago) by cegger
Branch: MAIN
CVS Tags: netbsd-5-base, matt-mips64-base2
Branch point for: nick-hppapmap, netbsd-5
Changes since 1.643: +3 -3 lines
Diff to previous 1.643 (colored)

introduce two macros: xendomain_is_dom0() and xendomain_is_privileged(). Use them.

Revision 1.637.2.1 / (download) - annotate - [select for diffs], Sun Oct 19 22:15:48 2008 UTC (15 years, 5 months ago) by haad
Branch: haad-dm
Changes since 1.637: +64 -15 lines
Diff to previous 1.637 (colored)

Sync with HEAD.

Revision 1.643 / (download) - annotate - [select for diffs], Wed Oct 15 06:51:17 2008 UTC (15 years, 6 months ago) by wrstuden
Branch: MAIN
CVS Tags: haad-dm-base1
Changes since 1.642: +42 -2 lines
Diff to previous 1.642 (colored)

Merge wrstuden-revivesa into HEAD.

Revision 1.626.6.5 / (download) - annotate - [select for diffs], Sun Sep 28 10:39:59 2008 UTC (15 years, 6 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.626.6.4: +22 -13 lines
Diff to previous 1.626.6.4 (colored) to branchpoint 1.626 (colored)

Sync with HEAD.

Revision 1.634.2.6 / (download) - annotate - [select for diffs], Wed Sep 24 16:38:49 2008 UTC (15 years, 6 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.634.2.5: +3 -4 lines
Diff to previous 1.634.2.5 (colored) next main 1.635 (colored)

Merge in changes between wrstuden-revivesa-base-2 and
wrstuden-revivesa-base-3.

Revision 1.642 / (download) - annotate - [select for diffs], Thu Sep 18 15:57:04 2008 UTC (15 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3
Changes since 1.641: +3 -3 lines
Diff to previous 1.641 (colored)

Define a PSL_CLEARSIG macro for the psl flags to be cleared on signal delivery
and use it everywhere.

Revision 1.634.2.5 / (download) - annotate - [select for diffs], Thu Sep 18 04:33:27 2008 UTC (15 years, 6 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.634.2.4: +23 -21 lines
Diff to previous 1.634.2.4 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.641 / (download) - annotate - [select for diffs], Tue Sep 9 12:09:31 2008 UTC (15 years, 7 months ago) by tron
Branch: MAIN
Changes since 1.640: +2 -3 lines
Diff to previous 1.640 (colored)

Remove duplicate definition of "bootinfo" structure.
Patch provided by Juan RP in PR kern/39495.

Revision 1.640 / (download) - annotate - [select for diffs], Tue Aug 26 08:43:00 2008 UTC (15 years, 7 months ago) by cegger
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-2
Changes since 1.639: +17 -4 lines
Diff to previous 1.639 (colored)

Xen: Mark NMI and machine check handlers as interrupt gates.

Revision 1.639 / (download) - annotate - [select for diffs], Fri Aug 15 03:14:54 2008 UTC (15 years, 8 months ago) by simonb
Branch: MAIN
Changes since 1.638: +4 -3 lines
Diff to previous 1.638 (colored)

Wrap long line.

Revision 1.638 / (download) - annotate - [select for diffs], Tue Aug 5 17:09:17 2008 UTC (15 years, 8 months ago) by drochner
Branch: MAIN
Changes since 1.637: +6 -10 lines
Diff to previous 1.637 (colored)

Disable interrupts before shutdownhooks are run, as all other ports.
shutdownhooks need to use polling functions (and most do).

Revision 1.636.2.1 / (download) - annotate - [select for diffs], Thu Jul 3 18:37:53 2008 UTC (15 years, 9 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.636: +2 -10 lines
Diff to previous 1.636 (colored) next main 1.637 (colored)

Sync with head.

Revision 1.626.6.4 / (download) - annotate - [select for diffs], Wed Jul 2 19:08:16 2008 UTC (15 years, 9 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.626.6.3: +0 -8 lines
Diff to previous 1.626.6.3 (colored) to branchpoint 1.626 (colored)

Sync with HEAD.

Revision 1.637 / (download) - annotate - [select for diffs], Wed Jul 2 17:28:55 2008 UTC (15 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: simonb-wapbl-nbase, simonb-wapbl-base
Branch point for: haad-dm
Changes since 1.636: +2 -10 lines
Diff to previous 1.636 (colored)

Replce exec_map with a pool. Proposed on tech-kern@, reviewed by chs@.

Revision 1.626.6.3 / (download) - annotate - [select for diffs], Sun Jun 29 09:32:57 2008 UTC (15 years, 9 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.626.6.2: +8 -4 lines
Diff to previous 1.626.6.2 (colored) to branchpoint 1.626 (colored)

Sync with HEAD.

Revision 1.634.2.4 / (download) - annotate - [select for diffs], Mon Jun 23 04:30:26 2008 UTC (15 years, 9 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.634.2.3: +11 -8 lines
Diff to previous 1.634.2.3 (colored)

Sync w/ -current. 34 merge conflicts to follow.

Revision 1.634.2.3 / (download) - annotate - [select for diffs], Sun Jun 22 18:12:02 2008 UTC (15 years, 9 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.634.2.2: +40 -2 lines
Diff to previous 1.634.2.2 (colored)

Re-add cpu_upcall() and page fault code. i386 kernels now compile.
They don't boot, but that seems to be a consequence of current from the
day this branch was started.

Revision 1.627.2.2 / (download) - annotate - [select for diffs], Tue Jun 17 09:14:03 2008 UTC (15 years, 10 months ago) by yamt
Branch: yamt-pf42
Changes since 1.627.2.1: +10 -6 lines
Diff to previous 1.627.2.1 (colored) to branchpoint 1.627 (colored) next main 1.628 (colored)

sync with head.

Revision 1.636 / (download) - annotate - [select for diffs], Thu Jun 5 21:44:31 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base4, wrstuden-revivesa-base-1, wrstuden-revivesa-base
Branch point for: simonb-wapbl
Changes since 1.635: +10 -6 lines
Diff to previous 1.635 (colored)

Leave interrupts on for the shutdownhooks. Should fix the panics on
shutdown.

Revision 1.626.6.2 / (download) - annotate - [select for diffs], Mon Jun 2 13:22:15 2008 UTC (15 years, 10 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.626.6.1: +45 -33 lines
Diff to previous 1.626.6.1 (colored) to branchpoint 1.626 (colored)

Sync with HEAD.

Revision 1.627.2.1 / (download) - annotate - [select for diffs], Sun May 18 12:32:10 2008 UTC (15 years, 10 months ago) by yamt
Branch: yamt-pf42
Changes since 1.627: +47 -35 lines
Diff to previous 1.627 (colored)

sync with head.

Revision 1.629.2.1 / (download) - annotate - [select for diffs], Fri May 16 02:22:34 2008 UTC (15 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.629: +39 -29 lines
Diff to previous 1.629 (colored)

sync with head.

Revision 1.634.2.2 / (download) - annotate - [select for diffs], Wed May 14 19:54:09 2008 UTC (15 years, 11 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.634.2.1: +8 -8 lines
Diff to previous 1.634.2.1 (colored)

Per discussion with ad at n dot o, revert signal mask handling
changes.

The l_sigstk changes are most likely totally un-needed as SA will
never use a signal stack - we send an upcall (or will as other
diffs are brought in).

The l_sigmask changes were too controvertial. In all honesty, I
think it's probably best to revert them. The main reason they were
there is the fact that in an SA process, we don't mask signals per
kernel thread, we mask them per user thread. In the kernel, we want
them all to get turned into upcalls. Thus the normal state of
l_sigmask in an SA process is for it to always be empty.

While we are in the process of delivering a signal, we want to
temporarily mask a signal (so we don't recursively exhaust our
upcall stacks). However signal delivery is rare (important, but
rare), and delivering back-to-back signals is even rarer. So rather
than cause every user of a signal mask to be prepared for this very
rare case, we will just add a second check later in the signal
delivery code. Said change is not in this diff.

This also un-compensates all of our compatability code for dealing
with SA. SA is a NetBSD-specific thing, so there's no need for
Irix, Linux, Solaris, SVR4 and so on to cope with it.

As previously, everything other than kern_sa.c compiles in i386
GENERIC as of this checkin. I will switch to ALL soon for compile
testing.

Revision 1.635 / (download) - annotate - [select for diffs], Sun May 11 14:44:54 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base3, yamt-pf42-base2, yamt-nfs-mp-base2, hpcarm-cleanup-nbase
Changes since 1.634: +3 -4 lines
Diff to previous 1.634 (colored)

Simplify x86 identcpu code, and share between i386/amd64.

Revision 1.634.2.1 / (download) - annotate - [select for diffs], Sat May 10 23:48:44 2008 UTC (15 years, 11 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.634: +10 -8 lines
Diff to previous 1.634 (colored)

Initial checkin of re-adding SA. Everything except kern_sa.c
compiles in GENERIC for i386. This is still a work-in-progress, but
this checkin covers most of the mechanical work (changing signalling
to be able to accomidate SA's process-wide signalling and re-adding
includes of sys/sa.h and savar.h). Subsequent changes will be much
more interesting.

Also, kern_sa.c has received partial cleanup. There's still more
to do, though.

Revision 1.634 / (download) - annotate - [select for diffs], Mon May 5 17:47:06 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
Branch point for: wrstuden-revivesa
Changes since 1.633: +8 -2 lines
Diff to previous 1.633 (colored)

Export tsc_freq via sysctl.

Revision 1.633 / (download) - annotate - [select for diffs], Fri May 2 15:26:38 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.632: +13 -2 lines
Diff to previous 1.632 (colored)

- Give x86 BIOS boot the ability to load new style modules and pass them
  into the kernel. Based on a patch by jmcneill@, with many fixes and
  improvements by me.

- Put MEMORY_DISK_DYNAMIC and MODULAR into the GENERIC kernels, so that
  you can load miniroot.kmod from the boot blocks and boot into the
  installer!

Revision 1.632 / (download) - annotate - [select for diffs], Tue Apr 29 15:27:08 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.631: +19 -19 lines
Diff to previous 1.631 (colored)

Get spl framework and interrupt gates working before breaking into DDB
on boot. PR port-amd64/30828.

Revision 1.631 / (download) - annotate - [select for diffs], Mon Apr 28 20:23:24 2008 UTC (15 years, 11 months ago) by martin
Branch: MAIN
Changes since 1.630: +2 -9 lines
Diff to previous 1.630 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.630 / (download) - annotate - [select for diffs], Mon Apr 28 18:15:39 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.629: +4 -3 lines
Diff to previous 1.629 (colored)

Make FPU handling preemption safe.

Revision 1.629 / (download) - annotate - [select for diffs], Thu Apr 24 18:39:20 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base
Branch point for: yamt-nfs-mp
Changes since 1.628: +8 -8 lines
Diff to previous 1.628 (colored)

Merge proc::p_mutex and proc::p_smutex into a single adaptive mutex, since
we no longer need to guard against access from hardware interrupt handlers.

Additionally, if cloning a process with CLONE_SIGHAND, arrange to have the
child process share the parent's lock so that signal state may be kept in
sync. Partially addresses PR kern/37437.

Revision 1.628 / (download) - annotate - [select for diffs], Mon Apr 21 15:15:33 2008 UTC (15 years, 11 months ago) by cegger
Branch: MAIN
Changes since 1.627: +4 -2 lines
Diff to previous 1.627 (colored)

Access Xen's vcpu info structure per-CPU.
Tested on i386 and amd64 (both dom0 and domU) by me.
Xen2 tested (both dom0 and domU) by bouyer.
OK bouyer

Revision 1.626.6.1 / (download) - annotate - [select for diffs], Thu Apr 3 12:42:18 2008 UTC (16 years ago) by mjf
Branch: mjf-devfs2
Changes since 1.626: +2 -73 lines
Diff to previous 1.626 (colored)

Sync with HEAD.

Revision 1.626.2.1 / (download) - annotate - [select for diffs], Mon Mar 24 07:14:59 2008 UTC (16 years ago) by keiichi
Branch: keiichi-mipv6
Changes since 1.626: +2 -73 lines
Diff to previous 1.626 (colored) next main 1.627 (colored)

sync with head.

Revision 1.607.2.3 / (download) - annotate - [select for diffs], Sun Mar 23 02:04:06 2008 UTC (16 years ago) by matt
Branch: matt-armv6
Changes since 1.607.2.2: +266 -359 lines
Diff to previous 1.607.2.2 (colored) to branchpoint 1.607 (colored) next main 1.608 (colored)

sync with HEAD

Revision 1.563.2.10 / (download) - annotate - [select for diffs], Wed Feb 27 08:36:21 2008 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.563.2.9: +2 -74 lines
Diff to previous 1.563.2.9 (colored) next main 1.564 (colored)

sync with head.

Revision 1.627 / (download) - annotate - [select for diffs], Tue Feb 26 18:24:28 2008 UTC (16 years, 1 month ago) by xtraeme
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, yamt-lazymbuf-base15, yamt-lazymbuf-base14, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, hpcarm-cleanup-base, ad-socklock-base1
Branch point for: yamt-pf42
Changes since 1.626: +2 -73 lines
Diff to previous 1.626 (colored)

Split off the Transmeta Crusoe Longrun code into its own file, that
way identcpu.c and machdep.c are not cluttered with foreign code.

The driver is built by default as before, but the sysctl subtree will
only be created if longrun is detected and not always as the old code
did. This matches what the FreeBSD code does.

Ok by christos@.

Revision 1.611.2.4 / (download) - annotate - [select for diffs], Mon Feb 18 21:04:38 2008 UTC (16 years, 1 month ago) by mjf
Branch: mjf-devfs
Changes since 1.611.2.3: +317 -376 lines
Diff to previous 1.611.2.3 (colored) to branchpoint 1.611 (colored) next main 1.612 (colored)

Sync with HEAD.

Revision 1.626 / (download) - annotate - [select for diffs], Tue Feb 12 17:52:18 2008 UTC (16 years, 2 months ago) by joerg
Branch: MAIN
CVS Tags: nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base
Branch point for: mjf-devfs2, keiichi-mipv6
Changes since 1.625: +2 -3 lines
Diff to previous 1.625 (colored)

Don't sleep for 0.5s before powering down the machine with ACPI.

Revision 1.563.2.9 / (download) - annotate - [select for diffs], Mon Feb 4 09:22:07 2008 UTC (16 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.563.2.8: +7 -7 lines
Diff to previous 1.563.2.8 (colored)

sync with head.

Revision 1.625 / (download) - annotate - [select for diffs], Wed Jan 23 19:46:44 2008 UTC (16 years, 2 months ago) by bouyer
Branch: MAIN
Changes since 1.624: +7 -7 lines
Diff to previous 1.624 (colored)

Merge the bouyer-xeni386 branch. This brings in PAE support to NetBSD xeni386
(domU only). PAE support is enabled by 'options PAE', see the new XEN3PAE_DOMU
and INSTALL_XEN3PAE_DOMU kernel config files.

See the comments in arch/i386/include/{pte.h,pmap.h} to see how it works.
In short, we still handle it as a 2-level MMU, with the second level page
directory being 4 pages in size. pmap switching is done by switching the
L2 pages in the L3 entries, instead of loading %cr3. This is almost required
by Xen, which handle the last L2 page (the one mapping 0xc0000000 - 0xffffffff)
in a very special way. But this approach should also work for native PAE
support if ever supported (in fact, the pmap should almost suport native
PAE, what's missing is bootstrap code in locore.S).

Revision 1.563.2.8 / (download) - annotate - [select for diffs], Mon Jan 21 09:37:02 2008 UTC (16 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.563.2.7: +430 -559 lines
Diff to previous 1.563.2.7 (colored)

sync with head

Revision 1.617.2.11 / (download) - annotate - [select for diffs], Sat Jan 19 14:08:09 2008 UTC (16 years, 2 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.617.2.10: +5 -5 lines
Diff to previous 1.617.2.10 (colored) to branchpoint 1.617 (colored) next main 1.618 (colored)

Make things build again after sync with HEAD

Revision 1.617.2.10 / (download) - annotate - [select for diffs], Sat Jan 19 12:14:20 2008 UTC (16 years, 2 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.617.2.9: +5 -623 lines
Diff to previous 1.617.2.9 (colored) to branchpoint 1.617 (colored)

Sync with HEAD

Revision 1.624 / (download) - annotate - [select for diffs], Tue Jan 15 14:50:08 2008 UTC (16 years, 3 months ago) by joerg
Branch: MAIN
CVS Tags: bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.623: +5 -5 lines
Diff to previous 1.623 (colored)

Introduce optional cpu_offline_md to execute MD actions at the end of
cpu_offline. Use this on amd64/i386 to force a FPU save. As this was
triggered by npxsave_cpu/fpusave_cpu not working for a different CPU,
remove the cpu_info argument and adjust npxsave_*/fpusave_* to use bool
for the save.

OK ad@

Revision 1.617.2.9 / (download) - annotate - [select for diffs], Sun Jan 13 11:26:56 2008 UTC (16 years, 3 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.617.2.8: +4 -4 lines
Diff to previous 1.617.2.8 (colored) to branchpoint 1.617 (colored)

Work in progress on xeni386 PAE support:
Make xeni386 build with a 64bit paddr_t. For this vaddr_t vs paddr_t vs
pointers usages had to be clarified.
If 'options PAE' is present in a Xen3 kernel, switch paddr_t, pd_entry_t
and pt_entry_t to 64bits, and add the PAE entry in the __xen_guest ELF section.

Revision 1.623 / (download) - annotate - [select for diffs], Sat Jan 12 20:03:42 2008 UTC (16 years, 3 months ago) by ad
Branch: MAIN
Changes since 1.622: +2 -620 lines
Diff to previous 1.622 (colored)

- Split crashdump code out into its own file.
- Remove NO_SPARSE_DUMP.
- Minor KNF, sprinkle static.

Revision 1.622 / (download) - annotate - [select for diffs], Fri Jan 11 20:00:14 2008 UTC (16 years, 3 months ago) by bouyer
Branch: MAIN
Changes since 1.621: +258 -6 lines
Diff to previous 1.621 (colored)

Merge the bouyer-xeni386 branch to head, at tag bouyer-xeni386-merge1 (the
branch is still active and will see i386PAE support developement).
Sumary of changes:
- switch xeni386 to the x86/x86/pmap.c, and the xen/x86/x86_xpmap.c
  pmap bootstrap.
- merge back most of xen/i386/ to i386/i386
- change the build to reduce diffs between i386 and amd64 in file locations
- remove include files that were identical to the i386/amd64 counterparts,
  the build will find them via the xen-ma/machine link.

Revision 1.617.2.8 / (download) - annotate - [select for diffs], Fri Jan 11 18:04:04 2008 UTC (16 years, 3 months ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.617.2.7: +3 -3 lines
Diff to previous 1.617.2.7 (colored) to branchpoint 1.617 (colored)

Remove XENDEBUG that slipped in.

Revision 1.617.2.7 / (download) - annotate - [select for diffs], Thu Jan 10 23:43:23 2008 UTC (16 years, 3 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.617.2.6: +419 -74 lines
Diff to previous 1.617.2.6 (colored) to branchpoint 1.617 (colored)

Sync with HEAD

Revision 1.617.2.6 / (download) - annotate - [select for diffs], Thu Jan 10 13:05:51 2008 UTC (16 years, 3 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.617.2.5: +4 -4 lines
Diff to previous 1.617.2.5 (colored) to branchpoint 1.617 (colored)

Change xeni386 build to match xenamd64:
- machine/ points to xen/include/i386
- remove includes that were identical to the i386/include/ ones; the build
  will find them though the xen-ma/machine link.
- include xen files using xen/ not machine/

Revision 1.621 / (download) - annotate - [select for diffs], Thu Jan 10 11:10:35 2008 UTC (16 years, 3 months ago) by tls
Branch: MAIN
Changes since 1.620: +419 -74 lines
Diff to previous 1.620 (colored)

Add sparse kernel core dump ("minidump") support for i386, written by Jed
Davis for Coyote Point.  Though this does not modify the kernel core
format (it uses multiple memory segments, a feature previously unused on
i386) it is nonetheless disabled by default.  Sysctl machdep.sparse_dump=1
to turn this feature on.

Dumps of even busy, large-memory systems are generally a few tens of
megabytes.

Revision 1.617.2.5 / (download) - annotate - [select for diffs], Wed Jan 9 19:25:05 2008 UTC (16 years, 3 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.617.2.4: +2 -3 lines
Diff to previous 1.617.2.4 (colored) to branchpoint 1.617 (colored)

Merge xen bits to i386/i386/gdt.c. Convert remaining uses of PTE_* macros to
pmap_pte_* macros/inlines.
Fix think-o in pmap.c for native i386.

Revision 1.607.2.2 / (download) - annotate - [select for diffs], Wed Jan 9 01:46:38 2008 UTC (16 years, 3 months ago) by matt
Branch: matt-armv6
Changes since 1.607.2.1: +180 -345 lines
Diff to previous 1.607.2.1 (colored) to branchpoint 1.607 (colored)

sync with HEAD

Revision 1.617.2.4 / (download) - annotate - [select for diffs], Tue Jan 8 23:51:51 2008 UTC (16 years, 3 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.617.2.3: +6 -2 lines
Diff to previous 1.617.2.3 (colored) to branchpoint 1.617 (colored)

Make XEN kernels build again.

Revision 1.617.2.3 / (download) - annotate - [select for diffs], Tue Jan 8 22:10:01 2008 UTC (16 years, 3 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.617.2.2: +32 -39 lines
Diff to previous 1.617.2.2 (colored) to branchpoint 1.617 (colored)

Sync with HEAD

Revision 1.617.2.2 / (download) - annotate - [select for diffs], Mon Jan 7 00:34:52 2008 UTC (16 years, 3 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.617.2.1: +250 -4 lines
Diff to previous 1.617.2.1 (colored) to branchpoint 1.617 (colored)

Move Xen support to i386/i386/machdep.c. two less files in xen/ :)

Revision 1.620 / (download) - annotate - [select for diffs], Fri Jan 4 15:55:32 2008 UTC (16 years, 3 months ago) by yamt
Branch: MAIN
CVS Tags: matt-armv6-base
Changes since 1.619: +24 -34 lines
Diff to previous 1.619 (colored)

i386:
	- make tss per-cpu.  this considerably speeds up context switch for,
	  at least, pentium4, where ltr instruction seems very slow.
i386, xen:
	- kill cpu_maxproc.
kvm86:
	- adapt to per-cpu tss.
	- cleanup and simplify.
	- move kvm86_mp_lock to more meaningful place.
	- disable preemption during a call.

Revision 1.617.2.1 / (download) - annotate - [select for diffs], Wed Jan 2 21:48:18 2008 UTC (16 years, 3 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.617: +29 -56 lines
Diff to previous 1.617 (colored)

Sync with HEAD

Revision 1.611.2.3 / (download) - annotate - [select for diffs], Thu Dec 27 00:43:07 2007 UTC (16 years, 3 months ago) by mjf
Branch: mjf-devfs
Changes since 1.611.2.2: +118 -189 lines
Diff to previous 1.611.2.2 (colored) to branchpoint 1.611 (colored)

Sync with HEAD.

Revision 1.616.2.3 / (download) - annotate - [select for diffs], Wed Dec 26 21:38:45 2007 UTC (16 years, 3 months ago) by ad
Branch: vmlocking2
Changes since 1.616.2.2: +145 -243 lines
Diff to previous 1.616.2.2 (colored) to branchpoint 1.616 (colored) next main 1.617 (colored)

Sync with head.

Revision 1.616.2.2 / (download) - annotate - [select for diffs], Wed Dec 26 17:55:04 2007 UTC (16 years, 3 months ago) by ad
Branch: vmlocking2
Changes since 1.616.2.1: +7 -24 lines
Diff to previous 1.616.2.1 (colored) to branchpoint 1.616 (colored)

Back out the dumppcb changes for the time being.

Revision 1.619 / (download) - annotate - [select for diffs], Wed Dec 26 16:28:16 2007 UTC (16 years, 3 months ago) by joerg
Branch: MAIN
CVS Tags: vmlocking2-base3
Changes since 1.618: +25 -5 lines
Diff to previous 1.618 (colored)

Add PHYSMEM_MAX_ADDR and PHYSMEM_MAX_SIZE options. This limit physical
memory based on overall size (useful for debugging to keep core dumps
small) or maximum address (when using devices with bus dma limits).
Contrary to REALBASEMEM and REALEXTMEM, they still use the BIOS memory
map and can therefore deal with fragmented memory.

Revision 1.618 / (download) - annotate - [select for diffs], Wed Dec 26 11:51:10 2007 UTC (16 years, 3 months ago) by yamt
Branch: MAIN
Changes since 1.617: +6 -53 lines
Diff to previous 1.617 (colored)

- share idt entry allocation code among x86.
- introduce a function to reserve an idt entry and use it instead of
  manipulating idt_allocmap directly.
- rename idt to xen_idt for amd64 xen.  add missing #ifdef XEN.

Revision 1.616.2.1 / (download) - annotate - [select for diffs], Wed Dec 12 22:05:40 2007 UTC (16 years, 4 months ago) by ad
Branch: vmlocking2
Changes since 1.616: +24 -7 lines
Diff to previous 1.616 (colored)

- Dump basic trap and register info before entering the debugger, in
  case ddb screws the machine up further.
- Fill dumppcb asap so that gdb has less chance to get confused.

Revision 1.616.4.1 / (download) - annotate - [select for diffs], Tue Dec 11 15:20:32 2007 UTC (16 years, 4 months ago) by yamt
Branch: yamt-kmem
Changes since 1.616: +118 -189 lines
Diff to previous 1.616 (colored) next main 1.617 (colored)

sync with head.

Revision 1.617 / (download) - annotate - [select for diffs], Sun Dec 9 20:27:47 2007 UTC (16 years, 4 months ago) by jmcneill
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, cube-autoconf-base, cube-autoconf
Branch point for: bouyer-xeni386
Changes since 1.616: +118 -189 lines
Diff to previous 1.616 (colored)

Merge jmcneill-pm branch.

Revision 1.606.8.15 / (download) - annotate - [select for diffs], Sun Dec 9 19:35:22 2007 UTC (16 years, 4 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.606.8.14: +2 -5 lines
Diff to previous 1.606.8.14 (colored) to branchpoint 1.606 (colored) next main 1.607 (colored)

Sync with HEAD.

Revision 1.611.2.2 / (download) - annotate - [select for diffs], Sat Dec 8 18:17:10 2007 UTC (16 years, 4 months ago) by mjf
Branch: mjf-devfs
Changes since 1.611.2.1: +2 -5 lines
Diff to previous 1.611.2.1 (colored) to branchpoint 1.611 (colored)

Sync with HEAD.

Revision 1.563.2.7 / (download) - annotate - [select for diffs], Fri Dec 7 17:25:00 2007 UTC (16 years, 4 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.563.2.6: +2 -5 lines
Diff to previous 1.563.2.6 (colored)

sync with head

Revision 1.601.2.13 / (download) - annotate - [select for diffs], Mon Dec 3 19:03:29 2007 UTC (16 years, 4 months ago) by ad
Branch: vmlocking
Changes since 1.601.2.12: +9 -2 lines
Diff to previous 1.601.2.12 (colored) next main 1.602 (colored)

Sync with HEAD.

Revision 1.601.2.12 / (download) - annotate - [select for diffs], Mon Dec 3 18:36:44 2007 UTC (16 years, 4 months ago) by ad
Branch: vmlocking
Changes since 1.601.2.11: +16 -24 lines
Diff to previous 1.601.2.11 (colored)

Sync with HEAD.

Revision 1.616 / (download) - annotate - [select for diffs], Mon Dec 3 15:33:46 2007 UTC (16 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: yamt-kmem-base, vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base
Branch point for: yamt-kmem, vmlocking2
Changes since 1.615: +2 -5 lines
Diff to previous 1.615 (colored)

Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.

Revision 1.606.8.14 / (download) - annotate - [select for diffs], Wed Nov 21 21:53:16 2007 UTC (16 years, 4 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.606.8.13: +7 -19 lines
Diff to previous 1.606.8.13 (colored) to branchpoint 1.606 (colored)

Sync with HEAD.

Revision 1.611.2.1 / (download) - annotate - [select for diffs], Mon Nov 19 00:46:27 2007 UTC (16 years, 4 months ago) by mjf
Branch: mjf-devfs
Changes since 1.611: +15 -69 lines
Diff to previous 1.611 (colored)

Sync with HEAD.

Revision 1.608.2.3 / (download) - annotate - [select for diffs], Sun Nov 18 19:34:28 2007 UTC (16 years, 4 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.608.2.2: +5 -17 lines
Diff to previous 1.608.2.2 (colored) to branchpoint 1.608 (colored) next main 1.609 (colored)

Sync with HEAD

Revision 1.563.2.6 / (download) - annotate - [select for diffs], Thu Nov 15 11:42:56 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.563.2.5: +15 -69 lines
Diff to previous 1.563.2.5 (colored)

sync with head.

Revision 1.606.8.13 / (download) - annotate - [select for diffs], Wed Nov 14 19:04:12 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.606.8.12: +2 -48 lines
Diff to previous 1.606.8.12 (colored) to branchpoint 1.606 (colored)

Sync with HEAD.

Revision 1.615 / (download) - annotate - [select for diffs], Wed Nov 14 17:50:13 2007 UTC (16 years, 5 months ago) by ad
Branch: MAIN
CVS Tags: bouyer-xenamd64-base2, bouyer-xenamd64-base
Changes since 1.614: +7 -19 lines
Diff to previous 1.614 (colored)

- Set a 4GB limit for GUCODEBIG_SEL, GCPU_SEL and GUDATA_SEL. It can speed
  up address generation by the MMU.
- Clear the direction flag before entering a signal handler.
- Don't test for I586_CPU.

Revision 1.608.2.2 / (download) - annotate - [select for diffs], Tue Nov 13 15:58:33 2007 UTC (16 years, 5 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.608.2.1: +9 -51 lines
Diff to previous 1.608.2.1 (colored) to branchpoint 1.608 (colored)

Sync with HEAD

Revision 1.614 / (download) - annotate - [select for diffs], Mon Nov 12 19:02:26 2007 UTC (16 years, 5 months ago) by ad
Branch: MAIN
Changes since 1.613: +2 -48 lines
Diff to previous 1.613 (colored)

Merge cpu_need_resched() from vmlocking:

- Always do an aston(), even if not sending an IPI. May help with xine.
- Post asts on cpu_onproc, not ci_curlwp.

Revision 1.606.8.12 / (download) - annotate - [select for diffs], Sun Nov 11 16:46:32 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.606.8.11: +10 -6 lines
Diff to previous 1.606.8.11 (colored) to branchpoint 1.606 (colored)

Sync with HEAD.

Revision 1.613 / (download) - annotate - [select for diffs], Sat Nov 10 23:04:29 2007 UTC (16 years, 5 months ago) by ad
Branch: MAIN
Changes since 1.612: +6 -4 lines
Diff to previous 1.612 (colored)

fsbase/gsbase:

- Fix a few bugs with it, in particular fork/exec handling.
- Store the descriptors in the PCB, not in the LWP.

Revision 1.612 / (download) - annotate - [select for diffs], Sat Nov 10 20:06:24 2007 UTC (16 years, 5 months ago) by ad
Branch: MAIN
Changes since 1.611: +8 -6 lines
Diff to previous 1.611 (colored)

- When computing the TSC frequency, call i8254_delay() and not DELAY().
- Use atomics to adjust the pmap reference count, instead of taking locks.
- Implement I386_{SET,GET}_{FS,GS}BASE, allowing %fs and %gs to be used
  as per-thread registers. This is compatible with FreeBSD.
- Run patches after we have attached CPUs, since we then know if the
  system is uniprocessor or not. Eliminates a lot of #ifdef MULTIPROCESSOR
  and makes running MP kernels on UP systems cheaper.
- Patch out many of the 'lock' prefixes to nops if uniprocessor.
- Do a wbinvd after patching to ensure that the trace/instruction cache
  is up to date.

Revision 1.607.2.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:17:31 2007 UTC (16 years, 5 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.607: +8 -13 lines
Diff to previous 1.607 (colored)

sync with HEAD

Revision 1.601.2.11 / (download) - annotate - [select for diffs], Thu Nov 1 21:58:12 2007 UTC (16 years, 5 months ago) by ad
Branch: vmlocking
Changes since 1.601.2.10: +2 -55 lines
Diff to previous 1.601.2.10 (colored)

- Fix interactivity problems under high load. Beacuse soft interrupts
  are being stacked on top of regular LWPs, more often than not aston()
  was being called on a soft interrupt thread instead of a user thread,
  meaning that preemption was not happening on EOI.

- Don't use bool in a couple of data structures. Sub-word writes are not
  always atomic and may clobber other fields in the containing word.

- For SCHED_4BSD, make p_estcpu per thread (l_estcpu). Rework how the
  dynamic priority level is calculated - it's much better behaved now.

- Kill the l_usrpri/l_priority split now that priorities are no longer
  directly assigned by tsleep(). There are three fields describing LWP
  priority:

        l_priority: Dynamic priority calculated by the scheduler.
                This does not change for kernel/realtime threads,
                and always stays within the correct band. Eg for
                timeshared LWPs it never moves out of the user
                priority range. This is basically what l_usrpri
                was before.

        l_inheritedprio: Lent to the LWP due to priority inheritance
                (turnstiles).

        l_kpriority: A boolean value set true the first time an LWP
                sleeps within the kernel. This indicates that the LWP
                should get a priority boost as compensation for blocking.
                lwp_eprio() now does the equivalent of sched_kpri() if
                the flag is set. The flag is cleared in userret().

- Keep track of scheduling class (OTHER, FIFO, RR) in struct lwp, and use
  this to make decisions in a few places where we previously tested for a
  kernel thread.

- Partially fix itimers and usr/sys/intr time accounting in the presence
  of software interrupts.

- Use kthread_create() to create idle LWPs. Move priority definitions
  from the various modules into sys/param.h.

- newlwp -> lwp_create

Revision 1.606.8.11 / (download) - annotate - [select for diffs], Sun Oct 28 20:10:38 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.606.8.10: +3 -3 lines
Diff to previous 1.606.8.10 (colored) to branchpoint 1.606 (colored)

Sync with HEAD.

Revision 1.563.2.5 / (download) - annotate - [select for diffs], Sat Oct 27 11:26:38 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.563.2.4: +8 -13 lines
Diff to previous 1.563.2.4 (colored)

sync with head.

Revision 1.606.8.10 / (download) - annotate - [select for diffs], Fri Oct 26 15:42:35 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.606.8.9: +2 -7 lines
Diff to previous 1.606.8.9 (colored) to branchpoint 1.606 (colored)

Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.

Revision 1.611 / (download) - annotate - [select for diffs], Fri Oct 26 13:24:40 2007 UTC (16 years, 5 months ago) by joerg
Branch: MAIN
CVS Tags: jmcneill-base
Branch point for: mjf-devfs
Changes since 1.610: +3 -3 lines
Diff to previous 1.610 (colored)

Match delay/DELAY on x86 with delay(9). It takes an unsigned int as
argument. Use this and replace the inline assembly (mul + div using the
64bit intermediate result) with normal 32bit multiplication and
division. The compiler can turn the division into a multiplication and
shift, making it even cheaper then the original assembly. For extreme
long delays, just use 64bit arithmetic.

Revision 1.608.2.1 / (download) - annotate - [select for diffs], Thu Oct 25 22:35:50 2007 UTC (16 years, 5 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.608: +2 -7 lines
Diff to previous 1.608 (colored)

Sync with HEAD.

Revision 1.601.2.10 / (download) - annotate - [select for diffs], Tue Oct 23 20:13:03 2007 UTC (16 years, 5 months ago) by ad
Branch: vmlocking
Changes since 1.601.2.9: +2 -7 lines
Diff to previous 1.601.2.9 (colored)

Sync with head.

Revision 1.610 / (download) - annotate - [select for diffs], Thu Oct 18 15:28:35 2007 UTC (16 years, 5 months ago) by yamt
Branch: MAIN
Changes since 1.609: +2 -7 lines
Diff to previous 1.609 (colored)

merge yamt-x86pmap branch.

- reduce differences between amd64 and i386.  notably, share pmap.c
  between them.  it makes several i386 pmap improvements available to
  amd64, including tlb shootdown reduction and bug fixes from Stephan Uphoff.
- implement deferred pmap switching for amd64.
- remove LARGEPAGES option.  always use large pages if available.
  also, make it work on amd64.

Revision 1.609 / (download) - annotate - [select for diffs], Wed Oct 17 19:54:45 2007 UTC (16 years, 6 months ago) by garbled
Branch: MAIN
CVS Tags: yamt-x86pmap-base4
Changes since 1.608: +2 -2 lines
Diff to previous 1.608 (colored)

Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree.  Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches.  The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.

Revision 1.601.2.9 / (download) - annotate - [select for diffs], Wed Oct 10 21:25:53 2007 UTC (16 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.601.2.8: +2 -9 lines
Diff to previous 1.601.2.8 (colored)

Share cpu_intr_p() between amd64/i386.

Revision 1.601.2.8 / (download) - annotate - [select for diffs], Tue Oct 9 13:37:55 2007 UTC (16 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.601.2.7: +7 -7 lines
Diff to previous 1.601.2.7 (colored)

Sync with head.

Revision 1.607.4.2 / (download) - annotate - [select for diffs], Sat Oct 6 15:34:53 2007 UTC (16 years, 6 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.607.4.1: +7 -7 lines
Diff to previous 1.607.4.1 (colored) to branchpoint 1.607 (colored) next main 1.608 (colored)

sync with head.

Revision 1.602.4.2 / (download) - annotate - [select for diffs], Wed Oct 3 19:23:46 2007 UTC (16 years, 6 months ago) by garbled
Branch: ppcoea-renovation
Changes since 1.602.4.1: +29 -18 lines
Diff to previous 1.602.4.1 (colored) to branchpoint 1.602 (colored) next main 1.603 (colored)

Sync with HEAD

Revision 1.606.8.9 / (download) - annotate - [select for diffs], Tue Oct 2 18:27:19 2007 UTC (16 years, 6 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.606.8.8: +7 -7 lines
Diff to previous 1.606.8.8 (colored) to branchpoint 1.606 (colored)

Sync with HEAD.

Revision 1.608 / (download) - annotate - [select for diffs], Wed Sep 26 19:48:37 2007 UTC (16 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base3, yamt-x86pmap-base2, vmlocking-base, ppcoea-renovation-base
Branch point for: bouyer-xenamd64
Changes since 1.607: +7 -7 lines
Diff to previous 1.607 (colored)

x86 changes for pcc and LKMs.

- Replace most inline assembly with proper functions. As a side effect
  this reduces the size of amd64 GENERIC by about 120kB, and i386 by a
  smaller amount. Nearly all of the inlines did something slow, or something
  that does not need to be fast.
- Make curcpu() and curlwp functions proper, unless __GNUC__ && _KERNEL.
  In that case make them inlines. Makes curlwp LKM and preemption safe.
- Make bus_space and bus_dma more LKM friendly.
- Share a few more files between the ports.
- Other minor changes.

Revision 1.607.4.1 / (download) - annotate - [select for diffs], Sun Sep 23 18:28:16 2007 UTC (16 years, 6 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.607: +2 -7 lines
Diff to previous 1.607 (colored)

- sync with amd64.
- pmap_alloc_level: remove fast call special case.
- tweak some printf to work for both of LP64 and LP32.
- remove machdep.nkpde sysctl.
- remove automatic adjustment of nkpde for now.  will revisit later.

Revision 1.606.8.8 / (download) - annotate - [select for diffs], Sat Sep 8 22:03:17 2007 UTC (16 years, 7 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.606.8.7: +2 -9 lines
Diff to previous 1.606.8.7 (colored) to branchpoint 1.606 (colored)

Now that the real mode pages are statically allocated, make
acpi_wakeup_paddr static and local to acpi_wakeup.c.

Revision 1.606.8.7 / (download) - annotate - [select for diffs], Sat Sep 8 21:40:10 2007 UTC (16 years, 7 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.606.8.6: +5 -5 lines
Diff to previous 1.606.8.6 (colored) to branchpoint 1.606 (colored)

Swap low page 4 and 5 (page directory and table) to allow more
consistent growth for amd64.

Revision 1.606.8.6 / (download) - annotate - [select for diffs], Sat Sep 8 13:56:57 2007 UTC (16 years, 7 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.606.8.5: +119 -158 lines
Diff to previous 1.606.8.5 (colored) to branchpoint 1.606 (colored)

Refactor init386 by splitting off the msgbuf allocation, the pte0
setup and the ksym init. Wire down real mode allocations -- no point
in worrying about a few pages. Add a comment about why init386_pte0
is needed and what for. Start to remove the dependency on the identity
mapping in acpi wakeup by mapping the wakecode page to normal kernel
mapping and using that for the setup.

Revision 1.606.8.5 / (download) - annotate - [select for diffs], Sat Sep 8 02:11:36 2007 UTC (16 years, 7 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.606.8.4: +4 -12 lines
Diff to previous 1.606.8.4 (colored) to branchpoint 1.606 (colored)

Revert the MP tramp related changes for now, I'm breaking some
assumptions here and I am not yet ready to face the fallout.

Revision 1.606.8.4 / (download) - annotate - [select for diffs], Sat Sep 8 00:56:48 2007 UTC (16 years, 7 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.606.8.3: +12 -4 lines
Diff to previous 1.606.8.3 (colored) to branchpoint 1.606 (colored)

Actually make the handling for the mp tramp reservation work.

Revision 1.606.8.3 / (download) - annotate - [select for diffs], Sat Sep 8 00:31:35 2007 UTC (16 years, 7 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.606.8.2: +7 -36 lines
Diff to previous 1.606.8.2 (colored) to branchpoint 1.606 (colored)

Start to revamp the ACPI wake code (i386 only, amd64 gets minimal fixes
to keep being compilable):

- In init386 and the amd64 equivalent, just reserve the low-level code.
  Do not map and don't copy the wakecode yet. This avoids the conflicts
  with the MP tramp code as well. The wakecode is expected to be less
  than one page long, which is way too much space.
  acpi_md_get_npages_of_wakecode and acpi_md_install_wakecode are
  dropped, acpi_wakeup_paddr is set instead of the reserved address.
- Split the wakecode into the essential low-level part to setup
  protected mode with paging and valid CS and DS (which stays as
  wakecode) and the rest. Inline beepon and beepoff as they are used
  exactly once.
- Split the acpi_restorecpu and acpi_savecpu assembly from apci_wakeup.c
  and merge acpi_restorecpu with the second half dropped from wakecode.
  Most registers are not exported, just those needed to be patched into
  wakecode. Don't bother to save or restore %eax, it is overriden
  anyway.
- Don't bother to save and restore eflags in acpi_md_sleep, they are
  handled correctly by the assembly. Don't play games with cr3 either,
  we modify the pmap of the running processes. Copy the wakecode
  directly before patching it, after the identity mapping has been
  setup.
- Drop clear_reg and acpi_printcpu.
- Add an commented out broadcast IPI to halt the other CPUs explicitly.

Revision 1.563.2.4 / (download) - annotate - [select for diffs], Mon Sep 3 14:26:41 2007 UTC (16 years, 7 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.563.2.3: +69 -67 lines
Diff to previous 1.563.2.3 (colored)

sync with head.

Revision 1.586.2.4.2.1 / (download) - annotate - [select for diffs], Mon Sep 3 07:03:34 2007 UTC (16 years, 7 months ago) by wrstuden
Branch: wrstuden-fixsa
Changes since 1.586.2.4: +9 -2 lines
Diff to previous 1.586.2.4 (colored) next main 1.586.2.5 (colored)

Sync w/ NetBSD-4-RC_1

Revision 1.606.8.2 / (download) - annotate - [select for diffs], Sun Sep 2 14:39:19 2007 UTC (16 years, 7 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.606.8.1: +7 -3 lines
Diff to previous 1.606.8.1 (colored) to branchpoint 1.606 (colored)

Avoid installing the ACPI wakecode to the same page as the mp trampoline.

Revision 1.586.2.5 / (download) - annotate - [select for diffs], Tue Aug 28 11:46:26 2007 UTC (16 years, 7 months ago) by liamjfoy
Branch: netbsd-4
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, matt-nb4-arm-base, matt-nb4-arm
Changes since 1.586.2.4: +9 -2 lines
Diff to previous 1.586.2.4 (colored) to branchpoint 1.586 (colored)

Pull up following revision(s) (requested by xtraeme in ticket #841):
	sys/arch/i386/i386/machdep.c: revision 1.604
When collecting memory regions from the BIOS, ignore regions that are less
than a page size.

Revision 1.601.2.7 / (download) - annotate - [select for diffs], Mon Aug 20 18:38:13 2007 UTC (16 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.601.2.6: +4 -3 lines
Diff to previous 1.601.2.6 (colored)

Sync with HEAD.

Revision 1.606.4.1 / (download) - annotate - [select for diffs], Wed Aug 15 13:47:24 2007 UTC (16 years, 8 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.606: +4 -3 lines
Diff to previous 1.606 (colored) next main 1.607 (colored)

Sync with HEAD.

Revision 1.606.8.1 / (download) - annotate - [select for diffs], Thu Aug 9 02:36:57 2007 UTC (16 years, 8 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.606: +4 -3 lines
Diff to previous 1.606 (colored)

Sync with HEAD.

Revision 1.607 / (download) - annotate - [select for diffs], Tue Aug 7 11:30:20 2007 UTC (16 years, 8 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base, nick-csl-alignment-base5
Branch point for: yamt-x86pmap, matt-armv6
Changes since 1.606: +4 -3 lines
Diff to previous 1.606 (colored)

More calls to pmap_update().

Revision 1.601.2.6 / (download) - annotate - [select for diffs], Sun Jul 15 15:52:36 2007 UTC (16 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.601.2.5: +10 -3 lines
Diff to previous 1.601.2.5 (colored)

Sync with head.

Revision 1.601.4.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:00:00 2007 UTC (16 years, 9 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.601: +53 -52 lines
Diff to previous 1.601 (colored) next main 1.602 (colored)

Sync with head.

Revision 1.606 / (download) - annotate - [select for diffs], Mon Jul 9 20:52:15 2007 UTC (16 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: nick-csl-alignment-base, mjf-ufs-trans-base, matt-mips64-base, matt-mips64, hpcarm-cleanup
Branch point for: nick-csl-alignment, jmcneill-pm
Changes since 1.605: +14 -11 lines
Diff to previous 1.605 (colored)

Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements

Revision 1.605 / (download) - annotate - [select for diffs], Sun Jul 8 10:19:22 2007 UTC (16 years, 9 months ago) by pooka
Branch: MAIN
Changes since 1.604: +3 -3 lines
Diff to previous 1.604 (colored)

Initialize the link context in a signal frame to the receiving lwp's
link context instead of NULL.  Otherwise, if we got a signal while the
lwp had a link context set, the link context would be set to NULL upon
return from signal delivery.

christos@tech-kern: "I think you are right."

Revision 1.604 / (download) - annotate - [select for diffs], Tue Jun 26 20:11:12 2007 UTC (16 years, 9 months ago) by briggs
Branch: MAIN
Changes since 1.603: +9 -2 lines
Diff to previous 1.603 (colored)

When collecting memory regions from the BIOS, ignore regions that are less
than a page size.  This assists a decTOP Geode-based system that reports
memory regions:
        start      end         size       type
	0x00000000 0x0009e000  0x0009e000 1 (Memory)
	0x00100000 0x06be3c00  0x06ae3c00 1 (Memory)
	0x06be3c00 0x06be6000  0x00002400 3 (ACPI)
	0x06fff800 0x06fffc00  0x00000400 1 (Memory)
	0x06fffc00 0x07000000  0x00000400 4 (NVS)

Revision 1.601.2.5 / (download) - annotate - [select for diffs], Sun Jun 17 21:30:37 2007 UTC (16 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.601.2.4: +9 -5 lines
Diff to previous 1.601.2.4 (colored)

- Increase the number of thread priorities from 128 to 256. How the space
  is set up is to be revisited.
- Implement soft interrupts as kernel threads. A generic implementation
  is provided, with hooks for fast-path MD code that can run the interrupt
  threads over the top of other threads executing in the kernel.
- Split vnode::v_flag into three fields, depending on how the flag is
  locked (by the interlock, by the vnode lock, by the file system).
- Miscellaneous locking fixes and improvements.

Revision 1.601.2.4 / (download) - annotate - [select for diffs], Sun May 27 12:27:31 2007 UTC (16 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.601.2.3: +29 -42 lines
Diff to previous 1.601.2.3 (colored)

Sync with head.

Revision 1.602.4.1 / (download) - annotate - [select for diffs], Tue May 22 17:26:59 2007 UTC (16 years, 10 months ago) by matt
Branch: ppcoea-renovation
Changes since 1.602: +29 -42 lines
Diff to previous 1.602 (colored)

Update to HEAD.

Revision 1.603 / (download) - annotate - [select for diffs], Thu May 17 14:51:21 2007 UTC (16 years, 11 months ago) by yamt
Branch: MAIN
Changes since 1.602: +29 -42 lines
Diff to previous 1.602 (colored)

merge yamt-idlelwp branch.  asked by core@.  some ports still needs work.

from doc/BRANCHES:

	idle lwp, and some changes depending on it.

	1. separate context switching and thread scheduling.
	   (cf. gmcgarry_ctxsw)
	2. implement idle lwp.
	3. clean up related MD/MI interfaces.
	4. make scheduler(s) modular.

Revision 1.586.2.4 / (download) - annotate - [select for diffs], Fri Apr 20 20:31:25 2007 UTC (16 years, 11 months ago) by bouyer
Branch: netbsd-4
Branch point for: wrstuden-fixsa
Changes since 1.586.2.3: +6 -2 lines
Diff to previous 1.586.2.3 (colored) to branchpoint 1.586 (colored)

Pull up following revision(s) (requested by mlelstv in ticket #575):
	sys/arch/i386/i386/est.c		sync with 1.37
	sys/arch/i386/i386/ipifuncs.c		sync with 1.16
	sys/arch/x86/include/cpu_msr.h		sync with 1.4
	sys/arch/x86/include/intrdefs.h		sync with 1.8
	sys/arch/x86/include/powernow.h		sync with 1.9
	sys/arch/x86/x86/powernow_k8.c		sync with 1.20
	sys/arch/x86/x86/msr_ipifuncs.c		sync with 1.8
	sys/arch/amd64/amd64/ipifuncs.c		sync with 1.9
	sys/arch/i386/i386/identcpu.c		patch
	sys/arch/i386/i386/machdep.c		patch
	sys/arch/i386/include/cpu.h		patch
	sys/arch/x86/conf/files.x86		patch
	sys/arch/x86/x86/x86_machdep.c		patch
	sys/arch/amd64/amd64/machdep.c		patch
Add MSR write IPI handler for x86. Use it and the RUN_ONCE framework
to make est and powernow drivers work properly with SMP.

Revision 1.601.2.3 / (download) - annotate - [select for diffs], Tue Apr 10 13:23:05 2007 UTC (17 years ago) by ad
Branch: vmlocking
Changes since 1.601.2.2: +6 -2 lines
Diff to previous 1.601.2.2 (colored)

Sync with head.

Revision 1.601.2.2 / (download) - annotate - [select for diffs], Tue Apr 10 12:11:18 2007 UTC (17 years ago) by ad
Branch: vmlocking
Changes since 1.601.2.1: +12 -9 lines
Diff to previous 1.601.2.1 (colored)

Replace some more locks.

Revision 1.601.6.1 / (download) - annotate - [select for diffs], Thu Mar 29 19:27:27 2007 UTC (17 years ago) by reinoud
Branch: reinoud-bufcleanup
Changes since 1.601: +6 -2 lines
Diff to previous 1.601 (colored) next main 1.602 (colored)

Pullup to -current

Revision 1.586.2.3 / (download) - annotate - [select for diffs], Wed Mar 28 20:25:36 2007 UTC (17 years ago) by jdc
Branch: netbsd-4
Changes since 1.586.2.2: +15 -2 lines
Diff to previous 1.586.2.2 (colored) to branchpoint 1.586 (colored)

Pull up revision 1.593 (requested by gdt in ticket #521)

Add a heuristic to set rbus_min_start based on total RAM.  The new
behavior is to choose 0.5 GB for <= 192 MB, 1 GB normally, and 2 GB
for >= 1 GB.  This should make the defaults work additionally old
Thinkpad 600Es, and also on notebooks with lots of RAM (e.g. T60 with
2GB).

ok christos@

Revision 1.596.2.12 / (download) - annotate - [select for diffs], Sat Mar 24 14:54:45 2007 UTC (17 years ago) by yamt
Branch: yamt-idlelwp
Changes since 1.596.2.11: +6 -2 lines
Diff to previous 1.596.2.11 (colored) next main 1.597 (colored)

sync with head.

Revision 1.601.2.1 / (download) - annotate - [select for diffs], Wed Mar 21 20:10:18 2007 UTC (17 years ago) by ad
Branch: vmlocking
Changes since 1.601: +4 -4 lines
Diff to previous 1.601 (colored)

GC the simplelock/spinlock debugging stuff.

Revision 1.602 / (download) - annotate - [select for diffs], Tue Mar 20 21:07:39 2007 UTC (17 years ago) by xtraeme
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic
Branch point for: ppcoea-renovation
Changes since 1.601: +6 -2 lines
Diff to previous 1.601 (colored)

MSR read and write IPI handlers for x86. A MSR will be read or written
in all CPUs available in the system. This adds another member
to struct cpu_info, ci_msr_rvalue; it will contain the value of the MSR
in a previous operation.

Tested with clockmod in UP and SMP by me, tested with est in SMP
by Daniel Carosone and Michael Van Elst.

Ok'ed by Andrew Doran and Matthew R. Green.

Revision 1.596.2.11 / (download) - annotate - [select for diffs], Mon Mar 12 05:48:22 2007 UTC (17 years, 1 month ago) by rmind
Branch: yamt-idlelwp
Changes since 1.596.2.10: +16 -16 lines
Diff to previous 1.596.2.10 (colored)

Sync with HEAD.

Revision 1.601 / (download) - annotate - [select for diffs], Wed Mar 7 21:43:43 2007 UTC (17 years, 1 month ago) by thorpej
Branch: MAIN
Branch point for: vmlocking, reinoud-bufcleanup, mjf-ufs-trans
Changes since 1.600: +6 -6 lines
Diff to previous 1.600 (colored)

TRUE -> true, FALSE -> false

Revision 1.600 / (download) - annotate - [select for diffs], Sun Mar 4 05:59:57 2007 UTC (17 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.599: +13 -13 lines
Diff to previous 1.599 (colored)

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.

Revision 1.596.2.10 / (download) - annotate - [select for diffs], Sat Mar 3 08:44:01 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-idlelwp
Changes since 1.596.2.9: +3 -3 lines
Diff to previous 1.596.2.9 (colored)

cpu_need_resched: remove unncessary parens.

Revision 1.596.2.9 / (download) - annotate - [select for diffs], Sat Mar 3 08:39:56 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-idlelwp
Changes since 1.596.2.8: +2 -3 lines
Diff to previous 1.596.2.8 (colored)

cpu_need_resched: whitespace.

Revision 1.596.2.8 / (download) - annotate - [select for diffs], Thu Mar 1 14:26:58 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-idlelwp
Changes since 1.596.2.7: +4 -2 lines
Diff to previous 1.596.2.7 (colored)

cpu_need_resched: don't change the correspondence of { and } with #ifdef.
no functional changes.

Revision 1.596.2.7 / (download) - annotate - [select for diffs], Tue Feb 27 16:51:40 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-idlelwp
Changes since 1.596.2.6: +4 -15 lines
Diff to previous 1.596.2.6 (colored)

- sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.

Revision 1.596.2.6 / (download) - annotate - [select for diffs], Mon Feb 26 20:08:14 2007 UTC (17 years, 1 month ago) by rmind
Branch: yamt-idlelwp
Changes since 1.596.2.5: +4 -3 lines
Diff to previous 1.596.2.5 (colored)

One should send an IPI only in MP case.

Revision 1.596.2.5 / (download) - annotate - [select for diffs], Mon Feb 26 09:18:09 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-idlelwp
Changes since 1.596.2.4: +15 -8 lines
Diff to previous 1.596.2.4 (colored)

add an "immediate" flag for cpu_need_resched().  suggested by Andrew Doran.

Revision 1.563.2.3 / (download) - annotate - [select for diffs], Mon Feb 26 09:06:56 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.563.2.2: +152 -79 lines
Diff to previous 1.563.2.2 (colored)

sync with head.

Revision 1.596.2.4 / (download) - annotate - [select for diffs], Fri Feb 23 15:57:46 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-idlelwp
Changes since 1.596.2.3: +3 -6 lines
Diff to previous 1.596.2.3 (colored)

- introduce sys/cpu.h which has cpu_idle and cpu_need_resched.
- use it where appropriate.
- while i'm here, remove several unnecessary #include.

Revision 1.599 / (download) - annotate - [select for diffs], Wed Feb 21 22:59:43 2007 UTC (17 years, 1 month ago) by thorpej
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Changes since 1.598: +3 -3 lines
Diff to previous 1.598 (colored)

Replace the Mach-derived boolean_t type with the C99 bool type.  A
future commit will replace use of TRUE and FALSE with true and false.

Revision 1.598 / (download) - annotate - [select for diffs], Sun Feb 18 18:20:26 2007 UTC (17 years, 1 month ago) by dsl
Branch: MAIN
Changes since 1.597: +2 -12 lines
Diff to previous 1.597 (colored)

Get config(1) to supply the default parameters for BEEP_ON_HALT.

Revision 1.597 / (download) - annotate - [select for diffs], Sun Feb 18 17:11:27 2007 UTC (17 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.596: +3 -4 lines
Diff to previous 1.596 (colored)

Drop proc::p_smutex before calling cpu_getmcontext().

Revision 1.596.2.3 / (download) - annotate - [select for diffs], Sat Feb 17 14:03:05 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-idlelwp
Changes since 1.596.2.2: +4 -3 lines
Diff to previous 1.596.2.2 (colored)

if available, use monitor/mwait rather than cli/sti/hlt.

Revision 1.596.2.2 / (download) - annotate - [select for diffs], Sat Feb 17 10:30:45 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-idlelwp
Changes since 1.596.2.1: +2535 -0 lines
Diff to previous 1.596.2.1 (colored)

- separate context switching and thread scheduling.
- introduce idle lwp.
- change some related MD/MI interfaces and implement i386 version.

Revision 1.596.2.1, Sat Feb 17 00:28:24 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-idlelwp
Changes since 1.596: +0 -2555 lines
FILE REMOVED

file machdep.c was added on branch yamt-idlelwp on 2007-02-17 10:30:45 +0000

Revision 1.596 / (download) - annotate - [select for diffs], Sat Feb 17 00:28:24 2007 UTC (17 years, 1 month ago) by daniel
Branch: MAIN
Branch point for: yamt-idlelwp
Changes since 1.595: +4 -2 lines
Diff to previous 1.595 (colored)

Add an opencrypto provider for the AES xcrypt instructions found on VIA
C5P and later cores (also known as 'ACE', which is part of the VIA PadLock
security engine). Ported from OpenBSD.

Reviewed on tech-crypto and port-i386, no objections to commiting this.

Revision 1.595 / (download) - annotate - [select for diffs], Fri Feb 9 21:55:04 2007 UTC (17 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: post-newlock2-merge
Changes since 1.594: +50 -56 lines
Diff to previous 1.594 (colored)

Merge newlock2 to head.

Revision 1.577.4.10 / (download) - annotate - [select for diffs], Fri Feb 9 21:03:49 2007 UTC (17 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.577.4.9: +4 -2 lines
Diff to previous 1.577.4.9 (colored) to branchpoint 1.577 (colored) next main 1.578 (colored)

Sync with HEAD.

Revision 1.586.2.2 / (download) - annotate - [select for diffs], Wed Feb 7 12:53:10 2007 UTC (17 years, 2 months ago) by tron
Branch: netbsd-4
Changes since 1.586.2.1: +5 -5 lines
Diff to previous 1.586.2.1 (colored) to branchpoint 1.586 (colored)

Pull up following revision(s) (requested by pavel in ticket #397):
	sys/arch/i386/i386/machdep.c: revision 1.590
correct whitespace in last commit.

Revision 1.586.2.1 / (download) - annotate - [select for diffs], Wed Feb 7 12:51:44 2007 UTC (17 years, 2 months ago) by tron
Branch: netbsd-4
Changes since 1.586: +32 -13 lines
Diff to previous 1.586 (colored)

Pull up following revision(s) (requested by pavel in ticket #397):
	sys/arch/i386/i386/machdep.c: revision 1.589
	sys/arch/i386/i386/pmap.c: revision 1.195
PR port-i386/34186 by Wolfgang Stukenbrock:
mapping of msgbuf during startup may map invalid physical adresses
"If the last available physical memory segment on a system is less 16k,
than the startup code that will map the kernel message buffer, will fail
and map physical pages behind the last segment.  This may either only lead
to a message buffer without physical memory behind it, or to an
overlapping message buffer with something else."
Fix by allowing multiple physical memory segments to be used for msgbuf.
Also remove some leftover msgbuf manipulation from pmap.c.
Fix supplied by Wolfgang Stukenbrock in the PR, with some modifications
from me, mainly to use the already existing constant VM_PHYSSEG_MAX as the
static limit of number of msgbuf segments.

Revision 1.577.4.9 / (download) - annotate - [select for diffs], Tue Feb 6 13:41:04 2007 UTC (17 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.577.4.8: +3 -3 lines
Diff to previous 1.577.4.8 (colored) to branchpoint 1.577 (colored)

Quieten another noisy printf.

Revision 1.594 / (download) - annotate - [select for diffs], Sun Feb 4 15:26:26 2007 UTC (17 years, 2 months ago) by jmcneill
Branch: MAIN
CVS Tags: newlock2-nbase, newlock2-base
Changes since 1.593: +4 -2 lines
Diff to previous 1.593 (colored)

Note the origin (hi FreeBSD!) of a couple clever bits of Xbox
initialization code. No functional changes.

Revision 1.577.4.8 / (download) - annotate - [select for diffs], Thu Feb 1 08:48:03 2007 UTC (17 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.577.4.7: +15 -2 lines
Diff to previous 1.577.4.7 (colored) to branchpoint 1.577 (colored)

Sync with head.

Revision 1.577.4.7 / (download) - annotate - [select for diffs], Tue Jan 30 13:49:34 2007 UTC (17 years, 2 months ago) by ad
Branch: newlock2
Changes since 1.577.4.6: +8 -48 lines
Diff to previous 1.577.4.6 (colored) to branchpoint 1.577 (colored)

Remove support for SA. Ok core@.

Revision 1.593 / (download) - annotate - [select for diffs], Fri Jan 12 20:34:09 2007 UTC (17 years, 3 months ago) by gdt
Branch: MAIN
Changes since 1.592: +15 -2 lines
Diff to previous 1.592 (colored)

Add a heuristic to set rbus_min_start based on total RAM.  The new
behavior is to choose 0.5 GB for <= 192 MB, 1 GB normally, and 2 GB
for >= 1 GB.  This should make the defaults work additionally old
Thinkpad 600Es, and also on notebooks with lots of RAM (e.g. T60 with
2GB).

ok christos@

Revision 1.577.4.6 / (download) - annotate - [select for diffs], Fri Jan 12 01:00:50 2007 UTC (17 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.577.4.5: +86 -13 lines
Diff to previous 1.577.4.5 (colored) to branchpoint 1.577 (colored)

Sync with head.

Revision 1.577.4.5 / (download) - annotate - [select for diffs], Thu Jan 11 22:22:56 2007 UTC (17 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.577.4.4: +5 -2 lines
Diff to previous 1.577.4.4 (colored) to branchpoint 1.577 (colored)

Checkpoint work in progress.

Revision 1.592 / (download) - annotate - [select for diffs], Sun Jan 7 01:04:26 2007 UTC (17 years, 3 months ago) by jmcneill
Branch: MAIN
Changes since 1.591: +6 -17 lines
Diff to previous 1.591 (colored)

Remove nForce ethernet hack from machdep and instead call xbox_startup from
cpu_startup, which applies the patch.

Revision 1.591 / (download) - annotate - [select for diffs], Sat Jan 6 18:42:36 2007 UTC (17 years, 3 months ago) by jmcneill
Branch: MAIN
Changes since 1.590: +4 -7 lines
Diff to previous 1.590 (colored)

Use the pic16lc@iic driver for setting the system LED, rebooting, and
powering off the machine instead of the assembly code in pic16l.S

Revision 1.590 / (download) - annotate - [select for diffs], Sat Jan 6 16:22:46 2007 UTC (17 years, 3 months ago) by pavel
Branch: MAIN
Changes since 1.589: +5 -5 lines
Diff to previous 1.589 (colored)

correct whitespace in last commit.

Revision 1.589 / (download) - annotate - [select for diffs], Sat Jan 6 15:29:02 2007 UTC (17 years, 3 months ago) by pavel
Branch: MAIN
Changes since 1.588: +32 -13 lines
Diff to previous 1.588 (colored)

PR port-i386/34186 by Wolfgang Stukenbrock:
mapping of msgbuf during startup may map invalid physical adresses

"If the last available physical memory segment on a system is less 16k,
than the startup code that will map the kernel message buffer, will fail
and map physical pages behind the last segment.  This may either only lead
to a message buffer without physical memory behind it, or to an
overlapping message buffer with something else."

Fix by allowing multiple physical memory segments to be used for msgbuf.
Also remove some leftover msgbuf manipulation from pmap.c.

Fix supplied by Wolfgang Stukenbrock in the PR, with some modifications
from me, mainly to use the already existing constant VM_PHYSSEG_MAX as the
static limit of number of msgbuf segments.

Revision 1.588 / (download) - annotate - [select for diffs], Fri Jan 5 04:07:23 2007 UTC (17 years, 3 months ago) by jmcneill
Branch: MAIN
Changes since 1.587: +14 -11 lines
Diff to previous 1.587 (colored)

Attempt to initialize the console slightly later for hw drivers that wish
to be deferred. While we're here, clean up the Cromwell/Xromwell Xbox
workaround.

Revision 1.587 / (download) - annotate - [select for diffs], Thu Jan 4 18:16:44 2007 UTC (17 years, 3 months ago) by jmcneill
Branch: MAIN
Changes since 1.586: +67 -2 lines
Diff to previous 1.586 (colored)

Microsoft Xbox support, from Andrew Gillham.

Still requires some bug fixes in the nfe(4) driver; works with USB ethernet.
Requires Xromwell / Cromwell 2.41dev or above to boot. Tested both CD boot
and etherboot.

xboxfb(4) currently does not work properly with component video cables.

Revision 1.563.2.2 / (download) - annotate - [select for diffs], Sat Dec 30 20:46:10 2006 UTC (17 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.563.2.1: +44 -32 lines
Diff to previous 1.563.2.1 (colored)

sync with head.

Revision 1.577.4.4 / (download) - annotate - [select for diffs], Fri Dec 29 20:27:41 2006 UTC (17 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.577.4.3: +5 -7 lines
Diff to previous 1.577.4.3 (colored) to branchpoint 1.577 (colored)

Checkpoint work in progress.

Revision 1.577.6.2 / (download) - annotate - [select for diffs], Sun Dec 10 07:16:09 2006 UTC (17 years, 4 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.577.6.1: +20 -14 lines
Diff to previous 1.577.6.1 (colored) to branchpoint 1.577 (colored) next main 1.578 (colored)

sync with head.

Revision 1.577.4.3 / (download) - annotate - [select for diffs], Sat Nov 18 21:29:18 2006 UTC (17 years, 4 months ago) by ad
Branch: newlock2
Changes since 1.577.4.2: +28 -16 lines
Diff to previous 1.577.4.2 (colored) to branchpoint 1.577 (colored)

Sync with head.

Revision 1.586 / (download) - annotate - [select for diffs], Thu Nov 16 01:32:38 2006 UTC (17 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, netbsd-4-base
Branch point for: netbsd-4
Changes since 1.585: +4 -4 lines
Diff to previous 1.585 (colored)

__unused removal on arguments; approved by core.

Revision 1.585 / (download) - annotate - [select for diffs], Wed Oct 25 13:56:15 2006 UTC (17 years, 5 months ago) by jmmv
Branch: MAIN
Changes since 1.584: +17 -11 lines
Diff to previous 1.584 (colored)

Remove the usage of Multiboot's "a.out kludge" to tell the boot loader to
reserve some more space for the BSS section than the binary says.  This
trick was used to leave room after the kernel's image to copy the symbol
table following the format required by ksyms_init.  (It was also used to
workaround a bug in the physical address fields of the binary, but this has
been long fixed.)  Yes, the MULTIBOOT_SYMTAB_SPACE option goes away; yay!

Instead, copy the required data after the kernel in a way that avoids having
to reserve space and use the new ksyms_init_explicit function to avoid the
need to construct a minimal ELF image.

Fixes ksyms when using an "unpatched" GRUB (one that does not contain the
fix to honour the "a.out kludge" for ELF images, even when present) -- i.e.
ddb and lkms.  As a side effect, the new code is much clearer to read and
digest.

Closes PR port-i386/32865.

Revision 1.577.4.2 / (download) - annotate - [select for diffs], Tue Oct 24 21:10:22 2006 UTC (17 years, 5 months ago) by ad
Branch: newlock2
Changes since 1.577.4.1: +21 -10 lines
Diff to previous 1.577.4.1 (colored) to branchpoint 1.577 (colored)

- Redo LWP locking slightly and fix some races.
- Fix some locking botches.
- Make signal mask / stack per-proc for SA processes.
- Add _lwp_kill().

Revision 1.584 / (download) - annotate - [select for diffs], Sun Oct 22 13:29:13 2006 UTC (17 years, 5 months ago) by pooka
Branch: MAIN
Changes since 1.583: +3 -3 lines
Diff to previous 1.583 (colored)

constipate

Revision 1.577.6.1 / (download) - annotate - [select for diffs], Sun Oct 22 06:04:43 2006 UTC (17 years, 5 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.577: +14 -8 lines
Diff to previous 1.577 (colored)

sync with head

Revision 1.583 / (download) - annotate - [select for diffs], Sat Oct 21 08:11:49 2006 UTC (17 years, 5 months ago) by skrll
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.582: +3 -3 lines
Diff to previous 1.582 (colored)

s/out/bad/ in cpu_dumpconf so this compiles.

Revision 1.582 / (download) - annotate - [select for diffs], Sat Oct 21 05:54:32 2006 UTC (17 years, 5 months ago) by mrg
Branch: MAIN
Changes since 1.581: +6 -4 lines
Diff to previous 1.581 (colored)

in cpu_dumpconf(), don't panic() if we can't bdevsw_lookup() the
dumpdev.  this occurs when we try to set the dumpdev to a device
with no driver loaded.  this fixes PR#34872.

in sys_swapctl, if bdevsw_lookup() fails, set dumpdev = NODEV
before calling cpu_dumpconf().  (this also fixes PR#34872.)

XXX: cpu_dumpconf() should probably be changed to take a dumpdev
XXX: and return an error in such cases, but that is a much more
XXX: intrusive change.

XXX2: this is only run-tested on sparc64 and compile tested on a
XXX2: couple of platforms.

Revision 1.577.4.1 / (download) - annotate - [select for diffs], Fri Oct 20 21:26:44 2006 UTC (17 years, 5 months ago) by ad
Branch: newlock2
Changes since 1.577: +35 -13 lines
Diff to previous 1.577 (colored)

- Make ASTs per-LWP.
- The signal stack and signal mask will be per-LWP shortly.

need_resched(), need_proftick(), signotify():

- Prefix with cpu_
- Make per-LWP.
- Send an IPI if the LWP is on another CPU.

Revision 1.581 / (download) - annotate - [select for diffs], Thu Oct 12 04:31:54 2006 UTC (17 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.580: +5 -2 lines
Diff to previous 1.580 (colored)

cpu_exec_aout_makecmds(): consume the arguments even if COMPAT_NOMID is
not defined.

Revision 1.580 / (download) - annotate - [select for diffs], Thu Oct 12 01:30:42 2006 UTC (17 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.579: +4 -4 lines
Diff to previous 1.579 (colored)

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386

Revision 1.579 / (download) - annotate - [select for diffs], Wed Sep 27 17:10:34 2006 UTC (17 years, 6 months ago) by cube
Branch: MAIN
Changes since 1.578: +4 -3 lines
Diff to previous 1.578 (colored)

This is again that time of the millenium where we have to crank up a few
static limits to meet modern bloat requirements.

VM_PHYSSEG_MAX needs it to run on Intel's D946GZIS motherboard, as reported
by rix on #NetBSD-code on freenode.  This has a consequence on the initial
number of possible extent allocations for iomem_ex, so increase that value
too.

While there, clarify the action to be taken when VM_PHYSSEG_MAX is maxed
out.

Do that on both amd64 and i386 because the causes, the effects and the code
are mostly the same.

Revision 1.578 / (download) - annotate - [select for diffs], Sun Sep 24 08:35:00 2006 UTC (17 years, 6 months ago) by xtraeme
Branch: MAIN
Changes since 1.577: +3 -3 lines
Diff to previous 1.577 (colored)

In the APM case replace a magic number 0xff with the correct definition:
APM_DEV_ALLUNITS.

Noticed by Sergey Svishchev.

Revision 1.569.4.1 / (download) - annotate - [select for diffs], Sat Sep 9 02:40:07 2006 UTC (17 years, 7 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.569: +141 -25 lines
Diff to previous 1.569 (colored) next main 1.570 (colored)

sync with head

Revision 1.570.4.3 / (download) - annotate - [select for diffs], Fri Aug 11 15:41:54 2006 UTC (17 years, 8 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.570.4.2: +19 -19 lines
Diff to previous 1.570.4.2 (colored) to branchpoint 1.570 (colored) next main 1.571 (colored)

sync with head

Revision 1.577 / (download) - annotate - [select for diffs], Mon Jul 31 20:59:07 2006 UTC (17 years, 8 months ago) by mrg
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, yamt-pdpolicy-base7, rpaulo-netinet-merge-pcb-base, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: yamt-splraiseipl, newlock2
Changes since 1.576: +12 -5 lines
Diff to previous 1.576 (colored)

add a new "biosmem_implicit" variable that is set when a bootloader
info parser sets "biosbasemem" and "biosextmem" from.  check for this
when probing memory size, rather than biosbasemem/biosextmem being
zero which is no longer true.  also, make the REALBASEMEM/REALEXTMEM
options work properly with multiboot-booted kernels.  fixes PR#33918.

Revision 1.574.2.1 / (download) - annotate - [select for diffs], Thu Jul 13 17:48:53 2006 UTC (17 years, 9 months ago) by gdamore
Branch: gdamore-uart
Changes since 1.574: +10 -17 lines
Diff to previous 1.574 (colored) next main 1.575 (colored)

Merge from HEAD.

Revision 1.576 / (download) - annotate - [select for diffs], Sat Jul 8 20:30:00 2006 UTC (17 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.575: +7 -7 lines
Diff to previous 1.575 (colored)

- apm.c -> apmbios.c and s/NAPM/NAPMBIOS/
- adjust to new function call signatures.

Revision 1.575 / (download) - annotate - [select for diffs], Mon Jul 3 01:25:33 2006 UTC (17 years, 9 months ago) by mrg
Branch: MAIN
Changes since 1.574: +5 -12 lines
Diff to previous 1.574 (colored)

always include the code to lookup bootinfo for memory size.  however,
don't use it if biosbasemem or biosextmem are non-zero.  this allows
one to set these variables in /netbsd rather than a kernel rebuild with
options REALBASEMEM/REALEXTMEM, as used to be.  PR#33659.

Revision 1.570.4.2 / (download) - annotate - [select for diffs], Mon Jun 26 12:44:39 2006 UTC (17 years, 9 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.570.4.1: +6 -4 lines
Diff to previous 1.570.4.1 (colored) to branchpoint 1.570 (colored)

sync with head.

Revision 1.563.2.1 / (download) - annotate - [select for diffs], Wed Jun 21 14:52:18 2006 UTC (17 years, 9 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.563: +167 -47 lines
Diff to previous 1.563 (colored)

sync with head.

Revision 1.572.2.1 / (download) - annotate - [select for diffs], Mon Jun 19 03:44:26 2006 UTC (17 years, 9 months ago) by chap
Branch: chap-midi
Changes since 1.572: +10 -6 lines
Diff to previous 1.572 (colored) next main 1.573 (colored)

Sync with head.

Revision 1.574 / (download) - annotate - [select for diffs], Wed Jun 7 22:37:58 2006 UTC (17 years, 10 months ago) by kardel
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6, gdamore-uart-base, chap-midi-nbase, chap-midi-base
Branch point for: gdamore-uart
Changes since 1.573: +6 -4 lines
Diff to previous 1.573 (colored)

convert to timecounters (from branch simonb-timecounters)

Revision 1.570.2.5 / (download) - annotate - [select for diffs], Thu Jun 1 22:34:50 2006 UTC (17 years, 10 months ago) by kardel
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.570.2.4: +6 -4 lines
Diff to previous 1.570.2.4 (colored) to branchpoint 1.570 (colored) next main 1.571 (colored)

Sync with head.

Revision 1.570.8.1 / (download) - annotate - [select for diffs], Wed May 24 15:47:58 2006 UTC (17 years, 10 months ago) by tron
Branch: peter-altq
Changes since 1.570: +117 -8 lines
Diff to previous 1.570 (colored) next main 1.571 (colored)

Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.

Revision 1.570.4.1 / (download) - annotate - [select for diffs], Wed May 24 10:56:51 2006 UTC (17 years, 10 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.570: +117 -8 lines
Diff to previous 1.570 (colored)

sync with head.

Revision 1.573 / (download) - annotate - [select for diffs], Mon May 22 13:44:53 2006 UTC (17 years, 10 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-pdpolicy-base5, simonb-timecounters-base
Changes since 1.572: +6 -4 lines
Diff to previous 1.572 (colored)

i386 and xen: move struct user to the highest address in uarea
and reduce UPAGES from 4 to 3 in the case of !NOREDZONE.

Revision 1.560.2.2 / (download) - annotate - [select for diffs], Sat May 20 12:23:13 2006 UTC (17 years, 10 months ago) by tron
Branch: netbsd-3
CVS Tags: netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1
Changes since 1.560.2.1: +14 -14 lines
Diff to previous 1.560.2.1 (colored) to branchpoint 1.560 (colored) next main 1.561 (colored)

Pull up following revision(s) (requested by riz in ticket #1330):
	sys/arch/i386/i386/machdep.c: revision 1.565
TAB police.

Revision 1.560.2.1 / (download) - annotate - [select for diffs], Sat May 20 12:22:16 2006 UTC (17 years, 10 months ago) by tron
Branch: netbsd-3
Changes since 1.560: +22 -2 lines
Diff to previous 1.560 (colored)

Pull up following revision(s) (requested by riz in ticket #1330):
	sys/arch/i386/i386/machdep.c: revision 1.564
Reset the AMD Geode SC1100.  Previously, the Geode hung after
printing "resetting...".  Now it really restarts.
Code from FreeBSD.  Description of what the code does by me.

Revision 1.570.2.4 / (download) - annotate - [select for diffs], Sun Apr 30 17:44:07 2006 UTC (17 years, 11 months ago) by kardel
Branch: simonb-timecounters
Changes since 1.570.2.3: +4 -3 lines
Diff to previous 1.570.2.3 (colored) to branchpoint 1.570 (colored)

- clock.h only contained TSC timecounter initialization
  declarations that now live in x86/x86/tsc.h

Revision 1.570.2.3 / (download) - annotate - [select for diffs], Sat Apr 22 11:37:32 2006 UTC (17 years, 11 months ago) by simonb
Branch: simonb-timecounters
Changes since 1.570.2.2: +113 -6 lines
Diff to previous 1.570.2.2 (colored) to branchpoint 1.570 (colored)

Sync with head.

Revision 1.570.6.1 / (download) - annotate - [select for diffs], Wed Apr 19 02:32:45 2006 UTC (17 years, 11 months ago) by elad
Branch: elad-kernelauth
Changes since 1.570: +113 -6 lines
Diff to previous 1.570 (colored) next main 1.571 (colored)

sync with head - hopefully this will work

Revision 1.572 / (download) - annotate - [select for diffs], Fri Apr 14 09:50:16 2006 UTC (18 years ago) by jmmv
Branch: MAIN
CVS Tags: elad-kernelauth-base
Branch point for: chap-midi
Changes since 1.571: +3 -3 lines
Diff to previous 1.571 (colored)

biosextmem comes before biosbasemem in the stack passed by the boot loader.
Fixes e.g. APM initialization.  Problem spotted by Kurt Schreiner.

Revision 1.571 / (download) - annotate - [select for diffs], Wed Apr 12 13:48:52 2006 UTC (18 years ago) by jmmv
Branch: MAIN
Changes since 1.570: +113 -6 lines
Diff to previous 1.570 (colored)

Convert the code that fetches bootinfo information and stores it into the
kernel from assembler to C and add several comments to make things clearer.
I've been running with these changes for a couple of months without problems.

Revision 1.570.2.2 / (download) - annotate - [select for diffs], Tue Feb 28 20:28:53 2006 UTC (18 years, 1 month ago) by kardel
Branch: simonb-timecounters
Changes since 1.570.2.1: +2 -5 lines
Diff to previous 1.570.2.1 (colored) to branchpoint 1.570 (colored)

Move init_TSC_tc() to just before spl0()

Revision 1.569.2.1 / (download) - annotate - [select for diffs], Sat Feb 18 15:38:36 2006 UTC (18 years, 1 month ago) by yamt
Branch: yamt-uio_vmspace
Changes since 1.569: +7 -2 lines
Diff to previous 1.569 (colored) next main 1.570 (colored)

sync with head.

Revision 1.570.2.1 / (download) - annotate - [select for diffs], Sat Feb 4 15:13:11 2006 UTC (18 years, 2 months ago) by simonb
Branch: simonb-timecounters
Changes since 1.570: +8 -4 lines
Diff to previous 1.570 (colored)

Remove the microtime_func function pointer.
Call the TSC timecounter initialisation function in cpu_initclocks()
  (if we are a i586 or i686).

Revision 1.570 / (download) - annotate - [select for diffs], Fri Feb 3 11:08:24 2006 UTC (18 years, 2 months ago) by jmmv
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base
Branch point for: yamt-pdpolicy, simonb-timecounters, peter-altq, elad-kernelauth
Changes since 1.569: +7 -2 lines
Diff to previous 1.569 (colored)

Implement support for 'The Multiboot Specification' so that i386 kernels
can be booted directly from Multiboot-compliant boot loaders (e.g. GRUB).
See the added multiboot(8) manual page for more information.

No objections in tech-kern@; only positive comments.

Revision 1.569 / (download) - annotate - [select for diffs], Fri Dec 30 13:37:57 2005 UTC (18 years, 3 months ago) by jmmv
Branch: MAIN
Branch point for: yamt-uio_vmspace, rpaulo-netinet-merge-pcb
Changes since 1.568: +2 -18 lines
Diff to previous 1.568 (colored)

Add a 'struct bootinfo' to represent the bootinfo structure used in the
kernel by x86 platforms (instead of a simple char *).  This way, the code
in, e.g., lookup_bootinfo, is a bit easier to understand.

While here, move the lookup_bootinfo function used in x86 platforms (amd64,
i386 and xen) to a common file (x86/x86_machdep.c), as it was exactly the
same in all of them.

Revision 1.568 / (download) - annotate - [select for diffs], Mon Dec 26 19:23:59 2005 UTC (18 years, 3 months ago) by perry
Branch: MAIN
Changes since 1.567: +9 -9 lines
Diff to previous 1.567 (colored)

u_intN_t -> uintN_t

Revision 1.567 / (download) - annotate - [select for diffs], Sat Dec 24 20:07:10 2005 UTC (18 years, 3 months ago) by perry
Branch: MAIN
Changes since 1.566: +4 -4 lines
Diff to previous 1.566 (colored)

Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.

Revision 1.566 / (download) - annotate - [select for diffs], Sun Dec 11 12:17:41 2005 UTC (18 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.565: +10 -10 lines
Diff to previous 1.565 (colored)

merge ktrace-lwp.

Revision 1.526.2.11 / (download) - annotate - [select for diffs], Thu Nov 10 13:56:47 2005 UTC (18 years, 5 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.526.2.10: +33 -13 lines
Diff to previous 1.526.2.10 (colored) next main 1.527 (colored)

Sync with HEAD. Here we go again...

Revision 1.565 / (download) - annotate - [select for diffs], Thu Sep 22 07:13:27 2005 UTC (18 years, 6 months ago) by simonb
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, thorpej-vnode-attr-base, thorpej-vnode-attr, ktrace-lwp-base
Changes since 1.564: +14 -14 lines
Diff to previous 1.564 (colored)

TAB police.

Revision 1.564 / (download) - annotate - [select for diffs], Thu Sep 22 06:45:03 2005 UTC (18 years, 6 months ago) by dyoung
Branch: MAIN
Changes since 1.563: +22 -2 lines
Diff to previous 1.563 (colored)

Reset the AMD Geode SC1100.  Previously, the Geode hung after
printing "resetting...".  Now it really restarts.

Code from FreeBSD.  Description of what the code does by me.

Revision 1.563 / (download) - annotate - [select for diffs], Sun May 29 21:33:01 2005 UTC (18 years, 10 months ago) by christos
Branch: MAIN
Branch point for: yamt-lazymbuf
Changes since 1.562: +8 -8 lines
Diff to previous 1.562 (colored)

Avoid shadowed variables.

Revision 1.559.4.1 / (download) - annotate - [select for diffs], Fri Apr 29 11:28:12 2005 UTC (18 years, 11 months ago) by kent
Branch: kent-audio2
Changes since 1.559: +10 -12 lines
Diff to previous 1.559 (colored) next main 1.560 (colored)

sync with -current

Revision 1.562 / (download) - annotate - [select for diffs], Mon Apr 25 15:02:05 2005 UTC (18 years, 11 months ago) by lukem
Branch: MAIN
CVS Tags: kent-audio2-base
Changes since 1.561: +3 -3 lines
Diff to previous 1.561 (colored)

Move the MI printing of `copyright' to the MD cpu_startup() code
where the printing of `version' is already performed.
This has the benefit of allowing the copyright to be available
via dmesg(8) on platforms which need the `msgbuf' to be setup
in cpu_startup() before printed output is remembered.

Revision 1.526.2.10 / (download) - annotate - [select for diffs], Fri Apr 1 14:27:39 2005 UTC (19 years ago) by skrll
Branch: ktrace-lwp
Changes since 1.526.2.9: +8 -10 lines
Diff to previous 1.526.2.9 (colored)

Sync with HEAD.

Revision 1.561 / (download) - annotate - [select for diffs], Fri Apr 1 11:59:31 2005 UTC (19 years ago) by yamt
Branch: MAIN
Changes since 1.560: +8 -10 lines
Diff to previous 1.560 (colored)

merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
  save some resources like pv_entry.  also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.

Revision 1.559.6.3 / (download) - annotate - [select for diffs], Sat Mar 19 08:33:02 2005 UTC (19 years, 1 month ago) by yamt
Branch: yamt-km
Changes since 1.559.6.2: +3 -3 lines
Diff to previous 1.559.6.2 (colored) to branchpoint 1.559 (colored) next main 1.560 (colored)

sync with head.  xen and whitespace.  xen part is not finished.

Revision 1.526.2.9 / (download) - annotate - [select for diffs], Fri Mar 4 16:38:39 2005 UTC (19 years, 1 month ago) by skrll
Branch: ktrace-lwp
Changes since 1.526.2.8: +3 -3 lines
Diff to previous 1.526.2.8 (colored)

Sync with HEAD.

Hi Perry!

Revision 1.560 / (download) - annotate - [select for diffs], Wed Mar 2 11:48:03 2005 UTC (19 years, 1 month ago) by mycroft
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, netbsd-3-base, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0
Branch point for: netbsd-3
Changes since 1.559: +3 -3 lines
Diff to previous 1.559 (colored)

Copyright maintenance.

Revision 1.526.2.8 / (download) - annotate - [select for diffs], Fri Feb 4 11:44:30 2005 UTC (19 years, 2 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.526.2.7: +9 -9 lines
Diff to previous 1.526.2.7 (colored)

Sync with HEAD.

Revision 1.559.6.2 / (download) - annotate - [select for diffs], Wed Jan 26 08:33:14 2005 UTC (19 years, 2 months ago) by yamt
Branch: yamt-km
Changes since 1.559.6.1: +6 -9 lines
Diff to previous 1.559.6.1 (colored) to branchpoint 1.559 (colored)

early in boot, use pmap_kenter_pa rather than pmap_enter.

Revision 1.559.6.1 / (download) - annotate - [select for diffs], Tue Jan 25 13:01:08 2005 UTC (19 years, 2 months ago) by yamt
Branch: yamt-km
Changes since 1.559: +4 -3 lines
Diff to previous 1.559 (colored)

- convert i386 to new apis.
- remove a pmap bootstrap kludge, which is no longer needed.

Revision 1.526.2.7 / (download) - annotate - [select for diffs], Tue Nov 2 07:50:35 2004 UTC (19 years, 5 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.526.2.6: +7 -7 lines
Diff to previous 1.526.2.6 (colored)

Sync with HEAD.

Revision 1.559 / (download) - annotate - [select for diffs], Wed Oct 20 04:20:05 2004 UTC (19 years, 5 months ago) by thorpej
Branch: MAIN
CVS Tags: yamt-km-base2, yamt-km-base, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: yamt-km, kent-audio2
Changes since 1.558: +7 -7 lines
Diff to previous 1.558 (colored)

Move boot device detection code from i386 and amd64 ports to x86_autoconf.c.
Rename i386_alldisks and x86_64_alldisks to x86_alldisks, adjust other
references to compensate.

Revision 1.526.2.6 / (download) - annotate - [select for diffs], Tue Sep 21 13:16:42 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.526.2.5: +2 -2 lines
Diff to previous 1.526.2.5 (colored)

Fix the sync with head I botched.

Revision 1.526.2.5 / (download) - annotate - [select for diffs], Sat Sep 18 14:35:28 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.526.2.4: +4 -4 lines
Diff to previous 1.526.2.4 (colored)

Sync with HEAD.

Revision 1.526.2.4 / (download) - annotate - [select for diffs], Fri Sep 3 12:44:47 2004 UTC (19 years, 7 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.526.2.3: +3 -3 lines
Diff to previous 1.526.2.3 (colored)

Sync with HEAD

Revision 1.558 / (download) - annotate - [select for diffs], Thu Aug 26 10:12:33 2004 UTC (19 years, 7 months ago) by junyoung
Branch: MAIN
Changes since 1.557: +3 -3 lines
Diff to previous 1.557 (colored)

As suggested on tech-kern@ days ago:
* Get rid of PTmap, PTD, PTDpde, APTmap, APTD, and APTDpde from locore.S.
* Rename PTDpaddr to PDPpaddr, ptdpaddr in struct cpu_kcore_hdr to pdppaddr for consistency.

Revision 1.552.2.3 / (download) - annotate - [select for diffs], Mon Aug 16 17:46:05 2004 UTC (19 years, 8 months ago) by jmc
Branch: netbsd-2-0
CVS Tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2
Changes since 1.552.2.2: +5 -3 lines
Diff to previous 1.552.2.2 (colored) to branchpoint 1.552 (colored) next main 1.553 (colored)

Pullup rev 1.557 (requested by dbj in ticket #767)

Add support to pxeboot for reading the bios disk geometry
as well as fixing several related bugs that occur when the bios
geometry is not read by the boot loader.

Revision 1.526.2.3 / (download) - annotate - [select for diffs], Thu Aug 12 11:41:13 2004 UTC (19 years, 8 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.526.2.2: +5 -3 lines
Diff to previous 1.526.2.2 (colored)

Sync with HEAD.

Revision 1.557 / (download) - annotate - [select for diffs], Thu Aug 5 18:04:35 2004 UTC (19 years, 8 months ago) by dbj
Branch: MAIN
Changes since 1.556: +5 -3 lines
Diff to previous 1.556 (colored)

fix several related bugs that cause sysctl machdep.diskinfo to
lose when booted from pxeboot.
. make sure that i386_alldisks gets initialized even if
  bios geometry information is not available in the bootinfo
. if i386_alldisks is not initialized, have sysctl return EOPNOTSUPP
. compile pxeboot with -DPASS_BIOSGEOM and I386_INCLUDE_DISK=yes
  this may increase the size of pxeboot which is required to run
  in 64k.  However, it seems to be working ok on my system

Revision 1.526.2.2 / (download) - annotate - [select for diffs], Tue Aug 3 10:35:49 2004 UTC (19 years, 8 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.526.2.1: +338 -475 lines
Diff to previous 1.526.2.1 (colored)

Sync with HEAD

Revision 1.552.2.2 / (download) - annotate - [select for diffs], Fri Jul 23 22:42:00 2004 UTC (19 years, 8 months ago) by he
Branch: netbsd-2-0
Changes since 1.552.2.1: +6 -5 lines
Diff to previous 1.552.2.1 (colored) to branchpoint 1.552 (colored)

Pull up revision 1.556 (requested by mycroft in ticket #694):
  Use pmap_kenter_pa() to map pages to dump, not pmap_enter(),
  so that it is more resistant to VM lossage.

Revision 1.556 / (download) - annotate - [select for diffs], Thu Jul 22 15:12:46 2004 UTC (19 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.555: +6 -5 lines
Diff to previous 1.555 (colored)

Use pmap_kenter_pa() to map pages to dump, not pmap_enter(), so that it's more
resistant to VM lossage.

Revision 1.552.2.1 / (download) - annotate - [select for diffs], Sun Jul 4 13:09:00 2004 UTC (19 years, 9 months ago) by he
Branch: netbsd-2-0
Changes since 1.552: +5 -2 lines
Diff to previous 1.552 (colored)

Pull up revision 1.555 (requested by mycroft in ticket #594):
  Put back the reloading of the IDT in cpu_reset().
  Presumably this overrides some descriptor caching in the CPU.
  Fixes PR#8120 (cpu_reset() is unreliable on some systems).

Revision 1.555 / (download) - annotate - [select for diffs], Sat Jul 3 21:02:09 2004 UTC (19 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.554: +5 -2 lines
Diff to previous 1.554 (colored)

Per PR 8120, put back the reloading of the IDT in cpu_reset().  (Presumably
this overrides some descriptor caching in the CPU.)

Revision 1.554 / (download) - annotate - [select for diffs], Mon May 3 16:38:28 2004 UTC (19 years, 11 months ago) by lukem
Branch: MAIN
Changes since 1.553: +7 -2 lines
Diff to previous 1.553 (colored)

move machdep.est.cpu_brand to machdep.cpu_brand

Revision 1.553 / (download) - annotate - [select for diffs], Fri Apr 30 02:05:43 2004 UTC (19 years, 11 months ago) by lukem
Branch: MAIN
Changes since 1.552: +4 -2 lines
Diff to previous 1.552 (colored)

Integrate support for Enhanced SpeedStep Technology (est) that
Michael Eriksson posted to port-i386 on 20031102, with various
modifications by me to work in the new sysctl(9) framework.

The code is enabled with 'options ENHANCED_SPEEDSTEP', and if
the CPU supports EST the following sysctl(8) nodes appear
(with the values that a Dell Inspiron 8600 + WUXGA with a
1.4GHz Pentium M CPU supports):
	machdep.est.cpu_brand = Intel(R) Pentium(R) M processor 1400MHz
	machdep.est.frequency.target = 1400
	machdep.est.frequency.current = 1400
	machdep.est.frequency.available = 1400 1200 1000 800 600

If EST support isn't available, the "machdep.est" sysctl sub-MIB
is not created.

Once we have a more general "CPU frequency" control API we can
migrate this code to using that.

Thanks to Michael Erikkson for providing this code!

Revision 1.552 / (download) - annotate - [select for diffs], Wed Mar 24 15:34:49 2004 UTC (20 years ago) by atatat
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.551: +32 -17 lines
Diff to previous 1.551 (colored)

Tango on sysctl_createv() and flags.  The flags have all been renamed,
and sysctl_createv() now uses more arguments.

Revision 1.551 / (download) - annotate - [select for diffs], Sun Mar 21 15:37:02 2004 UTC (20 years ago) by junyoung
Branch: MAIN
Changes since 1.550: +23 -58 lines
Diff to previous 1.550 (colored)

ANSIfy.

Revision 1.550 / (download) - annotate - [select for diffs], Fri Mar 5 11:34:17 2004 UTC (20 years, 1 month ago) by junyoung
Branch: MAIN
Changes since 1.549: +5 -5 lines
Diff to previous 1.549 (colored)

Drop trailing spaces.

Revision 1.549 / (download) - annotate - [select for diffs], Fri Feb 13 11:36:13 2004 UTC (20 years, 2 months ago) by wiz
Branch: MAIN
Changes since 1.548: +4 -4 lines
Diff to previous 1.548 (colored)

Uppercase CPU, plural is CPUs.

Revision 1.548 / (download) - annotate - [select for diffs], Wed Jan 28 10:48:55 2004 UTC (20 years, 2 months ago) by yamt
Branch: MAIN
Changes since 1.547: +5 -5 lines
Diff to previous 1.547 (colored)

rename i386 mdlwp flags from MDP_ to MDL_
to avoid confusion with mdproc flags which also have MDP_ prefixes.

Revision 1.547 / (download) - annotate - [select for diffs], Tue Dec 30 12:33:22 2003 UTC (20 years, 3 months ago) by pk
Branch: MAIN
Changes since 1.546: +5 -102 lines
Diff to previous 1.546 (colored)

Replace the traditional buffer memory management -- based on fixed per buffer
virtual memory reservation and a private pool of memory pages -- by a scheme
based on memory pools.

This allows better utilization of memory because buffers can now be allocated
with a granularity finer than the system's native page size (useful for
filesystems with e.g. 1k or 2k fragment sizes).  It also avoids fragmentation
of virtual to physical memory mappings (due to the former fixed virtual
address reservation) resulting in better utilization of MMU resources on some
platforms.  Finally, the scheme is more flexible by allowing run-time decisions
on the amount of memory to be used for buffers.

On the other hand, the effectiveness of the LRU queue for buffer recycling
may be somewhat reduced compared to the traditional method since, due to the
nature of the pool based memory allocation, the actual least recently used
buffer may release its memory to a pool different from the one needed by a
newly allocated buffer. However, this effect will kick in only if the
system is under memory pressure.

Revision 1.546 / (download) - annotate - [select for diffs], Tue Dec 30 03:57:19 2003 UTC (20 years, 3 months ago) by yamt
Branch: MAIN
Changes since 1.545: +8 -2 lines
Diff to previous 1.545 (colored)

(MULTIPROCESSOR version of) need_resched:
- nothing needs to be done if ci_want_resched is already set.
- if the cpu isn't running any lwp, send a no-op ipi to it
  so that it can resume immediately from halting in idle loop
  without having to wait until the next clock tick.
some advices from Stephan Uphoff.

Revision 1.545 / (download) - annotate - [select for diffs], Thu Dec 4 19:38:21 2003 UTC (20 years, 4 months ago) by atatat
Branch: MAIN
Changes since 1.544: +138 -79 lines
Diff to previous 1.544 (colored)

Dynamic sysctl.

Gone are the old kern_sysctl(), cpu_sysctl(), hw_sysctl(),
vfs_sysctl(), etc, routines, along with sysctl_int() et al.  Now all
nodes are registered with the tree, and nodes can be added (or
removed) easily, and I/O to and from the tree is handled generically.

Since the nodes are registered with the tree, the mapping from name to
number (and back again) can now be discovered, instead of having to be
hard coded.  Adding new nodes to the tree is likewise much simpler --
the new infrastructure handles almost all the work for simple types,
and just about anything else can be done with a small helper function.

All existing nodes are where they were before (numerically speaking),
so all existing consumers of sysctl information should notice no
difference.

PS - I'm sorry, but there's a distinct lack of documentation at the
moment.  I'm working on sysctl(3/8/9) right now, and I promise to
watch out for buses.

Revision 1.544 / (download) - annotate - [select for diffs], Thu Dec 4 13:05:16 2003 UTC (20 years, 4 months ago) by keihan
Branch: MAIN
Changes since 1.543: +3 -3 lines
Diff to previous 1.543 (colored)

netbsd.org -> NetBSD.org

All "netbsd.org" is now gone from src/sys/arch.

Revision 1.543 / (download) - annotate - [select for diffs], Tue Oct 28 22:52:53 2003 UTC (20 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.542: +6 -6 lines
Diff to previous 1.542 (colored)

Eliminate bogus initializer.

Revision 1.542 / (download) - annotate - [select for diffs], Mon Oct 27 14:11:46 2003 UTC (20 years, 5 months ago) by junyoung
Branch: MAIN
Changes since 1.541: +17 -17 lines
Diff to previous 1.541 (colored)

Nuke __P().

Revision 1.541 / (download) - annotate - [select for diffs], Sat Oct 25 18:40:37 2003 UTC (20 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.540: +3 -3 lines
Diff to previous 1.540 (colored)

Fix uninitialized variable warnings

Revision 1.540 / (download) - annotate - [select for diffs], Wed Oct 8 00:28:41 2003 UTC (20 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.539: +3 -3 lines
Diff to previous 1.539 (colored)

* Shuffle some data structures so, and add a flags word to ksiginfo_t.
  Right now the only flag is used to indicate if a ksiginfo_t is a
  result of a trap.  Add a predicate macro to test for this flag.
* Add initialization macros for ksiginfo_t's.
* Add accssor macro for ksi_trap.  Expands to 0 if the ksiginfo_t was
  not the result of a trap.  This matches the sigcontext trapcode semantics.
* In kpsendsig(), use KSI_TRAP_P() to select the lwp that gets the signal.
  Inspired by Matthias Drochner's fix to kpsendsig(), but correctly handles
  the case of non-trap-generated signals that have a > 0 si_code.

This patch fixes a signal delivery problem with threaded programs noted by
Matthias Drochner on tech-kern.

As discussed on tech-kern.  Reviewed and OK's by Christos.

Revision 1.539 / (download) - annotate - [select for diffs], Thu Sep 25 22:01:31 2003 UTC (20 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.538: +4 -4 lines
Diff to previous 1.538 (colored)

constify sendsig/trapsignal

Revision 1.538 / (download) - annotate - [select for diffs], Wed Sep 10 21:38:40 2003 UTC (20 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.537: +11 -11 lines
Diff to previous 1.537 (colored)

sort the opt_ includes.

Revision 1.537 / (download) - annotate - [select for diffs], Wed Sep 10 19:48:49 2003 UTC (20 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.536: +4 -209 lines
Diff to previous 1.536 (colored)

move compat_16 stuff into a separate file.

Revision 1.536 / (download) - annotate - [select for diffs], Wed Sep 10 16:47:00 2003 UTC (20 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.535: +8 -6 lines
Diff to previous 1.535 (colored)

make obsolete trampoline code COMPAT_16. Unfortunately sigreturn14 is used
by IBCS2; grr.

Revision 1.535 / (download) - annotate - [select for diffs], Wed Sep 10 11:39:09 2003 UTC (20 years, 7 months ago) by drochner
Branch: MAIN
Changes since 1.534: +4 -4 lines
Diff to previous 1.534 (colored)

in cpu_setmcontext(), check where we go, not where we are coming from,
and line-terminate a diagnostic message which was caused by that bug

Revision 1.534 / (download) - annotate - [select for diffs], Sat Sep 6 22:08:14 2003 UTC (20 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.533: +144 -50 lines
Diff to previous 1.533 (colored)

SA_SIGINFO changes.

Revision 1.533 / (download) - annotate - [select for diffs], Sun Aug 24 17:52:30 2003 UTC (20 years, 7 months ago) by chs
Branch: MAIN
Changes since 1.532: +15 -6 lines
Diff to previous 1.532 (colored)

add support for non-executable mappings (where the hardware allows this)
and make the stack and heap non-executable by default.  the changes
fall into two basic catagories:

 - pmap and trap-handler changes.  these are all MD:
   = alpha: we already track per-page execute permission with the (software)
	PG_EXEC bit, so just have the trap handler pay attention to it.
   = i386: use a new GDT segment for %cs for processes that have no
	executable mappings above a certain threshold (currently the
	bottom of the stack).  track per-page execute permission with
	the last unused PTE bit.
   = powerpc/ibm4xx: just use the hardware exec bit.
   = powerpc/oea: we already track per-page exec bits, but the hardware only
	implements non-exec mappings at the segment level.  so track the
	number of executable mappings in each segment and turn on the no-exec
	segment bit iff the count is 0.  adjust the trap handler to deal.
   = sparc (sun4m): fix our use of the hardware protection bits.
	fix the trap handler to recognize text faults.
   = sparc64: split the existing unified TSB into data and instruction TSBs,
	and only load TTEs into the appropriate TSB(s) for the permissions.
	fix the trap handler to check for execute permission.
   = not yet implemented: amd64, hppa, sh5

 - changes in all the emulations that put a signal trampoline on the stack.
   instead, we now put the trampoline into a uvm_aobj and map that into
   the process separately.

originally from openbsd, adapted for netbsd by me.

Revision 1.532 / (download) - annotate - [select for diffs], Wed Aug 20 21:48:38 2003 UTC (20 years, 7 months ago) by fvdl
Branch: MAIN
Changes since 1.531: +3 -3 lines
Diff to previous 1.531 (colored)

Pass pointers to frames from assembly, do not use the 'frame on stack
as argument passed by value' trick, as gcc 3.3.x makes (valid) assumptions
about the stack that will not be true. Costs 2 instructions per trap/syscall
on i386, 4 per interrupt for MP. One instruction per trap/syscall on amd64,
2 per interrupt for MP. I expect gcc 3.3.1 to make up for this by better
optimization (it'd better..)

While here, make amd64 compile again by using subr_mbr_disk.c

Revision 1.531 / (download) - annotate - [select for diffs], Sun Aug 17 14:23:16 2003 UTC (20 years, 8 months ago) by kochi
Branch: MAIN
Changes since 1.530: +3 -3 lines
Diff to previous 1.530 (colored)

make shutdown error messages clearer (idea from Christoph Egger)

Revision 1.530 / (download) - annotate - [select for diffs], Sun Aug 17 14:15:43 2003 UTC (20 years, 8 months ago) by kochi
Branch: MAIN
Changes since 1.529: +7 -5 lines
Diff to previous 1.529 (colored)

Try shutdown with ACPI only when ACPI is enabled.
Patch from Masanori Kanaoka (with a little modification by me).

Revision 1.389.2.7 / (download) - annotate - [select for diffs], Sat Aug 16 20:03:03 2003 UTC (20 years, 8 months ago) by itojun
Branch: netbsd-1-5
Changes since 1.389.2.6: +9 -3 lines
Diff to previous 1.389.2.6 (colored) to branchpoint 1.389 (colored) next main 1.390 (colored)

pullup 1.529 (ticket #72)

Fix stack location for VM86 processes in the !sigaltstack case.
I doubt it makes much sense to use the VM's stack for this, but the
old code was doubtless wrong because it potentially overwrote random
user memory.
(It might be a good idea to use the process' pre-vm86()-call stack,
but atm the infrastructure for this is missing.)

Revision 1.471.4.4 / (download) - annotate - [select for diffs], Sat Aug 16 16:17:11 2003 UTC (20 years, 8 months ago) by tron
Branch: netbsd-1-6
CVS Tags: netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002
Changes since 1.471.4.3: +8 -2 lines
Diff to previous 1.471.4.3 (colored) to branchpoint 1.471 (colored) next main 1.472 (colored)

Pull up revision 1.529 (requested by drochner in ticket #1415):
Fix stack location for VM86 processes in the !sigaltstack case.
I doubt it makes much sense to use the VM's stack for this, but the
old code was doubtless wrong because it potentially overwrote random
user memory.
(It might be a good idea to use the process' pre-vm86()-call stack,
but atm the infrastructure for this is missing.)

Revision 1.529 / (download) - annotate - [select for diffs], Mon Aug 11 14:09:18 2003 UTC (20 years, 8 months ago) by drochner
Branch: MAIN
Changes since 1.528: +10 -4 lines
Diff to previous 1.528 (colored)

Fix stack location for VM86 processes in the !sigaltstack case.
I doubt it makes much sense to use the VM's stack for this, but the
old code was doubtless wrong because it potentially overwrote random
user memory.
(It might be a good idea to use the process' pre-vm86()-call stack,
but atm the infrastructure for this is missing.)

Revision 1.528 / (download) - annotate - [select for diffs], Thu Aug 7 16:27:54 2003 UTC (20 years, 8 months ago) by agc
Branch: MAIN
Changes since 1.527: +3 -7 lines
Diff to previous 1.527 (colored)

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.

Revision 1.527 / (download) - annotate - [select for diffs], Mon Jul 28 10:28:30 2003 UTC (20 years, 8 months ago) by mrg
Branch: MAIN
Changes since 1.526: +3 -3 lines
Diff to previous 1.526 (colored)

add another cast to appease gcc3.3

Revision 1.526.2.1 / (download) - annotate - [select for diffs], Wed Jul 2 15:25:21 2003 UTC (20 years, 9 months ago) by darrenr
Branch: ktrace-lwp
Changes since 1.526: +7 -7 lines
Diff to previous 1.526 (colored)

Apply the aborted ktrace-lwp changes to a specific branch.  This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it.  This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.

Revision 1.526 / (download) - annotate - [select for diffs], Sun Jun 29 22:28:24 2003 UTC (20 years, 9 months ago) by fvdl
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.525: +5 -5 lines
Diff to previous 1.525 (colored)

Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.

Revision 1.525 / (download) - annotate - [select for diffs], Sat Jun 28 14:20:55 2003 UTC (20 years, 9 months ago) by darrenr
Branch: MAIN
Changes since 1.524: +7 -7 lines
Diff to previous 1.524 (colored)

Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V

Revision 1.524 / (download) - annotate - [select for diffs], Thu Jun 26 16:47:15 2003 UTC (20 years, 9 months ago) by drochner
Branch: MAIN
Changes since 1.523: +3 -2 lines
Diff to previous 1.523 (colored)

cpu_feature is not set (nor used) by locore since SMP, so move the
definition to C code

Revision 1.523 / (download) - annotate - [select for diffs], Mon Jun 23 11:01:19 2003 UTC (20 years, 9 months ago) by martin
Branch: MAIN
Changes since 1.522: +3 -2 lines
Diff to previous 1.522 (colored)

Make sure to include opt_foo.h if a defflag option FOO is used.

Revision 1.522 / (download) - annotate - [select for diffs], Sat Apr 26 11:05:14 2003 UTC (20 years, 11 months ago) by ragge
Branch: MAIN
Changes since 1.521: +11 -5 lines
Diff to previous 1.521 (colored)

Call ksyms_init() instead of ddb_init() in case of
	NKSYMS || defined(DDB) || defined(LKM)

Revision 1.521 / (download) - annotate - [select for diffs], Wed Apr 16 21:37:37 2003 UTC (21 years ago) by dsl
Branch: MAIN
Changes since 1.520: +7 -0 lines
Diff to previous 1.520 (colored)

Partially reverse previous change.
Reset RTC only if ntp is running or adjtime system call has changed time.

Revision 1.520 / (download) - annotate - [select for diffs], Wed Apr 16 19:07:34 2003 UTC (21 years ago) by dsl
Branch: MAIN
Changes since 1.519: +2 -7 lines
Diff to previous 1.519 (colored)

Don't set the RTC to kernel time during shutdown.
This stops the system RTC drifting if any hardclock ticks were missed (eg
if the system spent any time at the kdb prompt).
The RTC is set whenever the system clock is set, so setting at shutdown
is unnecessary.

Revision 1.519 / (download) - annotate - [select for diffs], Fri Apr 11 22:02:30 2003 UTC (21 years ago) by nathanw
Branch: MAIN
Changes since 1.518: +9 -2 lines
Diff to previous 1.518 (colored)

Make cpu_getmcontext() run the PC through ras_lookup() so that kernel
getcontext() plus userlevel setcontext() (as used in libpthread) respects
the atomicity of RAS regions.

Revision 1.518 / (download) - annotate - [select for diffs], Tue Apr 1 20:54:23 2003 UTC (21 years ago) by thorpej
Branch: MAIN
Changes since 1.517: +2 -7 lines
Diff to previous 1.517 (colored)

Use PAGE_SIZE rather than NBPG.

Revision 1.517 / (download) - annotate - [select for diffs], Tue Mar 25 19:37:16 2003 UTC (21 years ago) by jmmv
Branch: MAIN
Changes since 1.516: +27 -2 lines
Diff to previous 1.516 (colored)

Implement the beep on halt feature.  When enabled, it makes the kernel beep
the computer speaker when it's completely safe to power down the machine
(after the "The operating system has halted." message).  This is useful for
headless machines.

The feature is only enabled if the BEEP_ONHALT option is defined (disabled      by default).  It can be tuned through the BEEP_ONHALT_{COUNT,PERIOD,PITCH}      options.

Closes my own PR kern/18792.

Revision 1.516 / (download) - annotate - [select for diffs], Mon Mar 3 22:14:16 2003 UTC (21 years, 1 month ago) by fvdl
Branch: MAIN
Changes since 1.515: +12 -10 lines
Diff to previous 1.515 (colored)

The IDT only contains gate descriptors, so define it as such.

Revision 1.515 / (download) - annotate - [select for diffs], Sat Mar 1 16:37:53 2003 UTC (21 years, 1 month ago) by fvdl
Branch: MAIN
Changes since 1.514: +6 -1592 lines
Diff to previous 1.514 (colored)

Move the CPU identification out of machdep.c into a seperate file.

Revision 1.514 / (download) - annotate - [select for diffs], Wed Feb 26 21:28:22 2003 UTC (21 years, 1 month ago) by fvdl
Branch: MAIN
Changes since 1.513: +8 -8 lines
Diff to previous 1.513 (colored)

Adapt for move of files to arch/x86.

Revision 1.513 / (download) - annotate - [select for diffs], Wed Feb 19 00:18:34 2003 UTC (21 years, 1 month ago) by fvdl
Branch: MAIN
Changes since 1.512: +3 -3 lines
Diff to previous 1.512 (colored)

Undo constification of mtrr_funcs. I'll deal with it later.

Revision 1.512 / (download) - annotate - [select for diffs], Fri Feb 14 01:11:21 2003 UTC (21 years, 2 months ago) by perry
Branch: MAIN
Changes since 1.511: +8 -5 lines
Diff to previous 1.511 (colored)

Instead of spinning, __asm __volatile("hlt").

Revision 1.511 / (download) - annotate - [select for diffs], Thu Feb 13 21:34:03 2003 UTC (21 years, 2 months ago) by ross
Branch: MAIN
Changes since 1.510: +5 -3 lines
Diff to previous 1.510 (colored)

If no keyboard is attached, implement RB_HALT with a spin.  kern/10481

Revision 1.510 / (download) - annotate - [select for diffs], Sun Feb 9 13:03:38 2003 UTC (21 years, 2 months ago) by enami
Branch: MAIN
Changes since 1.509: +3 -3 lines
Diff to previous 1.509 (colored)

Fix the type of variable `mtrr_funcs' so that this file compiles again
after constify.

Revision 1.471.4.3 / (download) - annotate - [select for diffs], Sat Feb 8 06:40:59 2003 UTC (21 years, 2 months ago) by jmc
Branch: netbsd-1-6
CVS Tags: netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001
Changes since 1.471.4.2: +4 -4 lines
Diff to previous 1.471.4.2 (colored) to branchpoint 1.471 (colored)

Pullup rev 1.480 (requested by kirill@lava.net and ok'd by erh for ticket #1148)
 Adjust the check for what segments should go on the low priority
 free list.  If a segment starts exactly at 16M don't try to split
 it because that causes the code to try to call uvm_page_physload
 with a zero length segment. PR#17199

Revision 1.509 / (download) - annotate - [select for diffs], Wed Feb 5 12:18:03 2003 UTC (21 years, 2 months ago) by nakayama
Branch: MAIN
Changes since 1.508: +3 -3 lines
Diff to previous 1.508 (colored)

Share i386/tsc_microtime.c with alpha and sparc64 as kern_microtime.c.
(approved by martin)

Revision 1.508 / (download) - annotate - [select for diffs], Fri Jan 17 23:10:30 2003 UTC (21 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.507: +241 -28 lines
Diff to previous 1.507 (colored)

Merge the nathanw_sa branch.

Revision 1.429.2.34 / (download) - annotate - [select for diffs], Thu Dec 19 00:33:48 2002 UTC (21 years, 4 months ago) by thorpej
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.429.2.33: +21 -2 lines
Diff to previous 1.429.2.33 (colored) next main 1.430 (colored)

Sync with HEAD.

Revision 1.507 / (download) - annotate - [select for diffs], Mon Dec 16 18:31:09 2002 UTC (21 years, 4 months ago) by jdolecek
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Changes since 1.506: +21 -2 lines
Diff to previous 1.506 (colored)

use the __HAVE_CPU_MAXPROC hook to limit kern.maxproc to number
  of available GDT slots
add code in init386() to force maxproc to be maximum cpu_maxproc()

this fixes port-i386/1635 by John Kohl

Revision 1.471.4.2 / (download) - annotate - [select for diffs], Thu Dec 12 23:10:36 2002 UTC (21 years, 4 months ago) by he
Branch: netbsd-1-6
Changes since 1.471.4.1: +56 -2 lines
Diff to previous 1.471.4.1 (colored) to branchpoint 1.471 (colored)

Pull up revision 1.497 (requested by minoura in ticket #1022):
  Add support for National Semiconductor Geode(TM) family of
  processors.

Revision 1.429.2.33 / (download) - annotate - [select for diffs], Wed Dec 11 06:00:56 2002 UTC (21 years, 4 months ago) by thorpej
Branch: nathanw_sa
Changes since 1.429.2.32: +247 -78 lines
Diff to previous 1.429.2.32 (colored)

Sync with HEAD.

Revision 1.506 / (download) - annotate - [select for diffs], Sat Dec 7 15:36:20 2002 UTC (21 years, 4 months ago) by junyoung
Branch: MAIN
Changes since 1.505: +89 -15 lines
Diff to previous 1.505 (colored)

Identify many Intel processors which were misidentified previously.

Revision 1.505 / (download) - annotate - [select for diffs], Sat Dec 7 15:18:08 2002 UTC (21 years, 4 months ago) by junyoung
Branch: MAIN
Changes since 1.504: +4 -4 lines
Diff to previous 1.504 (colored)

Print processor signature (id) after clock frequency.

Revision 1.504 / (download) - annotate - [select for diffs], Fri Dec 6 17:53:52 2002 UTC (21 years, 4 months ago) by junyoung
Branch: MAIN
Changes since 1.503: +3 -8 lines
Diff to previous 1.503 (colored)

Get rid of #ifdef CPUDEBUG. CPU signature is always displayed.

Revision 1.503 / (download) - annotate - [select for diffs], Fri Dec 6 14:47:07 2002 UTC (21 years, 4 months ago) by junyoung
Branch: MAIN
Changes since 1.502: +16 -17 lines
Diff to previous 1.502 (colored)

Don't pollute struct cpu_info with throwaway variables.

Revision 1.502 / (download) - annotate - [select for diffs], Fri Dec 6 05:03:02 2002 UTC (21 years, 4 months ago) by junyoung
Branch: MAIN
Changes since 1.501: +7 -7 lines
Diff to previous 1.501 (colored)

Rename amd_cpuid_cpu_cacheinfo() to amd_cpu_cacheinfo().

Revision 1.501 / (download) - annotate - [select for diffs], Fri Dec 6 02:38:25 2002 UTC (21 years, 4 months ago) by junyoung
Branch: MAIN
Changes since 1.500: +57 -15 lines
Diff to previous 1.500 (colored)

Display the extended feature flags with non-Intel processors rather than
the standard flags. See also PR#19163.

Before:

cpu0: AMD Athlon XP 1800+ (686-class), 1532.11 MHz
cpu0: features 383f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR>
cpu0: features 383f9ff<PGE,MCA,CMOV,FGPAT,PSE36,MMX>
cpu0: features 383f9ff<FXSR,SSE>

After:

cpu0: AMD Athlon XP 1800+ (686-class), 1532.11 MHz
cpu0: features c3cbf9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR>
cpu0: features c3cbf9ff<PGE,MCA,CMOV,PAT,PSE36,MPC,MMXX,MMX>
cpu0: features c3cbf9ff<FXSR,SSE,3DNOW2,3DNOW>

While I'm here, amd_cpuid_cpu_cacheinfo() is an info function rather
than a probe function.

Revision 1.500 / (download) - annotate - [select for diffs], Thu Dec 5 16:19:08 2002 UTC (21 years, 4 months ago) by junyoung
Branch: MAIN
Changes since 1.499: +12 -8 lines
Diff to previous 1.499 (colored)

- Identify VIA C3 processors. Fix PR#19163.
- While here, make use of CPUID2STEPPING() macro.

Revision 1.499 / (download) - annotate - [select for diffs], Thu Dec 5 10:01:56 2002 UTC (21 years, 4 months ago) by jdolecek
Branch: MAIN
Changes since 1.498: +6 -4 lines
Diff to previous 1.498 (colored)

a bit of KNF - function type on separate line than function name, function
name on start of line

Revision 1.429.2.32 / (download) - annotate - [select for diffs], Mon Nov 25 21:40:02 2002 UTC (21 years, 4 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.429.2.31: +4 -3 lines
Diff to previous 1.429.2.31 (colored)

Make ASTs per-proc rather than per-cpu; per-proc makes more sense when
a process that needs a trap can be running on multiple CPUs.

Revision 1.498 / (download) - annotate - [select for diffs], Fri Nov 22 15:23:41 2002 UTC (21 years, 4 months ago) by fvdl
Branch: MAIN
Changes since 1.497: +30 -31 lines
Diff to previous 1.497 (colored)

New interrupt code. The basic idea behind it is to hide the differences
in interrupt controllers in struct pic, and try to keep as much
common code as possible. At the lowest (asm) level, this is done
with CPP macros.

The main structure is now struct intrsource, describing an established
interrupt line, of any kind (soft/hard local apic/legacy apic/IO apic).
For quick masking, there may be a maximum of 32 sources per CPU.
Sources can be assigned to any CPU in the MP case, though currently they
all go to the boot CPU.

Revision 1.497 / (download) - annotate - [select for diffs], Thu Nov 14 12:52:28 2002 UTC (21 years, 5 months ago) by minoura
Branch: MAIN
Changes since 1.496: +56 -2 lines
Diff to previous 1.496 (colored)

Add support for National Semiconductor Geode(TM) familly of processors.
Thanks to Hiroshi Miura <miura AT da-cha DOT org> for testing.

Revision 1.429.2.31 / (download) - annotate - [select for diffs], Mon Nov 11 21:59:06 2002 UTC (21 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.429.2.30: +56 -51 lines
Diff to previous 1.429.2.30 (colored)

Catch up to -current

Revision 1.496 / (download) - annotate - [select for diffs], Sat Nov 2 01:58:51 2002 UTC (21 years, 5 months ago) by perry
Branch: MAIN
Changes since 1.495: +3 -3 lines
Diff to previous 1.495 (colored)

asm -> __asm

Revision 1.495 / (download) - annotate - [select for diffs], Fri Oct 25 12:01:56 2002 UTC (21 years, 5 months ago) by fvdl
Branch: MAIN
Changes since 1.494: +2 -29 lines
Diff to previous 1.494 (colored)

Fix MTRR code which had been broken since the MP merge (but silently
failed due to a missing include of opt_mtrr.h in cpu.c)

Revision 1.494 / (download) - annotate - [select for diffs], Thu Oct 24 07:43:21 2002 UTC (21 years, 5 months ago) by fvdl
Branch: MAIN
Changes since 1.493: +4 -5 lines
Diff to previous 1.493 (colored)

Make this actually compile.

Revision 1.493 / (download) - annotate - [select for diffs], Wed Oct 23 21:41:34 2002 UTC (21 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.492: +16 -9 lines
Diff to previous 1.492 (colored)

Enable Transmeta CPUs without the LongRun registers to get through
transmeta_cpu_{info,setup}().

Revision 1.471.4.1 / (download) - annotate - [select for diffs], Mon Oct 21 02:17:28 2002 UTC (21 years, 5 months ago) by lukem
Branch: netbsd-1-6
Changes since 1.471: +41 -16 lines
Diff to previous 1.471 (colored)

Pull up revision 1.492 via patch (requested by kanaoka in ticket #934):
Fix bugs in the BIOS memory probe.

- If the BIOS reports the same memory cluster multiple times,
  only allocate the extent once.

- If we fail to allocate an extent,
  don't add it to mem_clusters and don't increment mem_cluster_cnt.

- When loading the physical extents,
  make sure we don't try to add an extent with zero length (seg_start == tmp).

port-i386/13399: from maximum entropy <entropy@tappedin.com>.

Revision 1.492 / (download) - annotate - [select for diffs], Sun Oct 20 10:35:41 2002 UTC (21 years, 5 months ago) by kanaoka
Branch: MAIN
CVS Tags: kqueue-beforemerge, kqueue-aftermerge
Changes since 1.491: +41 -16 lines
Diff to previous 1.491 (colored)

Fix bugs in the BIOS memory probe.

- If the BIOS reports the same memory cluster multiple times,
  only allocate the extent once.

- If we fail to allocate an extent,
  don't add it to mem_clusters and don't increment mem_cluster_cnt.

- When loading the physical extents,
  make sure we don't try to add an extent with zero length (seg_start == tmp).

port-i386/13399: from maximum entropy <entropy@tappedin.com>.

Revision 1.429.2.30 / (download) - annotate - [select for diffs], Fri Oct 18 04:11:57 2002 UTC (21 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.429.2.29: +8 -9 lines
Diff to previous 1.429.2.29 (colored)

npxsave_proc() -> npxsave_lwp().

Adapt cpu_{get,set}mcontext to new i386 FP world order.

Revision 1.429.2.29 / (download) - annotate - [select for diffs], Fri Oct 18 02:37:44 2002 UTC (21 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.429.2.28: +744 -564 lines
Diff to previous 1.429.2.28 (colored)

Catch up to -current.

Revision 1.491 / (download) - annotate - [select for diffs], Fri Oct 18 00:51:22 2002 UTC (21 years, 6 months ago) by yamt
Branch: MAIN
Changes since 1.490: +3 -2 lines
Diff to previous 1.490 (colored)

add an entry for 0x83 to intel_cpuid_cache_info.

Revision 1.446.2.9 / (download) - annotate - [select for diffs], Thu Oct 10 18:33:21 2002 UTC (21 years, 6 months ago) by jdolecek
Branch: kqueue
Changes since 1.446.2.8: +699 -558 lines
Diff to previous 1.446.2.8 (colored) next main 1.447 (colored)

sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work

Revision 1.490 / (download) - annotate - [select for diffs], Tue Oct 8 20:17:09 2002 UTC (21 years, 6 months ago) by fvdl
Branch: MAIN
Changes since 1.489: +2 -5 lines
Diff to previous 1.489 (colored)

Get rid of pcb_flags; nothing was using it except for initialising it
to 0.

Revision 1.489 / (download) - annotate - [select for diffs], Sat Oct 5 21:20:27 2002 UTC (21 years, 6 months ago) by fvdl
Branch: MAIN
Changes since 1.488: +14 -11 lines
Diff to previous 1.488 (colored)

To be able to set up TSS gates, setgate needs another argument for the
selector.

Revision 1.488 / (download) - annotate - [select for diffs], Fri Oct 4 19:27:05 2002 UTC (21 years, 6 months ago) by junyoung
Branch: MAIN
Changes since 1.487: +2 -9 lines
Diff to previous 1.487 (colored)

Don't init IDT twice.

Revision 1.487 / (download) - annotate - [select for diffs], Fri Oct 4 18:42:34 2002 UTC (21 years, 6 months ago) by junyoung
Branch: MAIN
Changes since 1.486: +56 -5 lines
Diff to previous 1.486 (colored)

Correctly identify model 6, 7, and 8 of AMD Athlon and Duron processors.

Before:
cpu0: AMD Athlon Model 6 (Palomino) (686-class), 1532.11 MHz

After:
cpu0: AMD Athlon XP 1800+ (686-class), 1532.11 MHz

Revision 1.486 / (download) - annotate - [select for diffs], Fri Oct 4 08:44:08 2002 UTC (21 years, 6 months ago) by simonb
Branch: MAIN
Changes since 1.485: +7 -4 lines
Diff to previous 1.485 (colored)

Only declare and set the "step" variable in identifycpu() ifdef CPUDEBUG.

Revision 1.485 / (download) - annotate - [select for diffs], Thu Oct 3 19:39:51 2002 UTC (21 years, 6 months ago) by fvdl
Branch: MAIN
Changes since 1.484: +3 -3 lines
Diff to previous 1.484 (colored)

FIx off by one error for brand id array index.

Revision 1.484 / (download) - annotate - [select for diffs], Tue Oct 1 12:56:55 2002 UTC (21 years, 6 months ago) by fvdl
Branch: MAIN
CVS Tags: kqueue-base
Changes since 1.483: +679 -545 lines
Diff to previous 1.483 (colored)

Merge Bill Sommerfeld's i386 MP branch. This code has some known
caveats, but works quite well in a lot of MP cases, and all
UP cases that I have tested. Parts of this will hopefully be
reworked in the not-too-distant future.

Revision 1.483 / (download) - annotate - [select for diffs], Fri Sep 27 15:36:09 2002 UTC (21 years, 6 months ago) by provos
Branch: MAIN
Changes since 1.482: +4 -4 lines
Diff to previous 1.482 (colored)

remove trailing \n in panic().  approved perry.

Revision 1.482 / (download) - annotate - [select for diffs], Wed Sep 25 22:21:09 2002 UTC (21 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.481: +2 -3 lines
Diff to previous 1.481 (colored)

Don't include <sys/map.h>.

Revision 1.429.2.28 / (download) - annotate - [select for diffs], Tue Sep 17 21:15:06 2002 UTC (21 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.429.2.27: +18 -10 lines
Diff to previous 1.429.2.27 (colored)

Catch up to -current.

Revision 1.481 / (download) - annotate - [select for diffs], Fri Sep 6 13:18:43 2002 UTC (21 years, 7 months ago) by gehenna
Branch: MAIN
Changes since 1.480: +18 -10 lines
Diff to previous 1.480 (colored)

Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.

Revision 1.446.2.8 / (download) - annotate - [select for diffs], Fri Sep 6 08:36:16 2002 UTC (21 years, 7 months ago) by jdolecek
Branch: kqueue
Changes since 1.446.2.7: +134 -22 lines
Diff to previous 1.446.2.7 (colored)

sync kqueue branch with HEAD

Revision 1.480 / (download) - annotate - [select for diffs], Thu Sep 5 02:43:00 2002 UTC (21 years, 7 months ago) by erh
Branch: MAIN
Changes since 1.479: +4 -4 lines
Diff to previous 1.479 (colored)

Adjust the check for what segments should go on the low priority free list.
If a segment starts exactly at 16M don't try to split it because that causes
the code to try to call uvm_page_physload with a zero length segment.
(kern/17199)

Revision 1.376.2.41 / (download) - annotate - [select for diffs], Sat Aug 31 20:31:34 2002 UTC (21 years, 7 months ago) by sommerfeld
Branch: sommerfeld_i386mp_1
Changes since 1.376.2.40: +0 -0 lines
Diff to previous 1.376.2.40 (colored) to branchpoint 1.376 (colored) next main 1.377 (colored)

SMP branch resync.  Mostly RAS support.

Revision 1.471.2.5 / (download) - annotate - [select for diffs], Sat Aug 31 13:44:53 2002 UTC (21 years, 7 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.471.2.4: +4 -4 lines
Diff to previous 1.471.2.4 (colored) to branchpoint 1.471 (colored) next main 1.472 (colored)

catch up with -current.

Revision 1.429.2.27 / (download) - annotate - [select for diffs], Tue Aug 27 23:44:35 2002 UTC (21 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.429.2.26: +4 -4 lines
Diff to previous 1.429.2.26 (colored)

Catch up to -current.

Revision 1.479 / (download) - annotate - [select for diffs], Sun Aug 25 20:21:37 2002 UTC (21 years, 7 months ago) by thorpej
Branch: MAIN
CVS Tags: sommerfeld_i386mpnext, sommerfeld_i386mpbase_1, gehenna-devsw-base
Changes since 1.478: +4 -4 lines
Diff to previous 1.478 (colored)

Make nbuf, nswbuf, and bufpages unsigned.  Make all operations on these
variables unsigned, and update places where their values are printed.

Revision 1.376.2.40 / (download) - annotate - [select for diffs], Mon Aug 19 01:22:29 2002 UTC (21 years, 8 months ago) by sommerfeld
Branch: sommerfeld_i386mp_1
Changes since 1.376.2.39: +27 -11 lines
Diff to previous 1.376.2.39 (colored) to branchpoint 1.376 (colored)

merged with -current as of today.
rearranged gdt init to deal with KVM86 changes; however, KVM86 has no
chance of working yet; good thing it's not part of GENERIC

Revision 1.429.2.26 / (download) - annotate - [select for diffs], Wed Aug 14 18:29:35 2002 UTC (21 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.429.2.25: +35 -8 lines
Diff to previous 1.429.2.25 (colored)

Make cpu_getmcontext() get the XMM state when possible, and
make cpu_setmcontext() use it when it is provided, converting to and
from s87 format when necessary.

Revision 1.429.2.25 / (download) - annotate - [select for diffs], Thu Aug 1 03:30:21 2002 UTC (21 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.429.2.24: +3 -3 lines
Diff to previous 1.429.2.24 (colored)

sigexit(p, SIGILL) -> sigexit(l, SIGILL)

Revision 1.429.2.24 / (download) - annotate - [select for diffs], Thu Aug 1 02:42:04 2002 UTC (21 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.429.2.23: +27 -10 lines
Diff to previous 1.429.2.23 (colored)

Catch up to -current.

Revision 1.471.2.4 / (download) - annotate - [select for diffs], Sun Jul 21 13:00:40 2002 UTC (21 years, 8 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.471.2.3: +2 -4 lines
Diff to previous 1.471.2.3 (colored) to branchpoint 1.471 (colored)

catch up with -current.

Revision 1.429.2.23 / (download) - annotate - [select for diffs], Fri Jul 19 22:18:25 2002 UTC (21 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.429.2.22: +5 -9 lines
Diff to previous 1.429.2.22 (colored)

Invoke upcalls directly, instead of going through a trampoline.
(Since upcalls shouldn't return at all, even the return part of the
trampoline is unnecessary).

Revision 1.478 / (download) - annotate - [select for diffs], Wed Jul 17 14:55:42 2002 UTC (21 years, 9 months ago) by kanaoka
Branch: MAIN
Changes since 1.477: +2 -4 lines
Diff to previous 1.477 (colored)

 - Enable to enter sleep state S5 with ACPI.

Revision 1.471.2.3 / (download) - annotate - [select for diffs], Tue Jul 16 08:29:34 2002 UTC (21 years, 9 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.471.2.2: +134 -20 lines
Diff to previous 1.471.2.2 (colored) to branchpoint 1.471 (colored)

catch up with -current.

Revision 1.471.2.2 / (download) - annotate - [select for diffs], Sun Jul 14 17:47:58 2002 UTC (21 years, 9 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.471.2.1: +5 -4 lines
Diff to previous 1.471.2.1 (colored) to branchpoint 1.471 (colored)

catch up with -current.

Revision 1.429.2.22 / (download) - annotate - [select for diffs], Fri Jul 12 01:39:30 2002 UTC (21 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.429.2.21: +2 -3 lines
Diff to previous 1.429.2.21 (colored)

No longer need to pull in lwp.h; proc.h pulls it in for us.

Revision 1.477 / (download) - annotate - [select for diffs], Thu Jul 4 23:32:04 2002 UTC (21 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.476: +24 -6 lines
Diff to previous 1.476 (colored)

Add kernel support for having userland provide the signal trampoline:

* struct sigacts gets a new sigact_sigdesc structure, which has the
  sigaction and the trampoline/version.  Version 0 means "legacy kernel
  provided trampoline".  Other versions are coordinated with machine-
  dependent code in libc.
* sigaction1() grows two more arguments -- the trampoline pointer and
  the trampoline version.
* A new __sigaction_sigtramp() system call is provided to register a
  trampoline along with a signal handler.
* The handler is no longer passed to sensig() functions.  Instead,
  sendsig() looks up the handler by peeking in the sigacts for the
  process getting the signal (since it has to look in there for the
  trampoline anyway).
* Native sendsig() functions now select the appropriate trampoline and
  its arguments based on the trampoline version in the sigacts.

Changes to libc to use the new facility will be checked in later.  Kernel
version not bumped; we will ride the 1.6C bump made recently.

Revision 1.476 / (download) - annotate - [select for diffs], Thu Jul 4 10:22:20 2002 UTC (21 years, 9 months ago) by fvdl
Branch: MAIN
Changes since 1.475: +3 -3 lines
Diff to previous 1.475 (colored)

Match parameter decl of init386 with reality.

Revision 1.429.2.21 / (download) - annotate - [select for diffs], Tue Jul 2 20:42:13 2002 UTC (21 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.429.2.20: +2 -11 lines
Diff to previous 1.429.2.20 (colored)

Remove whitespace and a function that wasn't supposed to be here.

Revision 1.376.2.39 / (download) - annotate - [select for diffs], Tue Jun 25 15:44:52 2002 UTC (21 years, 9 months ago) by sommerfeld
Branch: sommerfeld_i386mp_1
Changes since 1.376.2.38: +127 -31 lines
Diff to previous 1.376.2.38 (colored) to branchpoint 1.376 (colored)

Resynch with -current.

Revision 1.429.2.20 / (download) - annotate - [select for diffs], Mon Jun 24 22:04:56 2002 UTC (21 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.429.2.19: +11 -3 lines
Diff to previous 1.429.2.19 (colored)

Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).

Revision 1.475 / (download) - annotate - [select for diffs], Sun Jun 23 22:18:51 2002 UTC (21 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.474: +6 -5 lines
Diff to previous 1.474 (colored)

During native signal delivery (and iBCS2, since it uses the native
sigcode), arrange to have the signal handler invoked directly, using
the trampoline only for the return path, saving a call insn.  Play
some other stack trickery in the trampoline to turn 2 pushl's into
one movl.

Revision 1.446.2.7 / (download) - annotate - [select for diffs], Sun Jun 23 17:37:25 2002 UTC (21 years, 9 months ago) by jdolecek
Branch: kqueue
Changes since 1.446.2.6: +18 -6 lines
Diff to previous 1.446.2.6 (colored)

catch up with -current on kqueue branch

Revision 1.429.2.19 / (download) - annotate - [select for diffs], Thu Jun 20 03:39:11 2002 UTC (21 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.429.2.18: +119 -17 lines
Diff to previous 1.429.2.18 (colored)

Catch up to -current.

Revision 1.474 / (download) - annotate - [select for diffs], Tue Jun 18 09:56:33 2002 UTC (21 years, 10 months ago) by tron
Branch: MAIN
Changes since 1.473: +3 -3 lines
Diff to previous 1.473 (colored)

Fix typo which caused a build failure for kernels with diagnostic checks.

Revision 1.473 / (download) - annotate - [select for diffs], Tue Jun 18 07:56:13 2002 UTC (21 years, 10 months ago) by tshiozak
Branch: MAIN
Changes since 1.472: +109 -14 lines
Diff to previous 1.472 (colored)

add MD support for ACPI sleep/wakeup.

Revision 1.472 / (download) - annotate - [select for diffs], Fri May 31 17:46:51 2002 UTC (21 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.471: +5 -4 lines
Diff to previous 1.471 (colored)

Add an __unused__ attribute to n_support and n_lower, since they are
unused if a kernel supports all CPU families.

Revision 1.376.2.38 / (download) - annotate - [select for diffs], Sun May 19 02:37:48 2002 UTC (21 years, 11 months ago) by sommerfeld
Branch: sommerfeld_i386mp_1
CVS Tags: i386mp_plus16_stable
Changes since 1.376.2.37: +6 -6 lines
Diff to previous 1.376.2.37 (colored) to branchpoint 1.376 (colored)

Tweak cpu cache description

Revision 1.376.2.37 / (download) - annotate - [select for diffs], Sun May 19 01:15:12 2002 UTC (21 years, 11 months ago) by sommerfeld
Branch: sommerfeld_i386mp_1
Changes since 1.376.2.36: +2 -4 lines
Diff to previous 1.376.2.36 (colored) to branchpoint 1.376 (colored)

Nuke some no-longer-needed debug printfs

Revision 1.376.2.36 / (download) - annotate - [select for diffs], Sat May 18 17:27:31 2002 UTC (21 years, 11 months ago) by sommerfeld
Branch: sommerfeld_i386mp_1
Changes since 1.376.2.35: +10 -1 lines
Diff to previous 1.376.2.35 (colored) to branchpoint 1.376 (colored)

Catch up with -current.  (commons elimination, changes to MI pci framework)

Revision 1.471.2.1 / (download) - annotate - [select for diffs], Fri May 17 13:49:54 2002 UTC (21 years, 11 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.471: +18 -10 lines
Diff to previous 1.471 (colored)

Replace the access to devsw table and the hard-coded major with devsw API.

Revision 1.471 / (download) - annotate - [select for diffs], Sun May 12 23:16:53 2002 UTC (21 years, 11 months ago) by matt
Branch: MAIN
CVS Tags: netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1
Branch point for: netbsd-1-6, gehenna-devsw
Changes since 1.470: +9 -3 lines
Diff to previous 1.470 (colored)

Eliminate commons.

Revision 1.376.2.35 / (download) - annotate - [select for diffs], Sat Apr 27 20:24:46 2002 UTC (21 years, 11 months ago) by sommerfeld
Branch: sommerfeld_i386mp_1
Changes since 1.376.2.34: +17 -12 lines
Diff to previous 1.376.2.34 (colored) to branchpoint 1.376 (colored)

Merge with current as of today

Revision 1.376.2.34 / (download) - annotate - [select for diffs], Sat Apr 27 14:39:36 2002 UTC (21 years, 11 months ago) by sommerfeld
Branch: sommerfeld_i386mp_1
Changes since 1.376.2.33: +10 -2 lines
Diff to previous 1.376.2.33 (colored) to branchpoint 1.376 (colored)

Add options TRAPLOG:

When enabled, each cpu gets a ring buffer; on every trap entry, we add
an entry to the trap log using the new locore "TLOG" macro.  Somewhat
like a flight recorder, this may give some post-mortem clues as to
what was going on as we were spiralling in...

XXX currently depends on various intel MSR's to record the low order
32 bits of the cycle counter as well as last-branch from and to
addresses.

Revision 1.429.2.18 / (download) - annotate - [select for diffs], Mon Apr 1 21:53:39 2002 UTC (22 years ago) by nathanw
Branch: nathanw_sa
Changes since 1.429.2.17: +3 -3 lines
Diff to previous 1.429.2.17 (colored)

p => l->l_proc

Revision 1.429.2.17 / (download) - annotate - [select for diffs], Mon Apr 1 07:40:39 2002 UTC (22 years ago) by nathanw
Branch: nathanw_sa
Changes since 1.429.2.16: +9 -4 lines
Diff to previous 1.429.2.16 (colored)

Catch up to -current.
(CVS: It's not just a program. It's an adventure!)

Revision 1.470 / (download) - annotate - [select for diffs], Wed Mar 20 15:59:27 2002 UTC (22 years ago) by joda
Branch: MAIN
CVS Tags: eeh-devprop-base, eeh-devprop
Changes since 1.469: +7 -2 lines
Diff to previous 1.469 (colored)

add HTT cpu flag, and further split message

Revision 1.469 / (download) - annotate - [select for diffs], Sun Mar 17 19:16:20 2002 UTC (22 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.468: +3 -3 lines
Diff to previous 1.468 (colored)

goodbye PS_STRINGS.

Revision 1.446.2.6 / (download) - annotate - [select for diffs], Sat Mar 16 15:58:14 2002 UTC (22 years, 1 month ago) by jdolecek
Branch: kqueue
Changes since 1.446.2.5: +3 -3 lines
Diff to previous 1.446.2.5 (colored)

Catch up with -current.

Revision 1.468 / (download) - annotate - [select for diffs], Wed Mar 6 13:10:20 2002 UTC (22 years, 1 month ago) by tsutsui
Branch: MAIN
CVS Tags: newlock-base, newlock
Changes since 1.467: +3 -3 lines
Diff to previous 1.467 (colored)

Change type of dumpmag to u_int32_t since it is actually
a 32bit unsigned magic number.
As per discussion on tech-kern, and fixes port-sparc64/11949.

Revision 1.429.2.16 / (download) - annotate - [select for diffs], Thu Feb 28 04:10:17 2002 UTC (22 years, 1 month ago) by nathanw
Branch: nathanw_sa
Changes since 1.429.2.15: +22 -16 lines
Diff to previous 1.429.2.15 (colored)

Catch up to -current.

Revision 1.376.2.33 / (download) - annotate - [select for diffs], Sun Feb 24 00:17:44 2002 UTC (22 years, 1 month ago) by sommerfeld
Branch: sommerfeld_i386mp_1
Changes since 1.376.2.32: +13 -8 lines
Diff to previous 1.376.2.32 (colored) to branchpoint 1.376 (colored)

Resynch with mainline.

Revision 1.446.2.5 / (download) - annotate - [select for diffs], Mon Feb 11 20:08:24 2002 UTC (22 years, 2 months ago) by jdolecek
Branch: kqueue
Changes since 1.446.2.4: +22 -16 lines
Diff to previous 1.446.2.4 (colored)

Sync w/ -current.

Revision 1.467 / (download) - annotate - [select for diffs], Thu Jan 31 17:40:51 2002 UTC (22 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: ifpoll-base
Changes since 1.466: +15 -11 lines
Diff to previous 1.466 (colored)

- fix hex constant in transmeta code to fit 32 bits.
- char assignment should be '\0'
- factor out some common strings

Revision 1.376.2.32 / (download) - annotate - [select for diffs], Mon Jan 28 04:21:38 2002 UTC (22 years, 2 months ago) by sommerfeld
Branch: sommerfeld_i386mp_1
Changes since 1.376.2.31: +10 -3 lines
Diff to previous 1.376.2.31 (colored) to branchpoint 1.376 (colored)

Yet Another mergeup with -current.

Revision 1.466 / (download) - annotate - [select for diffs], Thu Jan 24 03:20:28 2002 UTC (22 years, 2 months ago) by rafal
Branch: MAIN
Changes since 1.465: +6 -6 lines
Diff to previous 1.465 (colored)

One more change resulting from my GDT rearrangement... Since GMACHCALLS_SEL
is always defined now, don't use that to test if we should install the MACH
compat gate; test COMPAT_MACH instead.

Revision 1.465 / (download) - annotate - [select for diffs], Tue Jan 15 13:34:52 2002 UTC (22 years, 3 months ago) by drochner
Branch: MAIN
Changes since 1.464: +5 -3 lines
Diff to previous 1.464 (colored)

recognize Athlon model 6 (Palomino) and 7 (Morgan)

Revision 1.446.2.4 / (download) - annotate - [select for diffs], Thu Jan 10 19:44:41 2002 UTC (22 years, 3 months ago) by thorpej
Branch: kqueue
Changes since 1.446.2.3: +325 -24 lines
Diff to previous 1.446.2.3 (colored)

Sync kqueue branch with -current.

Revision 1.429.2.15 / (download) - annotate - [select for diffs], Tue Jan 8 00:25:23 2002 UTC (22 years, 3 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.429.2.14: +293 -9 lines
Diff to previous 1.429.2.14 (colored)

Catch up to -current.

Revision 1.376.2.31 / (download) - annotate - [select for diffs], Sat Dec 29 23:31:02 2001 UTC (22 years, 3 months ago) by sommerfeld
Branch: sommerfeld_i386mp_1
Changes since 1.376.2.30: +42 -33 lines
Diff to previous 1.376.2.30 (colored) to branchpoint 1.376 (colored)

Set up per-cpu GDT.
Use %fs for per-cpu data access.

Revision 1.376.2.30 / (download) - annotate - [select for diffs], Sat Dec 29 21:09:06 2001 UTC (22 years, 3 months ago) by sommerfeld
Branch: sommerfeld_i386mp_1
Changes since 1.376.2.29: +316 -17 lines
Diff to previous 1.376.2.29 (colored) to branchpoint 1.376 (colored)

Yet another mergeup.

New work:
 - Frank van der Linden's tlb shootdown fix.
Mainline functionality merged:
 - IrDA
 - Kernel RCSID's
 - Transmeta CPU support
 - ACPI
 - XMM register access through procfs

Revision 1.429.2.14 / (download) - annotate - [select for diffs], Fri Dec 28 06:12:18 2001 UTC (22 years, 3 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.429.2.13: +1 -26 lines
Diff to previous 1.429.2.13 (colored)

Garbage collect cpu_stashcontext().

Revision 1.464 / (download) - annotate - [select for diffs], Thu Dec 27 15:28:34 2001 UTC (22 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.463: +37 -11 lines
Diff to previous 1.463 (colored)

use the new ci_info hook to print extra cpu information during probe.

Revision 1.429.2.13 / (download) - annotate - [select for diffs], Mon Dec 17 20:49:14 2001 UTC (22 years, 4 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.429.2.12: +7 -106 lines
Diff to previous 1.429.2.12 (colored)

Adapt to new, much smaller, cpu_upcall() workload.

Revision 1.463 / (download) - annotate - [select for diffs], Tue Nov 20 07:44:17 2001 UTC (22 years, 4 months ago) by enami
Branch: MAIN
Changes since 1.462: +8 -8 lines
Diff to previous 1.462 (colored)

Just test if DEBUG_MEMLOAD is defined or not instead of testing its value.

Revision 1.462 / (download) - annotate - [select for diffs], Tue Nov 20 07:42:33 2001 UTC (22 years, 4 months ago) by enami
Branch: MAIN
Changes since 1.461: +41 -38 lines
Diff to previous 1.461 (colored)

Cosmetic changes to previous commit.

Revision 1.429.2.12 / (download) - annotate - [select for diffs], Sat Nov 17 21:38:24 2001 UTC (22 years, 5 months ago) by thorpej
Branch: nathanw_sa
Changes since 1.429.2.11: +5 -15 lines
Diff to previous 1.429.2.11 (colored)

Use sadata_upcall_free(), and use it to plug a memory leak in an
error path (copying out arg onto user stack fails).

Revision 1.461 / (download) - annotate - [select for diffs], Sat Nov 17 08:20:58 2001 UTC (22 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.460: +255 -3 lines
Diff to previous 1.460 (colored)

Add transmeta crusoe cpu support from toshi's fiva patches.

Revision 1.429.2.11 / (download) - annotate - [select for diffs], Sat Nov 17 00:52:02 2001 UTC (22 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.429.2.10: +36 -20 lines
Diff to previous 1.429.2.10 (colored)

Adapt to new upcall signature and possible argument copying.

Revision 1.460 / (download) - annotate - [select for diffs], Thu Nov 15 07:03:30 2001 UTC (22 years, 5 months ago) by lukem
Branch: MAIN
Changes since 1.459: +4 -1 lines
Diff to previous 1.459 (colored)

add RCSID

Revision 1.429.2.10 / (download) - annotate - [select for diffs], Wed Nov 14 19:12:45 2001 UTC (22 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.429.2.9: +18 -16 lines
Diff to previous 1.429.2.9 (colored)

Catch up to -current.

Revision 1.457.2.1 / (download) - annotate - [select for diffs], Mon Nov 12 21:17:04 2001 UTC (22 years, 5 months ago) by thorpej
Branch: thorpej-mips-cache
Changes since 1.457: +18 -16 lines
Diff to previous 1.457 (colored) next main 1.458 (colored)

Sync the thorpej-mips-cache branch with -current.

Revision 1.459 / (download) - annotate - [select for diffs], Wed Oct 31 20:35:21 2001 UTC (22 years, 5 months ago) by jdolecek
Branch: MAIN
CVS Tags: thorpej-mips-cache-base
Changes since 1.458: +16 -14 lines
Diff to previous 1.458 (colored)

use right number of zeroes for Cyrix i386_cpuid_cpus[] entries
reformat the entries with all zeroes to be more easier to verify

Revision 1.458 / (download) - annotate - [select for diffs], Sun Oct 28 16:17:05 2001 UTC (22 years, 5 months ago) by jdolecek
Branch: MAIN
Changes since 1.457: +3 -3 lines
Diff to previous 1.457 (colored)

Add "Pentium III (Tualatin)" entry to CPUVENDOR_INTEL/CPUCLASS_686.
Make sure the CPUCLASS_686 entry has really 17 (i.e. 16 + default)
name entries as it's supposed to, so that code won't crash when
run on Intel CPUCLASS_686 processor which doesn't have