summaryrefslogtreecommitdiffstats
path: root/sys/i386
Commit message (Collapse)AuthorAgeFilesLines
* Pass vm_page_t instead of physical addresses to pmap_zero_page[_area]()peter2002-04-151-9/+11
| | | | | | | | | | | and pmap_copy_page(). This gets rid of a couple more physical addresses in upper layers, with the eventual aim of supporting PAE and dealing with the physical addressing mostly within pmap. (We will need either 64 bit physical addresses or page indexes, possibly both depending on the circumstances. Leaving this to pmap itself gives more flexibilitly.) Reviewed by: jake Tested on: i386, ia64 and (I believe) sparc64. (my alpha was hosed)
* Make the MTRR code a bit more defensive - this should help peopledwmalone2002-04-141-30/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | trying to run X on some Athlon systems where the BIOS does odd things (mines an ASUS A7A266, but it seems to also help on other systems). Here's a description of the problem and my fix: The problem with the old MTRR code is that it only expects to find documented values in the bytes of MTRR registers. To convert the MTRR byte into a FreeBSD "Memory Range Type" (mrt) it uses the byte value and looks it up in an array. If the value is not in range then the mrt value ends up containing random junk. This isn't an immediate problem. The mrt value is only used later when rewriting the MTRR registers. When we finally go to write a value back again, the function i686_mtrrtype() searches for the junk value and returns -1 when it fails to find it. This is converted to a byte (0xff) and written back to the register, causing a GPF as 0xff is an illegal value for a MTRR byte. To work around this problem I've added a new mrt flag MDF_UNKNOWN. We set this when we read a MTRR byte which we do not understand. If we try to convert a MDF_UNKNOWN back into a MTRR value, then the new function, i686_mrt2mtrr, just returns the old value of the MTRR byte. This leaves the memory range type unchanged. I'd like to merge this before the 4.6 code freeze, so if people can test this with XFree 4 that would be very useful. PR: 28418, 25958 Tested by: jkh, Christopher Masto <chris@netmonger.net> MFC after: 2 weeks
* Move do_cpuid into the correct place in this file and makedwmalone2002-04-101-10/+8
| | | | | | | | the indentation more like the other multi-line assembley in this file. Someone who understands gcc constraints could update the constraints for do_cpuid.
* o In osigreturn(), restore all of the registers in one place.alc2002-04-101-5/+9
| | | | | | | | 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)
* Remove the hack for segsz_t from <sys/types.h>; use the normalmike2002-04-101-0/+1
| | | | _BSD_FOO_T_ method for defining segsz_t.
* Add manifest constants: _LITTLE_ENDIAN, _BIG_ENDIAN, _PDP_ENDIAN, andmike2002-04-101-6/+15
| | | | | | _BYTE_ORDER. These are far more useful than their non-underscored equivalents as these can be used in restricted namespace environments. Mark the non-underscored variants as deprecated.
* Round 2 of munging the MI/MD split in NOTES. Put almost all the devicejhb2002-04-091-383/+6
| | | | | | | | | | | | drivers with MI portions into the MI notes. Device drivers such as busses like the isa, eisa, and pci devices are now in the MD NOTES section even though they have some MI code. This will ensure that only the proper bits of device drivers will be included due to the optional bits dependent on the busses in sys/conf/files. This commit also takes the stance that since hints are ignored in NOTES anyways, it is ok to include hints for a bus that may not be present. Advice from: bde
* GC various bits and pieces of USERCONFIG from all over the place.phk2002-04-096-14/+2
|
* machine/uc_device.h was only here for USERCONFIG and kget(1).phk2002-04-091-73/+0
| | | | We have neither anymore.
* Removed ispc98 sysctl completely. Applications should understand thatbde2002-04-081-3/+0
| | | | | | | ispc98 isn't set if its sysctl doesn't exist. At least make(1) already understands this. Approved by: nyan
* GC the "dumplo" variable, which is no longer used.phk2002-04-071-1/+0
| | | | A lot of sys/*/*/machdep.c seems not to be.
* Move ICU_* defines into icu.h.nyan2002-04-065-48/+32
|
* Remove pc98 code.nyan2002-04-061-4/+0
|
* Spell "separate" correctly.eric2002-04-051-1/+1
|
* Embed a struct vmmeter in the per-cpu structure and add a macro,dillon2002-04-041-1/+5
| | | | | | | | | | | | | | | | PCPU_LAZY_INC() which increments elements in it for cases where we can afford the occassional inaccuracy. Use of per-cpu stats counters avoids significant cache stalls in various critical paths that would otherwise severely limit our cpu scaleability. Adjust all sysctl's accessing cnt.* elements to now use a procedure which aggregates the requested field for all cpus and for the global vmmeter. The global vmmeter is retained, since some stats counters, like v_free_min, cannot be made per-cpu. Also, this allows us to convert counters from the global vmmeter to the per-cpu vmmeter in a piecemeal fashion, so have at it!
* Change callers of mtx_init() to pass in an appropriate lock type name. Injhb2002-04-048-13/+13
| | | | | | | 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
* Back out the previous commit.brian2002-04-041-1/+0
| | | | | | | | | | | In the i386 case, options BOOTP requires options NFS_ROOT as well as options NFSCLIENT. With *both* the NFS options, a bootpc_init() prototype is brought in by nfsclient/nfsdiskless.h. In the ia64 case, it just doesn't work and my change just pushes it further away from working. Suggested to be wrong by: bde
* Moved signal handling and rescheduling from userret() to ast() so thatbde2002-04-044-0/+8
| | | | | | | | | | | 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
* Pre-declare bootpc_init() so that options BOOTP doesn't break thebrian2002-04-041-0/+1
| | | | build in ia64 and i386 due to -Werror.
* First round at trying to split up NOTES into MI and MD portions.jhb2002-04-032-1779/+5
| | | | | | | | | | | | Unfortunately, this level doesn't really provide enough granularity. We probably need several MI NOTES type files for things that are shared by several architectures but not by all. For example, the PCI options could live in a NOTES.pci. This also updates the Makefile for i386 to generate LINT. The only changes in the generated LINT are the order of various options. Suggestions for improvement welcome.
* Dike out a highly insecure UCONSOLE option.ru2002-04-033-6/+0
| | | | | | TIOCCONS must be able to VOP_ACCESS() /dev/console to succeed. Obtained from: OpenBSD
* Make the kernel dump header endianness invariant by always dumpingmarcel2002-04-032-24/+14
| | | | | | | | | in dump byte order (=network byte order). Swap blocksize and dumptime to avoid extraneous padding on 64-bit architectures. Use CTASSERT instead of runtime checks to make sure the header is 512 bytes large. Various style(9) fixes. Reviewed by: phk, bde, mike
* - Move the MI mutexes sched_lock and Giant from being declared in thejhb2002-04-021-10/+1
| | | | | | | | | | 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
* Retire the bogus ioctl DIOCGPART in toto.phk2002-04-023-17/+0
| | | | | | | Once again we can notice that badly thought out hacks ferment and infect far more code than initially expected. Sponsored by: DARPA and NAI Labs.
* Stage-2 commit of the critical*() code. This re-inlines cpu_critical_enter()dillon2002-04-017-86/+138
| | | | | | | | | | | | | | | | | | | | | and cpu_critical_exit() and moves associated critical prototypes into their own header file, <arch>/<arch>/critical.h, which is only included by the three MI source files that need it. Backout and re-apply improperly comitted syntactical cleanups made to files that were still under active development. Backout improperly comitted program structure changes that moved localized declarations to the top of two procedures. Partially re-apply one of the program structure changes to move 'mask' into an intermediate block rather then in three separate sub-blocks to make the code more readable. Re-integrate bug fixes that Jake made to the sparc64 code. Note: In general, developers should not gratuitously move declarations out of sub-blocks. They are where they are for reasons of structure, grouping, readability, compiler-localizability, and to avoid developer-introduced bugs similar to several found in recent years in the VFS and VM code. Reviewed by: jake
* Change the suser() API to take advantage of td_ucred as well as do ajhb2002-04-0116-26/+25
| | | | | | | | | | | | 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@
* Remove references to KTR_EXTEND.jhb2002-04-011-6/+3
| | | | Pointy-hat to: jake
* Here follows the new kernel dumping infrastructure.phk2002-03-312-0/+242
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Caveats: The new savecore program is not complete in the sense that it emulates enough of the old savecores features to do the job, but implements none of the options yet. I would appreciate if a userland hacker could help me out getting savecore to do what we want it to do from a users point of view, compression, email-notification, space reservation etc etc. (send me email if you are interested). Currently, savecore will scan all devices marked as "swap" or "dump" in /etc/fstab _or_ any devices specified on the command-line. All architectures but i386 lack an implementation of dumpsys(), but looking at the i386 version it should be trivial for anybody familiar with the platform(s) to provide this function. Documentation is quite sparse at this time, more to come. Details: ATA and SCSI drivers should work as the dump formatting code has been removed. The IDA, TWE and AAC have not yet been converted. Dumpon now opens the device and uses ioctl(DIOCGKERNELDUMP) to set the device as dumpdev. To implement the "off" argument, /dev/null is used as the device. Savecore will fail if handed any options since they are not (yet) implemented. All devices marked "dump" or "swap" in /etc/fstab will be scanned and dumps found will be saved to diskfiles named from the MD5 hash of the header record. The header record is dumped in readable format in the .info file. The kernel is not saved. Only complete dumps will be saved. All maintainer rights for this code are disclaimed: feel free to improve and extend. Sponsored by: DARPA, NAI Labs
* A couple of bits survived Dans nukage of CV_DEBUG in favour of INVARIANTS,phk2002-03-311-1/+0
| | | | take them out with tacticals.
* Centralize the "bootdev" and "dumpdev" variables. They are still prettyphk2002-03-311-3/+0
| | | | | bogus all things considered, but at least now they don't camouflage as being MD variables.
* Implement i386's (o)sigreturn() like the alpha's: Use copyin() to readalc2002-03-311-8/+12
| | | | | | | | 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
* Remove abuse of intr_disable/restore in MI code by moving the loop in ast()jake2002-03-291-0/+1
| | | | | | | | back into the calling MD code. The MD code must ensure no races between checking the astpening flag and returning to usermode. Submitted by: peter (ia64 bits) Tested on: alpha (peter, jeff), i386, ia64 (peter), sparc64
* GC #if 0'd assembly mutex micro operations. If someone wants to bringjhb2002-03-281-208/+0
| | | | | these back later then can get them from the attic. Also, GC, some stale macros to acquire and release sleep mutexes in assembly.
* Remove unneeded pc98 hack.nyan2002-03-281-2/+0
|
* style(9)obrien2002-03-281-14/+21
| | | | Approved by: jake
* Add a new mtx_init option "MTX_DUPOK" which allows duplicate acquires of locksjeff2002-03-271-1/+1
| | | | | | | | | | | 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
* Tab-out the backslashes in icu_vector.s to make it more readable and todillon2002-03-272-244/+244
| | | | match it up with apic_vector.s.
* Compromise for critical*()/cpu_critical*() recommit. Cleanup the interruptdillon2002-03-2724-214/+1097
| | | | | | | | | | | | | | | | | | | 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
* Uncomment GEOM in LINTphk2002-03-261-1/+1
|
* Add support for Q.931 subaddresses.hm2002-03-261-11/+10
| | | | Submitted by: Steven Looman <fsteevie@wish.net>
* Fix bktr and pcf compilation with LINTnsouch2002-03-251-2/+2
|
* Guard against redefining __gnuc_va_list.obrien2002-03-241-1/+2
|
* Fixed some style bugs in the removal of __P(()). Continuation linesbde2002-03-241-5/+5
| | | | | were not outdented to preserve non-KNF lining up of code with parentheses. Switch to KNF formatting.
* Minor changes:will2002-03-242-74/+172
| | | | | | | | | | | [1] Support the Sony VAIO Jogdial in moused(8). [2] Modify spic(4) to support additional Sony VAIO models. Submitted by: [1] Juriy Goloveshkin <j@gu.ru>, [2] Akira Funahashi <funa@funa.org> Tested by: cjh, jim, Jerry A! <jerry@thehutt.org> Approved by: nsayer MFC after: 2 weeks
* Forgot viapm in the NOTES. Fixed.nsouch2002-03-231-0/+2
|
* Fixed some style bugs in the removal of __P(()). The main ones werebde2002-03-236-68/+62
| | | | | | not removing tabs before "__P((", and not outdenting continuation lines to preserve non-KNF lining up of code with parentheses. Switch to KNF formatting and/or rewrap the whole prototype in some cases.
* Major rework of the iicbus/smbus framework:nsouch2002-03-232-0/+18
| | | | | | | | - VIA chipset SMBus controllers added - alpm driver updated - Support for dynamic modules added - bktr FreeBSD smbus updated but not tested - cleanup
* Fixed some style bugs in the removal of __P(()). The main ones werebde2002-03-234-61/+58
| | | | | | not removing tabs before "__P((", and not outdenting continuation lines to preserve non-KNF lining up of code with parentheses. Switch to KNF formatting and/or rewrap the whole prototype in some cases.
* Fixed some style bugs in the removal of __P(()). The main ones werebde2002-03-236-26/+26
| | | | | | not removing tabs before "__P((", and not outdenting continuation lines to preserve non-KNF lining up of code with parentheses. Switch to KNF formatting and/or rewrap the whole prototype in some cases.
* Add bios area range check (lower side).takawata2002-03-231-1/+2
|
OpenPOWER on IntegriCloud