The NetBSD Project

CVS log for src/sys/arch/x86/x86/patch.c

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.53 / (download) - annotate - [select for diffs], Sat Aug 20 23:48:51 2022 UTC (5 months, 2 weeks ago) by riastradh
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm, HEAD
Changes since 1.52: +3 -2 lines
Diff to previous 1.52 (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.52 / (download) - annotate - [select for diffs], Sat Aug 20 23:15:37 2022 UTC (5 months, 2 weeks ago) by riastradh
Branch: MAIN
Changes since 1.51: +3 -2 lines
Diff to previous 1.51 (colored)

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

Revision 1.51 / (download) - annotate - [select for diffs], Sat Jul 30 14:11:00 2022 UTC (6 months, 1 week ago) by riastradh
Branch: MAIN
Changes since 1.50: +2 -29 lines
Diff to previous 1.50 (colored)

x86: Eliminate mfence hotpatch for membar_sync.

The more-compatible  LOCK ADD $0,-N(%rsp)  turns out to be cheaper
than MFENCE anyway.  Let's save some space and maintenance and rip
out the hotpatching for it.

Revision 1.50 / (download) - annotate - [select for diffs], Sat Apr 9 12:07:00 2022 UTC (9 months, 4 weeks ago) by riastradh
Branch: MAIN
Changes since 1.49: +10 -20 lines
Diff to previous 1.49 (colored)

x86: Every load is a load-acquire, so membar_consumer is a noop.

lfence is only needed for MD logic, such as operations on I/O memory
rather than normal cacheable memory, or special instructions like
RDTSC -- never for MI synchronization between threads/CPUs.  No need
for hot-patching to do lfence here.

(The x86_lfence function might reasonably be patched on i386 to do
lfence for MD logic, but it isn't now and this doesn't change that.)

Revision 1.49 / (download) - annotate - [select for diffs], Thu May 7 18:13:05 2020 UTC (2 years, 9 months ago) by maxv
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.48: +4 -2 lines
Diff to previous 1.48 (colored)

Fix LOCKDEBUG compilation on i386.

Revision 1.48 / (download) - annotate - [select for diffs], Sat May 2 16:25:47 2020 UTC (2 years, 9 months ago) by maxv
Branch: MAIN
Changes since 1.47: +46 -2 lines
Diff to previous 1.47 (colored)

Remove the D bit as part of the hotpatch cleanup procedure.

Revision 1.47 / (download) - annotate - [select for diffs], Sat May 2 11:37:17 2020 UTC (2 years, 9 months ago) by maxv
Branch: MAIN
Changes since 1.46: +193 -85 lines
Diff to previous 1.46 (colored)

Modify the hotpatch mechanism, in order to make it much less ROP-friendly.

Currently x86_patch_window_open is a big problem, because it is a perfect
function to inject/modify executable code with ROP.

 - Remove x86_patch_window_open(), along with its x86_patch_window_close()
   counterpart.
 - Introduce a read-only link-set of hotpatch descriptor structures,
   which reference a maximum of two read-only hotpatch sources.
 - Modify x86_hotpatch() to open a window and call the new
   x86_hotpatch_apply() function in a hard-coded manner.
 - Modify x86_hotpatch() to take a name and a selector, and have
   x86_hotpatch_apply() resolve the descriptor from the name and the
   source from the selector, before hotpatching.
 - Move the error handling in a separate x86_hotpatch_cleanup() function,
   that gets called after we closed the window.

The resulting implementation is a bit complex and non-obvious. But it
gains the following properties: the code executed in the hotpatch window
is strictly hard-coded (no callback and no possibility to execute your own
code in the window) and the pointers this code accesses are strictly
read-only (no possibility to forge pointers to hotpatch an area that was
not designated as hotpatchable at compile-time, and no possibility to
choose what bytes to write other than the maximum of two read-only
templates that were designated as valid for the given destination at
compile-time).

With current CPUs this slightly improves a situation that is already
pretty bad by definition on x86. Assuming CET however, this change closes
a big hole and is kinda great.

The only ~problem there is, is that dtrace-fbt tries to hotpatch random
places with random bytes, and there is just no way to make it safe.
However dtrace is only in a module, that is rarely used and never compiled
into the kernel, so it's not a big problem; add a shitty & vulnerable
independent hotpatch window in it, and leave big XXXs. It looks like fbt
is going to collapse soon anyway.

Revision 1.46 / (download) - annotate - [select for diffs], Fri May 1 09:40:47 2020 UTC (2 years, 9 months ago) by maxv
Branch: MAIN
Changes since 1.45: +13 -31 lines
Diff to previous 1.45 (colored)

Switch the rest of i386 to the x86_hotpatch mechanism.

Revision 1.45 / (download) - annotate - [select for diffs], Fri May 1 09:17:58 2020 UTC (2 years, 9 months ago) by maxv
Branch: MAIN
Changes since 1.44: +5 -31 lines
Diff to previous 1.44 (colored)

Use absolute jumps, and drop the PC-relative patching. We want exact
templates.

Revision 1.44 / (download) - annotate - [select for diffs], Fri May 1 08:32:50 2020 UTC (2 years, 9 months ago) by maxv
Branch: MAIN
Changes since 1.43: +7 -15 lines
Diff to previous 1.43 (colored)

Use the hotpatch framework when patching _atomic_cas_64.

Revision 1.43 / (download) - annotate - [select for diffs], Thu Apr 30 17:17:33 2020 UTC (2 years, 9 months ago) by maxv
Branch: MAIN
Changes since 1.42: +22 -28 lines
Diff to previous 1.42 (colored)

Switch to templates.

Revision 1.42 / (download) - annotate - [select for diffs], Sun Apr 26 14:49:17 2020 UTC (2 years, 9 months ago) by maxv
Branch: MAIN
Changes since 1.41: +14 -21 lines
Diff to previous 1.41 (colored)

Use the hotpatch framework for LFENCE/MFENCE.

Revision 1.41 / (download) - annotate - [select for diffs], Sun Apr 26 13:37:14 2020 UTC (2 years, 9 months ago) by maxv
Branch: MAIN
Changes since 1.40: +2 -6 lines
Diff to previous 1.40 (colored)

Drop the hardcoded array, use the hotpatch section.

Revision 1.40 / (download) - annotate - [select for diffs], Sat Apr 25 15:26:18 2020 UTC (2 years, 9 months ago) by bouyer
Branch: MAIN
Changes since 1.39: +5 -5 lines
Diff to previous 1.39 (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.37.6.3 / (download) - annotate - [select for diffs], Wed Apr 15 16:04:06 2020 UTC (2 years, 9 months ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.37.6.2: +5 -5 lines
Diff to previous 1.37.6.2 (colored) to branchpoint 1.37 (colored) next main 1.38 (colored)

On amd64, always use the cmpxchg8b version of spllower. All x86_64 host should
have it and we already rely on it in lock stubs.
On i386, always use i686_mutex_spin_exit and cx8_spllower for Xen;
Xen doesn't run on CPUs on CPUs lacking the required instructions anyway.
Skip x86_patch only for XENPV, and adjust for changes in assembly functions.
Tested on Xen PV and PVHVM, and on bare metal core i5.

Revision 1.37.6.2 / (download) - annotate - [select for diffs], Tue Apr 14 16:53:57 2020 UTC (2 years, 9 months ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.37.6.1: +3 -4 lines
Diff to previous 1.37.6.1 (colored) to branchpoint 1.37 (colored)

Always patch spllower with cx8_spllower; it works fine for Xen now
Include x86/x86/patch.c is !xenpv
While there, defopt XENPV

Revision 1.34.2.2 / (download) - annotate - [select for diffs], Mon Apr 13 08:04:11 2020 UTC (2 years, 9 months ago) by martin
Branch: phil-wifi
Changes since 1.34.2.1: +3 -7 lines
Diff to previous 1.34.2.1 (colored) to branchpoint 1.34 (colored) next main 1.35 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.37.6.1 / (download) - annotate - [select for diffs], Fri Apr 10 14:37:54 2020 UTC (2 years, 9 months ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.37: +4 -3 lines
Diff to previous 1.37 (colored)

Skip cx8_spllower patch if we're running on any form of Xen PV,
we can't handle PV interrupts with a single atomic op here.
Enable x86_patch() for Xen too.

Revision 1.39 / (download) - annotate - [select for diffs], Fri Apr 10 14:35:26 2020 UTC (2 years, 9 months ago) by bouyer
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, bouyer-xenpvh-base2, bouyer-xenpvh-base1
Changes since 1.38: +1 -2 lines
Diff to previous 1.38 (colored)

Revert, wrong branch

Revision 1.38 / (download) - annotate - [select for diffs], Fri Apr 10 14:34:27 2020 UTC (2 years, 9 months ago) by bouyer
Branch: MAIN
Changes since 1.37: +4 -3 lines
Diff to previous 1.37 (colored)

Skip cx8_spllower patch if we're running on any form of Xen PV,
we can't handle PV interrupts with a single atomic op here.
Enable x86_patch() for Xen too.

Revision 1.37 / (download) - annotate - [select for diffs], Wed Sep 18 15:07:08 2019 UTC (3 years, 4 months ago) by kamil
Branch: MAIN
CVS Tags: phil-wifi-20200406, phil-wifi-20191119, is-mlppp-base, is-mlppp, bouyer-xenpvh-base, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache
Branch point for: bouyer-xenpvh
Changes since 1.36: +3 -7 lines
Diff to previous 1.36 (colored)

Switch to __noubsan in x86_hotpatch()

Revision 1.34.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:06:54 2019 UTC (3 years, 7 months ago) by christos
Branch: phil-wifi
Changes since 1.34: +8 -15 lines
Diff to previous 1.34 (colored)

Sync with HEAD

Revision 1.36 / (download) - annotate - [select for diffs], Tue May 28 13:20:23 2019 UTC (3 years, 8 months ago) by kamil
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.35: +8 -2 lines
Diff to previous 1.35 (colored)

Disable sanitizer instrumentation in x86_hotpatch()

Local variables have empty (0-sized), unknown alignment to UBSan.
This is hard to workaround without mutating the code too much.

Revision 1.33.2.2 / (download) - annotate - [select for diffs], Sat Jul 28 04:37:42 2018 UTC (4 years, 6 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.33.2.1: +2 -15 lines
Diff to previous 1.33.2.1 (colored) to branchpoint 1.33 (colored) next main 1.34 (colored)

Sync with HEAD

Revision 1.35 / (download) - annotate - [select for diffs], Sat Jul 14 14:34:32 2018 UTC (4 years, 6 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, isaki-audio2-base, isaki-audio2
Changes since 1.34: +2 -15 lines
Diff to previous 1.34 (colored)

Remove ifdef GPROF.

Revision 1.22.22.2 / (download) - annotate - [select for diffs], Sat Apr 14 10:11:49 2018 UTC (4 years, 9 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1
Changes since 1.22.22.1: +23 -2 lines
Diff to previous 1.22.22.1 (colored) to branchpoint 1.22 (colored) next main 1.23 (colored)

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

sys/arch/amd64/amd64/copy.S		1.29 (adapted, via patch)
sys/arch/amd64/amd64/amd64_trap.S	1.16,1.19 (partial) (via patch)
sys/arch/amd64/amd64/trap.c		1.102,1.106 (partial),1.110 (via patch)
sys/arch/amd64/include/frameasm.h	1.22,1.24 (via patch)
sys/arch/x86/x86/cpu.c			1.137 (via patch)
sys/arch/x86/x86/patch.c		1.23,1.26 (partial) (via patch)

Backport of SMAP support.

Revision 1.33.2.1 / (download) - annotate - [select for diffs], Thu Mar 15 09:12:04 2018 UTC (4 years, 10 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.33: +5 -3 lines
Diff to previous 1.33 (colored)

Synch with HEAD

Revision 1.34 / (download) - annotate - [select for diffs], Tue Mar 13 16:52:42 2018 UTC (4 years, 10 months 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, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: phil-wifi
Changes since 1.33: +5 -3 lines
Diff to previous 1.33 (colored)

Fix wrong order; first enable WP, then enable interrupts. Otherwise we
might get an interrupt before re-enabling WP, and be rescheduled as a
result. In practice it never happens, because the previous PSL always
has interrupts disabled too.

Revision 1.22.22.1 / (download) - annotate - [select for diffs], Tue Mar 6 10:17:11 2018 UTC (4 years, 11 months ago) by martin
Branch: netbsd-8
Changes since 1.22: +76 -25 lines
Diff to previous 1.22 (colored)

Pull up the following revisions, requested by maxv in ticket #603:

	amd64/conf/kern.ldscript      1.25 (patch)
	amd64/conf/kern.ldscript.Xen  1.14 (patch)
	i386/conf/kern.ldscript       1.21 (patch)
	i386/conf/kern.ldscript.Xen   1.15 (patch)
	x86/include/cpufunc.h         1.24 (patch)
	x86/x86/patch.c               1.25 (partial) 1.26 (partial)

Backport x86_hotpatch.

Revision 1.33 / (download) - annotate - [select for diffs], Thu Feb 22 09:41:06 2018 UTC (4 years, 11 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-base
Branch point for: pgoyette-compat
Changes since 1.32: +29 -49 lines
Diff to previous 1.32 (colored)

Improve the SVS initialization.

Declare x86_patch_window_open() and x86_patch_window_close(), and globalify
x86_hotpatch().

Introduce svs_enable() in x86/svs.c, that does the SVS hotpatching.

Change svs_init() to take a bool. This function gets called twice; early
when the system just booted (and nothing is initialized), lately when at
least pmap_kernel has been initialized.

Revision 1.32 / (download) - annotate - [select for diffs], Thu Feb 22 08:56:52 2018 UTC (4 years, 11 months ago) by maxv
Branch: MAIN
Changes since 1.31: +34 -2 lines
Diff to previous 1.31 (colored)

Add a dynamic detection for SVS.

The SVS_* macros are now compiled as skip-noopt. When the system boots, if
the cpu is from Intel, they are hotpatched to their real content.
Typically:

		jmp	1f
		int3
		int3
		int3
		... int3 ...
	1:

gets hotpatched to:

		movq	SVS_UTLS+UTLS_KPDIRPA,%rax
		movq	%rax,%cr3
		movq	CPUVAR(KRSP0),%rsp

These two chunks of code being of the exact same size. We put int3 (0xCC)
to make sure we never execute there.

In the non-SVS (ie non-Intel) case, all it costs is one jump. Given that
the SVS_* macros are small, this jump will likely leave us in the same
icache line, so it's pretty fast.

The syscall entry point is special, because there we use a scratch uint64_t
not in curcpu but in the UTLS page, and it's difficult to hotpatch this
properly. So instead of hotpatching we declare the entry point as an ASM
macro, and define two functions: syscall and syscall_svs, the latter being
the one used in the SVS case.

While here 'syscall' is optimized not to contain an SVS_ENTER - this way
we don't even need to do a jump on the non-SVS case.

When adding pages in the user page tables, make sure we don't have PG_G,
now that it's dynamic.

A read-only sysctl is added, machdep.svs_enabled, that tells whether the
kernel uses SVS or not.

More changes to come, svs_init() is not very clean.

Revision 1.31 / (download) - annotate - [select for diffs], Sat Jan 27 09:33:25 2018 UTC (5 years ago) by maxv
Branch: MAIN
Changes since 1.30: +2 -4 lines
Diff to previous 1.30 (colored)

Add SMAP support for i386.

Revision 1.30 / (download) - annotate - [select for diffs], Sun Jan 7 16:08:12 2018 UTC (5 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.29: +3 -4 lines
Diff to previous 1.29 (colored)

make this compile w/o LOCKDEBUG

Revision 1.29 / (download) - annotate - [select for diffs], Sun Jan 7 13:43:24 2018 UTC (5 years, 1 month ago) by maxv
Branch: MAIN
Changes since 1.28: +2 -5 lines
Diff to previous 1.28 (colored)

Switch x86_retpatch[] -> HOTPATCH().

Revision 1.28 / (download) - annotate - [select for diffs], Sun Jan 7 13:37:39 2018 UTC (5 years, 1 month ago) by maxv
Branch: MAIN
Changes since 1.27: +4 -2 lines
Diff to previous 1.27 (colored)

Fix previous - atomic_lockpatch[] is still there.

Revision 1.27 / (download) - annotate - [select for diffs], Sun Jan 7 13:15:24 2018 UTC (5 years, 1 month ago) by maxv
Branch: MAIN
Changes since 1.26: +9 -9 lines
Diff to previous 1.26 (colored)

Switch x86_lockpatch[] -> HOTPATCH().

Revision 1.26 / (download) - annotate - [select for diffs], Sun Jan 7 12:42:46 2018 UTC (5 years, 1 month ago) by maxv
Branch: MAIN
Changes since 1.25: +33 -12 lines
Diff to previous 1.25 (colored)

Implement a real hotpatch feature.

Define a HOTPATCH() macro, that puts a label and additional information
in the new .rodata.hotpatch kernel section. In patch.c, scan the section
and patch what needs to be. Now it is possible to hotpatch the content of
a macro.

SMAP is switched to use this new system; this saves a call+ret in each
kernel entry/exit point.

Many other operating systems do the same.

Revision 1.25 / (download) - annotate - [select for diffs], Sun Jan 7 11:24:45 2018 UTC (5 years, 1 month ago) by maxv
Branch: MAIN
Changes since 1.24: +30 -15 lines
Diff to previous 1.24 (colored)

Give patchbytes an array.

Revision 1.21.18.2 / (download) - annotate - [select for diffs], Sun Dec 3 11:36:50 2017 UTC (5 years, 2 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.21.18.1: +31 -1 lines
Diff to previous 1.21.18.1 (colored) to branchpoint 1.21 (colored) next main 1.22 (colored)

update from HEAD

Revision 1.24 / (download) - annotate - [select for diffs], Fri Oct 27 23:22:01 2017 UTC (5 years, 3 months ago) by riastradh
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202
Changes since 1.23: +8 -3 lines
Diff to previous 1.23 (colored)

Add comment explaining why membar_producer is not sfence.

On x86, ordinary non-temporal stores are always issued in program
order to main memory and to other CPUs.

Revision 1.23 / (download) - annotate - [select for diffs], Tue Oct 17 06:58:15 2017 UTC (5 years, 3 months ago) by maxv
Branch: MAIN
Changes since 1.22: +27 -2 lines
Diff to previous 1.22 (colored)

Add support for SMAP on amd64.

PSL_AC is cleared from %rflags in each kernel entry point. In the copy
sections, a copy window is opened and the kernel can touch userland
pages. This window is closed when the kernel is done, either at the end
of the copy sections or in the fault-recover functions.

This implementation is not optimized yet, due to the fact that INTRENTRY
is a macro, and we can't hotpatch macros.

Sent on tech-kern@ a month or two ago, tested on a Kabylake.

Revision 1.21.18.1 / (download) - annotate - [select for diffs], Wed Aug 20 00:03:29 2014 UTC (8 years, 5 months ago) by tls
Branch: tls-maxphys
Changes since 1.21: +5 -5 lines
Diff to previous 1.21 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.21.8.1 / (download) - annotate - [select for diffs], Thu May 22 11:40:14 2014 UTC (8 years, 8 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.21: +5 -5 lines
Diff to previous 1.21 (colored) next main 1.22 (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.21.22.1 / (download) - annotate - [select for diffs], Sun May 18 17:45:30 2014 UTC (8 years, 8 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.21: +5 -5 lines
Diff to previous 1.21 (colored) next main 1.22 (colored)

sync with head

Revision 1.22 / (download) - annotate - [select for diffs], Fri Nov 15 08:47:55 2013 UTC (9 years, 2 months ago) by msaitoh
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, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606, nick-nhusb-base-20150406, nick-nhusb-base, nick-nhusb, netbsd-8-base, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, 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, netbsd-7-0, netbsd-7, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: netbsd-8
Changes since 1.21: +5 -5 lines
Diff to previous 1.21 (colored)

 Modify some macros and add some new macros for CPU family and model
to reduce code duplication and to avoid bug.

CPUID_TO_STEPPING(cpuid)	(not changed)

CPUID_TO_FAMILY(cpuid)		(new)
CPUID_TO_MODEL(cpuid)		(new)

	Return the display family and the display model.
	The macro names are the same as FreeBSD.

CPUID_TO_BASEFAMILY(cpuid)	(The old name was CPUID2FAMILY)
CPUID_TO_BASEMODEL(cpuid)	(The old name was CPUID2MODEL)

	Only for the base field.

CPUID_TO_EXTFAMILY(cpuid)	(The old name was CPUID2EXTFAMILY)
CPUID_TO_EXTMODEL(cpuid)	(The old name was CPUID2EXTMODEL)

	Only for the extended field.

See http://mail-index.netbsd.org/port-amd64/2013/11/12/msg001978.html

Revision 1.15.2.3 / (download) - annotate - [select for diffs], Sun Oct 24 22:48:19 2010 UTC (12 years, 3 months ago) by jym
Branch: jym-xensuspend
Changes since 1.15.2.2: +11 -6 lines
Diff to previous 1.15.2.2 (colored) to branchpoint 1.15 (colored) next main 1.16 (colored)

Sync with HEAD

Revision 1.11.10.4 / (download) - annotate - [select for diffs], Wed Aug 11 22:52:57 2010 UTC (12 years, 5 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.11.10.3: +5 -5 lines
Diff to previous 1.11.10.3 (colored) to branchpoint 1.11 (colored) next main 1.12 (colored)

sync with head.

Revision 1.20.4.1 / (download) - annotate - [select for diffs], Sun May 30 05:17:13 2010 UTC (12 years, 8 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.20: +5 -5 lines
Diff to previous 1.20 (colored) next main 1.21 (colored)

sync with head

Revision 1.20.2.1 / (download) - annotate - [select for diffs], Fri Apr 30 14:39:59 2010 UTC (12 years, 9 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.20: +5 -5 lines
Diff to previous 1.20 (colored) next main 1.21 (colored)

Sync with HEAD.

Revision 1.14.4.3.2.1.2.1 / (download) - annotate - [select for diffs], Wed Apr 21 00:33:46 2010 UTC (12 years, 9 months ago) by matt
Branch: matt-nb5-mips64
CVS Tags: matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-k15
Changes since 1.14.4.3.2.1: +2 -2 lines
Diff to previous 1.14.4.3.2.1 (colored) next main 1.14.4.4 (colored)

sync to netbsd-5

Revision 1.21 / (download) - annotate - [select for diffs], Sun Apr 18 23:47:51 2010 UTC (12 years, 9 months ago) by jym
Branch: MAIN
CVS Tags: yamt-pagecache-tag8, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base7, uebayasi-xip-base6, uebayasi-xip-base5, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1, rmind-uvmplock-nbase, rmind-uvmplock-base, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, netbsd-6-base, 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-1, 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, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, matt-mips64-premerge-20101231, khorben-n900, jym-xensuspend-nbase, jym-xensuspend-base, jruoho-x86intr-base, jruoho-x86intr, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base10, jmcneill-usbmp-base, jmcneill-usbmp, jmcneill-audiomp3-base, jmcneill-audiomp3, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2, agc-symver-base, agc-symver
Branch point for: yamt-pagecache, tls-maxphys, rmind-smpnet
Changes since 1.20: +5 -5 lines
Diff to previous 1.20 (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.11.10.3 / (download) - annotate - [select for diffs], Thu Mar 11 15:03:09 2010 UTC (12 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.11.10.2: +8 -3 lines
Diff to previous 1.11.10.2 (colored) to branchpoint 1.11 (colored)

sync with head

Revision 1.20 / (download) - annotate - [select for diffs], Tue Nov 3 20:11:53 2009 UTC (13 years, 3 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base, matt-premerge-20091211
Branch point for: uebayasi-xip, rmind-uvmplock
Changes since 1.19: +4 -2 lines
Diff to previous 1.19 (colored)

Gracelessly bracket #include "opt_spldebug.h" with #ifdef i386.
Should fix the amd64 kernel-build failure that Andreas Wrede
reported.

Revision 1.19 / (download) - annotate - [select for diffs], Tue Nov 3 05:23:28 2009 UTC (13 years, 3 months ago) by dyoung
Branch: MAIN
Changes since 1.18: +6 -3 lines
Diff to previous 1.18 (colored)

Add a kernel configuration flag, SPLDEBUG, that activates a per-CPU log
of transitions to IPL_HIGH from lower IPLs.  SPLDEBUG is only available
on i386 and Xen kernels, today.

'options SPLDEBUG' adds instrumentation to spllower() and splraise() as
well as routines to start/stop debugging and to record IPL transitions:
spldebug_start(), spldebug_stop(), spldebug_raise(), spldebug_lower().

Revision 1.15.2.2 / (download) - annotate - [select for diffs], Sun Nov 1 13:58:18 2009 UTC (13 years, 3 months ago) by jym
Branch: jym-xensuspend
Changes since 1.15.2.1: +0 -0 lines
Diff to previous 1.15.2.1 (colored) to branchpoint 1.15 (colored)

Sync with HEAD.

Revision 1.15.2.1 / (download) - annotate - [select for diffs], Wed May 13 17:18:45 2009 UTC (13 years, 8 months ago) by jym
Branch: jym-xensuspend
Changes since 1.15: +63 -25 lines
Diff to previous 1.15 (colored)

Sync with HEAD.

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

Revision 1.14.4.4 / (download) - annotate - [select for diffs], Wed May 13 00:35:16 2009 UTC (13 years, 8 months ago) by snj
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, 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.14.4.3: +24 -7 lines
Diff to previous 1.14.4.3 (colored) to branchpoint 1.14 (colored) next main 1.15 (colored)

Pull up following revision(s) (requested by ad in ticket #725):
	sys/arch/amd64/amd64/lock_stubs.S: revision 1.22
	sys/arch/i386/i386/lock_stubs.S: revision 1.23
	sys/arch/x86/x86/patch.c: revision 1.18
A workaround for a bug with some Opteron revisions where locked operations
sometimes do not serve as memory barriers, allowing memory references to
bleed outside of critical sections.  It is possible that this is the
reason for pkgbuild's longstanding crashiness.
This is not complete (atomic ops need some work too).

Revision 1.14.4.3.2.1 / (download) - annotate - [select for diffs], Wed May 13 00:28:25 2009 UTC (13 years, 8 months ago) by snj
Branch: netbsd-5-0
CVS Tags: 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: matt-nb5-mips64
Changes since 1.14.4.3: +24 -7 lines
Diff to previous 1.14.4.3 (colored) next main 1.14.4.4 (colored)

Pull up following revision(s) (requested by ad in ticket #725):
	sys/arch/amd64/amd64/lock_stubs.S: revision 1.22
	sys/arch/i386/i386/lock_stubs.S: revision 1.23
	sys/arch/x86/x86/patch.c: revision 1.18
A workaround for a bug with some Opteron revisions where locked operations
sometimes do not serve as memory barriers, allowing memory references to
bleed outside of critical sections.  It's possible that this is the
reason for pkgbuild's longstanding crashiness.
This is not complete (atomic ops need some work too).

Revision 1.11.10.2 / (download) - annotate - [select for diffs], Mon May 4 08:12:11 2009 UTC (13 years, 9 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.11.10.1: +88 -42 lines
Diff to previous 1.11.10.1 (colored) to branchpoint 1.11 (colored)

sync with head.

Revision 1.14.2.3 / (download) - annotate - [select for diffs], Tue Apr 28 07:34:57 2009 UTC (13 years, 9 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.14.2.2: +52 -20 lines
Diff to previous 1.14.2.2 (colored) to branchpoint 1.14 (colored) next main 1.15 (colored)

Sync with HEAD.

Revision 1.18 / (download) - annotate - [select for diffs], Fri Apr 24 17:45:40 2009 UTC (13 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, jymxensuspend-base
Changes since 1.17: +24 -7 lines
Diff to previous 1.17 (colored)

A workaround for a bug with some Opteron revisions where locked operations
sometimes do not serve as memory barriers, allowing memory references to
bleed outside of critical sections.  It's possible that this is the
reason for pkgbuild's longstanding crashiness.

This is not complete (atomic ops need some work too).

Revision 1.14.4.3 / (download) - annotate - [select for diffs], Fri Apr 3 17:42:36 2009 UTC (13 years, 10 months ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-0-RELEASE, netbsd-5-0-RC4
Branch point for: netbsd-5-0
Changes since 1.14.4.2: +30 -15 lines
Diff to previous 1.14.4.2 (colored) to branchpoint 1.14 (colored)

Pull up following revision(s) (requested by enami in ticket #645):
	common/lib/libc/arch/i386/atomic/atomic.S: revision 1.17
	sys/arch/amd64/amd64/spl.S: revision 1.21
	sys/arch/x86/x86/patch.c: revision 1.17
So that profile kernel runs again,
- Adjust the size of functions used to patch.
- Fix the jump offset of mcount call when patching functions.
Approved by Andrew Doran.

Revision 1.17 / (download) - annotate - [select for diffs], Thu Apr 2 00:19:03 2009 UTC (13 years, 10 months ago) by enami
Branch: MAIN
Changes since 1.16: +30 -15 lines
Diff to previous 1.16 (colored)

So that profile kernel runs again,
- Adjust the size of functions used to patch.
- Fix the jump offset of mcount call when patching functions.

Approved by Andrew Doran.

Revision 1.14.2.2 / (download) - annotate - [select for diffs], Tue Mar 3 18:29:37 2009 UTC (13 years, 11 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.14.2.1: +13 -7 lines
Diff to previous 1.14.2.1 (colored) to branchpoint 1.14 (colored)

Sync with HEAD.

Revision 1.14.4.2 / (download) - annotate - [select for diffs], Thu Feb 19 20:42:34 2009 UTC (13 years, 11 months ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-0-RC3
Changes since 1.14.4.1: +13 -7 lines
Diff to previous 1.14.4.1 (colored) to branchpoint 1.14 (colored)

Pull up following revision(s) (requested by ad in ticket #471):
	sys/arch/x86/x86/patch.c: revision 1.16
Repair x86_patch to install optimized routines.
Pointed out by enami@.

Revision 1.16 / (download) - annotate - [select for diffs], Tue Feb 17 21:20:49 2009 UTC (13 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: nick-hppapmap-base2
Changes since 1.15: +13 -7 lines
Diff to previous 1.15 (colored)

Repair x86_patch to install optimized routines.
Pointed out by enami@.

Revision 1.14.4.1 / (download) - annotate - [select for diffs], Mon Feb 2 03:06:12 2009 UTC (14 years ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-0-RC2
Changes since 1.14: +26 -18 lines
Diff to previous 1.14 (colored)

Pull up following revision(s) (requested by ad in ticket #343):
	common/lib/libc/arch/i386/atomic/atomic.S: revision 1.14
	sys/arch/x86/include/cpufunc.h: revision 1.9
	sys/arch/x86/x86/identcpu.c: revision 1.12
	sys/arch/x86/x86/cpu.c: revision 1.60
	sys/arch/x86/x86/patch.c: revision 1.15
PR kern/40213 my i386 machine can't boot because of tsc
- Patch in atomic_cas_64() twice. The first patch is early and makes it
  the MP-atomic version available if we have cmpxchg8b. The second patch
  strips the lock prefix if ncpu==1.
- Fix the i486 atomic_cas_64() to not unconditionally enable interrupts.

Revision 1.14.2.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:17:09 2009 UTC (14 years ago) by skrll
Branch: nick-hppapmap
Changes since 1.14: +26 -18 lines
Diff to previous 1.14 (colored)

Sync with HEAD.

Revision 1.11.6.3 / (download) - annotate - [select for diffs], Sat Jan 17 13:28:38 2009 UTC (14 years ago) by mjf
Branch: mjf-devfs2
Changes since 1.11.6.2: +24 -16 lines
Diff to previous 1.11.6.2 (colored) to branchpoint 1.11 (colored) next main 1.12 (colored)

Sync with HEAD.

Revision 1.15 / (download) - annotate - [select for diffs], Fri Dec 19 11:21:24 2008 UTC (14 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: mjf-devfs2-base
Branch point for: jym-xensuspend
Changes since 1.14: +26 -18 lines
Diff to previous 1.14 (colored)

PR kern/40213 my i386 machine can't boot because of tsc

- Patch in atomic_cas_64() twice. The first patch is early and makes it
  the MP-atomic version available if we have cmpxchg8b. The second patch
  strips the lock prefix if ncpu==1.

- Fix the i486 atomic_cas_64() to not unconditionally enable interrupts.

Revision 1.13.6.1 / (download) - annotate - [select for diffs], Sun Oct 19 22:16:08 2008 UTC (14 years, 3 months ago) by haad
Branch: haad-dm
Changes since 1.13: +4 -4 lines
Diff to previous 1.13 (colored) next main 1.14 (colored)

Sync with HEAD.

Revision 1.11.6.2 / (download) - annotate - [select for diffs], Sun Sep 28 10:40:12 2008 UTC (14 years, 4 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.11.6.1: +2 -2 lines
Diff to previous 1.11.6.1 (colored) to branchpoint 1.11 (colored)

Sync with HEAD.

Revision 1.13.2.1 / (download) - annotate - [select for diffs], Wed Sep 24 16:38:50 2008 UTC (14 years, 4 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.13: +4 -4 lines
Diff to previous 1.13 (colored) next main 1.14 (colored)

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

Revision 1.14 / (download) - annotate - [select for diffs], Mon Sep 8 23:36:54 2008 UTC (14 years, 5 months ago) by gmcgarry
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, netbsd-5-base, netbsd-5-0-RC1, matt-mips64-base2, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap, netbsd-5
Changes since 1.13: +4 -4 lines
Diff to previous 1.13 (colored)

Replace most gcc-specific __attribute__ uses with BSD-style sys/cdef.h
preprocessor macros.

Revision 1.11.6.1 / (download) - annotate - [select for diffs], Mon Jun 2 13:22:52 2008 UTC (14 years, 8 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.11: +2 -19 lines
Diff to previous 1.11 (colored)

Sync with HEAD.

Revision 1.11.8.1 / (download) - annotate - [select for diffs], Sun May 18 12:33:04 2008 UTC (14 years, 8 months ago) by yamt
Branch: yamt-pf42
Changes since 1.11: +2 -19 lines
Diff to previous 1.11 (colored) next main 1.12 (colored)

sync with head.

Revision 1.11.10.1 / (download) - annotate - [select for diffs], Fri May 16 02:23:29 2008 UTC (14 years, 8 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.11: +2 -19 lines
Diff to previous 1.11 (colored)

sync with head.

Revision 1.13 / (download) - annotate - [select for diffs], Wed Apr 30 00:05:20 2008 UTC (14 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-nfs-mp-base2, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl, hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa, haad-dm
Changes since 1.12: +2 -12 lines
Diff to previous 1.12 (colored)

PR kern/38537 __HAVE_PREEMPTION requires MULTIPROCESSOR

Don't patch out the kernel_lock functions if ncpu == 1. We need it for
preemption, and it's used much less frequently than before.

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

Remove clause 3 and 4 from TNF licenses

Revision 1.2.4.7 / (download) - annotate - [select for diffs], Mon Jan 21 09:40:16 2008 UTC (15 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.2.4.6: +16 -21 lines
Diff to previous 1.2.4.6 (colored) to branchpoint 1.2 (colored) next main 1.3 (colored)

sync with head

Revision 1.3.10.2 / (download) - annotate - [select for diffs], Wed Jan 9 01:49:58 2008 UTC (15 years, 1 month ago) by matt
Branch: matt-armv6
Changes since 1.3.10.1: +75 -79 lines
Diff to previous 1.3.10.1 (colored) to branchpoint 1.3 (colored) next main 1.4 (colored)

sync with HEAD

Revision 1.9.6.1 / (download) - annotate - [select for diffs], Wed Jan 2 21:51:25 2008 UTC (15 years, 1 month ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.9: +16 -21 lines
Diff to previous 1.9 (colored) next main 1.10 (colored)

Sync with HEAD

Revision 1.5.2.3 / (download) - annotate - [select for diffs], Thu Dec 27 00:43:28 2007 UTC (15 years, 1 month ago) by mjf
Branch: mjf-devfs
Changes since 1.5.2.2: +16 -21 lines
Diff to previous 1.5.2.2 (colored) to branchpoint 1.5 (colored) next main 1.6 (colored)

Sync with HEAD.

Revision 1.9.2.1 / (download) - annotate - [select for diffs], Wed Dec 26 19:42:58 2007 UTC (15 years, 1 month ago) by ad
Branch: vmlocking2
Changes since 1.9: +16 -21 lines
Diff to previous 1.9 (colored) next main 1.10 (colored)

Sync with head.

Revision 1.11 / (download) - annotate - [select for diffs], Thu Dec 20 23:46:11 2007 UTC (15 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, yamt-pf42-X, yamt-nfs-mp-base, yamt-lazymbuf-base15, yamt-lazymbuf-base14, vmlocking2-base3, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, matt-armv6-base, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, bouyer-xeni386-nbase, bouyer-xeni386-base, ad-socklock-base1
Branch point for: yamt-pf42, yamt-nfs-mp, mjf-devfs2
Changes since 1.10: +2 -21 lines
Diff to previous 1.10 (colored)

- Make __cpu_simple_lock and similar real functions and patch at runtime.
- Remove old x86 atomic ops.
- Drop text alignment back to 16 on i386 (really, this time).
- Minor cleanup.

Revision 1.10 / (download) - annotate - [select for diffs], Thu Dec 20 01:27:25 2007 UTC (15 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.9: +17 -3 lines
Diff to previous 1.9 (colored)

64-bit atomic ops for i386.

Revision 1.5.2.2 / (download) - annotate - [select for diffs], Sat Dec 8 18:18:14 2007 UTC (15 years, 2 months ago) by mjf
Branch: mjf-devfs
Changes since 1.5.2.1: +26 -26 lines
Diff to previous 1.5.2.1 (colored) to branchpoint 1.5 (colored)

Sync with HEAD.

Revision 1.2.4.6 / (download) - annotate - [select for diffs], Fri Dec 7 17:27:02 2007 UTC (15 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.2.4.5: +26 -26 lines
Diff to previous 1.2.4.5 (colored) to branchpoint 1.2 (colored)

sync with head

Revision 1.2.8.3 / (download) - annotate - [select for diffs], Mon Dec 3 18:40:20 2007 UTC (15 years, 2 months ago) by ad
Branch: vmlocking
Changes since 1.2.8.2: +74 -73 lines
Diff to previous 1.2.8.2 (colored) to branchpoint 1.2 (colored) next main 1.3 (colored)

Sync with HEAD.

Revision 1.3.8.4 / (download) - annotate - [select for diffs], Mon Dec 3 16:14:23 2007 UTC (15 years, 2 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.3.8.3: +26 -26 lines
Diff to previous 1.3.8.3 (colored) to branchpoint 1.3 (colored) next main 1.4 (colored)

Sync with HEAD.

Revision 1.9 / (download) - annotate - [select for diffs], Wed Nov 28 18:19:21 2007 UTC (15 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: vmlocking2, bouyer-xeni386
Changes since 1.8: +4 -26 lines
Diff to previous 1.8 (colored)

x86_mb_nop is now unused.

Revision 1.8 / (download) - annotate - [select for diffs], Wed Nov 28 15:26:00 2007 UTC (15 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.7: +24 -2 lines
Diff to previous 1.7 (colored)

Hook in the atomic ops from libkern.

Revision 1.5.2.1 / (download) - annotate - [select for diffs], Mon Nov 19 00:47:03 2007 UTC (15 years, 2 months ago) by mjf
Branch: mjf-devfs
Changes since 1.5: +65 -64 lines
Diff to previous 1.5 (colored)

Sync with HEAD.

Revision 1.4.2.2 / (download) - annotate - [select for diffs], Sun Nov 18 19:34:49 2007 UTC (15 years, 2 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.4.2.1: +10 -0 lines
Diff to previous 1.4.2.1 (colored) to branchpoint 1.4 (colored) next main 1.5 (colored)

Sync with HEAD

Revision 1.2.4.5 / (download) - annotate - [select for diffs], Thu Nov 15 11:43:42 2007 UTC (15 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.2.4.4: +65 -64 lines
Diff to previous 1.2.4.4 (colored) to branchpoint 1.2 (colored)

sync with head.

Revision 1.3.8.3 / (download) - annotate - [select for diffs], Wed Nov 14 19:04:17 2007 UTC (15 years, 2 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.3.8.2: +12 -2 lines
Diff to previous 1.3.8.2 (colored) to branchpoint 1.3 (colored)

Sync with HEAD.

Revision 1.7 / (download) - annotate - [select for diffs], Tue Nov 13 18:38:58 2007 UTC (15 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: bouyer-xenamd64-base2, bouyer-xenamd64-base
Changes since 1.6: +12 -2 lines
Diff to previous 1.6 (colored)

When running uniprocessor, patch _kernel_lock() and _kernel_unlock() to
do nothing more than "nop; ret".

Revision 1.4.2.1 / (download) - annotate - [select for diffs], Tue Nov 13 16:00:24 2007 UTC (15 years, 2 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.4: +55 -64 lines
Diff to previous 1.4 (colored)

Sync with HEAD

Revision 1.3.8.2 / (download) - annotate - [select for diffs], Sun Nov 11 16:47:03 2007 UTC (15 years, 2 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.3.8.1: +55 -64 lines
Diff to previous 1.3.8.1 (colored) to branchpoint 1.3 (colored)

Sync with HEAD.

Revision 1.6 / (download) - annotate - [select for diffs], Sat Nov 10 20:06:25 2007 UTC (15 years, 3 months ago) by ad
Branch: MAIN
Changes since 1.5: +55 -64 lines
Diff to previous 1.5 (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.3.10.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:23:52 2007 UTC (15 years, 3 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.3: +5 -5 lines
Diff to previous 1.3 (colored)

sync with HEAD

Revision 1.2.4.4 / (download) - annotate - [select for diffs], Sat Oct 27 11:29:03 2007 UTC (15 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.2.4.3: +5 -5 lines
Diff to previous 1.2.4.3 (colored) to branchpoint 1.2 (colored)

sync with head.

Revision 1.5 / (download) - annotate - [select for diffs], Wed Oct 17 19:58:17 2007 UTC (15 years, 3 months ago) by garbled
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, jmcneill-base
Branch point for: mjf-devfs
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (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.2.8.2 / (download) - annotate - [select for diffs], Tue Oct 9 13:38:47 2007 UTC (15 years, 4 months ago) by ad
Branch: vmlocking
Changes since 1.2.8.1: +5 -5 lines
Diff to previous 1.2.8.1 (colored) to branchpoint 1.2 (colored)

Sync with head.

Revision 1.3.12.1 / (download) - annotate - [select for diffs], Sat Oct 6 15:33:37 2007 UTC (15 years, 4 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.3: +5 -5 lines
Diff to previous 1.3 (colored) next main 1.4 (colored)

sync with head.

Revision 1.2.16.2 / (download) - annotate - [select for diffs], Wed Oct 3 19:25:56 2007 UTC (15 years, 4 months ago) by garbled
Branch: ppcoea-renovation
Changes since 1.2.16.1: +5 -5 lines
Diff to previous 1.2.16.1 (colored) to branchpoint 1.2 (colored) next main 1.3 (colored)

Sync with HEAD

Revision 1.3.8.1 / (download) - annotate - [select for diffs], Tue Oct 2 18:27:54 2007 UTC (15 years, 4 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.3: +5 -5 lines
Diff to previous 1.3 (colored)

Sync with HEAD.

Revision 1.4 / (download) - annotate - [select for diffs], Wed Sep 26 19:48:43 2007 UTC (15 years, 4 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.3: +5 -5 lines
Diff to previous 1.3 (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.2.4.3 / (download) - annotate - [select for diffs], Mon Sep 3 14:31:28 2007 UTC (15 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.2.4.2: +2 -3 lines
Diff to previous 1.2.4.2 (colored) to branchpoint 1.2 (colored)

sync with head.

Revision 1.2.10.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:03:24 2007 UTC (15 years, 7 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.2: +2 -3 lines
Diff to previous 1.2 (colored) next main 1.3 (colored)

Sync with head.

Revision 1.2.8.1 / (download) - annotate - [select for diffs], Sun May 27 14:27:06 2007 UTC (15 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.2: +2 -3 lines
Diff to previous 1.2 (colored)

Sync with head.

Revision 1.2.16.1 / (download) - annotate - [select for diffs], Tue May 22 17:27:50 2007 UTC (15 years, 8 months ago) by matt
Branch: ppcoea-renovation
Changes since 1.2: +2 -3 lines
Diff to previous 1.2 (colored)

Update to HEAD.

Revision 1.3 / (download) - annotate - [select for diffs], Thu May 17 14:51:35 2007 UTC (15 years, 8 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-x86pmap-base, nick-csl-alignment-base5, nick-csl-alignment-base, nick-csl-alignment, mjf-ufs-trans-base, matt-mips64-base, matt-mips64, hpcarm-cleanup
Branch point for: yamt-x86pmap, matt-armv6, jmcneill-pm
Changes since 1.2: +2 -3 lines
Diff to previous 1.2 (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.2.14.2 / (download) - annotate - [select for diffs], Tue Apr 17 16:17:14 2007 UTC (15 years, 9 months ago) by thorpej
Branch: thorpej-atomic
Changes since 1.2.14.1: +26 -2 lines
Diff to previous 1.2.14.1 (colored) to branchpoint 1.2 (colored) next main 1.3 (colored)

New atomic op hot-patches for amd64.

Revision 1.2.14.1 / (download) - annotate - [select for diffs], Tue Apr 17 06:23:07 2007 UTC (15 years, 9 months ago) by thorpej
Branch: thorpej-atomic
Changes since 1.2: +79 -3 lines
Diff to previous 1.2 (colored)

Hot-patch the atomic ops that need it on x86 (32-bit).

Revision 1.2.2.1 / (download) - annotate - [select for diffs], Sat Mar 24 00:43:05 2007 UTC (15 years, 10 months ago) by rmind
Branch: yamt-idlelwp
Changes since 1.2: +2 -3 lines
Diff to previous 1.2 (colored) next main 1.3 (colored)

Checkpoint:
- Abstract for per-CPU locking of runqueues.
  As a workaround for SCHED_4BSD global runqueue, covered by sched_mutex,
  spc_mutex is a pointer for now. After making SCHED_4BSD runqueues
  per-CPU, it will became a storage mutex.
- suspendsched: Locking is not necessary for cpu_need_resched().
- Remove mutex_spin_exit() prototype in patch.c and LOCK_ASSERT() check
  in runqueue_nextlwp() in sched_4bsd.c to make them compile again.

Revision 1.2.4.2 / (download) - annotate - [select for diffs], Mon Feb 26 09:08:52 2007 UTC (15 years, 11 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.2.4.1: +217 -0 lines
Diff to previous 1.2.4.1 (colored) to branchpoint 1.2 (colored)

sync with head.

Revision 1.2.4.1, Fri Feb 9 21:55:14 2007 UTC (16 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.2: +0 -217 lines
FILE REMOVED

file patch.c was added on branch yamt-lazymbuf on 2007-02-26 09:08:52 +0000

Revision 1.2 / (download) - annotate - [select for diffs], Fri Feb 9 21:55:14 2007 UTC (16 years ago) by ad
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, thorpej-atomic-base, reinoud-bufcleanup, post-newlock2-merge, ad-audiomp-base, ad-audiomp
Branch point for: yamt-lazymbuf, yamt-idlelwp, vmlocking, thorpej-atomic, ppcoea-renovation, mjf-ufs-trans
Changes since 1.1: +217 -0 lines
Diff to previous 1.1 (colored)

Merge newlock2 to head.

Revision 1.1.2.4 / (download) - annotate - [select for diffs], Fri Feb 2 08:12:49 2007 UTC (16 years ago) by ad
Branch: newlock2
Changes since 1.1.2.3: +79 -13 lines
Diff to previous 1.1.2.3 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored)

- Define memory barrier ops in lock_stubs.S.
- If lfence/mfence are available, patch them in at boot.
- Patch to a no-op if !MULTIPROCESSOR. XXX Should be determined at runtime.

Revision 1.1.2.3 / (download) - annotate - [select for diffs], Thu Feb 1 06:25:01 2007 UTC (16 years ago) by ad
Branch: newlock2
Changes since 1.1.2.2: +4 -2 lines
Diff to previous 1.1.2.2 (colored) to branchpoint 1.1 (colored)

- Don't patch stuff if it's a profiling kernel.
- Move Xspllower label to show up better in profile output.

Revision 1.1.2.2 / (download) - annotate - [select for diffs], Sat Jan 27 14:00:02 2007 UTC (16 years ago) by ad
Branch: newlock2
Changes since 1.1.2.1: +10 -9 lines
Diff to previous 1.1.2.1 (colored) to branchpoint 1.1 (colored)

Rename some functions to better describe what they do.

Revision 1.1.2.1 / (download) - annotate - [select for diffs], Sat Jan 27 07:09:03 2007 UTC (16 years ago) by ad
Branch: newlock2
Changes since 1.1: +148 -0 lines
Diff to previous 1.1 (colored)

If running on a PPro or later, at boot patch in versions of spllower() and
similar that use cmpxchg8b instead of cli/sti. Cuts the clock cycles for
splx() by a factor of ~6 on the P4, and ~3 on the PIII when bracketed by
serializing instructions (and hopefully more when not).

Revision 1.1, Sat Jan 27 07:09:03 2007 UTC (16 years ago) by ad
Branch: MAIN
CVS Tags: newlock2-nbase, newlock2-base
Branch point for: newlock2
FILE REMOVED

file patch.c was initially added on branch newlock2.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>