The NetBSD Project

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

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

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.842: download - view: text, markup, annotated - select for diffs
Thu Jun 27 23:58:46 2024 UTC (4 months ago) by riastradh
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, HEAD
Diff to: previous 1.841: preferred, colored
Changes since revision 1.841: +18 -11 lines
x86: Defer x86_rndseed until after pmap_bootstrap.

Loading the random seed, which is what x86_rndseed does, requires
direct map access on KASLR kernels, which requires pmap_bootstrap to
have run.

This had been broken in

amd64/machdep.c 1.359
i386/machdep.c 1.832

because we apparently don't have any automatic test setup for KASLR
kernels, which we should address.

This change shouldn't cause any security regression on kernels that
previously owrked, because none of the logic that now happens before
x86_rndseed uses the entropy pool anyway (uvm_md_init,
init_x86_clusters, xen_parse_cmdline).

PR port-amd64/58366

Revision 1.841: download - view: text, markup, annotated - select for diffs
Tue Mar 5 14:15:32 2024 UTC (7 months, 4 weeks ago) by thorpej
Branches: MAIN
Diff to: previous 1.840: preferred, colored
Changes since revision 1.840: +2 -11 lines
Move the at-shutdown call to resettodr() from cpu_reboot() to kern_reboot().

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

Revision 1.840: download - view: text, markup, annotated - select for diffs
Sun Jul 16 19:55:43 2023 UTC (15 months, 2 weeks ago) by riastradh
Branches: MAIN
CVS tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation
Diff to: previous 1.839: preferred, colored
Changes since revision 1.839: +77 -4 lines
x86: Sprinkle extensive commentary about %fs/%gs initialization.

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

No functional change intended.

Revision 1.839: download - view: text, markup, annotated - select for diffs
Wed Oct 26 23:38:07 2022 UTC (2 years ago) by riastradh
Branches: MAIN
CVS tags: netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10
Diff to: previous 1.838: preferred, colored
Changes since revision 1.838: +5 -8 lines
ddb/db_active.h: New home for extern db_active.

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

Revision 1.838: download - view: text, markup, annotated - select for diffs
Wed Oct 26 23:23:52 2022 UTC (2 years ago) by riastradh
Branches: MAIN
Diff to: previous 1.837: preferred, colored
Changes since revision 1.837: +3 -4 lines
sys: Put externs for time_adjtime and time_adjusted in .h files.

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

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

Revision 1.837: download - view: text, markup, annotated - select for diffs
Sat Aug 20 23:48:50 2022 UTC (2 years, 2 months ago) by riastradh
Branches: MAIN
CVS tags: bouyer-sunxi-drm-base, bouyer-sunxi-drm
Diff to: previous 1.836: preferred, colored
Changes since revision 1.836: +3 -2 lines
x86: Split most of pmap.h into pmap_private.h or vmparam.h.

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

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

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

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

3. more CPU-specific inlines for pmap_pte_* operations

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

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

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

VM_MAXUSER_ADDRESS
VM_MAX_ADDRESS
VM_MAX_KERNEL_ADDRESS
VM_MIN_KERNEL_ADDRESS

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

Revision 1.836: download - view: text, markup, annotated - select for diffs
Sat Aug 20 23:15:36 2022 UTC (2 years, 2 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.835: preferred, colored
Changes since revision 1.835: +3 -2 lines
x86: Split bootspace out of x86/pmap.h into new x86/bootspace.h.

Revision 1.835: download - view: text, markup, annotated - select for diffs
Tue May 31 18:04:11 2022 UTC (2 years, 5 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.834: preferred, colored
Changes since revision 1.834: +4 -2 lines
For some reason on my system, the guest starts with a pending event in
the shared structure. On i386, this cause hypervisor_callback to be
entered before cpu_info_primary is fully initialised, especially on i386
ci_intrstack is still NULL, which cause a crash when we try to use it.
Work around by recycling the boot's tmp stack for this until cpu_attach()
is called.

Revision 1.834: download - view: text, markup, annotated - select for diffs
Sun Dec 26 21:33:48 2021 UTC (2 years, 10 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.833: preferred, colored
Changes since revision 1.833: +11 -4 lines
sys: Skip suspendsched on cpu_reboot if we're in ddb.

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

Revision 1.833: download - view: text, markup, annotated - select for diffs
Thu Oct 28 10:46:05 2021 UTC (3 years ago) by riastradh
Branches: MAIN
Diff to: previous 1.832: preferred, colored
Changes since revision 1.832: +11 -4 lines
x86: Move RNG initialization to after consinit.

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

Revision 1.832: download - view: text, markup, annotated - select for diffs
Thu Oct 28 10:45:48 2021 UTC (3 years ago) by riastradh
Branches: MAIN
Diff to: previous 1.831: preferred, colored
Changes since revision 1.831: +3 -2 lines
x86: Process bootloader rndseed much sooner.

Revision 1.831: download - view: text, markup, annotated - select for diffs
Tue Jul 14 00:45:52 2020 UTC (4 years, 3 months ago) by yamaguchi
Branches: MAIN
CVS tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-futex, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Diff to: previous 1.830: preferred, colored
Changes since revision 1.830: +69 -9 lines
Introduce per-cpu IDTs

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

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

Revision 1.830: download - view: text, markup, annotated - select for diffs
Fri May 8 00:52:29 2020 UTC (4 years, 5 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.829: preferred, colored
Changes since revision 1.829: +3 -3 lines
Move cpu_rng_init a little later, just after cpu_init_msrs, on x86.

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

Revision 1.829: download - view: text, markup, annotated - select for diffs
Sat May 2 16:44:35 2020 UTC (4 years, 6 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.828: preferred, colored
Changes since revision 1.828: +22 -6 lines
Introduce Xen PVH support in GENERIC.
This is compiled in with
options XENPVHVM
x86 changes:
- add Xen section and xen pvh entry points to locore.S. Set vm_guest
  to VM_GUEST_XENPVH in this entry point.
  Most of the boot procedure (especially page table setup and switch to
  paged mode) is shared with native.
- change some x86_delay() to delay_func(), which points to x86_delay() for
  native/HVM, and xen_delay() for PVH

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

Revision 1.828: download - view: text, markup, annotated - select for diffs
Thu Apr 30 03:29:19 2020 UTC (4 years, 6 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.827: preferred, colored
Changes since revision 1.827: +4 -2 lines
Simplify Intel RDRAND/RDSEED and VIA C3 RNG API.

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

Revision 1.827: download - view: text, markup, annotated - select for diffs
Sat Apr 25 15:26:17 2020 UTC (4 years, 6 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.826: preferred, colored
Changes since revision 1.826: +10 -23 lines
Merge the bouyer-xenpvh branch, bringing in Xen PV drivers support under HVM
guests in GENERIC.
Xen support can be disabled at runtime with
boot -c
disable hypervisor

Revision 1.825.4.4: download - view: text, markup, annotated - select for diffs
Sat Apr 25 11:23:56 2020 UTC (4 years, 6 months ago) by bouyer
Branches: bouyer-xenpvh
Diff to: previous 1.825.4.3: preferred, colored; branchpoint 1.825: preferred, colored; next MAIN 1.826: preferred, colored
Changes since revision 1.825.4.3: +5 -6 lines
Sync with bouyer-xenpvh-base2 (HEAD)

Revision 1.826: download - view: text, markup, annotated - select for diffs
Tue Apr 21 20:13:39 2020 UTC (4 years, 6 months ago) by jdolecek
Branches: MAIN
CVS tags: bouyer-xenpvh-base2
Diff to: previous 1.825: preferred, colored
Changes since revision 1.825: +5 -6 lines
convert to newer HYPERVISOR_physdev_op() interface, now command and the
arg are separate arguments - this is needed for newer physdev_op commands

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

confirmed working on amd64 Dom0, i386 compile-tested only

Revision 1.825.4.3: download - view: text, markup, annotated - select for diffs
Sat Apr 18 14:47:55 2020 UTC (4 years, 6 months ago) by bouyer
Branches: bouyer-xenpvh
Diff to: previous 1.825.4.2: preferred, colored; branchpoint 1.825: preferred, colored
Changes since revision 1.825.4.2: +2 -17 lines
Centralize initialisations of delay_func and initclock_func
in x86_machdep.c and export from <x86/machdep.h>
Introduce a x86_dummy_initclock() and a x86_cpu_initclock_func pointer,
to be used later for Xen HVM native clock support.
rename rtclock_tval to x86_rtclock_tval and export from <x86/machdep.h>,
for the benefit of lapic.c

Revision 1.825.4.2: download - view: text, markup, annotated - select for diffs
Thu Apr 16 08:46:34 2020 UTC (4 years, 6 months ago) by bouyer
Branches: bouyer-xenpvh
Diff to: previous 1.825.4.1: preferred, colored; branchpoint 1.825: preferred, colored
Changes since revision 1.825.4.1: +4 -4 lines
Reorganise sources to make it possible to include Xen PVHVM support in
native kernels. Among others:
- move xen/include/amd64/hypercall.h to amd64/include/xen and
  xen/include/i386/hypercall.h to i386/include/xen
- exclude some native files from the build for xenpv
- add xen to "machine" config statement for amd64 and i386
- split arch/xen/conf/files.xen to arch/xen/conf/files.xen (for pv drivers)
  and arch/xen/conf/files.xen.pv (for full pv support)
- add GENERIC_XENHVM kernel config which includes GENERIC and add Xen PV
  drivers.

Revision 1.806.2.3: download - view: text, markup, annotated - select for diffs
Mon Apr 13 08:03:52 2020 UTC (4 years, 6 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.806.2.2: preferred, colored; branchpoint 1.806: preferred, colored; next MAIN 1.807: preferred, colored
Changes since revision 1.806.2.2: +17 -16 lines
Mostly merge changes from HEAD upto 20200411

Revision 1.825.4.1: download - view: text, markup, annotated - select for diffs
Thu Apr 9 16:12:50 2020 UTC (4 years, 6 months ago) by bouyer
Branches: bouyer-xenpvh
Diff to: previous 1.825: preferred, colored
Changes since revision 1.825: +8 -6 lines
For RB_POWERDONW, call HYPERVISOR_shutdown() in all cases where the
hypercall page is available. A PVHHVM domU now properly exits on
halt -p

Revision 1.806.2.2: download - view: text, markup, annotated - select for diffs
Wed Apr 8 14:07:40 2020 UTC (4 years, 6 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.806.2.1: preferred, colored; branchpoint 1.806: preferred, colored
Changes since revision 1.806.2.1: +4 -4 lines
Merge changes from current as of 20200406

Revision 1.824.2.1: download - view: text, markup, annotated - select for diffs
Sat Feb 29 20:18:25 2020 UTC (4 years, 8 months ago) by ad
Branches: ad-namecache
Diff to: previous 1.824: preferred, colored; next MAIN 1.825: preferred, colored
Changes since revision 1.824: +3 -3 lines
Sync with head.

Revision 1.825: download - view: text, markup, annotated - select for diffs
Fri Jan 31 08:21:11 2020 UTC (4 years, 9 months ago) by maxv
Branches: MAIN
CVS tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp, bouyer-xenpvh-base1, bouyer-xenpvh-base, ad-namecache-base3
Branch point for: bouyer-xenpvh
Diff to: previous 1.824: preferred, colored
Changes since revision 1.824: +3 -3 lines
constify

Revision 1.824: download - view: text, markup, annotated - select for diffs
Tue Dec 10 18:04:54 2019 UTC (4 years, 10 months ago) by ad
Branches: MAIN
CVS tags: ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Diff to: previous 1.823: preferred, colored
Changes since revision 1.823: +3 -3 lines
pg->phys_addr -> VM_PAGE_TO_PHYS(pg)

Revision 1.823: download - view: text, markup, annotated - select for diffs
Fri Oct 18 01:38:28 2019 UTC (5 years ago) by manu
Branches: MAIN
CVS tags: phil-wifi-20191119
Diff to: previous 1.822: preferred, colored
Changes since revision 1.822: +8 -4 lines
Multiboot2 kernel support for i386

That implementation works either with BIOS or UEFI bootstrap

This requires the following kernel changes:

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

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

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

And the following bootstrap changes:

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

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

Revision 1.822: download - view: text, markup, annotated - select for diffs
Fri Oct 18 01:00:24 2019 UTC (5 years ago) by manu
Branches: MAIN
Diff to: previous 1.821: preferred, colored
Changes since revision 1.821: +12 -5 lines
Make sure no bioscall is issued when booting off UEFI system

Revision 1.821: download - view: text, markup, annotated - select for diffs
Sat Oct 12 06:31:03 2019 UTC (5 years ago) by maxv
Branches: MAIN
Diff to: previous 1.820: preferred, colored
Changes since revision 1.820: +3 -13 lines
Rewrite the FPU code on x86. This greatly simplifies the logic and removes
the dependency on IPL_HIGH. NVMM is updated accordingly. Posted on
port-amd64 a week ago.

Bump the kernel version to 9.99.16.

Revision 1.806.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 10 22:06:20 2019 UTC (5 years, 4 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.806: preferred, colored
Changes since revision 1.806: +81 -113 lines
Sync with HEAD

Revision 1.820: download - view: text, markup, annotated - select for diffs
Sun May 19 08:46:15 2019 UTC (5 years, 5 months ago) by maxv
Branches: MAIN
CVS tags: phil-wifi-20190609, netbsd-9-base, netbsd-9-4-RELEASE, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9
Diff to: previous 1.819: preferred, colored
Changes since revision 1.819: +4 -4 lines
Rename

	fpu_save_area_clear -> fpu_clear
	fpu_save_area_reset -> fpu_sigreset

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

Revision 1.819: download - view: text, markup, annotated - select for diffs
Sun May 19 08:17:02 2019 UTC (5 years, 5 months ago) by maxv
Branches: MAIN
Diff to: previous 1.818: preferred, colored
Changes since revision 1.818: +7 -8 lines
Misc changes in the x86 FPU code. Reduces a future diff. No real functional
change.

Revision 1.818: download - view: text, markup, annotated - select for diffs
Sat Mar 9 08:42:25 2019 UTC (5 years, 7 months ago) by maxv
Branches: MAIN
CVS tags: isaki-audio2-base, isaki-audio2
Diff to: previous 1.817: preferred, colored
Changes since revision 1.817: +4 -4 lines
Start replacing the x86 PTE bits.

Revision 1.817: download - view: text, markup, annotated - select for diffs
Thu Mar 7 13:26:24 2019 UTC (5 years, 7 months ago) by maxv
Branches: MAIN
Diff to: previous 1.816: preferred, colored
Changes since revision 1.816: +3 -3 lines
Drop PG_RO, PG_KR and PG_PROT, they are useless and create confusion.

Revision 1.816: download - view: text, markup, annotated - select for diffs
Thu Feb 14 08:18:25 2019 UTC (5 years, 8 months ago) by cherry
Branches: MAIN
Diff to: previous 1.815: preferred, colored
Changes since revision 1.815: +4 -4 lines
Welcome XENPVHVM mode.

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

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

Revision 1.815: download - view: text, markup, annotated - select for diffs
Mon Feb 11 14:59:32 2019 UTC (5 years, 8 months ago) by cherry
Branches: MAIN
Diff to: previous 1.814: preferred, colored
Changes since revision 1.814: +46 -46 lines
We reorganise definitions for XEN source support as follows:

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

Revision 1.752.8.3: download - view: text, markup, annotated - select for diffs
Wed Jan 30 13:32:57 2019 UTC (5 years, 9 months ago) by martin
Branches: netbsd-7-0
Diff to: previous 1.752.8.2: preferred, colored; branchpoint 1.752: preferred, colored; next MAIN 1.753: preferred, colored
Changes since revision 1.752.8.2: +3 -3 lines
Pull up following revision(s) (requested by maxv in ticket #1677):

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

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

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

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

Revision 1.752.12.3: download - view: text, markup, annotated - select for diffs
Wed Jan 30 13:29:51 2019 UTC (5 years, 9 months ago) by martin
Branches: netbsd-7-1
Diff to: previous 1.752.12.2: preferred, colored; branchpoint 1.752: preferred, colored; next MAIN 1.753: preferred, colored
Changes since revision 1.752.12.2: +3 -3 lines
Pull up following revision(s) (requested by maxv in ticket #1677):

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

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

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

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

Revision 1.752.4.3: download - view: text, markup, annotated - select for diffs
Wed Jan 30 13:27:27 2019 UTC (5 years, 9 months ago) by martin
Branches: netbsd-7
Diff to: previous 1.752.4.2: preferred, colored; branchpoint 1.752: preferred, colored; next MAIN 1.753: preferred, colored
Changes since revision 1.752.4.2: +3 -3 lines
Pull up following revision(s) (requested by maxv in ticket #1677):

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

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

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

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

Revision 1.782.6.7: download - view: text, markup, annotated - select for diffs
Sun Jan 27 18:43:08 2019 UTC (5 years, 9 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1
Diff to: previous 1.782.6.6: preferred, colored; branchpoint 1.782: preferred, colored; next MAIN 1.783: preferred, colored
Changes since revision 1.782.6.6: +3 -3 lines
Pull up following revision(s) (requested by maxv in ticket #1173):
	sys/arch/hppa/hppa/sig_machdep.c: revision 1.26
	sys/arch/arm/arm/sig_machdep.c: revision 1.51
	sys/arch/i386/i386/machdep.c: revision 1.813
	sys/arch/alpha/alpha/machdep.c: revision 1.352
	sys/arch/m68k/m68k/sig_machdep.c: revision 1.50
	sys/arch/usermode/target/i386/cpu_i386.c: revision 1.8
	sys/arch/sparc64/sparc64/machdep.c: revision 1.289
	sys/arch/sparc64/sparc64/netbsd32_machdep.c: revision 1.111
	sys/arch/powerpc/powerpc/sig_machdep.c: revision 1.46
	sys/arch/amd64/amd64/netbsd32_machdep.c: revision 1.117
	sys/arch/sh3/sh3/sh3_machdep.c: revision 1.106
	sys/arch/mips/mips/netbsd32_machdep.c: revision 1.16
	sys/arch/mips/mips/sig_machdep.c: revision 1.24
	sys/arch/riscv/riscv/sig_machdep.c: revision 1.2
	sys/arch/usermode/target/x86_64/cpu_x86_64.c: revision 1.7
	sys/arch/vax/vax/sig_machdep.c: revision 1.23

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

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

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

Revision 1.803.2.6: download - view: text, markup, annotated - select for diffs
Wed Dec 26 14:01:38 2018 UTC (5 years, 10 months ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.803.2.5: preferred, colored; branchpoint 1.803: preferred, colored; next MAIN 1.804: preferred, colored
Changes since revision 1.803.2.5: +3 -4 lines
Sync with HEAD, resolve a few conflicts

Revision 1.814: download - view: text, markup, annotated - select for diffs
Mon Dec 10 15:08:23 2018 UTC (5 years, 10 months ago) by maxv
Branches: MAIN
CVS tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226
Diff to: previous 1.813: preferred, colored
Changes since revision 1.813: +2 -3 lines
Remove unused mbuf.h includes.

Revision 1.813: download - view: text, markup, annotated - select for diffs
Tue Nov 27 14:09:53 2018 UTC (5 years, 11 months ago) by maxv
Branches: MAIN
Diff to: previous 1.812: preferred, colored
Changes since revision 1.812: +3 -3 lines
Fix widespread leak in the sendsig_siginfo() functions. sigframe_siginfo
has padding, so zero it out properly. While here I'm also zeroing out some
other things in several ports, for safety. Same problem in netbsd32, so
fix that too.

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

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

Revision 1.803.2.5: download - view: text, markup, annotated - select for diffs
Sat Oct 20 06:58:28 2018 UTC (6 years ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.803.2.4: preferred, colored; branchpoint 1.803: preferred, colored
Changes since revision 1.803.2.4: +3 -3 lines
Sync with head

Revision 1.812: download - view: text, markup, annotated - select for diffs
Thu Oct 18 04:22:22 2018 UTC (6 years ago) by cherry
Branches: MAIN
CVS tags: pgoyette-compat-1126, pgoyette-compat-1020
Diff to: previous 1.811: preferred, colored
Changes since revision 1.811: +3 -3 lines
Use memory allocated for the ldt, not the idt.

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

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

Revision 1.803.2.4: download - view: text, markup, annotated - select for diffs
Sun Sep 30 01:45:44 2018 UTC (6 years, 1 month ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.803.2.3: preferred, colored; branchpoint 1.803: preferred, colored
Changes since revision 1.803.2.3: +30 -52 lines
Ssync with HEAD

Revision 1.811: download - view: text, markup, annotated - select for diffs
Sat Sep 29 07:00:20 2018 UTC (6 years, 1 month ago) by cherry
Branches: MAIN
CVS tags: pgoyette-compat-0930
Diff to: previous 1.810: preferred, colored
Changes since revision 1.810: +4 -4 lines
Fix "use before init" of *idt.
This should fix boot time pagefaulting and panic(9)
on XEN kernels due to the boottime idt API reorg.

Revision 1.810: download - view: text, markup, annotated - select for diffs
Sun Sep 23 15:28:48 2018 UTC (6 years, 1 month ago) by cherry
Branches: MAIN
Diff to: previous 1.809: preferred, colored
Changes since revision 1.809: +7 -6 lines
Fix for i386, functionality intended in:
http://mail-index.netbsd.org/source-changes/2018/09/23/msg099357.html

This should fix the build for both GENERIC and XEN3PAE_DOM0

This has not been boot tested on native or xen3pae

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

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

Revision 1.809: download - view: text, markup, annotated - select for diffs
Sun Sep 23 00:59:59 2018 UTC (6 years, 1 month ago) by cherry
Branches: MAIN
Diff to: previous 1.808: preferred, colored
Changes since revision 1.808: +27 -50 lines
Make XEN use the same api as native, for idt vector allocation
and registration.

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

There should be no functional change due to this commit.

Tested on amd64 native and XEN.

Revision 1.803.2.3: download - view: text, markup, annotated - select for diffs
Sat Jul 28 04:37:34 2018 UTC (6 years, 3 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.803.2.2: preferred, colored; branchpoint 1.803: preferred, colored
Changes since revision 1.803.2.2: +5 -13 lines
Sync with HEAD

Revision 1.808: download - view: text, markup, annotated - select for diffs
Thu Jul 26 09:29:08 2018 UTC (6 years, 3 months ago) by maxv
Branches: MAIN
CVS tags: pgoyette-compat-0906, pgoyette-compat-0728
Diff to: previous 1.807: preferred, colored
Changes since revision 1.807: +4 -8 lines
Rework dbregs, to switch the registers during context switches, and not on
each user->kernel transition via userret. Reloads of DR6/DR7 are expensive
on both native and xen.

Revision 1.807: download - view: text, markup, annotated - select for diffs
Sun Jul 22 15:02:51 2018 UTC (6 years, 3 months ago) by maxv
Branches: MAIN
Diff to: previous 1.806: preferred, colored
Changes since revision 1.806: +4 -8 lines
Clean up dbregs; remove useless comments, remove arguments from prototypes,
style, add KASSERT and move x86_dbregspl into dbregs.c. No real functional
change.

Revision 1.782.6.6: download - view: text, markup, annotated - select for diffs
Sat Jun 9 15:12:21 2018 UTC (6 years, 4 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-0-RELEASE, netbsd-8-0-RC2
Diff to: previous 1.782.6.5: preferred, colored; branchpoint 1.782: preferred, colored
Changes since revision 1.782.6.5: +5 -2 lines
Pullup the following revisions, requested by maxv in ticket #865:

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

Backport the hardware SpectreV2 and SpectreV4 mitigations.

Revision 1.803.2.2: download - view: text, markup, annotated - select for diffs
Sat Apr 7 04:12:13 2018 UTC (6 years, 6 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.803.2.1: preferred, colored; branchpoint 1.803: preferred, colored
Changes since revision 1.803.2.1: +7 -4 lines
Sync with HEAD.  77 conflicts resolved - all of them $NetBSD$

Revision 1.782.6.5: download - view: text, markup, annotated - select for diffs
Thu Apr 5 18:15:02 2018 UTC (6 years, 7 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-0-RC1
Diff to: previous 1.782.6.4: preferred, colored; branchpoint 1.782: preferred, colored
Changes since revision 1.782.6.4: +4 -4 lines
Pull up following revision(s) (requested by christos in ticket #696):

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

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

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

XXX: pullup-8.

Revision 1.806: download - view: text, markup, annotated - select for diffs
Thu Apr 5 08:43:07 2018 UTC (6 years, 7 months ago) by maxv
Branches: MAIN
CVS tags: phil-wifi-base, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407
Branch point for: phil-wifi
Diff to: previous 1.805: preferred, colored
Changes since revision 1.805: +5 -2 lines
Call cpu_speculation_init on i386 too. We don't have IBRS for i386, but
we do have the AMD DIS_IND method.

Revision 1.805: download - view: text, markup, annotated - select for diffs
Tue Apr 3 07:20:52 2018 UTC (6 years, 7 months ago) by christos
Branches: MAIN
Diff to: previous 1.804: preferred, colored
Changes since revision 1.804: +4 -4 lines
Rename the DDB IPI IDT vectors for consistency. ok maxv@

Revision 1.803.2.1: download - view: text, markup, annotated - select for diffs
Thu Mar 22 01:44:45 2018 UTC (6 years, 7 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.803: preferred, colored
Changes since revision 1.803: +2 -12 lines
Synch with HEAD, resolve conflicts

Revision 1.804: download - view: text, markup, annotated - select for diffs
Fri Mar 16 12:48:54 2018 UTC (6 years, 7 months ago) by maxv
Branches: MAIN
CVS tags: pgoyette-compat-0330, pgoyette-compat-0322
Diff to: previous 1.803: preferred, colored
Changes since revision 1.803: +2 -12 lines
Remove ipkdb from i386. Also remove unused references in amd64.

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

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

Revision 1.782.6.4: download - view: text, markup, annotated - select for diffs
Tue Mar 13 15:47:45 2018 UTC (6 years, 7 months ago) by martin
Branches: netbsd-8
Diff to: previous 1.782.6.3: preferred, colored; branchpoint 1.782: preferred, colored
Changes since revision 1.782.6.3: +25 -15 lines
Pullup the following revisions via patch, requested by maxv in ticket #629:

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

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

Revision 1.782.6.3: download - view: text, markup, annotated - select for diffs
Thu Mar 8 11:33:15 2018 UTC (6 years, 7 months ago) by martin
Branches: netbsd-8
Diff to: previous 1.782.6.2: preferred, colored; branchpoint 1.782: preferred, colored
Changes since revision 1.782.6.2: +74 -4 lines
Pull up following revision(s) (requested by maxv in ticket #611):
	sys/arch/x86/x86/cpu.c: revision 1.134 (patch)
	sys/arch/x86/include/cpu.h: revision 1.78 (patch)
	sys/arch/i386/i386/machdep.c: revision 1.792 (patch)

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

Revision 1.717.2.7.4.2: download - view: text, markup, annotated - select for diffs
Mon Feb 19 20:55:44 2018 UTC (6 years, 8 months ago) by snj
Branches: netbsd-6-0
Diff to: previous 1.717.2.7.4.1: preferred, colored; branchpoint 1.717.2.7: preferred, colored; next MAIN 1.717.2.8: preferred, colored
Changes since revision 1.717.2.7.4.1: +3 -3 lines
Pull up following revision(s) (requested by maxv in ticket #1517):
	sys/arch/amd64/amd64/machdep.c: 1.280 via patch
	sys/arch/amd64/include/segments.h: 1.34 via patch
	sys/arch/i386/i386/machdep.c: 1.800
	sys/arch/i386/include/segments.h: 1.64
	sys/arch/x86/x86/vm_machdep.c: 1.30
Fix a huge privilege separation vulnerability in Xen-amd64.
On amd64 the kernel runs in ring3, like userland, and therefore SEL_KPL
equals SEL_UPL. While Xen can make a distinction between usermode and
kernelmode in %cs, it can't when it comes to iopl. Since we set SEL_KPL
in iopl, Xen sees SEL_UPL, and allows (unprivileged) userland processes
to read and write to the CPU ports.
It is easy, then, to completely escalate privileges; by reprogramming the
PIC, by reading the ATA disks, by intercepting the keyboard interrupts
(keylogger), etc.
Declare IOPL_KPL, set to 1 on Xen-amd64, which allows the kernel to use
the ports but not userland. I didn't test this change on i386, but it
seems fine enough.

Revision 1.717.2.7.6.2: download - view: text, markup, annotated - select for diffs
Mon Feb 19 20:54:53 2018 UTC (6 years, 8 months ago) by snj
Branches: netbsd-6-1
Diff to: previous 1.717.2.7.6.1: preferred, colored; branchpoint 1.717.2.7: preferred, colored; next MAIN 1.717.2.8: preferred, colored
Changes since revision 1.717.2.7.6.1: +3 -3 lines
Pull up following revision(s) (requested by maxv in ticket #1517):
	sys/arch/amd64/amd64/machdep.c: 1.280 via patch
	sys/arch/amd64/include/segments.h: 1.34 via patch
	sys/arch/i386/i386/machdep.c: 1.800
	sys/arch/i386/include/segments.h: 1.64
	sys/arch/x86/x86/vm_machdep.c: 1.30
Fix a huge privilege separation vulnerability in Xen-amd64.
On amd64 the kernel runs in ring3, like userland, and therefore SEL_KPL
equals SEL_UPL. While Xen can make a distinction between usermode and
kernelmode in %cs, it can't when it comes to iopl. Since we set SEL_KPL
in iopl, Xen sees SEL_UPL, and allows (unprivileged) userland processes
to read and write to the CPU ports.
It is easy, then, to completely escalate privileges; by reprogramming the
PIC, by reading the ATA disks, by intercepting the keyboard interrupts
(keylogger), etc.
Declare IOPL_KPL, set to 1 on Xen-amd64, which allows the kernel to use
the ports but not userland. I didn't test this change on i386, but it
seems fine enough.

Revision 1.717.2.9: download - view: text, markup, annotated - select for diffs
Mon Feb 19 20:54:38 2018 UTC (6 years, 8 months ago) by snj
Branches: netbsd-6
Diff to: previous 1.717.2.8: preferred, colored; branchpoint 1.717: preferred, colored; next MAIN 1.718: preferred, colored
Changes since revision 1.717.2.8: +3 -3 lines
Pull up following revision(s) (requested by maxv in ticket #1517):
	sys/arch/amd64/amd64/machdep.c: 1.280 via patch
	sys/arch/amd64/include/segments.h: 1.34 via patch
	sys/arch/i386/i386/machdep.c: 1.800
	sys/arch/i386/include/segments.h: 1.64
	sys/arch/x86/x86/vm_machdep.c: 1.30
Fix a huge privilege separation vulnerability in Xen-amd64.
On amd64 the kernel runs in ring3, like userland, and therefore SEL_KPL
equals SEL_UPL. While Xen can make a distinction between usermode and
kernelmode in %cs, it can't when it comes to iopl. Since we set SEL_KPL
in iopl, Xen sees SEL_UPL, and allows (unprivileged) userland processes
to read and write to the CPU ports.
It is easy, then, to completely escalate privileges; by reprogramming the
PIC, by reading the ATA disks, by intercepting the keyboard interrupts
(keylogger), etc.
Declare IOPL_KPL, set to 1 on Xen-amd64, which allows the kernel to use
the ports but not userland. I didn't test this change on i386, but it
seems fine enough.

Revision 1.752.4.2: download - view: text, markup, annotated - select for diffs
Mon Jan 22 19:41:08 2018 UTC (6 years, 9 months ago) by snj
Branches: netbsd-7
CVS tags: netbsd-7-2-RELEASE
Diff to: previous 1.752.4.1: preferred, colored; branchpoint 1.752: preferred, colored
Changes since revision 1.752.4.1: +3 -3 lines
Pull up following revision(s) (requested by maxv in ticket #1550):
	sys/arch/amd64/amd64/machdep.c: revision 1.280 via patch
	sys/arch/amd64/include/segments.h: revision 1.34 via patch
	sys/arch/i386/i386/machdep.c: revision 1.800 via patch
	sys/arch/i386/include/segments.h: revision 1.64 via patch
	sys/arch/x86/x86/vm_machdep.c: revision 1.30 via patch
Fix a huge privilege separation vulnerability in Xen-amd64.
On amd64 the kernel runs in ring3, like userland, and therefore SEL_KPL
equals SEL_UPL. While Xen can make a distinction between usermode and
kernelmode in %cs, it can't when it comes to iopl. Since we set SEL_KPL
in iopl, Xen sees SEL_UPL, and allows (unprivileged) userland processes
to read and write to the CPU ports.
It is easy, then, to completely escalate privileges; by reprogramming the
PIC, by reading the ATA disks, by intercepting the keyboard interrupts
(keylogger), etc.
Declare IOPL_KPL, set to 1 on Xen-amd64, which allows the kernel to use
the ports but not userland. I didn't test this change on i386, but it
seems fine enough.

Revision 1.752.12.2: download - view: text, markup, annotated - select for diffs
Mon Jan 22 19:40:58 2018 UTC (6 years, 9 months ago) by snj
Branches: netbsd-7-1
CVS tags: netbsd-7-1-2-RELEASE
Diff to: previous 1.752.12.1: preferred, colored; branchpoint 1.752: preferred, colored
Changes since revision 1.752.12.1: +3 -3 lines
Pull up following revision(s) (requested by maxv in ticket #1550):
	sys/arch/amd64/amd64/machdep.c: revision 1.280 via patch
	sys/arch/amd64/include/segments.h: revision 1.34 via patch
	sys/arch/i386/i386/machdep.c: revision 1.800 via patch
	sys/arch/i386/include/segments.h: revision 1.64 via patch
	sys/arch/x86/x86/vm_machdep.c: revision 1.30 via patch
Fix a huge privilege separation vulnerability in Xen-amd64.
On amd64 the kernel runs in ring3, like userland, and therefore SEL_KPL
equals SEL_UPL. While Xen can make a distinction between usermode and
kernelmode in %cs, it can't when it comes to iopl. Since we set SEL_KPL
in iopl, Xen sees SEL_UPL, and allows (unprivileged) userland processes
to read and write to the CPU ports.
It is easy, then, to completely escalate privileges; by reprogramming the
PIC, by reading the ATA disks, by intercepting the keyboard interrupts
(keylogger), etc.
Declare IOPL_KPL, set to 1 on Xen-amd64, which allows the kernel to use
the ports but not userland. I didn't test this change on i386, but it
seems fine enough.

Revision 1.752.8.2: download - view: text, markup, annotated - select for diffs
Mon Jan 22 19:40:25 2018 UTC (6 years, 9 months ago) by snj
Branches: netbsd-7-0
Diff to: previous 1.752.8.1: preferred, colored; branchpoint 1.752: preferred, colored
Changes since revision 1.752.8.1: +3 -3 lines
Pull up following revision(s) (requested by maxv in ticket #1550):
	sys/arch/amd64/amd64/machdep.c: revision 1.280 via patch
	sys/arch/amd64/include/segments.h: revision 1.34 via patch
	sys/arch/i386/i386/machdep.c: revision 1.800 via patch
	sys/arch/i386/include/segments.h: revision 1.64 via patch
	sys/arch/x86/x86/vm_machdep.c: revision 1.30 via patch
Fix a huge privilege separation vulnerability in Xen-amd64.
On amd64 the kernel runs in ring3, like userland, and therefore SEL_KPL
equals SEL_UPL. While Xen can make a distinction between usermode and
kernelmode in %cs, it can't when it comes to iopl. Since we set SEL_KPL
in iopl, Xen sees SEL_UPL, and allows (unprivileged) userland processes
to read and write to the CPU ports.
It is easy, then, to completely escalate privileges; by reprogramming the
PIC, by reading the ATA disks, by intercepting the keyboard interrupts
(keylogger), etc.
Declare IOPL_KPL, set to 1 on Xen-amd64, which allows the kernel to use
the ports but not userland. I didn't test this change on i386, but it
seems fine enough.

Revision 1.803: download - view: text, markup, annotated - select for diffs
Sat Jan 13 14:12:57 2018 UTC (6 years, 9 months ago) by bouyer
Branches: MAIN
CVS tags: pgoyette-compat-base, pgoyette-compat-0315
Branch point for: pgoyette-compat
Diff to: previous 1.802: preferred, colored
Changes since revision 1.802: +8 -4 lines
Xen now needs cpu_init_tss() too. Makes XEN3PAE_DOMU boot again.

Revision 1.802: download - view: text, markup, annotated - select for diffs
Thu Jan 4 13:36:30 2018 UTC (6 years, 10 months ago) by maxv
Branches: MAIN
Diff to: previous 1.801: preferred, colored
Changes since revision 1.801: +17 -12 lines
Allocate the TSS area dynamically. This way cpu_info and cpu_tss can be
put in separate pages.

Revision 1.801: download - view: text, markup, annotated - select for diffs
Thu Jan 4 12:34:15 2018 UTC (6 years, 10 months ago) by maxv
Branches: MAIN
Diff to: previous 1.800: preferred, colored
Changes since revision 1.800: +7 -7 lines
Group the different TSSes into a cpu_tss structure. And pack this
structure to make sure there is no padding between 'tss' and 'iomap'.

Revision 1.782.6.2: download - view: text, markup, annotated - select for diffs
Mon Jan 1 19:09:03 2018 UTC (6 years, 10 months ago) by snj
Branches: netbsd-8
Diff to: previous 1.782.6.1: preferred, colored; branchpoint 1.782: preferred, colored
Changes since revision 1.782.6.1: +3 -3 lines
Pull up following revision(s) (requested by maxv in ticket #477):
	sys/arch/amd64/amd64/machdep.c: revision 1.280
	sys/arch/amd64/include/segments.h: revision 1.34
	sys/arch/i386/i386/machdep.c: revision 1.800
	sys/arch/i386/include/segments.h: revision 1.64 via patch
	sys/arch/x86/x86/vm_machdep.c: revision 1.30
Fix a huge privilege separation vulnerability in Xen-amd64.
On amd64 the kernel runs in ring3, like userland, and therefore SEL_KPL
equals SEL_UPL. While Xen can make a distinction between usermode and
kernelmode in %cs, it can't when it comes to iopl. Since we set SEL_KPL
in iopl, Xen sees SEL_UPL, and allows (unprivileged) userland processes
to read and write to the CPU ports.
It is easy, then, to completely escalate privileges; by reprogramming the
PIC, by reading the ATA disks, by intercepting the keyboard interrupts
(keylogger), etc.
Declare IOPL_KPL, set to 1 on Xen-amd64, which allows the kernel to use
the ports but not userland. I didn't test this change on i386, but it
seems fine enough.

Revision 1.800: download - view: text, markup, annotated - select for diffs
Sun Dec 31 08:29:38 2017 UTC (6 years, 10 months ago) by maxv
Branches: MAIN
Diff to: previous 1.799: preferred, colored
Changes since revision 1.799: +3 -3 lines
Fix a huge privilege separation vulnerability in Xen-amd64.

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

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

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

Revision 1.730.2.4: download - view: text, markup, annotated - select for diffs
Sun Dec 3 11:36:17 2017 UTC (6 years, 11 months ago) by jdolecek
Branches: tls-maxphys
Diff to: previous 1.730.2.3: preferred, colored; next MAIN 1.731: preferred, colored
Changes since revision 1.730.2.3: +306 -346 lines
update from HEAD

Revision 1.799: download - view: text, markup, annotated - select for diffs
Sat Nov 11 12:51:06 2017 UTC (6 years, 11 months ago) by maxv
Branches: MAIN
CVS tags: tls-maxphys-base-20171202
Diff to: previous 1.798: preferred, colored
Changes since revision 1.798: +20 -13 lines
Modify the layout of the bootspace structure, in such a way that it can
contain several kernel segments of the same type (eg several .text
segments). Some parts are still a bit messy but will be cleaned up soon.

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

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

Revision 1.798: download - view: text, markup, annotated - select for diffs
Sat Nov 4 08:50:47 2017 UTC (7 years ago) by cherry
Branches: MAIN
Diff to: previous 1.797: preferred, colored
Changes since revision 1.797: +4 -2 lines
In XEN PV, the idt vector table is not required to be altered at
runtime, since only entries for exceptions/traps are registered with
the hypervisor and interrupts are managed via a completely different
mechanism.

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

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

There are no functional changes in this commit.

Revision 1.797: download - view: text, markup, annotated - select for diffs
Sun Oct 29 10:01:21 2017 UTC (7 years ago) by maxv
Branches: MAIN
Diff to: previous 1.796: preferred, colored
Changes since revision 1.796: +4 -0 lines
Add a fifth region, called "head". On kaslr kernels it contains the ELF
Header and the ELF Section Headers. On normal kernels it is empty (the
headers are in the "boot" region).

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

Revision 1.796: download - view: text, markup, annotated - select for diffs
Mon Oct 9 17:49:27 2017 UTC (7 years ago) by maya
Branches: MAIN
Diff to: previous 1.795: preferred, colored
Changes since revision 1.795: +2 -3 lines
GC i386_fpu_present. no FPU x86 is not supported.

Also delete newly unused send_sigill

Revision 1.795: download - view: text, markup, annotated - select for diffs
Sat Sep 30 11:43:57 2017 UTC (7 years, 1 month ago) by maxv
Branches: MAIN
Diff to: previous 1.794: preferred, colored
Changes since revision 1.794: +50 -51 lines
Add a bootspace structure. It describes the physical and virtual space
layout created by the early kernel bootstrap code. Start using it, and
eliminate several references to KERNBASE and other global symbols. While
here clean up xen-i386, it's really tiring.

Revision 1.794: download - view: text, markup, annotated - select for diffs
Sun Sep 17 09:41:35 2017 UTC (7 years, 1 month ago) by maxv
Branches: MAIN
Diff to: previous 1.793: preferred, colored
Changes since revision 1.793: +3 -3 lines
Remove the second argument from USERMODE and KERNELMODE, it is unused
now that we don't have vm86 anymore.

Revision 1.793: download - view: text, markup, annotated - select for diffs
Sun Sep 17 09:04:51 2017 UTC (7 years, 1 month ago) by maxv
Branches: MAIN
Diff to: previous 1.792: preferred, colored
Changes since revision 1.792: +2 -9 lines
Remove TRAPLOG from i386. Nowadays there are better instrumentation tools,
in both software and hardware.

Revision 1.752.6.7: download - view: text, markup, annotated - select for diffs
Mon Aug 28 17:51:40 2017 UTC (7 years, 2 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.752.6.6: preferred, colored; branchpoint 1.752: preferred, colored; next MAIN 1.753: preferred, colored
Changes since revision 1.752.6.6: +88 -139 lines
Sync with HEAD

Revision 1.792: download - view: text, markup, annotated - select for diffs
Sun Aug 27 09:32:12 2017 UTC (7 years, 2 months ago) by maxv
Branches: MAIN
Diff to: previous 1.791: preferred, colored
Changes since revision 1.791: +76 -4 lines
style, and move some i386-specific code into i386/

Revision 1.791: download - view: text, markup, annotated - select for diffs
Sat Aug 12 19:06:23 2017 UTC (7 years, 2 months ago) by kre
Branches: MAIN
CVS tags: nick-nhusb-base-20170825
Diff to: previous 1.790: preferred, colored
Changes since revision 1.790: +2 -3 lines

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

Revision 1.790: download - view: text, markup, annotated - select for diffs
Sat Aug 12 13:16:14 2017 UTC (7 years, 2 months ago) by maxv
Branches: MAIN
Diff to: previous 1.789: preferred, colored
Changes since revision 1.789: +2 -4 lines
Remove references to PSL_VM (implicitly vm86).

Revision 1.789: download - view: text, markup, annotated - select for diffs
Sat Aug 12 07:07:53 2017 UTC (7 years, 2 months ago) by maxv
Branches: MAIN
Diff to: previous 1.788: preferred, colored
Changes since revision 1.788: +20 -54 lines
Remove vm86. Simplifies a number of critical places.

Pass 2.

Revision 1.788: download - view: text, markup, annotated - select for diffs
Thu Aug 10 12:49:11 2017 UTC (7 years, 2 months ago) by maxv
Branches: MAIN
Diff to: previous 1.787: preferred, colored
Changes since revision 1.787: +2 -3 lines
Don't include opt_compat_ibcs2.h. No idea what it was doing in amd64,
since it never got implemented there.

Revision 1.717.2.8: download - view: text, markup, annotated - select for diffs
Tue Aug 8 12:00:35 2017 UTC (7 years, 2 months ago) by martin
Branches: netbsd-6
Diff to: previous 1.717.2.7: preferred, colored; branchpoint 1.717: preferred, colored
Changes since revision 1.717.2.7: +2 -7 lines
Pull up following revision(s) (requested by maxv in ticket #1464):

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

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

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

Revision 1.717.2.7.6.1: download - view: text, markup, annotated - select for diffs
Tue Aug 8 11:59:16 2017 UTC (7 years, 2 months ago) by martin
Branches: netbsd-6-1
Diff to: previous 1.717.2.7: preferred, colored
Changes since revision 1.717.2.7: +2 -7 lines
Pull up following revision(s) (requested by maxv in ticket #1464):

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

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

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

Revision 1.717.2.7.4.1: download - view: text, markup, annotated - select for diffs
Tue Aug 8 11:55:20 2017 UTC (7 years, 2 months ago) by martin
Branches: netbsd-6-0
Diff to: previous 1.717.2.7: preferred, colored
Changes since revision 1.717.2.7: +2 -7 lines
Pull up following revision(s) (requested by maxv in ticket #1464):

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

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

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

Revision 1.787: download - view: text, markup, annotated - select for diffs
Sat Jul 29 11:54:14 2017 UTC (7 years, 3 months ago) by maxv
Branches: MAIN
Diff to: previous 1.786: preferred, colored
Changes since revision 1.786: +2 -16 lines
Drop support for svr4 on i386. This feature is not maintained, not
reliable, and of a limited use case. Most svr4 applications got time to be
ported to linux, and we do have a functional, maintained linux emulation.

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

Note that compat_svr4 is still available on sparc.

Revision 1.786: download - view: text, markup, annotated - select for diffs
Sat Jul 29 06:29:32 2017 UTC (7 years, 3 months ago) by maxv
Branches: MAIN
Diff to: previous 1.785: preferred, colored
Changes since revision 1.785: +2 -10 lines
Remove the remaining parts of compat_oldboot.

Revision 1.785: download - view: text, markup, annotated - select for diffs
Sat Jul 22 09:01:46 2017 UTC (7 years, 3 months ago) by maxv
Branches: MAIN
Diff to: previous 1.784: preferred, colored
Changes since revision 1.784: +6 -5 lines
Call _proc0_tss_ldt_init only once, and rename them.

Revision 1.784: download - view: text, markup, annotated - select for diffs
Sat Jul 22 08:23:18 2017 UTC (7 years, 3 months ago) by maxv
Branches: MAIN
Diff to: previous 1.783: preferred, colored
Changes since revision 1.783: +5 -9 lines
Initialize these kpm fields in pmap_bootstrap.

Revision 1.752.4.1: download - view: text, markup, annotated - select for diffs
Thu Jul 20 01:43:40 2017 UTC (7 years, 3 months ago) by snj
Branches: netbsd-7
Diff to: previous 1.752: preferred, colored
Changes since revision 1.752: +2 -7 lines
Pull up following revision(s) (requested by maxv in ticket #1441):
	sys/arch/i386/i386/trap.c: revision 1.288 via patch
	sys/arch/i386/i386/machdep.c: revision 1.783 via patch
	sys/arch/i386/i386/locore.S: revision 1.146 via patch
	sys/arch/amd64/amd64/locore.S: revision 1.124 via patch
Remove the osyscall call gate on i386, and emulate it. There is a one-
instruction race in it that could panic the kernel.

Revision 1.752.12.1: download - view: text, markup, annotated - select for diffs
Thu Jul 20 01:43:10 2017 UTC (7 years, 3 months ago) by snj
Branches: netbsd-7-1
CVS tags: netbsd-7-1-1-RELEASE
Diff to: previous 1.752: preferred, colored
Changes since revision 1.752: +2 -7 lines
Pull up following revision(s) (requested by maxv in ticket #1441):
	sys/arch/i386/i386/trap.c: revision 1.288 via patch
	sys/arch/i386/i386/machdep.c: revision 1.783 via patch
	sys/arch/i386/i386/locore.S: revision 1.146 via patch
	sys/arch/amd64/amd64/locore.S: revision 1.124 via patch
Remove the osyscall call gate on i386, and emulate it. There is a one-
instruction race in it that could panic the kernel.

Revision 1.752.8.1: download - view: text, markup, annotated - select for diffs
Thu Jul 20 01:42:39 2017 UTC (7 years, 3 months ago) by snj
Branches: netbsd-7-0
Diff to: previous 1.752: preferred, colored
Changes since revision 1.752: +2 -7 lines
Pull up following revision(s) (requested by maxv in ticket #1441):
	sys/arch/i386/i386/trap.c: revision 1.288 via patch
	sys/arch/i386/i386/machdep.c: revision 1.783 via patch
	sys/arch/i386/i386/locore.S: revision 1.146 via patch
	sys/arch/amd64/amd64/locore.S: revision 1.124 via patch
Remove the osyscall call gate on i386, and emulate it. There is a one-
instruction race in it that could panic the kernel.

Revision 1.782.6.1: download - view: text, markup, annotated - select for diffs
Wed Jul 5 19:59:29 2017 UTC (7 years, 4 months ago) by snj
Branches: netbsd-8
CVS tags: matt-nb8-mediatek-base, matt-nb8-mediatek
Diff to: previous 1.782: preferred, colored
Changes since revision 1.782: +2 -8 lines
Pull up following revision(s) (requested by maxv in ticket #88):
	sys/arch/amd64/amd64/locore.S: revision 1.124
	sys/arch/i386/i386/locore.S: revision 1.146
	sys/arch/i386/i386/machdep.c: revision 1.783
	sys/arch/i386/i386/trap.c: revision 1.288
Remove the osyscall call gate on i386, and emulate it. There is a one-
instruction race in it that could panic the kernel.

Revision 1.783: download - view: text, markup, annotated - select for diffs
Sat Jul 1 10:44:42 2017 UTC (7 years, 4 months ago) by maxv
Branches: MAIN
CVS tags: perseant-stdc-iso10646-base, perseant-stdc-iso10646
Diff to: previous 1.782: preferred, colored
Changes since revision 1.782: +2 -8 lines
Remove the osyscall call gate on i386, and emulate it. There is a one-
instruction race in it that could panic the kernel.

Revision 1.758.2.5: download - view: text, markup, annotated - select for diffs
Wed Apr 26 02:53:03 2017 UTC (7 years, 6 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.758.2.4: preferred, colored; branchpoint 1.758: preferred, colored; next MAIN 1.759: preferred, colored
Changes since revision 1.758.2.4: +4 -7 lines
Sync with HEAD

Revision 1.776.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 21 16:53:28 2017 UTC (7 years, 6 months ago) by bouyer
Branches: bouyer-socketcan
Diff to: previous 1.776: preferred, colored; next MAIN 1.777: preferred, colored
Changes since revision 1.776: +66 -48 lines
Sync with HEAD

Revision 1.782: download - view: text, markup, annotated - select for diffs
Fri Mar 24 17:09:36 2017 UTC (7 years, 7 months ago) by maxv
Branches: MAIN
CVS tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, netbsd-8-base, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1
Branch point for: netbsd-8
Diff to: previous 1.781: preferred, colored
Changes since revision 1.781: +2 -5 lines
Don't compile PMCs on Xen.

Revision 1.781: download - view: text, markup, annotated - select for diffs
Thu Mar 23 18:08:06 2017 UTC (7 years, 7 months ago) by maxv
Branches: MAIN
Diff to: previous 1.780: preferred, colored
Changes since revision 1.780: +4 -4 lines
Remove PG_k completely.

Revision 1.758.2.4: download - view: text, markup, annotated - select for diffs
Mon Mar 20 06:57:14 2017 UTC (7 years, 7 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.758.2.3: preferred, colored; branchpoint 1.758: preferred, colored
Changes since revision 1.758.2.3: +70 -49 lines
Sync with HEAD

Revision 1.780: download - view: text, markup, annotated - select for diffs
Thu Feb 23 03:34:22 2017 UTC (7 years, 8 months ago) by kamil
Branches: MAIN
CVS tags: pgoyette-localcount-20170320
Diff to: previous 1.779: preferred, colored
Changes since revision 1.779: +19 -6 lines
Introduce PT_GETDBREGS and PT_SETDBREGS in ptrace(2) on i386 and amd64

This interface is modeled after FreeBSD API with the usage.

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

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

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

Further ideas:
 - restrict this interface with securelevel

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

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

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

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

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

 #ifdef HAVE_PT_GETDBREGS

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


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

GDB demo:
  (gdb) c
  Continuing.

  Watchpoint 2: traceme

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

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

Sponsored by <The NetBSD Foundation>

Revision 1.779: download - view: text, markup, annotated - select for diffs
Fri Feb 17 12:10:40 2017 UTC (7 years, 8 months ago) by maxv
Branches: MAIN
Diff to: previous 1.778: preferred, colored
Changes since revision 1.778: +5 -2 lines
Support PMCs on multi-processor systems. Still several things to fix, but
at least it works a little. Will be improved and moved into x86/ soon.

Revision 1.752.6.6: download - view: text, markup, annotated - select for diffs
Sun Feb 5 13:40:12 2017 UTC (7 years, 8 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.752.6.5: preferred, colored; branchpoint 1.752: preferred, colored
Changes since revision 1.752.6.5: +31 -83 lines
Sync with HEAD

Revision 1.778: download - view: text, markup, annotated - select for diffs
Sun Feb 5 10:42:21 2017 UTC (7 years, 8 months ago) by maxv
Branches: MAIN
Diff to: previous 1.777: preferred, colored
Changes since revision 1.777: +45 -40 lines
Rename ldt->ldtstore and gdt->gdtstore on i386. It reduces the diff with
amd64, and makes it easier to track down these variables on nxr - 'ldt'
and 'gdt' being common keywords.

Revision 1.777: download - view: text, markup, annotated - select for diffs
Sun Jan 22 20:17:10 2017 UTC (7 years, 9 months ago) by maxv
Branches: MAIN
CVS tags: nick-nhusb-base-20170204
Diff to: previous 1.776: preferred, colored
Changes since revision 1.776: +6 -6 lines
Use xpmap_pg_nx. Not tested (due to some unrelated panic I'm getting), but
obvious enough.

Revision 1.758.2.3: download - view: text, markup, annotated - select for diffs
Sat Jan 7 08:56:18 2017 UTC (7 years, 9 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.758.2.2: preferred, colored; branchpoint 1.758: preferred, colored
Changes since revision 1.758.2.2: +31 -81 lines
Sync with HEAD.  (Note that most of these changes are simply $NetBSD$
tag issues.)

Revision 1.776: download - view: text, markup, annotated - select for diffs
Mon Dec 26 17:54:06 2016 UTC (7 years, 10 months ago) by cherry
Branches: MAIN
CVS tags: pgoyette-localcount-20170107, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Diff to: previous 1.775: preferred, colored
Changes since revision 1.775: +3 -55 lines
the i386 and amd64 boot time msgbuf init code is nearly identical.

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

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

Revision 1.775: download - view: text, markup, annotated - select for diffs
Mon Dec 26 15:47:48 2016 UTC (7 years, 10 months ago) by cherry
Branches: MAIN
Diff to: previous 1.774: preferred, colored
Changes since revision 1.774: +37 -21 lines
Make the msgbuf initialisation track closer to the original
pre-uvm_physseg.h one.

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

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

Revision 1.774: download - view: text, markup, annotated - select for diffs
Fri Dec 23 09:24:57 2016 UTC (7 years, 10 months ago) by maya
Branches: MAIN
Diff to: previous 1.773: preferred, colored
Changes since revision 1.773: +4 -4 lines
Use PRIxPSIZE when printing psize_t.

Fixes i386 kernels build.

Revision 1.773: download - view: text, markup, annotated - select for diffs
Fri Dec 23 07:15:27 2016 UTC (7 years, 10 months ago) by cherry
Branches: MAIN
Diff to: previous 1.772: preferred, colored
Changes since revision 1.772: +21 -48 lines
"Make NetBSD great again!"

Introduce uvm_hotplug(9) to the kernel.

Many thanks, in no particular order to:

TNF, for funding the project.

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

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

Revision 1.772: download - view: text, markup, annotated - select for diffs
Thu Dec 22 16:29:05 2016 UTC (7 years, 10 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.771: preferred, colored
Changes since revision 1.771: +5 -3 lines
Xen doens't need lapic so don't allocate a lapic VA/PA for Xen.
As a side effect this makes XEN3PAE boot again but I don't know why ...

Revision 1.771: download - view: text, markup, annotated - select for diffs
Thu Dec 22 14:47:58 2016 UTC (7 years, 10 months ago) by cherry
Branches: MAIN
Diff to: previous 1.770: preferred, colored
Changes since revision 1.770: +3 -6 lines
switch all ports to use uvm_init.c:uvm_md_init()

uvm_setpagesize() is now subsumed within this funciton.

Revision 1.770: download - view: text, markup, annotated - select for diffs
Tue Dec 20 14:03:15 2016 UTC (7 years, 10 months ago) by maxv
Branches: MAIN
Diff to: previous 1.769: preferred, colored
Changes since revision 1.769: +7 -6 lines
When the i386 port was designed, the bootstrap code needed little physical
memory, and taking it below the kernel image was fine: we had 160 free
pages, and never allocated more than 20. With amd64 however, we create a
direct map, and for this map we need a number of page table pages that is
mostly proportionate to the number of physical addresses available, which
implies that these 160 free pages may not be enough.

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

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

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

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

Revision 1.769: download - view: text, markup, annotated - select for diffs
Sat Dec 17 14:27:53 2016 UTC (7 years, 10 months ago) by maxv
Branches: MAIN
Diff to: previous 1.768: preferred, colored
Changes since revision 1.768: +4 -4 lines
Put a limit in the percpu segment, so we can detect overflows on %fs.

Revision 1.768: download - view: text, markup, annotated - select for diffs
Fri Dec 16 19:52:22 2016 UTC (7 years, 10 months ago) by maxv
Branches: MAIN
Diff to: previous 1.767: preferred, colored
Changes since revision 1.767: +5 -5 lines
The way the xen dummy page is taken care of makes absolutely no sense at
all, with magic offsets here and there in different layers of the system.
It is just blind luck that everything has always worked as expected so
far.

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

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

Revision 1.767: download - view: text, markup, annotated - select for diffs
Thu Dec 15 12:04:18 2016 UTC (7 years, 10 months ago) by kamil
Branches: MAIN
Diff to: previous 1.766: preferred, colored
Changes since revision 1.766: +5 -2 lines
Add support for hardware assisted watchpoints/breakpoints API in ptrace(2)

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

The ptrace_watchpoint structure contains MI and MD parts:

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

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

These calls are protected with the __HAVE_PTRACE_WATCHPOINTS guard.

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

Sponsored by <The NetBSD Foundation>

Revision 1.766: download - view: text, markup, annotated - select for diffs
Sun Dec 11 22:38:50 2016 UTC (7 years, 10 months ago) by martin
Branches: MAIN
Diff to: previous 1.765: preferred, colored
Changes since revision 1.765: +4 -2 lines
Make kernels w/o ACPICA compile.

Revision 1.765: download - view: text, markup, annotated - select for diffs
Sun Dec 11 08:31:53 2016 UTC (7 years, 10 months ago) by maxv
Branches: MAIN
Diff to: previous 1.764: preferred, colored
Changes since revision 1.764: +8 -2 lines
Kenter local_apic_va to a fake physical page, because our x86
implementation expects this va to be valid even if no lapic is present;
which probably is a bug in itself, but let's just reproduce the old
behavior and rehide that bug.

Revision 1.752.6.5: download - view: text, markup, annotated - select for diffs
Mon Dec 5 10:54:53 2016 UTC (7 years, 11 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.752.6.4: preferred, colored; branchpoint 1.752: preferred, colored
Changes since revision 1.752.6.4: +6 -4 lines
Sync with HEAD

Revision 1.764: download - view: text, markup, annotated - select for diffs
Tue Nov 15 15:00:55 2016 UTC (7 years, 11 months ago) by maxv
Branches: MAIN
CVS tags: nick-nhusb-base-20161204
Diff to: previous 1.763: preferred, colored
Changes since revision 1.763: +4 -2 lines
Initialize kern_end in amd64 instead of x86.

Revision 1.763: download - view: text, markup, annotated - select for diffs
Fri Nov 11 11:34:51 2016 UTC (7 years, 11 months ago) by maxv
Branches: MAIN
Diff to: previous 1.762: preferred, colored
Changes since revision 1.762: +4 -4 lines
Rename xen_pmap_bootstrap to xen_locore, it really has nothing to do with
pmap and is just a C version of what amd64 and i386 do in asm.

Revision 1.758.2.2: download - view: text, markup, annotated - select for diffs
Fri Nov 4 14:49:01 2016 UTC (8 years ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.758.2.1: preferred, colored; branchpoint 1.758: preferred, colored
Changes since revision 1.758.2.1: +4 -9 lines
Sync with HEAD

Revision 1.752.6.4: download - view: text, markup, annotated - select for diffs
Wed Oct 5 20:55:28 2016 UTC (8 years, 1 month ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.752.6.3: preferred, colored; branchpoint 1.752: preferred, colored
Changes since revision 1.752.6.3: +63 -79 lines
Sync with HEAD

Revision 1.762: download - view: text, markup, annotated - select for diffs
Sun Sep 25 12:59:19 2016 UTC (8 years, 1 month ago) by maxv
Branches: MAIN
CVS tags: pgoyette-localcount-20161104, nick-nhusb-base-20161004
Diff to: previous 1.761: preferred, colored
Changes since revision 1.761: +4 -9 lines
Fix outdated comment, and #ifdef.

Revision 1.761: download - view: text, markup, annotated - select for diffs
Sat Aug 27 16:07:26 2016 UTC (8 years, 2 months ago) by maxv
Branches: MAIN
CVS tags: localcount-20160914
Diff to: previous 1.760: preferred, colored
Changes since revision 1.760: +12 -4 lines
Map the boot IDT, GDT and LDT in three different pages on x86. It is much
better this way, and it reduces the diff between x86 and Xen. Also, zero
them properly, otherwise we might end up with garbage in several slots.

Revision 1.760: download - view: text, markup, annotated - select for diffs
Sat Aug 27 14:19:47 2016 UTC (8 years, 2 months ago) by maxv
Branches: MAIN
Diff to: previous 1.759: preferred, colored
Changes since revision 1.759: +2 -5 lines
Remove idt_init.

Revision 1.758.2.1: download - view: text, markup, annotated - select for diffs
Tue Jul 26 03:24:17 2016 UTC (8 years, 3 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.758: preferred, colored
Changes since revision 1.758: +6 -21 lines
Sync with HEAD

Revision 1.759: download - view: text, markup, annotated - select for diffs
Sat Jul 16 17:02:34 2016 UTC (8 years, 3 months ago) by maxv
Branches: MAIN
CVS tags: pgoyette-localcount-20160806, pgoyette-localcount-20160726
Diff to: previous 1.758: preferred, colored
Changes since revision 1.758: +6 -21 lines
Simplify the way physical pages are internalized into the VM system on x86.
Only two functions are called now: init_x86_clusters, which initializes the
memory clusters from the bootinfo, and init_x86_vm, which inserts the pages
from the clusters into VM.

Revision 1.758: download - view: text, markup, annotated - select for diffs
Wed Jul 13 15:53:27 2016 UTC (8 years, 3 months ago) by maxv
Branches: MAIN
CVS tags: pgoyette-localcount-base
Branch point for: pgoyette-localcount
Diff to: previous 1.757: preferred, colored
Changes since revision 1.757: +8 -9 lines
Reorder some instructions, reduces the diff between amd64 and i386.

Revision 1.757: download - view: text, markup, annotated - select for diffs
Wed Jul 13 15:39:33 2016 UTC (8 years, 3 months ago) by maxv
Branches: MAIN
Diff to: previous 1.756: preferred, colored
Changes since revision 1.756: +0 -1 lines
Remove msgbuf_paddr.

Revision 1.756: download - view: text, markup, annotated - select for diffs
Wed Jul 13 15:35:56 2016 UTC (8 years, 3 months ago) by maxv
Branches: MAIN
Diff to: previous 1.755: preferred, colored
Changes since revision 1.755: +42 -41 lines
KNF

Revision 1.752.6.3: download - view: text, markup, annotated - select for diffs
Sun May 29 08:44:17 2016 UTC (8 years, 5 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.752.6.2: preferred, colored; branchpoint 1.752: preferred, colored
Changes since revision 1.752.6.2: +4 -4 lines
Sync with HEAD

Revision 1.755: download - view: text, markup, annotated - select for diffs
Sun May 15 10:35:54 2016 UTC (8 years, 5 months ago) by maxv
Branches: MAIN
CVS tags: nick-nhusb-base-20160907, nick-nhusb-base-20160529
Diff to: previous 1.754: preferred, colored
Changes since revision 1.754: +4 -4 lines
Explicitly mention MP_TRAMPOLINE in these comments, so that NXR links them.

Revision 1.752.6.2: download - view: text, markup, annotated - select for diffs
Sat Jun 6 14:40:00 2015 UTC (9 years, 5 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.752.6.1: preferred, colored; branchpoint 1.752: preferred, colored
Changes since revision 1.752.6.1: +11 -11 lines
Sync with HEAD

Revision 1.754: download - view: text, markup, annotated - select for diffs
Fri Apr 24 00:04:04 2015 UTC (9 years, 6 months ago) by khorben
Branches: MAIN
CVS tags: nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606
Diff to: previous 1.753: preferred, colored
Changes since revision 1.753: +6 -6 lines
Also use ACPI shutdown on Xen DOM0

No objection on port-xen@
ok gdt@

Revision 1.752.6.1: download - view: text, markup, annotated - select for diffs
Mon Apr 6 15:17:57 2015 UTC (9 years, 7 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.752: preferred, colored
Changes since revision 1.752: +4 -3 lines
Sync with HEAD

Revision 1.753: download - view: text, markup, annotated - select for diffs
Fri Jan 23 02:52:14 2015 UTC (9 years, 9 months ago) by christos
Branches: MAIN
CVS tags: nick-nhusb-base-20150406
Diff to: previous 1.752: preferred, colored
Changes since revision 1.752: +4 -3 lines
whitespace

Revision 1.730.2.3: download - view: text, markup, annotated - select for diffs
Wed Aug 20 00:03:06 2014 UTC (10 years, 2 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.730.2.2: preferred, colored
Changes since revision 1.730.2.2: +43 -133 lines
Rebase to HEAD as of a few days ago.

Revision 1.709.2.5: download - view: text, markup, annotated - select for diffs
Thu May 22 11:39:51 2014 UTC (10 years, 5 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.709.2.4: preferred, colored; branchpoint 1.709: preferred, colored; next MAIN 1.710: preferred, colored
Changes since revision 1.709.2.4: +45 -213 lines
sync with head.

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

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

Revision 1.734.4.1: download - view: text, markup, annotated - select for diffs
Sun May 18 17:45:12 2014 UTC (10 years, 5 months ago) by rmind
Branches: rmind-smpnet
Diff to: previous 1.734: preferred, colored; next MAIN 1.735: preferred, colored
Changes since revision 1.734: +45 -135 lines
sync with head

Revision 1.752: download - view: text, markup, annotated - select for diffs
Sun Feb 23 22:36:43 2014 UTC (10 years, 8 months ago) by dsl
Branches: MAIN
CVS tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, nick-nhusb-base, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE
Branch point for: nick-nhusb, netbsd-7-1, netbsd-7-0, netbsd-7
Diff to: previous 1.751: preferred, colored
Changes since revision 1.751: +5 -13 lines
Avoid unnecessary (and pointless) references to pcb->pcb_savefpu.
They were all in asserts.

Revision 1.751: download - view: text, markup, annotated - select for diffs
Sun Feb 23 12:56:40 2014 UTC (10 years, 8 months ago) by dsl
Branches: MAIN
Diff to: previous 1.750: preferred, colored
Changes since revision 1.750: +2 -43 lines
Determine whether the cpu supports xsave (and hence AVX).
The result is only written to sysctl nodes at the moment.
I see:
machdep.fpu_save = 3 (implies xsaveopt)
machdep.xsave_size = 832
machdep.xsave_features = 7
Completely common up the i386 and amd64 machdep sysctl creation.

Revision 1.750: download - view: text, markup, annotated - select for diffs
Thu Feb 20 18:19:10 2014 UTC (10 years, 8 months ago) by dsl
Branches: MAIN
Diff to: previous 1.749: preferred, colored
Changes since revision 1.749: +4 -3 lines
Move the amd64 and i386 pcb to the bottom of the uarea, and move the
  kernel stack to the top.
Change the pcb layouts so that fpu save area is at the end and is
  64byte aligned ready for xsave (saving the ymm registers).
Welcome to 6.99.32

Revision 1.749: download - view: text, markup, annotated - select for diffs
Tue Feb 18 01:00:57 2014 UTC (10 years, 8 months ago) by christos
Branches: MAIN
Diff to: previous 1.748: preferred, colored
Changes since revision 1.748: +7 -4 lines
CID 1175795:  Unused pointer value

Revision 1.748: download - view: text, markup, annotated - select for diffs
Sat Feb 15 22:20:41 2014 UTC (10 years, 8 months ago) by dsl
Branches: MAIN
Diff to: previous 1.747: preferred, colored
Changes since revision 1.747: +20 -48 lines
Load and save the fpu registers (for copies to/from userspace) using
  helper functions in arch/x86/x86/fpu.c
They (hopefully) ensure that we write to the entire buffer and don't load
  values that might cause faults in kernel.
Also zero out the 'pad' field of the i386 mcontext fp area that I think
  once contained the registers of any Weitek fpu.
  Dunno why it wasn't pasrt of the union.
Some of these copies could be removed if the code directly copied the save
  area to/from userspace addresses.

Revision 1.747: download - view: text, markup, annotated - select for diffs
Sat Feb 15 10:11:15 2014 UTC (10 years, 8 months ago) by dsl
Branches: MAIN
Diff to: previous 1.746: preferred, colored
Changes since revision 1.746: +34 -54 lines
Remove all references to MDL_USEDFPU and deferred fpu initialisation.
The cost of zeroing the save area on exec is minimal.
This stops the FP registers of a random process being used the first
  time an lwp uses the fpu.
sendsig_siginfo() and get_mcontext() now unconditionally copy the FP
registers.
I'll remove the double-copy for signal handlers soon.
get_mcontext() might have been leaking kernel memory to userspace - and
  may still do so if i386_use_fxsave is false (short copies).

Revision 1.746: download - view: text, markup, annotated - select for diffs
Tue Feb 4 22:48:26 2014 UTC (10 years, 9 months ago) by dsl
Branches: MAIN
Diff to: previous 1.745: preferred, colored
Changes since revision 1.745: +23 -15 lines
Now that the sv_xmm and sv_87 fields in the pcb are the same size as the
  hardware ones, and those in the mcontext, ptrace and core files we
  can really safely cast and copy between the types.
Remove a couple of temporary buffers and add CTASSERT()s that the sizes
  do actually match.

Revision 1.745: download - view: text, markup, annotated - select for diffs
Sun Feb 2 22:41:20 2014 UTC (10 years, 9 months ago) by dsl
Branches: MAIN
Diff to: previous 1.744: preferred, colored
Changes since revision 1.744: +2 -7 lines
Minor fpu initialisation cleanups:
Set default CR) so that the FPU is enabled (unset CR0_EM) and initialise
  i386_fpu_present to 1.
No need to call the npx trap indirectly, rename to fpunda() to match amd64.
Remove the i386_fpu_exception variable and sysctl (It used to indicate
  which irq was used for fpu exceptions, but we only support 'internal'
  now).  Hopefully no one cares.
fpuinit() now only needs to clear TS before the fninit(). Apart from the
  checks for 486SX and the 'fdiv bug' this matches the amd64 version.
Exclude fpuinit() from XEN kernels, they don't call it - which rather begs
  the question as to whether it is needed at all!

Revision 1.744: download - view: text, markup, annotated - select for diffs
Sat Feb 1 18:57:38 2014 UTC (10 years, 9 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.743: preferred, colored
Changes since revision 1.743: +6 -2 lines
Stopgap measure: set i386_fpu_present to 1 for XEN.
Stop a stream of
npxintr: came from nowherenpxintr: l = 0xc17ba560, curproc = 0xc177d880, fpu_present = 0
when running some ATF tests:
http://www-soc.lip6.fr/~bouyer/NetBSD-tests/xen/HEAD/i386/201401300920Z_anita.txt

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

Revision 1.743: download - view: text, markup, annotated - select for diffs
Sun Jan 26 19:16:17 2014 UTC (10 years, 9 months ago) by dsl
Branches: MAIN
Diff to: previous 1.742: preferred, colored
Changes since revision 1.742: +8 -18 lines
Remove support for 'external' floating point units and the MS-DOS
  compatible method of handling floating point exceptions.
Make kernel support for teh fpu non-optional (486SX should still work).
Only 386 cpus support external fpu, and i386 support was removed years ago.
This means that the npx code no longer uses port 0xf0 or interupt 13.
All the "npx at isa" lines go from the configs, arch/i386/isa/npx.c
  is now mandatory for all i386 kernels.
I've renamed npxinit() to fpuinit() and npxinit_cpu() to fpuinit_cpu()
  to match the very similar amd64 functions.
The fpu of the boot cpu is now initialised by a direct call from
  cpu_configure(), this enables FP emulation for a 486SX.
  (for amd64 the cr0 values are set in locore.S and similar).
This fixes a long-standing bug in linux_setregs() - which did not
  save the fpu regsiters if they were active.
I've test booted a single cpu i386 kernel (using anita).
amd64 builds - none of teh changes should affect it.
The i386 XEN kernels build, but I'm not sure where they set cr0, and
  it might have got lost!

Revision 1.742: download - view: text, markup, annotated - select for diffs
Sun Jan 19 14:30:37 2014 UTC (10 years, 9 months ago) by dsl
Branches: MAIN
Diff to: previous 1.741: preferred, colored
Changes since revision 1.741: +6 -6 lines
Flatten the floating point register structures bu moving the
  'environment' registers into the main strcuture.
There are x87 instructions that only affect the environment, but that
  is no real excuse for all the sub-structures.
Rename fields so that there are far fewer collisions between the two
  sets of field names.

Revision 1.741: download - view: text, markup, annotated - select for diffs
Thu Jan 9 00:57:25 2014 UTC (10 years, 9 months ago) by dholland
Branches: MAIN
Diff to: previous 1.740: preferred, colored
Changes since revision 1.740: +3 -2 lines
Make the amd64 post-halt-press-a-key code match i386, and introduce
into both a message for the case where cngetc() doesn't work. If
there's no console attached, this won't accomplish anything; but if
there's a screen but no keyboard, or the keyboard's wedged, or
whatever, it might provide useful information.

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

Revision 1.740: download - view: text, markup, annotated - select for diffs
Sun Dec 8 20:45:30 2013 UTC (10 years, 10 months ago) by dsl
Branches: MAIN
Diff to: previous 1.739: preferred, colored
Changes since revision 1.739: +4 -4 lines
Rename the fields of 'struct envxmm' (itself badly named) so that they
  are different from those used for the x87 fpu.
Use a union to describe the 64bit 'address' field so that it correctly
  spilt for 32bit binaries.
The freebsd emulation defined its own 'struct freebsd_env87' that the
  code just assumed matched the netbsd one.
  Since this is a hardware structure, just use the netbsd one.
This shouldn't change the binaries except that 'en_fos' used to be
  incorrectly a 32bit field.

Revision 1.739: download - view: text, markup, annotated - select for diffs
Sun Dec 1 01:05:16 2013 UTC (10 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.738: preferred, colored
Changes since revision 1.738: +35 -14 lines
revert fpu/pcu changes until we figure out what's wrong; they cause random
freezes

Revision 1.738: download - view: text, markup, annotated - select for diffs
Mon Nov 11 11:10:45 2013 UTC (10 years, 11 months ago) by joerg
Branches: MAIN
Diff to: previous 1.737: preferred, colored
Changes since revision 1.737: +10 -4 lines
NetBSD 6.99.26: Switch i386 and amd64 to the x87 default control word
as initial value for new processes. This means that long double
computations get the expected 63bit mantissa. Binaries tagged as
compiled for 6.99.25 and older get the old value.

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

Revision 1.737: download - view: text, markup, annotated - select for diffs
Fri Nov 8 03:12:48 2013 UTC (10 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.736: preferred, colored
Changes since revision 1.736: +3 -4 lines
fix unused variable warnings

Revision 1.736: download - view: text, markup, annotated - select for diffs
Fri Nov 8 02:24:11 2013 UTC (10 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.735: preferred, colored
Changes since revision 1.735: +4 -4 lines
Fix unused variable warnings

Revision 1.735: download - view: text, markup, annotated - select for diffs
Wed Oct 23 20:18:50 2013 UTC (11 years ago) by drochner
Branches: MAIN
Diff to: previous 1.734: preferred, colored
Changes since revision 1.734: +14 -35 lines
Use the MI "pcu" framework for bookkeeping of npx/fpu states on x86.
This reduces the amount of MD code enormously, and makes it easier
to implement support for newer CPU features which require more fpu
state, or for fpu usage by the kernel.
For access to FPU state across CPUs, an xcall kthread is used now
rather than a dedicated IPI.
No user visible changes intended.

Revision 1.730.2.2: download - view: text, markup, annotated - select for diffs
Sun Jun 23 06:20:06 2013 UTC (11 years, 4 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.730.2.1: preferred, colored
Changes since revision 1.730.2.1: +6 -84 lines
resync from head

Revision 1.734: download - view: text, markup, annotated - select for diffs
Fri Apr 12 16:59:38 2013 UTC (11 years, 6 months ago) by christos
Branches: MAIN
CVS tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900
Branch point for: rmind-smpnet
Diff to: previous 1.733: preferred, colored
Changes since revision 1.733: +6 -84 lines
de-duplication police arrests sysctl.

Revision 1.730.2.1: download - view: text, markup, annotated - select for diffs
Tue Nov 20 03:01:27 2012 UTC (11 years, 11 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.730: preferred, colored
Changes since revision 1.730: +3 -23 lines
Resync to 2012-11-19 00:00:00 UTC

Revision 1.709.2.4: download - view: text, markup, annotated - select for diffs
Tue Oct 30 17:19:49 2012 UTC (12 years ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.709.2.3: preferred, colored; branchpoint 1.709: preferred, colored
Changes since revision 1.709.2.3: +5 -27 lines
sync with head

Revision 1.733: download - view: text, markup, annotated - select for diffs
Wed Oct 3 18:58:32 2012 UTC (12 years, 1 month ago) by dsl
Branches: MAIN
CVS tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, agc-symver-base, agc-symver
Diff to: previous 1.732: preferred, colored
Changes since revision 1.732: +3 -3 lines
Remove all references to KVM86.
It was only ever used by APMBIOS - and then only if an option was selected.
Probably didn't work well at all!

Revision 1.732: download - view: text, markup, annotated - select for diffs
Sun Sep 30 20:54:52 2012 UTC (12 years, 1 month ago) by dsl
Branches: MAIN
Diff to: previous 1.731: preferred, colored
Changes since revision 1.731: +2 -3 lines
Fix build.
I've removed 'option apmbios' so config no longer generates apmbios.h
Not to be confused with dev/apm/apmbios.h :-)

Revision 1.731: download - view: text, markup, annotated - select for diffs
Sun Sep 30 20:19:51 2012 UTC (12 years, 1 month ago) by dsl
Branches: MAIN
Diff to: previous 1.730: preferred, colored
Changes since revision 1.730: +2 -21 lines
Remove the obvious parts of i386 Advanced power management 'apm' support.
This is the code that predates ACPI, and might once have been able to
  power down some laptops.
It hasn't been compiled for ages (it isn't it i386/ALL or any other
  standard kernel) and hasn't worked for even longer.
The APM specification was made obsolete by ACPI before it was widely
  implemented.
This will allow some other, even more dubious code be removed.
Unfortunately apmbios.h is used by the world !

Revision 1.730: download - view: text, markup, annotated - select for diffs
Fri Jul 27 22:55:29 2012 UTC (12 years, 3 months ago) by drochner
Branches: MAIN
Branch point for: tls-maxphys
Diff to: previous 1.729: preferred, colored
Changes since revision 1.729: +2 -4 lines
gcc -fno-common fallout

Revision 1.729: download - view: text, markup, annotated - select for diffs
Wed Jun 27 00:37:08 2012 UTC (12 years, 4 months ago) by jym
Branches: MAIN
Diff to: previous 1.728: preferred, colored
Changes since revision 1.728: +3 -3 lines
Retire XEN_COMPAT_030001 as detailed on port-xen@:

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

The xen_p2m API comes next.

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

FWIW, Amazon always reported:

hypervisor0 at mainbus0: Xen version 3.4.3-kaos_t1micro

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

Revision 1.728: download - view: text, markup, annotated - select for diffs
Sat Jun 2 21:36:41 2012 UTC (12 years, 5 months ago) by dsl
Branches: MAIN
Diff to: previous 1.727: preferred, colored
Changes since revision 1.727: +3 -3 lines
Add some pre-processor magic to verify that the type of the data item
  passed to sysctl_createv() actually matches the declared type for
  the item itself.
In the places where the caller specifies a function and a structure
  address (typically the 'softc') an explicit (void *) cast is now needed.
Fixes bugs in sys/dev/acpi/asus_acpi.c sys/dev/bluetooth/bcsp.c
  sys/kern/vfs_bio.c sys/miscfs/syncfs/sync_subr.c and setting
  AcpiGbl_EnableAmlDebugObject.
(mostly passing the address of a uint64_t when typed as CTLTYPE_INT).
I've test built quite a few kernels, but there may be some unfixed MD
  fallout. Most likely passing &char[] to char *.
Also add CTLFLAG_UNSIGNED for unsiged decimals - not set yet.

Revision 1.714.2.6: download - view: text, markup, annotated - select for diffs
Sat Jun 2 11:09:01 2012 UTC (12 years, 5 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.714.2.5: preferred, colored; branchpoint 1.714: preferred, colored; next MAIN 1.715: preferred, colored
Changes since revision 1.714.2.5: +27 -16 lines
sync to latest -current.

Revision 1.709.2.3: download - view: text, markup, annotated - select for diffs
Wed May 23 10:07:44 2012 UTC (12 years, 5 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.709.2.2: preferred, colored; branchpoint 1.709: preferred, colored
Changes since revision 1.709.2.2: +27 -16 lines
sync with head.

Revision 1.717.2.7: download - view: text, markup, annotated - select for diffs
Mon May 21 15:25:58 2012 UTC (12 years, 5 months ago) by riz
Branches: netbsd-6
CVS tags: netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Branch point for: netbsd-6-1, netbsd-6-0
Diff to: previous 1.717.2.6: preferred, colored; branchpoint 1.717: preferred, colored
Changes since revision 1.717.2.6: +27 -16 lines
Pull up following revision(s) (requested by martin in ticket #274):
	sys/arch/amd64/amd64/process_machdep.c: revision 1.20
	sys/kern/sys_lwp.c: revision 1.54
	sys/arch/sparc64/sparc64/machdep.c: revision 1.267
	sys/arch/mips/mips/cpu_subr.c: revision 1.16
	sys/arch/vax/vax/machdep.c: revision 1.188
	sys/sys/lwp.h: revision 1.161
	sys/arch/sparc64/sparc64/netbsd32_machdep.c: revision 1.98
	sys/arch/alpha/alpha/machdep.c: revision 1.339
	sys/compat/sys/ucontext.h: revision 1.6
	sys/arch/hppa/hppa/hppa_machdep.c: revision 1.28
	distrib/sets/lists/tests/mi: revision 1.469
	sys/arch/powerpc/powerpc/sig_machdep.c: revision 1.42
	tests/lib/libc/sys/t_lwp_create.c: revision 1.1
	tests/lib/libc/sys/Makefile: revision 1.23
	sys/arch/arm/arm/sig_machdep.c: revision 1.42
	sys/arch/amd64/include/mcontext.h: revision 1.15
	sys/arch/amd64/amd64/machdep.c: revision 1.183
	sys/arch/sh3/sh3/sh3_machdep.c: revision 1.99
	sys/arch/i386/i386/machdep.c: revision 1.727
	sys/compat/netbsd32/netbsd32_lwp.c: revision 1.13
	sys/arch/sparc/sparc/machdep.c: revision 1.319
	sys/arch/amd64/amd64/netbsd32_machdep.c: revision 1.76
	sys/arch/m68k/m68k/sig_machdep.c: revision 1.49
	sys/sys/ucontext.h: revision 1.16
	sys/arch/mips/mips/netbsd32_machdep.c: revision 1.9
	lib/libc/sys/_lwp_create.2: revision 1.5
Calling _lwp_create() with a bogus ucontext could trigger a kernel
assertion failure (and thus a crash in DIAGNOSTIC kernels). Independently
discovered by YAMAMOTO Takashi and Joel Sing.
To avoid this, introduce a cpu_mcontext_validate() function and move all
sanity checks from cpu_setmcontext() there. Also untangle the netbsd32
compat mess slightly and add a cpu_mcontext32_validate() cousin there.
Add an exhaustive atf test case, based partly on code from Joel Sing.
Should finally fix the remaining open part of PR kern/43903.

Revision 1.727: download - view: text, markup, annotated - select for diffs
Mon May 21 14:15:17 2012 UTC (12 years, 5 months ago) by martin
Branches: MAIN
CVS tags: yamt-pagecache-base5, jmcneill-usbmp-base10
Diff to: previous 1.726: preferred, colored
Changes since revision 1.726: +27 -16 lines
Calling _lwp_create() with a bogus ucontext could trigger a kernel
assertion failure (and thus a crash in DIAGNOSTIC kernels). Independently
discovered by YAMAMOTO Takashi and Joel Sing.

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

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

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

Revision 1.709.2.2: download - view: text, markup, annotated - select for diffs
Tue Apr 17 00:06:29 2012 UTC (12 years, 6 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.709.2.1: preferred, colored; branchpoint 1.709: preferred, colored
Changes since revision 1.709.2.1: +124 -148 lines
sync with head

Revision 1.717.2.6: download - view: text, markup, annotated - select for diffs
Thu Mar 22 22:50:48 2012 UTC (12 years, 7 months ago) by riz
Branches: netbsd-6
Diff to: previous 1.717.2.5: preferred, colored; branchpoint 1.717: preferred, colored
Changes since revision 1.717.2.5: +10 -10 lines
Pull up following revision(s) (requested by mrg in ticket #126):
	sys/arch/amd64/amd64/machdep.c: revision 1.180
	sys/arch/i386/i386/machdep.c: revision 1.724
make i386 and amd64 cpu_reboot() more similar.  in particular, bring
in the unmount/sync code from i386 to amd64, and call doshutdownhooks()
for i386.  the amd64 changes avoid umass triggering an assert later
when sd@umass is trying to sync the cache.
XXX merge x86 cpu_reboot(), but there's non-trivially different still.

Revision 1.644.4.13: download - view: text, markup, annotated - select for diffs
Wed Mar 21 21:29:31 2012 UTC (12 years, 7 months ago) by jdc
Branches: 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
Diff to: previous 1.644.4.12: preferred, colored; branchpoint 1.644: preferred, colored; next MAIN 1.645: preferred, colored
Changes since revision 1.644.4.12: +8 -12 lines
Apply patch (requested by bouyer in ticket #1738).

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

Revision 1.717.2.5: download - view: text, markup, annotated - select for diffs
Wed Mar 7 23:31:41 2012 UTC (12 years, 8 months ago) by riz
Branches: netbsd-6
Diff to: previous 1.717.2.4: preferred, colored; branchpoint 1.717: preferred, colored
Changes since revision 1.717.2.4: +8 -7 lines
Pull up following revision(s) (requested by bouyer in ticket #93):
	sys/arch/i386/i386/machdep.c: revision 1.725
cast xen_start_info.nr_pages to paddr_t, so that ctob() won't truncate
the addresses to 32bits. Fix avail memory when allocating more than 4GB
to a XEN3PAE domU.

Revision 1.714.2.5: download - view: text, markup, annotated - select for diffs
Tue Mar 6 18:26:37 2012 UTC (12 years, 8 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.714.2.4: preferred, colored; branchpoint 1.714: preferred, colored
Changes since revision 1.714.2.4: +46 -36 lines
sync to -current

Revision 1.714.2.4: download - view: text, markup, annotated - select for diffs
Tue Mar 6 09:56:08 2012 UTC (12 years, 8 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.714.2.3: preferred, colored; branchpoint 1.714: preferred, colored
Changes since revision 1.714.2.3: +27 -40 lines
sync to -current

Revision 1.717.2.4: download - view: text, markup, annotated - select for diffs
Mon Mar 5 20:18:02 2012 UTC (12 years, 8 months ago) by sborrill
Branches: netbsd-6
Diff to: previous 1.717.2.3: preferred, colored; branchpoint 1.717: preferred, colored
Changes since revision 1.717.2.3: +32 -9 lines
Pull up the following revisions(s) (requested by bouyer in ticket #80):
	sys/arch/xen/x86/x86_xpmap.c:	revision 1.42
	sys/arch/x86/include/specialreg.h:	revision 1.56
	sys/arch/amd64/amd64/machdep.c:	revision 1.179
	sys/arch/i386/i386/locore.S:	revision 1.97
	sys/arch/i386/i386/machdep.c:	revision 1.723 via patch
	sys/arch/x86/include/cpu.h:	revision 1.49

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

Revision 1.726: download - view: text, markup, annotated - select for diffs
Sun Mar 4 20:44:17 2012 UTC (12 years, 8 months ago) by bouyer
Branches: MAIN
CVS tags: yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6
Diff to: previous 1.725: preferred, colored
Changes since revision 1.725: +2 -6 lines
Don't try to uvm_page_physload() the tmpgdt page: this always fails because
only one physical segment is configured for Xen, and it's probably not
worth it to create a second physseg with a single page (uvm has optimisations
for the VM_PHYSSEG_MAX == 1 case)

Revision 1.725: download - view: text, markup, annotated - select for diffs
Sun Mar 4 15:56:09 2012 UTC (12 years, 8 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.724: preferred, colored
Changes since revision 1.724: +8 -7 lines
cast xen_start_info.nr_pages to paddr_t, so that ctob() won't truncate
the addresses to 32bits. Fix avail memory when allocating more than 4GB
to a XEN3PAE domU.

Revision 1.714.2.3: download - view: text, markup, annotated - select for diffs
Sun Mar 4 00:46:09 2012 UTC (12 years, 8 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.714.2.2: preferred, colored; branchpoint 1.714: preferred, colored
Changes since revision 1.714.2.2: +77 -45 lines
sync to latest -current.

Revision 1.724: download - view: text, markup, annotated - select for diffs
Sat Mar 3 23:43:17 2012 UTC (12 years, 8 months ago) by mrg
Branches: MAIN
CVS tags: jmcneill-usbmp-base4
Diff to: previous 1.723: preferred, colored
Changes since revision 1.723: +10 -10 lines
make i386 and amd64 cpu_reboot() more similar.  in particular, bring
in the unmount/sync code from i386 to amd64, and call doshutdownhooks()
for i386.  the amd64 changes avoid umass triggering an assert later
when sd@umass is trying to sync the cache.

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

Revision 1.723: download - view: text, markup, annotated - select for diffs
Fri Mar 2 16:43:31 2012 UTC (12 years, 8 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.722: preferred, colored
Changes since revision 1.722: +32 -9 lines
Follow locore.S and move FPU handling from x86_64_switch_context() to
x86_64_tls_switch(); raise IPL to IPL_HIGH in x86_64_switch_context()
and test ci_fpcurlwp to decide to disable FPU or not.
Change the Xen i386 context switch code to be like the amd64 one.

Revision 1.717.2.3: download - view: text, markup, annotated - select for diffs
Mon Feb 27 20:29:36 2012 UTC (12 years, 8 months ago) by riz
Branches: netbsd-6
Diff to: previous 1.717.2.2: preferred, colored; branchpoint 1.717: preferred, colored
Changes since revision 1.717.2.2: +2 -12 lines
Pull up following revision(s) (requested by bouyer in ticket #60):
	sys/arch/i386/i386/machdep.c: revision 1.722
Do not special-case XEN and always use the proper selectors for %fs and %gs
in buildcontext() and setregs(). The consequence was that signal handlers
would have the wrong %fs/%gs. Found by running atf tests under Xen/i386.

Revision 1.722: download - view: text, markup, annotated - select for diffs
Mon Feb 27 19:52:59 2012 UTC (12 years, 8 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.721: preferred, colored
Changes since revision 1.721: +2 -12 lines
Do not special-case XEN and always use the proper selectors for %fs and %gs
in buildcontext() and setregs(). The consequence was that signal handlers
would have the wrong %fs/%gs. Found by running atf tests under Xen/i386.

Revision 1.714.2.2: download - view: text, markup, annotated - select for diffs
Fri Feb 24 09:11:29 2012 UTC (12 years, 8 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.714.2.1: preferred, colored; branchpoint 1.714: preferred, colored
Changes since revision 1.714.2.1: +3 -46 lines
sync to -current.

Revision 1.721: download - view: text, markup, annotated - select for diffs
Fri Feb 24 08:06:07 2012 UTC (12 years, 8 months ago) by cherry
Branches: MAIN
CVS tags: jmcneill-usbmp-base5
Diff to: previous 1.720: preferred, colored
Changes since revision 1.720: +42 -23 lines
(xen) - remove the (*xpq_cpu)() shim.We hasten the %fs/%gs setup process during boot.Although this is hacky, it lets us use the non-xen specificpmap_pte_xxx() functions in pmap code (and others).

Revision 1.717.2.2: download - view: text, markup, annotated - select for diffs
Thu Feb 23 18:37:32 2012 UTC (12 years, 8 months ago) by riz
Branches: netbsd-6
Diff to: previous 1.717.2.1: preferred, colored; branchpoint 1.717: preferred, colored
Changes since revision 1.717.2.1: +2 -4 lines
Pull up following revision(s) (requested by chs in ticket #38):
	sys/arch/amd64/amd64/machdep.c: revision 1.178
	sys/arch/x86/x86/identcpu.c: revision 1.30
	sys/arch/i386/i386/machdep.c: revision 1.720
move XEN CPU feature masking into cpu_probe() so that it's applied
to all CPUs, not just the boot CPU.

Revision 1.720: download - view: text, markup, annotated - select for diffs
Thu Feb 23 14:45:55 2012 UTC (12 years, 8 months ago) by chs
Branches: MAIN
CVS tags: jmcneill-usbmp-base3
Diff to: previous 1.719: preferred, colored
Changes since revision 1.719: +2 -4 lines
move XEN CPU feature masking into cpu_probe() so that it's applied
to all CPUs, not just the boot CPU.

Revision 1.717.2.1: download - view: text, markup, annotated - select for diffs
Wed Feb 22 19:07:12 2012 UTC (12 years, 8 months ago) by riz
Branches: netbsd-6
Diff to: previous 1.717: preferred, colored
Changes since revision 1.717: +3 -4 lines
Pull up following revision(s) (requested by bouyer in ticket #32):
	sys/arch/i386/i386/machdep.c: revision 1.719
i386_switch_context(): mimic code in cpu_switchto() and compare pcb->pcb_fpcpu
against ci to decide if we need to turn off FPU. Fix FPU corruption, e.g.
paranoia occasionally reporting flaws on Xen/MP systems.
XXX is ci_fpused still needed at all ?

Revision 1.719: download - view: text, markup, annotated - select for diffs
Wed Feb 22 18:35:26 2012 UTC (12 years, 8 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.718: preferred, colored
Changes since revision 1.718: +3 -4 lines
i386_switch_context(): mimic code in cpu_switchto() and compare pcb->pcb_fpcpu
against ci to decide if we need to turn off FPU. Fix FPU corruption, e.g.
paranoia occasionally reporting flaws on Xen/MP systems.

XXX is ci_fpused still needed at all ?

Revision 1.718: download - view: text, markup, annotated - select for diffs
Sun Feb 19 21:06:08 2012 UTC (12 years, 8 months ago) by rmind
Branches: MAIN
Diff to: previous 1.717: preferred, colored
Changes since revision 1.717: +2 -42 lines
Remove COMPAT_SA / KERN_SA.  Welcome to 6.99.3!
Approved by core@.

Revision 1.714.2.1: download - view: text, markup, annotated - select for diffs
Sat Feb 18 07:32:21 2012 UTC (12 years, 8 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.714: preferred, colored
Changes since revision 1.714: +44 -5 lines
merge to -current.

Revision 1.717: download - view: text, markup, annotated - select for diffs
Thu Jan 12 19:49:37 2012 UTC (12 years, 9 months ago) by cherry
Branches: MAIN
CVS tags: netbsd-6-base, jmcneill-usbmp-base2
Branch point for: netbsd-6
Diff to: previous 1.716: preferred, colored
Changes since revision 1.716: +4 -2 lines
relocate pte_lock initialisation to the earliest points after %fs is first usable in the XEN bootpath

Revision 1.716: download - view: text, markup, annotated - select for diffs
Thu Jan 12 19:37:45 2012 UTC (12 years, 9 months ago) by cherry
Branches: MAIN
Diff to: previous 1.715: preferred, colored
Changes since revision 1.715: +7 -5 lines
re-order call to x86_bus_space_init() until after %fs is initialised via initgdt().

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

Revision 1.715: download - view: text, markup, annotated - select for diffs
Fri Dec 30 17:57:49 2011 UTC (12 years, 10 months ago) by cherry
Branches: MAIN
Diff to: previous 1.714: preferred, colored
Changes since revision 1.714: +37 -2 lines
Move the per-cpu l3 page allocation code to a separate MD function. Avoids code duplication for xen PAE

Revision 1.714: download - view: text, markup, annotated - select for diffs
Tue Nov 29 11:12:26 2011 UTC (12 years, 11 months ago) by martin
Branches: MAIN
CVS tags: jmcneill-usbmp-pre-base2, jmcneill-usbmp-base
Branch point for: jmcneill-usbmp
Diff to: previous 1.713: preferred, colored
Changes since revision 1.713: +3 -3 lines
Explicitly cast the result of ptoa() to unsigned long for printf,
to fix build failure on xen.

Revision 1.713: download - view: text, markup, annotated - select for diffs
Fri Nov 18 22:18:08 2011 UTC (12 years, 11 months ago) by jmcneill
Branches: MAIN
CVS tags: jmcneill-audiomp3-base, jmcneill-audiomp3
Diff to: previous 1.712: preferred, colored
Changes since revision 1.712: +2 -51 lines
remove Xbox support

Revision 1.709.2.1: download - view: text, markup, annotated - select for diffs
Thu Nov 10 14:31:40 2011 UTC (12 years, 11 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.709: preferred, colored
Changes since revision 1.709: +17 -8 lines
sync with head

Revision 1.712: download - view: text, markup, annotated - select for diffs
Thu Nov 10 00:12:04 2011 UTC (12 years, 11 months ago) by jym
Branches: MAIN
CVS tags: yamt-pagecache-base3
Diff to: previous 1.711: preferred, colored
Changes since revision 1.711: +7 -5 lines
Turn the 'i386_use_pae' variable into simply 'use_pae'. Technically
speaking we are also running with PAE enabled in long mode under amd64,
so this variable will be used in various places across x86 machdep to
branch at runtime to functions that require extra handling for PAE mode.

Revision 1.711: download - view: text, markup, annotated - select for diffs
Sun Nov 6 15:35:29 2011 UTC (13 years ago) by cherry
Branches: MAIN
CVS tags: yamt-pagecache-base2
Diff to: previous 1.710: preferred, colored
Changes since revision 1.710: +3 -3 lines
DTRT when initialising pmap_pa_end.

Revision 1.710: download - view: text, markup, annotated - select for diffs
Sun Nov 6 11:40:46 2011 UTC (13 years ago) by cherry
Branches: MAIN
Diff to: previous 1.709: preferred, colored
Changes since revision 1.709: +11 -4 lines
[merging from cherry-xenmp] Make the xen MMU op queue locking api private. Implement per-cpu queues.

Revision 1.702.2.7: download - view: text, markup, annotated - select for diffs
Tue Sep 20 18:57:51 2011 UTC (13 years, 1 month ago) by cherry
Branches: cherry-xenmp
Diff to: previous 1.702.2.6: preferred, colored; branchpoint 1.702: preferred, colored; next MAIN 1.703: preferred, colored
Changes since revision 1.702.2.6: +2 -4 lines
Remove the "xpq lock", since we have per-cpu mmu queues now. This may need further testing. Also add some preliminary locking around queue-ops in the network backend driver

Revision 1.702.2.6: download - view: text, markup, annotated - select for diffs
Tue Aug 30 12:53:45 2011 UTC (13 years, 2 months ago) by cherry
Branches: cherry-xenmp
Diff to: previous 1.702.2.5: preferred, colored; branchpoint 1.702: preferred, colored
Changes since revision 1.702.2.5: +11 -2 lines
Add per-cpu mmu queues

Revision 1.659.2.8: download - view: text, markup, annotated - select for diffs
Sat Aug 27 15:37:25 2011 UTC (13 years, 2 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.659.2.7: preferred, colored; next MAIN 1.660: preferred, colored
Changes since revision 1.659.2.7: +80 -17 lines
Sync with HEAD. Most notably: uvm/pmap work done by rmind@, and MP Xen
work of cherry@.

No regression observed on suspend/restore.

Revision 1.702.2.5: download - view: text, markup, annotated - select for diffs
Sat Aug 20 19:22:46 2011 UTC (13 years, 2 months ago) by cherry
Branches: cherry-xenmp
Diff to: previous 1.702.2.4: preferred, colored; branchpoint 1.702: preferred, colored
Changes since revision 1.702.2.4: +3 -3 lines
PAE MP support (preliminary), amd64 per-cpu L4 model redesigned, i386 pmap_pa_start/end fixup

Revision 1.709: download - view: text, markup, annotated - select for diffs
Sat Aug 13 12:09:38 2011 UTC (13 years, 2 months ago) by cherry
Branches: MAIN
CVS tags: yamt-pagecache-base, jym-xensuspend-nbase, jym-xensuspend-base
Branch point for: yamt-pagecache
Diff to: previous 1.708: preferred, colored
Changes since revision 1.708: +4 -2 lines
Add locking around ops to the hypervisor MMU "queue".

Revision 1.708: download - view: text, markup, annotated - select for diffs
Thu Aug 11 18:11:17 2011 UTC (13 years, 2 months ago) by cherry
Branches: MAIN
Diff to: previous 1.707: preferred, colored
Changes since revision 1.707: +3 -7 lines
Hide the MD details of specific IPIs behind semantically pleasing functions. This cleans up a couple of #ifdef XEN/#endif pairs

Revision 1.707: download - view: text, markup, annotated - select for diffs
Wed Aug 10 06:38:02 2011 UTC (13 years, 2 months ago) by cherry
Branches: MAIN
Diff to: previous 1.706: preferred, colored
Changes since revision 1.706: +42 -10 lines
tweak the xen specific startup path to not use %fs before it is setup. Minor refactoring. Use Xen specific ipi calls.

Revision 1.702.2.4: download - view: text, markup, annotated - select for diffs
Sun Aug 7 19:48:07 2011 UTC (13 years, 3 months ago) by cherry
Branches: cherry-xenmp
Diff to: previous 1.702.2.3: preferred, colored; branchpoint 1.702: preferred, colored
Changes since revision 1.702.2.3: +3 -3 lines
Fix XEN3PAE_DOMx build

Revision 1.702.2.3: download - view: text, markup, annotated - select for diffs
Sat Aug 6 21:06:34 2011 UTC (13 years, 3 months ago) by cherry
Branches: cherry-xenmp
Diff to: previous 1.702.2.2: preferred, colored; branchpoint 1.702: preferred, colored
Changes since revision 1.702.2.2: +8 -2 lines
Update cpu local GDT entries for TLS registers %gs and %fs

Revision 1.702.2.2: download - view: text, markup, annotated - select for diffs
Sun Jul 31 20:49:10 2011 UTC (13 years, 3 months ago) by cherry
Branches: cherry-xenmp
Diff to: previous 1.702.2.1: preferred, colored; branchpoint 1.702: preferred, colored
Changes since revision 1.702.2.1: +38 -10 lines
grow MP support for i386. boots to single user

Revision 1.706: download - view: text, markup, annotated - select for diffs
Fri Jul 1 18:14:15 2011 UTC (13 years, 4 months ago) by dyoung
Branches: MAIN
Diff to: previous 1.705: preferred, colored
Changes since revision 1.705: +3 -3 lines
#include <sys/bus.h> instead of <machine/bus.h>.

Revision 1.705: download - view: text, markup, annotated - select for diffs
Thu Jun 30 23:28:03 2011 UTC (13 years, 4 months ago) by joerg
Branches: MAIN
Diff to: previous 1.704: preferred, colored
Changes since revision 1.704: +3 -3 lines
Fix sizeof() usage in memcpy, curtesy of the new warning in clang.

Revision 1.702.2.1: download - view: text, markup, annotated - select for diffs
Thu Jun 23 14:19:14 2011 UTC (13 years, 4 months ago) by cherry
Branches: cherry-xenmp
Diff to: previous 1.702: preferred, colored
Changes since revision 1.702: +39 -6 lines
Catchup with rmind-uvmplock merge.

Revision 1.704: download - view: text, markup, annotated - select for diffs
Sun Jun 12 03:35:42 2011 UTC (13 years, 4 months ago) by rmind
Branches: MAIN
Diff to: previous 1.703: preferred, colored
Changes since revision 1.703: +37 -4 lines
Welcome to 5.99.53!  Merge rmind-uvmplock branch:

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

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

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

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

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

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

Revision 1.684.2.5: download - view: text, markup, annotated - select for diffs
Sun Jun 12 00:23:58 2011 UTC (13 years, 4 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.684.2.4: preferred, colored; branchpoint 1.684: preferred, colored; next MAIN 1.685: preferred, colored
Changes since revision 1.684.2.4: +2 -2 lines
sync with head

Revision 1.703: download - view: text, markup, annotated - select for diffs
Tue Jun 7 14:53:03 2011 UTC (13 years, 5 months ago) by bouyer
Branches: MAIN
CVS tags: rmind-uvmplock-nbase, rmind-uvmplock-base
Diff to: previous 1.702: preferred, colored
Changes since revision 1.702: +4 -4 lines
Don't call psignal() without holding proc_lock. This is the cause of
the reboot of PR port-xen/45028
Now that Xen2 is gone, handle FPU context switches the same way as
amd64. This makes all tests in /usr/tests/lib/libc/ieeefp pass.

Revision 1.699.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 6 09:05:49 2011 UTC (13 years, 5 months ago) by jruoho
Branches: jruoho-x86intr
Diff to: previous 1.699: preferred, colored; next MAIN 1.700: preferred, colored
Changes since revision 1.699: +9 -11 lines
Sync with HEAD.

Revision 1.684.2.4: download - view: text, markup, annotated - select for diffs
Tue May 31 03:04:04 2011 UTC (13 years, 5 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.684.2.3: preferred, colored; branchpoint 1.684: preferred, colored
Changes since revision 1.684.2.3: +0 -8 lines
sync with head

Revision 1.644.4.10.4.2: download - view: text, markup, annotated - select for diffs
Fri May 20 08:11:20 2011 UTC (13 years, 5 months ago) by matt
Branches: matt-nb5-mips64
Diff to: previous 1.644.4.10.4.1: preferred, colored; branchpoint 1.644.4.10: preferred, colored; next MAIN 1.644.4.11: preferred, colored
Changes since revision 1.644.4.10.4.1: +4 -8 lines
bring matt-nb5-mips64 up to date with netbsd-5-1-RELEASE (except compat).

Revision 1.659.2.7: download - view: text, markup, annotated - select for diffs
Mon May 2 22:49:55 2011 UTC (13 years, 6 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.659.2.6: preferred, colored
Changes since revision 1.659.2.6: +2 -10 lines
Sync with head.

Revision 1.702: download - view: text, markup, annotated - select for diffs
Tue Apr 26 15:51:23 2011 UTC (13 years, 6 months ago) by joerg
Branches: MAIN
CVS tags: cherry-xenmp-base
Branch point for: cherry-xenmp
Diff to: previous 1.701: preferred, colored
Changes since revision 1.701: +2 -10 lines
Remove Darwin, MACH and Mach-O support.

Revision 1.659.2.6: download - view: text, markup, annotated - select for diffs
Mon Mar 28 23:04:41 2011 UTC (13 years, 7 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.659.2.5: preferred, colored
Changes since revision 1.659.2.5: +15 -4 lines
Sync with HEAD. TODO before merge:
- shortcut for suspend code in sysmon, when powerd(8) is not running.
Borrow ``xs_watch'' thread context?
- bug hunting in xbd + xennet resume. Rings are currently thrashed upon
resume, so current implementation force flush them on suspend. It's not
really needed.

Revision 1.684.2.3: download - view: text, markup, annotated - select for diffs
Sat Mar 5 20:50:40 2011 UTC (13 years, 8 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.684.2.2: preferred, colored; branchpoint 1.684: preferred, colored
Changes since revision 1.684.2.2: +54 -22 lines
sync with head

Revision 1.699.4.1: download - view: text, markup, annotated - select for diffs
Sat Mar 5 15:09:43 2011 UTC (13 years, 8 months ago) by bouyer
Branches: bouyer-quota2
Diff to: previous 1.699: preferred, colored; next MAIN 1.700: preferred, colored
Changes since revision 1.699: +9 -3 lines
Sync with HEAD

Revision 1.701: download - view: text, markup, annotated - select for diffs
Fri Mar 4 22:25:26 2011 UTC (13 years, 8 months ago) by joerg
Branches: MAIN
CVS tags: bouyer-quota2-nbase
Diff to: previous 1.700: preferred, colored
Changes since revision 1.700: +3 -3 lines
Refactor ps_strings access. Based on PK_32, write either the normal
version or the 32bit compat layout in execve1. Introduce a new function
copyin_psstrings for reading it back from userland and converting it to
the native layout. Refactor procfs to share most of the code with the
kern.proc_args sysctl handler.

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

Revision 1.700: download - view: text, markup, annotated - select for diffs
Thu Feb 24 04:28:46 2011 UTC (13 years, 8 months ago) by joerg
Branches: MAIN
Diff to: previous 1.699: preferred, colored
Changes since revision 1.699: +8 -2 lines
Allow storing and receiving the LWP private pointer via ucontext_t
on all platforms except VAX and IA64. Add fast access via register for
AMD64, i386 and SH3 ports. Use this fast access in libpthread to replace
the stack based pthread_self(). Implement skeleton support for Alpha,
HPPA, PowerPC, SPARC and SPARC64, but leave it disabled.

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

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

Revision 1.699: download - view: text, markup, annotated - select for diffs
Tue Jan 11 21:10:17 2011 UTC (13 years, 9 months ago) by jruoho
Branches: MAIN
CVS tags: uebayasi-xip-base7, jruoho-x86intr-base, bouyer-quota2-base
Branch point for: jruoho-x86intr, bouyer-quota2
Diff to: previous 1.698: preferred, colored
Changes since revision 1.698: +8 -3 lines
Restore the interrupt level in cpu_reboot() before calling the
acpi_enter_sleep_state() function.

Revision 1.659.2.5: download - view: text, markup, annotated - select for diffs
Mon Jan 10 00:37:29 2011 UTC (13 years, 9 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.659.2.4: preferred, colored
Changes since revision 1.659.2.4: +7 -7 lines
Sync with HEAD

Revision 1.698: download - view: text, markup, annotated - select for diffs
Fri Nov 12 13:18:57 2010 UTC (13 years, 11 months ago) by uebayasi
Branches: MAIN
CVS tags: uebayasi-xip-base6, matt-mips64-premerge-20101231
Diff to: previous 1.697: preferred, colored
Changes since revision 1.697: +1 -1 lines
Pull in uvm/uvm.h where UVM's page level interface is used.

Revision 1.697: download - view: text, markup, annotated - select for diffs
Wed Nov 10 09:27:22 2010 UTC (13 years, 11 months ago) by uebayasi
Branches: MAIN
Diff to: previous 1.696: preferred, colored
Changes since revision 1.696: +6 -6 lines
Use more VM_PHYSMEM_*() accessors.  No functional changes.

Revision 1.681.2.7: download - view: text, markup, annotated - select for diffs
Wed Nov 10 08:59:13 2010 UTC (13 years, 11 months ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.681.2.6: preferred, colored; branchpoint 1.681: preferred, colored; next MAIN 1.682: preferred, colored
Changes since revision 1.681.2.6: +1 -1 lines
Fix thinko; make vm_physseg ptr swap really work.

Revision 1.681.2.6: download - view: text, markup, annotated - select for diffs
Wed Nov 10 03:36:27 2010 UTC (13 years, 11 months ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.681.2.5: preferred, colored; branchpoint 1.681: preferred, colored
Changes since revision 1.681.2.5: +3 -3 lines
Always use VM_PHYSMEM_PTR().

Revision 1.681.2.5: download - view: text, markup, annotated - select for diffs
Sat Nov 6 08:08:18 2010 UTC (14 years ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.681.2.4: preferred, colored; branchpoint 1.681: preferred, colored
Changes since revision 1.681.2.4: +3 -6 lines
Sync with HEAD.

Revision 1.659.2.4: download - view: text, markup, annotated - select for diffs
Sun Oct 24 22:48:01 2010 UTC (14 years ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.659.2.3: preferred, colored
Changes since revision 1.659.2.3: +88 -77 lines
Sync with HEAD

Revision 1.696: download - view: text, markup, annotated - select for diffs
Sun Oct 24 07:53:04 2010 UTC (14 years ago) by jruoho
Branches: MAIN
CVS tags: uebayasi-xip-base5, uebayasi-xip-base4
Diff to: previous 1.695: preferred, colored
Changes since revision 1.695: +3 -6 lines
Simplify acpi_enter_sleep_state() and guard it against NULL pointer
dereferences. Try to avoid referencing the global acpi_softc, which should
really be static or at least internal to acpi(4).

Revision 1.681.2.4: download - view: text, markup, annotated - select for diffs
Fri Oct 22 07:21:20 2010 UTC (14 years ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.681.2.3: preferred, colored; branchpoint 1.681: preferred, colored
Changes since revision 1.681.2.3: +13 -0 lines
Sync with HEAD (-D20101022).

Revision 1.695: download - view: text, markup, annotated - select for diffs
Thu Oct 21 11:17:55 2010 UTC (14 years ago) by yamt
Branches: MAIN
CVS tags: uebayasi-xip-base3
Diff to: previous 1.694: preferred, colored
Changes since revision 1.694: +4 -2 lines
don't forget to call nmi_init.

Revision 1.629.2.7: download - view: text, markup, annotated - select for diffs
Sat Oct 9 03:31:47 2010 UTC (14 years ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.629.2.6: preferred, colored; branchpoint 1.629: preferred, colored; next MAIN 1.630: preferred, colored
Changes since revision 1.629.2.6: +13 -2 lines
sync with head

Revision 1.694: download - view: text, markup, annotated - select for diffs
Tue Aug 17 22:24:04 2010 UTC (14 years, 2 months ago) by jym
Branches: MAIN
CVS tags: yamt-nfs-mp-base11
Diff to: previous 1.693: preferred, colored
Changes since revision 1.693: +4 -3 lines
Use SYSCTL_DESCR()

Revision 1.681.2.3: download - view: text, markup, annotated - select for diffs
Tue Aug 17 06:44:36 2010 UTC (14 years, 2 months ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.681.2.2: preferred, colored; branchpoint 1.681: preferred, colored
Changes since revision 1.681.2.2: +20 -10 lines
Sync with HEAD.

Revision 1.693: download - view: text, markup, annotated - select for diffs
Mon Aug 16 19:39:06 2010 UTC (14 years, 2 months ago) by jym
Branches: MAIN
Diff to: previous 1.692: preferred, colored
Changes since revision 1.692: +12 -2 lines
Add machdep.pae sysctl(7) for i386. Thanks to Paul and Joerg for their
reviews.

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

Revision 1.629.2.6: download - view: text, markup, annotated - select for diffs
Wed Aug 11 22:52:11 2010 UTC (14 years, 2 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.629.2.5: preferred, colored; branchpoint 1.629: preferred, colored
Changes since revision 1.629.2.5: +30 -24 lines
sync with head.

Revision 1.692: download - view: text, markup, annotated - select for diffs
Sat Aug 7 20:07:26 2010 UTC (14 years, 3 months ago) by jruoho
Branches: MAIN
CVS tags: yamt-nfs-mp-base10, uebayasi-xip-base2
Diff to: previous 1.691: preferred, colored
Changes since revision 1.691: +3 -3 lines
Do not try to disable ACPI if we can not enter to legacy mode. While it is
safe to call AcpiDisable() even if a system operates only in ACPI mode, this
leads to unpleasantly verbose error messages in ACPICA.

Revision 1.691: download - view: text, markup, annotated - select for diffs
Sat Jul 24 00:45:54 2010 UTC (14 years, 3 months ago) by jym
Branches: MAIN
Diff to: previous 1.690: preferred, colored
Changes since revision 1.690: +17 -6 lines
Welcome PAE inside i386 current.

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

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

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

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

Notes:

- reworked locore.S

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

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

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

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

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

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

- 64 bits atomic functions for pmap

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

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

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

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

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

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

Revision 1.690: download - view: text, markup, annotated - select for diffs
Thu Jul 15 23:20:34 2010 UTC (14 years, 3 months ago) by jym
Branches: MAIN
Diff to: previous 1.689: preferred, colored
Changes since revision 1.689: +4 -4 lines
With Xen, PDPpaddr should contain a guest physical address (== PFN).

Revision 1.689: download - view: text, markup, annotated - select for diffs
Thu Jul 15 22:19:19 2010 UTC (14 years, 3 months ago) by jym
Branches: MAIN
Diff to: previous 1.688: preferred, colored
Changes since revision 1.688: +3 -3 lines
pte0 is used to map the page required by bioscall() trampoline code, so
add VM_PROT_EXECUTE protection for it.

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

Revision 1.688: download - view: text, markup, annotated - select for diffs
Wed Jul 14 14:42:40 2010 UTC (14 years, 3 months ago) by jym
Branches: MAIN
Diff to: previous 1.687: preferred, colored
Changes since revision 1.687: +3 -3 lines
Fix typo in comment.

Revision 1.684.2.2: download - view: text, markup, annotated - select for diffs
Sun May 30 05:16:53 2010 UTC (14 years, 5 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.684.2.1: preferred, colored; branchpoint 1.684: preferred, colored
Changes since revision 1.684.2.1: +10 -15 lines
sync with head

Revision 1.687: download - view: text, markup, annotated - select for diffs
Tue May 4 23:27:13 2010 UTC (14 years, 6 months ago) by jym
Branches: MAIN
Diff to: previous 1.686: preferred, colored
Changes since revision 1.686: +2 -3 lines
Enable the NX bit feature for Xen i386pae and amd64 kernels.

Tested with Xen 3.1 and Xen 3.3, dom0 and domU, by bouyer@ and jym@.

Ok bouyer@.

Revision 1.681.2.2: download - view: text, markup, annotated - select for diffs
Fri Apr 30 14:39:29 2010 UTC (14 years, 6 months ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.681.2.1: preferred, colored; branchpoint 1.681: preferred, colored
Changes since revision 1.681.2.1: +15 -26 lines
Sync with HEAD.

Revision 1.681.2.1: download - view: text, markup, annotated - select for diffs
Wed Apr 28 08:31:06 2010 UTC (14 years, 6 months ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.681: preferred, colored
Changes since revision 1.681: +6 -6 lines
Always use struct vm_physseg *vm_physmem_ptrs[] in MD code.

Revision 1.686: download - view: text, markup, annotated - select for diffs
Fri Apr 23 16:07:33 2010 UTC (14 years, 6 months ago) by joerg
Branches: MAIN
CVS tags: uebayasi-xip-base1
Diff to: previous 1.685: preferred, colored
Changes since revision 1.685: +6 -6 lines
Use struct segment_descriptor for pcb_fsd and pcb_gsd instead of int[2].

Revision 1.644.4.10.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 23 04:17:29 2010 UTC (14 years, 6 months ago) by snj
Branches: netbsd-5-0
Diff to: previous 1.644.4.10: preferred, colored; next MAIN 1.644.4.11: preferred, colored
Changes since revision 1.644.4.10: +4 -8 lines
Apply patch (requested by jym in ticket #1380):
Fix the NX regression issue observed on amd64 kernels, where per-page
execution right was disabled (therefore leading to the inability
of the kernel to detect fraudulent use of memory mappings marked as not
being executable).

Revision 1.644.4.12: download - view: text, markup, annotated - select for diffs
Thu Apr 22 20:02:48 2010 UTC (14 years, 6 months ago) by snj
Branches: netbsd-5
CVS tags: netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, matt-nb5-pq3-base, matt-nb5-pq3
Diff to: previous 1.644.4.11: preferred, colored; branchpoint 1.644: preferred, colored
Changes since revision 1.644.4.11: +4 -8 lines
Apply patch (requested by jym in ticket #1380):
Fix the NX regression issue observed on amd64 kernels, where per-page
execution right was disabled (therefore leading to the inability
of the kernel to detect fraudulent use of memory mappings marked as not
being executable).

Revision 1.644.4.10.4.1: download - view: text, markup, annotated - select for diffs
Wed Apr 21 00:33:50 2010 UTC (14 years, 6 months ago) by matt
Branches: matt-nb5-mips64
CVS tags: matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-k15
Diff to: previous 1.644.4.10: preferred, colored
Changes since revision 1.644.4.10: +10 -11 lines
sync to netbsd-5

Revision 1.685: download - view: text, markup, annotated - select for diffs
Sun Apr 18 23:47:51 2010 UTC (14 years, 6 months ago) by jym
Branches: MAIN
Diff to: previous 1.684: preferred, colored
Changes since revision 1.684: +7 -11 lines
This patch fixes the NX regression issue observed on amd64 kernels, where
per-page execution right was disabled (therefore leading to the inability
of the kernel to detect fraudulent use of memory mappings marked as not
being executable).

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

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

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

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

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

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

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

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

XXX Should kernel rev be bumped?

XXX A similar patch should be pulled-up for NetBSD-5, hopefully tomorrow.

Revision 1.684.2.1: download - view: text, markup, annotated - select for diffs
Thu Mar 18 04:36:49 2010 UTC (14 years, 7 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.684: preferred, colored
Changes since revision 1.684: +37 -4 lines
Unify /dev/{mem,kmem,zero,null} implementations in MI code.  Based on patch
from Joerg Sonnenberger, proposed on tech-kern@, in February 2008.

Work and depression still in progress.

Revision 1.629.2.5: download - view: text, markup, annotated - select for diffs
Thu Mar 11 15:02:28 2010 UTC (14 years, 7 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.629.2.4: preferred, colored; branchpoint 1.629: preferred, colored
Changes since revision 1.629.2.4: +48 -57 lines
sync with head

Revision 1.684: download - view: text, markup, annotated - select for diffs
Mon Mar 1 01:35:11 2010 UTC (14 years, 8 months ago) by jym
Branches: MAIN
CVS tags: yamt-nfs-mp-base9
Branch point for: rmind-uvmplock
Diff to: previous 1.683: preferred, colored
Changes since revision 1.683: +7 -7 lines
Do not forget that ptoa() casts the result to vaddr_t, which is bad
for paddr_t values under i386 PAE. Use ctob() instead.

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

Compile tested for i386 and amd64. No regression expected.

Revision 1.683: download - view: text, markup, annotated - select for diffs
Mon Mar 1 01:15:23 2010 UTC (14 years, 8 months ago) by jym
Branches: MAIN
Diff to: previous 1.682: preferred, colored
Changes since revision 1.682: +3 -3 lines
Change rbus_min_start_hint() semantic for i386. "ram" is now psize_t
(instead of size_t) to avoid possible overflow when system may have more
than 4GB of memory (like PAE).

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

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

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

Compile tested for GENERIC only. No regression expected.

Revision 1.682: download - view: text, markup, annotated - select for diffs
Mon Feb 8 19:02:29 2010 UTC (14 years, 8 months ago) by joerg
Branches: MAIN
Diff to: previous 1.681: preferred, colored
Changes since revision 1.681: +2 -9 lines
Remove separate mb_map. The nmbclusters is computed at boot time based
on the amount of physical memory and limited by NMBCLUSTERS if present.
Architectures without direct mapping also limit it based on the kmem_map
size, which is used as backing store. On i386 and ARM, the maximum KVA
used for mbuf clusters is limited to 64MB by default.

The old default limits and limits based on GATEWAY have been removed.
key_registered_sb_max is hard-wired to a value derived from 2048
clusters.

Revision 1.681: download - view: text, markup, annotated - select for diffs
Thu Dec 10 14:13:50 2009 UTC (14 years, 10 months ago) by matt
Branches: MAIN
CVS tags: uebayasi-xip-base, matt-premerge-20091211
Branch point for: uebayasi-xip
Diff to: previous 1.680: preferred, colored
Changes since revision 1.680: +3 -3 lines
Change u_long to vaddr_t/vsize_t in exec code where appropriate (mostly
involves setregs and vmcmds).  Should result in no code differences.

Revision 1.680: download - view: text, markup, annotated - select for diffs
Sun Nov 29 04:15:42 2009 UTC (14 years, 11 months ago) by rmind
Branches: MAIN
Diff to: previous 1.679: preferred, colored
Changes since revision 1.679: +7 -10 lines
Replace l_addr with uvm_lwp_getuarea() in various MD code, mostly cpu_lwp_fork().

Revision 1.679: download - view: text, markup, annotated - select for diffs
Fri Nov 27 03:23:10 2009 UTC (14 years, 11 months ago) by rmind
Branches: MAIN
Diff to: previous 1.678: preferred, colored
Changes since revision 1.678: +5 -5 lines
- Use uvm_lwp_setuarea() instead of directly setting address to lwp_t::l_addr.
- Replace most remaining uses of l_addr with uvm_lwp_getuarea() or lwp_getpcb().
- Amend assembly in ports where it accesses PCB via struct user.
- Rename L_ADDR to L_PCB in few places.  Reduce sys/user.h inclusions.

Revision 1.678: download - view: text, markup, annotated - select for diffs
Thu Nov 26 00:19:18 2009 UTC (14 years, 11 months ago) by matt
Branches: MAIN
Diff to: previous 1.677: preferred, colored
Changes since revision 1.677: +6 -8 lines
Kill proc0paddr.  Use lwp0.l_addr instead.

Revision 1.677: download - view: text, markup, annotated - select for diffs
Wed Nov 25 14:28:50 2009 UTC (14 years, 11 months ago) by rmind
Branches: MAIN
Diff to: previous 1.676: preferred, colored
Changes since revision 1.676: +3 -3 lines
Remove IPL_LPT and IPL_IPI aliases, use the actual IPLs.
Fix some broken comments.

Revision 1.676: download - view: text, markup, annotated - select for diffs
Mon Nov 23 05:01:12 2009 UTC (14 years, 11 months ago) by dholland
Branches: MAIN
Diff to: previous 1.675: preferred, colored
Changes since revision 1.675: +3 -3 lines
When converting an if/panic to a KASSERT it's necessary to reverse the
sense of the test. Makes i386 boot again.

HI RMIND

Revision 1.675: download - view: text, markup, annotated - select for diffs
Sat Nov 21 15:38:43 2009 UTC (14 years, 11 months ago) by rmind
Branches: MAIN
Diff to: previous 1.674: preferred, colored
Changes since revision 1.674: +3 -3 lines
Missed fix for Xen builds.

Revision 1.674: download - view: text, markup, annotated - select for diffs
Sat Nov 21 03:11:00 2009 UTC (14 years, 11 months ago) by rmind
Branches: MAIN
Diff to: previous 1.673: preferred, colored
Changes since revision 1.673: +29 -23 lines
Use lwp_getpcb() on x86 MD code, clean from struct user usage.

Revision 1.673: download - view: text, markup, annotated - select for diffs
Sat Nov 7 07:27:44 2009 UTC (15 years ago) by cegger
Branches: MAIN
Diff to: previous 1.672: preferred, colored
Changes since revision 1.672: +9 -8 lines
Add a flags argument to pmap_kenter_pa(9).
Patch showed on tech-kern@ http://mail-index.netbsd.org/tech-kern/2009/11/04/msg006434.html
No objections.

Revision 1.659.2.3: download - view: text, markup, annotated - select for diffs
Sun Nov 1 13:58:21 2009 UTC (15 years ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.659.2.2: preferred, colored
Changes since revision 1.659.2.2: +7 -28 lines
Sync with HEAD.

Revision 1.586.2.6: download - view: text, markup, annotated - select for diffs
Sun Oct 18 15:20:42 2009 UTC (15 years ago) by bouyer
Branches: netbsd-4
Diff to: previous 1.586.2.5: preferred, colored; branchpoint 1.586: preferred, colored; next MAIN 1.587: preferred, colored
Changes since revision 1.586.2.5: +8 -2 lines
Pull up following revision(s) (requested by mlelstv in ticket #1363):
	sys/arch/i386/isa/npx.c: revision 1.132 via patch
	sys/arch/amd64/amd64/fpu.c: revision 1.29 via patch
	sys/arch/amd64/amd64/machdep.c: revision 1.105 via patch
	sys/arch/i386/i386/machdep.c: revision 1.647 via patch
PR port-i386/39299 FPU use in signal handlers is unsafe
Ensure FP state is reset, if FP is used in a signal handler.
Fixes PR kern/39299 for 32bit code.

Revision 1.672: download - view: text, markup, annotated - select for diffs
Mon Oct 5 23:59:30 2009 UTC (15 years, 1 month ago) by rmind
Branches: MAIN
Diff to: previous 1.671: preferred, colored
Changes since revision 1.671: +2 -6 lines
Remove X86_IPI_WRITE_MSR (and msr_ipifuncs.c), replace all uses in drivers
with xc_broadcast().  AMD K8 PowerNow driver tested by <jakllsch>, thanks!

Closes PR/37665.

Revision 1.644.4.11: download - view: text, markup, annotated - select for diffs
Sat Oct 3 23:49:50 2009 UTC (15 years, 1 month ago) by snj
Branches: netbsd-5
Diff to: previous 1.644.4.10: preferred, colored; branchpoint 1.644: preferred, colored
Changes since revision 1.644.4.10: +10 -11 lines
Pull up following revision(s) (requested by bouyer in ticket #1054):
	sys/arch/amd64/amd64/machdep.c: revision 1.124
	sys/arch/i386/i386/machdep.c: revision 1.660
Prepare for PCI frontend support in Xen3 domUs:
call x86_bus_space_init() and x86_bus_space_mallocok() if we have ISA or PCI
  devices configured; not only for non-Xen or dom0 Xen
On Xen, always call PHYSDEVOP_SET_IOPL on context switch
on amd64, also call PHYSDEVOP_SET_IOPL from x86_64_proc0_tss_ldt_init()

Revision 1.629.2.4: download - view: text, markup, annotated - select for diffs
Wed Aug 19 18:46:19 2009 UTC (15 years, 2 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.629.2.3: preferred, colored; branchpoint 1.629: preferred, colored
Changes since revision 1.629.2.3: +7 -24 lines
sync with head.

Revision 1.671: download - view: text, markup, annotated - select for diffs
Tue Aug 18 16:41:02 2009 UTC (15 years, 2 months ago) by jmcneill
Branches: MAIN
CVS tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7
Diff to: previous 1.670: preferred, colored
Changes since revision 1.670: +6 -6 lines
Switch to ACPICA 20090730, and update for API changes.

Revision 1.670: download - view: text, markup, annotated - select for diffs
Wed Jul 29 12:02:05 2009 UTC (15 years, 3 months ago) by cegger
Branches: MAIN
Diff to: previous 1.669: preferred, colored
Changes since revision 1.669: +3 -20 lines
remove Xen2 support.
ok bouyer@

Revision 1.659.2.2: download - view: text, markup, annotated - select for diffs
Thu Jul 23 23:31:36 2009 UTC (15 years, 3 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.659.2.1: preferred, colored
Changes since revision 1.659.2.1: +52 -27 lines
Sync with HEAD.

Revision 1.629.2.3: download - view: text, markup, annotated - select for diffs
Sat Jul 18 14:52:53 2009 UTC (15 years, 3 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.629.2.2: preferred, colored; branchpoint 1.629: preferred, colored
Changes since revision 1.629.2.2: +52 -27 lines
sync with head.

Revision 1.669: download - view: text, markup, annotated - select for diffs
Fri Jun 26 23:40:27 2009 UTC (15 years, 4 months ago) by dyoung
Branches: MAIN
CVS tags: yamt-nfs-mp-base6, jymxensuspend-base
Diff to: previous 1.668: preferred, colored
Changes since revision 1.668: +52 -27 lines
During a normal shutdown, gracefully tear down arbitrary stacks of
filesystems and (pseudo-)devices, according to the algorithm at A3
and A4, below.

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

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

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

Here is the old order of operations:

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

And here is the new order:

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

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

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

Revision 1.659.2.1: download - view: text, markup, annotated - select for diffs
Wed May 13 17:17:49 2009 UTC (15 years, 5 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.659: preferred, colored
Changes since revision 1.659: +38 -37 lines
Sync with HEAD.

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

Revision 1.629.2.2: download - view: text, markup, annotated - select for diffs
Mon May 4 08:11:16 2009 UTC (15 years, 6 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.629.2.1: preferred, colored; branchpoint 1.629: preferred, colored
Changes since revision 1.629.2.1: +133 -550 lines
sync with head.

Revision 1.644.2.3: download - view: text, markup, annotated - select for diffs
Tue Apr 28 07:34:08 2009 UTC (15 years, 6 months ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.644.2.2: preferred, colored; branchpoint 1.644: preferred, colored; next MAIN 1.645: preferred, colored
Changes since revision 1.644.2.2: +20 -24 lines
Sync with HEAD.

Revision 1.644.4.10: download - view: text, markup, annotated - select for diffs
Sat Apr 4 17:39:09 2009 UTC (15 years, 7 months ago) by snj
Branches: netbsd-5
CVS tags: netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20091211, matt-nb4-mips64-k7-u2a-k9b
Branch point for: netbsd-5-0, matt-nb5-mips64
Diff to: previous 1.644.4.9: preferred, colored; branchpoint 1.644: preferred, colored
Changes since revision 1.644.4.9: +11 -10 lines
Pull up following revision(s) (requested by ad in ticket #656):
	sys/arch/amd64/amd64/gdt.c: revision 1.21 via patch
	sys/arch/amd64/amd64/machdep.c: revision 1.129 via patch
	sys/arch/i386/i386/gdt.c: revision 1.47 via patch
	sys/arch/i386/i386/kvm86.c: revision 1.17 via patch
	sys/arch/i386/i386/locore.S: revision 1.85 via patch
	sys/arch/i386/i386/machdep.c: revision 1.666 via patch
	sys/arch/i386/i386/vector.S: revision 1.45 via patch
	sys/arch/i386/include/pcb.h: revision 1.47 via patch
	sys/arch/x86/include/pmap.h: revision 1.22 via patch
	sys/arch/x86/include/sysarch.h: revision 1.8 via patch
	sys/arch/x86/x86/pmap.c: revision 1.80 via patch
	sys/arch/x86/x86/sys_machdep.c: revision 1.17 via patch
	sys/compat/linux/arch/i386/linux_machdep.c: revision 1.143 via patch
	sys/kern/init_main.c: revision 1.384 via patch
PR port-i386/40143 Viewing an mpeg transport stream with mplayer causes crash
Fix numerous problems:
1. LDT updates are not atomic.
2. Number of processes running with private LDTs and/or I/O bitmaps
   is not capped. System with high maxprocs can be paniced.
3. LDTR can be leaked over context switch.
4. GDT slot allocations can race, giving the same LDT slot to two procs.
5. Incomplete interrupt/trap frames can be stacked.
6. In some rare cases segment faults are not handled correctly.

Revision 1.668: download - view: text, markup, annotated - select for diffs
Wed Apr 1 03:56:54 2009 UTC (15 years, 7 months ago) by tls
Branches: MAIN
CVS tags: yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base
Diff to: previous 1.667: preferred, colored
Changes since revision 1.667: +3 -2 lines
Fix probe for VIA C3 and successors -- these are CPU family 6, not 5.
The broken probe was causing the VIA padlock driver to never attach!
Now we can see that its AES appears to be broken -- it makes FAST_IPSEC
ESP not work, on systems where it works fine with cryptosoft.

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

Revision 1.667: download - view: text, markup, annotated - select for diffs
Sun Mar 29 10:58:54 2009 UTC (15 years, 7 months ago) by ad
Branches: MAIN
Diff to: previous 1.666: preferred, colored
Changes since revision 1.666: +5 -11 lines
Make i386 use banner(). amd64 not converted yet as it seems to trip into
a bug in format_bytes().

Revision 1.666: download - view: text, markup, annotated - select for diffs
Sat Mar 21 14:41:29 2009 UTC (15 years, 7 months ago) by ad
Branches: MAIN
Diff to: previous 1.665: preferred, colored
Changes since revision 1.665: +11 -10 lines
PR port-i386/40143 Viewing an mpeg transport stream with mplayer causes crash

Fix numerous problems:

1. LDT updates are not atomic.

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

3. LDTR can be leaked over context switch.

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

5. Incomplete interrupt/trap frames can be stacked.

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

Revision 1.665: download - view: text, markup, annotated - select for diffs
Mon Mar 16 09:37:35 2009 UTC (15 years, 7 months ago) by cegger
Branches: MAIN
Diff to: previous 1.664: preferred, colored
Changes since revision 1.664: +7 -7 lines
ansify function definitions

Revision 1.644.2.2: download - view: text, markup, annotated - select for diffs
Tue Mar 3 18:28:59 2009 UTC (15 years, 8 months ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.644.2.1: preferred, colored; branchpoint 1.644: preferred, colored
Changes since revision 1.644.2.1: +22 -25 lines
Sync with HEAD.

Revision 1.644.4.9: download - view: text, markup, annotated - select for diffs
Mon Mar 2 20:09:04 2009 UTC (15 years, 8 months ago) by snj
Branches: netbsd-5
CVS tags: netbsd-5-0-RC3
Diff to: previous 1.644.4.8: preferred, colored; branchpoint 1.644: preferred, colored
Changes since revision 1.644.4.8: +6 -6 lines
Pull up following revision(s) (requested by jmcneill in ticket #529):
	sys/arch/i386/i386/machdep.c: revision 1.664
PR# port-i386/38936: system can not power down via acpi
Merge change from amd64 machdep.c revision 1.42:
in cpu_reboot(), only halt the other CPUs after we've done the powerdown stuff.
the ACPI code may end up removing some pmap entries, which wants the other
CPUs to still be running to handle TLB invalidations.

Revision 1.644.4.8: download - view: text, markup, annotated - select for diffs
Mon Mar 2 20:00:20 2009 UTC (15 years, 8 months ago) by snj
Branches: netbsd-5
Diff to: previous 1.644.4.7: preferred, colored; branchpoint 1.644: preferred, colored
Changes since revision 1.644.4.7: +6 -2 lines
Pull up following revision(s) (requested by jmcneill in ticket #526):
	sys/arch/amd64/amd64/machdep.c: revision 1.128
	sys/arch/i386/i386/machdep.c: revision 1.663
PR# port-i386/40751: power button does not work after halt
PR# kern/37506: Have to hold power button for 5 seconds to turn off Laptop
    after "halt" command.
Transfer the system from ACPI to Legacy mode if RB_HALT is set.

Revision 1.664: download - view: text, markup, annotated - select for diffs
Thu Feb 26 15:07:33 2009 UTC (15 years, 8 months ago) by jmcneill
Branches: MAIN
CVS tags: nick-hppapmap-base2
Diff to: previous 1.663: preferred, colored
Changes since revision 1.663: +6 -6 lines
PR# port-i386/38936: system can not power down via acpi

Merge change from amd64 machdep.c revision 1.42:

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

Revision 1.663: download - view: text, markup, annotated - select for diffs
Thu Feb 26 13:56:46 2009 UTC (15 years, 8 months ago) by jmcneill
Branches: MAIN
Diff to: previous 1.662: preferred, colored
Changes since revision 1.662: +6 -2 lines
PR# port-i386/40751: power button does not work after halt
PR# kern/37506: Have to hold power button for 5 seconds to turn off Laptop
    after "halt" command.

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

Revision 1.644.4.7: download - view: text, markup, annotated - select for diffs
Wed Feb 25 03:21:56 2009 UTC (15 years, 8 months ago) by snj
Branches: netbsd-5
Diff to: previous 1.644.4.6: preferred, colored; branchpoint 1.644: preferred, colored
Changes since revision 1.644.4.6: +3 -2 lines
Apply patch (requested by ahoka in ticket #489):
Add missing opt_multiboot.h.  Fixes issues when using a multiboot
bootloader, like GRUB:
- dmesg did not contain the information about the loader
- /dev/ksyms did not work

Revision 1.662: download - view: text, markup, annotated - select for diffs
Sun Feb 22 18:05:42 2009 UTC (15 years, 8 months ago) by ahoka
Branches: MAIN
Diff to: previous 1.661: preferred, colored
Changes since revision 1.661: +3 -2 lines
Add a missing opt_multiboot.h into sys/arch/i386/i386/machdep.c.
Also do the missed rename of multiboot_ksyms_init to
multiboot_ksyms_addsyms_elf to compile with MULTIBOOT set.

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

Ok by jmcneill, joerg.

Revision 1.661: download - view: text, markup, annotated - select for diffs
Fri Feb 13 22:41:02 2009 UTC (15 years, 8 months ago) by apb
Branches: MAIN
Diff to: previous 1.660: preferred, colored
Changes since revision 1.660: +3 -2 lines
Use "defopt MODULAR" in sys/conf/files, and #include "opt_modular.h"
in all kernel sources that use the MODULAR option.
Proposed in tech-kern on 18 Jan 2009.

Revision 1.660: download - view: text, markup, annotated - select for diffs
Fri Feb 13 20:42:24 2009 UTC (15 years, 8 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.659: preferred, colored
Changes since revision 1.659: +10 -11 lines
Prepare for PCI frontend support in Xen3 domUs:
call x86_bus_space_init() and x86_bus_space_mallocok() if we have ISA or PCI
  devices configured; not only for non-Xen or dom0 Xen
On Xen, always call PHYSDEVOP_SET_IOPL on context switch
on amd64, also call PHYSDEVOP_SET_IOPL from x86_64_proc0_tss_ldt_init()

Revision 1.659: download - view: text, markup, annotated - select for diffs
Thu Feb 5 22:26:53 2009 UTC (15 years, 9 months ago) by dyoung
Branches: MAIN
Branch point for: jym-xensuspend
Diff to: previous 1.658: preferred, colored
Changes since revision 1.658: +3 -3 lines
Explicitly initialize mem_cluster_cnt to 0 for my peace of mind.

Revision 1.644.4.6: download - view: text, markup, annotated - select for diffs
Mon Feb 2 21:42:07 2009 UTC (15 years, 9 months ago) by snj
Branches: netbsd-5
CVS tags: netbsd-5-0-RC2
Diff to: previous 1.644.4.5: preferred, colored; branchpoint 1.644: preferred, colored
Changes since revision 1.644.4.5: +2 -4 lines
Pull up following revision(s) (requested by ad in ticket #396):
	sys/arch/i386/i386/machdep.c: revision 1.658
remove extra variable

Revision 1.644.4.5: download - view: text, markup, annotated - select for diffs
Mon Feb 2 21:38:50 2009 UTC (15 years, 9 months ago) by snj
Branches: netbsd-5
Diff to: previous 1.644.4.4: preferred, colored; branchpoint 1.644: preferred, colored
Changes since revision 1.644.4.4: +3 -40 lines
Pull up following revision(s) (requested by ad in ticket #396):
	sys/arch/amd64/amd64/machdep.c: revision 1.122
	sys/arch/i386/i386/machdep.c: revision 1.657
	sys/arch/x86/include/cpufunc.h: revision 1.11
	sys/arch/x86/x86/x86_machdep.c: revision 1.28
factor out common reset code.

Revision 1.644.4.4: download - view: text, markup, annotated - select for diffs
Mon Feb 2 21:26:18 2009 UTC (15 years, 9 months ago) by snj
Branches: netbsd-5
Diff to: previous 1.644.4.3: preferred, colored; branchpoint 1.644: preferred, colored
Changes since revision 1.644.4.3: +6 -4 lines
Pull up following revision(s) (requested by ad in ticket #396):
	sys/arch/amd64/amd64/machdep.c: revision 1.121
	sys/arch/i386/i386/machdep.c: revision 1.656
Make previous compile.

Revision 1.644.4.3: download - view: text, markup, annotated - select for diffs
Mon Feb 2 21:24:31 2009 UTC (15 years, 9 months ago) by snj
Branches: netbsd-5
Diff to: previous 1.644.4.2: preferred, colored; branchpoint 1.644: preferred, colored
Changes since revision 1.644.4.2: +31 -2 lines
Pull up following revision(s) (requested by ad in ticket #396):
	sys/arch/i386/i386/machdep.c: revision 1.655
Attempt to force resets using two more methods:
1. Reset Control register at I/O port 0xcf9
2. Fast A20 and Init register at I/O port 0x92
Requested by ad@

Revision 1.658: download - view: text, markup, annotated - select for diffs
Tue Jan 27 22:00:12 2009 UTC (15 years, 9 months ago) by christos
Branches: MAIN
Diff to: previous 1.657: preferred, colored
Changes since revision 1.657: +2 -4 lines
remove extra variable

Revision 1.657: download - view: text, markup, annotated - select for diffs
Tue Jan 27 21:59:24 2009 UTC (15 years, 9 months ago) by christos
Branches: MAIN
Diff to: previous 1.656: preferred, colored
Changes since revision 1.656: +3 -40 lines
factor out common reset code.

Revision 1.656: download - view: text, markup, annotated - select for diffs
Tue Jan 27 21:13:57 2009 UTC (15 years, 9 months ago) by ad
Branches: MAIN
Diff to: previous 1.655: preferred, colored
Changes since revision 1.655: +6 -4 lines
Make previous compile.

Revision 1.655: download - view: text, markup, annotated - select for diffs
Tue Jan 27 16:13:13 2009 UTC (15 years, 9 months ago) by christos
Branches: MAIN
Diff to: previous 1.654: preferred, colored
Changes since revision 1.654: +31 -2 lines
Attempt to force resets using two more methods:
1. Reset Control register at I/O port 0xcf9
2. Fast A20 and Init register at I/O port 0x92

Requested by ad@

Revision 1.644.2.1: download - view: text, markup, annotated - select for diffs
Mon Jan 19 13:16:15 2009 UTC (15 years, 9 months ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.644: preferred, colored
Changes since revision 1.644: +45 -500 lines
Sync with HEAD.

Revision 1.626.6.6: download - view: text, markup, annotated - select for diffs
Sat Jan 17 13:28:03 2009 UTC (15 years, 9 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.626.6.5: preferred, colored; branchpoint 1.626: preferred, colored; next MAIN 1.627: preferred, colored
Changes since revision 1.626.6.5: +77 -492 lines
Sync with HEAD.

Revision 1.654: download - view: text, markup, annotated - select for diffs
Mon Dec 15 22:20:52 2008 UTC (15 years, 10 months ago) by cegger
Branches: MAIN
CVS tags: mjf-devfs2-base
Diff to: previous 1.653: preferred, colored
Changes since revision 1.653: +3 -3 lines
cleanup BIOS memmap code:
- get rid of some nested externs
- reduce dependency on global variables
- some preparations for upcoming pmem(9)

Revision 1.637.2.2: download - view: text, markup, annotated - select for diffs
Sat Dec 13 01:13:14 2008 UTC (15 years, 10 months ago) by haad
Branches: haad-dm
Diff to: previous 1.637.2.1: preferred, colored; branchpoint 1.637: preferred, colored; next MAIN 1.638: preferred, colored
Changes since revision 1.637.2.1: +46 -501 lines
Update haad-dm branch to haad-dm-base2.

Revision 1.653: download - view: text, markup, annotated - select for diffs
Sun Nov 30 18:21:34 2008 UTC (15 years, 11 months ago) by martin
Branches: MAIN
CVS tags: haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Diff to: previous 1.652: preferred, colored
Changes since revision 1.652: +5 -5 lines
As discussed on tech-kern: mutex_init is too heavyweight for early bootstrap
phases, so move the initialization of the ksyms mutex back into main via
a function called ksyms_init. Rename the existing (but quite different)
ksyms_init* variations into ksyms_addsyms_elf() and ksyms_addsyms_explicit()
and adapt machdep code accordingly.

Revision 1.652: download - view: text, markup, annotated - select for diffs
Thu Nov 20 10:53:09 2008 UTC (15 years, 11 months ago) by ad
Branches: MAIN
Diff to: previous 1.651: preferred, colored
Changes since revision 1.651: +2 -96 lines
Put the COMPAT_NOMID stuff into its own file.

Revision 1.644.4.2: download - view: text, markup, annotated - select for diffs
Thu Nov 20 03:45:29 2008 UTC (15 years, 11 months ago) by snj
Branches: netbsd-5
CVS tags: netbsd-5-0-RC1
Diff to: previous 1.644.4.1: preferred, colored; branchpoint 1.644: preferred, colored
Changes since revision 1.644.4.1: +13 -16 lines
Pull up following revision(s) (requested by ad in ticket #71):
	sys/arch/i386/isa/npx.c: revision 1.132
	sys/arch/amd64/amd64/fpu.c: revision 1.29
	sys/arch/amd64/amd64/machdep.c: revision 1.105
	sys/arch/i386/i386/machdep.c: revision 1.647
PR port-i386/39299 FPU use in signal handlers is unsafe

Revision 1.651: download - view: text, markup, annotated - select for diffs
Wed Nov 19 18:35:59 2008 UTC (15 years, 11 months ago) by ad
Branches: MAIN
Diff to: previous 1.650: preferred, colored
Changes since revision 1.650: +8 -36 lines
Make the emulations, exec formats, coredump, NFS, and the NFS server
into modules. By and large this commit:

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

Revision 1.644.4.1: download - view: text, markup, annotated - select for diffs
Mon Nov 17 18:53:54 2008 UTC (15 years, 11 months ago) by snj
Branches: netbsd-5
Diff to: previous 1.644: preferred, colored
Changes since revision 1.644: +3 -3 lines
Pull up following revision(s) (requested by ad in ticket #74):
	sys/arch/i386/isa/npx.c: revision 1.131
	sys/arch/amd64/amd64/fpu.c: revision 1.28
	sys/arch/i386/i386/genassym.cf: revision 1.77
	sys/arch/i386/i386/autoconf.c: revision 1.93
	sys/arch/amd64/amd64/locore.S: revision 1.48
	sys/arch/amd64/amd64/machdep.c: revision 1.104
	sys/arch/i386/i386/machdep.c: revision 1.646
	sys/arch/amd64/amd64/genassym.cf: revision 1.38
	sys/arch/i386/i386/locore.S: revision 1.79
PR port-amd64/38293 panic: fp_save ipi didn't
Fix race conditions in FPU IPI handling.

Revision 1.650: download - view: text, markup, annotated - select for diffs
Fri Nov 14 00:41:36 2008 UTC (15 years, 11 months ago) by cegger
Branches: MAIN
Diff to: previous 1.649: preferred, colored
Changes since revision 1.649: +10 -354 lines
merge BIOS memmap code from i386/i386/machdep.c:init386() and amd64/amd64/machdep.c:init_x86_64 into x86/x86/x86_machdep.c

Revision 1.649: download - view: text, markup, annotated - select for diffs
Wed Nov 12 12:36:02 2008 UTC (15 years, 11 months ago) by ad
Branches: MAIN
Diff to: previous 1.648: preferred, colored
Changes since revision 1.648: +3 -3 lines
Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.

Revision 1.648: download - view: text, markup, annotated - select for diffs
Wed Nov 12 01:14:01 2008 UTC (15 years, 11 months ago) by cegger
Branches: MAIN
Diff to: previous 1.647: preferred, colored
Changes since revision 1.647: +27 -23 lines
cosmetic changes:
use PRIx64 rather %qx
cache bootinfo addr and size as done in amd64/amd64/machdep.c:init_x86_64()
No functional change intended.

Revision 1.647: download - view: text, markup, annotated - select for diffs
Tue Nov 11 15:53:53 2008 UTC (15 years, 11 months ago) by ad
Branches: MAIN
Diff to: previous 1.646: preferred, colored
Changes since revision 1.646: +13 -16 lines
PR port-i386/39299 FPU use in signal handlers is unsafe

Revision 1.646: download - view: text, markup, annotated - select for diffs
Tue Nov 11 14:40:18 2008 UTC (15 years, 11 months ago) by ad
Branches: MAIN
Diff to: previous 1.645: preferred, colored
Changes since revision 1.645: +3 -3 lines
PR port-amd64/38293 panic: fp_save ipi didn't

Fix race conditions in FPU IPI handling.

Revision 1.645: download - view: text, markup, annotated - select for diffs
Tue Nov 11 06:46:42 2008 UTC (15 years, 11 months ago) by dyoung
Branches: MAIN
Diff to: previous 1.644: preferred, colored
Changes since revision 1.644: +13 -3 lines
It is not appropriate to call pmf_system_shutdown(9) from
doshutdownhooks(9): shutdown hooks registered by shutdownhook_establish(9)
expect to be called with interrupts disabled, but shutdown hooks
registered with pmf_device_register1(9) expect to be called with
interrupts enabled.  So I have made two changes:

1 Do not call pmf_system_shutdown() from doshutdownhooks().  Instead,
change every call to doshutdownhooks() to a call to doshutdownhooks()
followed by a call to pmf_system_shutdown().  No functional change
is intended by this change.

2 Make i386 re-enable interrupts briefly while it calls
pmf_system_shutdown().  I leave it to others either to fix the
other ports, or to factor out some MI shutdown code, as joerg@
suggests, and fix that.  Note that a functional change *is* intended
by this change.

I hope that this patch will stop us from flip-flopping between
calling doshutdownhooks() and pmf_system_shutdown() sometimes with
and sometimes without interrupts enabled.

Revision 1.644: download - view: text, markup, annotated - select for diffs
Tue Oct 21 15:46:32 2008 UTC (16 years ago) by cegger
Branches: MAIN
CVS tags: netbsd-5-base, matt-mips64-base2
Branch point for: nick-hppapmap, netbsd-5
Diff to: previous 1.643: preferred, colored
Changes since revision 1.643: +3 -3 lines
introduce two macros: xendomain_is_dom0() and xendomain_is_privileged(). Use them.

Revision 1.637.2.1: download - view: text, markup, annotated - select for diffs
Sun Oct 19 22:15:48 2008 UTC (16 years ago) by haad
Branches: haad-dm
Diff to: previous 1.637: preferred, colored
Changes since revision 1.637: +64 -15 lines
Sync with HEAD.

Revision 1.643: download - view: text, markup, annotated - select for diffs
Wed Oct 15 06:51:17 2008 UTC (16 years ago) by wrstuden
Branches: MAIN
CVS tags: haad-dm-base1
Diff to: previous 1.642: preferred, colored
Changes since revision 1.642: +42 -2 lines
Merge wrstuden-revivesa into HEAD.

Revision 1.626.6.5: download - view: text, markup, annotated - select for diffs
Sun Sep 28 10:39:59 2008 UTC (16 years, 1 month ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.626.6.4: preferred, colored; branchpoint 1.626: preferred, colored
Changes since revision 1.626.6.4: +22 -13 lines
Sync with HEAD.

Revision 1.634.2.6: download - view: text, markup, annotated - select for diffs
Wed Sep 24 16:38:49 2008 UTC (16 years, 1 month ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.634.2.5: preferred, colored; next MAIN 1.635: preferred, colored
Changes since revision 1.634.2.5: +3 -4 lines
Merge in changes between wrstuden-revivesa-base-2 and
wrstuden-revivesa-base-3.

Revision 1.642: download - view: text, markup, annotated - select for diffs
Thu Sep 18 15:57:04 2008 UTC (16 years, 1 month ago) by christos
Branches: MAIN
CVS tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3
Diff to: previous 1.641: preferred, colored
Changes since revision 1.641: +3 -3 lines
Define a PSL_CLEARSIG macro for the psl flags to be cleared on signal delivery
and use it everywhere.

Revision 1.634.2.5: download - view: text, markup, annotated - select for diffs
Thu Sep 18 04:33:27 2008 UTC (16 years, 1 month ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.634.2.4: preferred, colored
Changes since revision 1.634.2.4: +23 -21 lines
Sync with wrstuden-revivesa-base-2.

Revision 1.641: download - view: text, markup, annotated - select for diffs
Tue Sep 9 12:09:31 2008 UTC (16 years, 1 month ago) by tron
Branches: MAIN
Diff to: previous 1.640: preferred, colored
Changes since revision 1.640: +2 -3 lines
Remove duplicate definition of "bootinfo" structure.
Patch provided by Juan RP in PR kern/39495.

Revision 1.640: download - view: text, markup, annotated - select for diffs
Tue Aug 26 08:43:00 2008 UTC (16 years, 2 months ago) by cegger
Branches: MAIN
CVS tags: wrstuden-revivesa-base-2
Diff to: previous 1.639: preferred, colored
Changes since revision 1.639: +17 -4 lines
Xen: Mark NMI and machine check handlers as interrupt gates.

Revision 1.639: download - view: text, markup, annotated - select for diffs
Fri Aug 15 03:14:54 2008 UTC (16 years, 2 months ago) by simonb
Branches: MAIN
Diff to: previous 1.638: preferred, colored
Changes since revision 1.638: +4 -3 lines
Wrap long line.

Revision 1.638: download - view: text, markup, annotated - select for diffs
Tue Aug 5 17:09:17 2008 UTC (16 years, 3 months ago) by drochner
Branches: MAIN
Diff to: previous 1.637: preferred, colored
Changes since revision 1.637: +6 -10 lines
Disable interrupts before shutdownhooks are run, as all other ports.
shutdownhooks need to use polling functions (and most do).

Revision 1.636.2.1: download - view: text, markup, annotated - select for diffs
Thu Jul 3 18:37:53 2008 UTC (16 years, 4 months ago) by simonb
Branches: simonb-wapbl
Diff to: previous 1.636: preferred, colored; next MAIN 1.637: preferred, colored
Changes since revision 1.636: +2 -10 lines
Sync with head.

Revision 1.626.6.4: download - view: text, markup, annotated - select for diffs
Wed Jul 2 19:08:16 2008 UTC (16 years, 4 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.626.6.3: preferred, colored; branchpoint 1.626: preferred, colored
Changes since revision 1.626.6.3: +0 -8 lines
Sync with HEAD.

Revision 1.637: download - view: text, markup, annotated - select for diffs
Wed Jul 2 17:28:55 2008 UTC (16 years, 4 months ago) by ad
Branches: MAIN
CVS tags: simonb-wapbl-nbase, simonb-wapbl-base
Branch point for: haad-dm
Diff to: previous 1.636: preferred, colored
Changes since revision 1.636: +2 -10 lines
Replce exec_map with a pool. Proposed on tech-kern@, reviewed by chs@.

Revision 1.626.6.3: download - view: text, markup, annotated - select for diffs
Sun Jun 29 09:32:57 2008 UTC (16 years, 4 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.626.6.2: preferred, colored; branchpoint 1.626: preferred, colored
Changes since revision 1.626.6.2: +8 -4 lines
Sync with HEAD.

Revision 1.634.2.4: download - view: text, markup, annotated - select for diffs
Mon Jun 23 04:30:26 2008 UTC (16 years, 4 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.634.2.3: preferred, colored
Changes since revision 1.634.2.3: +11 -8 lines
Sync w/ -current. 34 merge conflicts to follow.

Revision 1.634.2.3: download - view: text, markup, annotated - select for diffs
Sun Jun 22 18:12:02 2008 UTC (16 years, 4 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.634.2.2: preferred, colored
Changes since revision 1.634.2.2: +40 -2 lines
Re-add cpu_upcall() and page fault code. i386 kernels now compile.
They don't boot, but that seems to be a consequence of current from the
day this branch was started.

Revision 1.627.2.2: download - view: text, markup, annotated - select for diffs
Tue Jun 17 09:14:03 2008 UTC (16 years, 4 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.627.2.1: preferred, colored; branchpoint 1.627: preferred, colored; next MAIN 1.628: preferred, colored
Changes since revision 1.627.2.1: +10 -6 lines
sync with head.

Revision 1.636: download - view: text, markup, annotated - select for diffs
Thu Jun 5 21:44:31 2008 UTC (16 years, 5 months ago) by ad
Branches: MAIN
CVS tags: yamt-pf42-base4, wrstuden-revivesa-base-1, wrstuden-revivesa-base
Branch point for: simonb-wapbl
Diff to: previous 1.635: preferred, colored
Changes since revision 1.635: +10 -6 lines
Leave interrupts on for the shutdownhooks. Should fix the panics on
shutdown.

Revision 1.626.6.2: download - view: text, markup, annotated - select for diffs
Mon Jun 2 13:22:15 2008 UTC (16 years, 5 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.626.6.1: preferred, colored; branchpoint 1.626: preferred, colored
Changes since revision 1.626.6.1: +45 -33 lines
Sync with HEAD.

Revision 1.627.2.1: download - view: text, markup, annotated - select for diffs
Sun May 18 12:32:10 2008 UTC (16 years, 5 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.627: preferred, colored
Changes since revision 1.627: +47 -35 lines
sync with head.

Revision 1.629.2.1: download - view: text, markup, annotated - select for diffs
Fri May 16 02:22:34 2008 UTC (16 years, 5 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.629: preferred, colored
Changes since revision 1.629: +39 -29 lines
sync with head.

Revision 1.634.2.2: download - view: text, markup, annotated - select for diffs
Wed May 14 19:54:09 2008 UTC (16 years, 5 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.634.2.1: preferred, colored
Changes since revision 1.634.2.1: +8 -8 lines
Per discussion with ad at n dot o, revert signal mask handling
changes.

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

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

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

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

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

Revision 1.635: download - view: text, markup, annotated - select for diffs
Sun May 11 14:44:54 2008 UTC (16 years, 5 months ago) by ad
Branches: MAIN
CVS tags: yamt-pf42-base3, yamt-pf42-base2, yamt-nfs-mp-base2, hpcarm-cleanup-nbase
Diff to: previous 1.634: preferred, colored
Changes since revision 1.634: +3 -4 lines
Simplify x86 identcpu code, and share between i386/amd64.

Revision 1.634.2.1: download - view: text, markup, annotated - select for diffs
Sat May 10 23:48:44 2008 UTC (16 years, 5 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.634: preferred, colored
Changes since revision 1.634: +10 -8 lines
Initial checkin of re-adding SA. Everything except kern_sa.c
compiles in GENERIC for i386. This is still a work-in-progress, but
this checkin covers most of the mechanical work (changing signalling
to be able to accomidate SA's process-wide signalling and re-adding
includes of sys/sa.h and savar.h). Subsequent changes will be much
more interesting.

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

Revision 1.634: download - view: text, markup, annotated - select for diffs
Mon May 5 17:47:06 2008 UTC (16 years, 6 months ago) by ad
Branches: MAIN
Branch point for: wrstuden-revivesa
Diff to: previous 1.633: preferred, colored
Changes since revision 1.633: +8 -2 lines
Export tsc_freq via sysctl.

Revision 1.633: download - view: text, markup, annotated - select for diffs
Fri May 2 15:26:38 2008 UTC (16 years, 6 months ago) by ad
Branches: MAIN
Diff to: previous 1.632: preferred, colored
Changes since revision 1.632: +13 -2 lines
- Give x86 BIOS boot the ability to load new style modules and pass them
  into the kernel. Based on a patch by jmcneill@, with many fixes and
  improvements by me.

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

Revision 1.632: download - view: text, markup, annotated - select for diffs
Tue Apr 29 15:27:08 2008 UTC (16 years, 6 months ago) by ad
Branches: MAIN
Diff to: previous 1.631: preferred, colored
Changes since revision 1.631: +19 -19 lines
Get spl framework and interrupt gates working before breaking into DDB
on boot. PR port-amd64/30828.

Revision 1.631: download - view: text, markup, annotated - select for diffs
Mon Apr 28 20:23:24 2008 UTC (16 years, 6 months ago) by martin
Branches: MAIN
Diff to: previous 1.630: preferred, colored
Changes since revision 1.630: +2 -9 lines
Remove clause 3 and 4 from TNF licenses

Revision 1.630: download - view: text, markup, annotated - select for diffs
Mon Apr 28 18:15:39 2008 UTC (16 years, 6 months ago) by ad
Branches: MAIN
Diff to: previous 1.629: preferred, colored
Changes since revision 1.629: +4 -3 lines
Make FPU handling preemption safe.

Revision 1.629: download - view: text, markup, annotated - select for diffs
Thu Apr 24 18:39:20 2008 UTC (16 years, 6 months ago) by ad
Branches: MAIN
CVS tags: yamt-nfs-mp-base
Branch point for: yamt-nfs-mp
Diff to: previous 1.628: preferred, colored
Changes since revision 1.628: +8 -8 lines
Merge proc::p_mutex and proc::p_smutex into a single adaptive mutex, since
we no longer need to guard against access from hardware interrupt handlers.

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

Revision 1.628: download - view: text, markup, annotated - select for diffs
Mon Apr 21 15:15:33 2008 UTC (16 years, 6 months ago) by cegger
Branches: MAIN
Diff to: previous 1.627: preferred, colored
Changes since revision 1.627: +4 -2 lines
Access Xen's vcpu info structure per-CPU.
Tested on i386 and amd64 (both dom0 and domU) by me.
Xen2 tested (both dom0 and domU) by bouyer.
OK bouyer

Revision 1.626.6.1: download - view: text, markup, annotated - select for diffs
Thu Apr 3 12:42:18 2008 UTC (16 years, 7 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.626: preferred, colored
Changes since revision 1.626: +2 -73 lines
Sync with HEAD.

Revision 1.626.2.1: download - view: text, markup, annotated - select for diffs
Mon Mar 24 07:14:59 2008 UTC (16 years, 7 months ago) by keiichi
Branches: keiichi-mipv6
Diff to: previous 1.626: preferred, colored; next MAIN 1.627: preferred, colored
Changes since revision 1.626: +2 -73 lines
sync with head.

Revision 1.607.2.3: download - view: text, markup, annotated - select for diffs
Sun Mar 23 02:04:06 2008 UTC (16 years, 7 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.607.2.2: preferred, colored; branchpoint 1.607: preferred, colored; next MAIN 1.608: preferred, colored
Changes since revision 1.607.2.2: +266 -359 lines
sync with HEAD

Revision 1.563.2.10: download - view: text, markup, annotated - select for diffs
Wed Feb 27 08:36:21 2008 UTC (16 years, 8 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.563.2.9: preferred, colored; next MAIN 1.564: preferred, colored
Changes since revision 1.563.2.9: +2 -74 lines
sync with head.

Revision 1.627: download - view: text, markup, annotated - select for diffs
Tue Feb 26 18:24:28 2008 UTC (16 years, 8 months ago) by xtraeme
Branches: MAIN
CVS tags: yamt-pf42-baseX, yamt-pf42-base, yamt-lazymbuf-base15, yamt-lazymbuf-base14, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, hpcarm-cleanup-base, ad-socklock-base1
Branch point for: yamt-pf42
Diff to: previous 1.626: preferred, colored
Changes since revision 1.626: +2 -73 lines
Split off the Transmeta Crusoe Longrun code into its own file, that
way identcpu.c and machdep.c are not cluttered with foreign code.

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

Ok by christos@.

Revision 1.611.2.4: download - view: text, markup, annotated - select for diffs
Mon Feb 18 21:04:38 2008 UTC (16 years, 8 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.611.2.3: preferred, colored; branchpoint 1.611: preferred, colored; next MAIN 1.612: preferred, colored
Changes since revision 1.611.2.3: +317 -376 lines
Sync with HEAD.

Revision 1.626: download - view: text, markup, annotated - select for diffs
Tue Feb 12 17:52:18 2008 UTC (16 years, 8 months ago) by joerg
Branches: MAIN
CVS tags: nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base
Branch point for: mjf-devfs2, keiichi-mipv6
Diff to: previous 1.625: preferred, colored
Changes since revision 1.625: +2 -3 lines
Don't sleep for 0.5s before powering down the machine with ACPI.

Revision 1.563.2.9: download - view: text, markup, annotated - select for diffs
Mon Feb 4 09:22:07 2008 UTC (16 years, 9 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.563.2.8: preferred, colored
Changes since revision 1.563.2.8: +7 -7 lines
sync with head.

Revision 1.625: download - view: text, markup, annotated - select for diffs
Wed Jan 23 19:46:44 2008 UTC (16 years, 9 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.624: preferred, colored
Changes since revision 1.624: +7 -7 lines
Merge the bouyer-xeni386 branch. This brings in PAE support to NetBSD xeni386
(domU only). PAE support is enabled by 'options PAE', see the new XEN3PAE_DOMU
and INSTALL_XEN3PAE_DOMU kernel config files.

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

Revision 1.563.2.8: download - view: text, markup, annotated - select for diffs
Mon Jan 21 09:37:02 2008 UTC (16 years, 9 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.563.2.7: preferred, colored
Changes since revision 1.563.2.7: +430 -559 lines
sync with head

Revision 1.617.2.11: download - view: text, markup, annotated - select for diffs
Sat Jan 19 14:08:09 2008 UTC (16 years, 9 months ago) by bouyer
Branches: bouyer-xeni386
Diff to: previous 1.617.2.10: preferred, colored; branchpoint 1.617: preferred, colored; next MAIN 1.618: preferred, colored
Changes since revision 1.617.2.10: +5 -5 lines
Make things build again after sync with HEAD

Revision 1.617.2.10: download - view: text, markup, annotated - select for diffs
Sat Jan 19 12:14:20 2008 UTC (16 years, 9 months ago) by bouyer
Branches: bouyer-xeni386
Diff to: previous 1.617.2.9: preferred, colored; branchpoint 1.617: preferred, colored
Changes since revision 1.617.2.9: +5 -623 lines
Sync with HEAD

Revision 1.624: download - view: text, markup, annotated - select for diffs
Tue Jan 15 14:50:08 2008 UTC (16 years, 9 months ago) by joerg
Branches: MAIN
CVS tags: bouyer-xeni386-nbase, bouyer-xeni386-base
Diff to: previous 1.623: preferred, colored
Changes since revision 1.623: +5 -5 lines
Introduce optional cpu_offline_md to execute MD actions at the end of
cpu_offline. Use this on amd64/i386 to force a FPU save. As this was
triggered by npxsave_cpu/fpusave_cpu not working for a different CPU,
remove the cpu_info argument and adjust npxsave_*/fpusave_* to use bool
for the save.

OK ad@

Revision 1.617.2.9: download - view: text, markup, annotated - select for diffs
Sun Jan 13 11:26:56 2008 UTC (16 years, 9 months ago) by bouyer
Branches: bouyer-xeni386
Diff to: previous 1.617.2.8: preferred, colored; branchpoint 1.617: preferred, colored
Changes since revision 1.617.2.8: +4 -4 lines
Work in progress on xeni386 PAE support:
Make xeni386 build with a 64bit paddr_t. For this vaddr_t vs paddr_t vs
pointers usages had to be clarified.
If 'options PAE' is present in a Xen3 kernel, switch paddr_t, pd_entry_t
and pt_entry_t to 64bits, and add the PAE entry in the __xen_guest ELF section.

Revision 1.623: download - view: text, markup, annotated - select for diffs
Sat Jan 12 20:03:42 2008 UTC (16 years, 9 months ago) by ad
Branches: MAIN
Diff to: previous 1.622: preferred, colored
Changes since revision 1.622: +2 -620 lines
- Split crashdump code out into its own file.
- Remove NO_SPARSE_DUMP.
- Minor KNF, sprinkle static.

Revision 1.622: download - view: text, markup, annotated - select for diffs
Fri Jan 11 20:00:14 2008 UTC (16 years, 9 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.621: preferred, colored
Changes since revision 1.621: +258 -6 lines
Merge the bouyer-xeni386 branch to head, at tag bouyer-xeni386-merge1 (the
branch is still active and will see i386PAE support developement).
Sumary of changes:
- switch xeni386 to the x86/x86/pmap.c, and the xen/x86/x86_xpmap.c
  pmap bootstrap.
- merge back most of xen/i386/ to i386/i386
- change the build to reduce diffs between i386 and amd64 in file locations
- remove include files that were identical to the i386/amd64 counterparts,
  the build will find them via the xen-ma/machine link.

Revision 1.617.2.8: download - view: text, markup, annotated - select for diffs
Fri Jan 11 18:04:04 2008 UTC (16 years, 9 months ago) by bouyer
Branches: bouyer-xeni386
CVS tags: bouyer-xeni386-merge1
Diff to: previous 1.617.2.7: preferred, colored; branchpoint 1.617: preferred, colored
Changes since revision 1.617.2.7: +3 -3 lines
Remove XENDEBUG that slipped in.

Revision 1.617.2.7: download - view: text, markup, annotated - select for diffs
Thu Jan 10 23:43:23 2008 UTC (16 years, 9 months ago) by bouyer
Branches: bouyer-xeni386
Diff to: previous 1.617.2.6: preferred, colored; branchpoint 1.617: preferred, colored
Changes since revision 1.617.2.6: +419 -74 lines
Sync with HEAD

Revision 1.617.2.6: download - view: text, markup, annotated - select for diffs
Thu Jan 10 13:05:51 2008 UTC (16 years, 9 months ago) by bouyer
Branches: bouyer-xeni386
Diff to: previous 1.617.2.5: preferred, colored; branchpoint 1.617: preferred, colored
Changes since revision 1.617.2.5: +4 -4 lines
Change xeni386 build to match xenamd64:
- machine/ points to xen/include/i386
- remove includes that were identical to the i386/include/ ones; the build
  will find them though the xen-ma/machine link.
- include xen files using xen/ not machine/

Revision 1.621: download - view: text, markup, annotated - select for diffs
Thu Jan 10 11:10:35 2008 UTC (16 years, 9 months ago) by tls
Branches: MAIN
Diff to: previous 1.620: preferred, colored
Changes since revision 1.620: +419 -74 lines
Add sparse kernel core dump ("minidump") support for i386, written by Jed
Davis for Coyote Point.  Though this does not modify the kernel core
format (it uses multiple memory segments, a feature previously unused on
i386) it is nonetheless disabled by default.  Sysctl machdep.sparse_dump=1
to turn this feature on.

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

Revision 1.617.2.5: download - view: text, markup, annotated - select for diffs
Wed Jan 9 19:25:05 2008 UTC (16 years, 9 months ago) by bouyer
Branches: bouyer-xeni386
Diff to: previous 1.617.2.4: preferred, colored; branchpoint 1.617: preferred, colored
Changes since revision 1.617.2.4: +2 -3 lines
Merge xen bits to i386/i386/gdt.c. Convert remaining uses of PTE_* macros to
pmap_pte_* macros/inlines.
Fix think-o in pmap.c for native i386.

Revision 1.607.2.2: download - view: text, markup, annotated - select for diffs
Wed Jan 9 01:46:38 2008 UTC (16 years, 9 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.607.2.1: preferred, colored; branchpoint 1.607: preferred, colored
Changes since revision 1.607.2.1: +180 -345 lines
sync with HEAD

Revision 1.617.2.4: download - view: text, markup, annotated - select for diffs
Tue Jan 8 23:51:51 2008 UTC (16 years, 9 months ago) by bouyer
Branches: bouyer-xeni386
Diff to: previous 1.617.2.3: preferred, colored; branchpoint 1.617: preferred, colored
Changes since revision 1.617.2.3: +6 -2 lines
Make XEN kernels build again.

Revision 1.617.2.3: download - view: text, markup, annotated - select for diffs
Tue Jan 8 22:10:01 2008 UTC (16 years, 9 months ago) by bouyer
Branches: bouyer-xeni386
Diff to: previous 1.617.2.2: preferred, colored; branchpoint 1.617: preferred, colored
Changes since revision 1.617.2.2: +32 -39 lines
Sync with HEAD

Revision 1.617.2.2: download - view: text, markup, annotated - select for diffs
Mon Jan 7 00:34:52 2008 UTC (16 years, 10 months ago) by bouyer
Branches: bouyer-xeni386
Diff to: previous 1.617.2.1: preferred, colored; branchpoint 1.617: preferred, colored
Changes since revision 1.617.2.1: +250 -4 lines
Move Xen support to i386/i386/machdep.c. two less files in xen/ :)

Revision 1.620: download - view: text, markup, annotated - select for diffs
Fri Jan 4 15:55:32 2008 UTC (16 years, 10 months ago) by yamt
Branches: MAIN
CVS tags: matt-armv6-base
Diff to: previous 1.619: preferred, colored
Changes since revision 1.619: +24 -34 lines
i386:
	- make tss per-cpu.  this considerably speeds up context switch for,
	  at least, pentium4, where ltr instruction seems very slow.
i386, xen:
	- kill cpu_maxproc.
kvm86:
	- adapt to per-cpu tss.
	- cleanup and simplify.
	- move kvm86_mp_lock to more meaningful place.
	- disable preemption during a call.

Revision 1.617.2.1: download - view: text, markup, annotated - select for diffs
Wed Jan 2 21:48:18 2008 UTC (16 years, 10 months ago) by bouyer
Branches: bouyer-xeni386
Diff to: previous 1.617: preferred, colored
Changes since revision 1.617: +29 -56 lines
Sync with HEAD

Revision 1.611.2.3: download - view: text, markup, annotated - select for diffs
Thu Dec 27 00:43:07 2007 UTC (16 years, 10 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.611.2.2: preferred, colored; branchpoint 1.611: preferred, colored
Changes since revision 1.611.2.2: +118 -189 lines
Sync with HEAD.

Revision 1.616.2.3: download - view: text, markup, annotated - select for diffs
Wed Dec 26 21:38:45 2007 UTC (16 years, 10 months ago) by ad
Branches: vmlocking2
Diff to: previous 1.616.2.2: preferred, colored; branchpoint 1.616: preferred, colored; next MAIN 1.617: preferred, colored
Changes since revision 1.616.2.2: +145 -243 lines
Sync with head.

Revision 1.616.2.2: download - view: text, markup, annotated - select for diffs
Wed Dec 26 17:55:04 2007 UTC (16 years, 10 months ago) by ad
Branches: vmlocking2
Diff to: previous 1.616.2.1: preferred, colored; branchpoint 1.616: preferred, colored
Changes since revision 1.616.2.1: +7 -24 lines
Back out the dumppcb changes for the time being.

Revision 1.619: download - view: text, markup, annotated - select for diffs
Wed Dec 26 16:28:16 2007 UTC (16 years, 10 months ago) by joerg
Branches: MAIN
CVS tags: vmlocking2-base3
Diff to: previous 1.618: preferred, colored
Changes since revision 1.618: +25 -5 lines
Add PHYSMEM_MAX_ADDR and PHYSMEM_MAX_SIZE options. This limit physical
memory based on overall size (useful for debugging to keep core dumps
small) or maximum address (when using devices with bus dma limits).
Contrary to REALBASEMEM and REALEXTMEM, they still use the BIOS memory
map and can therefore deal with fragmented memory.

Revision 1.618: download - view: text, markup, annotated - select for diffs
Wed Dec 26 11:51:10 2007 UTC (16 years, 10 months ago) by yamt
Branches: MAIN
Diff to: previous 1.617: preferred, colored
Changes since revision 1.617: +6 -53 lines
- share idt entry allocation code among x86.
- introduce a function to reserve an idt entry and use it instead of
  manipulating idt_allocmap directly.
- rename idt to xen_idt for amd64 xen.  add missing #ifdef XEN.

Revision 1.616.2.1: download - view: text, markup, annotated - select for diffs
Wed Dec 12 22:05:40 2007 UTC (16 years, 10 months ago) by ad
Branches: vmlocking2
Diff to: previous 1.616: preferred, colored
Changes since revision 1.616: +24 -7 lines
- Dump basic trap and register info before entering the debugger, in
  case ddb screws the machine up further.
- Fill dumppcb asap so that gdb has less chance to get confused.

Revision 1.616.4.1: download - view: text, markup, annotated - select for diffs
Tue Dec 11 15:20:32 2007 UTC (16 years, 10 months ago) by yamt
Branches: yamt-kmem
Diff to: previous 1.616: preferred, colored; next MAIN 1.617: preferred, colored
Changes since revision 1.616: +118 -189 lines
sync with head.

Revision 1.617: download - view: text, markup, annotated - select for diffs
Sun Dec 9 20:27:47 2007 UTC (16 years, 10 months ago) by jmcneill
Branches: MAIN
CVS tags: yamt-kmem-base3, yamt-kmem-base2, cube-autoconf-base, cube-autoconf
Branch point for: bouyer-xeni386
Diff to: previous 1.616: preferred, colored
Changes since revision 1.616: +118 -189 lines
Merge jmcneill-pm branch.

Revision 1.606.8.15: download - view: text, markup, annotated - select for diffs
Sun Dec 9 19:35:22 2007 UTC (16 years, 10 months ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.606.8.14: preferred, colored; branchpoint 1.606: preferred, colored; next MAIN 1.607: preferred, colored
Changes since revision 1.606.8.14: +2 -5 lines
Sync with HEAD.

Revision 1.611.2.2: download - view: text, markup, annotated - select for diffs
Sat Dec 8 18:17:10 2007 UTC (16 years, 11 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.611.2.1: preferred, colored; branchpoint 1.611: preferred, colored
Changes since revision 1.611.2.1: +2 -5 lines
Sync with HEAD.

Revision 1.563.2.7: download - view: text, markup, annotated - select for diffs
Fri Dec 7 17:25:00 2007 UTC (16 years, 11 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.563.2.6: preferred, colored
Changes since revision 1.563.2.6: +2 -5 lines
sync with head

Revision 1.601.2.13: download - view: text, markup, annotated - select for diffs
Mon Dec 3 19:03:29 2007 UTC (16 years, 11 months ago) by ad
Branches: vmlocking
Diff to: previous 1.601.2.12: preferred, colored; next MAIN 1.602: preferred, colored
Changes since revision 1.601.2.12: +9 -2 lines
Sync with HEAD.

Revision 1.601.2.12: download - view: text, markup, annotated - select for diffs
Mon Dec 3 18:36:44 2007 UTC (16 years, 11 months ago) by ad
Branches: vmlocking
Diff to: previous 1.601.2.11: preferred, colored
Changes since revision 1.601.2.11: +16 -24 lines
Sync with HEAD.

Revision 1.616: download - view: text, markup, annotated - select for diffs
Mon Dec 3 15:33:46 2007 UTC (16 years, 11 months ago) by ad
Branches: MAIN
CVS tags: yamt-kmem-base, vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base
Branch point for: yamt-kmem, vmlocking2
Diff to: previous 1.615: preferred, colored
Changes since revision 1.615: +2 -5 lines
Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.

Revision 1.606.8.14: download - view: text, markup, annotated - select for diffs
Wed Nov 21 21:53:16 2007 UTC (16 years, 11 months ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.606.8.13: preferred, colored; branchpoint 1.606: preferred, colored
Changes since revision 1.606.8.13: +7 -19 lines
Sync with HEAD.

Revision 1.611.2.1: download - view: text, markup, annotated - select for diffs
Mon Nov 19 00:46:27 2007 UTC (16 years, 11 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.611: preferred, colored
Changes since revision 1.611: +15 -69 lines
Sync with HEAD.

Revision 1.608.2.3: download - view: text, markup, annotated - select for diffs
Sun Nov 18 19:34:28 2007 UTC (16 years, 11 months ago) by bouyer
Branches: bouyer-xenamd64
Diff to: previous 1.608.2.2: preferred, colored; branchpoint 1.608: preferred, colored; next MAIN 1.609: preferred, colored
Changes since revision 1.608.2.2: +5 -17 lines
Sync with HEAD

Revision 1.563.2.6: download - view: text, markup, annotated - select for diffs
Thu Nov 15 11:42:56 2007 UTC (16 years, 11 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.563.2.5: preferred, colored
Changes since revision 1.563.2.5: +15 -69 lines
sync with head.

Revision 1.606.8.13: download - view: text, markup, annotated - select for diffs
Wed Nov 14 19:04:12 2007 UTC (16 years, 11 months ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.606.8.12: preferred, colored; branchpoint 1.606: preferred, colored
Changes since revision 1.606.8.12: +2 -48 lines
Sync with HEAD.

Revision 1.615: download - view: text, markup, annotated - select for diffs
Wed Nov 14 17:50:13 2007 UTC (16 years, 11 months ago) by ad
Branches: MAIN
CVS tags: bouyer-xenamd64-base2, bouyer-xenamd64-base
Diff to: previous 1.614: preferred, colored
Changes since revision 1.614: +7 -19 lines
- Set a 4GB limit for GUCODEBIG_SEL, GCPU_SEL and GUDATA_SEL. It can speed
  up address generation by the MMU.
- Clear the direction flag before entering a signal handler.
- Don't test for I586_CPU.

Revision 1.608.2.2: download - view: text, markup, annotated - select for diffs
Tue Nov 13 15:58:33 2007 UTC (16 years, 11 months ago) by bouyer
Branches: bouyer-xenamd64
Diff to: previous 1.608.2.1: preferred, colored; branchpoint 1.608: preferred, colored
Changes since revision 1.608.2.1: +9 -51 lines
Sync with HEAD

Revision 1.614: download - view: text, markup, annotated - select for diffs
Mon Nov 12 19:02:26 2007 UTC (16 years, 11 months ago) by ad
Branches: MAIN
Diff to: previous 1.613: preferred, colored
Changes since revision 1.613: +2 -48 lines
Merge cpu_need_resched() from vmlocking:

- Always do an aston(), even if not sending an IPI. May help with xine.
- Post asts on cpu_onproc, not ci_curlwp.

Revision 1.606.8.12: download - view: text, markup, annotated - select for diffs
Sun Nov 11 16:46:32 2007 UTC (16 years, 11 months ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.606.8.11: preferred, colored; branchpoint 1.606: preferred, colored
Changes since revision 1.606.8.11: +10 -6 lines
Sync with HEAD.

Revision 1.613: download - view: text, markup, annotated - select for diffs
Sat Nov 10 23:04:29 2007 UTC (16 years, 11 months ago) by ad
Branches: MAIN
Diff to: previous 1.612: preferred, colored
Changes since revision 1.612: +6 -4 lines
fsbase/gsbase:

- Fix a few bugs with it, in particular fork/exec handling.
- Store the descriptors in the PCB, not in the LWP.

Revision 1.612: download - view: text, markup, annotated - select for diffs
Sat Nov 10 20:06:24 2007 UTC (16 years, 11 months ago) by ad
Branches: MAIN
Diff to: previous 1.611: preferred, colored
Changes since revision 1.611: +8 -6 lines
- When computing the TSC frequency, call i8254_delay() and not DELAY().
- Use atomics to adjust the pmap reference count, instead of taking locks.
- Implement I386_{SET,GET}_{FS,GS}BASE, allowing %fs and %gs to be used
  as per-thread registers. This is compatible with FreeBSD.
- Run patches after we have attached CPUs, since we then know if the
  system is uniprocessor or not. Eliminates a lot of #ifdef MULTIPROCESSOR
  and makes running MP kernels on UP systems cheaper.
- Patch out many of the 'lock' prefixes to nops if uniprocessor.
- Do a wbinvd after patching to ensure that the trace/instruction cache
  is up to date.

Revision 1.607.2.1: download - view: text, markup, annotated - select for diffs
Tue Nov 6 23:17:31 2007 UTC (17 years ago) by matt
Branches: matt-armv6
CVS tags: matt-armv6-prevmlocking
Diff to: previous 1.607: preferred, colored
Changes since revision 1.607: +8 -13 lines
sync with HEAD

Revision 1.601.2.11: download - view: text, markup, annotated - select for diffs
Thu Nov 1 21:58:12 2007 UTC (17 years ago) by ad
Branches: vmlocking
Diff to: previous 1.601.2.10: preferred, colored
Changes since revision 1.601.2.10: +2 -55 lines
- Fix interactivity problems under high load. Beacuse soft interrupts
  are being stacked on top of regular LWPs, more often than not aston()
  was being called on a soft interrupt thread instead of a user thread,
  meaning that preemption was not happening on EOI.

- Don't use bool in a couple of data structures. Sub-word writes are not
  always atomic and may clobber other fields in the containing word.

- For SCHED_4BSD, make p_estcpu per thread (l_estcpu). Rework how the
  dynamic priority level is calculated - it's much better behaved now.

- Kill the l_usrpri/l_priority split now that priorities are no longer
  directly assigned by tsleep(). There are three fields describing LWP
  priority:

        l_priority: Dynamic priority calculated by the scheduler.
                This does not change for kernel/realtime threads,
                and always stays within the correct band. Eg for
                timeshared LWPs it never moves out of the user
                priority range. This is basically what l_usrpri
                was before.

        l_inheritedprio: Lent to the LWP due to priority inheritance
                (turnstiles).

        l_kpriority: A boolean value set true the first time an LWP
                sleeps within the kernel. This indicates that the LWP
                should get a priority boost as compensation for blocking.
                lwp_eprio() now does the equivalent of sched_kpri() if
                the flag is set. The flag is cleared in userret().

- Keep track of scheduling class (OTHER, FIFO, RR) in struct lwp, and use
  this to make decisions in a few places where we previously tested for a
  kernel thread.

- Partially fix itimers and usr/sys/intr time accounting in the presence
  of software interrupts.

- Use kthread_create() to create idle LWPs. Move priority definitions
  from the various modules into sys/param.h.

- newlwp -> lwp_create

Revision 1.606.8.11: download - view: text, markup, annotated - select for diffs
Sun Oct 28 20:10:38 2007 UTC (17 years ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.606.8.10: preferred, colored; branchpoint 1.606: preferred, colored
Changes since revision 1.606.8.10: +3 -3 lines
Sync with HEAD.

Revision 1.563.2.5: download - view: text, markup, annotated - select for diffs
Sat Oct 27 11:26:38 2007 UTC (17 years ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.563.2.4: preferred, colored
Changes since revision 1.563.2.4: +8 -13 lines
sync with head.

Revision 1.606.8.10: download - view: text, markup, annotated - select for diffs
Fri Oct 26 15:42:35 2007 UTC (17 years ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.606.8.9: preferred, colored; branchpoint 1.606: preferred, colored
Changes since revision 1.606.8.9: +2 -7 lines
Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.

Revision 1.611: download - view: text, markup, annotated - select for diffs
Fri Oct 26 13:24:40 2007 UTC (17 years ago) by joerg
Branches: MAIN
CVS tags: jmcneill-base
Branch point for: mjf-devfs
Diff to: previous 1.610: preferred, colored
Changes since revision 1.610: +3 -3 lines
Match delay/DELAY on x86 with delay(9). It takes an unsigned int as
argument. Use this and replace the inline assembly (mul + div using the
64bit intermediate result) with normal 32bit multiplication and
division. The compiler can turn the division into a multiplication and
shift, making it even cheaper then the original assembly. For extreme
long delays, just use 64bit arithmetic.

Revision 1.608.2.1: download - view: text, markup, annotated - select for diffs
Thu Oct 25 22:35:50 2007 UTC (17 years ago) by bouyer
Branches: bouyer-xenamd64
Diff to: previous 1.608: preferred, colored
Changes since revision 1.608: +2 -7 lines
Sync with HEAD.

Revision 1.601.2.10: download - view: text, markup, annotated - select for diffs
Tue Oct 23 20:13:03 2007 UTC (17 years ago) by ad
Branches: vmlocking
Diff to: previous 1.601.2.9: preferred, colored
Changes since revision 1.601.2.9: +2 -7 lines
Sync with head.

Revision 1.610: download - view: text, markup, annotated - select for diffs
Thu Oct 18 15:28:35 2007 UTC (17 years ago) by yamt
Branches: MAIN
Diff to: previous 1.609: preferred, colored
Changes since revision 1.609: +2 -7 lines
merge yamt-x86pmap branch.

- reduce differences between amd64 and i386.  notably, share pmap.c
  between them.  it makes several i386 pmap improvements available to
  amd64, including tlb shootdown reduction and bug fixes from Stephan Uphoff.
- implement deferred pmap switching for amd64.
- remove LARGEPAGES option.  always use large pages if available.
  also, make it work on amd64.

Revision 1.609: download - view: text, markup, annotated - select for diffs
Wed Oct 17 19:54:45 2007 UTC (17 years ago) by garbled
Branches: MAIN
CVS tags: yamt-x86pmap-base4
Diff to: previous 1.608: preferred, colored
Changes since revision 1.608: +2 -2 lines
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree.  Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches.  The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.

Revision 1.601.2.9: download - view: text, markup, annotated - select for diffs
Wed Oct 10 21:25:53 2007 UTC (17 years ago) by ad
Branches: vmlocking
Diff to: previous 1.601.2.8: preferred, colored
Changes since revision 1.601.2.8: +2 -9 lines
Share cpu_intr_p() between amd64/i386.

Revision 1.601.2.8: download - view: text, markup, annotated - select for diffs
Tue Oct 9 13:37:55 2007 UTC (17 years ago) by ad
Branches: vmlocking
Diff to: previous 1.601.2.7: preferred, colored
Changes since revision 1.601.2.7: +7 -7 lines
Sync with head.

Revision 1.607.4.2: download - view: text, markup, annotated - select for diffs
Sat Oct 6 15:34:53 2007 UTC (17 years, 1 month ago) by yamt
Branches: yamt-x86pmap
Diff to: previous 1.607.4.1: preferred, colored; branchpoint 1.607: preferred, colored; next MAIN 1.608: preferred, colored
Changes since revision 1.607.4.1: +7 -7 lines
sync with head.

Revision 1.602.4.2: download - view: text, markup, annotated - select for diffs
Wed Oct 3 19:23:46 2007 UTC (17 years, 1 month ago) by garbled
Branches: ppcoea-renovation
Diff to: previous 1.602.4.1: preferred, colored; branchpoint 1.602: preferred, colored; next MAIN 1.603: preferred, colored
Changes since revision 1.602.4.1: +29 -18 lines
Sync with HEAD

Revision 1.606.8.9: download - view: text, markup, annotated - select for diffs
Tue Oct 2 18:27:19 2007 UTC (17 years, 1 month ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.606.8.8: preferred, colored; branchpoint 1.606: preferred, colored
Changes since revision 1.606.8.8: +7 -7 lines
Sync with HEAD.

Revision 1.608: download - view: text, markup, annotated - select for diffs
Wed Sep 26 19:48:37 2007 UTC (17 years, 1 month ago) by ad
Branches: MAIN
CVS tags: yamt-x86pmap-base3, yamt-x86pmap-base2, vmlocking-base, ppcoea-renovation-base
Branch point for: bouyer-xenamd64
Diff to: previous 1.607: preferred, colored
Changes since revision 1.607: +7 -7 lines
x86 changes for pcc and LKMs.

- Replace most inline assembly with proper functions. As a side effect
  this reduces the size of amd64 GENERIC by about 120kB, and i386 by a
  smaller amount. Nearly all of the inlines did something slow, or something
  that does not need to be fast.
- Make curcpu() and curlwp functions proper, unless __GNUC__ && _KERNEL.
  In that case make them inlines. Makes curlwp LKM and preemption safe.
- Make bus_space and bus_dma more LKM friendly.
- Share a few more files between the ports.
- Other minor changes.

Revision 1.607.4.1: download - view: text, markup, annotated - select for diffs
Sun Sep 23 18:28:16 2007 UTC (17 years, 1 month ago) by yamt
Branches: yamt-x86pmap
Diff to: previous 1.607: preferred, colored
Changes since revision 1.607: +2 -7 lines
- sync with amd64.
- pmap_alloc_level: remove fast call special case.
- tweak some printf to work for both of LP64 and LP32.
- remove machdep.nkpde sysctl.
- remove automatic adjustment of nkpde for now.  will revisit later.

Revision 1.606.8.8: download - view: text, markup, annotated - select for diffs
Sat Sep 8 22:03:17 2007 UTC (17 years, 1 month ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.606.8.7: preferred, colored; branchpoint 1.606: preferred, colored
Changes since revision 1.606.8.7: +2 -9 lines
Now that the real mode pages are statically allocated, make
acpi_wakeup_paddr static and local to acpi_wakeup.c.

Revision 1.606.8.7: download - view: text, markup, annotated - select for diffs
Sat Sep 8 21:40:10 2007 UTC (17 years, 1 month ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.606.8.6: preferred, colored; branchpoint 1.606: preferred, colored
Changes since revision 1.606.8.6: +5 -5 lines
Swap low page 4 and 5 (page directory and table) to allow more
consistent growth for amd64.

Revision 1.606.8.6: download - view: text, markup, annotated - select for diffs
Sat Sep 8 13:56:57 2007 UTC (17 years, 2 months ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.606.8.5: preferred, colored; branchpoint 1.606: preferred, colored
Changes since revision 1.606.8.5: +119 -158 lines
Refactor init386 by splitting off the msgbuf allocation, the pte0
setup and the ksym init. Wire down real mode allocations -- no point
in worrying about a few pages. Add a comment about why init386_pte0
is needed and what for. Start to remove the dependency on the identity
mapping in acpi wakeup by mapping the wakecode page to normal kernel
mapping and using that for the setup.

Revision 1.606.8.5: download - view: text, markup, annotated - select for diffs
Sat Sep 8 02:11:36 2007 UTC (17 years, 2 months ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.606.8.4: preferred, colored; branchpoint 1.606: preferred, colored
Changes since revision 1.606.8.4: +4 -12 lines
Revert the MP tramp related changes for now, I'm breaking some
assumptions here and I am not yet ready to face the fallout.

Revision 1.606.8.4: download - view: text, markup, annotated - select for diffs
Sat Sep 8 00:56:48 2007 UTC (17 years, 2 months ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.606.8.3: preferred, colored; branchpoint 1.606: preferred, colored
Changes since revision 1.606.8.3: +12 -4 lines
Actually make the handling for the mp tramp reservation work.

Revision 1.606.8.3: download - view: text, markup, annotated - select for diffs
Sat Sep 8 00:31:35 2007 UTC (17 years, 2 months ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.606.8.2: preferred, colored; branchpoint 1.606: preferred, colored
Changes since revision 1.606.8.2: +7 -36 lines
Start to revamp the ACPI wake code (i386 only, amd64 gets minimal fixes
to keep being compilable):

- In init386 and the amd64 equivalent, just reserve the low-level code.
  Do not map and don't copy the wakecode yet. This avoids the conflicts
  with the MP tramp code as well. The wakecode is expected to be less
  than one page long, which is way too much space.
  acpi_md_get_npages_of_wakecode and acpi_md_install_wakecode are
  dropped, acpi_wakeup_paddr is set instead of the reserved address.
- Split the wakecode into the essential low-level part to setup
  protected mode with paging and valid CS and DS (which stays as
  wakecode) and the rest. Inline beepon and beepoff as they are used
  exactly once.
- Split the acpi_restorecpu and acpi_savecpu assembly from apci_wakeup.c
  and merge acpi_restorecpu with the second half dropped from wakecode.
  Most registers are not exported, just those needed to be patched into
  wakecode. Don't bother to save or restore %eax, it is overriden
  anyway.
- Don't bother to save and restore eflags in acpi_md_sleep, they are
  handled correctly by the assembly. Don't play games with cr3 either,
  we modify the pmap of the running processes. Copy the wakecode
  directly before patching it, after the identity mapping has been
  setup.
- Drop clear_reg and acpi_printcpu.
- Add an commented out broadcast IPI to halt the other CPUs explicitly.

Revision 1.563.2.4: download - view: text, markup, annotated - select for diffs
Mon Sep 3 14:26:41 2007 UTC (17 years, 2 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.563.2.3: preferred, colored
Changes since revision 1.563.2.3: +69 -67 lines
sync with head.

Revision 1.586.2.4.2.1: download - view: text, markup, annotated - select for diffs
Mon Sep 3 07:03:34 2007 UTC (17 years, 2 months ago) by wrstuden
Branches: wrstuden-fixsa
Diff to: previous 1.586.2.4: preferred, colored; next MAIN 1.586.2.5: preferred, colored
Changes since revision 1.586.2.4: +9 -2 lines
Sync w/ NetBSD-4-RC_1

Revision 1.606.8.2: download - view: text, markup, annotated - select for diffs
Sun Sep 2 14:39:19 2007 UTC (17 years, 2 months ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.606.8.1: preferred, colored; branchpoint 1.606: preferred, colored
Changes since revision 1.606.8.1: +7 -3 lines
Avoid installing the ACPI wakecode to the same page as the mp trampoline.

Revision 1.586.2.5: download - view: text, markup, annotated - select for diffs
Tue Aug 28 11:46:26 2007 UTC (17 years, 2 months ago) by liamjfoy
Branches: netbsd-4
CVS tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, matt-nb4-arm-base, matt-nb4-arm
Diff to: previous 1.586.2.4: preferred, colored; branchpoint 1.586: preferred, colored
Changes since revision 1.586.2.4: +9 -2 lines
Pull up following revision(s) (requested by xtraeme in ticket #841):
	sys/arch/i386/i386/machdep.c: revision 1.604
When collecting memory regions from the BIOS, ignore regions that are less
than a page size.

Revision 1.601.2.7: download - view: text, markup, annotated - select for diffs
Mon Aug 20 18:38:13 2007 UTC (17 years, 2 months ago) by ad
Branches: vmlocking
Diff to: previous 1.601.2.6: preferred, colored
Changes since revision 1.601.2.6: +4 -3 lines
Sync with HEAD.

Revision 1.606.4.1: download - view: text, markup, annotated - select for diffs
Wed Aug 15 13:47:24 2007 UTC (17 years, 2 months ago) by skrll
Branches: nick-csl-alignment
Diff to: previous 1.606: preferred, colored; next MAIN 1.607: preferred, colored
Changes since revision 1.606: +4 -3 lines
Sync with HEAD.

Revision 1.606.8.1: download - view: text, markup, annotated - select for diffs
Thu Aug 9 02:36:57 2007 UTC (17 years, 3 months ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.606: preferred, colored
Changes since revision 1.606: +4 -3 lines
Sync with HEAD.

Revision 1.607: download - view: text, markup, annotated - select for diffs
Tue Aug 7 11:30:20 2007 UTC (17 years, 3 months ago) by ad
Branches: MAIN
CVS tags: yamt-x86pmap-base, nick-csl-alignment-base5
Branch point for: yamt-x86pmap, matt-armv6
Diff to: previous 1.606: preferred, colored
Changes since revision 1.606: +4 -3 lines
More calls to pmap_update().

Revision 1.601.2.6: download - view: text, markup, annotated - select for diffs
Sun Jul 15 15:52:36 2007 UTC (17 years, 3 months ago) by ad
Branches: vmlocking
Diff to: previous 1.601.2.5: preferred, colored
Changes since revision 1.601.2.5: +10 -3 lines
Sync with head.

Revision 1.601.4.1: download - view: text, markup, annotated - select for diffs
Wed Jul 11 20:00:00 2007 UTC (17 years, 3 months ago) by mjf
Branches: mjf-ufs-trans
Diff to: previous 1.601: preferred, colored; next MAIN 1.602: preferred, colored
Changes since revision 1.601: +53 -52 lines
Sync with head.

Revision 1.606: download - view: text, markup, annotated - select for diffs
Mon Jul 9 20:52:15 2007 UTC (17 years, 3 months ago) by ad
Branches: MAIN
CVS tags: nick-csl-alignment-base, mjf-ufs-trans-base, matt-mips64-base, matt-mips64, hpcarm-cleanup
Branch point for: nick-csl-alignment, jmcneill-pm
Diff to: previous 1.605: preferred, colored
Changes since revision 1.605: +14 -11 lines
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements

Revision 1.605: download - view: text, markup, annotated - select for diffs
Sun Jul 8 10:19:22 2007 UTC (17 years, 4 months ago) by pooka
Branches: MAIN
Diff to: previous 1.604: preferred, colored
Changes since revision 1.604: +3 -3 lines
Initialize the link context in a signal frame to the receiving lwp's
link context instead of NULL.  Otherwise, if we got a signal while the
lwp had a link context set, the link context would be set to NULL upon
return from signal delivery.

christos@tech-kern: "I think you are right."

Revision 1.604: download - view: text, markup, annotated - select for diffs
Tue Jun 26 20:11:12 2007 UTC (17 years, 4 months ago) by briggs
Branches: MAIN
Diff to: previous 1.603: preferred, colored
Changes since revision 1.603: +9 -2 lines
When collecting memory regions from the BIOS, ignore regions that are less
than a page size.  This assists a decTOP Geode-based system that reports
memory regions:
        start      end         size       type
	0x00000000 0x0009e000  0x0009e000 1 (Memory)
	0x00100000 0x06be3c00  0x06ae3c00 1 (Memory)
	0x06be3c00 0x06be6000  0x00002400 3 (ACPI)
	0x06fff800 0x06fffc00  0x00000400 1 (Memory)
	0x06fffc00 0x07000000  0x00000400 4 (NVS)

Revision 1.601.2.5: download - view: text, markup, annotated - select for diffs
Sun Jun 17 21:30:37 2007 UTC (17 years, 4 months ago) by ad
Branches: vmlocking
Diff to: previous 1.601.2.4: preferred, colored
Changes since revision 1.601.2.4: +9 -5 lines
- Increase the number of thread priorities from 128 to 256. How the space
  is set up is to be revisited.
- Implement soft interrupts as kernel threads. A generic implementation
  is provided, with hooks for fast-path MD code that can run the interrupt
  threads over the top of other threads executing in the kernel.
- Split vnode::v_flag into three fields, depending on how the flag is
  locked (by the interlock, by the vnode lock, by the file system).
- Miscellaneous locking fixes and improvements.

Revision 1.601.2.4: download - view: text, markup, annotated - select for diffs
Sun May 27 12:27:31 2007 UTC (17 years, 5 months ago) by ad
Branches: vmlocking
Diff to: previous 1.601.2.3: preferred, colored
Changes since revision 1.601.2.3: +29 -42 lines
Sync with head.

Revision 1.602.4.1: download - view: text, markup, annotated - select for diffs
Tue May 22 17:26:59 2007 UTC (17 years, 5 months ago) by matt
Branches: ppcoea-renovation
Diff to: previous 1.602: preferred, colored
Changes since revision 1.602: +29 -42 lines
Update to HEAD.

Revision 1.603: download - view: text, markup, annotated - select for diffs
Thu May 17 14:51:21 2007 UTC (17 years, 5 months ago) by yamt
Branches: MAIN
Diff to: previous 1.602: preferred, colored
Changes since revision 1.602: +29 -42 lines
merge yamt-idlelwp branch.  asked by core@.  some ports still needs work.

from doc/BRANCHES:

	idle lwp, and some changes depending on it.

	1. separate context switching and thread scheduling.
	   (cf. gmcgarry_ctxsw)
	2. implement idle lwp.
	3. clean up related MD/MI interfaces.
	4. make scheduler(s) modular.

Revision 1.586.2.4: download - view: text, markup, annotated - select for diffs
Fri Apr 20 20:31:25 2007 UTC (17 years, 6 months ago) by bouyer
Branches: netbsd-4
Branch point for: wrstuden-fixsa
Diff to: previous 1.586.2.3: preferred, colored; branchpoint 1.586: preferred, colored
Changes since revision 1.586.2.3: +6 -2 lines
Pull up following revision(s) (requested by mlelstv in ticket #575):
	sys/arch/i386/i386/est.c		sync with 1.37
	sys/arch/i386/i386/ipifuncs.c		sync with 1.16
	sys/arch/x86/include/cpu_msr.h		sync with 1.4
	sys/arch/x86/include/intrdefs.h		sync with 1.8
	sys/arch/x86/include/powernow.h		sync with 1.9
	sys/arch/x86/x86/powernow_k8.c		sync with 1.20
	sys/arch/x86/x86/msr_ipifuncs.c		sync with 1.8
	sys/arch/amd64/amd64/ipifuncs.c		sync with 1.9
	sys/arch/i386/i386/identcpu.c		patch
	sys/arch/i386/i386/machdep.c		patch
	sys/arch/i386/include/cpu.h		patch
	sys/arch/x86/conf/files.x86		patch
	sys/arch/x86/x86/x86_machdep.c		patch
	sys/arch/amd64/amd64/machdep.c		patch
Add MSR write IPI handler for x86. Use it and the RUN_ONCE framework
to make est and powernow drivers work properly with SMP.

Revision 1.601.2.3: download - view: text, markup, annotated - select for diffs
Tue Apr 10 13:23:05 2007 UTC (17 years, 6 months ago) by ad
Branches: vmlocking
Diff to: previous 1.601.2.2: preferred, colored
Changes since revision 1.601.2.2: +6 -2 lines
Sync with head.

Revision 1.601.2.2: download - view: text, markup, annotated - select for diffs
Tue Apr 10 12:11:18 2007 UTC (17 years, 6 months ago) by ad
Branches: vmlocking
Diff to: previous 1.601.2.1: preferred, colored
Changes since revision 1.601.2.1: +12 -9 lines
Replace some more locks.

Revision 1.601.6.1: download - view: text, markup, annotated - select for diffs
Thu Mar 29 19:27:27 2007 UTC (17 years, 7 months ago) by reinoud
Branches: reinoud-bufcleanup
Diff to: previous 1.601: preferred, colored; next MAIN 1.602: preferred, colored
Changes since revision 1.601: +6 -2 lines
Pullup to -current

Revision 1.586.2.3: download - view: text, markup, annotated - select for diffs
Wed Mar 28 20:25:36 2007 UTC (17 years, 7 months ago) by jdc
Branches: netbsd-4
Diff to: previous 1.586.2.2: preferred, colored; branchpoint 1.586: preferred, colored
Changes since revision 1.586.2.2: +15 -2 lines
Pull up revision 1.593 (requested by gdt in ticket #521)

Add a heuristic to set rbus_min_start based on total RAM.  The new
behavior is to choose 0.5 GB for <= 192 MB, 1 GB normally, and 2 GB
for >= 1 GB.  This should make the defaults work additionally old
Thinkpad 600Es, and also on notebooks with lots of RAM (e.g. T60 with
2GB).

ok christos@

Revision 1.596.2.12: download - view: text, markup, annotated - select for diffs
Sat Mar 24 14:54:45 2007 UTC (17 years, 7 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.596.2.11: preferred, colored; next MAIN 1.597: preferred, colored
Changes since revision 1.596.2.11: +6 -2 lines
sync with head.

Revision 1.601.2.1: download - view: text, markup, annotated - select for diffs
Wed Mar 21 20:10:18 2007 UTC (17 years, 7 months ago) by ad
Branches: vmlocking
Diff to: previous 1.601: preferred, colored
Changes since revision 1.601: +4 -4 lines
GC the simplelock/spinlock debugging stuff.

Revision 1.602: download - view: text, markup, annotated - select for diffs
Tue Mar 20 21:07:39 2007 UTC (17 years, 7 months ago) by xtraeme
Branches: MAIN
CVS tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic
Branch point for: ppcoea-renovation
Diff to: previous 1.601: preferred, colored
Changes since revision 1.601: +6 -2 lines
MSR read and write IPI handlers for x86. A MSR will be read or written
in all CPUs available in the system. This adds another member
to struct cpu_info, ci_msr_rvalue; it will contain the value of the MSR
in a previous operation.

Tested with clockmod in UP and SMP by me, tested with est in SMP
by Daniel Carosone and Michael Van Elst.

Ok'ed by Andrew Doran and Matthew R. Green.

Revision 1.596.2.11: download - view: text, markup, annotated - select for diffs
Mon Mar 12 05:48:22 2007 UTC (17 years, 7 months ago) by rmind
Branches: yamt-idlelwp
Diff to: previous 1.596.2.10: preferred, colored
Changes since revision 1.596.2.10: +16 -16 lines
Sync with HEAD.

Revision 1.601: download - view: text, markup, annotated - select for diffs
Wed Mar 7 21:43:43 2007 UTC (17 years, 8 months ago) by thorpej
Branches: MAIN
Branch point for: vmlocking, reinoud-bufcleanup, mjf-ufs-trans
Diff to: previous 1.600: preferred, colored
Changes since revision 1.600: +6 -6 lines
TRUE -> true, FALSE -> false

Revision 1.600: download - view: text, markup, annotated - select for diffs
Sun Mar 4 05:59:57 2007 UTC (17 years, 8 months ago) by christos
Branches: MAIN
Diff to: previous 1.599: preferred, colored
Changes since revision 1.599: +13 -13 lines
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.

Revision 1.596.2.10: download - view: text, markup, annotated - select for diffs
Sat Mar 3 08:44:01 2007 UTC (17 years, 8 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.596.2.9: preferred, colored
Changes since revision 1.596.2.9: +3 -3 lines
cpu_need_resched: remove unncessary parens.

Revision 1.596.2.9: download - view: text, markup, annotated - select for diffs
Sat Mar 3 08:39:56 2007 UTC (17 years, 8 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.596.2.8: preferred, colored
Changes since revision 1.596.2.8: +2 -3 lines
cpu_need_resched: whitespace.

Revision 1.596.2.8: download - view: text, markup, annotated - select for diffs
Thu Mar 1 14:26:58 2007 UTC (17 years, 8 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.596.2.7: preferred, colored
Changes since revision 1.596.2.7: +4 -2 lines
cpu_need_resched: don't change the correspondence of { and } with #ifdef.
no functional changes.

Revision 1.596.2.7: download - view: text, markup, annotated - select for diffs
Tue Feb 27 16:51:40 2007 UTC (17 years, 8 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.596.2.6: preferred, colored
Changes since revision 1.596.2.6: +4 -15 lines
- sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.

Revision 1.596.2.6: download - view: text, markup, annotated - select for diffs
Mon Feb 26 20:08:14 2007 UTC (17 years, 8 months ago) by rmind
Branches: yamt-idlelwp
Diff to: previous 1.596.2.5: preferred, colored
Changes since revision 1.596.2.5: +4 -3 lines
One should send an IPI only in MP case.

Revision 1.596.2.5: download - view: text, markup, annotated - select for diffs
Mon Feb 26 09:18:09 2007 UTC (17 years, 8 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.596.2.4: preferred, colored
Changes since revision 1.596.2.4: +15 -8 lines
add an "immediate" flag for cpu_need_resched().  suggested by Andrew Doran.

Revision 1.563.2.3: download - view: text, markup, annotated - select for diffs
Mon Feb 26 09:06:56 2007 UTC (17 years, 8 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.563.2.2: preferred, colored
Changes since revision 1.563.2.2: +152 -79 lines
sync with head.

Revision 1.596.2.4: download - view: text, markup, annotated - select for diffs
Fri Feb 23 15:57:46 2007 UTC (17 years, 8 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.596.2.3: preferred, colored
Changes since revision 1.596.2.3: +3 -6 lines
- introduce sys/cpu.h which has cpu_idle and cpu_need_resched.
- use it where appropriate.
- while i'm here, remove several unnecessary #include.

Revision 1.599: download - view: text, markup, annotated - select for diffs
Wed Feb 21 22:59:43 2007 UTC (17 years, 8 months ago) by thorpej
Branches: MAIN
CVS tags: ad-audiomp-base, ad-audiomp
Diff to: previous 1.598: preferred, colored
Changes since revision 1.598: +3 -3 lines
Replace the Mach-derived boolean_t type with the C99 bool type.  A
future commit will replace use of TRUE and FALSE with true and false.

Revision 1.598: download - view: text, markup, annotated - select for diffs
Sun Feb 18 18:20:26 2007 UTC (17 years, 8 months ago) by dsl
Branches: MAIN
Diff to: previous 1.597: preferred, colored
Changes since revision 1.597: +2 -12 lines
Get config(1) to supply the default parameters for BEEP_ON_HALT.

Revision 1.597: download - view: text, markup, annotated - select for diffs
Sun Feb 18 17:11:27 2007 UTC (17 years, 8 months ago) by ad
Branches: MAIN
Diff to: previous 1.596: preferred, colored
Changes since revision 1.596: +3 -4 lines
Drop proc::p_smutex before calling cpu_getmcontext().

Revision 1.596.2.3: download - view: text, markup, annotated - select for diffs
Sat Feb 17 14:03:05 2007 UTC (17 years, 8 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.596.2.2: preferred, colored
Changes since revision 1.596.2.2: +4 -3 lines
if available, use monitor/mwait rather than cli/sti/hlt.

Revision 1.596.2.2: download - view: text, markup, annotated - select for diffs
Sat Feb 17 10:30:45 2007 UTC (17 years, 8 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.596.2.1: preferred, colored
Changes since revision 1.596.2.1: +2535 -0 lines
- separate context switching and thread scheduling.
- introduce idle lwp.
- change some related MD/MI interfaces and implement i386 version.

Revision 1.596.2.1
Sat Feb 17 00:28:24 2007 UTC (17 years, 8 months ago) by yamt
Branches: yamt-idlelwp
FILE REMOVED
Changes since revision 1.596: +0 -2555 lines
file machdep.c was added on branch yamt-idlelwp on 2007-02-17 10:30:45 +0000

Revision 1.596: download - view: text, markup, annotated - select for diffs
Sat Feb 17 00:28:24 2007 UTC (17 years, 8 months ago) by daniel
Branches: MAIN
Branch point for: yamt-idlelwp
Diff to: previous 1.595: preferred, colored
Changes since revision 1.595: +4 -2 lines
Add an opencrypto provider for the AES xcrypt instructions found on VIA
C5P and later cores (also known as 'ACE', which is part of the VIA PadLock
security engine). Ported from OpenBSD.

Reviewed on tech-crypto and port-i386, no objections to commiting this.

Revision 1.595: download - view: text, markup, annotated - select for diffs
Fri Feb 9 21:55:04 2007 UTC (17 years, 8 months ago) by ad
Branches: MAIN
CVS tags: post-newlock2-merge
Diff to: previous 1.594: preferred, colored
Changes since revision 1.594: +50 -56 lines
Merge newlock2 to head.

Revision 1.577.4.10: download - view: text, markup, annotated - select for diffs
Fri Feb 9 21:03:49 2007 UTC (17 years, 8 months ago) by ad
Branches: newlock2
Diff to: previous 1.577.4.9: preferred, colored; branchpoint 1.577: preferred, colored; next MAIN 1.578: preferred, colored
Changes since revision 1.577.4.9: +4 -2 lines
Sync with HEAD.

Revision 1.586.2.2: download - view: text, markup, annotated - select for diffs
Wed Feb 7 12:53:10 2007 UTC (17 years, 9 months ago) by tron
Branches: netbsd-4
Diff to: previous 1.586.2.1: preferred, colored; branchpoint 1.586: preferred, colored
Changes since revision 1.586.2.1: +5 -5 lines
Pull up following revision(s) (requested by pavel in ticket #397):
	sys/arch/i386/i386/machdep.c: revision 1.590
correct whitespace in last commit.

Revision 1.586.2.1: download - view: text, markup, annotated - select for diffs
Wed Feb 7 12:51:44 2007 UTC (17 years, 9 months ago) by tron
Branches: netbsd-4
Diff to: previous 1.586: preferred, colored
Changes since revision 1.586: +32 -13 lines
Pull up following revision(s) (requested by pavel in ticket #397):
	sys/arch/i386/i386/machdep.c: revision 1.589
	sys/arch/i386/i386/pmap.c: revision 1.195
PR port-i386/34186 by Wolfgang Stukenbrock:
mapping of msgbuf during startup may map invalid physical adresses
"If the last available physical memory segment on a system is less 16k,
than the startup code that will map the kernel message buffer, will fail
and map physical pages behind the last segment.  This may either only lead
to a message buffer without physical memory behind it, or to an
overlapping message buffer with something else."
Fix by allowing multiple physical memory segments to be used for msgbuf.
Also remove some leftover msgbuf manipulation from pmap.c.
Fix supplied by Wolfgang Stukenbrock in the PR, with some modifications
from me, mainly to use the already existing constant VM_PHYSSEG_MAX as the
static limit of number of msgbuf segments.

Revision 1.577.4.9: download - view: text, markup, annotated - select for diffs
Tue Feb 6 13:41:04 2007 UTC (17 years, 9 months ago) by ad
Branches: newlock2
Diff to: previous 1.577.4.8: preferred, colored; branchpoint 1.577: preferred, colored
Changes since revision 1.577.4.8: +3 -3 lines
Quieten another noisy printf.

Revision 1.594: download - view: text, markup, annotated - select for diffs
Sun Feb 4 15:26:26 2007 UTC (17 years, 9 months ago) by jmcneill
Branches: MAIN
CVS tags: newlock2-nbase, newlock2-base
Diff to: previous 1.593: preferred, colored
Changes since revision 1.593: +4 -2 lines
Note the origin (hi FreeBSD!) of a couple clever bits of Xbox
initialization code. No functional changes.

Revision 1.577.4.8: download - view: text, markup, annotated - select for diffs
Thu Feb 1 08:48:03 2007 UTC (17 years, 9 months ago) by ad
Branches: newlock2
Diff to: previous 1.577.4.7: preferred, colored; branchpoint 1.577: preferred, colored
Changes since revision 1.577.4.7: +15 -2 lines
Sync with head.

Revision 1.577.4.7: download - view: text, markup, annotated - select for diffs
Tue Jan 30 13:49:34 2007 UTC (17 years, 9 months ago) by ad
Branches: newlock2
Diff to: previous 1.577.4.6: preferred, colored; branchpoint 1.577: preferred, colored
Changes since revision 1.577.4.6: +8 -48 lines
Remove support for SA. Ok core@.

Revision 1.593: download - view: text, markup, annotated - select for diffs
Fri Jan 12 20:34:09 2007 UTC (17 years, 9 months ago) by gdt
Branches: MAIN
Diff to: previous 1.592: preferred, colored
Changes since revision 1.592: +15 -2 lines
Add a heuristic to set rbus_min_start based on total RAM.  The new
behavior is to choose 0.5 GB for <= 192 MB, 1 GB normally, and 2 GB
for >= 1 GB.  This should make the defaults work additionally old
Thinkpad 600Es, and also on notebooks with lots of RAM (e.g. T60 with
2GB).

ok christos@

Revision 1.577.4.6: download - view: text, markup, annotated - select for diffs
Fri Jan 12 01:00:50 2007 UTC (17 years, 9 months ago) by ad
Branches: newlock2
Diff to: previous 1.577.4.5: preferred, colored; branchpoint 1.577: preferred, colored
Changes since revision 1.577.4.5: +86 -13 lines
Sync with head.

Revision 1.577.4.5: download - view: text, markup, annotated - select for diffs
Thu Jan 11 22:22:56 2007 UTC (17 years, 9 months ago) by ad
Branches: newlock2
Diff to: previous 1.577.4.4: preferred, colored; branchpoint 1.577: preferred, colored
Changes since revision 1.577.4.4: +5 -2 lines
Checkpoint work in progress.

Revision 1.592: download - view: text, markup, annotated - select for diffs
Sun Jan 7 01:04:26 2007 UTC (17 years, 10 months ago) by jmcneill
Branches: MAIN
Diff to: previous 1.591: preferred, colored
Changes since revision 1.591: +6 -17 lines
Remove nForce ethernet hack from machdep and instead call xbox_startup from
cpu_startup, which applies the patch.

Revision 1.591: download - view: text, markup, annotated - select for diffs
Sat Jan 6 18:42:36 2007 UTC (17 years, 10 months ago) by jmcneill
Branches: MAIN
Diff to: previous 1.590: preferred, colored
Changes since revision 1.590: +4 -7 lines
Use the pic16lc@iic driver for setting the system LED, rebooting, and
powering off the machine instead of the assembly code in pic16l.S

Revision 1.590: download - view: text, markup, annotated - select for diffs
Sat Jan 6 16:22:46 2007 UTC (17 years, 10 months ago) by pavel
Branches: MAIN
Diff to: previous 1.589: preferred, colored
Changes since revision 1.589: +5 -5 lines
correct whitespace in last commit.

Revision 1.589: download - view: text, markup, annotated - select for diffs
Sat Jan 6 15:29:02 2007 UTC (17 years, 10 months ago) by pavel
Branches: MAIN
Diff to: previous 1.588: preferred, colored
Changes since revision 1.588: +32 -13 lines
PR port-i386/34186 by Wolfgang Stukenbrock:
mapping of msgbuf during startup may map invalid physical adresses

"If the last available physical memory segment on a system is less 16k,
than the startup code that will map the kernel message buffer, will fail
and map physical pages behind the last segment.  This may either only lead
to a message buffer without physical memory behind it, or to an
overlapping message buffer with something else."

Fix by allowing multiple physical memory segments to be used for msgbuf.
Also remove some leftover msgbuf manipulation from pmap.c.

Fix supplied by Wolfgang Stukenbrock in the PR, with some modifications
from me, mainly to use the already existing constant VM_PHYSSEG_MAX as the
static limit of number of msgbuf segments.

Revision 1.588: download - view: text, markup, annotated - select for diffs
Fri Jan 5 04:07:23 2007 UTC (17 years, 10 months ago) by jmcneill
Branches: MAIN
Diff to: previous 1.587: preferred, colored
Changes since revision 1.587: +14 -11 lines
Attempt to initialize the console slightly later for hw drivers that wish
to be deferred. While we're here, clean up the Cromwell/Xromwell Xbox
workaround.

Revision 1.587: download - view: text, markup, annotated - select for diffs
Thu Jan 4 18:16:44 2007 UTC (17 years, 10 months ago) by jmcneill
Branches: MAIN
Diff to: previous 1.586: preferred, colored
Changes since revision 1.586: +67 -2 lines
Microsoft Xbox support, from Andrew Gillham.

Still requires some bug fixes in the nfe(4) driver; works with USB ethernet.
Requires Xromwell / Cromwell 2.41dev or above to boot. Tested both CD boot
and etherboot.

xboxfb(4) currently does not work properly with component video cables.

Revision 1.563.2.2: download - view: text, markup, annotated - select for diffs
Sat Dec 30 20:46:10 2006 UTC (17 years, 10 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.563.2.1: preferred, colored
Changes since revision 1.563.2.1: +44 -32 lines
sync with head.

Revision 1.577.4.4: download - view: text, markup, annotated - select for diffs
Fri Dec 29 20:27:41 2006 UTC (17 years, 10 months ago) by ad
Branches: newlock2
Diff to: previous 1.577.4.3: preferred, colored; branchpoint 1.577: preferred, colored
Changes since revision 1.577.4.3: +5 -7 lines
Checkpoint work in progress.

Revision 1.577.6.2: download - view: text, markup, annotated - select for diffs
Sun Dec 10 07:16:09 2006 UTC (17 years, 10 months ago) by yamt
Branches: yamt-splraiseipl
Diff to: previous 1.577.6.1: preferred, colored; branchpoint 1.577: preferred, colored; next MAIN 1.578: preferred, colored
Changes since revision 1.577.6.1: +20 -14 lines
sync with head.

Revision 1.577.4.3: download - view: text, markup, annotated - select for diffs
Sat Nov 18 21:29:18 2006 UTC (17 years, 11 months ago) by ad
Branches: newlock2
Diff to: previous 1.577.4.2: preferred, colored; branchpoint 1.577: preferred, colored
Changes since revision 1.577.4.2: +28 -16 lines
Sync with head.

Revision 1.586: download - view: text, markup, annotated - select for diffs
Thu Nov 16 01:32:38 2006 UTC (17 years, 11 months ago) by christos
Branches: MAIN
CVS tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, netbsd-4-base
Branch point for: netbsd-4
Diff to: previous 1.585: preferred, colored
Changes since revision 1.585: +4 -4 lines
__unused removal on arguments; approved by core.

Revision 1.585: download - view: text, markup, annotated - select for diffs
Wed Oct 25 13:56:15 2006 UTC (18 years ago) by jmmv
Branches: MAIN
Diff to: previous 1.584: preferred, colored
Changes since revision 1.584: +17 -11 lines
Remove the usage of Multiboot's "a.out kludge" to tell the boot loader to
reserve some more space for the BSS section than the binary says.  This
trick was used to leave room after the kernel's image to copy the symbol
table following the format required by ksyms_init.  (It was also used to
workaround a bug in the physical address fields of the binary, but this has
been long fixed.)  Yes, the MULTIBOOT_SYMTAB_SPACE option goes away; yay!

Instead, copy the required data after the kernel in a way that avoids having
to reserve space and use the new ksyms_init_explicit function to avoid the
need to construct a minimal ELF image.

Fixes ksyms when using an "unpatched" GRUB (one that does not contain the
fix to honour the "a.out kludge" for ELF images, even when present) -- i.e.
ddb and lkms.  As a side effect, the new code is much clearer to read and
digest.

Closes PR port-i386/32865.

Revision 1.577.4.2: download - view: text, markup, annotated - select for diffs
Tue Oct 24 21:10:22 2006 UTC (18 years ago) by ad
Branches: newlock2
Diff to: previous 1.577.4.1: preferred, colored; branchpoint 1.577: preferred, colored
Changes since revision 1.577.4.1: +21 -10 lines
- Redo LWP locking slightly and fix some races.
- Fix some locking botches.
- Make signal mask / stack per-proc for SA processes.
- Add _lwp_kill().

Revision 1.584: download - view: text, markup, annotated - select for diffs
Sun Oct 22 13:29:13 2006 UTC (18 years ago) by pooka
Branches: MAIN
Diff to: previous 1.583: preferred, colored
Changes since revision 1.583: +3 -3 lines
constipate

Revision 1.577.6.1: download - view: text, markup, annotated - select for diffs
Sun Oct 22 06:04:43 2006 UTC (18 years ago) by yamt
Branches: yamt-splraiseipl
Diff to: previous 1.577: preferred, colored
Changes since revision 1.577: +14 -8 lines
sync with head

Revision 1.583: download - view: text, markup, annotated - select for diffs
Sat Oct 21 08:11:49 2006 UTC (18 years ago) by skrll
Branches: MAIN
CVS tags: yamt-splraiseipl-base2
Diff to: previous 1.582: preferred, colored
Changes since revision 1.582: +3 -3 lines
s/out/bad/ in cpu_dumpconf so this compiles.

Revision 1.582: download - view: text, markup, annotated - select for diffs
Sat Oct 21 05:54:32 2006 UTC (18 years ago) by mrg
Branches: MAIN
Diff to: previous 1.581: preferred, colored
Changes since revision 1.581: +6 -4 lines
in cpu_dumpconf(), don't panic() if we can't bdevsw_lookup() the
dumpdev.  this occurs when we try to set the dumpdev to a device
with no driver loaded.  this fixes PR#34872.

in sys_swapctl, if bdevsw_lookup() fails, set dumpdev = NODEV
before calling cpu_dumpconf().  (this also fixes PR#34872.)

XXX: cpu_dumpconf() should probably be changed to take a dumpdev
XXX: and return an error in such cases, but that is a much more
XXX: intrusive change.

XXX2: this is only run-tested on sparc64 and compile tested on a
XXX2: couple of platforms.

Revision 1.577.4.1: download - view: text, markup, annotated - select for diffs
Fri Oct 20 21:26:44 2006 UTC (18 years ago) by ad
Branches: newlock2
Diff to: previous 1.577: preferred, colored
Changes since revision 1.577: +35 -13 lines
- Make ASTs per-LWP.
- The signal stack and signal mask will be per-LWP shortly.

need_resched(), need_proftick(), signotify():

- Prefix with cpu_
- Make per-LWP.
- Send an IPI if the LWP is on another CPU.

Revision 1.581: download - view: text, markup, annotated - select for diffs
Thu Oct 12 04:31:54 2006 UTC (18 years ago) by thorpej
Branches: MAIN
Diff to: previous 1.580: preferred, colored
Changes since revision 1.580: +5 -2 lines
cpu_exec_aout_makecmds(): consume the arguments even if COMPAT_NOMID is
not defined.

Revision 1.580: download - view: text, markup, annotated - select for diffs
Thu Oct 12 01:30:42 2006 UTC (18 years ago) by christos
Branches: MAIN
Diff to: previous 1.579: preferred, colored
Changes since revision 1.579: +4 -4 lines
- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386

Revision 1.579: download - view: text, markup, annotated - select for diffs
Wed Sep 27 17:10:34 2006 UTC (18 years, 1 month ago) by cube
Branches: MAIN
Diff to: previous 1.578: preferred, colored
Changes since revision 1.578: +4 -3 lines
This is again that time of the millenium where we have to crank up a few
static limits to meet modern bloat requirements.

VM_PHYSSEG_MAX needs it to run on Intel's D946GZIS motherboard, as reported
by rix on #NetBSD-code on freenode.  This has a consequence on the initial
number of possible extent allocations for iomem_ex, so increase that value
too.

While there, clarify the action to be taken when VM_PHYSSEG_MAX is maxed
out.

Do that on both amd64 and i386 because the causes, the effects and the code
are mostly the same.

Revision 1.578: download - view: text, markup, annotated - select for diffs
Sun Sep 24 08:35:00 2006 UTC (18 years, 1 month ago) by xtraeme
Branches: MAIN
Diff to: previous 1.577: preferred, colored
Changes since revision 1.577: +3 -3 lines
In the APM case replace a magic number 0xff with the correct definition:
APM_DEV_ALLUNITS.

Noticed by Sergey Svishchev.

Revision 1.569.4.1: download - view: text, markup, annotated - select for diffs
Sat Sep 9 02:40:07 2006 UTC (18 years, 1 month ago) by rpaulo
Branches: rpaulo-netinet-merge-pcb
Diff to: previous 1.569: preferred, colored; next MAIN 1.570: preferred, colored
Changes since revision 1.569: +141 -25 lines
sync with head

Revision 1.570.4.3: download - view: text, markup, annotated - select for diffs
Fri Aug 11 15:41:54 2006 UTC (18 years, 2 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.570.4.2: preferred, colored; branchpoint 1.570: preferred, colored; next MAIN 1.571: preferred, colored
Changes since revision 1.570.4.2: +19 -19 lines
sync with head

Revision 1.577: download - view: text, markup, annotated - select for diffs
Mon Jul 31 20:59:07 2006 UTC (18 years, 3 months ago) by mrg
Branches: MAIN
CVS tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, yamt-pdpolicy-base7, rpaulo-netinet-merge-pcb-base, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: yamt-splraiseipl, newlock2
Diff to: previous 1.576: preferred, colored
Changes since revision 1.576: +12 -5 lines
add a new "biosmem_implicit" variable that is set when a bootloader
info parser sets "biosbasemem" and "biosextmem" from.  check for this
when probing memory size, rather than biosbasemem/biosextmem being
zero which is no longer true.  also, make the REALBASEMEM/REALEXTMEM
options work properly with multiboot-booted kernels.  fixes PR#33918.

Revision 1.574.2.1: download - view: text, markup, annotated - select for diffs
Thu Jul 13 17:48:53 2006 UTC (18 years, 3 months ago) by gdamore
Branches: gdamore-uart
Diff to: previous 1.574: preferred, colored; next MAIN 1.575: preferred, colored
Changes since revision 1.574: +10 -17 lines
Merge from HEAD.

Revision 1.576: download - view: text, markup, annotated - select for diffs
Sat Jul 8 20:30:00 2006 UTC (18 years, 4 months ago) by christos
Branches: MAIN
Diff to: previous 1.575: preferred, colored
Changes since revision 1.575: +7 -7 lines
- apm.c -> apmbios.c and s/NAPM/NAPMBIOS/
- adjust to new function call signatures.

Revision 1.575: download - view: text, markup, annotated - select for diffs
Mon Jul 3 01:25:33 2006 UTC (18 years, 4 months ago) by mrg
Branches: MAIN
Diff to: previous 1.574: preferred, colored
Changes since revision 1.574: +5 -12 lines
always include the code to lookup bootinfo for memory size.  however,
don't use it if biosbasemem or biosextmem are non-zero.  this allows
one to set these variables in /netbsd rather than a kernel rebuild with
options REALBASEMEM/REALEXTMEM, as used to be.  PR#33659.

Revision 1.570.4.2: download - view: text, markup, annotated - select for diffs
Mon Jun 26 12:44:39 2006 UTC (18 years, 4 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.570.4.1: preferred, colored; branchpoint 1.570: preferred, colored
Changes since revision 1.570.4.1: +6 -4 lines
sync with head.

Revision 1.563.2.1: download - view: text, markup, annotated - select for diffs
Wed Jun 21 14:52:18 2006 UTC (18 years, 4 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.563: preferred, colored
Changes since revision 1.563: +167 -47 lines
sync with head.

Revision 1.572.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 19 03:44:26 2006 UTC (18 years, 4 months ago) by chap
Branches: chap-midi
Diff to: previous 1.572: preferred, colored; next MAIN 1.573: preferred, colored
Changes since revision 1.572: +10 -6 lines
Sync with head.

Revision 1.574: download - view: text, markup, annotated - select for diffs
Wed Jun 7 22:37:58 2006 UTC (18 years, 5 months ago) by kardel
Branches: MAIN
CVS tags: yamt-pdpolicy-base6, gdamore-uart-base, chap-midi-nbase, chap-midi-base
Branch point for: gdamore-uart
Diff to: previous 1.573: preferred, colored
Changes since revision 1.573: +6 -4 lines
convert to timecounters (from branch simonb-timecounters)

Revision 1.570.2.5: download - view: text, markup, annotated - select for diffs
Thu Jun 1 22:34:50 2006 UTC (18 years, 5 months ago) by kardel
Branches: simonb-timecounters
CVS tags: simonb-timcounters-final
Diff to: previous 1.570.2.4: preferred, colored; branchpoint 1.570: preferred, colored; next MAIN 1.571: preferred, colored
Changes since revision 1.570.2.4: +6 -4 lines
Sync with head.

Revision 1.570.8.1: download - view: text, markup, annotated - select for diffs
Wed May 24 15:47:58 2006 UTC (18 years, 5 months ago) by tron
Branches: peter-altq
Diff to: previous 1.570: preferred, colored; next MAIN 1.571: preferred, colored
Changes since revision 1.570: +117 -8 lines
Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.

Revision 1.570.4.1: download - view: text, markup, annotated - select for diffs
Wed May 24 10:56:51 2006 UTC (18 years, 5 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.570: preferred, colored
Changes since revision 1.570: +117 -8 lines
sync with head.

Revision 1.573: download - view: text, markup, annotated - select for diffs
Mon May 22 13:44:53 2006 UTC (18 years, 5 months ago) by yamt
Branches: MAIN
CVS tags: yamt-pdpolicy-base5, simonb-timecounters-base
Diff to: previous 1.572: preferred, colored
Changes since revision 1.572: +6 -4 lines
i386 and xen: move struct user to the highest address in uarea
and reduce UPAGES from 4 to 3 in the case of !NOREDZONE.

Revision 1.560.2.2: download - view: text, markup, annotated - select for diffs
Sat May 20 12:23:13 2006 UTC (18 years, 5 months ago) by tron
Branches: netbsd-3
CVS tags: netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1
Diff to: previous 1.560.2.1: preferred, colored; branchpoint 1.560: preferred, colored; next MAIN 1.561: preferred, colored
Changes since revision 1.560.2.1: +14 -14 lines
Pull up following revision(s) (requested by riz in ticket #1330):
	sys/arch/i386/i386/machdep.c: revision 1.565
TAB police.

Revision 1.560.2.1: download - view: text, markup, annotated - select for diffs
Sat May 20 12:22:16 2006 UTC (18 years, 5 months ago) by tron
Branches: netbsd-3
Diff to: previous 1.560: preferred, colored
Changes since revision 1.560: +22 -2 lines
Pull up following revision(s) (requested by riz in ticket #1330):
	sys/arch/i386/i386/machdep.c: revision 1.564
Reset the AMD Geode SC1100.  Previously, the Geode hung after
printing "resetting...".  Now it really restarts.
Code from FreeBSD.  Description of what the code does by me.

Revision 1.570.2.4: download - view: text, markup, annotated - select for diffs
Sun Apr 30 17:44:07 2006 UTC (18 years, 6 months ago) by kardel
Branches: simonb-timecounters
Diff to: previous 1.570.2.3: preferred, colored; branchpoint 1.570: preferred, colored
Changes since revision 1.570.2.3: +4 -3 lines
- clock.h only contained TSC timecounter initialization
  declarations that now live in x86/x86/tsc.h

Revision 1.570.2.3: download - view: text, markup, annotated - select for diffs
Sat Apr 22 11:37:32 2006 UTC (18 years, 6 months ago) by simonb
Branches: simonb-timecounters
Diff to: previous 1.570.2.2: preferred, colored; branchpoint 1.570: preferred, colored
Changes since revision 1.570.2.2: +113 -6 lines
Sync with head.

Revision 1.570.6.1: download - view: text, markup, annotated - select for diffs
Wed Apr 19 02:32:45 2006 UTC (18 years, 6 months ago) by elad
Branches: elad-kernelauth
Diff to: previous 1.570: preferred, colored; next MAIN 1.571: preferred, colored
Changes since revision 1.570: +113 -6 lines
sync with head - hopefully this will work

Revision 1.572: download - view: text, markup, annotated - select for diffs
Fri Apr 14 09:50:16 2006 UTC (18 years, 6 months ago) by jmmv
Branches: MAIN
CVS tags: elad-kernelauth-base
Branch point for: chap-midi
Diff to: previous 1.571: preferred, colored
Changes since revision 1.571: +3 -3 lines
biosextmem comes before biosbasemem in the stack passed by the boot loader.
Fixes e.g. APM initialization.  Problem spotted by Kurt Schreiner.

Revision 1.571: download - view: text, markup, annotated - select for diffs
Wed Apr 12 13:48:52 2006 UTC (18 years, 6 months ago) by jmmv
Branches: MAIN
Diff to: previous 1.570: preferred, colored
Changes since revision 1.570: +113 -6 lines
Convert the code that fetches bootinfo information and stores it into the
kernel from assembler to C and add several comments to make things clearer.
I've been running with these changes for a couple of months without problems.

Revision 1.570.2.2: download - view: text, markup, annotated - select for diffs
Tue Feb 28 20:28:53 2006 UTC (18 years, 8 months ago) by kardel
Branches: simonb-timecounters
Diff to: previous 1.570.2.1: preferred, colored; branchpoint 1.570: preferred, colored
Changes since revision 1.570.2.1: +2 -5 lines
Move init_TSC_tc() to just before spl0()

Revision 1.569.2.1: download - view: text, markup, annotated - select for diffs
Sat Feb 18 15:38:36 2006 UTC (18 years, 8 months ago) by yamt
Branches: yamt-uio_vmspace
Diff to: previous 1.569: preferred, colored; next MAIN 1.570: preferred, colored
Changes since revision 1.569: +7 -2 lines
sync with head.

Revision 1.570.2.1: download - view: text, markup, annotated - select for diffs
Sat Feb 4 15:13:11 2006 UTC (18 years, 9 months ago) by simonb
Branches: simonb-timecounters
Diff to: previous 1.570: preferred, colored
Changes since revision 1.570: +8 -4 lines
Remove the microtime_func function pointer.
Call the TSC timecounter initialisation function in cpu_initclocks()
  (if we are a i586 or i686).

Revision 1.570: download - view: text, markup, annotated - select for diffs
Fri Feb 3 11:08:24 2006 UTC (18 years, 9 months ago) by jmmv
Branches: MAIN
CVS tags: yamt-uio_vmspace-base5, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base
Branch point for: yamt-pdpolicy, simonb-timecounters, peter-altq, elad-kernelauth
Diff to: previous 1.569: preferred, colored
Changes since revision 1.569: +7 -2 lines
Implement support for 'The Multiboot Specification' so that i386 kernels
can be booted directly from Multiboot-compliant boot loaders (e.g. GRUB).
See the added multiboot(8) manual page for more information.

No objections in tech-kern@; only positive comments.

Revision 1.569: download - view: text, markup, annotated - select for diffs
Fri Dec 30 13:37:57 2005 UTC (18 years, 10 months ago) by jmmv
Branches: MAIN
Branch point for: yamt-uio_vmspace, rpaulo-netinet-merge-pcb
Diff to: previous 1.568: preferred, colored
Changes since revision 1.568: +2 -18 lines
Add a 'struct bootinfo' to represent the bootinfo structure used in the
kernel by x86 platforms (instead of a simple char *).  This way, the code
in, e.g., lookup_bootinfo, is a bit easier to understand.

While here, move the lookup_bootinfo function used in x86 platforms (amd64,
i386 and xen) to a common file (x86/x86_machdep.c), as it was exactly the
same in all of them.

Revision 1.568: download - view: text, markup, annotated - select for diffs
Mon Dec 26 19:23:59 2005 UTC (18 years, 10 months ago) by perry
Branches: MAIN
Diff to: previous 1.567: preferred, colored
Changes since revision 1.567: +9 -9 lines
u_intN_t -> uintN_t

Revision 1.567: download - view: text, markup, annotated - select for diffs
Sat Dec 24 20:07:10 2005 UTC (18 years, 10 months ago) by perry
Branches: MAIN
Diff to: previous 1.566: preferred, colored
Changes since revision 1.566: +4 -4 lines
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.

Revision 1.566: download - view: text, markup, annotated - select for diffs
Sun Dec 11 12:17:41 2005 UTC (18 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.565: preferred, colored
Changes since revision 1.565: +10 -10 lines
merge ktrace-lwp.

Revision 1.526.2.11: download - view: text, markup, annotated - select for diffs
Thu Nov 10 13:56:47 2005 UTC (18 years, 11 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.526.2.10: preferred, colored; next MAIN 1.527: preferred, colored
Changes since revision 1.526.2.10: +33 -13 lines
Sync with HEAD. Here we go again...

Revision 1.565: download - view: text, markup, annotated - select for diffs
Thu Sep 22 07:13:27 2005 UTC (19 years, 1 month ago) by simonb
Branches: MAIN
CVS tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, thorpej-vnode-attr-base, thorpej-vnode-attr, ktrace-lwp-base
Diff to: previous 1.564: preferred, colored
Changes since revision 1.564: +14 -14 lines
TAB police.

Revision 1.564: download - view: text, markup, annotated - select for diffs
Thu Sep 22 06:45:03 2005 UTC (19 years, 1 month ago) by dyoung
Branches: MAIN
Diff to: previous 1.563: preferred, colored
Changes since revision 1.563: +22 -2 lines
Reset the AMD Geode SC1100.  Previously, the Geode hung after
printing "resetting...".  Now it really restarts.

Code from FreeBSD.  Description of what the code does by me.

Revision 1.563: download - view: text, markup, annotated - select for diffs
Sun May 29 21:33:01 2005 UTC (19 years, 5 months ago) by christos
Branches: MAIN
Branch point for: yamt-lazymbuf
Diff to: previous 1.562: preferred, colored
Changes since revision 1.562: +8 -8 lines
Avoid shadowed variables.

Revision 1.559.4.1: download - view: text, markup, annotated - select for diffs
Fri Apr 29 11:28:12 2005 UTC (19 years, 6 months ago) by kent
Branches: kent-audio2
Diff to: previous 1.559: preferred, colored; next MAIN 1.560: preferred, colored
Changes since revision 1.559: +10 -12 lines
sync with -current

Revision 1.562: download - view: text, markup, annotated - select for diffs
Mon Apr 25 15:02:05 2005 UTC (19 years, 6 months ago) by lukem
Branches: MAIN
CVS tags: kent-audio2-base
Diff to: previous 1.561: preferred, colored
Changes since revision 1.561: +3 -3 lines
Move the MI printing of `copyright' to the MD cpu_startup() code
where the printing of `version' is already performed.
This has the benefit of allowing the copyright to be available
via dmesg(8) on platforms which need the `msgbuf' to be setup
in cpu_startup() before printed output is remembered.

Revision 1.526.2.10: download - view: text, markup, annotated - select for diffs
Fri Apr 1 14:27:39 2005 UTC (19 years, 7 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.526.2.9: preferred, colored
Changes since revision 1.526.2.9: +8 -10 lines
Sync with HEAD.

Revision 1.561: download - view: text, markup, annotated - select for diffs
Fri Apr 1 11:59:31 2005 UTC (19 years, 7 months ago) by yamt
Branches: MAIN
Diff to: previous 1.560: preferred, colored
Changes since revision 1.560: +8 -10 lines
merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
  save some resources like pv_entry.  also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.

Revision 1.559.6.3: download - view: text, markup, annotated - select for diffs
Sat Mar 19 08:33:02 2005 UTC (19 years, 7 months ago) by yamt
Branches: yamt-km
Diff to: previous 1.559.6.2: preferred, colored; branchpoint 1.559: preferred, colored; next MAIN 1.560: preferred, colored
Changes since revision 1.559.6.2: +3 -3 lines
sync with head.  xen and whitespace.  xen part is not finished.

Revision 1.526.2.9: download - view: text, markup, annotated - select for diffs
Fri Mar 4 16:38:39 2005 UTC (19 years, 8 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.526.2.8: preferred, colored
Changes since revision 1.526.2.8: +3 -3 lines
Sync with HEAD.

Hi Perry!

Revision 1.560: download - view: text, markup, annotated - select for diffs
Wed Mar 2 11:48:03 2005 UTC (19 years, 8 months ago) by mycroft
Branches: MAIN
CVS tags: yamt-km-base4, yamt-km-base3, netbsd-3-base, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0
Branch point for: netbsd-3
Diff to: previous 1.559: preferred, colored
Changes since revision 1.559: +3 -3 lines
Copyright maintenance.

Revision 1.526.2.8: download - view: text, markup, annotated - select for diffs
Fri Feb 4 11:44:30 2005 UTC (19 years, 9 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.526.2.7: preferred, colored
Changes since revision 1.526.2.7: +9 -9 lines
Sync with HEAD.

Revision 1.559.6.2: download - view: text, markup, annotated - select for diffs
Wed Jan 26 08:33:14 2005 UTC (19 years, 9 months ago) by yamt
Branches: yamt-km
Diff to: previous 1.559.6.1: preferred, colored; branchpoint 1.559: preferred, colored
Changes since revision 1.559.6.1: +6 -9 lines
early in boot, use pmap_kenter_pa rather than pmap_enter.

Revision 1.559.6.1: download - view: text, markup, annotated - select for diffs
Tue Jan 25 13:01:08 2005 UTC (19 years, 9 months ago) by yamt
Branches: yamt-km
Diff to: previous 1.559: preferred, colored
Changes since revision 1.559: +4 -3 lines
- convert i386 to new apis.
- remove a pmap bootstrap kludge, which is no longer needed.

Revision 1.526.2.7: download - view: text, markup, annotated - select for diffs
Tue Nov 2 07:50:35 2004 UTC (20 years ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.526.2.6: preferred, colored
Changes since revision 1.526.2.6: +7 -7 lines
Sync with HEAD.

Revision 1.559: download - view: text, markup, annotated - select for diffs
Wed Oct 20 04:20:05 2004 UTC (20 years ago) by thorpej
Branches: MAIN
CVS tags: yamt-km-base2, yamt-km-base, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: yamt-km, kent-audio2
Diff to: previous 1.558: preferred, colored
Changes since revision 1.558: +7 -7 lines
Move boot device detection code from i386 and amd64 ports to x86_autoconf.c.
Rename i386_alldisks and x86_64_alldisks to x86_alldisks, adjust other
references to compensate.

Revision 1.526.2.6: download - view: text, markup, annotated - select for diffs
Tue Sep 21 13:16:42 2004 UTC (20 years, 1 month ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.526.2.5: preferred, colored
Changes since revision 1.526.2.5: +2 -2 lines
Fix the sync with head I botched.

Revision 1.526.2.5: download - view: text, markup, annotated - select for diffs
Sat Sep 18 14:35:28 2004 UTC (20 years, 1 month ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.526.2.4: preferred, colored
Changes since revision 1.526.2.4: +4 -4 lines
Sync with HEAD.

Revision 1.526.2.4: download - view: text, markup, annotated - select for diffs
Fri Sep 3 12:44:47 2004 UTC (20 years, 2 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.526.2.3: preferred, colored
Changes since revision 1.526.2.3: +3 -3 lines
Sync with HEAD

Revision 1.558: download - view: text, markup, annotated - select for diffs
Thu Aug 26 10:12:33 2004 UTC (20 years, 2 months ago) by junyoung
Branches: MAIN
Diff to: previous 1.557: preferred, colored
Changes since revision 1.557: +3 -3 lines
As suggested on tech-kern@ days ago:
* Get rid of PTmap, PTD, PTDpde, APTmap, APTD, and APTDpde from locore.S.
* Rename PTDpaddr to PDPpaddr, ptdpaddr in struct cpu_kcore_hdr to pdppaddr for consistency.

Revision 1.552.2.3: download - view: text, markup, annotated - select for diffs
Mon Aug 16 17:46:05 2004 UTC (20 years, 2 months ago) by jmc
Branches: netbsd-2-0
CVS tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2
Diff to: previous 1.552.2.2: preferred, colored; branchpoint 1.552: preferred, colored; next MAIN 1.553: preferred, colored
Changes since revision 1.552.2.2: +5 -3 lines
Pullup rev 1.557 (requested by dbj in ticket #767)

Add support to pxeboot for reading the bios disk geometry
as well as fixing several related bugs that occur when the bios
geometry is not read by the boot loader.

Revision 1.526.2.3: download - view: text, markup, annotated - select for diffs
Thu Aug 12 11:41:13 2004 UTC (20 years, 2 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.526.2.2: preferred, colored
Changes since revision 1.526.2.2: +5 -3 lines
Sync with HEAD.

Revision 1.557: download - view: text, markup, annotated - select for diffs
Thu Aug 5 18:04:35 2004 UTC (20 years, 3 months ago) by dbj
Branches: MAIN
Diff to: previous 1.556: preferred, colored
Changes since revision 1.556: +5 -3 lines
fix several related bugs that cause sysctl machdep.diskinfo to
lose when booted from pxeboot.
. make sure that i386_alldisks gets initialized even if
  bios geometry information is not available in the bootinfo
. if i386_alldisks is not initialized, have sysctl return EOPNOTSUPP
. compile pxeboot with -DPASS_BIOSGEOM and I386_INCLUDE_DISK=yes
  this may increase the size of pxeboot which is required to run
  in 64k.  However, it seems to be working ok on my system

Revision 1.526.2.2: download - view: text, markup, annotated - select for diffs
Tue Aug 3 10:35:49 2004 UTC (20 years, 3 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.526.2.1: preferred, colored
Changes since revision 1.526.2.1: +338 -475 lines
Sync with HEAD

Revision 1.552.2.2: download - view: text, markup, annotated - select for diffs
Fri Jul 23 22:42:00 2004 UTC (20 years, 3 months ago) by he
Branches: netbsd-2-0
Diff to: previous 1.552.2.1: preferred, colored; branchpoint 1.552: preferred, colored
Changes since revision 1.552.2.1: +6 -5 lines
Pull up revision 1.556 (requested by mycroft in ticket #694):
  Use pmap_kenter_pa() to map pages to dump, not pmap_enter(),
  so that it is more resistant to VM lossage.

Revision 1.556: download - view: text, markup, annotated - select for diffs
Thu Jul 22 15:12:46 2004 UTC (20 years, 3 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.555: preferred, colored
Changes since revision 1.555: +6 -5 lines
Use pmap_kenter_pa() to map pages to dump, not pmap_enter(), so that it's more
resistant to VM lossage.

Revision 1.552.2.1: download - view: text, markup, annotated - select for diffs
Sun Jul 4 13:09:00 2004 UTC (20 years, 4 months ago) by he
Branches: netbsd-2-0
Diff to: previous 1.552: preferred, colored
Changes since revision 1.552: +5 -2 lines
Pull up revision 1.555 (requested by mycroft in ticket #594):
  Put back the reloading of the IDT in cpu_reset().
  Presumably this overrides some descriptor caching in the CPU.
  Fixes PR#8120 (cpu_reset() is unreliable on some systems).

Revision 1.555: download - view: text, markup, annotated - select for diffs
Sat Jul 3 21:02:09 2004 UTC (20 years, 4 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.554: preferred, colored
Changes since revision 1.554: +5 -2 lines
Per PR 8120, put back the reloading of the IDT in cpu_reset().  (Presumably
this overrides some descriptor caching in the CPU.)

Revision 1.554: download - view: text, markup, annotated - select for diffs
Mon May 3 16:38:28 2004 UTC (20 years, 6 months ago) by lukem
Branches: MAIN
Diff to: previous 1.553: preferred, colored
Changes since revision 1.553: +7 -2 lines
move machdep.est.cpu_brand to machdep.cpu_brand

Revision 1.553: download - view: text, markup, annotated - select for diffs
Fri Apr 30 02:05:43 2004 UTC (20 years, 6 months ago) by lukem
Branches: MAIN
Diff to: previous 1.552: preferred, colored
Changes since revision 1.552: +4 -2 lines
Integrate support for Enhanced SpeedStep Technology (est) that
Michael Eriksson posted to port-i386 on 20031102, with various
modifications by me to work in the new sysctl(9) framework.

The code is enabled with 'options ENHANCED_SPEEDSTEP', and if
the CPU supports EST the following sysctl(8) nodes appear
(with the values that a Dell Inspiron 8600 + WUXGA with a
1.4GHz Pentium M CPU supports):
	machdep.est.cpu_brand = Intel(R) Pentium(R) M processor 1400MHz
	machdep.est.frequency.target = 1400
	machdep.est.frequency.current = 1400
	machdep.est.frequency.available = 1400 1200 1000 800 600

If EST support isn't available, the "machdep.est" sysctl sub-MIB
is not created.

Once we have a more general "CPU frequency" control API we can
migrate this code to using that.

Thanks to Michael Erikkson for providing this code!

Revision 1.552: download - view: text, markup, annotated - select for diffs
Wed Mar 24 15:34:49 2004 UTC (20 years, 7 months ago) by atatat
Branches: MAIN
CVS tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Diff to: previous 1.551: preferred, colored
Changes since revision 1.551: +32 -17 lines
Tango on sysctl_createv() and flags.  The flags have all been renamed,
and sysctl_createv() now uses more arguments.

Revision 1.551: download - view: text, markup, annotated - select for diffs
Sun Mar 21 15:37:02 2004 UTC (20 years, 7 months ago) by junyoung
Branches: MAIN
Diff to: previous 1.550: preferred, colored
Changes since revision 1.550: +23 -58 lines
ANSIfy.

Revision 1.550: download - view: text, markup, annotated - select for diffs
Fri Mar 5 11:34:17 2004 UTC (20 years, 8 months ago) by junyoung
Branches: MAIN
Diff to: previous 1.549: preferred, colored
Changes since revision 1.549: +5 -5 lines
Drop trailing spaces.

Revision 1.549: download - view: text, markup, annotated - select for diffs
Fri Feb 13 11:36:13 2004 UTC (20 years, 8 months ago) by wiz
Branches: MAIN
Diff to: previous 1.548: preferred, colored
Changes since revision 1.548: +4 -4 lines
Uppercase CPU, plural is CPUs.

Revision 1.548: download - view: text, markup, annotated - select for diffs
Wed Jan 28 10:48:55 2004 UTC (20 years, 9 months ago) by yamt
Branches: MAIN
Diff to: previous 1.547: preferred, colored
Changes since revision 1.547: +5 -5 lines
rename i386 mdlwp flags from MDP_ to MDL_
to avoid confusion with mdproc flags which also have MDP_ prefixes.

Revision 1.547: download - view: text, markup, annotated - select for diffs
Tue Dec 30 12:33:22 2003 UTC (20 years, 10 months ago) by pk
Branches: MAIN
Diff to: previous 1.546: preferred, colored
Changes since revision 1.546: +5 -102 lines
Replace the traditional buffer memory management -- based on fixed per buffer
virtual memory reservation and a private pool of memory pages -- by a scheme
based on memory pools.

This allows better utilization of memory because buffers can now be allocated
with a granularity finer than the system's native page size (useful for
filesystems with e.g. 1k or 2k fragment sizes).  It also avoids fragmentation
of virtual to physical memory mappings (due to the former fixed virtual
address reservation) resulting in better utilization of MMU resources on some
platforms.  Finally, the scheme is more flexible by allowing run-time decisions
on the amount of memory to be used for buffers.

On the other hand, the effectiveness of the LRU queue for buffer recycling
may be somewhat reduced compared to the traditional method since, due to the
nature of the pool based memory allocation, the actual least recently used
buffer may release its memory to a pool different from the one needed by a
newly allocated buffer. However, this effect will kick in only if the
system is under memory pressure.

Revision 1.546: download - view: text, markup, annotated - select for diffs
Tue Dec 30 03:57:19 2003 UTC (20 years, 10 months ago) by yamt
Branches: MAIN
Diff to: previous 1.545: preferred, colored
Changes since revision 1.545: +8 -2 lines
(MULTIPROCESSOR version of) need_resched:
- nothing needs to be done if ci_want_resched is already set.
- if the cpu isn't running any lwp, send a no-op ipi to it
  so that it can resume immediately from halting in idle loop
  without having to wait until the next clock tick.
some advices from Stephan Uphoff.

Revision 1.545: download - view: text, markup, annotated - select for diffs
Thu Dec 4 19:38:21 2003 UTC (20 years, 11 months ago) by atatat
Branches: MAIN
Diff to: previous 1.544: preferred, colored
Changes since revision 1.544: +138 -79 lines
Dynamic sysctl.

Gone are the old kern_sysctl(), cpu_sysctl(), hw_sysctl(),
vfs_sysctl(), etc, routines, along with sysctl_int() et al.  Now all
nodes are registered with the tree, and nodes can be added (or
removed) easily, and I/O to and from the tree is handled generically.

Since the nodes are registered with the tree, the mapping from name to
number (and back again) can now be discovered, instead of having to be
hard coded.  Adding new nodes to the tree is likewise much simpler --
the new infrastructure handles almost all the work for simple types,
and just about anything else can be done with a small helper function.

All existing nodes are where they were before (numerically speaking),
so all existing consumers of sysctl information should notice no
difference.

PS - I'm sorry, but there's a distinct lack of documentation at the
moment.  I'm working on sysctl(3/8/9) right now, and I promise to
watch out for buses.

Revision 1.544: download - view: text, markup, annotated - select for diffs
Thu Dec 4 13:05:16 2003 UTC (20 years, 11 months ago) by keihan
Branches: MAIN
Diff to: previous 1.543: preferred, colored
Changes since revision 1.543: +3 -3 lines
netbsd.org -> NetBSD.org

All "netbsd.org" is now gone from src/sys/arch.

Revision 1.543: download - view: text, markup, annotated - select for diffs
Tue Oct 28 22:52:53 2003 UTC (21 years ago) by mycroft
Branches: MAIN
Diff to: previous 1.542: preferred, colored
Changes since revision 1.542: +6 -6 lines
Eliminate bogus initializer.

Revision 1.542: download - view: text, markup, annotated - select for diffs
Mon Oct 27 14:11:46 2003 UTC (21 years ago) by junyoung
Branches: MAIN
Diff to: previous 1.541: preferred, colored
Changes since revision 1.541: +17 -17 lines
Nuke __P().

Revision 1.541: download - view: text, markup, annotated - select for diffs
Sat Oct 25 18:40:37 2003 UTC (21 years ago) by christos
Branches: MAIN
Diff to: previous 1.540: preferred, colored
Changes since revision 1.540: +3 -3 lines
Fix uninitialized variable warnings

Revision 1.540: download - view: text, markup, annotated - select for diffs
Wed Oct 8 00:28:41 2003 UTC (21 years, 1 month ago) by thorpej
Branches: MAIN
Diff to: previous 1.539: preferred, colored
Changes since revision 1.539: +3 -3 lines
* Shuffle some data structures so, and add a flags word to ksiginfo_t.
  Right now the only flag is used to indicate if a ksiginfo_t is a
  result of a trap.  Add a predicate macro to test for this flag.
* Add initialization macros for ksiginfo_t's.
* Add accssor macro for ksi_trap.  Expands to 0 if the ksiginfo_t was
  not the result of a trap.  This matches the sigcontext trapcode semantics.
* In kpsendsig(), use KSI_TRAP_P() to select the lwp that gets the signal.
  Inspired by Matthias Drochner's fix to kpsendsig(), but correctly handles
  the case of non-trap-generated signals that have a > 0 si_code.

This patch fixes a signal delivery problem with threaded programs noted by
Matthias Drochner on tech-kern.

As discussed on tech-kern.  Reviewed and OK's by Christos.

Revision 1.539: download - view: text, markup, annotated - select for diffs
Thu Sep 25 22:01:31 2003 UTC (21 years, 1 month ago) by christos
Branches: MAIN
Diff to: previous 1.538: preferred, colored
Changes since revision 1.538: +4 -4 lines
constify sendsig/trapsignal

Revision 1.538: download - view: text, markup, annotated - select for diffs
Wed Sep 10 21:38:40 2003 UTC (21 years, 1 month ago) by christos
Branches: MAIN
Diff to: previous 1.537: preferred, colored
Changes since revision 1.537: +11 -11 lines
sort the opt_ includes.

Revision 1.537: download - view: text, markup, annotated - select for diffs
Wed Sep 10 19:48:49 2003 UTC (21 years, 1 month ago) by christos
Branches: MAIN
Diff to: previous 1.536: preferred, colored
Changes since revision 1.536: +4 -209 lines
move compat_16 stuff into a separate file.

Revision 1.536: download - view: text, markup, annotated - select for diffs
Wed Sep 10 16:47:00 2003 UTC (21 years, 1 month ago) by christos
Branches: MAIN
Diff to: previous 1.535: preferred, colored
Changes since revision 1.535: +8 -6 lines
make obsolete trampoline code COMPAT_16. Unfortunately sigreturn14 is used
by IBCS2; grr.

Revision 1.535: download - view: text, markup, annotated - select for diffs
Wed Sep 10 11:39:09 2003 UTC (21 years, 1 month ago) by drochner
Branches: MAIN
Diff to: previous 1.534: preferred, colored
Changes since revision 1.534: +4 -4 lines
in cpu_setmcontext(), check where we go, not where we are coming from,
and line-terminate a diagnostic message which was caused by that bug

Revision 1.534: download - view: text, markup, annotated - select for diffs
Sat Sep 6 22:08:14 2003 UTC (21 years, 2 months ago) by christos
Branches: MAIN
Diff to: previous 1.533: preferred, colored
Changes since revision 1.533: +144 -50 lines
SA_SIGINFO changes.

Revision 1.533: download - view: text, markup, annotated - select for diffs
Sun Aug 24 17:52:30 2003 UTC (21 years, 2 months ago) by chs
Branches: MAIN
Diff to: previous 1.532: preferred, colored
Changes since revision 1.532: +15 -6 lines
add support for non-executable mappings (where the hardware allows this)
and make the stack and heap non-executable by default.  the changes
fall into two basic catagories:

 - pmap and trap-handler changes.  these are all MD:
   = alpha: we already track per-page execute permission with the (software)
	PG_EXEC bit, so just have the trap handler pay attention to it.
   = i386: use a new GDT segment for %cs for processes that have no
	executable mappings above a certain threshold (currently the
	bottom of the stack).  track per-page execute permission with
	the last unused PTE bit.
   = powerpc/ibm4xx: just use the hardware exec bit.
   = powerpc/oea: we already track per-page exec bits, but the hardware only
	implements non-exec mappings at the segment level.  so track the
	number of executable mappings in each segment and turn on the no-exec
	segment bit iff the count is 0.  adjust the trap handler to deal.
   = sparc (sun4m): fix our use of the hardware protection bits.
	fix the trap handler to recognize text faults.
   = sparc64: split the existing unified TSB into data and instruction TSBs,
	and only load TTEs into the appropriate TSB(s) for the permissions.
	fix the trap handler to check for execute permission.
   = not yet implemented: amd64, hppa, sh5

 - changes in all the emulations that put a signal trampoline on the stack.
   instead, we now put the trampoline into a uvm_aobj and map that into
   the process separately.

originally from openbsd, adapted for netbsd by me.

Revision 1.532: download - view: text, markup, annotated - select for diffs
Wed Aug 20 21:48:38 2003 UTC (21 years, 2 months ago) by fvdl
Branches: MAIN
Diff to: previous 1.531: preferred, colored
Changes since revision 1.531: +3 -3 lines
Pass pointers to frames from assembly, do not use the 'frame on stack
as argument passed by value' trick, as gcc 3.3.x makes (valid) assumptions
about the stack that will not be true. Costs 2 instructions per trap/syscall
on i386, 4 per interrupt for MP. One instruction per trap/syscall on amd64,
2 per interrupt for MP. I expect gcc 3.3.1 to make up for this by better
optimization (it'd better..)

While here, make amd64 compile again by using subr_mbr_disk.c

Revision 1.531: download - view: text, markup, annotated - select for diffs
Sun Aug 17 14:23:16 2003 UTC (21 years, 2 months ago) by kochi
Branches: MAIN
Diff to: previous 1.530: preferred, colored
Changes since revision 1.530: +3 -3 lines
make shutdown error messages clearer (idea from Christoph Egger)

Revision 1.530: download - view: text, markup, annotated - select for diffs
Sun Aug 17 14:15:43 2003 UTC (21 years, 2 months ago) by kochi
Branches: MAIN
Diff to: previous 1.529: preferred, colored
Changes since revision 1.529: +7 -5 lines
Try shutdown with ACPI only when ACPI is enabled.
Patch from Masanori Kanaoka (with a little modification by me).

Revision 1.389.2.7: download - view: text, markup, annotated - select for diffs
Sat Aug 16 20:03:03 2003 UTC (21 years, 2 months ago) by itojun
Branches: netbsd-1-5
Diff to: previous 1.389.2.6: preferred, colored; branchpoint 1.389: preferred, colored; next MAIN 1.390: preferred, colored
Changes since revision 1.389.2.6: +9 -3 lines
pullup 1.529 (ticket #72)

Fix stack location for VM86 processes in the !sigaltstack case.
I doubt it makes much sense to use the VM's stack for this, but the
old code was doubtless wrong because it potentially overwrote random
user memory.
(It might be a good idea to use the process' pre-vm86()-call stack,
but atm the infrastructure for this is missing.)

Revision 1.471.4.4: download - view: text, markup, annotated - select for diffs
Sat Aug 16 16:17:11 2003 UTC (21 years, 2 months ago) by tron
Branches: netbsd-1-6
CVS tags: netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002
Diff to: previous 1.471.4.3: preferred, colored; branchpoint 1.471: preferred, colored; next MAIN 1.472: preferred, colored
Changes since revision 1.471.4.3: +8 -2 lines
Pull up revision 1.529 (requested by drochner in ticket #1415):
Fix stack location for VM86 processes in the !sigaltstack case.
I doubt it makes much sense to use the VM's stack for this, but the
old code was doubtless wrong because it potentially overwrote random
user memory.
(It might be a good idea to use the process' pre-vm86()-call stack,
but atm the infrastructure for this is missing.)

Revision 1.529: download - view: text, markup, annotated - select for diffs
Mon Aug 11 14:09:18 2003 UTC (21 years, 2 months ago) by drochner
Branches: MAIN
Diff to: previous 1.528: preferred, colored
Changes since revision 1.528: +10 -4 lines
Fix stack location for VM86 processes in the !sigaltstack case.
I doubt it makes much sense to use the VM's stack for this, but the
old code was doubtless wrong because it potentially overwrote random
user memory.
(It might be a good idea to use the process' pre-vm86()-call stack,
but atm the infrastructure for this is missing.)

Revision 1.528: download - view: text, markup, annotated - select for diffs
Thu Aug 7 16:27:54 2003 UTC (21 years, 3 months ago) by agc
Branches: MAIN
Diff to: previous 1.527: preferred, colored
Changes since revision 1.527: +3 -7 lines
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.

Revision 1.527: download - view: text, markup, annotated - select for diffs
Mon Jul 28 10:28:30 2003 UTC (21 years, 3 months ago) by mrg
Branches: MAIN
Diff to: previous 1.526: preferred, colored
Changes since revision 1.526: +3 -3 lines
add another cast to appease gcc3.3

Revision 1.526.2.1: download - view: text, markup, annotated - select for diffs
Wed Jul 2 15:25:21 2003 UTC (21 years, 4 months ago) by darrenr
Branches: ktrace-lwp
Diff to: previous 1.526: preferred, colored
Changes since revision 1.526: +7 -7 lines
Apply the aborted ktrace-lwp changes to a specific branch.  This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it.  This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.

Revision 1.526: download - view: text, markup, annotated - select for diffs
Sun Jun 29 22:28:24 2003 UTC (21 years, 4 months ago) by fvdl
Branches: MAIN
Branch point for: ktrace-lwp
Diff to: previous 1.525: preferred, colored
Changes since revision 1.525: +5 -5 lines
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.

Revision 1.525: download - view: text, markup, annotated - select for diffs
Sat Jun 28 14:20:55 2003 UTC (21 years, 4 months ago) by darrenr
Branches: MAIN
Diff to: previous 1.524: preferred, colored
Changes since revision 1.524: +7 -7 lines
Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V

Revision 1.524: download - view: text, markup, annotated - select for diffs
Thu Jun 26 16:47:15 2003 UTC (21 years, 4 months ago) by drochner
Branches: MAIN
Diff to: previous 1.523: preferred, colored
Changes since revision 1.523: +3 -2 lines
cpu_feature is not set (nor used) by locore since SMP, so move the
definition to C code

Revision 1.523: download - view: text, markup, annotated - select for diffs
Mon Jun 23 11:01:19 2003 UTC (21 years, 4 months ago) by martin
Branches: MAIN
Diff to: previous 1.522: preferred, colored
Changes since revision 1.522: +3 -2 lines
Make sure to include opt_foo.h if a defflag option FOO is used.

Revision 1.522: download - view: text, markup, annotated - select for diffs
Sat Apr 26 11:05:14 2003 UTC (21 years, 6 months ago) by ragge
Branches: MAIN
Diff to: previous 1.521: preferred, colored
Changes since revision 1.521: +11 -5 lines
Call ksyms_init() instead of ddb_init() in case of
	NKSYMS || defined(DDB) || defined(LKM)

Revision 1.521: download - view: text, markup, annotated - select for diffs
Wed Apr 16 21:37:37 2003 UTC (21 years, 6 months ago) by dsl
Branches: MAIN
Diff to: previous 1.520: preferred, colored
Changes since revision 1.520: +7 -0 lines
Partially reverse previous change.
Reset RTC only if ntp is running or adjtime system call has changed time.

Revision 1.520: download - view: text, markup, annotated - select for diffs
Wed Apr 16 19:07:34 2003 UTC (21 years, 6 months ago) by dsl
Branches: MAIN
Diff to: previous 1.519: preferred, colored
Changes since revision 1.519: +2 -7 lines
Don't set the RTC to kernel time during shutdown.
This stops the system RTC drifting if any hardclock ticks were missed (eg
if the system spent any time at the kdb prompt).
The RTC is set whenever the system clock is set, so setting at shutdown
is unnecessary.

Revision 1.519: download - view: text, markup, annotated - select for diffs
Fri Apr 11 22:02:30 2003 UTC (21 years, 6 months ago) by nathanw
Branches: MAIN
Diff to: previous 1.518: preferred, colored
Changes since revision 1.518: +9 -2 lines
Make cpu_getmcontext() run the PC through ras_lookup() so that kernel
getcontext() plus userlevel setcontext() (as used in libpthread) respects
the atomicity of RAS regions.

Revision 1.518: download - view: text, markup, annotated - select for diffs
Tue Apr 1 20:54:23 2003 UTC (21 years, 7 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.517: preferred, colored
Changes since revision 1.517: +2 -7 lines
Use PAGE_SIZE rather than NBPG.

Revision 1.517: download - view: text, markup, annotated - select for diffs
Tue Mar 25 19:37:16 2003 UTC (21 years, 7 months ago) by jmmv
Branches: MAIN
Diff to: previous 1.516: preferred, colored
Changes since revision 1.516: +27 -2 lines
Implement the beep on halt feature.  When enabled, it makes the kernel beep
the computer speaker when it's completely safe to power down the machine
(after the "The operating system has halted." message).  This is useful for
headless machines.

The feature is only enabled if the BEEP_ONHALT option is defined (disabled      by default).  It can be tuned through the BEEP_ONHALT_{COUNT,PERIOD,PITCH}      options.

Closes my own PR kern/18792.

Revision 1.516: download - view: text, markup, annotated - select for diffs
Mon Mar 3 22:14:16 2003 UTC (21 years, 8 months ago) by fvdl
Branches: MAIN
Diff to: previous 1.515: preferred, colored
Changes since revision 1.515: +12 -10 lines
The IDT only contains gate descriptors, so define it as such.

Revision 1.515: download - view: text, markup, annotated - select for diffs
Sat Mar 1 16:37:53 2003 UTC (21 years, 8 months ago) by fvdl
Branches: MAIN
Diff to: previous 1.514: preferred, colored
Changes since revision 1.514: +6 -1592 lines
Move the CPU identification out of machdep.c into a seperate file.

Revision 1.514: download - view: text, markup, annotated - select for diffs
Wed Feb 26 21:28:22 2003 UTC (21 years, 8 months ago) by fvdl
Branches: MAIN
Diff to: previous 1.513: preferred, colored
Changes since revision 1.513: +8 -8 lines
Adapt for move of files to arch/x86.

Revision 1.513: download - view: text, markup, annotated - select for diffs
Wed Feb 19 00:18:34 2003 UTC (21 years, 8 months ago) by fvdl
Branches: MAIN
Diff to: previous 1.512: preferred, colored
Changes since revision 1.512: +3 -3 lines
Undo constification of mtrr_funcs. I'll deal with it later.

Revision 1.512: download - view: text, markup, annotated - select for diffs
Fri Feb 14 01:11:21 2003 UTC (21 years, 8 months ago) by perry
Branches: MAIN
Diff to: previous 1.511: preferred, colored
Changes since revision 1.511: +8 -5 lines
Instead of spinning, __asm __volatile("hlt").

Revision 1.511: download - view: text, markup, annotated - select for diffs
Thu Feb 13 21:34:03 2003 UTC (21 years, 8 months ago) by ross
Branches: MAIN
Diff to: previous 1.510: preferred, colored
Changes since revision 1.510: +5 -3 lines
If no keyboard is attached, implement RB_HALT with a spin.  kern/10481

Revision 1.510: download - view: text, markup, annotated - select for diffs
Sun Feb 9 13:03:38 2003 UTC (21 years, 8 months ago) by enami
Branches: MAIN
Diff to: previous 1.509: preferred, colored
Changes since revision 1.509: +3 -3 lines
Fix the type of variable `mtrr_funcs' so that this file compiles again
after constify.

Revision 1.471.4.3: download - view: text, markup, annotated - select for diffs
Sat Feb 8 06:40:59 2003 UTC (21 years, 9 months ago) by jmc
Branches: netbsd-1-6
CVS tags: netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001
Diff to: previous 1.471.4.2: preferred, colored; branchpoint 1.471: preferred, colored
Changes since revision 1.471.4.2: +4 -4 lines
Pullup rev 1.480 (requested by kirill@lava.net and ok'd by erh for ticket #1148)
 Adjust the check for what segments should go on the low priority
 free list.  If a segment starts exactly at 16M don't try to split
 it because that causes the code to try to call uvm_page_physload
 with a zero length segment. PR#17199

Revision 1.509: download - view: text, markup, annotated - select for diffs
Wed Feb 5 12:18:03 2003 UTC (21 years, 9 months ago) by nakayama
Branches: MAIN
Diff to: previous 1.508: preferred, colored
Changes since revision 1.508: +3 -3 lines
Share i386/tsc_microtime.c with alpha and sparc64 as kern_microtime.c.
(approved by martin)

Revision 1.508: download - view: text, markup, annotated - select for diffs
Fri Jan 17 23:10:30 2003 UTC (21 years, 9 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.507: preferred, colored
Changes since revision 1.507: +241 -28 lines
Merge the nathanw_sa branch.

Revision 1.429.2.34: download - view: text, markup, annotated - select for diffs
Thu Dec 19 00:33:48 2002 UTC (21 years, 10 months ago) by thorpej
Branches: nathanw_sa
CVS tags: nathanw_sa_end
Diff to: previous 1.429.2.33: preferred, colored; next MAIN 1.430: preferred, colored
Changes since revision 1.429.2.33: +21 -2 lines
Sync with HEAD.

Revision 1.507: download - view: text, markup, annotated - select for diffs
Mon Dec 16 18:31:09 2002 UTC (21 years, 10 months ago) by jdolecek
Branches: MAIN
CVS tags: nathanw_sa_before_merge, nathanw_sa_base, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Diff to: previous 1.506: preferred, colored
Changes since revision 1.506: +21 -2 lines
use the __HAVE_CPU_MAXPROC hook to limit kern.maxproc to number
  of available GDT slots
add code in init386() to force maxproc to be maximum cpu_maxproc()

this fixes port-i386/1635 by John Kohl

Revision 1.471.4.2: download - view: text, markup, annotated - select for diffs
Thu Dec 12 23:10:36 2002 UTC (21 years, 10 months ago) by he
Branches: netbsd-1-6
Diff to: previous 1.471.4.1: preferred, colored; branchpoint 1.471: preferred, colored
Changes since revision 1.471.4.1: +56 -2 lines
Pull up revision 1.497 (requested by minoura in ticket #1022):
  Add support for National Semiconductor Geode(TM) family of
  processors.

Revision 1.429.2.33: download - view: text, markup, annotated - select for diffs
Wed Dec 11 06:00:56 2002 UTC (21 years, 10 months ago) by thorpej
Branches: nathanw_sa
Diff to: previous 1.429.2.32: preferred, colored
Changes since revision 1.429.2.32: +247 -78 lines
Sync with HEAD.

Revision 1.506: download - view: text, markup, annotated - select for diffs
Sat Dec 7 15:36:20 2002 UTC (21 years, 11 months ago) by junyoung
Branches: MAIN
Diff to: previous 1.505: preferred, colored
Changes since revision 1.505: +89 -15 lines
Identify many Intel processors which were misidentified previously.

Revision 1.505: download - view: text, markup, annotated - select for diffs
Sat Dec 7 15:18:08 2002 UTC (21 years, 11 months ago) by junyoung
Branches: MAIN
Diff to: previous 1.504: preferred, colored
Changes since revision 1.504: +4 -4 lines
Print processor signature (id) after clock frequency.

Revision 1.504: download - view: text, markup, annotated - select for diffs
Fri Dec 6 17:53:52 2002 UTC (21 years, 11 months ago) by junyoung
Branches: MAIN
Diff to: previous 1.503: preferred, colored
Changes since revision 1.503: +3 -8 lines
Get rid of #ifdef CPUDEBUG. CPU signature is always displayed.

Revision 1.503: download - view: text, markup, annotated - select for diffs
Fri Dec 6 14:47:07 2002 UTC (21 years, 11 months ago) by junyoung
Branches: MAIN
Diff to: previous 1.502: preferred, colored
Changes since revision 1.502: +16 -17 lines
Don't pollute struct cpu_info with throwaway variables.

Revision 1.502: download - view: text, markup, annotated - select for diffs
Fri Dec 6 05:03:02 2002 UTC (21 years, 11 months ago) by junyoung
Branches: MAIN
Diff to: previous 1.501: preferred, colored
Changes since revision 1.501: +7 -7 lines
Rename amd_cpuid_cpu_cacheinfo() to amd_cpu_cacheinfo().

Revision 1.501: download - view: text, markup, annotated - select for diffs
Fri Dec 6 02:38:25 2002 UTC (21 years, 11 months ago) by junyoung
Branches: MAIN
Diff to: previous 1.500: preferred, colored
Changes since revision 1.500: +57 -15 lines
Display the extended feature flags with non-Intel processors rather than
the standard flags. See also PR#19163.

Before:

cpu0: AMD Athlon XP 1800+ (686-class), 1532.11 MHz
cpu0: features 383f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR>
cpu0: features 383f9ff<PGE,MCA,CMOV,FGPAT,PSE36,MMX>
cpu0: features 383f9ff<FXSR,SSE>

After:

cpu0: AMD Athlon XP 1800+ (686-class), 1532.11 MHz
cpu0: features c3cbf9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR>
cpu0: features c3cbf9ff<PGE,MCA,CMOV,PAT,PSE36,MPC,MMXX,MMX>
cpu0: features c3cbf9ff<FXSR,SSE,3DNOW2,3DNOW>

While I'm here, amd_cpuid_cpu_cacheinfo() is an info function rather
than a probe function.

Revision 1.500: download - view: text, markup, annotated - select for diffs
Thu Dec 5 16:19:08 2002 UTC (21 years, 11 months ago) by junyoung
Branches: MAIN
Diff to: previous 1.499: preferred, colored
Changes since revision 1.499: +12 -8 lines
- Identify VIA C3 processors. Fix PR#19163.
- While here, make use of CPUID2STEPPING() macro.

Revision 1.499: download - view: text, markup, annotated - select for diffs
Thu Dec 5 10:01:56 2002 UTC (21 years, 11 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.498: preferred, colored
Changes since revision 1.498: +6 -4 lines
a bit of KNF - function type on separate line than function name, function
name on start of line

Revision 1.429.2.32: download - view: text, markup, annotated - select for diffs
Mon Nov 25 21:40:02 2002 UTC (21 years, 11 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.429.2.31: preferred, colored
Changes since revision 1.429.2.31: +4 -3 lines
Make ASTs per-proc rather than per-cpu; per-proc makes more sense when
a process that needs a trap can be running on multiple CPUs.

Revision 1.498: download - view: text, markup, annotated - select for diffs
Fri Nov 22 15:23:41 2002 UTC (21 years, 11 months ago) by fvdl
Branches: MAIN
Diff to: previous 1.497: preferred, colored
Changes since revision 1.497: +30 -31 lines
New interrupt code. The basic idea behind it is to hide the differences
in interrupt controllers in struct pic, and try to keep as much
common code as possible. At the lowest (asm) level, this is done
with CPP macros.

The main structure is now struct intrsource, describing an established
interrupt line, of any kind (soft/hard local apic/legacy apic/IO apic).
For quick masking, there may be a maximum of 32 sources per CPU.
Sources can be assigned to any CPU in the MP case, though currently they
all go to the boot CPU.

Revision 1.497: download - view: text, markup, annotated - select for diffs
Thu Nov 14 12:52:28 2002 UTC (21 years, 11 months ago) by minoura
Branches: MAIN
Diff to: previous 1.496: preferred, colored
Changes since revision 1.496: +56 -2 lines
Add support for National Semiconductor Geode(TM) familly of processors.
Thanks to Hiroshi Miura <miura AT da-cha DOT org> for testing.

Revision 1.429.2.31: download - view: text, markup, annotated - select for diffs
Mon Nov 11 21:59:06 2002 UTC (21 years, 11 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.429.2.30: preferred, colored
Changes since revision 1.429.2.30: +56 -51 lines
Catch up to -current

Revision 1.496: download - view: text, markup, annotated - select for diffs
Sat Nov 2 01:58:51 2002 UTC (22 years ago) by perry
Branches: MAIN
Diff to: previous 1.495: preferred, colored
Changes since revision 1.495: +3 -3 lines
asm -> __asm

Revision 1.495: download - view: text, markup, annotated - select for diffs
Fri Oct 25 12:01:56 2002 UTC (22 years ago) by fvdl
Branches: MAIN
Diff to: previous 1.494: preferred, colored
Changes since revision 1.494: +2 -29 lines
Fix MTRR code which had been broken since the MP merge (but silently
failed due to a missing include of opt_mtrr.h in cpu.c)

Revision 1.494: download - view: text, markup, annotated - select for diffs
Thu Oct 24 07:43:21 2002 UTC (22 years ago) by fvdl
Branches: MAIN
Diff to: previous 1.493: preferred, colored
Changes since revision 1.493: +4 -5 lines
Make this actually compile.

Revision 1.493: download - view: text, markup, annotated - select for diffs
Wed Oct 23 21:41:34 2002 UTC (22 years ago) by mycroft
Branches: MAIN
Diff to: previous 1.492: preferred, colored
Changes since revision 1.492: +16 -9 lines
Enable Transmeta CPUs without the LongRun registers to get through
transmeta_cpu_{info,setup}().

Revision 1.471.4.1: download - view: text, markup, annotated - select for diffs
Mon Oct 21 02:17:28 2002 UTC (22 years ago) by lukem
Branches: netbsd-1-6
Diff to: previous 1.471: preferred, colored
Changes since revision 1.471: +41 -16 lines
Pull up revision 1.492 via patch (requested by kanaoka in ticket #934):
Fix bugs in the BIOS memory probe.

- If the BIOS reports the same memory cluster multiple times,
  only allocate the extent once.

- If we fail to allocate an extent,
  don't add it to mem_clusters and don't increment mem_cluster_cnt.

- When loading the physical extents,
  make sure we don't try to add an extent with zero length (seg_start == tmp).

port-i386/13399: from maximum entropy <entropy@tappedin.com>.

Revision 1.492: download - view: text, markup, annotated - select for diffs
Sun Oct 20 10:35:41 2002 UTC (22 years ago) by kanaoka
Branches: MAIN
CVS tags: kqueue-beforemerge, kqueue-aftermerge
Diff to: previous 1.491: preferred, colored
Changes since revision 1.491: +41 -16 lines
Fix bugs in the BIOS memory probe.

- If the BIOS reports the same memory cluster multiple times,
  only allocate the extent once.

- If we fail to allocate an extent,
  don't add it to mem_clusters and don't increment mem_cluster_cnt.

- When loading the physical extents,
  make sure we don't try to add an extent with zero length (seg_start == tmp).

port-i386/13399: from maximum entropy <entropy@tappedin.com>.

Revision 1.429.2.30: download - view: text, markup, annotated - select for diffs
Fri Oct 18 04:11:57 2002 UTC (22 years ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.429.2.29: preferred, colored
Changes since revision 1.429.2.29: +8 -9 lines
npxsave_proc() -> npxsave_lwp().

Adapt cpu_{get,set}mcontext to new i386 FP world order.

Revision 1.429.2.29: download - view: text, markup, annotated - select for diffs
Fri Oct 18 02:37:44 2002 UTC (22 years ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.429.2.28: preferred, colored
Changes since revision 1.429.2.28: +744 -564 lines
Catch up to -current.

Revision 1.491: download - view: text, markup, annotated - select for diffs
Fri Oct 18 00:51:22 2002 UTC (22 years ago) by yamt
Branches: MAIN
Diff to: previous 1.490: preferred, colored
Changes since revision 1.490: +3 -2 lines
add an entry for 0x83 to intel_cpuid_cache_info.

Revision 1.446.2.9: download - view: text, markup, annotated - select for diffs
Thu Oct 10 18:33:21 2002 UTC (22 years ago) by jdolecek
Branches: kqueue
Diff to: previous 1.446.2.8: preferred, colored; next MAIN 1.447: preferred, colored
Changes since revision 1.446.2.8: +699 -558 lines
sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work

Revision 1.490: download - view: text, markup, annotated - select for diffs
Tue Oct 8 20:17:09 2002 UTC (22 years, 1 month ago) by fvdl
Branches: MAIN
Diff to: previous 1.489: preferred, colored
Changes since revision 1.489: +2 -5 lines
Get rid of pcb_flags; nothing was using it except for initialising it
to 0.

Revision 1.489: download - view: text, markup, annotated - select for diffs
Sat Oct 5 21:20:27 2002 UTC (22 years, 1 month ago) by fvdl
Branches: MAIN
Diff to: previous 1.488: preferred, colored
Changes since revision 1.488: +14 -11 lines
To be able to set up TSS gates, setgate needs another argument for the
selector.

Revision 1.488: download - view: text, markup, annotated - select for diffs
Fri Oct 4 19:27:05 2002 UTC (22 years, 1 month ago) by junyoung
Branches: MAIN
Diff to: previous 1.487: preferred, colored
Changes since revision 1.487: +2 -9 lines
Don't init IDT twice.

Revision 1.487: download - view: text, markup, annotated - select for diffs
Fri Oct 4 18:42:34 2002 UTC (22 years, 1 month ago) by junyoung
Branches: MAIN
Diff to: previous 1.486: preferred, colored
Changes since revision 1.486: +56 -5 lines
Correctly identify model 6, 7, and 8 of AMD Athlon and Duron processors.

Before:
cpu0: AMD Athlon Model 6 (Palomino) (686-class), 1532.11 MHz

After:
cpu0: AMD Athlon XP 1800+ (686-class), 1532.11 MHz

Revision 1.486: download - view: text, markup, annotated - select for diffs
Fri Oct 4 08:44:08 2002 UTC (22 years, 1 month ago) by simonb
Branches: MAIN
Diff to: previous 1.485: preferred, colored
Changes since revision 1.485: +7 -4 lines
Only declare and set the "step" variable in identifycpu() ifdef CPUDEBUG.

Revision 1.485: download - view: text, markup, annotated - select for diffs
Thu Oct 3 19:39:51 2002 UTC (22 years, 1 month ago) by fvdl
Branches: MAIN
Diff to: previous 1.484: preferred, colored
Changes since revision 1.484: +3 -3 lines
FIx off by one error for brand id array index.

Revision 1.484: download - view: text, markup, annotated - select for diffs
Tue Oct 1 12:56:55 2002 UTC (22 years, 1 month ago) by fvdl
Branches: MAIN
CVS tags: kqueue-base
Diff to: previous 1.483: preferred, colored
Changes since revision 1.483: +679 -545 lines
Merge Bill Sommerfeld's i386 MP branch. This code has some known
caveats, but works quite well in a lot of MP cases, and all
UP cases that I have tested. Parts of this will hopefully be
reworked in the not-too-distant future.

Revision 1.483: download - view: text, markup, annotated - select for diffs
Fri Sep 27 15:36:09 2002 UTC (22 years, 1 month ago) by provos
Branches: MAIN
Diff to: previous 1.482: preferred, colored
Changes since revision 1.482: +4 -4 lines
remove trailing \n in panic().  approved perry.

Revision 1.482: download - view: text, markup, annotated - select for diffs
Wed Sep 25 22:21:09 2002 UTC (22 years, 1 month ago) by thorpej
Branches: MAIN
Diff to: previous 1.481: preferred, colored
Changes since revision 1.481: +2 -3 lines
Don't include <sys/map.h>.

Revision 1.429.2.28: download - view: text, markup, annotated - select for diffs
Tue Sep 17 21:15:06 2002 UTC (22 years, 1 month ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.429.2.27: preferred, colored
Changes since revision 1.429.2.27: +18 -10 lines
Catch up to -current.

Revision 1.481: download - view: text, markup, annotated - select for diffs
Fri Sep 6 13:18:43 2002 UTC (22 years, 2 months ago) by gehenna
Branches: MAIN
Diff to: previous 1.480: preferred, colored
Changes since revision 1.480: +18 -10 lines
Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.

Revision 1.446.2.8: download - view: text, markup, annotated - select for diffs
Fri Sep 6 08:36:16 2002 UTC (22 years, 2 months ago) by jdolecek
Branches: kqueue
Diff to: previous 1.446.2.7: preferred, colored
Changes since revision 1.446.2.7: +134 -22 lines
sync kqueue branch with HEAD

Revision 1.480: download - view: text, markup, annotated - select for diffs
Thu Sep 5 02:43:00 2002 UTC (22 years, 2 months ago) by erh
Branches: MAIN
Diff to: previous 1.479: preferred, colored
Changes since revision 1.479: +4 -4 lines
Adjust the check for what segments should go on the low priority free list.
If a segment starts exactly at 16M don't try to split it because that causes
the code to try to call uvm_page_physload with a zero length segment.
(kern/17199)

Revision 1.376.2.41: download - view: text, markup, annotated - select for diffs
Sat Aug 31 20:31:34 2002 UTC (22 years, 2 months ago) by sommerfeld
Branches: sommerfeld_i386mp_1
Diff to: previous 1.376.2.40: preferred, colored; branchpoint 1.376: preferred, colored; next MAIN 1.377: preferred, colored
Changes since revision 1.376.2.40: +0 -0 lines
SMP branch resync.  Mostly RAS support.

Revision 1.471.2.5: download - view: text, markup, annotated - select for diffs
Sat Aug 31 13:44:53 2002 UTC (22 years, 2 months ago) by gehenna
Branches: gehenna-devsw
Diff to: previous 1.471.2.4: preferred, colored; branchpoint 1.471: preferred, colored; next MAIN 1.472: preferred, colored
Changes since revision 1.471.2.4: +4 -4 lines
catch up with -current.

Revision 1.429.2.27: download - view: text, markup, annotated - select for diffs
Tue Aug 27 23:44:35 2002 UTC (22 years, 2 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.429.2.26: preferred, colored
Changes since revision 1.429.2.26: +4 -4 lines
Catch up to -current.

Revision 1.479: download - view: text, markup, annotated - select for diffs
Sun Aug 25 20:21:37 2002 UTC (22 years, 2 months ago) by thorpej
Branches: MAIN
CVS tags: sommerfeld_i386mpnext, sommerfeld_i386mpbase_1, gehenna-devsw-base
Diff to: previous 1.478: preferred, colored
Changes since revision 1.478: +4 -4 lines
Make nbuf, nswbuf, and bufpages unsigned.  Make all operations on these
variables unsigned, and update places where their values are printed.

Revision 1.376.2.40: download - view: text, markup, annotated - select for diffs
Mon Aug 19 01:22:29 2002 UTC (22 years, 2 months ago) by sommerfeld
Branches: sommerfeld_i386mp_1
Diff to: previous 1.376.2.39: preferred, colored; branchpoint 1.376: preferred, colored
Changes since revision 1.376.2.39: +27 -11 lines
merged with -current as of today.
rearranged gdt init to deal with KVM86 changes; however, KVM86 has no
chance of working yet; good thing it's not part of GENERIC

Revision 1.429.2.26: download - view: text, markup, annotated - select for diffs
Wed Aug 14 18:29:35 2002 UTC (22 years, 2 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.429.2.25: preferred, colored
Changes since revision 1.429.2.25: +35 -8 lines
Make cpu_getmcontext() get the XMM state when possible, and
make cpu_setmcontext() use it when it is provided, converting to and
from s87 format when necessary.

Revision 1.429.2.25: download - view: text, markup, annotated - select for diffs
Thu Aug 1 03:30:21 2002 UTC (22 years, 3 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.429.2.24: preferred, colored
Changes since revision 1.429.2.24: +3 -3 lines
sigexit(p, SIGILL) -> sigexit(l, SIGILL)

Revision 1.429.2.24: download - view: text, markup, annotated - select for diffs
Thu Aug 1 02:42:04 2002 UTC (22 years, 3 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.429.2.23: preferred, colored
Changes since revision 1.429.2.23: +27 -10 lines
Catch up to -current.

Revision 1.471.2.4: download - view: text, markup, annotated - select for diffs
Sun Jul 21 13:00:40 2002 UTC (22 years, 3 months ago) by gehenna
Branches: gehenna-devsw
Diff to: previous 1.471.2.3: preferred, colored; branchpoint 1.471: preferred, colored
Changes since revision 1.471.2.3: +2 -4 lines
catch up with -current.

Revision 1.429.2.23: download - view: text, markup, annotated - select for diffs
Fri Jul 19 22:18:25 2002 UTC (22 years, 3 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.429.2.22: preferred, colored
Changes since revision 1.429.2.22: +5 -9 lines
Invoke upcalls directly, instead of going through a trampoline.
(Since upcalls shouldn't return at all, even the return part of the
trampoline is unnecessary).

Revision 1.478: download - view: text, markup, annotated - select for diffs
Wed Jul 17 14:55:42 2002 UTC (22 years, 3 months ago) by kanaoka
Branches: MAIN
Diff to: previous 1.477: preferred, colored
Changes since revision 1.477: +2 -4 lines
 - Enable to enter sleep state S5 with ACPI.

Revision 1.471.2.3: download - view: text, markup, annotated - select for diffs
Tue Jul 16 08:29:34 2002 UTC (22 years, 3 months ago) by gehenna
Branches: gehenna-devsw
Diff to: previous 1.471.2.2: preferred, colored; branchpoint 1.471: preferred, colored
Changes since revision 1.471.2.2: +134 -20 lines
catch up with -current.

Revision 1.471.2.2: download - view: text, markup, annotated - select for diffs
Sun Jul 14 17:47:58 2002 UTC (22 years, 3 months ago) by gehenna
Branches: gehenna-devsw
Diff to: previous 1.471.2.1: preferred, colored; branchpoint 1.471: preferred, colored
Changes since revision 1.471.2.1: +5 -4 lines
catch up with -current.

Revision 1.429.2.22: download - view: text, markup, annotated - select for diffs
Fri Jul 12 01:39:30 2002 UTC (22 years, 3 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.429.2.21: preferred, colored
Changes since revision 1.429.2.21: +2 -3 lines
No longer need to pull in lwp.h; proc.h pulls it in for us.

Revision 1.477: download - view: text, markup, annotated - select for diffs
Thu Jul 4 23:32:04 2002 UTC (22 years, 4 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.476: preferred, colored
Changes since revision 1.476: +24 -6 lines
Add kernel support for having userland provide the signal trampoline:

* struct sigacts gets a new sigact_sigdesc structure, which has the
  sigaction and the trampoline/version.  Version 0 means "legacy kernel
  provided trampoline".  Other versions are coordinated with machine-
  dependent code in libc.
* sigaction1() grows two more arguments -- the trampoline pointer and
  the trampoline version.
* A new __sigaction_sigtramp() system call is provided to register a
  trampoline along with a signal handler.
* The handler is no longer passed to sensig() functions.  Instead,
  sendsig() looks up the handler by peeking in the sigacts for the
  process getting the signal (since it has to look in there for the
  trampoline anyway).
* Native sendsig() functions now select the appropriate trampoline and
  its arguments based on the trampoline version in the sigacts.

Changes to libc to use the new facility will be checked in later.  Kernel
version not bumped; we will ride the 1.6C bump made recently.

Revision 1.476: download - view: text, markup, annotated - select for diffs
Thu Jul 4 10:22:20 2002 UTC (22 years, 4 months ago) by fvdl
Branches: MAIN
Diff to: previous 1.475: preferred, colored
Changes since revision 1.475: +3 -3 lines
Match parameter decl of init386 with reality.

Revision 1.429.2.21: download - view: text, markup, annotated - select for diffs
Tue Jul 2 20:42:13 2002 UTC (22 years, 4 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.429.2.20: preferred, colored
Changes since revision 1.429.2.20: +2 -11 lines
Remove whitespace and a function that wasn't supposed to be here.

Revision 1.376.2.39: download - view: text, markup, annotated - select for diffs
Tue Jun 25 15:44:52 2002 UTC (22 years, 4 months ago) by sommerfeld
Branches: sommerfeld_i386mp_1
Diff to: previous 1.376.2.38: preferred, colored; branchpoint 1.376: preferred, colored
Changes since revision 1.376.2.38: +127 -31 lines
Resynch with -current.

Revision 1.429.2.20: download - view: text, markup, annotated - select for diffs
Mon Jun 24 22:04:56 2002 UTC (22 years, 4 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.429.2.19: preferred, colored
Changes since revision 1.429.2.19: +11 -3 lines
Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).

Revision 1.475: download - view: text, markup, annotated - select for diffs
Sun Jun 23 22:18:51 2002 UTC (22 years, 4 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.474: preferred, colored
Changes since revision 1.474: +6 -5 lines
During native signal delivery (and iBCS2, since it uses the native
sigcode), arrange to have the signal handler invoked directly, using
the trampoline only for the return path, saving a call insn.  Play
some other stack trickery in the trampoline to turn 2 pushl's into
one movl.

Revision 1.446.2.7: download - view: text, markup, annotated - select for diffs
Sun Jun 23 17:37:25 2002 UTC (22 years, 4 months ago) by jdolecek
Branches: kqueue
Diff to: previous 1.446.2.6: preferred, colored
Changes since revision 1.446.2.6: +18 -6 lines
catch up with -current on kqueue branch

Revision 1.429.2.19: download - view: text, markup, annotated - select for diffs
Thu Jun 20 03:39:11 2002 UTC (22 years, 4 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.429.2.18: preferred, colored
Changes since revision 1.429.2.18: +119 -17 lines
Catch up to -current.

Revision 1.474: download - view: text, markup, annotated - select for diffs
Tue Jun 18 09:56:33 2002 UTC (22 years, 4 months ago) by tron
Branches: MAIN
Diff to: previous 1.473: preferred, colored
Changes since revision 1.473: +3 -3 lines
Fix typo which caused a build failure for kernels with diagnostic checks.

Revision 1.473: download - view: text, markup, annotated - select for diffs
Tue Jun 18 07:56:13 2002 UTC (22 years, 4 months ago) by tshiozak
Branches: MAIN
Diff to: previous 1.472: preferred, colored
Changes since revision 1.472: +109 -14 lines
add MD support for ACPI sleep/wakeup.

Revision 1.472: download - view: text, markup, annotated - select for diffs
Fri May 31 17:46:51 2002 UTC (22 years, 5 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.471: preferred, colored
Changes since revision 1.471: +5 -4 lines
Add an __unused__ attribute to n_support and n_lower, since they are
unused if a kernel supports all CPU families.

Revision 1.376.2.38: download - view: text, markup, annotated - select for diffs
Sun May 19 02:37:48 2002 UTC (22 years, 5 months ago) by sommerfeld
Branches: sommerfeld_i386mp_1
CVS tags: i386mp_plus16_stable
Diff to: previous 1.376.2.37: preferred, colored; branchpoint 1.376: preferred, colored
Changes since revision 1.376.2.37: +6 -6 lines
Tweak cpu cache description

Revision 1.376.2.37: download - view: text, markup, annotated - select for diffs
Sun May 19 01:15:12 2002 UTC (22 years, 5 months ago) by sommerfeld
Branches: sommerfeld_i386mp_1
Diff to: previous 1.376.2.36: preferred, colored; branchpoint 1.376: preferred, colored
Changes since revision 1.376.2.36: +2 -4 lines
Nuke some no-longer-needed debug printfs

Revision 1.376.2.36: download - view: text, markup, annotated - select for diffs
Sat May 18 17:27:31 2002 UTC (22 years, 5 months ago) by sommerfeld
Branches: sommerfeld_i386mp_1
Diff to: previous 1.376.2.35: preferred, colored; branchpoint 1.376: preferred, colored
Changes since revision 1.376.2.35: +10 -1 lines
Catch up with -current.  (commons elimination, changes to MI pci framework)

Revision 1.471.2.1: download - view: text, markup, annotated - select for diffs
Fri May 17 13:49:54 2002 UTC (22 years, 5 months ago) by gehenna
Branches: gehenna-devsw
Diff to: previous 1.471: preferred, colored
Changes since revision 1.471: +18 -10 lines
Replace the access to devsw table and the hard-coded major with devsw API.

Revision 1.471: download - view: text, markup, annotated - select for diffs
Sun May 12 23:16:53 2002 UTC (22 years, 5 months ago) by matt
Branches: MAIN
CVS tags: netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1
Branch point for: netbsd-1-6, gehenna-devsw
Diff to: previous 1.470: preferred, colored
Changes since revision 1.470: +9 -3 lines
Eliminate commons.

Revision 1.376.2.35: download - view: text, markup, annotated - select for diffs
Sat Apr 27 20:24:46 2002 UTC (22 years, 6 months ago) by sommerfeld
Branches: sommerfeld_i386mp_1
Diff to: previous 1.376.2.34: preferred, colored; branchpoint 1.376: preferred, colored
Changes since revision 1.376.2.34: +17 -12 lines
Merge with current as of today

Revision 1.376.2.34: download - view: text, markup, annotated - select for diffs
Sat Apr 27 14:39:36 2002 UTC (22 years, 6 months ago) by sommerfeld
Branches: sommerfeld_i386mp_1
Diff to: previous 1.376.2.33: preferred, colored; branchpoint 1.376: preferred, colored
Changes since revision 1.376.2.33: +10 -2 lines
Add options TRAPLOG:

When enabled, each cpu gets a ring buffer; on every trap entry, we add
an entry to the trap log using the new locore "TLOG" macro.  Somewhat
like a flight recorder, this may give some post-mortem clues as to
what was going on as we were spiralling in...

XXX currently depends on various intel MSR's to record the low order
32 bits of the cycle counter as well as last-branch from and to
addresses.

Revision 1.429.2.18: download - view: text, markup, annotated - select for diffs
Mon Apr 1 21:53:39 2002 UTC (22 years, 7 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.429.2.17: preferred, colored
Changes since revision 1.429.2.17: +3 -3 lines
p => l->l_proc

Revision 1.429.2.17: download - view: text, markup, annotated - select for diffs
Mon Apr 1 07:40:39 2002 UTC (22 years, 7 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.429.2.16: preferred, colored
Changes since revision 1.429.2.16: +9 -4 lines
Catch up to -current.
(CVS: It's not just a program. It's an adventure!)

Revision 1.470: download - view: text, markup, annotated - select for diffs
Wed Mar 20 15:59:27 2002 UTC (22 years, 7 months ago) by joda
Branches: MAIN
CVS tags: eeh-devprop-base, eeh-devprop
Diff to: previous 1.469: preferred, colored
Changes since revision 1.469: +7 -2 lines
add HTT cpu flag, and further split message

Revision 1.469: download - view: text, markup, annotated - select for diffs
Sun Mar 17 19:16:20 2002 UTC (22 years, 7 months ago) by christos
Branches: MAIN
Diff to: previous 1.468: preferred, colored
Changes since revision 1.468: +3 -3 lines
goodbye PS_STRINGS.

Revision 1.446.2.6: download - view: text, markup, annotated - select for diffs
Sat Mar 16 15:58:14 2002 UTC (22 years, 7 months ago) by jdolecek
Branches: kqueue
Diff to: previous 1.446.2.5: preferred, colored
Changes since revision 1.446.2.5: +3 -3 lines
Catch up with -current.

Revision 1.468: download - view: text, markup, annotated - select for diffs
Wed Mar 6 13:10:20 2002 UTC (22 years, 8 months ago) by tsutsui
Branches: MAIN
CVS tags: newlock-base, newlock
Diff to: previous 1.467: preferred, colored
Changes since revision 1.467: +3 -3 lines
Change type of dumpmag to u_int32_t since it is actually
a 32bit unsigned magic number.
As per discussion on tech-kern, and fixes port-sparc64/11949.

Revision 1.429.2.16: download - view: text, markup, annotated - select for diffs
Thu Feb 28 04:10:17 2002 UTC (22 years, 8 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.429.2.15: preferred, colored
Changes since revision 1.429.2.15: +22 -16 lines
Catch up to -current.

Revision 1.376.2.33: download - view: text, markup, annotated - select for diffs
Sun Feb 24 00:17:44 2002 UTC (22 years, 8 months ago) by sommerfeld
Branches: sommerfeld_i386mp_1
Diff to: previous 1.376.2.32: preferred, colored; branchpoint 1.376: preferred, colored
Changes since revision 1.376.2.32: +13 -8 lines
Resynch with mainline.

Revision 1.446.2.5: download - view: text, markup, annotated - select for diffs
Mon Feb 11 20:08:24 2002 UTC (22 years, 8 months ago) by jdolecek
Branches: kqueue
Diff to: previous 1.446.2.4: preferred, colored
Changes since revision 1.446.2.4: +22 -16 lines
Sync w/ -current.

Revision 1.467: download - view: text, markup, annotated - select for diffs
Thu Jan 31 17:40:51 2002 UTC (22 years, 9 months ago) by christos
Branches: MAIN
CVS tags: ifpoll-base
Diff to: previous 1.466: preferred, colored
Changes since revision 1.466: +15 -11 lines
- fix hex constant in transmeta code to fit 32 bits.
- char assignment should be '\0'
- factor out some common strings

Revision 1.376.2.32: download - view: text, markup, annotated - select for diffs
Mon Jan 28 04:21:38 2002 UTC (22 years, 9 months ago) by sommerfeld
Branches: sommerfeld_i386mp_1
Diff to: previous 1.376.2.31: preferred, colored; branchpoint 1.376: preferred, colored
Changes since revision 1.376.2.31: +10 -3 lines
Yet Another mergeup with -current.

Revision 1.466: download - view: text, markup, annotated - select for diffs
Thu Jan 24 03:20:28 2002 UTC (22 years, 9 months ago) by rafal
Branches: MAIN
Diff to: previous 1.465: preferred, colored
Changes since revision 1.465: +6 -6 lines
One more change resulting from my GDT rearrangement... Since GMACHCALLS_SEL
is always defined now, don't use that to test if we should install the MACH
compat gate; test COMPAT_MACH instead.

Revision 1.465: download - view: text, markup, annotated - select for diffs
Tue Jan 15 13:34:52 2002 UTC (22 years, 9 months ago) by drochner
Branches: MAIN
Diff to: previous 1.464: preferred, colored
Changes since revision 1.464: +5 -3 lines
recognize Athlon model 6 (Palomino) and 7 (Morgan)

Revision 1.446.2.4: download - view: text, markup, annotated - select for diffs
Thu Jan 10 19:44:41 2002 UTC (22 years, 9 months ago) by thorpej
Branches: kqueue
Diff to: previous 1.446.2.3: preferred, colored
Changes since revision 1.446.2.3: +325 -24 lines
Sync kqueue branch with -current.

Revision 1.429.2.15: download - view: text, markup, annotated - select for diffs
Tue Jan 8 00:25:23 2002 UTC (22 years, 10 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.429.2.14: preferred, colored
Changes since revision 1.429.2.14: +293 -9 lines
Catch up to -current.

Revision 1.376.2.31: download - view: text, markup, annotated - select for diffs
Sat Dec 29 23:31:02 2001 UTC (22 years, 10 months ago) by sommerfeld
Branches: sommerfeld_i386mp_1
Diff to: previous 1.376.2.30: preferred, colored; branchpoint 1.376: preferred, colored
Changes since revision 1.376.2.30: +42 -33 lines
Set up per-cpu GDT.
Use %fs for per-cpu data access.

Revision 1.376.2.30: download - view: text, markup, annotated - select for diffs
Sat Dec 29 21:09:06 2001 UTC (22 years, 10 months ago) by sommerfeld
Branches: sommerfeld_i386mp_1
Diff to: previous 1.376.2.29: preferred, colored; branchpoint 1.376: preferred, colored
Changes since revision 1.376.2.29: +316 -17 lines
Yet another mergeup.

New work:
 - Frank van der Linden's tlb shootdown fix.
Mainline functionality merged:
 - IrDA
 - Kernel RCSID's
 - Transmeta CPU support
 - ACPI
 - XMM register access through procfs

Revision 1.429.2.14: download - view: text, markup, annotated - select for diffs
Fri Dec 28 06:12:18 2001 UTC (22 years, 10 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.429.2.13: preferred, colored
Changes since revision 1.429.2.13: +1 -26 lines
Garbage collect cpu_stashcontext().

Revision 1.464: download - view: text, markup, annotated - select for diffs
Thu Dec 27 15:28:34 2001 UTC (22 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.463: preferred, colored
Changes since revision 1.463: +37 -11 lines
use the new ci_info hook to print extra cpu information during probe.

Revision 1.429.2.13: download - view: text, markup, annotated - select for diffs
Mon Dec 17 20:49:14 2001 UTC (22 years, 10 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.429.2.12: preferred, colored
Changes since revision 1.429.2.12: +7 -106 lines
Adapt to new, much smaller, cpu_upcall() workload.

Revision 1.463: download - view: text, markup, annotated - select for diffs
Tue Nov 20 07:44:17 2001 UTC (22 years, 11 months ago) by enami
Branches: MAIN
Diff to: previous 1.462: preferred, colored
Changes since revision 1.462: +8 -8 lines
Just test if DEBUG_MEMLOAD is defined or not instead of testing its value.

Revision 1.462: download - view: text, markup, annotated - select for diffs
Tue Nov 20 07:42:33 2001 UTC (22 years, 11 months ago) by enami
Branches: MAIN
Diff to: previous 1.461: preferred, colored
Changes since revision 1.461: +41 -38 lines
Cosmetic changes to previous commit.

Revision 1.429.2.12: download - view: text, markup, annotated - select for diffs
Sat Nov 17 21:38:24 2001 UTC (22 years, 11 months ago) by thorpej
Branches: nathanw_sa
Diff to: previous 1.429.2.11: preferred, colored
Changes since revision 1.429.2.11: +5 -15 lines
Use sadata_upcall_free(), and use it to plug a memory leak in an
error path (copying out arg onto user stack fails).

Revision 1.461: download - view: text, markup, annotated - select for diffs
Sat Nov 17 08:20:58 2001 UTC (22 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.460: preferred, colored
Changes since revision 1.460: +255 -3 lines
Add transmeta crusoe cpu support from toshi's fiva patches.

Revision 1.429.2.11: download - view: text, markup, annotated - select for diffs
Sat Nov 17 00:52:02 2001 UTC (22 years, 11 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.429.2.10: preferred, colored
Changes since revision 1.429.2.10: +36 -20 lines
Adapt to new upcall signature and possible argument copying.

Revision 1.460: download - view: text, markup, annotated - select for diffs
Thu Nov 15 07:03:30 2001 UTC (22 years, 11 months ago) by lukem
Branches: MAIN
Diff to: previous 1.459: preferred, colored
Changes since revision 1.459: +4 -1 lines
add RCSID

Revision 1.429.2.10: download - view: text, markup, annotated - select for diffs
Wed Nov 14 19:12:45 2001 UTC (22 years, 11 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.429.2.9: preferred, colored
Changes since revision 1.429.2.9: +18 -16 lines
Catch up to -current.

Revision 1.457.2.1: download - view: text, markup, annotated - select for diffs
Mon Nov 12 21:17:04 2001 UTC (22 years, 11 months ago) by thorpej
Branches: thorpej-mips-cache
Diff to: previous 1.457: preferred, colored; next MAIN 1.458: preferred, colored
Changes since revision 1.457: +18 -16 lines
Sync the thorpej-mips-cache branch with -current.

Revision 1.459: download - view: text, markup, annotated - select for diffs
Wed Oct 31 20:35:21 2001 UTC (23 years ago) by jdolecek
Branches: MAIN
CVS tags: thorpej-mips-cache-base
Diff to: previous 1.458: preferred, colored
Changes since revision 1.458: +16 -14 lines
use right number of zeroes for Cyrix i386_cpuid_cpus[] entries
reformat the entries with all zeroes to be more easier to verify

Revision 1.458: download - view: text, markup, annotated - select for diffs
Sun Oct 28 16:17:05 2001 UTC (23 years ago) by jdolecek
Branches: MAIN
Diff to: previous 1.457: preferred, colored
Changes since revision 1.457: +3 -3 lines
Add "Pentium III (Tualatin)" entry to CPUVENDOR_INTEL/CPUCLASS_686.
Make sure the CPUCLASS_686 entry has really 17 (i.e. 16 + default)
name entries as it's supposed to, so that code won't crash when
run on Intel CPUCLASS_686 processor which doesn't have name entry
in the table.

Reported and fix provided by Naoto Morishima in kern/14380.

Revision 1.453.2.2: download - view: text, markup, annotated - select for diffs
Mon Oct 1 12:39:48 2001 UTC (23 years, 1 month ago) by fvdl
Branches: thorpej-devvp
Diff to: previous 1.453.2.1: preferred, colored; branchpoint 1.453: preferred, colored; next MAIN 1.454: preferred, colored
Changes since revision 1.453.2.1: +54 -21 lines
Catch up with -current.

Revision 1.376.2.29: download - view: text, markup, annotated - select for diffs
Sat Sep 22 23:01:08 2001 UTC (23 years, 1 month ago) by sommerfeld
Branches: sommerfeld_i386mp_1
Diff to: previous 1.376.2.28: preferred, colored; branchpoint 1.376: preferred, colored
Changes since revision 1.376.2.28: +54 -19 lines
Merge branch with current, post ubcperf, MTRR, etc., etc.,
with the recent fifo_putpages fix to the trunk, GENERIC.MPDEBUG config
boots multiuser on my BP6.

Revision 1.429.2.9: download - view: text, markup, annotated - select for diffs
Fri Sep 21 22:35:05 2001 UTC (23 years, 1 month ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.429.2.8: preferred, colored
Changes since revision 1.429.2.8: +54 -21 lines
Catch up to -current.

Revision 1.457: download - view: text, markup, annotated - select for diffs
Wed Sep 19 01:26:19 2001 UTC (23 years, 1 month ago) by thorpej
Branches: MAIN
CVS tags: thorpej-devvp-base3, thorpej-devvp-base2
Branch point for: thorpej-mips-cache
Diff to: previous 1.456: preferred, colored
Changes since revision 1.456: +16 -1 lines
Add code to frob the MTRR-like registers on the AMD K6-2
and AMD K6-III.

Revision 1.453.2.1: download - view: text, markup, annotated - select for diffs
Tue Sep 18 19:13:47 2001 UTC (23 years, 1 month ago) by fvdl
Branches: thorpej-devvp
Diff to: previous 1.453: preferred, colored
Changes since revision 1.453: +2 -1 lines
Various changes to make cloning devices possible:

	* Add an extra argument (struct vnode **) to VOP_OPEN. If it is
	  not NULL, specfs will create a cloned (aliased) vnode during
	  the call, and return it there. The caller should release and
	  unlock the original vnode if a new vnode was returned. The
	  new vnode is returned locked.

	* Add a flag field to the cdevsw and bdevsw structures.
	  DF_CLONING indicates that it wants a new vnode for each
	  open (XXX is there a better way? devprop?)

	* If a device is cloning, always call the close entry
	  point for a VOP_CLOSE.


Also, rewrite cons.c to do the right thing with vnodes. Use VOPs
rather then direct device entry calls. Suggested by mycroft@

Light to moderate testing done an i386 system (arch doesn't matter
though, these are MI changes).

Revision 1.446.2.3: download - view: text, markup, annotated - select for diffs
Thu Sep 13 01:13:46 2001 UTC (23 years, 1 month ago) by thorpej
Branches: kqueue
Diff to: previous 1.446.2.2: preferred, colored
Changes since revision 1.446.2.2: +39 -21 lines
Update the kqueue branch to HEAD.

Revision 1.456: download - view: text, markup, annotated - select for diffs
Mon Sep 10 21:19:14 2001 UTC (23 years, 1 month ago) by chris
Branches: MAIN
CVS tags: pre-chs-ubcperf, post-chs-ubcperf
Diff to: previous 1.455: preferred, colored
Changes since revision 1.455: +7 -7 lines
Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

Currently this is a no-op on most platforms, so they should see no difference.

Reviewed by Jason.

Revision 1.455: download - view: text, markup, annotated - select for diffs
Mon Sep 10 10:12:16 2001 UTC (23 years, 1 month ago) by fvdl
Branches: MAIN
Diff to: previous 1.454: preferred, colored
Changes since revision 1.454: +15 -1 lines
Initialize MTRRs on startup if they're enabled.

Revision 1.454: download - view: text, markup, annotated - select for diffs
Sun Sep 9 02:10:44 2001 UTC (23 years, 2 months ago) by enami
Branches: MAIN
Diff to: previous 1.453: preferred, colored
Changes since revision 1.453: +19 -15 lines
Don't print extra space when printing information about cpu of unknown vendor.
# and minor stylistic change while i'm here.

Revision 1.376.2.28: download - view: text, markup, annotated - select for diffs
Mon Sep 3 19:48:10 2001 UTC (23 years, 2 months ago) by sommerfeld
Branches: sommerfeld_i386mp_1
Diff to: previous 1.376.2.27: preferred, colored; branchpoint 1.376: preferred, colored
Changes since revision 1.376.2.27: +124 -93 lines
Merge with -current once more.

Revision 1.446.2.2: download - view: text, markup, annotated - select for diffs
Sat Aug 25 06:15:26 2001 UTC (23 years, 2 months ago) by thorpej
Branches: kqueue
Diff to: previous 1.446.2.1: preferred, colored
Changes since revision 1.446.2.1: +1 -40 lines
Merge Aug 24 -current into the kqueue branch.

Revision 1.429.2.8: download - view: text, markup, annotated - select for diffs
Fri Aug 24 04:19:58 2001 UTC (23 years, 2 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.429.2.7: preferred, colored
Changes since revision 1.429.2.7: +6 -13 lines
A few files and lwp/proc conversions I missed in the last big update.
GENERIC runs again.

Revision 1.429.2.7: download - view: text, markup, annotated - select for diffs
Fri Aug 24 00:08:31 2001 UTC (23 years, 2 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.429.2.6: preferred, colored
Changes since revision 1.429.2.6: +140 -41 lines
Catch up with -current.

Revision 1.453: download - view: text, markup, annotated - select for diffs
Sun Aug 12 08:35:31 2001 UTC (23 years, 2 months ago) by jdolecek
Branches: MAIN
CVS tags: thorpej-devvp-base
Branch point for: thorpej-devvp
Diff to: previous 1.452: preferred, colored
Changes since revision 1.452: +1 -40 lines
Move _insque()/_remque() to libkern. Once remaining uses would
be converted to <sys/queue.h> macros, _insque()/_remque() would be eliminated
altogether.

Revision 1.446.2.1: download - view: text, markup, annotated - select for diffs
Fri Aug 3 04:11:43 2001 UTC (23 years, 3 months ago) by lukem
Branches: kqueue
Diff to: previous 1.446: preferred, colored
Changes since revision 1.446: +140 -2 lines
update to -current

Revision 1.452: download - view: text, markup, annotated - select for diffs
Fri Aug 3 01:24:40 2001 UTC (23 years, 3 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.451: preferred, colored
Changes since revision 1.451: +4 -3 lines
In setregs(), initialize the process's MXCSR to the reset-default
value as documented in the IA-32 Instruction Set Reference (in the
description of the LDMXCSR insn).

Revision 1.451: download - view: text, markup, annotated - select for diffs
Thu Aug 2 22:04:28 2001 UTC (23 years, 3 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.450: preferred, colored
Changes since revision 1.450: +26 -5 lines
- Rename cpu_use_fxsave to i386_use_fxsave.
- If we detect SSE/SSE2 support in the CPU, enable SSE exceptions
  and set i386_has_{sse,sse2} as appropriate.
- Expose i386_use_fxsave and i386_has_{sse,sse2} through sysctl
  as machdep.{osfsxr,sse,sse2}.

Revision 1.450: download - view: text, markup, annotated - select for diffs
Thu Aug 2 21:04:43 2001 UTC (23 years, 3 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.449: preferred, colored
Changes since revision 1.449: +25 -2 lines
Add support for saving/restoring SSE/SSE2 state using FXSAVE/FXRSTOR.

Reviewed by Frank.

Revision 1.449: download - view: text, markup, annotated - select for diffs
Wed Aug 1 19:50:48 2001 UTC (23 years, 3 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.448: preferred, colored
Changes since revision 1.448: +60 -1 lines
Add several more Intel cache info entries, and fetch the CFLUSH
line size if we have the CFLUSH insn.

Revision 1.448: download - view: text, markup, annotated - select for diffs
Tue Jul 31 18:28:59 2001 UTC (23 years, 3 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.447: preferred, colored
Changes since revision 1.447: +26 -1 lines
Set up function pointers for copyin/copyout in preparation for
adding optimized versions for various CPU classes/models.

Split the 386 version of copyout into a separate routine, and
add a 486 version that doesn't have the class/page-writeability
check.

Revision 1.429.2.6: download - view: text, markup, annotated - select for diffs
Mon Jul 23 21:21:02 2001 UTC (23 years, 3 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.429.2.5: preferred, colored
Changes since revision 1.429.2.5: +2 -1 lines
For the benefit of debugger call-frame heuristics, clear %ebp when
making an upcall.

Revision 1.376.2.27: download - view: text, markup, annotated - select for diffs
Thu Jul 19 08:57:28 2001 UTC (23 years, 3 months ago) by sommerfeld
Branches: sommerfeld_i386mp_1
Diff to: previous 1.376.2.26: preferred, colored; branchpoint 1.376: preferred, colored
Changes since revision 1.376.2.26: +10 -1 lines
catch up with -current

Revision 1.447: download - view: text, markup, annotated - select for diffs
Sat Jul 14 02:02:46 2001 UTC (23 years, 3 months ago) by christos
Branches: MAIN
Diff to: previous 1.446: preferred, colored
Changes since revision 1.446: +10 -1 lines
Use global descriptor 7 for mach traps. Unfortunately this is already
used by apm 16 bit code segments so we cannot have both at the same time.

Revision 1.429.2.5: download - view: text, markup, annotated - select for diffs
Wed Jul 11 05:02:39 2001 UTC (23 years, 3 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.429.2.4: preferred, colored
Changes since revision 1.429.2.4: +7 -5 lines
Handle FS and GS in the proper new-world-order way.

Revision 1.429.2.4: download - view: text, markup, annotated - select for diffs
Mon Jul 9 22:37:27 2001 UTC (23 years, 4 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.429.2.3: preferred, colored
Changes since revision 1.429.2.3: +76 -20 lines
Move upcall processing to the point of userret() rather than invocation time.

Revision 1.389.2.6: download - view: text, markup, annotated - select for diffs
Mon Jun 25 16:11:34 2001 UTC (23 years, 4 months ago) by he
Branches: netbsd-1-5
CVS tags: netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001
Diff to: previous 1.389.2.5: preferred, colored; branchpoint 1.389: preferred, colored
Changes since revision 1.389.2.5: +3 -2 lines
Pull up revision 1.446 (requested by sommerfeld):
  Restore fs and gs from sigcontext in sigreturn; fixes oversight
  in previous pull-up.

Revision 1.376.2.26: download - view: text, markup, annotated - select for diffs
Sun Jun 24 19:29:52 2001 UTC (23 years, 4 months ago) by sommerfeld
Branches: sommerfeld_i386mp_1
Diff to: previous 1.376.2.25: preferred, colored; branchpoint 1.376: preferred, colored
Changes since revision 1.376.2.25: +3 -2 lines
Merge up with -current.

Revision 1.429.2.3: download - view: text, markup, annotated - select for diffs
Thu Jun 21 19:25:33 2001 UTC (23 years, 4 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.429.2.2: preferred, colored
Changes since revision 1.429.2.2: +659 -243 lines
Catch up to -current.

Revision 1.446: download - view: text, markup, annotated - select for diffs
Tue Jun 19 15:54:48 2001 UTC (23 years, 4 months ago) by sommerfeld
Branches: MAIN
Branch point for: kqueue
Diff to: previous 1.445: preferred, colored
Changes since revision 1.445: +3 -2 lines
restore fs and gs from sigcontext in sigreturn (correct oversight in
previous commit).

Revision 1.376.2.25: download - view: text, markup, annotated - select for diffs
Mon Jun 18 03:33:29 2001 UTC (23 years, 4 months ago) by sommerfeld
Branches: sommerfeld_i386mp_1
Diff to: previous 1.376.2.24: preferred, colored; branchpoint 1.376: preferred, colored
Changes since revision 1.376.2.24: +10 -9 lines
checkpoint merge-in-progress from mainline.

Revision 1.389.2.5: download - view: text, markup, annotated - select for diffs
Sun Jun 17 22:27:03 2001 UTC (23 years, 4 months ago) by he
Branches: netbsd-1-5
Diff to: previous 1.389.2.4: preferred, colored; branchpoint 1.389: preferred, colored
Changes since revision 1.389.2.4: +7 -7 lines
Pull up revision 1.445 (requested by sommerfeld):
  Add %fs/%gs to trap frame and save/restore them on trap/interupt/
  syscall entry from userspace.

  Remove special-case ``by hand'' validation of %fs/%gs register
  values s well as special handling of them in various signal
  handling paths.  Now, like %ds and %es, they are validated by
  the hardware on return to userland.

  This paves the way for the use of %fs for per-cpu data on multi-
  processor systems, and fixes an otherwise difficult-to-fix
  interaction between threads/clone(2) and USER_LDT.

Revision 1.445: download - view: text, markup, annotated - select for diffs
Sun Jun 17 21:01:34 2001 UTC (23 years, 4 months ago) by sommerfeld
Branches: MAIN
Diff to: previous 1.444: preferred, colored
Changes since revision 1.444: +7 -7 lines
Add %fs/%gs to trap frame and save/restore them on
trap/interrupt/syscall entry from userspace.

Remove special-case "by hand" validation of fs/gs register values as
well as special handling of them in various signal handling paths.

Now, like %ds and %es, they are validated by the hardware on return to
userland.

This paves the way for the use of %fs for per-cpu data on
multiprocessor systems, and fixes an otherwise difficult-to-fix
interaction between threads/clone(2) and USER_LDT.

Discussed in advance with Frank van der Linden.

Revision 1.444: download - view: text, markup, annotated - select for diffs
Sat Jun 2 18:09:13 2001 UTC (23 years, 5 months ago) by chs
Branches: MAIN
Diff to: previous 1.443: preferred, colored
Changes since revision 1.443: +4 -4 lines
replace vm_map{,_entry}_t with struct vm_map{,_entry} *.

Revision 1.443: download - view: text, markup, annotated - select for diffs
Wed May 30 15:24:31 2001 UTC (23 years, 5 months ago) by lukem
Branches: MAIN
Diff to: previous 1.442: preferred, colored
Changes since revision 1.442: +2 -1 lines
add missing   #include "opt_kgdb.h"

Revision 1.376.2.24: download - view: text, markup, annotated - select for diffs
Sat May 26 22:13:09 2001 UTC (23 years, 5 months ago) by sommerfeld
Branches: sommerfeld_i386mp_1
Diff to: previous 1.376.2.23: preferred, colored; branchpoint 1.376: preferred, colored
Changes since revision 1.376.2.23: +5 -3 lines
Implement MP-synchronzed microtime(), based on Jason Thorpe's port of
Dave Mills's cycle-counter-based microtime.

XXX We need to figure out how to deal with processors where the cycle
counter speed varies.  We don't have a whole lot of alternatives; we
could only use this on multiprocessors, which are less likely to
throttle the clock to save power.

The local apic timer runs at a fixed frequency, but it's
count-down-to-zero, not the count-up-forever type of timer which the
Mills code expects.

This also does not solve the problem of microtime on 486-based
multiprocessors..

Revision 1.442: download - view: text, markup, annotated - select for diffs
Fri May 25 04:39:33 2001 UTC (23 years, 5 months ago) by oki
Branches: MAIN
Diff to: previous 1.441: preferred, colored
Changes since revision 1.441: +2 -1 lines
Fixed panic on the cpu made by unknown vendor,
such as Transmeta Crusoe.

Revision 1.376.2.23: download - view: text, markup, annotated - select for diffs
Wed May 23 03:13:37 2001 UTC (23 years, 5 months ago) by sommerfeld
Branches: sommerfeld_i386mp_1
Diff to: previous 1.376.2.22: preferred, colored; branchpoint 1.376: preferred, colored
Changes since revision 1.376.2.22: +17 -0 lines
Merge branch with tonight's current.
boots multiuser.

Revision 1.376.2.22: download - view: text, markup, annotated - select for diffs
Mon May 7 21:15:04 2001 UTC (23 years, 6 months ago) by sommerfeld
Branches: sommerfeld_i386mp_1
Diff to: previous 1.376.2.21: preferred, colored; branchpoint 1.376: preferred, colored
Changes since revision 1.376.2.21: +48 -49 lines
Rework cache/tlb parsing, etc., One More Time.
Compact tables, rework associativity.

Revision 1.376.2.21: download - view: text, markup, annotated - select for diffs
Mon May 7 16:51:46 2001 UTC (23 years, 6 months ago) by sommerfeld
Branches: sommerfeld_i386mp_1
Diff to: previous 1.376.2.20: preferred, colored; branchpoint 1.376: preferred, colored
Changes since revision 1.376.2.20: +484 -163 lines
"Merge" in revised cache probing code (including amd cache size
probing).  Separate feature probing from output formatting, and call
uvm_recolor() at an appropriate moment.

Revision 1.441: download - view: text, markup, annotated - select for diffs
Fri May 4 03:19:33 2001 UTC (23 years, 6 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.440: preferred, colored
Changes since revision 1.440: +26 -2 lines
The AMD-K5 Model 0 gets the PGE bit in the CPU features word wrong
using the APIC bit instead, according to the AMD Processor Recognition
App. Note.  Add a fixup routine to patch up cpu_feature in this case.

XXX Need a way to kick the pmap to enable pmap_pg_g -- look at how the
MP branch deals with this.

Revision 1.440: download - view: text, markup, annotated - select for diffs
Thu May 3 16:55:32 2001 UTC (23 years, 6 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.439: preferred, colored
Changes since revision 1.439: +51 -8 lines
- Fix a couple of botches in the AMD L2 cache info fetching.
- Start with 2 initial color bins, and recolor once we've determined
  the number of color bins based on the formula:
	(largest_cache_size / associativity) / PAGE_SIZE

Revision 1.439: download - view: text, markup, annotated - select for diffs
Thu May 3 16:04:26 2001 UTC (23 years, 6 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.438: preferred, colored
Changes since revision 1.438: +4 -4 lines
Oops, forgot to fill in function pointer in previous.

Revision 1.438: download - view: text, markup, annotated - select for diffs
Thu May 3 00:35:37 2001 UTC (23 years, 6 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.437: preferred, colored
Changes since revision 1.437: +336 -86 lines
Rearrange the cache info fetching code some more, and add support
for fetching cache info for AMD processors.

Revision 1.437: download - view: text, markup, annotated - select for diffs
Wed May 2 21:07:01 2001 UTC (23 years, 6 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.436: preferred, colored
Changes since revision 1.436: +196 -145 lines
- Keep cache/tlb info in the cpu_info structure.
- Add "associativity" to the cache_info structure.
- Add a (*cpu_cacheinfo)() function pointer, like we have a
  (*cpu_setup)() function pointer.  Cache info in the `cpuid'
  is vendor-specific.

Revision 1.436: download - view: text, markup, annotated - select for diffs
Wed May 2 13:08:06 2001 UTC (23 years, 6 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.435: preferred, colored
Changes since revision 1.435: +23 -25 lines
Move the initialization of bioscall stuff from cpu_startup() to init386(),
so that bioscall(9) is callable from mca_busprobe().
Only print the "biostramp installed @ ..." message #ifdef DEBUG_BIOSCALL.

Revision 1.376.2.20: download - view: text, markup, annotated - select for diffs
Mon Apr 30 16:23:11 2001 UTC (23 years, 6 months ago) by sommerfeld
Branches: sommerfeld_i386mp_1
Diff to: previous 1.376.2.19: preferred, colored; branchpoint 1.376: preferred, colored
Changes since revision 1.376.2.19: +110 -60 lines
Merge sommerfeld_i386mp_1 branch with -current as of today.
GENERIC.MP kernel boots and runs multiuser on my ABIT BP6

Revision 1.389.2.4: download - view: text, markup, annotated - select for diffs
Wed Apr 25 09:30:19 2001 UTC (23 years, 6 months ago) by he
Branches: netbsd-1-5
Diff to: previous 1.389.2.3: preferred, colored; branchpoint 1.389: preferred, colored
Changes since revision 1.389.2.3: +38 -13 lines
Pull up revisions 1.416-1.419 (requested by jdolecek):
  Add ``const'' to cpu tables.
  Properly identify and distinguish newer Intel CPUs using Brand
  ID information.

Revision 1.435: download - view: text, markup, annotated - select for diffs
Tue Apr 24 04:30:58 2001 UTC (23 years, 6 months ago) by thorpej
Branches: MAIN
CVS tags: thorpej_scsipi_beforemerge
Diff to: previous 1.434: preferred, colored
Changes since revision 1.434: +7 -1 lines
Sprinkle pmap_update() calls after calls to:
- pmap_enter()
- pmap_remove()
- pmap_protect()
- pmap_kenter_pa()
- pmap_kremove()
as described in pmap(9).

These calls are relatively conservative.  It may be possible to
optimize these a little more.

Revision 1.366.2.10: download - view: text, markup, annotated - select for diffs
Mon Apr 23 09:41:48 2001 UTC (23 years, 6 months ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.366.2.9: preferred, colored; branchpoint 1.366: preferred, colored; next MAIN 1.367: preferred, colored
Changes since revision 1.366.2.9: +3 -2 lines
Sync with HEAD.

Revision 1.434: download - view: text, markup, annotated - select for diffs
Sun Apr 22 23:29:56 2001 UTC (23 years, 6 months ago) by thorpej
Branches: MAIN
CVS tags: thorpej_scsipi_nbase, thorpej_scsipi_base
Diff to: previous 1.433: preferred, colored
Changes since revision 1.433: +3 -2 lines
Use pmap_kenter_pa() rather than pmap_kenter_pgs().

Revision 1.366.2.9: download - view: text, markup, annotated - select for diffs
Sat Apr 21 17:53:50 2001 UTC (23 years, 6 months ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.366.2.8: preferred, colored; branchpoint 1.366: preferred, colored
Changes since revision 1.366.2.8: +99 -59 lines
Sync with HEAD

Revision 1.433: download - view: text, markup, annotated - select for diffs
Fri Apr 20 09:10:45 2001 UTC (23 years, 6 months ago) by kanaoka
Branches: MAIN
Diff to: previous 1.432: preferred, colored
Changes since revision 1.432: +94 -86 lines
 - Allocate memory map entry correctly to avoid Compatibilty Holes.
 - Update some comments.

 patch provided by: enami tsugutomo <enami@sm.sony.co.jp>
      suggested by: John Hawkinson <jhawk@MIT.EDU>

Revision 1.432: download - view: text, markup, annotated - select for diffs
Wed Apr 18 05:44:10 2001 UTC (23 years, 6 months ago) by kanaoka
Branches: MAIN
Diff to: previous 1.431: preferred, colored
Changes since revision 1.431: +29 -0 lines
Add "Sanity check the entry" code to avoid Compatibilty Holes
(0xa0000 -- 0xfffff).

Revision 1.431: download - view: text, markup, annotated - select for diffs
Sat Apr 14 06:49:31 2001 UTC (23 years, 6 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.430: preferred, colored
Changes since revision 1.430: +4 -1 lines
Generic soft interrupt implementation for NetBSD/i386.  This could
probably be tuned somewhat, but this is a stop-gap measure to hold
us until Bill Sommerfeld's new interrupt code comes in from the
MP branch.

Revision 1.429.2.2: download - view: text, markup, annotated - select for diffs
Mon Apr 9 01:53:31 2001 UTC (23 years, 7 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.429.2.1: preferred, colored
Changes since revision 1.429.2.1: +2 -2 lines
Catch up with -current.

Revision 1.389.2.3: download - view: text, markup, annotated - select for diffs
Fri Mar 30 21:30:17 2001 UTC (23 years, 7 months ago) by he
Branches: netbsd-1-5
Diff to: previous 1.389.2.2: preferred, colored; branchpoint 1.389: preferred, colored
Changes since revision 1.389.2.2: +28 -3 lines
Pull up revisions 1.408,1.413,1.428 (via patch, requested by fvdl):
  Add some required Linux emulation bits to support the Linux
  version of VMware.

Revision 1.366.2.8: download - view: text, markup, annotated - select for diffs
Tue Mar 27 15:31:02 2001 UTC (23 years, 7 months ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.366.2.7: preferred, colored; branchpoint 1.366: preferred, colored
Changes since revision 1.366.2.7: +2 -2 lines
Sync with HEAD.

Revision 1.376.2.19: download - view: text, markup, annotated - select for diffs
Fri Mar 16 05:00:47 2001 UTC (23 years, 7 months ago) by sommerfeld
Branches: sommerfeld_i386mp_1
Diff to: previous 1.376.2.18: preferred, colored; branchpoint 1.376: preferred, colored
Changes since revision 1.376.2.18: +7 -2 lines
Merge branch with -current; top of branch + current builds a working
GENERIC.MP again.

Revision 1.430: download - view: text, markup, annotated - select for diffs
Thu Mar 15 06:10:40 2001 UTC (23 years, 7 months ago) by chs
Branches: MAIN
Diff to: previous 1.429: preferred, colored
Changes since revision 1.429: +2 -2 lines
eliminate the KERN_* error codes in favor of the traditional E* codes.
the mapping is:

KERN_SUCCESS			0
KERN_INVALID_ADDRESS		EFAULT
KERN_PROTECTION_FAILURE		EACCES
KERN_NO_SPACE			ENOMEM
KERN_INVALID_ARGUMENT		EINVAL
KERN_FAILURE			various, mostly turn into KASSERTs
KERN_RESOURCE_SHORTAGE		ENOMEM
KERN_NOT_RECEIVER		<unused>
KERN_NO_ACCESS			<unused>
KERN_PAGES_LOCKED		<unused>

Revision 1.366.2.7: download - view: text, markup, annotated - select for diffs
Mon Mar 12 13:28:55 2001 UTC (23 years, 7 months ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.366.2.6: preferred, colored; branchpoint 1.366: preferred, colored
Changes since revision 1.366.2.6: +6 -1 lines
Sync with HEAD.

Revision 1.429.2.1: download - view: text, markup, annotated - select for diffs
Mon Mar 5 22:49:12 2001 UTC (23 years, 8 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.429: preferred, colored
Changes since revision 1.429: +282 -24 lines
Initial commit of scheduler activations and lightweight process support.

Revision 1.429: download - view: text, markup, annotated - select for diffs
Sun Feb 11 19:03:50 2001 UTC (23 years, 8 months ago) by chs
Branches: MAIN
Branch point for: nathanw_sa
Diff to: previous 1.428: preferred, colored
Changes since revision 1.428: +6 -1 lines
fix REALBASEMEM/REALEXTMEM and defopt them while we're at it.  from jason.

Revision 1.376.2.18: download - view: text, markup, annotated - select for diffs
Tue Jan 23 06:34:56 2001 UTC (23 years, 9 months ago) by thorpej
Branches: sommerfeld_i386mp_1
Diff to: previous 1.376.2.17: preferred, colored; branchpoint 1.376: preferred, colored
Changes since revision 1.376.2.17: +9 -4 lines
Sync with the trunk.

Revision 1.366.2.6: download - view: text, markup, annotated - select for diffs
Thu Jan 18 09:22:34 2001 UTC (23 years, 9 months ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.366.2.5: preferred, colored; branchpoint 1.366: preferred, colored
Changes since revision 1.366.2.5: +7 -2 lines
Sync with head (for UBC+NFS fixes, mostly).

Revision 1.428: download - view: text, markup, annotated - select for diffs
Wed Jan 17 00:07:26 2001 UTC (23 years, 9 months ago) by fvdl
Branches: MAIN
Diff to: previous 1.427: preferred, colored
Changes since revision 1.427: +4 -2 lines
Add machdep file for procfs. Currently only used for linux-style
/proc/cpuinfo (only active when procfs is mounted with -o linux).
For ports other than the i386 this currently produces an empty
string.

Revision 1.376.2.17: download - view: text, markup, annotated - select for diffs
Wed Jan 10 04:38:32 2001 UTC (23 years, 9 months ago) by sommerfeld
Branches: sommerfeld_i386mp_1
Diff to: previous 1.376.2.16: preferred, colored; branchpoint 1.376: preferred, colored
Changes since revision 1.376.2.16: +135 -111 lines
Significant rewrite of slave CPU attach and initialization, centering
on identifycpu() and spreading outward.

Separate feature probes (cpuid invocation), which runs on the cpu
being attached, from the display of this information, which runs on
the boot cpu; remove some of the probe code from locore as it doesn't
need to run that early.

We now spin up secondary cpu's during cpu_attach, have them do a cpu
feature probe, and then have them spin waiting for a "go" signal.

We no longer pay attention to the cpu signature and cpuid features
reported by the MP BIOS since those are known to be truncated for at
least some bioses.

We now do npx initialization (including FDIV bug detection) on all
cpus.

XXX Change some of the cyrix bug workarounds to fit the new
identifycpu() system; this is untested.

Revision 1.427: download - view: text, markup, annotated - select for diffs
Tue Jan 9 03:45:49 2001 UTC (23 years, 10 months ago) by enami
Branches: MAIN
Diff to: previous 1.426: preferred, colored
Changes since revision 1.426: +5 -2 lines
If there remains no memory in a segment after we chopped off ``the last
page,'' skip the segment.  Fixes boot problem on Compaq ProLiant ML370
reported at current-users by Mark Davies.

Revision 1.376.2.16: download - view: text, markup, annotated - select for diffs
Mon Jan 8 15:30:39 2001 UTC (23 years, 10 months ago) by sommerfeld
Branches: sommerfeld_i386mp_1
Diff to: previous 1.376.2.15: preferred, colored; branchpoint 1.376: preferred, colored
Changes since revision 1.376.2.15: +144 -137 lines
Mostly fix cpu identification:
 - move globals which contain per-cpu state into cpu_info.
 - fix cache size probing to work off of cpu_info rather than globals
 - print out itlb/dtlb sizes
 - add a few more cache identifiers from the latest version of AP-485

cpu timing, cache probing, and processor serial number lookup still
happens only on the main cpu; this needs to be restructured; mark what
code needs to move into per-cpu probe code.

While we're here, eradicate "cpu_info_store" in favor of "cpu_info_primary".

Revision 1.376.2.15: download - view: text, markup, annotated - select for diffs
Mon Jan 8 13:57:23 2001 UTC (23 years, 10 months ago) by sommerfeld
Branches: sommerfeld_i386mp_1
Diff to: previous 1.376.2.14: preferred, colored; branchpoint 1.376: preferred, colored
Changes since revision 1.376.2.14: +8 -8 lines
Fix a merge botch which caused to fail to find the end of memory on
some systems.

Revision 1.376.2.14: download - view: text, markup, annotated - select for diffs
Sun Jan 7 22:59:24 2001 UTC (23 years, 10 months ago) by sommerfeld
Branches: sommerfeld_i386mp_1
Diff to: previous 1.376.2.13: preferred, colored; branchpoint 1.376: preferred, colored
Changes since revision 1.376.2.13: +14 -8 lines
Correct merge botches.
Post-merge kernel now boots multiuser.

Revision 1.376.2.13: download - view: text, markup, annotated - select for diffs
Sun Jan 7 22:12:42 2001 UTC (23 years, 10 months ago) by sommerfeld
Branches: sommerfeld_i386mp_1
Diff to: previous 1.376.2.12: preferred, colored; branchpoint 1.376: preferred, colored
Changes since revision 1.376.2.12: +654 -95 lines
Snapshot of merge-in-progress with -current.

[Not expected to build].  Catch up with the last N months worth of
changes to -current.

Revision 1.366.2.5: download - view: text, markup, annotated - select for diffs
Fri Jan 5 17:34:30 2001 UTC (23 years, 10 months ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.366.2.4: preferred, colored; branchpoint 1.366: preferred, colored
Changes since revision 1.366.2.4: +14 -13 lines
Sync with HEAD

Revision 1.376.2.12: download - view: text, markup, annotated - select for diffs
Thu Jan 4 04:44:32 2001 UTC (23 years, 10 months ago) by thorpej
Branches: sommerfeld_i386mp_1
Diff to: previous 1.376.2.11: preferred, colored; branchpoint 1.376: preferred, colored
Changes since revision 1.376.2.11: +2 -2 lines
Always statically allocated the primary CPU's cpu_info, and make the
cpu_info list available in the non-MULTIPROCESSOR case, as well.

Revision 1.376.2.11: download - view: text, markup, annotated - select for diffs
Tue Jan 2 06:58:08 2001 UTC (23 years, 10 months ago) by thorpej
Branches: sommerfeld_i386mp_1
Diff to: previous 1.376.2.10: preferred, colored; branchpoint 1.376: preferred, colored
Changes since revision 1.376.2.10: +2 -2 lines
Mirror a change made on the trunk:

Don't equate pmap_update() with tlbflush(), but instead call
tlbflush() when that's what we mean (currently everywhere, except
in the one place in MI code where it is called).

The whole pmap_update() thing needs to be reexamined, but this helps
to clarify things a little with the currently-defined semantics of
that function.

Revision 1.426: download - view: text, markup, annotated - select for diffs
Mon Jan 1 22:13:54 2001 UTC (23 years, 10 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.425: preferred, colored
Changes since revision 1.425: +2 -2 lines
Don't equate pmap_update() with tlbflush(), but instead call
tlbflush() when that's what we mean (currently everywhere, except
in the one place in MI code where it is called).

The whole pmap_update() thing needs to be reexamined, but this helps
to clarify things a little with the currently-defined semantics of
that function.

Revision 1.376.2.10: download - view: text, markup, annotated - select for diffs
Fri Dec 29 21:25:47 2000 UTC (23 years, 10 months ago) by sommerfeld
Branches: sommerfeld_i386mp_1
Diff to: previous 1.376.2.9: preferred, colored; branchpoint 1.376: preferred, colored
Changes since revision 1.376.2.9: +10 -11 lines
Pull up 1.425: ps_sigstk moved from from p_sigacts to p_sigctx.

Revision 1.425: download - view: text, markup, annotated - select for diffs
Fri Dec 22 22:58:53 2000 UTC (23 years, 10 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.424: preferred, colored
Changes since revision 1.424: +10 -11 lines
split off thread specific stuff from struct sigacts to struct sigctx, leaving
    only signal handler array sharable between threads
move other random signal stuff from struct proc to struct sigctx

This addresses kern/10981 by Matthew Orgass.

Revision 1.424: download - view: text, markup, annotated - select for diffs
Thu Dec 21 05:20:24 2000 UTC (23 years, 10 months ago) by enami
Branches: MAIN
Diff to: previous 1.423: preferred, colored
Changes since revision 1.423: +11 -14 lines
Redo previous slight differently.

Revision 1.423: download - view: text, markup, annotated - select for diffs
Thu Dec 21 05:11:00 2000 UTC (23 years, 10 months ago) by enami
Branches: MAIN
Diff to: previous 1.422: preferred, colored
Changes since revision 1.422: +12 -7 lines
Print cpu features line only when corresponding part of bits are set.

Revision 1.366.2.4: download - view: text, markup, annotated - select for diffs
Wed Dec 13 15:49:26 2000 UTC (23 years, 10 months ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.366.2.3: preferred, colored; branchpoint 1.366: preferred, colored
Changes since revision 1.366.2.3: +4 -0 lines
Sync with HEAD (for UBC fixes).

Revision 1.422: download - view: text, markup, annotated - select for diffs
Mon Dec 11 17:36:03 2000 UTC (23 years, 10 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.421: preferred, colored
Changes since revision 1.421: +5 -1 lines
Handle the VM86-mode syscall problem by changing the syscall vector when
jumping in or out of VM86 mode.

Revision 1.366.2.3: download - view: text, markup, annotated - select for diffs
Fri Dec 8 09:26:37 2000 UTC (23 years, 11 months ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.366.2.2: preferred, colored; branchpoint 1.366: preferred, colored
Changes since revision 1.366.2.2: +13 -4 lines
Sync with HEAD.

Revision 1.421: download - view: text, markup, annotated - select for diffs
Wed Nov 29 09:56:02 2000 UTC (23 years, 11 months ago) by aymeric
Branches: MAIN
Diff to: previous 1.420: preferred, colored
Changes since revision 1.420: +8 -2 lines
Fall back to previous memory segments detection code if BIOS reports no
correct memory segment.
This prevents some systems from losing with `can't find end of memory'.
Discussed with Bill Sommerfeld.

Revision 1.420: download - view: text, markup, annotated - select for diffs
Wed Nov 22 16:41:56 2000 UTC (23 years, 11 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.419: preferred, colored
Changes since revision 1.419: +7 -4 lines
Intel recommends to print cpu serial number as six dash-separated nibbles
(XXXX-XXXX-XXXX-XXXX-XXXX-XXXX), make it so

Revision 1.366.2.2: download - view: text, markup, annotated - select for diffs
Wed Nov 22 16:00:20 2000 UTC (23 years, 11 months ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.366.2.1: preferred, colored; branchpoint 1.366: preferred, colored
Changes since revision 1.366.2.1: +109 -59 lines
Sync with HEAD.

Revision 1.366.2.1: download - view: text, markup, annotated - select for diffs
Mon Nov 20 20:09:22 2000 UTC (23 years, 11 months ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.366: preferred, colored
Changes since revision 1.366: +610 -1174 lines
Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

Revision 1.419: download - view: text, markup, annotated - select for diffs
Sun Nov 19 23:38:22 2000 UTC (23 years, 11 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.418: preferred, colored
Changes since revision 1.418: +4 -4 lines
cosmetic change in brand string handling (NULL vs. "")

drop Xeon from PIII Cascades entry, it should be handled by the brand id
support (pointed out by Scott Telford in private e-mail).

Revision 1.418: download - view: text, markup, annotated - select for diffs
Thu Nov 16 17:00:17 2000 UTC (23 years, 11 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.417: preferred, colored
Changes since revision 1.417: +4 -4 lines
make i386_nocpuid_cpus[] and i386_cpuid_cpus[] const - this pushes
another ~1.4KB to text section

Revision 1.417: download - view: text, markup, annotated - select for diffs
Thu Nov 16 10:19:02 2000 UTC (23 years, 11 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.416: preferred, colored
Changes since revision 1.416: +24 -3 lines
Newer Intel PIII processors also make available Brand ID value through
cpuid instruction, which is used to differentiate between Celeron, common PIII
and PIII Xeon; recognize it and print appropriate info if applicable

Information taken from Intel's (R)
Intel Processor Identification and the CPUID Instruction, AP-485

Revision 1.416: download - view: text, markup, annotated - select for diffs
Thu Nov 16 09:06:17 2000 UTC (23 years, 11 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.415: preferred, colored
Changes since revision 1.415: +12 -8 lines
Update cpuid table according to information sent by Scott Telford
in port-i386/11502, with only sligh change for Coppermine entry -
cpus with family 6, model 8 are not all Celerons, they can be
either common PIII, Xeon or Celeron

Revision 1.415: download - view: text, markup, annotated - select for diffs
Wed Nov 15 21:13:58 2000 UTC (23 years, 11 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.414: preferred, colored
Changes since revision 1.414: +2 -2 lines
introduce SIGACTION_PS() macro - this is similar to SIGACTION(), but works
for (struct sigacts *) instead of (struct proc *)

Revision 1.414: download - view: text, markup, annotated - select for diffs
Tue Nov 14 22:55:05 2000 UTC (23 years, 11 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.413: preferred, colored
Changes since revision 1.413: +20 -20 lines
NBPG -> PAGE_SIZE

Revision 1.413: download - view: text, markup, annotated - select for diffs
Mon Nov 13 16:40:40 2000 UTC (23 years, 11 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.412: preferred, colored
Changes since revision 1.412: +3 -3 lines
when evaluating CPU speed, make the wait 0.1s instead of 1s - the accuracy
difference is like 0.008% on my system and the delay is now almost unnoticable:)
Discussed with Jason Thorpe, Frank van den Linden.

Revision 1.412: download - view: text, markup, annotated - select for diffs
Fri Nov 10 04:00:25 2000 UTC (23 years, 11 months ago) by enami
Branches: MAIN
Diff to: previous 1.411: preferred, colored
Changes since revision 1.411: +11 -10 lines
Cometic change; keep the code to process a second hunk closer to the first one.

Revision 1.411: download - view: text, markup, annotated - select for diffs
Fri Nov 10 03:58:15 2000 UTC (23 years, 11 months ago) by enami
Branches: MAIN
Diff to: previous 1.410: preferred, colored
Changes since revision 1.410: +11 -10 lines
Don't start next iteration while processing a first memory hunk since
there may be a second hunk.

Revision 1.410: download - view: text, markup, annotated - select for diffs
Thu Nov 9 19:22:30 2000 UTC (23 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.409: preferred, colored
Changes since revision 1.409: +2 -2 lines
put the suggestion message in uvm_page.c. There could be other reasons
why we are not able to find the end of memory.

Revision 1.409: download - view: text, markup, annotated - select for diffs
Thu Nov 9 17:34:51 2000 UTC (23 years, 11 months ago) by kim
Branches: MAIN
Diff to: previous 1.408: preferred, colored
Changes since revision 1.408: +8 -8 lines
BIOS memory loading messages can be enabled with DEBUG_MEMLOAD.
Increase VM_PHYSSEG_MAX from 3 to 5 to avoid a panic.  Suggest
increasing VM_PHYSSEG_MAX in the panic message.

Revision 1.408: download - view: text, markup, annotated - select for diffs
Sun Nov 5 22:10:01 2000 UTC (24 years ago) by thorpej
Branches: MAIN
Diff to: previous 1.407: preferred, colored
Changes since revision 1.407: +25 -2 lines
If we have a working cycle counter, compute the number of CPU
cycles in a second, and print the CPU speed.

Derived from similar code in FreeBSD.

Revision 1.407: download - view: text, markup, annotated - select for diffs
Sat Oct 28 02:29:35 2000 UTC (24 years ago) by enami
Branches: MAIN
Diff to: previous 1.406: preferred, colored
Changes since revision 1.406: +2 -2 lines
Don't use memory map of no entry.  Instead, fallback into old way.
This fixes one of ``can't find end of memory'' panic on startup.

Revision 1.406: download - view: text, markup, annotated - select for diffs
Fri Sep 29 14:16:23 2000 UTC (24 years, 1 month ago) by fvdl
Branches: MAIN
Diff to: previous 1.405: preferred, colored
Changes since revision 1.405: +40 -1 lines
Recognize Pentium 4. Treat everything with model > 6 as model 7 for now,
in the hope that Intel doesn't start number backwards now that they
picked 15 for the P4.

Revision 1.405: download - view: text, markup, annotated - select for diffs
Fri Sep 29 13:15:48 2000 UTC (24 years, 1 month ago) by fvdl
Branches: MAIN
Diff to: previous 1.404: preferred, colored
Changes since revision 1.404: +2 -2 lines
oops, typo in previous (|| -> &&)

Revision 1.404: download - view: text, markup, annotated - select for diffs
Fri Sep 29 13:05:12 2000 UTC (24 years, 1 month ago) by fvdl
Branches: MAIN
Diff to: previous 1.403: preferred, colored
Changes since revision 1.403: +2 -4 lines
Don't print anything when the serial number is not supported. There are
a lot of other features that may not be supported either, no need to
print them.

Revision 1.403: download - view: text, markup, annotated - select for diffs
Fri Sep 29 09:07:53 2000 UTC (24 years, 1 month ago) by explorer
Branches: MAIN
Diff to: previous 1.402: preferred, colored
Changes since revision 1.402: +3 -5 lines
clean up printing when serial number not supported or disabled.

Revision 1.402: download - view: text, markup, annotated - select for diffs
Fri Sep 29 09:03:18 2000 UTC (24 years, 1 month ago) by explorer
Branches: MAIN
Diff to: previous 1.401: preferred, colored
Changes since revision 1.401: +34 -1 lines
print CPU serial number at boot time.  After all, we have a million other flags printed, what's one more interesting one.

Revision 1.401: download - view: text, markup, annotated - select for diffs
Thu Sep 28 18:31:36 2000 UTC (24 years, 1 month ago) by thorpej
Branches: MAIN
Diff to: previous 1.400: preferred, colored
Changes since revision 1.400: +328 -56 lines
Reintroduce the ACPI memory map code.  The bug that caused the
IDT to be scribbled over on some systems was found and fixed by
T.SHIOZAKI <tshiozak@netbsd.org>.

Revision 1.376.2.9: download - view: text, markup, annotated - select for diffs
Tue Sep 19 14:26:08 2000 UTC (24 years, 1 month ago) by sommerfeld
Branches: sommerfeld_i386mp_1
Diff to: previous 1.376.2.8: preferred, colored; branchpoint 1.376: preferred, colored
Changes since revision 1.376.2.8: +2 -2 lines
Add new 'align' argument to uvm_map

Revision 1.400: download - view: text, markup, annotated - select for diffs
Fri Sep 15 03:44:28 2000 UTC (24 years, 1 month ago) by enami
Branches: MAIN
Diff to: previous 1.399: preferred, colored
Changes since revision 1.399: +7 -1 lines
Add few more L2 cache info entry.

Revision 1.399: download - view: text, markup, annotated - select for diffs
Fri Sep 15 03:41:18 2000 UTC (24 years, 1 month ago) by enami
Branches: MAIN
Diff to: previous 1.398: preferred, colored
Changes since revision 1.398: +9 -6 lines
When fetching cache info:
- Don't fall into infinite loop even if the # of iteration necessary isn't 1.
- Don't interpret lower 8bit of AL, which is # of iteration, as a descriptor.

Revision 1.398: download - view: text, markup, annotated - select for diffs
Wed Sep 13 15:00:18 2000 UTC (24 years, 1 month ago) by thorpej
Branches: MAIN
Diff to: previous 1.397: preferred, colored
Changes since revision 1.397: +2 -2 lines
Add an align argument to uvm_map() and some callers of that
routine.  Works similarly fto pmap_prefer(), but allows callers
to specify a minimum power-of-two alignment of the region.
How we ever got along without this for so long is beyond me.

Revision 1.397: download - view: text, markup, annotated - select for diffs
Wed Sep 13 08:04:15 2000 UTC (24 years, 1 month ago) by thorpej
Branches: MAIN
Diff to: previous 1.396: preferred, colored
Changes since revision 1.396: +113 -1 lines
Fetch cache info via `cpuid' insn, parse it, remember it,
and report it at boot time.

Revision 1.396: download - view: text, markup, annotated - select for diffs
Wed Sep 6 22:23:46 2000 UTC (24 years, 2 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.395: preferred, colored
Changes since revision 1.395: +3 -3 lines
On second thought, back out kvtopte() change in previous.  Dug, PT pages
are in a special VA range, not kernel VA range.

Revision 1.395: download - view: text, markup, annotated - select for diffs
Wed Sep 6 22:19:46 2000 UTC (24 years, 2 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.394: preferred, colored
Changes since revision 1.394: +12 -3 lines
Print CPU features, and use kvtopte() for kernel addresses.

Revision 1.376.2.8: download - view: text, markup, annotated - select for diffs
Fri Aug 25 02:03:28 2000 UTC (24 years, 2 months ago) by sommerfeld
Branches: sommerfeld_i386mp_1
Diff to: previous 1.376.2.7: preferred, colored; branchpoint 1.376: preferred, colored
Changes since revision 1.376.2.7: +3 -4 lines
The need_resched() function now takes a (cpu_info *) parameter.
Get asts out of <machine/intr.h>
Untangle astpending and want_resched variables somewhat.

Revision 1.376.2.7: download - view: text, markup, annotated - select for diffs
Fri Aug 18 13:37:44 2000 UTC (24 years, 2 months ago) by sommerfeld
Branches: sommerfeld_i386mp_1
Diff to: previous 1.376.2.6: preferred, colored; branchpoint 1.376: preferred, colored
Changes since revision 1.376.2.6: +6 -2 lines
New interface to npxsave.
For DDB, call db_machine_init() before ddb_init().

Revision 1.389.2.2: download - view: text, markup, annotated - select for diffs
Thu Aug 17 18:52:55 2000 UTC (24 years, 2 months ago) by fvdl
Branches: netbsd-1-5
CVS tags: netbsd-1-5-RELEASE, netbsd-1-5-BETA2, netbsd-1-5-BETA
Diff to: previous 1.389.2.1: preferred, colored; branchpoint 1.389: preferred, colored
Changes since revision 1.389.2.1: +12 -5 lines
Pull up version 1.393:

      Move identifycpu to a place where it gets called earlier in the
      process, so that special setup functions needed for some CPUs will
      be run before some things (like UVM) are inited.

      Add vm_page_zero_enable = FALSE to the cyrix 6x86 case, as page
      zeroing while idle causes problems.

Revision 1.389.2.1: download - view: text, markup, annotated - select for diffs
Wed Aug 16 23:18:22 2000 UTC (24 years, 2 months ago) by thorpej
Branches: netbsd-1-5
Diff to: previous 1.389: preferred, colored
Changes since revision 1.389: +4 -4 lines
Update from trunk:
Move the TSS selector out of the PCB and put it into mdproc.  We
need to access this when we have the proclist locked for reading,
and thus cannot store it in the PCB (which may be swapped out).

As part of this, call pmap_activate() from cpu_switch() to switch
to the new address space, and refresh the PCB's copy of the LDT
selector from the pmap structure (see above paragraph).  We need
to do this for MP support anyhow.

Fixes a "panic: spinlock_switchcheck: CPU 0 has 1 spin locks" via
gdt_compact() reported by Nathan Williams.

Revision 1.394: download - view: text, markup, annotated - select for diffs
Wed Aug 16 04:44:35 2000 UTC (24 years, 2 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.393: preferred, colored
Changes since revision 1.393: +4 -4 lines
Move the TSS selector out of the PCB and put it into mdproc.  We
need to access this when we have the proclist locked for reading,
and thus cannot store it in the PCB (which may be swapped out).

As part of this, call pmap_activate() from cpu_switch() to switch
to the new address space, and refresh the PCB's copy of the LDT
selector from the pmap structure (see above paragraph).  We need
to do this for MP support anyhow.

Fixes a "panic: spinlock_switchcheck: CPU 0 has 1 spin locks" via
gdt_compact() reported by Nathan Williams.

Revision 1.393: download - view: text, markup, annotated - select for diffs
Tue Aug 15 18:21:44 2000 UTC (24 years, 2 months ago) by fvdl
Branches: MAIN
Diff to: previous 1.392: preferred, colored
Changes since revision 1.392: +12 -5 lines
Move identifycpu to a place where it gets called earlier in the process,
so that special setup functions needed for some CPUs will be run before
some things (like UVM) are inited.

Add vm_page_zero_enable = FALSE to the cyrix 6x86 case, as page zeroing
while idle causes problems.

Revision 1.376.2.6: download - view: text, markup, annotated - select for diffs
Mon Aug 7 01:08:39 2000 UTC (24 years, 3 months ago) by sommerfeld
Branches: sommerfeld_i386mp_1
Diff to: previous 1.376.2.5: preferred, colored; branchpoint 1.376: preferred, colored
Changes since revision 1.376.2.5: +3 -5 lines
Merge sommerfeld_i386mp_1 branch forward to 20000806 sources

Revision 1.392: download - view: text, markup, annotated - select for diffs
Sat Jul 8 17:09:02 2000 UTC (24 years, 4 months ago) by sommerfeld
Branches: MAIN
Diff to: previous 1.391: preferred, colored
Changes since revision 1.391: +2 -2 lines
printf format paranoia

Revision 1.391: download - view: text, markup, annotated - select for diffs
Thu Jun 29 08:44:51 2000 UTC (24 years, 4 months ago) by mrg
Branches: MAIN
Diff to: previous 1.390: preferred, colored
Changes since revision 1.390: +1 -3 lines
remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>

Revision 1.390: download - view: text, markup, annotated - select for diffs
Mon Jun 26 14:20:44 2000 UTC (24 years, 4 months ago) by mrg
Branches: MAIN
Diff to: previous 1.389: preferred, colored
Changes since revision 1.389: +3 -2 lines
remove/move more mach vm header files:

	<vm/pglist.h> -> <uvm/uvm_pglist.h>
	<vm/vm_inherit.h> -> <uvm/uvm_inherit.h>
	<vm/vm_kern.h> -> into <uvm/uvm_extern.h>
	<vm/vm_object.h> -> nothing
	<vm/vm_pager.h> -> into <uvm/uvm_pager.h>

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.

Revision 1.376.2.5: download - view: text, markup, annotated - select for diffs
Mon Jun 26 02:04:08 2000 UTC (24 years, 4 months ago) by somme