summaryrefslogtreecommitdiffstats
path: root/sys/compat
Commit message (Collapse)AuthorAgeFilesLines
* Merge amd64 and i386 bus.h and move the resulting header to x86. Replacetijl2010-12-201-7/+2
| | | | | | | | | the original amd64 and i386 headers with stubs. Rename (AMD64|I386)_BUS_SPACE_* to X86_BUS_SPACE_* everywhere. Reviewed by: imp (previous version), jhb Approved by: kib (mentor)
* Restore the ABI of struct kinfo_proc32 after r213536.kib2010-12-191-0/+1
| | | | MFC after: 3 days
* Implement NdisGetRoutineAddress and MmGetSystemRoutineAddress used inbschmidt2010-12-065-0/+40
| | | | | | newer Ralink drivers. Submitted by: Paul B Mahol <onemda at gmail.com>
* Add a dummy for IoOpenDeviceRegistryKey().bschmidt2010-11-291-0/+10
| | | | | | | | With that change the Atheros 9xxx driver is actually usable and does not panic anymore. Submitted by: Paul B Mahol <onemda at gmail.com> MFC after: 2 weeks
* Some drivers rely on the existence of certain keys. The Atheros 9xxxbschmidt2010-11-291-0/+10
| | | | | | | | driver for example requests the NetCfgInstanceId but doesn't check the returned status code and will happily access random memory instead. Submitted by: Paul B Mahol <onemda at gmail.com> MFC after: 2 weeks
* Add prototype for InitializeSListHead().bschmidt2010-11-231-0/+1
|
* Add a few functions used in newer drivers. Fix RtlCompareMemory() whilebschmidt2010-11-233-6/+149
| | | | | | here. Submitted by: Paul B Mahol <onemda@gmail.com>
* Update MNT_ROOTFS comments after changes in the root mount logic.pluknet2010-11-231-1/+2
| | | | | | Reported by: arundel Suggested by: marcel (phrasing) Approved by: kib (mentor)
* Add include guards.kib2010-11-232-0/+10
| | | | MFC after: 3 days
* Resurrect amd64 support.bschmidt2010-11-224-8/+95
| | | | | | | | | | | | - Many drivers on amd64 are picking system uptime, interrupt time and ticks via global data structure instead of calling functions for performance reasons. For now just patch such address so driver will not trigger page fault when trying to access such data. In future, additional callout may be added to update data in periodic intervals. - On amd64 we need to allocate "shadow space" on stack before calling any function. Submitted by: Paul B Mahol <onemda at gmail.com>
* Prefer pmap_extract() over pmap_kextract() as done in MmIsAddressValid().bschmidt2010-11-221-1/+7
| | | | | | | According to the comment for MmIsAddressValid() there are issues on PAE kernels using pmap_kextract(). Submitted by: Paul B Mahol <onemda at gmail.com>
* Fix linux kernel module breakage introduced in r215675, by includingdim2010-11-221-0/+1
| | | | | | | <sys/sysent.h>. Noticed by: many Pointy hat to: netchild
* Add the ability for GDB to printout the thread name along with otherattilio2010-11-221-0/+5
| | | | | | | | | | | | | | | | | | | | thread specific informations. In order to do that, and in order to avoid KBI breakage with existing infrastructure the following semantic is implemented: - For live programs, a new member to the PT_LWPINFO is added (pl_tdname) - For cores, a new ELF note is added (NT_THRMISC) that can be used for storing thread specific, miscellaneous, informations. Right now it is just popluated with a thread name. GDB, then, retrieves the correct informations from the corefile via the BFD interface, as it groks the ELF notes and create appropriate pseudo-sections. Sponsored by: Sandvine Incorporated Tested by: gianni Discussed with: dim, kan, kib MFC after: 2 weeks
* Do not take the process lock. The assignment to u_short inside thenetchild2010-11-221-5/+3
| | | | | | | | | | | properly aligned structure is atomic on all supported architectures, and the thread that should see side-effect of assignment is the same thread that does assignment. Use a more appropriate conditional to detect the linux ABI. Suggested by: kib X-MFC: together with r215664
* Remove trailing dot from the unimplemented futex messages to makenetchild2010-11-221-5/+5
| | | | | | | them consistent with the syscall and ipc messages. Submitted by: arundel MFC after: 3 days
* By using the 32-bit Linux version of Sun's Java Development Kit 1.6netchild2010-11-223-22/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | on FreeBSD (amd64), invocations of "javac" (or "java") eventually end with the output of "Killed" and exit code 137. This is caused by: 1. After calling exec() in multithreaded linux program threads are not destroyed and continue running. They get killed after program being executed finishes. 2. linux_exit_group doesn't return correct exit code when called not from group leader. Which happens regularly using sun jvm. The submitters fix this in a similar way to how NetBSD handles this. I took the PRs away from dchagin, who seems to be out of touch of this since a while (no response from him). The patches committed here are from [2], with some little modifications from me to the style. PR: 141439 [1], 144194 [2] Submitted by: Stefan Schmidt <stefan.schmidt@stadtbuch.de>, gk Reviewed by: rdivacky (in april 2010) MFC after: 5 days
* Fix a panic on i386 for drivers using MmAllocateContiguousMemory()bschmidt2010-11-171-2/+2
| | | | | | | | | | | | and MmAllocateContiguousMemorySpecifyCache(). Those two functions take 64-bit variable(s) for their arguments. On i386 that takes additional 32-bit variable per argument. This is required so that windrv_wrap() can correctly wrap function that miniport driver calls with stdcall convention. Similar explanation is provided in subr_ndis.c for other functions. Submitted by: Paul B Mahol <onemda at gmail.com>
* Use kmem_alloc_contig() to honour the cache_type variable.bschmidt2010-11-172-6/+41
| | | | Pointed out by: alc
* Remove no-op assignment.des2010-11-151-2/+2
| | | | | Submitted by: clang via arundel@ MFC after: 2 weeks
* Some style(9) fixes.netchild2010-11-151-5/+5
| | | | | Submitted by: arundel MFC after: 1 week
* - print out the PID and program name of the program trying to use annetchild2010-11-152-15/+54
| | | | | | | | | | | | | | | | | unsupported futex operation - for those futex operations which are known to be not supported, print out which futex operation it is - shortcut the error return of the unsupported FUTEX_CLOCK_REALTIME in some cases: FUTEX_CLOCK_REALTIME can be used to tell linux to use CLOCK_REALTIME instead of CLOCK_MONOTONIC. FUTEX_CLOCK_REALTIME however must only be set, if either FUTEX_WAIT_BITSET or FUTEX_WAIT_REQUEUE_PI are set too. If that's not the case we can die with ENOSYS right at the beginning. Submitted by: arundel Reviewed by: rdivacky (earlier iteration of the patch) MFC after: 1 week
* According to specs for MmAllocateContiguousMemorySpecifyCache() physicallybschmidt2010-11-111-6/+3
| | | | | | contiguous memory with requested restrictions must be allocated. Submitted by: Paul B Mahol <onemda at gmail.com>
* Break long line.des2010-11-081-1/+2
|
* Fix CPU ID in /proc/cpuinfo.des2010-11-081-4/+4
| | | | | | PR: kern/56451 Submitted by: arundel@ MFC after: 3 weeks
* Remove 4.x, 5.x and 6.x compatibility bits.bschmidt2010-11-043-68/+0
| | | | Submitted by: Paul B Mahol <onemda at gmail.com>
* Remove stale comment.kib2010-10-141-5/+0
| | | | | Submitted by: arundel MFC after: 3 days
* Add macro DECLARE_MODULE_TIED to denote a module as requiring thekib2010-10-121-1/+1
| | | | | | | | | | | | | | | kernel of exactly the same __FreeBSD_version as the headers module was compiled against. Mark our in-tree ABI emulators with DECLARE_MODULE_TIED. The modules use kernel interfaces that the Release Engineering Team feel are not stable enough to guarantee they will not change during the life cycle of a STABLE branch. In particular, the layout of struct sysentvec is declared to be not part of the STABLE KBI. Discussed with: bz, rwatson Approved by: re (bz, kensmith) MFC after: 2 weeks
* Simplify timeout check in futex_wait() using itimerfix() and return errorjkim2010-10-061-22/+10
| | | | | if the given timeout is invalid. Consistently use int type for timeout and correct a format string in futex_sleep().
* Fix a comparision of an uninitialised pointer.netchild2010-10-061-1/+1
| | | | | | Submitted by: arundel Found by: clang analysis (automatic service by uqs@) Reviewed by: rdivacky
* Use the printf-like capability from kproc_create().thompsa2010-10-051-8/+3
| | | | Submitted by: Paul B Mahol
* Prefer pmap_unmapbios() over pmap_unmapdev(). The binary does not changejkim2010-10-051-1/+1
| | | | after this because pmap_unmapbios() is a macro for pmap_unmapdev() on amd64.
* In linprocfs_doargv():kib2010-09-281-97/+117
| | | | | | | | | | | | | | | | | | | | | | | - handle compat32 processes; - remove the checks for copied in addresses to belong into valid usermode range, proc_rwmem() does this; - simplify loop reading single string, limit the total amount of strings collected by ARG_MAX bytes; - correctly add '\0' at the end of each copied string; - fix style. In linprocfs_doprocenviron(): - unlock the process before calling copyin code [1]. The process is held by pseudofs. In linprocfs_doproccmdline: - use linprocfs_doargv() to handle !curproc case for which p_args is not cached. Reported by: plulnet [1] Tested by: pluknet Approved by: des (linprocfs maintainer, previous version of the patch) MFC after: 3 weeks
* Implement proc/$$/environment.des2010-09-161-2/+110
| | | | | Submitted by: Fernando ApesteguĂ­a <fernando.apesteguia@gmail.com> MFC after: 3 weeks
* Replace sbuf_overflowed() with sbuf_error(), which returns any errormdf2010-09-101-2/+2
| | | | | | code associated with overflow or with the drain function. While this function is not expected to be used often, it produces more information in the form of an errno that sbuf_overflowed() did.
* Add x86bios_set_intr() to set interrupt vectors for real mode and simplifyjkim2010-08-252-3/+15
| | | | x86bios_get_intr() a little.
* Check opcode for short jump as well. Some option ROMs do short jumpsjkim2010-08-251-1/+2
| | | | | | | (e.g., some NVIDIA video cards) and we were not able to do POST while resuming because we only honored long jump. MFC after: 3 days
* Supply some useful information to the started image using ELF aux vectors.kib2010-08-171-3/+26
| | | | | | | | In particular, provide pagesize and pagesizes array, the canary value for SSP use, number of host CPUs and osreldate. Tested by: marius (sparc64) MFC after: 1 month
* Place spinlock_enter() and spinlock_exit() just around X86EMU calls.jkim2010-08-101-4/+4
|
* Tidy up locking and memory allocation for the real mode emulator wrapper.jkim2010-08-101-36/+26
| | | | | | | Now we use a regular mutex instead of a spin mutex. When we enter and exit the emulator, spinlock_enter() and spinlock_exit() are additionally used. Move some page table related stuff from x86bios_init() and x86bios_uninit() to x86bios_map_mem() and x86bios_unmap_mem().
* Tidy up printf() calls for debugging.jkim2010-08-091-46/+30
|
* Initialize a variable just before its use.jkim2010-08-091-1/+1
|
* Reduce diffs between VM86 and X86EMU wrappers for x86bios_alloc() andjkim2010-08-091-23/+29
| | | | | x86bios_free(). Add strict sanity checks for VM86 wrapper and add strict page table locking for X86EMU wrapper.
* Prefer struct sysentvec sv_psstrings to hardcoding FREEBSD32_PS_STRINGSkib2010-08-071-1/+2
| | | | | | in the compat32 code. Use sv_usrstack instead of FREEBSD32_USRSTACK as well. MFC after: 1 week
* Add compat32 definition for (old) struct ostat.kib2010-08-071-0/+18
| | | | MFC after: 1 week
* Do not block any I/O port on amd64.jkim2010-08-071-4/+8
|
* Optimize interrupt vector lookup. There is no need to check the page table.jkim2010-08-071-1/+1
|
* Consistently use architecture specific macros.jkim2010-08-061-3/+3
|
* Fix allocation of multiple pages, which forgot to increase page number.jkim2010-08-061-1/+5
| | | | | Particularly, it caused "vm86_addpage: overlap" panics under VirtualBox. Add a safety check before freeing memory while I am here.
* Re-add flag register for output. Some BIOS calls actually use it to returnjkim2010-08-051-0/+1
| | | | success/failure status. Oops.
* Do not copy stack pointer and flags. These registers are unconditionallyjkim2010-08-051-6/+0
| | | | destroyed from vm86_prepcall().
OpenPOWER on IntegriCloud