summaryrefslogtreecommitdiff
path: root/sys/arch/amd64/include
AgeCommit message (Collapse)Author
2012-07-13Starting point for amd64 hibernate ... some goo copied from i386.Mike Larkin
This does not yet work for amd64 - getting the structure into the tree so others can help.
2012-07-08apm_kqfilter() is gonePhilip Guenthe
ok nicm@
2012-06-26create new machine/_float.h which is namespace clean. create a newTheo de Raadt
MI float.h which pulls in and defines the values that are needed from there, and repair sys/limits.h so that it defines the values it needs as well (depending on POSIX version, XPG version, etc). guenther has a more exact selection of that coming for limits.h. this also fixes a few mistakes for the vax. reviewed by kettenis and guenther.
2012-06-03Add support for serial consoles at non-standard addresses. This implementsMark Kettenis
a new "machine comaddr" command that makes it possible to configure the io port used to access the serial port. This can be used to use serial ports on a puc(4) device as serial console.
2012-04-17Don't try to cache the CPU's FS.base, as userland can make it a lie byPhilip Guenthe
setting %fs, resulting in it not getting restored properly later ok mikeb@ deraadt@
2012-04-04Make sure that identifycpu() is run only once; fixes occasionalMike Belopuhov
hangs on resume. Discussed with and ok kettenis, haesbaert
2012-03-27Implement the AMD suggested workaround for family 10h & 12h errata 721Jonathan Gray
"Processor May Incorrectly Update Stack Pointer" by setting a bit marked 'reserved' in an MSR that is only "documented" to exist on 12h. AMD claim this problem can only occur in 64-bit mode, set the workaround bit on i386 in case this isn't true and in the interest of keeping the errata in sync between i386/amd64. ok deraadt@
2012-03-27Run identifycpu() on its own cpu.Christiano F. Haesbaert
Discussed with many on hackers. "Go ahead" kettenis@ "Get to it" deraadt@
2012-03-26Add APM_IOC_HIBERNATETheo de Raadt
2012-03-16Display L3 cache information on amd64 for amd cpus, Intel now uses aChristiano F. Haesbaert
different scheme. ok jsg@
2012-01-11Pass the DUID of the boot disk via bootduid instead of rootduid, since itJoel Sing
is the DUID that we booted from, which is not always going to be the same as the DUID that we mount root on.
2011-12-26Add the missing ECX cpu flags from CPUID at 0x80000001.Christiano F. Haesbaert
This is all documented at: http://support.amd.com/us/Embedded_TechDocs/25481.pdf (page 20) http://www.intel.com/assets/pdf/appnote/241618.pdf (page 41) ok jsg@
2011-11-16Make userret() MI. On architectures which jammed stuff into it in theTheo de Raadt
past, pull that code out seperately. ok guenther miod
2011-10-21Add bounds checks for access to mp_busses.Mark Kettenis
2011-10-19Oh yeah, a cvs id is goodPhilip Guenthe
2011-10-15"TLS-lite": add kernel support for a per-thread userspace pointer,Philip Guenthe
for pointing to the thread-control-block. Support for mapping this to the correct hardware register can be added as it's finished; start with support for amd64, sparc, and sparc64. Includes syscalls for getting and setting it (for a portable __errno implementation) as well as creating a new thread with an initial value for it. discussed with miod@, kettenis@, deraadt@; committing to get the syscalls in with the impending libc bump and do further refinements in tree
2011-10-10Introduce pci_probe_device_hook(pci_chipset_tag_t, struct pci_attach_args *).Miod Vallat
This mandatory function will get invoked in pci_probe_device(), and allows a pci host driver to alter the pci_attach_args passed to a device when attaching. This function will also, if returning non-zero, cause the device to be skipped completely during all the phases of the PCI device discovery (i.e. ressource enumeration, ressource assignment, and actual attachment). This particular feature is experimental and might be reverted in the future (or the scope narrowed to device attachment only). A dummy #define pci_probe_device_hook() 0 is added to all platforms except sgi, where real functions (currently only returning 0) are added; real meat will be added shortly. Discussed at s2k11, no objection from the usual suspects.
2011-09-20Fix bogus comment. Okay miod@Paul Irofti
2011-09-08Provide namespace-safe alignment macros in <machine/_types.h>, withPhilip Guenthe
compat names kept in <machine/param.h>. In <sys/socket.h>, pull in <sys/_types.h> instead of the namespace polluting <machine/param.h> and completely eliminate __CMSG_ALIGN, replaced by _ALIGN ok deraadt@
2011-09-08Make the INT_FAST*_{MIN,MAX} macros match the types they're defined to.Philip Guenthe
Since the underlying types of the int_fast types are set by machine/_types.h, put internal macros in that same file and define the exposed INT_FAST*_{MIN,MAX} macros from those. ok millert@, kettenis@
2011-08-29Only provide FLT_EVAL_METHOD for C99. Add missing DECIMAL_DIG for C99.Mark Kettenis
ok guenther@
2011-08-18stray spaces; no binary changeMarco Peereboom
2011-07-10remove irrelevant commentsTheo de Raadt
2011-07-05remove comment: yes, they should be independentTheo de Raadt
2011-07-04Nuke the useless D_KQFILTER flag and just check that d_kqfilter isNicholas Marriott
filled in. Move D_CLONE down to 0x0001 as suggested by thib. ok deraadt thib
2011-07-04Force the sigreturn syscall to return to userspace via iretq by settingPhilip Guenthe
the MDP_IRET flag in md_proc, then switch sigcode to enter the kernel via syscall instead of int$80. Rearrange the return paths in both the sysretq and iretq paths to reduce how long interrupts are blocked and shave instructions. ok kettenis@, extra testing krw@
2011-06-30ansi, no binary changeJonathan Gray
2011-06-16Raise the number of interrupt sources per CPU from 32 to 64. This effectivelyMark Kettenis
triples the number of interrupt vectors that can be handled by the primary CPU. Important for MSI, but could also fix some issues with large machines loaded with a lot of devices. tested by many; ok deraadt@, marco@
2011-06-05reduce unneccessary differences; ok kettenisTheo de Raadt
2011-05-30Remove the freelist member from vm_physsegOwain Ainsworth
The new world order of pmemrange makes this data completely redundant (being dealt with by the pmemrange constraints instead). Remove all code that messes with the freelist. While touching every caller of uvm_page_physload() anyway, add the flags argument to all callers (all but one is 0 and that one already used PHYSLOAD_DEVICE) and remove the macro magic to allow callers to continue without it. Should shrink the code a bit, as well. matthew@ pointed out some mistakes i'd made. ``freelist death, I like. Ok.' ariane@ `I agree with the general direction, go ahead and i'll fix any fallout shortly'' miod@ (68k 88k and vax i could not check would build)
2011-05-25Also enclose variable names with external linkage in __BEGIN_DECLS.Martynas Venckus
Doesn't matter much since C++ ABI used by GCC doesn't mangle variable names; however technically is required by Section 7.5 of the C++ spec. Discussed with/OK guenther@, matthew@.
2011-05-23AMD K10/K11 pstate driver allows setperf and apm to change CPUClaudio Jeker
frequencies on newer AMD systems. Driver written by Bryan Steele / brynet gmail.com Put it in deraadt@
2011-05-21First stab at suporting Message Signaled Interrupts on amd64. UnfortunatelyMark Kettenis
this code differs somewhat from the i386 code because the amd64 interrupt subsystem is quite different. Still disabled like on i386.
2011-04-28fenv improvements and cleanupsMartynas Venckus
2011-04-26Make amd64/i386 boot(8) pass the DUID of the selected boot device to theJoel Sing
kernel so that it can use it to identify the root disk. This will be needed in order to correctly boot from a softraid volume. ok deraadt@ marco@ krw@
2011-04-23Add FE_DENORMAL to the exception list just like the comment aboveMartynas Venckus
says; for couple of reasons: - makes it actually work, since the code clears ~FE_ALL_EXCEPT bits. - standard requires that.
2011-04-21fenv for amd64; from matthew@Martynas Venckus
feedback & ok guenther@, matthew@
2011-04-16More than a decade ago, interrupt handlers on sparc started returning 0Theo de Raadt
(interrupt was not for me), 1 (positive interrupt was for me), or -1 (i am not sure...). We have continued with this practice in as many drivers as possible, throughout the tree. This makes some of the architectures use that information in their interrupt handler calling code -- if 1 is returned (and we know this specific machine does not have edge-shared interrupts), we finish servicing other possible handlers on the same pin. If the interrupt pin remains asserted (from a different device), we will end up back in the interrupt servicing code of course... but this is cheaper than calling all the chained interrupts on a pin. This does of course count on shared level interrupts being properly sorted by IPL. There have been some concerns about starvation of drivers which incorrectly return 1. Those drivers should be hunted down so that they return -1. ok and help from various people. In snaps for about a week now.
2011-04-13Unrevert the FS.base diff: the issues were actually elsewherePhilip Guenthe
Additional testing by jasper@ and pea@
2011-04-10Revert bulk of the FS.base diff, as it causes issues on some machinesPhilip Guenthe
and the problem isn't obvious yet.
2011-04-05Add support for per-rthread base-offset for the %fs selector on amd64.Philip Guenthe
Add pcb_fsbase to the PCB for tracking what the value for the thread is, and ci_cur_fsbase to struct cpu_info for tracking the CPU's current value for FS.base, then on return to user-space, skip the setting if the CPU has the right value already. Non-threaded processes without TLS leave FS.base zero, which can be conveniently optimized: setting %fs zeros FS.base for fewer cycles than wrmsr. ok kettenis@
2011-03-23Normalize sentinel. Use _MACHINE_*_H_ and _<ARCH>_*_H_ properly and consitently.Paul Irofti
Discussed and okay drahn@. Okay deraadt@.
2011-03-20When reading MXCSR from userland sigcontext or a ptrace request,Philip Guenthe
mask out invalid bits to prevent a protect fault. Original diff by joshe@; further feedback and ok kettenis@
2011-03-18Old-style MTRRs were never used on amd64, so remove the remaining tracesPhilip Guenthe
of them, as well as some other unused proc md_flags bits: MDP_COMPAT and MDP_SYSCALL. ok mikeb@
2011-03-14Clamp BIOS io attempts to < 2 ^28 - 1 sectors (a.k.a. 128GB forKenneth R Westerback
512-byte sectors) as some BIOSen get confused when we ask for sectors higher up. Uss u_int throughout the boot code to calculate sector addresses, since 32 bits is enough to do 28 ^ 1 - 1 arithmetic. Add checks for wraparound. I can now install and boot from the 7th extended partition below 128GB. Much feedback & guidance from deraadt@. Also from weingart@ on BIOS io. ok deraadt@ (less a couple of minor tweaks found in testing)
2011-03-12Implement swap64 with the bswapq instruction. (Commit stolen from mikeb@)Philip Guenthe
Add missing __statement modifiers and correct %1 to %0 in the asm. ok mikeb@, pirofti@, drahn@
2011-03-11Use _MACHINE_ENDIAN_H_ for this is The Right Thing To Do.Paul Irofti
Okay guenther@, millert@.
2011-03-06The global_int information acpi collects is not used by amd64.Theo de Raadt
ok ketttenis
2011-01-04Add support for Memory Mapped Configuration space access. This gives usMark Kettenis
access to PCIe extended configuration space access on modern i386 and amd64 machines.
2010-12-30add a simple __va_copy inside ifdef lint, from tim van der molen.Ted Unangst
ok guenther