CVS log for src/sys/amd64/amd64/machdep.c
Up to [FreeBSD] / src / sys / amd64 / amd64
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
Revision 1.707.2.27: download - view: text, markup, annotated - select for diffs
Sun Jan 22 21:25:47 2012 UTC (2 weeks, 3 days ago) by gavin
Branches: RELENG_8
Diff to: previous 1.707.2.26: preferred, colored; branchpoint 1.707: preferred, colored; next MAIN 1.708: preferred, colored
Changes since revision 1.707.2.26: +5 -2 lines
SVN rev 230472 on 2012-01-22 21:25:47Z by gavin
Merge r229085 from head:
Default to not performing the early-boot memory tests when we detect we
are booting inside a VM. There are three reasons to disable this:
o It causes the VM host to believe that all the tested pages or RAM are
in use. This in turn may force the host to page out pages of RAM
belonging to other VMs, or otherwise cause problems with fair resource
sharing on the VM cluster.
o It adds significant time to the boot process (around 1 second/Gig in
testing)
o It is unnecessary - the host should have already verified that the
memory is functional etc.
Note that this simply changes the default when in a VM - it can still be
overridden using the hw.memtest.tests tunable.
Early MFC requested by: bz
Revision 1.759: download - view: text, markup, annotated - select for diffs
Sat Jan 21 17:45:27 2012 UTC (2 weeks, 5 days ago) by kib
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.758: preferred, colored
Changes since revision 1.758: +112 -28 lines
SVN rev 230426 on 2012-01-21 17:45:27Z by kib Add support for the extended FPU states on amd64, both for native 64bit and 32bit ABIs. As a side-effect, it enables AVX on capable CPUs. In particular: - Query the CPU support for XSAVE, list of the supported extensions and the required size of FPU save area. The hw.use_xsave tunable is provided for disabling XSAVE, and hw.xsave_mask may be used to select the enabled extensions. - Remove the FPU save area from PCB and dynamically allocate the (run-time sized) user save area on the top of the kernel stack, right above the PCB. Reorganize the thread0 PCB initialization to postpone it after BSP is queried for save area size. - The dumppcb, stoppcbs and susppcbs now do not carry the FPU state as well. FPU state is only useful for suspend, where it is saved in dynamically allocated suspfpusave area. - Use XSAVE and XRSTOR to save/restore FPU state, if supported and enabled. - Define new mcontext_t flag _MC_HASFPXSTATE, indicating that mcontext_t has a valid pointer to out-of-struct extended FPU state. Signal handlers are supplied with stack-allocated fpu state. The sigreturn(2) and setcontext(2) syscall honour the flag, allowing the signal handlers to inspect and manipilate extended state in the interrupted context. - The getcontext(2) never returns extended state, since there is no place in the fixed-sized mcontext_t to place variable-sized save area. And, since mcontext_t is embedded into ucontext_t, makes it impossible to fix in a reasonable way. Instead of extending getcontext(2) syscall, provide a sysarch(2) facility to query extended FPU state. - Add ptrace(2) support for getting and setting extended state; while there, implement missed PT_I386_{GET,SET}XMMREGS for 32bit binaries. - Change fpu_kern KPI to not expose struct fpu_kern_ctx layout to consumers, making it opaque. Internally, struct fpu_kern_ctx now contains a space for the extended state. Convert in-kernel consumers of fpu_kern KPI both on i386 and amd64. First version of the support for AVX was submitted by Tim Bird <tim.bird am sony com> on behalf of Sony. This version was written from scratch. Tested by: pho (previous version), Yamagi Burmeister <lists yamagi org> MFC after: 1 month
Revision 1.675.2.21: download - view: text, markup, annotated - select for diffs
Tue Jan 17 22:09:33 2012 UTC (3 weeks, 1 day ago) by bz
Branches: RELENG_7
Diff to: previous 1.675.2.20: preferred, colored; branchpoint 1.675: preferred, colored; next MAIN 1.676: preferred, colored
Changes since revision 1.675.2.20: +2 -3 lines
SVN rev 230285 on 2012-01-17 22:09:33Z by bz MFC r225048: In this branch when doing no further checkes there is no reason use the temporary variable and check with if as TUNABLE_*_FETCH do not alter values unless successfully found the tunable.
Revision 1.707.2.26: download - view: text, markup, annotated - select for diffs
Tue Jan 17 22:08:58 2012 UTC (3 weeks, 1 day ago) by bz
Branches: RELENG_8
Diff to: previous 1.707.2.25: preferred, colored; branchpoint 1.707: preferred, colored
Changes since revision 1.707.2.25: +2 -3 lines
SVN rev 230284 on 2012-01-17 22:08:58Z by bz MFC r225048: In this branch when doing no further checkes there is no reason use the temporary variable and check with if as TUNABLE_*_FETCH do not alter values unless successfully found the tunable.
Revision 1.675.2.20: download - view: text, markup, annotated - select for diffs
Tue Jan 17 22:02:30 2012 UTC (3 weeks, 1 day ago) by bz
Branches: RELENG_7
Diff to: previous 1.675.2.19: preferred, colored; branchpoint 1.675: preferred, colored
Changes since revision 1.675.2.19: +12 -1 lines
SVN rev 230283 on 2012-01-17 22:02:30Z by bz MFC r224516: Introduce a tunable to disable the time consuming parts of bootup memtesting, which can easily save seconds to minutes of boot time. The tunable name is kept general to allow reusing the code in alternate frameworks.
Revision 1.707.2.25: download - view: text, markup, annotated - select for diffs
Tue Jan 17 22:02:11 2012 UTC (3 weeks, 1 day ago) by bz
Branches: RELENG_8
Diff to: previous 1.707.2.24: preferred, colored; branchpoint 1.707: preferred, colored
Changes since revision 1.707.2.24: +12 -1 lines
SVN rev 230282 on 2012-01-17 22:02:11Z by bz MFC r224516: Introduce a tunable to disable the time consuming parts of bootup memtesting, which can easily save seconds to minutes of boot time. The tunable name is kept general to allow reusing the code in alternate frameworks.
Revision 1.754.2.3: download - view: text, markup, annotated - select for diffs
Tue Jan 17 13:52:04 2012 UTC (3 weeks, 2 days ago) by gavin
Branches: RELENG_9
Diff to: previous 1.754.2.2: preferred, colored; branchpoint 1.754: preferred, colored; next MAIN 1.755: preferred, colored
Changes since revision 1.754.2.2: +5 -2 lines
SVN rev 230266 on 2012-01-17 13:52:04Z by gavin
Merge r229085 from head:
Default to not performing the early-boot memory tests when we detect we
are booting inside a VM. There are three reasons to disable this:
o It causes the VM host to believe that all the tested pages or RAM are
in use. This in turn may force the host to page out pages of RAM
belonging to other VMs, or otherwise cause problems with fair resource
sharing on the VM cluster.
o It adds significant time to the boot process (around 1 second/Gig in
testing)
o It is unnecessary - the host should have already verified that the
memory is functional etc.
Note that this simply changes the default when in a VM - it can still be
overridden using the hw.memtest.tests tunable.
Early MFC requested by: bz
Revision 1.707.2.24: download - view: text, markup, annotated - select for diffs
Sun Jan 1 18:59:35 2012 UTC (5 weeks, 4 days ago) by kib
Branches: RELENG_8
Diff to: previous 1.707.2.23: preferred, colored; branchpoint 1.707: preferred, colored
Changes since revision 1.707.2.23: +2 -1 lines
SVN rev 229187 on 2012-01-01 18:59:35Z by kib MFC r227394: Stopped process may legitimately have some threads sleeping and not suspended, if the sleep is uninterruptible. MFC r227442: Weaken the part of assertions added in the r227394. Only check that the process state is stopped.
Revision 1.754.2.2: download - view: text, markup, annotated - select for diffs
Sun Jan 1 18:54:29 2012 UTC (5 weeks, 4 days ago) by kib
Branches: RELENG_9
Diff to: previous 1.754.2.1: preferred, colored; branchpoint 1.754: preferred, colored
Changes since revision 1.754.2.1: +2 -1 lines
SVN rev 229186 on 2012-01-01 18:54:29Z by kib MFC r227394: Stopped process may legitimately have some threads sleeping and not suspended, if the sleep is uninterruptible. MFC r227442: Weaken the part of assertions added in the r227394. Only check that the process state is stopped.
Revision 1.758: download - view: text, markup, annotated - select for diffs
Sat Dec 31 13:24:53 2011 UTC (5 weeks, 5 days ago) by gavin
Branches: MAIN
Diff to: previous 1.757: preferred, colored
Changes since revision 1.757: +5 -2 lines
SVN rev 229085 on 2011-12-31 13:24:53Z by gavin Default to not performing the early-boot memory tests when we detect we are booting inside a VM. There are three reasons to disable this: o It causes the VM host to believe that all the tested pages or RAM are in use. This in turn may force the host to page out pages of RAM belonging to other VMs, or otherwise cause problems with fair resource sharing on the VM cluster. o It adds significant time to the boot process (around 1 second/Gig in testing) o It is unnecessary - the host should have already verified that the memory is functional etc. Note that this simply changes the default when in a VM - it can still be overridden using the hw.memtest.tests tunable. MFC after: 4 weeks
Revision 1.754.2.1.2.1: download - view: text, markup, annotated - select for diffs
Fri Nov 11 04:20:22 2011 UTC (2 months, 4 weeks ago) by kensmith
Branches: RELENG_9_0
CVS tags: RELENG_9_0_0_RELEASE
Diff to: previous 1.754.2.1: preferred, colored; next MAIN 1.754.2.2: preferred, colored
Changes since revision 1.754.2.1: +0 -0 lines
SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release cycle. Approved by: re (implicit)
Revision 1.757: download - view: text, markup, annotated - select for diffs
Fri Nov 11 04:10:36 2011 UTC (2 months, 4 weeks ago) by kib
Branches: MAIN
Diff to: previous 1.756: preferred, colored
Changes since revision 1.756: +1 -1 lines
SVN rev 227442 on 2011-11-11 04:10:36Z by kib Weaken the part of assertions added in the r227394. Only check that the process state is stopped. MFC after: 1 week
Revision 1.756: download - view: text, markup, annotated - select for diffs
Wed Nov 9 17:25:43 2011 UTC (3 months ago) by kib
Branches: MAIN
Diff to: previous 1.755: preferred, colored
Changes since revision 1.755: +2 -1 lines
SVN rev 227394 on 2011-11-09 17:25:43Z by kib Stopped process may legitimately have some threads sleeping and not suspended, if the sleep is uninterruptible. Reported and tested by: pho MFC after: 1 week
Revision 1.755: download - view: text, markup, annotated - select for diffs
Mon Oct 3 14:23:00 2011 UTC (4 months, 1 week ago) by attilio
Branches: MAIN
Diff to: previous 1.754: preferred, colored
Changes since revision 1.754: +36 -7 lines
SVN rev 225936 on 2011-10-03 14:23:00Z by attilio Add some improvements in the idle table callbacks: - Replace instances of manual assembly instruction "hlt" call with halt() function calling. - In cpu_idle_mwait() avoid races in check to sched_runnable() using the same pattern used in cpu_idle_hlt() with the 'hlt' instruction. - Add comments explaining the logic behind the pattern used in cpu_idle_hlt() and other idle callbacks. In collabouration with: jhb, mav Reviewed by: adri, kib MFC after: 3 weeks
Revision 1.754.2.1: download - view: text, markup, annotated - select for diffs
Fri Sep 23 00:51:37 2011 UTC (4 months, 2 weeks ago) by kensmith
Branches: RELENG_9
CVS tags: RELENG_9_0_BP
Branch point for: RELENG_9_0
Diff to: previous 1.754: preferred, colored
Changes since revision 1.754: +0 -0 lines
SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith Copy head to stable/9 as part of 9.0-RELEASE release cycle. Approved by: re (implicit)
Revision 1.754: download - view: text, markup, annotated - select for diffs
Fri Sep 16 13:58:51 2011 UTC (4 months, 3 weeks ago) by kmacy
Branches: MAIN
CVS tags: RELENG_9_BP
Branch point for: RELENG_9
Diff to: previous 1.753: preferred, colored
Changes since revision 1.753: +2 -2 lines
SVN rev 225617 on 2011-09-16 13:58:51Z by kmacy In order to maximize the re-usability of kernel code in user space this patch modifies makesyscalls.sh to prefix all of the non-compatibility calls (e.g. not linux_, freebsd32_) with sys_ and updates the kernel entry points and all places in the code that use them. It also fixes an additional name space collision between the kernel function psignal and the libc function of the same name by renaming the kernel psignal kern_psignal(). By introducing this change now we will ease future MFCs that change syscalls. Reviewed by: rwatson Approved by: re (bz)
Revision 1.753: download - view: text, markup, annotated - select for diffs
Sat Aug 20 19:21:46 2011 UTC (5 months, 2 weeks ago) by bz
Branches: MAIN
Diff to: previous 1.752: preferred, colored
Changes since revision 1.752: +2 -3 lines
SVN rev 225048 on 2011-08-20 19:21:46Z by bz In HEAD when doing no further checkes there is no reason use the temporary variable and check with if as TUNABLE_*_FETCH do not alter values unless successfully found the tunable. Reported by: jhb, bde MFC after: 3 days X-MFC with: r224516 Approved by: re (kib)
Revision 1.752: download - view: text, markup, annotated - select for diffs
Sat Jul 30 13:33:05 2011 UTC (6 months, 1 week ago) by bz
Branches: MAIN
Diff to: previous 1.751: preferred, colored
Changes since revision 1.751: +12 -1 lines
SVN rev 224516 on 2011-07-30 13:33:05Z by bz Introduce a tunable to disable the time consuming parts of bootup memtesting, which can easily save seconds to minutes of boot time. The tunable name is kept general to allow reusing the code in alternate frameworks. Requested by: many Discussed on: arch (a while a go) Obtained from: Sandvine Incorporated Reviewed by: sbruno Approved by: re (kib) MFC after: 2 weeks
Revision 1.707.2.23: download - view: text, markup, annotated - select for diffs
Wed Jun 8 21:39:00 2011 UTC (8 months ago) by dchagin
Branches: RELENG_8
Diff to: previous 1.707.2.22: preferred, colored; branchpoint 1.707: preferred, colored
Changes since revision 1.707.2.22: +0 -3 lines
SVN rev 222881 on 2011-06-08 21:39:00Z by dchagin MFC r221784: Remove wrong comment.
Revision 1.751: download - view: text, markup, annotated - select for diffs
Wed Jun 8 08:12:15 2011 UTC (8 months ago) by avg
Branches: MAIN
Diff to: previous 1.750: preferred, colored
Changes since revision 1.750: +4 -3 lines
SVN rev 222853 on 2011-06-08 08:12:15Z by avg remove code for dynamic offlining/onlining of CPUs on x86 The code has definitely been broken for SCHED_ULE, which is a default scheduler. It may have been broken for SCHED_4BSD in more subtle ways, e.g. with manually configured CPU affinities and for interrupt devilery purposes. We still provide a way to disable individual CPUs or all hyperthreading "twin" CPUs before SMP startup. See the UPDATING entry for details. Interaction between building CPU topology and disabling CPUs still remains fuzzy: topology is first built using all availble CPUs and then the disabled CPUs should be "subtracted" from it. That doesn't work well if the resulting topology becomes non-uniform. This work is done in cooperation with Attilio Rao who in addition to reviewing also provided parts of code. PR: kern/145385 Discussed with: gcooper, ambrisko, mdf, sbruno Reviewed by: attilio Tested by: pho, pluknet X-MFC after: never
Revision 1.750: download - view: text, markup, annotated - select for diffs
Wed May 11 17:57:15 2011 UTC (9 months ago) by dchagin
Branches: MAIN
Diff to: previous 1.749: preferred, colored
Changes since revision 1.749: +0 -3 lines
SVN rev 221784 on 2011-05-11 17:57:15Z by dchagin Remove wrong comment. MFC after: 1 week.
Revision 1.675.2.19: download - view: text, markup, annotated - select for diffs
Sun Apr 17 11:35:22 2011 UTC (9 months, 3 weeks ago) by kib
Branches: RELENG_7
Diff to: previous 1.675.2.18: preferred, colored; branchpoint 1.675: preferred, colored
Changes since revision 1.675.2.18: +5 -0 lines
SVN rev 220737 on 2011-04-17 11:35:22Z by kib MFC r218327: Clear the padding when returning context to the usermode, for MI ucontext_t and x86 MD parts. Tested-by: Oliver Pinter <oliver.pntr gmail com>
Revision 1.749: download - view: text, markup, annotated - select for diffs
Tue Apr 12 23:49:07 2011 UTC (9 months, 4 weeks ago) by jkim
Branches: MAIN
Diff to: previous 1.748: preferred, colored
Changes since revision 1.748: +3 -2 lines
SVN rev 220584 on 2011-04-12 23:49:07Z by jkim Reduce errors in effective frequency calculation.
Revision 1.748: download - view: text, markup, annotated - select for diffs
Tue Apr 12 23:04:01 2011 UTC (9 months, 4 weeks ago) by jkim
Branches: MAIN
Diff to: previous 1.747: preferred, colored
Changes since revision 1.747: +24 -25 lines
SVN rev 220583 on 2011-04-12 23:04:01Z by jkim Reinstate cpu_est_clockrate() support for P-state invariant TSC if APERF and MPERF MSRs are available. It was disabled in r216443. Remove the earlier hack to subtract 0.5% from the calibrated frequency as DELAY(9) is little bit more reliable now.
Revision 1.747: download - view: text, markup, annotated - select for diffs
Thu Apr 7 23:28:28 2011 UTC (10 months ago) by jkim
Branches: MAIN
Diff to: previous 1.746: preferred, colored
Changes since revision 1.746: +6 -5 lines
SVN rev 220433 on 2011-04-07 23:28:28Z by jkim Use atomic load & store for TSC frequency. It may be overkill for amd64 but safer for i386 because it can be easily over 4 GHz now. More worse, it can be easily changed by user with 'machdep.tsc_freq' tunable (directly) or cpufreq(4) (indirectly). Note it is intentionally not used in performance critical paths to avoid performance regression (but we should, in theory). Alternatively, we may add "virtual TSC" with lower frequency if maximum frequency overflows 32 bits (and ignore possible incoherency as we do now).
Revision 1.746: download - view: text, markup, annotated - select for diffs
Mon Mar 28 06:35:17 2011 UTC (10 months, 2 weeks ago) by alc
Branches: MAIN
Diff to: previous 1.745: preferred, colored
Changes since revision 1.745: +6 -1 lines
SVN rev 220090 on 2011-03-28 06:35:17Z by alc The new binutils has correctly redefined MAXPAGESIZE on amd64 as 0x200000 instead of 0x100000. As a side effect, an amd64 kernel now loads at physical address 0x200000 instead of 0x100000. This is probably for the best because it avoids the use of a 2MB page mapping for the first 1MB of the kernel that also spans the fixed MTRRs. However, getmemsize() still thinks that the kernel loads at 0x100000, and so the physical memory between 0x100000 and 0x200000 is lost. Fix this problem by replacing the hard-wired constant in getmemsize() by a symbol "kernphys" that is defined by the linker script. In collaboration with: kib
Revision 1.707.2.22: download - view: text, markup, annotated - select for diffs
Tue Mar 15 08:20:59 2011 UTC (10 months, 3 weeks ago) by pluknet
Branches: RELENG_8
Diff to: previous 1.707.2.21: preferred, colored; branchpoint 1.707: preferred, colored
Changes since revision 1.707.2.21: +3 -4 lines
SVN rev 219662 on 2011-03-15 08:20:59Z by pluknet
MFC kern.msgbufsize: r217688-217689,r217709,r218666-218667,r218913.
Note, that arm/{s3c2xx0,econa} exist only in head, thus not merged.
r217688:
Make MSGBUF_SIZE kernel option a loader tunable kern.msgbufsize.
r217689:
Add kern.msgbufsize default setting to /boot/defaults/loader.conf.
r217709,218666-218667,218913 by marcel, cognet:
Fix up for various arm subtargets: call init_param1() before we use
msgbufsize, now that the size of the message buffer is a tunable.
Reviewed by: marcel
Approved by: avg (mentor)
Revision 1.745: download - view: text, markup, annotated - select for diffs
Fri Mar 11 18:56:55 2011 UTC (11 months ago) by mdf
Branches: MAIN
Diff to: previous 1.744: preferred, colored
Changes since revision 1.744: +1 -1 lines
SVN rev 219523 on 2011-03-11 18:56:55Z by mdf Mostly revert r219468, as I had misremembered the C standard regarding the size of an extern array. Keep one change from strncpy to strlcpy.
Revision 1.744: download - view: text, markup, annotated - select for diffs
Fri Mar 11 00:44:32 2011 UTC (11 months ago) by jkim
Branches: MAIN
Diff to: previous 1.743: preferred, colored
Changes since revision 1.743: +27 -10 lines
SVN rev 219473 on 2011-03-11 00:44:32Z by jkim Add a tunable "machdep.disable_tsc" to turn off TSC. Specifically, it turns off boot-time CPU frequency calibration, DELAY(9) with TSC, and using TSC as a CPU ticker. Note tsc_present does not change by this tunable.
Revision 1.743: download - view: text, markup, annotated - select for diffs
Thu Mar 10 22:56:00 2011 UTC (11 months ago) by mdf
Branches: MAIN
Diff to: previous 1.742: preferred, colored
Changes since revision 1.742: +1 -1 lines
SVN rev 219468 on 2011-03-10 22:56:00Z by mdf Use MAXPATHLEN rather than the size of an extern array when copying the kernel name. Also consistenly use strlcpy(). Suggested by: Warner Losh
Revision 1.707.2.21: download - view: text, markup, annotated - select for diffs
Wed Mar 9 12:14:49 2011 UTC (11 months ago) by pluknet
Branches: RELENG_8
Diff to: previous 1.707.2.20: preferred, colored; branchpoint 1.707: preferred, colored
Changes since revision 1.707.2.20: +4 -4 lines
SVN rev 219425 on 2011-03-09 12:14:49Z by pluknet MFC r202897,r208164,r212174: msgbufp mapping changes on amd64. r202897 by alc: Simplify the mapping of the system message buffer. Use the direct map just like ia64 does. r208164 by alc: Correct an error of omission in r202897: Now that amd64 uses the direct map to access the message buffer, we must explicitly request that the underlying physical pages are included in a crash dump. r212174 by avg: vm_page.c: include opt_msgbuf.h for MSGBUF_SIZE use in vm_page_startup Approved by: alc, kib (mentor), avg (mentor)
Revision 1.707.2.20: download - view: text, markup, annotated - select for diffs
Thu Mar 3 00:24:55 2011 UTC (11 months, 1 week ago) by jkim
Branches: RELENG_8
Diff to: previous 1.707.2.19: preferred, colored; branchpoint 1.707: preferred, colored
Changes since revision 1.707.2.19: +0 -3 lines
SVN rev 219212 on 2011-03-03 00:24:55Z by jkim MFC: r217515, r217519, r217539 Add reader/writer lock around mem_range_attr_get() and mem_range_attr_set(). Compile sys/dev/mem/memutil.c for all supported platforms and remove now unnecessary dev_mem_md_init(). Consistently define mem_range_softc from mem.c for all platforms. Add missing #include guards for machine/memdev.h and sys/memrange.h. Clean up some nearby style(9) nits.
Revision 1.707.2.19: download - view: text, markup, annotated - select for diffs
Wed Mar 2 20:04:54 2011 UTC (11 months, 1 week ago) by dchagin
Branches: RELENG_8
Diff to: previous 1.707.2.18: preferred, colored; branchpoint 1.707: preferred, colored
Changes since revision 1.707.2.18: +6 -0 lines
SVN rev 219204 on 2011-03-02 20:04:54Z by dchagin MFC r218744: To avoid excessive code duplication create wrapper for fill regs from stack frame. Change the trap() code to use newly created function instead of explicit regs assignment.
Revision 1.707.2.18: download - view: text, markup, annotated - select for diffs
Wed Mar 2 19:09:49 2011 UTC (11 months, 1 week ago) by jkim
Branches: RELENG_8
Diff to: previous 1.707.2.17: preferred, colored; branchpoint 1.707: preferred, colored
Changes since revision 1.707.2.17: +29 -19 lines
SVN rev 219187 on 2011-03-02 19:09:49Z by jkim MFC: r216634, r216673 Improve PCB flags handling and make it more robust. Add two new functions for manipulating pcb_flags. These inline functions are very similar to atomic_set_int(9) and atomic_clear_int(9) but without unnecessary LOCK prefix for SMP. Add comments about the rationale. Use these functions wherever possible. Although there are some places where it is not strictly necessary (e.g., a PCB is copied to create a new PCB), it is done across the board for sake of consistency. Turn pcb_full_iret into a PCB flag as it is safe now. Move rarely used fields before pcb_flags and reduce size of pcb_flags to four bytes. Fix some style(9) nits in pcb.h while I am in the neighborhood.
Revision 1.707.2.17: download - view: text, markup, annotated - select for diffs
Mon Feb 28 23:28:35 2011 UTC (11 months, 1 week ago) by rwatson
Branches: RELENG_8
Diff to: previous 1.707.2.16: preferred, colored; branchpoint 1.707: preferred, colored
Changes since revision 1.707.2.16: +7 -0 lines
SVN rev 219107 on 2011-02-28 23:28:35Z by rwatson
Merge userspace DTrace support from head to stable/8:
r209721:
Merge from vendor-sys/opensolaris:
* add fasttrap files
r209731:
Introduce USD_{SET,GET}{BASE,LIMIT}. These help setting up the user
segment descriptor hi and lo values. Idea from Solaris.
Reviewed by: kib
r209763:
Fix style issues with the previous commit, namely
use-tab-instead-of-space and don't use underscores in macro variables.
Pointed out by: bde
r210292:
Fix typo in comment.
r210357:
MFamd64:
Add USD_GETBASE(), USD_SETBASE(), USD_GETLIMIT() and USD_SETLIMIT().
r210611:
Bump the witness pendlist to 768 to accomodate the increased number of
spinlocks.
r211553:
Add sysname to struct opensolaris_utsname. This is needed by one DTrace
test.
r211566:
Add a sysname char * to struct opensolaris_utsname.
r211606:
Add the FreeBSD definition for the fasttrap ioctls.
r211607:
Add a function compatibility function dtrace_instr_size_isa() that on
FreeBSD does the same as dtrace_dis_isize().
r211608:
Kernel DTrace support for:
o uregs (sson@)
o ustack (sson@)
o /dev/dtrace/helper device (needed for USDT probes)
r211610:
Add more compatibility structure members needed by the upcoming fasttrap
DTrace device.
r211611:
Destroy the helper device when unloading.
r211613:
Fix style issues.
r211614:
Bump KDTRACE_THREAD_ZERO and use M_ZERO as a malloc flag instead of
calling bzero.
r211615:
Remove an elif and add an or-clause.
r211616:
Add an extra comment to the SDT probes definition. This allows us to get
use '-' in probe names, matching the probe names in Solaris.
Add userland SDT probes definitions to sys/sdt.h.
r211617:
Call the systrace_probe_func() when the error value.
r211618:
Port this to FreeBSD. We miss some suword functions, so we use copyout.
r211738:
Port the fasttrap provider to FreeBSD. This provider is responsible for
injecting debugging probes in the userland programs and is the basis for
the pid provider and the usdt provider.
r211744:
MD fasttrap implementation.
r211745:
Replace a pksignal() call with tdksignal().
Pointed out by: kib
r211746:
Update for the recent location of the fasttrap code.
r211747:
Replace structure assignments with explicity memcpy calls. This allows
Clang to compile this file: it was using the builtin memcpy and we want
to use the memcpy defined in gptboot.c. (Clang can't compile boot2 yet).
Submitted by: Dimitry Andric <dimitry at andric.com>
Reviewed by: jhb
r211751:
Add a trap code for DTrace induced traps.
r211752:
Add two DTrace trap type values. Used by fasttrap.
r211753:
Enable fasttrap and make dtraceall depend on fasttrap when building i386
or amd64.
r211804:
Call the necessary DTrace function pointers when we have different kinds
of traps.
r211813:
Add the necessary DTrace function pointers.
r211839:
Sync DTrace bits with amd64 and fix the build.
r211924:
Register an interrupt vector for DTrace return probes. There is some
code missing in lapic to make sure that we don't overwrite this entry,
but this will be done on a sequent commit.
r211925:
Replace a memory barrier with a mutex barrier.
r211926:
Add the path necessary to find fasttrap_isa.h to CFLAGS.
r211929:
Remove debugging.
r212004:
When DTrace is enabled, make sure we don't overwrite the IDT_DTRACE_RET
entry with an IRQ for some hardware component.
Reviewed by: jhb
r212093:
Make the /dev/dtrace/helper node have the mode 0660. This allows
programs that refuse to run as root (pgsql) to install probes when their
user is part of the wheel group.
r212357:
Fix two bugs in DTrace:
* when the process exits, remove the associated USDT probes
* when the process forks, duplicate the USDT probes.
r212465:
Avoid a LOR (sleepable after non-sleepable) in
fasttrap_tracepoint_enable().
r212494:
Revamp locking a bit. This fixes three problems:
* processes now can't go away while we are inserting probes (fixes a panic)
* if a trap happens, we won't be holding the process lock (fixes a hang)
* fix a LOR between the process lock and the fasttrap bucket list lock
Thanks to kib for pointing some problems.
r212568:
Bump __FreeBSD_version to reflect the userland DTrace changes
Sponsored by: The FreeBSD Foundation
Userspace DTrace work by: rpaulo
Revision 1.707.2.16: download - view: text, markup, annotated - select for diffs
Sat Feb 19 07:39:14 2011 UTC (11 months, 2 weeks ago) by kib
Branches: RELENG_8
Diff to: previous 1.707.2.15: preferred, colored; branchpoint 1.707: preferred, colored
Changes since revision 1.707.2.15: +5 -0 lines
SVN rev 218836 on 2011-02-19 07:39:14Z by kib MFC r218327: Clear the padding when returning context to the usermode.
Revision 1.742: download - view: text, markup, annotated - select for diffs
Wed Feb 16 17:50:21 2011 UTC (11 months, 3 weeks ago) by dchagin
Branches: MAIN
Diff to: previous 1.741: preferred, colored
Changes since revision 1.741: +6 -0 lines
SVN rev 218744 on 2011-02-16 17:50:21Z by dchagin To avoid excessive code duplication create wrapper for fill regs from stack frame. Change the trap() code to use newly created function instead of explicit regs assignment.
Revision 1.741: download - view: text, markup, annotated - select for diffs
Sat Feb 5 15:10:27 2011 UTC (12 months ago) by kib
Branches: MAIN
Diff to: previous 1.740: preferred, colored
Changes since revision 1.740: +5 -0 lines
SVN rev 218327 on 2011-02-05 15:10:27Z by kib Clear the padding when returning context to the usermode, for MI ucontext_t and x86 MD parts. Kernel allocates the structures on the stack, and not clearing reserved fields and paddings causes leakage. Noted and discussed with: bde MFC after: 2 weeks
Revision 1.740: download - view: text, markup, annotated - select for diffs
Wed Jan 26 17:06:13 2011 UTC (12 months, 2 weeks ago) by mdf
Branches: MAIN
Diff to: previous 1.739: preferred, colored
Changes since revision 1.739: +8 -6 lines
SVN rev 217886 on 2011-01-26 17:06:13Z by mdf Set td_kstack_pages for thread0. This was already being done for most architectures, but i386 and amd64 were missing it. Submitted by: Mohd Fahadullah <mfahadullah AT isilon DOT com>
Revision 1.675.2.18: download - view: text, markup, annotated - select for diffs
Tue Jan 25 22:08:43 2011 UTC (12 months, 2 weeks ago) by jhb
Branches: RELENG_7
Diff to: previous 1.675.2.17: preferred, colored; branchpoint 1.675: preferred, colored
Changes since revision 1.675.2.17: +10 -4 lines
SVN rev 217856 on 2011-01-25 22:08:43Z by jhb MFC 214835: Adjust the order of operations in spinlock_enter() and spinlock_exit() to work properly with single-stepping in a kernel debugger.
Revision 1.707.2.15: download - view: text, markup, annotated - select for diffs
Tue Jan 25 22:08:22 2011 UTC (12 months, 2 weeks ago) by jhb
Branches: RELENG_8
Diff to: previous 1.707.2.14: preferred, colored; branchpoint 1.707: preferred, colored
Changes since revision 1.707.2.14: +10 -4 lines
SVN rev 217855 on 2011-01-25 22:08:22Z by jhb MFC 214835: Adjust the order of operations in spinlock_enter() and spinlock_exit() to work properly with single-stepping in a kernel debugger.
Revision 1.739: download - view: text, markup, annotated - select for diffs
Fri Jan 21 10:26:26 2011 UTC (12 months, 2 weeks ago) by pluknet
Branches: MAIN
Diff to: previous 1.738: preferred, colored
Changes since revision 1.738: +3 -4 lines
SVN rev 217688 on 2011-01-21 10:26:26Z by pluknet Make MSGBUF_SIZE kernel option a loader tunable kern.msgbufsize. Submitted by: perryh pluto.rain.com (previous version) Reviewed by: jhb Approved by: kib (mentor) Tested by: universe
Revision 1.738: download - view: text, markup, annotated - select for diffs
Mon Jan 17 22:58:28 2011 UTC (12 months, 3 weeks ago) by jkim
Branches: MAIN
Diff to: previous 1.737: preferred, colored
Changes since revision 1.737: +0 -3 lines
SVN rev 217515 on 2011-01-17 22:58:28Z by jkim Add reader/writer lock around mem_range_attr_get() and mem_range_attr_set(). Compile sys/dev/mem/memutil.c for all supported platforms and remove now unnecessary dev_mem_md_init(). Consistently define mem_range_softc from mem.c for all platforms. Add missing #include guards for machine/memdev.h and sys/memrange.h. Clean up some nearby style(9) nits. MFC after: 1 month
Revision 1.737: download - view: text, markup, annotated - select for diffs
Sat Jan 8 16:13:44 2011 UTC (13 months ago) by kib
Branches: MAIN
Diff to: previous 1.736: preferred, colored
Changes since revision 1.736: +1 -1 lines
SVN rev 217151 on 2011-01-08 16:13:44Z by kib Create shared (readonly) page. Each ABI may specify the use of page by setting SV_SHP flag and providing pointer to the vm object and mapping address. Provide simple allocator to carve space in the page, tailored to put the code with alignment restrictions. Enable shared page use for amd64, both native and 32bit FreeBSD binaries. Page is private mapped at the top of the user address space, moving a start of the stack one page down. Move signal trampoline code from the top of the stack to the shared page. Reviewed by: alc
Revision 1.736: download - view: text, markup, annotated - select for diffs
Wed Dec 22 00:18:42 2010 UTC (13 months, 2 weeks ago) by jkim
Branches: MAIN
Diff to: previous 1.735: preferred, colored
Changes since revision 1.735: +29 -19 lines
SVN rev 216634 on 2010-12-22 00:18:42Z by jkim Improve PCB flags handling and make it more robust. Add two new functions for manipulating pcb_flags. These inline functions are very similar to atomic_set_char(9) and atomic_clear_char(9) but without unnecessary LOCK prefix for SMP. Add comments about the rationale[1]. Use these functions wherever possible. Although there are some places where it is not strictly necessary (e.g., a PCB is copied to create a new PCB), it is done across the board for sake of consistency. Turn pcb_full_iret into a PCB flag as it is safe now. Move rarely used fields before pcb_flags and reduce size of pcb_flags to one byte. Fix some style(9) nits in pcb.h while I am in the neighborhood. Reviewed by: kib Submitted by: kib[1] MFC after: 2 months
Revision 1.675.2.17.2.1: download - view: text, markup, annotated - select for diffs
Tue Dec 21 17:10:29 2010 UTC (13 months, 2 weeks ago) by kensmith
Branches: RELENG_7_4
CVS tags: RELENG_7_4_0_RELEASE
Diff to: previous 1.675.2.17: preferred, colored; next MAIN 1.675.2.18: preferred, colored
Changes since revision 1.675.2.17: +0 -0 lines
SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release. Approved by: re (implicit)
Revision 1.707.2.14.2.1: download - view: text, markup, annotated - select for diffs
Tue Dec 21 17:09:25 2010 UTC (13 months, 2 weeks ago) by kensmith
Branches: RELENG_8_2
CVS tags: RELENG_8_2_0_RELEASE
Diff to: previous 1.707.2.14: preferred, colored; next MAIN 1.707.2.15: preferred, colored
Changes since revision 1.707.2.14: +0 -0 lines
SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release. Approved by: re (implicit)
Revision 1.707.2.14: download - view: text, markup, annotated - select for diffs
Wed Dec 15 15:25:56 2010 UTC (13 months, 3 weeks ago) by kib
Branches: RELENG_8
CVS tags: RELENG_8_2_BP
Branch point for: RELENG_8_2
Diff to: previous 1.707.2.13: preferred, colored; branchpoint 1.707: preferred, colored
Changes since revision 1.707.2.13: +1 -0 lines
SVN rev 216458 on 2010-12-15 15:25:56Z by kib MFC r216255: Update some comments related to use of amd64 full context switch. In exec_linux_setregs(), use locally cached pointer to pcb to set pcb_full_iret. In set_regs(), note that full return is needed when code that sets segment registers is enabled. Approved by: re (bz)
Revision 1.707.2.13: download - view: text, markup, annotated - select for diffs
Wed Dec 15 15:23:25 2010 UTC (13 months, 3 weeks ago) by kib
Branches: RELENG_8
Diff to: previous 1.707.2.12: preferred, colored; branchpoint 1.707: preferred, colored
Changes since revision 1.707.2.12: +0 -3 lines
SVN rev 216457 on 2010-12-15 15:23:25Z by kib MFC r216253: Retire write-only PCB_FULLCTX pcb flag on amd64. Approved by: re (bz)
Revision 1.735: download - view: text, markup, annotated - select for diffs
Tue Dec 14 20:07:51 2010 UTC (13 months, 3 weeks ago) by jkim
Branches: MAIN
Diff to: previous 1.734: preferred, colored
Changes since revision 1.734: +4 -0 lines
SVN rev 216443 on 2010-12-14 20:07:51Z by jkim Stop lying about supporting cpu_est_clockrate() when TSC is invariant. This function always returned the nominal frequency instead of current frequency because we use RDTSC instruction to calculate difference in CPU ticks, which is supposedly constant for the case. Now we support cpu_get_nominal_mhz() for the case, instead. Note it should be just enough for most usage cases because cpu_est_clockrate() is often times abused to find maximum frequency of the processor.
Revision 1.707.2.12: download - view: text, markup, annotated - select for diffs
Mon Dec 13 10:40:16 2010 UTC (13 months, 4 weeks ago) by kib
Branches: RELENG_8
Diff to: previous 1.707.2.11: preferred, colored; branchpoint 1.707: preferred, colored
Changes since revision 1.707.2.11: +1 -0 lines
SVN rev 216403 on 2010-12-13 10:40:16Z by kib MFC r216231: Do not leak %rdx value in the previous image to the new image after execve(2). Approved by: re (bz)
Revision 1.734: download - view: text, markup, annotated - select for diffs
Wed Dec 8 23:40:41 2010 UTC (14 months ago) by jkim
Branches: MAIN
Diff to: previous 1.733: preferred, colored
Changes since revision 1.733: +1 -7 lines
SVN rev 216312 on 2010-12-08 23:40:41Z by jkim Do not subtract 0.5% from estimated frequency if DELAY(9) is driven by TSC. Remove a confusing comment about converting to MHz as we never did.
Revision 1.733: download - view: text, markup, annotated - select for diffs
Tue Dec 7 12:44:33 2010 UTC (14 months ago) by kib
Branches: MAIN
Diff to: previous 1.732: preferred, colored
Changes since revision 1.732: +1 -0 lines
SVN rev 216255 on 2010-12-07 12:44:33Z by kib Update some comments related to use of amd64 full context switch. In exec_linux_setregs(), use locally cached pointer to pcb to set pcb_full_iret. In set_regs(), note that full return is needed when code that sets segment registers is enabled. MFC after: 1 week
Revision 1.732: download - view: text, markup, annotated - select for diffs
Tue Dec 7 12:17:43 2010 UTC (14 months ago) by kib
Branches: MAIN
Diff to: previous 1.731: preferred, colored
Changes since revision 1.731: +0 -3 lines
SVN rev 216253 on 2010-12-07 12:17:43Z by kib Retire write-only PCB_FULLCTX pcb flag on amd64. Reminded by: Petr Salinger <Petr.Salinger seznam cz> Tested by: pho MFC after: 1 week
Revision 1.731: download - view: text, markup, annotated - select for diffs
Mon Dec 6 15:15:27 2010 UTC (14 months ago) by kib
Branches: MAIN
Diff to: previous 1.730: preferred, colored
Changes since revision 1.730: +1 -0 lines
SVN rev 216231 on 2010-12-06 15:15:27Z by kib Do not leak %rdx value in the previous image to the new image after execve(2). Note that ia32 binaries already handle this properly, since ia32_setregs() resets td_retval[1], but not exec_setregs(). We still do not conform to the amd64 ABI specification, since %rsp on the image startup is not aligned to 16 bytes. PR: amd64/124134 Discussed with: Petr Salinger <Petr.Salinger seznam cz> (who convinced me that there is indeed several bugs) MFC after: 1 week
Revision 1.707.2.11: download - view: text, markup, annotated - select for diffs
Fri Dec 3 22:07:07 2010 UTC (14 months, 1 week ago) by kib
Branches: RELENG_8
Diff to: previous 1.707.2.10: preferred, colored; branchpoint 1.707: preferred, colored
Changes since revision 1.707.2.10: +10 -5 lines
SVN rev 216162 on 2010-12-03 22:07:07Z by kib
MFC r209463:
Fix bugs on pc98, use npxgetuserregs() instead of npxgetregs() for
get_fpcontext(), and npxsetuserregs() for set_fpcontext). Also,
note that usercontext is not initialized anymore in fpstate_drop().
Systematically replace references to npxgetregs() and npxsetregs()
by npxgetuserregs() and npxsetuserregs() in comments.
MFC r215865:
Remove npxgetregs(), npxsetregs(), fpugetregs() and fpusetregs()
functions, they are unused. Remove 'user' from npxgetuserregs()
etc. names.
For {npx,fpu}{get,set}regs(), always use pcb->pcb_user_save for FPU
context storage.
MFC r216012:
Calling fill_fpregs() for curthread is legitimate, and ELF coredump
does this.
Approved by: re (bz)
Revision 1.730: download - view: text, markup, annotated - select for diffs
Sun Nov 28 17:56:34 2010 UTC (14 months, 1 week ago) by kib
Branches: MAIN
Diff to: previous 1.729: preferred, colored
Changes since revision 1.729: +2 -1 lines
SVN rev 216012 on 2010-11-28 17:56:34Z by kib Calling fill_fpregs() for curthread is legitimate, and ELF coredump does this. Reported and tested by: pho MFC after: 5 days
Revision 1.729: download - view: text, markup, annotated - select for diffs
Fri Nov 26 14:50:42 2010 UTC (14 months, 2 weeks ago) by kib
Branches: MAIN
Diff to: previous 1.728: preferred, colored
Changes since revision 1.728: +7 -3 lines
SVN rev 215865 on 2010-11-26 14:50:42Z by kib
Remove npxgetregs(), npxsetregs(), fpugetregs() and fpusetregs()
functions, they are unused. Remove 'user' from npxgetuserregs()
etc. names.
For {npx,fpu}{get,set}regs(), always use pcb->pcb_user_save for FPU
context storage. This eliminates the need for ugly copying with
overwrite of the newly added and reserved fields in ucontext on i386
to satisfy alignment requirements for fpusave() and fpurstor().
pc98 version was copied from i386.
Suggested and reviewed by: bde
Tested by: pho (i386 and amd64)
MFC after: 1 week
Revision 1.707.2.10: download - view: text, markup, annotated - select for diffs
Fri Nov 19 09:49:14 2010 UTC (14 months, 3 weeks ago) by kib
Branches: RELENG_8
Diff to: previous 1.707.2.9: preferred, colored; branchpoint 1.707: preferred, colored
Changes since revision 1.707.2.9: +10 -13 lines
SVN rev 215513 on 2010-11-19 09:49:14Z by kib
Merge the kern_fpu_enter/kern_fpu_leave KPI and followup fixes for the
amd64 suspend/resume support.
Tested by: Mike Tancsa
Also tested by: Dewayne Geraghty <dewayne.geraghty heuristicsystems com au>,
Daryl Richards <daryl isletech net>
Below is the svn log of the merged revisions.
------------------------------------------------------------------------
r197455 | emaste | 2009-09-24 17:26:42 +0300 (Thu, 24 Sep 2009) | 5 lines
Add a backtrace to the "fpudna in kernel mode!" case, to help track down
where this comes from.
Reviewed by: bde
------------------------------------------------------------------------
r197863 | jkim | 2009-10-08 20:41:53 +0300 (Thu, 08 Oct 2009) | 8 lines
Clean up amd64 suspend/resume code.
- Allocate memory for wakeup code after ACPI bus is attached. The early
memory allocation hack was inherited from i386 but amd64 does not need it.
- Exclude real mode IVT and BDA explicitly. Improve comments about memory
allocation and reason for the exclusions. It is a no-op in reality, though.
- Remove an unnecessary CLD from wakeup code and re-align.
------------------------------------------------------------------------
r198931 | jkim | 2009-11-05 00:39:18 +0200 (Thu, 05 Nov 2009) | 2 lines
Tweak memory allocation for amd64 suspend/resume CPU context.
------------------------------------------------------------------------
r200280 | jkim | 2009-12-09 00:38:42 +0200 (Wed, 09 Dec 2009) | 2 lines
Simplify a macro not to generate unncessary symbols.
------------------------------------------------------------------------
r205444 | emaste | 2010-03-22 13:52:53 +0200 (Mon, 22 Mar 2010) | 7 lines
Merge r197455 from amd64:
Add a backtrace to the "fpudna in kernel mode!" case, to help track down
where this comes from.
Reviewed by: bde
------------------------------------------------------------------------
r208833 | kib | 2010-06-05 18:59:59 +0300 (Sat, 05 Jun 2010) | 15 lines
Introduce the x86 kernel interfaces to allow kernel code to use
FPU/SSE hardware. Caller should provide a save area that is chained
into the stack of the areas; pcb save_area for usermode FPU state is
on top. The pcb now contains a pointer to the current FPU saved area,
used during FPUDNA handling and context switches. There is also a
facility to allow the kernel thread to use pcb save_area.
Change the dreaded warnings "npxdna in kernel mode!" into the panics
when FPU usage is not registered.
KPI discussed with: fabient
Tested by: pho, fabient
Hardware provided by: Sentex Communications
MFC after: 1 month
------------------------------------------------------------------------
r208834 | kib | 2010-06-05 19:00:53 +0300 (Sat, 05 Jun 2010) | 13 lines
Use the fpu_kern_enter() interface to properly separate usermode FPU
context from in-kernel execution of padlock instructions and to handle
spurious FPUDNA exceptions that sometime are raised when doing padlock
calculations.
Globally mark crypto(9) kthread as using FPU.
Reviewed by: pjd
Hardware provided by: Sentex Communications
Tested by: pho
PR: amd64/135014
MFC after: 1 month
------------------------------------------------------------------------
r208877 | kib | 2010-06-06 19:13:50 +0300 (Sun, 06 Jun 2010) | 5 lines
Style-compilant order of declarations.
Noted by: bde
MFC after: 1 month
------------------------------------------------------------------------
r209174 | jkim | 2010-06-14 23:08:26 +0300 (Mon, 14 Jun 2010) | 3 lines
Fix ACPI suspend/resume on amd64, which was broken since r208833.
We need actual storage for FPU state to save and restore.
------------------------------------------------------------------------
r209198 | kib | 2010-06-15 12:19:33 +0300 (Tue, 15 Jun 2010) | 10 lines
Use critical sections instead of disabling local interrupts to ensure
the consistency between PCPU fpcurthread and the state of the FPU.
Explicitely assert that the calling conventions for fpudrop() are
adhered too. In cpu_thread_exit(), add missed critical section entrance.
Reviewed by: bde
Tested by: pho
MFC after: 1 month
------------------------------------------------------------------------
r209204 | kib | 2010-06-15 17:59:35 +0300 (Tue, 15 Jun 2010) | 5 lines
Rename CRITSECT_ASSERT to CRITICAL_ASSERT.
Suggested by: jhb
MFC after: 1 month
------------------------------------------------------------------------
r209208 | kib | 2010-06-15 21:16:04 +0300 (Tue, 15 Jun 2010) | 4 lines
Remove two obsoleted comments, add a note about 32bit compatibility.
MFC after: 1 month
------------------------------------------------------------------------
r209252 | kib | 2010-06-17 15:35:17 +0300 (Thu, 17 Jun 2010) | 6 lines
In the ia32_{get,set}_fpcontext(), use fpu{get,set}userregs instead
of fpu{get,set}regs.
Noted by: bde
MFC after: 1 month
------------------------------------------------------------------------
r209460 | kib | 2010-06-23 13:40:28 +0300 (Wed, 23 Jun 2010) | 8 lines
Remove unused i586 optimized bcopy/bzero/etc implementations that utilize
FPU registers for copying. Remove the switch table and jumps from
bcopy/bzero/... to the actual implementation.
As a side-effect, i486-optimized bzero is removed.
Reviewed by: bde
Tested by: pho (previous version)
------------------------------------------------------------------------
r209461 | kib | 2010-06-23 14:12:58 +0300 (Wed, 23 Jun 2010) | 8 lines
Remove the support for int13 FPU exception reporting on i386. It is
believed that all 486-class CPUs FreeBSD is capable to run on, either
have no FPU and cannot use external coprocessor, or have FPU on the
package and can use #MF.
Reviewed by: bde
Tested by: pho (previous version)
------------------------------------------------------------------------
r209462 | kib | 2010-06-23 14:21:19 +0300 (Wed, 23 Jun 2010) | 8 lines
After the FPU use requires #MF working due to INT13 FPU exception handling
removal, MFi386 r209198:
Use critical sections instead of disabling local interrupts to ensure
the consistency between PCPU fpcurthread and the state of FPU.
Reviewed by: bde
Tested by: pho
------------------------------------------------------------------------
r210514 | jkim | 2010-07-26 22:53:09 +0300 (Mon, 26 Jul 2010) | 6 lines
Re-implement FPU suspend/resume for amd64. This removes superfluous uses
of critical_enter(9) and critical_exit(9) by fpugetregs() and fpusetregs().
Also, we do not touch PCB flags any more.
MFC after: 1 month
------------------------------------------------------------------------
r210517 | jkim | 2010-07-27 00:24:52 +0300 (Tue, 27 Jul 2010) | 4 lines
FNSTSW instruction can use AX register as an operand.
Obtained from: fenv.h
------------------------------------------------------------------------
r210518 | jkim | 2010-07-27 01:16:36 +0300 (Tue, 27 Jul 2010) | 5 lines
Reduce diff against fenv.h:
Mark all inline asms as volatile for safety. No object file change after
this commit (verified with md5).
------------------------------------------------------------------------
r210519 | jkim | 2010-07-27 01:55:14 +0300 (Tue, 27 Jul 2010) | 2 lines
Remove an unused macro since r189418.
------------------------------------------------------------------------
r210520 | jkim | 2010-07-27 02:02:18 +0300 (Tue, 27 Jul 2010) | 2 lines
Add missing ldmxcsr() prototype for lint case.
------------------------------------------------------------------------
r210521 | jkim | 2010-07-27 02:20:55 +0300 (Tue, 27 Jul 2010) | 3 lines
Simplify fldcw() macro. There is no reason to use pointer here. No object
file change after this commit (verified with md5).
------------------------------------------------------------------------
r210614 | jkim | 2010-07-29 19:41:21 +0300 (Thu, 29 Jul 2010) | 2 lines
Rename PCB_USER_FPU to PCB_USERFPU not to clash with a macro from fpu.h.
------------------------------------------------------------------------
r210615 | jkim | 2010-07-29 19:49:20 +0300 (Thu, 29 Jul 2010) | 5 lines
Fix another fallout from r208833. savectx() is used to save CPU context
for crash dump (dumppcb) and kdb (stoppcbs). For both cases, there cannot
have a valid pointer in pcb_save. This should restore the previous
behaviour.
------------------------------------------------------------------------
r210777 | jkim | 2010-08-02 20:35:00 +0300 (Mon, 02 Aug 2010) | 13 lines
- Merge savectx2() with savectx() and struct xpcb with struct pcb. [1]
savectx() is only used for panic dump (dumppcb) and kdb (stoppcbs). Thus,
saving additional information does not hurt and it may be even beneficial.
Unfortunately, struct pcb has grown larger to accommodate more data.
Move 512-byte long pcb_user_save to the end of struct pcb while I am here.
- savectx() now saves FPU state unconditionally and copy it to the PCB of
FPU thread if necessary. This gives panic dump and kdb a chance to take
a look at the current FPU state even if the FPU is "supposedly" not used.
- Resuming CPU now unconditionally reinitializes FPU. If the saved FPU
state was irrelevant, it could be in an unknown state.
Suggested by: bde [1]
------------------------------------------------------------------------
r210804 | jkim | 2010-08-03 18:32:08 +0300 (Tue, 03 Aug 2010) | 6 lines
savectx() has not been used for fork(2) for about 15 years. [1]
Do not clobber FPU thread's PCB as it is more harmful. When we resume CPU,
unconditionally reload FPU state.
Pointed out by: bde [1]
------------------------------------------------------------------------
r212026 | jkim | 2010-08-31 00:19:42 +0300 (Tue, 31 Aug 2010) | 3 lines
Save MSR_FSBASE, MSR_GSBASE and MSR_KGSBASE directly to PCB as we do not use
these values in the function.
------------------------------------------------------------------------
r214347 | jhb | 2010-10-25 18:31:13 +0300 (Mon, 25 Oct 2010) | 5 lines
Use 'saveintr' instead of 'savecrit' or 'eflags' to hold the state returned
by intr_disable().
Requested by: bde
------------------------------------------------------------------------
Revision 1.728: download - view: text, markup, annotated - select for diffs
Fri Nov 5 13:42:58 2010 UTC (15 months ago) by jhb
Branches: MAIN
Diff to: previous 1.727: preferred, colored
Changes since revision 1.727: +10 -4 lines
SVN rev 214835 on 2010-11-05 13:42:58Z by jhb Adjust the order of operations in spinlock_enter() and spinlock_exit() to work properly with single-stepping in a kernel debugger. Specifically, these routines have always disabled interrupts before increasing the nesting count and restored the prior state of interrupts after decreasing the nesting count to avoid problems with a nested interrupt not disabling interrupts when acquiring a spin lock. However, trap interrupts for single-stepping can still occur even when interrupts are disabled. Now the saved state of interrupts is not saved in the thread until after interrupts have been disabled and the nesting count has been increased. Similarly, the saved state from the thread cannot be read once the nesting count has been decreased to zero. To fix this, use temporary variables to store interrupt state and shuffle it between the thread's MD area and the appropriate registers. In cooperation with: bde MFC after: 1 month
Revision 1.727: download - view: text, markup, annotated - select for diffs
Mon Nov 1 17:40:35 2010 UTC (15 months, 1 week ago) by jhb
Branches: MAIN
Diff to: previous 1.726: preferred, colored
Changes since revision 1.726: +1 -1 lines
SVN rev 214630 on 2010-11-01 17:40:35Z by jhb Move the <machine/mca.h> header to <x86/mca.h>.
Revision 1.726: download - view: text, markup, annotated - select for diffs
Tue Oct 12 20:53:12 2010 UTC (15 months, 4 weeks ago) by jkim
Branches: MAIN
Diff to: previous 1.725: preferred, colored
Changes since revision 1.725: +2 -1 lines
SVN rev 213748 on 2010-10-12 20:53:12Z by jkim Remove trailing ", " from `sysctl machdep.idle_available' output.
Revision 1.675.2.17: download - view: text, markup, annotated - select for diffs
Sun Oct 10 07:28:56 2010 UTC (16 months ago) by kib
Branches: RELENG_7
CVS tags: RELENG_7_4_BP
Branch point for: RELENG_7_4
Diff to: previous 1.675.2.16: preferred, colored; branchpoint 1.675: preferred, colored
Changes since revision 1.675.2.16: +1 -1 lines
SVN rev 213666 on 2010-10-10 07:28:56Z by kib MFC r213382: In makectx(), always use the tf_rsp from trap frame. %rsp is pushed unconditionally by hardware on the trap. PR: amd64/151167
Revision 1.707.2.9: download - view: text, markup, annotated - select for diffs
Sun Oct 10 07:07:21 2010 UTC (16 months ago) by kib
Branches: RELENG_8
Diff to: previous 1.707.2.8: preferred, colored; branchpoint 1.707: preferred, colored
Changes since revision 1.707.2.8: +1 -1 lines
SVN rev 213665 on 2010-10-10 07:07:21Z by kib MFC r213382: In makectx(), always use the tf_rsp from trap frame. %rsp is pushed unconditionally by hardware on the trap. PR: amd64/151167
Revision 1.725: download - view: text, markup, annotated - select for diffs
Sun Oct 3 13:52:17 2010 UTC (16 months, 1 week ago) by kib
Branches: MAIN
Diff to: previous 1.724: preferred, colored
Changes since revision 1.724: +1 -1 lines
SVN rev 213382 on 2010-10-03 13:52:17Z by kib The makectx() function, used by kdb_trap() to reconstruct pcb from trap frame when trap initiated kdb entry, incorrectly calculated the value of %rsp for trapped thread. According to Intel(R) 64 and IA-32 Architectures Software Developer's Manual Volume 3A: System Programming Guide, Part 1, rev. 035, 6.14.2 64-Bit Mode Stack Frame, "64-bit mode ... pushes SS:RSP unconditionally, rather than only on a CPL change." Even assuming the conditional push of the %ss:%rsp, the calculation was still wrong because sizeof(tf_ss) + sizeof(tf_rsp) == 16 on amd64. Always use the tf_rsp from trap frame. The change supposedly fixes stepping when using kgdb backend for kdb. Submitted by: Zhouyi Zhou <zhouzhouyi gmail com> PR: amd64/151167 Reviewed by: avg MFC after: 1 week
Revision 1.724: download - view: text, markup, annotated - select for diffs
Mon Sep 13 07:25:35 2010 UTC (16 months, 3 weeks ago) by mav
Branches: MAIN
Diff to: previous 1.723: preferred, colored
Changes since revision 1.723: +115 -115 lines
SVN rev 212541 on 2010-09-13 07:25:35Z by mav Refactor timer management code with priority to one-shot operation mode. The main goal of this is to generate timer interrupts only when there is some work to do. When CPU is busy interrupts are generating at full rate of hz + stathz to fullfill scheduler and timekeeping requirements. But when CPU is idle, only minimum set of interrupts (down to 8 interrupts per second per CPU now), needed to handle scheduled callouts is executed. This allows significantly increase idle CPU sleep time, increasing effect of static power-saving technologies. Also it should reduce host CPU load on virtualized systems, when guest system is idle. There is set of tunables, also available as writable sysctls, allowing to control wanted event timer subsystem behavior: kern.eventtimer.timer - allows to choose event timer hardware to use. On x86 there is up to 4 different kinds of timers. Depending on whether chosen timer is per-CPU, behavior of other options slightly differs. kern.eventtimer.periodic - allows to choose periodic and one-shot operation mode. In periodic mode, current timer hardware taken as the only source of time for time events. This mode is quite alike to previous kernel behavior. One-shot mode instead uses currently selected time counter hardware to schedule all needed events one by one and program timer to generate interrupt exactly in specified time. Default value depends of chosen timer capabilities, but one-shot mode is preferred, until other is forced by user or hardware. kern.eventtimer.singlemul - in periodic mode specifies how much times higher timer frequency should be, to not strictly alias hardclock() and statclock() events. Default values are 2 and 4, but could be reduced to 1 if extra interrupts are unwanted. kern.eventtimer.idletick - makes each CPU to receive every timer interrupt independently of whether they busy or not. By default this options is disabled. If chosen timer is per-CPU and runs in periodic mode, this option has no effect - all interrupts are generating. As soon as this patch modifies cpu_idle() on some platforms, I have also refactored one on x86. Now it makes use of MONITOR/MWAIT instrunctions (if supported) under high sleep/wakeup rate, as fast alternative to other methods. It allows SMP scheduler to wake up sleeping CPUs much faster without using IPI, significantly increasing performance on some highly task-switching loads. Tested by: many (on i386, amd64, sparc64 and powerc) H/W donated by: Gheorghe Ardelean Sponsored by: iXsystems, Inc.
Revision 1.723: download - view: text, markup, annotated - select for diffs
Sat Aug 28 08:03:29 2010 UTC (17 months, 1 week ago) by rpaulo
Branches: MAIN
Diff to: previous 1.722: preferred, colored
Changes since revision 1.722: +7 -0 lines
SVN rev 211924 on 2010-08-28 08:03:29Z by rpaulo Register an interrupt vector for DTrace return probes. There is some code missing in lapic to make sure that we don't overwrite this entry, but this will be done on a sequent commit. Sponsored by: The FreeBSD Foundation
Revision 1.675.2.16: download - view: text, markup, annotated - select for diffs
Wed Jul 14 21:10:47 2010 UTC (18 months, 3 weeks ago) by jhb
Branches: RELENG_7
Diff to: previous 1.675.2.15: preferred, colored; branchpoint 1.675: preferred, colored
Changes since revision 1.675.2.15: +0 -1 lines
SVN rev 210080 on 2010-07-14 21:10:47Z by jhb MFC 208507,208556,208621: Add support for corrected machine check interrupts. CMCI is a new local APIC interrupt that fires when a threshold of corrected machine check events is reached. CMCI also includes a count of events when reporting corrected errors in the bank's status register. Note that individual banks may or may not support CMCI. If they do, each bank includes its own threshold register that determines when the interrupt fires. Currently the code uses a very simple strategy where it doubles the threshold on each interrupt until it succeeds in throttling the interrupt to occur only once a minute (this interval can be tuned via sysctl). The threshold is also adjusted on each hourly poll which will lower the threshold once events stop occurring.
Revision 1.707.2.8: download - view: text, markup, annotated - select for diffs
Wed Jul 14 21:10:14 2010 UTC (18 months, 3 weeks ago) by jhb
Branches: RELENG_8
Diff to: previous 1.707.2.7: preferred, colored; branchpoint 1.707: preferred, colored
Changes since revision 1.707.2.7: +0 -1 lines
SVN rev 210079 on 2010-07-14 21:10:14Z by jhb MFC 208507,208556,208621: Add support for corrected machine check interrupts. CMCI is a new local APIC interrupt that fires when a threshold of corrected machine check events is reached. CMCI also includes a count of events when reporting corrected errors in the bank's status register. Note that individual banks may or may not support CMCI. If they do, each bank includes its own threshold register that determines when the interrupt fires. Currently the code uses a very simple strategy where it doubles the threshold on each interrupt until it succeeds in throttling the interrupt to occur only once a minute (this interval can be tuned via sysctl). The threshold is also adjusted on each hourly poll which will lower the threshold once events stop occurring.
Revision 1.722: download - view: text, markup, annotated - select for diffs
Wed Jun 30 18:03:42 2010 UTC (19 months, 1 week ago) by jhb
Branches: MAIN
Diff to: previous 1.721: preferred, colored
Changes since revision 1.721: +1 -0 lines
SVN rev 209613 on 2010-06-30 18:03:42Z by jhb Move prototypes for kern_sigtimedwait() and kern_sigprocmask() to <sys/syscallsubr.h> where all other kern_<syscall> prototypes live.
Revision 1.721: download - view: text, markup, annotated - select for diffs
Wed Jun 23 12:17:13 2010 UTC (19 months, 2 weeks ago) by kib
Branches: MAIN
Diff to: previous 1.720: preferred, colored
Changes since revision 1.720: +2 -2 lines
SVN rev 209463 on 2010-06-23 12:17:13Z by kib Fix bugs on pc98, use npxgetuserregs() instead of npxgetregs() for get_fpcontext(), and npxsetuserregs() for set_fpcontext). Also, note that usercontext is not initialized anymore in fpstate_drop(). Systematically replace references to npxgetregs() and npxsetregs() by npxgetuserregs() and npxsetuserregs() in comments. Noted by: bde
Revision 1.720: download - view: text, markup, annotated - select for diffs
Tue Jun 15 18:16:04 2010 UTC (19 months, 3 weeks ago) by kib
Branches: MAIN
Diff to: previous 1.719: preferred, colored
Changes since revision 1.719: +0 -5 lines
SVN rev 209208 on 2010-06-15 18:16:04Z by kib Remove two obsoleted comments, add a note about 32bit compatibility. MFC after: 1 month
Revision 1.719: download - view: text, markup, annotated - select for diffs
Tue Jun 15 09:19:33 2010 UTC (19 months, 3 weeks ago) by kib
Branches: MAIN
Diff to: previous 1.718: preferred, colored
Changes since revision 1.718: +2 -3 lines
SVN rev 209198 on 2010-06-15 09:19:33Z by kib Use critical sections instead of disabling local interrupts to ensure the consistency between PCPU fpcurthread and the state of the FPU. Explicitely assert that the calling conventions for fpudrop() are adhered too. In cpu_thread_exit(), add missed critical section entrance. Reviewed by: bde Tested by: pho MFC after: 1 month
Revision 1.707.2.7.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 14 02:09:06 2010 UTC (19 months, 3 weeks ago) by kensmith
Branches: RELENG_8_1
CVS tags: RELENG_8_1_0_RELEASE
Diff to: previous 1.707.2.7: preferred, colored; next MAIN 1.707.2.8: preferred, colored
Changes since revision 1.707.2.7: +0 -0 lines
SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith Copy stable/8 to releng/8.1 in preparation for 8.1-RC1. Approved by: re (implicit)
Revision 1.718: download - view: text, markup, annotated - select for diffs
Sat Jun 5 15:59:59 2010 UTC (20 months ago) by kib
Branches: MAIN
Diff to: previous 1.717: preferred, colored
Changes since revision 1.717: +8 -5 lines
SVN rev 208833 on 2010-06-05 15:59:59Z by kib Introduce the x86 kernel interfaces to allow kernel code to use FPU/SSE hardware. Caller should provide a save area that is chained into the stack of the areas; pcb save_area for usermode FPU state is on top. The pcb now contains a pointer to the current FPU saved area, used during FPUDNA handling and context switches. There is also a facility to allow the kernel thread to use pcb save_area. Change the dreaded warnings "npxdna in kernel mode!" into the panics when FPU usage is not registered. KPI discussed with: fabient Tested by: pho, fabient Hardware provided by: Sentex Communications MFC after: 1 month
Revision 1.717: download - view: text, markup, annotated - select for diffs
Fri May 28 17:50:24 2010 UTC (20 months, 1 week ago) by jhb
Branches: MAIN
Diff to: previous 1.716: preferred, colored
Changes since revision 1.716: +0 -1 lines
SVN rev 208621 on 2010-05-28 17:50:24Z by jhb Defer initializing machine checks for the boot CPU until the local APIC is fully configured. MFC after: 1 month
Revision 1.707.2.7: download - view: text, markup, annotated - select for diffs
Tue Apr 20 08:19:43 2010 UTC (21 months, 3 weeks ago) by kib
Branches: RELENG_8
CVS tags: RELENG_8_1_BP
Branch point for: RELENG_8_1
Diff to: previous 1.707.2.6: preferred, colored; branchpoint 1.707: preferred, colored
Changes since revision 1.707.2.6: +10 -7 lines
SVN rev 206890 on 2010-04-20 08:19:43Z by kib MFC r206553: Change printf() calls to uprintf() for sigreturn() and trap() complaints about inacessible or wrong mcontext, and for dreaded "kernel trap with interrupts disabled" situation. The later is changed when trap is generated from user mode (shall never be ?). Normalize the messages to include both pid and thread name.
Revision 1.716: download - view: text, markup, annotated - select for diffs
Tue Apr 13 10:12:58 2010 UTC (21 months, 4 weeks ago) by kib
Branches: MAIN
Diff to: previous 1.715: preferred, colored
Changes since revision 1.715: +10 -7 lines
SVN rev 206553 on 2010-04-13 10:12:58Z by kib Change printf() calls to uprintf() for sigreturn() and trap() complaints about inacessible or wrong mcontext, and for dreaded "kernel trap with interrupts disabled" situation. The later is changed when trap is generated from user mode (shall never be ?). Normalize the messages to include both pid and thread name. MFC after: 1 week
Revision 1.715: download - view: text, markup, annotated - select for diffs
Thu Mar 25 14:24:00 2010 UTC (22 months, 2 weeks ago) by nwhitehorn
Branches: MAIN
Diff to: previous 1.714: preferred, colored
Changes since revision 1.714: +2 -6 lines
SVN rev 205642 on 2010-03-25 14:24:00Z by nwhitehorn Change the arguments of exec_setregs() so that it receives a pointer to the image_params struct instead of several members of that struct individually. This makes it easier to expand its arguments in the future without touching all platforms. Reviewed by: jhb
Revision 1.714: download - view: text, markup, annotated - select for diffs
Thu Feb 25 14:13:39 2010 UTC (23 months, 2 weeks ago) by attilio
Branches: MAIN
Diff to: previous 1.713: preferred, colored
Changes since revision 1.713: +1 -1 lines
SVN rev 204309 on 2010-02-25 14:13:39Z by attilio Introduce the new kernel sub-tree x86 which should contain all the code shared and generalized between our current amd64, i386 and pc98. This is just an initial step that should lead to a more complete effort. For the moment, a very simple porting of cpufreq modules, BIOS calls and the whole MD specific ISA bus part is added to the sub-tree but ideally a lot of code might be added and more shared support should grow. Sponsored by: Sandvine Incorporated Reviewed by: emaste, kib, jhb, imp Discussed on: arch MFC: 3 weeks
Revision 1.675.2.15.2.1: download - view: text, markup, annotated - select for diffs
Wed Feb 10 00:26:20 2010 UTC (23 months, 4 weeks ago) by kensmith
Branches: RELENG_7_3
CVS tags: RELENG_7_3_0_RELEASE
Diff to: previous 1.675.2.15: preferred, colored; next MAIN 1.675.2.16: preferred, colored
Changes since revision 1.675.2.15: +0 -0 lines
SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process. Approved by: re (implicit)
Revision 1.675.2.15: download - view: text, markup, annotated - select for diffs
Tue Jan 26 20:58:09 2010 UTC (2 years ago) by jhb
Branches: RELENG_7
CVS tags: RELENG_7_3_BP
Branch point for: RELENG_7_3
Diff to: previous 1.675.2.14: preferred, colored; branchpoint 1.675: preferred, colored
Changes since revision 1.675.2.14: +1 -0 lines
SVN rev 203047 on 2010-01-26 20:58:09Z by jhb MFC 195820, 195940, 196643, 197663, 199067, 199215, and 199253: Optimize the cache flushing done when changing caching attributes of pages by doing nothing for CPUs that support self-snooping and using CLFLUSH instead of a full cache invalidate when possible. - On i386 take care of possible mappings of the page by sf buffer by utilizing the mapping for clflush, otherwise map the page transiently. Amd64 uses the direct map. - Do not use CLFLUSH on Intel CPUs due to problems with flushing the local APIC range by default. This can be further controlled via the hw.clflush_disable loader tunable. A setting of 1 disables the use of CLFLUSH. A setting of 0 allows CLFLUSH to be used for Intel CPUs when CPUID_SS is not present. Approved by: re (kib)
Revision 1.713: download - view: text, markup, annotated - select for diffs
Sat Jan 23 20:28:37 2010 UTC (2 years ago) by alc
Branches: MAIN
Diff to: previous 1.712: preferred, colored
Changes since revision 1.712: +4 -4 lines
SVN rev 202897 on 2010-01-23 20:28:37Z by alc Simplify the mapping of the system message buffer. Use the direct map just like ia64 does.
Revision 1.707.2.6: download - view: text, markup, annotated - select for diffs
Sat Dec 19 11:31:28 2009 UTC (2 years, 1 month ago) by kib
Branches: RELENG_8
Diff to: previous 1.707.2.5: preferred, colored; branchpoint 1.707: preferred, colored
Changes since revision 1.707.2.5: +2 -6 lines
SVN rev 200722 on 2009-12-19 11:31:28Z by kib MFC r198507: Use kern_sigprocmask() instead of direct manipulation of td_sigmask to reschedule newly blocked signals. MFC r198590: Trapsignal() calls kern_sigprocmask() when delivering catched signal with proc lock held. MFC r198670: For trapsignal() and postsig(), kern_sigprocmask() is called with both process lock and curproc->p_sigacts->ps_mtx locked. Prevent lock recursion on ps_mtx in reschedule_signals().
Revision 1.707.2.5: download - view: text, markup, annotated - select for diffs
Sun Nov 22 14:32:32 2009 UTC (2 years, 2 months ago) by kuriyama
Branches: RELENG_8
Diff to: previous 1.707.2.4: preferred, colored; branchpoint 1.707: preferred, colored
Changes since revision 1.707.2.4: +1 -0 lines
SVN rev 199648 on 2009-11-22 14:32:32Z by kuriyama
- MFC r199067,199215,199253
- Add hw.clflush_disable loader tunable to avoid panic (trap 9) at
map_invalidate_cache_range() even if CPU is not Intel.
- This tunable can be set to -1 (default), 0 and 1. -1 is same as
current behavior, which automatically disable CLFLUSH on Intel CPUs
without CPUID_SS (should be occured on Xen only). You can specify 1
when this panic happened on non-Intel CPUs (such as AMD's). Because
disabling CLFLUSH may reduce performance, you can try with setting 0
on Intel CPUs without SS to use CLFLUSH feature.
- Amd64 init_secondary() calls initializecpu() while curthread is
still not properly set up. r199067 added the call to
TUNABLE_INT_FETCH() to initializecpu() that results in hang because
AP are started when kernel environment is already dynamic and thus
needs to acquire mutex, that is too early in AP start sequence to
work.
Extract the code that should be executed only once, because it sets
up global variables, from initializecpu() to initializecpucache(),
and call the later only from hammer_time() executed on BSP. Now,
TUNABLE_INT_FETCH() is done only once at BSP at the early boot
stage.
Revision 1.712: download - view: text, markup, annotated - select for diffs
Fri Nov 13 13:07:01 2009 UTC (2 years, 2 months ago) by kib
Branches: MAIN
Diff to: previous 1.711: preferred, colored
Changes since revision 1.711: +1 -0 lines
SVN rev 199253 on 2009-11-13 13:07:01Z by kib Amd64 init_secondary() calls initializecpu() while curthread is still not properly set up. r199067 added the call to TUNABLE_INT_FETCH() to initializecpu() that results in hang because AP are started when kernel environment is already dynamic and thus needs to acquire mutex, that is too early in AP start sequence to work. Extract the code that should be executed only once, because it sets up global variables, from initializecpu() to initializecpucache(), and call the later only from hammer_time() executed on BSP. Now, TUNABLE_INT_FETCH() is done only once at BSP at the early boot stage. In collaboration with: Mykola Dzham <freebsd levsha org ua> Reviewed by: jhb Tested by: ed, battlez
Revision 1.675.2.14: download - view: text, markup, annotated - select for diffs
Thu Oct 29 14:34:02 2009 UTC (2 years, 3 months ago) by jhb
Branches: RELENG_7
Diff to: previous 1.675.2.13: preferred, colored; branchpoint 1.675: preferred, colored
Changes since revision 1.675.2.13: +2 -0 lines
SVN rev 198589 on 2009-10-29 14:34:02Z by jhb MFC 192050, 192343, 192440: Implement simple machine check support for amd64 and i386. It is disabled by default but can be enabled via the 'hw.mca.enabled' tunable.
Revision 1.711: download - view: text, markup, annotated - select for diffs
Tue Oct 27 10:47:58 2009 UTC (2 years, 3 months ago) by kib
Branches: MAIN
Diff to: previous 1.710: preferred, colored
Changes since revision 1.710: +2 -6 lines
SVN rev 198507 on 2009-10-27 10:47:58Z by kib In r197963, a race with thread being selected for signal delivery while in kernel mode, and later changing signal mask to block the signal, was fixed for sigprocmask(2) and ptread_exit(3). The same race exists for sigreturn(2), setcontext(2) and swapcontext(2) syscalls. Use kern_sigprocmask() instead of direct manipulation of td_sigmask to reschedule newly blocked signals, closing the race. Reviewed by: davidxu Tested by: pho MFC after: 1 month
Revision 1.707.2.4.2.1: download - view: text, markup, annotated - select for diffs
Sun Oct 25 01:10:29 2009 UTC (2 years, 3 months ago) by kensmith
Branches: RELENG_8_0
CVS tags: RELENG_8_0_0_RELEASE
Diff to: previous 1.707.2.4: preferred, colored; next MAIN 1.707.2.5: preferred, colored
Changes since revision 1.707.2.4: +0 -0 lines
SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure. Approved by: re (implicit)
Revision 1.675.2.13: download - view: text, markup, annotated - select for diffs
Fri Sep 25 15:08:51 2009 UTC (2 years, 4 months ago) by jhb
Branches: RELENG_7
Diff to: previous 1.675.2.12: preferred, colored; branchpoint 1.675: preferred, colored
Changes since revision 1.675.2.12: +73 -33 lines
SVN rev 197485 on 2009-09-25 15:08:51Z by jhb MFC 197410: - Split the logic to parse an SMAP entry out into a separate function on amd64 similar to i386. This fixes a bug on amd64 where overlapping entries would not cause the SMAP parsing to stop. - Change the SMAP parsing code to do a sorted insertion into physmap[] instead of an append to support systems with out-of-order SMAP entries.
Revision 1.707.2.4: download - view: text, markup, annotated - select for diffs
Fri Sep 25 15:08:26 2009 UTC (2 years, 4 months ago) by jhb
Branches: RELENG_8
CVS tags: RELENG_8_0_BP
Branch point for: RELENG_8_0
Diff to: previous 1.707.2.3: preferred, colored; branchpoint 1.707: preferred, colored
Changes since revision 1.707.2.3: +73 -33 lines
SVN rev 197484 on 2009-09-25 15:08:26Z by jhb MFC 197410: - Split the logic to parse an SMAP entry out into a separate function on amd64 similar to i386. This fixes a bug on amd64 where overlapping entries would not cause the SMAP parsing to stop. - Change the SMAP parsing code to do a sorted insertion into physmap[] instead of an append to support systems with out-of-order SMAP entries. Approved by: re (kib)
Revision 1.710: download - view: text, markup, annotated - select for diffs
Tue Sep 22 16:51:00 2009 UTC (2 years, 4 months ago) by jhb
Branches: MAIN
Diff to: previous 1.709: preferred, colored
Changes since revision 1.709: +73 -33 lines
SVN rev 197410 on 2009-09-22 16:51:00Z by jhb - Split the logic to parse an SMAP entry out into a separate function on amd64 similar to i386. This fixes a bug on amd64 where overlapping entries would not cause the SMAP parsing to stop. - Change the SMAP parsing code to do a sorted insertion into physmap[] instead of an append to support systems with out-of-order SMAP entries. PR: amd64/138220 Reported by: James R. Van Artsdalen james of jrv org MFC after: 3 days
Revision 1.707.2.3: download - view: text, markup, annotated - select for diffs
Thu Aug 20 23:04:21 2009 UTC (2 years, 5 months ago) by jkim
Branches: RELENG_8
Diff to: previous 1.707.2.2: preferred, colored; branchpoint 1.707: preferred, colored
Changes since revision 1.707.2.2: +12 -10 lines
SVN rev 196413 on 2009-08-20 23:04:21Z by jkim MFC: r196412 Check whether the SMBIOS reports reasonable amount of memory. If it is less than "avail memory", fall back to Maxmem to avoid user confusion. We use SMBIOS information to display "real memory" since r190599 but some broken SMBIOS implementation reported only half of actual memory. Tested by: bz Approved by: re (kib)
Revision 1.709: download - view: text, markup, annotated - select for diffs
Thu Aug 20 22:58:05 2009 UTC (2 years, 5 months ago) by jkim
Branches: MAIN
Diff to: previous 1.708: preferred, colored
Changes since revision 1.708: +12 -10 lines
SVN rev 196412 on 2009-08-20 22:58:05Z by jkim Check whether the SMBIOS reports reasonable amount of memory. If it is less than "avail memory", fall back to Maxmem to avoid user confusion. We use SMBIOS information to display "real memory" since r190599 but some broken SMBIOS implementation reported only half of actual memory. Tested by: bz Approved by: re (kib)
Revision 1.707.2.2: download - view: text, markup, annotated - select for diffs
Wed Aug 19 20:44:22 2009 UTC (2 years, 5 months ago) by ed
Branches: RELENG_8
Diff to: previous 1.707.2.1: preferred, colored; branchpoint 1.707: preferred, colored
Changes since revision 1.707.2.1: +1 -0 lines
SVN rev 196391 on 2009-08-19 20:44:22Z by ed MFC r196390: Make the MacBookPro3,1 hardware boot again. Tested by: Patrick Lamaiziere <patfbsd davenulle org> Approved by: re (kib)
Revision 1.708: download - view: text, markup, annotated - select for diffs
Wed Aug 19 20:39:33 2009 UTC (2 years, 5 months ago) by ed
Branches: MAIN
Diff to: previous 1.707: preferred, colored
Changes since revision 1.707: +1 -0 lines
SVN rev 196390 on 2009-08-19 20:39:33Z by ed Make the MacBookPro3,1 hardware boot again. Tested by: Patrick Lamaiziere <patfbsd davenulle org> Approved by: re (kib)
Revision 1.707.2.1: download - view: text, markup, annotated - select for diffs
Mon Aug 3 08:13:06 2009 UTC (2 years, 6 months ago) by kensmith
Branches: RELENG_8
Diff to: previous 1.707: preferred, colored
Changes since revision 1.707: +0 -0 lines
SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith Copy head to stable/8 as part of 8.0 Release cycle. Approved by: re (Implicit)
Revision 1.707: download - view: text, markup, annotated - select for diffs
Sun Aug 2 11:26:23 2009 UTC (2 years, 6 months ago) by ed
Branches: MAIN
CVS tags: RELENG_8_BP
Branch point for: RELENG_8
Diff to: previous 1.706: preferred, colored
Changes since revision 1.706: +1 -0 lines
SVN rev 196033 on 2009-08-02 11:26:23Z by ed Make the MacBook3,1 boot again. Approved by: re (kib)
Revision 1.706: download - view: text, markup, annotated - select for diffs
Mon Jul 27 13:51:55 2009 UTC (2 years, 6 months ago) by rpaulo
Branches: MAIN
Diff to: previous 1.705: preferred, colored
Changes since revision 1.705: +4 -1 lines
SVN rev 195907 on 2009-07-27 13:51:55Z by rpaulo Refine the MacBook hack to only match early models that have Intel ICH. Discussed with: kjim Approved by: re (kib)
Revision 1.705: download - view: text, markup, annotated - select for diffs
Thu Jul 9 09:34:11 2009 UTC (2 years, 7 months ago) by kib
Branches: MAIN
Diff to: previous 1.704: preferred, colored
Changes since revision 1.704: +4 -0 lines
SVN rev 195486 on 2009-07-09 09:34:11Z by kib Restore the segment registers and segment base MSRs for amd64 syscall return path only when neither thread was context switched while executing syscall code nor syscall explicitely modified LDT or MSRs. Save segment registers in trap handlers before interrupts are enabled, to not allow context switches to happen before registers are saved. Use separated byte in pcb for indication of fast/full return, since pcb_flags are not synchronized with context switches. The change puts back syscall microbenchmark numbers that were slowed down after commit of the support for LDT on amd64. Reviewed by: jeff Tested (and tested, and tested ...) by: pho Approved by: re (kensmith)
Revision 1.704: download - view: text, markup, annotated - select for diffs
Mon Jul 6 18:10:27 2009 UTC (2 years, 7 months ago) by jhb
Branches: MAIN
Diff to: previous 1.703: preferred, colored
Changes since revision 1.703: +26 -1 lines
SVN rev 195410 on 2009-07-06 18:10:27Z by jhb MFi386: Add a 'show idt' command to DDB to display the non-default function pointers in the interrupt descriptor table. Approved by: re (kensmith)
Revision 1.703: download - view: text, markup, annotated - select for diffs
Tue Jun 23 22:42:39 2009 UTC (2 years, 7 months ago) by jeff
Branches: MAIN
Diff to: previous 1.702: preferred, colored
Changes since revision 1.702: +2 -0 lines
SVN rev 194784 on 2009-06-23 22:42:39Z by jeff Implement a facility for dynamic per-cpu variables. - Modules and kernel code alike may use DPCPU_DEFINE(), DPCPU_GET(), DPCPU_SET(), etc. akin to the statically defined PCPU_*. Requires only one extra instruction more than PCPU_* and is virtually the same as __thread for builtin and much faster for shared objects. DPCPU variables can be initialized when defined. - Modules are supported by relocating the module's per-cpu linker set over space reserved in the kernel. Modules may fail to load if there is insufficient space available. - Track space available for modules with a one-off extent allocator. Free may block for memory to allocate space for an extent. Reviewed by: jhb, rwatson, kan, sam, grehan, marius, marcel, stas
Revision 1.702: download - view: text, markup, annotated - select for diffs
Tue Jun 9 04:17:36 2009 UTC (2 years, 8 months ago) by ariff
Branches: MAIN
Diff to: previous 1.701: preferred, colored
Changes since revision 1.701: +73 -0 lines
SVN rev 193804 on 2009-06-09 04:17:36Z by ariff Move C1E workaround into its own idle function. Previous workaround works only during initial booting process, while there are laptops/BIOSes that tend to act 'smarter' by force enabling C1E if the main power adapter being pulled out, rendering previous workaround ineffective. Given the fact that we still rely on local APIC to drive timer interrupt, this workaround should keep all Turion (probably Phenom too) X\d+ alive whether its on battery power or not. URL: http://lists.freebsd.org/pipermail/freebsd-acpi/2008-April/004858.html http://lists.freebsd.org/pipermail/freebsd-acpi/2008-May/004888.html Tested by: Peter Jeremy <peterjeremy at optushome d com d au>
Revision 1.675.2.12: download - view: text, markup, annotated - select for diffs
Sun Jun 7 10:00:35 2009 UTC (2 years, 8 months ago) by fabient
Branches: RELENG_7
Diff to: previous 1.675.2.11: preferred, colored; branchpoint 1.675: preferred, colored
Changes since revision 1.675.2.11: +13 -1 lines
SVN rev 193634 on 2009-06-07 10:00:35Z by fabient MFC hwpmc framework: - capture with callchain - Intel Core 2 support - Intel Core i7 support - source code annotate (pmcannotate) - bug fixes Reviewed by: jkoshy (mentor) Approved by: re (gnn)
Revision 1.701: download - view: text, markup, annotated - select for diffs
Mon May 18 18:37:18 2009 UTC (2 years, 8 months ago) by marcel
Branches: MAIN
Diff to: previous 1.700: preferred, colored
Changes since revision 1.700: +10 -0 lines
SVN rev 192323 on 2009-05-18 18:37:18Z by marcel Add cpu_flush_dcache() for use after non-DMA based I/O so that a possible future I-cache coherency operation can succeed. On ARM for example the L1 cache can be (is) virtually mapped, which means that any I/O that uses temporary mappings will not see the I-cache made coherent. On ia64 a similar behaviour has been observed. By flushing the D-cache, execution of binaries backed by md(4) and/or NFS work reliably. For Book-E (powerpc), execution over NFS exhibits SIGILL once in a while as well, though cpu_flush_dcache() hasn't been implemented yet. Doing an explicit D-cache flush as part of the non-DMA based I/O read operation eliminates the need to do it as part of the I-cache coherency operation itself and as such avoids pessimizing the DMA-based I/O read operations for which D-cache are already flushed/invalidated. It also allows future optimizations whereby the bcopy() followed by the D-cache flush can be integrated in a single operation, which could be implemented using on-chips DMA engines, by-passing the D-cache altogether.
Revision 1.700: download - view: text, markup, annotated - select for diffs
Wed May 13 17:53:04 2009 UTC (2 years, 8 months ago) by jhb
Branches: MAIN
Diff to: previous 1.699: preferred, colored
Changes since revision 1.699: +2 -0 lines
SVN rev 192050 on 2009-05-13 17:53:04Z by jhb
Implement simple machine check support for amd64 and i386.
- For CPUs that only support MCE (the machine check exception) but not MCA
(i.e. Pentium), all this does is print out the value of the machine check
registers and then panic when a machine check exception occurs.
- For CPUs that support MCA (the machine check architecture), the support is
a bit more involved.
- First, there is limited support for decoding the CPU-independent MCA
error codes in the kernel, and the kernel uses this to output a short
description of any machine check events that occur.
- When a machine check exception occurs, all of the MCx banks on the
current CPU are scanned and any events are reported to the console
before panic'ing.
- To catch events for correctable errors, a periodic timer kicks off a
task which scans the MCx banks on all CPUs. The frequency of these
checks is controlled via the "hw.mca.interval" sysctl.
- Userland can request an immediate scan of the MCx banks by writing
a non-zero value to "hw.mca.force_scan".
- If any correctable events are encountered, the appropriate details
are stored in a 'struct mca_record' (defined in <machine/mca.h>).
The "hw.mca.count" is a count of such records and each record may
be queried via the "hw.mca.records" tree by specifying the record
index (0 .. count - 1) as the next name in the MIB similar to using
PIDs with the kern.proc.* sysctls. The idea is to export machine
check events to userland for more detailed processing.
- The periodic timer and hw.mca sysctls are only present if the CPU
supports MCA.
Discussed with: emaste (briefly)
MFC after: 1 month
Revision 1.675.2.11.2.1: download - view: text, markup, annotated - select for diffs
Wed Apr 15 03:14:26 2009 UTC (2 years, 9 months ago) by kensmith
Branches: RELENG_7_2
CVS tags: RELENG_7_2_0_RELEASE
Diff to: previous 1.675.2.11: preferred, colored; next MAIN 1.675.2.12: preferred, colored
Changes since revision 1.675.2.11: +0 -0 lines
SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE. Approved by: re (implicit)
Revision 1.699: download - view: text, markup, annotated - select for diffs
Sat Apr 11 14:01:01 2009 UTC (2 years, 10 months ago) by ed
Branches: MAIN
Diff to: previous 1.698: preferred, colored
Changes since revision 1.698: +8 -29 lines
SVN rev 190919 on 2009-04-11 14:01:01Z by ed Simplify in/out functions (for i386 and AMD64). Remove a hack to generate more efficient code for port numbers below 0x100, which has been obsolete for at least ten years, because GCC has an asm constraint to specify that. Submitted by: Christoph Mallon <christoph mallon gmx de>
Revision 1.698: download - view: text, markup, annotated - select for diffs
Wed Apr 1 13:09:26 2009 UTC (2 years, 10 months ago) by kib
Branches: MAIN
Diff to: previous 1.697: preferred, colored
Changes since revision 1.697: +89 -24 lines
SVN rev 190620 on 2009-04-01 13:09:26Z by kib Save and restore segment registers on amd64 when entering and leaving the kernel on amd64. Fill and read segment registers for mcontext and signals. Handle traps caused by restoration of the invalidated selectors. Implement user-mode creation and manipulation of the process-specific LDT descriptors for amd64, see sysarch(2). Implement support for TSS i/o port access permission bitmap for amd64. Context-switch LDT and TSS. Do not save and restore segment registers on the context switch, that is handled by kernel enter/leave trampolines now. Remove segment restore code from the signal trampolines for freebsd/amd64, freebsd/ia32 and linux/i386 for the same reason. Implement amd64-specific compat shims for sysarch. Linuxolator (temporary ?) switched to use gsbase for thread_area pointer. TODO: Currently, gdb is not adapted to show segment registers from struct reg. Also, no machine-depended ptrace command is added to set segment registers for debugged process. In collaboration with: pho Discussed with: peter Reviewed by: jhb Linuxolator tested by: dchagin
Revision 1.697: download - view: text, markup, annotated - select for diffs
Wed Apr 1 12:53:01 2009 UTC (2 years, 10 months ago) by kib
Branches: MAIN
Diff to: previous 1.696: preferred, colored
Changes since revision 1.696: +56 -15 lines
SVN rev 190619 on 2009-04-01 12:53:01Z by kib Add separate gdt descriptors for %fs and %gs on amd64. Reorder amd64 gdt descriptors so that user-accessible selectors are the same as on i386. At least Wine hard-codes this into the binary. In collaboration with: pho Reviewed by: jhb
Revision 1.696: download - view: text, markup, annotated - select for diffs
Tue Mar 31 21:14:05 2009 UTC (2 years, 10 months ago) by jkim
Branches: MAIN
Diff to: previous 1.695: preferred, colored
Changes since revision 1.695: +2 -1 lines
SVN rev 190600 on 2009-03-31 21:14:05Z by jkim Fix an uninitialized variable from the previous commit.
Revision 1.695: download - view: text, markup, annotated - select for diffs
Tue Mar 31 21:02:55 2009 UTC (2 years, 10 months ago) by jkim
Branches: MAIN
Diff to: previous 1.694: preferred, colored
Changes since revision 1.694: +13 -3 lines
SVN rev 190599 on 2009-03-31 21:02:55Z by jkim Probe size of installed memory modules from loader and display it as 'real memory' instead of Maxmem if the value is available. Note amd64 displayed physmem as 'usable memory' since machdep.c r1.640 to unconfuse users. Now it is consistent across amd64 and i386 again. While I am here, clean up smbios.c a bit and update copyright date. Reviewed by: jhb
Revision 1.694: download - view: text, markup, annotated - select for diffs
Thu Mar 26 18:07:13 2009 UTC (2 years, 10 months ago) by kib
Branches: MAIN
Diff to: previous 1.693: preferred, colored
Changes since revision 1.693: +72 -73 lines
SVN rev 190447 on 2009-03-26 18:07:13Z by kib Convert gdt_segs and ldt_segs initialization to C99 style. Reviewed by: jhb
Revision 1.675.2.11: download - view: text, markup, annotated - select for diffs
Wed Mar 25 17:22:15 2009 UTC (2 years, 10 months ago) by jhb
Branches: RELENG_7
CVS tags: RELENG_7_2_BP
Branch point for: RELENG_7_2
Diff to: previous 1.675.2.10: preferred, colored; branchpoint 1.675: preferred, colored
Changes since revision 1.675.2.10: +2 -1 lines
SVN rev 190418 on 2009-03-25 17:22:15Z by jhb Allow different ABIs to use different initial control words for the FPU on amd64 and i386. This fixes a bug were 32-bit binaries would run with a different floating point exception mask under FreeBSD/amd64 vs FreeBSD/i386. This commit also includes a few other minor changes to keep the code in sync with 8. Approved by: re (kib)
Revision 1.693: download - view: text, markup, annotated - select for diffs
Wed Mar 11 15:30:12 2009 UTC (2 years, 11 months ago) by dfr
Branches: MAIN
Diff to: previous 1.692: preferred, colored
Changes since revision 1.692: +8 -0 lines
SVN rev 189699 on 2009-03-11 15:30:12Z by dfr Merge in support for Xen HVM on amd64 architecture.
Revision 1.692: download - view: text, markup, annotated - select for diffs
Thu Mar 5 19:42:11 2009 UTC (2 years, 11 months ago) by jhb
Branches: MAIN
Diff to: previous 1.691: preferred, colored
Changes since revision 1.691: +2 -1 lines
SVN rev 189423 on 2009-03-05 19:42:11Z by jhb A better fix for handling different FPU initial control words for different ABIs: - Store the FPU initial control word in the pcb for each thread. - When first using the FPU, load the initial control word after restoring the clean state if it is not the standard control word. - Provide a correct control word for Linux/i386 binaries under FreeBSD/amd64. - Adjust the control word returned for fpugetregs()/npxgetregs() when a thread hasn't used the FPU yet to reflect the real initial control word for the current ABI. - The Linux/i386 ABI for FreeBSD/i386 now properly sets the right control word instead of trashing whatever the current state of the FPU is. Reviewed by: bde
Revision 1.691: download - view: text, markup, annotated - select for diffs
Tue Feb 3 09:01:45 2009 UTC (3 years ago) by jkoshy
Branches: MAIN
Diff to: previous 1.690: preferred, colored
Changes since revision 1.690: +13 -1 lines
SVN rev 188065 on 2009-02-03 09:01:45Z by jkoshy Improve robustness of NMI handling, for NMIs recognized in kernel mode. - Make the NMI handler run on its own stack (TSS_IST2). - Store the GSBASE value for each CPU just before the start of each NMI stack, permitting efficient retrieval using %rsp-relative addressing. - For NMIs taken from kernel mode, program MSR_GSBASE explicitly since one or both of MSR_GSBASE and MSR_KGSBASE can be potentially invalid. The current contents of MSR_GSBASE are saved and restored at exit. - For NMIs handled from user mode, continue to use 'swapgs' to load the per-CPU GSBASE. Reviewed by: jeff Debugging help: jeff Tested by: gnn, Artem Belevich <artemb at gmail dot com>
Revision 1.675.2.10.2.1: download - view: text, markup, annotated - select for diffs
Tue Nov 25 02:59:29 2008 UTC (3 years, 2 months ago) by kensmith
Branches: RELENG_7_1
CVS tags: RELENG_7_1_0_RELEASE
Diff to: previous 1.675.2.10: preferred, colored; next MAIN 1.675.2.11: preferred, colored
Changes since revision 1.675.2.10: +0 -0 lines
SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith Create releng/7.1 in preparation for moving into RC phase of 7.1 release cycle. Approved by: re (implicit)
Revision 1.638.2.16.2.1: download - view: text, markup, annotated - select for diffs
Thu Oct 2 02:57:24 2008 UTC (3 years, 4 months ago) by kensmith
Branches: RELENG_6_4
CVS tags: RELENG_6_4_0_RELEASE
Diff to: previous 1.638.2.16: preferred, colored; next MAIN 1.639: preferred, colored
Changes since revision 1.638.2.16: +0 -0 lines
SVN rev 183531 on 2008-10-02 02:57:24Z by kensmith Create releng/6.4 from stable/6 in preparation for 6.4-RC1. Approved by: re (implicit)
Revision 1.675.2.10: download - view: text, markup, annotated - select for diffs
Mon Sep 15 19:51:32 2008 UTC (3 years, 4 months ago) by kib
Branches: RELENG_7
CVS tags: RELENG_7_1_BP
Branch point for: RELENG_7_1
Diff to: previous 1.675.2.9: preferred, colored; branchpoint 1.675: preferred, colored
Changes since revision 1.675.2.9: +1 -0 lines
SVN rev 183049 on 2008-09-15 19:51:32Z by kib MFC r182868: The pcb_gs32p should be per-cpu, not per-thread pointer. This is location in GDT where the segment descriptor from pcb_gs32sd is copied, and the location is in GDT local to CPU. Approved by: re (kensmith)
Revision 1.675.2.9: download - view: text, markup, annotated - select for diffs
Mon Sep 15 09:35:29 2008 UTC (3 years, 4 months ago) by kib
Branches: RELENG_7
Diff to: previous 1.675.2.8: preferred, colored; branchpoint 1.675: preferred, colored
Changes since revision 1.675.2.8: +2 -2 lines
SVN rev 183035 on 2008-09-15 09:35:29Z by kib MFC r182865: Fix inconsistencies in the comments. Approved by: re (blackend)
Revision 1.690: download - view: text, markup, annotated - select for diffs
Mon Sep 8 09:59:05 2008 UTC (3 years, 5 months ago) by kib
Branches: MAIN
Diff to: previous 1.689: preferred, colored
Changes since revision 1.689: +1 -0 lines
SVN rev 182868 on 2008-09-08 09:59:05Z by kib The pcb_gs32p should be per-cpu, not per-thread pointer. This is location in GDT where the segment descriptor from pcb_gs32sd is copied, and the location is in GDT local to CPU. Noted and reviewed by: peter MFC after: 1 week
Revision 1.689: download - view: text, markup, annotated - select for diffs
Mon Sep 8 08:58:29 2008 UTC (3 years, 5 months ago) by kib
Branches: MAIN
Diff to: previous 1.688: preferred, colored
Changes since revision 1.688: +2 -2 lines
SVN rev 182865 on 2008-09-08 08:58:29Z by kib Fix inconsistencies in the comments. MFC after: 1 week
Revision 1.675.2.8: download - view: text, markup, annotated - select for diffs
Thu Sep 4 13:51:08 2008 UTC (3 years, 5 months ago) by kib
Branches: RELENG_7
Diff to: previous 1.675.2.7: preferred, colored; branchpoint 1.675: preferred, colored
Changes since revision 1.675.2.7: +1 -0 lines
SVN rev 182755 on 2008-09-04 13:51:08Z by kib MFC r182684: - When executing FreeBSD/amd64 binaries from FreeBSD/i386 or Linux/i386 processes, clear PCB_32BIT and PCB_GS32BIT bits. - Reread the fs and gs bases from the msr unconditionally, not believing the values in pcb_fsbase and pcb_gsbase, since usermode may reload segment registers, invalidating the cache. Approved by: re (kensmith)
Revision 1.688: download - view: text, markup, annotated - select for diffs
Tue Sep 2 17:52:11 2008 UTC (3 years, 5 months ago) by kib
Branches: MAIN
Diff to: previous 1.687: preferred, colored
Changes since revision 1.687: +1 -0 lines
SVN rev 182684 on 2008-09-02 17:52:11Z by kib - When executing FreeBSD/amd64 binaries from FreeBSD/i386 or Linux/i386 processes, clear PCB_32BIT and PCB_GS32BIT bits [1]. - Reread the fs and gs bases from the msr unconditionally, not believing the values in pcb_fsbase and pcb_gsbase, since usermode may reload segment registers, invalidating the cache. [2]. Both problems resulted in the wrong fs base, causing wrong tls pointer be dereferenced in the usermode. Reported and tested by: Vyacheslav Bocharov <adeepv at gmail com> [1] Reported by: Bernd Walter <ticsoat cicely7 cicely de>, Artem Belevich <fbsdlist at src cx>[2] Reviewed by: peter MFC after: 3 days
Revision 1.675.2.7: download - view: text, markup, annotated - select for diffs
Tue Jul 22 14:27:47 2008 UTC (3 years, 6 months ago) by rwatson
Branches: RELENG_7
Diff to: previous 1.675.2.6: preferred, colored; branchpoint 1.675: preferred, colored
Changes since revision 1.675.2.6: +1 -1 lines
SVN rev 180695 on 2008-07-22 14:27:47Z by rwatson Merge r177253, r177255 from head to stable/7: In keeping with style(9)'s recommendations on macros, use a ';' after each SYSINIT() macro invocation. This makes a number of lightweight C parsers much happier with the FreeBSD kernel source, including cflow's prcc and lxr. Discussed with: imp, rink The requirement to place a ; after each SYSINIT definition has not been MFC'd, as this might break the compile third-party modules, but merging the actual ; additions reduces diffs against 8.x making it easier to merge other changes.
Revision 1.687: download - view: text, markup, annotated - select for diffs
Wed Jul 9 19:44:37 2008 UTC (3 years, 7 months ago) by peter
Branches: MAIN
Diff to: previous 1.686: preferred, colored
Changes since revision 1.686: +4 -0 lines
SVN rev 180393 on 2008-07-09 19:44:37Z by peter Band-aid a problem with 32 bit selector setup. Initialize %ds, %es, and %fs during CPU startup. Otherwise a garbage value could leak to a 32-bit process if a process migrated to a different CPU after exec and the new CPU had never exec'd a 32-bit process. A more complete fix is needed, but this mitigates the most frequent manifestations. Obtained from: ups
Revision 1.686: download - view: text, markup, annotated - select for diffs
Fri Apr 25 05:18:47 2008 UTC (3 years, 9 months ago) by jeff
Branches: MAIN
Diff to: previous 1.685: preferred, colored
Changes since revision 1.685: +171 -40 lines
- Add an integer argument to idle to indicate how likely we are to wake from idle over the next tick. - Add a new MD routine, cpu_wake_idle() to wakeup idle threads who are suspended in cpu specific states. This function can fail and cause the scheduler to fall back to another mechanism (ipi). - Implement support for mwait in cpu_idle() on i386/amd64 machines that support it. mwait is a higher performance way to synchronize cpus as compared to hlt & ipis. - Allow selecting the idle routine by name via sysctl machdep.idle. This replaces machdep.cpu_idle_hlt. Only idle routines supported by the current machine are permitted. Sponsored by: Nokia
Revision 1.685: download - view: text, markup, annotated - select for diffs
Tue Apr 22 19:38:26 2008 UTC (3 years, 9 months ago) by phk
Branches: MAIN
Diff to: previous 1.684: preferred, colored
Changes since revision 1.684: +0 -1 lines
Now that all platforms use genclock, shuffle things around slightly for better structure. Much of this is related to <sys/clock.h>, which should really have been called <sys/calendar.h>, but unless and until we need the name, the repocopy can wait. In general the kernel does not know about minutes, hours, days, timezones, daylight savings time, leap-years and such. All that is theoretically a matter for userland only. Parts of kernel code does however care: badly designed filesystems store timestamps in local time and RTC chips almost universally track time in a YY-MM-DD HH:MM:SS format, and sometimes in local timezone instead of UTC. For this we have <sys/clock.h> <sys/time.h> on the other hand, deals with time_t, timeval, timespec and so on. These know only seconds and fractions thereof. Move inittodr() and resettodr() prototypes to <sys/time.h>. Retain the names as it is one of the few surviving PDP/VAX references. Move startrtclock() to <machine/clock.h> on relevant platforms, it is a MD call between machdep.c/clock.c. Remove references to it elsewhere. Remove a lot of unnecessary <sys/clock.h> includes. Move the machdep.disable_rtc_set sysctl to subr_rtc.c where it belongs. XXX: should be kern.disable_rtc_set really, it's not MD.
Revision 1.684: download - view: text, markup, annotated - select for diffs
Sat Apr 19 07:25:57 2008 UTC (3 years, 9 months ago) by peter
Branches: MAIN
Diff to: previous 1.683: preferred, colored
Changes since revision 1.683: +14 -2 lines
Put in a real isa_irq_pending() stub in order to remove two lines of dmesg noise from sio per unit. sio likes to probe if interrupts are configured correctly by looking at the pending bits of the atpic in order to put a non-fatal warning on the console. I think I'd rather read the pending bits from the apics, but I'm not sure its worth the hassle.
Revision 1.675.2.6: download - view: text, markup, annotated - select for diffs
Sun Mar 30 09:19:05 2008 UTC (3 years, 10 months ago) by rwatson
Branches: RELENG_7
Diff to: previous 1.675.2.5: preferred, colored; branchpoint 1.675: preferred, colored
Changes since revision 1.675.2.5: +2 -1 lines
Merge amd64/machdep.c:1.680, amd64/mp_watchdog.c:1.6, uart_dev_at91usart.c:1.13, scsi_low.h:1.9, subr_ntoskrnl.c:1.94, OsdDebug.c:1.14, dcons_os.c:1.20, ofw_consle.c:1.37, dev/sio.c:1.473, syscons.c:1.454, uart_core.c:1.23, union_subr.c:1.96, i386/machdep.c:1.664, i386/mp_watchdog.c:1.6, ia64/machdep.c:1.228, kern_clock.c:1.206, kern_shutdown.c:1.186, subr_kdb.c:1.25, subr_witness.c:1.239, vfs_subr.c:1.711, ng_base.c:1.140, cbus/sio.c:1.247, pc98/machdep.c:1.399, aim/machdep.c:1.107, pswitch.c:1.7, mac_test.c:19.3, psycho.c:1.73, sparc64/machdep.c:1.140, sparc64/trap.c:1.89, hvcons.c:1.7, sun4v/machdep.c:1.17, sun4v/trap.c:1.17, kdb.h:1.6 from HEAD to RELENG_7: Add a new 'why' argument to kdb_enter(), and a set of constants to use for that argument. This will allow DDB to detect the broad category of reason why the debugger has been entered, which it can use for the purposes of deciding which DDB script to run. Assign approximate why values to all current consumers of the kdb_enter() interface. For ABI/KPI reasons, the MFC creates a new function, kdb_enter_why(), with the new argument, updating existing consumers to use that, preserving kdb_enter() with the current argument, and wrapping it around kdb_enter_why().
Revision 1.638.2.16: download - view: text, markup, annotated - select for diffs
Thu Mar 27 13:53:50 2008 UTC (3 years, 10 months ago) by kib
Branches: RELENG_6
CVS tags: RELENG_6_4_BP
Branch point for: RELENG_6_4
Diff to: previous 1.638.2.15: preferred, colored; branchpoint 1.638: preferred, colored; next MAIN 1.639: preferred, colored
Changes since revision 1.638.2.15: +1 -1 lines
MFC
rev. 1.682 of sys/amd64/amd64/machdep.c
rev. 1.16 of sys/amd64/ia32/ia32_signal.c
rev. 1.33 of sys/amd64/linux32/linux32_sysvec.c
rev. 1.666 of sys/i386/i386/machdep.c
rev. 1.152 of sys/i386/linux/linux_sysvec.c
rev. 1.39 of sys/i386/svr4/svr4_machdep.c
rev. 1.402 of sys/pc98/pc98/machdep.c
Modify the signal handler frame setup code to clear the DF {e,r}flags
bit on the amd64/i386 for the signal handlers.
Revision 1.675.2.5: download - view: text, markup, annotated - select for diffs
Thu Mar 27 13:46:26 2008 UTC (3 years, 10 months ago) by kib
Branches: RELENG_7
Diff to: previous 1.675.2.4: preferred, colored; branchpoint 1.675: preferred, colored
Changes since revision 1.675.2.4: +1 -1 lines
MFC
rev. 1.682 of sys/amd64/amd64/machdep.c
rev. 1.16 of sys/amd64/ia32/ia32_signal.c
rev. 1.33 of sys/amd64/linux32/linux32_sysvec.c
rev. 1.666 of sys/i386/i386/machdep.c
rev. 1.152 of sys/i386/linux/linux_sysvec.c
rev. 1.39 of sys/i386/svr4/svr4_machdep.c
rev. 1.402 of sys/pc98/pc98/machdep.c
Modify the signal handler frame setup code to clear the DF {e,r}flags
bit on the amd64/i386 for the signal handlers.
Revision 1.638.2.15: download - view: text, markup, annotated - select for diffs
Fri Mar 21 15:34:38 2008 UTC (3 years, 10 months ago) by jhb
Branches: RELENG_6
Diff to: previous 1.638.2.14: preferred, colored; branchpoint 1.638: preferred, colored
Changes since revision 1.638.2.14: +1 -1 lines
MFC: Add constants for the different memory types in the SMAP table and use the SMAP types and constants from <machine/pc/bios.h> in the boot code.
Revision 1.675.2.4: download - view: text, markup, annotated - select for diffs
Fri Mar 21 15:34:13 2008 UTC (3 years, 10 months ago) by jhb
Branches: RELENG_7
Diff to: previous 1.675.2.3: preferred, colored; branchpoint 1.675: preferred, colored
Changes since revision 1.675.2.3: +1 -1 lines
MFC: Add constants for the different memory types in the SMAP table and use the SMAP types and constants from <machine/pc/bios.h> in the boot code.
Revision 1.683: download - view: text, markup, annotated - select for diffs
Sun Mar 16 10:58:02 2008 UTC (3 years, 10 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.682: preferred, colored
Changes since revision 1.682: +1 -1 lines
In keeping with style(9)'s recommendations on macros, use a ';' after each SYSINIT() macro invocation. This makes a number of lightweight C parsers much happier with the FreeBSD kernel source, including cflow's prcc and lxr. MFC after: 1 month Discussed with: imp, rink
Revision 1.682: download - view: text, markup, annotated - select for diffs
Thu Mar 13 10:54:36 2008 UTC (3 years, 10 months ago) by kib
Branches: MAIN
Diff to: previous 1.681: preferred, colored
Changes since revision 1.681: +1 -1 lines
Since version 4.3, gcc changed its behaviour concerning the i386/amd64
ABI and the direction flag, that is it now assumes that the direction
flag is cleared at the entry of a function and it doesn't clear once
more if needed. This new behaviour conforms to the i386/amd64 ABI.
Modify the signal handler frame setup code to clear the DF {e,r}flags
bit on the amd64/i386 for the signal handlers.
jhb@ noted that it might break old apps if they assumed DF == 1 would be
preserved in the signal handlers, but that such apps should be rare and
that older versions of gcc would not generate such apps.
Submitted by: Aurelien Jarno <aurelien aurel32 net>
PR: 121422
Reviewed by: jhb
MFC after: 2 weeks
Revision 1.681: download - view: text, markup, annotated - select for diffs
Wed Mar 12 10:11:54 2008 UTC (3 years, 10 months ago) by jeff
Branches: MAIN
Diff to: previous 1.680: preferred, colored
Changes since revision 1.680: +1 -1 lines
Remove kernel support for M:N threading. While the KSE project was quite successful in bringing threading to FreeBSD, the M:N approach taken by the kse library was never developed to its full potential. Backwards compatibility will be provided via libmap.conf for dynamically linked binaries and static binaries will be broken.
Revision 1.675.2.2.2.1: download - view: text, markup, annotated - select for diffs
Sat Jan 19 18:15:01 2008 UTC (4 years ago) by kib
Branches: RELENG_7_0
CVS tags: RELENG_7_0_0_RELEASE
Diff to: previous 1.675.2.2: preferred, colored; next MAIN 1.675.2.3: preferred, colored
Changes since revision 1.675.2.2: +1 -1 lines
MFC fix for the panic("vm_thread_new: kstack allocation failed") and
silent NULL pointer dereference in the i386 and sparc64 pmap_pinit()
when the kmem_alloc_nofault() failed to allocate address space. Both
functions now return error instead of panicing or dereferencing NULL.
The reason for MFCing this so late in release cycle is, according to
marius@, because
> it fixes the crashing (though no panic) of the test suite
> of the graphic/OpenEXR port on sparc64. This test suite is run
> (and required to succeed) during the package build and that's
> why portmgr@ bitch about at it as OpenEXR is a dependency of KDE
> which in turn is supposed to end up on the release CD images.
Revisions MFCed:
1.677 of src/sys/amd64/amd64/machdep.c
1.592 of src/sys/amd64/amd64/pmap.c
1.88 of src/sys/arm/arm/pmap.c
1.27 of src/sys/arm/at91/kb920x_machdep.c
1.22 of src/sys/arm/sa11x0/assabet_machdep.c
1.8 of src/sys/arm/xscale/i80321/ep80219_machdep.c
1.29 of src/sys/arm/xscale/i80321/iq31244_machdep.c
1.3 of src/sys/arm/xscale/i8134x/crb_machdep.c
1.6 of src/sys/arm/xscale/ixp425/avila_machdep.c
1.41 of src/sys/compat/pecoff/imgact_pecoff.c
1.26 of src/sys/compat/svr4/imgact_svr4.c
1.660 of src/sys/i386/i386/machdep.c
1.596 of src/sys/i386/i386/pmap.c
1.68 of src/sys/i386/ibcs2/imgact_coff.c
1.56 of src/sys/i386/linux/imgact_linux.c
1.226 of src/sys/ia64/ia64/machdep.c
1.192 of src/sys/ia64/ia64/pmap.c
1.102 of src/sys/kern/imgact_aout.c
1.179 of src/sys/kern/imgact_elf.c
1.56 of src/sys/kern/imgact_gzip.c
1.310 of src/sys/kern/kern_exec.c
1.287 of src/sys/kern/kern_fork.c
1.236 of src/sys/kern/kern_kse.c
1.253 of src/sys/kern/kern_proc.c
1.352 of src/sys/kern/kern_sig.c
1.63 of src/sys/kern/kern_thr.c
1.257 of src/sys/kern/kern_thread.c
1.397 of src/sys/pc98/pc98/machdep.c
1.104 of src/sys/powerpc/powerpc/machdep.c
1.10 of src/sys/powerpc/powerpc/pmap_dispatch.c
1.139 of src/sys/sparc64/sparc64/machdep.c
1.167 of src/sys/sparc64/sparc64/pmap.c
1.16 of src/sys/sun4v/sun4v/machdep.c
1.40 of src/sys/sun4v/sun4v/pmap.c
1.493 of src/sys/sys/proc.h
1.78 of src/sys/sys/signalvar.h
1.80 of src/sys/vm/pmap.h
1.79 of src/sys/vm/vm_extern.h
1.226 of src/sys/vm/vm_glue.c
1.390 of src/sys/vm/vm_map.c
Requested by: marius
Tested by: Peter Holm, marius (make universe and sparc64 runs)
Approved by: re (kensmith)
Revision 1.675.2.3: download - view: text, markup, annotated - select for diffs
Fri Jan 18 10:02:47 2008 UTC (4 years ago) by kib
Branches: RELENG_7
Diff to: previous 1.675.2.2: preferred, colored; branchpoint 1.675: preferred, colored
Changes since revision 1.675.2.2: +1 -1 lines
MFC fix for the panic("vm_thread_new: kstack allocation failed") and
silent NULL pointer dereference in the i386 and sparc64 pmap_pinit()
when the kmem_alloc_nofault() failed to allocate address space. Both
functions now return error instead of panicing or dereferencing NULL.
The reason for MFCing this so late in release cycle is, according to
marius@, because
> it fixes the crashing (though no panic) of the test suite
> of the graphic/OpenEXR port on sparc64. This test suite is run
> (and required to succeed) during the package build and that's
> why portmgr@ bitch about at it as OpenEXR is a dependency of KDE
> which in turn is supposed to end up on the release CD images.
Revisions MFCed:
1.677 of src/sys/amd64/amd64/machdep.c
1.592 of src/sys/amd64/amd64/pmap.c
1.88 of src/sys/arm/arm/pmap.c
1.27 of src/sys/arm/at91/kb920x_machdep.c
1.22 of src/sys/arm/sa11x0/assabet_machdep.c
1.8 of src/sys/arm/xscale/i80321/ep80219_machdep.c
1.29 of src/sys/arm/xscale/i80321/iq31244_machdep.c
1.3 of src/sys/arm/xscale/i8134x/crb_machdep.c
1.6 of src/sys/arm/xscale/ixp425/avila_machdep.c
1.41 of src/sys/compat/pecoff/imgact_pecoff.c
1.26 of src/sys/compat/svr4/imgact_svr4.c
1.660 of src/sys/i386/i386/machdep.c
1.596 of src/sys/i386/i386/pmap.c
1.68 of src/sys/i386/ibcs2/imgact_coff.c
1.56 of src/sys/i386/linux/imgact_linux.c
1.226 of src/sys/ia64/ia64/machdep.c
1.192 of src/sys/ia64/ia64/pmap.c
1.102 of src/sys/kern/imgact_aout.c
1.179 of src/sys/kern/imgact_elf.c
1.56 of src/sys/kern/imgact_gzip.c
1.310 of src/sys/kern/kern_exec.c
1.287 of src/sys/kern/kern_fork.c
1.236 of src/sys/kern/kern_kse.c
1.253 of src/sys/kern/kern_proc.c
1.352 of src/sys/kern/kern_sig.c
1.63 of src/sys/kern/kern_thr.c
1.257 of src/sys/kern/kern_thread.c
1.397 of src/sys/pc98/pc98/machdep.c
1.104 of src/sys/powerpc/powerpc/machdep.c
1.10 of src/sys/powerpc/powerpc/pmap_dispatch.c
1.139 of src/sys/sparc64/sparc64/machdep.c
1.167 of src/sys/sparc64/sparc64/pmap.c
1.16 of src/sys/sun4v/sun4v/machdep.c
1.40 of src/sys/sun4v/sun4v/pmap.c
1.493 of src/sys/sys/proc.h
1.78 of src/sys/sys/signalvar.h
1.80 of src/sys/vm/pmap.h
1.79 of src/sys/vm/vm_extern.h
1.226 of src/sys/vm/vm_glue.c
1.390 of src/sys/vm/vm_map.c
Requested by: marius
Tested by: Peter Holm, marius (make universe and sparc64 runs)
Approved by: re (kensmith)
Revision 1.680: download - view: text, markup, annotated - select for diffs
Tue Dec 25 17:51:55 2007 UTC (4 years, 1 month ago) by rwatson
Branches: MAIN
Diff to: previous 1.679: preferred, colored
Changes since revision 1.679: +2 -1 lines
Add a new 'why' argument to kdb_enter(), and a set of constants to use for that argument. This will allow DDB to detect the broad category of reason why the debugger has been entered, which it can use for the purposes of deciding which DDB script to run. Assign approximate why values to all current consumers of the kdb_enter() interface.
Revision 1.638.2.13.2.1: download - view: text, markup, annotated - select for diffs
Wed Dec 19 21:08:33 2007 UTC (4 years, 1 month ago) by rpaulo
Branches: RELENG_6_3
CVS tags: RELENG_6_3_0_RELEASE
Diff to: previous 1.638.2.13: preferred, colored; next MAIN 1.638.2.14: preferred, colored
Changes since revision 1.638.2.13: +25 -0 lines
MFC revision 1.679: Disallow the legacy USB circuit to generate an SMI# via an ICH register (MacBooks only). This allows MacBooks to boot in SMP mode without any trick and solves the timer problems with HZ=1000. Approved by: re (kensmith), njl (mentor)
Revision 1.638.2.14: download - view: text, markup, annotated - select for diffs
Wed Dec 19 21:01:35 2007 UTC (4 years, 1 month ago) by rpaulo
Branches: RELENG_6
Diff to: previous 1.638.2.13: preferred, colored; branchpoint 1.638: preferred, colored
Changes since revision 1.638.2.13: +25 -0 lines
MFC revision 1.679: Disallow the legacy USB circuit to generate an SMI# via an ICH register (MacBooks only). This allows MacBooks to boot in SMP mode without any trick and solves the timer problems with HZ=1000. Approved by: re (kensmith), njl (mentor)
Revision 1.675.2.2: download - view: text, markup, annotated - select for diffs
Wed Dec 19 20:52:37 2007 UTC (4 years, 1 month ago) by rpaulo
Branches: RELENG_7
CVS tags: RELENG_7_0_BP
Branch point for: RELENG_7_0
Diff to: previous 1.675.2.1: preferred, colored; branchpoint 1.675: preferred, colored
Changes since revision 1.675.2.1: +25 -0 lines
MFC revision 1.679: Disallow the legacy USB circuit to generate an SMI# via an ICH register (MacBooks only). This allows MacBooks to boot in SMP mode without any trick and solves the timer problems with HZ=1000. Approved by: re (kensmith), njl (mentor)
Revision 1.679: download - view: text, markup, annotated - select for diffs
Wed Dec 12 20:24:06 2007 UTC (4 years, 1 month ago) by rpaulo
Branches: MAIN
Diff to: previous 1.678: preferred, colored
Changes since revision 1.678: +25 -0 lines
Disallow the legacy USB circuit to generate an SMI# via an ICH register (MacBooks only). This allows MacBooks to boot in SMP mode without any trick and solves the timer problems with HZ=1000. MFC after: 1 week Reviewed by: njl (mentor), jhb Approved by: njl (mentor), jhb
Revision 1.638.2.13: download - view: text, markup, annotated - select for diffs
Wed Nov 21 16:41:51 2007 UTC (4 years, 2 months ago) by jhb
Branches: RELENG_6
CVS tags: RELENG_6_3_BP
Branch point for: RELENG_6_3
Diff to: previous 1.638.2.12: preferred, colored; branchpoint 1.638: preferred, colored
Changes since revision 1.638.2.12: +0 -1 lines
MFC: Add support for debugging double fault frames. Approved by: re (kensmith)
Revision 1.675.2.1: download - view: text, markup, annotated - select for diffs
Wed Nov 21 16:38:54 2007 UTC (4 years, 2 months ago) by jhb
Branches: RELENG_7
Diff to: previous 1.675: preferred, colored
Changes since revision 1.675: +0 -1 lines
MFC: Add support for debugging double fault frames. Approved by: re (kensmith)
Revision 1.678: download - view: text, markup, annotated - select for diffs
Thu Nov 15 22:00:57 2007 UTC (4 years, 2 months ago) by jhb
Branches: MAIN
Diff to: previous 1.677: preferred, colored
Changes since revision 1.677: +0 -1 lines
Add support for cross double fault frames in stack traces: - Populate the register values for the trapframe put on the stack by the double fault handler. - Teach DDB's trace routine to treat a double fault like other trap frames. MFC after: 3 days
Revision 1.677: download - view: text, markup, annotated - select for diffs
Mon Nov 5 11:36:09 2007 UTC (4 years, 3 months ago) by kib
Branches: MAIN
Diff to: previous 1.676: preferred, colored
Changes since revision 1.676: +1 -1 lines
Fix for the panic("vm_thread_new: kstack allocation failed") and
silent NULL pointer dereference in the i386 and sparc64 pmap_pinit()
when the kmem_alloc_nofault() failed to allocate address space. Both
functions now return error instead of panicing or dereferencing NULL.
As consequence, vmspace_exec() and vmspace_unshare() returns the errno
int. struct vmspace arg was added to vm_forkproc() to avoid dealing
with failed allocation when most of the fork1() job is already done.
The kernel stack for the thread is now set up in the thread_alloc(),
that itself may return NULL. Also, allocation of the first process
thread is performed in the fork1() to properly deal with stack
allocation failure. proc_linkup() is separated into proc_linkup()
called from fork1(), and proc_linkup0(), that is used to set up the
kernel process (was known as swapper).
In collaboration with: Peter Holm
Reviewed by: jhb
Revision 1.676: download - view: text, markup, annotated - select for diffs
Sun Oct 28 21:23:48 2007 UTC (4 years, 3 months ago) by jhb
Branches: MAIN
Diff to: previous 1.675: preferred, colored
Changes since revision 1.675: +1 -1 lines
- Add constants for the different memory types in the SMAP table. - Use the SMAP types and constants from <machine/pc/bios.h> in the boot code rather than duplicating it.
Revision 1.638.2.12: download - view: text, markup, annotated - select for diffs
Tue Aug 7 09:16:18 2007 UTC (4 years, 6 months ago) by jkoshy
Branches: RELENG_6
Diff to: previous 1.638.2.11: preferred, colored; branchpoint 1.638: preferred, colored
Changes since revision 1.638.2.11: +1 -1 lines
MFC rev 1.669: "Use a known good stack at the time of servicing an NMI--- reuse the space allocated for the double fault handler since this space is otherwise unused till the time a double fault occurs."
Revision 1.675: download - view: text, markup, annotated - select for diffs
Wed Jun 6 07:35:07 2007 UTC (4 years, 8 months ago) by davidxu
Branches: MAIN
CVS tags: RELENG_7_BP
Branch point for: RELENG_7
Diff to: previous 1.674: preferred, colored
Changes since revision 1.674: +0 -1 lines
Backout experimental adaptive-spin umtx code.
Revision 1.674: download - view: text, markup, annotated - select for diffs
Tue Jun 5 00:00:49 2007 UTC (4 years, 8 months ago) by jeff
Branches: MAIN
Diff to: previous 1.673: preferred, colored
Changes since revision 1.673: +4 -4 lines
Commit 14/14 of sched_lock decomposition. - Use thread_lock() rather than sched_lock for per-thread scheduling sychronization. - Use the per-process spinlock rather than the sched_lock for per-process scheduling synchronization. Tested by: kris, current@ Tested on: i386, amd64, ULE, 4BSD, libthr, libkse, PREEMPTION, etc. Discussed with: kris, attilio, kmacy, jhb, julian, bde (small parts each)
Revision 1.673: download - view: text, markup, annotated - select for diffs
Sun Jun 3 23:18:29 2007 UTC (4 years, 8 months ago) by alc
Branches: MAIN
Diff to: previous 1.672: preferred, colored
Changes since revision 1.672: +7 -1 lines
Add the machine-specific definitions for configuring the new physical memory allocator. Set the size of phys_avail[] and dump_avail[] using one of these definitions. Approved by: re
Revision 1.672: download - view: text, markup, annotated - select for diffs
Thu May 31 22:52:10 2007 UTC (4 years, 8 months ago) by attilio
Branches: MAIN
Diff to: previous 1.671: preferred, colored
Changes since revision 1.671: +2 -2 lines
Revert VMCNT_* operations introduction. Probabilly, a general approach is not the better solution here, so we should solve the sched_lock protection problems separately. Requested by: alc Approved by: jeff (mentor)
Revision 1.671: download - view: text, markup, annotated - select for diffs
Fri May 18 07:10:42 2007 UTC (4 years, 8 months ago) by jeff
Branches: MAIN
Diff to: previous 1.670: preferred, colored
Changes since revision 1.670: +2 -2 lines
- define and use VMCNT_{GET,SET,ADD,SUB,PTR} macros for manipulating
vmcnts. This can be used to abstract away pcpu details but also changes
to use atomics for all counters now. This means sched lock is no longer
responsible for protecting counts in the switch routines.
Contributed by: Attilio Rao <attilio@FreeBSD.org>
Revision 1.670: download - view: text, markup, annotated - select for diffs
Fri Mar 30 00:06:20 2007 UTC (4 years, 10 months ago) by jkim
Branches: MAIN
Diff to: previous 1.669: preferred, colored
Changes since revision 1.669: +9 -0 lines
MFP4: Linux set_thread_area syscall (aka TLS) support for amd64. Initial version was submitted by Divacky Roman and mostly rewritten by me. Tested by: emulation
Revision 1.669: download - view: text, markup, annotated - select for diffs
Sat Jan 27 18:13:24 2007 UTC (5 years ago) by jkoshy
Branches: MAIN
Diff to: previous 1.668: preferred, colored
Changes since revision 1.668: +1 -1 lines
Use a known good stack at the time of servicing an NMI --- reuse the space allocated for the double fault handler since this space is otherwise unused till the time a double fault occurs. This change should have been committed alongside r1.127 of "exception.S", but I somehow missed doing so. Problem reported by: jeff Pointy hat to: jkoshy
Revision 1.668: download - view: text, markup, annotated - select for diffs
Tue Jan 23 08:01:19 2007 UTC (5 years ago) by bde
Branches: MAIN
Diff to: previous 1.667: preferred, colored
Changes since revision 1.667: +6 -1 lines
Cleaned up declaration and initialization of clock_lock. It is only used by clock code, so don't export it to the world for machdep.c to initialize. There is a minor problem initializing it before it is used, since although clock initialization is split up so that parts of it can be done early, the first part was never done early enough to actually work. Split it up a bit more and do the first part as late as possible to document the necessary order. The functions that implement the split are still bogusly exported. Cleaned up initialization of the i8254 clock hardware using the new split. Actually initialize it early enough, and don't work around it not being initialized in DELAY() when DELAY() is called early for initialization of some console drivers. This unfortunately moves a little more code before the early debugger breakpoint so that it is harder to debug. The ordering of console and related initialization is delicate because we want to do as little as possible before the breakpoint, but must initialize a console.
Revision 1.638.2.10.2.1: download - view: text, markup, annotated - select for diffs
Sat Dec 23 01:11:13 2006 UTC (5 years, 1 month ago) by davidxu
Branches: RELENG_6_2
CVS tags: RELENG_6_2_0_RELEASE
Diff to: previous 1.638.2.10: preferred, colored; next MAIN 1.638.2.11: preferred, colored
Changes since revision 1.638.2.10: +1 -0 lines
MFR6: Store fault address into POSIX siginfo. Approved by: re (kensmith)
Revision 1.667: download - view: text, markup, annotated - select for diffs
Wed Dec 20 04:40:38 2006 UTC (5 years, 1 month ago) by davidxu
Branches: MAIN
Diff to: previous 1.666: preferred, colored
Changes since revision 1.666: +1 -0 lines
Add a lwpid field into per-cpu structure, the lwpid represents current
running thread's id on each cpu. This allow us to add in-kernel adaptive
spin for user level mutex. While spinning in user space is possible,
without correct thread running state exported from kernel, it hardly
can be implemented efficiently without wasting cpu cycles, however
exporting thread running state unlikely will be implemented soon as
it has to design and stablize interfaces. This implementation is
transparent to user space, it can be disabled dynamically. With this
change, mutex ping-pong program's performance is improved massively on
SMP machine. performance of mysql super-smack select benchmark is increased
about 7% on Intel dual dual-core2 Xeon machine, it indicates on systems
which have bunch of cpus and system-call overhead is low (athlon64, opteron,
and core-2 are known to be fast), the adaptive spin does help performance.
Added sysctls:
kern.threads.umtx_dflt_spins
if the sysctl value is non-zero, a zero umutex.m_spincount will
cause the sysctl value to be used a spin cycle count.
kern.threads.umtx_max_spins
the sysctl sets upper limit of spin cycle count.
Tested on: Athlon64 X2 3800+, Dual Xeon 5130
Revision 1.666: download - view: text, markup, annotated - select for diffs
Wed Dec 6 18:27:17 2006 UTC (5 years, 2 months ago) by sobomax
Branches: MAIN
Diff to: previous 1.665: preferred, colored
Changes since revision 1.665: +1 -0 lines
Allow machdep.cpu_idle_hlt to be set from the loader. This should allow to workaround the problem with SMP kernels on Turion64 X2 processors described in kern/104678 and may be useful in other situations too. MFC after: 3 days
Revision 1.665: download - view: text, markup, annotated - select for diffs
Wed Dec 6 06:34:53 2006 UTC (5 years, 2 months ago) by julian
Branches: MAIN
Diff to: previous 1.664: preferred, colored
Changes since revision 1.664: +0 -4 lines
Threading cleanup.. part 2 of several. Make part of John Birrell's KSE patch permanent.. Specifically, remove: Any reference of the ksegrp structure. This feature was never fully utilised and made things overly complicated. All code in the scheduler that tried to make threaded programs fair to unthreaded programs. Libpthread processes will already do this to some extent and libthr processes already disable it. Also: Since this makes such a big change to the scheduler(s), take the opportunity to rename some structures and elements that had to be moved anyhow. This makes the code a lot more readable. The ULE scheduler compiles again but I have no idea if it works. The 4bsd scheduler still reqires a little cleaning and some functions that now do ALMOST nothing will go away, but I thought I'd do that as a separate commit. Tested by David Xu, and Dan Eischen using libthr and libpthread.
Revision 1.638.2.11: download - view: text, markup, annotated - select for diffs
Fri Dec 1 08:34:38 2006 UTC (5 years, 2 months ago) by davidxu
Branches: RELENG_6
Diff to: previous 1.638.2.10: preferred, colored; branchpoint 1.638: preferred, colored
Changes since revision 1.638.2.10: +1 -0 lines
MFC: Store fault address into POSIX siginfo. PR: amd64/106109
Revision 1.664: download - view: text, markup, annotated - select for diffs
Sun Nov 19 20:54:57 2006 UTC (5 years, 2 months ago) by alc
Branches: MAIN
Diff to: previous 1.663: preferred, colored
Changes since revision 1.663: +6 -7 lines
The global variable avail_end is redundant and only used once. Eliminate it. Make avail_start static to the pmap on amd64. (It no longer exists on other architectures.)
Revision 1.663: download - view: text, markup, annotated - select for diffs
Fri Nov 17 20:27:01 2006 UTC (5 years, 2 months ago) by jhb
Branches: MAIN
Diff to: previous 1.662: preferred, colored
Changes since revision 1.662: +2 -1 lines
Add support for 8 byte hardware watches in long mode. Kernel hardware watches support 8 byte watches. For userland, we disallow 8 byte watches for 32-bit tasks.
Revision 1.662: download - view: text, markup, annotated - select for diffs
Fri Nov 17 19:20:31 2006 UTC (5 years, 2 months ago) by jhb
Branches: MAIN
Diff to: previous 1.661: preferred, colored
Changes since revision 1.661: +9 -8 lines
- Add macro constants for the various fields in %dr7 and use them in place of various scattered magic values. - Pretty print the address of hardware watchpoints in 'show watch' rather than just displaying hex. - Expand address field width on amd64 for 64-bit pointers.
Revision 1.661: download - view: text, markup, annotated - select for diffs
Wed Nov 15 19:53:47 2006 UTC (5 years, 2 months ago) by jhb
Branches: MAIN
Diff to: previous 1.660: preferred, colored
Changes since revision 1.660: +2 -3 lines
Various whitespace and style fixes.
Revision 1.660: download - view: text, markup, annotated - select for diffs
Tue Nov 7 21:57:18 2006 UTC (5 years, 3 months ago) by ru
Branches: MAIN
Diff to: previous 1.659: preferred, colored
Changes since revision 1.659: +1 -1 lines
Spelling.
Revision 1.659: download - view: text, markup, annotated - select for diffs
Tue Nov 7 21:55:39 2006 UTC (5 years, 3 months ago) by ru
Branches: MAIN
Diff to: previous 1.658: preferred, colored
Changes since revision 1.658: +2 -2 lines
Line up memory amount reporting that got broken when s/real/usable/.
Revision 1.658: download - view: text, markup, annotated - select for diffs
Tue Nov 7 18:46:33 2006 UTC (5 years, 3 months ago) by jhb
Branches: MAIN
Diff to: previous 1.657: preferred, colored
Changes since revision 1.657: +0 -2 lines
Remove duplicate IDTVEC macro definition, it's already defined in <machine/intr_machdep.h>.
Revision 1.638.2.10: download - view: text, markup, annotated - select for diffs
Mon Oct 30 18:03:02 2006 UTC (5 years, 3 months ago) by jhb
Branches: RELENG_6
CVS tags: RELENG_6_2_BP
Branch point for: RELENG_6_2
Diff to: previous 1.638.2.9: preferred, colored; branchpoint 1.638: preferred, colored
Changes since revision 1.638.2.9: +4 -14 lines
MFC: Change the x86 interrupt code to suspend/resume interrupt controllers (PICs) rather than interrupt sources. As a result, always reset the 8259As on resume and reset the local APIC of the BSP on resume. Approved by: re (hrs)
Revision 1.657: download - view: text, markup, annotated - select for diffs
Thu Oct 26 21:42:16 2006 UTC (5 years, 3 months ago) by jb
Branches: MAIN
Diff to: previous 1.656: preferred, colored
Changes since revision 1.656: +4 -0 lines
Make KSE a kernel option, turned on by default in all GENERIC kernel configs except sun4v (which doesn't process signals properly with KSE). Reviewed by: davidxu@
Revision 1.656: download - view: text, markup, annotated - select for diffs
Thu Oct 12 12:48:21 2006 UTC (5 years, 3 months ago) by jhb
Branches: MAIN
Diff to: previous 1.655: preferred, colored
Changes since revision 1.655: +3 -1 lines
Fix nodevice atpic compile. Pointy hat to: jhb
Revision 1.655: download - view: text, markup, annotated - select for diffs
Tue Oct 10 23:23:11 2006 UTC (5 years, 4 months ago) by jhb
Branches: MAIN
Diff to: previous 1.654: preferred, colored
Changes since revision 1.654: +1 -13 lines
Change the x86 interrupt code to suspend/resume interrupt controllers (PICs) rather than interrupt sources. This allows interrupt controllers with no interrupt pics (such as the 8259As when APIC is in use) to participate in suspend/resume. - Always register the 8259A PICs even if we don't use any of their pins. - Explicitly reset the 8259As on resume on amd64 if 'device atpic' isn't included. - Add a "dummy" PIC for the local APIC on the BSP to reset the local APIC on resume. This gets suspend/resume working with APIC on UP systems. SMP still needs more work to bring the APs back to life. The MFC after is tentative. Tested by: anholt (i386) Submitted by: Andrea Bittau <a.bittau at cs.ucl.ac.uk> (3) MFC after: 1 week
Revision 1.654: download - view: text, markup, annotated - select for diffs
Mon Oct 2 15:42:01 2006 UTC (5 years, 4 months ago) by phk
Branches: MAIN
Diff to: previous 1.653: preferred, colored
Changes since revision 1.653: +0 -20 lines
Second part of a little cleanup in the calendar/timezone/RTC handling.
Split subr_clock.c in two parts (by repo-copy):
subr_clock.c contains generic RTC and calendaric stuff. etc.
subr_rtc.c contains the newbus'ified RTC interface.
Centralize the machdep.{adjkerntz,disable_rtc_set,wall_cmos_clock}
sysctls and associated variables into subr_clock.c. They are
not machine dependent and we have generic code that relies on being
present so they are not even optional.
Revision 1.653: download - view: text, markup, annotated - select for diffs
Mon Oct 2 12:59:54 2006 UTC (5 years, 4 months ago) by phk
Branches: MAIN
Diff to: previous 1.652: preferred, colored
Changes since revision 1.652: +1 -0 lines
First part of a little cleanup in the calendar/timezone/RTC handling. Move relevant variables to <sys/clock.h> and fix #includes as necessary. Use libkern's much more time- & spamce-efficient BCD routines.
Revision 1.638.2.9: download - view: text, markup, annotated - select for diffs
Mon Sep 11 18:41:31 2006 UTC (5 years, 5 months ago) by jhb
Branches: RELENG_6
Diff to: previous 1.638.2.8: preferred, colored; branchpoint 1.638: preferred, colored
Changes since revision 1.638.2.8: +4 -4 lines
MFC: Sync sizes of physmap[], phys_avail[], and dump_avail[] and bump up the sizes to handle systems with very fragmented memory maps. Approved by: re (kensmith)
Revision 1.652: download - view: text, markup, annotated - select for diffs
Thu Sep 7 15:03:02 2006 UTC (5 years, 5 months ago) by jhb
Branches: MAIN
Diff to: previous 1.651: preferred, colored
Changes since revision 1.651: +4 -4 lines
Use a single constant to define the sizes of the physmap[], phys_avail[], and dump_avail[] arrays so they are in sync (previously it was possible to store more entries in the physmap[] then we could store in phys_avail[], which was pointless). While I'm here, bump up the length of these tables to hold 30 entries on amd64 and 16 on i386. This allows machines with fairly fragmented memory maps to boot ok (at least one machine would not boot FreeBSD/i386 but would boot FreeBSD/amd64 because amd64 allowed for more fragments). MFC after: 3 days
Revision 1.638.2.8: download - view: text, markup, annotated - select for diffs
Mon Jul 31 18:55:14 2006 UTC (5 years, 6 months ago) by jhb
Branches: RELENG_6
Diff to: previous 1.638.2.7: preferred, colored; branchpoint 1.638: preferred, colored
Changes since revision 1.638.2.7: +7 -7 lines
MFC: Fix hw.physmem/MAXMEM usage on systems with SMAP (including systems with ACPI).
Revision 1.651: download - view: text, markup, annotated - select for diffs
Thu Jul 27 19:47:22 2006 UTC (5 years, 6 months ago) by jhb
Branches: MAIN
Diff to: previous 1.650: preferred, colored
Changes since revision 1.650: +7 -7 lines
Don't allow MAXMEM or hw.physmem to extend the top of memory if our memory map was obtained from the SMAP. SMAP is trustworthy, and the memory extending feature is a band-aid for older systems where FreeBSD's methods of detecting memory were not always trustworthy. This fixes the issue where using hw.physmem could result in the ACPI tables getting trashed breaking ACPI. MFC after: 3 days Tested on: i386
Revision 1.638.2.7: download - view: text, markup, annotated - select for diffs
Sat Jul 1 09:06:40 2006 UTC (5 years, 7 months ago) by davidxu
Branches: RELENG_6
Diff to: previous 1.638.2.6: preferred, colored; branchpoint 1.638: preferred, colored
Changes since revision 1.638.2.6: +5 -2 lines
MFC: clear invalid bits in SSE mxcsr register.
Revision 1.650: download - view: text, markup, annotated - select for diffs
Mon Jun 19 22:36:01 2006 UTC (5 years, 7 months ago) by davidxu
Branches: MAIN
Diff to: previous 1.649: preferred, colored
Changes since revision 1.649: +5 -2 lines
MFi386: Use the method described in IA-32 Intel Architecture Software Developer's Manual chapter 11.6.6 to get valid mxcsr bits, use the mxcsr mask to clear invalid bits passed by user code.
Revision 1.649: download - view: text, markup, annotated - select for diffs
Thu May 11 17:29:22 2006 UTC (5 years, 9 months ago) by phk
Branches: MAIN
Diff to: previous 1.648: preferred, colored
Changes since revision 1.648: +3 -3 lines
Clean out sysctl machdep.* related defines. The cmos clock related stuff should really be in MI code.
Revision 1.638.2.6: download - view: text, markup, annotated - select for diffs
Mon Mar 20 19:56:43 2006 UTC (5 years, 10 months ago) by jhb
Branches: RELENG_6
CVS tags: RELENG_6_1_BP, RELENG_6_1_0_RELEASE, RELENG_6_1
Diff to: previous 1.638.2.5: preferred, colored; branchpoint 1.638: preferred, colored
Changes since revision 1.638.2.5: +20 -23 lines
MFC: Don't allow userland to set hardware watch points on kernel memory. Approved by: re (mux)
Revision 1.648: download - view: text, markup, annotated - select for diffs
Tue Mar 14 16:13:54 2006 UTC (5 years, 10 months ago) by jhb
Branches: MAIN
Diff to: previous 1.647: preferred, colored
Changes since revision 1.647: +20 -23 lines
Don't allow userland to set hardware watch points on kernel memory at all. Previously, we tried to allow this only for root. However, we were calling suser() on the *target* process rather than the current process. This means that if you can ptrace() a process running as root you can set a hardware watch point in the kernel. In practice I think you probably have to be root in order to pass the p_candebug() checks in ptrace() to attach to a process running as root anyway. Rather than fix the suser(), I just axed the entire idea, as I can't think of any good reason _at all_ for userland to set hardware watch points for KVM. MFC after: 3 days Also thinks hardware watch points on KVM from userland are bad: bde, rwatson
Revision 1.647: download - view: text, markup, annotated - select for diffs
Mon Mar 13 23:55:31 2006 UTC (5 years, 10 months ago) by peter
Branches: MAIN
Diff to: previous 1.646: preferred, colored
Changes since revision 1.646: +1 -1 lines
Cosmetic sync with i386
Revision 1.618.2.13: download - view: text, markup, annotated - select for diffs
Tue Feb 7 03:10:38 2006 UTC (6 years ago) by davidxu
Branches: RELENG_5
CVS tags: RELENG_5_5_BP, RELENG_5_5_0_RELEASE, RELENG_5_5
Diff to: previous 1.618.2.12: preferred, colored; branchpoint 1.618: preferred, colored; next MAIN 1.619: preferred, colored
Changes since revision 1.618.2.12: +2 -1 lines
MFC amd64/amd64/machdep.c revision 1.646, i386/i386/machdep.c
revision 1.622
>
> Clear carry flag in get_mcontext so that setcontext does not
> return a bogus error.
>
> PR: misc/92110
Approved by: re (scottl)
Revision 1.638.2.5: download - view: text, markup, annotated - select for diffs
Tue Feb 7 00:29:33 2006 UTC (6 years ago) by davidxu
Branches: RELENG_6
Diff to: previous 1.638.2.4: preferred, colored; branchpoint 1.638: preferred, colored
Changes since revision 1.638.2.4: +2 -1 lines
MFC amd64/amd64/machdep.c revision 1.646, i386/i386/machdep.c
revision 1.622
>
> Clear carry flag in get_mcontext so that setcontext does not
> return a bogus error.
>
> PR: misc/92110
Approved by: re (scottl)
Revision 1.646: download - view: text, markup, annotated - select for diffs
Fri Feb 3 02:49:14 2006 UTC (6 years ago) by davidxu
Branches: MAIN
Diff to: previous 1.645: preferred, colored
Changes since revision 1.645: +2 -1 lines
MFi386: Clear carry flag in get_mconetxt so that setcontext does not return a bogus error.
Revision 1.638.2.4: download - view: text, markup, annotated - select for diffs
Mon Nov 28 19:42:10 2005 UTC (6 years, 2 months ago) by jhb
Branches: RELENG_6
Diff to: previous 1.638.2.3: preferred, colored; branchpoint 1.638: preferred, colored
Changes since revision 1.638.2.3: +28 -8 lines
MFC: More fully setup the ATPICs including setting up spurious interrupt handlers if 'device atpic' is not in the kernel.
Revision 1.645: download - view: text, markup, annotated - select for diffs
Thu Nov 24 08:16:17 2005 UTC (6 years, 2 months ago) by ru
Branches: MAIN
Diff to: previous 1.644: preferred, colored
Changes since revision 1.644: +1 -1 lines
Add missing "struct" in i386/i386/machdep.c,v 1.497 by deischen@.
Revision 1.644: download - view: text, markup, annotated - select for diffs
Mon Nov 21 18:39:17 2005 UTC (6 years, 2 months ago) by jhb
Branches: MAIN
Diff to: previous 1.643: preferred, colored
Changes since revision 1.643: +28 -8 lines
Expand the hack to mask the atpics if 'device atpic' is not in the kernel during boot up. Now we do a full reset of the 8259As and setup a simple interrupt handler (we actually borrow the apic one that just does an immediate iret) to handle any spurious interrupts triggered by either chip. This should fix some folks that were getting a Trap 30 during bootup of certain SMP AMD systems. This might get pushed into the 6.0 branch as an errata. For now a suitable workaround is to add 'device atpic' to your kernel config. Tested by: scottl Helpful info from: dillon MFC after: 1 week
Revision 1.638.2.3: download - view: text, markup, annotated - select for diffs
Tue Nov 8 00:55:36 2005 UTC (6 years, 3 months ago) by davidxu
Branches: RELENG_6
Diff to: previous 1.638.2.2: preferred, colored; branchpoint 1.638: preferred, colored
Changes since revision 1.638.2.2: +2 -0 lines
Merge cpu_swtch.S:1.154, machdep.c:1.642 from HEAD: Micro optimization for context switch.
Revision 1.638.2.2: download - view: text, markup, annotated - select for diffs
Sat Nov 5 00:41:12 2005 UTC (6 years, 3 months ago) by peter
Branches: RELENG_6
Diff to: previous 1.638.2.1: preferred, colored; branchpoint 1.638: preferred, colored
Changes since revision 1.638.2.1: +1 -1 lines
MFC: allow FreeBSD/amd64 to boot on certain Dell machines that have more than 8 entries in the 0xe821 map. This includes things like ACPI exclusion zones, memory segments and recoverable memory segments after the kernel has booted.
Revision 1.643: download - view: text, markup, annotated - select for diffs
Wed Oct 26 22:16:52 2005 UTC (6 years, 3 months ago) by peter
Branches: MAIN
Diff to: previous 1.642: preferred, colored
Changes since revision 1.642: +1 -1 lines
Change PHYSMAP_SIZE to allow for more memory segments. The old value was too low for certain Dell amd64 machines.
Revision 1.642: download - view: text, markup, annotated - select for diffs
Mon Oct 17 23:10:31 2005 UTC (6 years, 3 months ago) by davidxu
Branches: MAIN
Diff to: previous 1.641: preferred, colored
Changes since revision 1.641: +2 -0 lines
Micro optimization for context switch. Eliminate code for saving gs.base and fs.base. We always update pcb.pcb_gsbase and pcb.pcb_fsbase when user wants to set them, in context switch routine, we only need to write them into registers, we never have to read them out from registers when thread is switched away. Since rdmsr is a serialization instruction, micro benchmark shows it is worthy to do. Reviewed by: peter, jhb
Revision 1.641: download - view: text, markup, annotated - select for diffs
Fri Oct 14 12:43:43 2005 UTC (6 years, 3 months ago) by davidxu
Branches: MAIN
Diff to: previous 1.640: preferred, colored
Changes since revision 1.640: +15 -33 lines
1. Change prototype of trapsignal and sendsig to use ksiginfo_t *, most changes in MD code are trivial, before this change, trapsignal and sendsig use discrete parameters, now they uses member fields of ksiginfo_t structure. For sendsig, this change allows us to pass POSIX realtime signal value to user code. 2. Remove cpu_thread_siginfo, it is no longer needed because we now always generate ksiginfo_t data and feed it to libpthread. 3. Add p_sigqueue to proc structure to hold shared signals which were blocked by all threads in the proc. 4. Add td_sigqueue to thread structure to hold all signals delivered to thread. 5. i386 and amd64 now return POSIX standard si_code, other arches will be fixed. 6. In this sigqueue implementation, pending signal set is kept as before, an extra siginfo list holds additional siginfo_t data for signals. kernel code uses psignal() still behavior as before, it won't be failed even under memory pressure, only exception is when deleting a signal, we should call sigqueue_delete to remove signal from sigqueue but not SIGDELSET. Current there is no kernel code will deliver a signal with additional data, so kernel should be as stable as before, a ksiginfo can carry more information, for example, allow signal to be delivered but throw away siginfo data if memory is not enough. SIGKILL and SIGSTOP have fast path in sigqueue_add, because they can not be caught or masked. The sigqueue() syscall allows user code to queue a signal to target process, if resource is unavailable, EAGAIN will be returned as specification said. Just before thread exits, signal queue memory will be freed by sigqueue_flush. Current, all signals are allowed to be queued, not only realtime signals. Earlier patch reviewed by: jhb, deischen Tested on: i386, amd64
Revision 1.638.2.1: download - view: text, markup, annotated - select for diffs
Sun Oct 2 16:38:12 2005 UTC (6 years, 4 months ago) by cperciva
Branches: RELENG_6
CVS tags: RELENG_6_0_BP, RELENG_6_0_0_RELEASE, RELENG_6_0
Diff to: previous 1.638: preferred, colored
Changes since revision 1.638: +4 -0 lines
MFC revision 1.639: Don't let the upper bits of %dr6/%dr7 get set. Submitted by: Nate Eldredge Approved by: re@ (scottl) Security: Local denial of service
Revision 1.640: download - view: text, markup, annotated - select for diffs
Tue Sep 27 18:15:57 2005 UTC (6 years, 4 months ago) by peter
Branches: MAIN
Diff to: previous 1.639: preferred, colored
Changes since revision 1.639: +2 -2 lines
Don't report Maxmem as 'real memory'. It is really the highest address available and can give the wrong impression when there are memory holes. Report the total amount of usable memory that we detected instead of the highest address.
Revision 1.639: download - view: text, markup, annotated - select for diffs
Tue Sep 27 18:10:26 2005 UTC (6 years, 4 months ago) by peter
Branches: MAIN
Diff to: previous 1.638: preferred, colored
Changes since revision 1.638: +4 -0 lines
Don't let the upper bits of %dr6/%dr7 get set. Submitted by: Nate Eldredge <neldredge@math.ucsd.edu>
Revision 1.638: download - view: text, markup, annotated - select for diffs
Wed Jun 29 22:28:45 2005 UTC (6 years, 7 months ago) by peter
Branches: MAIN
CVS tags: RELENG_6_BP
Branch point for: RELENG_6
Diff to: previous 1.637: preferred, colored
Changes since revision 1.637: +33 -12 lines
Switch AMD64 and i386 platforms to using ELF as their kernel crash dump format. The key reason to do this is so that we can dump sparse address space. For example, we need to be able to skip the PCI hole just below the 4GB boundary. Trying to destructively dump MMIO device registers is Really Bad(TM). The frequent result of trying to do a crash dump on a machine with 4GB or more ram was ugly (lockup or reboot). This code has been taken directly from the IA64 dump_machdep.c code, with just a few (mostly minor) mods. Introduce a dump_avail[] array in the machdep.c code so that we have a source of truth for what memory is present in a machine that needs to be dumped. We can't use phys_avail[] because all sorts of things slice memory out of it that we really need to dump. eg: the vm page array and the dmesg buffer. dump_avail[] is pretty much an unmolested version of phys_avail[]. It does have Maxmem correction. Bump the i386 and amd64 dump format to version 2, but nothing actually uses this. amd64 was actually using the i386 dump version number. libkvm support to follow. Approved by: re
Revision 1.637: download - view: text, markup, annotated - select for diffs
Fri Jun 24 00:45:01 2005 UTC (6 years, 7 months ago) by peter
Branches: MAIN
Diff to: previous 1.636: preferred, colored
Changes since revision 1.636: +1 -1 lines
Various trivial comment fixes Approved by: re
Revision 1.618.2.12: download - view: text, markup, annotated - select for diffs
Thu Jun 23 19:49:20 2005 UTC (6 years, 7 months ago) by peter
Branches: RELENG_5
Diff to: previous 1.618.2.11: preferred, colored; branchpoint 1.618: preferred, colored
Changes since revision 1.618.2.11: +1 -1 lines
MFp4: Various s/386/amd64/ fixes
Revision 1.618.2.11: download - view: text, markup, annotated - select for diffs
Mon May 30 18:22:28 2005 UTC (6 years, 8 months ago) by peter
Branches: RELENG_5
Diff to: previous 1.618.2.10: preferred, colored; branchpoint 1.618: preferred, colored
Changes since revision 1.618.2.10: +1 -4 lines
Remove unused (but initialized) variables. Merge 1.635 - set PCB_FULLCTX so that all of the registers that a debugger tries to set are used..
Revision 1.636: download - view: text, markup, annotated - select for diffs
Thu May 5 18:19:53 2005 UTC (6 years, 9 months ago) by peter
Branches: MAIN
Diff to: previous 1.635: preferred, colored
Changes since revision 1.635: +0 -2 lines
Remove unused (besides being initialized) variable.
Revision 1.635: download - view: text, markup, annotated - select for diffs
Wed May 4 22:26:40 2005 UTC (6 years, 9 months ago) by davidxu
Branches: MAIN
Diff to: previous 1.634: preferred, colored
Changes since revision 1.634: +1 -2 lines
Turn on PCB_FULLCTX in set_regs to fully restore context set by debugger.
Revision 1.601.2.1: download - view: text, markup, annotated - select for diffs
Wed Apr 6 01:44:36 2005 UTC (6 years, 10 months ago) by peter
Branches: RELENG_5_2
Diff to: previous 1.601: preferred, colored; next MAIN 1.602: preferred, colored
Changes since revision 1.601: +3 -0 lines
MFC: initialize the tss iobase properly Approved by: so (cperciva)
Revision 1.618.2.1.2.1: download - view: text, markup, annotated - select for diffs
Wed Apr 6 01:06:44 2005 UTC (6 years, 10 months ago) by cperciva
Branches: RELENG_5_3
Diff to: previous 1.618.2.1: preferred, colored; next MAIN 1.618.2.2: preferred, colored
Changes since revision 1.618.2.1: +3 -0 lines
Fully initialize the required TSS fields so that the io permission bitmap is set correctly. Patch from: peter Security: FreeBSD-SA-05:03.amd64 Approved by: so (cperciva)
Revision 1.618.2.9.2.1: download - view: text, markup, annotated - select for diffs
Wed Apr 6 01:06:15 2005 UTC (6 years, 10 months ago) by cperciva
Branches: RELENG_5_4
CVS tags: RELENG_5_4_0_RELEASE
Diff to: previous 1.618.2.9: preferred, colored; next MAIN 1.618.2.10: preferred, colored
Changes since revision 1.618.2.9: +3 -0 lines
Fully initialize the required TSS fields so that the io permission bitmap is set correctly. Patch from: peter Security: FreeBSD-SA-05:03.amd64 Approved by: re (kensmith)
Revision 1.618.2.10: download - view: text, markup, annotated - select for diffs
Wed Apr 6 01:05:51 2005 UTC (6 years, 10 months ago) by cperciva
Branches: RELENG_5
Diff to: previous 1.618.2.9: preferred, colored; branchpoint 1.618: preferred, colored
Changes since revision 1.618.2.9: +3 -0 lines
Fully initialize the required TSS fields so that the io permission bitmap is set correctly. Patch from: peter Security: FreeBSD-SA-05:03.amd64
Revision 1.634: download - view: text, markup, annotated - select for diffs
Wed Apr 6 01:05:36 2005 UTC (6 years, 10 months ago) by cperciva
Branches: MAIN
Diff to: previous 1.633: preferred, colored
Changes since revision 1.633: +3 -0 lines
Fully initialize the required TSS fields so that the io permission bitmap is set correctly. Patch from: peter Security: FreeBSD-SA-05:03.amd64
Revision 1.633: download - view: text, markup, annotated - select for diffs
Mon Apr 4 21:53:52 2005 UTC (6 years, 10 months ago) by jhb
Branches: MAIN
Diff to: previous 1.632: preferred, colored
Changes since revision 1.632: +24 -0 lines
Divorce critical sections from spinlocks. Critical sections as denoted by critical_enter() and critical_exit() are now solely a mechanism for deferring kernel preemptions. They no longer have any affect on interrupts. This means that standalone critical sections are now very cheap as they are simply unlocked integer increments and decrements for the common case. Spin mutexes now use a separate KPI implemented in MD code: spinlock_enter() and spinlock_exit(). This KPI is responsible for providing whatever MD guarantees are needed to ensure that a thread holding a spin lock won't be preempted by any other code that will try to lock the same lock. For now all archs continue to block interrupts in a "spinlock section" as they did formerly in all critical sections. Note that I've also taken this opportunity to push a few things into MD code rather than MI. For example, critical_fork_exit() no longer exists. Instead, MD code ensures that new threads have the correct state when they are created. Also, we no longer try to fixup the idlethreads for APs in MI code. Instead, each arch sets the initial curthread and adjusts the state of the idle thread it borrows in order to perform the initial context switch. This change is largely a big NOP, but the cleaner separation it provides will allow for more efficient alternative locking schemes in other parts of the kernel (bare critical sections rather than per-CPU spin mutexes for per-CPU data for example). Reviewed by: grehan, cognet, arch@, others Tested on: i386, alpha, sparc64, powerpc, arm, possibly more
Revision 1.632: download - view: text, markup, annotated - select for diffs
Sat Mar 5 18:57:30 2005 UTC (6 years, 11 months ago) by des
Branches: MAIN
Diff to: previous 1.631: preferred, colored
Changes since revision 1.631: +3 -35 lines
MFi386: use TUNABLE_ULONG_FETCH to retrieve hw.physmem.
Revision 1.631: download - view: text, markup, annotated - select for diffs
Sat Mar 5 18:14:44 2005 UTC (6 years, 11 months ago) by des
Branches: MAIN
Diff to: previous 1.630: preferred, colored
Changes since revision 1.630: +1 -2 lines
Replace goto with continue.
Revision 1.618.2.9: download - view: text, markup, annotated - select for diffs
Thu Mar 3 00:46:31 2005 UTC (6 years, 11 months ago) by wes
Branches: RELENG_5
CVS tags: RELENG_5_4_BP
Branch point for: RELENG_5_4
Diff to: previous 1.618.2.8: preferred, colored; branchpoint 1.618: preferred, colored
Changes since revision 1.618.2.8: +2 -0 lines
MFC 'hw.physmem' sysctl. Submitted by: Nicko Dehaine <nicko@stbernard.com>
Revision 1.630: download - view: text, markup, annotated - select for diffs
Tue Mar 1 04:18:32 2005 UTC (6 years, 11 months ago) by obrien
Branches: MAIN
Diff to: previous 1.629: preferred, colored
Changes since revision 1.629: +2 -0 lines
Catch up with the "physical memory" sysctl change. (MFi386: rev 1.608)
Revision 1.618.2.8: download - view: text, markup, annotated - select for diffs
Fri Feb 25 21:17:21 2005 UTC (6 years, 11 months ago) by njl
Branches: RELENG_5
Diff to: previous 1.618.2.7: preferred, colored; branchpoint 1.618: preferred, colored
Changes since revision 1.618.2.7: +69 -24 lines
MFC: cpu.h header and cpu_est_clockrate() functions for each arch.
Revision 1.618.2.7: download - view: text, markup, annotated - select for diffs
Mon Feb 14 10:33:15 2005 UTC (6 years, 11 months ago) by obrien
Branches: RELENG_5
Diff to: previous 1.618.2.6: preferred, colored; branchpoint 1.618: preferred, colored
Changes since revision 1.618.2.6: +1 -6 lines
MFC: rev 1.621: use the definition of struct bios_smap from machine/pc/bios.h.
Revision 1.618.2.6: download - view: text, markup, annotated - select for diffs
Mon Feb 14 10:32:12 2005 UTC (6 years, 11 months ago) by obrien
Branches: RELENG_5
Diff to: previous 1.618.2.5: preferred, colored; branchpoint 1.618: preferred, colored
Changes since revision 1.618.2.5: +16 -0 lines
MFC: rev 1.622: preserve dcons buffer passed by loader.
Revision 1.618.2.5: download - view: text, markup, annotated - select for diffs
Mon Feb 14 10:30:44 2005 UTC (6 years, 11 months ago) by obrien
Branches: RELENG_5
Diff to: previous 1.618.2.4: preferred, colored; branchpoint 1.618: preferred, colored
Changes since revision 1.618.2.4: +1 -2 lines
MFC: rev. 1.625: join the %cr0 setup line.
Revision 1.618.2.4: download - view: text, markup, annotated - select for diffs
Mon Feb 14 09:22:20 2005 UTC (6 years, 11 months ago) by obrien
Branches: RELENG_5
Diff to: previous 1.618.2.3: preferred, colored; branchpoint 1.618: preferred, colored
Changes since revision 1.618.2.3: +1 -0 lines
MFC: Use bitmapped IPI handler. Update elcr and default mptable
config handler. Tidy up various local apic initialization.
Revision 1.629: download - view: text, markup, annotated - select for diffs
Sun Feb 6 01:55:06 2005 UTC (7 years ago) by njl
Branches: MAIN
Diff to: previous 1.628: preferred, colored
Changes since revision 1.628: +15 -18 lines
Finish the job of sorting all includes and fix the build by including malloc.h before proc.h on sparc64. Noticed by das@ Compiled on: alpha, amd64, i386, pc98, sparc64
Revision 1.628: download - view: text, markup, annotated - select for diffs
Sat Feb 5 23:16:27 2005 UTC (7 years ago) by njl
Branches: MAIN
Diff to: previous 1.627: preferred, colored
Changes since revision 1.627: +10 -2 lines
Make cpu_est_clockrate() more accurate by disabling interrupts for the millisecond it is calibrating. Suggested by jhb@ and bde@. Don't clobber the tsc_freq with the new value since it isn't accurate enough for timecounters and the timecounter system as a whole needs support for changing rates before we do this. Subtract 0.5% from our measurement to account for overhead in DELAY. Note that this interface is for estimating the clockrate and needs to work well at runtime so doing a full calibration including disabling interrupts for a second is not feasible.
Revision 1.618.2.3: download - view: text, markup, annotated - select for diffs
Sat Feb 5 01:01:47 2005 UTC (7 years ago) by das
Branches: RELENG_5
Diff to: previous 1.618.2.2: preferred, colored; branchpoint 1.618: preferred, colored
Changes since revision 1.618.2.2: +2 -4 lines
MFC: 2004-11-20 02:29:25 UTC U areas are going away, so don't allocate one for process 0. 2004-11-27 06:51:39 UTC Don't include sys/user.h merely for its side-effect of recursively including other headers.
Revision 1.627: download - view: text, markup, annotated - select for diffs
Fri Feb 4 05:32:55 2005 UTC (7 years ago) by njl
Branches: MAIN
Diff to: previous 1.626: preferred, colored
Changes since revision 1.626: +47 -7 lines
Add an implementation of cpu_est_clockrate(9). This function estimates the current clock frequency for the given CPU id in units of Hz.
Revision 1.626: download - view: text, markup, annotated - select for diffs
Fri Jan 21 06:01:19 2005 UTC (7 years ago) by peter
Branches: MAIN
Diff to: previous 1.625: preferred, colored
Changes since revision 1.625: +1 -0 lines
JumboMFi386: use bitmapped IPI handler. Update elcr and default mptable config handler. Tidy up various local apic initialization.
Revision 1.625: download - view: text, markup, annotated - select for diffs
Mon Nov 29 23:27:07 2004 UTC (7 years, 2 months ago) by peter
Branches: MAIN
Diff to: previous 1.624: preferred, colored
Changes since revision 1.624: +1 -2 lines
MFi386: join the %cr0 setup line now that i386 has lost the I386 ifdefs.
Revision 1.624: download - view: text, markup, annotated - select for diffs
Sat Nov 27 06:51:32 2004 UTC (7 years, 2 months ago) by das
Branches: MAIN
Diff to: previous 1.623: preferred, colored
Changes since revision 1.623: +2 -1 lines
Don't include sys/user.h merely for its side-effect of recursively including other headers.
Revision 1.623: download - view: text, markup, annotated - select for diffs
Sat Nov 20 02:29:23 2004 UTC (7 years, 2 months ago) by das
Branches: MAIN
Diff to: previous 1.622: preferred, colored
Changes since revision 1.622: +0 -3 lines
U areas are going away, so don't allocate one for process 0. Reviewed by: arch@
Revision 1.618.2.2: download - view: text, markup, annotated - select for diffs
Tue Nov 9 02:02:31 2004 UTC (7 years, 3 months ago) by peter
Branches: RELENG_5
Diff to: previous 1.618.2.1: preferred, colored; branchpoint 1.618: preferred, colored
Changes since revision 1.618.2.1: +4 -0 lines
MFC: add missing cpu idle hook for smp machines. This was supposed to go into 5.3 but got dropped somewhere.
Revision 1.622: download - view: text, markup, annotated - select for diffs
Thu Oct 28 12:16:03 2004 UTC (7 years, 3 months ago) by simokawa
Branches: MAIN
Diff to: previous 1.621: preferred, colored
Changes since revision 1.621: +16 -0 lines
MFi386: preserve dcons buffer passed by loader.
Revision 1.621: download - view: text, markup, annotated - select for diffs
Fri Sep 24 01:11:11 2004 UTC (7 years, 4 months ago) by peter
Branches: MAIN
Diff to: previous 1.620: preferred, colored
Changes since revision 1.620: +1 -6 lines
Like on i386, use the definition of struct bios_smap from machine/pc/bios.h again.
Revision 1.618.2.1: download - view: text, markup, annotated - select for diffs
Thu Sep 9 10:03:17 2004 UTC (7 years, 5 months ago) by julian
Branches: RELENG_5
CVS tags: RELENG_5_3_BP, RELENG_5_3_0_RELEASE
Branch point for: RELENG_5_3
Diff to: previous 1.618: preferred, colored
Changes since revision 1.618: +1 -1 lines
MFC of: Refactor a bunch of scheduler code to give basically the same behaviour but with slightly cleaned up interfaces. (2004-09-05 02:09:54 UTC) see version 1.16 of sched.h for the original commit message. Approved by: re (scottl)
Revision 1.620: download - view: text, markup, annotated - select for diffs
Sun Sep 5 02:09:52 2004 UTC (7 years, 5 months ago) by julian
Branches: MAIN
Diff to: previous 1.619: preferred, colored
Changes since revision 1.619: +1 -1 lines
Refactor a bunch of scheduler code to give basically the same behaviour but with slightly cleaned up interfaces. The KSE structure has become the same as the "per thread scheduler private data" structure. In order to not make the diffs too great one is #defined as the other at this time. The KSE (or td_sched) structure is now allocated per thread and has no allocation code of its own. Concurrency for a KSEGRP is now kept track of via a simple pair of counters rather than using KSE structures as tokens. Since the KSE structure is different in each scheduler, kern_switch.c is now included at the end of each scheduler. Nothing outside the scheduler knows the contents of the KSE (aka td_sched) structure. The fields in the ksegrp structure that are to do with the scheduler's queueing mechanisms are now moved to the kg_sched structure. (per ksegrp scheduler private data structure). In other words how the scheduler queues and keeps track of threads is no-one's business except the scheduler's. This should allow people to write experimental schedulers with completely different internal structuring. A scheduler call sched_set_concurrency(kg, N) has been added that notifies teh scheduler that no more than N threads from that ksegrp should be allowed to be on concurrently scheduled. This is also used to enforce 'fainess' at this time so that a ksegrp with 10000 threads can not swamp a the run queue and force out a process with 1 thread, since the current code will not set the concurrency above NCPU, and both schedulers will not allow more than that many onto the system run queue at a time. Each scheduler should eventualy develop their own methods to do this now that they are effectively separated. Rejig libthr's kernel interface to follow the same code paths as linkse for scope system threads. This has slightly hurt libthr's performance but I will work to recover as much of it as I can. Thread exit code has been cleaned up greatly. exit and exec code now transitions a process back to 'standard non-threaded mode' before taking the next step. Reviewed by: scottl, peter MFC after: 1 week
Revision 1.619: download - view: text, markup, annotated - select for diffs
Tue Aug 24 00:16:43 2004 UTC (7 years, 5 months ago) by peter
Branches: MAIN
Diff to: previous 1.618: preferred, colored
Changes since revision 1.618: +4 -0 lines
Oops, I forgot to have the idle loop call mp_grab_cpu_hlt() on the amd64 SMP case.
Revision 1.618: download - view: text, markup, annotated - select for diffs
Mon Aug 16 22:57:47 2004 UTC (7 years, 5 months ago) by peter
Branches: MAIN
CVS tags: RELENG_5_BP
Branch point for: RELENG_5
Diff to: previous 1.617: preferred, colored
Changes since revision 1.617: +5 -0 lines
Sync with i386 - add foot shooting protection for the DDB/KDB thing.
Revision 1.617: download - view: text, markup, annotated - select for diffs
Tue Aug 10 12:15:27 2004 UTC (7 years, 6 months ago) by davidxu
Branches: MAIN
Diff to: previous 1.616: preferred, colored
Changes since revision 1.616: +4 -3 lines
As AMD64 architecture volume 1 chapter 3.1.2 says, high 32 bits of %rflags are resevered, they can be written with anything, but they always read as zero, we should simulate it in set_regs() as we are reading/writting real hardware %rflags register.
Revision 1.616: download - view: text, markup, annotated - select for diffs
Fri Aug 6 07:20:32 2004 UTC (7 years, 6 months ago) by markm
Branches: MAIN
Diff to: previous 1.615: preferred, colored
Changes since revision 1.615: +3 -0 lines
MFi386: sort out the mem device. Grrrr.
Revision 1.615: download - view: text, markup, annotated - select for diffs
Sat Jul 31 14:02:29 2004 UTC (7 years, 6 months ago) by davidxu
Branches: MAIN
Diff to: previous 1.614: preferred, colored
Changes since revision 1.614: +1 -0 lines
Turn on PCB_FULLCTX for set_mcontext, functions like kse_switchin needs to fully restore asynchronous context which did not come from fast syscall.
Revision 1.614: download - view: text, markup, annotated - select for diffs
Tue Jul 13 07:22:54 2004 UTC (7 years, 6 months ago) by davidxu
Branches: MAIN
Diff to: previous 1.613: preferred, colored
Changes since revision 1.613: +7 -0 lines
Add ptrace_clear_single_step(), alpha already has it for years, the function will be used by ptrace to clear a thread's single step state.
Revision 1.613: download - view: text, markup, annotated - select for diffs
Sat Jul 10 22:39:17 2004 UTC (7 years, 7 months ago) by marcel
Branches: MAIN
Diff to: previous 1.612: preferred, colored
Changes since revision 1.612: +13 -19 lines
Update for the KDB framework: o Make debugging support conditional upon KDB instead of DDB. o Remove implementation of Debugger(). o Don't make setjump() and longjump() conditional upon DDB. o s/ddb_on_nmi/kdb_on_nmi/g o Call kdb_reenter() when kdb_active is non-zero. Call kdb_trap() otherwise.
Revision 1.612: download - view: text, markup, annotated - select for diffs
Sat Jul 10 19:55:58 2004 UTC (7 years, 7 months ago) by marcel
Branches: MAIN
Diff to: previous 1.611: preferred, colored
Changes since revision 1.611: +21 -0 lines
Implement makectx(). The makectx() function is used by KDB to create a PCB from a trapframe for purposes of unwinding the stack. The PCB is used as the thread context and all but the thread that entered the debugger has a valid PCB. This function can also be used to create a context for the threads running on the CPUs that have been stopped when the debugger got entered. This however is not done at the time of this commit.
Revision 1.611: download - view: text, markup, annotated - select for diffs
Thu Jul 8 01:31:13 2004 UTC (7 years, 7 months ago) by peter
Branches: MAIN
Diff to: previous 1.610: preferred, colored
Changes since revision 1.610: +7 -23 lines
MFi386: fix up CR0 settings
Revision 1.610: download - view: text, markup, annotated - select for diffs
Fri Jun 11 11:16:18 2004 UTC (7 years, 8 months ago) by phk
Branches: MAIN
Diff to: previous 1.609: preferred, colored
Changes since revision 1.609: +2 -2 lines
Deorbit COMPAT_SUNOS. We inherited this from the sparc32 port of BSD4.4-Lite1. We have neither a sparc32 port nor a SunOS4.x compatibility desire these days.
Revision 1.609: download - view: text, markup, annotated - select for diffs
Thu Jun 10 20:30:55 2004 UTC (7 years, 8 months ago) by jhb
Branches: MAIN
Diff to: previous 1.608: preferred, colored
Changes since revision 1.608: +0 -3 lines
Remove atdevbase and replace it's remaining uses with direct references to KERNBASE instead.
Revision 1.608: download - view: text, markup, annotated - select for diffs
Tue Jun 8 01:02:51 2004 UTC (7 years, 8 months ago) by peter
Branches: MAIN
Diff to: previous 1.607: preferred, colored
Changes since revision 1.607: +0 -7 lines
Initial PG_NX support (no-execute page bit) - export the rest of the cpu features (and amd's features). - turn on EFER_NXE, depending on the NX amd feature bit - reorg the identcpu stuff a bit in order to stop treating the amd features as second class features (since it is now a primary feature bit set) and make it easier to export.
Revision 1.607: download - view: text, markup, annotated - select for diffs
Wed May 19 01:23:48 2004 UTC (7 years, 8 months ago) by peter
Branches: MAIN
Diff to: previous 1.606: preferred, colored
Changes since revision 1.606: +2 -0 lines
Unbreak builds without DDB. Bad Bruce! No cookie! :-)
Revision 1.606: download - view: text, markup, annotated - select for diffs
Tue May 18 05:30:06 2004 UTC (7 years, 8 months ago) by bde
Branches: MAIN
Diff to: previous 1.605: preferred, colored
Changes since revision 1.605: +6 -0 lines
Fixed DDB_NOKLDSYM on amd64's: machdep.c: Initialize the symbol table pointers, not quite like for other arches. db_elf.c: Don't claim to be an i486 in the fake ELF header.
Revision 1.605: download - view: text, markup, annotated - select for diffs
Mon Mar 8 00:16:52 2004 UTC (7 years, 11 months ago) by peter
Branches: MAIN
Diff to: previous 1.604: preferred, colored
Changes since revision 1.604: +1 -0 lines
MFi386: set initial curpcb pcpu variable at startup time rather than waiting for a context switch
Revision 1.604: download - view: text, markup, annotated - select for diffs
Wed Feb 25 23:12:39 2004 UTC (7 years, 11 months ago) by peter
Branches: MAIN
Diff to: previous 1.603: preferred, colored
Changes since revision 1.603: +2 -0 lines
Since we don't use PG_NX yet, don't turn on EFER_NXE quite yet. This needs to be done based on the cpuid bits. AMD says that we should test the cpuid features bits for certain things, such as this.
Revision 1.603: download - view: text, markup, annotated - select for diffs
Thu Jan 29 00:07:29 2004 UTC (8 years ago) by peter
Branches: MAIN
Diff to: previous 1.602: preferred, colored
Changes since revision 1.602: +218 -19 lines
Re-add debug register support. Some other minor tweaks snuck in here, including supporting more discontiguous memory segments and some cosmetic tweaks.
Revision 1.602: download - view: text, markup, annotated - select for diffs
Sat Jan 3 02:02:24 2004 UTC (8 years, 1 month ago) by davidxu
Branches: MAIN
Diff to: previous 1.601: preferred, colored
Changes since revision 1.601: +8 -8 lines
Make sigaltstack as per-threaded, because per-process sigaltstack state is useless for threaded programs, multiple threads can not share same stack. The alternative signal stack is private for thread, no lock is needed, the orignal P_ALTSTACK is now moved into td_pflags and renamed to TDP_ALTSTACK. For single thread or Linux clone() based threaded program, there is no semantic changed, because those programs only have one kernel thread in every process. Reviewed by: deischen, dfr
Revision 1.601: download - view: text, markup, annotated - select for diffs
Sat Dec 6 23:19:47 2003 UTC (8 years, 2 months ago) by peter
Branches: MAIN
CVS tags: RELENG_5_2_BP, RELENG_5_2_1_RELEASE, RELENG_5_2_0_RELEASE
Branch point for: RELENG_5_2
Diff to: previous 1.600: preferred, colored
Changes since revision 1.600: +1 -1 lines
Various whitespace and cosmetic sync-up's with i386. Approved by: re (scottl)
Revision 1.600: download - view: text, markup, annotated - select for diffs
Thu Nov 20 22:54:44 2003 UTC (8 years, 2 months ago) by peter
Branches: MAIN
Diff to: previous 1.599: preferred, colored
Changes since revision 1.599: +3 -0 lines
Provide a streamlined '#define curthread __curthread()' for amd64 to avoid the compiler having to parse and optimize the PCPU_GET(curthread) so often. __curthread() is an inline optimized version of PCPU_GET(curthread) that knows that pc_curthread is at offset zero in the pcpu struct. Add a CTASSERT() to catch any possible changes to this. This accounts for just over a 1% wall clock speedup for total kernel compile/link time, and 20% compile time speedup on some specific files depending on which compile options are used. Approved by: re (jhb)
Revision 1.599: download - view: text, markup, annotated - select for diffs
Mon Nov 17 08:58:12 2003 UTC (8 years, 2 months ago) by peter
Branches: MAIN
Diff to: previous 1.598: preferred, colored
Changes since revision 1.598: +58 -83 lines
Initial landing of SMP support for FreeBSD/amd64. - This is heavily derived from John Baldwin's apic/pci cleanup on i386. - I have completely rewritten or drastically cleaned up some other parts. (in particular, bootstrap) - This is still a WIP. It seems that there are some highly bogus bioses on nVidia nForce3-150 boards. I can't stress how broken these boards are. I have a workaround in mind, but right now the Asus SK8N is broken. The Gigabyte K8NPro (nVidia based) is also mind-numbingly hosed. - Most of my testing has been with SCHED_ULE. SCHED_4BSD works. - the apic and acpi components are 'standard'. - If you have an nVidia nForce3-150 board, you are stuck with 'device atpic' in addition, because they somehow managed to forget to connect the 8254 timer to the apic, even though its in the same silicon! ARGH! This directly violates the ACPI spec.
Revision 1.598: download - view: text, markup, annotated - select for diffs
Sat Nov 15 18:58:29 2003 UTC (8 years, 2 months ago) by njl
Branches: MAIN
Diff to: previous 1.597: preferred, colored
Changes since revision 1.597: +2 -0 lines
Add the pc_acpi_id PCPU member. The new acpi_cpu driver uses this to dereference the softc.
Revision 1.597: download - view: text, markup, annotated - select for diffs
Sun Nov 9 20:31:02 2003 UTC (8 years, 3 months ago) by marcel
Branches: MAIN
Diff to: previous 1.596: preferred, colored
Changes since revision 1.596: +2 -2 lines
Change the clear_ret argument of get_mcontext() to be a flags argument. Since all callers either passed 0 or 1 for clear_ret, define bit 0 in the flags for use as clear_ret. Reserve bits 1, 2 and 3 for use by MI code for possible (but unlikely) future use. The remaining bits are for use by MD code. This change is triggered by a need on ia64 to have another knob for get_mcontext().
Revision 1.596: download - view: text, markup, annotated - select for diffs
Sat Nov 8 04:37:54 2003 UTC (8 years, 3 months ago) by peter
Branches: MAIN
Diff to: previous 1.595: preferred, colored
Changes since revision 1.595: +2 -0 lines
Switch from having a fpu "device" to something that is more like the integrated part of the cpu core that it is.
Revision 1.595: download - view: text, markup, annotated - select for diffs
Sat Nov 8 03:33:37 2003 UTC (8 years, 3 months ago) by peter
Branches: MAIN
Diff to: previous 1.594: preferred, colored
Changes since revision 1.594: +17 -18 lines
The great s/npx/fpu/gi
Revision 1.594: download - view: text, markup, annotated - select for diffs
Sat Oct 18 22:25:07 2003 UTC (8 years, 3 months ago) by njl
Branches: MAIN
Diff to: previous 1.593: preferred, colored
Changes since revision 1.593: +17 -9 lines
Add the cpu_idle_hook() function pointer so that other idlers can be hooked at runtime. Make C1 sleep (e.g., HLT) be the default. This prepares the way for further ACPI sleep states.
Revision 1.593: download - view: text, markup, annotated - select for diffs
Tue Sep 23 00:45:55 2003 UTC (8 years, 4 months ago) by peter
Branches: MAIN
Diff to: previous 1.592: preferred, colored
Changes since revision 1.592: +1 -1 lines
Fix patch transcription typo. s/IDT_BPT/IDT_BP/
Revision 1.592: download - view: text, markup, annotated - select for diffs
Mon Sep 22 23:33:29 2003 UTC (8 years, 4 months ago) by peter
Branches: MAIN
Diff to: previous 1.591: preferred, colored
Changes since revision 1.591: +3 -1 lines
Move basemem variable into global scope so that the MP startup code can refer to it for looking for tables.
Revision 1.591: download - view: text, markup, annotated - select for diffs
Mon Sep 22 22:09:02 2003 UTC (8 years, 4 months ago) by peter
Branches: MAIN
Diff to: previous 1.590: preferred, colored
Changes since revision 1.590: +19 -20 lines
MFi386 by jhb: use symbolic constants for the IDT entries.
Revision 1.590: download - view: text, markup, annotated - select for diffs
Mon Sep 22 21:56:48 2003 UTC (8 years, 4 months ago) by peter
Branches: MAIN
Diff to: previous 1.589: preferred, colored
Changes since revision 1.589: +1 -1 lines
MFi386: machdep.c:1.570 clock.c:1.204 by bde: Quick fix for calling DELAY for ddb input in some atkbd-based console drivers. ddb must not use any normal locks but DELAY() normally calls getit() which needs clock_lock. This also removes the need for recursion on clock_lock.
Revision 1.589: download - view: text, markup, annotated - select for diffs
Tue Sep 9 19:32:09 2003 UTC (8 years, 5 months ago) by peter
Branches: MAIN
Diff to: previous 1.588: preferred, colored
Changes since revision 1.588: +28 -64 lines
Clean up get/set_mcontext() and get/set_fpcontext(). These are operated on data structures on the kernel stack which are guaranteed to be 16 byte aligned by gcc, the amd64 ABI and __aligned(16). Ensire the tss_rsp0 initial stack pointer is 16 byte aligned in case sizeof(pcb) becomes odd at some point. This is convenient for the interrupt handler case because the ring crossing pushes cause the required odd alignment before the call to the C code. Have fast_syscall add an additional 8 bytes to ensure that the trapframe has the correct odd alignment for the call to C code. Note that there are no checks to make sure that the trapframe size is appropriate for this. This makes get/setfpcontext work properly (finally). You get a GPF in kernel mode if any of this is botched without the alignment fixup code that is apparently needed on i386.
Revision 1.588: download - view: text, markup, annotated - select for diffs
Thu Jul 31 01:26:39 2003 UTC (8 years, 6 months ago) by peter
Branches: MAIN
Diff to: previous 1.587: preferred, colored
Changes since revision 1.587: +1 -1 lines
Cosmetic: fix disorder of opt_kstack_pages.h include.
Revision 1.587: download - view: text, markup, annotated - select for diffs
Fri Jul 25 21:15:44 2003 UTC (8 years, 6 months ago) by obrien
Branches: MAIN
Diff to: previous 1.586: preferred, colored
Changes since revision 1.586: +4 -2 lines
Use __FBSDID(). Brought to you by: a boring talk at Ottawa Linux Symposium
Revision 1.586: download - view: text, markup, annotated - select for diffs
Thu Jul 24 08:51:22 2003 UTC (8 years, 6 months ago) by davidxu
Branches: MAIN
Diff to: previous 1.585: preferred, colored
Changes since revision 1.585: +3 -0 lines
Set fault address to si_addr. Reviewed by: peter
Revision 1.585: download - view: text, markup, annotated - select for diffs
Wed Jul 23 23:20:20 2003 UTC (8 years, 6 months ago) by peter
Branches: MAIN
Diff to: previous 1.584: preferred, colored
Changes since revision 1.584: +1 -1 lines
Make the breakpoint instruction trap gate available to users. ptrace() needs this. Submitted by: Mark Kettenis <kettenis@chello.nl>
Revision 1.584: download - view: text, markup, annotated - select for diffs
Tue Jul 15 00:11:03 2003 UTC (8 years, 6 months ago) by davidxu
Branches: MAIN
Diff to: previous 1.583: preferred, colored
Changes since revision 1.583: +1 -1 lines
Rename thread_siginfo to cpu_thread_siginfo. Suggested by: jhb
Revision 1.583: download - view: text, markup, annotated - select for diffs
Sat Jun 28 06:34:07 2003 UTC (8 years, 7 months ago) by davidxu
Branches: MAIN
Diff to: previous 1.582: preferred, colored
Changes since revision 1.582: +19 -0 lines
Add a machine depended function thread_siginfo, SA signal code will use the function to construct a siginfo structure and use the result to export to userland. Reviewed by: julian
Revision 1.582: download - view: text, markup, annotated - select for diffs
Sat May 31 07:00:08 2003 UTC (8 years, 8 months ago) by peter
Branches: MAIN
CVS tags: RELENG_5_1_BP, RELENG_5_1_0_RELEASE, RELENG_5_1
Diff to: previous 1.581: preferred, colored
Changes since revision 1.581: +0 -2 lines
Add acpi to the build. Remove the hack from machdep.c that lies to the loader to shut it up.
Revision 1.581: download - view: text, markup, annotated - select for diffs
Sat May 31 06:54:29 2003 UTC (8 years, 8 months ago) by peter
Branches: MAIN
Diff to: previous 1.580: preferred, colored
Changes since revision 1.580: +13 -19 lines
Have hammer_time() return the proc0 stack location, and have locore switch to it before calling mi_startup(). The bootstack is WAY too small for running acpica during probe/attach. While here, pass modulep/physfree to the startup routine, rather than writing to the global variables in locore.S. Approved by: re (amd64/*)
Revision 1.580: download - view: text, markup, annotated - select for diffs
Fri May 23 05:04:53 2003 UTC (8 years, 8 months ago) by peter
Branches: MAIN
Diff to: previous 1.579: preferred, colored
Changes since revision 1.579: +9 -77 lines
Major pmap rework to take advantage of the larger address space on amd64 systems. Of note: - Implement a direct mapped region using 2MB pages. This eliminates the need for temporary mappings when getting ptes. This supports up to 512GB of physical memory for now. This should be enough for a while. - Implement a 4-tier page table system. Most of the infrastructure is there for 128TB of userland virtual address space, but only 512GB is presently enabled due to a mystery bug somewhere. The design of this was heavily inspired by the alpha pmap.c. - The kernel is moved into the negative address space(!). - The kernel has 2GB of KVM available. - Provide a uma memory allocator to use the direct map region to take advantage of the 2MB TLBs. - Fixed some assumptions in the bus_space macros about the ability to fit virtual addresses in an 'int'. Notable missing things: - pmap_growkernel() should be able to grow to 512GB of KVM by expanding downwards below kernbase. The kernel must be at the top 2GB of the negative address space because of gcc code generation strategies. - need to fix the >512GB user vm code. Approved by: re (blanket)
Revision 1.579: download - view: text, markup, annotated - select for diffs
Sat May 17 02:05:10 2003 UTC (8 years, 8 months ago) by peter
Branches: MAIN
Diff to: previous 1.578: preferred, colored
Changes since revision 1.578: +1 -1 lines
Actually get all the bits for sd_hibase.. it was 16 bits short. oops. Approved by: re (amd64/* blanket)
Revision 1.578: download - view: text, markup, annotated - select for diffs
Thu May 15 00:23:39 2003 UTC (8 years, 8 months ago) by peter
Branches: MAIN
Diff to: previous 1.577: preferred, colored
Changes since revision 1.577: +1 -8 lines
Collect the nastiness for preserving the kernel MSR_GSBASE around the load_gs() calls into a single place that is less likely to go wrong. Eliminate the per-process context switching of MSR_GSBASE, because it should be constant for a single cpu. Instead, save/restore it during the loading of the new %gs selector for the new process. Approved by: re (amd64/* blanket)
Revision 1.577: download - view: text, markup, annotated - select for diffs
Wed May 14 04:10:48 2003 UTC (8 years, 8 months ago) by peter
Branches: MAIN
Diff to: previous 1.576: preferred, colored
Changes since revision 1.576: +32 -8 lines
Add BASIC i386 binary support for the amd64 kernel. This is largely stolen from the ia64/ia32 code (indeed there was a repocopy), but I've redone the MD parts and added and fixed a few essential syscalls. It is sufficient to run i386 binaries like /bin/ls, /usr/bin/id (dynamic) and p4. The ia64 code has not implemented signal delivery, so I had to do that. Before you say it, yes, this does need to go in a common place. But we're in a freeze at the moment and I didn't want to risk breaking ia64. I will sort this out after the freeze so that the common code is in a common place. On the AMD64 side, this required adding segment selector context switch support and some other support infrastructure. The %fs/%gs etc code is hairy because loading %gs will clobber the kernel's current MSR_GSBASE setting. The segment selectors are not used by the kernel, so they're only changed at context switch time or when changing modes. This still needs to be optimized. Approved by: re (amd64/* blanket)
Revision 1.576: download - view: text, markup, annotated - select for diffs
Tue May 13 20:35:57 2003 UTC (8 years, 9 months ago) by jhb
Branches: MAIN
Diff to: previous 1.575: preferred, colored
Changes since revision 1.575: +4 -3 lines
- Merge struct procsig with struct sigacts. - Move struct sigacts out of the u-area and malloc() it using the M_SUBPROC malloc bucket. - Add a small sigacts_*() API for managing sigacts structures: sigacts_alloc(), sigacts_free(), sigacts_copy(), sigacts_share(), and sigacts_shared(). - Remove the p_sigignore, p_sigacts, and p_sigcatch macros. - Add a mutex to struct sigacts that protects all the members of the struct. - Add sigacts locking. - Remove Giant from nosys(), kill(), killpg(), and kern_sigaction() now that sigacts is locked. - Several in-kernel functions such as psignal(), tdsignal(), trapsignal(), and thread_stopped() are now MP safe. Reviewed by: arch@ Approved by: re (rwatson)
Revision 1.575: download - view: text, markup, annotated - select for diffs
Mon May 12 18:37:56 2003 UTC (8 years, 9 months ago) by peter
Branches: MAIN
Diff to: previous 1.574: preferred, colored
Changes since revision 1.574: +2 -0 lines
Really stop the loader from trying to load the acpi module by lying and pretending that it is already here. Approved by: re (amd64/* stuff)
Revision 1.574: download - view: text, markup, annotated - select for diffs
Mon May 12 18:33:19 2003 UTC (8 years, 9 months ago) by peter
Branches: MAIN
Diff to: previous 1.573: preferred, colored
Changes since revision 1.573: +2 -2 lines
For the page fault handler, save %cr2 in the outer trap handler so that we do not have to run so long with interrupts disabled. This involved creating tf_addr in the trapframe. Reorganize the trap stubs so that they consistently reserve the stack space and initialize any missing bits. Approved by: re (amd64 stuff)
Revision 1.573: download - view: text, markup, annotated - select for diffs
Mon May 12 18:23:04 2003 UTC (8 years, 9 months ago) by peter
Branches: MAIN
Diff to: previous 1.572: preferred, colored
Changes since revision 1.572: +2 -2 lines
Sync ucontext with reality. The struct trapframe changes need to be reflected here. Approved by: re (blanket amd64/*)
Revision 1.572: download - view: text, markup, annotated - select for diffs
Mon May 12 02:37:29 2003 UTC (8 years, 9 months ago) by peter
Branches: MAIN
Diff to: previous 1.571: preferred, colored
Changes since revision 1.571: +28 -24 lines
Give a %fs and %gs to userland. Use swapgs to obtain the kernel %GS.base value on entry and exit. This isn't as easy as it sounds because when we recursively trap or interrupt, we have to avoid duplicating the swapgs instruction or we end up back with the userland %gs. I implemented this by testing TF_CS to see if we're coming from supervisor mode already, and check for returning to supervisor. To avoid a race with interrupts in the brief period after beginning executing the handler and before the swapgs, convert all trap gates to interrupt gates, and reenable interrupts immediately after the swapgs. I am not happy with this. There are other possible ways to do this that should be investigated. (eg: storing the GS.base MSR value in the trapframe) Add some sysarch functions to let the userland code get to this. Approved by: re (blanket amd64/*)
Revision 1.571: download - view: text, markup, annotated - select for diffs
Sun May 11 22:53:42 2003 UTC (8 years, 9 months ago) by peter
Branches: MAIN
Diff to: previous 1.570: preferred, colored
Changes since revision 1.570: +1 -1 lines
Make atdevbase long for the KERNBASE > 4GB case Approved by: re (amd64/* blanket)
Revision 1.570: download - view: text, markup, annotated - select for diffs
Sun May 11 22:40:24 2003 UTC (8 years, 9 months ago) by peter
Branches: MAIN
Diff to: previous 1.569: preferred, colored
Changes since revision 1.569: +1 -1 lines
Fix printf format errors that were undetected due to using the standard FSF compiler during early development.
Revision 1.569: download - view: text, markup, annotated - select for diffs
Sat May 10 00:49:56 2003 UTC (8 years, 9 months ago) by peter
Branches: MAIN
Diff to: previous 1.568: preferred, colored
Changes since revision 1.568: +0 -61 lines
Finish translating i386/support.s into amd64 asm - replace bcopy etc with asm versions. This yields about a 5% kernel compile time speedup.
Revision 1.568: download - view: text, markup, annotated - select for diffs
Thu May 8 08:25:51 2003 UTC (8 years, 9 months ago) by peter
Branches: MAIN
Diff to: previous 1.567: preferred, colored
Changes since revision 1.567: +1 -1 lines
Oops. Turn T_PAGEFLT back into an interrupt gate. It is *critical* that interrupts be disabled and remain disabled until %cr2 is read. Otherwise we can preempt and another process can fault, and by the time we read %cr2, we see a different processes fault address. This Greatly Confuses vm_fault() (to say the least). The i386 port has got this marked as a bug workaround for a Cyrix CPU, which is what lead me astray. Its actually necessary for preemption, regardless of whether Cyrix cpus had a bug or not.
Revision 1.567: download - view: text, markup, annotated - select for diffs
Thu May 8 00:13:24 2003 UTC (8 years, 9 months ago) by peter
Branches: MAIN
Diff to: previous 1.566: preferred, colored
Changes since revision 1.566: +1 -1 lines
Leave space for the 128 byte red-zone on the stack.
Revision 1.566: download - view: text, markup, annotated - select for diffs
Thu May 8 00:12:37 2003 UTC (8 years, 9 months ago) by peter
Branches: MAIN
Diff to: previous 1.565: preferred, colored
Changes since revision 1.565: +1 -0 lines
#include <machine/metadata.h> was missing; add it
Revision 1.565: download - view: text, markup, annotated - select for diffs
Thu May 1 04:18:02 2003 UTC (8 years, 9 months ago) by peter
Branches: MAIN
Diff to: previous 1.564: preferred, colored
Changes since revision 1.564: +4 -2 lines
I changed the numbering of the MODINFOMD_SMAP during the commit, so recognize the old number for my development boxes so I can use old loader/pxeboot for a while if I need to.
Revision 1.564: download - view: text, markup, annotated - select for diffs
Thu May 1 01:05:21 2003 UTC (8 years, 9 months ago) by peter
Branches: MAIN
Diff to: previous 1.563: preferred, colored
Changes since revision 1.563: +548 -1569 lines
Commit MD parts of a loosely functional AMD64 port. This is based on a heavily stripped down FreeBSD/i386 (brutally stripped down actually) to attempt to get a stable base to start from. There is a lot missing still. Worth noting: - The kernel runs at 1GB in order to cheat with the pmap code. pmap uses a variation of the PAE code in order to avoid having to worry about 4 levels of page tables yet. - It boots in 64 bit "long mode" with a tiny trampoline embedded in the i386 loader. This simplifies locore.s greatly. - There are still quite a few fragments of i386-specific code that have not been translated yet, and some that I cheated and wrote dumb C versions of (bcopy etc). - It has both int 0x80 for syscalls (but using registers for argument passing, as is native on the amd64 ABI), and the 'syscall' instruction for syscalls. int 0x80 preserves all registers, 'syscall' does not. - I have tried to minimize looking at the NetBSD code, except in a couple of places (eg: to find which register they use to replace the trashed %rcx register in the syscall instruction). As a result, there is not a lot of similarity. I did look at NetBSD a few times while debugging to get some ideas about what I might have done wrong in my first attempt.
Revision 1.563: download - view: text, markup, annotated - select for diffs
Fri Apr 25 01:50:28 2003 UTC (8 years, 9 months ago) by deischen
Branches: MAIN
Diff to: previous 1.562: preferred, colored
Changes since revision 1.562: +8 -3 lines
Add an argument to get_mcontext() which specified whether the syscall return values should be cleared. The system calls getcontext() and swapcontext() want to return 0 on success but these contexts can be switched to at a later time so the return values need to be cleared in the saved register sets. Other callers of get_mcontext() would normally want the context without clearing the return values. Remove the i386-specific context saving from the KSE code. get_mcontext() is not i386-specific any more. Fix a bad pointer in the alpha get_mcontext() code. The context was being bcopy()'d from &td->tf_frame, but tf_frame is itself a pointer, so the thread was being copied instead. Spotted by jake. Glanced at by: jake Reviewed by: bde (months ago)
Revision 1.562: download - view: text, markup, annotated - select for diffs
Fri Apr 18 20:09:03 2003 UTC (8 years, 9 months ago) by jhb
Branches: MAIN
Diff to: previous 1.561: preferred, colored
Changes since revision 1.561: +2 -0 lines
Hold the proc lock for curproc around sigonstack().
Revision 1.385.2.29: download - view: text, markup, annotated - select for diffs
Fri Apr 4 22:21:29 2003 UTC (8 years, 10 months ago) by tegge
Branches: old_RELENG_4
Diff to: previous 1.385.2.28: preferred, colored; branchpoint 1.385: preferred, colored; next MAIN 1.386: preferred, colored
Changes since revision 1.385.2.28: +13 -0 lines
MFC: Support for bypassing buffer cache for O_DIRECT reads.
Revision 1.561: download - view: text, markup, annotated - select for diffs
Wed Apr 2 23:53:28 2003 UTC (8 years, 10 months ago) by peter
Branches: MAIN
Diff to: previous 1.560: preferred, colored
Changes since revision 1.560: +33 -3 lines
Commit a partial lazy thread switch mechanism for i386. it isn't as lazy as it could be and can do with some more cleanup. Currently its under options LAZY_SWITCH. What this does is avoid %cr3 reloads for short context switches that do not involve another user process. ie: we can take an interrupt, switch to a kthread and return to the user without explicitly flushing the tlb. However, this isn't as exciting as it could be, the interrupt overhead is still high and too much blocks on Giant still. There are some debug sysctls, for stats and for an on/off switch. The main problem with doing this has been "what if the process that you're running on exits while we're borrowing its address space?" - in this case we use an IPI to give it a kick when we're about to reclaim the pmap. Its not compiled in unless you add the LAZY_SWITCH option. I want to fix a few more things and get some more feedback before turning it on by default. This is NOT a replacement for Bosko's lazy interrupt stuff. This was more meant for the kthread case, while his was for interrupts. Mine helps a little for interrupts, but his helps a lot more. The stats are enabled with options SWTCH_OPTIM_STATS - this has been a pseudo-option for years, I just added a bunch of stuff to it. One non-trivial change was to select a new thread before calling cpu_switch() in the first place. This allows us to catch the silly case of doing a cpu_switch() to the current process. This happens uncomfortably often. This simplifies a bit of the asm code in cpu_switch (no longer have to call choosethread() in the middle). This has been implemented on i386 and (thanks to jake) sparc64. The others will come soon. This is actually seperate to the lazy switch stuff. Glanced at by: jake, jhb
Revision 1.560: download - view: text, markup, annotated - select for diffs
Mon Mar 31 22:49:14 2003 UTC (8 years, 10 months ago) by jeff
Branches: MAIN
Diff to: previous 1.559: preferred, colored
Changes since revision 1.559: +9 -9 lines
- Move p->p_sigmask to td->td_sigmask. Signal masks will be per thread with a follow on commit to kern_sig.c - signotify() now operates on a thread since unmasked pending signals are stored in the thread. - PS_NEEDSIGCHK moves to TDF_NEEDSIGCHK.
Revision 1.559: download - view: text, markup, annotated - select for diffs
Mon Mar 31 22:02:36 2003 UTC (8 years, 10 months ago) by jeff
Branches: MAIN
Diff to: previous 1.558: preferred, colored
Changes since revision 1.558: +6 -6 lines
- Change trapsignal() to accept a thread and not a proc. - Change all consumers to pass in a thread. Right now this does not cause any functional changes but it will be important later when signals can be delivered to specific threads.
Revision 1.558: download - view: text, markup, annotated - select for diffs
Sun Mar 30 05:24:52 2003 UTC (8 years, 10 months ago) by jake
Branches: MAIN
Diff to: previous 1.557: preferred, colored
Changes since revision 1.557: +10 -0 lines
- Add support for PAE and more than 4 gigs of ram on x86, dependent on the kernel opition 'options PAE'. This will only work with device drivers which either use busdma, or are able to handle 64 bit physical addresses. Thanks to Lanny Baron from FreeBSD Systems for the loan of a test machine with 6 gigs of ram. Sponsored by: DARPA, Network Associates Laboratories, FreeBSD Systems
Revision 1.557: download - view: text, markup, annotated - select for diffs
Wed Mar 26 19:49:34 2003 UTC (8 years, 10 months ago) by ps
Branches: MAIN
Diff to: previous 1.556: preferred, colored
Changes since revision 1.556: +6 -0 lines
Nuke options HTT infavor of machdep.hlt_logical_cpus tunable/sysctl. This keeps the logical cpu's halted in the idle loop. By default the logical cpu's are halted at startup. It is also possible to halt any cpu in the idle loop now using machdep.hlt_cpus. Examples of how to use this: machdep.hlt_cpus=1 halt cpu0 machdep.hlt_cpus=2 halt cpu1 machdep.hlt_cpus=4 halt cpu2 machdep.hlt_cpus=3 halt cpu0,cpu1 Reviewed by: jhb, peter
Revision 1.556: download - view: text, markup, annotated - select for diffs
Wed Mar 26 19:40:29 2003 UTC (8 years, 10 months ago) by peter
Branches: MAIN
Diff to: previous 1.555: preferred, colored
Changes since revision 1.555: +3 -4 lines
Halt the cpus in the idle loop for SMP as well for several reasons: 1) Its critical for HTT. There's less foot-shooting opportunity. 2) I've seen significant improvements in interactive response to commands over ssh sessions. I assume this is less lock contention. 3) As incentive to finish the idle cpu IPI wakeup stuff. 4) The machine on my desk was blowing hot air in my general direction because somebody forgot to turn the hlt on, and it saves 50 watts per cpu.. The machdep.cpu_idle_hlt sysctl is still available, but now the default is the same as on UP kernels.
Revision 1.555: download - view: text, markup, annotated - select for diffs
Tue Mar 25 00:07:02 2003 UTC (8 years, 10 months ago) by jake
Branches: MAIN
Diff to: previous 1.554: preferred, colored
Changes since revision 1.554: +21 -20 lines
- Add vm_paddr_t, a physical address type. This is required for systems where physical addresses larger than virtual addresses, such as i386s with PAE. - Use this to represent physical addresses in the MI vm system and in the i386 pmap code. This also changes the paddr parameter to d_mmap_t. - Fix printf formats to handle physical addresses >4G in the i386 memory detection code, and due to kvtop returning vm_paddr_t instead of u_long. Note that this is a name change only; vm_paddr_t is still the same as vm_offset_t on all currently supported platforms. Sponsored by: DARPA, Network Associates Laboratories Discussed with: re, phk (cdevsw change)
Revision 1.554: download - view: text, markup, annotated - select for diffs
Thu Feb 20 05:35:52 2003 UTC (8 years, 11 months ago) by peter
Branches: MAIN
Diff to: previous 1.553: preferred, colored
Changes since revision 1.553: +1 -1 lines
Fix fumble in rev 1.525. pmap_kenter()'s second argument is a physical address, not a page index. Laughed at by: jake
Revision 1.553: download - view: text, markup, annotated - select for diffs
Tue Jan 28 19:05:44 2003 UTC (9 years ago) by jake
Branches: MAIN
Diff to: previous 1.552: preferred, colored
Changes since revision 1.552: +1 -7 lines
Remove BDE_DEBUGGER. Discussed with: bde
Revision 1.385.2.28: download - view: text, markup, annotated - select for diffs
Wed Jan 22 20:14:52 2003 UTC (9 years ago) by jhb
Branches: old_RELENG_4
CVS tags: old_RELENG_4_8_BP, old_RELENG_4_8_0_RELEASE, old_RELENG_4_8
Diff to: previous 1.385.2.27: preferred, colored; branchpoint 1.385: preferred, colored
Changes since revision 1.385.2.27: +0 -2 lines
MFC: Precursors to simple hyperthreading support and sync with current: - Axe earlysetcpuclass() as it was OBE a long time ago. - Add cpu_exthigh to hold the highest supported extended cpuid. - Don't initialize cpu_class, the initial value isn't used anywhere. - Make the support for processor names in the extended cpuid information shared between the AMD and Transmeta sections and also perform it for Intel CPUs. - Support brand-indexed names for Intel CPUs. - Sync AMD 486 cpu_model's with current. - Remove duplicate and bogus docs for bits 28 and 29 of cpuid features. - Document bits 30 and 31 of cpuid features. - Display the number of logical cores on CPUs that support hyperthreading. - Make hw_instruction_sse static. - Move enable_sse()'s prototype to machine/md_var.h. - Add cpu_procinfo to hold information about this processor from cpuid 1 including count of HTT cores, brand index, local APIC ID, etc.
Revision 1.552: download - view: text, markup, annotated - select for diffs
Thu Jan 9 19:59:28 2003 UTC (9 years, 1 month ago) by jhb
Branches: MAIN
Diff to: previous 1.551: preferred, colored
Changes since revision 1.551: +0 -2 lines
Remove earlysetcpuclass() as it has been OBE. Suggested by: bde
Revision 1.551: download - view: text, markup, annotated - select for diffs
Mon Dec 2 19:58:55 2002 UTC (9 years, 2 months ago) by deischen
Branches: MAIN
CVS tags: old_RELENG_5_0_BP, old_RELENG_5_0_0_RELEASE, old_RELENG_5_0
Diff to: previous 1.550: preferred, colored
Changes since revision 1.550: +6 -3 lines
Align the FPU state in the ucontext and sigcontext to 16 bytes to accomodate the new SSE/XMM floating point save/restore instructions. This commit is mostly from bde and includes some style nits. Approved by: re (jhb)
Revision 1.550: download - view: text, markup, annotated - select for diffs
Sat Nov 16 06:35:52 2002 UTC (9 years, 2 months ago) by deischen
Branches: MAIN
Diff to: previous 1.549: preferred, colored
Changes since revision 1.549: +2 -1 lines
Add getcontext, setcontext, and swapcontext as system calls. Previously these were libc functions but were requested to be made into system calls for atomicity and to coalesce what might be two entrances into the kernel (signal mask setting and floating point trap) into one. A few style nits and comments from bde are also included. Tested on alpha by: gallatin
Revision 1.385.2.27: download - view: text, markup, annotated - select for diffs
Sun Nov 10 19:02:19 2002 UTC (9 years, 3 months ago) by iwasaki
Branches: old_RELENG_4
Diff to: previous 1.385.2.26: preferred, colored; branchpoint 1.385: preferred, colored
Changes since revision 1.385.2.26: +82 -48 lines
MFC: 1.549 Add a new loader tunable, hw.hasbrokenint12, to indicate that BIOS has broken int 12H. This should fix kernel panic problem caused by 1.385.2.26 changes.
Revision 1.549: download - view: text, markup, annotated - select for diffs
Sat Nov 9 21:17:41 2002 UTC (9 years, 3 months ago) by iwasaki
Branches: MAIN
Diff to: previous 1.548: preferred, colored
Changes since revision 1.548: +79 -47 lines
Add a new loader tunable, hw.hasbrokenint12, to indicate that BIOS has broken int 12H. If hw.hasbrokenint12="1" in loader environment, kernel never use BIOS INT 12 call to determine base memory size. Otherwise, kernel use INT 12 in old behaviour. This should fix kernel panic problem caused by 1.544 changes. MFC after: 1 day
Revision 1.548: download - view: text, markup, annotated - select for diffs
Sat Nov 9 16:19:13 2002 UTC (9 years, 3 months ago) by des
Branches: MAIN
Diff to: previous 1.547: preferred, colored
Changes since revision 1.547: +4 -4 lines
Print real / avail memory in megabytes rather than kilobytes.
Revision 1.547: download - view: text, markup, annotated - select for diffs
Thu Nov 7 23:57:16 2002 UTC (9 years, 3 months ago) by tmm
Branches: MAIN
Diff to: previous 1.546: preferred, colored
Changes since revision 1.546: +0 -37 lines
Move the definitions of the hw.physmem, hw.usermem and hw.availpages sysctls to MI code; this reduces code duplication and makes all of them available on sparc64, and the latter two on powerpc. The semantics by the i386 and pc98 hw.availpages is slightly changed: previously, holes between ranges of available pages would be included, while they are excluded now. The new behaviour should be more correct and brings i386 in line with the other architectures. Move physmem to vm/vm_init.c, where this variable is used in MI code.
Revision 1.546: download - view: text, markup, annotated - select for diffs
Wed Nov 6 14:53:34 2002 UTC (9 years, 3 months ago) by jmallett
Branches: MAIN
Diff to: previous 1.545: preferred, colored
Changes since revision 1.545: +0 -4 lines
Remove what was a temporary bogus assignment of bits of siginfo_t, as it does not look like the prerequisites to fill it in properly will be in the tree for the upcoming release, but it's mostly done, so there is no need for these to stay around to remind us.
Revision 1.385.2.26: download - view: text, markup, annotated - select for diffs
Sat Nov 2 05:07:18 2002 UTC (9 years, 3 months ago) by iwasaki
Branches: old_RELENG_4
Diff to: previous 1.385.2.25: preferred, colored; branchpoint 1.385: preferred, colored
Changes since revision 1.385.2.25: +57 -45 lines
MFC: 1.544 Change method to determine base memory size, try INT 15H/E820H first, then INT 12H.
Revision 1.545: download - view: text, markup, annotated - select for diffs
Fri Oct 25 19:10:56 2002 UTC (9 years, 3 months ago) by peter
Branches: MAIN
Diff to: previous 1.544: preferred, colored
Changes since revision 1.544: +252 -24 lines
Split 4.x and 5.x signal handling so that we can keep 4.x signal handling clean and functional as 5.x evolves. This allows some of the nasty bandaids in the 5.x codepaths to be unwound. Encapsulate 4.x signal handling under COMPAT_FREEBSD4 (there is an anti-foot-shooting measure in place, 5.x folks need this for a while) and finish encapsulating the older stuff under COMPAT_43. Since the ancient stuff is required on alpha (longjmp(3) passes a 'struct osigcontext *' to the current sigreturn(2), instead of the 'ucontext_t *' that sigreturn is supposed to take), add a compile time check to prevent foot shooting there too. Add uniform COMPAT_43 stubs for ia64/sparc64/powerpc. Tested on: i386, alpha, ia64. Compiled on sparc64 (a few days ago). Approved by: re
Revision 1.544: download - view: text, markup, annotated - select for diffs
Fri Oct 25 18:46:36 2002 UTC (9 years, 3 months ago) by iwasaki
Branches: MAIN
Diff to: previous 1.543: preferred, colored
Changes since revision 1.543: +55 -43 lines
Change method to determine base memory size. Try INT 15H/E820H first, then fall back to the old compatibility method (INT 12H). This is a workaround for newer machines which have broken INT 12H BIOS service implementation. Reviewed by: -current ML MFC after: 3 days
Revision 1.543: download - view: text, markup, annotated - select for diffs
Sun Oct 20 20:48:56 2002 UTC (9 years, 3 months ago) by phk
Branches: MAIN
Diff to: previous 1.542: preferred, colored
Changes since revision 1.542: +39 -39 lines
Change the definition of the debugging registers to be an array, so that we can index into it, rather than do pointer gymnastics on a structure containing 8 elements. Verified by: MD5 hash on the produced .o files.
Revision 1.542: download - view: text, markup, annotated - select for diffs
Sat Oct 12 05:32:23 2002 UTC (9 years, 4 months ago) by jeff
Branches: MAIN
Diff to: previous 1.541: preferred, colored
Changes since revision 1.541: +3 -2 lines
- Create a new scheduler api that is defined in sys/sched.h - Begin moving scheduler specific functionality into sched_4bsd.c - Replace direct manipulation of scheduler data with hooks provided by the new api. - Remove KSE specific state modifications and single runq assumptions from kern_switch.c Reviewed by: -arch
Revision 1.541: download - view: text, markup, annotated - select for diffs
Sat Oct 5 14:36:14 2002 UTC (9 years, 4 months ago) by deischen
Branches: MAIN
Diff to: previous 1.540: preferred, colored
Changes since revision 1.540: +11 -11 lines
Fix building of minimal kernels without npx by rearranging ifdefs. Also fix some style bugs in surrounding code, and add a comment about FP state restoral that seems questionable. Submitted by: bde
Revision 1.540: download - view: text, markup, annotated - select for diffs
Fri Oct 4 14:50:50 2002 UTC (9 years, 4 months ago) by deischen
Branches: MAIN
Diff to: previous 1.539: preferred, colored
Changes since revision 1.539: +12 -14 lines
Add another temporary hack to allow running older i386 binaries. This will be removed when new versions of syscalls sigreturn() and sigaction() are added (mini is working on this but is in the middle of a move). This should fix the problem of cvsupd dying.
Revision 1.539: download - view: text, markup, annotated - select for diffs
Mon Sep 30 07:02:22 2002 UTC (9 years, 4 months ago) by obrien
Branches: MAIN
Diff to: previous 1.538: preferred, colored
Changes since revision 1.538: +10 -0 lines
Save the FP state in the PCB as that is compatable with releng4 binaries. This is a band-aid until the KSE pthread committers get back on the ground and have their machines setup. Submitted by: eischen
Revision 1.385.2.25: download - view: text, markup, annotated - select for diffs
Tue Sep 24 08:12:21 2002 UTC (9 years, 4 months ago) by mdodd
Branches: old_RELENG_4
CVS tags: old_RELENG_4_7_BP, old_RELENG_4_7_0_RELEASE, old_RELENG_4_7
Diff to: previous 1.385.2.24: preferred, colored; branchpoint 1.385: preferred, colored
Changes since revision 1.385.2.24: +4 -6 lines
MFC: 1.537, 1.538 Reset pc->pcb_gs and %gs before possibly invalidating it. Submitted by: Christian Zander <zander@minion.de> Approved by: re (jhb)
Revision 1.538: download - view: text, markup, annotated - select for diffs
Sun Sep 22 01:32:48 2002 UTC (9 years, 4 months ago) by mdodd
Branches: MAIN
Diff to: previous 1.537: preferred, colored
Changes since revision 1.537: +4 -13 lines
- Move the init of %gs and pcb_gs before user_ldt_free(). - Always call load_gs() - Trim comments. This addresses some of the issues raised by BDE.
Revision 1.537: download - view: text, markup, annotated - select for diffs
Fri Sep 20 17:50:53 2002 UTC (9 years, 4 months ago) by phk
Branches: MAIN
Diff to: previous 1.536: preferred, colored
Changes since revision 1.536: +0 -59 lines
For reasons now lost in historical fog, the bounds_check_with_label() function were put in i386/i386/machdep.c from where it has been cut and pasted to other architectures with only minor corruption. Disklabel is really a MI format in many ways, at least it certainly is when you operate on struct disklabel. Put bounds_check_with_label() back in subr_disklabel.c where it belongs. Sponsored by: DARPA & NAI Labs.
Revision 1.536: download - view: text, markup, annotated - select for diffs
Thu Sep 19 18:46:25 2002 UTC (9 years, 4 months ago) by mdodd
Branches: MAIN
Diff to: previous 1.535: preferred, colored
Changes since revision 1.535: +9 -2 lines
From Christian Zander:
This patch addresses a bug that can cause a GPF in the kernel - if a
process makes use of i386_set_ldt to install a LDT entry, then loads
a corresponding segment descriptor into %gs, forks, and if the child
execs.
In this scenario, setregs executes user_ldt_free and then determines
how to reset the %gs register:
/* reset %gs as well */
if (pcb == curpcb)
load_gs(_udatasel);
else
pcb->pcb_gs = _udatasel;
This is insufficient in the fork/exec case, since pcb will be equal
to curpcb when the child execs; load_gs will reset %gs to _udatasel
but it doesn't reset pcb->pcb_gs; upon return from the system call,
cpu_switch_load_gs will thus attempt to restore %gs from pcb->pcb_gs
and trigger a GPF since all LDT entries have already been cleared.
The fix is to always reset pcb->pcb_gs to _udatasel.
Submitted by: Christian Zander <zander@minion.de>
Reviewed by: jake
Revision 1.535: download - view: text, markup, annotated - select for diffs
Tue Sep 17 11:12:10 2002 UTC (9 years, 4 months ago) by sobomax
Branches: MAIN
Diff to: previous 1.534: preferred, colored
Changes since revision 1.534: +8 -2 lines
Don't reference cpu_fxsr unless CPU_ENABLE_SSE is defined. This fixes kernel in !CPU_ENABLE_SSE case.
Revision 1.534: download - view: text, markup, annotated - select for diffs
Mon Sep 16 19:25:08 2002 UTC (9 years, 4 months ago) by mini
Branches: MAIN
Diff to: previous 1.533: preferred, colored
Changes since revision 1.533: +195 -9 lines
Add kernel support needed for the KSE-aware libpthread: - Maintain fpu state across signals. - Use ucontext_t's to store KSE thread state. - Synthesize state for the UTS upon each upcall, rather than saving and copying a trapframe. - Save and restore FPU state properly in ucontext_t's. Reviewed by: deischen, julian Approved by: -arch
Revision 1.533: download - view: text, markup, annotated - select for diffs
Sun Sep 15 23:52:23 2002 UTC (9 years, 4 months ago) by julian
Branches: MAIN
Diff to: previous 1.532: preferred, colored
Changes since revision 1.532: +1 -1 lines
Allocate KSEs and KSEGRPs separatly and remove them from the proc structure. next step is to allow > 1 to be allocated per process. This would give multi-processor threads. (when the rest of the infrastructure is in place) While doing this I noticed libkvm and sys/kern/kern_proc.c:fill_kinfo_proc are diverging more than they should.. corrective action needed soon.
Revision 1.532: download - view: text, markup, annotated - select for diffs
Sat Sep 7 19:12:42 2002 UTC (9 years, 5 months ago) by jmallett
Branches: MAIN
Diff to: previous 1.531: preferred, colored
Changes since revision 1.531: +2 -0 lines
Fill out two fields (si_pid, si_uid) in the siginfo structure handed back to userland in the signal handler that were not being iflled out before, but should and can be. This part of sendsig could be slightly refactored to use an MI interface, or ideally, *sendsig*() would have an API change to accept a siginfo_t, which would be filled out by an MI function in the level above sendsig, and said MI function would make a small call into MD code to fill out the MD parts (some of which may be bogus, such as the si_addr stuff in some places). This would eventually make it possible for parts of the kernel sending signals to set up a siginfo with meaningful information. Reviewed by: mux MFC after: 2 weeks
Revision 1.531: download - view: text, markup, annotated - select for diffs
Sat Sep 7 18:55:15 2002 UTC (9 years, 5 months ago) by jmallett
Branches: MAIN
Diff to: previous 1.530: preferred, colored
Changes since revision 1.530: +1 -1 lines
Match the more modern ports and comment the filling of POSIX parts of siginfo with 'Fill in POSIX parts'. (Diff reduction.)
Revision 1.530: download - view: text, markup, annotated - select for diffs
Sat Sep 7 07:02:12 2002 UTC (9 years, 5 months ago) by peter
Branches: MAIN
Diff to: previous 1.529: preferred, colored
Changes since revision 1.529: +7 -0 lines
Automatically enable CPU_ENABLE_SSE (detect and enable SSE instructions) if compiling with I686_CPU as a target. CPU_DISABLE_SSE will prevent this from happening and will guarantee the code is not compiled in. I am still not happy with this, but gcc is now generating code that uses these instructions if you set CPUTYPE to p3/p4 or athlon-4/mp/xp or higher.
Revision 1.529: download - view: text, markup, annotated - select for diffs
Sat Aug 31 03:33:30 2002 UTC (9 years, 5 months ago) by peter
Branches: MAIN
Diff to: previous 1.528: preferred, colored
Changes since revision 1.528: +12 -15 lines
Take a shot at fixing up a whole stack of style and other embarresing unforced errors that Bruce identified. I have not yet addressed all of his concerns.
Revision 1.528: download - view: text, markup, annotated - select for diffs
Fri Aug 30 06:13:39 2002 UTC (9 years, 5 months ago) by ache
Branches: MAIN
Diff to: previous 1.527: preferred, colored
Changes since revision 1.527: +1 -1 lines
Unbreak kernel build by printing Maxmem using %ld instead of old (now changed) %u
Revision 1.527: download - view: text, markup, annotated - select for diffs
Fri Aug 30 04:04:34 2002 UTC (9 years, 5 months ago) by peter
Branches: MAIN
Diff to: previous 1.526: preferred, colored
Changes since revision 1.526: +16 -9 lines
Change hw.physmem and hw.usermem to unsigned long like they used to be in the original hardwired sysctl implementation. The buf size calculator still overflows an integer on machines with large KVA (eg: ia64) where the number of pages does not fit into an int. Use 'long' there. Change Maxmem and physmem and related variables to 'long', mostly for completeness. Machines are not likely to overflow 'int' pages in the near term, but then again, 640K ought to be enough for anybody. This comes for free on 32 bit machines, so why not?
Revision 1.526: download - view: text, markup, annotated - select for diffs
Thu Aug 29 06:17:46 2002 UTC (9 years, 5 months ago) by jake
Branches: MAIN
Diff to: previous 1.525: preferred, colored
Changes since revision 1.525: +2 -1 lines
Renamed poorly named setregs to exec_setregs. Moved its prototype to imgact.h with the other exec support functions.
Revision 1.525: download - view: text, markup, annotated - select for diffs
Thu Jul 18 00:42:53 2002 UTC (9 years, 6 months ago) by peter
Branches: MAIN
Diff to: previous 1.524: preferred, colored
Changes since revision 1.524: +3 -14 lines
Use pmap_kenter() rather than vtopte() and bashing the page tables directly.
Revision 1.524: download - view: text, markup, annotated - select for diffs
Wed Jul 17 05:41:43 2002 UTC (9 years, 6 months ago) by dillon
Branches: MAIN
Diff to: previous 1.523: preferred, colored
Changes since revision 1.523: +10 -3 lines
Qualify comment on machdep.cpu_idle_hlt. Turning this on on a SMP machine will result in approximately a 4.2% loss of performance (buildworld) and approximately a 5% reduction in power consumption (when idle). Add XXX note on how to really make hlt work (send an IPI to wakeup HLTed cpus on a thread-schedule event? Generate an interrupt somehow?).
Revision 1.385.2.24: download - view: text, markup, annotated - select for diffs
Tue Jul 16 17:58:21 2002 UTC (9 years, 6 months ago) by dillon
Branches: old_RELENG_4
Diff to: previous 1.385.2.23: preferred, colored; branchpoint 1.385: preferred, colored
Changes since revision 1.385.2.23: +31 -0 lines
MFC i386/i386/machdep.c 1.520 and rearrange the original -stable code a bit to look more like -current. Adds support for the 'machdep.cpu_idle_hlt' sysctl on SMP machines. The default is still 0 for SMP since -stable has the same non-fatal run-queue race that current has (a 1-tick run latency if the race is lost). Setting the value to 1 will save power. Tested: my Smart-UPS 1400 reports 81.2% utilization with cpu_idle_hlt enabled and 81.9% with it disabled on one box, and 83.8% utilization with it disabled on three boxes.
Revision 1.523: download - view: text, markup, annotated - select for diffs
Mon Jul 8 01:52:54 2002 UTC (9 years, 7 months ago) by peter
Branches: MAIN
Diff to: previous 1.522: preferred, colored
Changes since revision 1.522: +1 -1 lines
s/procrunnable/kserunnable/ in a comment
Revision 1.522: download - view: text, markup, annotated - select for diffs
Sun Jul 7 18:05:42 2002 UTC (9 years, 7 months ago) by mux
Branches: MAIN
Diff to: previous 1.521: preferred, colored
Changes since revision 1.521: +0 -1 lines
One #include <sys/lock.h> is enough. Submitted by: Olivier Houchard <cognet@ci0.org>
Revision 1.521: download - view: text, markup, annotated - select for diffs
Sat Jun 29 17:26:16 2002 UTC (9 years, 7 months ago) by julian
Branches: MAIN
Diff to: previous 1.520: preferred, colored
Changes since revision 1.520: +1 -1 lines
Part 1 of KSE-III The ability to schedule multiple threads per process (one one cpu) by making ALL system calls optionally asynchronous. to come: ia64 and power-pc patches, patches for gdb, test program (in tools) Reviewed by: Almost everyone who counts (at various times, peter, jhb, matt, alfred, mini, bernd, and a cast of thousands) NOTE: this is still Beta code, and contains lots of debugging stuff. expect slight instability in signals..
Revision 1.520: download - view: text, markup, annotated - select for diffs
Mon Jun 24 21:31:57 2002 UTC (9 years, 7 months ago) by peter
Branches: MAIN
Diff to: previous 1.519: preferred, colored
Changes since revision 1.519: +4 -2 lines
Compile in the cpu halt code even on SMP, instead just default the sysctl (machdep.cpu_idle_hlt) to off in the SMP case. This allows you to turn it on if you wish and do not particularly care about the small window where a cpu will remain halted even when a job is placed on the run queue (until the next clock tick).
Revision 1.519: download - view: text, markup, annotated - select for diffs
Mon May 13 11:53:40 2002 UTC (9 years, 9 months ago) by bde
Branches: MAIN
Diff to: previous 1.518: preferred, colored
Changes since revision 1.518: +1 -1 lines
Fixed a syntax error (a label not followed by a statement).
Revision 1.518: download - view: text, markup, annotated - select for diffs
Wed Apr 17 13:06:35 2002 UTC (9 years, 9 months ago) by mux
Branches: MAIN
Diff to: previous 1.517: preferred, colored
Changes since revision 1.517: +2 -1 lines
Rework the kernel environment subsystem. We now convert the static environment needed at boot time to a dynamic subsystem when VM is up. The dynamic kernel environment is protected by an sx lock. This adds some new functions to manipulate the kernel environment : freeenv(), setenv(), unsetenv() and testenv(). freeenv() has to be called after every getenv() when you have finished using the string. testenv() only tests if an environment variable is present, and doesn't require a freeenv() call. setenv() and unsetenv() are self explanatory. The kenv(2) syscall exports these new functionalities to userland, mainly for kenv(1). Reviewed by: peter
Revision 1.517: download - view: text, markup, annotated - select for diffs
Wed Apr 10 20:08:07 2002 UTC (9 years, 10 months ago) by alc
Branches: MAIN
Diff to: previous 1.516: preferred, colored
Changes since revision 1.516: +9 -5 lines
o In osigreturn(), restore all of the registers in one place. o Recent changes to osigreturn() and sigreturn() have made them MPSAFE. Add a comment to this effect. Submitted by: bde (bullet #1) Reviewed by: jhb (bullet #2)
Revision 1.516: download - view: text, markup, annotated - select for diffs
Tue Apr 9 11:18:38 2002 UTC (9 years, 10 months ago) by phk
Branches: MAIN
Diff to: previous 1.515: preferred, colored
Changes since revision 1.515: +0 -6 lines
GC various bits and pieces of USERCONFIG from all over the place.
Revision 1.515: download - view: text, markup, annotated - select for diffs
Mon Apr 8 10:34:57 2002 UTC (9 years, 10 months ago) by bde
Branches: MAIN
Diff to: previous 1.514: preferred, colored
Changes since revision 1.514: +0 -3 lines
Removed ispc98 sysctl completely. Applications should understand that ispc98 isn't set if its sysctl doesn't exist. At least make(1) already understands this. Approved by: nyan
Revision 1.514: download - view: text, markup, annotated - select for diffs
Sun Apr 7 21:01:36 2002 UTC (9 years, 10 months ago) by phk
Branches: MAIN
Diff to: previous 1.513: preferred, colored
Changes since revision 1.513: +0 -1 lines
GC the "dumplo" variable, which is no longer used. A lot of sys/*/*/machdep.c seems not to be.
Revision 1.513: download - view: text, markup, annotated - select for diffs
Sat Apr 6 08:22:33 2002 UTC (9 years, 10 months ago) by nyan
Branches: MAIN
Diff to: previous 1.512: preferred, colored
Changes since revision 1.512: +0 -4 lines
Remove pc98 code.
Revision 1.512: download - view: text, markup, annotated - select for diffs
Thu Apr 4 21:03:19 2002 UTC (9 years, 10 months ago) by jhb
Branches: MAIN
Diff to: previous 1.511: preferred, colored
Changes since revision 1.511: +2 -2 lines
Change callers of mtx_init() to pass in an appropriate lock type name. In most cases NULL is passed, but in some cases such as network driver locks (which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used. Tested on: i386, alpha, sparc64
Revision 1.511: download - view: text, markup, annotated - select for diffs
Thu Apr 4 17:49:45 2002 UTC (9 years, 10 months ago) by bde
Branches: MAIN
Diff to: previous 1.510: preferred, colored
Changes since revision 1.510: +2 -0 lines
Moved signal handling and rescheduling from userret() to ast() so that they aren't in the usual path of execution for syscalls and traps. The main complication for this is that we have to set flags to control ast() everywhere that changes the signal mask. Avoid locking in userret() in most of the remaining cases. Submitted by: luoqi (first part only, long ago, reorganized by me) Reminded by: dillon
Revision 1.510: download - view: text, markup, annotated - select for diffs
Tue Apr 2 22:19:14 2002 UTC (9 years, 10 months ago) by jhb
Branches: MAIN
Diff to: previous 1.509: preferred, colored
Changes since revision 1.509: +1 -10 lines
- Move the MI mutexes sched_lock and Giant from being declared in the various machdep.c's to being declared in kern_mutex.c. - Add a new function mutex_init() used to perform early initialization needed for mutexes such as setting up thread0's contested lock list and initializing MI mutexes. Change the various MD startup routines to call this function instead of duplicating all the code themselves. Tested on: alpha, i386
Revision 1.509: download - view: text, markup, annotated - select for diffs
Mon Apr 1 21:30:41 2002 UTC (9 years, 10 months ago) by jhb
Branches: MAIN
Diff to: previous 1.508: preferred, colored
Changes since revision 1.508: +1 -1 lines
Change the suser() API to take advantage of td_ucred as well as do a general cleanup of the API. The entire API now consists of two functions similar to the pre-KSE API. The suser() function takes a thread pointer as its only argument. The td_ucred member of this thread must be valid so the only valid thread pointers are curthread and a few kernel threads such as thread0. The suser_cred() function takes a pointer to a struct ucred as its first argument and an integer flag as its second argument. The flag is currently only used for the PRISON_ROOT flag. Discussed on: smp@
Revision 1.508: download - view: text, markup, annotated - select for diffs
Sun Mar 31 01:13:21 2002 UTC (9 years, 10 months ago) by alc
Branches: MAIN
Diff to: previous 1.507: preferred, colored
Changes since revision 1.507: +12 -8 lines
Implement i386's (o)sigreturn() like the alpha's: Use copyin() to read the osigcontext or ucontext_t rather than useracc() followed by direct user- space memory accesses. This reduces (o)sigreturn()'s execution time by 5- 50%. Submitted by: bde
Revision 1.507: download - view: text, markup, annotated - select for diffs
Wed Mar 27 09:23:37 2002 UTC (9 years, 10 months ago) by jeff
Branches: MAIN
Diff to: previous 1.506: preferred, colored
Changes since revision 1.506: +1 -1 lines
Add a new mtx_init option "MTX_DUPOK" which allows duplicate acquires of locks with this flag. Remove the dup_list and dup_ok code from subr_witness. Now we just check for the flag instead of doing string compares. Also, switch the process lock, process group lock, and uma per cpu locks over to this interface. The original mechanism did not work well for uma because per cpu lock names are unique to each zone. Approved by: jhb
Revision 1.506: download - view: text, markup, annotated - select for diffs
Wed Mar 27 05:39:18 2002 UTC (9 years, 10 months ago) by dillon
Branches: MAIN
Diff to: previous 1.505: preferred, colored
Changes since revision 1.505: +14 -5 lines
Compromise for critical*()/cpu_critical*() recommit. Cleanup the interrupt disablement assumptions in kern_fork.c by adding another API call, cpu_critical_fork_exit(). Cleanup the td_savecrit field by moving it from MI to MD. Temporarily move cpu_critical*() from <arch>/include/cpufunc.h to <arch>/<arch>/critical.c (stage-2 will clean this up). Implement interrupt deferral for i386 that allows interrupts to remain enabled inside critical sections. This also fixes an IPI interlock bug, and requires uses of icu_lock to be enclosed in a true interrupt disablement. This is the stage-1 commit. Stage-2 will occur after stage-1 has stabilized, and will move cpu_critical*() into its own header file(s) + other things. This commit may break non-i386 architectures in trivial ways. This should be temporary. Reviewed by: core Approved by: core
Revision 1.505: download - view: text, markup, annotated - select for diffs
Wed Mar 20 08:56:31 2002 UTC (9 years, 10 months ago) by alfred
Branches: MAIN
Diff to: previous 1.504: preferred, colored
Changes since revision 1.504: +6 -6 lines
Remove __P.
Revision 1.504: download - view: text, markup, annotated - select for diffs
Mon Mar 18 07:59:57 2002 UTC (9 years, 10 months ago) by alc
Branches: MAIN
Diff to: previous 1.503: preferred, colored
Changes since revision 1.503: +4 -10 lines
Eliminate grow_stack() from (o)sendsig(). If the stack needs to grow, copyout() will page fault and perform grow_stack() from trap_pfault(). These calls to grow_stack() accomplish nothing. Reviewed by: bde
Revision 1.503: download - view: text, markup, annotated - select for diffs
Sun Mar 17 04:21:19 2002 UTC (9 years, 10 months ago) by alc
Branches: MAIN
Diff to: previous 1.502: preferred, colored
Changes since revision 1.502: +23 -60 lines
o Stop calling useracc() in (o)sendsig() now that we use copyout() to copy the sigframe to the user's stack. Useracc() takes a non-trivial amount of time. Eliminating it speeds up signal delivery by 15% or more. o Update some comments. Submitted by: bde
Revision 1.385.2.23: download - view: text, markup, annotated - select for diffs
Sat Mar 16 15:49:04 2002 UTC (9 years, 10 months ago) by luigi
Branches: old_RELENG_4
CVS tags: old_RELENG_4_6_BP, old_RELENG_4_6_2_RELEASE, old_RELENG_4_6_1_RELEASE, old_RELENG_4_6_0_RELEASE, old_RELENG_4_6
Diff to: previous 1.385.2.22: preferred, colored; branchpoint 1.385: preferred, colored
Changes since revision 1.385.2.22: +4 -0 lines
MFC: the sysctl variable "machdep.guessed_bootdev" reports some indication on the device possibly used for booting, as [un]reliable as the one given by boot2. Normally works fine when booting from BIOS-recognized devices such as floppy or IDE disk slices, and probably scsi disks as well. Booting from CDROM in floppy-emulation mode returns /dev/fd0, how strange...
Revision 1.502: download - view: text, markup, annotated - select for diffs
Sun Mar 10 20:08:43 2002 UTC (9 years, 11 months ago) by luigi
Branches: MAIN
Diff to: previous 1.501: preferred, colored
Changes since revision 1.501: +4 -0 lines
Export a (machine dependent) kernel variable bootdev as machdep.guessed_bootdev, and add code to sysctl to parse its value and give a (not necessarily correct) name to the device we booted from (the main motivation for this code is to use the info in the PicoBSD boot scripts, and the impact on the kernel is minimal). NOTE: the information available in bootdev is not always reliable, so you should not trust it too much. The parsing code is the same as in boot2.c, and cannot cover all cases -- as it is, it seems to work fine with floppies and IDE disks recognised by the BIOS. It _should_ work as well with SCSI disks recognised by the BIOS. Booting from a CDROM in floppy emulation will return /dev/fd0 (because this is what the BIOS tells us). Booting off the network (e.g. with etherboot) leaves bootdev unset so the value will be printed as "invalid (0xffffffff)". Finally, this feature might go away at some point, hopefully when we have a more reliable way to get the same information. MFC-after: 5 days
Revision 1.501: download - view: text, markup, annotated - select for diffs
Fri Mar 8 14:31:12 2002 UTC (9 years, 11 months ago) by phk
Branches: MAIN
Diff to: previous 1.500: preferred, colored
Changes since revision 1.500: +1 -1 lines
#include <machine/smp.h> in the SMP case. don't include <sys/smp.h> at all. Fallout from: probably something jake did. Hint by: jhb
Revision 1.500: download - view: text, markup, annotated - select for diffs
Tue Feb 26 20:33:39 2002 UTC (9 years, 11 months ago) by dillon
Branches: MAIN
Diff to: previous 1.499: preferred, colored
Changes since revision 1.499: +1 -126 lines
revert last commit temporarily due to whining on the lists.
Revision 1.499: download - view: text, markup, annotated - select for diffs
Tue Feb 26 17:06:17 2002 UTC (9 years, 11 months ago) by dillon
Branches: MAIN
Diff to: previous 1.498: preferred, colored
Changes since revision 1.498: +126 -1 lines
STAGE-1 of 3 commit - allow (but do not require) interrupts to remain enabled in critical sections and streamline critical_enter() and critical_exit(). This commit allows an architecture to leave interrupts enabled inside critical sections if it so wishes. Architectures that do not wish to do this are not effected by this change. This commit implements the feature for the I386 architecture and provides a sysctl, debug.critical_mode, which defaults to 1 (use the feature). For now you can turn the sysctl on and off at any time in order to test the architectural changes or track down bugs. This commit is just the first stage. Some areas of the code, specifically the MACHINE_CRITICAL_ENTER #ifdef'd code, is strictly temporary and will be cleaned up in the STAGE-2 commit when the critical_*() functions are moved entirely into MD files. The following changes have been made: * critical_enter() and critical_exit() for I386 now simply increment and decrement curthread->td_critnest. They no longer disable hard interrupts. When critical_exit() decrements the counter to 0 it effectively calls a routine to deal with whatever interrupts were deferred during the time the code was operating in a critical section. Other architectures are unaffected. * fork_exit() has been conditionalized to remove MD assumptions for the new code. Old code will still use the old MD assumptions in regards to hard interrupt disablement. In STAGE-2 this will be turned into a subroutine call into MD code rather then hardcoded in MI code. The new code places the burden of entering the critical section in the trampoline code where it belongs. * I386: interrupts are now enabled while we are in a critical section. The interrupt vector code has been adjusted to deal with the fact. If it detects that we are in a critical section it currently defers the interrupt by adding the appropriate bit to an interrupt mask. * In order to accomplish the deferral, icu_lock is required. This is i386-specific. Thus icu_lock can only be obtained by mainline i386 code while interrupts are hard disabled. This change has been made. * Because interrupts may or may not be hard disabled during a context switch, cpu_switch() can no longer simply assume that PSL_I will be in a consistent state. Therefore, it now saves and restores eflags. * FAST INTERRUPT PROVISION. Fast interrupts are currently deferred. The intention is to eventually allow them to operate either while we are in a critical section or, if we are able to restrict the use of sched_lock, while we are not holding the sched_lock. * ICU and APIC vector assembly for I386 cleaned up. The ICU code has been cleaned up to match the APIC code in regards to format and macro availability. Additionally, the code has been adjusted to deal with deferred interrupts. * Deferred interrupts use a per-cpu boolean int_pending, and masks ipending, spending, and fpending. Being per-cpu variables it is not currently necessary to lock; bus cycles modifying them. Note that the same mechanism will enable preemption to be incorporated as a true software interrupt without having to further hack up the critical nesting code. * Note: the old critical_enter() code in kern/kern_switch.c is currently #ifdef to be compatible with both the old and new methodology. In STAGE-2 it will be moved entirely to MD code. Performance issues: One of the purposes of this commit is to enhance critical section performance, specifically to greatly reduce bus overhead to allow the critical section code to be used to protect per-cpu caches. These caches, such as Jeff's slab allocator work, can potentially operate very quickly making the effective savings of the new critical section code's performance very significant. The second purpose of this commit is to allow architectures to enable certain interrupts while in a critical section. Specifically, the intention is to eventually allow certain FAST interrupts to operate rather then defer. The third purpose of this commit is to begin to clean up the critical_enter()/critical_exit()/cpu_critical_enter()/ cpu_critical_exit() API which currently has serious cross pollution in MI code (in fork_exit() and ast() for example). The fourth purpose of this commit is to provide a framework that allows kernel-preempting software interrupts to be implemented cleanly. This is currently used for two forward interrupts in I386. Other architectures will have the choice of using this infrastructure or building the functionality directly into critical_enter()/ critical_exit(). Finally, this commit is designed to greatly improve the flexibility of various architectures to manage critical section handling, software interrupts, preemption, and other highly integrated architecture-specific details.
Revision 1.498: download - view: text, markup, annotated - select for diffs
Tue Feb 26 01:00:39 2002 UTC (9 years, 11 months ago) by peter
Branches: MAIN
Diff to: previous 1.497: preferred, colored
Changes since revision 1.497: +2 -2 lines
Fix a warning. useracc() should take a const pointer argument.
Revision 1.497: download - view: text, markup, annotated - select for diffs
Sun Feb 17 17:40:28 2002 UTC (9 years, 11 months ago) by deischen
Branches: MAIN
Diff to: previous 1.496: preferred, colored
Changes since revision 1.496: +2 -1 lines
Use struct __ucontext in prototypes and associated functions instead of ucontext_t. Forward declare struct __ucontext in <sys/signal.h> and remove reliance on <sys/ucontext.h> being included. While I'm here, also hide osigcontext types from userland; suggested by bde. Namespace pollution noticed by: Kevin Day <toasty@shell.dragondata.com>
Revision 1.496: download - view: text, markup, annotated - select for diffs
Sat Feb 16 07:07:54 2002 UTC (9 years, 11 months ago) by bde
Branches: MAIN
Diff to: previous 1.495: preferred, colored
Changes since revision 1.495: +2 -0 lines
Don't leave garbage in parts of fpregs in the fxsr case. All callers (procfs and ptrace) supply kernel stack garbage, so kernel context was leaked to userland. Reviewed by: des
Revision 1.495: download - view: text, markup, annotated - select for diffs
Wed Feb 13 21:38:48 2002 UTC (9 years, 11 months ago) by bde
Branches: MAIN
Diff to: previous 1.494: preferred, colored
Changes since revision 1.494: +1 -1 lines
Don't confuse a struct with its first member. This fixes: ./@/i386/i386/machdep.c: In function `init386': ./@/i386/i386/machdep.c:1700: warning: assignment from incompatible pointer type
Revision 1.494: download - view: text, markup, annotated - select for diffs
Thu Feb 7 22:40:34 2002 UTC (10 years ago) by peter
Branches: MAIN
Diff to: previous 1.493: preferred, colored
Changes since revision 1.493: +2 -4 lines
Attempt to patch up some style bugs introduced in the previous commit
Revision 1.493: download - view: text, markup, annotated - select for diffs
Thu Feb 7 20:58:43 2002 UTC (10 years ago) by julian
Branches: MAIN
Diff to: previous 1.492: preferred, colored
Changes since revision 1.492: +18 -12 lines
Pre-KSE/M3 commit. this is a low-functionality change that changes the kernel to access the main thread of a process via the linked list of threads rather than assuming that it is embedded in the process. It IS still embeded there but remove all teh code that assumes that in preparation for the next commit which will actually move it out. Reviewed by: peter@freebsd.org, gallatin@cs.duke.edu, benno rice,
Revision 1.492: download - view: text, markup, annotated - select for diffs
Sun Feb 3 09:13:57 2002 UTC (10 years ago) by bde
Branches: MAIN
Diff to: previous 1.491: preferred, colored
Changes since revision 1.491: +0 -9 lines
Use osigreturn(2) instead of sigreturn(2) plus broken magic for returning from old signal handlers. This is simpler and faster, and fixes (new) sigreturn(2) when %eip in the new signal context happens to match the magic value (0x1d516). 0x1d516 is below the default ELF text section, so this probably never broken anything in practice. locore.s: In addition, don't build the signal trampoline for old signal handlers when it is not used. alpha: Not fixed, but seems to be even less broken in practice due to more advanced magic. A false match occurs for register #32 in mc_regs[]. Since there is no hardware register #32, a false match is only possible for direct calls to sigreturn(2) that happen to have the magic number in the spare mc_regs[32] field.
Revision 1.491: download - view: text, markup, annotated - select for diffs
Sun Feb 3 04:09:02 2002 UTC (10 years ago) by bde
Branches: MAIN
Diff to: previous 1.490: preferred, colored
Changes since revision 1.490: +4 -0 lines
Improve the change in the previous commit: use a stub for osigreturn() when it is not really used instead of unconditionalizing all of it.
Revision 1.490: download - view: text, markup, annotated - select for diffs
Fri Feb 1 15:44:02 2002 UTC (10 years ago) by bde
Branches: MAIN
Diff to: previous 1.489: preferred, colored
Changes since revision 1.489: +0 -2 lines
Compile osigreturn() unconditionally since it will always be needed on some arches and the syscall table is machine-independent. It was (bogusly) conditional on COMPAT_43, so this usually makes no difference. ia64: in addition: - replace the bogus cloned comment before osigreturn() by a correct one. osigreturn() is just a stub fo ia64's. - fix the formatting of cloned comment before sigreturn(). - fix the return code. use nosys() instead of returning ENOSYS to get the same semantics as if the syscall is not in the syscall table. Generating SIGSYS is actually correct here. - fix style bugs. powerpc: copy the cleaned up ia64 stub. This mainly fixes a bogus comment. sparc64: copy the cleaned up the ia64 stub, since there was no stub before.
Revision 1.489: download - view: text, markup, annotated - select for diffs
Wed Jan 30 17:47:12 2002 UTC (10 years ago) by bde
Branches: MAIN
Diff to: previous 1.488: preferred, colored
Changes since revision 1.488: +8 -13 lines
Cleaned up the 0ldSiG magic check before removing it. Just use fuword() to fetch the magic word instead of useracc() plus a direct access. This is more efficient as well as simpler and less incorrect: - it was inefficent because useracc() takes much longer than just accessing the data using a correct access method, at least on i386's. - it was incorrect because direct access is incorrect unless the address has been mapped. This and nearby direct accesses are mostly handled better for other arches because they have to be (direct accesses don't work). - using magic in sigreturn is still fundamentally broken because false matches are possible. On i386's, a false match occurs when %eip in a new signal context happens to equal the magic value. This is not handled better for other arches.
Revision 1.385.2.22: download - view: text, markup, annotated - select for diffs
Sat Jan 12 11:03:29 2002 UTC (10 years, 1 month ago) by bde
Branches: old_RELENG_4
CVS tags: old_RELENG_4_5_BP, old_RELENG_4_5_0_RELEASE, old_RELENG_4_5
Diff to: previous 1.385.2.21: preferred, colored; branchpoint 1.385: preferred, colored
Changes since revision 1.385.2.21: +4 -6 lines
MFC (machdep.c rev.1.488, etc.: don't trace into signal handlers; trap.c rev.1.211: don't fake a trace trap on return from sigreturn()). PR: 33262
Revision 1.488: download - view: text, markup, annotated - select for diffs
Thu Jan 10 11:49:54 2002 UTC (10 years, 1 month ago) by bde
Branches: MAIN
Diff to: previous 1.487: preferred, colored
Changes since revision 1.487: +4 -6 lines
Clear the single-step flag for signal handlers. This fixes bogus trace traps on the first instruction of signal handlers. In trap.c:syscall(), fake a trace trap if the single-step flag was set on entry to the kernel, not if it will be set on exit from the kernel. This fixes bogus trace traps after the last instruction of signal handlers. gdb-4.18 (the version in FreeBSD) still has problems with the program in the PR. These seem to be due to bugs in gdb and not in FreeBSD, and are fixed in gdb-5.1 (the distribution version). PR: 33262 Tested by: k Macy <kip_macy@yahoo.com> MFC after: 1 day
Revision 1.487: download - view: text, markup, annotated - select for diffs
Thu Jan 10 02:32:27 2002 UTC (10 years, 1 month ago) by deischen
Branches: MAIN
Diff to: previous 1.486: preferred, colored
Changes since revision 1.486: +1 -0 lines
Use a spare slot in the machine context for a flags word to indicate whether the machine context is valid and whether the FPU state is valid (saved). Mark the machine context valid before copying it out when sending a signal. Approved by: -arch
Revision 1.486: download - view: text, markup, annotated - select for diffs
Thu Dec 20 23:48:29 2001 UTC (10 years, 1 month ago) by jhb
Branches: MAIN
Diff to: previous 1.485: preferred, colored
Changes since revision 1.485: +2 -3 lines
Introduce a standard name for the lock protecting an interrupt controller and it's associated state variables: icu_lock with the name "icu". This renames the imen_mtx for x86 SMP, but also uses the lock to protect access to the 8259 PIC on x86 UP. This also adds an appropriate lock to the various Alpha chipsets which fixes problems with Alpha SMP machines dropping interrupts with an SMP kernel.
Revision 1.385.2.21: download - view: text, markup, annotated - select for diffs
Thu Dec 13 19:18:00 2001 UTC (10 years, 1 month ago) by dillon
Branches: old_RELENG_4
Diff to: previous 1.385.2.20: preferred, colored; branchpoint 1.385: preferred, colored
Changes since revision 1.385.2.20: +8 -6 lines
MFC the maxusers = 0 autosizing code. Mike Silbersack is working on a more sophisticated version of this patch but exams will prevent him from completing it prior to the 4.5 freeze, so we decided to throw this code into 4.5 and Mike will revisit the issue post-4.5.
Revision 1.485: download - view: text, markup, annotated - select for diffs
Tue Dec 11 23:33:39 2001 UTC (10 years, 2 months ago) by jhb
Branches: MAIN
Diff to: previous 1.484: preferred, colored
Changes since revision 1.484: +15 -14 lines
Overhaul the per-CPU support a bit: - The MI portions of struct globaldata have been consolidated into a MI struct pcpu. The MD per-CPU data are specified via a macro defined in machine/pcpu.h. A macro was chosen over a struct mdpcpu so that the interface would be cleaner (PCPU_GET(my_md_field) vs. PCPU_GET(md.md_my_md_field)). - All references to globaldata are changed to pcpu instead. In a UP kernel, this data was stored as global variables which is where the original name came from. In an SMP world this data is per-CPU and ideally private to each CPU outside of the context of debuggers. This also included combining machine/globaldata.h and machine/globals.h into machine/pcpu.h. - The pointer to the thread using the FPU on i386 was renamed from npxthread to fpcurthread to be identical with other architectures. - Make the show pcpu ddb command MI with a MD callout to display MD fields. - The globaldata_register() function was renamed to pcpu_init() and now init's MI fields of a struct pcpu in addition to registering it with the internal array and list. - A pcpu_destroy() function was added to remove a struct pcpu from the internal array and list. Tested on: alpha, i386 Reviewed by: peter, jake
Revision 1.484: download - view: text, markup, annotated - select for diffs
Sun Dec 9 01:57:06 2001 UTC (10 years, 2 months ago) by dillon
Branches: MAIN
Diff to: previous 1.483: preferred, colored
Changes since revision 1.483: +2 -1 lines
Allow maxusers to be specified as 0 in the kernel config, which will cause the system to auto-size to between 32 and 512 depending on the amount of memory. MFC after: 1 week
Revision 1.483: download - view: text, markup, annotated - select for diffs
Sat Nov 17 01:38:31 2001 UTC (10 years, 2 months ago) by peter
Branches: MAIN
Diff to: previous 1.482: preferred, colored
Changes since revision 1.482: +6 -6 lines
Start bringing i386/pmap.c into line with cleanups that were done to alpha pmap. In particular - - pd_entry_t and pt_entry_t are now u_int32_t instead of a pointer. This is to enable cleaner PAE and x86-64 support down the track sor that we can change the pd_entry_t/pt_entry_t types to 64 bit entities. - Terminate "unsigned *ptep, pte" with extreme prejudice and use the correct pt_entry_t/pd_entry_t types. - Various other cosmetic changes to match cleanups elsewhere. - This eliminates a boatload of casts. - use VM_MAXUSER_ADDRESS in place of UPT_MIN_ADDRESS in a couple of places where we're testing user address space limits. Assuming the page tables start directly after the end of user space is not a safe assumption. There is still more to go.
Revision 1.482: download - view: text, markup, annotated - select for diffs
Mon Oct 29 16:31:15 2001 UTC (10 years, 3 months ago) by bde
Branches: MAIN
Diff to: previous 1.481: preferred, colored
Changes since revision 1.481: +2 -0 lines
Don't set CR0_NE in cpu_setregs() for the SMP case, since setting it is npx.c's job and setting it here breaks the edit-time option of not setting it in npx.c. (It is not set in the right places for the SMP case, but always setting it here is harmless because there isn't even an edit-time option to not set it.)
Revision 1.481: download - view: text, markup, annotated - select for diffs
Thu Oct 25 00:53:43 2001 UTC (10 years, 3 months ago) by jhb
Branches: MAIN
Diff to: previous 1.480: preferred, colored
Changes since revision 1.480: +4 -3 lines
Split the per-process Local Descriptor Table out of the PCB and into struct mdproc. Submitted by: Andrew R. Reiter <arr@watson.org> Silence on: -current
Revision 1.385.2.20: download - view: text, markup, annotated - select for diffs
Tue Oct 2 23:34:22 2001 UTC (10 years, 4 months ago) by ps
Branches: old_RELENG_4
Diff to: previous 1.385.2.19: preferred, colored; branchpoint 1.385: preferred, colored
Changes since revision 1.385.2.19: +3 -3 lines
MFC: rev 1.457 Make the hw.physmem and hw.usermem variables unsigned.
Revision 1.385.2.19: download - view: text, markup, annotated - select for diffs
Thu Sep 20 08:52:57 2001 UTC (10 years, 4 months ago) by peter
Branches: old_RELENG_4
Diff to: previous 1.385.2.18: preferred, colored; branchpoint 1.385: preferred, colored
Changes since revision 1.385.2.18: +3 -17 lines
MFC: rev 1.474. Dont bogusly extend %cs into the page table space.
Revision 1.385.2.18: download - view: text, markup, annotated - select for diffs
Thu Sep 20 08:50:00 2001 UTC (10 years, 4 months ago) by peter
Branches: old_RELENG_4
Diff to: previous 1.385.2.17: preferred, colored; branchpoint 1.385: preferred, colored
Changes since revision 1.385.2.17: +14 -10 lines
MFC: rev 1.467. Fix some trivial bugs. And add the loader metadata missing warning.
Revision 1.385.2.17: download - view: text, markup, annotated - select for diffs
Sat Sep 15 00:50:36 2001 UTC (10 years, 4 months ago) by dillon
Branches: old_RELENG_4
Diff to: previous 1.385.2.16: preferred, colored; branchpoint 1.385: preferred, colored
Changes since revision 1.385.2.16: +6 -2 lines
MFC VM_SWZONE_SIZE_MAX and VM_BCACHE_SIZE_MAX features for i386. Other architectures coming soon. -current has a more complete implementation.
Revision 1.480: download - view: text, markup, annotated - select for diffs
Wed Sep 12 08:37:29 2001 UTC (10 years, 5 months ago) by julian
Branches: MAIN
CVS tags: old_KSE_MILESTONE_2
Diff to: previous 1.479: preferred, colored
Changes since revision 1.479: +76 -80 lines
KSE Milestone 2 Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
Revision 1.479: download - view: text, markup, annotated - select for diffs
Thu Sep 6 22:20:40 2001 UTC (10 years, 5 months ago) by jhb
Branches: MAIN
CVS tags: old_KSE_PRE_MILESTONE_2
Diff to: previous 1.478: preferred, colored
Changes since revision 1.478: +5 -6 lines
Call sendsig() with the proc lock held and return with it held.
Revision 1.478: download - view: text, markup, annotated - select for diffs
Tue Sep 4 08:42:33 2001 UTC (10 years, 5 months ago) by peter
Branches: MAIN
Diff to: previous 1.477: preferred, colored
Changes since revision 1.477: +1 -141 lines
Zap #if 0'ed map init code that got moved to the MI area. Convert the powerpc tree to use the common code.
Revision 1.477: download - view: text, markup, annotated - select for diffs
Mon Aug 27 05:11:18 2001 UTC (10 years, 5 months ago) by peter
Branches: MAIN
Diff to: previous 1.476: preferred, colored
Changes since revision 1.476: +4 -2 lines
Enable hardwiring of things like tunables from embedded enironments that do not start from loader(8).
Revision 1.476: download - view: text, markup, annotated - select for diffs
Sat Aug 25 02:20:01 2001 UTC (10 years, 5 months ago) by peter
Branches: MAIN
Diff to: previous 1.475: preferred, colored
Changes since revision 1.475: +5 -1 lines
Optionize UPAGES for the i386. As part of this I split some of the low level implementation stuff out of machine/globaldata.h to avoid exposing UPAGES to lots more places. The end result is that we can double the kernel stack size with 'options UPAGES=4' etc. This is mainly being done for the benefit of a MFC to RELENG_4 at some point. -current doesn't really need this so much since each interrupt runs on its own kstack.
Revision 1.475: download - view: text, markup, annotated - select for diffs
Thu Aug 23 01:49:12 2001 UTC (10 years, 5 months ago) by peter
Branches: MAIN
Diff to: previous 1.474: preferred, colored
Changes since revision 1.474: +2 -2 lines
Fix a comment error that was fixed in the pc98 version. hw.maxmem is really hw.physmem.
Revision 1.474: download - view: text, markup, annotated - select for diffs
Thu Aug 23 01:25:21 2001 UTC (10 years, 5 months ago) by peter
Branches: MAIN
Diff to: previous 1.473: preferred, colored
Changes since revision 1.473: +3 -17 lines
Dont add UPAGES to the %cs segment limit. There is nothing there except page tables.
Revision 1.473: download - view: text, markup, annotated - select for diffs
Wed Aug 22 04:07:25 2001 UTC (10 years, 5 months ago) by dillon
Branches: MAIN
Diff to: previous 1.472: preferred, colored
Changes since revision 1.472: +7 -12 lines
Move most of the kernel submap initialization code, including the timeout callwheel and buffer cache, out of the platform specific areas and into the machine independant area. i386 and alpha adjusted here. Other cpus can be fixed piecemeal. Reviewed by: freebsd-smp, jake
Revision 1.472: download - view: text, markup, annotated - select for diffs
Tue Aug 21 07:20:06 2001 UTC (10 years, 5 months ago) by dillon
Branches: MAIN
Diff to: previous 1.471: preferred, colored
Changes since revision 1.471: +7 -6 lines
Fix bug in physmem_est calculation - the kernel_map size was not being converted into pages. Fix bug in maxbcache calculation, nbuf must be tested against maxbcache rather then physmem_est. Obtained from: bde
Revision 1.471: download - view: text, markup, annotated - select for diffs
Tue Aug 21 02:32:57 2001 UTC (10 years, 5 months ago) by peter
Branches: MAIN
Diff to: previous 1.470: preferred, colored
Changes since revision 1.470: +11 -2 lines
Make COMPAT_43 optional again. XXX we need COMPAT_FBSD3 etc for this stuff.
Revision 1.470: download - view: text, markup, annotated - select for diffs
Mon Aug 20 00:41:11 2001 UTC (10 years, 5 months ago) by dillon
Branches: MAIN
Diff to: previous 1.469: preferred, colored
Changes since revision 1.469: +7 -2 lines
Limit the amount of KVM reserved for the buffer cache and for swap-meta information. The default limits only effect machines with > 1GB of ram and can be overriden with two new kernel conf variables VM_SWZONE_SIZE_MAX and VM_BCACHE_SIZE_MAX, or with loader variables kern.maxswzone and kern.maxbcache. This has the effect of leaving more KVM available for sizing NMBCLUSTERS and 'maxusers' and should avoid tripups where a sysad adds memory to a machine and then sees the kernel panic on boot due to running out of KVM. Also change the default swap-meta auto-sizing calculation to allocate half of what it was previously allocating. The prior defaults were way too high. Note that we cannot afford to run out of swap-meta structures so we still stay somewhat conservative here.
Revision 1.469: download - view: text, markup, annotated - select for diffs
Wed Aug 15 16:57:12 2001 UTC (10 years, 5 months ago) by jhb
Branches: MAIN
Diff to: previous 1.468: preferred, colored
Changes since revision 1.468: +63 -34 lines
Whitespace fixes to make this mostly fit in 80 columns.
Revision 1.385.2.16: download - view: text, markup, annotated - select for diffs
Wed Aug 15 01:23:50 2001 UTC (10 years, 5 months ago) by peter
Branches: old_RELENG_4
CVS tags: old_RELENG_4_4_BP, old_RELENG_4_4_0_RELEASE, old_RELENG_4_4
Diff to: previous 1.385.2.15: preferred, colored; branchpoint 1.385: preferred, colored
Changes since revision 1.385.2.15: +79 -6 lines
MFC: SSE kernel support. This is only active if you compile 'options CPU_ENABLE_SSE' in the kernel. This is a MFC of the code in -current, plus all the followup fixes and tweaks but adapted for the npx and compile differences in RELENG_4. The npx_intr() change comes from the 4.3 version of the diffs since -current uses traps vs. interrupts in npx.c. This is a giant no-op without the kernel compile option. Approved by: re (murray)
Revision 1.468: download - view: text, markup, annotated - select for diffs
Mon Aug 13 13:22:50 2001 UTC (10 years, 5 months ago) by bde
Branches: MAIN
Diff to: previous 1.467: preferred, colored
Changes since revision 1.467: +3 -3 lines
Use interrupt gates instead of trap gates for breakpoint and trace traps, so that ddb can keep control (almost) no matter how it is entered. This breaks time-critical interrupts while the system is stopped in ddb, but I haven't noticed any significant problems except that applications become confused about the time. Lost time will be adjusted for later. Anyway, the half-baked disabling of interrupts in Debugger() gives the same problems for the usual way of entering ddb.
Revision 1.467: download - view: text, markup, annotated - select for diffs
Sun Aug 12 08:37:39 2001 UTC (10 years, 6 months ago) by iwasaki
Branches: MAIN
Diff to: previous 1.466: preferred, colored
Changes since revision 1.466: +13 -11 lines
Fix some trivial bugs. - fix segment limit mis-calculation for GCODE_SEL, GDATA_SEL, GPRIV_SEL, LUCODE_SEL and LUDATA_SEL. - move `loader(8) metadata' related printf() after cninit(). - use atop macro (address to pages) for segment limit calculation instead of i386_btop macro (bytes to pages). - fix style bugs for the declarations of ints. Reviewed by: bde, msmith (and arch & audit ML)
Revision 1.466: download - view: text, markup, annotated - select for diffs
Wed Aug 8 05:25:06 2001 UTC (10 years, 6 months ago) by peter
Branches: MAIN
Diff to: previous 1.465: preferred, colored
Changes since revision 1.465: +1 -55 lines
Zap 'ptrace(PT_READ_U, ...)' and 'ptrace(PT_WRITE_U, ...)' since they are a really nasty interface that should have been killed long ago when 'ptrace(PT_[SG]ETREGS' etc came along. The entity that they operate on (struct user) will not be around much longer since it is part-per-process and part-per-thread in a post-KSE world. gdb does not actually use this except for the obscure 'info udot' command which does a hexdump of as much of the child's 'struct user' as it can get. It carries its own #defines so it doesn't break compiles.
Revision 1.385.2.15: download - view: text, markup, annotated - select for diffs
Mon Jul 30 23:27:59 2001 UTC (10 years, 6 months ago) by peter
Branches: old_RELENG_4
Diff to: previous 1.385.2.14: preferred, colored; branchpoint 1.385: preferred, colored
Changes since revision 1.385.2.14: +4 -1 lines
MFC: tunable update. Do MAXUSERS derived tuning at boot time, with overrides. Allow hz to be tunable. Stop copying param.c to compiledir.
Revision 1.465: download - view: text, markup, annotated - select for diffs
Thu Jul 26 23:06:44 2001 UTC (10 years, 6 months ago) by peter
Branches: MAIN
Diff to: previous 1.464: preferred, colored
Changes since revision 1.464: +4 -1 lines
Call the early tunable setup functions as soon as kern_envp is available. Some things depend on hz being set not long after this.
Revision 1.385.2.14: download - view: text, markup, annotated - select for diffs
Thu Jul 26 02:29:09 2001 UTC (10 years, 6 months ago) by bsd
Branches: old_RELENG_4
Diff to: previous 1.385.2.13: preferred, colored; branchpoint 1.385: preferred, colored
Changes since revision 1.385.2.13: +1 -6 lines
MFC revisions 1.464 and 1.115 of machdep.c and swtch.s respectively to provide better handling of reserved debug register bits; allows debuggers to write back the unmodified value of dr7 that they received from the traced process's PCB without it failing with EINVAL, while still preserving reserved bit settings for the CPU.
Revision 1.385.2.13: download - view: text, markup, annotated - select for diffs
Wed Jul 25 01:00:09 2001 UTC (10 years, 6 months ago) by bsd
Branches: old_RELENG_4
Diff to: previous 1.385.2.12: preferred, colored; branchpoint 1.385: preferred, colored
Changes since revision 1.385.2.12: +98 -74 lines
MFC new hwatch/dhwatch ddb commands for setting/deleting hardware watchpoints within ddb.
Revision 1.464: download - view: text, markup, annotated - select for diffs
Thu Jul 19 04:37:27 2001 UTC (10 years, 6 months ago) by bsd
Branches: MAIN
Diff to: previous 1.463: preferred, colored
Changes since revision 1.463: +1 -4 lines
swtch.s: During context save, use the correct bit mask for clearing
the non-reserved bits of dr7.
During context restore, load dr7 in such a way as to not
disturb reserved bits.
machdep.c: Don't explicitly disallow the setting of the reserved bits
in dr7 since we now keep from setting them when we load dr7
from the PCB.
This allows one to write back the dr7 value obtained from
the system without triggering an EINVAL (one of the
reserved bits always seems to be set after taking a trace
trap).
MFC after: 7 days
Revision 1.463: download - view: text, markup, annotated - select for diffs
Thu Jul 12 06:32:50 2001 UTC (10 years, 7 months ago) by peter
Branches: MAIN
Diff to: previous 1.462: preferred, colored
Changes since revision 1.462: +79 -6 lines
Activate SSE/SIMD. This is the extra context switching support that we are required to do if we let user processes use the extra 128 bit registers etc. This is the base part of the diff I got from: http://www.issei.org/issei/FreeBSD/sse.html I believe this is by: Mr. SUZUKI Issei <issei@issei.org> SMP support apparently by: Takekazu KATO <kato@chino.it.okayama-u.ac.jp> Test code by: NAKAMURA Kazushi <kaz@kobe1995.net>, see http://kobe1995.net/~kaz/FreeBSD/SSE.en.html I have fixed a couple of style(9) deviations. I have some followup commits to fix a couple of non-style things.
Revision 1.462: download - view: text, markup, annotated - select for diffs
Wed Jul 11 03:15:25 2001 UTC (10 years, 7 months ago) by bsd
Branches: MAIN
Diff to: previous 1.461: preferred, colored
Changes since revision 1.461: +92 -70 lines
Add 'hwatch' and 'dhwatch' ddb commands analogous to 'watch' and 'dwatch'. The new commands install hardware watchpoints if supported by the architecture and if there are enough registers to cover the desired memory area. No objection by: audit@, hackers@ MFC after: 2 weeks
Revision 1.461: download - view: text, markup, annotated - select for diffs
Wed Jul 4 16:20:09 2001 UTC (10 years, 7 months ago) by dillon
Branches: MAIN
Diff to: previous 1.460: preferred, colored
Changes since revision 1.460: +3 -5 lines
With Alfred's permission, remove vm_mtx in favor of a fine-grained approach (this commit is just the first stage). Also add various GIANT_ macros to formalize the removal of Giant, making it easy to test in a more piecemeal fashion. These macros will allow us to test fine-grained locks to a degree before removing Giant, and also after, and to remove Giant in a piecemeal fashion via sysctl's on those subsystems which the authors believe can operate without Giant.
Revision 1.460: download - view: text, markup, annotated - select for diffs
Tue Jul 3 19:43:40 2001 UTC (10 years, 7 months ago) by tmm
Branches: MAIN
Diff to: previous 1.459: preferred, colored
Changes since revision 1.459: +1 -43 lines
Make the code to read the kernel message buffer via sysctl machine- independent and rename the corresponding sysctls from machdep.msgbuf and machdep.msgbuf_clear (i386 only) to kern.msgbuf and kern.msgbuf_clear.
Revision 1.459: download - view: text, markup, annotated - select for diffs
Fri Jun 29 18:13:30 2001 UTC (10 years, 7 months ago) by imp
Branches: MAIN
Diff to: previous 1.458: preferred, colored
Changes since revision 1.458: +1 -4 lines
Remove cruft from old bus.
Revision 1.458: download - view: text, markup, annotated - select for diffs
Fri Jun 29 11:10:28 2001 UTC (10 years, 7 months ago) by jhb
Branches: MAIN
Diff to: previous 1.457: preferred, colored
Changes since revision 1.457: +14 -14 lines
Add a new MI pointer to the process' trapframe p_frame instead of using various differently named pointers buried under p_md. Reviewed by: jake (in principle)
Revision 1.457: download - view: text, markup, annotated - select for diffs
Fri Jun 22 22:07:01 2001 UTC (10 years, 7 months ago) by peter
Branches: MAIN
Diff to: previous 1.456: preferred, colored
Changes since revision 1.456: +3 -3 lines
Make the hw.physmem and hw.usermem variables unsigned so that they dont come up as negative on machines with >2GB ram.
Revision 1.456: download - view: text, markup, annotated - select for diffs
Mon Jun 18 19:19:38 2001 UTC (10 years, 7 months ago) by jhb
Branches: MAIN
Diff to: previous 1.455: preferred, colored
Changes since revision 1.455: +7 -16 lines
Initialize mutexes needed early on all in the same place so that the startup routine more closely matches that of alpha and ia64. At some point the common mutexes shared across all platforms probably should move into sys/kern_mutex.c.
Revision 1.385.2.12: download - view: text, markup, annotated - select for diffs
Fri Jun 15 09:38:03 2001 UTC (10 years, 7 months ago) by scottl
Branches: old_RELENG_4
Diff to: previous 1.385.2.11: preferred, colored; branchpoint 1.385: preferred, colored
Changes since revision 1.385.2.11: +21 -1 lines
MFC Peter Wemm's init and kthread enhancements from 08/11/2000 of -current. This allows kthreads to be used by device drivers long before root is mounted and init is officially started. This also brings RAIDframe one step closer. Reviewed by: peter
Revision 1.455: download - view: text, markup, annotated - select for diffs
Tue Jun 12 09:39:58 2001 UTC (10 years, 8 months ago) by peter
Branches: MAIN
Diff to: previous 1.454: preferred, colored
Changes since revision 1.454: +2 -2 lines
Hints overhaul: - Replace some very poorly thought out API hacks that should have been fixed a long while ago. - Provide some much more flexible search functions (resource_find_*()) - Use strings for storage instead of an outgrowth of the rather inconvenient temporary ioconf table from config(). We already had a fallback to using strings before malloc/vm was running anyway.
Revision 1.454: download - view: text, markup, annotated - select for diffs
Fri Jun 1 13:23:05 2001 UTC (10 years, 8 months ago) by tmm
Branches: MAIN
Diff to: previous 1.453: preferred, colored
Changes since revision 1.453: +1 -2 lines
Clean up the code exporting interrupt statistics via sysctl a bit: - move the sysctl code to kern_intr.c - do not use INTRCNT_COUNT, but rather eintrcnt - intrcnt to determine the length of the intrcnt array - move the declarations of intrnames, eintrnames, intrcnt and eintrcnt from machine-dependent include files to sys/interrupt.h - remove the hw.nintr sysctl, it is not needed. - fix various style bugs Requested by: bde Reviewed by: bde (some time ago)
Revision 1.453: download - view: text, markup, annotated - select for diffs
Sat May 19 01:28:01 2001 UTC (10 years, 8 months ago) by alfred
Branches: MAIN
Diff to: previous 1.452: preferred, colored
Changes since revision 1.452: +5 -1 lines
Introduce a global lock for the vm subsystem (vm_mtx). vm_mtx does not recurse and is required for most low level vm operations. faults can not be taken without holding Giant. Memory subsystems can now call the base page allocators safely. Almost all atomic ops were removed as they are covered under the vm mutex. Alpha and ia64 now need to catch up to i386's trap handlers. FFS and NFS have been tested, other filesystems will need minor changes (grabbing the vm lock when twiddling page properties). Reviewed (partially) by: jake, jhb
Revision 1.452: download - view: text, markup, annotated - select for diffs
Thu May 17 22:28:45 2001 UTC (10 years, 8 months ago) by jhb
Branches: MAIN
Diff to: previous 1.451: preferred, colored
Changes since revision 1.451: +2 -6 lines
- Move the setting of bootverbose to a MI SI_SUB_TUNABLES SYSINIT. - Attach a writable sysctl to bootverbose (debug.bootverbose) so it can be toggled after boot. - Move the printf of the version string to a SI_SUB_COPYRIGHT SYSINIT just afer the display of the copyright message instead of doing it by hand in three MD places.
Revision 1.451: download - view: text, markup, annotated - select for diffs
Tue May 15 23:22:19 2001 UTC (10 years, 8 months ago) by jhb
Branches: MAIN
Diff to: previous 1.450: preferred, colored
Changes since revision 1.450: +1 -2 lines
Remove unneeded includes of sys/ipl.h and machine/ipl.h.
Revision 1.450: download - view: text, markup, annotated - select for diffs
Sat May 12 22:54:53 2001 UTC (10 years, 9 months ago) by deischen
Branches: MAIN
Diff to: previous 1.449: preferred, colored
Changes since revision 1.449: +2 -1 lines
Revert part of last commit. Instead of using %fs for KSD/TSD, we'll follow Linux' convention and use %gs. This adds back the setting of %fs to a sane value in sendsig(). The value of %gs remains preserved to whatever it was in user context.
Revision 1.449: download - view: text, markup, annotated - select for diffs
Thu May 10 17:45:46 2001 UTC (10 years, 9 months ago) by jhb
Branches: MAIN
Diff to: previous 1.448: preferred, colored
Changes since revision 1.448: +3 -4 lines
- Split out the support for per-CPU data from the SMP code. UP kernels have per-CPU data and gdb on the i386 at least needs access to it. - Clean up includes in kern_idle.c and subr_smp.c. Reviewed by: jake
Revision 1.448: download - view: text, markup, annotated - select for diffs
Sun May 6 02:13:12 2001 UTC (10 years, 9 months ago) by deischen
Branches: MAIN
Diff to: previous 1.447: preferred, colored
Changes since revision 1.447: +1 -3 lines
When setting up the frame to invoke a signal handler, preserve the %fs and %gs registers instead of setting them to known sane values. %fs is going to be used for thread/KSE specific data by the new threads library; we'll want it to be valid inside of signal handlers. According to bde, Linux preserves the state of %fs and %gs when setting up signal handlers, so there is precedent for doing this. The same changes should be made in the Linux emulator, but when made, they seem to break (at least one version of) the IBM JDK for Linux (reported by drew). Approved by: bde
Revision 1.447: download - view: text, markup, annotated - select for diffs
Fri Apr 27 19:28:19 2001 UTC (10 years, 9 months ago) by jhb
Branches: MAIN
Diff to: previous 1.446: preferred, colored
Changes since revision 1.446: +7 -16 lines
Overhaul of the SMP code. Several portions of the SMP kernel support have been made machine independent and various other adjustments have been made to support Alpha SMP. - It splits the per-process portions of hardclock() and statclock() off into hardclock_process() and statclock_process() respectively. hardclock() and statclock() call the *_process() functions for the current process so that UP systems will run as before. For SMP systems, it is simply necessary to ensure that all other processors execute the *_process() functions when the main clock functions are triggered on one CPU by an interrupt. For the alpha 4100, clock interrupts are delievered in a staggered broadcast fashion, so we simply call hardclock/statclock on the boot CPU and call the *_process() functions on the secondaries. For x86, we call statclock and hardclock as usual and then call forward_hardclock/statclock in the MD code to send an IPI to cause the AP's to execute forwared_hardclock/statclock which then call the *_process() functions. - forward_signal() and forward_roundrobin() have been reworked to be MI and to involve less hackery. Now the cpu doing the forward sets any flags, etc. and sends a very simple IPI_AST to the other cpu(s). AST IPIs now just basically return so that they can execute ast() and don't bother with setting the astpending or needresched flags themselves. This also removes the loop in forward_signal() as sched_lock closes the race condition that the loop worked around. - need_resched(), resched_wanted() and clear_resched() have been changed to take a process to act on rather than assuming curproc so that they can be used to implement forward_roundrobin() as described above. - Various other SMP variables have been moved to a MI subr_smp.c and a new header sys/smp.h declares MI SMP variables and API's. The IPI API's from machine/ipl.h have moved to machine/smp.h which is included by sys/smp.h. - The globaldata_register() and globaldata_find() functions as well as the SLIST of globaldata structures has become MI and moved into subr_smp.c. Also, the globaldata list is only available if SMP support is compiled in. Reviewed by: jake, peter Looked over by: eivind
Revision 1.446: download - view: text, markup, annotated - select for diffs
Wed Mar 28 09:03:20 2001 UTC (10 years, 10 months ago) by jhb
Branches: MAIN
Diff to: previous 1.445: preferred, colored
Changes since revision 1.445: +3 -2 lines
Rework the witness code to work with sx locks as well as mutexes.
- Introduce lock classes and lock objects. Each lock class specifies a
name and set of flags (or properties) shared by all locks of a given
type. Currently there are three lock classes: spin mutexes, sleep
mutexes, and sx locks. A lock object specifies properties of an
additional lock along with a lock name and all of the extra stuff needed
to make witness work with a given lock. This abstract lock stuff is
defined in sys/lock.h. The lockmgr constants, types, and prototypes have
been moved to sys/lockmgr.h. For temporary backwards compatability,
sys/lock.h includes sys/lockmgr.h.
- Replace proc->p_spinlocks with a per-CPU list, PCPU(spinlocks), of spin
locks held. By making this per-cpu, we do not have to jump through
magic hoops to deal with sched_lock changing ownership during context
switches.
- Replace proc->p_heldmtx, formerly a list of held sleep mutexes, with
proc->p_sleeplocks, which is a list of held sleep locks including sleep
mutexes and sx locks.
- Add helper macros for logging lock events via the KTR_LOCK KTR logging
level so that the log messages are consistent.
- Add some new flags that can be passed to mtx_init():
- MTX_NOWITNESS - specifies that this lock should be ignored by witness.
This is used for the mutex that blocks a sx lock for example.
- MTX_QUIET - this is not new, but you can pass this to mtx_init() now
and no events will be logged for this lock, so that one doesn't have
to change all the individual mtx_lock/unlock() operations.
- All lock objects maintain an initialized flag. Use this flag to export
a mtx_initialized() macro that can be safely called from drivers. Also,
we on longer walk the all_mtx list if MUTEX_DEBUG is defined as witness
performs the corresponding checks using the initialized flag.
- The lock order reversal messages have been improved to output slightly
more accurate file and line numbers.
Revision 1.445: download - view: text, markup, annotated - select for diffs
Fri Mar 23 03:45:00 2001 UTC (10 years, 10 months ago) by tmm
Branches: MAIN
Diff to: previous 1.444: preferred, colored
Changes since revision 1.444: +2 -1 lines
Export intrnames and intrcnt as sysctls (hw.nintr, hw.intrnames and hw.intrcnt). Approved by: rwatson
Revision 1.444: download - view: text, markup, annotated - select for diffs
Wed Mar 7 03:37:00 2001 UTC (10 years, 11 months ago) by jhb
Branches: MAIN
Diff to: previous 1.443: preferred, colored
Changes since revision 1.443: +7 -3 lines
Grab the process lock while calling psignal and before calling psignal.
Revision 1.385.2.11: download - view: text, markup, annotated - select for diffs
Mon Mar 5 13:08:59 2001 UTC (10 years, 11 months ago) by obrien
Branches: old_RELENG_4
CVS tags: old_RELENG_4_3_BP, old_RELENG_4_3_0_RELEASE, old_RELENG_4_3
Diff to: previous 1.385.2.10: preferred, colored; branchpoint 1.385: preferred, colored
Changes since revision 1.385.2.10: +1 -3 lines
MFC: Convert all users of fldoff() to offsetof(). fldoff() is bad because it only takes a struct tag which makes it impossible to use unions, typedefs etc. Define __offsetof() in <machine/ansi.h> Define offsetof() in terms of __offsetof() in <stddef.h> and <sys/types.h>
Revision 1.443: download - view: text, markup, annotated - select for diffs
Sun Feb 25 02:53:05 2001 UTC (10 years, 11 months ago) by jake
Branches: MAIN
Diff to: previous 1.442: preferred, colored
Changes since revision 1.442: +5 -5 lines
- Rename the lcall system call handler from Xsyscall to Xlcall_syscall to be more like Xint0x80_syscall and less like c function syscall(). - Reduce code duplication between the int0x80 and lcall handlers by shuffling the elfags into the right place, saving the sizeof the instruction in tf_err and jumping into the common int0x80 code. Reviewed by: peter
Revision 1.442: download - view: text, markup, annotated - select for diffs
Fri Feb 23 01:25:00 2001 UTC (10 years, 11 months ago) by peter
Branches: MAIN
Diff to: previous 1.441: preferred, colored
Changes since revision 1.441: +3 -8 lines
Activate USER_LDT by default. The new thread libraries are going to depend on this. The linux ABI emulator tries to use it for some linux binaries too. VM86 had a bigger cost than this and it was made default a while ago. Reviewed by: jhb, imp
Revision 1.441: download - view: text, markup, annotated - select for diffs
Tue Feb 20 05:26:13 2001 UTC (10 years, 11 months ago) by jhb
Branches: MAIN
Diff to: previous 1.440: preferred, colored
Changes since revision 1.440: +1 -2 lines
- Don't call clear_resched() in userret(), instead, clear the resched flag in mi_switch() just before calling cpu_switch() so that the first switch after a resched request will satisfy the request. - While I'm at it, move a few things into mi_switch() and out of cpu_switch(), specifically set the p_oncpu and p_lastcpu members of proc in mi_switch(), and handle the sched_lock state change across a context switch in mi_switch(). - Since cpu_switch() no longer handles the sched_lock state change, we have to setup an initial state for sched_lock in fork_exit() before we release it.
Revision 1.440: download - view: text, markup, annotated - select for diffs
Fri Feb 9 16:25:14 2001 UTC (11 years ago) by jhb
Branches: MAIN
Diff to: previous 1.439: preferred, colored
Changes since revision 1.439: +2 -1 lines
Move the initailization of the proc lock for proc0 very early into the MD startup code.
Revision 1.439: download - view: text, markup, annotated - select for diffs
Fri Feb 9 06:09:19 2001 UTC (11 years ago) by bmilekic
Branches: MAIN
Diff to: previous 1.438: preferred, colored
Changes since revision 1.438: +2 -2 lines
Change and clean the mutex lock interface.
mtx_enter(lock, type) becomes:
mtx_lock(lock) for sleep locks (MTX_DEF-initialized locks)
mtx_lock_spin(lock) for spin locks (MTX_SPIN-initialized)
similarily, for releasing a lock, we now have:
mtx_unlock(lock) for MTX_DEF and mtx_unlock_spin(lock) for MTX_SPIN.
We change the caller interface for the two different types of locks
because the semantics are entirely different for each case, and this
makes it explicitly clear and, at the same time, it rids us of the
extra `type' argument.
The enter->lock and exit->unlock change has been made with the idea
that we're "locking data" and not "entering locked code" in mind.
Further, remove all additional "flags" previously passed to the
lock acquire/release routines with the exception of two:
MTX_QUIET and MTX_NOSWITCH
The functionality of these flags is preserved and they can be passed
to the lock/unlock routines by calling the corresponding wrappers:
mtx_{lock, unlock}_flags(lock, flag(s)) and
mtx_{lock, unlock}_spin_flags(lock, flag(s)) for MTX_DEF and MTX_SPIN
locks, respectively.
Re-inline some lock acq/rel code; in the sleep lock case, we only
inline the _obtain_lock()s in order to ensure that the inlined code
fits into a cache line. In the spin lock case, we inline recursion and
actually only perform a function call if we need to spin. This change
has been made with the idea that we generally tend to avoid spin locks
and that also the spin locks that we do have and are heavily used
(i.e. sched_lock) do recurse, and therefore in an effort to reduce
function call overhead for some architectures (such as alpha), we
inline recursion for this case.
Create a new malloc type for the witness code and retire from using
the M_DEV type. The new type is called M_WITNESS and is only declared
if WITNESS is enabled.
Begin cleaning up some machdep/mutex.h code - specifically updated the
"optimized" inlined code in alpha/mutex.h and wrote MTX_LOCK_SPIN
and MTX_UNLOCK_SPIN asm macros for the i386/mutex.h as we presently
need those.
Finally, caught up to the interface changes in all sys code.
Contributors: jake, jhb, jasone (in no particular order)
Revision 1.385.2.10: download - view: text, markup, annotated - select for diffs
Fri Feb 9 02:58:48 2001 UTC (11 years ago) by dillon
Branches: old_RELENG_4
Diff to: previous 1.385.2.9: preferred, colored; branchpoint 1.385: preferred, colored
Changes since revision 1.385.2.9: +2 -1 lines
MFC Tor's buffer cache fixes. This turns buffer_map into a system map, gets rid of bogus allocations of backing VM objects for it, and makes a minor bug fix to the buffer cache KVM hysteresis.
Revision 1.438: download - view: text, markup, annotated - select for diffs
Sun Feb 4 06:19:24 2001 UTC (11 years ago) by dillon
Branches: MAIN
Diff to: previous 1.437: preferred, colored
Changes since revision 1.437: +2 -1 lines
This commit represents work mainly submitted by Tor and slightly modified by myself. It solves a serious vm_map corruption problem that can occur with the buffer cache when block sizes > 64K are used. This code has been heavily tested in -stable but only tested somewhat on -current. An MFC will occur in a few days. My additions include the vm_map_simplify_entry() and minor buffer cache boundry case fix. Make the buffer cache use a system map for buffer cache KVM rather then a normal map. Ensure that VM objects are not allocated for system maps. There were cases where a buffer map could wind up with a backing VM object -- normally harmless, but this could also result in the buffer cache blocking in places where it assumes no blocking will occur, possibly resulting in corrupted maps. Fix a minor boundry case in the buffer cache size limit is reached that could result in non-optimal code. Add vm_map_simplify_entry() calls to prevent 'creeping proliferation' of vm_map_entry's in the buffer cache's vm_map. Previously only a simple linear optimization was made. (The buffer vm_map typically has only a handful of vm_map_entry's. This stabilizes it at that level permanently). PR: 20609 Submitted by: (Tor Egge) tegge
Revision 1.437: download - view: text, markup, annotated - select for diffs
Mon Jan 29 09:38:38 2001 UTC (11 years ago) by peter
Branches: MAIN
Diff to: previous 1.436: preferred, colored
Changes since revision 1.436: +3 -3 lines
Send "#if NISA > 0" to the bit-bucket and replace it with an option. These were compile-time "is the isa code present?" tests and not 'how many isa busses' tests.
Revision 1.436: download - view: text, markup, annotated - select for diffs
Thu Jan 25 19:37:26 2001 UTC (11 years ago) by jhb
Branches: MAIN
Diff to: previous 1.435: preferred, colored
Changes since revision 1.435: +7 -7 lines
Whitespace fix: convert code indented 6 spaces to use tabs instead.
Revision 1.435: download - view: text, markup, annotated - select for diffs
Wed Jan 24 12:35:47 2001 UTC (11 years ago) by jasone
Branches: MAIN
Diff to: previous 1.434: preferred, colored
Changes since revision 1.434: +8 -1 lines
Convert all simplelocks to mutexes and remove the simplelock implementations.
Revision 1.434: download - view: text, markup, annotated - select for diffs
Wed Jan 24 09:45:20 2001 UTC (11 years ago) by jhb
Branches: MAIN
Diff to: previous 1.433: preferred, colored
Changes since revision 1.433: +30 -9 lines
- Proc locking. - Setup proc0.p_heldmtx, proc0.contested, and curproc earlier so that we can use mutexes. - Initialize sched_lock and Giant earlier and enter Giant during init386. - Use suser(9) instead of checking cr_uid directly.
Revision 1.433: download - view: text, markup, annotated - select for diffs
Sun Jan 21 07:52:14 2001 UTC (11 years ago) by jasone
Branches: MAIN
Diff to: previous 1.432: preferred, colored
Changes since revision 1.432: +6 -6 lines
Remove MUTEX_DECLARE() and MTX_COLD. Instead, postpone full mutex initialization until after malloc() is safe to call, then iterate through all mutexes and complete their initialization. This change is necessary in order to avoid some circular bootstrapping dependencies.
Revision 1.432: download - view: text, markup, annotated - select for diffs
Fri Jan 19 13:55:58 2001 UTC (11 years ago) by peter
Branches: MAIN
Diff to: previous 1.431: preferred, colored
Changes since revision 1.431: +2 -2 lines
Zap unused #include "apm.h"
Revision 1.431: download - view: text, markup, annotated - select for diffs
Fri Jan 19 13:19:01 2001 UTC (11 years ago) by peter
Branches: MAIN
Diff to: previous 1.430: preferred, colored
Changes since revision 1.430: +3 -3 lines
Use #ifdef DEV_NPX from opt_npx.h instead of #if NNPX > 0 from npx.h
Revision 1.430: download - view: text, markup, annotated - select for diffs
Fri Jan 19 01:58:42 2001 UTC (11 years ago) by bmilekic
Branches: MAIN
Diff to: previous 1.429: preferred, colored
Changes since revision 1.429: +5 -5 lines
Implement MTX_RECURSE flag for mtx_init(). All calls to mtx_init() for mutexes that recurse must now include the MTX_RECURSE bit in the flag argument variable. This change is in preparation for an upcoming (further) mutex API cleanup. The witness code will call panic() if a lock is found to recurse but the MTX_RECURSE bit was not set during the lock's initialization. The old MTX_RECURSE "state" bit (in mtx_lock) has been renamed to MTX_RECURSED, which is more appropriate given its meaning. The following locks have been made "recursive," thus far: eventhandler, Giant, callout, sched_lock, possibly some others declared in the architecture-specific code, all of the network card driver locks in pci/, as well as some other locks in dev/ stuff that I've found to be recursive. Reviewed by: jhb
Revision 1.429: download - view: text, markup, annotated - select for diffs
Tue Jan 16 09:10:33 2001 UTC (11 years ago) by peter
Branches: MAIN
Diff to: previous 1.428: preferred, colored
Changes since revision 1.428: +3 -4 lines
Stop doing runtime checking on i386 cpus for cpu class. The cpu is
slow enough as it is, without having to constantly check that it really
is an i386 still. It was possible to compile out the conditionals for
faster cpus by leaving out 'I386_CPU', but it was not possible to
unconditionally compile for the i386. You got the runtime checking whether
you wanted it or not. This makes I386_CPU mutually exclusive with the
other cpu types, and tidies things up a little in the process.
Reviewed by: alfred, markm, phk, benno, jlemon, jhb, jake, grog, msmith,
jasone, dcs, des (and a bunch more people who encouraged it)
Revision 1.428: download - view: text, markup, annotated - select for diffs
Fri Jan 12 07:46:28 2001 UTC (11 years, 1 month ago) by bmilekic
Branches: MAIN
Diff to: previous 1.427: preferred, colored
Changes since revision 1.427: +1 -2 lines
Remove useless include of sys/mbuf.h (no longer useful since the mbuf subsystem init was moved to a better place).
Revision 1.427: download - view: text, markup, annotated - select for diffs
Wed Jan 10 04:43:46 2001 UTC (11 years, 1 month ago) by jake
Branches: MAIN
Diff to: previous 1.426: preferred, colored
Changes since revision 1.426: +9 -8 lines
Use PCPU_GET, PCPU_PTR and PCPU_SET to access all per-cpu variables other then curproc.
Revision 1.426: download - view: text, markup, annotated - select for diffs
Sat Jan 6 17:40:02 2001 UTC (11 years, 1 month ago) by jake
Branches: MAIN
Diff to: previous 1.425: preferred, colored
Changes since revision 1.425: +11 -4 lines
Use %fs to access per-cpu variables in uni-processor kernels the same as multi-processor kernels. The old way made it difficult for kernel modules to be portable between uni-processor and multi-processor kernels. It is no longer necessary to jump through hoops. - always load %fs with the private segment on entry to the kernel - change the type of the self referntial pointer from struct privatespace to struct globaldata - make the globaldata symbol have value 0 in all cases, so the symbols in globals.s are always offsets, not aliases for fields in globaldata - define the globaldata space used for uniprocessor kernels in C, rather than assembler - change the assmebly language accessors to use %fs, add a macro PCPU_ADDR(member, reg), which loads the register reg with the address of the per-cpu variable member
Revision 1.425: download - view: text, markup, annotated - select for diffs
Wed Dec 13 10:00:42 2000 UTC (11 years, 1 month ago) by tanimura
Branches: MAIN
Diff to: previous 1.424: preferred, colored
Changes since revision 1.424: +16 -5 lines
- If swap metadata does not fit into the KVM, reduce the number of struct swblock entries by dividing the number of the entries by 2 until the swap metadata fits. - Reject swapon(2) upon failure of swap_zone allocation. This is just a temporary fix. Better solutions include: (suggested by: dillon) o reserving swap in SWAP_META_PAGES chunks, and o swapping the swblock structures themselves. Reviewed by: alfred, dillon
Revision 1.424: download - view: text, markup, annotated - select for diffs
Tue Dec 5 00:35:56 2000 UTC (11 years, 2 months ago) by jake
Branches: MAIN
Diff to: previous 1.423: preferred, colored
Changes since revision 1.423: +1 -28 lines
Remove the last of the MD netisr code. It is now all MI. Remove spending, which was unused now that all software interrupts have their own thread. Make the legacy schednetisr use an atomic op for setting bits in the netisr mask. Reviewed by: jhb
Revision 1.423: download - view: text, markup, annotated - select for diffs
Thu Nov 30 05:23:46 2000 UTC (11 years, 2 months ago) by marcel
Branches: MAIN
Diff to: previous 1.422: preferred, colored
Changes since revision 1.422: +18 -6 lines
Don't use p->p_sigstk.ss_flags to keep state of whether the process is on the alternate stack or not. For compatibility with sigstack(2) state is being updated if such is needed. We now determine whether the process is on the alternate stack by looking at its stack pointer. This allows a process to siglongjmp from a signal handler on the alternate stack to the place of the sigsetjmp on the normal stack. When maintaining state, this would have invalidated the state information and causing a subsequent signal to be delivered on the normal stack instead of the alternate stack. PR: 22286
Revision 1.422: download - view: text, markup, annotated - select for diffs
Sat Nov 25 06:22:15 2000 UTC (11 years, 2 months ago) by jlemon
Branches: MAIN
Diff to: previous 1.421: preferred, colored
Changes since revision 1.421: +2 -2 lines
Revert the last commit to the callout interface, and add a flag to callout_init() indicating whether the callout is safe or not. Update the callers of callout_init() to reflect the new interface. Okayed by: Jake
Revision 1.421: download - view: text, markup, annotated - select for diffs
Sun Nov 19 06:02:21 2000 UTC (11 years, 2 months ago) by jake
Branches: MAIN
Diff to: previous 1.420: preferred, colored
Changes since revision 1.420: +3 -1 lines
- Protect the callout wheel with a separate spin mutex, callout_lock. - Use the mutex in hardclock to ensure no races between it and softclock. - Make softclock be INTR_MPSAFE and provide a flag, CALLOUT_MPSAFE, which specifies that a callout handler does not need giant. There is still no way to set this flag when regstering a callout. Reviewed by: -smp@, jlemon
Revision 1.420: download - view: text, markup, annotated - select for diffs
Fri Oct 27 11:45:23 2000 UTC (11 years, 3 months ago) by phk
Branches: MAIN
Diff to: previous 1.419: preferred, colored
Changes since revision 1.419: +1 -3 lines
Convert all users of fldoff() to offsetof(). fldoff() is bad because it only takes a struct tag which makes it impossible to use unions, typedefs etc. Define __offsetof() in <machine/ansi.h> Define offsetof() in terms of __offsetof() in <stddef.h> and <sys/types.h> Remove myriad of local offsetof() definitions. Remove includes of <stddef.h> in kernel code. NB: Kernelcode should *never* include from /usr/include ! Make <sys/queue.h> include <machine/ansi.h> to avoid polluting the API. Deprecate <struct.h> with a warning. The warning turns into an error on 01-12-2000 and the file gets removed entirely on 01-01-2001. Paritials reviews by: various. Significant brucifications by: bde
Revision 1.385.2.9: download - view: text, markup, annotated - select for diffs
Fri Oct 27 09:07:22 2000 UTC (11 years, 3 months ago) by ps
Branches: old_RELENG_4
CVS tags: old_RELENG_4_2_0_RELEASE
Diff to: previous 1.385.2.8: preferred, colored; branchpoint 1.385: preferred, colored
Changes since revision 1.385.2.8: +2 -2 lines
MFC: [rev 1.414] Fix a cosmetic sign problem on machines with 4G of ram.
Revision 1.419: download - view: text, markup, annotated - select for diffs
Fri Oct 27 08:30:53 2000 UTC (11 years, 3 months ago) by bde
Branches: MAIN
Diff to: previous 1.418: preferred, colored
Changes since revision 1.418: +1 -4 lines
Declare or #define per-cpu globals in <machine/globals.h> in all cases. The i386 UP case was messily different.
Revision 1.418: download - view: text, markup, annotated - select for diffs
Fri Oct 20 07:32:48 2000 UTC (11 years, 3 months ago) by jhb
Branches: MAIN
Diff to: previous 1.417: preferred, colored
Changes since revision 1.417: +7 -7 lines
- machine/mutex.h -> sys/mutex.h - Use MUTEX_DECLARE() and MTX_COLD for Giant and sched_lock.
Revision 1.417: download - view: text, markup, annotated - select for diffs
Thu Oct 19 07:47:16 2000 UTC (11 years, 3 months ago) by jhb
Branches: MAIN
Diff to: previous 1.416: preferred, colored
Changes since revision 1.416: +5 -12 lines
Axe the idle_event eventhandler, and add a MD cpu_idle function used for things such as halting CPU's, idling CPU's, etc. Discussed with: msmith
Revision 1.416: download - view: text, markup, annotated - select for diffs
Tue Oct 17 23:10:23 2000 UTC (11 years, 3 months ago) by jhb
Branches: MAIN
Diff to: previous 1.415: preferred, colored
Changes since revision 1.415: +10 -8 lines
- Catch up to moving headers, machine/ipl.h -> sys/ipl.h - Fix some whitespace bogons. Submitted by: bde (2)
Revision 1.415: download - view: text, markup, annotated - select for diffs
Fri Oct 6 02:20:10 2000 UTC (11 years, 4 months ago) by jhb
Branches: MAIN
Diff to: previous 1.414: preferred, colored
Changes since revision 1.414: +7 -4 lines
- Change fast interrupts on x86 to push a full interrupt frame and to return through doreti to handle ast's. This is necessary for the clock interrupts to work properly. - Change the clock interrupts on the x86 to be fast instead of threaded. This is needed because both hardclock() and statclock() need to run in the context of the current process, not in a separate thread context. - Kill the prevproc hack as it is no longer needed. - We really need Giant when we call psignal(), but we don't want to block during the clock interrupt. Instead, use two p_flag's in the proc struct to mark the current process as having a pending SIGVTALRM or a SIGPROF and let them be delivered during ast() when hardclock() has finished running. - Remove CLKF_BASEPRI, which was #ifdef'd out on the x86 anyways. It was broken on the x86 if it was turned on since cpl is gone. It's only use was to bogusly run softclock() directly during hardclock() rather than scheduling an SWI. - Remove the COM_LOCK simplelock and replace it with a clock_lock spin mutex. Since the spin mutex already handles disabling/restoring interrupts appropriately, this also lets us axe all the *_intr() fu. - Back out the hacks in the APIC_IO x86 cpu_initclocks() code to use temporary fast interrupts for the APIC trial. - Add two new process flags P_ALRMPEND and P_PROFPEND to mark the pending signals in hardclock() that are to be delivered in ast(). Submitted by: jakeb (making statclock safe in a fast interrupt) Submitted by: cp (concept of delaying signals until ast())
Revision 1.414: download - view: text, markup, annotated - select for diffs
Mon Oct 2 20:13:03 2000 UTC (11 years, 4 months ago) by peter
Branches: MAIN
Diff to: previous 1.413: preferred, colored
Changes since revision 1.413: +2 -2 lines
Fix a cosmetic sign problem on machines with 4G of ram. 0x00312000 - 0xe5fe7fff, 3855441920 bytes (4294859990 pages) .. becomes 0x00314000 - 0xe5fe7fff, 3855433728 bytes (941268 pages)
Revision 1.413: download - view: text, markup, annotated - select for diffs
Sat Sep 30 20:12:24 2000 UTC (11 years, 4 months ago) by msmith
Branches: MAIN
Diff to: previous 1.412: preferred, colored
Changes since revision 1.412: +5 -25 lines
More updates to the ACPI code: - Move all register I/O into acpi_io.c - Move event handling into acpi_event.c - Reorganise headers into acpivar/acpireg/acpiio - Move find-RSDT and find-ACPI-owned-memory into acpi_machdep - Allocate all resources (except those detailed only by AML) as real resources. Add infrastructure that will make adding resource support to AML code easy. - Remove all ACPI #ifdefs in non-ACPI code - Removed unnecessary includes - Minor style and commenting fixes Reviewed by: iwasaki
Revision 1.412: download - view: text, markup, annotated - select for diffs
Sat Sep 30 06:30:20 2000 UTC (11 years, 4 months ago) by bmilekic
Branches: MAIN
Diff to: previous 1.411: preferred, colored
Changes since revision 1.411: +3 -14 lines
Big mbuf subsystem diff #1: incorporate mutexes and fix things up somewhat to accomodate the changes. Here's a list of things that have changed (I may have left out a few); for a relatively complete list, see http://people.freebsd.org/~bmilekic/mtx_journal * Remove old (once useful) mcluster code for MCLBYTES > PAGE_SIZE which nobody uses anymore. It was great while it lasted, but now we're moving onto bigger and better things (Approved by: wollman). * Practically re-wrote the allocation macros in sys/sys/mbuf.h to accomodate new allocations which grab the necessary lock. * Make sure that necessary mbstat variables are manipulated with corresponding atomic() routines. * Changed the "wait" routines, cleaned it up, made one routine that does the job. * Generalized MWAKEUP() macro. Got rid of m_retry and m_retryhdr, as they are now included in the generalized "wait" routines. * Sleep routines now use msleep(). * Free lists have locks. * etc... probably other stuff I'm missing... Things to look out for and work on later: * find a better way to (dynamically) adjust EXT_COUNTERS * move necessity to recurse on a lock from drain routines by providing lock-free lower-level version of MFREE() (and possibly m_free()?). * checkout include of mutex.h in sys/sys/mbuf.h - probably violating general philosophy here. The code has been reviewed quite a bit, but problems may arise... please, don't panic! Send me Emails: bmilekic@freebsd.org Reviewed by: jlemon, cp, alfred, others?
Revision 1.385.2.8: download - view: text, markup, annotated - select for diffs
Sat Sep 30 02:49:32 2000 UTC (11 years, 4 months ago) by ps
Branches: old_RELENG_4
Diff to: previous 1.385.2.7: preferred, colored; branchpoint 1.385: preferred, colored
Changes since revision 1.385.2.7: +2 -7 lines
MFC: Remove the NCPU, NAPIC, NBUS, NINTR config options. Make NAPIC, NBUS, NINTR dynamic and set NCPU to a maximum of 16 under SMP. Move MAXCPU from machine/smp.h to machine/param.h to expose MAXCPU in the !SMP case and replace NCPUS with MAXCPU since they are redundant.
Revision 1.411: download - view: text, markup, annotated - select for diffs
Fri Sep 22 23:39:50 2000 UTC (11 years, 4 months ago) by ps
Branches: MAIN
Diff to: previous 1.410: preferred, colored
Changes since revision 1.410: +2 -7 lines
Remove the NCPU, NAPIC, NBUS, NINTR config options. Make NAPIC, NBUS, NINTR dynamic and set NCPU to a maximum of 16 under SMP. Reviewed by: peter
Revision 1.410: download - view: text, markup, annotated - select for diffs
Fri Sep 22 03:18:20 2000 UTC (11 years, 4 months ago) by msmith
Branches: MAIN
Diff to: previous 1.409: preferred, colored
Changes since revision 1.409: +38 -1 lines
Implement halt-on-idle in the !SMP case, which should significantly reduce power consumption on most systems.
Revision 1.409: download - view: text, markup, annotated - select for diffs
Thu Sep 14 20:15:03 2000 UTC (11 years, 4 months ago) by jhb
Branches: MAIN
Diff to: previous 1.408: preferred, colored
Changes since revision 1.408: +3 -3 lines
Remove the mtx_t, witness_t, and witness_blessed_t types. Instead, just use struct mtx, struct witness, and struct witness_blessed. Requested by: bde
Revision 1.408: download - view: text, markup, annotated - select for diffs
Wed Sep 13 12:40:43 2000 UTC (11 years, 4 months ago) by bde
Branches: MAIN
Diff to: previous 1.407: preferred, colored
Changes since revision 1.407: +7 -7 lines
Fixed hang on booting with -d. mtx_enter() was called on an uninitialized lock. The quick fix in trap.c was not quite the version tested and had no effect; back it out.
Revision 1.407: download - view: text, markup, annotated - select for diffs
Thu Sep 7 20:12:12 2000 UTC (11 years, 5 months ago) by jake
Branches: MAIN
Diff to: previous 1.406: preferred, colored
Changes since revision 1.406: +2 -2 lines
Don't use currentldt as an L-value. This should fix options USER_LDT. Reported-by: John Hay <jhay@zibbi.mikom.csir.co.za> Nickolay Dudorov <nnd@mail.nsk.ru>
Revision 1.406: download - view: text, markup, annotated - select for diffs
Thu Sep 7 01:32:43 2000 UTC (11 years, 5 months ago) by jasone
Branches: MAIN
Diff to: previous 1.405: preferred, colored
Changes since revision 1.405: +28 -11 lines
Major update to the way synchronization is done in the kernel. Highlights include: * Mutual exclusion is used instead of spl*(). See mutex(9). (Note: The alpha port is still in transition and currently uses both.) * Per-CPU idle processes. * Interrupts are run in their own separate kernel threads and can be preempted (i386 only). Partially contributed by: BSDi (BSD/OS) Submissions by (at least): cp, dfr, dillon, grog, jake, jhb, sheldonh
Revision 1.405: download - view: text, markup, annotated - select for diffs
Sun Sep 3 04:13:02 2000 UTC (11 years, 5 months ago) by peter
Branches: MAIN
CVS tags: old_PRE_SMPNG
Diff to: previous 1.404: preferred, colored
Changes since revision 1.404: +3 -1 lines
Complain if we cannot find loader(8) metadata.
Revision 1.404: download - view: text, markup, annotated - select for diffs
Thu Aug 31 15:34:54 2000 UTC (11 years, 5 months ago) by takawata
Branches: MAIN
Diff to: previous 1.403: preferred, colored
Changes since revision 1.403: +16 -3 lines
Merge rest piece of ACPI driver.To activate acpi driver ,add device acpi line. Merge finished. But still experimental phase.Need more hack! Obtained from:ACPI for FreeBSD project
Revision 1.403: download - view: text, markup, annotated - select for diffs
Sat Aug 19 08:31:53 2000 UTC (11 years, 5 months ago) by dwmalone
Branches: MAIN
Diff to: previous 1.402: preferred, colored
Changes since revision 1.402: +6 -8 lines
Replace the mbuf external reference counting code with something that should be better. The old code counted references to mbuf clusters by using the offset of the cluster from the start of memory allocated for mbufs and clusters as an index into an array of chars, which did the reference counting. If the external storage was not a cluster then reference counting had to be done by the code using that external storage. NetBSD's system of linked lists of mbufs was cosidered, but Alfred felt it would have locking issues when the kernel was made more SMP friendly. The system implimented uses a pool of unions to track external storage. The union contains an int for counting the references and a pointer for forming a free list. The reference counts are incremented and decremented atomically and so should be SMP friendly. This system can track reference counts for any sort of external storage. Access to the reference counting stuff is now through macros defined in mbuf.h, so it should be easier to make changes to the system in the future. The possibility of storing the reference count in one of the referencing mbufs was considered, but was rejected 'cos it would often leave extra mbufs allocated. Storing the reference count in the cluster was also considered, but because the external storage may not be a cluster this isn't an option. The size of the pool of reference counters is available in the stats provided by "netstat -m". PR: 19866 Submitted by: Bosko Milekic <bmilekic@dsuper.net> Reviewed by: alfred (glanced at by others on -net)
Revision 1.385.2.7: download - view: text, markup, annotated - select for diffs
Thu Aug 17 14:59:41 2000 UTC (11 years, 5 months ago) by bsd
Branches: old_RELENG_4
CVS tags: old_RELENG_4_1_1_RELEASE
Diff to: previous 1.385.2.6: preferred, colored; branchpoint 1.385: preferred, colored
Changes since revision 1.385.2.6: +19 -1 lines
MFC rev 1.402: Don't allow undefined DR7 bits to be set.
Revision 1.402: download - view: text, markup, annotated - select for diffs
Thu Aug 17 14:35:23 2000 UTC (11 years, 5 months ago) by bsd
Branches: MAIN
Diff to: previous 1.401: preferred, colored
Changes since revision 1.401: +19 -1 lines
Don't let an illegal value for dr7 get set, which can lead to an unexpected TRCTRAP. Reported by: John W. De Boskey <jwd@FreeBSD.org>
Revision 1.401: download - view: text, markup, annotated - select for diffs
Sun Aug 13 05:17:46 2000 UTC (11 years, 6 months ago) by jhb
Branches: MAIN
Diff to: previous 1.400: preferred, colored
Changes since revision 1.400: +2 -1 lines
Include machine/cputypes.h so we get the cpu_class variable. This is needed if I386_CPU is defined in the kernel config file.
Revision 1.400: download - view: text, markup, annotated - select for diffs
Fri Aug 11 09:05:08 2000 UTC (11 years, 6 months ago) by peter
Branches: MAIN
Diff to: previous 1.399: preferred, colored
Changes since revision 1.399: +20 -1 lines
Clean up some low level bootstrap code: - stop using the evil 'struct trapframe' argument for mi_startup() (formerly main()). There are much better ways of doing it. - do not use prepare_usermode() - setregs() in execve() will do it all for us as long as the p_md.md_regs pointer is set. (which is now done in machdep.c rather than init_main.c. The Alpha port did it this way all along and is much cleaner). - collect all the magic %cr0 etc register settings into one place and have the AP's call that instead of using magic numbers (!!) that keep changing over and over again. - Make it safe to call kthread_create() earlier, including during the device probe sequence. It doesn't need the callback mechanism that NetBSD's version uses. - kthreads created this way are root-less as they exist before the root filesystem is mounted. init(1) is set up so that it aquires the root pointers prior to running. If other kthreads want filesystem acccess we can make this code more generic. - set all threads start times once we have decided what time it is. - init uses a trampoline rather than the evil prepare_usermode() hack. - kern_descrip.c has a couple of tweaks to deal with forking when there is no rootdir or cwd etc. - adjust the early SYSINIT() sequence so that a few prereqisites are in place. eg: make sure the run queue is initialized before doing forks. With this, the USB code can easily create a kthread to do the device tree discovery. (I have tested it, it works nicely). There are still some open issues before this is truely useful. - tsleep() does not like working before the clock is running. It sort-of tries to spin wait, but it can do more useful things now. - stopping a kthread in kld code at unload time is "interesting" but we have a solution for that. The Alpha code needs no changes for this. It already uses pretty much the same strategies, but a little cleaner.
Revision 1.385.2.6: download - view: text, markup, annotated - select for diffs
Fri Aug 4 22:31:06 2000 UTC (11 years, 6 months ago) by peter
Branches: old_RELENG_4
Diff to: previous 1.385.2.5: preferred, colored; branchpoint 1.385: preferred, colored
Changes since revision 1.385.2.5: +0 -21 lines
MFC: pmap interface optimizations, optionally physically backed SYSVSHM.
Revision 1.385.2.5: download - view: text, markup, annotated - select for diffs
Thu Aug 3 00:09:28 2000 UTC (11 years, 6 months ago) by ps
Branches: old_RELENG_4
Diff to: previous 1.385.2.4: preferred, colored; branchpoint 1.385: preferred, colored
Changes since revision 1.385.2.4: +6 -6 lines
MFC: Sanitize SYSCTL_HANDLER_ARGS.
Revision 1.385.2.4: download - view: text, markup, annotated - select for diffs
Thu Jul 20 10:35:14 2000 UTC (11 years, 6 months ago) by kris
Branches: old_RELENG_4
CVS tags: old_RELENG_4_1_0_RELEASE
Diff to: previous 1.385.2.3: preferred, colored; branchpoint 1.385: preferred, colored
Changes since revision 1.385.2.3: +2 -2 lines
MFC: Don't call vfprintf-like functions without a format string.
Revision 1.399: download - view: text, markup, annotated - select for diffs
Mon Jul 10 05:51:56 2000 UTC (11 years, 7 months ago) by kris
Branches: MAIN
Diff to: previous 1.398: preferred, colored
Changes since revision 1.398: +2 -2 lines
Don't call printf with no format string. Reviewed by: msmith
Revision 1.398: download - view: text, markup, annotated - select for diffs
Tue Jul 4 11:25:17 2000 UTC (11 years, 7 months ago) by phk
Branches: MAIN
Diff to: previous 1.397: preferred, colored
Changes since revision 1.397: +7 -7 lines
Previous commit changing SYSCTL_HANDLER_ARGS violated KNF. Pointed out by: bde
Revision 1.397: download - view: text, markup, annotated - select for diffs
Mon Jul 3 09:34:58 2000 UTC (11 years, 7 months ago) by phk
Branches: MAIN
Diff to: previous 1.396: preferred, colored
Changes since revision 1.396: +7 -7 lines
Style police catches up with rev 1.26 of src/sys/sys/sysctl.h:
Sanitize SYSCTL_HANDLER_ARGS so that simplistic tools can grog our
sources:
-sysctl_vm_zone SYSCTL_HANDLER_ARGS
+sysctl_vm_zone (SYSCTL_HANDLER_ARGS)
Revision 1.396: download - view: text, markup, annotated - select for diffs
Sun Jun 25 09:08:27 2000 UTC (11 years, 7 months ago) by markm
Branches: MAIN
Diff to: previous 1.395: preferred, colored
Changes since revision 1.395: +1 -3 lines
Strip out the machine-independant parts of the memory device. /dev/(u)random, /dev/null, /dev/zero are all moving to machine-independant drivers. Reviewed by: dfr
Revision 1.395: download - view: text, markup, annotated - select for diffs
Sat Jun 10 07:13:26 2000 UTC (11 years, 8 months ago) by peter
Branches: MAIN
Diff to: previous 1.394: preferred, colored
Changes since revision 1.394: +1 -2 lines
Unused include: #include "ether.h"
Revision 1.394: download - view: text, markup, annotated - select for diffs
Sat Jun 3 14:19:01 2000 UTC (11 years, 8 months ago) by bde
Branches: MAIN
Diff to: previous 1.393: preferred, colored
Changes since revision 1.393: +80 -82 lines
Fixed some style bugs in the signal handling funcations. This doesn't change the object file.
Revision 1.385.2.3: download - view: text, markup, annotated - select for diffs
Wed May 10 02:04:46 2000 UTC (11 years, 9 months ago) by obrien
Branches: old_RELENG_4
Diff to: previous 1.385.2.2: preferred, colored; branchpoint 1.385: preferred, colored
Changes since revision 1.385.2.2: +2 -2 lines
MFC: Use a MI /dev/[u]random device.
Use sys/random.h rather than i386 specific one.
Revision 1.393: download - view: text, markup, annotated - select for diffs
Fri May 5 09:58:02 2000 UTC (11 years, 9 months ago) by phk
Branches: MAIN
Diff to: previous 1.392: preferred, colored
Changes since revision 1.392: +2 -1 lines
Separate the struct bio related stuff out of <sys/buf.h> into <sys/bio.h>. <sys/bio.h> is now a prerequisite for <sys/buf.h> but it shall not be made a nested include according to bdes teachings on the subject of nested includes. Diskdrivers and similar stuff below specfs::strategy() should no longer need to include <sys/buf.> unless they need caching of data. Still a few bogus uses of struct buf to track down. Repocopy by: peter
Revision 1.392: download - view: text, markup, annotated - select for diffs
Mon May 1 13:33:52 2000 UTC (11 years, 9 months ago) by peter
Branches: MAIN
Diff to: previous 1.391: preferred, colored
Changes since revision 1.391: +1 -22 lines
Move the MSG* and SEM* options to opt_sysvipc.h Remove evil allocation macros from machdep.c (why was that there???) and use malloc() instead. Move paramters out of param.h and into the code itself. Move a bunch of internal definitions from public sys/*.h headers (without #ifdef _KERNEL even) into the code itself. I had hoped to make some of this more dynamic, but the cost of doing wakeups on all sleeping processes on old arrays was too frightening. The other possibility is to initialize on the first use, and allow dynamic sysctl changes to parameters right until that point. That would allow /etc/rc.sysctl to change SEM* and MSG* defaults as we presently do with SHM*, but without the nightmare of changing a running system.
Revision 1.391: download - view: text, markup, annotated - select for diffs
Mon Apr 24 17:30:00 2000 UTC (11 years, 9 months ago) by obrien
Branches: MAIN
Diff to: previous 1.390: preferred, colored
Changes since revision 1.390: +2 -2 lines
* Use sys/sys/random.h rather than a i386 specific one. * There was nothing that should be machine dependant about i386/isa/random_machdep.c, so it is now sys/kern/kern_random.c.
Revision 1.390: download - view: text, markup, annotated - select for diffs
Sat Apr 15 05:53:39 2000 UTC (11 years, 9 months ago) by phk
Branches: MAIN
Diff to: previous 1.389: preferred, colored
Changes since revision 1.389: +19 -19 lines
Complete the bio/buf divorce for all code below devfs::strategy
Exceptions:
Vinum untouched. This means that it cannot be compiled.
Greg Lehey is on the case.
CCD not converted yet, casts to struct buf (still safe)
atapi-cd casts to struct buf to examine B_PHYS
Revision 1.389: download - view: text, markup, annotated - select for diffs
Sun Apr 2 15:24:04 2000 UTC (11 years, 10 months ago) by phk
Branches: MAIN
Diff to: previous 1.388: preferred, colored
Changes since revision 1.388: +2 -2 lines
Move B_ERROR flag to b_ioflags and call it BIO_ERROR. (Much of this done by script) Move B_ORDERED flag to b_ioflags and call it BIO_ORDERED. Move b_pblkno and b_iodone_chain to struct bio while we transition, they will be obsoleted once bio structs chain/stack. Add bio_queue field for struct bio aware disksort. Address a lot of stylistic issues brought up by bde.
Revision 1.385.2.2: download - view: text, markup, annotated - select for diffs
Sun Apr 2 08:46:50 2000 UTC (11 years, 10 months ago) by peter
Branches: old_RELENG_4
Diff to: previous 1.385.2.1: preferred, colored; branchpoint 1.385: preferred, colored
Changes since revision 1.385.2.1: +1 -8 lines
MFC: make SYSVSHM limits arbitarily configurable via sysctl after boot and other minor cleanups.
Revision 1.388: download - view: text, markup, annotated - select for diffs
Thu Mar 30 07:16:59 2000 UTC (11 years, 10 months ago) by peter
Branches: MAIN
Diff to: previous 1.387: preferred, colored
Changes since revision 1.387: +1 -8 lines
Make sysv-style shared memory tuneable params fully runtime adjustable via sysctl. It's done pretty simply but it should be quite adequate. Also move SHMMAXPGS from $machine/include/vmparam.h as the comments that went with it were wrong... we don't allocate KVM space for the pages so that comment is bogus.. The only practical limit is how much physical ram you want to lock up as this stuff isn't paged out or swap backed.
Revision 1.385.2.1: download - view: text, markup, annotated - select for diffs
Mon Mar 27 21:30:11 2000 UTC (11 years, 10 months ago) by dillon
Branches: old_RELENG_4
Diff to: previous 1.385: preferred, colored
Changes since revision 1.385: +25 -3 lines
MFC buffer cache cleanup, geteblk fix.
Revision 1.387: download - view: text, markup, annotated - select for diffs
Mon Mar 27 21:29:30 2000 UTC (11 years, 10 months ago) by dillon
Branches: MAIN
Diff to: previous 1.386: preferred, colored
Changes since revision 1.386: +25 -3 lines
Commit the buffer cache cleanup patch to 4.x and 5.x. This patch fixes a
fragmentation problem due to geteblk() reserving too much space for the
buffer and imposes a larger granularity (16K) on KVA reservations for
the buffer cache to avoid fragmentation issues. The buffer cache size
calculations have been redone to simplify them (fewer defines, better
comments, less chance of running out of KVA).
The geteblk() fix solves a performance problem that DG was able reproduce.
This patch does not completely fix the KVA fragmentation problems, but
it goes a long way
Mostly Reviewed by: bde and others
Approved by: jkh
Revision 1.386: download - view: text, markup, annotated - select for diffs
Mon Mar 20 10:44:18 2000 UTC (11 years, 10 months ago) by phk
Branches: MAIN
Diff to: previous 1.385: preferred, colored
Changes since revision 1.385: +3 -3 lines
Remove B_READ, B_WRITE and B_FREEBUF and replace them with a new field in struct buf: b_iocmd. The b_iocmd is enforced to have exactly one bit set. B_WRITE was bogusly defined as zero giving rise to obvious coding mistakes. Also eliminate the redundant struct buf flag B_CALL, it can just as efficiently be done by comparing b_iodone to NULL. Should you get a panic or drop into the debugger, complaining about "b_iocmd", don't continue. It is likely to write on your disk where it should have been reading. This change is a step in the direction towards a stackable BIO capability. A lot of this patch were machine generated (Thanks to style(9) compliance!) Vinum users: Greg has not had time to test this yet, be careful.
Revision 1.385: download - view: text, markup, annotated - select for diffs
Mon Feb 28 19:48:51 2000 UTC (11 years, 11 months ago) by bsd
Branches: MAIN
CVS tags: old_RELENG_4_BP, old_RELENG_4_0_0_RELEASE
Branch point for: old_RELENG_4
Diff to: previous 1.384: preferred, colored
Changes since revision 1.384: +23 -1 lines
Reset the hardware debug registers when exec'ing a new image. Reviewed by: bde,jlemon Approved by: jkh
Revision 1.384: download - view: text, markup, annotated - select for diffs
Sun Feb 20 20:50:58 2000 UTC (11 years, 11 months ago) by bsd
Branches: MAIN
Diff to: previous 1.383: preferred, colored
Changes since revision 1.383: +71 -1 lines
Don't forget to reset the hardware debug registers when a process that was using them exits. Don't allow a user process to cause the kernel to take a TRCTRAP on a user space address. Reviewed by: jlemon, sef Approved by: jkh
Revision 1.383: download - view: text, markup, annotated - select for diffs
Sun Feb 13 03:31:51 2000 UTC (11 years, 11 months ago) by peter
Branches: MAIN
Diff to: previous 1.382: preferred, colored
Changes since revision 1.382: +10 -7 lines
Clean up some loose ends in the network code, including the X.25 and ISO #ifdefs. Clean out unused netisr's and leftover netisr linker set gunk. Tested on x86 and alpha, including world. Approved by: jkh
Revision 1.382: download - view: text, markup, annotated - select for diffs
Mon Dec 6 04:53:03 1999 UTC (12 years, 2 months ago) by luoqi
Branches: MAIN
Diff to: previous 1.381: preferred, colored
Changes since revision 1.381: +3 -11 lines
User ldt sharing.
Revision 1.381: download - view: text, markup, annotated - select for diffs
Sat Dec 4 10:53:38 1999 UTC (12 years, 2 months ago) by marcel
Branches: MAIN
Diff to: previous 1.380: preferred, colored
Changes since revision 1.380: +2 -2 lines
oszsigcode -> szosigcode Pointed out by: bde
Revision 1.380: download - view: text, markup, annotated - select for diffs
Sat Dec 4 10:40:22 1999 UTC (12 years, 2 months ago) by marcel
Branches: MAIN
Diff to: previous 1.379: preferred, colored
Changes since revision 1.379: +3 -3 lines
Fix type of sf_addr. Pointed out by: bde
Revision 1.379: download - view: text, markup, annotated - select for diffs
Wed Nov 24 01:02:58 1999 UTC (12 years, 2 months ago) by archie
Branches: MAIN
Diff to: previous 1.378: preferred, colored
Changes since revision 1.378: +2 -2 lines
Change the prototype of the strto* routines to make the second parameter a char ** instead of a const char **. This make these kernel routines consistent with the corresponding libc userland routines. Which is actually 'correct' is debatable, but consistency and following the spec was deemed more important in this case. Reviewed by (in concept): phk, bde
Revision 1.378: download - view: text, markup, annotated - select for diffs
Tue Nov 23 04:09:13 1999 UTC (12 years, 2 months ago) by green
Branches: MAIN
Diff to: previous 1.377: preferred, colored
Changes since revision 1.377: +17 -7 lines
Fix a confusion between osigcontext and ucontext_t in the previous commit. Since an osigcontext is smaller, if you check for a valid (much larger sized) ucontext_t and it fails, we bogusly would reject the osigcontext as per rev 1.378. Instead, check for osigcontext range validity first, and ucontext_t later. This unbreaks Netscape. Pointed to the right commit by: peter
Revision 1.377: download - view: text, markup, annotated - select for diffs
Sun Nov 21 14:46:43 1999 UTC (12 years, 2 months ago) by pho
Branches: MAIN
Diff to: previous 1.376: preferred, colored
Changes since revision 1.376: +5 -5 lines
Moved useracc() to top of sigreturn as to avoid panic caused by invalid arguments to rutine. Reviewed by: marcel, phk
Revision 1.376: download - view: text, markup, annotated - select for diffs
Sun Nov 21 12:38:14 1999 UTC (12 years, 2 months ago) by phk
Branches: MAIN
Diff to: previous 1.375: preferred, colored
Changes since revision 1.375: +2 -2 lines
s/p_cred->pc_ucred/p_ucred/g
Revision 1.322.2.9: download - view: text, markup, annotated - select for diffs
Mon Nov 15 20:19:25 1999 UTC (12 years, 2 months ago) by luoqi
Branches: old_RELENG_3
CVS tags: old_RELENG_3_5_0_RELEASE, old_RELENG_3_4_0_RELEASE
Diff to: previous 1.322.2.8: preferred, colored; branchpoint 1.322: preferred, colored; next MAIN 1.323: preferred, colored
Changes since revision 1.322.2.8: +5 -1 lines
MFC: Save %fs and %gs in sigcontext when delivering signals and restore them upon return.
Revision 1.375: download - view: text, markup, annotated - select for diffs
Fri Nov 12 11:21:32 1999 UTC (12 years, 3 months ago) by marcel
Branches: MAIN
Diff to: previous 1.374: preferred, colored
Changes since revision 1.374: +3 -3 lines
Change the type of sf_addr in struct {o}sigframe from char* to
register_t.
Fix some style bugs and bitrotted comments.
Submitted by: bde
Revision 1.374: download - view: text, markup, annotated - select for diffs
Sun Oct 31 19:39:37 1999 UTC (12 years, 3 months ago) by alc
Branches: MAIN
Diff to: previous 1.373: preferred, colored
Changes since revision 1.373: +3 -3 lines
The useracc() calls in osigreturn() and sigreturn() should specify VM_PROT_READ rather than VM_PROT_WRITE. (This mistake predates the B_READ/B_WRITE -> VM_PROT_READ/VM_PROT_WRITE change.) Submitted by: bde
Revision 1.373: download - view: text, markup, annotated - select for diffs
Sat Oct 30 06:31:45 1999 UTC (12 years, 3 months ago) by phk
Branches: MAIN
Diff to: previous 1.372: preferred, colored
Changes since revision 1.372: +5 -5 lines
Change useracc() and kernacc() to use VM_PROT_{READ|WRITE|EXECUTE} for the
"rw" argument, rather than hijacking B_{READ|WRITE}.
Fix two bugs (physio & cam) resulting by the confusion caused by this.
Submitted by: Tor.Egge@fast.no
Reviewed by: alc, ken (partly)
Revision 1.372: download - view: text, markup, annotated - select for diffs
Fri Oct 29 18:08:32 1999 UTC (12 years, 3 months ago) by phk
Branches: MAIN
Diff to: previous 1.371: preferred, colored
Changes since revision 1.371: +1 -2 lines
useracc() the prequel:
Merge the contents (less some trivial bordering the silly comments)
of <vm/vm_prot.h> and <vm/vm_inherit.h> into <vm/vm.h>. This puts
the #defines for the vm_inherit_t and vm_prot_t types next to their
typedefs.
This paves the road for the commit to follow shortly: change
useracc() to use VM_PROT_{READ|WRITE} rather than B_{READ|WRITE}
as argument.
Revision 1.371: download - view: text, markup, annotated - select for diffs
Sun Oct 24 03:27:26 1999 UTC (12 years, 3 months ago) by dillon
Branches: MAIN
Diff to: previous 1.370: preferred, colored
Changes since revision 1.370: +2 -2 lines
Adjust the buffer cache to better handle small-memory machines. A
slightly older version of this code was tested by BDE and I.
Also fixes a lockup situation when kva gets too fragmented.
Remove the maxvmiobufspace variable and sysctl, they are no longer
used. Also cleanup (remove) #if 0 sections from prior commits.
This code is more of a hack, but presumably the whole buffer cache
implementation is going to be rewritten in the next year so it's no
big deal.
Revision 1.370: download - view: text, markup, annotated - select for diffs
Wed Oct 13 08:45:12 1999 UTC (12 years, 4 months ago) by marcel
Branches: MAIN
Diff to: previous 1.369: preferred, colored
Changes since revision 1.369: +3 -2 lines
Fix a security bug. eflags was copied verbatim from userland. Submitted by: bde
Revision 1.369: download - view: text, markup, annotated - select for diffs
Tue Oct 12 09:33:49 1999 UTC (12 years, 4 months ago) by marcel
Branches: MAIN
Diff to: previous 1.368: preferred, colored
Changes since revision 1.368: +2 -1 lines
Now that userland, including modules don't use the osig* syscalls and the kernel itself doesn't use any SYS_osig* constants, change the syscalls to be of type COMPAT.
Revision 1.368: download - view: text, markup, annotated - select for diffs
Mon Oct 11 20:33:05 1999 UTC (12 years, 4 months ago) by luoqi
Branches: MAIN
Diff to: previous 1.367: preferred, colored
Changes since revision 1.367: +25 -38 lines
Add a per-signal flag to mark handlers registered with osigaction, so we can provide the correct context to each signal handler. Fix broken sigsuspend(): don't use p_oldsigmask as a flag, use SAS_OLDMASK as we did before the linuxthreads support merge (submitted by bde). Move ps_sigstk from to p_sigacts to the main proc structure since signal stack should not be shared among threads. Move SAS_OLDMASK and SAS_ALTSTACK flags from sigacts::ps_flags to proc::p_flag. Move PS_NOCLDSTOP and PS_NOCLDWAIT flags from proc::p_flag to procsig::ps_flag. Reviewed by: marcel, jdp, bde
Revision 1.367: download - view: text, markup, annotated - select for diffs
Thu Oct 7 12:40:32 1999 UTC (12 years, 4 months ago) by marcel
Branches: MAIN
Diff to: previous 1.366: preferred, colored
Changes since revision 1.366: +29 -29 lines
Simplification of the signal trampoline and other cleanups. o Remove unused defines from genassym.c that were needed by the trampoline. o Add load_gs_param function to support.s that catches a fault when %gs is loaded with an invalid descriptor. The function returns EFAULT in that case. o Remove struct trapframe from mcontext_t and replace it with the list of registers. o Modify sendsig and sigreturn accordingly. This commit contains a patch by bde. Reviewed by: luoqi, jdp
Revision 1.366: download - view: text, markup, annotated - select for diffs
Mon Oct 4 19:33:51 1999 UTC (12 years, 4 months ago) by marcel
Branches: MAIN
Diff to: previous 1.365: preferred, colored
Changes since revision 1.365: +11 -8 lines
Re-introduction of sigcontext.
struct sigcontext and ucontext_t/mcontext_t are defined in such
a way that both (ie struct sigcontext and ucontext_t) can be
passed on to sigreturn. The signal handler is still given a
ucontext_t for maximum flexibility.
For backward compatibility sigreturn restores the state for the
alternate signal stack from sigcontext.sc_onstack and not from
ucontext_t.uc_stack. A good way to determine which value the
application has set and thus which value to use, is still open
for discussion.
NOTE: This change should only affect those binaries that use
sigcontext and/or ucontext_t. In the source tree itself
this is only doscmd. Recompilation is required for those
applications.
This commit also fixes a lot of style bugs without hopefully
adding new ones.
NOTE: struct sigaltstack.ss_size now has type size_t again. For
some reason I changed that into unsigned int.
Parts submitted by: bde
sigaltstack bug found by: bde
Revision 1.365: download - view: text, markup, annotated - select for diffs
Sun Oct 3 13:04:17 1999 UTC (12 years, 4 months ago) by marcel
Branches: MAIN
Diff to: previous 1.364: preferred, colored
Changes since revision 1.364: +3 -3 lines
Reinstate the 4th argument to old signal handlers. Don't set it when the handler uses siginfo_t.
Revision 1.364: download - view: text, markup, annotated - select for diffs
Fri Oct 1 07:49:37 1999 UTC (12 years, 4 months ago) by marcel
Branches: MAIN
Diff to: previous 1.363: preferred, colored
Changes since revision 1.363: +2 -1 lines
Implement the use of si_addr in siginfo_t. Suggested by: jdp
Revision 1.363: download - view: text, markup, annotated - select for diffs
Fri Oct 1 07:22:50 1999 UTC (12 years, 4 months ago) by marcel
Branches: MAIN
Diff to: previous 1.362: preferred, colored
Changes since revision 1.362: +7 -6 lines
Don't check %cs *after* it has being set in sigreturn. If the check fails, applications could end up running in kernel mode (oops). Submitted by: bde
Revision 1.362: download - view: text, markup, annotated - select for diffs
Wed Sep 29 15:06:20 1999 UTC (12 years, 4 months ago) by marcel
Branches: MAIN
Diff to: previous 1.361: preferred, colored
Changes since revision 1.361: +276 -71 lines
sigset_t change (part 3 of 5)
-----------------------------
By introducing a new sigframe so that the signal handler operates
on the new siginfo_t and on ucontext_t instead of sigcontext, we
now need two version of sendsig and sigreturn.
A flag in struct proc determines whether the process expects an
old sigframe or a new sigframe. The signal trampoline handles
which sigreturn to call. It does this by testing for a magic
cookie in the frame.
The alpha uses osigreturn to implement longjmp. This means that
osigreturn is not only used for compatibility with existing
binaries. To handle the new sigset_t, setjmp saves it in
sc_reserved (see NOTE).
the struct sigframe has been moved from frame.h to sigframe.h
to handle the complex header dependencies that was caused by
the new sigframe.
NOTE: For the i386, the size of jmp_buf has been increased to hold
the new sigset_t. On the alpha this has been prevented by
using sc_reserved in sigcontext.
Revision 1.361: download - view: text, markup, annotated - select for diffs
Tue Sep 7 20:02:24 1999 UTC (12 years, 5 months ago) by luoqi
Branches: MAIN
Diff to: previous 1.360: preferred, colored
Changes since revision 1.360: +2 -1 lines
Save %gs in sigcontext when delivering a signal and restore them upon return (in signal trampoline code). I plan to do the same on -stable, so that we have a consistent interface to userland applications. Reviewed by: bde
Revision 1.128.4.11: download - view: text, markup, annotated - select for diffs
Sun Sep 5 08:29:20 1999 UTC (12 years, 5 months ago) by peter
Branches: old_RELENG_2_1_0
Diff to: previous 1.128.4.10: preferred, colored; branchpoint 1.128: preferred, colored; next MAIN 1.129: preferred, colored
Changes since revision 1.128.4.10: +1 -1 lines
$Id$ -> $FreeBSD$
Revision 1.209.2.26: download - view: text, markup, annotated - select for diffs
Sun Sep 5 08:11:10 1999 UTC (12 years, 5 months ago) by peter
Branches: old_RELENG_2_2
Diff to: previous 1.209.2.25: preferred, colored; branchpoint 1.209: preferred, colored; next MAIN 1.210: preferred, colored
Changes since revision 1.209.2.25: +1 -1 lines
$Id$ -> $FreeBSD$
Revision 1.322.2.8: download - view: text, markup, annotated - select for diffs
Sun Aug 29 16:05:43 1999 UTC (12 years, 5 months ago) by peter
Branches: old_RELENG_3
CVS tags: old_RELENG_3_3_0_RELEASE
Diff to: previous 1.322.2.7: preferred, colored; branchpoint 1.322: preferred, colored
Changes since revision 1.322.2.7: +1 -1 lines
$Id$ -> $FreeBSD$
Revision 1.322.2.7: download - view: text, markup, annotated - select for diffs
Sun Aug 29 15:11:59 1999 UTC (12 years, 5 months ago) by iwasaki
Branches: old_RELENG_3
Diff to: previous 1.322.2.6: preferred, colored; branchpoint 1.322: preferred, colored
Changes since revision 1.322.2.6: +8 -8 lines
MFC: bios32() equivalent Fix (1.93 -> 1.98) - Set segment limits to 64k byte as default. For compatibility with the previous apm device driver, new flags value is prepared. - Delete unnecessary apm_event_enable() in attach function. It should be called only by apmconf -e. - Fix segment descriptor for APM, especially limit granularity. Following segment selector setting in bios32() family, some values in gdt_segs[] were fixed. APM BIOS reports its segment limits in byte units, so the limit granularity for APM is byte units, not page units. Reviewed by: imp and jlemon
Revision 1.360: download - view: text, markup, annotated - select for diffs
Sat Aug 28 00:43:46 1999 UTC (12 years, 5 months ago) by peter
Branches: MAIN
Diff to: previous 1.359: preferred, colored
Changes since revision 1.359: +1 -1 lines
$Id$ -> $FreeBSD$
Revision 1.359: download - view: text, markup, annotated - select for diffs
Tue Aug 17 07:09:06 1999 UTC (12 years, 5 months ago) by msmith
Branches: MAIN
Diff to: previous 1.358: preferred, colored
Changes since revision 1.358: +17 -8 lines
Mindbogglingly, many BIOS vendors expect to be able to load %ds with 0x40 and then access data stored in real-mode segment 0x40, even when called in protected mode. Microsoft unfortunately coddle these individuals, and so must we if we want to run their code. This change works around GPFs in some APM and PnP BIOS implementations. Obtained from: Linux
Revision 1.358: download - view: text, markup, annotated - select for diffs
Mon Aug 9 10:34:43 1999 UTC (12 years, 6 months ago) by phk
Branches: MAIN
Diff to: previous 1.357: preferred, colored
Changes since revision 1.357: +2 -2 lines
Merge the cons.c and cons.h to the best of my ability. alpha may or may not compile, I can't test it.
Revision 1.357: download - view: text, markup, annotated - select for diffs
Thu Jul 29 01:49:18 1999 UTC (12 years, 6 months ago) by msmith
Branches: MAIN
Diff to: previous 1.356: preferred, colored
Changes since revision 1.356: +25 -7 lines
Major update to the kernel's BIOS-calling ability. - Add support for calling 32-bit code in other segments - Add support for calling 16-bit protected mode code Update APM to use this facility. Submitted by: jlemon
Revision 1.356: download - view: text, markup, annotated - select for diffs
Mon Jul 19 23:36:30 1999 UTC (12 years, 6 months ago) by peter
Branches: MAIN
Diff to: previous 1.355: preferred, colored
Changes since revision 1.355: +4 -4 lines
Fix a page size vs. KB mixup. The extra buffers allocated at a reduced rate is meant to kick in at 64MB, not 256MB. Reviewed by: Matthew Dillon <dillon@backplane.com>
Revision 1.322.2.6: download - view: text, markup, annotated - select for diffs
Fri Jul 16 19:11:04 1999 UTC (12 years, 6 months ago) by jlemon
Branches: old_RELENG_3
Diff to: previous 1.322.2.5: preferred, colored; branchpoint 1.322: preferred, colored
Changes since revision 1.322.2.5: +3 -1 lines
MFC: lower-level callout routines. Approved by: jkh Not objected to by: wollman
Revision 1.355: download - view: text, markup, annotated - select for diffs
Fri Jul 9 04:15:40 1999 UTC (12 years, 7 months ago) by jlemon
Branches: MAIN
Diff to: previous 1.354: preferred, colored
Changes since revision 1.354: +82 -1 lines
Implement support for hardware debug registers on the i386. Submitted by: Brian Dean <brdean@unx.sas.com>
Revision 1.354: download - view: text, markup, annotated - select for diffs
Thu Jul 8 06:05:48 1999 UTC (12 years, 7 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.353: preferred, colored
Changes since revision 1.353: +2 -2 lines
These changes appear to give us benefits with both small (32MB) and
large (1G) memory machine configurations. I was able to run 'dbench 32'
on a 32MB system without bring the machine to a grinding halt.
* buffer cache hash table now dynamically allocated. This will
have no effect on memory consumption for smaller systems and
will help scale the buffer cache for larger systems.
* minor enhancement to pmap_clearbit(). I noticed that
all the calls to it used constant arguments. Making
it an inline allows the constants to propogate to
deeper inlines and should produce better code.
* removal of inherent vfs_ioopt support through the emplacement
of appropriate #ifdef's, with John's permission. If we do not
find a use for it by the end of the year we will remove it entirely.
* removal of getnewbufloops* counters & sysctl's - no longer
necessary for debugging, getnewbuf() is now optimal.
* buffer hash table functions removed from sys/buf.h and localized
to vfs_bio.c
* VFS_BIO_NEED_DIRTYFLUSH flag and support code added
( bwillwrite() ), allowing processes to block when too many dirty
buffers are present in the system.
* removal of a softdep test in bdwrite() that is no longer necessary
now that bdwrite() no longer attempts to flush dirty buffers.
* slight optimization added to bqrelse() - there is no reason
to test for available buffer space on B_DELWRI buffers.
* addition of reverse-scanning code to vfs_bio_awrite().
vfs_bio_awrite() will attempt to locate clusterable areas
in both the forward and reverse direction relative to the
offset of the buffer passed to it. This will probably not
make much of a difference now, but I believe we will start
to rely on it heavily in the future if we decide to shift
some of the burden of the clustering closer to the actual
I/O initiation.
* Removal of the newbufcnt and lastnewbuf counters that Kirk
added. They do not fix any race conditions that haven't already
been fixed by the gbincore() test done after the only call
to getnewbuf(). getnewbuf() is a static, so there is no chance
of it being misused by other modules. ( Unless Kirk can think
of a specific thing that this code fixes. I went through it
very carefully and didn't see anything ).
* removal of VOP_ISLOCKED() check in flushbufqueues(). I do not
think this check is necessary, the buffer should flush properly
whether the vnode is locked or not. ( yes? ).
* removal of extra arguments passed to getnewbuf() that are not
necessary.
* missed cluster_wbuild() that had to be a cluster_wbuild_wb() in
vfs_cluster.c
* vn_write() now calls bwillwrite() *PRIOR* to locking the vnode,
which should greatly aid flushing operations in heavy load
situations - both the pageout and update daemons will be able
to operate more efficiently.
* removal of b_usecount. We may add it back in later but for now
it is useless. Prior implementations of the buffer cache never
had enough buffers for it to be useful, and current implementations
which make more buffers available might not benefit relative to
the amount of sophistication required to implement a b_usecount.
Straight LRU should work just as well, especially when most things
are VMIO backed. I expect that (even though John will not like
this assumption) directories will become VMIO backed some point soon.
Submitted by: Matthew Dillon <dillon@backplane.com>
Reviewed by: Kirk McKusick <mckusick@mckusick.com>
Revision 1.353: download - view: text, markup, annotated - select for diffs
Tue Jul 6 07:13:33 1999 UTC (12 years, 7 months ago) by cracauer
Branches: MAIN
Diff to: previous 1.352: preferred, colored
Changes since revision 1.352: +47 -30 lines
Implement SA_SIGINFO for i386. Thanks to Bruce Evans for much more than a review, this was a nice puzzle. This is supposed to be binary and source compatible with older applications that access the old FreeBSD-style three arguments to a signal handler. Except those applications that access hidden signal handler arguments bejond the documented third one. If you have applications that do, please let me know so that we take the opportunity to provide the functionality they need in a documented manner. Also except application that use 'struct sigframe' directly. You need to recompile gdb and doscmd. `make world` is recommended. Example program that demonstrates how SA_SIGINFO and old-style FreeBSD handlers (with their three args) may be used in the same process is at http://www3.cons.org/tmp/fbsd-siginfo.c Programs that use the old FreeBSD-style three arguments are easy to change to SA_SIGINFO (although they don't need to, since the old style will still work): Old args to signal handler: void handler_sn(int sig, int code, struct sigcontext *scp) New args: void handler_si(int sig, siginfo_t *si, void *third) where: old:code == new:second->si_code old:scp == &(new:si->si_scp) /* Passed by value! */ The latter is also pointed to by new:third, but accessing via si->si_scp is preferred because it is type-save. FreeBSD implementation notes: - This is just the framework to make the interface POSIX compatible. For now, no additional functionality is provided. This is supposed to happen now, starting with floating point values. - We don't use 'sigcontext_t.si_value' for now (POSIX meant it for realtime-related values). - Documentation will be updated when new functionality is added and the exact arguments passed are determined. The comments in sys/signal.h are meant to be useful. Reviewed by: BDE
Revision 1.352: download - view: text, markup, annotated - select for diffs
Mon Jul 5 08:52:49 1999 UTC (12 years, 7 months ago) by msmith
Branches: MAIN
Diff to: previous 1.351: preferred, colored
Changes since revision 1.351: +1 -7 lines
Move the initialisation/tuning of nmbclusters from param.c/machdep.c into uipc_mbuf.c. This reduces three sets of identical tunable code to one set, and puts the initialisation with the mbuf code proper. Make NMBUFs tunable as well. Move the nmbclusters sysctl here as well. Move the initialisation of maxsockets from param.c to uipc_socket2.c, next to its corresponding sysctl. Use the new tunable macros for the kern.vm.kmem.size tunable (this should have been in a separate commit, whoops).
Revision 1.351: download - view: text, markup, annotated - select for diffs
Sun Jul 4 02:26:23 1999 UTC (12 years, 7 months ago) by jlemon
Branches: MAIN
Diff to: previous 1.350: preferred, colored
Changes since revision 1.350: +98 -121 lines
Some cleanup and rearrangement. hw.physmem is now an absolute quantity; we will never use more memory than this value (if specified), but will always check memory for validity up to this amount. Get rid of the speculative_mprobe option; the memory amount can now be specified by hw.physmem.
Revision 1.350: download - view: text, markup, annotated - select for diffs
Sun Jul 4 00:25:17 1999 UTC (12 years, 7 months ago) by mckusick
Branches: MAIN
Diff to: previous 1.349: preferred, colored
Changes since revision 1.349: +4 -2 lines
The buffer queue mechanism has been reformulated. Instead of having
QUEUE_AGE, QUEUE_LRU, and QUEUE_EMPTY we instead have QUEUE_CLEAN,
QUEUE_DIRTY, QUEUE_EMPTY, and QUEUE_EMPTYKVA. With this patch clean
and dirty buffers have been separated. Empty buffers with KVM
assignments have been separated from truely empty buffers. getnewbuf()
has been rewritten and now operates in a 100% optimal fashion. That is,
it is able to find precisely the right kind of buffer it needs to
allocate a new buffer, defragment KVM, or to free-up an existing buffer
when the buffer cache is full (which is a steady-state situation for
the buffer cache).
Buffer flushing has been reorganized. Previously buffers were flushed
in the context of whatever process hit the conditions forcing buffer
flushing to occur. This resulted in processes blocking on conditions
unrelated to what they were doing. This also resulted in inappropriate
VFS stacking chains due to multiple processes getting stuck trying to
flush dirty buffers or due to a single process getting into a situation
where it might attempt to flush buffers recursively - a situation that
was only partially fixed in prior commits. We have added a new daemon
called the buf_daemon which is responsible for flushing dirty buffers
when the number of dirty buffers exceeds the vfs.hidirtybuffers limit.
This daemon attempts to dynamically adjust the rate at which dirty buffers
are flushed such that getnewbuf() calls (almost) never block.
The number of nbufs and amount of buffer space is now scaled past the
8MB limit that was previously imposed for systems with over 64MB of
memory, and the vfs.{lo,hi}dirtybuffers limits have been relaxed
somewhat. The number of physical buffers has been increased with the
intention that we will manage physical I/O differently in the future.
reassignbuf previously attempted to keep the dirtyblkhd list sorted which
could result in non-deterministic operation under certain conditions,
such as when a large number of dirty buffers are being managed. This
algorithm has been changed. reassignbuf now keeps buffers locally sorted
if it can do so cheaply, and otherwise gives up and adds buffers to
the head of the dirtyblkhd list. The new algorithm is deterministic but
not perfect. The new algorithm greatly reduces problems that previously
occured when write_behind was turned off in the system.
The P_FLSINPROG proc->p_flag bit has been replaced by the more descriptive
P_BUFEXHAUST bit. This bit allows processes working with filesystem
buffers to use available emergency reserves. Normal processes do not set
this bit and are not allowed to dig into emergency reserves. The purpose
of this bit is to avoid low-memory deadlocks.
A small race condition was fixed in getpbuf() in vm/vm_pager.c.
Submitted by: Matthew Dillon <dillon@apollo.backplane.com>
Reviewed by: Kirk McKusick <mckusick@mckusick.com>
Revision 1.349: download - view: text, markup, annotated - select for diffs
Fri Jul 2 20:33:32 1999 UTC (12 years, 7 months ago) by msmith
Branches: MAIN
Diff to: previous 1.348: preferred, colored
Changes since revision 1.348: +127 -80 lines
Lightly overhaul the memory sizing code again. - The kernel environment variable 'hw.physmem' can be used to set the amount of physical memory space, based at 0, that FreeBSD will use. Any memory detected over this limit is ignored. Documentation for this is available under 'help set tunables' in the loader. - In the case where system memory size can't be accurately determined, hw.physmem is used as a best-guess memory size, but speculative probing will be used to determine actual memory size if any of the guesses or hints are 16M or more. - If RB_VERBOSE, we list the memory regions as we test them. - The compile-time option MAXMEM supplies a default value for 'hw.physmem'.
Revision 1.348: download - view: text, markup, annotated - select for diffs
Fri Jul 2 04:33:05 1999 UTC (12 years, 7 months ago) by peter
Branches: MAIN
Diff to: previous 1.347: preferred, colored
Changes since revision 1.347: +2 -14 lines
Zap totally the npx0 memory size override. It only worked if statically specified in the kernel config file - but setting options MAXMEM works exactly the same. Userconfig overrides of this have not worked for ages. Also, change the getenv for the loader override to hw.physmem based on a prior suggestion from Mike Smith. I think he still wants to change this some, but this shouldn't get in his way. This is a forced setting of the memory size, not a "cap". We probably should have a plain 'maxmem' variable as well which does do a cap, without loosing the bios memory configuration data.
Revision 1.347: download - view: text, markup, annotated - select for diffs
Thu Jul 1 18:33:22 1999 UTC (12 years, 7 months ago) by peter
Branches: MAIN
Diff to: previous 1.346: preferred, colored
Changes since revision 1.346: +9 -3 lines
Look up the kernel environment for MAXMEM as a final override for the memory size. If somebody wants to change the name, fine - I used this since it's consistant with the config variable it replaces. This is intended to replace the npx0 msize hack (which no longer works).
Revision 1.346: download - view: text, markup, annotated - select for diffs
Thu Jul 1 18:27:15 1999 UTC (12 years, 7 months ago) by peter
Branches: MAIN
Diff to: previous 1.345: preferred, colored
Changes since revision 1.345: +8 -9 lines
Move kern_envp and preload initialization a little earlier so that we can do a getenv_int() inside the memory sizing routines to override the memory limit.
Revision 1.345: download - view: text, markup, annotated - select for diffs
Mon Jun 28 15:34:54 1999 UTC (12 years, 7 months ago) by luoqi
Branches: MAIN
Diff to: previous 1.344: preferred, colored
Changes since revision 1.344: +3 -3 lines
Save common_tssd before it's loaded and the busy bit set. Submitted by: bde
Revision 1.344: download - view: text, markup, annotated - select for diffs
Thu Jun 24 20:53:24 1999 UTC (12 years, 7 months ago) by jlemon
Branches: MAIN
Diff to: previous 1.343: preferred, colored
Changes since revision 1.343: +2 -2 lines
Fix warning message; that was 4GB, not 2GB. I apparently can't do arithmetic today.
Revision 1.343: download - view: text, markup, annotated - select for diffs
Thu Jun 24 20:47:11 1999 UTC (12 years, 7 months ago) by jlemon
Branches: MAIN
Diff to: previous 1.342: preferred, colored
Changes since revision 1.342: +7 -1 lines
Explicitly ignore any memory > 2GB, we don't support it yet.
Revision 1.342: download - view: text, markup, annotated - select for diffs
Fri Jun 18 14:32:14 1999 UTC (12 years, 7 months ago) by bde
Branches: MAIN
Diff to: previous 1.341: preferred, colored
Changes since revision 1.341: +10 -12 lines
Changed the global `idt' from an array to a pointer so that npx.c automatically hacks on the active copy of the IDT if f00f_hack() has changed it. This also allows simplifications in setidt(). This fixes breakage of FP exception handling by rev.1.55 of sys/kernel.h. FP exceptions were sent to npx.c's probe handlers because npx.c "restored" the old handlers to the wrong copy of the IDT. The SYSINIT for f00f_hack() was purposely run quite late to avoid problems like this, but it is bogusly associated with the SYSINIT for proc0 so it was moved with the latter. Problem reported and fix tested by: Martin Cracauer <cracauer@cons.org>
Revision 1.341: download - view: text, markup, annotated - select for diffs
Sun Jun 13 19:20:25 1999 UTC (12 years, 8 months ago) by alc
Branches: MAIN
Diff to: previous 1.340: preferred, colored
Changes since revision 1.340: +2 -3 lines
Use pmap_kenter instead of pmap_enter to map the message buffer.
Revision 1.340: download - view: text, markup, annotated - select for diffs
Thu Jun 10 02:48:51 1999 UTC (12 years, 8 months ago) by jlemon
Branches: MAIN
Diff to: previous 1.339: preferred, colored
Changes since revision 1.339: +2 -2 lines
Change variable used for calculating ending address of physical memory from 'int' to 'vm_offset_t'. Spotted by: Richard Cownie <tich@ma.ikos.com>
Revision 1.339: download - view: text, markup, annotated - select for diffs
Tue Jun 1 23:45:46 1999 UTC (12 years, 8 months ago) by jlemon
Branches: MAIN
Diff to: previous 1.338: preferred, colored
Changes since revision 1.338: +15 -11 lines
Unbreak memory sizing for SMP.
Revision 1.338: download - view: text, markup, annotated - select for diffs
Tue Jun 1 18:25:26 1999 UTC (12 years, 8 months ago) by jlemon
Branches: MAIN
Diff to: previous 1.337: preferred, colored
Changes since revision 1.337: +1 -1 lines
Null commit; note that there is a new memory sizing routine that uses the BIOS calls to determine the memory configuration. This should fix problems with >64M for good. Reviewed by: Mike Smith
Revision 1.337: download - view: text, markup, annotated - select for diffs
Tue Jun 1 18:19:40 1999 UTC (12 years, 8 months ago) by jlemon
Branches: MAIN
Diff to: previous 1.336: preferred, colored
Changes since revision 1.336: +363 -285 lines
Unifdef VM86. Reviewed by: silence on on -current
Revision 1.336: download - view: text, markup, annotated - select for diffs
Mon May 31 18:35:53 1999 UTC (12 years, 8 months ago) by dfr
Branches: MAIN
Diff to: previous 1.335: preferred, colored
Changes since revision 1.335: +2 -2 lines
Remove fd driver from its old home and change files which include rtc.h to account for its new location.
Revision 1.335: download - view: text, markup, annotated - select for diffs
Wed May 12 21:38:42 1999 UTC (12 years, 9 months ago) by luoqi
Branches: MAIN
Diff to: previous 1.334: preferred, colored
Changes since revision 1.334: +4 -3 lines
Unbreak VESA on SMP.
Revision 1.334: download - view: text, markup, annotated - select for diffs
Thu May 6 00:54:44 1999 UTC (12 years, 9 months ago) by luoqi
Branches: MAIN
Diff to: previous 1.333: preferred, colored
Changes since revision 1.333: +3 -2 lines
Initialize dblfault_tss.tss_fs to the per-cpu private data segment selector.
Revision 1.333: download - view: text, markup, annotated - select for diffs
Thu May 6 00:38:41 1999 UTC (12 years, 9 months ago) by luoqi
Branches: MAIN
Diff to: previous 1.332: preferred, colored
Changes since revision 1.332: +1 -2 lines
Do not set curproc until proc0 is fully initialized (in proc0_init()).
Revision 1.332: download - view: text, markup, annotated - select for diffs
Wed Apr 28 01:03:21 1999 UTC (12 years, 9 months ago) by luoqi
Branches: MAIN
CVS tags: old_PRE_VFS_BIO_NFS_PATCH, old_POST_VFS_BIO_NFS_PATCH, old_POST_SMP_VMSHARE
Diff to: previous 1.331: preferred, colored
Changes since revision 1.331: +87 -78 lines
Enable vmspace sharing on SMP. Major changes are, - %fs register is added to trapframe and saved/restored upon kernel entry/exit. - Per-cpu pages are no longer mapped at the same virtual address. - Each cpu now has a separate gdt selector table. A new segment selector is added to point to per-cpu pages, per-cpu global variables are now accessed through this new selector (%fs). The selectors in gdt table are rearranged for cache line optimization. - fask_vfork is now on as default for both UP and SMP. - Some aio code cleanup. Reviewed by: Alan Cox <alc@cs.rice.edu> John Dyson <dyson@iquest.net> Julian Elischer <julian@whistel.com> Bruce Evans <bde@zeta.org.au> David Greenman <dg@root.com>
Revision 1.331: download - view: text, markup, annotated - select for diffs
Mon Apr 26 08:57:51 1999 UTC (12 years, 9 months ago) by peter
Branches: MAIN
CVS tags: old_PRE_SMP_VMSHARE
Diff to: previous 1.330: preferred, colored
Changes since revision 1.330: +6 -32 lines
Register the netisr's via SYSINIT rather than linker sets.
Revision 1.330: download - view: text, markup, annotated - select for diffs
Mon Apr 19 14:14:12 1999 UTC (12 years, 9 months ago) by peter
Branches: MAIN
Diff to: previous 1.329: preferred, colored
Changes since revision 1.329: +1 -5 lines
unifdef -DVM_STACK - it's been on for a while for x86 and was checked and appeared to be working for the Alpha some time ago.
Revision 1.329: download - view: text, markup, annotated - select for diffs
Fri Apr 16 21:22:13 1999 UTC (12 years, 9 months ago) by peter
Branches: MAIN
CVS tags: old_POST_NEWBUS
Diff to: previous 1.328: preferred, colored
Changes since revision 1.328: +12 -6 lines
Bring the 'new-bus' to the i386. This extensively changes the way the i386 platform boots, it is no longer ISA-centric, and is fully dynamic. Most old drivers compile and run without modification via 'compatability shims' to enable a smoother transition. eisa, isapnp and pccard* are not yet using the new resource manager. Once fully converted, all drivers will be loadable, including PCI and ISA. (Some other changes appear to have snuck in, including a port of Soren's ATA driver to the Alpha. Soren, back this out if you need to.) This is a checkpoint of work-in-progress, but is quite functional. The bulk of the work was done over the last few years by Doug Rabson and Garrett Wollman. Approved by: core
Revision 1.322.2.5: download - view: text, markup, annotated - select for diffs
Wed Apr 14 04:55:20 1999 UTC (12 years, 10 months ago) by jdp
Branches: old_RELENG_3
CVS tags: old_RELENG_3_2_PAO_BP, old_RELENG_3_2_PAO, old_RELENG_3_2_0_RELEASE
Diff to: previous 1.322.2.4: preferred, colored; branchpoint 1.322: preferred, colored
Changes since revision 1.322.2.4: +6 -2 lines
MFC (3 April 1999): Enable BSD/OS binaries to run in configurations that have a large kernel virtual address space.
Revision 1.328: download - view: text, markup, annotated - select for diffs
Sat Apr 3 22:19:58 1999 UTC (12 years, 10 months ago) by jdp
Branches: MAIN
CVS tags: old_PRE_NEWBUS
Diff to: previous 1.327: preferred, colored
Changes since revision 1.327: +6 -2 lines
Restore support for executing BSD/OS binaries on the i386 by passing the address of the ps_strings structure to the process via %ebx. For other kinds of binaries, %ebx is still zeroed as before. Submitted by: Thomas Stephens <tas@stephens.org> Reviewed by: jdp
Revision 1.327: download - view: text, markup, annotated - select for diffs
Sat Mar 6 04:46:18 1999 UTC (12 years, 11 months ago) by wollman
Branches: MAIN
Diff to: previous 1.326: preferred, colored
Changes since revision 1.326: +3 -1 lines
Expose a slightly-lower-level interface to timeouts which allows callers to manage their own memory. Tested on my machine (make buildworld). I've made analogous changes on the alpha, but don't have a machine to test. Not-objected-to by: dg, gibbs
Revision 1.322.2.4: download - view: text, markup, annotated - select for diffs
Wed Feb 17 13:08:41 1999 UTC (12 years, 11 months ago) by bde
Branches: old_RELENG_3
Diff to: previous 1.322.2.3: preferred, colored; branchpoint 1.322: preferred, colored
Changes since revision 1.322.2.3: +8 -2 lines
MFC (rev.1.326: don't pass PSL_NT to vm86 signal handlers). PR: 9211
Revision 1.326: download - view: text, markup, annotated - select for diffs
Sat Feb 13 17:45:15 1999 UTC (12 years, 11 months ago) by bde
Branches: MAIN
Diff to: previous 1.325: preferred, colored
Changes since revision 1.325: +8 -2 lines
Don't pass PSL_NT to vm86 signal handlers. Some vm86/real mode programs, including msdos, set PSL_NT in probes for old cpu types, although PSL_NT doesn't do anything useful in vm86 or real mode. PSL_NT is even less useful in the signal handlers. It just causes T_TSSFLT faults on return from syscalls made by the handlers. These faults are fixed up lazily so that Xsyscall() doesn't have to be slowed down to prevent them. The fault handler recently started complaining about these faults occurring "with interrupts disabled". It should not have, but the complaints pointed to this bug. PR: 9211
Revision 1.322.2.3: download - view: text, markup, annotated - select for diffs
Thu Feb 11 19:39:31 1999 UTC (13 years ago) by msmith
Branches: old_RELENG_3
CVS tags: old_RELENG_3_1_0_RELEASE
Diff to: previous 1.322.2.2: preferred, colored; branchpoint 1.322: preferred, colored
Changes since revision 1.322.2.2: +1 -1 lines
The previous commit was a merge from -current (HEAD) not -stable, and it was Requested by: jkh
Revision 1.322.2.2: download - view: text, markup, annotated - select for diffs
Thu Feb 11 19:37:44 1999 UTC (13 years ago) by msmith
Branches: old_RELENG_3
Diff to: previous 1.322.2.1: preferred, colored; branchpoint 1.322: preferred, colored
Changes since revision 1.322.2.1: +8 -1 lines
MFS - fix %edx on entry to static Linux binaries.
Revision 1.325: download - view: text, markup, annotated - select for diffs
Thu Feb 11 07:53:28 1999 UTC (13 years ago) by msmith
Branches: MAIN
Diff to: previous 1.324: preferred, colored
Changes since revision 1.324: +8 -1 lines
Zero p->retval[1] when starting a process. This value ends up in %edx when the process starts, and having it nonzero causes statically-linked Linux binaries to fail. PR: i386/10015 Submitted by: Marcel Moolenaar <marcel@scc.nl>
Revision 1.322.2.1: download - view: text, markup, annotated - select for diffs
Wed Feb 3 14:12:01 1999 UTC (13 years ago) by dg
Branches: old_RELENG_3
Diff to: previous 1.322: preferred, colored
Changes since revision 1.322: +8 -8 lines
Brought in changes from rev 1.324: bugfixes for >=2GB RAM machines.
Revision 1.324: download - view: text, markup, annotated - select for diffs
Wed Feb 3 14:10:50 1999 UTC (13 years ago) by dg
Branches: MAIN
Diff to: previous 1.323: preferred, colored
Changes since revision 1.323: +8 -8 lines
Fixed the type of target_page to vm_offset_t (unsigned). This fixes a panic during boot on machines with >=2GB of RAM. Also changed some incorrect printf conversion specifiers from %d to %u (signed to unsigned). This fixes bugs when printing the amount of memory on machines with >=2GB of RAM.
Revision 1.323: download - view: text, markup, annotated - select for diffs
Thu Jan 28 11:45:29 1999 UTC (13 years ago) by newton
Branches: MAIN
Diff to: previous 1.322: preferred, colored
Changes since revision 1.322: +11 -1 lines
Sun Bug ID 1251858 (on http://sunsolve1.sun.com) discusses the way that Sun implemented iBCS2 compatibility on Solaris >= 2.6: The emulator runs in user-mode, patching the LDT so that client programs making syscalls through the old iBCS2 call gate get handled by the emulator process. Unemulated syscalls therefore need their own call-gate that bypasses the emulator. Sun chose LDT entry 4 to implement this, which is what we've been using as LUDATA_SEL, so we need to change LUDATA_SEL if we want to run Solaris executables. Discussed with: Mike Smith
Revision 1.322: download - view: text, markup, annotated - select for diffs
Fri Jan 15 17:24:05 1999 UTC (13 years ago) by msmith
Branches: MAIN
CVS tags: old_RELENG_3_BP
Branch point for: old_RELENG_3
Diff to: previous 1.321: preferred, colored
Changes since revision 1.321: +7 -1 lines
Fetch an overide for NMBCLUSTERS from the kernel environment. Never allow the value to be reduced below that defined when the kernel was built.
Revision 1.321: download - view: text, markup, annotated - select for diffs
Sat Jan 9 15:41:49 1999 UTC (13 years, 1 month ago) by bde
Branches: MAIN
Diff to: previous 1.320: preferred, colored
Changes since revision 1.320: +2 -1 lines
Fixed switching between consoles (sc0, vt0 or sioN) in userconfig. Broken in: rev.1.315
Revision 1.320: download - view: text, markup, annotated - select for diffs
Wed Jan 6 23:05:36 1999 UTC (13 years, 1 month ago) by julian
Branches: MAIN
Diff to: previous 1.319: preferred, colored
Changes since revision 1.319: +5 -1 lines
Add (but don't activate) code for a special VM option to make downward growing stacks more general. Add (but don't activate) code to use the new stack facility when running threads, (specifically the linux threads support). This allows people to use both linux compiled linuxthreads, and also the native FreeBSD linux-threads port. The code is conditional on VM_STACK. Not using this will produce the old heavily tested system. Submitted by: Richard Seaman <dick@tar.com>
Revision 1.319: download - view: text, markup, annotated - select for diffs
Wed Dec 16 16:28:56 1998 UTC (13 years, 1 month ago) by bde
Branches: MAIN
Diff to: previous 1.318: preferred, colored
Changes since revision 1.318: +2 -2 lines
Removed the cast to a pointer in the definition of PS_STRINGS and adjusted related casts to match (only in the kernel in this commit). The pointer was only wanted in one place in kern_exec.c. Applications should use the kern.ps_strings sysctl instead of PS_STRINGS, so they shouldn't notice this change.
Revision 1.209.2.25: download - view: text, markup, annotated - select for diffs
Thu Dec 10 01:50:45 1998 UTC (13 years, 2 months ago) by steve
Branches: old_RELENG_2_2
Diff to: previous 1.209.2.24: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.24: +2 -2 lines
MFC: reword F00F workaround message.
Revision 1.318: download - view: text, markup, annotated - select for diffs
Thu Dec 10 01:49:01 1998 UTC (13 years, 2 months ago) by steve
Branches: MAIN
Diff to: previous 1.317: preferred, colored
Changes since revision 1.317: +2 -2 lines
Cleanup up the wording for the F00F bug workaround message. PR: 8041 Submitted by: Dan Nelson <dnelson@emsphone.com>
Revision 1.317: download - view: text, markup, annotated - select for diffs
Wed Dec 2 08:15:16 1998 UTC (13 years, 2 months ago) by kato
Branches: MAIN
Diff to: previous 1.316: preferred, colored
Changes since revision 1.316: +2 -2 lines
- For some old Cyrix CPUs, %cr2 is clobbered by interrupts. This problem is worked around by using an interrupt gate for the page fault handler. This code was originally made for NetBSD/pc98 by Naofumi Honda <honda@kururu.math.sci.hokudai.ac.jp> and has already been in PC98 tree. Because of this bug, trap_fatal cannot show correct page fault address if %cr2 is obtained in this function. Therefore, trap_fatal uses the value from trap() function. - The trap handler always enables interruption when buggy application or kernel code has disabled interrupts and then trapped. This code was prepared by Bruce Evans <bde@FreeBSD.org>. Submitted by: Bruce Evans <bde@FreeBSD.org> Naofumi Honda <honda@kururu.math.sci.hokudai.ac.jp>
Revision 1.316: download - view: text, markup, annotated - select for diffs
Thu Nov 26 18:50:22 1998 UTC (13 years, 2 months ago) by eivind
Branches: MAIN
Diff to: previous 1.315: preferred, colored
Changes since revision 1.315: +3 -3 lines
Staticize.
Revision 1.315: download - view: text, markup, annotated - select for diffs
Tue Nov 3 21:07:50 1998 UTC (13 years, 3 months ago) by msmith
Branches: MAIN
Diff to: previous 1.314: preferred, colored
Changes since revision 1.314: +2 -9 lines
Remove the USERCONFIG_BOOT option. Userconfig script data is searched for in a loaded module of type "userconfig_script". The RB_CONFIG flag will always result in the user being left inside userconfig at the end of the script's execution, regardless of 'quit' commands in the script. If the RB_CONFIG flag is not specified, the user will never be left inside userconfig, even if the script does not have an explicit exit command. Add the INTRO_USERCONFIG option. This option forces the userconfig 'intro' screen (after a script has optionally been executed). There is no longer a need to queue an 'intro' command.
Revision 1.314: download - view: text, markup, annotated - select for diffs
Fri Oct 30 05:41:14 1998 UTC (13 years, 3 months ago) by msmith
Branches: MAIN
Diff to: previous 1.313: preferred, colored
Changes since revision 1.313: +1 -15 lines
Add the ability to specify where on the at_shutdown queue a handler is installed. Remove cpu_power_down, and replace it with an entry at the end of the SHUTDOWN_FINAL queue in the only place it's used (APM). Submitted by: Some ideas from Bruce Walter <walter@fortean.com>
Revision 1.313: download - view: text, markup, annotated - select for diffs
Fri Oct 9 23:36:26 1998 UTC (13 years, 4 months ago) by peter
Branches: MAIN
CVS tags: old_RELENG_3_0_0_RELEASE
Diff to: previous 1.312: preferred, colored
Changes since revision 1.312: +8 -4 lines
Relocate the preload module info from machdep specifically rather than trying to do it in locore. We also walk through the module table and relocate any MODINFO_ADDR pointers so that they become KVM relative rather than physical addresses. This means that hacks for adding 0xf0000000 in places like MFS go away.
Revision 1.312: download - view: text, markup, annotated - select for diffs
Fri Oct 9 00:31:06 1998 UTC (13 years, 4 months ago) by msmith
Branches: MAIN
Diff to: previous 1.311: preferred, colored
Changes since revision 1.311: +6 -1 lines
Initialise kernel environment and module metadata pointers.
Revision 1.311: download - view: text, markup, annotated - select for diffs
Tue Sep 29 11:20:16 1998 UTC (13 years, 4 months ago) by abial
Branches: MAIN
Diff to: previous 1.310: preferred, colored
Changes since revision 1.310: +25 -4 lines
Add sysctl 'machdep.msgbuf_clear'. Setting it to anything causes the kernel message buffer to be cleared. It comes handy in situations when the only logging facility you have is the msgbuf. Reviewed by: jkh
Revision 1.310: download - view: text, markup, annotated - select for diffs
Fri Sep 25 17:34:48 1998 UTC (13 years, 4 months ago) by peter
Branches: MAIN
Diff to: previous 1.309: preferred, colored
Changes since revision 1.309: +1 -37 lines
Goodbye BOUNCE_BUFFERS, for a hack it has served us well. The last consumer of this code (the old SCSI system) has left us and the CAM code does it's own bouncing. The isa dma system has been doing it's own bouncing for a while too. Reviewed by: core
Revision 1.309: download - view: text, markup, annotated - select for diffs
Mon Sep 14 22:43:32 1998 UTC (13 years, 4 months ago) by jdp
Branches: MAIN
Diff to: previous 1.308: preferred, colored
Changes since revision 1.308: +19 -1 lines
Add new functions fill_fpregs() and set_fpregs(), like fill_regs() and set_regs() but for the floating point register state. The code is stolen from procfs_machdep.c, and moved out of there into machdep.c. These functions are needed for generating ELF core dumps.
Revision 1.308: download - view: text, markup, annotated - select for diffs
Mon Sep 14 11:47:40 1998 UTC (13 years, 4 months ago) by abial
Branches: MAIN
Diff to: previous 1.307: preferred, colored
Changes since revision 1.307: +22 -1 lines
This implements retrieving the contents of message buffer via sysctl(3) as "machdep.msgbuf". It's needed in case of using stripped kernels, where normal dmesg (which has to use kvm) doesn't work. The buffer is unwound, meaning that the data will be linear, possibly with some leading NULLs. Reviewed by: Jordan K. Hubbard <jkh@freebsd.org>
Revision 1.307: download - view: text, markup, annotated - select for diffs
Tue Sep 1 02:04:12 1998 UTC (13 years, 5 months ago) by kato
Branches: MAIN
Diff to: previous 1.306: preferred, colored
Changes since revision 1.306: +3 -3 lines
- Fix style bug. - hw.ispc98 -> machdep.ispc98. Submitted by: Garrett Wollman (hw -> machdep)
Revision 1.306: download - view: text, markup, annotated - select for diffs
Mon Aug 31 16:18:45 1998 UTC (13 years, 5 months ago) by luoqi
Branches: MAIN
Diff to: previous 1.305: preferred, colored
Changes since revision 1.305: +3 -3 lines
Use 16bit register in inline asm code to set segment registers.
Revision 1.305: download - view: text, markup, annotated - select for diffs
Mon Aug 31 08:41:36 1998 UTC (13 years, 5 months ago) by kato
Branches: MAIN
Diff to: previous 1.304: preferred, colored
Changes since revision 1.304: +7 -1 lines
- hw.machine_arch returns cpu architecture type. - moved definition of MACHINE_ARCH from cpu.h to parm.h as alpha. - Added definitions of _MACHINE and _MACHINE_ARCH. - Added hw.ispc98. The hw.ispc98 is 1 in PC98 kernel and is 0 in IBM-PC kernel. Discussed with: John Birrell <jb@FreeBSD.ORG>
Revision 1.304: download - view: text, markup, annotated - select for diffs
Tue Aug 18 07:46:58 1998 UTC (13 years, 5 months ago) by msmith
Branches: MAIN
Diff to: previous 1.303: preferred, colored
Changes since revision 1.303: +16 -6 lines
Presently there is only one `currentldt' variable for all cpus
in a SMP system. Unexpected things could happen if each cpu
has a different ldt setting and one cpu tries to use value
of currentldt set by another cpu.
The fix is to move currentldt to the per-cpu area. It includes
patches I filed in PR i386/6219 which are also user ldt related.
PR: i386/7591, i386/6219
Submitted by: Luoqi Chen <luoqi@watermarkgroup.com>
Revision 1.303: download - view: text, markup, annotated - select for diffs
Sat Jul 11 07:45:30 1998 UTC (13 years, 7 months ago) by bde
Branches: MAIN
Diff to: previous 1.302: preferred, colored
Changes since revision 1.302: +6 -5 lines
Fixed printf format errors.
Revision 1.302: download - view: text, markup, annotated - select for diffs
Tue Jun 30 21:25:58 1998 UTC (13 years, 7 months ago) by phk
Branches: MAIN
CVS tags: old_PRE_NOBDEV
Diff to: previous 1.301: preferred, colored
Changes since revision 1.301: +12 -2 lines
Add 3 sysctl variables for future use by ps)1_
Revision 1.209.2.24: download - view: text, markup, annotated - select for diffs
Thu Jun 25 00:46:43 1998 UTC (13 years, 7 months ago) by jkh
Branches: old_RELENG_2_2
CVS tags: old_RELENG_2_2_8_RELEASE, old_RELENG_2_2_7_RELEASE
Diff to: previous 1.209.2.23: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.23: +6 -6 lines
MFC: make boot message buffer size configurable. PR: 6962
Revision 1.301: download - view: text, markup, annotated - select for diffs
Sun Jun 21 17:46:53 1998 UTC (13 years, 7 months ago) by bde
Branches: MAIN
Diff to: previous 1.300: preferred, colored
Changes since revision 1.300: +3 -2 lines
Removed unused includes. Ifdefed conditionally used includes.
Revision 1.300: download - view: text, markup, annotated - select for diffs
Wed Jun 17 14:57:55 1998 UTC (13 years, 7 months ago) by bde
Branches: MAIN
Diff to: previous 1.299: preferred, colored
Changes since revision 1.299: +4 -1 lines
Don't declare isa device structs or isa interrupt handlers in <sys/conf>, and don't depend on them being declared there. This will cause lots of warnings for a few minutes until config is updated. Interrupt handlers should never have been configured by config, and the machine generated declarations get in the way of changing the arg type from int to void *.
Revision 1.299: download - view: text, markup, annotated - select for diffs
Sun Jun 7 17:10:01 1998 UTC (13 years, 8 months ago) by dfr
Branches: MAIN
Diff to: previous 1.298: preferred, colored
Changes since revision 1.298: +3 -3 lines
This commit fixes various 64bit portability problems required for FreeBSD/alpha. The most significant item is to change the command argument to ioctl functions from int to u_long. This change brings us inline with various other BSD versions. Driver writers may like to use (__FreeBSD_version == 300003) to detect this change. The prototype FreeBSD/alpha machdep will follow in a couple of days time.
Revision 1.298: download - view: text, markup, annotated - select for diffs
Wed Jun 3 07:56:59 1998 UTC (13 years, 8 months ago) by bde
Branches: MAIN
Diff to: previous 1.297: preferred, colored
Changes since revision 1.297: +21 -2 lines
Ifdefed the netisr support. PR: 6760 Reviewed by: joerg
Revision 1.297: download - view: text, markup, annotated - select for diffs
Thu May 28 09:29:57 1998 UTC (13 years, 8 months ago) by phk
Branches: MAIN
Diff to: previous 1.296: preferred, colored
Changes since revision 1.296: +2 -11 lines
Some cleanups related to timecounters and weird ifdefs in <sys/time.h>. Clean up (or if antipodic: down) some of the msgbuf stuff. Use an inline function rather than a macro for timecounter delta. Maintain process "on-cpu" time as 64 bits of microseconds to avoid needless second rollover overhead. Avoid calling microuptime the second time in mi_switch() if we do not pass through _idle in cpu_switch() This should reduce our context-switch overhead a bit, in particular on pre-P5 and SMP systems. WARNING: Programs which muck about with struct proc in userland will have to be fixed. Reviewed, but found imperfect by: bde
Revision 1.296: download - view: text, markup, annotated - select for diffs
Tue May 19 08:58:46 1998 UTC (13 years, 8 months ago) by phk
Branches: MAIN
Diff to: previous 1.295: preferred, colored
Changes since revision 1.295: +16 -6 lines
Make the size of the msgbuf (dmesg) a "normal" option.
Revision 1.295: download - view: text, markup, annotated - select for diffs
Tue May 19 00:00:09 1998 UTC (13 years, 8 months ago) by tegge
Branches: MAIN
Diff to: previous 1.294: preferred, colored
Changes since revision 1.294: +24 -4 lines
Disallow reading the current kernel stack. Only the user structure and the current registers should be accessible. Reviewed by: David Greenman <dg@root.com>
Revision 1.209.2.23: download - view: text, markup, annotated - select for diffs
Wed May 6 19:04:05 1998 UTC (13 years, 9 months ago) by gibbs
Branches: old_RELENG_2_2
Diff to: previous 1.209.2.22: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.22: +1 -41 lines
MFC autoconf.c: Add interrupt driven config hook mechanism. Split out mountroot and dumpconf code so it occurs after config hooks run. machdep.c: Clean out old DPT SWI mechanism. trap.c: Add CAM SWI mechanism, remove DPT SWI mechanism. userconfig.c: Remove DPTOPT. The dpt driver is now standard. vm_machdep.c: Add the VM SWI with hooks to call the bus dma code. busdma_machdep.c: Add bus dma functionality. Interrupt specification and attach changed to allow shared interrupts. Shared EISA interrupts don't work in -stable though because we need the new interrupt code from current. Match routines now deal with const strings.
Revision 1.294: download - view: text, markup, annotated - select for diffs
Mon Apr 6 15:46:17 1998 UTC (13 years, 10 months ago) by peter
Branches: MAIN
CVS tags: old_PRE_DEVFS_SLICE, old_POST_DEVFS_SLICE
Diff to: previous 1.293: preferred, colored
Changes since revision 1.293: +3 -12 lines
clean up #ifdefs, define the variables that have to be per-cpu on SMP in globals.s only and use externs always.
Revision 1.293: download - view: text, markup, annotated - select for diffs
Mon Mar 23 19:52:32 1998 UTC (13 years, 10 months ago) by jlemon
Branches: MAIN
Diff to: previous 1.292: preferred, colored
Changes since revision 1.292: +34 -31 lines
Add the ability to make real-mode BIOS calls from the kernel. Currently, everything is contained inside #ifdef VM86, so this option must be present in the config file to use this functionality. Thanks to Tor Egge, these changes should work on SMP machines. However, it may not be throughly SMP-safe. Currently, the only BIOS calls made are memory-sizing routines at bootup, these replace reading the RTC values.
Revision 1.209.2.22: download - view: text, markup, annotated - select for diffs
Mon Mar 23 05:30:29 1998 UTC (13 years, 10 months ago) by jkh
Branches: old_RELENG_2_2
CVS tags: old_RELENG_2_2_6_RELEASE
Diff to: previous 1.209.2.21: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.21: +1 -2 lines
MFC: don't set bouncepages as a function of total memory size or you will
lose on large memory machines.
Revision 1.209.2.21: download - view: text, markup, annotated - select for diffs
Thu Mar 12 13:06:42 1998 UTC (13 years, 11 months ago) by eivind
Branches: old_RELENG_2_2
Diff to: previous 1.209.2.20: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.20: +5 -5 lines
Remove warning from f00f_hack. Approved by: jkh
Revision 1.209.2.20: download - view: text, markup, annotated - select for diffs
Sun Mar 8 04:04:58 1998 UTC (13 years, 11 months ago) by bde
Branches: old_RELENG_2_2
Diff to: previous 1.209.2.19: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.19: +7 -2 lines
YAMFC (rev.1.191: fix breakage of late calls to setidt()).
Revision 1.292: download - view: text, markup, annotated - select for diffs
Sat Mar 7 20:16:47 1998 UTC (13 years, 11 months ago) by tegge
Branches: MAIN
CVS tags: old_PRE_SOFTUPDATE, old_POST_SOFTUPDATE
Diff to: previous 1.291: preferred, colored
Changes since revision 1.291: +3 -1 lines
The APs now reload the interrupt descriptor table pointer after f00f_hack has run. Use the global r_idt descriptor in f00f_hack when in SMP mode, so the APs find the relocated interrupt descriptor table. Submitted by: Partially from David A Adkins <adkin003@tc.umn.edu>
Revision 1.209.2.19: download - view: text, markup, annotated - select for diffs
Fri Mar 6 23:44:33 1998 UTC (13 years, 11 months ago) by julian
Branches: old_RELENG_2_2
CVS tags: old_POST_DPT
Diff to: previous 1.209.2.18: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.18: +42 -2 lines
Added support for the DPT driver. All non cosmettic changes are conditionalised on the #define DPTOPT so this should produce no functional changes if this is not defined. All changed files have previously been tagged with PRE_DPT.
Revision 1.291: download - view: text, markup, annotated - select for diffs
Thu Mar 5 19:37:03 1998 UTC (13 years, 11 months ago) by tegge
Branches: MAIN
Diff to: previous 1.290: preferred, colored
Changes since revision 1.290: +7 -2 lines
Use t_idt instead of idt inside setidt() if f00f_hack() has relocated the IDT. Submitted by: Bruce Evans <bde@zeta.org.au>
Revision 1.290: download - view: text, markup, annotated - select for diffs
Mon Mar 2 05:47:50 1998 UTC (13 years, 11 months ago) by peter
Branches: MAIN
Diff to: previous 1.289: preferred, colored
Changes since revision 1.289: +2 -2 lines
Update the ELF image activator to use some of the exec resources rather than rolling it's own. This means that it now uses the "safe" exec_map_first_page() to get the ld.so headers rather than risking a panic on a page fault failure (eg: NFS server goes down). Since all the ELF tools go to a lot of trouble to make sure everything lives in the first page for executables, this is a win. I have not seen any ELF executable on any system where all the headers didn't fit in the first page with lots of room to spare. I have been running variations of this code for some time on my pure ELF systems.
Revision 1.289: download - view: text, markup, annotated - select for diffs
Mon Feb 9 04:45:53 1998 UTC (14 years ago) by eivind
Branches: MAIN
Diff to: previous 1.288: preferred, colored
Changes since revision 1.288: +5 -5 lines
Remove warnings from f00f_hack.
Revision 1.288: download - view: text, markup, annotated - select for diffs
Fri Feb 6 12:13:08 1998 UTC (14 years ago) by eivind
Branches: MAIN
Diff to: previous 1.287: preferred, colored
Changes since revision 1.287: +1 -2 lines
Back out DIAGNOSTIC changes.
Revision 1.287: download - view: text, markup, annotated - select for diffs
Wed Feb 4 22:32:08 1998 UTC (14 years ago) by eivind
Branches: MAIN
Diff to: previous 1.286: preferred, colored
Changes since revision 1.286: +2 -1 lines
Turn DIAGNOSTIC into a new-style option.
Revision 1.286: download - view: text, markup, annotated - select for diffs
Tue Feb 3 21:27:46 1998 UTC (14 years ago) by bde
Branches: MAIN
Diff to: previous 1.285: preferred, colored
Changes since revision 1.285: +12 -1 lines
Ifdefed some SMP and VM86 code. Note that although VM86 is not a global option, the ifdef on it in a header works because only the name of the VM86 extension is hidden.
Revision 1.285: download - view: text, markup, annotated - select for diffs
Fri Jan 30 10:26:20 1998 UTC (14 years ago) by dyson
Branches: MAIN
Diff to: previous 1.284: preferred, colored
Changes since revision 1.284: +15 -16 lines
Make the bounce buffer code a little more robust when space isn't available. If there isn't bounce space available, the bounce code is disabled. This will allow most large systems to run properly when the bounce space is mistakenly allocated above 16MB.
Revision 1.209.2.18: download - view: text, markup, annotated - select for diffs
Sun Jan 25 15:40:29 1998 UTC (14 years ago) by kato
Branches: old_RELENG_2_2
CVS tags: old_PRE_DPT
Diff to: previous 1.209.2.17: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.17: +2 -1 lines
MFC: fix general protection fault by wrmsr.
Revision 1.284: download - view: text, markup, annotated - select for diffs
Sun Jan 25 12:01:16 1998 UTC (14 years ago) by kato
Branches: MAIN
Diff to: previous 1.283: preferred, colored
Changes since revision 1.283: +2 -1 lines
Even though BIOS writer's guide recommends cpuid instruction of Cyrix 6x86MX CPU is enabled (BIOS should not disable it), some BIOS disables it via CCR4. In this case, cpu variable becomes CPU_486 and identblue() is called. Because Cyrix 6x86MX has MSR and doesn't have MSR1002, wrmsr instruction generates general protection fault. Tested by: Simon Coggins <chaos@ultra.net.au>
Revision 1.283: download - view: text, markup, annotated - select for diffs
Sat Jan 24 02:00:47 1998 UTC (14 years ago) by dyson
Branches: MAIN
Diff to: previous 1.282: preferred, colored
Changes since revision 1.282: +2 -2 lines
Add better support for larger I/O clusters, including larger physical I/O. The support is not mature yet, and some of the underlying implementation needs help. However, support does exist for IDE devices now.
Revision 1.282: download - view: text, markup, annotated - select for diffs
Thu Jan 22 17:29:26 1998 UTC (14 years ago) by dyson
Branches: MAIN
Diff to: previous 1.281: preferred, colored
Changes since revision 1.281: +8 -10 lines
VM level code cleanups. 1) Start using TSM. Struct procs continue to point to upages structure, after being freed. Struct vmspace continues to point to pte object and kva space for kstack. u_map is now superfluous. 2) vm_map's don't need to be reference counted. They always exist either in the kernel or in a vmspace. The vmspaces are managed by reference counts. 3) Remove the "wired" vm_map nonsense. 4) No need to keep a cache of kernel stack kva's. 5) Get rid of strange looking ++var, and change to var++. 6) Change more data structures to use our "zone" allocator. Added struct proc, struct vmspace and struct vnode. This saves a significant amount of kva space and physical memory. Additionally, this enables TSM for the zone managed memory. 7) Keep ioopt disabled for now. 8) Remove the now bogus "single use" map concept. 9) Use generation counts or id's for data structures residing in TSM, where it allows us to avoid unneeded restart overhead during traversals, where blocking might occur. 10) Account better for memory deficits, so the pageout daemon will be able to make enough memory available (experimental.) 11) Fix some vnode locking problems. (From Tor, I think.) 12) Add a check in ufs_lookup, to avoid lots of unneeded calls to bcmp. (experimental.) 13) Significantly shrink, cleanup, and make slightly faster the vm_fault.c code. Use generation counts, get rid of unneded collpase operations, and clean up the cluster code. 14) Make vm_zone more suitable for TSM. This commit is partially as a result of discussions and contributions from other people, including DG, Tor Egge, PHK, and probably others that I have forgotten to attribute (so let me know, if I forgot.) This is not the infamous, final cleanup of the vnode stuff, but a necessary step. Vnode mgmt should be correct, but things might still change, and there is still some missing stuff (like ioopt, and physical backing of non-merged cache files, debugging of layering concepts.)
Revision 1.281: download - view: text, markup, annotated - select for diffs
Mon Jan 12 05:16:03 1998 UTC (14 years, 1 month ago) by dyson
Branches: MAIN
Diff to: previous 1.280: preferred, colored
Changes since revision 1.280: +2 -2 lines
Adjust upwards the size of exec map in order to take into account the additional PAGE_SIZE needed for exec operatino.
Revision 1.280: download - view: text, markup, annotated - select for diffs
Sat Dec 27 02:28:27 1997 UTC (14 years, 1 month ago) by peter
Branches: MAIN
Diff to: previous 1.279: preferred, colored
Changes since revision 1.279: +2 -1 lines
#include "opt_user_ldt.h" so that the #ifdef USER_LDT checks can work, as commented about at length in the PR audit trail. PR: 2412
Revision 1.279: download - view: text, markup, annotated - select for diffs
Sun Dec 14 02:10:57 1997 UTC (14 years, 1 month ago) by dyson
Branches: MAIN
Diff to: previous 1.278: preferred, colored
Changes since revision 1.278: +9 -1 lines
After one of my analysis passes to evaluate methods for SMP TLB mgmt, I noticed some major enhancements available for UP situations. The number of UP TLB flushes is decreased much more than significantly with these changes. Since a TLB flush appears to cost minimally approx 80 cycles, this is a "nice" enhancement, equiv to eliminating between 40 and 160 instructions per TLB flush. Changes include making sure that kernel threads all use the same PTD, and eliminate unneeded PTD switches at context switch time.
Revision 1.209.2.17: download - view: text, markup, annotated - select for diffs
Fri Dec 5 07:26:37 1997 UTC (14 years, 2 months ago) by jmg
Branches: old_RELENG_2_2
Diff to: previous 1.209.2.16: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.16: +4 -3 lines
MFC: document NO_F00F_HACK, make it a proper option, and sort opt headers..
Revision 1.278: download - view: text, markup, annotated - select for diffs
Thu Dec 4 21:21:24 1997 UTC (14 years, 2 months ago) by jmg
Branches: MAIN
Diff to: previous 1.277: preferred, colored
Changes since revision 1.277: +4 -3 lines
document and make the NO_F00F_HACK a proper option... also, sort some option includes while I'm here.. Forgotten by: sef
Revision 1.209.2.16: download - view: text, markup, annotated - select for diffs
Thu Dec 4 14:36:56 1997 UTC (14 years, 2 months ago) by jkh
Branches: old_RELENG_2_2
Diff to: previous 1.209.2.15: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.15: +4 -4 lines
MFC: F00F cleanup.
Revision 1.277: download - view: text, markup, annotated - select for diffs
Thu Dec 4 14:35:39 1997 UTC (14 years, 2 months ago) by jkh
Branches: MAIN
Diff to: previous 1.276: preferred, colored
Changes since revision 1.276: +4 -4 lines
After consultation with David, change #ifndef NO_F00F_HACK to #if defined(I586_CPU) && !defined(NO_F00F_HACK)
Revision 1.209.2.15: download - view: text, markup, annotated - select for diffs
Wed Dec 3 16:30:12 1997 UTC (14 years, 2 months ago) by sef
Branches: old_RELENG_2_2
Diff to: previous 1.209.2.14: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.14: +2 -6 lines
MFC -- F00f cleanups.
Revision 1.276: download - view: text, markup, annotated - select for diffs
Wed Dec 3 16:27:33 1997 UTC (14 years, 2 months ago) by sef
Branches: MAIN
Diff to: previous 1.275: preferred, colored
Changes since revision 1.275: +2 -5 lines
Make has_f00f_bug extern, and get rid of some unused code in the f00f code. Submitted by: Mikael Karpberg & Cy Schubert
Revision 1.209.2.14: download - view: text, markup, annotated - select for diffs
Wed Dec 3 02:48:29 1997 UTC (14 years, 2 months ago) by sef
Branches: old_RELENG_2_2
Diff to: previous 1.209.2.13: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.13: +43 -1 lines
MFC -- Intel Pentium F00F bug workaround. Note that I forgot the reviewer credit in the current log message; also credit to Cy Schubert <cschubert@uumail.gov.bc.ca> for cleaning up my initial patches. Reviewed by: Stephen McKay <syssgm@dtir.gld.gov.au>
Revision 1.275: download - view: text, markup, annotated - select for diffs
Wed Dec 3 02:45:46 1997 UTC (14 years, 2 months ago) by sef
Branches: MAIN
Diff to: previous 1.274: preferred, colored
Changes since revision 1.274: +43 -1 lines
Work around for the Intel Pentium F00F bug; this is Intel's recommended workaround. Note that this currently eats up two pages extra in the system; this could be alleviated by aligning idt correctly, and then only dealing with that (as opposed to the current method of allocated two pages and copying the IDT table to that, and then setting that to be the IDT table).
Revision 1.274: download - view: text, markup, annotated - select for diffs
Mon Nov 24 18:35:11 1997 UTC (14 years, 2 months ago) by bde
Branches: MAIN
Diff to: previous 1.273: preferred, colored
Changes since revision 1.273: +2 -2 lines
Fixed multiple definitions of boothowto.
Revision 1.273: download - view: text, markup, annotated - select for diffs
Fri Nov 21 18:27:10 1997 UTC (14 years, 2 months ago) by bde
Branches: MAIN
Diff to: previous 1.272: preferred, colored
Changes since revision 1.272: +7 -1 lines
Fixed setting of `safepri'. It should be SWI_AST_MASK most of the time, but was left at 0. This caused the "can't happen" case in splz_swi to happen for panics when tsleep() calls splx(safepri) and there is a SWI_AST pending. This was harmless because the the error handling happens to be right. Debugging this was tricky because debugger traps force SWI_AST_MASK on in `cpl'.
Revision 1.272: download - view: text, markup, annotated - select for diffs
Thu Nov 20 19:30:29 1997 UTC (14 years, 2 months ago) by bde
Branches: MAIN
Diff to: previous 1.271: preferred, colored
Changes since revision 1.271: +1 -5 lines
Moved some extern declarations to header files (unused ones to /dev/null).
Revision 1.271: download - view: text, markup, annotated - select for diffs
Fri Nov 7 09:20:15 1997 UTC (14 years, 3 months ago) by phk
Branches: MAIN
Diff to: previous 1.270: preferred, colored
Changes since revision 1.270: +3 -3 lines
Rename some local variables to avoid shadowing other local variables. Found by: -Wshadow
Revision 1.270: download - view: text, markup, annotated - select for diffs
Thu Nov 6 19:28:02 1997 UTC (14 years, 3 months ago) by phk
Branches: MAIN
Diff to: previous 1.269: preferred, colored
Changes since revision 1.269: +2 -3 lines
Move the "retval" (3rd) parameter from all syscall functions and put it in struct proc instead. This fixes a boatload of compiler warning, and removes a lot of cruft from the sources. I have not removed the /*ARGSUSED*/, they will require some looking at. libkvm, ps and other userland struct proc frobbing programs will need recompiled.
Revision 1.269: download - view: text, markup, annotated - select for diffs
Sun Oct 12 20:23:17 1997 UTC (14 years, 4 months ago) by phk
Branches: MAIN
Diff to: previous 1.268: preferred, colored
Changes since revision 1.268: +2 -1 lines
Last major round (Unless Bruce thinks of somthing :-) of malloc changes. Distribute all but the most fundamental malloc types. This time I also remembered the trick to making things static: Put "static" in front of them. A couple of finer points by: bde
Revision 1.268: download - view: text, markup, annotated - select for diffs
Fri Oct 10 12:42:52 1997 UTC (14 years, 4 months ago) by peter
Branches: MAIN
Diff to: previous 1.267: preferred, colored
Changes since revision 1.267: +2 -1 lines
Compensate for pcb.h tweaks. (Bruce pointed out the nesting)
Revision 1.267: download - view: text, markup, annotated - select for diffs
Fri Oct 10 09:44:02 1997 UTC (14 years, 4 months ago) by peter
Branches: MAIN
Diff to: previous 1.266: preferred, colored
Changes since revision 1.266: +2 -1 lines
Convert the VM86 option from a global option to an option only depended on by the files that use it. Changing the VM86 option now only causes a recompile of a dozen files or so rather than the entire kernel.
Revision 1.209.2.13: download - view: text, markup, annotated - select for diffs
Thu Sep 25 15:50:53 1997 UTC (14 years, 4 months ago) by davidg
Branches: old_RELENG_2_2
CVS tags: old_RELENG_2_2_5_RELEASE
Diff to: previous 1.209.2.12: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.12: +2 -2 lines
Brought in fix from rev 1.266: bugfix for spec memory probe.
Revision 1.266: download - view: text, markup, annotated - select for diffs
Thu Sep 25 15:49:37 1997 UTC (14 years, 4 months ago) by davidg
Branches: MAIN
Diff to: previous 1.265: preferred, colored
Changes since revision 1.265: +2 -2 lines
Fix a bug where the speculative memory probe wouldn't occur on systems that report slightly more than 64MB of total memory. This can happen due to the total being the sum of both base and extended memory. Submitted by: Alan Cox <alc@cs.rice.edu>
Revision 1.265: download - view: text, markup, annotated - select for diffs
Sun Sep 21 21:38:04 1997 UTC (14 years, 4 months ago) by gibbs
Branches: MAIN
Diff to: previous 1.264: preferred, colored
Changes since revision 1.264: +19 -4 lines
autoconf.c: Add cpu_rootconf and cpu_dumpconf so that configuring these two devices can be better controlled by the MI configuration code. machdep.c: MD initialization code for the new callout interface. trap.c: Add support for printing out whether cam interrupts are masked during a panic.
Revision 1.264: download - view: text, markup, annotated - select for diffs
Sun Sep 21 15:03:57 1997 UTC (14 years, 4 months ago) by peter
Branches: MAIN
Diff to: previous 1.263: preferred, colored
Changes since revision 1.263: +9 -2 lines
Implement the parts needed for VM86 under SMP.
Revision 1.209.2.12: download - view: text, markup, annotated - select for diffs
Tue Sep 16 10:45:05 1997 UTC (14 years, 4 months ago) by davidg
Branches: old_RELENG_2_2
Diff to: previous 1.209.2.11: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.11: +35 -21 lines
Bring in changes from revs 1.262 & 1.263: speculative memory probe for machines with >64MB of RAM.
Revision 1.263: download - view: text, markup, annotated - select for diffs
Thu Sep 4 15:23:33 1997 UTC (14 years, 5 months ago) by davidg
Branches: MAIN
Diff to: previous 1.262: preferred, colored
Changes since revision 1.262: +8 -8 lines
Cosmetic change to last commit: speculative_mtest -> speculative_mprobe.
Revision 1.262: download - view: text, markup, annotated - select for diffs
Thu Sep 4 15:14:48 1997 UTC (14 years, 5 months ago) by davidg
Branches: MAIN
Diff to: previous 1.261: preferred, colored
Changes since revision 1.261: +35 -21 lines
Changed the memory sizing code so that if the following conditions are met: 1) The BIOS indicates that there is exactly 64MB of RAM, and 2) The memory size isn't specified with the MAXMEM option or the npx0 msize hack, ...then do a speculative memory probe beyond the 64MB's until the first bad page is encountered. This is an admitted hack, but should nonetheless deal with detecting the correct amount of memory in nearly all of the modern systems with >64MB of RAM. Also made a change that will cause the list of detected memory chunks to be printed if bootverbose is set.
Revision 1.261: download - view: text, markup, annotated - select for diffs
Tue Sep 2 20:05:28 1997 UTC (14 years, 5 months ago) by bde
Branches: MAIN
Diff to: previous 1.260: preferred, colored
Changes since revision 1.260: +1 -3 lines
Removed unused #includes.
Revision 1.260: download - view: text, markup, annotated - select for diffs
Mon Sep 1 01:54:50 1997 UTC (14 years, 5 months ago) by bde
Branches: MAIN
Diff to: previous 1.259: preferred, colored
Changes since revision 1.259: +4 -1 lines
Move closer to supporting VM86 under SMP. LINT now compiles but doesn't link. Other link-time breakage for LINT is now visible (SMP is incompatible with SIMPLELOCK_DEBUG). Submitted by: jlemon
Revision 1.259: download - view: text, markup, annotated - select for diffs
Sun Aug 31 23:08:27 1997 UTC (14 years, 5 months ago) by bde
Branches: MAIN
Diff to: previous 1.258: preferred, colored
Changes since revision 1.258: +2 -2 lines
Fixed options SHOW_BUSYBUFS and PANIC_REBOOT_WAIT_TIME which were broken by incomplete cutting and pasting from machdep.c to kern_shutdown.c. PR: 3953
Revision 1.258: download - view: text, markup, annotated - select for diffs
Tue Aug 26 18:10:30 1997 UTC (14 years, 5 months ago) by peter
Branches: MAIN
Diff to: previous 1.257: preferred, colored
Changes since revision 1.257: +7 -7 lines
Clean up the SMP AP bootstrap and eliminate the wretched idle procs. - We now have enough per-cpu idle context, the real idle loop has been revived (cpu's halt now with nothing to do). - Some preliminary support for running some operations outside the global lock (eg: zeroing "free but not yet zeroed pages") is present but appears to cause problems. Off by default. - the smp_active sysctl now behaves differently. It's merely a 'true/false' option. Setting smp_active to zero causes the AP's to halt in the idle loop and stop scheduling processes. - bootstrap is a lot safer. Instead of sharing a statically compiled in stack a number of times (which has caused lots of problems) and then abandoning it, we use the idle context to boot the AP's directly. This should help >2 cpu support since the bootlock stuff was in doubt. - print physical apic id in traps.. helps identify private pages getting out of sync. (You don't want to know how much hair I tore out with this!) More cleanup to follow, this is more of a checkpoint than a 'finished' thing.
Revision 1.257: download - view: text, markup, annotated - select for diffs
Thu Aug 21 06:32:38 1997 UTC (14 years, 5 months ago) by charnier
Branches: MAIN
Diff to: previous 1.256: preferred, colored
Changes since revision 1.256: +2 -1 lines
Revert my previous commit about using CS_SECURE macro. Requested by: Bruce.
Revision 1.256: download - view: text, markup, annotated - select for diffs
Mon Aug 18 06:58:09 1997 UTC (14 years, 5 months ago) by charnier
Branches: MAIN
Diff to: previous 1.255: preferred, colored
Changes since revision 1.255: +1 -2 lines
Use CS_SECURE macro. Reviewed by: John Dyson
Revision 1.255: download - view: text, markup, annotated - select for diffs
Sat Aug 9 00:02:40 1997 UTC (14 years, 6 months ago) by dyson
Branches: MAIN
Diff to: previous 1.254: preferred, colored
Changes since revision 1.254: +109 -44 lines
VM86 kernel support. Work done by BSDI, Jonathan Lemon <jlemon@americantv.com>, Mike Smith <msmith@gsoft.com.au>, Sean Eric Fagan <sef@kithrup.com>, and probably alot of others. Submitted by: Jnathan Lemon <jlemon@americantv.com>
Revision 1.254: download - view: text, markup, annotated - select for diffs
Tue Aug 5 00:01:10 1997 UTC (14 years, 6 months ago) by dyson
Branches: MAIN
Diff to: previous 1.253: preferred, colored
Changes since revision 1.253: +3 -1 lines
Get rid of the ad-hoc memory allocator for vm_map_entries, in lieu of a simple, clean zone type allocator. This new allocator will also be used for machine dependent pmap PV entries.
Revision 1.253: download - view: text, markup, annotated - select for diffs
Sun Jul 20 08:37:19 1997 UTC (14 years, 6 months ago) by bde
Branches: MAIN
Diff to: previous 1.252: preferred, colored
Changes since revision 1.252: +1 -7 lines
Removed unused #includes.
Revision 1.252: download - view: text, markup, annotated - select for diffs
Fri Jun 27 18:29:55 1997 UTC (14 years, 7 months ago) by fsmp
Branches: MAIN
CVS tags: old_WOLLMAN_MBUF, old_BP_WOLLMAN_MBUF
Diff to: previous 1.251: preferred, colored
Changes since revision 1.251: +2 -3 lines
Removed '#include <machine/smptests.h>' line, no longer needed.
Revision 1.251: download - view: text, markup, annotated - select for diffs
Sun Jun 22 16:03:10 1997 UTC (14 years, 7 months ago) by peter
Branches: MAIN
Diff to: previous 1.250: preferred, colored
Changes since revision 1.250: +19 -46 lines
Preliminary support for per-cpu data pages. This eliminates a lot of #ifdef SMP type code. Things like _curproc reside in a data page that is unique on each cpu, eliminating the expensive macros like: #define curproc (SMPcurproc[cpunumber()]) There are some unresolved bootstrap and address space sharing issues at present, but Steve is waiting on this for other work. There is still some strictly temporary code present that isn't exactly pretty. This is part of a larger change that has run into some bumps, this part is standalone so it should be safe. The temporary code goes away when the full idle cpu support is finished. Reviewed by: fsmp, dyson
Revision 1.250: download - view: text, markup, annotated - select for diffs
Sun Jun 22 15:47:07 1997 UTC (14 years, 7 months ago) by peter
Branches: MAIN
Diff to: previous 1.249: preferred, colored
Changes since revision 1.249: +1 -18 lines
Kill some stale leftovers from the earlier attempts at SMP per-cpu pages
Revision 1.209.2.11: download - view: text, markup, annotated - select for diffs
Fri Jun 20 10:27:35 1997 UTC (14 years, 7 months ago) by kato
Branches: old_RELENG_2_2
Diff to: previous 1.209.2.10: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.10: +11 -3 lines
Merge revised CPU identification and initialization routine from current. Now, Cyrix 6x86 chip is recognized as Cyrix 6x86 chip.
Revision 1.249: download - view: text, markup, annotated - select for diffs
Sun Jun 15 02:24:06 1997 UTC (14 years, 7 months ago) by wollman
Branches: MAIN
Diff to: previous 1.248: preferred, colored
Changes since revision 1.248: +2 -2 lines
Fix another power down braino.
Revision 1.248: download - view: text, markup, annotated - select for diffs
Sun Jun 15 02:02:27 1997 UTC (14 years, 7 months ago) by wollman
Branches: MAIN
Diff to: previous 1.247: preferred, colored
Changes since revision 1.247: +16 -1 lines
When APM is configured, turn off the power when halting for good.
Revision 1.247: download - view: text, markup, annotated - select for diffs
Sat Jun 7 04:36:09 1997 UTC (14 years, 8 months ago) by bde
Branches: MAIN
Diff to: previous 1.246: preferred, colored
Changes since revision 1.246: +9 -1 lines
Preserve %fs and %gs across context switches. This has a relatively low cost since it is only done in cpu_switch(), not for every exception. The extra state is kept in the pcb, and handled much like the npx state, with similar deficiencies (the state is not preserved across signal handlers, and error handling loses state).
Revision 1.246: download - view: text, markup, annotated - select for diffs
Mon Jun 2 08:19:03 1997 UTC (14 years, 8 months ago) by dfr
Branches: MAIN
Diff to: previous 1.245: preferred, colored
Changes since revision 1.245: +2 -1 lines
Move interrupt handling code from isa.c to a new file. This should make isa.c (slightly) more portable and will make my life developing the really portable version much easier. Reviewed by: peter, fsmp
Revision 1.245: download - view: text, markup, annotated - select for diffs
Mon May 26 18:40:45 1997 UTC (14 years, 8 months ago) by fsmp
Branches: MAIN
Diff to: previous 1.244: preferred, colored
Changes since revision 1.244: +4 -2 lines
Fix breakage from my last commit where mp_start() was missing from UP builds.
Revision 1.244: download - view: text, markup, annotated - select for diffs
Mon May 26 09:23:29 1997 UTC (14 years, 8 months ago) by fsmp
Branches: MAIN
Diff to: previous 1.243: preferred, colored
Changes since revision 1.243: +21 -5 lines
Added a test called 'LATE_START'. This is now the default, it delays most of the MP startup to the function machdep.c:cpu_startup(). It should be possible to move the 2 functions found there (mp_start() & mp_announce()) even further down the path once we know exactly where that should be... Help from: Peter Wemm <peter@spinner.dialix.com.au>
Revision 1.243: download - view: text, markup, annotated - select for diffs
Sat May 24 18:59:02 1997 UTC (14 years, 8 months ago) by fsmp
Branches: MAIN
Diff to: previous 1.242: preferred, colored
Changes since revision 1.242: +4 -6 lines
Delay mp_start() till after the msgbuf is mapped. We really want to delay it till even later but tss setup prevents that right now...
Revision 1.242: download - view: text, markup, annotated - select for diffs
Wed May 21 23:21:27 1997 UTC (14 years, 8 months ago) by jdp
Branches: MAIN
Diff to: previous 1.241: preferred, colored
Changes since revision 1.241: +1 -7 lines
This commit affects ELF kernels only. Remove "setdefs.h" and arrange to generate it automatically at ELF kernel build time. "gensetdefs.c" is a utility which scans a set of ELF object files and outputs a line ``DEFINE_SET(name, length);'' for each linker set that it finds. When generating an ELF kernel, this is run just before the final link to generate "setdefs.h". Remove the init_sets() function from "setdef0.c", and its call from "machdep.c". Since "gensetdefs.c" calculates the length of each set, it is no longer necessary in an ELF kernel to count the set elements at kernel initialization time. Also remove "set_of_sets" which was used for this purpose. Link "setdef0" and "setdef1" into the kernel only if building for ELF. Since init_sets() is no longer used, there is no need to link them into an a.out kernel.
Revision 1.241: download - view: text, markup, annotated - select for diffs
Sun May 11 12:39:43 1997 UTC (14 years, 9 months ago) by bde
Branches: MAIN
Diff to: previous 1.240: preferred, colored
Changes since revision 1.240: +8 -4 lines
Fixed initialization of ldt[]. Unused entries were garbage. A comment was stale. Fixed initialization of gdt[] for the BDE_DEBUGGER case. APM entries clobbered debugger entries if the debugger was loaded (APM is incompatible with BDE_DEBUGGER) and unused entries were garbage if the debugger wasn't loaded.
Revision 1.240: download - view: text, markup, annotated - select for diffs
Wed May 7 20:12:47 1997 UTC (14 years, 9 months ago) by peter
Branches: MAIN
Diff to: previous 1.239: preferred, colored
Changes since revision 1.239: +58 -69 lines
md_regs is struct trapframe * now, rather than int [] Remove TF_REGP() macro and use. The original reason (address space problems due to having UPAGES in mapped into user space) is gone. It looks cleaner without it.
Revision 1.239: download - view: text, markup, annotated - select for diffs
Sat Apr 26 11:45:10 1997 UTC (14 years, 9 months ago) by peter
Branches: MAIN
CVS tags: old_post_smp_merge
Diff to: previous 1.238: preferred, colored
Changes since revision 1.238: +87 -3 lines
Man the liferafts! Here comes the long awaited SMP -> -current merge! There are various options documented in i386/conf/LINT, there is more to come over the next few days. The kernel should run pretty much "as before" without the options to activate SMP mode. There are a handful of known "loose ends" that need to be fixed, but have been put off since the SMP kernel is in a moderately good condition at the moment. This commit is the result of the tinkering and testing over the last 14 months by many people. A special thanks to Steve Passe for implementing the APIC code!
Revision 1.238: download - view: text, markup, annotated - select for diffs
Tue Apr 22 06:55:26 1997 UTC (14 years, 9 months ago) by jdp
Branches: MAIN
CVS tags: old_pre_smp_merge
Diff to: previous 1.237: preferred, colored
Changes since revision 1.237: +7 -1 lines
Make the necessary changes so that an ELF kernel can be built. I have successfully built, booted, and run a number of different ELF kernel configurations, including GENERIC. LINT also builds and links cleanly, though I have not tried to boot it. The impact on developers is virtually nil, except for two things. All linker sets that might possibly be present in the kernel must be listed in "sys/i386/i386/setdefs.h". And all C symbols that are also referenced from assembly language code must be listed in "sys/i386/include/asnames.h". It so happens that failure to do these things will have no impact on the a.out kernel. But it will break the build of the ELF kernel. The ELF bootloader works, but it is not ready to commit quite yet.
Revision 1.237: download - view: text, markup, annotated - select for diffs
Sun Apr 13 04:07:24 1997 UTC (14 years, 10 months ago) by dyson
Branches: MAIN
Diff to: previous 1.236: preferred, colored
Changes since revision 1.236: +3 -1 lines
Decrease the amount of memory allocated for bouncing. This will allow large systems to boot successfully with bounce buffers compiled in. We are now limiting bounce space to 512K. The 8MB allocated for a 512MB system is very bogus -- and that is now fixed.
Revision 1.236: download - view: text, markup, annotated - select for diffs
Mon Apr 7 07:15:50 1997 UTC (14 years, 10 months ago) by peter
Branches: MAIN
Diff to: previous 1.235: preferred, colored
Changes since revision 1.235: +19 -10 lines
The biggie: Get rid of the UPAGES from the top of the per-process address space. (!) Have each process use the kernel stack and pcb in the kvm space. Since the stacks are at a different address, we cannot copy the stack at fork() and allow the child to return up through the function call tree to return to user mode - create a new execution context and have the new process begin executing from cpu_switch() and go to user mode directly. In theory this should speed up fork a bit. Context switch the tss_esp0 pointer in the common tss. This is a lot simpler since than swithching the gdt[GPROC0_SEL].sd.sd_base pointer to each process's tss since the esp0 pointer is a 32 bit pointer, and the sd_base setting is split into three different bit sections at non-aligned boundaries and requires a lot of twiddling to reset. The 8K of memory at the top of the process space is now empty, and unmapped (and unmappable, it's higher than VM_MAXUSER_ADDRESS). Simplity the pmap code to manage process contexts, we no longer have to double map the UPAGES, this simplifies and should measuably speed up fork(). The following parts came from John Dyson: Set PG_G on the UPAGES that are now in kernel context, and invalidate them when swapping them out. Move the upages object (upobj) from the vmspace to the proc structure. Now that the UPAGES (pcb and kernel stack) are out of user space, make rfork(..RFMEM..) do what was intended by sharing the vmspace entirely via reference counting rather than simply inheriting the mappings.
Revision 1.235: download - view: text, markup, annotated - select for diffs
Mon Apr 7 06:45:13 1997 UTC (14 years, 10 months ago) by peter
Branches: MAIN
Diff to: previous 1.234: preferred, colored
Changes since revision 1.234: +8 -10 lines
No longer use an i386tss as the basis of our pcb - it wasn't particularly convenient and makes life difficult for my next commit. We still need an i386tss to point to for the tss slot in the gdt, so we use a common tss shared between all processes. Note that this is going to break debugging until this series of commits is finished. core dumps will change again too. :-( we really need a more modern core dump format that doesn't depend on the pcb/upages. This change makes VM86 mode harder, but the following commits will remove a lot of constraints for the VM86 system, including the possibility of extending the pcb for an IO port map etc. Obtained from: bde
Revision 1.209.2.10: download - view: text, markup, annotated - select for diffs
Thu Apr 3 06:37:31 1997 UTC (14 years, 10 months ago) by davidg
Branches: old_RELENG_2_2
CVS tags: old_RELENG_2_2_2_RELEASE
Diff to: previous 1.209.2.9: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.9: +1 -3 lines
Merged from -current: Killed exech_map and do image header reads in a FS- centric way instead of VM-centric. This appears to fix a hang that Peter was seeing as well as allowing detection of errors during the header read (important for NFS).
Revision 1.234: download - view: text, markup, annotated - select for diffs
Mon Mar 31 11:10:37 1997 UTC (14 years, 10 months ago) by davidg
Branches: MAIN
Diff to: previous 1.233: preferred, colored
Changes since revision 1.233: +1 -3 lines
Changed the way that the exec image header is read to be filesystem- centric rather than VM-centric to fix a problem with errors not being detectable when the header is read. Killed exech_map as a result of these changes. There appears to be no performance difference with this change.
Revision 1.233: download - view: text, markup, annotated - select for diffs
Fri Mar 28 12:37:44 1997 UTC (14 years, 10 months ago) by joerg
Branches: MAIN
Diff to: previous 1.232: preferred, colored
Changes since revision 1.232: +47 -1 lines
Something long overdue: compile inb() and outb() into the kernel as functions if DDB is available. The remaining occurences are usually only inlined and thus not available in DDB. I'm sure Bruce will have 23 additions to these 30 lines of code, but at least it's a starting point. ;-)
Revision 1.232: download - view: text, markup, annotated - select for diffs
Tue Mar 25 23:43:01 1997 UTC (14 years, 10 months ago) by mpp
Branches: MAIN
Diff to: previous 1.231: preferred, colored
Changes since revision 1.231: +2 -2 lines
Change sigreturn() to return EFAULT if it is passed an address outside of the process's address space. Now it matches its man page :-). Closes PR# 2682. Discussed with: bde Submitted by: Jonathan Lemon <jlemon@americantv.com>
Revision 1.231: download - view: text, markup, annotated - select for diffs
Mon Mar 24 11:23:29 1997 UTC (14 years, 10 months ago) by bde
Branches: MAIN
Diff to: previous 1.230: preferred, colored
Changes since revision 1.230: +1 -2 lines
Don't include <sys/ioctl.h> in the kernel. Stage 1: don't include it when it is not used. In most cases, the reasons for including it went away when the special ioctl headers became self-sufficient.
Revision 1.230: download - view: text, markup, annotated - select for diffs
Sat Mar 22 18:52:10 1997 UTC (14 years, 10 months ago) by kato
Branches: MAIN
Diff to: previous 1.229: preferred, colored
Changes since revision 1.229: +11 -3 lines
Improved CPU identification and initialization routines. This supports All Cyrix CPUs, IBM Blue Lightning CPU and NexGen (now AMD) Nx586 CPU, and initialize special registers of Cyrix CPU and msr of IBM Blue Lightning CPU. If revision of Cyrix 6x86 CPU < 2.7, CPU cache is enabled in write-through mode. This can be disabled by kernel configuration options. Reviewed by: Bruce Evans <bde@freebsd.org> and Jordan K. Hubbard <jkh@freebsd.org>
Revision 1.229: download - view: text, markup, annotated - select for diffs
Mon Feb 24 00:37:43 1997 UTC (14 years, 11 months ago) by alex
Branches: MAIN
Diff to: previous 1.228: preferred, colored
Changes since revision 1.228: +3 -3 lines
Typo police.
Revision 1.228: download - view: text, markup, annotated - select for diffs
Sat Feb 22 09:32:26 1997 UTC (14 years, 11 months ago) by peter
Branches: MAIN
Diff to: previous 1.227: preferred, colored
Changes since revision 1.227: +1 -1 lines
Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not ready for it yet.
Revision 1.209.2.9: download - view: text, markup, annotated - select for diffs
Fri Feb 14 01:11:30 1997 UTC (14 years, 11 months ago) by bde
Branches: old_RELENG_2_2
CVS tags: old_RELENG_2_2_1_RELEASE, old_RELENG_2_2_0_RELEASE
Diff to: previous 1.209.2.8: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.8: +28 -7 lines
YAMFC (1.223: don't use magic number 0 in useracc() calls.
1.226: initialize and configure npx stuff better...).
Revision 1.227: download - view: text, markup, annotated - select for diffs
Mon Feb 10 02:06:09 1997 UTC (15 years ago) by dyson
Branches: MAIN
Diff to: previous 1.226: preferred, colored
Changes since revision 1.226: +1 -1 lines
This is the kernel Lite/2 commit. There are some requisite userland changes, so don't expect to be able to run the kernel as-is (very well) without the appropriate Lite/2 userland changes. The system boots and can mount UFS filesystems. Untested: ext2fs, msdosfs, NFS Known problems: Incorrect Berkeley ID strings in some files. Mount_std mounts will not work until the getfsent library routine is changed. Reviewed by: various people Submitted by: Jeffery Hsu <hsu@freebsd.org>
Revision 1.226: download - view: text, markup, annotated - select for diffs
Fri Jan 24 19:01:54 1997 UTC (15 years ago) by bde
Branches: MAIN
Diff to: previous 1.225: preferred, colored
Changes since revision 1.225: +25 -4 lines
Initialize CR0_MP in setregs() in case npx0 is disabled or not configured. Disabling npx0 works right now. Don't reference `npxdriver' if npx0 is not configured. Not configuring npx0 doesn't quite work yet. Don't clear potential non-npx pcb flags in setregs().
Revision 1.209.2.8: download - view: text, markup, annotated - select for diffs
Fri Jan 17 19:28:26 1997 UTC (15 years ago) by davidg
Branches: old_RELENG_2_2
Diff to: previous 1.209.2.7: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.7: +9 -10 lines
Brought in fixes from current: fix for network/map entry alloc panic.
Revision 1.225: download - view: text, markup, annotated - select for diffs
Wed Jan 15 20:45:46 1997 UTC (15 years ago) by davidg
Branches: MAIN
Diff to: previous 1.224: preferred, colored
Changes since revision 1.224: +8 -9 lines
Fix bug related to map entry allocations where a sleep might be attempted when allocating memory for network buffers at interrupt time. This is due to inadequate checking for the new mcl_map. Fixed by merging mb_map and mcl_map into a single mb_map. Reviewed by: wollman
Revision 1.224: download - view: text, markup, annotated - select for diffs
Tue Jan 14 06:38:51 1997 UTC (15 years ago) by jkh
Branches: MAIN
Diff to: previous 1.223: preferred, colored
Changes since revision 1.223: +1 -1 lines
Make the long-awaited change from $Id$ to $FreeBSD$ This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
Revision 1.223: download - view: text, markup, annotated - select for diffs
Sun Dec 29 02:29:41 1996 UTC (15 years, 1 month ago) by dyson
Branches: MAIN
Diff to: previous 1.222: preferred, colored
Changes since revision 1.222: +3 -3 lines
Superficial clean-up of useracc calls. (The useracc usage of B_READ/B_WRITE is bogus anyway.) Might as well make the call prettier anyway.
Revision 1.209.2.7: download - view: text, markup, annotated - select for diffs
Sat Dec 21 18:16:18 1996 UTC (15 years, 1 month ago) by bde
Branches: old_RELENG_2_2
Diff to: previous 1.209.2.6: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.6: +1 -33 lines
YAMFC (moved printing of BIOS geometries to correct place).
Revision 1.222: download - view: text, markup, annotated - select for diffs
Wed Dec 18 15:03:10 1996 UTC (15 years, 1 month ago) by bde
Branches: MAIN
Diff to: previous 1.221: preferred, colored
Changes since revision 1.221: +1 -32 lines
Moved the printing of the BIOS geometries from cpu_startup() into configure() where it always belonged. It was originally slightly misplaced after configure(). Rev.138 left it completely misplaced before the DEVFS, DRIVERS and CONFIGURE sysinits by not moving it together with configure(). Restored the printing of bootinfo.bi_n_bios_used now that it can be nonzero.
Revision 1.221: download - view: text, markup, annotated - select for diffs
Tue Dec 17 04:19:41 1996 UTC (15 years, 1 month ago) by davidg
Branches: MAIN
Diff to: previous 1.220: preferred, colored
Changes since revision 1.220: +2 -2 lines
Fix nbuf calculation /4 -> /8. 2.2 already has it this way. Reviewed by: dyson
Revision 1.209.2.6: download - view: text, markup, annotated - select for diffs
Sun Dec 15 19:25:41 1996 UTC (15 years, 1 month ago) by bde
Branches: old_RELENG_2_2
Diff to: previous 1.209.2.5: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.5: +2 -3 lines
YAMFC (don't clobber the SIGCONT bit in the signal mask in sigreturn()).
Revision 1.209.2.5: download - view: text, markup, annotated - select for diffs
Sun Dec 15 09:54:01 1996 UTC (15 years, 1 month ago) by davidg
Branches: old_RELENG_2_2
Diff to: previous 1.209.2.4: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.4: +6 -6 lines
Merge from -current: John's dynamically-sized buffer changes. Needed to fix msdosfs corruption.
Revision 1.209.2.4: download - view: text, markup, annotated - select for diffs
Sat Dec 14 22:37:51 1996 UTC (15 years, 1 month ago) by jkh
Branches: old_RELENG_2_2
Diff to: previous 1.209.2.3: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.3: +7 -9 lines
Bring in changes for better -c behavior from -current.
Revision 1.220: download - view: text, markup, annotated - select for diffs
Sat Dec 14 22:18:38 1996 UTC (15 years, 1 month ago) by jkh
Branches: MAIN
Diff to: previous 1.219: preferred, colored
Changes since revision 1.219: +7 -9 lines
Make the USERCONFIG_BOOT semantics closer to what was original intended.
Revision 1.209.2.3: download - view: text, markup, annotated - select for diffs
Thu Dec 12 04:30:06 1996 UTC (15 years, 2 months ago) by davidg
Branches: old_RELENG_2_2
Diff to: previous 1.209.2.2: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.2: +2 -2 lines
Partial merge from main branch: make exech_map 16*PAGE_SIZE.
Revision 1.219: download - view: text, markup, annotated - select for diffs
Thu Dec 12 04:20:50 1996 UTC (15 years, 2 months ago) by davidg
Branches: MAIN
Diff to: previous 1.218: preferred, colored
Changes since revision 1.218: +2 -2 lines
Fix allocation for exech_map to be 16*PAGE_SIZE rather than 32*PAGE_SIZE so that it is scaled the same as exec_map (16 concurrent exec'ers).
Revision 1.218: download - view: text, markup, annotated - select for diffs
Wed Dec 11 05:52:15 1996 UTC (15 years, 2 months ago) by dyson
Branches: MAIN
Diff to: previous 1.217: preferred, colored
Changes since revision 1.217: +3 -3 lines
One minor mod to set the limit of nbufs to 2048 from 1536. More important fix to exech_map, it used 32*ARG_MAX, and it should use 32*PAGE_SIZE.
Revision 1.217: download - view: text, markup, annotated - select for diffs
Thu Dec 5 04:28:42 1996 UTC (15 years, 2 months ago) by dyson
Branches: MAIN
Diff to: previous 1.216: preferred, colored
Changes since revision 1.216: +5 -5 lines
Clean-up of the new buffer kva allocation code. Also, there was an error in the !BOUNCE_BUFFERS case.
Revision 1.216: download - view: text, markup, annotated - select for diffs
Sun Dec 1 16:34:05 1996 UTC (15 years, 2 months ago) by bde
Branches: MAIN
Diff to: previous 1.215: preferred, colored
Changes since revision 1.215: +2 -4 lines
Removed all references to b_cylinder (aka b_cylin). It was evil and hasn't been used for a year or two since disksort() started sorting on b_pblkno.
Revision 1.215: download - view: text, markup, annotated - select for diffs
Sun Dec 1 15:46:40 1996 UTC (15 years, 2 months ago) by dyson
Branches: MAIN
Diff to: previous 1.214: preferred, colored
Changes since revision 1.214: +3 -3 lines
Fix a problem with the new buffer_map management code. Additionally, decrease the size of buffer_map to approx 2/3 of what it used to be (buffer_map can be smaller now.) The original commit of these changes increased the size of buffer_map to the point where the system would not boot on large systems -- now large systems with large caches will have even less problems than before.
Revision 1.214: download - view: text, markup, annotated - select for diffs
Fri Nov 29 13:19:26 1996 UTC (15 years, 2 months ago) by bde
Branches: MAIN
Diff to: previous 1.213: preferred, colored
Changes since revision 1.213: +1 -2 lines
Don't print bootinfo.bi_n_bios_used in cpu_startup() since it is always zero because no drivers have had a chance to change it.
Revision 1.213: download - view: text, markup, annotated - select for diffs
Fri Nov 29 13:12:14 1996 UTC (15 years, 2 months ago) by bde
Branches: MAIN
Diff to: previous 1.212: preferred, colored
Changes since revision 1.212: +2 -3 lines
Don't clobber the SIGCONT bit in the signal mask in sigreturn(). Use the `sigcantmask' macro to get the correct set of unmaskable signals. Found by: NIST-PCTS.
Revision 1.212: download - view: text, markup, annotated - select for diffs
Sun Nov 17 02:11:01 1996 UTC (15 years, 2 months ago) by dyson
Branches: MAIN
Diff to: previous 1.211: preferred, colored
Changes since revision 1.211: +3 -3 lines
Improve the caching of small files like directories, while not substantially increasing buffer space. Specifically, we double the number of buffers, but allocate only half the amount of memory per buffer. Note that VDIR files aren't cached unless instantiated in a buffer. This will significantly improve caching.
Revision 1.128.4.10: download - view: text, markup, annotated - select for diffs
Wed Nov 13 12:03:17 1996 UTC (15 years, 3 months ago) by jkh
Branches: old_RELENG_2_1_0
CVS tags: old_RELENG_2_1_7_RELEASE, old_RELENG_2_1_6_RELEASE, old_RELENG_2_1_6_1_RELEASE
Diff to: previous 1.128.4.9: preferred, colored; branchpoint 1.128: preferred, colored
Changes since revision 1.128.4.9: +8 -3 lines
Merge more robust userconfig selection behavior from -current.
Revision 1.209.2.2: download - view: text, markup, annotated - select for diffs
Tue Nov 12 09:07:57 1996 UTC (15 years, 3 months ago) by phk
Branches: old_RELENG_2_2
Diff to: previous 1.209.2.1: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.1: +6 -1 lines
Mega-merge from -current
Revision 1.211: download - view: text, markup, annotated - select for diffs
Mon Nov 11 20:38:52 1996 UTC (15 years, 3 months ago) by bde
Branches: MAIN
Diff to: previous 1.210: preferred, colored
Changes since revision 1.210: +6 -1 lines
Replaced I586_OPTIMIZED_BCOPY and I586_OPTIMIZED_BZERO with boot-time negative-logic flags (flags 0x01 and 0x02 for npx0, defaulting to unset = on). This changes the default from off to on. The options have been in current for several months with no problems reported. Added a boot-time negative-logic flag for the old I5886_FAST_BCOPY option which went away too soon (flag 0x04 for npx0, defaulting to unset = on). Added a boot-time way to set the memory size (iosiz in config, iosize in userconfig for npx0). LINT: Removed old options. Documented npx0's flags and iosiz. options.i386: Removed old options. identcpu.c: Don't set the function pointers here. Setting them has to be delayed until after userconfig has had a chance to disable them and until after a good npx0 has been detected. machdep.c: Use npx0's iosize instead of MAXMEM if it is nonzero. support.s: Added vectors and glue code for copyin() and copyout(). Fixed ifdefs for i586_bzero(). Added ifdefs for i586_bcopy(). npx.c: Set the function pointers here. Clear hw_float when an npx exists but is too broken to use. Restored style from a year or three ago in npxattach().
Revision 1.209.2.1: download - view: text, markup, annotated - select for diffs
Thu Nov 7 14:45:35 1996 UTC (15 years, 3 months ago) by joerg
Branches: old_RELENG_2_2
Diff to: previous 1.209: preferred, colored
Changes since revision 1.209: +8 -12 lines
Merge Bruce's fixes for the message buffer mapping. Reviewed by: davidg Submitted by: bde
Revision 1.210: download - view: text, markup, annotated - select for diffs
Thu Nov 7 14:43:59 1996 UTC (15 years, 3 months ago) by joerg
Branches: MAIN
Diff to: previous 1.209: preferred, colored
Changes since revision 1.209: +8 -12 lines
Fix the message buffer mapping. This actually allows to increase the message buffer size in <sys/msgbuf.h>. Reviewed by: davidg,joerg Submitted by: bde
Revision 1.209: download - view: text, markup, annotated - select for diffs
Thu Oct 31 00:57:25 1996 UTC (15 years, 3 months ago) by julian
Branches: MAIN
CVS tags: old_RELENG_2_2_BP
Branch point for: old_RELENG_2_2
Diff to: previous 1.208: preferred, colored
Changes since revision 1.208: +11 -1 lines
Further improved version of hadling a HALT when there is no console.
Revision 1.208: download - view: text, markup, annotated - select for diffs
Sun Oct 20 18:35:32 1996 UTC (15 years, 3 months ago) by phk
Branches: MAIN
Diff to: previous 1.207: preferred, colored
Changes since revision 1.207: +1 -7 lines
Removing old isdn stuff.
Revision 1.128.4.9: download - view: text, markup, annotated - select for diffs
Wed Oct 16 02:16:00 1996 UTC (15 years, 3 months ago) by jkh
Branches: old_RELENG_2_1_0
Diff to: previous 1.128.4.8: preferred, colored; branchpoint 1.128: preferred, colored
Changes since revision 1.128.4.8: +5 -1 lines
Merge boot changes from HEAD to sync with sysinstall.
Revision 1.207: download - view: text, markup, annotated - select for diffs
Sat Oct 5 10:44:03 1996 UTC (15 years, 4 months ago) by jkh
Branches: MAIN
Diff to: previous 1.206: preferred, colored
Changes since revision 1.206: +5 -1 lines
Multiple changes stacked as one commit since they all depend on one another. First, change sysinstall and the Makefile rules to not build the kernel nlist directly into sysinstall now. Instead, spit it out as an ascii file in /stand and parse it from sysinstall later. This solves the chicken-n- egg problem of building sysinstall into the fsimage before BOOTMFS is built and can have its symbols extracted. Now we generate the symbol file in release.8. Second, add Poul-Henning's USERCONFIG_BOOT changes. These have two effects: 1. Userconfig is always entered, rather than only after a -c (don't scream yet, it's not as bad as it sounds). 2. Userconfig reads a message string which can optionally be written just past the boot blocks. This string "preloads" the userconfig input buffer and is parsed as user input. If the first command is not "USERCONFIG", userconfig will treat this as an implied "quit" (which is why you don't need to scream - you never even know you went through userconfig and back out again if you don't specifically ask for it), otherwise it will read and execute the following commands until a "quit" is seen or the end is reached, in which case the normal userconfig command prompt will then be presented. How to create your own startup sequences, using any boot.flp image from the next snap forward (not yet, but soon): % dd of=/dev/rfd0 seek=1 bs=512 count=1 conv=sync <<WAKKA_WAKKA_DOO USERCONFIG irq ed0 10 iomem ed0 0xcc000 disable ed1 quit WAKKA_WAKKA_DOO Third, add an intro screen to UserConfig so that users aren't just thrown into this strange screen if userconfig is auto-launched. The default boot.flp startup sequence is now, in fact, this: USERCONFIG intro visual (Since visual never returns, we don't need a following "quit"). Submitted-By: phk & jkh
Revision 1.206: download - view: text, markup, annotated - select for diffs
Sat Sep 28 22:37:33 1996 UTC (15 years, 4 months ago) by dyson
Branches: MAIN
Diff to: previous 1.205: preferred, colored
Changes since revision 1.205: +3 -3 lines
Essentially rename pmap_update to be invltlb. It is a very machine dependent operation, and not really a correct name. invltlb and invlpg are more descriptive, and in the case of invlpg, a real opcode. Additionally, fix the tlb management code for 386 machines.
Revision 1.205: download - view: text, markup, annotated - select for diffs
Fri Sep 27 13:38:02 1996 UTC (15 years, 4 months ago) by peter
Branches: MAIN
Diff to: previous 1.204: preferred, colored
Changes since revision 1.204: +4 -1 lines
part 2 of the bsdi compat tweak attempt. I believe that BSDI use both lcall 7,0 (ie: ldt slot 0) and lcall 0x87,0 (ldt slot 16, it's shifted three bits to the left). I was fiddling with this so long ago, I don't recall the specifics.
Revision 1.204: download - view: text, markup, annotated - select for diffs
Wed Sep 11 19:53:43 1996 UTC (15 years, 5 months ago) by phk
Branches: MAIN
Diff to: previous 1.203: preferred, colored
Changes since revision 1.203: +6 -1 lines
Make userconfig two (default: on) options: USERCONFIG to enable VISUAL_USERCONFIG to get the gui stuff too. Requested by: pst
Revision 1.203: download - view: text, markup, annotated - select for diffs
Tue Sep 10 23:06:58 1996 UTC (15 years, 5 months ago) by bde
Branches: MAIN
Diff to: previous 1.202: preferred, colored
Changes since revision 1.202: +1 -12 lines
Removed bogus LARGMEM code and option. The code paniced when biosextmem > 65536, but biosextmem is a 16-bit quantity so it is guaranteed to be < 65536. Related cruft for biosbasemem was mostly cleaned up in rev.1.26.
Revision 1.202: download - view: text, markup, annotated - select for diffs
Fri Sep 6 23:07:03 1996 UTC (15 years, 5 months ago) by phk
Branches: MAIN
Diff to: previous 1.201: preferred, colored
Changes since revision 1.201: +1 -9 lines
Remove devconf, it never grew up to be of any use.
Revision 1.201: download - view: text, markup, annotated - select for diffs
Tue Sep 3 18:50:36 1996 UTC (15 years, 5 months ago) by nate
Branches: MAIN
Diff to: previous 1.200: preferred, colored
Changes since revision 1.200: +48 -30 lines
Cleaned up version of my 'extended BIOS' patch. This one is commented better and much simpler to understand, and works just as well (better) as a bonus. Submitted by: bde
Revision 1.200: download - view: text, markup, annotated - select for diffs
Sun Sep 1 02:16:07 1996 UTC (15 years, 5 months ago) by nate
Branches: MAIN
Diff to: previous 1.199: preferred, colored
Changes since revision 1.199: +33 -6 lines
If the basemem value supplied by the bootblocks, differs from the value returned by the RTC, use the bootblock supplied value. Also, map the 'stolen by BIOS' memory in the same manner as the ISA-hole memory, since it is really an extenstion of the BIOS. This is necessary for 32-bit BIOS functions such as APM support on laptops, and the loss of memory for non-necessary functions seems to be at most 4k. Reviewed by: phk Obtained from: email conversation with jtk@atria.com
Revision 1.199: download - view: text, markup, annotated - select for diffs
Mon Aug 19 20:06:52 1996 UTC (15 years, 5 months ago) by julian
Branches: MAIN
Diff to: previous 1.198: preferred, colored
Changes since revision 1.198: +6 -160 lines
Collect all the functioons concerned with rebooting into one place also add the at_shutdown callout list, and change the one user of the present (broken) method (the vn driver) to use the new scheme.
Revision 1.198: download - view: text, markup, annotated - select for diffs
Mon Aug 12 20:03:16 1996 UTC (15 years, 6 months ago) by wollman
Branches: MAIN
Diff to: previous 1.197: preferred, colored
Changes since revision 1.197: +40 -0 lines
Back out mistaken local change that sneaked in on the last commit.
Revision 1.197: download - view: text, markup, annotated - select for diffs
Mon Aug 12 19:57:09 1996 UTC (15 years, 6 months ago) by wollman
Branches: MAIN
Diff to: previous 1.196: preferred, colored
Changes since revision 1.196: +1 -41 lines
Don't declare the user_ldt functions unless USER_LDT is defined. Eliminates an obnoxious warning.
Revision 1.196: download - view: text, markup, annotated - select for diffs
Sun Aug 11 17:41:24 1996 UTC (15 years, 6 months ago) by davidg
Branches: MAIN
Diff to: previous 1.195: preferred, colored
Changes since revision 1.195: +3 -2 lines
Add support for i686 machine check trap.
Revision 1.195: download - view: text, markup, annotated - select for diffs
Fri Jul 12 06:09:49 1996 UTC (15 years, 7 months ago) by bde
Branches: MAIN
Diff to: previous 1.194: preferred, colored
Changes since revision 1.194: +4 -3 lines
Export `dumpmag' to utilities but not to the kernel. Restored a truncated comment.
Revision 1.194: download - view: text, markup, annotated - select for diffs
Mon Jul 8 19:44:39 1996 UTC (15 years, 7 months ago) by wollman
Branches: MAIN
Diff to: previous 1.193: preferred, colored
Changes since revision 1.193: +7 -195 lines
Fix something that's been bugging me for a long time: move the CPU type identification code out of machdep.c and into a new file of its own. Hopefully other grot can be moved out of machdep.c as well (by other people) into more descriptively-named files.
Revision 1.128.4.8: download - view: text, markup, annotated - select for diffs
Tue Jun 25 20:19:29 1996 UTC (15 years, 7 months ago) by markm
Branches: old_RELENG_2_1_0
CVS tags: old_RELENG_2_1_5_RELEASE
Diff to: previous 1.128.4.7: preferred, colored; branchpoint 1.128: preferred, colored
Changes since revision 1.128.4.7: +3 -1 lines
Merge with HEAD - bring in /dev/random
Revision 1.193: download - view: text, markup, annotated - select for diffs
Tue Jun 18 01:22:04 1996 UTC (15 years, 7 months ago) by bde
Branches: MAIN
Diff to: previous 1.192: preferred, colored
Changes since revision 1.192: +1 -3 lines
Removed unused #includes of <i386/isa/icu.h> and <i386/isa/icu.h>. icu.h is only used by the icu support modules and by a few drivers that know too much about the icu (most only use it to convert `n' to `IRQn'). isa.h is only used by ioconf.c and by a few drivers that know too much about isa addresses (a few have to, because config is deficient).
Revision 1.192: download - view: text, markup, annotated - select for diffs
Sat Jun 8 11:03:01 1996 UTC (15 years, 8 months ago) by bde
Branches: MAIN
Diff to: previous 1.191: preferred, colored
Changes since revision 1.191: +3 -3 lines
Stop using the alias `pcb_ptd' for `pcb_tcc.tss_cr3'. Use the (existing) alias `pcb_cr3' instead. That is still one alias too many, but is convenient for me since I've replaced the tss in the pcb by a few scalar variables in the pcb.
Revision 1.191: download - view: text, markup, annotated - select for diffs
Sat May 18 03:36:07 1996 UTC (15 years, 8 months ago) by dyson
Branches: MAIN
Diff to: previous 1.190: preferred, colored
Changes since revision 1.190: +3 -1 lines
This set of commits to the VM system does the following, and contain contributions or ideas from Stephen McKay <syssgm@devetir.qld.gov.au>, Alan Cox <alc@cs.rice.edu>, David Greenman <davidg@freebsd.org> and me: More usage of the TAILQ macros. Additional minor fix to queue.h. Performance enhancements to the pageout daemon. Addition of a wait in the case that the pageout daemon has to run immediately. Slightly modify the pageout algorithm. Significant revamp of the pmap/fork code: 1) PTE's and UPAGES's are NO LONGER in the process's map. 2) PTE's and UPAGES's reside in their own objects. 3) TOTAL elimination of recursive page table pagefaults. 4) The page directory now resides in the PTE object. 5) Implemented pmap_copy, thereby speeding up fork time. 6) Changed the pv entries so that the head is a pointer and not an entire entry. 7) Significant cleanup of pmap_protect, and pmap_remove. 8) Removed significant amounts of machine dependent fork code from vm_glue. Pushed much of that code into the machine dependent pmap module. 9) Support more completely the reuse of already zeroed pages (Page table pages and page directories) as being already zeroed. Performance and code cleanups in vm_map: 1) Improved and simplified allocation of map entries. 2) Improved vm_map_copy code. 3) Corrected some minor problems in the simplify code. Implemented splvm (combo of splbio and splimp.) The VM code now seldom uses splhigh. Improved the speed of and simplified kmem_malloc. Minor mod to vm_fault to avoid using pre-zeroed pages in the case of objects with backing objects along with the already existant condition of having a vnode. (If there is a backing object, there will likely be a COW... With a COW, it isn't necessary to start with a pre-zeroed page.) Minor reorg of source to perhaps improve locality of ref.
Revision 1.190: download - view: text, markup, annotated - select for diffs
Fri May 10 19:28:44 1996 UTC (15 years, 9 months ago) by wollman
Branches: MAIN
Diff to: previous 1.189: preferred, colored
Changes since revision 1.189: +9 -2 lines
Allocate mbufs from a separate submap so that NMBCLUSTERS works as expected.
Revision 1.189: download - view: text, markup, annotated - select for diffs
Fri May 3 21:00:53 1996 UTC (15 years, 9 months ago) by phk
Branches: MAIN
Diff to: previous 1.188: preferred, colored
Changes since revision 1.188: +2 -2 lines
Another sweep over the pmap/vm macros, this time with more focus on the usage. I'm not satisfied with the naming, but now at least there is less bogus stuff around.
Revision 1.188: download - view: text, markup, annotated - select for diffs
Thu May 2 22:24:57 1996 UTC (15 years, 9 months ago) by phk
Branches: MAIN
Diff to: previous 1.187: preferred, colored
Changes since revision 1.187: +5 -2 lines
Move atdevbase out of locore.s and into machdep.c Macroize locore.s' page table setup even more, now it's almost readable. Rename PG_U to PG_A (so that I can...) Rename PG_u to PG_U. "PG_u" was just too ugly... Remove some unused vars in pmap.c Remove PG_KR and PG_KW Remove SSIZE Remove SINCR Remove BTOPKERNBASE This concludes my spring cleaning, modulus any bug fixes for messes I have made on the way. (Funny to be back here in pmap.c, that's where my first significant contribution to 386BSD was... :-)
Revision 1.187: download - view: text, markup, annotated - select for diffs
Thu May 2 14:19:47 1996 UTC (15 years, 9 months ago) by phk
Branches: MAIN
Diff to: previous 1.186: preferred, colored
Changes since revision 1.186: +8 -8 lines
removed:
CLBYTES PD_SHIFT PGSHIFT NBPG PGOFSET CLSIZELOG2 CLSIZE pdei()
ptei() kvtopte() ptetov() ispt() ptetoav() &c &c
new:
NPDEPG
Major macro cleanup.
Revision 1.186: download - view: text, markup, annotated - select for diffs
Wed May 1 08:38:36 1996 UTC (15 years, 9 months ago) by bde
Branches: MAIN
Diff to: previous 1.185: preferred, colored
Changes since revision 1.185: +2 -2 lines
Added calibration the i8254 and the i586 clocks agains the RTC at boot time. The results are currently ignored unless certain temporary options are used. Added sysctls to support reading and writing the clock frequency variables (not the frequencies themselves). Writing is supposed to atomically adjust all related variables. machdep.c: Fixed spelling of a function name in a comment so that I can log this message which should have been with the previous commit. Initialize `cpu_class' earlier so that it can be used in startrtclock() instead of in calibrate_cyclecounter() (which no longer exists). Removed range checking of `cpu'. It is always initialized to CPU_XXX so it is less likely to be out of bounds than most variables. clock.h: Removed I586_CYCLECTR(). Use rdtsc() instead. clock.c: TIMER_FREQ is now a variable timer_freq that defaults to the old value of TIMER_FREQ. #define'ing TIMER_FREQ should still work and may be the best way of setting the frequency. Calibration involves counting cycles while watching the RTC for one second. This gives values correct to within (a few ppm) + (the innaccuracy of the RTC) on my systems.
Revision 1.185: download - view: text, markup, annotated - select for diffs
Wed May 1 08:31:21 1996 UTC (15 years, 9 months ago) by bde
Branches: MAIN
Diff to: previous 1.184: preferred, colored
Changes since revision 1.184: +3 -14 lines
i386/machdep.c include/clock.h isa/clock.c
Revision 1.184: download - view: text, markup, annotated - select for diffs
Fri Apr 26 13:47:39 1996 UTC (15 years, 9 months ago) by phk
Branches: MAIN
Diff to: previous 1.183: preferred, colored
Changes since revision 1.183: +2 -1 lines
A significant debogofication of locore.s. I havn't found any actualy bugs, but it is a lot easier to navigate this twisted code now.
Revision 1.183: download - view: text, markup, annotated - select for diffs
Thu Apr 25 06:20:10 1996 UTC (15 years, 9 months ago) by phk
Branches: MAIN
Diff to: previous 1.182: preferred, colored
Changes since revision 1.182: +2 -3 lines
Fix cpu_fork for real. Suggested by: bde
Revision 1.182: download - view: text, markup, annotated - select for diffs
Fri Apr 19 07:27:57 1996 UTC (15 years, 9 months ago) by phk
Branches: MAIN
Diff to: previous 1.181: preferred, colored
Changes since revision 1.181: +3 -2 lines
savectx returns through cpu_switch in case of the child, so it must return void just like cpu_switch. Fix prototype and usage from machdep.c
Revision 1.181: download - view: text, markup, annotated - select for diffs
Sat Apr 6 01:06:04 1996 UTC (15 years, 10 months ago) by davidg
Branches: MAIN
Diff to: previous 1.180: preferred, colored
Changes since revision 1.180: +1 -3 lines
Switch 586/686 back to generic_bzero and #if 0'd the "optimized" code. It turns out that it actually reduces performance in real-world cases. Noticed by: bde
Revision 1.180: download - view: text, markup, annotated - select for diffs
Fri Apr 5 03:36:02 1996 UTC (15 years, 10 months ago) by ache
Branches: MAIN
Diff to: previous 1.179: preferred, colored
Changes since revision 1.179: +4 -1 lines
Add wall_cmos_clock sysctl variable, needed to manage adjkerntz even for UTC cmos clocks (needed for Local Timezone FSes)
Revision 1.179.2.1: download - view: text, markup, annotated - select for diffs
Mon Apr 1 18:58:47 1996 UTC (15 years, 10 months ago) by wollman
Branches: old_wollman_polling
Diff to: previous 1.179: preferred, colored; next MAIN 1.180: preferred, colored
Changes since revision 1.179: +1 -40 lines
These are (mostly) my changes for polling of network interrupts, on a private branch. Some of these changes are generally applicable, but most of this is to show other people what I'm up to (and what they need to be prepared for).
Revision 1.179: download - view: text, markup, annotated - select for diffs
Tue Mar 26 19:57:51 1996 UTC (15 years, 10 months ago) by wollman
Branches: MAIN
Branch point for: old_wollman_polling
Diff to: previous 1.178: preferred, colored
Changes since revision 1.178: +8 -1 lines
Add support for Pentium and Pentium Pro performance counters. (This code is as yet untested; to come after man page is written.) This also adds inlines to cpufunc.h for the RDTSC, RDMSR, WRMSR, and RDPMC instructions. The user-mode interface is via a subdevice of mem.c; there is also a kernel-size interface which might be used to aid profiling.
Revision 1.178: download - view: text, markup, annotated - select for diffs
Mon Mar 11 02:21:42 1996 UTC (15 years, 11 months ago) by hsu
Branches: MAIN
Diff to: previous 1.177: preferred, colored
Changes since revision 1.177: +2 -2 lines
Change type of code argument to sendsig from unsigned to u_long to make it consistent w/ signalvar.h and kern_sig.c. Reviewed by: davidg & bde
Revision 1.177: download - view: text, markup, annotated - select for diffs
Sun Mar 3 01:57:43 1996 UTC (15 years, 11 months ago) by jkh
Branches: MAIN
Diff to: previous 1.176: preferred, colored
Changes since revision 1.176: +14 -1 lines
USER_LDT changes for the Willows TwinXPDK toolkit. Only tested with WINE since that's the only other USER_LDT using code that I know of. Submitted by: Gary Jennejohn <Gary.Jennejohn@munich.netsurf.de> Obtained from: {Origin of diffs may be someone else - I only rec'd them from Gary}
Revision 1.176: download - view: text, markup, annotated - select for diffs
Sat Mar 2 19:37:39 1996 UTC (15 years, 11 months ago) by peter
Branches: MAIN
Diff to: previous 1.175: preferred, colored
Changes since revision 1.175: +13 -26 lines
Mega-commit for Linux emulator update.. This has been stress tested under netscape-2.0 for Linux running all the Java stuff. The scrollbars are now working, at least on my machine. (whew! :-) I'm uncomfortable with the size of this commit, but it's too inter-dependant to easily seperate out. The main changes: COMPAT_LINUX is *GONE*. Most of the code has been moved out of the i386 machine dependent section into the linux emulator itself. The int 0x80 syscall code was almost identical to the lcall 7,0 code and a minor tweak allows them to both be used with the same C code. All kernels can now just modload the lkm and it'll DTRT without having to rebuild the kernel first. Like IBCS2, you can statically compile it in with "options LINUX". A pile of new syscalls implemented, including getdents(), llseek(), readv(), writev(), msync(), personality(). The Linux-ELF libraries want to use some of these. linux_select() now obeys Linux semantics, ie: returns the time remaining of the timeout value rather than leaving it the original value. Quite a few bugs removed, including incorrect arguments being used in syscalls.. eg: mixups between passing the sigset as an int, vs passing it as a pointer and doing a copyin(), missing return values, unhandled cases, SIOC* ioctls, etc. The build for the code has changed. i386/conf/files now knows how to build linux_genassym and generate linux_assym.h on the fly. Supporting changes elsewhere in the kernel: The user-mode signal trampoline has moved from the U area to immediately below the top of the stack (below PS_STRINGS). This allows the different binary emulations to have their own signal trampoline code (which gets rid of the hardwired syscall 103 (sigreturn on BSD, syslog on Linux)) and so that the emulator can provide the exact "struct sigcontext *" argument to the program's signal handlers. The sigstack's "ss_flags" now uses SS_DISABLE and SS_ONSTACK flags, which have the same values as the re-used SA_DISABLE and SA_ONSTACK which are intended for sigaction only. This enables the support of a SA_RESETHAND flag to sigaction to implement the gross SYSV and Linux SA_ONESHOT signal semantics where the signal handler is reset when it's triggered. makesyscalls.sh no longer appends the struct sysentvec on the end of the generated init_sysent.c code. It's a lot saner to have it in a seperate file rather than trying to update the structure inside the awk script. :-) At exec time, the dozen bytes or so of signal trampoline code are copied to the top of the user's stack, rather than obtaining the trampoline code the old way by getting a clone of the parent's user area. This allows Linux and native binaries to freely exec each other without getting trampolines mixed up.
Revision 1.175: download - view: text, markup, annotated - select for diffs
Sat Mar 2 18:24:00 1996 UTC (15 years, 11 months ago) by peter
Branches: MAIN
Diff to: previous 1.174: preferred, colored
Changes since revision 1.174: +2 -1 lines
Add more options into the conf/options and i386/conf/options.i386 files and the #include hooks so that 'make depend' is more useful. This covers most of the options I regularly use (but not all) and some other easy ones.
Revision 1.128.4.7: download - view: text, markup, annotated - select for diffs
Tue Feb 13 10:33:12 1996 UTC (16 years ago) by phk
Branches: old_RELENG_2_1_0
Diff to: previous 1.128.4.6: preferred, colored; branchpoint 1.128: preferred, colored
Changes since revision 1.128.4.6: +20 -3 lines
Fix & Update printing of CPU features.
Revision 1.174: download - view: text, markup, annotated - select for diffs
Tue Feb 13 10:30:36 1996 UTC (16 years ago) by phk
Branches: MAIN
Diff to: previous 1.173: preferred, colored
Changes since revision 1.173: +20 -3 lines
Correct & Update the printing of CPU features. We have printed rubbish since version 1.117 when Garrett made the switch to %b. Updated to reflect Intel AP-485 (241618-004).
Revision 1.128.4.6: download - view: text, markup, annotated - select for diffs
Mon Jan 29 12:28:22 1996 UTC (16 years ago) by davidg
Branches: old_RELENG_2_1_0
Diff to: previous 1.128.4.5: preferred, colored; branchpoint 1.128: preferred, colored
Changes since revision 1.128.4.5: +2 -2 lines
Brought in changes from rev 1.26 of swtch.s and related changes: bugfix for savectx() returning garbage in %eax for the child.
Revision 1.173: download - view: text, markup, annotated - select for diffs
Sat Jan 27 02:33:08 1996 UTC (16 years ago) by bde
Branches: MAIN
Diff to: previous 1.172: preferred, colored
Changes since revision 1.172: +1 -9 lines
Allocate DMA bounce buffers only when requested by drivers. Only the fd and wt drivers need bounce buffers, so this normally saves 32K-1K of kernel memory. Keep track of which DMA channels are busy. isa_dmadone() must now be called when DMA has finished or been aborted. Panic for unallocated and too-small (required) bounce buffers. fd.c: There will be new warnings about isa_dmadone() not being called after DMA has been aborted. sound/dmabuf.c: isa_dmadone() needs more parameters than are available, so temporarily use a new interface isa_dmadone_nobounce() to avoid having to worry about panics for fake parameters. Untested.
Revision 1.172: download - view: text, markup, annotated - select for diffs
Tue Jan 23 02:39:12 1996 UTC (16 years ago) by davidg
Branches: MAIN
Diff to: previous 1.171: preferred, colored
Changes since revision 1.171: +2 -2 lines
Simplified savectx() a little and fixed a bug that caused it to return garbage in the child process rather than "1" like it is supposed to. Reviewed by: bde
Revision 1.171: download - view: text, markup, annotated - select for diffs
Sun Jan 21 20:57:03 1996 UTC (16 years ago) by joerg
Branches: MAIN
Diff to: previous 1.170: preferred, colored
Changes since revision 1.170: +2 -2 lines
Initialize the cpu_class variable. This prevents i386 machines from panicing with a privileged instruction fault early at boot time. Submitted by: rock@wurzelausix.CS.Uni-SB.DE (D. Rock)
Revision 1.170: download - view: text, markup, annotated - select for diffs
Fri Jan 19 03:57:38 1996 UTC (16 years ago) by dyson
Branches: MAIN
Diff to: previous 1.169: preferred, colored
Changes since revision 1.169: +2 -2 lines
Eliminated many redundant vm_map_lookup operations for vm_mmap. Speed up for vfs_bio -- addition of a routine bqrelse to greatly diminish overhead for merged cache. Efficiency improvement for vfs_cluster. It used to do alot of redundant calls to cluster_rbuild. Correct the ordering for vrele of .text and release of credentials. Use the selective tlb update for 486/586/P6. Numerous fixes to the size of objects allocated for files. Additionally, fixes in the various pagers. Fixes for proper positioning of vnode_pager_setsize in msdosfs and ext2fs. Fixes in the swap pager for exhausted resources. The pageout code will not as readily thrash. Change the page queue flags (PG_ACTIVE, PG_INACTIVE, PG_FREE, PG_CACHE) into page queue indices (PQ_ACTIVE, PQ_INACTIVE, PQ_FREE, PQ_CACHE), thereby improving efficiency of several routines. Eliminate even more unnecessary vm_page_protect operations. Significantly speed up process forks. Make vm_object_page_clean more efficient, thereby eliminating the pause that happens every 30seconds. Make sequential clustered writes B_ASYNC instead of B_DELWRI even in the case of filesystems mounted async. Fix a panic with busy pages when write clustering is done for non-VMIO buffers.
Revision 1.128.4.5: download - view: text, markup, annotated - select for diffs
Sat Jan 13 10:46:27 1996 UTC (16 years, 1 month ago) by davidg
Branches: old_RELENG_2_1_0
Diff to: previous 1.128.4.4: preferred, colored; branchpoint 1.128: preferred, colored
Changes since revision 1.128.4.4: +46 -30 lines
Retrofitted my double-fault handler changes from -current. These are too important to leave out of the next release.
Revision 1.169: download - view: text, markup, annotated - select for diffs
Fri Jan 5 20:12:19 1996 UTC (16 years, 1 month ago) by wollman
Branches: MAIN
Diff to: previous 1.168: preferred, colored
Changes since revision 1.168: +2 -1 lines
Convert BOUNCE_BUFFERS and BOUNCEPAGES to new option scheme.
Revision 1.168: download - view: text, markup, annotated - select for diffs
Thu Jan 4 21:10:53 1996 UTC (16 years, 1 month ago) by wollman
Branches: MAIN
Diff to: previous 1.167: preferred, colored
Changes since revision 1.167: +1 -0 lines
Convert DDB to new-style option.
Revision 1.167: download - view: text, markup, annotated - select for diffs
Thu Jan 4 20:28:31 1996 UTC (16 years, 1 month ago) by wollman
Branches: MAIN
Diff to: previous 1.166: preferred, colored
Changes since revision 1.166: +2 -1 lines
Convert SYSV IPC to new-style options. (I hope I got everything...) The LKMs will need an extra file, to come later.
Revision 1.166: download - view: text, markup, annotated - select for diffs
Sat Dec 30 23:13:32 1995 UTC (16 years, 1 month ago) by davidg
Branches: MAIN
Diff to: previous 1.165: preferred, colored
Changes since revision 1.165: +9 -9 lines
In memory test, cast pointer as "volatile int *", not "int *" to make sure that gcc doesn't cache the value used in the test. Pointed out by Erich Boleyn <erich@uruk.org>.
Revision 1.165: download - view: text, markup, annotated - select for diffs
Thu Dec 28 23:14:35 1995 UTC (16 years, 1 month ago) by davidg
Branches: MAIN
Diff to: previous 1.164: preferred, colored
Changes since revision 1.164: +8 -1 lines
Made bzero a function vector and added a 586/686 optimized version of bzero. Deprecated blkclr (removed it). Removed some old cruft from cpufunc.h. The optimized bzero was submitted by Torbjorn Granlund <tege@matematik.su.se> The kernel adaption and other changes by me.
Revision 1.164: download - view: text, markup, annotated - select for diffs
Mon Dec 25 01:02:32 1995 UTC (16 years, 1 month ago) by davidg
Branches: MAIN
Diff to: previous 1.163: preferred, colored
Changes since revision 1.163: +2 -2 lines
Fix typo in CPUCLASS.
Revision 1.163: download - view: text, markup, annotated - select for diffs
Sun Dec 24 08:10:41 1995 UTC (16 years, 1 month ago) by davidg
Branches: MAIN
Diff to: previous 1.162: preferred, colored
Changes since revision 1.162: +30 -23 lines
Add Pentium Pro CPU detection and special handling. For now, all the optimizations we have for 586s also apply to 686s...this will be fine- tuned in the future as appropriate.
Revision 1.162: download - view: text, markup, annotated - select for diffs
Fri Dec 22 18:17:34 1995 UTC (16 years, 1 month ago) by bde
Branches: MAIN
Diff to: previous 1.161: preferred, colored
Changes since revision 1.161: +2 -2 lines
Increased the double fault stack size from 512 to PAGE_SIZE. This is wasteful, but better than clobbering the variables below the stack. About 300 bytes of variables were clobbered when I examined double faults using ddb. Perhaps a page that is known not to be accessed by the double fault handler could be used. Such pages are not easy to find, since the double fault handler calls panic() which calls sync() and possibly dumpsys().
Revision 1.161: download - view: text, markup, annotated - select for diffs
Tue Dec 19 14:30:26 1995 UTC (16 years, 1 month ago) by davidg
Branches: MAIN
Diff to: previous 1.160: preferred, colored
Changes since revision 1.160: +44 -29 lines
Implemented a (sorely needed for years) double fault handler to catch stack overflows. It sure would be nice if there was an unmapped page between the PCB and the stack (and that the size of the stack was configurable!). With the way things are now, the PCB will get clobbered before the double fault handler gets control, making somewhat of a mess of things. Despite this, it is still fairly easy to poke around in the overflowed stack to figure out the cause.
Revision 1.160: download - view: text, markup, annotated - select for diffs
Sat Dec 16 18:52:08 1995 UTC (16 years, 1 month ago) by peter
Branches: MAIN
Diff to: previous 1.159: preferred, colored
Changes since revision 1.159: +5 -1 lines
Catch a couple more null devsw dereferences...
Revision 1.159: download - view: text, markup, annotated - select for diffs
Thu Dec 14 14:35:34 1995 UTC (16 years, 2 months ago) by peter
Branches: MAIN
Diff to: previous 1.158: preferred, colored
Changes since revision 1.158: +3 -3 lines
GENERIC/LINT: Remove redundant quoting on some option lines.
LINT: add a couple of new/missing/undocumented options
files.i386: add linux code so that you can compile a kernel with static
linux emulation ("options LINUX")
i386/*: use #if defined(COMPAT_LINUX) || defined(LINUX) to enable static
support of linux emulation (just like "IBCS2" makes ibcs2 static)
The main thing this is going to make obvious, is that the LINUX code
(when compiled from LINT) has a lot of warnings, some of which dont look
too pleasant..
Revision 1.158: download - view: text, markup, annotated - select for diffs
Wed Dec 13 15:12:23 1995 UTC (16 years, 2 months ago) by julian
Branches: MAIN
Diff to: previous 1.157: preferred, colored
Changes since revision 1.157: +2 -2 lines
devsw tables are now arrays of POINTERS to struct [cb]devsw seems to work hre just fine though I can't check every file that changed due to limmited h/w, however I've checked enught to be petty happy withe hte code.. WARNING... struct lkm[mumble] has changed so it might be an idea to recompile any lkm related programs
Revision 1.157: download - view: text, markup, annotated - select for diffs
Sun Dec 10 13:36:26 1995 UTC (16 years, 2 months ago) by phk
Branches: MAIN
Diff to: previous 1.156: preferred, colored
Changes since revision 1.156: +26 -82 lines
Staticize and cleanup. remove a TON of #includes from machdep.
Revision 1.156: download - view: text, markup, annotated - select for diffs
Sat Dec 9 20:39:47 1995 UTC (16 years, 2 months ago) by phk
Branches: MAIN
Diff to: previous 1.155: preferred, colored
Changes since revision 1.155: +1 -12 lines
Move sysctl machdep.consdev to cons.c
Revision 1.155: download - view: text, markup, annotated - select for diffs
Thu Dec 7 12:45:32 1995 UTC (16 years, 2 months ago) by davidg
Branches: MAIN
Diff to: previous 1.154: preferred, colored
Changes since revision 1.154: +9 -2 lines
Untangled the vm.h include file spaghetti.
Revision 1.154: download - view: text, markup, annotated - select for diffs
Mon Dec 4 16:47:40 1995 UTC (16 years, 2 months ago) by phk
Branches: MAIN
Diff to: previous 1.153: preferred, colored
Changes since revision 1.153: +32 -9 lines
A major sweep over the sysctl stuff. Move a lot of variables home to their own code (In good time before xmas :-) Introduce the string descrition of format. Add a couple more functions to poke into these marvels, while I try to decide what the correct interface should look like. Next is adding vars on the fly, and sysctl looking at them too. Removed a tine bit of defunct and #ifdefed notused code in swapgeneric.
Revision 1.153: download - view: text, markup, annotated - select for diffs
Wed Nov 29 19:57:01 1995 UTC (16 years, 2 months ago) by wollman
Branches: MAIN
Diff to: previous 1.152: preferred, colored
Changes since revision 1.152: +13 -19 lines
Fix Pentium CPU rate diagnosis: - Don't print out meaningless iCOMP numbers, those are for droids. - Use a shorter wait to determine clock rate to avoid deficiencies in DELAY(). - Use a fixed-point representation with 8 bits of fraction to store the rate and rationalize the variable name. It would be possible to use even more fraction if it turns out to be worthwhile (I rather doubt it). The question of source code arrangement remains unaddressed.
Revision 1.152: download - view: text, markup, annotated - select for diffs
Mon Nov 20 12:41:24 1995 UTC (16 years, 2 months ago) by phk
Branches: MAIN
Diff to: previous 1.151: preferred, colored
Changes since revision 1.151: +3 -8 lines
Mega commit for sysctl. Convert the remaining sysctl stuff to the new way of doing things. the devconf stuff is the reason for the large number of files. Cleaned up some compiler warnings while I were there.
Revision 1.151: download - view: text, markup, annotated - select for diffs
Tue Nov 14 09:52:25 1995 UTC (16 years, 3 months ago) by phk
Branches: MAIN
Diff to: previous 1.150: preferred, colored
Changes since revision 1.150: +3 -3 lines
Fix a couple of printfs.
Revision 1.150: download - view: text, markup, annotated - select for diffs
Sun Nov 12 19:51:22 1995 UTC (16 years, 3 months ago) by phk
Branches: MAIN
Diff to: previous 1.149: preferred, colored
Changes since revision 1.149: +5 -6 lines
The entire sysctl callback to read/write version. I havn't tested this as much as I'd like to, but the malloc stunt I tried for an interim for sure does worse. Now we can read and write from any kind of address-space, not only user and kernel, using callbacks. This may be over-generalization for now, but it's actually simpler.
Revision 1.149: download - view: text, markup, annotated - select for diffs
Fri Nov 10 09:53:50 1995 UTC (16 years, 3 months ago) by phk
Branches: MAIN
Diff to: previous 1.148: preferred, colored
Changes since revision 1.148: +28 -37 lines
convert more sysctl variables.
Revision 1.148: download - view: text, markup, annotated - select for diffs
Sat Nov 4 16:00:22 1995 UTC (16 years, 3 months ago) by markm
Branches: MAIN
Diff to: previous 1.147: preferred, colored
Changes since revision 1.147: +1 -3 lines
Remove the #ifdev DEVRANDOM's, as promised. /dev/random is now a part of the kernel! you will need to make the device in /dev: sh MAKEDEV random and take a look at some test code in src/tools/test/random.
Revision 1.147: download - view: text, markup, annotated - select for diffs
Thu Nov 2 09:52:40 1995 UTC (16 years, 3 months ago) by peter
Branches: MAIN
Diff to: previous 1.146: preferred, colored
Changes since revision 1.146: +11 -1 lines
When the sync-on-shutdown fails to clear all buffers, this bit of code can print them out. I have seen that MFS can leave BUSY buffers, preventing a clean reboot...
Revision 1.146: download - view: text, markup, annotated - select for diffs
Tue Oct 31 19:07:53 1995 UTC (16 years, 3 months ago) by peter
Branches: MAIN
Diff to: previous 1.145: preferred, colored
Changes since revision 1.145: +19 -4 lines
Add a simplistic netisr register routine - I need this now for ppp-2.2.
Revision 1.145: download - view: text, markup, annotated - select for diffs
Sat Oct 28 16:57:54 1995 UTC (16 years, 3 months ago) by markm
Branches: MAIN
Diff to: previous 1.144: preferred, colored
Changes since revision 1.144: +5 -1 lines
Theodore Ts'po's random number gernerator for Linux, ported by me. This code will only be included in your kernel if you have 'options DEVRANDOM', but that will fall away in a couple of days. Obtained from: Theodore Ts'o, Linux
Revision 1.128.4.4: download - view: text, markup, annotated - select for diffs
Wed Oct 25 11:14:38 1995 UTC (16 years, 3 months ago) by davidg
Branches: old_RELENG_2_1_0
CVS tags: old_RELENG_2_1_0_RELEASE
Diff to: previous 1.128.4.3: preferred, colored; branchpoint 1.128: preferred, colored
Changes since revision 1.128.4.3: +26 -7 lines
Brought in parts of rev 1.138 and 1.144: fix printing of BIOS disk geoms.
Revision 1.144: download - view: text, markup, annotated - select for diffs
Tue Oct 10 05:05:28 1995 UTC (16 years, 4 months ago) by bde
Branches: MAIN
Diff to: previous 1.143: preferred, colored
Changes since revision 1.143: +37 -23 lines
Include <sys/sysproto.h> so that machdep.c compiles cleanly again (the prototype for sync() moved). KNFize and otherwise clean up printing of BIOS geometries. Add prototypes. Continue cleaning up new init stuff.
Revision 1.143: download - view: text, markup, annotated - select for diffs
Fri Sep 15 08:31:14 1995 UTC (16 years, 4 months ago) by davidg
Branches: MAIN
Diff to: previous 1.142: preferred, colored
Changes since revision 1.142: +10 -1 lines
1) Killed 'BSDVM_COMPAT'. 2) Killed i386pagesperpage as it is not used by anything. 3) Fixed benign miscalculations in pmap_bootstrap(). 4) Moved allocation of ISA DMA memory to machdep.c. 5) Removed bogus vm_map_find()'s in pmap_init() - the entire range was already allocated kmem_init(). 6) Added some comments. virual_avail is still miscalculated NKPT*NBPG too large, but in order to fix this properly requires moving the variable initialization into locore.s. Some other day.
Revision 1.142: download - view: text, markup, annotated - select for diffs
Sun Sep 10 21:34:52 1995 UTC (16 years, 5 months ago) by bde
Branches: MAIN
Diff to: previous 1.141: preferred, colored
Changes since revision 1.141: +5 -4 lines
Make pcvt and syscons live in the same kernel. If both are enabled, then the first one in the config has priority. They can be switched using userconfig(). i386/i386/conf.c: Initialize the shared syscons/pcvt cdevsw entry to `nx'. Add cdevsw registration functions. Use devsw functions of the correct type if they exist. i386/i386/cons.c: Add renamed syscons entry points to constab. i386/i386/cons.h: Declare the renamed syscons entry points. i386/i386/machdep.c: Repeat console initialization after userconfig() in case the current console has become wrong. This depends on cn functions not wiring down anything important. sys/conf.h: Declare new functions. i386/isa/isa.[ch]: Add a function to decide which display driver has priority. Should be done better. i386/isa/syscons.c: Rename pccn* -> sccn*. Initialize CRTC start address in case the previous driver has moved it. i386/isa/syscons.c, i386/isa/pcvt/* Initialize the bogusly shared variable Crtat dynamically in case the stored value was changed by the previous driver. Initialize cdevsw table from a template. Don't grab the console if another display driver has priority. i386/isa/syscons.h, i386/isa/pcvt/pcvt_hdr.h: Don't externally declare now-static cdevsw functions. i386/isa/pcvt/pcvt_hdr.h: Set the sensitive hardware flag so that pcvt doesn't always have lower priority than syscons. This also fixes the "stupid" detection of the display after filling the display with text. i386/isa/pcvt/pcvt_out.c: Don't be confused the off-screen cursor offset 0xffff set by syscons. kern/subr_xxx.c: Add enough nxio/nodev/null devsw functions of the correct type for syscons and pcvt.
Revision 1.141: download - view: text, markup, annotated - select for diffs
Sat Sep 9 18:09:45 1995 UTC (16 years, 5 months ago) by davidg
Branches: MAIN
Diff to: previous 1.140: preferred, colored
Changes since revision 1.140: +4 -4 lines
Fixed init functions argument type - caddr_t -> void *. Fixed a couple of compiler warnings.
Revision 1.128.4.3: download - view: text, markup, annotated - select for diffs
Fri Sep 8 04:22:49 1995 UTC (16 years, 5 months ago) by davidg
Branches: old_RELENG_2_1_0
Diff to: previous 1.128.4.2: preferred, colored; branchpoint 1.128: preferred, colored
Changes since revision 1.128.4.2: +102 -60 lines
Brought in changes from revs 1.133, 1.134, 1.139, and 1.140: rewrite of memory test code and changes to "memory" printf's.
Revision 1.140: download - view: text, markup, annotated - select for diffs
Fri Sep 8 03:19:47 1995 UTC (16 years, 5 months ago) by davidg
Branches: MAIN
Diff to: previous 1.139: preferred, colored
Changes since revision 1.139: +4 -14 lines
1) Really print 'real' memory - use Maxmem, not physmem. 2) Output K bytes instead of pages as this means something to more people. 3) Moved printf of avail memory to after vm_bounce_init() call so that bounce buffers are included in the figure. 4) Killed initcpu(); it's an unused vestige from the VAX.
Revision 1.139: download - view: text, markup, annotated - select for diffs
Wed Sep 6 16:13:31 1995 UTC (16 years, 5 months ago) by wpaul
Branches: MAIN
Diff to: previous 1.138: preferred, colored
Changes since revision 1.138: +2 -1 lines
Put back the "real memory =" printf() that vanished when the code to handle holes in memory was added.
Revision 1.138: download - view: text, markup, annotated - select for diffs
Sun Sep 3 05:43:02 1995 UTC (16 years, 5 months ago) by julian
Branches: MAIN
Diff to: previous 1.137: preferred, colored
Changes since revision 1.137: +7 -7 lines
devfs changes.. changes to allow devices that don't probe (e.g. /dev/mem) to create devfs entries this required giving 'configure' its own SYSINIT entry so we could duck in just before it with a DEVFS init and some device inits.. my devfs now looks like: ./misc ./misc/speaker ./misc/mem ./misc/kmem ./misc/null ./misc/zero ./misc/io ./misc/console ./misc/pcaudio ./misc/pcaudioctl ./disks ./disks/rfloppy ./disks/rfloppy/fd0.1440 ./disks/rfloppy/fd1.1200 ./disks/floppy ./disks/floppy/fd0.1440 ./disks/floppy/fd1.1200 also some sligt cleanups.. DEVFS needs a lot of work but I'm getting back to it..
Revision 1.137: download - view: text, markup, annotated - select for diffs
Mon Aug 28 09:17:46 1995 UTC (16 years, 5 months ago) by julian
Branches: MAIN
Diff to: previous 1.136: preferred, colored
Changes since revision 1.136: +14 -3 lines
Reviewed by: julian with quick glances by bruce and others Submitted by: terry (terry lambert) This is a composite of 3 patch sets submitted by terry. they are: New low-level init code that supports loadbal modules better some cleanups in the namei code to help terry in 16-bit character support some changes to the mount-root code to make it a little more modular.. NOTE: mounting root off cdrom or NFS MIGHT be broken as I haven't been able to test those cases.. certainly mounting root of disk still works just fine.. mfs should work but is untested. (tomorrows task) The low level init stuff includes a total rewrite of init_main.c to make it possible for new modules to have an init phase by simply adding an entry to a TEXT_SET (or is it DATA_SET) list. thus a new module can be added to the kernel without editing any other files other than the 'files' file.
Revision 1.128.4.2: download - view: text, markup, annotated - select for diffs
Thu Aug 24 03:48:25 1995 UTC (16 years, 5 months ago) by davidg
Branches: old_RELENG_2_1_0
Diff to: previous 1.128.4.1: preferred, colored; branchpoint 1.128: preferred, colored
Changes since revision 1.128.4.1: +13 -25 lines
Brought in changes from rev 1.136: fix bugs/anomolies with boot().
Revision 1.128.4.1: download - view: text, markup, annotated - select for diffs
Wed Aug 23 07:16:42 1995 UTC (16 years, 5 months ago) by davidg
Branches: old_RELENG_2_1_0
Diff to: previous 1.128: preferred, colored
Changes since revision 1.128: +6 -8 lines
Brought in changes from revs 1.129-1.130: partial fix for sysctl machdep.console_device and kill redundant vnode_pager_uncache() call.
Revision 1.136: download - view: text, markup, annotated - select for diffs
Sun Aug 20 04:41:02 1995 UTC (16 years, 5 months ago) by davidg
Branches: MAIN
Diff to: previous 1.135: preferred, colored
Changes since revision 1.135: +13 -25 lines
Fixed a few bugs and annoyances with boot(): 1) deal with cold flag better 2) check for key input more often 3) get rid of unused variables 4) minor formatting improvements
Revision 1.135: download - view: text, markup, annotated - select for diffs
Sat Jul 29 11:38:52 1995 UTC (16 years, 6 months ago) by bde
Branches: MAIN
Diff to: previous 1.134: preferred, colored
Changes since revision 1.134: +1 -12 lines
Eliminate sloppy common-style declarations. There should be none left for the LINT configuation.
Revision 1.134: download - view: text, markup, annotated - select for diffs
Fri Jul 28 11:21:03 1995 UTC (16 years, 6 months ago) by davidg
Branches: MAIN
Diff to: previous 1.133: preferred, colored
Changes since revision 1.133: +3 -3 lines
Fixed bug I introduced with the memory-size code rewrite that broke floppy DMA buffers...use avail_start not "first". Removed duplicate (and wrong) declaration of phys_avail[]. Submitted by: Bruce Evans, but fixed differently by me.
Revision 1.133: download - view: text, markup, annotated - select for diffs
Wed Jul 19 06:37:06 1995 UTC (16 years, 6 months ago) by davidg
Branches: MAIN
Diff to: previous 1.132: preferred, colored
Changes since revision 1.132: +99 -48 lines
Rewrote memory sizing code to generally deal with holes in extended memory. This code change should allow certain Compaq machines with a 128K hole at 16MB to work.
Revision 1.132: download - view: text, markup, annotated - select for diffs
Sun Jul 16 10:33:38 1995 UTC (16 years, 6 months ago) by phk
Branches: MAIN
Diff to: previous 1.131: preferred, colored
Changes since revision 1.131: +4 -1 lines
Make the bootinfo structure visible from sysctl. This can be used in libdisk to guess a better bios-geometry.
Revision 1.131: download - view: text, markup, annotated - select for diffs
Thu Jul 13 08:47:24 1995 UTC (16 years, 7 months ago) by davidg
Branches: MAIN
Diff to: previous 1.130: preferred, colored
Changes since revision 1.130: +2 -1 lines
NOTE: libkvm, w, ps, 'top', and any other utility which depends on struct
proc or any VM system structure will have to be rebuilt!!!
Much needed overhaul of the VM system. Included in this first round of
changes:
1) Improved pager interfaces: init, alloc, dealloc, getpages, putpages,
haspage, and sync operations are supported. The haspage interface now
provides information about clusterability. All pager routines now take
struct vm_object's instead of "pagers".
2) Improved data structures. In the previous paradigm, there is constant
confusion caused by pagers being both a data structure ("allocate a
pager") and a collection of routines. The idea of a pager structure has
escentially been eliminated. Objects now have types, and this type is
used to index the appropriate pager. In most cases, items in the pager
structure were duplicated in the object data structure and thus were
unnecessary. In the few cases that remained, a un_pager structure union
was created in the object to contain these items.
3) Because of the cleanup of #1 & #2, a lot of unnecessary layering can now
be removed. For instance, vm_object_enter(), vm_object_lookup(),
vm_object_remove(), and the associated object hash list were some of the
things that were removed.
4) simple_lock's removed. Discussion with several people reveals that the
SMP locking primitives used in the VM system aren't likely the mechanism
that we'll be adopting. Even if it were, the locking that was in the code
was very inadequate and would have to be mostly re-done anyway. The
locking in a uni-processor kernel was a no-op but went a long way toward
making the code difficult to read and debug.
5) Places that attempted to kludge-up the fact that we don't have kernel
thread support have been fixed to reflect the reality that we are really
dealing with processes, not threads. The VM system didn't have complete
thread support, so the comments and mis-named routines were just wrong.
We now use tsleep and wakeup directly in the lock routines, for instance.
6) Where appropriate, the pagers have been improved, especially in the
pager_alloc routines. Most of the pager_allocs have been rewritten and
are now faster and easier to maintain.
7) The pagedaemon pageout clustering algorithm has been rewritten and
now tries harder to output an even number of pages before and after
the requested page. This is sort of the reverse of the ideal pagein
algorithm and should provide better overall performance.
8) Unnecessary (incorrect) casts to caddr_t in calls to tsleep & wakeup
have been removed. Some other unnecessary casts have also been removed.
9) Some almost useless debugging code removed.
10) Terminology of shadow objects vs. backing objects straightened out.
The fact that the vm_object data structure escentially had this
backwards really confused things. The use of "shadow" and "backing
object" throughout the code is now internally consistent and correct
in the Mach terminology.
11) Several minor bug fixes, including one in the vm daemon that caused
0 RSS objects to not get purged as intended.
12) A "default pager" has now been created which cleans up the transition
of objects to the "swap" type. The previous checks throughout the code
for swp->pg_data != NULL were really ugly. This change also provides
the rudiments for future backing of "anonymous" memory by something
other than the swap pager (via the vnode pager, for example), and it
allows the decision about which of these pagers to use to be made
dynamically (although will need some additional decision code to do
this, of course).
13) (dyson) MAP_COPY has been deprecated and the corresponding "copy
object" code has been removed. MAP_COPY was undocumented and non-
standard. It was furthermore broken in several ways which caused its
behavior to degrade to MAP_PRIVATE. Binaries that use MAP_COPY will
continue to work correctly, but via the slightly different semantics
of MAP_PRIVATE.
14) (dyson) Sharing maps have been removed. It's marginal usefulness in a
threads design can be worked around in other ways. Both #12 and #13
were done to simplify the code and improve readability and maintain-
ability. (As were most all of these changes)
TODO:
1) Rewrite most of the vnode pager to use VOP_GETPAGES/PUTPAGES. Doing
this will reduce the vnode pager to a mere fraction of its current size.
2) Rewrite vm_fault and the swap/vnode pagers to use the clustering
information provided by the new haspage pager interface. This will
substantially reduce the overhead by eliminating a large number of
VOP_BMAP() calls. The VOP_BMAP() filesystem interface should be
improved to provide both a "behind" and "ahead" indication of
contiguousness.
3) Implement the extended features of pager_haspage in swap_pager_haspage().
It currently just says 0 pages ahead/behind.
4) Re-implement the swap device (swstrategy) in a more elegant way, perhaps
via a much more general mechanism that could also be used for disk
striping of regular filesystems.
5) Do something to improve the architecture of vm_object_collapse(). The
fact that it makes calls into the swap pager and knows too much about
how the swap pager operates really bothers me. It also doesn't allow
for collapsing of non-swap pager objects ("unnamed" objects backed by
other pagers).
Revision 1.130: download - view: text, markup, annotated - select for diffs
Wed Jun 28 04:46:11 1995 UTC (16 years, 7 months ago) by davidg
Branches: MAIN
Diff to: previous 1.129: preferred, colored
Changes since revision 1.129: +2 -6 lines
Killed redundant vnode_pager_umount() call. This is already done at FS unmount time.
Revision 1.129: download - view: text, markup, annotated - select for diffs
Mon Jun 26 07:39:52 1995 UTC (16 years, 7 months ago) by bde
Branches: MAIN
Diff to: previous 1.128: preferred, colored
Changes since revision 1.128: +5 -3 lines
Partially fix `sysctl machdep.console_device'. The fix will be complete when syscons stops mapping the console to minor MAXCONS. There is usually no corresponding device in /dev, and the correct device has minor 0. cons.c: Initialize cn_tty properly, so that CPU_CONSDEV can work. Comment about too many variants of the console tty pointer. machdep.c: Return device NODEV and not error EFAULT when there is no console device.
Revision 1.128: download - view: text, markup, annotated - select for diffs
Tue May 30 07:59:33 1995 UTC (16 years, 8 months ago) by rgrimes
Branches: MAIN
CVS tags: old_RELENG_2_1_0_BP, old_RELENG_2_0_5_RELEASE, old_RELENG_2_0_5_BP, old_RELENG_2_0_5
Branch point for: old_RELENG_2_1_0
Diff to: previous 1.127: preferred, colored
Changes since revision 1.127: +10 -10 lines
Remove trailing whitespace.
Revision 1.127: download - view: text, markup, annotated - select for diffs
Thu May 25 07:41:20 1995 UTC (16 years, 8 months ago) by davidg
Branches: MAIN
CVS tags: old_RELENG_2_0_5_ALPHA
Diff to: previous 1.126: preferred, colored
Changes since revision 1.126: +4 -4 lines
Made "NMBCLUSTERS" calculation dynamic and fixed bogus use of "NMBCLUSTERS" in machdep.c (it should use the global nmbclusters). Moved the calculation of nmbclusters into conf/param.c (same place where nmbclusters has always been assigned), and made the calculation include an extra amount based on "maxusers". NMBCLUSTERS can still be overrided in the kernel config file as always, but this change will make that generally unnecessary. This fixes the "bug" reports from people who have misconfigured kernels seeing the network hang when the mbuf cluster pool runs out. Reviewed by: John Dyson
Revision 1.126: download - view: text, markup, annotated - select for diffs
Fri May 12 19:17:14 1995 UTC (16 years, 9 months ago) by wollman
Branches: MAIN
Diff to: previous 1.125: preferred, colored
Changes since revision 1.125: +2 -5 lines
The death of `options NODUMP'. Now the dump area can be dynamically configured (and unconfigured) on the fly. A sysctl(3) MIB variable is provided to inspect and modify the dump device setting.
Revision 1.125: download - view: text, markup, annotated - select for diffs
Thu May 11 19:26:08 1995 UTC (16 years, 9 months ago) by rgrimes
Branches: MAIN
Diff to: previous 1.124: preferred, colored
Changes since revision 1.124: +4 -4 lines
Fix -Wformat warnings from LINT kernel.
Revision 1.124: download - view: text, markup, annotated - select for diffs
Thu May 11 00:16:36 1995 UTC (16 years, 9 months ago) by wollman
Branches: MAIN
Diff to: previous 1.123: preferred, colored
Changes since revision 1.123: +1 -2 lines
Delete two debugging printfs that mistakenly crept in.
Revision 1.123: download - view: text, markup, annotated - select for diffs
Thu May 11 00:12:54 1995 UTC (16 years, 9 months ago) by wollman
Branches: MAIN
Diff to: previous 1.122: preferred, colored
Changes since revision 1.122: +20 -18 lines
Make networking domains drop-ins, through the magic of GNU ld. (Some day, there may even be LKMs.) Also, change the internal name of `unixdomain' to `localdomain' since AF_LOCAL is now the preferred name of this family. Declare netisr correctly and in the right place.
Revision 1.122: download - view: text, markup, annotated - select for diffs
Sat Apr 22 03:58:46 1995 UTC (16 years, 9 months ago) by wpaul
Branches: MAIN
Diff to: previous 1.121: preferred, colored
Changes since revision 1.121: +4 -2 lines
Tiny printf formatting change: if we have no cpu_vendor or cpu_id info, don't generate a newline. (Yeah, I'm picking nits, but that empty line I get on my 386 just looks dumb, okay? :)
Revision 1.121: download - view: text, markup, annotated - select for diffs
Tue Apr 18 23:55:26 1995 UTC (16 years, 9 months ago) by rgrimes
Branches: MAIN
Diff to: previous 1.120: preferred, colored
Changes since revision 1.120: +2 -2 lines
Reapply my fix for this: Output the CPU features line during the probe on a seperate line, for folks with lots of features the output use to wrap and look ugle.
Revision 1.120: download - view: text, markup, annotated - select for diffs
Mon Apr 17 16:49:50 1995 UTC (16 years, 9 months ago) by phk
Branches: MAIN
Diff to: previous 1.119: preferred, colored
Changes since revision 1.119: +11 -4 lines
Print the BIOS geometries in a human-readable format.
Revision 1.119: download - view: text, markup, annotated - select for diffs
Fri Apr 14 02:06:00 1995 UTC (16 years, 10 months ago) by wpaul
Branches: MAIN
Diff to: previous 1.118: preferred, colored
Changes since revision 1.118: +14 -4 lines
Hopefully I won't get flamed for this: insert a few more #if defined(I486_CPU) and #if defined (I586_CPU) thingies into identifycpu() so that we only compile in what's actually needed for a given CPU. So far as I can tell, none of my 386 machines generate a cpu_vendor code, so I made the extra vendor and feature line conditional on I486_CPU and I586_CPU. (Otherwise we print out a blank line which looks silly.)
Revision 1.118: download - view: text, markup, annotated - select for diffs
Thu Apr 13 04:55:35 1995 UTC (16 years, 10 months ago) by wpaul
Branches: MAIN
Diff to: previous 1.117: preferred, colored
Changes since revision 1.117: +3 -1 lines
This a subtle reminder to people that not everybody compiles their kernels with 'options I586_CPU.' The declaration for pentium_mhz is hidden inside an #ifdef I586_CPU, but machdep.c refers to it whether I586_CPU is defined or not. This temporary hack puts the offending code inside an #ifdef I586_CPU as well so that a kernel without it will successfully compile. I must emphasize the word 'temporary:' somebody needs to seriously beat on the identifycpu() function with an #ifdef stick so that I386_CPU, I486_CPU and I586_CPU will do the right things.
Revision 1.117: download - view: text, markup, annotated - select for diffs
Wed Apr 12 20:47:28 1995 UTC (16 years, 10 months ago) by wollman
Branches: MAIN
Diff to: previous 1.116: preferred, colored
Changes since revision 1.116: +89 -48 lines
Add a class field to devconf and mst drivers. For those where it was easy, drivers were also fixed to call dev_attach() during probe rather than attach (in keeping with the new design articulated in a mail message five months ago). For a few that were really easy, correct state tracking was added as well. The `fd' driver was fixed to correctly fill in the description. The CPU identify code was fixed to attach a `cpu' device. The code was also massively reordered to fill in cpu_model with somethingremotely resembling what identifycpu() prints out. A few bytes saved by using %b to format the features list rather than lots of ifs.
Revision 1.116: download - view: text, markup, annotated - select for diffs
Thu Apr 6 07:55:42 1995 UTC (16 years, 10 months ago) by rgrimes
Branches: MAIN
Diff to: previous 1.115: preferred, colored
Changes since revision 1.115: +3 -3 lines
Output the CPU features line during the probe on a seperate line, for folks with lots of features the output use to wrap and look ugle. Reviewed by: phk
Revision 1.115: download - view: text, markup, annotated - select for diffs
Fri Mar 17 04:19:19 1995 UTC (16 years, 10 months ago) by davidg
Branches: MAIN
Diff to: previous 1.114: preferred, colored
Changes since revision 1.114: +3 -1 lines
Call dev_shutdownall() just after unmounting filesystems.
Revision 1.114: download - view: text, markup, annotated - select for diffs
Thu Mar 16 18:11:27 1995 UTC (16 years, 10 months ago) by bde
Branches: MAIN
Diff to: previous 1.113: preferred, colored
Changes since revision 1.113: +27 -13 lines
Add and move declarations to fix all of the warnings from `gcc -Wimplicit' (except in netccitt, netiso and netns) and most of the warnings from `gcc -Wnested-externs'. Fix all the bugs found. There were no serious ones.
Revision 1.113: download - view: text, markup, annotated - select for diffs
Tue Mar 7 19:58:02 1995 UTC (16 years, 11 months ago) by davidg
Branches: MAIN
Diff to: previous 1.112: preferred, colored
Changes since revision 1.112: +2 -2 lines
Increased number of buffers to 1/12 of (page_count - 1024). This makes the cache minimum closer to 10% in the usual case.
Revision 1.112: download - view: text, markup, annotated - select for diffs
Fri Mar 3 00:43:08 1995 UTC (16 years, 11 months ago) by davidg
Branches: MAIN
Diff to: previous 1.111: preferred, colored
Changes since revision 1.111: +36 -23 lines
Use copyout to install the sigframe rather than directly writing to the user's stack.
Revision 1.111: download - view: text, markup, annotated - select for diffs
Wed Feb 15 12:27:01 1995 UTC (16 years, 11 months ago) by davidg
Branches: MAIN
Diff to: previous 1.110: preferred, colored
Changes since revision 1.110: +2 -2 lines
Use proc0's proc struct rather than curproc's when calling sync.
Revision 1.110: download - view: text, markup, annotated - select for diffs
Tue Feb 14 19:20:26 1995 UTC (16 years, 11 months ago) by sos
Branches: MAIN
Diff to: previous 1.109: preferred, colored
Changes since revision 1.109: +10 -2 lines
First attempt to run linux binaries. This is only the changes needed to the generic kernel. The actual emulator is a separate LKM. (not finished yet, sorry). Submitted by: sos@freebsd.org & sef@kithrup.com
Revision 1.109: download - view: text, markup, annotated - select for diffs
Sun Feb 12 09:21:04 1995 UTC (17 years ago) by davidg
Branches: MAIN
Diff to: previous 1.108: preferred, colored
Changes since revision 1.108: +2 -2 lines
Carefully choose the low limit for number of buffers to acheive the best performance on small memory machines.
Revision 1.108: download - view: text, markup, annotated - select for diffs
Sat Feb 11 04:21:24 1995 UTC (17 years ago) by phk
Branches: MAIN
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +43 -4 lines
Intels App Note AP-485 applied. We will now tell a good deal more about the CPU if Intel made it. What is a i486DX2 Write-Back Enhanced CPU ?
Revision 1.107: download - view: text, markup, annotated - select for diffs
Fri Feb 10 07:44:03 1995 UTC (17 years ago) by davidg
Branches: MAIN
Diff to: previous 1.106: preferred, colored
Changes since revision 1.106: +19 -33 lines
Changed extended memory test so that it's non-destructive and not a complete test (it never was "complete", which is why it was bogus). Now only a single longword is checked in each page.
Revision 1.106: download - view: text, markup, annotated - select for diffs
Fri Feb 10 07:17:46 1995 UTC (17 years ago) by davidg
Branches: MAIN
Diff to: previous 1.105: preferred, colored
Changes since revision 1.105: +1 -19 lines
Removed obsolete and unused vmtime() function.
Revision 1.105: download - view: text, markup, annotated - select for diffs
Sun Jan 29 01:18:51 1995 UTC (17 years ago) by ats
Branches: MAIN
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +2 -2 lines
Correct a name of one structure member in the sigaltstack structure. Now it matches the man page and also the only other commercial implementation i have found so far ( Solaris 2.x). Changed the name from ss_base to ss_sp.
Revision 1.104: download - view: text, markup, annotated - select for diffs
Wed Jan 25 21:40:17 1995 UTC (17 years ago) by bde
Branches: MAIN
Diff to: previous 1.103: preferred, colored
Changes since revision 1.103: +17 -3 lines
Load the kernel symbol table in the boot loader and not at compile time. (Boot with the -D flag if you want symbols.) Make it easier to extend `struct bootinfo' without losing either forwards or backwards compatibility. ddb_aout.c: Get the symbol table from wherever the loader put it. Nuke db_symtab[SYMTAB_SPACE]. boot.c: Enable loading of symbols. Align them on a page boundary. Add printfs about the symbol table sizes. Pass the memory sizes to the kernel. Fix initialization of `unit' (it got moved out of the loop). Fix adding the bss size (it got moved inside an ifdef). Initialize serial port when RB_SERIAL is toggled on. Fix comments. Clean up formatting of recently added code. io.c: Clean up formatting of recently added code. netboot/main.c, machdep.c, wd.c: Change names of bootinfo fields. LINT: Nuke SYMTAB_SPACE. Fix comment about DODUMP. Makefile.i386: Nuke use of dbsym. Exclude gcc symbols from kernel unless compiling with -g. Remove unused macro. Fix comments and formatting. genassym.c: Generate defines for some new bootinfo fields. Change names of old ones. locore.s: Copy only the valid part of the `struct bootinfo' passed by the loader. Reserve space for symbol table, if any. machdep.c: Check the memory sizes passed by the loader, if any. Don't use them yet. bootinfo.h: Add a size field so that we can resolve some mismatches between the loader bootinfo and the kernel boot info. The version number is not so good for this because of historical botches and because it's harder to maintain. Add memory size and symbol table fields. Change the names of everything. Hacks to save a few bytes: asm.S, boot.c, boot2.S: Replace `ouraddr' by `(BOOTSEG << 4)'. boot.c: Don't statically initialize `loadflags' to 0. Disable the "REDUNDANT" code that skips the BIOS variables. Eliminate `total'. Combine some more printfs. boot.h, disk.c, io.c, table.c: Move all statically initialzed data to table.c. io.c: Don't put the A20 gate bits in a variable.
Revision 1.103: download - view: text, markup, annotated - select for diffs
Tue Jan 24 09:56:29 1995 UTC (17 years ago) by davidg
Branches: MAIN
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +8 -5 lines
Changed buffer allocation policy (machdep.c) Moved various pmap 'bit' test/set functions back into real functions; gcc generates better code at the expense of more of it. (pmap.c) Fixed a deadlock problem with pv entry allocations (pmap.c) Added a new, optional function 'pmap_prefault' that does clustered page table preloading (pmap.c) Changed the way that page tables are held onto (trap.c). Submitted by: John Dyson
Revision 1.102: download - view: text, markup, annotated - select for diffs
Tue Jan 17 01:15:12 1995 UTC (17 years ago) by bde
Branches: MAIN
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +14 -7 lines
The %eflags checking introduced in the previous commit was too zealous. sigreturn() sometimes failed for ordinary returns from signal handlers. Failures of ordinary returns "can't happen" and are badly handled. "Temporary" fix: allow users to corrupt PSL_RF. This is fairly harmless. A correct fix would involve saving the old %eflags (and perhaps the old segment registers) where the user can't get at them.
Revision 1.101: download - view: text, markup, annotated - select for diffs
Sat Jan 14 13:20:08 1995 UTC (17 years ago) by bde
Branches: MAIN
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +98 -88 lines
Fix security holes in sigreturn(), ptrace() and procfs. sigreturn() attempted to check for insecure and fatal eflags and segment selectors, but missed many cases and got the IOPL check back to front. The other syscalls didn't check at all. sys_process.c, machdep.c: Only allow PT_WRITE_U to write to the registers (ordinary and FP). psl.h, locore.s, machdep.c: Eliminate PSL_MBZ, PSL_MBO and PSL_USERCLR. We are not supposed to assume anything about the reserved bits. Use PSL_USERCHANGE and PSL_KERNEL instead. Rename PSL_USERSET to PSL_USER. exception.s: Define a private label for use by doreti when returning to user mode fails. machdep.c: In syscalls, allow changing only the eflags that can be changed on 486's in user mode (no longer attempt to allow benign IOPL changes; allow changing the nasty PSL_NT; don't allow changing the i586 bits). Don't attempt to check all the cases involving invalid selectors and %eip's. Just check for privilege violations and let the invalid things cause a trap. procfs_machdep.c: Call the ptrace register functions to do all the work for reading and writing ordinary registers and for single stepping. trap.c: Ignore traps caused by PSL_NT being set. Previously, users could cause a fatal trap in user mode by setting PSL_NT and executing an iret, and a fatal trap in kernel mode by setting PSL_NT and making a syscall. PSL_NT was cleared too late and not in enough modes to fix the problem. Make all traps in user mode (except T_NMI) nonfatal. Recover from traps caused by attempting to load invalid user registers in doreti by restarting the traps so that they appear to occur in user mode. --- Fix bogons that I noticed while fixing the above: psl.h: Fix some comments. Uniformize idempotency ifdef. exception.s, machdep.c: Remove rsvd[0-14]. rsvd0 hasn't been reserved since the 486 came out. Replace rsvd0 by `align'. rsvd[0-11] used wrong (magic non-unique) trap numbers. Replace rsvd[1-14] by rsvd. locore.s: Enable alignment check flag on 486's and 586's. machdep.c: Use a better type for kstack[]. Use TFREGP() to find the registers. Reformat ptrace functions from SEF to something closer to KNF. procfs_machdep.c: The wrong pointer to the registers got fixed as a side effect. Implement reading and writing of FP registers. /proc/*/*regs now work (only) for processes that are in memory. Clean up comments. trap.c, trap.h: Remove unused trap types.
Revision 1.100: download - view: text, markup, annotated - select for diffs
Mon Jan 9 16:04:37 1995 UTC (17 years, 1 month ago) by davidg
Branches: MAIN
Diff to: previous 1.99: preferred, colored
Changes since revision 1.99: +19 -43 lines
These changes embody the support of the fully coherent merged VM buffer cache, much higher filesystem I/O performance, and much better paging performance. It represents the culmination of over 6 months of R&D. The majority of the merged VM/cache work is by John Dyson. The following highlights the most significant changes. Additionally, there are (mostly minor) changes to the various filesystem modules (nfs, msdosfs, etc) to support the new VM/buffer scheme. vfs_bio.c: Significant rewrite of most of vfs_bio to support the merged VM buffer cache scheme. The scheme is almost fully compatible with the old filesystem interface. Significant improvement in the number of opportunities for write clustering. vfs_cluster.c, vfs_subr.c Upgrade and performance enhancements in vfs layer code to support merged VM/buffer cache. Fixup of vfs_cluster to eliminate the bogus pagemove stuff. vm_object.c: Yet more improvements in the collapse code. Elimination of some windows that can cause list corruption. vm_pageout.c: Fixed it, it really works better now. Somehow in 2.0, some "enhancements" broke the code. This code has been reworked from the ground-up. vm_fault.c, vm_page.c, pmap.c, vm_object.c Support for small-block filesystems with merged VM/buffer cache scheme. pmap.c vm_map.c Dynamic kernel VM size, now we dont have to pre-allocate excessive numbers of kernel PTs. vm_glue.c Much simpler and more effective swapping code. No more gratuitous swapping. proc.h Fixed the problem that the p_lock flag was not being cleared on a fork. swap_pager.c, vnode_pager.c Removal of old vfs_bio cruft to support the past pseudo-coherency. Now the code doesn't need it anymore. machdep.c Changes to better support the parameter values for the merged VM/buffer cache scheme. machdep.c, kern_exec.c, vm_glue.c Implemented a seperate submap for temporary exec string space and another one to contain process upages. This eliminates all map fragmentation problems that previously existed. ffs_inode.c, ufs_inode.c, ufs_readwrite.c Changes for merged VM/buffer cache. Add "bypass" support for sneaking in on busy buffers. Submitted by: John Dyson and David Greenman
Revision 1.99: download - view: text, markup, annotated - select for diffs
Thu Jan 5 19:51:14 1995 UTC (17 years, 1 month ago) by se
Branches: MAIN
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +4 -1 lines
Submitted by: Wolfgang Stanglmeier <wolf@dentaro.GUN.de> Reviewed by: <wollman> First hooks and defines for the ISDN driver, that soon will see the light ...
Revision 1.98: download - view: text, markup, annotated - select for diffs
Sun Dec 11 03:33:58 1994 UTC (17 years, 2 months ago) by davidg
Branches: MAIN
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +1 -3 lines
Removed inappropriate comment.
Revision 1.97: download - view: text, markup, annotated - select for diffs
Sun Dec 11 03:11:23 1994 UTC (17 years, 2 months ago) by davidg
Branches: MAIN
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +4 -2 lines
Add additional comment.
Revision 1.96: download - view: text, markup, annotated - select for diffs
Sun Dec 11 02:28:36 1994 UTC (17 years, 2 months ago) by davidg
Branches: MAIN
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +4 -3 lines
Fix bogus comment.
Revision 1.95: download - view: text, markup, annotated - select for diffs
Sun Nov 27 01:49:39 1994 UTC (17 years, 2 months ago) by phk
Branches: MAIN
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +2 -2 lines
I made a syntax error yesterday. Submitted by: John Capo
Revision 1.94: download - view: text, markup, annotated - select for diffs
Sat Nov 26 09:37:57 1994 UTC (17 years, 2 months ago) by phk
Branches: MAIN
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +12 -2 lines
Set the bootverbose if so desired.
if (bootverbose)
Print the geometries the bios passes to us (through the bootblocks).
Revision 1.93: download - view: text, markup, annotated - select for diffs
Wed Nov 16 00:41:06 1994 UTC (17 years, 2 months ago) by davidg
Branches: MAIN
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +3 -4 lines
Allow MAXMEM to be larger than the detected physical memory. This change was supposed to have already been made, but got botched somewhere. Don't clobber the last page of memory (where the message buffer is). Some BIOS don't gratuitously wipe it out on reboot.
Revision 1.92: download - view: text, markup, annotated - select for diffs
Tue Nov 15 14:12:55 1994 UTC (17 years, 2 months ago) by bde
Branches: MAIN
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +10 -6 lines
Make gdt_segs[] public again for APM. Make ldt[] public again and restore currentldt and _default_ldt for USER_LDT.
Revision 1.91: download - view: text, markup, annotated - select for diffs
Mon Nov 14 14:23:54 1994 UTC (17 years, 3 months ago) by bde
Branches: MAIN
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +1 -1 lines
Oops, the previous commit got the diff for the log message instead of the following. Move declarations to and from <machine/segments.h>. Make segment stuff static if possible. Remove unused (although initialized) global variables _default_ldt, currentldt, _gsel_tss (rename the latter to the auto variable gtel_tss). Use "correct" and consistent types for interrupt handlers. Remove a mailing address from the code. Fix type mismatches found by adding prototypes.
Revision 1.90: download - view: text, markup, annotated - select for diffs
Mon Nov 14 14:19:54 1994 UTC (17 years, 3 months ago) by bde
Branches: MAIN
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +23 -23 lines
(Bogus several hundred line diff for a log message deleted. See rev 1.91 for the intended log message. -DG)
Revision 1.89: download - view: text, markup, annotated - select for diffs
Mon Nov 14 13:22:30 1994 UTC (17 years, 3 months ago) by bde
Branches: MAIN
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +1 -2 lines
Undo a previous change. <sys/disklabel.h> was broken, not these files.
Revision 1.88: download - view: text, markup, annotated - select for diffs
Mon Nov 7 03:51:32 1994 UTC (17 years, 3 months ago) by phk
Branches: MAIN
CVS tags: old_RELEASE_2_0, old_OLAH_TTCP, old_BETA_2_0, old_ALPHA_2_0
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +9 -1 lines
Added a kernel variable, "dodump" defaulting to zero, which disables dumps. Somebody should make a mib variable for it. Just now it is pointless to dump the kernel, since we have nothing which can read the dump. Furthermore is should never be the default to dump. options DODUMP will enable dumps.
Revision 1.87: download - view: text, markup, annotated - select for diffs
Sun Nov 6 04:46:53 1994 UTC (17 years, 3 months ago) by davidg
Branches: MAIN
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +11 -8 lines
Do a better job at preparing registers for the new process in setregs() by setting them all to a known state.
Revision 1.86: download - view: text, markup, annotated - select for diffs
Sun Nov 6 01:33:03 1994 UTC (17 years, 3 months ago) by bde
Branches: MAIN
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +6 -26 lines
Nuke the losing version of microtime. The assembler version now works for all reasonable HZ's. HZ > 1000 doesn't work because of sloppy conversions in hzto() (division by (tick / 1000) == 0). This was fixed in 1.1.5. Eliminate some extern declarations by including the appropriate header files that now contain appropriate declarations.
Revision 1.85: download - view: text, markup, annotated - select for diffs
Thu Nov 3 14:57:54 1994 UTC (17 years, 3 months ago) by jkh
Branches: MAIN
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +1 -3 lines
Unconditionalize USERCONFIG. Uh, thanks, David.
Revision 1.84: download - view: text, markup, annotated - select for diffs
Tue Nov 1 06:04:12 1994 UTC (17 years, 3 months ago) by ache
Branches: MAIN
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +6 -2 lines
Implement CPU_ADJKERNTZ in different way: call resettodr() on writting this variable. adjkerntz pgm changes will follow.
Revision 1.83: download - view: text, markup, annotated - select for diffs
Fri Oct 28 12:41:50 1994 UTC (17 years, 3 months ago) by jkh
Branches: MAIN
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +2 -1 lines
From: fredriks@mcs.com (Lars Fredriksen) ... It turns out that these files do not include <sys/dkbad.h> before <sys/disklabel.h>. Submitted by: fredriks
Revision 1.82: download - view: text, markup, annotated - select for diffs
Thu Oct 27 20:44:34 1994 UTC (17 years, 3 months ago) by jkh
Branches: MAIN
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +1 -2 lines
Julian Elischer's disklabel fixes.
Revision 1.81: download - view: text, markup, annotated - select for diffs
Wed Oct 26 18:35:02 1994 UTC (17 years, 3 months ago) by jkh
Branches: MAIN
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +5 -2 lines
Invoke userconfig() if kernel compiled with options USERCONFIG and -c flag used.
Revision 1.80: download - view: text, markup, annotated - select for diffs
Tue Oct 25 08:58:33 1994 UTC (17 years, 3 months ago) by davidg
Branches: MAIN
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +3 -4 lines
Allow MAXMEM kernel option to indicate more memory than is detected; it previously could only be used to limit the amount of memory.
Revision 1.79: download - view: text, markup, annotated - select for diffs
Tue Oct 25 08:34:50 1994 UTC (17 years, 3 months ago) by davidg
Branches: MAIN
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +4 -5 lines
Restricted maximum bufpages to 1500; this is required for machines >64MB of memory to work without running out of kernel VM (and increasing it to even more than it is now (96MB) is out of the question. Changed bufpages calculation to allocation a little less bufer cache (16% of mem-2MB instead of 20%); this is simply a better figure for most systems.
Revision 1.78: download - view: text, markup, annotated - select for diffs
Thu Oct 20 00:07:49 1994 UTC (17 years, 3 months ago) by phk
Branches: MAIN
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +2 -2 lines
Peter Dufaults comconsole changes. Submitted by: Peter Dufault
Revision 1.77: download - view: text, markup, annotated - select for diffs
Wed Oct 19 00:05:59 1994 UTC (17 years, 3 months ago) by wollman
Branches: MAIN
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +13 -1 lines
Implement disk_externalize().
Revision 1.76: download - view: text, markup, annotated - select for diffs
Tue Oct 18 03:40:14 1994 UTC (17 years, 3 months ago) by ache
Branches: MAIN
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +1 -9 lines
Remove CPU_COLORDISP, GIO_COLOR now exists
Revision 1.75: download - view: text, markup, annotated - select for diffs
Mon Oct 17 12:36:43 1994 UTC (17 years, 3 months ago) by ache
Branches: MAIN
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +6 -1 lines
Ifdef color_display by NSC, pointed by Rod
Revision 1.74: download - view: text, markup, annotated - select for diffs
Sat Oct 15 21:25:03 1994 UTC (17 years, 3 months ago) by ache
Branches: MAIN
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +4 -1 lines
ADd CPU_COLORDISP sysctl to handle console display type
Revision 1.73: download - view: text, markup, annotated - select for diffs
Mon Oct 10 18:06:58 1994 UTC (17 years, 4 months ago) by phk
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +4 -1 lines
minaddr #ifdef lost in previous commit. Sorry.
Revision 1.72: download - view: text, markup, annotated - select for diffs
Mon Oct 10 01:10:22 1994 UTC (17 years, 4 months ago) by phk
Branches: MAIN
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +22 -49 lines
locore.s: Made the APM stuff depend on NAPM > 0 rather than a separate "APM" macro. machdep.c: Made the APM-descriptors unconditional. Bruce: if these still conflict with your debugger, please put in a reservation for your debugger. These three desc. can be anywhere, as long as they are contiguous, so just move them as needed.
Revision 1.71: download - view: text, markup, annotated - select for diffs
Sun Oct 9 07:34:29 1994 UTC (17 years, 4 months ago) by davidg
Branches: MAIN
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +1 -2 lines
Got rid of map.h. It's a leftover from the rmap code, and we use rlists. Changed swapmap into swaplist.
Revision 1.70: download - view: text, markup, annotated - select for diffs
Tue Oct 4 18:44:21 1994 UTC (17 years, 4 months ago) by ache
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +4 -2 lines
Add code to handle CPU_DISRTCSET
Revision 1.69: download - view: text, markup, annotated - select for diffs
Sun Oct 2 17:29:51 1994 UTC (17 years, 4 months ago) by phk
Branches: MAIN
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +10 -15 lines
Unused variables, except one with a omnious comment.
Revision 1.68: download - view: text, markup, annotated - select for diffs
Sun Oct 2 01:32:53 1994 UTC (17 years, 4 months ago) by rgrimes
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +1 -3 lines
1. Remove all references to cyloffset, it has been unused for some time.
2. New detection code so we know what boot code called us.
3. Remove old DISKLESS support code and halt if we are called by that boot
code as it will NOT work with the new nfs_diskless structure.
This is really in preperation for new boot code and new diskless support.
Reviewed by: davidg
Revision 1.67: download - view: text, markup, annotated - select for diffs
Sat Oct 1 02:56:02 1994 UTC (17 years, 4 months ago) by davidg
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +72 -2 lines
Laptop Advanced Power Management support by HOSOKAWA Tatsumi. Submitted by: HOSOKAWA Tatsumi
Revision 1.66: download - view: text, markup, annotated - select for diffs
Sat Sep 24 12:22:47 1994 UTC (17 years, 4 months ago) by davidg
Branches: MAIN
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +1 -2 lines
Nuked splnet before sync. Not only is this unnecessary, but it appears to cause problems by making it impossible to sync NFS related buffers when rebooting.
Revision 1.65: download - view: text, markup, annotated - select for diffs
Fri Sep 16 05:46:54 1994 UTC (17 years, 4 months ago) by phk
Branches: MAIN
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +4 -1 lines
Made the kernel compile even without "ether".
Revision 1.64: download - view: text, markup, annotated - select for diffs
Fri Sep 16 01:00:38 1994 UTC (17 years, 4 months ago) by ache
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +5 -1 lines
CPU_ADJKERNTZ added to cpu_sysctl
Revision 1.63: download - view: text, markup, annotated - select for diffs
Thu Sep 15 10:52:46 1994 UTC (17 years, 4 months ago) by davidg
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +5 -5 lines
Brought over from 1.1.5: Fix from Bruce Evans. There were missing sets of parantheses: 1. The checks for the standard data selectors were botched, so %ss == 0 and probably %cs == 0 were allowed. A fix is enclosed. The checks for the standard selectors could be omitted without losing anything since the standard selectors pass the valid_ldt_sel() tests.
Revision 1.62: download - view: text, markup, annotated - select for diffs
Wed Sep 14 23:55:53 1994 UTC (17 years, 4 months ago) by wollman
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +23 -1 lines
Beginnings of support for loadable protocol domains. In particular, don't hard-code netisr values in icu.s, but rather, use an array of function pointers and set them all up in machdep.c for statically-linked protocol families. (This will eventually be done differently.)
Revision 1.61: download - view: text, markup, annotated - select for diffs
Sun Sep 4 19:59:14 1994 UTC (17 years, 5 months ago) by pst
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +3 -2 lines
Detect if we're running on a Cyrix 486DLC and enable automatic cache negation whenever we access memory between 640k and 1M. Original code from NetBSD 1.0-BETA. The exact origins are unclear but Theo de Raadt, Charles, and Michael V. may have contributed to it. Submitted by: pst
Revision 1.60: download - view: text, markup, annotated - select for diffs
Fri Sep 2 04:12:04 1994 UTC (17 years, 5 months ago) by davidg
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +3 -3 lines
Removed all vestiges of tlbflush(). Replaced them with calls to pmap_update(). Made pmap_update an inline assembly function.
Revision 1.59: download - view: text, markup, annotated - select for diffs
Wed Aug 31 15:55:29 1994 UTC (17 years, 5 months ago) by davidg
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +15 -14 lines
Fixed bug that surfaced with last commit for NOBOUNCE -> BOUNCE_BUFFERS by adding appropriate #ifdefs and changing some variables to externs (as they should have always been).
Revision 1.58: download - view: text, markup, annotated - select for diffs
Wed Aug 31 06:17:31 1994 UTC (17 years, 5 months ago) by davidg
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +3 -3 lines
Rather than exclude bounce buffers support with NOBOUNCE, include it with BOUNCE_BUFFERS. This is more intuitive, and is better for future multiplatform support. Added BOUNCE_BUFFERS option to the GENERIC and LINT kernel config files.
Revision 1.57: download - view: text, markup, annotated - select for diffs
Sat Aug 27 16:14:12 1994 UTC (17 years, 5 months ago) by davidg
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +3 -5 lines
1) Changed ddb into a option rather than a pseudo-device (use options DDB in your kernel config now). 2) Added ps ddb function from 1.1.5. Cleaned it up a bit and moved into its own file. 3) Added \r handing in db_printf. 4) Added missing memory usage stats to statclock(). 5) Added dummy function to pseudo_set so it will be emitted if there are no other pseudo declarations.
Revision 1.56: download - view: text, markup, annotated - select for diffs
Wed Aug 24 11:45:19 1994 UTC (17 years, 5 months ago) by sos
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +8 -1 lines
Changes preparing for iBCS2 support Reviewed by: Submitted by:
Revision 1.55: download - view: text, markup, annotated - select for diffs
Sat Aug 20 16:02:57 1994 UTC (17 years, 5 months ago) by davidg
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +15 -17 lines
Implemented filesystem clean bit via: machdep.c: Changed printf's a little and call vfs_unmountall() if the sync was successful. cd9660_vfsops.c, ffs_vfsops.c, nfs_vfsops.c, lfs_vfsops.c: Allow dismount of root FS. It is now disallowed at a higher level. vfs_conf.c: Removed unused rootfs global. vfs_subr.c: Added new routines vfs_unmountall and vfs_unmountroot. Filesystems are now dismounted if the machine is properly rebooted. ffs_vfsops.c: Toggle clean bit at the appropriate places. Print warning if an unclean FS is mounted. ffs_vfsops.c, lfs_vfsops.c: Fix bug in selecting proper flags for VOP_CLOSE(). vfs_syscalls.c: Disallow dismounting root FS via umount syscall.
Revision 1.54: download - view: text, markup, annotated - select for diffs
Fri Aug 19 11:45:15 1994 UTC (17 years, 5 months ago) by davidg
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +2 -2 lines
Terry Lambert's loadable kernel module support w/improvements from the NetBSD group.
Revision 1.53: download - view: text, markup, annotated - select for diffs
Thu Aug 18 22:34:40 1994 UTC (17 years, 5 months ago) by wollman
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +2 -3 lines
Fix up some sloppy coding practices: - Delete redundant declarations. - Add -Wredundant-declarations to Makefile.i386 so they don't come back. - Delete sloppy COMMON-style declarations of uninitialized data in header files. - Add a few prototypes. - Clean up warnings resulting from the above. NB: ioconf.c will still generate a redundant-declaration warning, which is unavoidable unless somebody volunteers to make `config' smarter.
Revision 1.52: download - view: text, markup, annotated - select for diffs
Sat Aug 13 14:21:42 1994 UTC (17 years, 6 months ago) by davidg
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +2 -2 lines
Made the kernel compile cleanly with gcc 2.6.0. Thanks go to Bruce Evans for suggesting a method to detect various versions of gcc.
Revision 1.51: download - view: text, markup, annotated - select for diffs
Sat Aug 13 03:49:42 1994 UTC (17 years, 6 months ago) by wollman
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +17 -17 lines
Change all #includes to follow the current Berkeley style. Some of these ``changes'' are actually not changes at all, but CVS sometimes has trouble telling the difference. This also includes support for second-directory compiles. This is not quite complete yet, as `config' doesn't yet do the right thing. You can still make it work trivially, however, by doing the following: rm /sys/compile mkdir /usr/obj/sys/compile ln -s M-. /sys/compile cd /sys/i386/conf config MYKERNEL cd ../../compile/MYKERNEL ln -s /sys @ rm machine ln -s @/i386/include machine make depend make
Revision 1.50: download - view: text, markup, annotated - select for diffs
Wed Aug 10 23:28:26 1994 UTC (17 years, 6 months ago) by wollman
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +10 -1 lines
Tell Pentium users their CPU speed. (More changes to make use of this to come later.)
Revision 1.49: download - view: text, markup, annotated - select for diffs
Wed Aug 10 03:53:33 1994 UTC (17 years, 6 months ago) by wollman
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +2 -2 lines
Some programs (like GNU configure programs) depend on the output of `uname -s' to be something reasonable (traditionally, `i386') rather than `PC-Class'. Make it so.
Revision 1.48: download - view: text, markup, annotated - select for diffs
Wed Aug 10 03:51:07 1994 UTC (17 years, 6 months ago) by wollman
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +14 -7 lines
Add back in CPU detection copde from 1.1.5. As an added bonus, the hw.model MIB variable is now declared correctly.
Revision 1.47: download - view: text, markup, annotated - select for diffs
Sat Aug 6 09:15:14 1994 UTC (17 years, 6 months ago) by davidg
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +12 -9 lines
Incorporated post 1.1.5 work from John Dyson. This includes performance improvements via the new routines pmap_qenter/pmap_qremove and pmap_kenter/ pmap_kremove. These routine allow fast mapping of pages for those architectures that have "normal" MMUs. Also included is a fix to the pageout daemon to properly check a queue end condition. Submitted by: John Dyson
Revision 1.46: download - view: text, markup, annotated - select for diffs
Thu Aug 4 06:10:27 1994 UTC (17 years, 6 months ago) by davidg
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +1 -28 lines
Nuked #if 0'd _insque and _remque routines - they are now inlined in cpufunc.h.
Revision 1.45: download - view: text, markup, annotated - select for diffs
Wed Aug 3 02:45:26 1994 UTC (17 years, 6 months ago) by davidg
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +6 -3 lines
Merged in post-1.1.5 work done by myself and John Dyson. This includes: me: 1) TLB flush optimization that effectively eliminates half of all of the TLB flushes. This works by only flushing the TLB when a page is "present" in memory (i.e. the valid bit is set in the page table entry). See section 5.3.5 of the Intel 386 Programmer's Reference Manual. 2) The handling of "CMAP" has been improved to catch attempts at multiple simultaneous use. John: 1) Added pmap_qenter/pmap_qremove functions for fast mapping of pages into the kernel. This is for future optimizations and support for the upcoming merged VM/buffer cache. Reviewed by: John Dyson
Revision 1.44: download - view: text, markup, annotated - select for diffs
Sat Jun 4 11:01:15 1994 UTC (17 years, 8 months ago) by davidg
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +1 -1 lines
Removed extra (bogus) declaration of Xrsvd14 that was confusing me.
Revision 1.43: download - view: text, markup, annotated - select for diffs
Wed May 25 08:53:59 1994 UTC (17 years, 8 months ago) by rgrimes
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +163 -56 lines
The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch. Reviewed by: Rodney W. Grimes Submitted by: John Dyson and David Greenman
Revision 1.36.2.5: download - view: text, markup, annotated - select for diffs
Mon Apr 18 04:56:56 1994 UTC (17 years, 9 months ago) by rgrimes
Branches: old_BETA_1_1
CVS tags: old_GAMMA_1_1, old_FINAL_1_1
Diff to: previous 1.36.2.4: preferred, colored; branchpoint 1.36: preferred, colored; next MAIN 1.37: preferred, colored
Changes since revision 1.36.2.4: +11 -1 lines
>From David Greenman/John Dyson: machdep.c: Buffer headers which were used in physical IO were being released to the buffer cache queues, and this could lead to a panic. pmap.c: The clean bit on pages was being cleared at times when it shouldn't have been. This resulted in pages being paged out when they shouldn't, which caused "vnode pager error 5" errors when this occurred over NFS and the user doesn't have write access to the backing store file.
Revision 1.36.2.4: download - view: text, markup, annotated - select for diffs
Mon Apr 18 03:03:34 1994 UTC (17 years, 9 months ago) by rgrimes
Branches: old_BETA_1_1
Diff to: previous 1.36.2.3: preferred, colored; branchpoint 1.36: preferred, colored
Changes since revision 1.36.2.3: +2 -2 lines
Fix my calculation of how much memory is printed in the WARNING message about 16MB, it was WAY wrong!
Revision 1.36.2.3: download - view: text, markup, annotated - select for diffs
Sun Apr 17 19:23:06 1994 UTC (17 years, 9 months ago) by rgrimes
Branches: old_BETA_1_1
Diff to: previous 1.36.2.2: preferred, colored; branchpoint 1.36: preferred, colored
Changes since revision 1.36.2.2: +4 -3 lines
Make the message about >16MB read:
printf("GENERIC* kernels only USE the first 16MB of your ");
printf("%dMB.\n", (pagesinext + 1024) * PAGE_SIZE);
Revision 1.36.2.2: download - view: text, markup, annotated - select for diffs
Sun Apr 17 18:34:22 1994 UTC (17 years, 9 months ago) by rgrimes
Branches: old_BETA_1_1
Diff to: previous 1.36.2.1: preferred, colored; branchpoint 1.36: preferred, colored
Changes since revision 1.36.2.1: +22 -1 lines
This is a hack for the GENERIC* kernels that checks for >16MB of memory,
if it finds >16MB of memory it truncates memory to 16MB. This can be
disabled by setting generic_hack to 0 using gdb.
It prints the following if it finds >16MB:
printf("WARNING WARNING WARNING WARNING WARNING WARNING\n");
printf("GENERIC* kernels only support 16MB of memory.\n");
printf("Read the RELNOTES.FreeBSD file for the reason.\n");
printf("WARNING WARNING WARNING WARNING WARNING WARNING\n");
Revision 1.42: download - view: text, markup, annotated - select for diffs
Sat Apr 2 07:00:26 1994 UTC (17 years, 10 months ago) by davidg
Branches: MAIN
CVS tags: old_REL_before_johndavid_2_0_0, old_MOVED_NEWCVS
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +11 -22 lines
New interrupt code from Bruce Evans. In additional to Bruce's attached list of changes, I've made the following additional changes: 1) i386/include/ipl.h renamed to spl.h as the name conflicts with the file of the same name in i386/isa/ipl.h. 2) changed all use of *mask (i.e. netmask, biomask, ttymask, etc) to *_imask (net_imask, etc). 3) changed vestige of splnet use in if_is to splimp. 4) got rid of "impmask" completely (Bruce had gotten rid of netmask), and are now using net_imask instead. 5) dozens of minor cruft to glue in Bruce's changes. These require changes I made to config(8) as well, and thus it must be rebuilt. -DG from Bruce Evans: sio: o No diff is supplied. Remove the define of setsofttty(). I hope that is enough. *.s: o i386/isa/debug.h no longer exists. The event counters became too much trouble to maintain. All function call entry and exception entry counters can be recovered by using profiling kernel (the new profiling supports all entry points; however, it is too slow to leave enabled all the time; it also). Only BDBTRAP() from debug.h is now used. That is moved to exception.s. It might be worth preserving SHOW_BITS() and calling it from _mcount() (if enabled). o T_ASTFLT is now only set just before calling trap(). o All exception handlers set SWI_AST_MASK in cpl as soon as possible after entry and arrange for _doreti to restore it atomically with exiting. It is not possible to set it atomically with entering the kernel, so it must be checked against the user mode bits in the trap frame before committing to using it. There is no place to store the old value of cpl for syscalls or traps, so there are some complications restoring it. Profiling stuff (mostly in *.s): o Changes to kern/subr_mcount.c, gcc and gprof are not supplied yet. o All interesting labels `foo' are renamed `_foo' and all uninteresting labels `_bar' are renamed `bar'. A small change to gprof allows ignoring labels not starting with underscores. o MCOUNT_LABEL() is to provide names for counters for times spent in exception handlers. o FAKE_MCOUNT() is a version of MCOUNT() suitable for exception handlers. Its arg is the pc where the exception occurred. The new mcount() pretends that this was a call from that pc to a suitable MCOUNT_LABEL(). o MEXITCOUNT is to turn off any timer started by MCOUNT(). /usr/src/sys/i386/i386/exception.s: o The non-BDB BPTTRAP() macros were doing a sti even when interrupts were disabled when the trap occurred. The sti (fixed) sti is actually a no-op unless you have my changes to machdep.c that make the debugger trap gates interrupt gates, but fixing that would make the ifdefs messier. ddb seems to be unharmed by both interrupts always disabled and always enabled (I had the branch in the fix back to front for some time :-(). o There is no known pushal bug. o tf_err can be left as garbage for syscalls. /usr/src/sys/i386/i386/locore.s: o Fix and update BDE_DEBUGGER support. o ENTRY(btext) before initialization was dangerous. o Warm boot shot was longer than intended. /usr/src/sys/i386/i386/machdep.c: o DON'T APPLY ALL OF THIS DIFF. It's what I'm using, but may require other changes. Use the following: o Remove aston() and setsoftclock(). Maybe use the following: o No netisr.h. o Spelling fix. o Delay to read the Rebooting message. o Fix for vm system unmapping a reduced area of memory after bounds_check_with_label() reduces the size of a physical i/o for a partition boundary. A similar fix is required in kern_physio.c. o Correct use of __CONCAT. It never worked here for non- ANSI cpp's. Is it time to drop support for non-ANSI? o gdt_segs init. 0xffffffffUL is bogus because ssd_limit is not 32 bits. The replacement may have the same value :-), but is more natural. o physmem was one page too low. Confusing variable names. Don't use the following: o Better numbers of buffers. Each 8K page requires up to 16 buffer headers. On my system, this results in 5576 buffers containing [up to] 2854912 bytes of memory. The usual allocation of about 384 buffers only holds 192K of disk if you use it on an fs with a block size of 512. o gdt changes for bdb. o *TGT -> *IDT changes for bdb. o #ifdefed changes for bdb. /usr/src/sys/i386/i386/microtime.s: o Use the correct asm macros. I think asm.h was copied from Mach just for microtime and isn't used now. It certainly doesn't belong in <sys>. Various macros are also duplicated in sys/i386/boot.h and libc/i386/*.h. o Don't switch to and from the IRR; it is guaranteed to be selected (default after ICU init and explicitly selected in isa.c too, and never changed until the old microtime clobbered it). /usr/src/sys/i386/i386/support.s: o Non-essential changes (none related to spls or profiling). o Removed slow loads of %gs again. The LDT support may require not relying on %gs, but loading it is not the way to fix it! Some places (copyin ...) forgot to load it. Loading it clobbers the user %gs. trap() still loads it after certain types of faults so that fuword() etc can rely on it without loading it explicitly. Exception handlers don't restore it. If we want to preserve the user %gs, then the fastest method is to not touch it except for context switches. Comparing with VM_MAXUSER_ADDRESS and branching takes only 2 or 4 cycles on a 486, while loading %gs takes 9 cycles and using it takes another. o Fixed a signed branch to unsigned. /usr/src/sys/i386/i386/swtch.s: o Move spl0() outside of idle loop. o Remove cli/sti from idle loop. sw1 does a cli, and in the unlikely event of an interrupt occurring and whichqs becoming zero, sw1 will just jump back to _idle. o There's no spl0() function in asm any more, so use splz(). o swtch() doesn't need to be superaligned, at least with the new mcounting. o Fixed a signed branch to unsigned. o Removed astoff(). /usr/src/sys/i386/i386/trap.c: o The decentralized extern decls were inconsistent, of course. o Fixed typo MATH_EMULTATE in comments. */ o Removed unused variables. o Old netmask is now impmask; print it instead. Perhaps we should print some of the new masks. o BTW, trap() should not print anything for normal debugger traps. /usr/src/sys/i386/include/asmacros.h: o DON'T APPLY ALL OF THIS DIFF. Just use some of the null macros as necessary. /usr/src/sys/i386/include/cpu.h: o CLKF_BASEPRI() changes since cpl == SWI_AST_MASK is now normal while the kernel is running. o Don't use var++ to set boolean variables. It fails after a mere 4G times :-) and is slower than storing a constant on [3-4]86s. /usr/src/sys/i386/include/cpufunc.h: o DON'T APPLY ALL OF THIS DIFF. You need mainly the include of <machine/ipl.h>. Unfortunately, <machine/ipl.h> is needed by almost everything for the inlines. /usr/src/sys/i386/include/ipl.h: o New file. Defines spl inlines and SWI macros and declares most variables related to hard and soft interrupt masks. /usr/src/sys/i386/isa/icu.h: o Moved definitions to <machine/ipl.h> /usr/src/sys/i386/isa/icu.s: o Software interrupts (SWIs) and delayed hardware interrupts (HWIs) are now handled uniformally, and dispatching them from splx() is more like dispatching them from _doreti. The dispatcher is essentially *(handler[ffs(ipending & ~cpl)](). o More care (not quite enough) is taken to avoid unbounded nesting of interrupts. o The interface to softclock() is changed so that a trap frame is not required. o Fast interrupt handlers are now handled more uniformally. Configuration is still too early (new handlers would require bits in <machine/ipl.h> and functions to vector.s). o splnnn() and splx() are no longer here; they are inline functions (could be macros for other compilers). splz() is the nontrivial part of the old splx(). /usr/src/sys/i386/isa/ipl.h o New file. Supposed to have only bus-dependent stuff. Perhaps the h/w masks should be declared here. /usr/src/sys/i386/isa/isa.c: o DON'T APPLY ALL OF THIS DIFF. You need only things involving *mask and *MASK and comments about them. netmask is now a pure software mask. It works like the softclock mask. /usr/src/sys/i386/isa/vector.s: o Reorganize AUTO_EOI* macros. o Option FAST_INTR_HANDLER_USERS_ES for people who don't trust fastintr handlers. o fastintr handlers need to metamorphose into ordinary interrupt handlers if their SWI bit has become set. Previously, sio had unintended latency for handling output completions and input of SLIP framing characters because this was not done. /usr/src/sys/net/netisr.h: o The machine-dependent stuff is now imported from <machine/ipl.h>. /usr/src/sys/sys/systm.h o DON'T APPLY ALL OF THIS DIFF. You need mainly the different splx() prototype. The spl*() prototypes are duplicated as inlines in <machine/ipl.h> but they need to be duplicated here in case there are no inlines. I sent systm.h and cpufunc.h to Garrett. We agree that spl0 should be replaced by splnone and not the other way around like I've done. /usr/src/sys/kern/kern_clock.c o splsoftclock() now lowers cpl so the direct call to softclock() works as intended. o softclock() interface changed to avoid passing the whole frame (some machines may need another change for profile_tick()). o profiling renamed _profiling to avoid ANSI namespace pollution. (I had to improve the mcount() interface and may as well fix it.) The GUPROF variant doesn't actually reference profiling here, but the 'U' in GUPROF should mean to select the microtimer mcount() and not change the interface.
Revision 1.41: download - view: text, markup, annotated - select for diffs
Wed Mar 30 02:31:11 1994 UTC (17 years, 10 months ago) by davidg
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +1 -21 lines
Eliminated the "physstrat" wart and merged it into kern_physio.c. This patch also fixes a bug which causes a kernel VM leak.
Revision 1.40: download - view: text, markup, annotated - select for diffs
Wed Mar 23 09:15:03 1994 UTC (17 years, 10 months ago) by davidg
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +26 -1 lines
Bounce buffers. From John Dyson with help from me.
Revision 1.39: download - view: text, markup, annotated - select for diffs
Sat Mar 19 23:58:58 1994 UTC (17 years, 10 months ago) by wollman
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +4 -1 lines
Added cpu_model and machine variables.
Revision 1.38: download - view: text, markup, annotated - select for diffs
Mon Mar 7 11:47:31 1994 UTC (17 years, 11 months ago) by davidg
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +3 -3 lines
1) enhanced in_cksum from Bruce Evans. 2) minor comment change in machdep.c 3) enhanced bzero from John Dyson (twice as fast on a 486DX/33)
Revision 1.36.2.1: download - view: text, markup, annotated - select for diffs
Mon Mar 7 01:23:42 1994 UTC (17 years, 11 months ago) by rgrimes
Branches: old_BETA_1_1
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +48 -8 lines
>From main branch: validate sigcontext before restoring it
Revision 1.37: download - view: text, markup, annotated - select for diffs
Thu Feb 24 00:18:04 1994 UTC (17 years, 11 months ago) by hsu
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +48 -8 lines
validate sigcontext before restoring it
Revision 1.36: download - view: text, markup, annotated - select for diffs
Tue Feb 8 12:58:44 1994 UTC (18 years ago) by davidg
Branches: MAIN
CVS tags: old_BP_BETA_1_1
Branch point for: old_BETA_1_1
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +2 -2 lines
From: Dave Matthews <dave@prlng.co.uk> Description: The integer overflow instruction (into) and the interrupt instruction with value 4 (int #4) both give rise to SIGBUS signals rather than SIGFPE. The problem is that overflow is a trap not a fault (unlike the BOUND instruction).
Revision 1.35: download - view: text, markup, annotated - select for diffs
Tue Feb 8 09:25:53 1994 UTC (18 years ago) by davidg
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +10 -2 lines
Fixed bugs in stack grow code, and moved it back into a seperate function like it was originally. Also added back call to "grow" in sendsig now that this routine actually works.
Revision 1.34: download - view: text, markup, annotated - select for diffs
Mon Feb 7 07:44:42 1994 UTC (18 years ago) by davidg
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +7 -2 lines
Fixed calculation of physmem when the special MAXMEM kernel config overide is used. This bug caused the buffer cache to be WAY too big when memory was being restricted - resulting in hangs and other out of memory problems.
Revision 1.33: download - view: text, markup, annotated - select for diffs
Tue Feb 1 10:03:43 1994 UTC (18 years ago) by davidg
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +5 -1 lines
Bug fix from previous WINE commit. From Jeffrey Hsu.
Revision 1.32: download - view: text, markup, annotated - select for diffs
Mon Jan 31 23:47:25 1994 UTC (18 years ago) by davidg
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +89 -17 lines
Added four pattern memory test routine that is done at startup.
Revision 1.31: download - view: text, markup, annotated - select for diffs
Mon Jan 31 10:26:55 1994 UTC (18 years ago) by davidg
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +49 -43 lines
WINE/user LDT support from John Brezak, ported to FreeBSD by Jeffrey Hsu <hsu@soda.berkeley.edu>.
Revision 1.30: download - view: text, markup, annotated - select for diffs
Mon Jan 31 04:18:32 1994 UTC (18 years ago) by davidg
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +1 -49 lines
VM system performance improvements from John Dyson and myself. The following is a summary: 1) increased object cache back up to a more reasonable value. 2) removed old & bogus cruft from machdep.c (clearseg, copyseg, physcopyseg, etc). 3) inlined many functions in pmap.c 4) changed "load_cr3(rcr3())" into tlbflush() and made tlbflush inline assembly. 5) changed the way that modified pages are tracked - now vm_page struct is kept updated directly - no more scanning page tables. 6) removed lots of unnecessary spl's 7) removed old unused functions from pmap.c 8) removed all use of page_size, page_shift, page_mask variables - replaced with PAGE_ constants. 9) moved trunc/round_page, atop, ptoa, out of vm_param.h and into i386/ include/param.h, and optimized them. 10) numerous changes to sys/vm/ swap_pager, vnode_pager, pageout, fault code to improve performance. LRU algorithm modified to be more effective, read ahead/behind values tuned for better performance, etc, etc...
Revision 1.29: download - view: text, markup, annotated - select for diffs
Fri Jan 21 09:56:05 1994 UTC (18 years ago) by davidg
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +21 -1 lines
System V IPC code from Danny Boulet, chewed on a bit by the NetBSD group and then some more by Jeffrey Hsu (who provided this port for FreeBSD).
Revision 1.28: download - view: text, markup, annotated - select for diffs
Thu Jan 20 23:17:39 1994 UTC (18 years ago) by davidg
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +2 -2 lines
Pointed out by Wolfgang Solfrank: Correct parameters of sync
Revision 1.27: download - view: text, markup, annotated - select for diffs
Thu Jan 20 17:49:57 1994 UTC (18 years ago) by davidg
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +18 -14 lines
Removed some more old unused code/comments. Added hack to "fix" the problem with some chipsets (UMC) remapping the 'hole' memory even when you've got 16MB. People were led to believe that since there was only 16MB of memory in the machine, that they were okay wrt the ISA DMA limit. This hack simply causes the extra memory to be ignored if it appears around the 16MB limit.
Revision 1.26: download - view: text, markup, annotated - select for diffs
Thu Jan 20 17:21:28 1994 UTC (18 years ago) by davidg
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +32 -37 lines
Improved algorithm that calculates the pages in the base memory - If the BIOS says that the amount is *between* 0-640K, believe it. Cleaned up the comments a bit, removed some old cruff, etc.
Revision 1.25: download - view: text, markup, annotated - select for diffs
Fri Jan 14 16:23:35 1994 UTC (18 years ago) by davidg
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +28 -38 lines
"New" VM system from John Dyson & myself. For a run-down of the major changes, see the log of any effected file in the sys/vm directory (swap_pager.c for instance).
Revision 1.24: download - view: text, markup, annotated - select for diffs
Mon Jan 3 07:55:21 1994 UTC (18 years, 1 month ago) by davidg
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +64 -210 lines
Convert syscall to trapframe. Based on work done by John Brezak.
Revision 1.23: download - view: text, markup, annotated - select for diffs
Wed Dec 22 13:12:04 1993 UTC (18 years, 1 month ago) by davidg
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +6 -6 lines
Raised minimum buffer cache from 128k to 256k.
Revision 1.22: download - view: text, markup, annotated - select for diffs
Sun Dec 19 00:50:03 1993 UTC (18 years, 1 month ago) by wollman
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +23 -9 lines
Make everything compile with -Wtraditional. Make it easier to distribute a binary link-kit. Make all non-optional options (pagers, procfs) standard, and update LINT to reflect new symtab requirements. NB: -Wtraditional will henceforth be forgotten. This editing pass was primarily intended to detect any constructions where the old code might have been relying on traditional C semantics or syntax. These were all fixed, and the result of fixing some of them means that -Wall is now a realistic possibility within a few weeks.
Revision 1.21: download - view: text, markup, annotated - select for diffs
Sun Dec 12 12:22:56 1993 UTC (18 years, 2 months ago) by davidg
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +1 -4 lines
1) Added proc file system from Paul Kranenburg with changes from John Dyson to make it reliably work under FreeBSD. 2) Added and enabled PROCFS in the GENERICxx and LINT kernels. 3) New execve() from me. Still work to be done here, but this version works well and is needed before other changes can be made. For a description of the design behind this, see freebsd-arch or ask me. 4) Rewrote stack fault code; made user stack VM grow as needed rather than all up front; improves performance a little and reduces process memory requirements. 5) Incorporated fix from Gene Stark to fault/wire a user page table page to fix a problem in copyout. This is a temporary fix and is not appropriate for pageable page tables. For a description of the problem, see Gene's post to the freebsd-hackers mailing list. 6) Tighten up vm_page struct to reduce memory requirements for it. ifdef pager page lock code as it's not being used currently. 7) Introduced new element to vmspace struct - vm_minsaddr; initial (minimum) stack address. Compliment to vm_maxsaddr. 8) Added a panic if the allocation for process u-pages fails. 9) Improve performance and accuracy of kernel profiling by putting in a little inline assembly instead of spl(). 10) Made serial console with sio driver work. Still has problems with serial input, but is almost useable. 11) Added -Bstatic to SYSTEM_LD in Makefile.i386 so that kernels will build properly with the new ld.
Revision 1.20: download - view: text, markup, annotated - select for diffs
Fri Dec 3 05:07:43 1993 UTC (18 years, 2 months ago) by alm
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +2 -1 lines
From: Jeffrey Hsu <hsu@soda.berkeley.edu> The following patch adds the addr argument to signal handlers. The kernel with the patch is no more and no less in compliance or in violation of POSIX and ANSI C than the kernel before the patch. The added functionality this addr argument provides is quite useful. It enables an entire class of algorithms which use mprotect to trace memory references. Beside garbage collectors, I have heard of this technique being applied to debuggers and profilers. The only benchmarking I've performed is using akcl to compile maxima: without the kernel patch, it takes 7 hours to compile maxima, while with stratified garbage collection, it only takes 50 minutes. Basically, I can't think of a reason not to add the addr argument and there is a compelling need for it. If you find the patch acceptable, please let me know so I can send my FreeBSD akcl config files to wfs for inclusion in the core akcl release. The old 386BSD config files there won't work on either NetBSD or FreeBSD.
Revision 1.19: download - view: text, markup, annotated - select for diffs
Thu Nov 25 01:30:55 1993 UTC (18 years, 2 months ago) by wollman
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +31 -16 lines
Make the LINT kernel compile with -W -Wreturn-type -Wcomment -Werror, and add same (sans -Werror) to Makefile for future compilations.
Revision 1.18: download - view: text, markup, annotated - select for diffs
Wed Nov 17 23:24:56 1993 UTC (18 years, 2 months ago) by wollman
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +2 -2 lines
Fixed comments that start within a comment, so code compiles cleanly with -Wcomment.
Revision 1.17: download - view: text, markup, annotated - select for diffs
Tue Nov 16 09:54:47 1993 UTC (18 years, 2 months ago) by davidg
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +168 -1 lines
new process tracing code from Sean Eric Fagen (sef@kithrup.com). ...also, fixed up the syscall args to make GCC happy.
Revision 1.12.2.1: download - view: text, markup, annotated - select for diffs
Sun Nov 14 18:12:40 1993 UTC (18 years, 2 months ago) by rgrimes
Branches: old_BRANCH_1_0
CVS tags: old_FINAL_1_0_2
Diff to: previous 1.12: preferred, colored; next MAIN 1.13: preferred, colored
Changes since revision 1.12: +28 -5 lines
Pull stabalizing patches by David Greenman into the BRANCH_1_0 tree
Revision 1.16: download - view: text, markup, annotated - select for diffs
Sat Nov 13 02:25:02 1993 UTC (18 years, 3 months ago) by davidg
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +27 -4 lines
First steps in rewriting locore.s, and making info useful when the machine panics. i386/i386/locore.s: 1) got rid of most .set directives that were being used like #define's, and replaced them with appropriate #define's in the appropriate header files (accessed via genassym). 2) added comments to header inclusions and global definitions, and global variables 3) replaced some hardcoded constants with cpp defines (such as PDESIZE and others) 4) aligned all comments to the same column to make them easier to read 5) moved macro definitions for ENTRY, ALIGN, NOP, etc. to /sys/i386/include/asmacros.h 6) added #ifdef BDE_DEBUGGER around all of Bruce's debugger code 7) added new global '_KERNend' to store last location+1 of kernel 8) cleaned up zeroing of bss so that only bss is zeroed 9) fix zeroing of page tables so that it really does zero them all - not just if they follow the bss. 10) rewrote page table initialization code so that 1) works correctly and 2) write protects the kernel text by default 11) properly initialize the kernel page directory, upages, p0stack PT, and page tables. The previous scheme was more than a bit screwy. 12) change allocation of virtual area of IO hole so that it is fixed at KERNBASE + 0xa0000. The previous scheme put it right after the kernel page tables and then later expected it to be at KERNBASE +0xa0000 13) change multiple bogus settings of user read/write of various areas of kernel VM - including the IO hole; we should never be accessing the IO hole in user mode through the kernel page tables 14) split kernel support routines such as bcopy, bzero, copyin, copyout, etc. into a seperate file 'support.s' 15) split swtch and related routines into a seperate 'swtch.s' 16) split routines related to traps, syscalls, and interrupts into a seperate file 'exception.s' 17) remove some unused global variables from locore that got inserted by Garrett when he pulled them out of some .h files. i386/isa/icu.s: 1) clean up global variable declarations 2) move in declaration of astpending and netisr i386/i386/pmap.c: 1) fix calculation of virtual_avail. It previously was calculated to be right in the middle of the kernel page tables - not a good place to start allocating kernel VM. 2) properly allocate kernel page dir/tables etc out of kernel map - previously only took out 2 pages. i386/i386/machdep.c: 1) modify boot() to print a warning that the system will reboot in PANIC_REBOOT_WAIT_TIME amount of seconds, and let the user abort with a key on the console. The machine will wait for ever if a key is typed before the reboot. The default is 15 seconds, but can be set to 0 to mean don't wait at all, -1 to mean wait forever, or any positive value to wait for that many seconds. 2) print "Rebooting..." just before doing it. kern/subr_prf.c: 1) remove PANICWAIT as it is deprecated by the change to machdep.c i386/i386/trap.c: 1) add table of trap type strings and use it to print a real trap/ panic message rather than just a number. Lot's of work to be done here, but this is the first step. Symbolic traceback is in the TODO. i386/i386/Makefile.i386: 1) add support in to build support.s, exception.s and swtch.s ...and various changes to various header files to make all of the above happen.
Revision 1.15: download - view: text, markup, annotated - select for diffs
Sun Nov 7 21:47:00 1993 UTC (18 years, 3 months ago) by wollman
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +2 -2 lines
Get rid of WFJ's use of sleep() for more user-friendly tsleep().
Revision 1.14: download - view: text, markup, annotated - select for diffs
Fri Oct 29 09:06:56 1993 UTC (18 years, 3 months ago) by davidg
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +2 -2 lines
Whoops, the algorithm I last used was messed up - I left off parans, and should have used PGSHIFT instead of PAGE_SHIFT.
Revision 1.13: download - view: text, markup, annotated - select for diffs
Fri Oct 29 08:58:34 1993 UTC (18 years, 3 months ago) by davidg
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +2 -2 lines
Change filesystem buffer cache size calculation to be less for 4MB machines (now 20% of all memory after the first 3MB). This is necessary in order for 4MB machine to be able to rebuild the entire source tree and not run out of physical memory because of fixed memory requirements of processes and kernel VM.
Revision 1.12: download - view: text, markup, annotated - select for diffs
Fri Oct 15 10:34:22 1993 UTC (18 years, 3 months ago) by rgrimes
Branches: MAIN
CVS tags: old_FINAL_1_0
Branch point for: old_BRANCH_1_0
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +17 -9 lines
genassym.c: Remove NKMEMCLUSTERS, it is no longer define or used. locores.s: Fix comment on PTDpde and APTDpde to be pde instead of pte Add new equation for calculating location of Sysmap Remove Bill's old #ifdef garbage for counting up memory, that stuff will never be made to work and was just cluttering up the file. Add code that places the PTD, page table pages, and kernel stack below the 640k ISA hole if there is room for it, otherwise put this stuff all at 1MB. This fixes the 28K bogusity in the boot blocks, that can now go away! Fix the caclulation of where first is to be dependent on NKPDE so that we can skip over the above mentioned areas. The 28K thing is now 44K in size due to the increase in kernel virtual memory space, but since we no longer have to worry about that this is no big deal. Use if NNPX > 0 instead of ifdef NPX for floating point code. machdep.c Change the calculation of for the buffer cache to be 20% of all memory above 2MB and add back the upper limit of 2/5's of the VM_KMEM_SIZE so that we do not eat ALL of the kernel memory space on large memory machines, note that this will not even come into effect unless you have more than 32MB. The current buffer cache limit is 6.7MB due to this caclulation. It seems that we where erroniously allocating bufpages pages for buffer_map. buffer_map is UNUSED in this implementation of the buffer cache, but since the map is referenced in several if statements a quick fix was to simply allocate 1 vm page (but no real memory) to it. pmap.h Remove rcsid, don't want them in the kernel files! Removed some cruft inside an #ifdef DEBUGx that caused compiler errors if you where compiling this for debug. Use the #defines for PD_SHIFT and PG_SHIFT in place of constants. trap.c: Remove patch kit header and rcsid, fix $Id$. Now include "npx.h" and use NNPX for controlling the floating point code. Remove a now completly invalid check for a maximum virtual address, the virtual address now ends at 0xFFFFFFFF so there is no more MAX!! (Thanks David, I completly missed that one!) vm_machdep.c Remove patch kit header and rcsid, fix $Id$. Now include "npx.h" and use NNPX for controlling the floating point code. Replace several 0xFE00000 constants with KERNBASE
Revision 1.11: download - view: text, markup, annotated - select for diffs
Thu Oct 14 18:15:35 1993 UTC (18 years, 4 months ago) by rgrimes
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +6 -8 lines
>From David Greenman Bruce Evans had limited the kernel virtual address space to not include the last 4MB since it was not being used. Other changes are being made that will reloate the Alternate Page Directory Table (APDT) into this area so the limit is being fixed to be the last virtual address. (Infact with this patch you can now do that relocation)
Revision 1.10: download - view: text, markup, annotated - select for diffs
Sun Oct 10 06:01:44 1993 UTC (18 years, 4 months ago) by rgrimes
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +4 -1 lines
Added a compile time #error so that if the user does not specify on of the proper I_X86CPU in the config file the following error will occur while building the kernel: (had to line wrap the error for this message) ../../i386/i386/machdep.c:343: #error This kernel is not configured for one \ of the supported CPUs
Revision 1.9: download - view: text, markup, annotated - select for diffs
Fri Oct 8 20:45:12 1993 UTC (18 years, 4 months ago) by rgrimes
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +185 -71 lines
All: removed patch kit headers and sccsids, add $Id$. This is a general clean up and reallignment with NetBSD-current where possible. genassym.c: removed extranious include of reg.h removed old FP_* defines that have been ifdefed out since the patch kit removed PCB_SIGC that is not referenced anywhere add trapframe and sigframe defines add KERNBASE define for use in locore.s locore.s: include npx.h and use NNPX for turning on and off FPU include machine/cputypes.h for the types of cpu (used in cpu_identify) change SYSPDREND to be one higher, this is really the base of the next area, and will be changing again next time I revise the file Reverse the NOP defines, you now get slow NOP's by default, this may be what is casuing us trouble with some systems. If you want the NOPS to be null you now need to have options DUMMY_NOPS. Now get esym from the boot blocks which don't pass it yet, and it is not used, but this will be changing. Move the bit_colors stuff to be in with the rest of Bruces SHOW_A_LOT things for debugging. Added NetBSD's CPU type probe code, we now know what type of CPU we are running on. Adjust kernel pde calcuation to correct for change in SYSPDREND, no longer need the +1. machdep.c include npx.h and use NNPX for turning on and off FPU include isa.h, map.h(new file), exec.h in preperation for changes that are still in process. Add some of the code for MACHINE_NONCONTIG that will alow us to better map around the BIOS memory area. Now print the version, cpu id, real memory and availiable memory during boot. Correct the calculation of bufpages, the code was mixing pages and bytes, it now does the right things. Removed Bill's hack for limiting the erronous calculation. add the identifycpu print out code from NetBSD. remove the definition of the sigframe struct, it belongs in frame.h put in printf's about syncing disks on a halt/reboot. Change the halted message to be a little easier reading. Clean up of the dump messages, makes the source and the output much more readable. Change 0,0 in several places to have spaces after the commas.
Revision 1.8: download - view: text, markup, annotated - select for diffs
Fri Oct 8 10:47:13 1993 UTC (18 years, 4 months ago) by rgrimes
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +3 -20 lines
Removed patch kit headers, and rcsid, add $Id$, relocate Terry Lamberts
copyright to match the location that it is in NetBSD.
Remove the __main() {} dummy function, it belongs in kern/init_main.c
Revision 1.7: download - view: text, markup, annotated - select for diffs
Fri Sep 24 21:00:29 1993 UTC (18 years, 4 months ago) by rgrimes
Branches: MAIN
CVS tags: old_EPSILON_1_0
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +4 -1 lines
>From: rich@id.slip.bcm.tmc.edu.cdrom.com (Rich Murphey) Date: Sun, 12 Sep 1993 18:19:05 -0500 This will allow you to compile and run a freebsd kernel with shared memory support. I haven't tested the shm*() calls yet. You run out of page table descriptors if you specify 4Mb of sharable memory (SHMMAXPGS=1024). I don't know what the limit is, but SHMMAXPGS=64 works. Rich
Revision 1.6: download - view: text, markup, annotated - select for diffs
Mon Aug 9 06:16:41 1993 UTC (18 years, 6 months ago) by rgrimes
Branches: MAIN
CVS tags: old_GAMMA_1_0, old_BETA_1_0
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +5 -1 lines
From guido@gvr.win.tue.nl Sat Aug 7 06:58:04 1993 I posted some patches on the 386bsd_patchkit list to prohibit io access. Because of a noninitialised filed in the tss, this was possible. It is included below as the patch to machdep.c However, when you do this *necessary* fix (security), it will be impossible form within user space to do io. therefor, I included another fix: when you open /dev/io, you get the access. Of course you can rewrite it to use another minor and thus giving access to the iospace when /dev/mem is opened, e.g. NOTE: The /dev/io entry has not been added to /dev/MAKEDEV yet. The patch is in NetBSD.
Revision 1.5: download - view: text, markup, annotated - select for diffs
Tue Jul 27 10:52:17 1993 UTC (18 years, 6 months ago) by davidg
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +37 -8 lines
* Applied fixes from Bruce Evans to fix COW bugs, >1MB kernel loading, profiling, and various protection checks that cause security holes and system crashes. * Changed min/max/bcmp/ffs/strlen to be static inline functions - included from cpufunc.h in via systm.h. This change improves performance in many parts of the kernel - up to 5% in the networking layer alone. Note that this requires systm.h to be included in any file that uses these functions otherwise it won't be able to find them during the load. * Fixed incorrect call to splx() in if_is.c * Fixed bogus variable assignment to splx() in if_ed.c
Revision 1.4: download - view: text, markup, annotated - select for diffs
Fri Jul 16 23:55:07 1993 UTC (18 years, 6 months ago) by davidg
Branches: MAIN
CVS tags: old_ALPHA_1_0
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +3 -1 lines
New locore from Christoph Rubitschko.
Revision 1.3: download - view: text, markup, annotated - select for diffs
Fri Jul 16 20:50:42 1993 UTC (18 years, 6 months ago) by davidg
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +8 -5 lines
Updated kernel files to move occurances of "struct args" syscall argument definitions outside of the function parameter list. This is to reduce the copious warning messages that (non-Jolitz) gcc produces. Also fixed some bogus variable declarations and casts to make the compiler happy.
Revision 1.2: download - view: text, markup, annotated - select for diffs
Fri Jun 18 02:47:10 1993 UTC (18 years, 7 months ago) by paul
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +18 -11 lines
Upgrade to GCC 2.X
Revision 1.1.1.1 (vendor branch): download - view: text, markup, annotated - select for diffs
Sat Jun 12 14:58:06 1993 UTC (18 years, 8 months ago) by rgrimes
CVS tags: old_V_0_1_2_4
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +0 -0 lines
Initial import, 0.1 + pk 0.2.4-B1
Revision 1.1: download - view: text, markup, annotated - select for diffs
Sat Jun 12 14:58:05 1993 UTC (18 years, 8 months ago) by rgrimes
Branches: MAIN
Initial revision
