The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


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

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

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

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

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

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

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

CID 1175795:  Unused pointer value

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

fix unused variable warnings

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

Fix unused variable warnings

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

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

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

de-duplication police arrests sysctl.

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

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

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

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

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

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

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

gcc -fno-common fallout

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

Retire XEN_COMPAT_030001 as detailed on port-xen@:

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

The xen_p2m API comes next.

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

FWIW, Amazon always reported:

hypervisor0 at mainbus0: Xen version 3.4.3-kaos_t1micro

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

XXX is ci_fpused still needed at all ?

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

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

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

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

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

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

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

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

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

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

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

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

remove Xbox support

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

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

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

DTRT when initialising pmap_pa_end.

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

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

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

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

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

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

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

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

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

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

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

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

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

Welcome to 5.99.53!  Merge rmind-uvmplock branch:

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

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

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

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

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

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

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

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

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

Remove Darwin, MACH and Mach-O support.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Simplify acpi_enter_sleep_state() and guard it against NULL pointer
dereferences. Try to avoid referencing the global acpi_softc, which should
really be static or at least internal to acpi(4).

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

don't forget to call nmi_init.

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

Use SYSCTL_DESCR()

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

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

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

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

Do not try to disable ACPI if we can not enter to legacy mode. While it is
safe to call AcpiDisable() even if a system operates only in ACPI mode, this
leads to unpleasantly verbose error messages in ACPICA.

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

Welcome PAE inside i386 current.

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

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

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

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

Notes:

- reworked locore.S

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

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

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

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

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

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

- 64 bits atomic functions for pmap

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

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

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

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

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

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

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

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

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

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

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

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

Fix typo in comment.

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

Enable the NX bit feature for Xen i386pae and amd64 kernels.

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

Ok bouyer@.

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

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

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

This patch fixes the NX regression issue observed on amd64 kernels, where
per-page execution right was disabled (therefore leading to the inability
of the kernel to detect fraudulent use of memory mappings marked as not
being executable).

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

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

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

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

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

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

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

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

XXX Should kernel rev be bumped?

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

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

Do not forget that ptoa() casts the result to vaddr_t, which is bad
for paddr_t values under i386 PAE. Use ctob() instead.

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

Compile tested for i386 and amd64. No regression expected.

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

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

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

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

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

Compile tested for GENERIC only. No regression expected.

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

Remove separate mb_map. The nmbclusters is computed at boot time based
on the amount of physical memory and limited by NMBCLUSTERS if present.
Architectures without direct mapping also limit it based on the kmem_map
size, which is used as backing store. On i386 and ARM, the maximum KVA
used for mbuf clusters is limited to 64MB by default.

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

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

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

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

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

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

- Use uvm_lwp_setuarea() instead of directly setting address to lwp_t::l_addr.
- Replace most remaining uses of l_addr with uvm_lwp_getuarea() or lwp_getpcb().
- Amend assembly in ports where it accesses PCB via struct user.
- Rename L_ADDR to L_PCB in few places.  Reduce sys/user.h inclusions.

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

Kill proc0paddr.  Use lwp0.l_addr instead.

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

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

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

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

HI RMIND

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

Missed fix for Xen builds.

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

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

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

Add a flags argument to pmap_kenter_pa(9).
Patch showed on tech-kern@ http://mail-index.netbsd.org/tech-kern/2009/11/04/msg006434.html
No objections.

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

Remove X86_IPI_WRITE_MSR (and msr_ipifuncs.c), replace all uses in drivers
with xc_broadcast().  AMD K8 PowerNow driver tested by <jakllsch>, thanks!

Closes PR/37665.

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

Switch to ACPICA 20090730, and update for API changes.

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

remove Xen2 support.
ok bouyer@

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

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

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

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

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

Here is the old order of operations:

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

And here is the new order:

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

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

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

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

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

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

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

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

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

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

Fix numerous problems:

1. LDT updates are not atomic.

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

3. LDTR can be leaked over context switch.

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

5. Incomplete interrupt/trap frames can be stacked.

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

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

ansify function definitions

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

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

Merge change from amd64 machdep.c revision 1.42:

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

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

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

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

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

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

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

Ok by jmcneill, joerg.

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

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

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

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

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

Explicitly initialize mem_cluster_cnt to 0 for my peace of mind.

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

remove extra variable

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

factor out common reset code.

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

Make previous compile.

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

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

Requested by ad@

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

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

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

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

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

Put the COMPAT_NOMID stuff into its own file.

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

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

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

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

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

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

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

Proposed on tech-kern@.

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

cosmetic changes:
use PRIx64 rather %qx
cache bootinfo addr and size as done in amd64/amd64/machdep.c:init_x86_64()
No functional change intended.

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

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

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

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

Fix race conditions in FPU IPI handling.

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

It is not appropriate to call pmf_system_shutdown(9) from
doshutdownhooks(9): shutdown hooks registered by shutdownhook_establish(9)
expect to be called with interrupts disabled, but shutdown hooks
registered with pmf_device_register1(9) expect to be called with
interrupts enabled.  So I have made two changes:

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

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

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

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

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

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

Merge wrstuden-revivesa into HEAD.

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

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

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

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

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

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

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

Wrap long line.

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

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

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

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

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

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

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

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

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

Export tsc_freq via sysctl.

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

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

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

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

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

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

Remove clause 3 and 4 from TNF licenses

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

Make FPU handling preemption safe.

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

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

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

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

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

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

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

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

Ok by christos@.

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

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

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

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

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

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

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

OK ad@

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Merge jmcneill-pm branch.

Revision 1.616 / (download) - annotate - [select for diffs], Mon Dec 3 15:33:46 2007 UTC (6 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: yamt-kmem-base, vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base
Branch point for: yamt-kmem, vmlocking2
Changes since 1.615: +2 -5 lines
Diff to previous 1.615 (colored)

Interrupt handling changes, in discussion since February:

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

Revision 1.615 / (download) - annotate - [select for diffs], Wed Nov 14 17:50:13 2007 UTC (6 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: bouyer-xenamd64-base2, bouyer-xenamd64-base
Changes since 1.614: +7 -19 lines
Diff to previous 1.614 (colored)

- Set a 4GB limit for GUCODEBIG_SEL, GCPU_SEL and GUDATA_SEL. It can speed
  up address generation by the MMU.
- Clear the direction flag before entering a signal handler.
- Don't test for I586_CPU.

Revision 1.614 / (download) - annotate - [select for diffs], Mon Nov 12 19:02:26 2007 UTC (6 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.613: +2 -48 lines
Diff to previous 1.613 (colored)

Merge cpu_need_resched() from vmlocking:

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

Revision 1.613 / (download) - annotate - [select for diffs], Sat Nov 10 23:04:29 2007 UTC (6 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.612: +6 -4 lines
Diff to previous 1.612 (colored)

fsbase/gsbase:

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

Revision 1.612 / (download) - annotate - [select for diffs], Sat Nov 10 20:06:24 2007 UTC (6 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.611: +8 -6 lines
Diff to previous 1.611 (colored)

- When computing the TSC frequency, call i8254_delay() and not DELAY().
- Use atomics to adjust the pmap reference count, instead of taking locks.
- Implement I386_{SET,GET}_{FS,GS}BASE, allowing %fs and %gs to be used
  as per-thread registers. This is compatible with FreeBSD.
- Run patches after we have attached CPUs, since we then know if the
  system is uniprocessor or not. Eliminates a lot of #ifdef MULTIPROCESSOR
  and makes running MP kernels on UP systems cheaper.
- Patch out many of the 'lock' prefixes to nops if uniprocessor.
- Do a wbinvd after patching to ensure that the trace/instruction cache
  is up to date.

Revision 1.611 / (download) - annotate - [select for diffs], Fri Oct 26 13:24:40 2007 UTC (7 years ago) by joerg
Branch: MAIN
CVS Tags: jmcneill-base
Branch point for: mjf-devfs
Changes since 1.610: +3 -3 lines
Diff to previous 1.610 (colored)

Match delay/DELAY on x86 with delay(9). It takes an unsigned int as
argument. Use this and replace the inline assembly (mul + div using the
64bit intermediate result) with normal 32bit multiplication and
division. The compiler can turn the division into a multiplication and
shift, making it even cheaper then the original assembly. For extreme
long delays, just use 64bit arithmetic.

Revision 1.610 / (download) - annotate - [select for diffs], Thu Oct 18 15:28:35 2007 UTC (7 years ago) by yamt
Branch: MAIN
Changes since 1.609: +2 -7 lines
Diff to previous 1.609 (colored)

merge yamt-x86pmap branch.

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

Revision 1.609 / (download) - annotate - [select for diffs], Wed Oct 17 19:54:45 2007 UTC (7 years ago) by garbled
Branch: MAIN
CVS Tags: yamt-x86pmap-base4
Changes since 1.608: +2 -2 lines
Diff to previous 1.608 (colored)

Merge the ppcoea-renovation branch to HEAD.

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

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

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

Revision 1.608 / (download) - annotate - [select for diffs], Wed Sep 26 19:48:37 2007 UTC (7 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base3, yamt-x86pmap-base2, vmlocking-base, ppcoea-renovation-base
Branch point for: bouyer-xenamd64
Changes since 1.607: +7 -7 lines
Diff to previous 1.607 (colored)

x86 changes for pcc and LKMs.

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

Revision 1.607 / (download) - annotate - [select for diffs], Tue Aug 7 11:30:20 2007 UTC (7 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base, nick-csl-alignment-base5
Branch point for: yamt-x86pmap, matt-armv6
Changes since 1.606: +4 -3 lines
Diff to previous 1.606 (colored)

More calls to pmap_update().

Revision 1.606 / (download) - annotate - [select for diffs], Mon Jul 9 20:52:15 2007 UTC (7 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: nick-csl-alignment-base, mjf-ufs-trans-base, matt-mips64-base, matt-mips64, hpcarm-cleanup
Branch point for: nick-csl-alignment, jmcneill-pm
Changes since 1.605: +14 -11 lines
Diff to previous 1.605 (colored)

Merge some of the less invasive changes from the vmlocking branch:

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

Revision 1.605 / (download) - annotate - [select for diffs], Sun Jul 8 10:19:22 2007 UTC (7 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.604: +3 -3 lines
Diff to previous 1.604 (colored)

Initialize the link context in a signal frame to the receiving lwp's
link context instead of NULL.  Otherwise, if we got a signal while the
lwp had a link context set, the link context would be set to NULL upon
return from signal delivery.

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

Revision 1.604 / (download) - annotate - [select for diffs], Tue Jun 26 20:11:12 2007 UTC (7 years, 4 months ago) by briggs
Branch: MAIN
Changes since 1.603: +9 -2 lines
Diff to previous 1.603 (colored)

When collecting memory regions from the BIOS, ignore regions that are less
than a page size.  This assists a decTOP Geode-based system that reports
memory regions:
        start      end         size       type
	0x00000000 0x0009e000  0x0009e000 1 (Memory)
	0x00100000 0x06be3c00  0x06ae3c00 1 (Memory)
	0x06be3c00 0x06be6000  0x00002400 3 (ACPI)
	0x06fff800 0x06fffc00  0x00000400 1 (Memory)
	0x06fffc00 0x07000000  0x00000400 4 (NVS)

Revision 1.603 / (download) - annotate - [select for diffs], Thu May 17 14:51:21 2007 UTC (7 years, 5 months ago) by yamt
Branch: MAIN
Changes since 1.602: +29 -42 lines
Diff to previous 1.602 (colored)

merge yamt-idlelwp branch.  asked by core@.  some ports still needs work.

from doc/BRANCHES:

	idle lwp, and some changes depending on it.

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

Revision 1.602 / (download) - annotate - [select for diffs], Tue Mar 20 21:07:39 2007 UTC (7 years, 7 months ago) by xtraeme
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic
Branch point for: ppcoea-renovation
Changes since 1.601: +6 -2 lines
Diff to previous 1.601 (colored)

MSR read and write IPI handlers for x86. A MSR will be read or written
in all CPUs available in the system. This adds another member
to struct cpu_info, ci_msr_rvalue; it will contain the value of the MSR
in a previous operation.

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

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

Revision 1.601 / (download) - annotate - [select for diffs], Wed Mar 7 21:43:43 2007 UTC (7 years, 7 months ago) by thorpej
Branch: MAIN
Branch point for: vmlocking, reinoud-bufcleanup, mjf-ufs-trans
Changes since 1.600: +6 -6 lines
Diff to previous 1.600 (colored)

TRUE -> true, FALSE -> false

Revision 1.600 / (download) - annotate - [select for diffs], Sun Mar 4 05:59:57 2007 UTC (7 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.599: +13 -13 lines
Diff to previous 1.599 (colored)

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.

Revision 1.599 / (download) - annotate - [select for diffs], Wed Feb 21 22:59:43 2007 UTC (7 years, 8 months ago) by thorpej
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Changes since 1.598: +3 -3 lines
Diff to previous 1.598 (colored)

Replace the Mach-derived boolean_t type with the C99 bool type.  A
future commit will replace use of TRUE and FALSE with true and false.

Revision 1.598 / (download) - annotate - [select for diffs], Sun Feb 18 18:20:26 2007 UTC (7 years, 8 months ago) by dsl
Branch: MAIN
Changes since 1.597: +2 -12 lines
Diff to previous 1.597 (colored)

Get config(1) to supply the default parameters for BEEP_ON_HALT.

Revision 1.597 / (download) - annotate - [select for diffs], Sun Feb 18 17:11:27 2007 UTC (7 years, 8 months ago) by ad
Branch: MAIN
Changes since 1.596: +3 -4 lines
Diff to previous 1.596 (colored)

Drop proc::p_smutex before calling cpu_getmcontext().

Revision 1.596 / (download) - annotate - [select for diffs], Sat Feb 17 00:28:24 2007 UTC (7 years, 8 months ago) by daniel
Branch: MAIN
Branch point for: yamt-idlelwp
Changes since 1.595: +4 -2 lines
Diff to previous 1.595 (colored)

Add an opencrypto provider for the AES xcrypt instructions found on VIA
C5P and later cores (also known as 'ACE', which is part of the VIA PadLock
security engine). Ported from OpenBSD.

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

Revision 1.595 / (download) - annotate - [select for diffs], Fri Feb 9 21:55:04 2007 UTC (7 years, 8 months ago) by ad
Branch: MAIN
CVS Tags: post-newlock2-merge
Changes since 1.594: +50 -56 lines
Diff to previous 1.594 (colored)

Merge newlock2 to head.

Revision 1.594 / (download) - annotate - [select for diffs], Sun Feb 4 15:26:26 2007 UTC (7 years, 8 months ago) by jmcneill
Branch: MAIN
CVS Tags: newlock2-nbase, newlock2-base
Changes since 1.593: +4 -2 lines
Diff to previous 1.593 (colored)

Note the origin (hi FreeBSD!) of a couple clever bits of Xbox
initialization code. No functional changes.

Revision 1.593 / (download) - annotate - [select for diffs], Fri Jan 12 20:34:09 2007 UTC (7 years, 9 months ago) by gdt
Branch: MAIN
Changes since 1.592: +15 -2 lines
Diff to previous 1.592 (colored)

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

ok christos@

Revision 1.592 / (download) - annotate - [select for diffs], Sun Jan 7 01:04:26 2007 UTC (7 years, 9 months ago) by jmcneill
Branch: MAIN
Changes since 1.591: +6 -17 lines
Diff to previous 1.591 (colored)

Remove nForce ethernet hack from machdep and instead call xbox_startup from
cpu_startup, which applies the patch.

Revision 1.591 / (download) - annotate - [select for diffs], Sat Jan 6 18:42:36 2007 UTC (7 years, 9 months ago) by jmcneill
Branch: MAIN
Changes since 1.590: +4 -7 lines
Diff to previous 1.590 (colored)

Use the pic16lc@iic driver for setting the system LED, rebooting, and
powering off the machine instead of the assembly code in pic16l.S

Revision 1.590 / (download) - annotate - [select for diffs], Sat Jan 6 16:22:46 2007 UTC (7 years, 9 months ago) by pavel
Branch: MAIN
Changes since 1.589: +5 -5 lines
Diff to previous 1.589 (colored)

correct whitespace in last commit.

Revision 1.589 / (download) - annotate - [select for diffs], Sat Jan 6 15:29:02 2007 UTC (7 years, 9 months ago) by pavel
Branch: MAIN
Changes since 1.588: +32 -13 lines
Diff to previous 1.588 (colored)

PR port-i386/34186 by Wolfgang Stukenbrock:
mapping of msgbuf during startup may map invalid physical adresses

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

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

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

Revision 1.588 / (download) - annotate - [select for diffs], Fri Jan 5 04:07:23 2007 UTC (7 years, 9 months ago) by jmcneill
Branch: MAIN
Changes since 1.587: +14 -11 lines
Diff to previous 1.587 (colored)

Attempt to initialize the console slightly later for hw drivers that wish
to be deferred. While we're here, clean up the Cromwell/Xromwell Xbox
workaround.

Revision 1.587 / (download) - annotate - [select for diffs], Thu Jan 4 18:16:44 2007 UTC (7 years, 9 months ago) by jmcneill
Branch: MAIN
Changes since 1.586: +67 -2 lines
Diff to previous 1.586 (colored)

Microsoft Xbox support, from Andrew Gillham.

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

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

Revision 1.586 / (download) - annotate - [select for diffs], Thu Nov 16 01:32:38 2006 UTC (7 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, netbsd-4-base
Branch point for: netbsd-4
Changes since 1.585: +4 -4 lines
Diff to previous 1.585 (colored)

__unused removal on arguments; approved by core.

Revision 1.585 / (download) - annotate - [select for diffs], Wed Oct 25 13:56:15 2006 UTC (8 years ago) by jmmv
Branch: MAIN
Changes since 1.584: +17 -11 lines
Diff to previous 1.584 (colored)

Remove the usage of Multiboot's "a.out kludge" to tell the boot loader to
reserve some more space for the BSS section than the binary says.  This
trick was used to leave room after the kernel's image to copy the symbol
table following the format required by ksyms_init.  (It was also used to
workaround a bug in the physical address fields of the binary, but this has
been long fixed.)  Yes, the MULTIBOOT_SYMTAB_SPACE option goes away; yay!

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

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

Closes PR port-i386/32865.

Revision 1.584 / (download) - annotate - [select for diffs], Sun Oct 22 13:29:13 2006 UTC (8 years ago) by pooka
Branch: MAIN
Changes since 1.583: +3 -3 lines
Diff to previous 1.583 (colored)

constipate

Revision 1.583 / (download) - annotate - [select for diffs], Sat Oct 21 08:11:49 2006 UTC (8 years ago) by skrll
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.582: +3 -3 lines
Diff to previous 1.582 (colored)

s/out/bad/ in cpu_dumpconf so this compiles.

Revision 1.582 / (download) - annotate - [select for diffs], Sat Oct 21 05:54:32 2006 UTC (8 years ago) by mrg
Branch: MAIN
Changes since 1.581: +6 -4 lines
Diff to previous 1.581 (colored)

in cpu_dumpconf(), don't panic() if we can't bdevsw_lookup() the
dumpdev.  this occurs when we try to set the dumpdev to a device
with no driver loaded.  this fixes PR#34872.

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

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

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

Revision 1.581 / (download) - annotate - [select for diffs], Thu Oct 12 04:31:54 2006 UTC (8 years ago) by thorpej
Branch: MAIN
Changes since 1.580: +5 -2 lines
Diff to previous 1.580 (colored)

cpu_exec_aout_makecmds(): consume the arguments even if COMPAT_NOMID is
not defined.

Revision 1.580 / (download) - annotate - [select for diffs], Thu Oct 12 01:30:42 2006 UTC (8 years ago) by christos
Branch: MAIN
Changes since 1.579: +4 -4 lines
Diff to previous 1.579 (colored)

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386

Revision 1.579 / (download) - annotate - [select for diffs], Wed Sep 27 17:10:34 2006 UTC (8 years, 1 month ago) by cube
Branch: MAIN
Changes since 1.578: +4 -3 lines
Diff to previous 1.578 (colored)

This is again that time of the millenium where we have to crank up a few
static limits to meet modern bloat requirements.

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

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

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

Revision 1.578 / (download) - annotate - [select for diffs], Sun Sep 24 08:35:00 2006 UTC (8 years, 1 month ago) by xtraeme
Branch: MAIN
Changes since 1.577: +3 -3 lines
Diff to previous 1.577 (colored)

In the APM case replace a magic number 0xff with the correct definition:
APM_DEV_ALLUNITS.

Noticed by Sergey Svishchev.

Revision 1.577 / (download) - annotate - [select for diffs], Mon Jul 31 20:59:07 2006 UTC (8 years, 2 months ago) by mrg
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, yamt-pdpolicy-base7, rpaulo-netinet-merge-pcb-base, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: yamt-splraiseipl, newlock2
Changes since 1.576: +12 -5 lines
Diff to previous 1.576 (colored)

add a new "biosmem_implicit" variable that is set when a bootloader
info parser sets "biosbasemem" and "biosextmem" from.  check for this
when probing memory size, rather than biosbasemem/biosextmem being
zero which is no longer true.  also, make the REALBASEMEM/REALEXTMEM
options work properly with multiboot-booted kernels.  fixes PR#33918.

Revision 1.576 / (download) - annotate - [select for diffs], Sat Jul 8 20:30:00 2006 UTC (8 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.575: +7 -7 lines
Diff to previous 1.575 (colored)

- apm.c -> apmbios.c and s/NAPM/NAPMBIOS/
- adjust to new function call signatures.

Revision 1.575 / (download) - annotate - [select for diffs], Mon Jul 3 01:25:33 2006 UTC (8 years, 3 months ago) by mrg
Branch: MAIN
Changes since 1.574: +5 -12 lines
Diff to previous 1.574 (colored)

always include the code to lookup bootinfo for memory size.  however,
don't use it if biosbasemem or biosextmem are non-zero.  this allows
one to set these variables in /netbsd rather than a kernel rebuild with
options REALBASEMEM/REALEXTMEM, as used to be.  PR#33659.

Revision 1.574 / (download) - annotate - [select for diffs], Wed Jun 7 22:37:58 2006 UTC (8 years, 4 months ago) by kardel
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6, gdamore-uart-base, chap-midi-nbase, chap-midi-base
Branch point for: gdamore-uart
Changes since 1.573: +6 -4 lines
Diff to previous 1.573 (colored)

convert to timecounters (from branch simonb-timecounters)

Revision 1.573 / (download) - annotate - [select for diffs], Mon May 22 13:44:53 2006 UTC (8 years, 5 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-pdpolicy-base5, simonb-timecounters-base
Changes since 1.572: +6 -4 lines
Diff to previous 1.572 (colored)

i386 and xen: move struct user to the highest address in uarea
and reduce UPAGES from 4 to 3 in the case of !NOREDZONE.

Revision 1.572 / (download) - annotate - [select for diffs], Fri Apr 14 09:50:16 2006 UTC (8 years, 6 months ago) by jmmv
Branch: MAIN
CVS Tags: elad-kernelauth-base
Branch point for: chap-midi
Changes since 1.571: +3 -3 lines
Diff to previous 1.571 (colored)

biosextmem comes before biosbasemem in the stack passed by the boot loader.
Fixes e.g. APM initialization.  Problem spotted by Kurt Schreiner.

Revision 1.571 / (download) - annotate - [select for diffs], Wed Apr 12 13:48:52 2006 UTC (8 years, 6 months ago) by jmmv
Branch: MAIN
Changes since 1.570: +113 -6 lines
Diff to previous 1.570 (colored)

Convert the code that fetches bootinfo information and stores it into the
kernel from assembler to C and add several comments to make things clearer.
I've been running with these changes for a couple of months without problems.

Revision 1.570 / (download) - annotate - [select for diffs], Fri Feb 3 11:08:24 2006 UTC (8 years, 8 months ago) by jmmv
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base
Branch point for: yamt-pdpolicy, simonb-timecounters, peter-altq, elad-kernelauth
Changes since 1.569: +7 -2 lines
Diff to previous 1.569 (colored)

Implement support for 'The Multiboot Specification' so that i386 kernels
can be booted directly from Multiboot-compliant boot loaders (e.g. GRUB).
See the added multiboot(8) manual page for more information.

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

Revision 1.569 / (download) - annotate - [select for diffs], Fri Dec 30 13:37:57 2005 UTC (8 years, 9 months ago) by jmmv
Branch: MAIN
Branch point for: yamt-uio_vmspace, rpaulo-netinet-merge-pcb
Changes since 1.568: +2 -18 lines
Diff to previous 1.568 (colored)

Add a 'struct bootinfo' to represent the bootinfo structure used in the
kernel by x86 platforms (instead of a simple char *).  This way, the code
in, e.g., lookup_bootinfo, is a bit easier to understand.

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

Revision 1.568 / (download) - annotate - [select for diffs], Mon Dec 26 19:23:59 2005 UTC (8 years, 10 months ago) by perry
Branch: MAIN
Changes since 1.567: +9 -9 lines
Diff to previous 1.567 (colored)

u_intN_t -> uintN_t

Revision 1.567 / (download) - annotate - [select for diffs], Sat Dec 24 20:07:10 2005 UTC (8 years, 10 months ago) by perry
Branch: MAIN
Changes since 1.566: +4 -4 lines
Diff to previous 1.566 (colored)

Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.

Revision 1.566 / (download) - annotate - [select for diffs], Sun Dec 11 12:17:41 2005 UTC (8 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.565: +10 -10 lines
Diff to previous 1.565 (colored)

merge ktrace-lwp.

Revision 1.565 / (download) - annotate - [select for diffs], Thu Sep 22 07:13:27 2005 UTC (9 years, 1 month ago) by simonb
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, thorpej-vnode-attr-base, thorpej-vnode-attr, ktrace-lwp-base
Changes since 1.564: +14 -14 lines
Diff to previous 1.564 (colored)

TAB police.

Revision 1.564 / (download) - annotate - [select for diffs], Thu Sep 22 06:45:03 2005 UTC (9 years, 1 month ago) by dyoung
Branch: MAIN
Changes since 1.563: +22 -2 lines
Diff to previous 1.563 (colored)

Reset the AMD Geode SC1100.  Previously, the Geode hung after
printing "resetting...".  Now it really restarts.

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

Revision 1.563 / (download) - annotate - [select for diffs], Sun May 29 21:33:01 2005 UTC (9 years, 4 months ago) by christos
Branch: MAIN
Branch point for: yamt-lazymbuf
Changes since 1.562: +8 -8 lines
Diff to previous 1.562 (colored)

Avoid shadowed variables.

Revision 1.562 / (download) - annotate - [select for diffs], Mon Apr 25 15:02:05 2005 UTC (9 years, 6 months ago) by lukem
Branch: MAIN
CVS Tags: kent-audio2-base
Changes since 1.561: +3 -3 lines
Diff to previous 1.561 (colored)

Move the MI printing of `copyright' to the MD cpu_startup() code
where the printing of `version' is already performed.
This has the benefit of allowing the copyright to be available
via dmesg(8) on platforms which need the `msgbuf' to be setup
in cpu_startup() before printed output is remembered.

Revision 1.561 / (download) - annotate - [select for diffs], Fri Apr 1 11:59:31 2005 UTC (9 years, 6 months ago) by yamt
Branch: MAIN
Changes since 1.560: +8 -10 lines
Diff to previous 1.560 (colored)

merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
  save some resources like pv_entry.  also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.

Revision 1.560 / (download) - annotate - [select for diffs], Wed Mar 2 11:48:03 2005 UTC (9 years, 7 months ago) by mycroft
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, netbsd-3-base, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0
Branch point for: netbsd-3
Changes since 1.559: +3 -3 lines
Diff to previous 1.559 (colored)

Copyright maintenance.

Revision 1.559 / (download) - annotate - [select for diffs], Wed Oct 20 04:20:05 2004 UTC (10 years ago) by thorpej
Branch: MAIN
CVS Tags: yamt-km-base2, yamt-km-base, matt-timespec, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: yamt-km, kent-audio2
Changes since 1.558: +7 -7 lines
Diff to previous 1.558 (colored)

Move boot device detection code from i386 and amd64 ports to x86_autoconf.c.
Rename i386_alldisks and x86_64_alldisks to x86_alldisks, adjust other
references to compensate.

Revision 1.558 / (download) - annotate - [select for diffs], Thu Aug 26 10:12:33 2004 UTC (10 years, 2 months ago) by junyoung
Branch: MAIN
Changes since 1.557: +3 -3 lines
Diff to previous 1.557 (colored)

As suggested on tech-kern@ days ago:
* Get rid of PTmap, PTD, PTDpde, APTmap, APTD, and APTDpde from locore.S.
* Rename PTDpaddr to PDPpaddr, ptdpaddr in struct cpu_kcore_hdr to pdppaddr for consistency.

Revision 1.557 / (download) - annotate - [select for diffs], Thu Aug 5 18:04:35 2004 UTC (10 years, 2 months ago) by dbj
Branch: MAIN
Changes since 1.556: +5 -3 lines
Diff to previous 1.556 (colored)

fix several related bugs that cause sysctl machdep.diskinfo to
lose when booted from pxeboot.
. make sure that i386_alldisks gets initialized even if
  bios geometry information is not available in the bootinfo
. if i386_alldisks is not initialized, have sysctl return EOPNOTSUPP
. compile pxeboot with -DPASS_BIOSGEOM and I386_INCLUDE_DISK=yes
  this may increase the size of pxeboot which is required to run
  in 64k.  However, it seems to be working ok on my system

Revision 1.556 / (download) - annotate - [select for diffs], Thu Jul 22 15:12:46 2004 UTC (10 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.555: +6 -5 lines
Diff to previous 1.555 (colored)

Use pmap_kenter_pa() to map pages to dump, not pmap_enter(), so that it's more
resistant to VM lossage.

Revision 1.555 / (download) - annotate - [select for diffs], Sat Jul 3 21:02:09 2004 UTC (10 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.554: +5 -2 lines
Diff to previous 1.554 (colored)

Per PR 8120, put back the reloading of the IDT in cpu_reset().  (Presumably
this overrides some descriptor caching in the CPU.)

Revision 1.554 / (download) - annotate - [select for diffs], Mon May 3 16:38:28 2004 UTC (10 years, 5 months ago) by lukem
Branch: MAIN
Changes since 1.553: +7 -2 lines
Diff to previous 1.553 (colored)

move machdep.est.cpu_brand to machdep.cpu_brand

Revision 1.553 / (download) - annotate - [select for diffs], Fri Apr 30 02:05:43 2004 UTC (10 years, 5 months ago) by lukem
Branch: MAIN
Changes since 1.552: +4 -2 lines
Diff to previous 1.552 (colored)

Integrate support for Enhanced SpeedStep Technology (est) that
Michael Eriksson posted to port-i386 on 20031102, with various
modifications by me to work in the new sysctl(9) framework.

The code is enabled with 'options ENHANCED_SPEEDSTEP', and if
the CPU supports EST the following sysctl(8) nodes appear
(with the values that a Dell Inspiron 8600 + WUXGA with a
1.4GHz Pentium M CPU supports):
	machdep.est.cpu_brand = Intel(R) Pentium(R) M processor 1400MHz
	machdep.est.frequency.target = 1400
	machdep.est.frequency.current = 1400
	machdep.est.frequency.available = 1400 1200 1000 800 600

If EST support isn't available, the "machdep.est" sysctl sub-MIB
is not created.

Once we have a more general "CPU frequency" control API we can
migrate this code to using that.

Thanks to Michael Erikkson for providing this code!

Revision 1.552 / (download) - annotate - [select for diffs], Wed Mar 24 15:34:49 2004 UTC (10 years, 7 months ago) by atatat
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.551: +32 -17 lines
Diff to previous 1.551 (colored)

Tango on sysctl_createv() and flags.  The flags have all been renamed,
and sysctl_createv() now uses more arguments.

Revision 1.551 / (download) - annotate - [select for diffs], Sun Mar 21 15:37:02 2004 UTC (10 years, 7 months ago) by junyoung
Branch: MAIN
Changes since 1.550: +23 -58 lines
Diff to previous 1.550 (colored)

ANSIfy.

Revision 1.550 / (download) - annotate - [select for diffs], Fri Mar 5 11:34:17 2004 UTC (10 years, 7 months ago) by junyoung
Branch: MAIN
Changes since 1.549: +5 -5 lines
Diff to previous 1.549 (colored)

Drop trailing spaces.

Revision 1.549 / (download) - annotate - [select for diffs], Fri Feb 13 11:36:13 2004 UTC (10 years, 8 months ago) by wiz
Branch: MAIN
Changes since 1.548: +4 -4 lines
Diff to previous 1.548 (colored)

Uppercase CPU, plural is CPUs.

Revision 1.548 / (download) - annotate - [select for diffs], Wed Jan 28 10:48:55 2004 UTC (10 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.547: +5 -5 lines
Diff to previous 1.547 (colored)

rename i386 mdlwp flags from MDP_ to MDL_
to avoid confusion with mdproc flags which also have MDP_ prefixes.

Revision 1.547 / (download) - annotate - [select for diffs], Tue Dec 30 12:33:22 2003 UTC (10 years, 9 months ago) by pk
Branch: MAIN
Changes since 1.546: +5 -102 lines
Diff to previous 1.546 (colored)

Replace the traditional buffer memory management -- based on fixed per buffer
virtual memory reservation and a private pool of memory pages -- by a scheme
based on memory pools.

This allows better utilization of memory because buffers can now be allocated
with a granularity finer than the system's native page size (useful for
filesystems with e.g. 1k or 2k fragment sizes).  It also avoids fragmentation
of virtual to physical memory mappings (due to the former fixed virtual
address reservation) resulting in better utilization of MMU resources on some
platforms.  Finally, the scheme is more flexible by allowing run-time decisions
on the amount of memory to be used for buffers.

On the other hand, the effectiveness of the LRU queue for buffer recycling
may be somewhat reduced compared to the traditional method since, due to the
nature of the pool based memory allocation, the actual least recently used
buffer may release its memory to a pool different from the one needed by a
newly allocated buffer. However, this effect will kick in only if the
system is under memory pressure.

Revision 1.546 / (download) - annotate - [select for diffs], Tue Dec 30 03:57:19 2003 UTC (10 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.545: +8 -2 lines
Diff to previous 1.545 (colored)

(MULTIPROCESSOR version of) need_resched:
- nothing needs to be done if ci_want_resched is already set.
- if the cpu isn't running any lwp, send a no-op ipi to it
  so that it can resume immediately from halting in idle loop
  without having to wait until the next clock tick.
some advices from Stephan Uphoff.

Revision 1.545 / (download) - annotate - [select for diffs], Thu Dec 4 19:38:21 2003 UTC (10 years, 10 months ago) by atatat
Branch: MAIN
Changes since 1.544: +138 -79 lines
Diff to previous 1.544 (colored)

Dynamic sysctl.

Gone are the old kern_sysctl(), cpu_sysctl(), hw_sysctl(),
vfs_sysctl(), etc, routines, along with sysctl_int() et al.  Now all
nodes are registered with the tree, and nodes can be added (or
removed) easily, and I/O to and from the tree is handled generically.

Since the nodes are registered with the tree, the mapping from name to
number (and back again) can now be discovered, instead of having to be
hard coded.  Adding new nodes to the tree is likewise much simpler --
the new infrastructure handles almost all the work for simple types,
and just about anything else can be done with a small helper function.

All existing nodes are where they were before (numerically speaking),
so all existing consumers of sysctl information should notice no
difference.

PS - I'm sorry, but there's a distinct lack of documentation at the
moment.  I'm working on sysctl(3/8/9) right now, and I promise to
watch out for buses.

Revision 1.544 / (download) - annotate - [select for diffs], Thu Dec 4 13:05:16 2003 UTC (10 years, 10 months ago) by keihan
Branch: MAIN
Changes since 1.543: +3 -3 lines
Diff to previous 1.543 (colored)

netbsd.org -> NetBSD.org

All "netbsd.org" is now gone from src/sys/arch.

Revision 1.543 / (download) - annotate - [select for diffs], Tue Oct 28 22:52:53 2003 UTC (11 years ago) by mycroft
Branch: MAIN
Changes since 1.542: +6 -6 lines
Diff to previous 1.542 (colored)

Eliminate bogus initializer.

Revision 1.542 / (download) - annotate - [select for diffs], Mon Oct 27 14:11:46 2003 UTC (11 years ago) by junyoung
Branch: MAIN
Changes since 1.541: +17 -17 lines
Diff to previous 1.541 (colored)

Nuke __P().

Revision 1.541 / (download) - annotate - [select for diffs], Sat Oct 25 18:40:37 2003 UTC (11 years ago) by christos
Branch: MAIN
Changes since 1.540: +3 -3 lines
Diff to previous 1.540 (colored)

Fix uninitialized variable warnings

Revision 1.540 / (download) - annotate - [select for diffs], Wed Oct 8 00:28:41 2003 UTC (11 years ago) by thorpej
Branch: MAIN
Changes since 1.539: +3 -3 lines
Diff to previous 1.539 (colored)

* Shuffle some data structures so, and add a flags word to ksiginfo_t.
  Right now the only flag is used to indicate if a ksiginfo_t is a
  result of a trap.  Add a predicate macro to test for this flag.
* Add initialization macros for ksiginfo_t's.
* Add accssor macro for ksi_trap.  Expands to 0 if the ksiginfo_t was
  not the result of a trap.  This matches the sigcontext trapcode semantics.
* In kpsendsig(), use KSI_TRAP_P() to select the lwp that gets the signal.
  Inspired by Matthias Drochner's fix to kpsendsig(), but correctly handles
  the case of non-trap-generated signals that have a > 0 si_code.

This patch fixes a signal delivery problem with threaded programs noted by
Matthias Drochner on tech-kern.

As discussed on tech-kern.  Reviewed and OK's by Christos.

Revision 1.539 / (download) - annotate - [select for diffs], Thu Sep 25 22:01:31 2003 UTC (11 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.538: +4 -4 lines
Diff to previous 1.538 (colored)

constify sendsig/trapsignal

Revision 1.538 / (download) - annotate - [select for diffs], Wed Sep 10 21:38:40 2003 UTC (11 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.537: +11 -11 lines
Diff to previous 1.537 (colored)

sort the opt_ includes.

Revision 1.537 / (download) - annotate - [select for diffs], Wed Sep 10 19:48:49 2003 UTC (11 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.536: +4 -209 lines
Diff to previous 1.536 (colored)

move compat_16 stuff into a separate file.

Revision 1.536 / (download) - annotate - [select for diffs], Wed Sep 10 16:47:00 2003 UTC (11 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.535: +8 -6 lines
Diff to previous 1.535 (colored)

make obsolete trampoline code COMPAT_16. Unfortunately sigreturn14 is used
by IBCS2; grr.

Revision 1.535 / (download) - annotate - [select for diffs], Wed Sep 10 11:39:09 2003 UTC (11 years, 1 month ago) by drochner
Branch: MAIN
Changes since 1.534: +4 -4 lines
Diff to previous 1.534 (colored)

in cpu_setmcontext(), check where we go, not where we are coming from,
and line-terminate a diagnostic message which was caused by that bug

Revision 1.534 / (download) - annotate - [select for diffs], Sat Sep 6 22:08:14 2003 UTC (11 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.533: +144 -50 lines
Diff to previous 1.533 (colored)

SA_SIGINFO changes.

Revision 1.533 / (download) - annotate - [select for diffs], Sun Aug 24 17:52:30 2003 UTC (11 years, 2 months ago) by chs
Branch: MAIN
Changes since 1.532: +15 -6 lines
Diff to previous 1.532 (colored)

add support for non-executable mappings (where the hardware allows this)
and make the stack and heap non-executable by default.  the changes
fall into two basic catagories:

 - pmap and trap-handler changes.  these are all MD:
   = alpha: we already track per-page execute permission with the (software)
	PG_EXEC bit, so just have the trap handler pay attention to it.
   = i386: use a new GDT segment for %cs for processes that have no
	executable mappings above a certain threshold (currently the
	bottom of the stack).  track per-page execute permission with
	the last unused PTE bit.
   = powerpc/ibm4xx: just use the hardware exec bit.
   = powerpc/oea: we already track per-page exec bits, but the hardware only
	implements non-exec mappings at the segment level.  so track the
	number of executable mappings in each segment and turn on the no-exec
	segment bit iff the count is 0.  adjust the trap handler to deal.
   = sparc (sun4m): fix our use of the hardware protection bits.
	fix the trap handler to recognize text faults.
   = sparc64: split the existing unified TSB into data and instruction TSBs,
	and only load TTEs into the appropriate TSB(s) for the permissions.
	fix the trap handler to check for execute permission.
   = not yet implemented: amd64, hppa, sh5

 - changes in all the emulations that put a signal trampoline on the stack.
   instead, we now put the trampoline into a uvm_aobj and map that into
   the process separately.

originally from openbsd, adapted for netbsd by me.

Revision 1.532 / (download) - annotate - [select for diffs], Wed Aug 20 21:48:38 2003 UTC (11 years, 2 months ago) by fvdl
Branch: MAIN
Changes since 1.531: +3 -3 lines
Diff to previous 1.531 (colored)

Pass pointers to frames from assembly, do not use the 'frame on stack
as argument passed by value' trick, as gcc 3.3.x makes (valid) assumptions
about the stack that will not be true. Costs 2 instructions per trap/syscall
on i386, 4 per interrupt for MP. One instruction per trap/syscall on amd64,
2 per interrupt for MP. I expect gcc 3.3.1 to make up for this by better
optimization (it'd better..)

While here, make amd64 compile again by using subr_mbr_disk.c

Revision 1.531 / (download) - annotate - [select for diffs], Sun Aug 17 14:23:16 2003 UTC (11 years, 2 months ago) by kochi
Branch: MAIN
Changes since 1.530: +3 -3 lines
Diff to previous 1.530 (colored)

make shutdown error messages clearer (idea from Christoph Egger)

Revision 1.530 / (download) - annotate - [select for diffs], Sun Aug 17 14:15:43 2003 UTC (11 years, 2 months ago) by kochi
Branch: MAIN
Changes since 1.529: +7 -5 lines
Diff to previous 1.529 (colored)

Try shutdown with ACPI only when ACPI is enabled.
Patch from Masanori Kanaoka (with a little modification by me).

Revision 1.529 / (download) - annotate - [select for diffs], Mon Aug 11 14:09:18 2003 UTC (11 years, 2 months ago) by drochner
Branch: MAIN
Changes since 1.528: +10 -4 lines
Diff to previous 1.528 (colored)

Fix stack location for VM86 processes in the !sigaltstack case.
I doubt it makes much sense to use the VM's stack for this, but the
old code was doubtless wrong because it potentially overwrote random
user memory.
(It might be a good idea to use the process' pre-vm86()-call stack,
but atm the infrastructure for this is missing.)

Revision 1.528 / (download) - annotate - [select for diffs], Thu Aug 7 16:27:54 2003 UTC (11 years, 2 months ago) by agc
Branch: MAIN
Changes since 1.527: +3 -7 lines
Diff to previous 1.527 (colored)

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.

Revision 1.527 / (download) - annotate - [select for diffs], Mon Jul 28 10:28:30 2003 UTC (11 years, 3 months ago) by mrg
Branch: MAIN
Changes since 1.526: +3 -3 lines
Diff to previous 1.526 (colored)

add another cast to appease gcc3.3

Revision 1.526 / (download) - annotate - [select for diffs], Sun Jun 29 22:28:24 2003 UTC (11 years, 3 months ago) by fvdl
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.525: +5 -5 lines
Diff to previous 1.525 (colored)

Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.

Revision 1.525 / (download) - annotate - [select for diffs], Sat Jun 28 14:20:55 2003 UTC (11 years, 4 months ago) by darrenr
Branch: MAIN
Changes since 1.524: +7 -7 lines
Diff to previous 1.524 (colored)

Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V

Revision 1.524 / (download) - annotate - [select for diffs], Thu Jun 26 16:47:15 2003 UTC (11 years, 4 months ago) by drochner
Branch: MAIN
Changes since 1.523: +3 -2 lines
Diff to previous 1.523 (colored)

cpu_feature is not set (nor used) by locore since SMP, so move the
definition to C code

Revision 1.523 / (download) - annotate - [select for diffs], Mon Jun 23 11:01:19 2003 UTC (11 years, 4 months ago) by martin
Branch: MAIN
Changes since 1.522: +3 -2 lines
Diff to previous 1.522 (colored)

Make sure to include opt_foo.h if a defflag option FOO is used.

Revision 1.522 / (download) - annotate - [select for diffs], Sat Apr 26 11:05:14 2003 UTC (11 years, 6 months ago) by ragge
Branch: MAIN
Changes since 1.521: +11 -5 lines
Diff to previous 1.521 (colored)

Call ksyms_init() instead of ddb_init() in case of
	NKSYMS || defined(DDB) || defined(LKM)

Revision 1.521 / (download) - annotate - [select for diffs], Wed Apr 16 21:37:37 2003 UTC (11 years, 6 months ago) by dsl
Branch: MAIN
Changes since 1.520: +7 -0 lines
Diff to previous 1.520 (colored)

Partially reverse previous change.
Reset RTC only if ntp is running or adjtime system call has changed time.

Revision 1.520 / (download) - annotate - [select for diffs], Wed Apr 16 19:07:34 2003 UTC (11 years, 6 months ago) by dsl
Branch: MAIN
Changes since 1.519: +2 -7 lines
Diff to previous 1.519 (colored)

Don't set the RTC to kernel time during shutdown.
This stops the system RTC drifting if any hardclock ticks were missed (eg
if the system spent any time at the kdb prompt).
The RTC is set whenever the system clock is set, so setting at shutdown
is unnecessary.

Revision 1.519 / (download) - annotate - [select for diffs], Fri Apr 11 22:02:30 2003 UTC (11 years, 6 months ago) by nathanw
Branch: MAIN
Changes since 1.518: +9 -2 lines
Diff to previous 1.518 (colored)

Make cpu_getmcontext() run the PC through ras_lookup() so that kernel
getcontext() plus userlevel setcontext() (as used in libpthread) respects
the atomicity of RAS regions.

Revision 1.518 / (download) - annotate - [select for diffs], Tue Apr 1 20:54:23 2003 UTC (11 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.517: +2 -7 lines
Diff to previous 1.517 (colored)

Use PAGE_SIZE rather than NBPG.

Revision 1.517 / (download) - annotate - [select for diffs], Tue Mar 25 19:37:16 2003 UTC (11 years, 7 months ago) by jmmv
Branch: MAIN
Changes since 1.516: +27 -2 lines
Diff to previous 1.516 (colored)

Implement the beep on halt feature.  When enabled, it makes the kernel beep
the computer speaker when it's completely safe to power down the machine
(after the "The operating system has halted." message).  This is useful for
headless machines.

The feature is only enabled if the BEEP_ONHALT option is defined (disabled      by default).  It can be tuned through the BEEP_ONHALT_{COUNT,PERIOD,PITCH}      options.

Closes my own PR kern/18792.

Revision 1.516 / (download) - annotate - [select for diffs], Mon Mar 3 22:14:16 2003 UTC (11 years, 7 months ago) by fvdl
Branch: MAIN
Changes since 1.515: +12 -10 lines
Diff to previous 1.515 (colored)

The IDT only contains gate descriptors, so define it as such.

Revision 1.515 / (download) - annotate - [select for diffs], Sat Mar 1 16:37:53 2003 UTC (11 years, 7 months ago) by fvdl
Branch: MAIN
Changes since 1.514: +6 -1592 lines
Diff to previous 1.514 (colored)

Move the CPU identification out of machdep.c into a seperate file.

Revision 1.514 / (download) - annotate - [select for diffs], Wed Feb 26 21:28:22 2003 UTC (11 years, 8 months ago) by fvdl
Branch: MAIN
Changes since 1.513: +8 -8 lines
Diff to previous 1.513 (colored)

Adapt for move of files to arch/x86.

Revision 1.513 / (download) - annotate - [select for diffs], Wed Feb 19 00:18:34 2003 UTC (11 years, 8 months ago) by fvdl
Branch: MAIN
Changes since 1.512: +3 -3 lines
Diff to previous 1.512 (colored)

Undo constification of mtrr_funcs. I'll deal with it later.

Revision 1.512 / (download) - annotate - [select for diffs], Fri Feb 14 01:11:21 2003 UTC (11 years, 8 months ago) by perry
Branch: MAIN
Changes since 1.511: +8 -5 lines
Diff to previous 1.511 (colored)

Instead of spinning, __asm __volatile("hlt").

Revision 1.511 / (download) - annotate - [select for diffs], Thu Feb 13 21:34:03 2003 UTC (11 years, 8 months ago) by ross
Branch: MAIN
Changes since 1.510: +5 -3 lines
Diff to previous 1.510 (colored)

If no keyboard is attached, implement RB_HALT with a spin.  kern/10481

Revision 1.510 / (download) - annotate - [select for diffs], Sun Feb 9 13:03:38 2003 UTC (11 years, 8 months ago) by enami
Branch: MAIN
Changes since 1.509: +3 -3 lines
Diff to previous 1.509 (colored)

Fix the type of variable `mtrr_funcs' so that this file compiles again
after constify.

Revision 1.509 / (download) - annotate - [select for diffs], Wed Feb 5 12:18:03 2003 UTC (11 years, 8 months ago) by nakayama
Branch: MAIN
Changes since 1.508: +3 -3 lines
Diff to previous 1.508 (colored)

Share i386/tsc_microtime.c with alpha and sparc64 as kern_microtime.c.
(approved by martin)

Revision 1.508 / (download) - annotate - [select for diffs], Fri Jan 17 23:10:30 2003 UTC (11 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.507: +241 -28 lines
Diff to previous 1.507 (colored)

Merge the nathanw_sa branch.

Revision 1.507 / (download) - annotate - [select for diffs], Mon Dec 16 18:31:09 2002 UTC (11 years, 10 months ago) by jdolecek
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Changes since 1.506: +21 -2 lines
Diff to previous 1.506 (colored)

use the __HAVE_CPU_MAXPROC hook to limit kern.maxproc to number
  of available GDT slots
add code in init386() to force maxproc to be maximum cpu_maxproc()

this fixes port-i386/1635 by John Kohl

Revision 1.506 / (download) - annotate - [select for diffs], Sat Dec 7 15:36:20 2002 UTC (11 years, 10 months ago) by junyoung
Branch: MAIN
Changes since 1.505: +89 -15 lines
Diff to previous 1.505 (colored)

Identify many Intel processors which were misidentified previously.

Revision 1.505 / (download) - annotate - [select for diffs], Sat Dec 7 15:18:08 2002 UTC (11 years, 10 months ago) by junyoung
Branch: MAIN
Changes since 1.504: +4 -4 lines
Diff to previous 1.504 (colored)

Print processor signature (id) after clock frequency.

Revision 1.504 / (download) - annotate - [select for diffs], Fri Dec 6 17:53:52 2002 UTC (11 years, 10 months ago) by junyoung
Branch: MAIN
Changes since 1.503: +3 -8 lines
Diff to previous 1.503 (colored)

Get rid of #ifdef CPUDEBUG. CPU signature is always displayed.

Revision 1.503 / (download) - annotate - [select for diffs], Fri Dec 6 14:47:07 2002 UTC (11 years, 10 months ago) by junyoung
Branch: MAIN
Changes since 1.502: +16 -17 lines
Diff to previous 1.502 (colored)

Don't pollute struct cpu_info with throwaway variables.

Revision 1.502 / (download) - annotate - [select for diffs], Fri Dec 6 05:03:02 2002 UTC (11 years, 10 months ago) by junyoung
Branch: MAIN
Changes since 1.501: +7 -7 lines
Diff to previous 1.501 (colored)

Rename amd_cpuid_cpu_cacheinfo() to amd_cpu_cacheinfo().

Revision 1.501 / (download) - annotate - [select for diffs], Fri Dec 6 02:38:25 2002 UTC (11 years, 10 months ago) by junyoung
Branch: MAIN
Changes since 1.500: +57 -15 lines
Diff to previous 1.500 (colored)

Display the extended feature flags with non-Intel processors rather than
the standard flags. See also PR#19163.

Before:

cpu0: AMD Athlon XP 1800+ (686-class), 1532.11 MHz
cpu0: features 383f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR>
cpu0: features 383f9ff<PGE,MCA,CMOV,FGPAT,PSE36,MMX>
cpu0: features 383f9ff<FXSR,SSE>

After:

cpu0: AMD Athlon XP 1800+ (686-class), 1532.11 MHz
cpu0: features c3cbf9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR>
cpu0: features c3cbf9ff<PGE,MCA,CMOV,PAT,PSE36,MPC,MMXX,MMX>
cpu0: features c3cbf9ff<FXSR,SSE,3DNOW2,3DNOW>

While I'm here, amd_cpuid_cpu_cacheinfo() is an info function rather
than a probe function.

Revision 1.500 / (download) - annotate - [select for diffs], Thu Dec 5 16:19:08 2002 UTC (11 years, 10 months ago) by junyoung
Branch: MAIN
Changes since 1.499: +12 -8 lines
Diff to previous 1.499 (colored)

- Identify VIA C3 processors. Fix PR#19163.
- While here, make use of CPUID2STEPPING() macro.

Revision 1.499 / (download) - annotate - [select for diffs], Thu Dec 5 10:01:56 2002 UTC (11 years, 10 months ago) by jdolecek
Branch: MAIN
Changes since 1.498: +6 -4 lines
Diff to previous 1.498 (colored)

a bit of KNF - function type on separate line than function name, function
name on start of line

Revision 1.498 / (download) - annotate - [select for diffs], Fri Nov 22 15:23:41 2002 UTC (11 years, 11 months ago) by fvdl
Branch: MAIN
Changes since 1.497: +30 -31 lines
Diff to previous 1.497 (colored)

New interrupt code. The basic idea behind it is to hide the differences
in interrupt controllers in struct pic, and try to keep as much
common code as possible. At the lowest (asm) level, this is done
with CPP macros.

The main structure is now struct intrsource, describing an established
interrupt line, of any kind (soft/hard local apic/legacy apic/IO apic).
For quick masking, there may be a maximum of 32 sources per CPU.
Sources can be assigned to any CPU in the MP case, though currently they
all go to the boot CPU.

Revision 1.497 / (download) - annotate - [select for diffs], Thu Nov 14 12:52:28 2002 UTC (11 years, 11 months ago) by minoura
Branch: MAIN
Changes since 1.496: +56 -2 lines
Diff to previous 1.496 (colored)

Add support for National Semiconductor Geode(TM) familly of processors.
Thanks to Hiroshi Miura <miura AT da-cha DOT org> for testing.

Revision 1.496 / (download) - annotate - [select for diffs], Sat Nov 2 01:58:51 2002 UTC (11 years, 11 months ago) by perry
Branch: MAIN
Changes since 1.495: +3 -3 lines
Diff to previous 1.495 (colored)

asm -> __asm

Revision 1.495 / (download) - annotate - [select for diffs], Fri Oct 25 12:01:56 2002 UTC (12 years ago) by fvdl
Branch: MAIN
Changes since 1.494: +2 -29 lines
Diff to previous 1.494 (colored)

Fix MTRR code which had been broken since the MP merge (but silently
failed due to a missing include of opt_mtrr.h in cpu.c)

Revision 1.494 / (download) - annotate - [select for diffs], Thu Oct 24 07:43:21 2002 UTC (12 years ago) by fvdl
Branch: MAIN
Changes since 1.493: +4 -5 lines
Diff to previous 1.493 (colored)

Make this actually compile.

Revision 1.493 / (download) - annotate - [select for diffs], Wed Oct 23 21:41:34 2002 UTC (12 years ago) by mycroft
Branch: MAIN
Changes since 1.492: +16 -9 lines
Diff to previous 1.492 (colored)

Enable Transmeta CPUs without the LongRun registers to get through
transmeta_cpu_{info,setup}().

Revision 1.492 / (download) - annotate - [select for diffs], Sun Oct 20 10:35:41 2002 UTC (12 years ago) by kanaoka
Branch: MAIN
CVS Tags: kqueue-beforemerge, kqueue-aftermerge
Changes since 1.491: +41 -16 lines
Diff to previous 1.491 (colored)

Fix bugs in the BIOS memory probe.

- If the BIOS reports the same memory cluster multiple times,
  only allocate the extent once.

- If we fail to allocate an extent,
  don't add it to mem_clusters and don't increment mem_cluster_cnt.

- When loading the physical extents,
  make sure we don't try to add an extent with zero length (seg_start == tmp).

port-i386/13399: from maximum entropy <entropy@tappedin.com>.

Revision 1.491 / (download) - annotate - [select for diffs], Fri Oct 18 00:51:22 2002 UTC (12 years ago) by yamt
Branch: MAIN
Changes since 1.490: +3 -2 lines
Diff to previous 1.490 (colored)

add an entry for 0x83 to intel_cpuid_cache_info.

Revision 1.490 / (download) - annotate - [select for diffs], Tue Oct 8 20:17:09 2002 UTC (12 years ago) by fvdl
Branch: MAIN
Changes since 1.489: +2 -5 lines
Diff to previous 1.489 (colored)

Get rid of pcb_flags; nothing was using it except for initialising it
to 0.

Revision 1.489 / (download) - annotate - [select for diffs], Sat Oct 5 21:20:27 2002 UTC (12 years ago) by fvdl
Branch: MAIN
Changes since 1.488: +14 -11 lines
Diff to previous 1.488 (colored)

To be able to set up TSS gates, setgate needs another argument for the
selector.

Revision 1.488 / (download) - annotate - [select for diffs], Fri Oct 4 19:27:05 2002 UTC (12 years ago) by junyoung
Branch: MAIN
Changes since 1.487: +2 -9 lines
Diff to previous 1.487 (colored)

Don't init IDT twice.

Revision 1.487 / (download) - annotate - [select for diffs], Fri Oct 4 18:42:34 2002 UTC (12 years ago) by junyoung
Branch: MAIN
Changes since 1.486: +56 -5 lines
Diff to previous 1.486 (colored)

Correctly identify model 6, 7, and 8 of AMD Athlon and Duron processors.

Before:
cpu0: AMD Athlon Model 6 (Palomino) (686-class), 1532.11 MHz

After:
cpu0: AMD Athlon XP 1800+ (686-class), 1532.11 MHz

Revision 1.486 / (download) - annotate - [select for diffs], Fri Oct 4 08:44:08 2002 UTC (12 years ago) by simonb
Branch: MAIN
Changes since 1.485: +7 -4 lines
Diff to previous 1.485 (colored)

Only declare and set the "step" variable in identifycpu() ifdef CPUDEBUG.

Revision 1.485 / (download) - annotate - [select for diffs], Thu Oct 3 19:39:51 2002 UTC (12 years ago) by fvdl
Branch: MAIN
Changes since 1.484: +3 -3 lines
Diff to previous 1.484 (colored)

FIx off by one error for brand id array index.

Revision 1.484 / (download) - annotate - [select for diffs], Tue Oct 1 12:56:55 2002 UTC (12 years ago) by fvdl
Branch: MAIN
CVS Tags: kqueue-base
Changes since 1.483: +679 -545 lines
Diff to previous 1.483 (colored)

Merge Bill Sommerfeld's i386 MP branch. This code has some known
caveats, but works quite well in a lot of MP cases, and all
UP cases that I have tested. Parts of this will hopefully be
reworked in the not-too-distant future.

Revision 1.483 / (download) - annotate - [select for diffs], Fri Sep 27 15:36:09 2002 UTC (12 years, 1 month ago) by provos
Branch: MAIN
Changes since 1.482: +4 -4 lines
Diff to previous 1.482 (colored)

remove trailing \n in panic().  approved perry.

Revision 1.482 / (download) - annotate - [select for diffs], Wed Sep 25 22:21:09 2002 UTC (12 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.481: +2 -3 lines
Diff to previous 1.481 (colored)

Don't include <sys/map.h>.

Revision 1.481 / (download) - annotate - [select for diffs], Fri Sep 6 13:20:38 2002 UTC (12 years, 1 month ago) by gehenna
Branch: MAIN
Changes since 1.480: +18 -10 lines
Diff to previous 1.480 (colored)

Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.

Revision 1.480 / (download) - annotate - [select for diffs], Thu Sep 5 02:43:00 2002 UTC (12 years, 1 month ago) by erh
Branch: MAIN
Changes since 1.479: +4 -4 lines
Diff to previous 1.479 (colored)

Adjust the check for what segments should go on the low priority free list.
If a segment starts exactly at 16M don't try to split it because that causes
the code to try to call uvm_page_physload with a zero length segment.
(kern/17199)

Revision 1.479 / (download) - annotate - [select for diffs], Sun Aug 25 20:21:37 2002 UTC (12 years, 2 months ago) by thorpej
Branch: MAIN
CVS Tags: sommerfeld_i386mpnext, sommerfeld_i386mpbase_1, gehenna-devsw-base
Changes since 1.478: +4 -4 lines
Diff to previous 1.478 (colored)

Make nbuf, nswbuf, and bufpages unsigned.  Make all operations on these
variables unsigned, and update places where their values are printed.

Revision 1.478 / (download) - annotate - [select for diffs], Wed Jul 17 14:55:42 2002 UTC (12 years, 3 months ago) by kanaoka
Branch: MAIN
Changes since 1.477: +2 -4 lines
Diff to previous 1.477 (colored)

 - Enable to enter sleep state S5 with ACPI.

Revision 1.477 / (download) - annotate - [select for diffs], Thu Jul 4 23:32:04 2002 UTC (12 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.476: +24 -6 lines
Diff to previous 1.476 (colored)

Add kernel support for having userland provide the signal trampoline:

* struct sigacts gets a new sigact_sigdesc structure, which has the
  sigaction and the trampoline/version.  Version 0 means "legacy kernel
  provided trampoline".  Other versions are coordinated with machine-
  dependent code in libc.
* sigaction1() grows two more arguments -- the trampoline pointer and
  the trampoline version.
* A new __sigaction_sigtramp() system call is provided to register a
  trampoline along with a signal handler.
* The handler is no longer passed to sensig() functions.  Instead,
  sendsig() looks up the handler by peeking in the sigacts for the
  process getting the signal (since it has to look in there for the
  trampoline anyway).
* Native sendsig() functions now select the appropriate trampoline and
  its arguments based on the trampoline version in the sigacts.

Changes to libc to use the new facility will be checked in later.  Kernel
version not bumped; we will ride the 1.6C bump made recently.

Revision 1.476 / (download) - annotate - [select for diffs], Thu Jul 4 10:22:20 2002 UTC (12 years, 3 months ago) by fvdl
Branch: MAIN
Changes since 1.475: +3 -3 lines
Diff to previous 1.475 (colored)

Match parameter decl of init386 with reality.

Revision 1.475 / (download) - annotate - [select for diffs], Sun Jun 23 22:18:51 2002 UTC (12 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.474: +6 -5 lines
Diff to previous 1.474 (colored)

During native signal delivery (and iBCS2, since it uses the native
sigcode), arrange to have the signal handler invoked directly, using
the trampoline only for the return path, saving a call insn.  Play
some other stack trickery in the trampoline to turn 2 pushl's into
one movl.

Revision 1.474 / (download) - annotate - [select for diffs], Tue Jun 18 09:56:33 2002 UTC (12 years, 4 months ago) by tron
Branch: MAIN
Changes since 1.473: +3 -3 lines
Diff to previous 1.473 (colored)

Fix typo which caused a build failure for kernels with diagnostic checks.

Revision 1.473 / (download) - annotate - [select for diffs], Tue Jun 18 07:56:13 2002 UTC (12 years, 4 months ago) by tshiozak
Branch: MAIN
Changes since 1.472: +109 -14 lines
Diff to previous 1.472 (colored)

add MD support for ACPI sleep/wakeup.

Revision 1.472 / (download) - annotate - [select for diffs], Fri May 31 17:46:51 2002 UTC (12 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.471: +5 -4 lines
Diff to previous 1.471 (colored)

Add an __unused__ attribute to n_support and n_lower, since they are
unused if a kernel supports all CPU families.

Revision 1.471 / (download) - annotate - [select for diffs], Sun May 12 23:16:53 2002 UTC (12 years, 5 months ago) by matt
Branch: MAIN
CVS Tags: netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1
Branch point for: netbsd-1-6, gehenna-devsw
Changes since 1.470: +9 -3 lines
Diff to previous 1.470 (colored)

Eliminate commons.

Revision 1.470 / (download) - annotate - [select for diffs], Wed Mar 20 15:59:27 2002 UTC (12 years, 7 months ago) by joda
Branch: MAIN
CVS Tags: eeh-devprop-base, eeh-devprop
Changes since 1.469: +7 -2 lines
Diff to previous 1.469 (colored)

add HTT cpu flag, and further split message

Revision 1.469 / (download) - annotate - [select for diffs], Sun Mar 17 19:16:20 2002 UTC (12 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.468: +3 -3 lines
Diff to previous 1.468 (colored)

goodbye PS_STRINGS.

Revision 1.468 / (download) - annotate - [select for diffs], Wed Mar 6 13:10:20 2002 UTC (12 years, 7 months ago) by tsutsui
Branch: MAIN
CVS Tags: newlock-base, newlock
Changes since 1.467: +3 -3 lines
Diff to previous 1.467 (colored)

Change type of dumpmag to u_int32_t since it is actually
a 32bit unsigned magic number.
As per discussion on tech-kern, and fixes port-sparc64/11949.

Revision 1.467 / (download) - annotate - [select for diffs], Thu Jan 31 17:40:51 2002 UTC (12 years, 8 months ago) by christos
Branch: MAIN
CVS Tags: ifpoll-base, ifpoll
Changes since 1.466: +15 -11 lines
Diff to previous 1.466 (colored)

- fix hex constant in transmeta code to fit 32 bits.
- char assignment should be '\0'
- factor out some common strings

Revision 1.466 / (download) - annotate - [select for diffs], Thu Jan 24 03:20:28 2002 UTC (12 years, 9 months ago) by rafal
Branch: MAIN
Changes since 1.465: +6 -6 lines
Diff to previous 1.465 (colored)

One more change resulting from my GDT rearrangement... Since GMACHCALLS_SEL
is always defined now, don't use that to test if we should install the MACH
compat gate; test COMPAT_MACH instead.

Revision 1.465 / (download) - annotate - [select for diffs], Tue Jan 15 13:34:52 2002 UTC (12 years, 9 months ago) by drochner
Branch: MAIN
Changes since 1.464: +5 -3 lines
Diff to previous 1.464 (colored)

recognize Athlon model 6 (Palomino) and 7 (Morgan)

Revision 1.464 / (download) - annotate - [select for diffs], Thu Dec 27 15:28:34 2001 UTC (12 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.463: +37 -11 lines
Diff to previous 1.463 (colored)

use the new ci_info hook to print extra cpu information during probe.

Revision 1.463 / (download) - annotate - [select for diffs], Tue Nov 20 07:44:17 2001 UTC (12 years, 11 months ago) by enami
Branch: MAIN
Changes since 1.462: +8 -8 lines
Diff to previous 1.462 (colored)

Just test if DEBUG_MEMLOAD is defined or not instead of testing its value.

Revision 1.462 / (download) - annotate - [select for diffs], Tue Nov 20 07:42:33 2001 UTC (12 years, 11 months ago) by enami
Branch: MAIN
Changes since 1.461: +41 -38 lines
Diff to previous 1.461 (colored)

Cosmetic changes to previous commit.

Revision 1.461 / (download) - annotate - [select for diffs], Sat Nov 17 08:20:58 2001 UTC (12 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.460: +255 -3 lines
Diff to previous 1.460 (colored)

Add transmeta crusoe cpu support from toshi's fiva patches.

Revision 1.460 / (download) - annotate - [select for diffs], Thu Nov 15 07:03:30 2001 UTC (12 years, 11 months ago) by lukem
Branch: MAIN
Changes since 1.459: +4 -1 lines
Diff to previous 1.459 (colored)

add RCSID

Revision 1.459 / (download) - annotate - [select for diffs], Wed Oct 31 20:35:21 2001 UTC (12 years, 11 months ago) by jdolecek
Branch: MAIN
CVS Tags: thorpej-mips-cache-base
Changes since 1.458: +16 -14 lines
Diff to previous 1.458 (colored)

use right number of zeroes for Cyrix i386_cpuid_cpus[] entries
reformat the entries with all zeroes to be more easier to verify

Revision 1.458 / (download) - annotate - [select for diffs], Sun Oct 28 16:17:05 2001 UTC (13 years ago) by jdolecek
Branch: MAIN
Changes since 1.457: +3 -3 lines
Diff to previous 1.457 (colored)

Add "Pentium III (Tualatin)" entry to CPUVENDOR_INTEL/CPUCLASS_686.
Make sure the CPUCLASS_686 entry has really 17 (i.e. 16 + default)
name entries as it's supposed to, so that code won't crash when
run on Intel CPUCLASS_686 processor which doesn't have name entry
in the table.

Reported and fix provided by Naoto Morishima in kern/14380.

Revision 1.457 / (download) - annotate - [select for diffs], Wed Sep 19 01:26:19 2001 UTC (13 years, 1 month ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-devvp-base3, thorpej-devvp-base2
Branch point for: thorpej-mips-cache
Changes since 1.456: +16 -1 lines
Diff to previous 1.456 (colored)

Add code to frob the MTRR-like registers on the AMD K6-2
and AMD K6-III.

Revision 1.456 / (download) - annotate - [select for diffs], Mon Sep 10 21:19:14 2001 UTC (13 years, 1 month ago) by chris
Branch: MAIN
CVS Tags: pre-chs-ubcperf, post-chs-ubcperf
Changes since 1.455: +7 -7 lines
Diff to previous 1.455 (colored)

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) - annotate - [select for diffs], Mon Sep 10 10:12:16 2001 UTC (13 years, 1 month ago) by fvdl
Branch: MAIN
Changes since 1.454: +15 -1 lines
Diff to previous 1.454 (colored)

Initialize MTRRs on startup if they're enabled.

Revision 1.454 / (download) - annotate - [select for diffs], Sun Sep 9 02:10:44 2001 UTC (13 years, 1 month ago) by enami
Branch: MAIN
Changes since 1.453: +19 -15 lines
Diff to previous 1.453 (colored)

Don't print extra space when printing information about cpu of unknown vendor.
# and minor stylistic change while i'm here.

Revision 1.453 / (download) - annotate - [select for diffs], Sun Aug 12 08:35:31 2001 UTC (13 years, 2 months ago) by jdolecek
Branch: MAIN
CVS Tags: thorpej-devvp-base
Branch point for: thorpej-devvp
Changes since 1.452: +1 -40 lines
Diff to previous 1.452 (colored)

Move _insque()/_remque() to libkern. Once remaining uses would
be converted to <sys/queue.h> macros, _insque()/_remque() would be eliminated
altogether.

Revision 1.452 / (download) - annotate - [select for diffs], Fri Aug 3 01:24:40 2001 UTC (13 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.451: +4 -3 lines
Diff to previous 1.451 (colored)

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) - annotate - [select for diffs], Thu Aug 2 22:04:28 2001 UTC (13 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.450: +26 -5 lines
Diff to previous 1.450 (colored)

- 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) - annotate - [select for diffs], Thu Aug 2 21:04:43 2001 UTC (13 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.449: +25 -2 lines
Diff to previous 1.449 (colored)

Add support for saving/restoring SSE/SSE2 state using FXSAVE/FXRSTOR.

Reviewed by Frank.

Revision 1.449 / (download) - annotate - [select for diffs], Wed Aug 1 19:50:48 2001 UTC (13 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.448: +60 -1 lines
Diff to previous 1.448 (colored)

Add several more Intel cache info entries, and fetch the CFLUSH
line size if we have the CFLUSH insn.

Revision 1.448 / (download) - annotate - [select for diffs], Tue Jul 31 18:28:59 2001 UTC (13 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.447: +26 -1 lines
Diff to previous 1.447 (colored)

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.447 / (download) - annotate - [select for diffs], Sat Jul 14 02:02:46 2001 UTC (13 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.446: +10 -1 lines
Diff to previous 1.446 (colored)

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.446 / (download) - annotate - [select for diffs], Tue Jun 19 15:54:48 2001 UTC (13 years, 4 months ago) by sommerfeld
Branch: MAIN
Branch point for: kqueue
Changes since 1.445: +3 -2 lines
Diff to previous 1.445 (colored)

restore fs and gs from sigcontext in sigreturn (correct oversight in
previous commit).

Revision 1.445 / (download) - annotate - [select for diffs], Sun Jun 17 21:01:34 2001 UTC (13 years, 4 months ago) by sommerfeld
Branch: MAIN
Changes since 1.444: +7 -7 lines
Diff to previous 1.444 (colored)

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) - annotate - [select for diffs], Sat Jun 2 18:09:13 2001 UTC (13 years, 4 months ago) by chs
Branch: MAIN
Changes since 1.443: +4 -4 lines
Diff to previous 1.443 (colored)

replace vm_map{,_entry}_t with struct vm_map{,_entry} *.

Revision 1.443 / (download) - annotate - [select for diffs], Wed May 30 15:24:31 2001 UTC (13 years, 4 months ago) by lukem
Branch: MAIN
Changes since 1.442: +2 -1 lines
Diff to previous 1.442 (colored)

add missing   #include "opt_kgdb.h"

Revision 1.442 / (download) - annotate - [select for diffs], Fri May 25 04:39:33 2001 UTC (13 years, 5 months ago) by oki
Branch: MAIN
Changes since 1.441: +2 -1 lines
Diff to previous 1.441 (colored)

Fixed panic on the cpu made by unknown vendor,
such as Transmeta Crusoe.

Revision 1.441 / (download) - annotate - [select for diffs], Fri May 4 03:19:33 2001 UTC (13 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.440: +26 -2 lines
Diff to previous 1.440 (colored)

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) - annotate - [select for diffs], Thu May 3 16:55:32 2001 UTC (13 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.439: +51 -8 lines
Diff to previous 1.439 (colored)

- 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) - annotate - [select for diffs], Thu May 3 16:04:26 2001 UTC (13 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.438: +4 -4 lines
Diff to previous 1.438 (colored)

Oops, forgot to fill in function pointer in previous.

Revision 1.438 / (download) - annotate - [select for diffs], Thu May 3 00:35:37 2001 UTC (13 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.437: +336 -86 lines
Diff to previous 1.437 (colored)

Rearrange the cache info fetching code some more, and add support
for fetching cache info for AMD processors.

Revision 1.437 / (download) - annotate - [select for diffs], Wed May 2 21:07:01 2001 UTC (13 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.436: +196 -145 lines
Diff to previous 1.436 (colored)

- 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) - annotate - [select for diffs], Wed May 2 13:08:06 2001 UTC (13 years, 5 months ago) by jdolecek
Branch: MAIN
Changes since 1.435: +23 -25 lines
Diff to previous 1.435 (colored)

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.435 / (download) - annotate - [select for diffs], Tue Apr 24 04:30:58 2001 UTC (13 years, 6 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej_scsipi_beforemerge
Changes since 1.434: +7 -1 lines
Diff to previous 1.434 (colored)

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.434 / (download) - annotate - [select for diffs], Sun Apr 22 23:29:56 2001 UTC (13 years, 6 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_base
Changes since 1.433: +3 -2 lines
Diff to previous 1.433 (colored)

Use pmap_kenter_pa() rather than pmap_kenter_pgs().

Revision 1.433 / (download) - annotate - [select for diffs], Fri Apr 20 09:10:45 2001 UTC (13 years, 6 months ago) by kanaoka
Branch: MAIN
Changes since 1.432: +94 -86 lines
Diff to previous 1.432 (colored)

 - 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) - annotate - [select for diffs], Wed Apr 18 05:44:10 2001 UTC (13 years, 6 months ago) by kanaoka
Branch: MAIN
Changes since 1.431: +29 -0 lines
Diff to previous 1.431 (colored)

Add "Sanity check the entry" code to avoid Compatibilty Holes
(0xa0000 -- 0xfffff).

Revision 1.431 / (download) - annotate - [select for diffs], Sat Apr 14 06:49:31 2001 UTC (13 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.430: +4 -1 lines
Diff to previous 1.430 (colored)

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.430 / (download) - annotate - [select for diffs], Thu Mar 15 06:10:40 2001 UTC (13 years, 7 months ago) by chs
Branch: MAIN
Changes since 1.429: +2 -2 lines
Diff to previous 1.429 (colored)

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.429 / (download) - annotate - [select for diffs], Sun Feb 11 19:03:50 2001 UTC (13 years, 8 months ago) by chs
Branch: MAIN
Branch point for: nathanw_sa
Changes since 1.428: +6 -1 lines
Diff to previous 1.428 (colored)

fix REALBASEMEM/REALEXTMEM and defopt them while we're at it.  from jason.

Revision 1.428 / (download) - annotate - [select for diffs], Wed Jan 17 00:07:26 2001 UTC (13 years, 9 months ago) by fvdl
Branch: MAIN
Changes since 1.427: +4 -2 lines
Diff to previous 1.427 (colored)

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.427 / (download) - annotate - [select for diffs], Tue Jan 9 03:45:49 2001 UTC (13 years, 9 months ago) by enami
Branch: MAIN
Changes since 1.426: +5 -2 lines
Diff to previous 1.426 (colored)

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.426 / (download) - annotate - [select for diffs], Mon Jan 1 22:13:54 2001 UTC (13 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.425: +2 -2 lines
Diff to previous 1.425 (colored)

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.425 / (download) - annotate - [select for diffs], Fri Dec 22 22:58:53 2000 UTC (13 years, 10 months ago) by jdolecek
Branch: MAIN
Changes since 1.424: +10 -11 lines
Diff to previous 1.424 (colored)

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) - annotate - [select for diffs], Thu Dec 21 05:20:24 2000 UTC (13 years, 10 months ago) by enami
Branch: MAIN
Changes since 1.423: +11 -14 lines
Diff to previous 1.423 (colored)

Redo previous slight differently.

Revision 1.423 / (download) - annotate - [select for diffs], Thu Dec 21 05:11:00 2000 UTC (13 years, 10 months ago) by enami
Branch: MAIN
Changes since 1.422: +12 -7 lines
Diff to previous 1.422 (colored)

Print cpu features line only when corresponding part of bits are set.

Revision 1.422 / (download) - annotate - [select for diffs], Mon Dec 11 17:36:03 2000 UTC (13 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.421: +5 -1 lines
Diff to previous 1.421 (colored)

Handle the VM86-mode syscall problem by changing the syscall vector when
jumping in or out of VM86 mode.

Revision 1.421 / (download) - annotate - [select for diffs], Wed Nov 29 09:56:02 2000 UTC (13 years, 10 months ago) by aymeric
Branch: MAIN
Changes since 1.420: +8 -2 lines
Diff to previous 1.420 (colored)

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) - annotate - [select for diffs], Wed Nov 22 16:41:56 2000 UTC (13 years, 11 months ago) by jdolecek
Branch: MAIN
Changes since 1.419: +7 -4 lines
Diff to previous 1.419 (colored)

Intel recommends to print cpu serial number as six dash-separated nibbles
(XXXX-XXXX-XXXX-XXXX-XXXX-XXXX), make it so

Revision 1.419 / (download) - annotate - [select for diffs], Sun Nov 19 23:38:22 2000 UTC (13 years, 11 months ago) by jdolecek
Branch: MAIN
Changes since 1.418: +4 -4 lines
Diff to previous 1.418 (colored)

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) - annotate - [select for diffs], Thu Nov 16 17:00:17 2000 UTC (13 years, 11 months ago) by jdolecek
Branch: MAIN
Changes since 1.417: +4 -4 lines
Diff to previous 1.417 (colored)

make i386_nocpuid_cpus[] and i386_cpuid_cpus[] const - this pushes
another ~1.4KB to text section

Revision 1.417 / (download) - annotate - [select for diffs], Thu Nov 16 10:19:02 2000 UTC (13 years, 11 months ago) by jdolecek
Branch: MAIN
Changes since 1.416: +24 -3 lines
Diff to previous 1.416 (colored)

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) - annotate - [select for diffs], Thu Nov 16 09:06:17 2000 UTC (13 years, 11 months ago) by jdolecek
Branch: MAIN
Changes since 1.415: +12 -8 lines
Diff to previous 1.415 (colored)

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) - annotate - [select for diffs], Wed Nov 15 21:13:58 2000 UTC (13 years, 11 months ago) by jdolecek
Branch: MAIN
Changes since 1.414: +2 -2 lines
Diff to previous 1.414 (colored)

introduce SIGACTION_PS() macro - this is similar to SIGACTION(), but works
for (struct sigacts *) instead of (struct proc *)

Revision 1.414 / (download) - annotate - [select for diffs], Tue Nov 14 22:55:05 2000 UTC (13 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.413: +20 -20 lines
Diff to previous 1.413 (colored)

NBPG -> PAGE_SIZE

Revision 1.413 / (download) - annotate - [select for diffs], Mon Nov 13 16:40:40 2000 UTC (13 years, 11 months ago) by jdolecek
Branch: MAIN
Changes since 1.412: +3 -3 lines
Diff to previous 1.412 (colored)

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) - annotate - [select for diffs], Fri Nov 10 04:00:25 2000 UTC (13 years, 11 months ago) by enami
Branch: MAIN
Changes since 1.411: +11 -10 lines
Diff to previous 1.411 (colored)

Cometic change; keep the code to process a second hunk closer to the first one.

Revision 1.411 / (download) - annotate - [select for diffs], Fri Nov 10 03:58:15 2000 UTC (13 years, 11 months ago) by enami
Branch: MAIN
Changes since 1.410: +11 -10 lines
Diff to previous 1.410 (colored)

Don't start next iteration while processing a first memory hunk since
there may be a second hunk.

Revision 1.410 / (download) - annotate - [select for diffs], Thu Nov 9 19:22:30 2000 UTC (13 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.409: +2 -2 lines
Diff to previous 1.409 (colored)

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) - annotate - [select for diffs], Thu Nov 9 17:34:51 2000 UTC (13 years, 11 months ago) by kim
Branch: MAIN
Changes since 1.408: +8 -8 lines
Diff to previous 1.408 (colored)

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) - annotate - [select for diffs], Sun Nov 5 22:10:01 2000 UTC (13 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.407: +25 -2 lines
Diff to previous 1.407 (colored)

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) - annotate - [select for diffs], Sat Oct 28 02:29:35 2000 UTC (14 years ago) by enami
Branch: MAIN
Changes since 1.406: +2 -2 lines
Diff to previous 1.406 (colored)

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) - annotate - [select for diffs], Fri Sep 29 14:16:23 2000 UTC (14 years ago) by fvdl
Branch: MAIN
Changes since 1.405: +40 -1 lines
Diff to previous 1.405 (colored)

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) - annotate - [select for diffs], Fri Sep 29 13:15:48 2000 UTC (14 years ago) by fvdl
Branch: MAIN
Changes since 1.404: +2 -2 lines
Diff to previous 1.404 (colored)

oops, typo in previous (|| -> &&)

Revision 1.404 / (download) - annotate - [select for diffs], Fri Sep 29 13:05:12 2000 UTC (14 years ago) by fvdl
Branch: MAIN
Changes since 1.403: +2 -4 lines
Diff to previous 1.403 (colored)

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) - annotate - [select for diffs], Fri Sep 29 09:07:53 2000 UTC (14 years ago) by explorer
Branch: MAIN
Changes since 1.402: +3 -5 lines
Diff to previous 1.402 (colored)

clean up printing when serial number not supported or disabled.

Revision 1.402 / (download) - annotate - [select for diffs], Fri Sep 29 09:03:18 2000 UTC (14 years ago) by explorer
Branch: MAIN
Changes since 1.401: +34 -1 lines
Diff to previous 1.401 (colored)

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) - annotate - [select for diffs], Thu Sep 28 18:31:36 2000 UTC (14 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.400: +328 -56 lines
Diff to previous 1.400 (colored)

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.400 / (download) - annotate - [select for diffs], Fri Sep 15 03:44:28 2000 UTC (14 years, 1 month ago) by enami
Branch: MAIN
Changes since 1.399: +7 -1 lines
Diff to previous 1.399 (colored)

Add few more L2 cache info entry.

Revision 1.399 / (download) - annotate - [select for diffs], Fri Sep 15 03:41:18 2000 UTC (14 years, 1 month ago) by enami
Branch: MAIN
Changes since 1.398: +9 -6 lines
Diff to previous 1.398 (colored)

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) - annotate - [select for diffs], Wed Sep 13 15:00:18 2000 UTC (14 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.397: +2 -2 lines
Diff to previous 1.397 (colored)

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) - annotate - [select for diffs], Wed Sep 13 08:04:15 2000 UTC (14 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.396: +113 -1 lines
Diff to previous 1.396 (colored)

Fetch cache info via `cpuid' insn, parse it, remember it,
and report it at boot time.

Revision 1.396 / (download) - annotate - [select for diffs], Wed Sep 6 22:23:46 2000 UTC (14 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.395: +3 -3 lines
Diff to previous 1.395 (colored)

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) - annotate - [select for diffs], Wed Sep 6 22:19:46 2000 UTC (14 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.394: +12 -3 lines
Diff to previous 1.394 (colored)

Print CPU features, and use kvtopte() for kernel addresses.

Revision 1.394 / (download) - annotate - [select for diffs], Wed Aug 16 04:44:35 2000 UTC (14 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.393: +4 -4 lines
Diff to previous 1.393 (colored)

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) - annotate - [select for diffs], Tue Aug 15 18:21:44 2000 UTC (14 years, 2 months ago) by fvdl
Branch: MAIN
Changes since 1.392: +12 -5 lines
Diff to previous 1.392 (colored)

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.392 / (download) - annotate - [select for diffs], Sat Jul 8 17:09:02 2000 UTC (14 years, 3 months ago) by sommerfeld
Branch: MAIN
Changes since 1.391: +2 -2 lines
Diff to previous 1.391 (colored)

printf format paranoia

Revision 1.391 / (download) - annotate - [select for diffs], Thu Jun 29 08:44:51 2000 UTC (14 years, 4 months ago) by mrg
Branch: MAIN
Changes since 1.390: +1 -3 lines
Diff to previous 1.390 (colored)

remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>

Revision 1.390 / (download) - annotate - [select for diffs], Mon Jun 26 14:20:44 2000 UTC (14 years, 4 months ago) by mrg
Branch: MAIN
Changes since 1.389: +3 -2 lines
Diff to previous 1.389 (colored)

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.389 / (download) - annotate - [select for diffs], Mon Jun 5 23:44:58 2000 UTC (14 years, 4 months ago) by jhawk
Branch: MAIN
CVS Tags: sommerfeld_i386mp_houseclean, netbsd-1-5-base, netbsd-1-5-ALPHA2
Branch point for: netbsd-1-5
Changes since 1.388: +1 -2 lines
Diff to previous 1.388 (colored)

Do not clear msgbufenabled in dumpsys().  Dump messages will now go to
the message buffer. This can be invaluable in debugging if the dump
fails (assuming a persistant message buffer)

Revision 1.388 / (download) - annotate - [select for diffs], Sat Jun 3 17:33:25 2000 UTC (14 years, 4 months ago) by fvdl
Branch: MAIN
Changes since 1.387: +55 -327 lines
Diff to previous 1.387 (colored)

Revert previous change until the problem it has has been analyzed.

Revision 1.387 / (download) - annotate - [select for diffs], Fri Jun 2 18:33:17 2000 UTC (14 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.386: +328 -56 lines
Diff to previous 1.386 (colored)

Rearrange the code that loads pages into the VM system somewhat, and
use the ACPI memory map if provided by the boot program.

Revision 1.386 / (download) - annotate - [select for diffs], Fri May 26 21:19:45 2000 UTC (14 years, 5 months ago) by thorpej
Branch: MAIN
CVS Tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Changes since 1.385: +4 -1 lines
Diff to previous 1.385 (colored)

First sweep at scheduler state cleanup.  Collect MI scheduler
state into global and per-CPU scheduler state:

	- Global state: sched_qs (run queues), sched_whichqs (bitmap
	  of non-empty run queues), sched_slpque (sleep queues).
	  NOTE: These may collectively move into a struct schedstate
	  at some point in the future.

	- Per-CPU state, struct schedstate_percpu: spc_runtime
	  (time process on this CPU started running), spc_flags
	  (replaces struct proc's p_schedflags), and
	  spc_curpriority (usrpri of processes on this CPU).

	- Every platform must now supply a struct cpu_info and
	  a curcpu() macro.  Simplify existing cpu_info declarations
	  where appropriate.

	- All references to per-CPU scheduler state now made through
	  curcpu().  NOTE: this will likely be adjusted in the future
	  after further changes to struct proc are made.

Tested on i386 and Alpha.  Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.

Revision 1.385 / (download) - annotate - [select for diffs], Fri May 19 04:34:39 2000 UTC (14 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.384: +2 -2 lines
Diff to previous 1.384 (colored)

NULL != 0

Revision 1.384 / (download) - annotate - [select for diffs], Thu May 11 16:38:11 2000 UTC (14 years, 5 months ago) by jdolecek
Branch: MAIN
Changes since 1.383: +13 -1 lines
Diff to previous 1.383 (colored)

Add i386-specific part of MicroChannel Architecture bus support, as
found in some older IBM PS/2 machines.

This code is based upon work by Scott D. Telford, with some minor bits
in arch/i386/mca/mca_machdep.c taken from FreeBSD.

XXX this is still very experimental and development version; use at your
XXX own risk

Revision 1.383 / (download) - annotate - [select for diffs], Wed May 3 20:17:37 2000 UTC (14 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.382: +3 -3 lines
Diff to previous 1.382 (colored)

Fix printf() format.

Revision 1.382 / (download) - annotate - [select for diffs], Wed May 3 20:02:08 2000 UTC (14 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.381: +3 -3 lines
Diff to previous 1.381 (colored)

ctob() -> ptoa(), to fix sign-extension issues when using >2GB.  A more
comprehensive change will be necessary for >4GB, but that's a bigger issue.

Revision 1.381 / (download) - annotate - [select for diffs], Fri Apr 21 18:37:20 2000 UTC (14 years, 6 months ago) by thorpej
Branch: MAIN
CVS Tags: sommerfeld_i386mpbase_20000422
Changes since 1.380: +13 -12 lines
Diff to previous 1.380 (colored)

- Declare biosbasemem and biosextmem in <machine/cpu.h>, don't extern
  them everywhere they're used.
- Avoid integer overflow when converting bios{base,ext}mem (in units of
  kilobytes) to bytes.

Revision 1.380 / (download) - annotate - [select for diffs], Wed Apr 5 10:09:50 2000 UTC (14 years, 6 months ago) by jdolecek
Branch: MAIN
Changes since 1.379: +2 -2 lines
Diff to previous 1.379 (colored)

winchip_cpu_setup(): restructure code to avoid warning when I586_CPU is not defined

Revision 1.379 / (download) - annotate - [select for diffs], Wed Apr 5 07:46:33 2000 UTC (14 years, 6 months ago) by jdolecek
Branch: MAIN
Changes since 1.378: +21 -4 lines
Diff to previous 1.378 (colored)

Disable TSC on WinChip C6, add WinChip 2 & WinChip 3 entries.

From Kamo Hiroyasu <wd@ics.nara-wu.ac.jp> OpenBSD kern/991
via Takahiro Kambe <taca@sky.yamashina.kyoto.jp>.

Revision 1.378 / (download) - annotate - [select for diffs], Tue Mar 28 23:57:27 2000 UTC (14 years, 7 months ago) by simonb
Branch: MAIN
Changes since 1.377: +1 -2 lines
Diff to previous 1.377 (colored)

Centralise the declarations of cpu_model, machine, machine_arch,
osrelease, and ostype and remove "extern char foo[];" (for hostname
and domainname too).

Also delete redunctant decl of boottime in kern_info_43.c.

Revision 1.377 / (download) - annotate - [select for diffs], Wed Mar 22 20:58:27 2000 UTC (14 years, 7 months ago) by ws
Branch: MAIN
Changes since 1.376: +11 -1 lines
Diff to previous 1.376 (colored)

Make IPKDB working again.
Add support for i386 debugging and pci-based ne2000 boards.

Revision 1.376 / (download) - annotate - [select for diffs], Fri Feb 4 14:21:33 2000 UTC (14 years, 8 months ago) by minoura
Branch: MAIN
CVS Tags: chs-ubc2-newbase
Branch point for: sommerfeld_i386mp_1
Changes since 1.375: +7 -4 lines
Diff to previous 1.375 (colored)

Add Cyrix MediaGX(m) identification.
Thanks to INOUE Yoshinari <pf5y-inue@asahi-net.or.jp>.

Revision 1.375 / (download) - annotate - [select for diffs], Wed Jan 26 18:49:26 2000 UTC (14 years, 9 months ago) by drochner
Branch: MAIN
Changes since 1.374: +7 -899 lines
Diff to previous 1.374 (colored)

next step in getting machdep.c maintainable - put bus_space related
stuff into a separate file
being here, add new Pentium-III processor ID (models with on-die cache)

Revision 1.374 / (download) - annotate - [select for diffs], Wed Jan 19 23:06:06 2000 UTC (14 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.373: +1 -2 lines
Diff to previous 1.373 (colored)

G/c unused variable.

Revision 1.373 / (download) - annotate - [select for diffs], Wed Jan 19 20:05:35 2000 UTC (14 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.372: +1 -9 lines
Diff to previous 1.372 (colored)

Move callout initialization to a single location; no need to duplicate
that code all over the place.

Revision 1.372 / (download) - annotate - [select for diffs], Tue Dec 21 12:34:11 1999 UTC (14 years, 10 months ago) by drochner
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221
Changes since 1.371: +2 -193 lines
Diff to previous 1.371 (colored)

machdep.c is becoming an unmaintainable mess
put console initialisation into a separate file

Revision 1.371 / (download) - annotate - [select for diffs], Mon Dec 13 16:30:15 1999 UTC (14 years, 10 months ago) by drochner
Branch: MAIN
Changes since 1.370: +10 -2 lines
Diff to previous 1.370 (colored)

add EGA console support

Revision 1.370 / (download) - annotate - [select for diffs], Sat Dec 4 21:20:29 1999 UTC (14 years, 10 months ago) by ragge
Branch: MAIN
Changes since 1.369: +4 -4 lines
Diff to previous 1.369 (colored)

CL* discarding.

Revision 1.369 / (download) - annotate - [select for diffs], Fri Dec 3 22:48:23 1999 UTC (14 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.368: +3 -3 lines
Diff to previous 1.368 (colored)

Split the PC-like keyboard controller driver into chip back-end and
bus front-end.

Revision 1.368 / (download) - annotate - [select for diffs], Tue Nov 30 15:22:52 1999 UTC (14 years, 10 months ago) by drochner
Branch: MAIN
Changes since 1.367: +2 -2 lines
Diff to previous 1.367 (colored)

activate "coma bug" workaround for 6x86MX too.
Closes PR port-i386/7538 by darkstar@pgh.net.

Revision 1.367 / (download) - annotate - [select for diffs], Sat Nov 13 00:30:33 1999 UTC (14 years, 11 months ago) by thorpej
Branch: MAIN
CVS Tags: fvdl-softdep-base
Changes since 1.366: +6 -6 lines
Diff to previous 1.366 (colored)

Update for pmap_enter() API change.  No functional difference.

Revision 1.366 / (download) - annotate - [select for diffs], Wed Oct 6 20:04:26 1999 UTC (15 years ago) by fvdl
Branch: MAIN
CVS Tags: comdex-fall-1999-base, comdex-fall-1999
Branch point for: thorpej_scsipi, fvdl-softdep
Changes since 1.365: +5 -1 lines
Diff to previous 1.365 (colored)

Add machdep.fpu_present sysctl.

Revision 1.365 / (download) - annotate - [select for diffs], Fri Sep 17 19:59:43 1999 UTC (15 years, 1 month ago) by thorpej
Branch: MAIN
Branch point for: wrstuden-devbsize
Changes since 1.364: +1 -2 lines
Diff to previous 1.364 (colored)

Centralize the declaration and clearing of `cold'.

Revision 1.364 / (download) - annotate - [select for diffs], Sun Sep 12 01:17:06 1999 UTC (15 years, 1 month ago) by chs
Branch: MAIN
Changes since 1.363: +1 -3 lines
Diff to previous 1.363 (colored)

eliminate the PMAP_NEW option by making it required for all ports.
ports which previously had no support for PMAP_NEW now implement
the pmap_k* interfaces as wrappers around the non-k versions.

Revision 1.363 / (download) - annotate - [select for diffs], Tue Aug 10 12:16:13 1999 UTC (15 years, 2 months ago) by fvdl
Branch: MAIN
Changes since 1.362: +2 -2 lines
Diff to previous 1.362 (colored)

Correct comment about family 6 not being available from AMD, since that's
no longer true.

Revision 1.362 / (download) - annotate - [select for diffs], Tue Aug 10 12:00:50 1999 UTC (15 years, 2 months ago) by fvdl
Branch: MAIN
Changes since 1.361: +3 -3 lines
Diff to previous 1.361 (colored)

Recognize K7^WAthlon

Revision 1.361 / (download) - annotate - [select for diffs], Sat Jul 17 00:42:20 1999 UTC (15 years, 3 months ago) by tron
Branch: MAIN
CVS Tags: chs-ubc2-base
Changes since 1.360: +9 -6 lines
Diff to previous 1.360 (colored)

Add a few more CPU models as suggested by Scott Telford in PR i386/7048.

Revision 1.360 / (download) - annotate - [select for diffs], Thu Jul 8 18:05:28 1999 UTC (15 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.359: +4 -3 lines
Diff to previous 1.359 (colored)

Change the pmap_extract() interface to:
	boolean_t pmap_extract(pmap_t, vaddr_t, paddr_t *);
This makes it possible for the pmap to map physical address 0.

Revision 1.359 / (download) - annotate - [select for diffs], Thu Jun 17 00:12:11 1999 UTC (15 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.358: +3 -37 lines
Diff to previous 1.358 (colored)

PMAP_NEW is no longer optional on the i386; the old pmap's page table
allocation strategy no longer works at all.  Move pmap.new.* to pmap.*.

To read the revision history of PMAP_NEW up until this merge, use cvs
rlog of the old pmap.new.* files.

Revision 1.358 / (download) - annotate - [select for diffs], Wed May 26 19:16:31 1999 UTC (15 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.357: +4 -4 lines
Diff to previous 1.357 (colored)

Change the vm_map's "entries_pageable" member to a r/o flags member, which
has PAGEABLE and INTRSAFE flags.  PAGEABLE now really means "pageable",
not "allocate vm_map_entry's from non-static pool", so update all map
creations to reflect that.  INTRSAFE maps are maps that are used in
interrupt context (e.g. kmem_map, mb_map), and thus use the static
map entry pool (XXX as does kernel_map, for now).  This will eventually
change now these maps are locked, as well.

Revision 1.357 / (download) - annotate - [select for diffs], Tue May 25 23:30:27 1999 UTC (15 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.356: +5 -1 lines
Diff to previous 1.356 (colored)

When mapping bus space, we can use pmap_kenter_pa(), since the pages
are never managed.

Revision 1.356 / (download) - annotate - [select for diffs], Tue May 25 23:19:00 1999 UTC (15 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.355: +3 -3 lines
Diff to previous 1.355 (colored)

msgbuf doesn't need VM_PROT_EXEC, biostramp does.

Revision 1.355 / (download) - annotate - [select for diffs], Tue May 25 23:14:05 1999 UTC (15 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.354: +3 -6 lines
Diff to previous 1.354 (colored)

bus_dmamem_map() maps DMA safe memory, which is usually one or more
managed pages, into KVA space.  Since the pages are managed, we should
use pmap_enter(), not pmap_kenter_pa().

Also, when entering the mappings, enter with an access_type of
VM_PROT_READ | VM_PROT_WRITE.  We do this for a couple of reasons:

	(1) On systems that have H/W mod/ref attributes, the hardware
	    may not be able to track mod/ref done by a bus master.

	(2) On systems that have to do mod/ref emulation, this prevents
	    a mod/ref page fault from potentially happening while in an
	    interrupt context, which can be problematic.

This latter change is fairly important if we ever want to be able to
transfer DMA-safe memory pages to anonymous memory objects; we will need
to know that the pages are modified, or else data could be lost!

Note that while the pages are unowned (i.e. "just DMA-safe memory pages"),
they won't consume any swap resources, as the mappings are wired, and
the pages aren't on the active or inactive queues.

Revision 1.354 / (download) - annotate - [select for diffs], Thu May 20 08:21:44 1999 UTC (15 years, 5 months ago) by lukem
Branch: MAIN
Changes since 1.353: +15 -129 lines
Diff to previous 1.353 (colored)

* convert to using MI allocsys(). most ports were using an MD allocsys(),
  although a couple still used the old pre-4.4-lite (?) mechanism.
* use format_bytes() to format the various printf()s that print out memory sizes

Revision 1.353 / (download) - annotate - [select for diffs], Wed May 12 19:28:29 1999 UTC (15 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.352: +2 -3 lines
Diff to previous 1.352 (colored)

Move the user-set LDT out of the PCB and into the pmap.  Applications
which set the LDT and share VM space (e.g. new versions of WINE) expect
the LDT to be logically coupled to the address space.  Use the new pmap_fork()
interface to copy non-shared user-set LDTs when the address space is forked.

Revision 1.352 / (download) - annotate - [select for diffs], Mon Apr 26 22:46:45 1999 UTC (15 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.351: +2 -2 lines
Diff to previous 1.351 (colored)

Garbage-collect the VM_MBUF_SIZE constant.  Instead, use the size
(nmbclusters * mclbytes), so that the right amount of KVA space is
allocated if those variables are patched.

Revision 1.351 / (download) - annotate - [select for diffs], Sun Apr 25 02:56:27 1999 UTC (15 years, 6 months ago) by simonb
Branch: MAIN
Changes since 1.350: +2 -4 lines
Diff to previous 1.350 (colored)

g/c REAL_CLISTS.

Revision 1.350 / (download) - annotate - [select for diffs], Sun Apr 11 04:04:07 1999 UTC (15 years, 6 months ago) by chs
Branch: MAIN
Changes since 1.349: +2 -2 lines
Diff to previous 1.349 (colored)

add a `flags' argument to uvm_pagealloc_strat().
define a flag UVM_PGA_USERESERVE to allow non-kernel object
allocations to use pages from the reserve.
use the new flag for allocations in pmap modules.

Revision 1.349 / (download) - annotate - [select for diffs], Thu Apr 1 00:37:50 1999 UTC (15 years, 6 months ago) by thorpej
Branch: MAIN
CVS Tags: netbsd-1-4-base
Branch point for: netbsd-1-4
Changes since 1.348: +12 -8 lines
Diff to previous 1.348 (colored)

Do proc0's TSS and LDT initialization at the end of configure() (i.e.
once the FPU has been attached).

Revision 1.348 / (download) - annotate - [select for diffs], Thu Apr 1 00:17:47 1999 UTC (15 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.347: +2 -5 lines
Diff to previous 1.347 (colored)

Don't call configure() from cpu_startup().

Revision 1.347 / (download) - annotate - [select for diffs], Tue Mar 30 08:21:54 1999 UTC (15 years, 7 months ago) by bouyer
Branch: MAIN
Changes since 1.346: +2 -1 lines
Diff to previous 1.346 (colored)

Needs to include opt_bufcache.h.

Revision 1.346 / (download) - annotate - [select for diffs], Fri Mar 26 23:41:29 1999 UTC (15 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.345: +16 -11 lines
Diff to previous 1.345 (colored)

Changes for modified pmap_enter() API:
* Map the message buffer with access_type = VM_PROT_READ|VM_PROT_WRITE `just
  because'.
* Map the file system buffers with access_type = VM_PROT_READ|VM_PROT_WRITE to
  avoid possible problems with pagemove().
* Do not use VM_PROT_EXEC with either of the above.
* Map pages for /dev/mem with access_type = prot.  Also, DO NOT use
  pmap_kenter() for this, as we DO NOT want to lose modification information.
* Map pages in dumpsys() with VM_PROT_READ.
* Map pages in m68k mappedcopyin()/mappedcopyout() and writeback() with
  access_type = prot.
* For now, bus_dma*(), pmap_map(), vmapbuf(), and similar functions still use
  access_type = 0.  This should probably be revisited.

Revision 1.345 / (download) - annotate - [select for diffs], Wed Mar 24 05:51:00 1999 UTC (15 years, 7 months ago) by mrg
Branch: MAIN
Changes since 1.344: +2 -87 lines
Diff to previous 1.344 (colored)

completely remove Mach VM support.  all that is left is the all the
header files as UVM still uses (most of) these.

Revision 1.344 / (download) - annotate - [select for diffs], Fri Mar 19 04:58:46 1999 UTC (15 years, 7 months ago) by cgd
Branch: MAIN
Changes since 1.343: +1 -2 lines
Diff to previous 1.343 (colored)

if you pull in isavar.h, you don't need isa_machdep.h.

Revision 1.343 / (download) - annotate - [select for diffs], Fri Mar 12 01:01:41 1999 UTC (15 years, 7 months ago) by fvdl
Branch: MAIN
Changes since 1.342: +8 -15 lines
Diff to previous 1.342 (colored)

Clean up the BIOS disk matching code a bit (better naming, one structure
and sysctl to export to userland). Also, only use total number of sectors
given in the extended parameters if the physical chs geometry is
marked invalid. Hopefully fixes a problem where BIOSs would not correctly
fill in this field.

Revision 1.342 / (download) - annotate - [select for diffs], Wed Mar 10 01:28:24 1999 UTC (15 years, 7 months ago) by fvdl
Branch: MAIN
Changes since 1.341: +10 -2 lines
Diff to previous 1.341 (colored)

Create a list of native disks too, and make it retrievable. It contains
all matching BIOS disks per entry, so that we have complete match info.
Enable the matching code.

Revision 1.341 / (download) - annotate - [select for diffs], Tue Mar 9 16:05:34 1999 UTC (15 years, 7 months ago) by fvdl
Branch: MAIN
Changes since 1.340: +2 -2 lines
Diff to previous 1.340 (colored)

While at it, add K6-III recognition too.

Revision 1.340 / (download) - annotate - [select for diffs], Tue Mar 9 15:48:15 1999 UTC (15 years, 7 months ago) by fvdl
Branch: MAIN
Changes since 1.339: +5 -4 lines
Diff to previous 1.339 (colored)

Recognize Pentium III

Revision 1.339 / (download) - annotate - [select for diffs], Mon Mar 8 00:12:28 1999 UTC (15 years, 7 months ago) by fvdl
Branch: MAIN
Changes since 1.338: +7 -1 lines
Diff to previous 1.338 (colored)

Match BIOS <-> NetBSD devices after autoconf. Match by a checksum
and a partition table compare. Define a sysctl to get the info
out.

Revision 1.338 / (download) - annotate - [select for diffs], Sat Feb 27 06:39:35 1999 UTC (15 years, 8 months ago) by scottr
Branch: MAIN
Changes since 1.337: +2 -1 lines
Diff to previous 1.337 (colored)

defopt BUFCACHE and BUFPAGES.

Revision 1.337 / (download) - annotate - [select for diffs], Sat Feb 6 18:46:21 1999 UTC (15 years, 8 months ago) by drochner
Branch: MAIN
Changes since 1.336: +12 -12 lines
Diff to previous 1.336 (colored)

sort the dependencies between terminal devices a bit and add consistency
checks to catch conflicting devices at compile time

Revision 1.336 / (download) - annotate - [select for diffs], Thu Jan 28 20:06:31 1999 UTC (15 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.335: +11 -2 lines
Diff to previous 1.335 (colored)

Use btinfo_symtab to find the symbol table if it is available.

Revision 1.335 / (download) - annotate - [select for diffs], Sat Jan 16 20:30:34 1999 UTC (15 years, 9 months ago) by chuck
Branch: MAIN
Changes since 1.334: +1 -52 lines
Diff to previous 1.334 (colored)

remove non MNN code

Revision 1.334 / (download) - annotate - [select for diffs], Sat Jan 9 22:10:17 1999 UTC (15 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.333: +3 -3 lines
Diff to previous 1.333 (colored)

Garbage-collect `mbutl'.

Revision 1.333 / (download) - annotate - [select for diffs], Sun Dec 13 19:31:27 1998 UTC (15 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.332: +9 -1 lines
Diff to previous 1.332 (colored)

Add an entry point for the solaris 2.6 fast trap vectors, used by the
high resolution timer calls.

Revision 1.332 / (download) - annotate - [select for diffs], Sun Nov 1 09:51:09 1998 UTC (15 years, 11 months ago) by lukem
Branch: MAIN
CVS Tags: kenh-if-detach-base, kenh-if-detach, chs-ubc-base, chs-ubc
Changes since 1.331: +34 -10 lines
Diff to previous 1.331 (colored)

implement BUFCACHE, which sets the size of the buffer cache to BUFCACHE %
of physmem. if not set (or == 0), falls back to old sizing method.

Revision 1.331 / (download) - annotate - [select for diffs], Mon Oct 19 22:14:54 1998 UTC (16 years ago) by tron
Branch: MAIN
Changes since 1.330: +2 -1 lines
Diff to previous 1.330 (colored)

Defopt SYSVMSG, SYSVSEM and SYSVSHM.

Revision 1.330 / (download) - annotate - [select for diffs], Sat Oct 17 00:07:11 1998 UTC (16 years ago) by jtk
Branch: MAIN
Changes since 1.329: +2 -2 lines
Diff to previous 1.329 (colored)

dumpsize == 0 also indicates failure to figure out where to dump
(e.g. dump partition too small), so complain in that case when trying to
dump

Revision 1.329 / (download) - annotate - [select for diffs], Thu Oct 15 15:26:01 1998 UTC (16 years ago) by bad
Branch: MAIN
Changes since 1.328: +36 -1 lines
Diff to previous 1.328 (colored)

Add the IDT WinChip C6 to the cpu type table.

Revision 1.328 / (download) - annotate - [select for diffs], Thu Oct 15 11:41:28 1998 UTC (16 years ago) by bouyer
Branch: MAIN
Changes since 1.327: +9 -9 lines
Diff to previous 1.327 (colored)

Make CPURESET_DELAY a patcheable variable, as sugested by Chris G. Demetriou.

Revision 1.327 / (download) - annotate - [select for diffs], Tue Oct 13 11:43:51 1998 UTC (16 years ago) by bouyer
Branch: MAIN
Changes since 1.326: +10 -1 lines
Diff to previous 1.326 (colored)

Add a CPURESET_DELAY options which specifies the delay (in milliseconds)
between the "rebooting" message and the hardware reset. If set to 0, the call
to delay() is disabled. Default is 2s.

Revision 1.326 / (download) - annotate - [select for diffs], Tue Oct 6 21:42:08 1998 UTC (16 years ago) by thorpej
Branch: MAIN
Changes since 1.325: +31 -26 lines
Diff to previous 1.325 (colored)

Move the code that does the deferred (post-autoconfiguration) buffer
cache allocation to its own function, and call it at the end of configure().

Revision 1.325 / (download) - annotate - [select for diffs], Sat Oct 3 21:38:49 1998 UTC (16 years ago) by thorpej
Branch: MAIN
Changes since 1.324: +4 -2 lines
Diff to previous 1.324 (colored)

Initialize the DMA map's bounce threshold to the tag's at map creation time,
and use the map's threshold when loading the map.

Revision 1.324 / (download) - annotate - [select for diffs], Sat Oct 3 18:08:39 1998 UTC (16 years ago) by christos
Branch: MAIN
Changes since 1.323: +2 -2 lines
Diff to previous 1.323 (colored)

call gate for solaris-2.6 syscalls [from frank]

Revision 1.323 / (download) - annotate - [select for diffs], Mon Sep 21 22:58:56 1998 UTC (16 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.322: +3 -14 lines
Diff to previous 1.322 (colored)

Make bus_dmamap_load_uio() work, from Kevin Lahey <kml@nas.nasa.gov>.

Revision 1.322 / (download) - annotate - [select for diffs], Sun Sep 13 01:45:04 1998 UTC (16 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.321: +11 -5 lines
Diff to previous 1.321 (colored)

Fix thinko in last thinko fix.  We always have to store an old style
signal mask since a 1.3 binary may attempt to invoke sigreturn(2) directly
for an alternate exit from the signal handler.  If we don't do this, it will
get a garbage signal mask if it tries to do that.

Revision 1.321 / (download) - annotate - [select for diffs], Sat Sep 12 10:48:28 1998 UTC (16 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.320: +1 -4 lines
Diff to previous 1.320 (colored)

Fix thinko in previous.

Revision 1.320 / (download) - annotate - [select for diffs], Sat Sep 12 00:47:12 1998 UTC (16 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.319: +11 -4 lines
Diff to previous 1.319 (colored)

Version sys_sigreturn, to avoid breaking programs that use it explicitly.

Revision 1.319 / (download) - annotate - [select for diffs], Fri Sep 11 12:50:06 1998 UTC (16 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.318: +38 -35 lines
Diff to previous 1.318 (colored)

Substantial signal handling changes:
* Increase the size of sigset_t to accomodate 128 signals -- adding new
  versions of sys_setprocmask(), sys_sigaction(), sys_sigpending() and
  sys_sigsuspend() to handle the changed arguments.
* Abstract the guts of sys_sigaltstack(), sys_setprocmask(), sys_sigaction(),
  sys_sigpending() and sys_sigsuspend() into separate functions, and call them
  from all the emulations rather than hard-coding everything.  (Avoids uses
  the stackgap crap for these system calls.)
* Add a new flag (p_checksig) to indicate that a process may have signals
  pending and userret() needs to do the full (slow) check.
* Eliminate SAS_ALTSTACK; it's exactly the inverse of SS_DISABLE.
* Correct emulation bugs with restoring SS_ONSTACK.
* Make the signal mask in the sigcontext always use the emulated mask format.
* Store signals internally in sigaction structures, rather than maintaining a
  bunch of little sigsets for each SA_* bit.
* Keep track of where we put the signal trampoline, rather than figuring it out
  in *_sendsig().
* Issue a warning when a non-emulated sigaction bit is observed.
* Add missing emulated signals, and a native SIGPWR (currently not used).
* Implement the `not reset when caught' semantics for relevant signals.

Note: Only code touched by the i386 port has been modified.  Other ports and
emulations need to be updated.

Revision 1.318 / (download) - annotate - [select for diffs], Tue Aug 18 07:53:47 1998 UTC (16 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.317: +3 -2 lines
Diff to previous 1.317 (colored)

Add some braces to make egcs happy (ambiguous else warning).

Revision 1.317 / (download) - annotate - [select for diffs], Mon Aug 17 22:33:09 1998 UTC (16 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.316: +12 -13 lines
Diff to previous 1.316 (colored)

Internal bus_dma cleanup.

Revision 1.316 / (download) - annotate - [select for diffs], Sat Aug 15 05:16:42 1998 UTC (16 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.315: +3 -3 lines
Diff to previous 1.315 (colored)

Minor edit.

Revision 1.315 / (download) - annotate - [select for diffs], Sat Aug 15 05:10:23 1998 UTC (16 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.314: +2 -5 lines
Diff to previous 1.314 (colored)

Assign my copyrights to TNF.

Revision 1.314 / (download) - annotate - [select for diffs], Thu Aug 13 21:36:03 1998 UTC (16 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.313: +56 -52 lines
Diff to previous 1.313 (colored)

vm_offset_t -> {vaddr_t,paddr_t}, vm_size_t -> vsize_t

Revision 1.313 / (download) - annotate - [select for diffs], Wed Aug 5 02:45:08 1998 UTC (16 years, 2 months ago) by perry
Branch: MAIN
Changes since 1.312: +7 -7 lines
Diff to previous 1.312 (colored)

bzero->memset, bcopy->memcpy, bcmp->memcmp

Revision 1.312 / (download) - annotate - [select for diffs], Fri Jul 17 21:10:00 1998 UTC (16 years, 3 months ago) by thorpej
Branch: MAIN
CVS Tags: eeh-paddr_t-base, eeh-paddr_t
Changes since 1.311: +57 -2 lines
Diff to previous 1.311 (colored)

Implement bus_dmamap_load_uio().

Revision 1.311 / (download) - annotate - [select for diffs], Wed Jul 8 04:36:39 1998 UTC (16 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.310: +8 -2 lines
Diff to previous 1.310 (colored)

Attempt to pull buffer cache pages out of the "first16" free list, in
an effort to avoid bouncing file system buffers (it's not clear how much
of a win this is, and it'll be pointless w/ a unified buffer cache, but
what the heck).

Revision 1.310 / (download) - annotate - [select for diffs], Sun Jul 5 08:49:34 1998 UTC (16 years, 3 months ago) by jonathan
Branch: MAIN
Changes since 1.309: +2 -1 lines
Diff to previous 1.309 (colored)

* defopt COMPAT_{09,10,11,12,13} and COMPAT_NOMID.
TODO: revisit interaction between native compat and emul compat usage.

Revision 1.309 / (download) - annotate - [select for diffs], Sat Jul 4 22:18:25 1998 UTC (16 years, 3 months ago) by jonathan
Branch: MAIN
Changes since 1.308: +2 -1 lines
Diff to previous 1.308 (colored)

defopt DDB.

Revision 1.308 / (download) - annotate - [select for diffs], Tue Jun 9 01:57:43 1998 UTC (16 years, 4 months ago) by tv
Branch: MAIN
Changes since 1.307: +7 -2 lines
Diff to previous 1.307 (colored)

Change ddb_init() for a.out to provision for kernels which are not booted by
the current 'bootblock' method, like the Shark, which preloads and preformats
the symbol table right in the boot code.

Revision 1.307 / (download) - annotate - [select for diffs], Sat Jun 6 21:27:31 1998 UTC (16 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.306: +9 -2 lines
Diff to previous 1.306 (colored)

If we have APM, only power down if RB_POWERDOWN was specified (fall into
RB_HALT case if it fails).

Revision 1.306 / (download) - annotate - [select for diffs], Wed Jun 3 06:35:04 1998 UTC (16 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.305: +14 -5 lines
Diff to previous 1.305 (colored)

When loading a DMA map, if the page's physical address exceeds the bounce
threshold, return an error to the caller (the caller will attempt to
bounce the transfer).

Revision 1.305 / (download) - annotate - [select for diffs], Wed Jun 3 04:15:06 1998 UTC (16 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.304: +10 -8 lines
Diff to previous 1.304 (colored)

Sync the bus_dmamap_load back-end functions between alpha and i386.  (only
slight, unnecessary differences)

Revision 1.304 / (download) - annotate - [select for diffs], Fri May 29 16:48:09 1998 UTC (16 years, 5 months ago) by bouyer
Branch: MAIN
Changes since 1.303: +16 -4 lines
Diff to previous 1.303 (colored)

Add handling of DMA boundary barrier in _bus_dmamap_load_buffer(). This
affects all bus_dmamap_load* functions of bus_dma(9).
While I'm there fix a bug where the dm_segs array could be overflowded by one.

Revision 1.303 / (download) - annotate - [select for diffs], Thu May 28 16:56:26 1998 UTC (16 years, 5 months ago) by drochner
Branch: MAIN
Changes since 1.302: +15 -3 lines
Diff to previous 1.302 (colored)

pull in new PC display headers
support "pcdisplay" console device

Revision 1.302 / (download) - annotate - [select for diffs], Thu May 21 23:34:40 1998 UTC (16 years, 5 months ago) by fvdl
Branch: MAIN
Changes since 1.301: +3 -3 lines
Diff to previous 1.301 (colored)

Add the newer PII (model 5) and newer AMD K6 (model 6,7) plus the
AMD K6-3D (model 8) to the cpu type table.

Revision 1.301 / (download) - annotate - [select for diffs], Fri May 8 16:55:16 1998 UTC (16 years, 5 months ago) by kleink
Branch: MAIN
Changes since 1.300: +2 -2 lines
Diff to previous 1.300 (colored)

Fix some arithmetics lossage on typeless pointers.

Revision 1.300 / (download) - annotate - [select for diffs], Sun May 3 10:19:08 1998 UTC (16 years, 5 months ago) by drochner
Branch: MAIN
Changes since 1.299: +3 -1 lines
Diff to previous 1.299 (colored)

Set console to polling mode before calling cngetc().

Revision 1.299 / (download) - annotate - [select for diffs], Mon Mar 30 06:04:29 1998 UTC (16 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.298: +5 -3 lines
Diff to previous 1.298 (colored)

Make the previous slightly less nasty.

Revision 1.298 / (download) - annotate - [select for diffs], Mon Mar 30 06:02:14 1998 UTC (16 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.297: +14 -14 lines
Diff to previous 1.297 (colored)

Add explicit int types for egcs, and nuke register.

Revision 1.297 / (download) - annotate - [select for diffs], Wed Mar 25 16:30:43 1998 UTC (16 years, 7 months ago) by chuck
Branch: MAIN
Changes since 1.296: +2 -1 lines
Diff to previous 1.296 (colored)

if installing page 2 as a PT page for first 4M (for BIOSCALL),
make sure we zero it first so that the PT is not filled
with random garbage

Revision 1.296 / (download) - annotate - [select for diffs], Sun Mar 22 16:04:31 1998 UTC (16 years, 7 months ago) by drochner
Branch: MAIN
Changes since 1.295: +60 -6 lines
Diff to previous 1.295 (colored)

Allow to use the new VGA and keyboard controller drivers as console:
-allow to bus_space_map() for the memory hole in early startup
-add calls to the new XXX_cnattach() functions to consinit()
-add a "pckbc_machdep_cnattach()" dispatch function to allow the
 combination of old console driver - new keyboard controller driver

Revision 1.295 / (download) - annotate - [select for diffs], Fri Mar 6 14:53:06 1998 UTC (16 years, 7 months ago) by drochner
Branch: MAIN
Changes since 1.294: +7 -2 lines
Diff to previous 1.294 (colored)

Move allocation and mapping of the page table page for "bioscall" from
locore to here.

Revision 1.294 / (download) - annotate - [select for diffs], Thu Mar 5 04:20:44 1998 UTC (16 years, 7 months ago) by scottb
Branch: MAIN
Changes since 1.293: +1 -16 lines
Diff to previous 1.293 (colored)

Add ibcs2_sendsig function.
Add ibcs2_sigcode function to locore because we need to call our own
	version of sigreturn.
Add support for emul_ibcs2_xout (XENIX) structure because we need to emulate
	some syscalls differently.

Revision 1.293 / (download) - annotate - [select for diffs], Thu Feb 19 04:18:32 1998 UTC (16 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.292: +2 -2 lines
Diff to previous 1.292 (colored)

Disable the message buffer during crash dumps by clearing msgbufenabled,
not msgbufmapped.

Revision 1.292 / (download) - annotate - [select for diffs], Wed Feb 18 03:04:40 1998 UTC (16 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.291: +1 -2 lines
Diff to previous 1.291 (colored)

Fixup an inconsistency in the declaration of PTDpaddr, pointed out by
Chris Demetriou.

Revision 1.291 / (download) - annotate - [select for diffs], Wed Feb 18 01:09:25 1998 UTC (16 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.290: +155 -54 lines
Diff to previous 1.290 (colored)

Switch the i386 port to the new kernel crash dump format.

Revision 1.290 / (download) - annotate - [select for diffs], Wed Feb 11 03:03:52 1998 UTC (16 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.289: +8 -26 lines
Diff to previous 1.289 (colored)

Use kernel_map in bus_dmamem_{map,free}().

Revision 1.289 / (download) - annotate - [select for diffs], Wed Feb 11 01:46:56 1998 UTC (16 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.288: +3 -3 lines
Diff to previous 1.288 (colored)

Use M_DMAMAP where appropriate.

Revision 1.288 / (download) - annotate - [select for diffs], Tue Feb 10 14:11:05 1998 UTC (16 years, 8 months ago) by mrg
Branch: MAIN
Changes since 1.287: +3 -1 lines
Diff to previous 1.287 (colored)

- add defopt's for UVM, UVMHIST and PMAP_NEW.
- remove unnecessary UVMHIST_DECL's.

Revision 1.287 / (download) - annotate - [select for diffs], Sun Feb 8 06:15:53 1998 UTC (16 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.286: +4 -4 lines
Diff to previous 1.286 (colored)

Allow callers of uvm_km_suballoc() to specify where the base of the
submap _must_ begin, by adding a "fixed" boolean argument.

Revision 1.286 / (download) - annotate - [select for diffs], Fri Feb 6 19:51:54 1998 UTC (16 years, 8 months ago) by cgd
Branch: MAIN
Changes since 1.285: +4 -3 lines
Diff to previous 1.285 (colored)

re-indent the EX_FAST change (try to keep a given argument on one line,
so that it's more apparent what the code is going).

Revision 1.285 / (download) - annotate - [select for diffs], Fri Feb 6 10:06:51 1998 UTC (16 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.284: +3 -3 lines
Diff to previous 1.284 (colored)

When allocating bus space in bus_space_alloc(), use EX_FAST to find
the first fit in the map.  The previous behavior violated the principle
of least surprise (especially annoying when you're debugging space allocation
problems).  Suggested by Chris Demetriou.

Revision 1.284 / (download) - annotate - [select for diffs], Fri Feb 6 07:21:55 1998 UTC (16 years, 8 months ago) by mrg
Branch: MAIN
Changes since 1.283: +160 -21 lines
Diff to previous 1.283 (colored)

add the i386 MD portions for UVM.

Revision 1.283 / (download) - annotate - [select for diffs], Fri Feb 6 05:35:16 1998 UTC (16 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.282: +15 -14 lines
Diff to previous 1.282 (colored)

On the 486 and higher, actually make the bus mem space mapping noncacheable
if mapped with BUS_SPACE_CACHEABLE unset.

Revision 1.282 / (download) - annotate - [select for diffs], Wed Feb 4 05:12:54 1998 UTC (16 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.281: +4 -2 lines
Diff to previous 1.281 (colored)

Add offset and length parameters to bus_dmamap_sync(), used for specifiying
partial syncs of a DMA mapping.

Revision 1.281 / (download) - annotate - [select for diffs], Wed Feb 4 01:57:34 1998 UTC (16 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.280: +3 -3 lines
Diff to previous 1.280 (colored)

Change the last argument of bus_dmamap_sync() from bus_dmasync_op_t to int,
and allow more than one synchronization operation to be specified in
a single call.  Dissallow mixing of PRE and POST operations.

Revision 1.280 / (download) - annotate - [select for diffs], Wed Feb 4 00:34:19 1998 UTC (16 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.279: +13 -5 lines
Diff to previous 1.279 (colored)

Add dm_mapsize to bus_dmamap_t and rename BUS_DMAMEM_NOSYNC to
BUS_DMA_COHERENT.

Revision 1.279 / (download) - annotate - [select for diffs], Tue Feb 3 19:16:04 1998 UTC (16 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.278: +8 -6 lines
Diff to previous 1.278 (colored)

Back out a change that wasn't supposed to be in here.

Revision 1.278 / (download) - annotate - [select for diffs], Wed Jan 28 17:08:05 1998 UTC (16 years, 9 months ago) by bouyer
Branch: MAIN
Changes since 1.277: +4 -4 lines
Diff to previous 1.277 (colored)

The name of cyrix's CPU family 6 model 0 is 6x86MX. Also set this name
for the default name.

Revision 1.277 / (download) - annotate - [select for diffs], Tue Jan 27 03:31:54 1998 UTC (16 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.276: +121 -66 lines
Diff to previous 1.276 (colored)

Implement bus_dmamap_load_mbuf().

Revision 1.276 / (download) - annotate - [select for diffs], Sat Jan 24 13:19:50 1998 UTC (16 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.275: +2 -1 lines
Diff to previous 1.275 (colored)

Store the initial NPX control word appropriate for the emulation in the saved
FPU state, and use it when initializing the FPU on demand.

Revision 1.275 / (download) - annotate - [select for diffs], Fri Jan 23 00:44:06 1998 UTC (16 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.274: +103 -123 lines
Diff to previous 1.274 (colored)

Some rearrangement of the startup code:
* Move some of the memory bootstrapping and the DDB startup earlier.
* Always put the IDT and the initial GDT and LDT in a separate page.
* Various minor changes.

Revision 1.274 / (download) - annotate - [select for diffs], Thu Jan 22 00:39:26 1998 UTC (16 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.273: +2 -1 lines
Diff to previous 1.273 (colored)

Generate dependencies on the USER_LDT option.

Revision 1.273 / (download) - annotate - [select for diffs], Sun Jan 18 14:48:55 1998 UTC (16 years, 9 months ago) by drochner
Branch: MAIN
Changes since 1.272: +3 -3 lines
Diff to previous 1.272 (colored)

adapt to changed <dev/ic/i8042reg.h>

Revision 1.272 / (download) - annotate - [select for diffs], Thu Jan 15 22:25:57 1998 UTC (16 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.271: +2 -1 lines
Diff to previous 1.271 (colored)

Generate dependencies on the VM86 option.

Revision 1.271 / (download) - annotate - [select for diffs], Thu Jan 15 19:47:39 1998 UTC (16 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.270: +3 -1 lines
Diff to previous 1.270 (colored)

Generate dependencies on the CPU type options (I386_CPU, I486_CPU, ...)

Revision 1.270 / (download) - annotate - [select for diffs], Tue Jan 13 12:52:16 1998 UTC (16 years, 9 months ago) by mrg
Branch: MAIN
Changes since 1.269: +8 -2 lines
Diff to previous 1.269 (colored)

this is the i386 MD portion of the MACHINE_NEW_NONCONTIG code, as
written by chuck cranor.  thanks to mycroft for helping me find the
one little line of code i accidentally deleted while merging it.

this is not enabled by default.  `options MACHINE_NEW_NONCONTIG'
will use this code.  eventually, this should go into <machine/vmparam.h>
insteaed of MACHINE_NONCONTIG.

Revision 1.269 / (download) - annotate - [select for diffs], Mon Jan 12 18:59:08 1998 UTC (16 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.268: +6 -8 lines
Diff to previous 1.268 (colored)

Update for changes to config.

Revision 1.268 / (download) - annotate - [select for diffs], Mon Dec 8 05:07:29 1997 UTC (16 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.267: +42 -23 lines
Diff to previous 1.267 (colored)

Work-around the situation where the buffer cache is larger than
16M, thus eating up all candidate bounce pages, which are not allocated
until autoconfiguration runs, by deferring allocation of the buffer
cache pages until after autoconfiguration has run.

XXX This is safe because the i386 port doesn't read any disklabels
XXX during autoconfiguration.

Revision 1.267 / (download) - annotate - [select for diffs], Thu Nov 27 11:53:45 1997 UTC (16 years, 11 months ago) by bouyer
Branch: MAIN
Changes since 1.266: +71 -14 lines
Diff to previous 1.266 (colored)

Add a cpu_setup() function to "struct cpu_nocpuid_nameclass" and
"struct cpu_cpuid_family", so that we can have a cpu_setup function per
known cpu type. For now use it only for cyrix 6x86 to enable suspend-on-halt
and implement cyrix's workaround to the "coma bug".

Revision 1.266 / (download) - annotate - [select for diffs], Wed Nov 19 11:11:26 1997 UTC (16 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.265: +10 -5 lines
Diff to previous 1.265 (colored)

Do the Pentium bug fix differently.  Put the IDT in a read-only page and check
for a write fault on the illegal instruction descriptor.  Don't ask why this
works unless you have a strong stomach.

Revision 1.265 / (download) - annotate - [select for diffs], Fri Nov 14 12:30:12 1997 UTC (16 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.264: +2 -2 lines
Diff to previous 1.264 (colored)

Make INTO actually work right.

Revision 1.264 / (download) - annotate - [select for diffs], Thu Nov 13 03:25:31 1997 UTC (16 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.263: +25 -4 lines
Diff to previous 1.263 (colored)

Implement the BSDI kluge for the Pentium `hang'; leave the first 7 IDT
descriptors in an unmapped page, and patch up the trap information inside
the page fault handler if the faulting VA is inside the IDT.

Revision 1.263 / (download) - annotate - [select for diffs], Thu Nov 13 03:16:47 1997 UTC (16 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.262: +38 -30 lines
Diff to previous 1.262 (colored)

Some general cleanup:
* Call gdt_init() earlier on.
* Don't bother to check for TSS and LDT descriptors in verr_gdt().
* Nuke the sti special case for trace and breakpoint traps.
* Move some variable declarations into more appropriate locations.

Revision 1.262 / (download) - annotate - [select for diffs], Fri Oct 17 18:06:06 1997 UTC (17 years ago) by bouyer
Branch: MAIN
CVS Tags: netbsd-1-3-base
Branch point for: netbsd-1-3
Changes since 1.261: +2 -1 lines
Diff to previous 1.261 (colored)

Add detection of cyrix/ibm 6x86 cpu: these CPU pass the 486 test, but
fail the cyrix486 one. Add a test which succeed for all cyrix CPUs (from
FreeBSD).

Revision 1.261 / (download) - annotate - [select for diffs], Thu Oct 16 02:58:31 1997 UTC (17 years ago) by mycroft
Branch: MAIN
Changes since 1.260: +1 -2 lines
Diff to previous 1.260 (colored)

Include sysctl.h *once*, after vm.h.

Revision 1.260 / (download) - annotate - [select for diffs], Thu Oct 16 01:10:52 1997 UTC (17 years ago) by thorpej
Branch: MAIN
CVS Tags: marc-pcmcia-base
Changes since 1.259: +3 -3 lines
Diff to previous 1.259 (colored)

Adjust for new "com" driver home.

Revision 1.259 / (download) - annotate - [select for diffs], Wed Oct 15 01:20:51 1997 UTC (17 years ago) by jtk
Branch: MAIN
Changes since 1.258: +5 -5 lines
Diff to previous 1.258 (colored)

put in place a proper bioscall.h (sorry about that!)
finish up incomplete job of moving structure used by bioscall() to
<machine/bioscall.h>, with associated changes in include file strategy,
genassym stuff, etc.

Revision 1.258 / (download) - annotate - [select for diffs], Tue Oct 14 03:55:06 1997 UTC (17 years ago) by jtk
Branch: MAIN
Changes since 1.257: +13 -8 lines
Diff to previous 1.257 (colored)

use NBIOSCALL and NAPM where appropriate (split from former monolithic "NAPM")

Revision 1.257 / (download) - annotate - [select for diffs], Mon Oct 6 20:38:46 1997 UTC (17 years ago) by thorpej
Branch: MAIN
Changes since 1.256: +10 -10 lines
Diff to previous 1.256 (colored)

Initialize the kernel message buffer earlier (before main() is called).

Revision 1.256 / (download) - annotate - [select for diffs], Sat Sep 27 10:55:48 1997 UTC (17 years, 1 month ago) by drochner
Branch: MAIN
Changes since 1.255: +9 -3 lines
Diff to previous 1.255 (colored)

Don't use "termios" constants if no "com" devices are configured.
Closes PR port-i386/4166 (Chris Jones).

Revision 1.255 / (download) - annotate - [select for diffs], Sat Sep 20 12:51:13 1997 UTC (17 years, 1 month ago) by drochner
Branch: MAIN
Changes since 1.254: +58 -33 lines
Diff to previous 1.254 (colored)

-define a buffer for information passed by the bootloader
-add a function ("lookup_bootinfo") to extract data
-use passed console information, if present, for console attachment
-arrange definitions for console and KGDB device a bit nicer

Revision 1.254 / (download) - annotate - [select for diffs], Fri Sep 19 13:54:13 1997 UTC (17 years, 1 month ago) by leo
Branch: MAIN
Changes since 1.253: +6 -8 lines
Diff to previous 1.253 (colored)

Implement the kernel part of pr-1891. This allows for a more flexible sized
msgbuf. Note that old 'dmesg' and 'syslogd' binaries will continue running,
though old 'dmesg' binaries will output a few bytes of junk at the start of
the buffer, and will miss a few bytes at the end of the buffer.

Revision 1.253 / (download) - annotate - [select for diffs], Tue Sep 16 20:34:34 1997 UTC (17 years, 1 month ago) by is
Branch: MAIN
Changes since 1.252: +4 -3 lines
Diff to previous 1.252 (colored)

Support for the upcoming NetBSD/Amiga Hypercom driver family:
* support chip clocks != COM_FREQ, by introducing sc_frequency (for the
  mainline code) and adding a frequency parameter right after the rate
  parameter to comcnattach() and com_kgdb_attach().
- Make com_isa and com_multi initialize sc_frequency to COM_FREQ.
- Make i386/machdep.c and alpha/dec_xxx.c call com*attach() with the freq.
  parameter.
* supio_attach_args get two more fields: a sc_ipl and a sc_arg, both ints.
- com_supio uses the first for interupt establishment (all childs will, as
  soon as they exist) and the 2nd for sc_frequency.
- drsupio passes sc_ipl alway as 5, and for the "com"s, sc_arg as 16*115200
- hyper will pass sc_ipl as 6, and sc_arg as 16 * 460800

Revision 1.252 / (download) - annotate - [select for diffs], Fri Sep 12 05:01:09 1997 UTC (17 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.251: +6 -1 lines
Diff to previous 1.251 (colored)

Initialize all registers in setregs().

Revision 1.251 / (download) - annotate - [select for diffs], Thu Sep 11 23:02:02 1997 UTC (17 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.250: +2 -5 lines
Diff to previous 1.250 (colored)

Fix execve(2) and *setregs() interfaces so emulations can set registers in a
more correct way.  (See tech-kern.)

Revision 1.250 / (download) - annotate - [select for diffs], Fri Sep 5 01:44:42 1997 UTC (17 years, 1 month ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-signal-base
Branch point for: thorpej-signal
Changes since 1.249: +22 -2 lines
Diff to previous 1.249 (colored)

Implement bus_dmamem_mmap().

Revision 1.249 / (download) - annotate - [select for diffs], Tue Aug 26 18:56:40 1997 UTC (17 years, 2 months ago) by fvdl
Branch: MAIN
Changes since 1.248: +3 -3 lines
Diff to previous 1.248 (colored)

Recognize Cyrix M2

Revision 1.248 / (download) - annotate - [select for diffs], Mon Aug 25 23:02:25 1997 UTC (17 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.247: +15 -1 lines
Diff to previous 1.247 (colored)

In i386_mem_add_mapping(), don't bother calling pmap_changebit() to mark a
device memory mapping cacheable/non-cacheable:
- PG_N doesn't exist on the 386.
- pmap_changebit() only deals with managed pages.
Basically, calling it is unnecessary, and never did anything.  Pointed
out by Chuck Cranor, and further discussed with Frank van der Linden.

Also, add a comment about why we don't mark pages non-cacheable in
_bus_dmamem_map().

Revision 1.247 / (download) - annotate - [select for diffs], Mon Aug 25 21:17:48 1997 UTC (17 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.246: +9 -2 lines
Diff to previous 1.246 (colored)

Protect access to kmem_map with splimp()/splx().  From Chuck Cranor.

Revision 1.246 / (download) - annotate - [select for diffs], Sun Aug 24 09:38:19 1997 UTC (17 years, 2 months ago) by drochner
Branch: MAIN
Changes since 1.245: +1 -3 lines
Diff to previous 1.245 (colored)

Remove over-sensitive sanity check for console port == KGDB port.

Revision 1.245 / (download) - annotate - [select for diffs], Sat Aug 23 14:22:03 1997 UTC (17 years, 2 months ago) by drochner
Branch: MAIN
Changes since 1.244: +46 -52 lines
Diff to previous 1.244 (colored)

Use functions provided by the drivers to initialize and attach console
and KGDB. Make port address, speed and (7/8bit,parity,stopbits) for serial
lines configurable.

Revision 1.244 / (download) - annotate - [select for diffs], Fri Aug 15 00:45:16 1997 UTC (17 years, 2 months ago) by cgd
Branch: MAIN
Changes since 1.243: +23 -14 lines
Diff to previous 1.243 (colored)

Sync with bus_space(9):
* make map and alloc take 'flags' rather than 'cacheable,' for
  more flexibility.
* rename BUS_BARRIER_* to BUS_SPACE_BARRIER_*, for consistency.
* rename bus_space_copy_* to bus_space_copy_region_* and make their
  defns match the updated spec.
Backward compatibility is provided by defining __BUS_SPACE_COMPAT_OLDDEFS,
which is currently defined by default.

Revision 1.243 / (download) - annotate - [select for diffs], Thu Aug 14 16:21:49 1997 UTC (17 years, 2 months ago) by drochner
Branch: MAIN
Changes since 1.242: +97 -20 lines
Diff to previous 1.242 (colored)

Initialize system console from a central place (don't use cninit()
anymore). This makes the code cleaner (no more bus tag guessing in the
serial console driver) and it allows to share code with KGDB port
initialization.
The console device is now given as string ("pc", "com0".."com3").
Modelled after alpha port.

Revision 1.242 / (download) - annotate - [select for diffs], Tue Aug 12 17:28:12 1997 UTC (17 years, 2 months ago) by drochner
Branch: MAIN
Changes since 1.241: +32 -2 lines
Diff to previous 1.241 (colored)

Attach KGDB in early system startup.

Revision 1.241 / (download) - annotate - [select for diffs], Wed Jul 16 00:01:49 1997 UTC (17 years, 3 months ago) by fvdl
Branch: MAIN
CVS Tags: marc-pcmcia-bp
Branch point for: marc-pcmcia
Changes since 1.240: +5 -5 lines
Diff to previous 1.240 (colored)

Recognize MMX P5 by it's model number, not by the cpuid flag. Otherwise
we also get "Pentium II with MMX" which is like saying "Pentium with FPU".
Also add one more entry for a K5

Revision 1.240 / (download) - annotate - [select for diffs], Thu Jul 10 16:02:24 1997 UTC (17 years, 3 months ago) by fvdl
Branch: MAIN
Changes since 1.239: +3 -2 lines
Diff to previous 1.239 (colored)

model 6, step 3 -> Pentium II, recognize it.

Revision 1.239 / (download) - annotate - [select for diffs], Thu Jul 10 04:07:00 1997 UTC (17 years, 3 months ago) by cgd
Branch: MAIN
Changes since 1.238: +10 -28 lines
Diff to previous 1.238 (colored)

figure out which space we're using in i386_memio_{map,alloc,unmap} by
doing 'if (tag == ...) else if (tag == ...) else panic' rather than
by doing a switch.  This makes life easier for people who need
the i386 bus_space_* functions to access spaces other than the normal
memory and I/O spaces, because it allows them to define an i386
bus_space_tag_t as a pointer to a function table, rather than just
an int.  (They could define it as an int and cast it to a funtion
table pointer, but I think that's bad karma, and this change doesn't
hurt.)

Revision 1.238 / (download) - annotate - [select for diffs], Thu Jul 10 03:10:58 1997 UTC (17 years, 3 months ago) by cgd
Branch: MAIN
Changes since 1.237: +2 -2 lines
Diff to previous 1.237 (colored)

undo the change done (at my suggestion) in rev 1.236.  That is,
mark all of 0 -> IOM_BEGIN as used, even though there are some regions
which are left for use by the BIOS (namely, the first 4k page and the
area after biosbasemem*1024 but before IOM_BEGIN).  Drivers wishing to
manipulate these areas should map them specially, with _i386_memio_map()
rather than bus_space_map() or i386_memio_map().

Revision 1.237 / (download) - annotate - [select for diffs], Thu Jul 10 02:36:44 1997 UTC (17 years, 3 months ago) by cgd
Branch: MAIN
Changes since 1.236: +48 -24 lines
Diff to previous 1.236 (colored)

rename i386 bus_space_{map,unmap,subregion,alloc,free} implementation
functions (which only work on memory and i/o space) to i386_memio_*,
and make bus_space_* in bus.h be #defines which invoke them.  This makes
life easier for people who need to define the all of the bus_space functions
so that they work on spaces other than memory and I/O space.  Also, add
an _i386_memio_map function which is like i386_memio_map but doesn't do
the extent map checking or allocation.  _i386_memio_map and i386_memio_*
are for use only by machine-dependent code.

Revision 1.236 / (download) - annotate - [select for diffs], Tue Jul 8 17:55:44 1997 UTC (17 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.235: +2 -2 lines
Diff to previous 1.235 (colored)

When allocating space used by physical memory from the iomem extent,
use a value derived from biosbasemem, rather than a constant.  Pointed
out by Chris Demetriou <cgd@netbsd.org>

Revision 1.235 / (download) - annotate - [select for diffs], Sat Jul 5 20:48:12 1997 UTC (17 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.234: +8 -2 lines
Diff to previous 1.234 (colored)

Add glue for remote KGDB.

Revision 1.234 / (download) - annotate - [select for diffs], Thu Jun 12 23:57:26 1997 UTC (17 years, 4 months ago) by thorpej
Branch: MAIN
CVS Tags: bouyer-scsipi
Changes since 1.233: +11 -7 lines
Diff to previous 1.233 (colored)

Nuke __VM_PMAP_HACK.

Revision 1.233 / (download) - annotate - [select for diffs], Thu Jun 12 15:46:32 1997 UTC (17 years, 4 months ago) by mrg
Branch: MAIN
Changes since 1.232: +1 -2 lines
Diff to previous 1.232 (colored)

bring mrg-vm-swap2 onto mainilne.

Revision 1.232 / (download) - annotate - [select for diffs], Fri Jun 6 23:29:25 1997 UTC (17 years, 4 months ago) by veego
Branch: MAIN
Changes since 1.231: +2 -1 lines
Diff to previous 1.231 (colored)

Add 'char machine_arch[] = "xxx";' for the new sysctl hw.machine_arch.

Revision 1.231 / (download) - annotate - [select for diffs], Fri Jun 6 23:14:17 1997 UTC (17 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.230: +478 -2 lines
Diff to previous 1.230 (colored)

Pull thorpej-bus-dma branch into mainline.

Revision 1.230 / (download) - annotate - [select for diffs], Wed Apr 2 23:44:44 1997 UTC (17 years, 6 months ago) by perry
Branch: MAIN
CVS Tags: thorpej-bus-dma-base, mrg-vm-swap2-base
Branch point for: thorpej-bus-dma, mrg-vm-swap2
Changes since 1.229: +3 -3 lines
Diff to previous 1.229 (colored)

fix bad size calculation for kernel memory mappings, as in when
allocating 1 byte from a page alligned address.
reported (with fix) in pr-3441 from Matthias Drochner

Revision 1.229 / (download) - annotate - [select for diffs], Thu Mar 27 21:01:31 1997 UTC (17 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.228: +2 -6 lines
Diff to previous 1.228 (colored)

Don't allocate mclrefcnt[]; it's dead and gone.

Revision 1.228 / (download) - annotate - [select for diffs], Wed Mar 26 22:42:39 1997 UTC (17 years, 7 months ago) by gwr
Branch: MAIN
Changes since 1.227: +5 -5 lines
Diff to previous 1.227 (colored)

Renames: /dumpconf/cpu_dumpconf/, /boot/cpu_reboot/

Revision 1.227 / (download) - annotate - [select for diffs], Mon Mar 24 01:36:43 1997 UTC (17 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.226: +6 -2 lines
Diff to previous 1.226 (colored)

Expand the comment on the previous.

Revision 1.226 / (download) - annotate - [select for diffs], Mon Mar 24 01:32:38 1997 UTC (17 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.225: +3 -5 lines
Diff to previous 1.225 (colored)

Reenable the keyboard controller reset hack.

Revision 1.225 / (download) - annotate - [select for diffs], Sat Mar 22 16:56:03 1997 UTC (17 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.224: +8 -26 lines
Diff to previous 1.224 (colored)

Redo the way exceptions are set up, and add a handler for
exception 15, which the P6 local APIC may erroneously send us.

Revision 1.224 / (download) - annotate - [select for diffs], Wed Mar 19 22:39:25 1997 UTC (17 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.223: +13 -5 lines
Diff to previous 1.223 (colored)

cpu_reset(): Improve the triple-fault code, and use it by default for now.

Revision 1.223 / (download) - annotate - [select for diffs], Wed Mar 19 18:18:02 1997 UTC (17 years, 7 months ago) by sommerfe
Branch: MAIN
Changes since 1.222: +6 -3 lines
Diff to previous 1.222 (colored)

If we're "degraded", say just *how* degraded we are..

Revision 1.222 / (download) - annotate - [select for diffs], Mon Mar 3 02:33:41 1997 UTC (17 years, 7 months ago) by mycroft
Branch: MAIN
CVS Tags: is-newarp-before-merge
Changes since 1.221: +2 -2 lines
Diff to previous 1.221 (colored)

Oops!  Fix this to block all interrupts during configuration, after previous
interrupt priority changes.

Revision 1.221 / (download) - annotate - [select for diffs], Thu Feb 13 00:59:12 1997 UTC (17 years, 8 months ago) by jonathan
Branch: MAIN
Changes since 1.220: +1 -23 lines
Diff to previous 1.220 (colored)

Import Dennis Ferguson's i386 clock change request from PR 2785:
   * Add table-driven assembly-coded microtime().

   * add boot-time computation of the interpolation table,
     allowing the hand-coded microtime() to work with locally-tuned
     nonstandard values of HZ or TIMER_FREQ.

   * delete old C version of microtime().

Revision 1.220 / (download) - annotate - [select for diffs], Thu Jan 16 23:21:14 1997 UTC (17 years, 9 months ago) by perry
Branch: MAIN
CVS Tags: is-newarp-base
Branch point for: mrg-vm-swap, is-newarp
Changes since 1.219: +3 -3 lines
Diff to previous 1.219 (colored)

print 'with MMX' for MMX CPUs (from Martin Husemann) -- fixes pr-3110

Revision 1.219 / (download) - annotate - [select for diffs], Thu Jan 16 23:18:04 1997 UTC (17 years, 9 months ago) by perry
Branch: MAIN
Changes since 1.218: +2 -2 lines
Diff to previous 1.218 (colored)

fix CPUID table for 486SX (from Scott Telford) -- fixes pr-3107

Revision 1.218 / (download) - annotate - [select for diffs], Mon Dec 9 22:51:55 1996 UTC (17 years, 10 months ago) by fvdl
Branch: MAIN
Branch point for: thorpej-setroot
Changes since 1.217: +9 -1 lines
Diff to previous 1.217 (colored)

Make sure KVM used by buffer cache doesn't exceed VM_MAX_KERNEL_BUF.

XXX stopgap measure.

Revision 1.217 / (download) - annotate - [select for diffs], Fri Dec 6 22:27:40 1996 UTC (17 years, 10 months ago) by fvdl
Branch: MAIN
Changes since 1.216: +2 -2 lines
Diff to previous 1.216 (colored)

Fix missing instruction in NexGen test code; make it a 386-class CPU too.
(Valtteri Vuorikoski / Jason).

Revision 1.216 / (download) - annotate - [select for diffs], Tue Dec 3 23:59:27 1996 UTC (17 years, 10 months ago) by fvdl
Branch: MAIN
Changes since 1.215: +209 -35 lines
Diff to previous 1.215 (colored)

Change CPU recognition code to know more types, and make it changeable
easier when new types arrive.

Locore: make profiling work for some functions; use <machine/asm.h>
(from Jonathan Stone)

Revision 1.215 / (download) - annotate - [select for diffs], Mon Nov 18 01:06:12 1996 UTC (17 years, 11 months ago) by fvdl
Branch: MAIN
Changes since 1.214: +13 -7 lines
Diff to previous 1.214 (colored)

Changes for NKPDE calculation from cgd.

- New variables: biosextmem, biosbasemem, nkpde
- Above can be set by using the options BIOSEXTMEM, BIOSBASEMEM,
  and NKPDE respectively (EXTMEM_SIZE is now called BIOSEXTMEM).
  When preset this way, they won't be filled in / calculated.
- Readable by sysctl using machdep.nkpde, machdep.biosbasemem
  and machdep.biosextmem.
- nkpde is calculated as:

	min(NKPDE_MAX, NKPDE_BASE + (biosextmem >> 10) * NKPDE_SCALE)

  Where NKPDE_MAX is 31, NKPDE_BASE is 4, NKPDE_SCALE = 1.

Revision 1.214 / (download) - annotate - [select for diffs], Sun Nov 10 03:16:17 1996 UTC (17 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.213: +2 -3 lines
Diff to previous 1.213 (colored)

The boundary argument to bus_space_alloc() should be a bus_size_t, not
a bus_addr_t.  Pointed out by Chris Demetriou <cgd@cs.cmu.edu>.

Revision 1.213 / (download) - annotate - [select for diffs], Mon Oct 21 22:24:38 1996 UTC (18 years ago) by thorpej
Branch: MAIN
Changes since 1.212: +235 -96 lines
Diff to previous 1.212 (colored)

New bus.h implementation/interface:
	- No more distinction between i/o-mapped and memory-mapped
	  devices.  It's all "bus space" now, and space tags
	  differentiate the space with finer grain than the
	  bus chipset tag.
	- Add memory barrier methods.
	- Implement space alloc/free methods.
	- Implement region read/write methods (like memcpy to/from
	  bus space).
This interface provides a better abstraction for dealing with
machine-independent chipset drivers.

Revision 1.212 / (download) - annotate - [select for diffs], Thu Oct 17 19:31:09 1996 UTC (18 years ago) by fvdl
Branch: MAIN
Changes since 1.211: +3 -3 lines
Diff to previous 1.211 (colored)

Cast ioport_ex_storage to caddr_t, needed becauseit  is now long[]
and creates warnings.

Revision 1.211 / (download) - annotate - [select for diffs], Thu Oct 17 08:31:28 1996 UTC (18 years ago) by thorpej
Branch: MAIN
Changes since 1.210: +5 -5 lines
Diff to previous 1.210 (colored)

Couple of changes:
- Rename EX_NOBLOB to EX_NOCOALESCE; it's much more descriptive of
  what's going on.
- Ensure that fixed extent storage is longword aligned.

Revision 1.210 / (download) - annotate - [select for diffs], Sun Oct 13 03:19:45 1996 UTC (18 years ago) by christos
Branch: MAIN
Changes since 1.209: +40 -40 lines
Diff to previous 1.209 (colored)

backout previous kprintf changes

Revision 1.209 / (download) - annotate - [select for diffs], Fri Oct 11 00:26:48 1996 UTC (18 years ago) by christos
Branch: MAIN
Changes since 1.208: +40 -40 lines
Diff to previous 1.208 (colored)

printf -> kprintf, sprintf -> ksprintf

Revision 1.208 / (download) - annotate - [select for diffs], Mon Sep 16 04:44:28 1996 UTC (18 years, 1 month ago) by jtk
Branch: MAIN
Changes since 1.207: +11 -1 lines
Diff to previous 1.207 (colored)

when halting, attempt to turn off power using APM

Revision 1.207 / (download) - annotate - [select for diffs], Sun Sep 8 15:43:40 1996 UTC (18 years, 1 month ago) by jtk
Branch: MAIN
Changes since 1.206: +38 -1 lines
Diff to previous 1.206 (colored)

change APM to use new almost-generalized BIOS trampoline:

/*
 * void bioscall(int function, struct apmregs *regs):
 * 	call the BIOS interrupt "function" from real mode with
 *	registers as specified in "regs"
 *	(for the flags, though, only these flags are passed to the BIOS;
 *	the remainder come from the flags register at the time of the call:
 *	(PSL_C|PSL_PF|PSL_AF|PSL_Z|PSL_N|PSL_D|PSL_V)
 *
 *	Fills in *regs with registers as returned by BIOS.
 */

Thanks to Charles Hannum for complaining and inspiring me to hack this
together.

Revision 1.206 / (download) - annotate - [select for diffs], Fri Aug 9 10:30:47 1996 UTC (18 years, 2 months ago) by mrg
Branch: MAIN
Changes since 1.205: +3 -2 lines
Diff to previous 1.205 (colored)

Change reboot(2) to take two arguments: bootopt like normal and also
a boot string for firmware that can do this, such as the SPARC and
the sun3 models.  It is currently silently ignored on all other
hardware now, however.  The MD function "boot()" has been changed to
also take a char *.

Revision 1.205 / (download) - annotate - [select for diffs], Tue Jun 25 21:22:48 1996 UTC (18 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.204: +71 -16 lines
Diff to previous 1.204 (colored)

A few simple changes:

	- Use an extent map to manage the ISA memory "hole", much like
	  how i/o port space is manged with an extent map.  Do the actual
	  accounting in bus_mem_{,un}map().

	- When creating the ioport and iomem extent maps, pass the
	  EX_NOBLOB flag, which tells the extent map code to disallow
	  fragmenting of regions.  This will make it easier to catch
	  simple i/o and memory mapping bugs (like the if_ed.c bug I just
	  fixed) in the future.

	- In bus_mem_map(), a chunk of code was indented using spaces.
	  Make the indentation use tabs.

	- In bus_io_unmap(), fix the format passed to printf().

Revision 1.204 / (download) - annotate - [select for diffs], Sun Jun 23 19:59:16 1996 UTC (18 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.203: +55 -1 lines
Diff to previous 1.203 (colored)

New implementation of bus_io_{,un}map() for the i386.  Details:

	- A fixed extent map (statically allocated descriptor storage) is
	  created in init386(), just before the call to consinit().  The
	  fixed descriptor storage has enough room for 8 region entires,
	  which is plenty for early initialization, but doesn't chew up
	  that much memory.

	  This extent map (ioport_ex) manages the i386 i/o port
	  space (0x0 - 0xffff).

	- Just before the call to configure() in cpu_startup(), a
	  flag is set which notifies the bus_io functions that it is
	  safe to use malloc() to allocate descriptor storage, in the
	  event that more than 8 regions are needed.

	- bus_io_map() attempts to allocate the specified region from
	  ioport_ex.  If the allocation succeeds, the io handle is
	  filled in.  If the allocation fails, it is implied that
	  something else is already using that io space, and an
	  error condition is returned.

	- bus_io_unmap() frees a region previously allocated from
	  ioport_ex in bus_io_map().  If the free fails, a warning
	  is printed on the conole.

These changes implement "port accounting".  This is required for
proper autoconfiguration on the i386 port, and makes dealing with,
among other things, PCMCIA io mappings _much_ easier.

Revision 1.203 / (download) - annotate - [select for diffs], Tue Jun 18 01:53:19 1996 UTC (18 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.202: +4 -10 lines
Diff to previous 1.202 (colored)

Use the BIOS memory sizes passed in by the boot program, to preserve the BIOS
data area.

Revision 1.202 / (download) - annotate - [select for diffs], Sat May 18 15:54:59 1996 UTC (18 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-BETA
Branch point for: netbsd-1-2
Changes since 1.201: +20 -60 lines
Diff to previous 1.201 (colored)

- remove cpu_exec_aout_prep_oldzmagic and use exec_aout_prep_oldzmagic
- add exec_aout_prep_oldnmagic and exec_aout_prep_oldomagic. Now we support
  all BSDI executable formats.

Revision 1.201 / (download) - annotate - [select for diffs], Sun May 12 19:02:19 1996 UTC (18 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.200: +15 -4 lines
Diff to previous 1.200 (colored)

In bus_mem_unmap(), pass kernel_map to kmem_free(), rather than
kmem_map (the VA space is allocated from kernel_map).

In both bus_mem_map() and bus_mem_unmap(), adjust some arithmetic to
avoid wasting a page of VA space per call to bus_mem_map().

Revision 1.200 / (download) - annotate - [select for diffs], Fri May 3 19:42:15 1996 UTC (18 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.199: +24 -13 lines
Diff to previous 1.199 (colored)

Prototype and gcc -Wall cleanups

Revision 1.199 / (download) - annotate - [select for diffs], Thu Apr 18 09:58:13 1996 UTC (18 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.198: +3 -4 lines
Diff to previous 1.198 (colored)

Don't bother to enable alignment checking; nobody uses it and it interferes
with VM86 mode.

Revision 1.198 / (download) - annotate - [select for diffs], Thu Apr 18 08:36:25 1996 UTC (18 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.197: +2 -2 lines
Diff to previous 1.197 (colored)

Turn off the alignment check flag when entering a signal handler.

Revision 1.197 / (download) - annotate - [select for diffs], Fri Apr 12 08:44:40 1996 UTC (18 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.196: +2 -2 lines
Diff to previous 1.196 (colored)

Turn off the trace flag when delivering a signal.

Revision 1.196 / (download) - annotate - [select for diffs], Thu Apr 11 07:47:33 1996 UTC (18 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.195: +21 -27 lines
Diff to previous 1.195 (colored)

Export [gs]et_vflags(), and always use them when saving/restoring registers
in VM86 mode.
Allow changing of *all* PSL bits in VM86 mode; some applications don't work
right otherwise, and all the nasty bits are virtualized anyway.
Make sure PSL_VIF, PSL_VIP, and PSL_VM don't show up in the user's view of
the PSL.

Revision 1.195 / (download) - annotate - [select for diffs], Sat Mar 30 07:37:32 1996 UTC (18 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.194: +5 -1 lines
Diff to previous 1.194 (colored)

Add explicit return types.

Revision 1.194 / (download) - annotate - [select for diffs], Fri Mar 8 20:19:48 1996 UTC (18 years, 7 months ago) by cgd
Branch: MAIN
Changes since 1.193: +45 -1 lines
Diff to previous 1.193 (colored)

implement bus_mem_map() and bus_mem_unmap() functions.

Revision 1.193 / (download) - annotate - [select for diffs], Fri Mar 8 11:40:28 1996 UTC (18 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.192: +20 -13 lines
Diff to previous 1.192 (colored)

Rearrange boot() slightly.

Revision 1.192 / (download) - annotate - [select for diffs], Tue Mar 5 01:28:51 1996 UTC (18 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.191: +9 -1 lines
Diff to previous 1.191 (colored)

Add an EXTMEM_SIZE option to set the size of extended memory on systems
that lie about it.  Deals with PRs #1319 and #1831.

Revision 1.191 / (download) - annotate - [select for diffs], Fri Mar 1 21:49:49 1996 UTC (18 years, 7 months ago) by scottr
Branch: MAIN
Changes since 1.190: +4 -4 lines
Diff to previous 1.190 (colored)

Add newlines to CPU class notices

Revision 1.190 / (download) - annotate - [select for diffs], Sun Feb 18 22:44:27 1996 UTC (18 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.189: +11 -11 lines
Diff to previous 1.189 (colored)

Move the DDB initialization later.

Revision 1.189 / (download) - annotate - [select for diffs], Mon Feb 12 21:11:20 1996 UTC (18 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.188: +2 -2 lines
Diff to previous 1.188 (colored)

make pmap_page_index() return a signed int.

Revision 1.188 / (download) - annotate - [select for diffs], Sat Feb 10 00:51:52 1996 UTC (18 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.187: +8 -5 lines
Diff to previous 1.187 (colored)

fix _insque and _remque declarations

Revision 1.187 / (download) - annotate - [select for diffs], Fri Feb 9 17:15:27 1996 UTC (18 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.186: +5 -2 lines
Diff to previous 1.186 (colored)

Be more verbose when a CPU class is not configured.

Revision 1.186 / (download) - annotate - [select for diffs], Tue Jan 30 23:15:01 1996 UTC (18 years, 8 months ago) by scottr
Branch: MAIN
Changes since 1.185: +2 -1 lines
Diff to previous 1.185 (colored)

Resolve return type conflict for microtime(); closes PR #1835.

Revision 1.185 / (download) - annotate - [select for diffs], Mon Jan 8 20:12:20 1996 UTC (18 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.184: +7 -5 lines
Diff to previous 1.184 (colored)

Also reset %fs and %gs when delivering a signal.

Revision 1.184 / (download) - annotate - [select for diffs], Mon Jan 8 13:51:34 1996 UTC (18 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.183: +37 -25 lines
Diff to previous 1.183 (colored)

VM86 support, by John Kohl, touched up a bit by me.

Revision 1.183 / (download) - annotate - [select for diffs], Thu Jan 4 22:22:01 1996 UTC (18 years, 9 months ago) by jtc
Branch: MAIN
Changes since 1.182: +2 -2 lines
Diff to previous 1.182 (colored)

Changed name of sigaltstack's ss_base field to ss_sp to match XPG4.2 and
traditional usage.

Revision 1.182 / (download) - annotate - [select for diffs], Thu Dec 14 18:31:20 1995 UTC (18 years, 10 months ago) by ghudson
Branch: MAIN
Changes since 1.181: +3 -2 lines
Diff to previous 1.181 (colored)

Call doshutdownhooks() before asking for a halt keypress.

Revision 1.181 / (download) - annotate - [select for diffs], Sun Oct 15 22:09:45 1995 UTC (19 years ago) by mycroft
Branch: MAIN
Changes since 1.180: +3 -1 lines
Diff to previous 1.180 (colored)

Fix small oversight.

Revision 1.180 / (download) - annotate - [select for diffs], Thu Oct 12 17:56:36 1995 UTC (19 years ago) by mycroft
Branch: MAIN
CVS Tags: netbsd-1-1-base
Branch point for: netbsd-1-1
Changes since 1.179: +22 -25 lines
Diff to previous 1.179 (colored)

Move the initialization of proc0's TSS and LDT to the end of cpu_startup(),
and switch to dynamically allocating the TSS.

Revision 1.179 / (download) - annotate - [select for diffs], Wed Oct 11 19:32:37 1995 UTC (19 years ago) by mycroft
Branch: MAIN
Changes since 1.178: +11 -7 lines
Diff to previous 1.178 (colored)

Go back to statically allocating the GDT entries for proc0.

Revision 1.178 / (download) - annotate - [select for diffs], Wed Oct 11 04:19:44 1995 UTC (19 years ago) by mycroft
Branch: MAIN
Changes since 1.177: +61 -50 lines
Diff to previous 1.177 (colored)

Various changes from John Kohl and me:
Map kernel stacks only at unique addresses.
Use one TSS per process.
Add sysarch calls for modifying IOPL and the I/O permission bitmap.
Add a compacting GDT entry allocator, for TSS and LDT selectors.
Enable modifying %fs and %gs with PT_SETREGS.
Sanitize various bits of code.

Revision 1.177 / (download) - annotate - [select for diffs], Tue Oct 10 04:54:33 1995 UTC (19 years ago) by mycroft
Branch: MAIN
Changes since 1.176: +5 -5 lines
Diff to previous 1.176 (colored)

Switch to user code and data selectors in the GDT while handling signals.

Revision 1.176 / (download) - annotate - [select for diffs], Tue Oct 10 04:45:24 1995 UTC (19 years ago) by mycroft
Branch: MAIN
Changes since 1.175: +2 -2 lines
Diff to previous 1.175 (colored)

Add USERMODE() and KERNELMODE() macros, and use them.

Revision 1.175 / (download) - annotate - [select for diffs], Tue Oct 10 01:26:43 1995 UTC (19 years ago) by mycroft
Branch: MAIN
Changes since 1.174: +3 -3 lines
Diff to previous 1.174 (colored)

Add hooks for COMPAT_FREEBSD, from Noriyuki Soda.

Revision 1.174 / (download) - annotate - [select for diffs], Mon Oct 9 06:34:11 1995 UTC (19 years ago) by mycroft
Branch: MAIN
Changes since 1.173: +45 -171 lines
Diff to previous 1.173 (colored)

Eliminate soft segment descriptors; instead use a functional interface for
creating segment descriptors.  Add the duplicate system call gate used by
BSD/OS 2.0 executables.  Prototype setsegment() and setgate(), and fix a bogon
caught by this.

Revision 1.173 / (download) - annotate - [select for diffs], Sat Oct 7 06:25:40 1995 UTC (19 years ago) by mycroft
Branch: MAIN
Changes since 1.172: +3 -3 lines
Diff to previous 1.172 (colored)

Prefix names of system call implementation functions with `sys_'.

Revision 1.172 / (download) - annotate - [select for diffs], Tue Sep 19 22:56:40 1995 UTC (19 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.171: +6 -5 lines
Diff to previous 1.171 (colored)

Make system calls conform to a standard prototype and bring those
prototypes into scope.

Revision 1.171 / (download) - annotate - [select for diffs], Fri Sep 1 20:06:06 1995 UTC (19 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.170: +5 -5 lines
Diff to previous 1.170 (colored)

SA_ONSTACK --> SS_ONSTACK

Revision 1.170 / (download) - annotate - [select for diffs], Sun Aug 27 21:30:00 1995 UTC (19 years, 2 months ago) by fvdl
Branch: MAIN
Changes since 1.169: +2 -11 lines
Diff to previous 1.169 (colored)

Undo unintended parts of previous change.

Revision 1.169 / (download) - annotate - [select for diffs], Thu Aug 24 19:16:47 1995 UTC (19 years, 2 months ago) by ghudson
Branch: MAIN
Changes since 1.168: +12 -2 lines
Diff to previous 1.168 (colored)

Call doshutdownhooks() before resetting the CPU.  This should probably
be in architecture-independent code.

Revision 1.168 / (download) - annotate - [select for diffs], Mon Aug 14 02:27:30 1995 UTC (19 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.167: +4 -18 lines
Diff to previous 1.167 (colored)

Export bsd_to_ibcs2_sig[], and use it.
Nuke ancient vmtime().

Revision 1.167 / (download) - annotate - [select for diffs], Sun Aug 6 19:01:14 1995 UTC (19 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.166: +3 -5 lines
Diff to previous 1.166 (colored)

Clear MDP_USEDFPU on exec.  Set it in process_write_fpregs() unconditionally,
for the benefit of the emulator.

Revision 1.166 / (download) - annotate - [select for diffs], Sun Aug 6 05:32:59 1995 UTC (19 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.165: +6 -6 lines
Diff to previous 1.165 (colored)

Move the `used fpu' flag into mdproc, so it can be referenced when a process
is swapped out.  Implement process_{read,write}_fpregs.

Revision 1.165 / (download) - annotate - [select for diffs], Sun Jul 2 16:10:40 1995 UTC (19 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.164: +8 -10 lines
Diff to previous 1.164 (colored)

Simplify some conditionals.

Revision 1.164 / (download) - annotate - [select for diffs], Wed Jun 28 04:30:46 1995 UTC (19 years, 4 months ago) by cgd
Branch: MAIN
Changes since 1.163: +3 -3 lines
Diff to previous 1.163 (colored)

note that most of dev/ic's contents have changed names

Revision 1.163 / (download) - annotate - [select for diffs], Mon Jun 26 05:22:53 1995 UTC (19 years, 4 months ago) by cgd
Branch: MAIN
Changes since 1.162: +92 -10 lines
Diff to previous 1.162 (colored)

use new-style block device dump functions.  (most intelligence here now.)

Revision 1.162 / (download) - annotate - [select for diffs], Mon Jun 5 03:47:51 1995 UTC (19 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.161: +3 -3 lines
Diff to previous 1.161 (colored)

Increase the delay after pulsing the keyboard reset line.

Revision 1.161 / (download) - annotate - [select for diffs], Thu May 18 18:59:16 1995 UTC (19 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.160: +11 -2 lines
Diff to previous 1.160 (colored)

Clean up the FPU state more thoroughly on exec.

Revision 1.160 / (download) - annotate - [select for diffs], Tue May 16 14:30:47 1995 UTC (19 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.159: +2 -1 lines
Diff to previous 1.159 (colored)

Put the address of the ps_strings structure in %ebx.

Revision 1.159 / (download) - annotate - [select for diffs], Sat May 6 20:30:14 1995 UTC (19 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.158: +26 -7 lines
Diff to previous 1.158 (colored)

Add a copy of the user code and data descriptors in the GDT.

Revision 1.158 / (download) - annotate - [select for diffs], Thu May 4 19:39:18 1995 UTC (19 years, 5 months ago) by cgd
Branch: MAIN
Changes since 1.157: +7 -4 lines
Diff to previous 1.157 (colored)

use the machine-independent definitions for the mc146818.
wrap the various uses of the chip (including the uses of the NVRAM on it)
around the new defintions, structures, and functions specified in the header.

Revision 1.157 / (download) - annotate - [select for diffs], Mon May 1 14:15:18 1995 UTC (19 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.156: +28 -5 lines
Diff to previous 1.156 (colored)

Save and restore %fs and %gs across signals.

Revision 1.156 / (download) - annotate - [select for diffs], Mon May 1 13:02:29 1995 UTC (19 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.155: +4 -8 lines
Diff to previous 1.155 (colored)

Eliminate _gsel_tss and _default_ldt.

Revision 1.155 / (download) - annotate - [select for diffs], Mon May 1 09:08:27 1995 UTC (19 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.154: +31 -31 lines
Diff to previous 1.154 (colored)

Correct comments in gdt_segs[] and ldt_segs[] initializers.

Revision 1.154 / (download) - annotate - [select for diffs], Mon May 1 08:06:36 1995 UTC (19 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.153: +34 -60 lines
Diff to previous 1.153 (colored)

Update to match include files.  Eliminate _ucodesel, _udatasel, and IdlePTD.

Revision 1.153 / (download) - annotate - [select for diffs], Mon May 1 04:48:36 1995 UTC (19 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.152: +11 -5 lines
Diff to previous 1.152 (colored)

Be more aggressive about lazy saving and initialization.

Revision 1.152 / (download) - annotate - [select for diffs], Mon Apr 24 06:24:19 1995 UTC (19 years, 6 months ago) by cgd
Branch: MAIN
Changes since 1.151: +2 -3 lines
Diff to previous 1.151 (colored)

kill a bogus NOTREACHED, fix spacing

Revision 1.151 / (download) - annotate - [select for diffs], Sat Apr 22 20:26:41 1995 UTC (19 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.150: +16 -24 lines
Diff to previous 1.150 (colored)

- added sunos_machdep.c for sun3, atari, amiga and mac68k.
- changed machdep.c and trap.c to use struct emul.
- remove ep_setup references.
- added struct emul to all emulations.

Revision 1.150 / (download) - annotate - [select for diffs], Fri Apr 21 21:56:59 1995 UTC (19 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.149: +2 -31 lines
Diff to previous 1.149 (colored)

Use vfs_shutdown().

Revision 1.149 / (download) - annotate - [select for diffs], Fri Apr 21 09:15:23 1995 UTC (19 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.148: +34 -3 lines
Diff to previous 1.148 (colored)

Move cpu_reset() from vm_machdep.c to machdep.c, and make it more robust.

Revision 1.148 / (download) - annotate - [select for diffs], Fri Apr 21 07:53:52 1995 UTC (19 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.147: +32 -48 lines
Diff to previous 1.147 (colored)

Clean up init386() a bit.

Revision 1.147 / (download) - annotate - [select for diffs], Fri Apr 21 06:43:24 1995 UTC (19 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.146: +11 -2 lines
Diff to previous 1.146 (colored)

Remove 486-specific CR0 changes into identifycpu().

Revision 1.146 / (download) - annotate - [select for diffs], Mon Apr 17 12:06:43 1995 UTC (19 years, 6 months ago) by cgd
Branch: MAIN
Changes since 1.145: +4 -3 lines
Diff to previous 1.145 (colored)

clean up several ISA device interfaces: autoconfiguration, header
inclusion, and interrupt configuration.  more work still needs to be done,
but it's getting better...

Revision 1.145 / (download) - annotate - [select for diffs], Thu Apr 13 20:48:27 1995 UTC (19 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.144: +3 -3 lines
Diff to previous 1.144 (colored)

EMUL_IBCS2_ELF -> EMUL_SVR4; EMUL_IBCS2_{COFF,XOUT} -> EMUL_IBCS2

Revision 1.144 / (download) - annotate - [select for diffs], Thu Apr 13 19:36:00 1995 UTC (19 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.143: +3 -3 lines
Diff to previous 1.143 (colored)

Fix compiler warnings.

Revision 1.143 / (download) - annotate - [select for diffs], Mon Apr 10 13:14:28 1995 UTC (19 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.142: +2 -4 lines
Diff to previous 1.142 (colored)

kernel_pmap --> pmap_kernel()

Revision 1.142 / (download) - annotate - [select for diffs], Fri Apr 7 22:29:51 1995 UTC (19 years, 6 months ago) by fvdl
Branch: MAIN
Changes since 1.141: +3 -3 lines
Diff to previous 1.141 (colored)

Changes because of proper Linux signal stackframe building, and
seperate signal trampoline code. Ugly hack in trap.c no longer
needed.

Revision 1.141 / (download) - annotate - [select for diffs], Sun Mar 5 22:20:37 1995 UTC (19 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.140: +3 -2 lines
Diff to previous 1.140 (colored)

Turn off writing to the message buffer before outputting dump information.

Revision 1.140 / (download) - annotate - [select for diffs], Tue Feb 28 23:21:45 1995 UTC (19 years, 8 months ago) by cgd
Branch: MAIN
Changes since 1.139: +6 -1 lines
Diff to previous 1.139 (colored)

translate signal numbers for linux compat bins.

Revision 1.139 / (download) - annotate - [select for diffs], Fri Feb 3 10:16:35 1995 UTC (19 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.138: +10 -17 lines
Diff to previous 1.138 (colored)

Make pmap_next_page() a bit safer.

Revision 1.138 / (download) - annotate - [select for diffs], Thu Feb 2 19:42:18 1995 UTC (19 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.137: +7 -1 lines
Diff to previous 1.137 (colored)

Round biosbasemem and biosextmem down to a whole page.

Revision 1.137 / (download) - annotate - [select for diffs], Sun Jan 15 02:11:23 1995 UTC (19 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.136: +2 -3 lines
Diff to previous 1.136 (colored)

Remove prototype of check_selectors().

Revision 1.136 / (download) - annotate - [select for diffs], Sun Jan 15 00:44:19 1995 UTC (19 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.135: +6 -62 lines
Diff to previous 1.135 (colored)

Do the eflags security check in a cheaper way.  Just check that the privilege
level of the return cs is correct; don't check the other selectors.  (Will
fault later if they are invalid.)

Revision 1.135 / (download) - annotate - [select for diffs], Sun Jan 8 21:22:16 1995 UTC (19 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.134: +23 -16 lines
Diff to previous 1.134 (colored)

New svr4_machdep.c for svr4 signal handling.
Made check_selectors global, to be used by the
svr4 code.
Removed unused variable.
Modified sendsig() to call the svr4_sendsig().

Revision 1.134 / (download) - annotate - [select for diffs], Thu Dec 1 09:53:38 1994 UTC (19 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.133: +18 -17 lines
Diff to previous 1.133 (colored)

Adjust dump calculation to avoid sign problems.

Revision 1.133 / (download) - annotate - [select for diffs], Wed Nov 30 04:26:06 1994 UTC (19 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.132: +1 -3 lines
Diff to previous 1.132 (colored)

Don't need to turn on emulation when npx not present; we leave it off always.

Revision 1.132 / (download) - annotate - [select for diffs], Mon Nov 14 08:53:06 1994 UTC (19 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.131: +5 -6 lines
Diff to previous 1.131 (colored)

Garbage collect unused variable.

Revision 1.131 / (download) - annotate - [select for diffs], Mon Nov 7 05:57:28 1994 UTC (19 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.130: +2 -3 lines
Diff to previous 1.130 (colored)

It's legitimate, if foolish, to mask SIGCONT.

Revision 1.130 / (download) - annotate - [select for diffs], Sun Nov 6 23:43:24 1994 UTC (19 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.129: +2 -3 lines
Diff to previous 1.129 (colored)

Only save the FPU state if somebody else needs the FPU, or when forking.

Revision 1.129 / (download) - annotate - [select for diffs], Sat Nov 5 02:47:06 1994 UTC (19 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.128: +32 -2 lines
Diff to previous 1.128 (colored)

Add sdtossd() by HOSOKAWA Tatsumi, and a C version of ssdtosd() by me.

Revision 1.128 / (download) - annotate - [select for diffs], Fri Nov 4 00:44:32 1994 UTC (19 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.127: +2 -1 lines
Diff to previous 1.127 (colored)

Need some constants from isareg.h.

Revision 1.127 / (download) - annotate - [select for diffs], Fri Nov 4 00:00:58 1994 UTC (19 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.126: +1 -2 lines
Diff to previous 1.126 (colored)

isa.h -> isareg.h

Revision 1.126 / (download) - annotate - [select for diffs], Sun Oct 30 19:18:44 1994 UTC (20 years ago) by cgd
Branch: MAIN
CVS Tags: before_newconf_base, before_newconf
Changes since 1.125: +2 -2 lines
Diff to previous 1.125 (colored)

code is u_long for sendsig()

Revision 1.125 / (download) - annotate - [select for diffs], Thu Oct 27 04:15:28 1994 UTC (20 years ago) by cgd
Branch: MAIN
Changes since 1.124: +3 -2 lines
Diff to previous 1.124 (colored)

new RCS ID format.

Revision 1.124 / (download) - annotate - [select for diffs], Wed Oct 26 01:32:23 1994 UTC (20 years ago) by mycroft
Branch: MAIN
Changes since 1.123: +46 -65 lines
Diff to previous 1.123 (colored)

Implement new system call entry method.  Clean up all of the IDT frobnication
code.

Revision 1.123 / (download) - annotate - [select for diffs], Thu Oct 20 04:43:21 1994 UTC (20 years ago) by cgd
Branch: MAIN
Changes since 1.122: +8 -9 lines
Diff to previous 1.122 (colored)

update for new syscall args description mechanism

Revision 1.122 / (download) - annotate - [select for diffs], Sun Oct 9 12:57:15 1994 UTC (20 years ago) by mycroft
Branch: MAIN
Changes since 1.121: +33 -33 lines
Diff to previous 1.121 (colored)

Make reg, frame, and sigcontext more similar.

Revision 1.121 / (download) - annotate - [select for diffs], Thu Oct 6 03:36:44 1994 UTC (20 years ago) by mycroft
Branch: MAIN
Changes since 1.120: +13 -1 lines
Diff to previous 1.120 (colored)

Handle Cyrix CPUs a bit differently.  Based on suggestions from Michael
VanLoon.

Revision 1.120 / (download) - annotate - [select for diffs], Wed Sep 7 20:32:45 1994 UTC (20 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.119: +2 -2 lines
Diff to previous 1.119 (colored)

Trivial change of no significance.

Revision 1.119 / (download) - annotate - [select for diffs], Mon Sep 5 01:08:51 1994 UTC (20 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.118: +11 -2 lines
Diff to previous 1.118 (colored)

New iBCS2 code from Scott.

Revision 1.118 / (download) - annotate - [select for diffs], Thu Aug 25 00:10:30 1994 UTC (20 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.117: +16 -6 lines
Diff to previous 1.117 (colored)

If possible, lower the CPU class if the correct one is not configured.

Revision 1.117 / (download) - annotate - [select for diffs], Mon Aug 15 22:38:39 1994 UTC (20 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.116: +1 -10 lines
Diff to previous 1.116 (colored)

Remove misplaced SVR4 dispatch.

Revision 1.116 / (download) - annotate - [select for diffs], Sun Aug 14 22:47:33 1994 UTC (20 years, 2 months ago) by gwr
Branch: MAIN
Changes since 1.115: +47 -5 lines
Diff to previous 1.115 (colored)

Correct bad memory reference when dumpdev == NODEV (i.e. DISKLESS).

Revision 1.115 / (download) - annotate - [select for diffs], Wed Aug 3 06:28:10 1994 UTC (20 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.114: +2 -2 lines
Diff to previous 1.114 (colored)

Actually, preserve PSL_T for debugging.

Revision 1.114 / (download) - annotate - [select for diffs], Wed Aug 3 06:26:00 1994 UTC (20 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.113: +2 -1 lines
Diff to previous 1.113 (colored)

Reset eflags on exec.

Revision 1.113 / (download) - annotate - [select for diffs], Fri Jul 22 22:26:12 1994 UTC (20 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.112: +9 -7 lines
Diff to previous 1.112 (colored)

Make this compile with GCC 2.6.

Revision 1.112 / (download) - annotate - [select for diffs], Wed Jul 20 23:01:26 1994 UTC (20 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.111: +9 -9 lines
Diff to previous 1.111 (colored)

Fix handling of null selectors.

Revision 1.111 / (download) - annotate - [select for diffs], Fri Jul 1 02:58:53 1994 UTC (20 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: netbsd-1-0-base
Branch point for: netbsd-1-0
Changes since 1.110: +1 -2 lines
Diff to previous 1.110 (colored)

exec_aout.h not needed

Revision 1.110 / (download) - annotate - [select for diffs], Tue Jun 14 19:55:06 1994 UTC (20 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.109: +3 -2 lines
Diff to previous 1.109 (colored)

Print `rebooting...' before doing so.

Revision 1.109 / (download) - annotate - [select for diffs], Tue May 24 07:23:01 1994 UTC (20 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.108: +2 -1 lines
Diff to previous 1.108 (colored)

Cx486DLC is a 486-style cpu (plus bugs)

Revision 1.108 / (download) - annotate - [select for diffs], Mon May 23 03:02:24 1994 UTC (20 years, 5 months ago) by cgd
Branch: MAIN
Changes since 1.107: +5 -4 lines
Diff to previous 1.107 (colored)

cast to quiet warnings, also change pagability of buffer_map

Revision 1.107 / (download) - annotate - [select for diffs], Sun May 22 10:17:26 1994 UTC (20 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.106: +39 -16 lines
Diff to previous 1.106 (colored)

prelim svr4 stuff from <christos@deshaw.com>

Revision 1.106 / (download) - annotate - [select for diffs], Thu May 19 06:33:49 1994 UTC (20 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.105: +8 -18 lines
Diff to previous 1.105 (colored)

I don't have a VAX.

Revision 1.105 / (download) - annotate - [select for diffs], Sat May 7 06:34:04 1994 UTC (20 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.104: +2 -3 lines
Diff to previous 1.104 (colored)

Minor optimization.

Revision 1.104 / (download) - annotate - [select for diffs], Sat May 7 00:58:03 1994 UTC (20 years, 5 months ago) by cgd
Branch: MAIN
Changes since 1.103: +70 -18 lines
Diff to previous 1.103 (colored)

cpu-dependent sysctl stuff, and signal stack changes

Revision 1.103 / (download) - annotate - [select for diffs], Fri May 6 01:43:34 1994 UTC (20 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.102: +3 -10 lines
Diff to previous 1.102 (colored)

Remove a mostly useless useracc().

Revision 1.102 / (download) - annotate - [select for diffs], Thu May 5 05:35:48 1994 UTC (20 years, 5 months ago) by cgd
Branch: MAIN
Changes since 1.101: +10 -9 lines
Diff to previous 1.101 (colored)

lots of changes: prototype migration, move lots of variables, definitions,
and structure elements around.  kill some unnecessary type and macro
definitions.  standardize clock handling.  More changes than you'd want.

Revision 1.101 / (download) - annotate - [select for diffs], Thu Apr 21 07:45:53 1994 UTC (20 years, 6 months ago) by cgd
Branch: MAIN
Changes since 1.100: +2 -2 lines
Diff to previous 1.100 (colored)

kill bogon.

Revision 1.100 / (download) - annotate - [select for diffs], Mon Apr 18 23:52:06 1994 UTC (20 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.99: +6 -4 lines
Diff to previous 1.99 (colored)

Eliminate silly warning.

Revision 1.99 / (download) - annotate - [select for diffs], Fri Apr 15 07:15:27 1994 UTC (20 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.98: +39 -17 lines
Diff to previous 1.98 (colored)

Small optimization.

Revision 1.98 / (download) - annotate - [select for diffs], Fri Apr 15 07:04:22 1994 UTC (20 years, 6 months ago) by cgd
Branch: MAIN
Changes since 1.97: +2 -2 lines
Diff to previous 1.97 (colored)

convert vm system to use new queues.  I'll never write code w/queues again.

Revision 1.97 / (download) - annotate - [select for diffs], Fri Apr 8 19:15:52 1994 UTC (20 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.96: +4 -2 lines
Diff to previous 1.96 (colored)

Do the last bit differently; if npx is configured, use npxexit(), else turn on
emulation manually.

Revision 1.96 / (download) - annotate - [select for diffs], Fri Apr 8 19:10:18 1994 UTC (20 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.95: +3 -3 lines
Diff to previous 1.95 (colored)

Fix FP initialization if no npx device.

Revision 1.95 / (download) - annotate - [select for diffs], Thu Apr 7 06:48:46 1994 UTC (20 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.94: +2 -2 lines
Diff to previous 1.94 (colored)

Implement dynamic IRQ configuration and IRQ sharing.  Inline spl*() calls.
Reorganize and clean up the relevant code.

Revision 1.94 / (download) - annotate - [select for diffs], Tue Apr 5 19:09:14 1994 UTC (20 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.93: +34 -23 lines
Diff to previous 1.93 (colored)

Optimize _insque() and _remque(), and remove all the casts.

Revision 1.93 / (download) - annotate - [select for diffs], Tue Apr 5 17:56:26 1994 UTC (20 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.92: +4 -9 lines
Diff to previous 1.92 (colored)

Various cleanup.

Revision 1.92 / (download) - annotate - [select for diffs], Tue Mar 29 04:38:08 1994 UTC (20 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.91: +3 -1 lines
Diff to previous 1.91 (colored)

Update for new autoconfig.

Revision 1.91 / (download) - annotate - [select for diffs], Thu Mar 24 21:50:33 1994 UTC (20 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.90: +20 -20 lines
Diff to previous 1.90 (colored)

Small code clean up, and make the normal cases a few cycles faster.

Revision 1.90 / (download) - annotate - [select for diffs], Sun Mar 6 17:20:08 1994 UTC (20 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.89: +4 -4 lines
Diff to previous 1.89 (colored)

DELAY() --> delay().  This is not a macro.

Revision 1.89 / (download) - annotate - [select for diffs], Fri Feb 25 22:30:34 1994 UTC (20 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.88: +3 -4 lines
Diff to previous 1.88 (colored)

Fix typo.

Revision 1.88 / (download) - annotate - [select for diffs], Fri Feb 25 21:11:50 1994 UTC (20 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.87: +22 -17 lines
Diff to previous 1.87 (colored)

Speed up sigreturn() checking.

Revision 1.87 / (download) - annotate - [select for diffs], Thu Feb 24 05:03:03 1994 UTC (20 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.86: +3 -3 lines
Diff to previous 1.86 (colored)

Check copyin/out return values correctly.

Revision 1.86 / (download) - annotate - [select for diffs], Fri Feb 18 02:23:31 1994 UTC (20 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.85: +6 -2 lines
Diff to previous 1.85 (colored)

Do the right thing for late model 486s.

Revision 1.85 / (download) - annotate - [select for diffs], Tue Feb 1 05:37:17 1994 UTC (20 years, 8 months ago) by mycroft
Branch: MAIN
CVS Tags: magnum-base
Changes since 1.84: +1 -5 lines
Diff to previous 1.84 (colored)

panic() is now varargs.

Revision 1.84 / (download) - annotate - [select for diffs], Thu Jan 27 07:17:30 1994 UTC (20 years, 9 months ago) by cgd
Branch: MAIN
Changes since 1.83: +19 -2 lines
Diff to previous 1.83 (colored)

stub consinit() so it's not needed in cons.c, and mark some XXX's

Revision 1.83 / (download) - annotate - [select for diffs], Thu Jan 20 23:08:13 1994 UTC (20 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.82: +4 -4 lines
Diff to previous 1.82 (colored)

Someone needs to find his space bar.

Revision 1.82 / (download) - annotate - [select for diffs], Thu Jan 20 21:22:06 1994 UTC (20 years, 9 months ago) by ws
Branch: MAIN
Changes since 1.81: +55 -62 lines
Diff to previous 1.81 (colored)

Make signal handling code use copyin/copyout instead of
direct access to user data.
Make procfs really work for debugging.
Implement not & notepg files in procfs.

Revision 1.81 / (download) - annotate - [select for diffs], Thu Jan 20 19:58:52 1994 UTC (20 years, 9 months ago) by ws
Branch: MAIN
Changes since 1.80: +2 -2 lines
Diff to previous 1.80 (colored)

Correct parameters of sync

Revision 1.80 / (download) - annotate - [select for diffs], Sun Jan 16 03:08:58 1994 UTC (20 years, 9 months ago) by cgd
Branch: MAIN
Changes since 1.79: +7 -4 lines
Diff to previous 1.79 (colored)

casting for exec_package field changes

Revision 1.79 / (download) - annotate - [select for diffs], Fri Jan 14 02:58:37 1994 UTC (20 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.78: +2 -2 lines
Diff to previous 1.78 (colored)

Totally trivial anality, not worth mailing about.

Revision 1.78 / (download) - annotate - [select for diffs], Thu Jan 13 06:24:27 1994 UTC (20 years, 9 months ago) by cgd
Branch: MAIN
Changes since 1.77: +1 -3 lines
Diff to previous 1.77 (colored)

use exec_map

Revision 1.77 / (download) - annotate - [select for diffs], Thu Jan 13 04:00:09 1994 UTC (20 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.76: +10 -8 lines
Diff to previous 1.76 (colored)

Change the bufpages calculation back to .10min(physmem,2mb)+.05max(0,physmem-2mb).

Revision 1.76 / (download) - annotate - [select for diffs], Tue Jan 11 22:35:55 1994 UTC (20 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.75: +2 -2 lines
Diff to previous 1.75 (colored)

Fix typos.

Revision 1.75 / (download) - annotate - [select for diffs], Tue Jan 11 21:46:49 1994 UTC (20 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.74: +22 -18 lines
Diff to previous 1.74 (colored)

Fix the segment validation in sigreturn().

Revision 1.74 / (download) - annotate - [select for diffs], Tue Jan 11 19:19:01 1994 UTC (20 years, 9 months ago) by brezak
Branch: MAIN
Changes since 1.73: +24 -2 lines
Diff to previous 1.73 (colored)

Check the users selectors in sigreturn()

Revision 1.73 / (download) - annotate - [select for diffs], Tue Jan 11 17:51:40 1994 UTC (20 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.72: +22 -26 lines
Diff to previous 1.72 (colored)

Synchronize some more bits.

Revision 1.72 / (download) - annotate - [select for diffs], Sun Jan 9 14:59:42 1994 UTC (20 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.71: +10 -11 lines
Diff to previous 1.71 (colored)

Don't bogusly save the supervisor stack on signals.  Correct PSL checks.  Fix
some return values from sigreturn().

Revision 1.71 / (download) - annotate - [select for diffs], Sat Jan 8 16:07:00 1994 UTC (20 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.70: +1 -1 lines
Diff to previous 1.70 (colored)

Use NULLVP, just for Correctness (tm).

Revision 1.70 / (download) - annotate - [select for diffs], Sat Jan 8 11:12:58 1994 UTC (20 years, 9 months ago) by cgd
Branch: MAIN
Changes since 1.69: +0 -93 lines
Diff to previous 1.69 (colored)

code reorg

Revision 1.69 / (download) - annotate - [select for diffs], Sat Jan 8 07:14:37 1994 UTC (20 years, 9 months ago) by cgd
Branch: MAIN
Changes since 1.68: +12 -23 lines
Diff to previous 1.68 (colored)

far reaching but relatively minor cleanup and slight reorg of exec code

Revision 1.68 / (download) - annotate - [select for diffs], Sat Jan 8 05:45:20 1994 UTC (20 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.67: +2 -2 lines
Diff to previous 1.67 (colored)

Fix two casts.

Revision 1.67 / (download) - annotate - [select for diffs], Thu Jan 6 23:59:15 1994 UTC (20 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.66: +1 -0 lines
Diff to previous 1.66 (colored)

Declare a return type explicitly.

Revision 1.66 / (download) - annotate - [select for diffs], Tue Jan 4 00:02:38 1994 UTC (20 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.65: +0 -9 lines
Diff to previous 1.65 (colored)

Default address is now 0xfe100000; assume we aren't going to revert.

Revision 1.65 / (download) - annotate - [select for diffs], Mon Jan 3 16:21:51 1994 UTC (20 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.64: +2 -4 lines
Diff to previous 1.64 (colored)

Inline all the [lr]cr[023]() `functions' in cpufunc.h.

Revision 1.64 / (download) - annotate - [select for diffs], Wed Dec 22 13:07:47 1993 UTC (20 years, 10 months ago) by cgd
Branch: MAIN
Changes since 1.63: +2 -2 lines
Diff to previous 1.63 (colored)

rename struct 'regs' to 'reg'

Revision 1.63 / (download) - annotate - [select for diffs], Mon Dec 20 06:40:55 1993 UTC (20 years, 10 months ago) by cgd
Branch: MAIN
Changes since 1.62: +4 -0 lines
Diff to previous 1.62 (colored)

change panic() for "unknown cpu type" so that it's only got one arg;
"#ifdef notdef" the old way; panic() will be upgraded eventually...

Revision 1.62 / (download) - annotate - [select for diffs], Sun Dec 19 06:58:12 1993 UTC (20 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.61: +2 -7 lines
Diff to previous 1.61 (colored)

Clean up trap handling and macroize interrupt entry and exit code.  From
magnum branch.

Revision 1.61 / (download) - annotate - [select for diffs], Fri Dec 17 00:10:08 1993 UTC (20 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.60: +0 -6 lines
Diff to previous 1.60 (colored)

From magnum branch:
Remove Jolitz's netisr kluge.  Make sure cpl == 0 really means base priority.
Other minor cleanup.

Revision 1.60 / (download) - annotate - [select for diffs], Wed Dec 15 11:33:47 1993 UTC (20 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.59: +1 -0 lines
Diff to previous 1.59 (colored)

Minor change.

Revision 1.59 / (download) - annotate - [select for diffs], Wed Dec 15 09:31:35 1993 UTC (20 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.58: +510 -658 lines
Diff to previous 1.58 (colored)

Cleanup of startup and signal handling code from magnum branch.

Revision 1.58 / (download) - annotate - [select for diffs], Tue Dec 14 05:31:23 1993 UTC (20 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.57: +0 -45 lines
Diff to previous 1.57 (colored)

Fold in most of the magnum vm changes.

Revision 1.57 / (download) - annotate - [select for diffs], Sun Nov 14 13:21:59 1993 UTC (20 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.56: +20 -0 lines
Diff to previous 1.56 (colored)

Add the System V message queue and semaphore facilities.  Implemented
by Daniel Boulet <danny@BouletFermat.ab.ca>

Revision 1.56 / (download) - annotate - [select for diffs], Fri Oct 29 02:15:30 1993 UTC (21 years ago) by cgd
Branch: MAIN
Changes since 1.55: +0 -29 lines
Diff to previous 1.55 (colored)

kill physstrat

Revision 1.55 / (download) - annotate - [select for diffs], Tue Oct 26 15:54:19 1993 UTC (21 years ago) by brezak
Branch: MAIN
Changes since 1.54: +10 -28 lines
Diff to previous 1.54 (colored)

Cleanup LDT/GDT defines

Revision 1.54 / (download) - annotate - [select for diffs], Mon Oct 18 23:14:13 1993 UTC (21 years ago) by cgd
Branch: MAIN
Changes since 1.53: +4 -5 lines
Diff to previous 1.53 (colored)

fix the 'size allocated vs. MAXBSIZE' check for buffers.  Instead
of making vfs_bio *and* machdep.c deal with it, just deal with it
here, where we actually allocate the physical memory for pages.

Revision 1.53 / (download) - annotate - [select for diffs], Fri Oct 15 11:55:39 1993 UTC (21 years ago) by cgd
Branch: MAIN
Changes since 1.52: +2 -0 lines
Diff to previous 1.52 (colored)

add back the bufpages limit

Revision 1.52 / (download) - annotate - [select for diffs], Wed Oct 13 08:25:57 1993 UTC (21 years ago) by cgd
Branch: MAIN
Changes since 1.51: +0 -212 lines
Diff to previous 1.51 (colored)

sysarch() belongs in sys_machdep.c

Revision 1.51 / (download) - annotate - [select for diffs], Mon Oct 4 04:57:09 1993 UTC (21 years ago) by cgd
Branch: MAIN
Changes since 1.50: +2 -7 lines
Diff to previous 1.50 (colored)

make nbuf = bufpages, now that vfs_bio can do the rational thing.

Revision 1.50 / (download) - annotate - [select for diffs], Wed Sep 29 04:51:12 1993 UTC (21 years, 1 month ago) by cgd
Branch: MAIN
Changes since 1.49: +3 -9 lines
Diff to previous 1.49 (colored)

get rid of an "#if 0", and allocate buffers here.

Revision 1.49 / (download) - annotate - [select for diffs], Sun Sep 19 19:00:49 1993 UTC (21 years, 1 month ago) by brezak
Branch: MAIN
Changes since 1.48: +290 -37 lines
Diff to previous 1.48 (colored)

Changes for per-process/user settable LDT and full sigcontexts

Revision 1.48 / (download) - annotate - [select for diffs], Thu Sep 16 03:24:29 1993 UTC (21 years, 1 month ago) by brezak
Branch: MAIN
Changes since 1.47: +65 -133 lines
Diff to previous 1.47 (colored)

Changes to use a trap frame for syscalls.

Revision 1.47 / (download) - annotate - [select for diffs], Sun Sep 5 03:54:11 1993 UTC (21 years, 1 month ago) by sef
Branch: MAIN
Branch point for: magnum
Changes since 1.46: +112 -1 lines
Diff to previous 1.46 (colored)

Yet more of the ptrace() reorg; now ptrace_setregs() and ptrace_getregs()
are present, along with PT_GETREGS and PT_SETREGS ptrace commands.

Revision 1.46 / (download) - annotate - [select for diffs], Sun Sep 5 01:31:39 1993 UTC (21 years, 1 month ago) by cgd
Branch: MAIN
Changes since 1.45: +34 -5 lines
Diff to previous 1.45 (colored)

update for new exec; a few name changes and (*gasp*) addition of comments.

Revision 1.45 / (download) - annotate - [select for diffs], Sat Sep 4 05:32:18 1993 UTC (21 years, 1 month ago) by cgd
Branch: MAIN
Changes since 1.44: +39 -1 lines
Diff to previous 1.44 (colored)

better ptrace() support from Sean Eric Fagan <sef@kithrup.com>

Revision 1.44 / (download) - annotate - [select for diffs], Sat Sep 4 01:29:22 1993 UTC (21 years, 1 month ago) by cgd
Branch: MAIN
Changes since 1.43: +2 -2 lines
Diff to previous 1.43 (colored)

get rid of bogosities of the form "vm_maxsaddr + MAXSSIZ", and replace
them with USRSTACK.  the former was a hack by wfj to accomodate his screwy
execve() implementation.  the latter is a (minor) reversion to net/2.

Revision 1.43 / (download) - annotate - [select for diffs], Fri Aug 27 23:52:28 1993 UTC (21 years, 2 months ago) by brezak
Branch: MAIN
Changes since 1.42: +110 -9 lines
Diff to previous 1.42 (colored)

i386 Machine dependant changes to handle non-contiguous memory.

Revision 1.42 / (download) - annotate - [select for diffs], Thu Jul 22 13:04:21 1993 UTC (21 years, 3 months ago) by brezak
Branch: MAIN
Changes since 1.41: +2 -5 lines
Diff to previous 1.41 (colored)

Call ddb_init instead of kdb_init.

Revision 1.41 / (download) - annotate - [select for diffs], Mon Jul 19 16:38:35 1993 UTC (21 years, 3 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-0-9-patch-001, netbsd-0-9-base, netbsd-0-9-RELEASE, netbsd-0-9-BETA, netbsd-0-9-ALPHA2, netbsd-0-9-ALPHA
Branch point for: netbsd-0-9
Changes since 1.40: +22 -21 lines
Diff to previous 1.40 (colored)

replace jolitz's vfs__bio with a better one from CMU via mw.
so, replace vfs__bio, and deal with attendant changes.

Revision 1.40 / (download) - annotate - [select for diffs], Sun Jul 18 08:23:07 1993 UTC (21 years, 3 months ago) by andrew
Branch: MAIN
Changes since 1.39: +23 -84 lines
Diff to previous 1.39 (colored)

* copyin/out(), copyin/outstr(), s/fubyte() et al protection fixes,
including COW support, using code based on that from Wolfgang Solfrank and
Christoph Robitschko.

* user segment descriptors fixed to disallow access to user area.

* bde's boot >= 1MB fixes.

Revision 1.39 / (download) - annotate - [select for diffs], Sat Jul 17 16:06:44 1993 UTC (21 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.38: +6 -4 lines
Diff to previous 1.38 (colored)

Finish moving struct definitions outside of function declarations.

Revision 1.38 / (download) - annotate - [select for diffs], Mon Jul 12 12:00:45 1993 UTC (21 years, 3 months ago) by cgd
Branch: MAIN
Changes since 1.37: +7 -3 lines
Diff to previous 1.37 (colored)

physmem is in clusters, not in bytes...  that wasn't
taken into account in the buffer size calculations

Revision 1.37 / (download) - annotate - [select for diffs], Thu Jul 8 09:55:54 1993 UTC (21 years, 3 months ago) by cgd
Branch: MAIN
Changes since 1.36: +10 -1 lines
Diff to previous 1.36 (colored)

add "diediedie", a function to make the system panic & dump core
in a nice, predictable fashion.  useful for DDB, when you want
a core...  (i.e. "call diediedie")

Revision 1.36 / (download) - annotate - [select for diffs], Wed Jul 7 06:02:26 1993 UTC (21 years, 3 months ago) by cgd
Branch: MAIN
Changes since 1.35: +52 -4 lines
Diff to previous 1.35 (colored)

make the rlist code all go away.  replace it with resource map code,
as written by Wolfgang Solfrank.

Revision 1.35 / (download) - annotate - [select for diffs], Tue Jul 6 00:48:06 1993 UTC (21 years, 3 months ago) by cgd
Branch: MAIN
Changes since 1.34: +12 -12 lines
Diff to previous 1.34 (colored)

change the way dump info is printed back to the original (net/2) way,
rather than the jolitz way...

Revision 1.34 / (download) - annotate - [select for diffs], Mon Jul 5 01:53:56 1993 UTC (21 years, 3 months ago) by cgd
Branch: MAIN
Changes since 1.33: +2 -1 lines
Diff to previous 1.33 (colored)

add support for checking entry against max user address

Revision 1.33 / (download) - annotate - [select for diffs], Sun Jul 4 10:48:39 1993 UTC (21 years, 3 months ago) by cgd
Branch: MAIN
Changes since 1.32: +5 -2 lines
Diff to previous 1.32 (colored)

make i386 setregs do the "normal thing".  should probably do something
better with retval... (currenty does nothing)

Revision 1.32 / (download) - annotate - [select for diffs], Sun Jun 27 06:02:52 1993 UTC (21 years, 4 months ago) by andrew
Branch: MAIN
Changes since 1.31: +11 -4 lines
Diff to previous 1.31 (colored)

ANSIfications - removed all implicit function return types and argument
definitions.  Ensured that all files include "systm.h" to gain access to
general prototypes.  Casts where necessary.

Revision 1.31 / (download) - annotate - [select for diffs], Fri Jun 18 06:50:58 1993 UTC (21 years, 4 months ago) by cgd
Branch: MAIN
Changes since 1.30: +142 -18 lines
Diff to previous 1.30 (colored)

convert magic numbers to network byte order, and attendent changes

Revision 1.30 / (download) - annotate - [select for diffs], Fri Jun 18 02:03:42 1993 UTC (21 years, 4 months ago) by brezak
Branch: MAIN
Changes since 1.29: +4 -2 lines
Diff to previous