summaryrefslogtreecommitdiffstats
path: root/sys/amd64
Commit message (Collapse)AuthorAgeFilesLines
...
| * Regen for r293530.dchagin2016-01-095-0/+9225
| |
| * MFC r283424:dchagin2016-01-0912-0/+3210
| | | | | | | | Add preliminary support for x86-64 Linux binaries.
| * MFC r283422:dchagin2016-01-091-13/+0
| | | | | | | | | | | | | | | | | | Refund the proc emuldata struct for future use. For now move flags from thread emuldata to proc emuldata as it was originally intended. As we can have both 64 & 32 bit Linuxulator running any eventhandler can be called twice for us. To prevent this move eventhandlers code from linux_emul.c to the linux_common.ko module.
| * MFC r283421:dchagin2016-01-092-14/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a new module linux_common.ko which is intended for the following primary purposes: 1. Remove the dependency of linsysfs and linprocfs modules from linux.ko, which will be architecture specific on amd64. 2. Incorporate into linux_common.ko general code for platforms on which we'll support two Linuxulator modules (for both instruction set - 32 & 64 bit). 3. Move malloc(9) declaration to linux_common.ko, to enable getting memory usage statistics properly. Currently linux_common.ko incorporates a code from linux_mib.c and linux_util.c and linprocfs, linsysfs and linux kernel modules depend on linux_common.ko. Temporarily remove dtrace garbage from linux_mib.c and linux_util.c
| * MFC r283416:dchagin2016-01-091-0/+10
| | | | | | | | | | | | x86_64 Linux do not use multiplexing on ipc system calls. Move struct ipc_perm definition to the MD path as it differs for 64 and 32 bit platform.
| * MFC r283411:dchagin2016-01-091-1/+0
| | | | | | | | | | Remove stale comment about a signal trampoline which is moved to the shared page at r219609.
| * MFC r283410:dchagin2016-01-093-16/+16
| | | | | | | | | | Put linux_platform into the vdso to avoid copying it onto the stack at every exec.
| * MFC r283408:dchagin2016-01-091-2/+0
| | | | | | | | Eliminate a now unused global declaration of elf_linux_sysvec.
| * MFC r283407:dchagin2016-01-095-30/+256
| | | | | | | | | | | | | | | | Implement vdso - virtual dynamic shared object. Through vdso Linux exposes functions from kernel with proper DWARF CFI information so that it becomes easier to unwind through them. Using vdso is a mandatory for a thread cancelation && cleanup on a modern glibc.
| * Regen for r293511.dchagin2016-01-095-8/+45
| |
| * MFC r283403:dchagin2016-01-092-2/+3
| | | | | | | | Implement pselect6() system call.
| * Regen for r293510.dchagin2016-01-095-7/+34
| |
| * MFC r283401:dchagin2016-01-092-3/+4
| | | | | | | | Implement prlimit64() system call.
| * Regen for r293508.dchagin2016-01-095-7/+29
| |
| * MFC r283399:dchagin2016-01-092-2/+2
| | | | | | | | Implement dup3() system call.
| * Regen for r293505.dchagin2016-01-095-7/+29
| |
| * MFC r283396:dchagin2016-01-092-2/+2
| | | | | | | | Implement rt_sigqueueinfo() system call.
| * Regen for r293503.dchagin2016-01-095-8/+40
| |
| * MFC r283394:dchagin2016-01-092-2/+3
| | | | | | | | Implement waitid() system call.
| * MFC r283391:dchagin2016-01-093-39/+16
| | | | | | | | | | | | To reduce code duplication introduce linux_copyout_rusage() method. Use it in linux_wait4() system call and move linux_wait4() to the MI path. While here add a prototype for the static bsd_to_linux_rusage().
| * MFC r283385:dchagin2016-01-091-3/+3
| | | | | | | | Some style(9) && whitespaces fixes. No functional changes.
| * MFC r283383:dchagin2016-01-092-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch linuxulator to use the native 1:1 threads. The reasons: 1. Get rid of the stubs/quirks with process dethreading, process reparent when the process group leader exits and close to this problems on wait(), waitpid(), etc. 2. Reuse our kernel code instead of writing excessive thread managment routines in Linuxulator. Implementation details: 1. The thread is created via kern_thr_new() in the clone() call with the CLONE_THREAD parameter. Thus, everything else is a process. 2. The test that the process has a threads is done via P_HADTHREADS bit p_flag of struct proc. 3. Per thread emulator state data structure is now located in the struct thread and freed in the thread_dtor() hook. Mandatory holdig of the p_mtx required when referencing emuldata from the other threads. 4. PID mangling has changed. Now Linux pid is the native tid and Linux tgid is the native pid, with the exception of the first thread in the process where tid and pid are one and the same. Ugliness: In case when the Linux thread is the initial thread in the thread group thread id is equal to the process id. Glibc depends on this magic (assert in pthread_getattr_np.c). So for system calls that take thread id as a parameter we should use the special method to reference struct thread.
| * MFC r283382:dchagin2016-01-091-0/+1
| | | | | | | | | | In preparation for switching linuxulator to the use the native 1:1 threads add a hook for cleaning thread resources before the thread die.
| * Regen fro r293487.dchagin2016-01-095-26/+38
| |
| * MFC r283379:dchagin2016-01-091-4/+4
| | | | | | | | | | Implement a Linux version of sched_getparam() && sched_setparam(). Temporarily use the first thread in proc.
| * MFC r283378:dchagin2016-01-091-1/+0
| | | | | | | | Remove a now unused include.
| * MFC r283374:dchagin2016-01-091-16/+0
| | | | | | | | | | | | | | | | | | | | | | In preparation for switching linuxulator to the use the native 1:1 threads refactor kern_sched_rr_get_interval() and sys_sched_rr_get_interval(). Add a kern_sched_rr_get_interval() counterpart which takes a targettd parameter to allow specify target thread directly by callee (new Linuxulator). Linuxulator temporarily uses first thread in proc. Move linux_sched_rr_get_interval() to the MI part.
| * Regen for r293478.dchagin2016-01-095-11/+16
| |
| * MFC r283370:dchagin2016-01-091-2/+1
| | | | | | | | | | | | | | | | In preparation for switching linuxulator to the use the native 1:1 threads introduce linux_exit() stub instead of sys_exit() call (which terminates process). In the new linuxulator exit() system call terminates the calling thread (not a whole process).
| * MFC r283369:dchagin2016-01-091-2/+4
| | | | | | | | | | In preparation for switching linuxulator to the use the native 1:1 threads print the thread id in addition to the pid in debug messages.
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2015-12-221-12/+23
|\ \ | |/
| * MFC r277735 (by royger):dim2015-12-211-12/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | amd64: allow base memory segment to start at address different than 0 Current code requires that the first physical memory segment starts at 0, but this is not really needed. We only need to make sure the bootstrap code and page tables for APs are allocated below 4GB. This patch removes this requirement and allows booting a Dell R710 from UEFI, where the first physical memory segment starts at 0x10000. Sponsored by: Citrix Systems R&D Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D1417
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2015-12-141-6/+1
|\ \ | |/
| * MFC r291948:kib2015-12-141-6/+1
| | | | | | | | Use ANSI C definition.
* | Enable netmap on all pfSense kernelsRenato Botelho2015-11-201-0/+1
| |
* | Merge remote-tracking branch 'origin/stable/10' into develRenato Botelho2015-11-163-169/+76
|\ \ | |/
| * MFC 284325:jhb2015-11-131-0/+4
| | | | | | | | | | | | Report the values of x86 segment registers to remote debuggers. While here, also report %eflags from the i386 trapframe.
| * MFC 285783:jhb2015-11-122-51/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | Various changes to the registers displayed in DDB for x86. - Fix segment registers to only display the low 16 bits. - Remove unused handlers and entries for the debug registers. - Display xcr0 (if valid) in 'show sysregs'. - Add '0x' prefix to MSR values to match other values in 'show sysregs'. - MFamd64: Display various MSRs in 'show sysregs'. - Add a 'show dbregs' to display the value of debug registers. - Dynamically size the column width for register values to properly align columns on 64-bit platforms. - Display %gs for i386 in 'show registers'.
| * MFC 285773,285775,285776:jhb2015-11-121-125/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Various fixes for stack unwinding in DDB on x86. 285773: Remove some dead code from DDB's amd64 stack unwinder. The amd64 port copied some code from i386 to fetch function arguments and display them in backtraces. However, it was commented out and can't easily be implemented since the function arguments are passed in registers rather than on the stack in amd64. Remove it in preparation for some bug fixes in this area. 285775: Improve stack unwinding on i386 and amd64 after an IP fault. If we can't find a symbol corresponding to the faulting instruction, assume that the previously-executed function is a call and attempt to find the calling function using the return address on the stack. Otherwise we end up associating the last stack frame with the current call, which is incorrect and causes the unwinder to skip printing of the calling function, resulting in a confusing backtrace. 285776: Let the unwinder handle faults during function prologues or epilogues. The i386 and amd64 DDB stack unwinders contain code to detect and handle the case where the first frame is not completely set up or torn down. This code was accidentally unused however, since db_backtrace() was never called with a non-NULL trap frame. This change fixes that. Also remove get_rsp() from the amd64 code. It appears to have come from i386, which needs to take into account whether the exception triggered a CPL switch, since SS:ESP is only pushed onto the stack if so. On amd64, SS:RSP is pushed regardless, so get_rsp() was doing the wrong thing for kernel-mode exceptions. As a result, we can also remove custom print functions for these registers.
* | Merge branch 'stable/10' into develRenato Botelho2015-11-031-0/+23
|\ \ | |/
| * MFC r289824:kib2015-10-301-0/+7
| | | | | | | | | | | | | | Add CLFLUSHOPT instruction wrappers. MFC r290188: Fix prefix on i386.
| * MFC r261891: provide fast versions of ffsl and flsl for i386; ffsll andavg2015-10-231-0/+16
| | | | | | | | flsll for amd64
* | Build kernel debug symbols, ticket #5330Renato Botelho2015-10-221-2/+0
| |
* | Merge branch 'stable/10' into develRenato Botelho2015-10-071-8/+9
|\ \ | |/
| * MFC r288000:kib2015-09-271-8/+9
| | | | | | | | Add support for weak symbols to the kernel linkers.
* | Fix kernel conf files permissionsRenato Botelho2015-09-251-0/+0
| |
* | Merge branch 'stable/10' into develRenato Botelho2015-09-221-2/+2
|\ \ | |/
| * MFC r280957rstone2015-09-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | Fix integer truncation bug in malloc(9) A couple of internal functions used by malloc(9) and uma truncated a size_t down to an int. This could cause any number of issues (e.g. indefinite sleeps, memory corruption) if any kernel subsystem tried to allocate 2GB or more through malloc. zfs would attempt such an allocation when run on a system with 2TB or more of RAM.
* | Merge branch 'stable/10' into develRenato Botelho2015-08-262-48/+127
|\ \ | |/
| * MFC r286808, r286809, r286867, r286868marcel2015-08-251-1/+7
| | | | | | | | | | | | | | | | | | | | | | - Improve support for Macs that have a stride not equal to the horizonal resolution (width). - Support frame buffers that are larger than the default screen size. - Support large frame buffers: add 24 more page table pages we allocate on boot-up. PR: 193745
OpenPOWER on IntegriCloud