aboutsummaryrefslogtreecommitdiff
path: root/x86_64/include
Commit message (Collapse)AuthorAgeFilesLines
* x86_64: add 64-bit syscall entry pointLuca Dariz2023-05-011-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | While theoretically we could still use the same call gate as for 32-bit userspace, it doesn't seem very common, and gcc seems to not encode properly the instruction. Instead we use syscall/sysret as other kernels (e.g. XNU,Linux). This version still has some limitations, but should be enough to start working on the 64-bit user space. * i386/i386/i386asm.sym: add more constants to fill pcb->iss * i386/i386/ldt.c: configure 64-bit syscall entry point. We can just check for the SEP bit as MSR are always available on x86_64. * i386/i386/ldt.h: swap CS/DS segments order if !USER32 as required by sysret * i386/i386/locore.h: add syscall64 prototype * i386/i386/msr.h: add MSR definitions and C read/write helpers * i386/include/mach/i386/syscall_sw.h: remove old BSD_TRAP * x86_64/Makefrag.am: selectively install syscall_sw.h depending on USER32 * x86_64/include/syscall_sw.h: add entry point template from user space * x86_64/locore.S: implement syscall64 entry point and use it when a 64-bit user-space is configured Message-Id: <20230419194703.410575-4-luca@orpolo.org>
* Add 64bit/32bit compatibility symlinksSamuel Thibault2020-03-281-0/+1
This makes inclusions easier. * x86_64/include/mach/x86_64, x86_64/x86_64: New symlinks.