The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.152.4.1 / (download) - annotate - [select for diffs], Sat Dec 24 09:26:56 2022 UTC (5 months, 2 weeks ago) by martin
Branch: netbsd-10
Changes since 1.152: +6 -4 lines
Diff to previous 1.152 (colored) next main 1.153 (colored)

Pull up following revision(s) (requested by bouyer in ticket #21):

	sys/arch/x86/x86/x86_machdep.c: revision 1.153

x86_add_cluster() takes the end of the segment, not the size.

Should fix PR port-xen/57121

Revision 1.153 / (download) - annotate - [select for diffs], Fri Dec 23 16:05:44 2022 UTC (5 months, 2 weeks ago) by bouyer
Branch: MAIN
CVS Tags: HEAD
Changes since 1.152: +6 -4 lines
Diff to previous 1.152 (colored)

x86_add_cluster() takes the end of the segment, not the size.
Should fix PR port-xen/57121

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

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

Revision 1.150 / (download) - annotate - [select for diffs], Thu Oct 28 10:45:49 2021 UTC (19 months, 1 week ago) by riastradh
Branch: MAIN
Changes since 1.149: +34 -12 lines
Diff to previous 1.149 (colored)

x86: Process bootloader rndseed much sooner.

Revision 1.149 / (download) - annotate - [select for diffs], Thu Oct 7 12:52:27 2021 UTC (20 months ago) by msaitoh
Branch: MAIN
Changes since 1.148: +16 -16 lines
Diff to previous 1.148 (colored)

KNF. No functional change.

Revision 1.146.2.1 / (download) - annotate - [select for diffs], Sat Apr 3 22:28:41 2021 UTC (2 years, 2 months ago) by thorpej
Branch: thorpej-futex
Changes since 1.146: +4 -3 lines
Diff to previous 1.146 (colored) next main 1.147 (colored)

Sync with HEAD.

Revision 1.148 / (download) - annotate - [select for diffs], Fri Feb 19 03:28:53 2021 UTC (2 years, 3 months ago) by christos
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-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.147: +3 -3 lines
Diff to previous 1.147 (colored)

It is not VirtualBo give some more space.

Revision 1.147 / (download) - annotate - [select for diffs], Fri Feb 19 02:18:09 2021 UTC (2 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.146: +3 -2 lines
Diff to previous 1.146 (colored)

add VirtualBox

Revision 1.146 / (download) - annotate - [select for diffs], Sun Aug 9 15:32:44 2020 UTC (2 years, 10 months ago) by christos
Branch: MAIN
Branch point for: thorpej-futex
Changes since 1.145: +25 -2 lines
Diff to previous 1.145 (colored)

move lcall sniffer to x86_machdep since xen/pv has its own cpu.c

Revision 1.145 / (download) - annotate - [select for diffs], Sun Jul 19 14:31:31 2020 UTC (2 years, 10 months ago) by maxv
Branch: MAIN
Changes since 1.144: +17 -3 lines
Diff to previous 1.144 (colored)

Compile USER_LDT by default, but, put it behind a privileged sysctl that
defaults to disabled. To enable:

	# sysctl -w machdep.user_ldt=1

Revision 1.144 / (download) - annotate - [select for diffs], Sat Jul 4 21:02:16 2020 UTC (2 years, 11 months ago) by chs
Branch: MAIN
Changes since 1.143: +2 -15 lines
Diff to previous 1.143 (colored)

the x86 xen and non-xen modules are identical,
so remove the unneeded extra copies.
Xen kernels now use the same modules as native kernels.

Revision 1.143 / (download) - annotate - [select for diffs], Thu May 21 21:12:30 2020 UTC (3 years ago) by ad
Branch: MAIN
Changes since 1.142: +9 -9 lines
Diff to previous 1.142 (colored)

- Recalibrate the APIC timer using the TSC, once the TSC has in turn been
  recalibrated using the HPET.  This gets the clock interrupt firing more
  closely to HZ.

- Undo change with recent Xen merge and go back to starting the clocks in
  initclocks() on the boot CPU, and in cpu_hatch() on secondary CPUs.

- On reflection don't use HPET delay any more, it works very well but means
  going over the bus.  It's enough to use HPET to calibrate the TSC and
  APIC.

Tested on amd64 native, xen and xen PVH.

Revision 1.142 / (download) - annotate - [select for diffs], Sun May 3 17:22:03 2020 UTC (3 years, 1 month ago) by bouyer
Branch: MAIN
Changes since 1.141: +41 -17 lines
Diff to previous 1.141 (colored)

If hvm_start_info has no memmap_entries, fall back to XENMEM_memory_map
hypercall.

Revision 1.141 / (download) - annotate - [select for diffs], Sat May 2 16:44:36 2020 UTC (3 years, 1 month ago) by bouyer
Branch: MAIN
Changes since 1.140: +28 -2 lines
Diff to previous 1.140 (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.140 / (download) - annotate - [select for diffs], Fri May 1 14:16:15 2020 UTC (3 years, 1 month ago) by hannken
Branch: MAIN
Changes since 1.139: +8 -5 lines
Diff to previous 1.139 (colored)

Use PRIxPADDR for paddr_t to make i386/ALL compile.

Revision 1.139 / (download) - annotate - [select for diffs], Thu Apr 30 22:09:32 2020 UTC (3 years, 1 month ago) by bouyer
Branch: MAIN
Changes since 1.138: +4 -4 lines
Diff to previous 1.138 (colored)

Change module path to xen-* only for XENPV

Revision 1.138 / (download) - annotate - [select for diffs], Sat Apr 25 15:26:18 2020 UTC (3 years, 1 month ago) by bouyer
Branch: MAIN
Changes since 1.137: +33 -5 lines
Diff to previous 1.137 (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.137.2.5 / (download) - annotate - [select for diffs], Sat Apr 18 14:47:56 2020 UTC (3 years, 1 month ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.137.2.4: +23 -2 lines
Diff to previous 1.137.2.4 (colored) to branchpoint 1.137 (colored) next main 1.138 (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.137.2.4 / (download) - annotate - [select for diffs], Thu Apr 16 09:45:57 2020 UTC (3 years, 1 month ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.137.2.3: +3 -3 lines
Diff to previous 1.137.2.3 (colored) to branchpoint 1.137 (colored)

More #ifndef XEN -> #ifndef XENPV

Revision 1.117.2.3 / (download) - annotate - [select for diffs], Mon Apr 13 08:04:12 2020 UTC (3 years, 1 month ago) by martin
Branch: phil-wifi
Changes since 1.117.2.2: +0 -3 lines
Diff to previous 1.117.2.2 (colored) to branchpoint 1.117 (colored) next main 1.118 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.137.2.3 / (download) - annotate - [select for diffs], Sat Apr 11 18:26:07 2020 UTC (3 years, 1 month ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.137.2.2: +6 -2 lines
Diff to previous 1.137.2.2 (colored) to branchpoint 1.137 (colored)

Move softint and preemtion-related functions out of x86/x86/intr.c to
  its own file, x86/x86/x86_softintr.c
Add x86/x86/x86_softintr.c for native and XenPV
Make sure XenPV also check ci_ioending, which is used for softints.
Switch XenPV to fast softints and allow kernel preemption.
kpreempt_disable() before calling pmap_changeprot_local()
run  xen_wallclock_time() and xen_global_systime_ns() at splshed() to
  avoid being interrupted.

XXX amd64 lock stubs are racy for XPENDING

Revision 1.137.2.2 / (download) - annotate - [select for diffs], Sat Apr 11 08:06:16 2020 UTC (3 years, 1 month ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.137.2.1: +6 -6 lines
Diff to previous 1.137.2.1 (colored) to branchpoint 1.137 (colored)

Remove spaces in machdep.hypervisor, suggested by mlelstv@

Revision 1.137.2.1 / (download) - annotate - [select for diffs], Wed Apr 8 17:59:16 2020 UTC (3 years, 2 months ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.137: +7 -4 lines
Diff to previous 1.137 (colored)

Remove VM_GUEST_XEN and define only Xen subtypes:
VM_GUEST_XENPV
VM_GUEST_XENPVH
VM_GUEST_XENHVM
VM_GUEST_XENPVHVM

Set vm_guest in the start routine, if it is hypervisor-specific (e.g Xen PV).
If vm_guest was not set early and we detect Xen in identify_hypervisor(),
assume it is VM_GUEST_XENHVM. Refine to VM_GUEST_PVXENHVM in
hypervisor_match().

Revision 1.117.2.2 / (download) - annotate - [select for diffs], Wed Apr 8 14:07:59 2020 UTC (3 years, 2 months ago) by martin
Branch: phil-wifi
Changes since 1.117.2.1: +118 -48 lines
Diff to previous 1.117.2.1 (colored) to branchpoint 1.117 (colored)

Merge changes from current as of 20200406

Revision 1.137 / (download) - annotate - [select for diffs], Sat Apr 4 19:50:54 2020 UTC (3 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base
Branch point for: bouyer-xenpvh
Changes since 1.136: +9 -2 lines
Diff to previous 1.136 (colored)

Infrastructure for putting kernel+modules in /netbsd/kernel and
/netbsd/modules respectively instead of /netbsd and
/stand/<arch>/<version>/modules.  This is only supported for x86,
and is turned off by default. To try it, add KERNEL_DIR=yes in your
/mk.conf and install a system from that build.

Revision 1.136 / (download) - annotate - [select for diffs], Sat Apr 4 14:49:35 2020 UTC (3 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.135: +3 -4 lines
Diff to previous 1.135 (colored)

Enable MONITOR/MWAIT idle on AMD chips, except some buggy Ryzens.

Revision 1.134.2.1 / (download) - annotate - [select for diffs], Sat Feb 29 20:18:33 2020 UTC (3 years, 3 months ago) by ad
Branch: ad-namecache
Changes since 1.134: +73 -5 lines
Diff to previous 1.134 (colored) next main 1.135 (colored)

Sync with head.

Revision 1.135 / (download) - annotate - [select for diffs], Wed Jan 29 01:54:34 2020 UTC (3 years, 4 months ago) by manu
Branch: MAIN
CVS Tags: is-mlppp-base, is-mlppp, ad-namecache-base3
Changes since 1.134: +73 -5 lines
Diff to previous 1.134 (colored)

Fix startup crashes caused by wrong memory map handling

init_x86_vm() takes the memory map from BIOS and EFI and selects
regions suitable for memory allocation. This involves removing
areas used by the kernel, but the logic missed some corner cases,
which led to possible allocation in regions for which later memory
access would cause a panic.

The typical panic from this bug in GENERIC is at SVS startup:
cpu_svs_init / uvm_pagealloc_strat / pagezero

We fix the bug by adding logic for the missing cases of memory
regions overlapping with the kernel. While there, add more #idef'ed
debug output.

Revision 1.127.2.1 / (download) - annotate - [select for diffs], Sun Dec 29 09:33:43 2019 UTC (3 years, 5 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2
Changes since 1.127: +3 -2 lines
Diff to previous 1.127 (colored) next main 1.128 (colored)

Pull up following revision(s) (requested by pgoyette in ticket #587):

	sys/arch/x86/x86/x86_machdep.c: revision 1.134

to know this in order to set module_machine correctly, which in turn is
needed to set the module_base path from which modules are loaded and
which provides the value of sysctl(8) variable kern.module.path

Thanks to jnemeth@ for pointing out the problem.

Revision 1.134 / (download) - annotate - [select for diffs], Sat Dec 28 00:38:08 2019 UTC (3 years, 5 months ago) by pgoyette
Branch: MAIN
CVS Tags: ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Changes since 1.133: +3 -2 lines
Diff to previous 1.133 (colored)

#include "opt_xen.h" so we can tell if we're in a XEN kernel.  We need
to know this in order to set module_machine correctly, which in turn is
needed to set the module_base path from which modules are loaded and
which provides the value of sysctl(8) variable kern.module.path

Thanks to jnemeth@ for pointing out the problem.

Revision 1.133 / (download) - annotate - [select for diffs], Tue Dec 3 15:20:59 2019 UTC (3 years, 6 months ago) by riastradh
Branch: MAIN
Changes since 1.132: +5 -3 lines
Diff to previous 1.132 (colored)

Use __insn_barrier to enforce ordering in l_ncsw loops.

(Only need ordering observable by interruption, not by other CPUs.)

Revision 1.132 / (download) - annotate - [select for diffs], Tue Dec 3 11:50:45 2019 UTC (3 years, 6 months ago) by hannken
Branch: MAIN
Changes since 1.131: +3 -3 lines
Diff to previous 1.131 (colored)

Make sure the assignment to "idepth" is done inside the loop to prevent
preemption between loop end and dereference of "l_cpu->ci_depth".

Revision 1.131 / (download) - annotate - [select for diffs], Tue Dec 3 11:50:16 2019 UTC (3 years, 6 months ago) by hannken
Branch: MAIN
Changes since 1.130: +6 -2 lines
Diff to previous 1.130 (colored)

Make cpu_intr_p() work with "curlwp->l_cpu == NULL" and
assert "curlwp == &lwp0" in this case.

Prevents crash during early boot with "options LOCKDEBUG".

Revision 1.130 / (download) - annotate - [select for diffs], Sun Dec 1 14:52:14 2019 UTC (3 years, 6 months ago) by ad
Branch: MAIN
Changes since 1.129: +11 -6 lines
Diff to previous 1.129 (colored)

Make cpu_intr_p() safe to use anywhere, i.e. outside assertions:

Don't call kpreempt_disable() / kpreempt_enable() to make sure we're not
preempted while using the value of curcpu().  Instead, observe the value of
l_ncsw before and after the check to see if we have been preempted.  If
we have been preempted, then we need to retry the read.

Revision 1.129 / (download) - annotate - [select for diffs], Sat Nov 23 19:40:37 2019 UTC (3 years, 6 months ago) by ad
Branch: MAIN
Changes since 1.128: +23 -39 lines
Diff to previous 1.128 (colored)

cpu_need_resched():

- Remove all code that should be MI, leaving the bare minimum under arch/.
- Make the required actions very explicit.
- Pass in LWP pointer for convenience.
- When a trap is required on another CPU, have the IPI set it locally.
- Expunge cpu_did_resched().

Revision 1.128 / (download) - annotate - [select for diffs], Thu Oct 3 05:06:29 2019 UTC (3 years, 8 months ago) by maxv
Branch: MAIN
CVS Tags: phil-wifi-20191119
Changes since 1.127: +2 -5 lines
Diff to previous 1.127 (colored)

Remove the LazyFPU code, as posted 5 months ago on port-amd64@.

Revision 1.117.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:06:54 2019 UTC (4 years ago) by christos
Branch: phil-wifi
Changes since 1.117: +79 -25 lines
Diff to previous 1.117 (colored)

Sync with HEAD

Revision 1.127 / (download) - annotate - [select for diffs], Wed May 29 16:54:41 2019 UTC (4 years ago) by maxv
Branch: MAIN
CVS Tags: phil-wifi-20190609, netbsd-9-base, netbsd-9-0-RC1
Branch point for: netbsd-9
Changes since 1.126: +9 -3 lines
Diff to previous 1.126 (colored)

Add PCID support in SVS. This avoids TLB flushes during kernel<->user
transitions, which greatly reduces the performance penalty introduced by
SVS.

We use two ASIDs, 0 (kern) and 1 (user), and use invpcid to flush pages
in both ASIDs.

The read-only machdep.svs.pcid={0,1} sysctl is added, and indicates whether
SVS+PCID is in use.

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

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

Revision 1.125 / (download) - annotate - [select for diffs], Wed May 15 17:31:41 2019 UTC (4 years ago) by maxv
Branch: MAIN
Changes since 1.124: +4 -5 lines
Diff to previous 1.124 (colored)

Change the way SVS is disabled. Now you have to pass "boot -3" from the
bootloader. The machdep.svs.enabled sysctl becomes read-only, and just
indicates whether SVS is enabled.

Sent on port-amd64@.

Revision 1.91.4.5 / (download) - annotate - [select for diffs], Sat Mar 9 17:10:19 2019 UTC (4 years, 3 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1
Changes since 1.91.4.4: +33 -2 lines
Diff to previous 1.91.4.4 (colored) to branchpoint 1.91 (colored) next main 1.92 (colored)

Pull up following revision(s) via patch (requested by nonaka in ticket #1210):

	sys/dev/hyperv/vmbusvar.h: revision 1.1
	sys/dev/hyperv/hvs.c: revision 1.1
	sys/dev/hyperv/if_hvn.c: revision 1.1
	sys/dev/hyperv/vmbusic.c: revision 1.1
	sys/arch/x86/x86/lapic.c: revision 1.69
	sys/arch/x86/isa/clock.c: revision 1.34
	sys/arch/x86/include/intrdefs.h: revision 1.22
	sys/arch/i386/conf/GENERIC: revision 1.1201
	sys/arch/x86/x86/hyperv.c: revision 1.1
	sys/arch/x86/include/cpu.h: revision 1.105
	sys/arch/x86/x86/x86_machdep.c: revision 1.124
	sys/arch/i386/conf/GENERIC: revision 1.1203
	sys/arch/amd64/amd64/genassym.cf: revision 1.74
	sys/arch/i386/conf/GENERIC: revision 1.1204
	sys/arch/amd64/conf/GENERIC: revision 1.520
	sys/arch/x86/x86/hypervreg.h: revision 1.1
	sys/arch/amd64/amd64/vector.S: revision 1.69
	sys/dev/hyperv/hvshutdown.c: revision 1.1
	sys/dev/hyperv/hvshutdown.c: revision 1.2
	sys/dev/usb/if_urndisreg.h: file removal
	sys/arch/x86/x86/cpu.c: revision 1.167
	sys/arch/x86/conf/files.x86: revision 1.107
	sys/dev/usb/if_urndis.c: revision 1.20
	sys/dev/hyperv/vmbusicreg.h: revision 1.1
	sys/dev/hyperv/hvheartbeat.c: revision 1.1
	sys/dev/hyperv/vmbusicreg.h: revision 1.2
	sys/dev/hyperv/hvheartbeat.c: revision 1.2
	sys/dev/hyperv/files.hyperv: revision 1.1
	sys/dev/ic/rndisreg.h: revision 1.1
	sys/arch/i386/i386/genassym.cf: revision 1.111
	sys/dev/ic/rndisreg.h: revision 1.2
	sys/dev/hyperv/hyperv_common.c: revision 1.1
	sys/dev/hyperv/hvtimesync.c: revision 1.1
	sys/dev/hyperv/hypervreg.h: revision 1.1
	sys/dev/hyperv/hvtimesync.c: revision 1.2
	sys/dev/hyperv/vmbusicvar.h: revision 1.1
	sys/dev/hyperv/if_hvnreg.h: revision 1.1
	sys/arch/x86/x86/lapic.c: revision 1.70
	sys/arch/amd64/amd64/vector.S: revision 1.70
	sys/dev/ic/ndisreg.h: revision 1.1
	sys/arch/amd64/conf/GENERIC: revision 1.516
	sys/dev/hyperv/hypervvar.h: revision 1.1
	sys/arch/amd64/conf/GENERIC: revision 1.518
	sys/arch/amd64/conf/GENERIC: revision 1.519
	sys/arch/i386/conf/files.i386: revision 1.400
	sys/dev/acpi/vmbus_acpi.c: revision 1.1
	sys/dev/hyperv/vmbus.c: revision 1.1
	sys/dev/hyperv/vmbus.c: revision 1.2
	sys/arch/x86/x86/intr.c: revision 1.144
	sys/arch/i386/i386/vector.S: revision 1.83
	sys/arch/amd64/conf/files.amd64: revision 1.112

separate RNDIS definitions from urndis(4) for use with Hyper-V NetVSC.

 -

Added Microsoft Hyper-V support.  It ported from OpenBSD and FreeBSD.
graphical console is not work on Gen.2 VM yet. To use the serial console,
enter "consdev com,0x3f8,115200" on efiboot.

 -

Add __diagused.

 -

PR/53984: Partial revert of modify lapic_calibrate_timer() in lapic.c r1.69.

 -

Update Hyper-V related drivers description.

 -

Remove unused definition.

 -

Rename the MODULE_*_HOOK() macros to MODULE_HOOK_*() as briefly
discussed on irc.
NFCI intended.

 -

commented out hvkvp entry.

 -

fix typo. pointed out by pgoyette@n.o.

 -

Use IDTVEC instead of NENTRY for handle_hyperv_hypercall.

 -

Rename the MODULE_*_HOOK() macros to MODULE_HOOK_*() as briefly
discussed on irc.

Revision 1.124 / (download) - annotate - [select for diffs], Fri Feb 15 08:54:01 2019 UTC (4 years, 3 months ago) by nonaka
Branch: MAIN
CVS Tags: isaki-audio2-base, isaki-audio2
Changes since 1.123: +33 -2 lines
Diff to previous 1.123 (colored)

Added Microsoft Hyper-V support.  It ported from OpenBSD and FreeBSD.

graphical console is not work on Gen.2 VM yet. To use the serial console,
enter "consdev com,0x3f8,115200" on efiboot.

Revision 1.123 / (download) - annotate - [select for diffs], Thu Feb 14 08:18:25 2019 UTC (4 years, 3 months ago) by cherry
Branch: MAIN
Changes since 1.122: +4 -4 lines
Diff to previous 1.122 (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.122 / (download) - annotate - [select for diffs], Mon Feb 11 14:59:33 2019 UTC (4 years, 3 months ago) by cherry
Branch: MAIN
Changes since 1.121: +13 -13 lines
Diff to previous 1.121 (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.108.2.6 / (download) - annotate - [select for diffs], Wed Dec 26 14:01:45 2018 UTC (4 years, 5 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.108.2.5: +29 -2 lines
Diff to previous 1.108.2.5 (colored) to branchpoint 1.108 (colored) next main 1.109 (colored)

Sync with HEAD, resolve a few conflicts

Revision 1.121 / (download) - annotate - [select for diffs], Mon Dec 24 22:05:45 2018 UTC (4 years, 5 months ago) by cherry
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226
Changes since 1.120: +29 -2 lines
Diff to previous 1.120 (colored)

Towards bifurcating XEN and native interrupt related functions,
this is a preliminary cleanup sweep.

Move functions related to MP bus probe and scanning to x86/mp.c

Move generic platform pic search function to x86/x86_machdep.c

Revision 1.108.2.5 / (download) - annotate - [select for diffs], Sun Sep 30 01:45:48 2018 UTC (4 years, 8 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.108.2.4: +4 -9 lines
Diff to previous 1.108.2.4 (colored) to branchpoint 1.108 (colored)

Ssync with HEAD

Revision 1.120 / (download) - annotate - [select for diffs], Wed Sep 19 16:23:05 2018 UTC (4 years, 8 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930
Changes since 1.119: +4 -9 lines
Diff to previous 1.119 (colored)

i386 xen is pae

Revision 1.108.2.4 / (download) - annotate - [select for diffs], Sat Jul 28 04:37:42 2018 UTC (4 years, 10 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.108.2.3: +2 -4 lines
Diff to previous 1.108.2.3 (colored) to branchpoint 1.108 (colored)

Sync with HEAD

Revision 1.119 / (download) - annotate - [select for diffs], Fri Jul 13 09:37:32 2018 UTC (4 years, 10 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-0906, pgoyette-compat-0728
Changes since 1.118: +2 -4 lines
Diff to previous 1.118 (colored)

Remove the X86PMC code I had written, replaced by tprof. Many defines
become unused in specialreg.h, so remove them. We don't want to add
defines all the time, there are countless PMCs on many generations, and
it's better to just inline the event/unit values.

Revision 1.118 / (download) - annotate - [select for diffs], Thu Jul 12 10:46:48 2018 UTC (4 years, 10 months ago) by maxv
Branch: MAIN
Changes since 1.117: +3 -3 lines
Diff to previous 1.117 (colored)

Remove the kernel PMC code. Sent yesterday on tech-kern@.

This change:

 * Removes "options PERFCTRS", the associated includes, and the associated
   ifdefs. In doing so, it removes several XXXSMPs in the MI code, which is
   good.

 * Removes the PMC code of ARM XSCALE.

 * Removes all the pmc.h files. They were all empty, except for ARM XSCALE.

 * Reorders the x86 PMC code not to rely on the legacy pmc.h file. The
   definitions are put in sysarch.h.

 * Removes the kern/sys_pmc.c file, and along with it, the sys_pmc_control
   and sys_pmc_get_info syscalls. They are marked as OBSOL in kern,
   netbsd32 and rump.

 * Removes the pmc_evid_t and pmc_ctr_t types.

 * Removes all the associated man pages. The sets are marked as obsolete.

Revision 1.108.2.3 / (download) - annotate - [select for diffs], Mon Jun 25 07:25:47 2018 UTC (4 years, 11 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.108.2.2: +8 -41 lines
Diff to previous 1.108.2.2 (colored) to branchpoint 1.108 (colored)

Sync with HEAD

Revision 1.91.4.4 / (download) - annotate - [select for diffs], Sat Jun 23 11:39:02 2018 UTC (4 years, 11 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-0-RELEASE, netbsd-8-0-RC2
Changes since 1.91.4.3: +7 -2 lines
Diff to previous 1.91.4.3 (colored) to branchpoint 1.91 (colored)

Pull up the following, via patch, requested by maxv in ticket #897:

	sys/arch/amd64/amd64/locore.S           1.166 (patch)
	sys/arch/i386/i386/locore.S             1.157 (patch)
	sys/arch/x86/include/cpu.h              1.92 (patch)
	sys/arch/x86/include/fpu.h              1.9 (patch)
	sys/arch/x86/x86/fpu.c                  1.33-1.39 (patch)
	sys/arch/x86/x86/identcpu.c             1.72 (patch)
	sys/arch/x86/x86/vm_machdep.c           1.34 (patch)
	sys/arch/x86/x86/x86_machdep.c          1.116,1.117 (patch)

Support eager fpu switch, to work around INTEL-SA-00145.
Provide a sysctl machdep.fpu_eager, which gets automatically
initialized to 1 on affected CPUs.

Revision 1.117 / (download) - annotate - [select for diffs], Sat Jun 16 17:11:13 2018 UTC (4 years, 11 months ago) by maxv
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-0625
Branch point for: phil-wifi
Changes since 1.116: +4 -8 lines
Diff to previous 1.116 (colored)

Need IPIs when enabling eager fpu switch, to clear each fpu and get us
started. Otherwise it is possible that the first context switch on one of
the cpus will restore an invalid fpu state in the new lwp, if that lwp
had its fpu state stored on another cpu that didn't have time to do an
fpu save since eager-fpu was enabled.

Use barriers and all the related crap. The point is that we want to
ensure that no context switch occurs between [each fpu is cleared] and
[x86_fpu_eager is set to 'true'].

Also add KASSERTs.

Revision 1.116 / (download) - annotate - [select for diffs], Thu Jun 14 14:36:46 2018 UTC (4 years, 11 months ago) by maxv
Branch: MAIN
Changes since 1.115: +11 -2 lines
Diff to previous 1.115 (colored)

Add some code to support eager fpu switch, INTEL-SA-00145. We restore the
FPU state of the lwp right away during context switches. This guarantees
that when the CPU executes in userland, the FPU doesn't contain secrets.

Maybe we also need to clear the FPU in setregs(), not sure about this one.

Can be enabled/disabled via:

	machdep.fpu_eager = {0/1}

Not yet turned on automatically on affected CPUs (Intel Family 6).

More generally it would be good to turn it on automatically when XSAVEOPT
is supported, because in this case there is probably a non-negligible
performance gain; but we need to fix PR/52966.

Revision 1.91.4.3 / (download) - annotate - [select for diffs], Sat Jun 9 15:12:21 2018 UTC (5 years ago) by martin
Branch: netbsd-8
Changes since 1.91.4.2: +7 -2 lines
Diff to previous 1.91.4.2 (colored) to branchpoint 1.91 (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.115 / (download) - annotate - [select for diffs], Tue May 22 09:25:58 2018 UTC (5 years ago) by maxv
Branch: MAIN
Changes since 1.114: +4 -81 lines
Diff to previous 1.114 (colored)

Several changes:

 - Move the sysctl initialization code into spectre.c. This way each
   variable is local. Rename the variables, use shorter names.

 - Use mitigation methods for SpectreV4, like SpectreV2. There are
   several available on AMD (that we don't support yet). Add a "method"
   leaf.

 - Make SSB_NO a mitigation method by itself. This way we report as
   "mitigated" a CPU that is not affected by SpectreV4. In this case,
   of course, the user can't enable/disable the mitigation. Drop the
   "affected" sysctl leaf.

Revision 1.114 / (download) - annotate - [select for diffs], Tue May 22 08:15:26 2018 UTC (5 years ago) by maxv
Branch: MAIN
Changes since 1.113: +18 -4 lines
Diff to previous 1.113 (colored)

Clarify the parameters for the SpectreV2 mitigation.

Add:
	machdep.spectre_v2.swmitigated
Rename:
	machdep.spectre_v2.mitigated -> machdep.spectre_v2.hwmitigated

Change the method string, to combine both the hardware and software
mitigations. swmitigated is set at compile time, hwmitigated can be
set by the user.

Examples:

	spectre_v2.swmitigated = 1
	spectre_v2.hwmitigated = 0
	spectre_v2.method = [GCC retpoline]

	spectre_v2.swmitigated = 0
	spectre_v2.hwmitigated = 0
	spectre_v2.method = (none)

	spectre_v2.swmitigated = 1
	spectre_v2.hwmitigated = 1
	spectre_v2.method = [GCC retpoline] + [Intel IBRS]

Revision 1.113 / (download) - annotate - [select for diffs], Tue May 22 07:11:53 2018 UTC (5 years ago) by maxv
Branch: MAIN
Changes since 1.112: +27 -2 lines
Diff to previous 1.112 (colored)

Mitigation for SpectreV4, based on SSBD. The following sysctl branches
are added:

	machdep.spectre_v4.mitigated = {0/1} user-settable
	machdep.spectre_v4.affected = {0/1} set by the kernel

The mitigation is not enabled by default yet. It is not tested either,
because no microcode update has been published yet.

On current CPUs a microcode/bios update must be applied for SSBD to be
available. The user can then set mitigated=1. Even with an update applied
the kernel will set affected=1.

On future CPUs, where the problem will presumably be fixed by default,
the CPU will report SSB_NO, and the kernel will set affected=0. In this
case we also have mitigated=0, but the mitigation is not needed.

For now the feature is system-wide. Perhaps we will want a more
fine-grained, per-process approach in the future.

Revision 1.112 / (download) - annotate - [select for diffs], Tue May 22 06:31:05 2018 UTC (5 years ago) by maxv
Branch: MAIN
Changes since 1.111: +6 -6 lines
Diff to previous 1.111 (colored)

Reorder and rename, to make the code less SpectreV2-specific.

Revision 1.108.2.2 / (download) - annotate - [select for diffs], Sat Apr 7 04:12:14 2018 UTC (5 years, 2 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.108.2.1: +29 -4 lines
Diff to previous 1.108.2.1 (colored) to branchpoint 1.108 (colored)

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

Revision 1.111 / (download) - annotate - [select for diffs], Wed Apr 4 16:23:27 2018 UTC (5 years, 2 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407
Changes since 1.110: +11 -3 lines
Diff to previous 1.110 (colored)

Add machdep.spectre_v2.method, a string that tells which method is
active.

Revision 1.110 / (download) - annotate - [select for diffs], Sat Mar 31 08:43:52 2018 UTC (5 years, 2 months ago) by maxv
Branch: MAIN
Changes since 1.109: +21 -4 lines
Diff to previous 1.109 (colored)

Rename spectreV2 -> spectre_v2, and introduce spectre_v1 (which defaults
to not-mitigated).

This gives the user an easy way to find out whether the system is
vulnerable:

	machdep.spectre_v1.mitigated
	machdep.spectre_v2.mitigated

They are also available on i386.

Revision 1.91.4.2 / (download) - annotate - [select for diffs], Thu Mar 22 16:59:04 2018 UTC (5 years, 2 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-0-RC1
Changes since 1.91.4.1: +19 -2 lines
Diff to previous 1.91.4.1 (colored) to branchpoint 1.91 (colored)

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

	sys/arch/amd64/amd64/amd64_trap.S	upto 1.39 (partial, patch)
	sys/arch/amd64/amd64/db_machdep.c	1.6 (patch)
	sys/arch/amd64/amd64/genassym.cf	1.65,1.66,1.67 (patch)
	sys/arch/amd64/amd64/locore.S		upto 1.159 (partial, patch)
	sys/arch/amd64/amd64/machdep.c		1.299-1.302 (patch)
	sys/arch/amd64/amd64/trap.c		upto 1.113 (partial, patch)
	sys/arch/amd64/amd64/amd64/vector.S	upto 1.61 (partial, patch)
	sys/arch/amd64/conf/GENERIC		1.477,1.478 (patch)
	sys/arch/amd64/conf/kern.ldscript	1.26 (patch)
	sys/arch/amd64/include/frameasm.h	upto 1.37 (partial, patch)
	sys/arch/amd64/include/param.h		1.25 (patch)
	sys/arch/amd64/include/pmap.h		1.41,1.43,1.44 (patch)
	sys/arch/x86/conf/files.x86		1.91,1.93 (patch)
	sys/arch/x86/include/cpu.h		1.88,1.89 (patch)
	sys/arch/x86/include/pmap.h		1.75 (patch)
	sys/arch/x86/x86/cpu.c			1.144,1.146,1.148,1.149 (patch)
	sys/arch/x86/x86/pmap.c			upto 1.289 (partial, patch)
	sys/arch/x86/x86/vm_machdep.c		1.31,1.32 (patch)
	sys/arch/x86/x86/x86_machdep.c		1.104,1.106,1.108 (patch)
	sys/arch/x86/x86/svs.c			1.1-1.14
	sys/arch/xen/conf/files.compat		1.30 (patch)

Backport SVS. Not enabled yet.

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

Synch with HEAD

Revision 1.109 / (download) - annotate - [select for diffs], Wed Mar 14 17:40:41 2018 UTC (5 years, 2 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Changes since 1.108: +23 -5 lines
Diff to previous 1.108 (colored)

Spectre V2 mitigation for certain families of AMD CPUs.

A new sysctl is added, machdep.spectreV2.mitigated, that controls whether
Spectre V2 is mitigated. For now it defaults to "false".

The code is written in such a way that there can be several methods. For
now only one method is supported, on AMD Families 10h, 12h and 16h, where
an MSR is available to disable branch prediction entirely.

Compile-tested on Intel, AMD will be tested soon.

Revision 1.108 / (download) - annotate - [select for diffs], Fri Feb 23 09:57:20 2018 UTC (5 years, 3 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-base
Branch point for: pgoyette-compat
Changes since 1.107: +11 -5 lines
Diff to previous 1.107 (colored)

Change the SVS node, from machdep.svs_enabled to machdep.svs.enabled.

Revision 1.107 / (download) - annotate - [select for diffs], Thu Feb 22 13:27:18 2018 UTC (5 years, 3 months ago) by maxv
Branch: MAIN
Changes since 1.106: +2 -5 lines
Diff to previous 1.106 (colored)

Remove svs_pgg_update(). Instead of manually changing PG_G on each page,
we can disable the global-paging mechanism in %cr4 with CR4_PGE. Do that.

In addition, install CR4_PGE when SVS is disabled manually (via the
sysctl).

Now, doing "sysctl -w machdep.svs_enabled=0" restores the performance
completely, exactly as if SVS hadn't been enabled in the first place.

Revision 1.106 / (download) - annotate - [select for diffs], Thu Feb 22 10:42:11 2018 UTC (5 years, 3 months ago) by maxv
Branch: MAIN
Changes since 1.105: +5 -4 lines
Diff to previous 1.105 (colored)

Make the machdep.svs_enabled sysctl writable, and add the kernel code
needed to disable SVS at runtime.

We set 'svs_enabled' to false, and hotpatch the kernel entry/exit points
to eliminate the context switch code.

We need to make sure there is no remote CPU that is executing the code we
are hotpatching. So we use two barriers:

 * After the first one each CPU is guaranteed to be executing in
   svs_disable_cpu with interrupts disabled (this way it can't leave this
   place).

 * After the second one it is guaranteed that SVS is disabled, so we flush
   the cache, enable interrupts and continue execution normally.

Between the two barriers, cpu0 will disable SVS (svs_enabled=false and
hotpatch), and each CPU will restore the generic syscall entry point.

Three notes:

 * We should call svs_pgg_update(true) afterwards, to put back PG_G on
   the kernel pages (for better performance). This will be done in another
   commit.

 * The fact that we disable interrupts does not prevent us from receiving
   an NMI, and it would be problematic. So we need to add some code to
   verify that PMCs are disabled before hotpatching. This will be done
   in another commit.

 * In svs_disable() we expect each CPU to be online. We need to add a
   check to make sure they indeed are.

The sysctl allows only a 1->0 transition. There is no point in doing 0->1
transitions anyway, and it would be complicated to implement because we
need to re-synchronize the CPU user page tables with the current ones (we
lost track of them in the last 1->0 transition).

Revision 1.105 / (download) - annotate - [select for diffs], Thu Feb 22 09:41:06 2018 UTC (5 years, 3 months ago) by maxv
Branch: MAIN
Changes since 1.104: +3 -4 lines
Diff to previous 1.104 (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.104 / (download) - annotate - [select for diffs], Thu Feb 22 08:56:52 2018 UTC (5 years, 3 months ago) by maxv
Branch: MAIN
Changes since 1.103: +10 -2 lines
Diff to previous 1.103 (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.103 / (download) - annotate - [select for diffs], Sat Feb 17 17:44:09 2018 UTC (5 years, 3 months ago) by maxv
Branch: MAIN
Changes since 1.102: +7 -2 lines
Diff to previous 1.102 (colored)

Add svs_init. This is where we will detect the CPU and decide whether
to turn SVS on or not.

Add svs_pgg_update to dynamically add/remove PG_G from all the kernel
pages. Use it now.

Revision 1.57.8.3 / (download) - annotate - [select for diffs], Sun Dec 3 11:36:51 2017 UTC (5 years, 6 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.57.8.2: +424 -264 lines
Diff to previous 1.57.8.2 (colored) to branchpoint 1.57 (colored) next main 1.58 (colored)

update from HEAD

Revision 1.102 / (download) - annotate - [select for diffs], Thu Nov 23 16:30:50 2017 UTC (5 years, 6 months ago) by kamil
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202
Changes since 1.101: +4 -2 lines
Diff to previous 1.101 (colored)

Restore removed sysctl(2) x86 entry: fpu_present

Hardcode it to 1 for now on i386 and amd64.

This unbreaks software that used it (e.g. LLDB).

Removal noted by <christos>

PR lib/52756 by myself

Revision 1.101 / (download) - annotate - [select for diffs], Sun Oct 29 10:01:21 2017 UTC (5 years, 7 months ago) by maxv
Branch: MAIN
Changes since 1.100: +3 -3 lines
Diff to previous 1.100 (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.100 / (download) - annotate - [select for diffs], Mon Oct 23 06:00:59 2017 UTC (5 years, 7 months ago) by maxv
Branch: MAIN
Changes since 1.99: +3 -3 lines
Diff to previous 1.99 (colored)

Add two XXXs, so that people don't get confused, a fifth region is needed
anyway.

Revision 1.99 / (download) - annotate - [select for diffs], Sun Oct 22 01:29:26 2017 UTC (5 years, 7 months ago) by maya
Branch: MAIN
Changes since 1.98: +26 -3 lines
Diff to previous 1.98 (colored)

Add sysctl machdep.bootmethod

either "UEFI" or "BIOS" to mimic freebsd

Revision 1.98 / (download) - annotate - [select for diffs], Mon Oct 9 17:49:28 2017 UTC (5 years, 8 months ago) by maya
Branch: MAIN
Changes since 1.97: +2 -4 lines
Diff to previous 1.97 (colored)

GC i386_fpu_present. no FPU x86 is not supported.

Also delete newly unused send_sigill

Revision 1.97 / (download) - annotate - [select for diffs], Sun Oct 8 09:06:50 2017 UTC (5 years, 8 months ago) by maxv
Branch: MAIN
Changes since 1.96: +23 -4 lines
Diff to previous 1.96 (colored)

KASLR: add workarounds to compute the bootinfo VAs (use the direct map),
and don't use large pages yet. Both will be fixed later.

Revision 1.96 / (download) - annotate - [select for diffs], Mon Oct 2 19:23:16 2017 UTC (5 years, 8 months ago) by maxv
Branch: MAIN
Changes since 1.95: +47 -2 lines
Diff to previous 1.95 (colored)

Add a machdep.tsc_user_enable sysctl, to enable/disable the rdtsc
instruction in usermode. It defaults to enabled.

Revision 1.95 / (download) - annotate - [select for diffs], Sat Sep 30 12:01:56 2017 UTC (5 years, 8 months ago) by maxv
Branch: MAIN
Changes since 1.94: +4 -3 lines
Diff to previous 1.94 (colored)

use bootspace

Revision 1.94 / (download) - annotate - [select for diffs], Sat Sep 23 11:01:32 2017 UTC (5 years, 8 months ago) by maxv
Branch: MAIN
Changes since 1.93: +2 -4 lines
Diff to previous 1.93 (colored)

Make MTRR_GET privileged, the structures are not always zeroed (thereby
leaking information), and beyond that we are not particularly interested
in letting userland know how the kernel uses its MTRRs.

Revision 1.67.4.5 / (download) - annotate - [select for diffs], Mon Aug 28 17:51:56 2017 UTC (5 years, 9 months ago) by skrll
Branch: nick-nhusb
Changes since 1.67.4.4: +71 -99 lines
Diff to previous 1.67.4.4 (colored) to branchpoint 1.67 (colored) next main 1.68 (colored)

Sync with HEAD

Revision 1.91.4.1 / (download) - annotate - [select for diffs], Wed Jun 21 17:41:50 2017 UTC (5 years, 11 months ago) by snj
Branch: netbsd-8
CVS Tags: matt-nb8-mediatek-base, matt-nb8-mediatek
Changes since 1.91: +12 -7 lines
Diff to previous 1.91 (colored)

Pull up following revision(s) (requested by maxv in ticket #42):
	sys/arch/amd64/conf/kern.ldscript: revision 1.23
	sys/arch/x86/x86/x86_machdep.c: revision 1.92
Fix a pretty dumb mistake I made in r1.22: the alignment needs to be in the
bss, otherwise the bootloader will use memory before __kernel_end and give
a wrong start pa to the kernel.
This issue was investigated by Anthony Mallet. Should fix PR/52000.
--
Fix a bug introduced in bus_space.c::r1.39. This check too is hard-coded.
Might have had a cumulative effect on PR/52000.

Revision 1.93 / (download) - annotate - [select for diffs], Wed Jun 14 12:27:24 2017 UTC (5 years, 11 months ago) by maxv
Branch: MAIN
CVS Tags: perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825
Changes since 1.92: +2 -12 lines
Diff to previous 1.92 (colored)

Define MAXPHYSMEM globally.

Revision 1.92 / (download) - annotate - [select for diffs], Wed Jun 14 08:12:22 2017 UTC (5 years, 11 months ago) by maxv
Branch: MAIN
Changes since 1.91: +12 -7 lines
Diff to previous 1.91 (colored)

Fix a bug introduced in bus_space.c::r1.39. This check too is hard-coded.
Might have had a cumulative effect on PR/52000.

Revision 1.70.2.5 / (download) - annotate - [select for diffs], Wed Apr 26 02:53:09 2017 UTC (6 years, 1 month ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.70.2.4: +8 -7 lines
Diff to previous 1.70.2.4 (colored) to branchpoint 1.70 (colored) next main 1.71 (colored)

Sync with HEAD

Revision 1.81.2.1 / (download) - annotate - [select for diffs], Fri Apr 21 16:53:39 2017 UTC (6 years, 1 month ago) by bouyer
Branch: bouyer-socketcan
Changes since 1.81: +55 -35 lines
Diff to previous 1.81 (colored) next main 1.82 (colored)

Sync with HEAD

Revision 1.91 / (download) - annotate - [select for diffs], Fri Apr 14 04:43:47 2017 UTC (6 years, 1 month ago) by kamil
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, netbsd-8-base, bouyer-socketcan-base1
Branch point for: netbsd-8
Changes since 1.90: +5 -5 lines
Diff to previous 1.90 (colored)

x86: Export fpu_save, fpu_save_size, xsave_features to dedicated sysctl nodes

Add new defines:
 - CPU_FPU_SAVE (15)
   int: FPU Instructions layout
   * to use this, CPU_OSFXSR must be true
   * 0: FSAVE
   * 1: FXSAVE
   * 2: XSAVE
   * 3: XSAVEOPT
 - CPU_FPU_SAVE_SIZE (16)
   int: FPU Instruction layout size
 - CPU_XSAVE_FEATURES (17)
   quad: FPU XSAVE features

Bump CPU_MAXID from 15 to 18.

These values were prepared originally to be exported without ASCIIZ name to
be used as handler. These values are useful to get FPU accessors in a
debugger easier to implement on x86 (PT_SETFPREG, PT_GETFPREG).

This interface handles all supported x86 targets. In the older (i386) and
less featured CPUs check first osfxsr (OS uses FXSAVE/FXRSTOR).

According to sys/arch/x86/include/cpu.h r.1.65 this was prepared to be
exported beyond simple CTL_CREATE node.

Sponsored by <The NetBSD Foundation>

Revision 1.90 / (download) - annotate - [select for diffs], Fri Mar 24 17:09:37 2017 UTC (6 years, 2 months ago) by maxv
Branch: MAIN
CVS Tags: jdolecek-ncq-base, jdolecek-ncq
Changes since 1.89: +5 -4 lines
Diff to previous 1.89 (colored)

Don't compile PMCs on Xen.

Revision 1.70.2.4 / (download) - annotate - [select for diffs], Mon Mar 20 06:57:22 2017 UTC (6 years, 2 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.70.2.3: +52 -33 lines
Diff to previous 1.70.2.3 (colored) to branchpoint 1.70 (colored)

Sync with HEAD

Revision 1.89 / (download) - annotate - [select for diffs], Tue Feb 14 13:29:09 2017 UTC (6 years, 3 months ago) by nonaka
Branch: MAIN
CVS Tags: pgoyette-localcount-20170320
Changes since 1.88: +4 -2 lines
Diff to previous 1.88 (colored)

Handle persistent memory. Currently only debug output.

Revision 1.88 / (download) - annotate - [select for diffs], Tue Feb 14 13:23:50 2017 UTC (6 years, 3 months ago) by nonaka
Branch: MAIN
Changes since 1.87: +31 -53 lines
Diff to previous 1.87 (colored)

x86: make btinfo_memmap from btinfo_efimemmap for to reduce mem_cluster_cnt.

should fix PR/51953.

Revision 1.87 / (download) - annotate - [select for diffs], Fri Feb 10 10:39:36 2017 UTC (6 years, 3 months ago) by maxv
Branch: MAIN
Changes since 1.86: +9 -5 lines
Diff to previous 1.86 (colored)

If the segment list is full, print a warning on the console and launch the
system with the available segments.

High memory systems may have more than VM_PHYSSEG_MAX segments; it is
better to truncate the memory and allow the system to work rather than
just panicking. The user can still increase VM_PHYSSEG_MAX (or ask us to).

Fixes issues such as PR/47093.

Note: the warning is logged but does not appear in dmesg, this too needs
to be fixed for the rest of the bootstrap procedure.

Revision 1.86 / (download) - annotate - [select for diffs], Fri Feb 10 10:02:26 2017 UTC (6 years, 3 months ago) by maxv
Branch: MAIN
Changes since 1.85: +6 -11 lines
Diff to previous 1.85 (colored)

Use macros instead of hard-coded constants. By the way, I don't think this
code is correct, but whatever.

Revision 1.85 / (download) - annotate - [select for diffs], Fri Feb 10 09:57:04 2017 UTC (6 years, 3 months ago) by maxv
Branch: MAIN
Changes since 1.84: +14 -16 lines
Diff to previous 1.84 (colored)

Import iomem_ex locally.

Revision 1.84 / (download) - annotate - [select for diffs], Thu Feb 9 11:56:41 2017 UTC (6 years, 3 months ago) by nonaka
Branch: MAIN
Changes since 1.83: +3 -4 lines
Diff to previous 1.83 (colored)

efi_md::md_virt always uses uint64_t.

Revision 1.67.4.4 / (download) - annotate - [select for diffs], Sun Feb 5 13:40:23 2017 UTC (6 years, 4 months ago) by skrll
Branch: nick-nhusb
Changes since 1.67.4.3: +129 -32 lines
Diff to previous 1.67.4.3 (colored) to branchpoint 1.67 (colored)

Sync with HEAD

Revision 1.83 / (download) - annotate - [select for diffs], Thu Jan 26 01:36:35 2017 UTC (6 years, 4 months ago) by nonaka
Branch: MAIN
CVS Tags: nick-nhusb-base-20170204
Changes since 1.82: +4 -4 lines
Diff to previous 1.82 (colored)

Fix compile failure on i386 with DEBUG_MEMLOAD.

Revision 1.82 / (download) - annotate - [select for diffs], Tue Jan 24 11:09:14 2017 UTC (6 years, 4 months ago) by nonaka
Branch: MAIN
Changes since 1.81: +64 -21 lines
Diff to previous 1.81 (colored)

Initial commit of native amd64 EFI boot loader.

Revision 1.81 / (download) - annotate - [select for diffs], Tue Jan 10 09:48:22 2017 UTC (6 years, 4 months ago) by cherry
Branch: MAIN
CVS Tags: bouyer-socketcan-base
Branch point for: bouyer-socketcan
Changes since 1.80: +5 -5 lines
Diff to previous 1.80 (colored)

While reserving memory at boot time via uvm_physseg_unplug(9),
in the case of a disappearing segment (due to a segment sized msgbuf)
make sure segment offsets are read off before the segment disappears.

This should fix some of the recent boot time hard resets reported on
i386 recently.

Thanks to kre@ for pointing this out to me.


CVS: ----------------------------------------------------------------------
CVS: CVSROOT  cvs.NetBSD.org:/cvsroot
CVS: please use "PR category/123" to have the commitmsg appended to PR 123
CVS:
CVS: Please evaluate your changes and consider the following.
CVS: Abort checkin if you answer no.
CVS: => For all changes:
CVS: Do the changed files compile?
CVS: Has the change been tested?
CVS: => If you are not completely familiar with the changed components:
CVS: Has the change been posted for review?
CVS: Have you allowed enough time for feedback?
CVS: => If the change is major:
CVS: => If the change adds files to, or removes files from $DESTDIR:
CVS: => If you are changing a library or kernel interface:
CVS: Have you successfully run "./build.sh release"?

Revision 1.70.2.3 / (download) - annotate - [select for diffs], Sat Jan 7 08:56:28 2017 UTC (6 years, 5 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.70.2.2: +67 -25 lines
Diff to previous 1.70.2.2 (colored) to branchpoint 1.70 (colored)

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

Revision 1.80 / (download) - annotate - [select for diffs], Mon Dec 26 17:54:07 2016 UTC (6 years, 5 months ago) by cherry
Branch: MAIN
CVS Tags: pgoyette-localcount-20170107
Changes since 1.79: +58 -4 lines
Diff to previous 1.79 (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.79 / (download) - annotate - [select for diffs], Tue Dec 20 14:03:15 2016 UTC (6 years, 5 months ago) by maxv
Branch: MAIN
Changes since 1.78: +7 -7 lines
Diff to previous 1.78 (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.78 / (download) - annotate - [select for diffs], Tue Dec 20 12:48:30 2016 UTC (6 years, 5 months ago) by maxv
Branch: MAIN
Changes since 1.77: +7 -7 lines
Diff to previous 1.77 (colored)

Depend on KERNTEXTOFF - KERNBASE, not IOM_END, both are equal but the text
address may change in the future.

Revision 1.67.4.3 / (download) - annotate - [select for diffs], Mon Dec 5 10:54:59 2016 UTC (6 years, 6 months ago) by skrll
Branch: nick-nhusb
Changes since 1.67.4.2: +2 -14 lines
Diff to previous 1.67.4.2 (colored) to branchpoint 1.67 (colored)

Sync with HEAD

Revision 1.77 / (download) - annotate - [select for diffs], Fri Nov 25 11:57:36 2016 UTC (6 years, 6 months ago) by maxv
Branch: MAIN
CVS Tags: nick-nhusb-base-20161204
Changes since 1.76: +2 -10 lines
Diff to previous 1.76 (colored)

Initialize the module map limits in amd64, not x86.

For the record: normally we could enable this code on Xen, since the
bootstrap layout is globally the same. But there appears to be an issue
in xen_locore, since any kenter in the area after kern_end triggers a
KASSERT because the va is already busy.

Revision 1.76 / (download) - annotate - [select for diffs], Tue Nov 15 15:00:56 2016 UTC (6 years, 6 months ago) by maxv
Branch: MAIN
Changes since 1.75: +2 -6 lines
Diff to previous 1.75 (colored)

Initialize kern_end in amd64 instead of x86.

Revision 1.67.4.2 / (download) - annotate - [select for diffs], Wed Oct 5 20:55:37 2016 UTC (6 years, 8 months ago) by skrll
Branch: nick-nhusb
Changes since 1.67.4.1: +195 -206 lines
Diff to previous 1.67.4.1 (colored) to branchpoint 1.67 (colored)

Sync with HEAD

Revision 1.70.2.2 / (download) - annotate - [select for diffs], Sat Aug 6 00:19:06 2016 UTC (6 years, 10 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.70.2.1: +2 -4 lines
Diff to previous 1.70.2.1 (colored) to branchpoint 1.70 (colored)

Sync with HEAD

Revision 1.75 / (download) - annotate - [select for diffs], Mon Aug 1 16:07:39 2016 UTC (6 years, 10 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-localcount-20161104, pgoyette-localcount-20160806, nick-nhusb-base-20161004, localcount-20160914
Changes since 1.74: +2 -4 lines
Diff to previous 1.74 (colored)

This panic is wrong. There could be two consecutive clusters below
avail_start.

Revision 1.70.2.1 / (download) - annotate - [select for diffs], Tue Jul 26 03:24:19 2016 UTC (6 years, 10 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.70: +193 -202 lines
Diff to previous 1.70 (colored)

Sync with HEAD

Revision 1.74 / (download) - annotate - [select for diffs], Sun Jul 17 10:46:43 2016 UTC (6 years, 10 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-localcount-20160726
Changes since 1.73: +22 -31 lines
Diff to previous 1.73 (colored)

Simplify x86_add_cluster.

Revision 1.73 / (download) - annotate - [select for diffs], Sat Jul 16 17:13:25 2016 UTC (6 years, 10 months ago) by maxv
Branch: MAIN
Changes since 1.72: +100 -111 lines
Diff to previous 1.72 (colored)

KNF, and rename.

Revision 1.72 / (download) - annotate - [select for diffs], Sat Jul 16 17:02:34 2016 UTC (6 years, 10 months ago) by maxv
Branch: MAIN
Changes since 1.71: +48 -5 lines
Diff to previous 1.71 (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.71 / (download) - annotate - [select for diffs], Sat Jul 16 14:51:45 2016 UTC (6 years, 10 months ago) by maxv
Branch: MAIN
Changes since 1.70: +57 -89 lines
Diff to previous 1.70 (colored)

Introduce x86_load_region(), and explain a little what we are doing.

Revision 1.67.4.1 / (download) - annotate - [select for diffs], Sat Mar 19 11:30:07 2016 UTC (7 years, 2 months ago) by skrll
Branch: nick-nhusb
Changes since 1.67: +61 -33 lines
Diff to previous 1.67 (colored)

Sync with HEAD

Revision 1.70 / (download) - annotate - [select for diffs], Thu Jan 28 06:52:55 2016 UTC (7 years, 4 months ago) by jnemeth
Branch: MAIN
CVS Tags: pgoyette-localcount-base, nick-nhusb-base-20160907, nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319
Branch point for: pgoyette-localcount
Changes since 1.69: +3 -3 lines
Diff to previous 1.69 (colored)

move #ifdef notyet to encompass all relevant parts

Revision 1.69 / (download) - annotate - [select for diffs], Thu Jan 28 01:08:43 2016 UTC (7 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.68: +89 -61 lines
Diff to previous 1.68 (colored)

fix previous commit that ate all 4's, and add aprint_btinfo()

Revision 1.68 / (download) - annotate - [select for diffs], Thu Jan 28 00:18:27 2016 UTC (7 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.67: +89 -89 lines
Diff to previous 1.67 (colored)

just whitespace.

Revision 1.57.8.2 / (download) - annotate - [select for diffs], Wed Aug 20 00:03:29 2014 UTC (8 years, 9 months ago) by tls
Branch: tls-maxphys
Changes since 1.57.8.1: +156 -129 lines
Diff to previous 1.57.8.1 (colored) to branchpoint 1.57 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.67 / (download) - annotate - [select for diffs], Mon Aug 11 03:43:25 2014 UTC (8 years, 10 months ago) by jnemeth
Branch: MAIN
CVS Tags: tls-maxphys-base, nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606, nick-nhusb-base-20150406, nick-nhusb-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
Branch point for: nick-nhusb
Changes since 1.66: +22 -2 lines
Diff to previous 1.66 (colored)

Add the infrastructure for MODULAR support for Xen kernels.  At
the moment, this can only load very simple modules due to missing
symbols.  It is being add at this time to make pullups to the
netbsd-7 branch easier.  It is not enabled by default in any kernels.

Revision 1.64.2.1 / (download) - annotate - [select for diffs], Sun Aug 10 06:54:11 2014 UTC (8 years, 10 months ago) by tls
Branch: tls-earlyentropy
Changes since 1.64: +87 -126 lines
Diff to previous 1.64 (colored) next main 1.65 (colored)

Rebase.

Revision 1.66 / (download) - annotate - [select for diffs], Thu Jul 24 13:42:28 2014 UTC (8 years, 10 months ago) by riastradh
Branch: MAIN
CVS Tags: tls-earlyentropy-base
Changes since 1.65: +5 -3 lines
Diff to previous 1.65 (colored)

Add a FIRST1G page freelist to x86, for old graphics devices.

Revision 1.65 / (download) - annotate - [select for diffs], Thu Jun 12 19:02:35 2014 UTC (8 years, 11 months ago) by riastradh
Branch: MAIN
Changes since 1.64: +85 -126 lines
Diff to previous 1.64 (colored)

Tweak x86 page freelists and add x86_select_freelist.

- Add 4G freelist to i386 -- there may be higher addresses if PAE.
- Add 64G and 1T freelists to amd64.
- Simplify freelist setup code and condense it into a table.
- Add x86_select_freelist to get a freelist guaranteed to yield
addresses no greater than a prescribed maximum address.

x86_select_freelist takes a uint64_t, not a paddr_t or bus_addr_t, so
that you can pass in, e.g., a 36-bit maximum address without needing
to write conditionals for i386/PAE.

No objections on port-x86:

https://mail-index.netbsd.org/port-i386/2014/05/21/msg003277.html
https://mail-index.netbsd.org/port-amd64/2014/05/21/msg002062.html

Revision 1.56.2.2 / (download) - annotate - [select for diffs], Thu May 22 11:40:14 2014 UTC (9 years ago) by yamt
Branch: yamt-pagecache
Changes since 1.56.2.1: +136 -5 lines
Diff to previous 1.56.2.1 (colored) to branchpoint 1.56 (colored) next main 1.57 (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.58.4.1 / (download) - annotate - [select for diffs], Sun May 18 17:45:30 2014 UTC (9 years ago) by rmind
Branch: rmind-smpnet
Changes since 1.58: +53 -7 lines
Diff to previous 1.58 (colored) next main 1.59 (colored)

sync with head

Revision 1.64 / (download) - annotate - [select for diffs], Tue Apr 1 07:16:18 2014 UTC (9 years, 2 months ago) by dsl
Branch: MAIN
CVS Tags: yamt-pagecache-base9, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15
Branch point for: tls-earlyentropy
Changes since 1.63: +25 -16 lines
Diff to previous 1.63 (colored)

Revert most of the machdep sysctls to 32bit

Revision 1.63 / (download) - annotate - [select for diffs], Sun Feb 23 22:38:40 2014 UTC (9 years, 3 months ago) by dsl
Branch: MAIN
CVS Tags: riastradh-drm2-base3
Changes since 1.62: +3 -3 lines
Diff to previous 1.62 (colored)

Rename (the recently added) 'x86_xsave_size' to 'x86_fpu_save_size'
  and default to 512 (the size of the fxsave structure).

Revision 1.62 / (download) - annotate - [select for diffs], Sun Feb 23 12:56:40 2014 UTC (9 years, 3 months ago) by dsl
Branch: MAIN
Changes since 1.61: +30 -4 lines
Diff to previous 1.61 (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.61 / (download) - annotate - [select for diffs], Sat Oct 5 16:50:31 2013 UTC (9 years, 8 months ago) by rmind
Branch: MAIN
Changes since 1.60: +2 -5 lines
Diff to previous 1.60 (colored)

Remove some unused variables.

Revision 1.60 / (download) - annotate - [select for diffs], Sat Aug 31 12:26:56 2013 UTC (9 years, 9 months ago) by jmcneill
Branch: MAIN
Changes since 1.59: +4 -4 lines
Diff to previous 1.59 (colored)

md_root_setconf also depends on option MEMORY_DISK_DYNAMIC

Revision 1.59 / (download) - annotate - [select for diffs], Fri Aug 30 16:42:17 2013 UTC (9 years, 9 months ago) by jmcneill
Branch: MAIN
Changes since 1.58: +16 -2 lines
Diff to previous 1.58 (colored)

Add support for using a raw file-system image as memory disk root with
the x86 bootloader.

Revision 1.57.8.1 / (download) - annotate - [select for diffs], Sun Jun 23 06:20:14 2013 UTC (9 years, 11 months ago) by tls
Branch: tls-maxphys
Changes since 1.57: +87 -2 lines
Diff to previous 1.57 (colored)

resync from head

Revision 1.58 / (download) - annotate - [select for diffs], Fri Apr 12 16:59:40 2013 UTC (10 years, 1 month 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.57: +87 -2 lines
Diff to previous 1.57 (colored)

de-duplication police arrests sysctl.

Revision 1.56.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:07:06 2012 UTC (11 years, 1 month ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.56: +11 -2 lines
Diff to previous 1.56 (colored)

sync with head

Revision 1.57 / (download) - annotate - [select for diffs], Mon Nov 28 07:56:54 2011 UTC (11 years, 6 months ago) by tls
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, 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, 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, agc-symver-base, agc-symver
Branch point for: tls-maxphys
Changes since 1.56: +11 -2 lines
Diff to previous 1.56 (colored)


Add support for passing saved entropy (random seed file) to the kernel
from the bootloader.  This can fix the problem of poor quality keys
for other kernel modules which call arc4random() early in kernel startup
(NFS startup, in particular, causes this).

We continue to rely on the etc/rc.d/random_seed script to save entropy
to the seed file at shutdown and erase the seed file at startup.

Boot loader support implemented only for i386 and amd64 ports for now but
it should be easy for other ports to do the same or similar.

Revision 1.50.2.3 / (download) - annotate - [select for diffs], Fri Oct 21 18:08:44 2011 UTC (11 years, 7 months ago) by bouyer
Branch: cherry-xenmp
Changes since 1.50.2.2: +5 -5 lines
Diff to previous 1.50.2.2 (colored) to branchpoint 1.50 (colored) next main 1.51 (colored)

Make this build without 'options MULTIPROCESSOR'

Revision 1.29.2.6 / (download) - annotate - [select for diffs], Sat Aug 27 15:37:31 2011 UTC (11 years, 9 months ago) by jym
Branch: jym-xensuspend
Changes since 1.29.2.5: +31 -15 lines
Diff to previous 1.29.2.5 (colored) next main 1.30 (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.56 / (download) - annotate - [select for diffs], Sat Aug 13 21:04:05 2011 UTC (11 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jym-xensuspend-nbase, jym-xensuspend-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache
Changes since 1.55: +4 -3 lines
Diff to previous 1.55 (colored)

Always provide a meaningful short name for the kobj in the error message,
as well as the function name and the linenumber, without extra line feeds.

Revision 1.55 / (download) - annotate - [select for diffs], Thu Aug 11 18:11:17 2011 UTC (11 years, 10 months ago) by cherry
Branch: MAIN
Changes since 1.54: +5 -17 lines
Diff to previous 1.54 (colored)

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

Revision 1.54 / (download) - annotate - [select for diffs], Wed Aug 10 11:39:45 2011 UTC (11 years, 10 months ago) by cherry
Branch: MAIN
Changes since 1.53: +17 -6 lines
Diff to previous 1.53 (colored)

xen ipi infrastructure

Revision 1.53 / (download) - annotate - [select for diffs], Mon Aug 1 11:26:31 2011 UTC (11 years, 10 months ago) by jmcneill
Branch: MAIN
Changes since 1.52: +4 -3 lines
Diff to previous 1.52 (colored)

x86_reset: use acpi_reset instead of AcpiReset

Revision 1.52 / (download) - annotate - [select for diffs], Sun Jul 31 22:43:01 2011 UTC (11 years, 10 months ago) by jmcneill
Branch: MAIN
Changes since 1.51: +19 -2 lines
Diff to previous 1.51 (colored)

x86_reset: If the FADT defines a reset register and ACPI was active, try
to use it to reset the system before attempting any other methods

Revision 1.50.2.2 / (download) - annotate - [select for diffs], Thu Jun 23 14:19:49 2011 UTC (11 years, 11 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.50.2.1: +5 -7 lines
Diff to previous 1.50.2.1 (colored) to branchpoint 1.50 (colored)

Catchup with rmind-uvmplock merge.

Revision 1.51 / (download) - annotate - [select for diffs], Sun Jun 12 03:35:50 2011 UTC (12 years ago) by rmind
Branch: MAIN
Changes since 1.50: +5 -7 lines
Diff to previous 1.50 (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.39.2.7 / (download) - annotate - [select for diffs], Sun Jun 12 00:24:11 2011 UTC (12 years ago) by rmind
Branch: rmind-uvmplock
Changes since 1.39.2.6: +0 -27 lines
Diff to previous 1.39.2.6 (colored) to branchpoint 1.39 (colored) next main 1.40 (colored)

sync with head

Revision 1.44.2.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:07:10 2011 UTC (12 years ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.44: +32 -17 lines
Diff to previous 1.44 (colored) next main 1.45 (colored)

Sync with HEAD.

Revision 1.50.2.1 / (download) - annotate - [select for diffs], Fri Jun 3 13:27:39 2011 UTC (12 years ago) by cherry
Branch: cherry-xenmp
Changes since 1.50: +17 -6 lines
Diff to previous 1.50 (colored)

Initial import of xen MP sources, with kernel and userspace tests.
 - this is a source priview.
 - boots to single user.
 - spurious interrupt and pmap related panics are normal

Revision 1.50 / (download) - annotate - [select for diffs], Tue May 31 23:28:53 2011 UTC (12 years ago) by dyoung
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base
Branch point for: cherry-xenmp
Changes since 1.49: +2 -29 lines
Diff to previous 1.49 (colored)

Don't use the C preprocessor to configure USERCONF.  Instead, either do
or do not link in subr_userconf.c and x86_userconf.c.

Provide no-op stubs for userconf_bootinfo(), userconf_init(), and
userconf_prompt().

Delete all occurrences of #include "opt_userconf.h" as well as USERCONF
and __HAVE_USERCONF_BOOTINFO #ifdef'age.

Revision 1.39.2.6 / (download) - annotate - [select for diffs], Tue May 31 03:04:24 2011 UTC (12 years ago) by rmind
Branch: rmind-uvmplock
Changes since 1.39.2.5: +27 -0 lines
Diff to previous 1.39.2.5 (colored) to branchpoint 1.39 (colored)

sync with head

Revision 1.49 / (download) - annotate - [select for diffs], Thu May 26 16:38:57 2011 UTC (12 years ago) by para
Branch: MAIN
Changes since 1.48: +3 -3 lines
Diff to previous 1.48 (colored)

typo in comment

Revision 1.48 / (download) - annotate - [select for diffs], Thu May 26 16:29:13 2011 UTC (12 years ago) by para
Branch: MAIN
Changes since 1.47: +8 -2 lines
Diff to previous 1.47 (colored)

put userconf_bootinfo under option USERCONF, to allow kernels without that option

Revision 1.47 / (download) - annotate - [select for diffs], Thu May 26 04:25:28 2011 UTC (12 years ago) by uebayasi
Branch: MAIN
Changes since 1.46: +23 -2 lines
Diff to previous 1.46 (colored)

Support userconf(4) command in boot(8)/boot.cfg(5) on i386/amd64.

From jmmv@, no objections seen in the proposed thread:

	http://mail-index.netbsd.org/tech-kern/2009/01/22/msg004081.html

Revision 1.39.2.5 / (download) - annotate - [select for diffs], Thu Apr 21 01:41:33 2011 UTC (12 years, 1 month ago) by rmind
Branch: rmind-uvmplock
Changes since 1.39.2.4: +9 -8 lines
Diff to previous 1.39.2.4 (colored) to branchpoint 1.39 (colored)

sync with head

Revision 1.29.2.5 / (download) - annotate - [select for diffs], Mon Mar 28 23:04:55 2011 UTC (12 years, 2 months ago) by jym
Branch: jym-xensuspend
Changes since 1.29.2.4: +32 -17 lines
Diff to previous 1.29.2.4 (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.46 / (download) - annotate - [select for diffs], Mon Mar 21 22:25:13 2011 UTC (12 years, 2 months ago) by rmind
Branch: MAIN
Changes since 1.45: +11 -10 lines
Diff to previous 1.45 (colored)

cpu_need_resched: make AST if no __HAVE_PREEMPTION.  Change has no effect
since MP option is mandatory on x86, but makes code more logical.

Revision 1.39.2.4 / (download) - annotate - [select for diffs], Sat Mar 5 20:52:32 2011 UTC (12 years, 3 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.39.2.3: +68 -22 lines
Diff to previous 1.39.2.3 (colored) to branchpoint 1.39 (colored)

sync with head

Revision 1.44.4.1 / (download) - annotate - [select for diffs], Tue Feb 8 16:19:45 2011 UTC (12 years, 4 months ago) by bouyer
Branch: bouyer-quota2
Changes since 1.44: +23 -9 lines
Diff to previous 1.44 (colored) next main 1.45 (colored)

Sync with HEAD

Revision 1.45 / (download) - annotate - [select for diffs], Sun Feb 6 23:25:17 2011 UTC (12 years, 4 months ago) by jmcneill
Branch: MAIN
CVS Tags: uebayasi-xip-base7, bouyer-quota2-nbase, bouyer-quota2-base
Changes since 1.44: +23 -9 lines
Diff to previous 1.44 (colored)

- add support for using compressed images as splash images
- retire SPLASHSCREEN_PROGRESS and SPLASHSCREEN_IMAGE options

Revision 1.29.2.4 / (download) - annotate - [select for diffs], Sun Oct 24 22:48:20 2010 UTC (12 years, 7 months ago) by jym
Branch: jym-xensuspend
Changes since 1.29.2.3: +149 -32 lines
Diff to previous 1.29.2.3 (colored)

Sync with HEAD

Revision 1.38.2.3 / (download) - annotate - [select for diffs], Fri Oct 22 07:21:43 2010 UTC (12 years, 7 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.38.2.2: +27 -8 lines
Diff to previous 1.38.2.2 (colored) to branchpoint 1.38 (colored) next main 1.39 (colored)

Sync with HEAD (-D20101022).

Revision 1.44 / (download) - annotate - [select for diffs], Thu Oct 21 11:17:54 2010 UTC (12 years, 7 months ago) by yamt
Branch: MAIN
CVS Tags: uebayasi-xip-base6, uebayasi-xip-base5, uebayasi-xip-base4, uebayasi-xip-base3, matt-mips64-premerge-20101231, jruoho-x86intr-base
Branch point for: jruoho-x86intr, bouyer-quota2
Changes since 1.43: +18 -2 lines
Diff to previous 1.43 (colored)

don't forget to call nmi_init.

Revision 1.15.16.7 / (download) - annotate - [select for diffs], Sat Oct 9 03:31:58 2010 UTC (12 years, 8 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.15.16.6: +13 -10 lines
Diff to previous 1.15.16.6 (colored) to branchpoint 1.15 (colored) next main 1.16 (colored)

sync with head

Revision 1.43 / (download) - annotate - [select for diffs], Mon Aug 23 16:20:45 2010 UTC (12 years, 9 months ago) by jruoho
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11
Changes since 1.42: +13 -10 lines
Diff to previous 1.42 (colored)

Other entry points beyond x86_cpu_idle_halt() may use HLT as the
idle-mechanism. Send an IPI also for these in cpu_need_resched().

Revision 1.38.2.2 / (download) - annotate - [select for diffs], Tue Aug 17 06:45:34 2010 UTC (12 years, 9 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.38.2.1: +23 -9 lines
Diff to previous 1.38.2.1 (colored) to branchpoint 1.38 (colored)

Sync with HEAD.

Revision 1.15.16.6 / (download) - annotate - [select for diffs], Wed Aug 11 22:52:58 2010 UTC (12 years, 10 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.15.16.5: +26 -12 lines
Diff to previous 1.15.16.5 (colored) to branchpoint 1.15 (colored)

sync with head.

Revision 1.42 / (download) - annotate - [select for diffs], Sun Jul 18 09:29:12 2010 UTC (12 years, 10 months ago) by jruoho
Branch: MAIN
CVS Tags: yamt-nfs-mp-base10, uebayasi-xip-base2
Changes since 1.41: +24 -11 lines
Diff to previous 1.41 (colored)

Merge a driver for ACPI CPUs with basic support for processor power states,
also known as C-states. The code is modular and provides an easy way to add
the remaining functionality later (namely throttling and P-states).

Remarks:

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

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

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

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

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

ok jmcneill@, joerg@, and discussed with various people.

Revision 1.39.2.3 / (download) - annotate - [select for diffs], Sat Jul 3 01:19:30 2010 UTC (12 years, 11 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.39.2.2: +3 -2 lines
Diff to previous 1.39.2.2 (colored) to branchpoint 1.39 (colored)

sync with head

Revision 1.41 / (download) - annotate - [select for diffs], Wed Jun 2 09:43:12 2010 UTC (13 years ago) by joerg
Branch: MAIN
Changes since 1.40: +3 -2 lines
Diff to previous 1.40 (colored)

Restore PHYSMEM_MAX* options (hi cegger!)

Revision 1.39.2.2 / (download) - annotate - [select for diffs], Sun May 30 05:17:13 2010 UTC (13 years ago) by rmind
Branch: rmind-uvmplock
Changes since 1.39.2.1: +3 -3 lines
Diff to previous 1.39.2.1 (colored) to branchpoint 1.39 (colored)

sync with head

Revision 1.38.2.1 / (download) - annotate - [select for diffs], Fri Apr 30 14:40:00 2010 UTC (13 years, 1 month ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.38: +4 -4 lines
Diff to previous 1.38 (colored)

Sync with HEAD.

Revision 1.40 / (download) - annotate - [select for diffs], Sun Apr 18 23:47:51 2010 UTC (13 years, 1 month ago) by jym
Branch: MAIN
CVS Tags: uebayasi-xip-base1
Changes since 1.39: +3 -3 lines
Diff to previous 1.39 (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.39.2.1 / (download) - annotate - [select for diffs], Thu Mar 18 04:36:53 2010 UTC (13 years, 2 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.39: +5 -7 lines
Diff to previous 1.39 (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.15.16.5 / (download) - annotate - [select for diffs], Thu Mar 11 15:03:09 2010 UTC (13 years, 3 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.15.16.4: +136 -28 lines
Diff to previous 1.15.16.4 (colored) to branchpoint 1.15 (colored)

sync with head

Revision 1.39 / (download) - annotate - [select for diffs], Tue Feb 9 23:52:13 2010 UTC (13 years, 4 months ago) by jym
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9
Branch point for: rmind-uvmplock
Changes since 1.38: +3 -3 lines
Diff to previous 1.38 (colored)

Wrap a comment; add a space after a comma to another (align with next line)

Revision 1.38 / (download) - annotate - [select for diffs], Sat Jan 9 22:54:00 2010 UTC (13 years, 5 months ago) by cegger
Branch: MAIN
CVS Tags: uebayasi-xip-base
Branch point for: uebayasi-xip
Changes since 1.37: +8 -4 lines
Diff to previous 1.37 (colored)

TOPLIMIT for i386 PAE is 64GB.

Revision 1.37 / (download) - annotate - [select for diffs], Sun Nov 22 21:41:03 2009 UTC (13 years, 6 months ago) by bouyer
Branch: MAIN
CVS Tags: matt-premerge-20091211
Changes since 1.36: +89 -13 lines
Diff to previous 1.36 (colored)

For amd64, introduce a third free list distinct from the default free list
for memory between 16M and 4G. On large memory machine, this avoids
the 32bit-accessible memory being eaten by various kernel early allocation,
causing 32bit bus_dma(9) memory allocation to fail at boot time.
Tested on a system with 48GB RAM; based on netbsd-5 patch proposed on
port-amd64 3 days ago.

Revision 1.36 / (download) - annotate - [select for diffs], Sat Nov 21 03:11:02 2009 UTC (13 years, 6 months ago) by rmind
Branch: MAIN
Changes since 1.35: +8 -4 lines
Diff to previous 1.35 (colored)

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

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

Sync with HEAD.

Revision 1.35 / (download) - annotate - [select for diffs], Tue Oct 6 21:07:05 2009 UTC (13 years, 8 months ago) by elad
Branch: MAIN
Changes since 1.34: +36 -2 lines
Diff to previous 1.34 (colored)

Add a (weak aliased) machdep_init() as a place to do machdep initialization
that can't happen as early as the other init functions as called from
cpu_startup() -- for example, register kauth(9) listeners.

Put unprivileged policy in the x86 code; used by i386, amd64, and xen.

Revision 1.34 / (download) - annotate - [select for diffs], Mon Oct 5 23:59:31 2009 UTC (13 years, 8 months ago) by rmind
Branch: MAIN
Changes since 1.33: +2 -12 lines
Diff to previous 1.33 (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.15.16.4 / (download) - annotate - [select for diffs], Wed Aug 19 18:46:52 2009 UTC (13 years, 9 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.15.16.3: +2 -4 lines
Diff to previous 1.15.16.3 (colored) to branchpoint 1.15 (colored)

sync with head.

Revision 1.33 / (download) - annotate - [select for diffs], Wed Aug 5 20:15:36 2009 UTC (13 years, 10 months ago) by jym
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7
Changes since 1.32: +2 -4 lines
Diff to previous 1.32 (colored)

Add Intel SpeedStep and AMD PowerNow! support in Xen dom0. MSR operations
are now compiled in by default.

Note that MSR support in Xen depends on its version. rdmsr() should always
succeed, but wrmsr() to certain registers can end in a NOOP. In that case,
the error will be logged (see xm dmesg).

Setting CPU frequency (SpeedStep) requires Xen 3.3 with the option
cpufreq="dom0-kernel" passed down to hypervisor during boot.

Compiled and tested for SpeedStep under i386 for XEN3_DOM0 and XEN3PAE_DOM0
by jym@. amd64 was tested by Joel Carnat.

See also http://mail-index.netbsd.org/port-xen/2009/08/02/msg005213.html .

Commit requested by bouyer@.

Revision 1.29.2.2 / (download) - annotate - [select for diffs], Thu Jul 23 23:31:37 2009 UTC (13 years, 10 months ago) by jym
Branch: jym-xensuspend
Changes since 1.29.2.1: +14 -10 lines
Diff to previous 1.29.2.1 (colored)

Sync with HEAD.

Revision 1.15.16.3 / (download) - annotate - [select for diffs], Sat Jul 18 14:52:56 2009 UTC (13 years, 10 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.15.16.2: +14 -10 lines
Diff to previous 1.15.16.2 (colored) to branchpoint 1.15 (colored)

sync with head.

Revision 1.32 / (download) - annotate - [select for diffs], Sat Jun 20 13:10:14 2009 UTC (13 years, 11 months ago) by cegger
Branch: MAIN
CVS Tags: yamt-nfs-mp-base6, jymxensuspend-base
Changes since 1.31: +14 -10 lines
Diff to previous 1.31 (colored)

make this build with DEBUG_MEMLOAD in all combinations of 32bit, 32bit PAE and 64bit

Revision 1.29.2.1 / (download) - annotate - [select for diffs], Wed May 13 17:18:45 2009 UTC (14 years, 1 month ago) by jym
Branch: jym-xensuspend
Changes since 1.29: +6 -4 lines
Diff to previous 1.29 (colored)

Sync with HEAD.

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

Revision 1.15.16.2 / (download) - annotate - [select for diffs], Mon May 4 08:12:11 2009 UTC (14 years, 1 month ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.15.16.1: +482 -6 lines
Diff to previous 1.15.16.1 (colored) to branchpoint 1.15 (colored)

sync with head.

Revision 1.23.6.3 / (download) - annotate - [select for diffs], Tue Apr 28 07:34:57 2009 UTC (14 years, 1 month ago) by skrll
Branch: nick-hppapmap
Changes since 1.23.6.2: +4 -4 lines
Diff to previous 1.23.6.2 (colored) to branchpoint 1.23 (colored) next main 1.24 (colored)

Sync with HEAD.

Revision 1.31 / (download) - annotate - [select for diffs], Sat Mar 21 15:01:57 2009 UTC (14 years, 2 months ago) by ad
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.30: +4 -4 lines
Diff to previous 1.30 (colored)

Fix 'boot -z' bogons.

Revision 1.23.6.2 / (download) - annotate - [select for diffs], Tue Mar 3 18:29:37 2009 UTC (14 years, 3 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.23.6.1: +50 -2 lines
Diff to previous 1.23.6.1 (colored) to branchpoint 1.23 (colored)

Sync with HEAD.

Revision 1.30 / (download) - annotate - [select for diffs], Fri Feb 13 22:41:03 2009 UTC (14 years, 3 months ago) by apb
Branch: MAIN
CVS Tags: nick-hppapmap-base2
Changes since 1.29: +4 -2 lines
Diff to previous 1.29 (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.23.8.4 / (download) - annotate - [select for diffs], Mon Feb 2 23:47:35 2009 UTC (14 years, 4 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, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b
Changes since 1.23.8.3: +3 -2 lines
Diff to previous 1.23.8.3 (colored) to branchpoint 1.23 (colored) next main 1.24 (colored)

Apply patch (requested by he in ticket #396):
Include dev/isa/isareg.h for IO_KBD.

Revision 1.23.8.3 / (download) - annotate - [select for diffs], Mon Feb 2 21:45:18 2009 UTC (14 years, 4 months ago) by snj
Branch: netbsd-5
Changes since 1.23.8.2: +5 -2 lines
Diff to previous 1.23.8.2 (colored) to branchpoint 1.23 (colored)

Pull up following revision(s) (requested by ad in ticket #396):
	sys/arch/x86/x86/x86_machdep.c: revision 1.29
add a couple of include files

Revision 1.23.8.2 / (download) - annotate - [select for diffs], Mon Feb 2 21:38:50 2009 UTC (14 years, 4 months ago) by snj
Branch: netbsd-5
Changes since 1.23.8.1: +46 -2 lines
Diff to previous 1.23.8.1 (colored) to branchpoint 1.23 (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.23.8.1 / (download) - annotate - [select for diffs], Mon Feb 2 03:22:55 2009 UTC (14 years, 4 months ago) by snj
Branch: netbsd-5
Changes since 1.23: +3 -3 lines
Diff to previous 1.23 (colored)

Pull up following revision(s) (requested by ad in ticket #345):
	sys/arch/amd64/amd64/genassym.cf: revision 1.39
	sys/arch/i386/i386/genassym.cf: revision 1.79
	sys/arch/i386/i386/locore.S: revision 1.82
	sys/arch/x86/x86/x86_machdep.c: revision 1.26
Don't abort pageidlezero unless a realtime thread wants to run.

Revision 1.29 / (download) - annotate - [select for diffs], Tue Jan 27 22:36:48 2009 UTC (14 years, 4 months ago) by christos
Branch: MAIN
Branch point for: jym-xensuspend
Changes since 1.28: +4 -2 lines
Diff to previous 1.28 (colored)

add a couple of include files

Revision 1.28 / (download) - annotate - [select for diffs], Tue Jan 27 21:59:24 2009 UTC (14 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.27: +46 -2 lines
Diff to previous 1.27 (colored)

factor out common reset code.

Revision 1.23.6.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:17:10 2009 UTC (14 years, 4 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.23: +433 -5 lines
Diff to previous 1.23 (colored)

Sync with HEAD.

Revision 1.15.12.2 / (download) - annotate - [select for diffs], Sat Jan 17 13:28:39 2009 UTC (14 years, 4 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.15.12.1: +431 -3 lines
Diff to previous 1.15.12.1 (colored) to branchpoint 1.15 (colored) next main 1.16 (colored)

Sync with HEAD.

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

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

Revision 1.23.4.1 / (download) - annotate - [select for diffs], Sat Dec 13 01:13:39 2008 UTC (14 years, 5 months ago) by haad
Branch: haad-dm
Changes since 1.23: +410 -5 lines
Diff to previous 1.23 (colored) next main 1.24 (colored)

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

Revision 1.26 / (download) - annotate - [select for diffs], Wed Dec 3 11:40:17 2008 UTC (14 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Changes since 1.25: +3 -3 lines
Diff to previous 1.25 (colored)

Don't abort pageidlezero unless a realtime thread wants to run.

Revision 1.25 / (download) - annotate - [select for diffs], Fri Nov 14 00:41:36 2008 UTC (14 years, 6 months ago) by cegger
Branch: MAIN
Changes since 1.24: +409 -2 lines
Diff to previous 1.24 (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.24 / (download) - annotate - [select for diffs], Wed Nov 12 12:36:09 2008 UTC (14 years, 6 months ago) by ad
Branch: MAIN
Changes since 1.23: +2 -4 lines
Diff to previous 1.23 (colored)

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

Proposed on tech-kern@.

Revision 1.21.2.1 / (download) - annotate - [select for diffs], Mon Jun 23 04:30:51 2008 UTC (14 years, 11 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.21: +44 -4 lines
Diff to previous 1.21 (colored) next main 1.22 (colored)

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

Revision 1.15.12.1 / (download) - annotate - [select for diffs], Mon Jun 2 13:22:52 2008 UTC (15 years ago) by mjf
Branch: mjf-devfs2
Changes since 1.15: +193 -23 lines
Diff to previous 1.15 (colored)

Sync with HEAD.

Revision 1.15.14.1 / (download) - annotate - [select for diffs], Sun May 18 12:33:04 2008 UTC (15 years ago) by yamt
Branch: yamt-pf42
Changes since 1.15: +193 -23 lines
Diff to previous 1.15 (colored) next main 1.16 (colored)

sync with head.

Revision 1.15.16.1 / (download) - annotate - [select for diffs], Fri May 16 02:23:29 2008 UTC (15 years ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.15: +193 -23 lines
Diff to previous 1.15 (colored)

sync with head.

Revision 1.23 / (download) - annotate - [select for diffs], Fri May 9 21:25:43 2008 UTC (15 years, 1 month ago) by joerg
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-nfs-mp-base2, wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl, netbsd-5-base, netbsd-5-0-RC1, matt-mips64-base2, hpcarm-cleanup-nbase, haad-dm-base1
Branch point for: nick-hppapmap, netbsd-5, haad-dm
Changes since 1.22: +4 -2 lines
Diff to previous 1.22 (colored)

Only check for hlt on !Xen. This needs to be reviewed when Xen gets SMP
support.

Revision 1.22 / (download) - annotate - [select for diffs], Fri May 9 18:11:29 2008 UTC (15 years, 1 month ago) by joerg
Branch: MAIN
Changes since 1.21: +42 -4 lines
Diff to previous 1.21 (colored)

Make cpu_idle a macro calling a function pointer on x86.
Select the Xen idle routine for Xen, mwait if supported by the CPU and
it is not AMD and halt otherwise. As reported by Christoph Egger,
AMD Barcelona keeps the CPU in C0 state with MWAIT, contrary to HLT,
which uses C1 and therefore much less power.

Revision 1.21 / (download) - annotate - [select for diffs], Fri May 2 15:26:39 2008 UTC (15 years, 1 month ago) by ad
Branch: MAIN
Branch point for: wrstuden-revivesa
Changes since 1.20: +37 -2 lines
Diff to previous 1.20 (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.20 / (download) - annotate - [select for diffs], Wed Apr 30 12:44:27 2008 UTC (15 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.19: +6 -6 lines
Diff to previous 1.19 (colored)

Avoid unneeded AST faults.

Revision 1.19 / (download) - annotate - [select for diffs], Tue Apr 29 15:44:07 2008 UTC (15 years, 1 month ago) by yamt
Branch: MAIN
Changes since 1.18: +5 -2 lines
Diff to previous 1.18 (colored)

sprinkle KASSERT(kpreempt_disabled()).

Revision 1.18 / (download) - annotate - [select for diffs], Tue Apr 29 15:42:59 2008 UTC (15 years, 1 month ago) by yamt
Branch: MAIN
Changes since 1.17: +7 -3 lines
Diff to previous 1.17 (colored)

make cpu_intr_p preemption safe.

Revision 1.17 / (download) - annotate - [select for diffs], Mon Apr 28 22:47:37 2008 UTC (15 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.16: +109 -14 lines
Diff to previous 1.16 (colored)

Add support for kernel preeemption to the i386 and amd64 ports. Notes:

- I have seen one isolated panic in the x86 pmap, but otherwise i386
  seems stable with preemption enabled.

- amd64 is missing the FPU handling changes and it's not yet safe to
  enable it there.

- The usual level for kern.sched.kpreempt_pri will be 128 once enabled
  by default. For testing, setting it to 0 helps to shake out bugs.

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

Remove clause 3 and 4 from TNF licenses

Revision 1.10.14.2 / (download) - annotate - [select for diffs], Wed Jan 9 01:50:01 2008 UTC (15 years, 5 months ago) by matt
Branch: matt-armv6
Changes since 1.10.14.1: +55 -2 lines
Diff to previous 1.10.14.1 (colored) to branchpoint 1.10 (colored) next main 1.11 (colored)

sync with HEAD

Revision 1.10.12.4 / (download) - annotate - [select for diffs], Sun Dec 9 19:36:30 2007 UTC (15 years, 6 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.10.12.3: +9 -2 lines
Diff to previous 1.10.12.3 (colored) to branchpoint 1.10 (colored) next main 1.11 (colored)

Sync with HEAD.

Revision 1.13.2.2 / (download) - annotate - [select for diffs], Sat Dec 8 18:18:15 2007 UTC (15 years, 6 months ago) by mjf
Branch: mjf-devfs
Changes since 1.13.2.1: +9 -2 lines
Diff to previous 1.13.2.1 (colored) to branchpoint 1.13 (colored) next main 1.14 (colored)

Sync with HEAD.

Revision 1.14.2.1 / (download) - annotate - [select for diffs], Sat Dec 8 17:56:33 2007 UTC (15 years, 6 months ago) by ad
Branch: vmlocking2
Changes since 1.14: +9 -2 lines
Diff to previous 1.14 (colored) next main 1.15 (colored)

Sync with head.

Revision 1.1.18.8 / (download) - annotate - [select for diffs], Fri Dec 7 17:27:03 2007 UTC (15 years, 6 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.1.18.7: +9 -2 lines
Diff to previous 1.1.18.7 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored)

sync with head

Revision 1.15 / (download) - annotate - [select for diffs], Thu Dec 6 13:58:38 2007 UTC (15 years, 6 months 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, yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base3, vmlocking2-base2, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, matt-armv6-base, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, jmcneill-pm-base, hpcarm-cleanup-base, cube-autoconf-base, cube-autoconf, bouyer-xeni386-nbase, bouyer-xeni386-merge1, bouyer-xeni386-base, bouyer-xeni386, ad-socklock-base1
Branch point for: yamt-pf42, yamt-nfs-mp, mjf-devfs2
Changes since 1.14: +9 -2 lines
Diff to previous 1.14 (colored)

Share cpu_intr_p() with xen. Why xen has its own intr.c is a mystery.

Revision 1.8.2.6 / (download) - annotate - [select for diffs], Mon Dec 3 19:04:34 2007 UTC (15 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.8.2.5: +2 -57 lines
Diff to previous 1.8.2.5 (colored) next main 1.9 (colored)

Sync with HEAD.

Revision 1.8.2.5 / (download) - annotate - [select for diffs], Mon Dec 3 18:40:24 2007 UTC (15 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.8.2.4: +47 -2 lines
Diff to previous 1.8.2.4 (colored)

Sync with HEAD.

Revision 1.13.2.1 / (download) - annotate - [select for diffs], Mon Nov 19 00:47:04 2007 UTC (15 years, 6 months ago) by mjf
Branch: mjf-devfs
Changes since 1.13: +48 -2 lines
Diff to previous 1.13 (colored)

Sync with HEAD.

Revision 1.1.18.7 / (download) - annotate - [select for diffs], Thu Nov 15 11:43:43 2007 UTC (15 years, 6 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.1.18.6: +48 -2 lines
Diff to previous 1.1.18.6 (colored) to branchpoint 1.1 (colored)

sync with head.

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

Sync with HEAD.

Revision 1.12.2.1 / (download) - annotate - [select for diffs], Tue Nov 13 16:00:25 2007 UTC (15 years, 6 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.12: +48 -2 lines
Diff to previous 1.12 (colored) next main 1.13 (colored)

Sync with HEAD

Revision 1.14 / (download) - annotate - [select for diffs], Mon Nov 12 19:02:29 2007 UTC (15 years, 7 months ago) by ad
Branch: MAIN
CVS Tags: vmlocking2-base1, vmlocking-nbase, bouyer-xenamd64-base2, bouyer-xenamd64-base
Branch point for: vmlocking2
Changes since 1.13: +48 -2 lines
Diff to previous 1.13 (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.10.14.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:23:56 2007 UTC (15 years, 7 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.10: +3 -16 lines
Diff to previous 1.10 (colored)

sync with HEAD

Revision 1.8.2.4 / (download) - annotate - [select for diffs], Thu Nov 1 21:58:14 2007 UTC (15 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.8.2.3: +58 -2 lines
Diff to previous 1.8.2.3 (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.1.18.6 / (download) - annotate - [select for diffs], Sat Oct 27 11:29:05 2007 UTC (15 years, 7 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.1.18.5: +2 -16 lines
Diff to previous 1.1.18.5 (colored) to branchpoint 1.1 (colored)

sync with head.

Revision 1.13 / (download) - annotate - [select for diffs], Wed Oct 17 19:58:18 2007 UTC (15 years, 7 months ago) by garbled
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, jmcneill-base
Branch point for: mjf-devfs
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (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.8.2.3 / (download) - annotate - [select for diffs], Tue Oct 9 15:22:08 2007 UTC (15 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.8.2.2: +2 -16 lines
Diff to previous 1.8.2.2 (colored)

Sync with head.

Revision 1.11.2.1 / (download) - annotate - [select for diffs], Sat Oct 6 15:33:38 2007 UTC (15 years, 8 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.11: +2 -16 lines
Diff to previous 1.11 (colored) next main 1.12 (colored)

sync with head.

Revision 1.10.4.1 / (download) - annotate - [select for diffs], Wed Oct 3 19:25:57 2007 UTC (15 years, 8 months ago) by garbled
Branch: ppcoea-renovation
Changes since 1.10: +3 -16 lines
Diff to previous 1.10 (colored) next main 1.11 (colored)

Sync with HEAD

Revision 1.10.12.2 / (download) - annotate - [select for diffs], Tue Oct 2 18:27:54 2007 UTC (15 years, 8 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.10.12.1: +2 -16 lines
Diff to previous 1.10.12.1 (colored) to branchpoint 1.10 (colored)

Sync with HEAD.

Revision 1.12 / (download) - annotate - [select for diffs], Wed Sep 26 19:48:44 2007 UTC (15 years, 8 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.11: +2 -16 lines
Diff to previous 1.11 (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.10.12.1 / (download) - annotate - [select for diffs], Mon Sep 3 16:47:49 2007 UTC (15 years, 9 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.10: +3 -2 lines
Diff to previous 1.10 (colored)

Sync with HEAD.

Revision 1.1.18.5 / (download) - annotate - [select for diffs], Mon Sep 3 14:31:30 2007 UTC (15 years, 9 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.1.18.4: +18 -8 lines
Diff to previous 1.1.18.4 (colored) to branchpoint 1.1 (colored)

sync with head.

Revision 1.10.8.1 / (download) - annotate - [select for diffs], Mon Sep 3 10:19:54 2007 UTC (15 years, 9 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.10: +3 -2 lines
Diff to previous 1.10 (colored) next main 1.11 (colored)

Sync with HEAD.

Revision 1.11 / (download) - annotate - [select for diffs], Wed Aug 29 23:38:06 2007 UTC (15 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base, nick-csl-alignment-base5
Branch point for: yamt-x86pmap
Changes since 1.10: +3 -2 lines
Diff to previous 1.10 (colored)

Merge most x86 changes from the vmlocking branch, except the threaded soft
interrupt stuff. This is mostly comprised of changes to the pmap modules to
work on multiprocessor systems without kernel_lock, and changes to speed up
tlb shootdowns.

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

Sync with head.

Revision 1.4.2.3 / (download) - annotate - [select for diffs], Sun Apr 22 17:20:44 2007 UTC (16 years, 1 month ago) by bouyer
Branch: netbsd-4
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, 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.4.2.2: +4 -2 lines
Diff to previous 1.4.2.2 (colored) to branchpoint 1.4 (colored) next main 1.5 (colored)

Apply patch to make Xen kernels build again; provided by xtraeme as part of
ticket #575

Revision 1.4.2.2 / (download) - annotate - [select for diffs], Fri Apr 20 20:31:27 2007 UTC (16 years, 1 month ago) by bouyer
Branch: netbsd-4
Changes since 1.4.2.1: +14 -2 lines
Diff to previous 1.4.2.1 (colored) to branchpoint 1.4 (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.8.2.2 / (download) - annotate - [select for diffs], Tue Apr 10 13:22:47 2007 UTC (16 years, 2 months ago) by ad
Branch: vmlocking
Changes since 1.8.2.1: +15 -2 lines
Diff to previous 1.8.2.1 (colored)

Sync with head.

Revision 1.8.6.1 / (download) - annotate - [select for diffs], Thu Mar 29 19:27:36 2007 UTC (16 years, 2 months ago) by reinoud
Branch: reinoud-bufcleanup
Changes since 1.8: +15 -2 lines
Diff to previous 1.8 (colored) next main 1.9 (colored)

Pullup to -current

Revision 1.6.2.3 / (download) - annotate - [select for diffs], Sat Mar 24 14:55:06 2007 UTC (16 years, 2 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.6.2.2: +15 -2 lines
Diff to previous 1.6.2.2 (colored) to branchpoint 1.6 (colored) next main 1.7 (colored)

sync with head.

Revision 1.10 / (download) - annotate - [select for diffs], Wed Mar 21 00:16:52 2007 UTC (16 years, 2 months ago) by xtraeme
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic, nick-csl-alignment-base, mjf-ufs-trans-base, matt-mips64-base, matt-mips64, hpcarm-cleanup
Branch point for: ppcoea-renovation, nick-csl-alignment, matt-armv6, jmcneill-pm
Changes since 1.9: +4 -2 lines
Diff to previous 1.9 (colored)

Don't build msr_ipifuncs on Xen, fixes the build with XEN2_DOM0.

Revision 1.9 / (download) - annotate - [select for diffs], Tue Mar 20 21:07:39 2007 UTC (16 years, 2 months ago) by xtraeme
Branch: MAIN
Changes since 1.8: +13 -2 lines
Diff to previous 1.8 (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.8.2.1 / (download) - annotate - [select for diffs], Tue Mar 13 17:50:25 2007 UTC (16 years, 3 months ago) by ad
Branch: vmlocking
Changes since 1.8: +3 -2 lines
Diff to previous 1.8 (colored)

Pull in the initial set of changes for the vmlocking branch.

Revision 1.6.2.2 / (download) - annotate - [select for diffs], Mon Mar 12 05:51:47 2007 UTC (16 years, 3 months ago) by rmind
Branch: yamt-idlelwp
Changes since 1.6.2.1: +4 -8 lines
Diff to previous 1.6.2.1 (colored) to branchpoint 1.6 (colored)

Sync with HEAD.

Revision 1.8 / (download) - annotate - [select for diffs], Thu Mar 1 11:49:26 2007 UTC (16 years, 3 months ago) by yamt
Branch: MAIN
Branch point for: vmlocking, reinoud-bufcleanup, mjf-ufs-trans
Changes since 1.7: +4 -8 lines
Diff to previous 1.7 (colored)

check_pa_acc: don't bother to use KAUTH_MACHDEP_UNMANAGEDMEM
if the address is known.
no functional changes, unless listeners do some kind of logging.

Revision 1.6.2.1 / (download) - annotate - [select for diffs], Tue Feb 27 16:53:26 2007 UTC (16 years, 3 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.6: +3 -3 lines
Diff to previous 1.6 (colored)

- sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.

Revision 1.1.18.4 / (download) - annotate - [select for diffs], Mon Feb 26 09:08:52 2007 UTC (16 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.1.18.3: +17 -3 lines
Diff to previous 1.1.18.3 (colored) to branchpoint 1.1 (colored)

sync with head.

Revision 1.7 / (download) - annotate - [select for diffs], Wed Feb 21 22:59:55 2007 UTC (16 years, 3 months ago) by thorpej
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Changes since 1.6: +3 -3 lines
Diff to previous 1.6 (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.1.22.3 / (download) - annotate - [select for diffs], Thu Feb 1 08:48:12 2007 UTC (16 years, 4 months ago) by ad
Branch: newlock2
Changes since 1.1.22.2: +16 -2 lines
Diff to previous 1.1.22.2 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored)

Sync with head.

Revision 1.6 / (download) - annotate - [select for diffs], Sun Jan 14 14:03:00 2007 UTC (16 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: post-newlock2-merge, newlock2-nbase, newlock2-base
Branch point for: yamt-idlelwp
Changes since 1.5: +16 -2 lines
Diff to previous 1.5 (colored)

On second thought, implement x86_pause() as a regular function. The small
delay from the call is useful for spinlock backoff.

Revision 1.1.22.2 / (download) - annotate - [select for diffs], Fri Jan 12 01:01:01 2007 UTC (16 years, 5 months ago) by ad
Branch: newlock2
Changes since 1.1.22.1: +5 -3 lines
Diff to previous 1.1.22.1 (colored) to branchpoint 1.1 (colored)

Sync with head.

Revision 1.4.2.1 / (download) - annotate - [select for diffs], Sat Jan 6 13:18:16 2007 UTC (16 years, 5 months ago) by bouyer
Branch: netbsd-4
Changes since 1.4: +4 -4 lines
Diff to previous 1.4 (colored)

Pull up following revision(s) (requested by elad in ticket #316):
	share/examples/secmodel/secmodel_example.c: revision 1.10 via patch
	sys/arch/i386/i386/sys_machdep.c: revision 1.79
	sys/arch/amd64/amd64/netbsd32_machdep.c: revision 1.31
	share/man/man9/secmodel_bsd44.9: revision 1.9
	sys/arch/vax/vax/mem.c: revision 1.34 via patch
	sys/arch/sh3/sh3/mem.c: revision 1.23 via patch
	sys/arch/sh5/sh5/mem.c: revision 1.14 via patch
	sys/secmodel/bsd44/secmodel_bsd44_suser.c: revision 1.22 via patch
	sys/arch/powerpc/powerpc/mem.c: revision 1.27 via patch
	sys/arch/x86/x86/x86_machdep.c: revision 1.5
	sys/arch/alpha/alpha/machdep.c: revision 1.291
	sys/arch/arm/arm32/mem.c: revision 1.17 via patch
	sys/secmodel/bsd44/secmodel_bsd44_securelevel.c: revision 1.20
	sys/sys/kauth.h: revision 1.29 via patch
	sys/arch/amd64/amd64/sys_machdep.c: revision 1.10
	share/man/man9/kauth.9: revision 1.43 via patch
	sys/arch/xen/i386/sys_machdep.c: revision 1.10
	sys/kern/kern_auth.c: revision 1.35
	sys/arch/pc532/pc532/mem.c: revision 1.43 via patch
Make machdep scope architecture-agnostic by removing all arch-specific
requests and centralizing them all. The result is that some of these
are not used on some architectures, but the documentation was updated
to reflect that.

Revision 1.1.18.3 / (download) - annotate - [select for diffs], Sat Dec 30 20:47:22 2006 UTC (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.1.18.2: +38 -2 lines
Diff to previous 1.1.18.2 (colored) to branchpoint 1.1 (colored)

sync with head.

Revision 1.5 / (download) - annotate - [select for diffs], Tue Dec 26 10:43:44 2006 UTC (16 years, 5 months ago) by elad
Branch: MAIN
Changes since 1.4: +4 -4 lines
Diff to previous 1.4 (colored)

Make machdep scope architecture-agnostic by removing all arch-specific
requests and centralizing them all. The result is that some of these
are not used on some architectures, but the documentation was updated
to reflect that.

Revision 1.1.24.1 / (download) - annotate - [select for diffs], Sun Dec 10 07:16:43 2006 UTC (16 years, 6 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.1: +38 -2 lines
Diff to previous 1.1 (colored) next main 1.2 (colored)

sync with head.

Revision 1.4 / (download) - annotate - [select for diffs], Wed Nov 22 12:12:51 2006 UTC (16 years, 6 months ago) by elad
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, netbsd-4-base
Branch point for: netbsd-4
Changes since 1.3: +5 -3 lines
Diff to previous 1.3 (colored)

Introduce KAUTH_REQ_MACHDEP_{ALPHA,X86}_UNMANAGEDMEM to handle access
to unmanaged memory.

These are the last two securelevel references in the MD code.

Revision 1.1.22.1 / (download) - annotate - [select for diffs], Sat Nov 18 21:29:39 2006 UTC (16 years, 6 months ago) by ad
Branch: newlock2
Changes since 1.1: +36 -2 lines
Diff to previous 1.1 (colored)

Sync with head.

Revision 1.3 / (download) - annotate - [select for diffs], Thu Nov 16 01:32:39 2006 UTC (16 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.2: +4 -4 lines
Diff to previous 1.2 (colored)

__unused removal on arguments; approved by core.

Revision 1.2 / (download) - annotate - [select for diffs], Mon Oct 30 00:41:26 2006 UTC (16 years, 7 months ago) by elad
Branch: MAIN
Changes since 1.1: +36 -2 lines
Diff to previous 1.1 (colored)

Move i386/amd64 common code (check_pa_acc()) to x86.

I didn't know what header to put the prototype in, so it's both in
i386/mem.c and amd64/mem.c; probably can be moved later.

Tested on amd64, assumed working on i386. :)

yamt@ okay

Revision 1.1.18.2 / (download) - annotate - [select for diffs], Wed Jun 21 14:58:06 2006 UTC (16 years, 11 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.1.18.1: +81 -0 lines
Diff to previous 1.1.18.1 (colored) to branchpoint 1.1 (colored)

sync with head.

Revision 1.1.18.1, Fri Dec 30 13:37:57 2005 UTC (17 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.1: +0 -81 lines
FILE REMOVED

file x86_machdep.c was added on branch yamt-lazymbuf on 2006-06-21 14:58:06 +0000

Revision 1.1 / (download) - annotate - [select for diffs], Fri Dec 30 13:37:57 2005 UTC (17 years, 5 months ago) by jmmv
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-uio_vmspace, yamt-splraiseipl-base2, yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, yamt-pdpolicy-base7, yamt-pdpolicy-base6, yamt-pdpolicy-base5, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, yamt-pdpolicy, simonb-timecounters-base, simonb-timecounters, simonb-timcounters-final, rpaulo-netinet-merge-pcb-base, rpaulo-netinet-merge-pcb, peter-altq-base, peter-altq, gdamore-uart-base, gdamore-uart, elad-kernelauth-base, elad-kernelauth, chap-midi-nbase, chap-midi-base, chap-midi, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: yamt-splraiseipl, yamt-lazymbuf, newlock2

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.

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>