summaryrefslogtreecommitdiffstats
path: root/sys/i386
Commit message (Collapse)AuthorAgeFilesLines
* Implement casuword32, compare and set user integer, thank Marcel Moolenarrdavidxu2006-08-281-0/+2
| | | | who wrote the IA64 version of casuword32.
* Fix video playing and network connections in realplayer (and most likelynetchild2006-08-271-14/+11
| | | | | | | | | | | | | | | | | | | | other stuff) in the osrelease=2.6.16 case: - implement CLONE_PARENT semantic - fix TLS loading in clone CLONE_SETTLS - lock proc in the currently disabled part of CLONE_THREAD I suggest to not unload the linux module after testing this, there are some "<defunct>" processes hanging around after exiting (they aren't with osrelease=2.4.2) and they may panic your kernel when unloading the linux module. They are in state Z and some of them consume CPU according to ps. But I don't trust the CPU part, the idle threads gets too much CPU that this may be possible (accumulating idle, X and 2 defunct processes results in 104.7%, this looks to much to be a rounding error). Noticed by: Intron <mag@intron.ac> Submitted by: rdivacky (in collaboration with Intron) Tested by: Intron, netchild Reviewed by: jhb (previous version)
* regennetchild2006-08-273-5/+6
|
* Add the linux statfs64 call. This allows Tivoli backup to proceed a littlenetchild2006-08-272-2/+1
| | | | | | | | | but further on -current (still not successful, but a step into the right direction). Sponsored by: Google SoC 2006 Submitted by: rdivacky Tested by: Paul Mather <paul@gromit.dlib.vt.edu>
* Emulate what vfork does instead of using it in linux_vfork. This waynetchild2006-08-251-1/+13
| | | | | | | | | we can do the stuff we need to do with linux processes at fork and don't panic the kernel at exit of the child. Submitted by: rdivacky Tested with: tst-vfork* (glibc regression tests) Tested by: netchild
* Get rid of some nested includes.netchild2006-08-191-4/+0
| | | | | | Sponsored by: Google SoC 2006 Submitted by: rdivacky Noticed by: jhb
* Move some stuff into headers where they belong.netchild2006-08-172-8/+1
| | | | | | Sponsored by: Google SoC 2006 Submitted by: rdivacky Noticed by: jhb, ssouhlal
* Style fixes to comments.netchild2006-08-162-9/+18
| | | | | | Sponsored by: Google SoC 2006 Submitted by: rdivacky Noticed by: jhb, ssouhlal
* - Fix typo in #error pragma: compitable -> compatiblepav2006-08-151-1/+1
| | | | Submitted by: neologism
* Regen to propogate <prefix>_AUE_<mumble> changes as well as the earlierjhb2006-08-156-212/+519
| | | | systrace changes.
* - Remove unused sysvec variables from various syscalls.conf.jhb2006-08-155-2050/+4
| | | | | | | | | - Send the systrace_args files for all the compat ABIs to /dev/null for now. Right now makesyscalls.sh generates a file with a hardcoded function name, so it wouldn't work for any of the ABIs anyway. Probably the function name should be configurable via a 'systracename' variable and the functions should be stored in a function pointer in the sysvec structure.
* No need for opt_global.h hereimp2006-08-151-1/+0
|
* Remove the include of opt_global.h. It's included globally by a commandnetchild2006-08-151-1/+0
| | | | | | | | | | | line switch. Other files which may make the same mistake (according to fxr.watson.org) but aren't fixed in this commit (people with more clue about those files should fix this): - i386/xbox/xbox.c - arm/arm/elf_trampoline.c - arm/arm/mem.c Noticed by: cognet
* Add include of opt_global.h, else the futex operations aren't locked onnetchild2006-08-151-0/+1
| | | | | | | SMP systems. Sponsored by: Google SoC 2006 Submitted by: rdivacky
* add autogenerated systrace_args stuff for dtracenetchild2006-08-151-0/+2046
|
* Add the linux 2.6.x stuff (not used by default!):netchild2006-08-154-45/+487
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - TLS - complete - pid/tid mangling - complete - thread area - complete - futexes - complete with issues - clone() extension - complete with some possible minor issues - mq*/timer*/clock* stuff - complete but untested and the mq* stuff is disabled when not build as part of the kernel with native FreeBSD mq* support (module support for this will come later) Tested with: - linux-firefox - works, tested - linux-opera - works, tested - linux-realplay - doesnt work, issue with futexes - linux-skype - doesnt work, issue with futexes - linux-rt2-demo - works, tested - linux-acroread - doesnt work, unknown reason (coredump) and sometimes issue with futexes - various unix utilities in linux-base-gentoo3 and linux-base-fc4: everything tried worked On amd64 not everything is supported like on i386, the catchup is planned for later when the remaining bugs in the new functions are fixed. To test this new stuff, you have to run sysctl compat.linux.osrelease=2.6.16 to switch back use sysctl compat.linux.osrelease=2.4.2 Don't switch while running a linux program, strange things may or may not happen. Sponsored by: Google SoC 2006 Submitted by: rdivacky Some suggestions/help by: jhb, kib, manu@NetBSD.org, netchild
* regennetchild2006-08-153-337/+387
|
* Add new syscalls in the linuxolator (only used when the sysctlnetchild2006-08-151-28/+39
| | | | | | | | | | compat.linux.osrelease is changed to "2.6.16" or similar). On amd64 not everything is supported like on i386, the catchup is planned for later when the remaining bugs in the new functions are fixed. Sponsored by: Google SoC 2006 Submitted by: rdivacky
* - Add some ASM stuff needed for futexes (linuxolator).netchild2006-08-151-0/+111
| | | | | | Sponsored by: Google SoC 2006 Submitted by: rdivacky With help from: kib
* Eliminate an unnecessary initialization from trap_pfault() that alsoalc2006-08-141-1/+1
| | | | happens to contain a style error.
* Don't try to preserve PAT bits in pmap_enter(). We currently on pages thatjhb2006-08-141-4/+0
| | | | | | | | aren't mapped via pmap_enter() (KVA). We will eventually support PAT bits on user pages, but those will require some sort of MI caching mode stored in the vm_page. Reviewed by: alc
* First pass at allowing memory to be mapped using cache modes other thanjhb2006-08-114-9/+181
| | | | | | | | | | | | | | | | | | | | WB (write-back) on x86 via control bits in PTEs and PDEs (including making use of the PAT MSR). Changes include: - A new pmap_mapdev_attr() function for amd64 and i386 which takes an additional parameter (relative to pmap_mapdev()) specifying the cache mode for this mapping. Note that on amd64 only WB mappings are done with the direct map, all other modes result in a private mapping. - pmap_mapdev() on i386 and amd64 now defaults to using UC (uncached) mappings rather than WB. Previously we relied on the BIOS setting up MTRR's to enforce memio regions being treated as UC. This might make hw.cbb_start_memory unnecessary in some cases now for example. - A new pmap_mapbios()/pmap_unmapbios() API has been added to allow places that used pmap_mapdev() to map non-device memory (such as ACPI tables) to do so using WB as before. - A new pmap_change_attr() function for amd64 and i386 that changes the caching mode for a range of KVA. Reviewed by: alc
* Add some more errno mappings (bsd -> linux) and a comment about the status..netchild2006-08-101-1/+6
| | | | Submitted by: "Intron" <mag@intron.ac>
* Eliminate one set of XBOX #ifdefs. The Xbox code just needs to set aimp2006-08-092-9/+2
| | | | | different TIMER_FREQ value than default. Accomplish this via the config file rather than via an #ifdef.
* Minor style(9) nit.imp2006-08-091-2/+2
|
* If a beep was enabled, turn it off 3 seconds after resume.njl2006-08-081-0/+11
| | | | MFC after: 3 days
* Eliminate the acquisition and release of the page queues lock around a callalc2006-08-061-2/+1
| | | | to vm_page_sleep_if_busy().
* Dont overwrite cpu_model in the case of Via's C3-CPU.mr2006-08-041-1/+2
| | | | | Noticed by: Mike Tancsa MFC after: 2 days
* Commit the results of the typo hunt by Darren Pilgrim.yar2006-08-041-2/+2
| | | | | | | | | | This change affects documentation and comments only, no real code involved. PR: misc/101245 Submitted by: Darren Pilgrim <darren pilgrim bitfreak org> Tested by: md5(1) MFC after: 1 week
* Complete the transition from pmap_page_protect() to pmap_remove_write().alc2006-08-011-18/+1
| | | | | | | | | | | | | Originally, I had adopted sparc64's name, pmap_clear_write(), for the function that is now pmap_remove_write(). However, this function is more like pmap_remove_all() than like pmap_clear_modify() or pmap_clear_reference(), hence, the name change. The higher-level rationale behind this change is described in src/sys/amd64/amd64/pmap.c revision 1.567. The short version is that I'm trying to clean up and fix our support for execute access. Reviewed by: marcel@ (ia64)
* Correct spelling of 3DNow!.obrien2006-08-011-2/+2
|
* Remove sio(4) and related options from MI files to amd64, i386marcel2006-07-291-0/+38
| | | | | | | | | and pc98 MD files. Remove nodevice and nooption lines specific to sio(4) from ia64, powerpc and sparc64 NOTES. There were no such lines for arm yet. sio(4) is usable on less than half the platforms, not counting a future mips platform. Its presence in MI files is therefore increasingly becoming a burden.
* Retire SYF_ARGMASK and remove both SYF_MPSAFE and SYF_ARGMASK. sy_narg isjhb2006-07-281-1/+1
| | | | now back to just being an argument count.
* Regen for MPSAFE flag removal.jhb2006-07-2811-401/+401
|
* Now that all system calls are MPSAFE, retire the SYF_MPSAFE flag used tojhb2006-07-287-415/+394
| | | | | | | | | mark system calls as being MPSAFE: - Stop conditionally acquiring Giant around system call invocations. - Remove all of the 'M' prefixes from the master system call files. - Remove support for the 'M' prefix from the script that generates the syscall-related files from the master system call files. - Don't explicitly set SYF_MPSAFE when registering nfssvc.
* Various fixes to comments in the syscall master files including removingjhb2006-07-281-7/+2
| | | | cruft from the audit import and adding mention of COMPAT4 to freebsd32.
* Unify the checking for lock misbehavior in the various syscall()jhb2006-07-271-7/+13
| | | | | | | | | | | | | | implementations and adjust some of the checks while I'm here: - Add a new check to make sure we don't return from a syscall in a critical section. - Add a new explicit check before userret() to make sure we don't return with any locks held. The advantage here is that we can include the syscall number and name in syscall() whereas that info is not available in userret(). - Drop the mtx_assert()'s of sched_lock and Giant. They are replaced by the more general checks just added. MFC after: 2 weeks
* Argh, fix compile with XBOX enabled. Somehow I missed a LINT compile. :(jhb2006-07-271-1/+1
|
* Don't allow MAXMEM or hw.physmem to extend the top of memory if our memoryjhb2006-07-271-1/+10
| | | | | | | | | | | 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
* Add stge(4) to the list of drivers supported by GENERIC kernel.yongari2006-07-251-0/+1
|
* Regen.jhb2006-07-213-4/+4
|
* - Pass the MPSAFE flag to namei() in linux_uselib() and handle conditionaljhb2006-07-211-1/+1
| | | | | | | | | | | | | Giant VFS locking in that function. - Remove bogus code to handle the case where namei() returns success but a NULL vnode pointer. - Note that this code duplicates exec_check_permissions() and annotate where it differs. - Hold the vnode lock longer to protect the write to set VV_TEXT in v_vflag. - Mark linux_uselib() MPSAFE. Reviewed by: rwatson
* Add pmap_clear_write() to the interface between the virtual memoryalc2006-07-201-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | system's machine-dependent and machine-independent layers. Once pmap_clear_write() is implemented on all of our supported architectures, I intend to replace all calls to pmap_page_protect() by calls to pmap_clear_write(). Why? Both the use and implementation of pmap_page_protect() in our virtual memory system has subtle errors, specifically, the management of execute permission is broken on some architectures. The "prot" argument to pmap_page_protect() should behave differently from the "prot" argument to other pmap functions. Instead of meaning, "give the specified access rights to all of the physical page's mappings," it means "don't take away the specified access rights from all of the physical page's mappings, but do take away the ones that aren't specified." However, owing to our i386 legacy, i.e., no support for no-execute rights, all but one invocation of pmap_page_protect() specifies VM_PROT_READ only, when the intent is, in fact, to remove only write permission. Consequently, a faithful implementation of pmap_page_protect(), e.g., ia64, would remove execute permission as well as write permission. On the other hand, some architectures that support execute permission have basically ignored whether or not VM_PROT_EXECUTE is passed to pmap_page_protect(), e.g., amd64 and sparc64. This change represents the first step in replacing pmap_page_protect() by the less subtle pmap_clear_write() that is already implemented on amd64, i386, and sparc64. Discussed with: grehan@ and marcel@
* MFamd64alc2006-07-181-36/+69
| | | | | | | pmap_clear_ptes() is already convoluted. This will worsen with the implementation of superpages. Eliminate it and add pmap_clear_write(). There are no functional changes. Checked by: md5
* Now that free_pv_entry() accesses the pmap, call free_pv_entry() inalc2006-07-171-1/+2
| | | | | | | pmap_remove_all() before rather than after the pmap is unlocked. At present, the page queues lock provides sufficient sychronization. In the future, the page queues lock may not always be held when free_pv_entry() is called.
* MFamd64alc2006-07-161-6/+3
| | | | | | | Make three simplifications to pmap_ts_referenced(): Eliminate an initialized but otherwise unused variable. Eliminate an unnecessary test. Exit the loop in a shorter way.
* Eliminate the remaining uses of "register".alc2006-07-161-42/+16
| | | | | | Convert the remaining K&R-style function declarations to ANSI-style. Eliminate excessive white space from pmap_ts_referenced().
* Make pc_freemask an array of uint32_t, rather than uint64_t. (I believealc2006-07-151-1/+1
| | | | | that the use of the latter is simply an oversight in porting the new pv entry code from amd64.)
* Regen.jhb2006-07-143-4/+4
|
* Somewhat surprisingly, ibcs2_ioctl() is MPSAFE as it is without needing anyjhb2006-07-141-1/+1
| | | | further fixes.
OpenPOWER on IntegriCloud