summaryrefslogtreecommitdiffstats
path: root/sys/amd64
Commit message (Collapse)AuthorAgeFilesLines
* Remove option I586_FAST_BCOPY. The code will be included by defaultasami1996-11-082-18/+18
| | | | | | | if I586_CPU is defined. Note there is a runtime check so the code won't be run for non-Pentium CPUs anyway. 2.2 candidate, this code has been tested for almost half year in -current.
* Fix the message buffer mapping. This actually allows to increasejoerg1996-11-072-34/+33
| | | | | | | the message buffer size in <sys/msgbuf.h>. Reviewed by: davidg,joerg Submitted by: bde
* Don't switch from fast interrupt handlers to normal interruptbde1996-11-072-8/+16
| | | | | | | | | | | | | handlers if interrupts are nested more than a few (3) deep. This only reduces the maximum nesting level by 1 with the standard drivers unless there is a related bug somewhere, but can't hurt much (the worst case is returning to hoggish interrupt handler like wdintr(), but such interrupt handlers hurt anyway). Fixed a previously harmless race incrementing the interrupt nesting level. This should be in 2.1.6 and 2.2.
* Count only hardware interrupts in cnt.v_intr, so that the individualbde1996-11-062-4/+4
| | | | | | | hardware interrupt counts add up to the total. Previously, software interrupts generated by splz() were counted in the total. These software interrupts seem to be very rare - there have apparently been 0 of them on freefall among the last 352448857 interrupts.
* Fix a problem with running down processes that have left wireddyson1996-11-031-3/+10
| | | | | | | | | | | | | mappings with mlock. This problem only occurred because of the quick unmap code not respecting the wired-ness of pages in the process. In the future, we need to eliminate the dependency intrinsic to the design of the code that wired pages actually be mapped. It is kind-of bogus not to have wired pages mapped, but it is also a weakness for the code to fall flat because of a missing page. This show fix a problem that Tor Egge has been having, and also should be included into 2.2-RELEASE.
* Further improved version of hadling a HALT when there is no console.julian1996-10-312-2/+13
|
* More merge and update.asami1996-10-308-13/+88
| | | | | | | | | | | | | | | | | | | | | | | | (1) deleted #if 0 pc98/pc98/mse.c (2) hold per-unit I/O ports in ed_softc pc98/pc98/if_ed.c pc98/pc98/if_ed98.h (3) merge more files by segregating changes into headers. new file (moved from pc98/pc98): i386/isa/aic_98.h deleted: well, it's already in the commit message so I won't repeat the long list here ;) Submitted by: The FreeBSD(98) Development Team
* Add two new aic7xxx driver options:gibbs1996-10-281-1/+4
| | | | | | | | | | | | | | AHC_FORCE_PIO - This forces the driver to use PIO even on systems that say they have memory mapped the controller's registers. This seems to fix Ken Lam's problems. I've also placed this option in the GENERIC kernel file so that we are guaranteed to install even on these flakey machines. AHC_SHARE_SCBS - This option attempts to share the external SCB SRAM on the 398X controllers allowing a totoll of 255 non-paged SCBs. This doesn't work quite yet, so this option is mostly here to help 398X owners to experiment and give me feedback until this works properly.
* Removed initialization of a variable that went away. Oops.bde1996-10-262-10/+6
|
* Print the clock calibration messages all on one (long) line again sobde1996-10-252-42/+36
| | | | | | | | that they are easy to grep for. Removed now-unused i586 counter variables. Fixed some style bugs.
* Improved biasing of i586 clock by adjusting for hardclock() latency.bde1996-10-251-51/+62
| | | | | | | | | | | | | | | | | | | | | I decided to do this for every hardclock() call instead of lazily in microtime(). The lazy method is simpler but has more overhead if microtime() is called a lot. CPU_THISTICKLEN() is now a no-op and should probably go away. Previously it did nothing directly but had the side effect of setting i586_last_tick for CPU_CLOCKUPDATE() and i586_avg_tick for debugging. CPU_CLOCKUPDATE() now uses a better method and i586_avg_tick is too much trouble to maintain. Reduced nesting of #includes in the usual case. Increased nesting of #includes when CLOCK_HAIR is defined. This is a kludge to get typedefs for inline functions only when the inline functions are used. Normally only kern_clock.c defines this. kern_clock.c can't include the i386 headers directly. Removed unused LOCORE support.
* Account for the UPAGES in the same way as before moving the MD codedyson1996-10-231-1/+5
| | | | from vm_glue into pmap.c. Now RSS should appear to be the same as before.
* Removing old isdn stuff.phk1996-10-201-7/+1
|
* Improved non-statistical (GUPROF) profiling:bde1996-10-172-19/+185
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - use a more accurate and more efficient method of compensating for overheads. The old method counted too much time against leaf functions. - normally use the Pentium timestamp counter if available. On Pentiums, the times are now accurate to within a couple of cpu clock cycles per function call in the (unlikely) event that there are no cache misses in or caused by the profiling code. - optionally use an arbitrary Pentium event counter if available. - optionally regress to using the i8254 counter. - scaled the i8254 counter by a factor of 128. Now the i8254 counters overflow slightly faster than the TSC counters for a 150MHz Pentium :-) (after about 16 seconds). This is to avoid fractional overheads. files.i386: permon.c temporarily has to be classified as a profiling-routine because a couple of functions in it may be called from profiling code. options.i386: - I586_CTR_GUPROF is currently unused (oops). - I586_PMC_GUPROF should be something like 0x70000 to enable (but not use unless prof_machdep.c is changed) support for Pentium event counters. 7 is a control mode and the counter number 0 is somewhere in the 0000 bits (see perfmon.h for the encoding). profile.h: - added declarations. - cleaned up separation of user mode declarations. prof_machdep.c: Mostly clock-select changes. The default clock can be changed by editing kmem. There should be a sysctl for this. subr_prof.c: - added copyright. - calibrate overheads for the new method. - documented new method. - fixed races and and machine dependencies in start/stop code. mcount.c: Use the new overhead compensation method. gmon.h: - changed GPROF4 counter type from unsigned to int. Oops, this should be machine-dependent and/or int32_t. - reorganized overhead counters. Submitted by: Pentium event counter changes mostly by wollman
* Added missing extern declaration of timer_freq.bde1996-10-171-8/+7
| | | | Sorted declarations of scalars.
* Fixed miscounting for non-statistical (GUPROF) profiling:bde1996-10-162-24/+32
| | | | | | | | | | - use CROSSJUMP() and CROSSJUMP_LABEL() for conditional jumps from idle() into cpu_switch() and vice versa. - moved badsw code to after cpu_switch(). Cosmetic changes: - moved sw0 string to be immediately after its caller (badsw). - removed unused #include.
* Added macros CROSSJUMP(), CROSSJUMP_LABEL() and GPROF_RET. These willbde1996-10-161-26/+30
| | | | | | be used to fix some benign(?) bugs in GUPROF profiling. Fixed stale comments and long lines.
* Move much of the machine dependent code from vm_glue.c intodyson1996-10-152-8/+196
| | | | | pmap.c. Along with the improved organization, small proc fork performance is now about 5%-10% faster.
* Pmap_resident_count was mistakenly removed from pmap.h, therebydyson1996-10-131-0/+2
| | | | | disabling the RSS listing in ps and ^T. This commit re-inserts the macro defn.
* Minor optimization for final rundown of a pmap.dyson1996-10-131-1/+6
|
* Performance optimizations. One of which was meant to go in before thedyson1996-10-122-121/+46
| | | | | | | | previous snap. Specifically, kern_exit and kern_exec now makes a call into the pmap module to do a very fast removal of pages from the address space. Additionally, the pmap module now updates the PG_MAPPED and PG_WRITABLE flags. This is an optional optimization, but helpful on the X86.
* Cleaned up:bde1996-10-122-21/+15
| | | | | | | | | | | | - fixed a sloppy common-style declaration. - removed an unused macro. - moved once-used macros to the one file where they are used. - removed unused forward struct declarations. - removed __pure. - declared inline functions as inline in their prototype as well as in theire definition (gcc unfortunately allows the prototype to be inconsistent). - staticized.
* Removed nested include if <sys/socket.h> from <net/if.h> andbde1996-10-121-1/+2
| | | | | | | <net/if_arp.h> and fixed the things that depended on it. The nested include just allowed unportable programs to compile and made my simple #include checking program report that networking code doesn't need to include <sys/socket.h>.
* Don't include "opt_cpu.h" in <machine/clock.h>, since this breaks lkm's.bde1996-10-101-3/+1
| | | | | The change breaks kern_clock.c; fix that temporarily by including "opt_cpu.h" there.
* Put I*86_CPU defines in opt_cpu.h.bde1996-10-099-9/+20
|
* Enable the i586-optimized bcopy if the cpu is a "586" and optionbde1996-10-091-4/+16
| | | | | | | | | | | | I586_OPTIMIZED_BCOPY is configured. Similarly for bzero/I586_OPTIMIZED_BZERO. Fake 586's had better have a hardware FPU with non-broken exception handling (we mask exceptions, but broken exception handling may trap on the instructions that do the masking). I guess this means that the routines won't work on most 386's or FPUless 486's even when they have a h/w FPU.
* Added i586-optimized bcopy() and bzero().bde1996-10-092-112/+574
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are based on using the FPU to do 64-bit stores. They also use i586-optimized instruction ordering, i586-optimized cache management and a couple of other tricks. They should work on any i*86 with a h/w FPU, but are slower on at least i386's and i486's. They come close to saturating the memory bus on i586's. bzero() can maintain a 3-3-3-3 burst cycle to 66 MHz non-EDO main memory on a P133 (but is too slow to keep up with a 2-2-2-2 burst cycle for EDO - someone with EDO should fix this). bcopy() is several cycles short of keeping up with a 3-3-3-3 cycle for writing. For a P133 writing to 66 MHz main memory, it just manages an N-3-3-3, 3-3-3-3 pair of burst cycles, where N is typically 6. The new routines are not used by default. They are always configured and can be enabled at runtime using a debugger or an lkm to change their function pointer, or at compile time using new options (see another log message). Removed old, dead i586_bzero() and i686_bzero(). Read-before-write is usually bad for i586's. It doubles the memory traffic unless the data is already cached, and data is (or should be) very rarely cached for large bzero()s (the system should prefer uncached pages for cleaning), and the amount of data handled by small bzero()s is relatively small in the kernel. Improved comments about overlapping copies. Removed unused #include.
* Fixed pessimized (short) i/o port types.bde1996-10-081-3/+2
|
* Multiple changes stacked as one commit since they all depend on one another.jkh1996-10-053-3/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Added "memory" to clobber list in invlpg(). It needs it if invltlb()bde1996-09-291-20/+21
| | | | | | | | | | | needs it. Fixed style in invlpg(). Sorted recently renamed functions. Added prototypes in the non-gcc section for recently added/renamed functions.
* Essentially rename pmap_update to be invltlb. It is a very machinedyson1996-09-285-53/+52
| | | | | | | 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.
* Restored my change in rev.1.119 which was clobbered by the previous commit.bde1996-09-281-2/+4
|
* Move pmap_update_1pg to cpufunc.h. Additionally,dyson1996-09-282-49/+39
| | | | | use the invlpg opcode instead of the nasty looking .byte directives. There are some other minor micro-level code improvements to pmap.c
* part 2 of the bsdi compat tweak attempt. I believe that BSDI use bothpeter1996-09-271-1/+4
| | | | | | 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.
* Apparently, BSDI have a new system call gate. I was experimentingpeter1996-09-271-2/+3
| | | | | | with this quite a while ago when somebody reported a BSD/OS 2.1 binary that wouldn't run. I'm pretty sure they tried it and I'm pretty sure they mentioned to me that the patch worked.
* I've been meaning to commit this for months. Implement select()peter1996-09-271-2/+18
| | | | | | for /dev/random and /dev/urandom. Both are always writable, urandom is always readable, and /dev/random is readable when >= 8 bits are in the pool.
* Fixed a few hundred warnings (2400 in LINT) for signed vs unsignedbde1996-09-241-6/+13
| | | | | | | | | | | | | comparisons in the inb() and outb() macros. I decided that int args are OK here. Any type that can hold a u_int16_t without overflow is correct, and 32-bit types are optimal. Introduced a few tens of warnings (100 in LINT) for use of pessimized (short) types for the port arg. Only a few drivers are affected by this. u_short pessimizations aren't detected. Added `__extension__' before the statement-expression in inb() so that it can be compiled without warnings by gcc -pedantic.
* Changed an arg name in the pseudo-prototype for bzero() to matchbde1996-09-202-46/+56
| | | | | | | | | | | | | | | | | | | | the prototype. Put the jump table for i486_bzero() in the data section. This speeds up i486_bzero() a little on Pentiums without significantly affecting its speed on 486's. Don't waste time falling through 14 nop's to return from do1 in i486_bzero(). Use fastmove() for counts >= 1024 (was > 1024). Cosmetic. Fixed profiling of fastmove(). Restored meaningful labels from the pre-1.1 version in fastmove(). Local labels are evil. Fixed (high resolution non-) profiling of __bb_init_func().
* Add APM_IDLE_CPU option, that is off by default.phk1996-09-192-4/+4
| | | | | | I maintain that it saves more power to simply "hlt" the CPU than to spend tons of time trying to tell the APM bios to do the same. In particular if you do it 100 times a second...
* Attached simple external ddb commands `show rtc', `show pgrpdump'bde1996-09-142-10/+14
| | | | | and `show cbstat'. The pgrpdump code was previously controlled by `#ifdef DEBUG'.
* Changed cncheckc() interface so that it is 8-bit clean - return -1bde1996-09-142-4/+4
| | | | | | | | | instead of 0 if there is no input. syscons.c: Added missing spl locking in sccncheckc(). Return the same value as sccngetc() would. It is wrong for sccngetc() to return non-ASCII, but stripping the non-ASCII bits doesn't help.
* Made debugging code (pmap_pvdump()) compile again so that I can test LINT.bde1996-09-131-2/+4
| | | | I don't know if it actually works.
* Another round of merge/update.asami1996-09-121-49/+1
| | | | | | | | | (1) Add PC98 support to apm_bios.h and ns16550.h, remove pc98/pc98/ic (2) Move PC98 specific code out of cpufunc.h (to pc98.h) (3) Let the boot subtrees look more alike Submitted by: The FreeBSD(98) Development Team <freebsd98-hackers@jp.freebsd.org>
* Primarily a fix so that pages are properly tracked for beingdyson1996-09-121-35/+62
| | | | | | | modified. Pages that are removed by the pageout daemon were the worst affected. Additionally, numerous minor cleanups, including better handling of busy page table pages. This commit fixes the worst of the pmap problems recently introduced.
* Make userconfig two (default: on) options:phk1996-09-112-2/+9
| | | | | | USERCONFIG to enable VISUAL_USERCONFIG to get the gui stuff too. Requested by: pst
* A minor fix to the new pmap code. This might not fix the global problemsdyson1996-09-111-2/+2
| | | | with the last major pmap commits.
* Removed more devconf leftovers.bde1996-09-101-2/+1
|
* Removed bogus LARGMEM code and option. The code paniced whenbde1996-09-101-12/+1
| | | | | | 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.
* Updated #includes to 4.4Lite style.bde1996-09-103-15/+19
|
* Addition of page coloring support. Various levels of coloring are afforded.dyson1996-09-082-11/+14
| | | | | | The default level works with minimal overhead, but one can also enable full, efficient use of a 512K cache. (Parameters can be generated to support arbitrary cache sizes also.)
OpenPOWER on IntegriCloud