summaryrefslogtreecommitdiff
path: root/sys/arch/amd64/include
AgeCommit message (Collapse)Author
2010-08-05new i386/amd64 machdep.lidsuspend sysctl which decides whether a lidTheo de Raadt
close causes a suspend. resumes are not tied to this; they happen unconditionally. this is a temporary knob for the 4.8 release; afterwards it will move to a more convenient place much moaning discussing where to put the knob with kettenis tested by various including phessler
2010-08-02Add System Enclosure or Chassis structure.Marco Peereboom
ok deraadt
2010-07-25in the clock drivers, seperate the soft-state and hard-state which wasTheo de Raadt
all jumbled up in the same functions. the rtc (mc chip) and clock (i8243) startup was also mixed up. they the soft state and hardware state can be started in the right order, and it is easy to restart just the neccessary parts upon resume. tested in numerous cases: (apic, pic) * (GENERIC.MP, GENERIC) * (mp, non-mp) * (i386, amd64) ok kettenis
2010-07-21Fix more cdev initializations which were using enodev for poll; ok kettenisTheo de Raadt
2010-07-21Make sure that the FPU IPIs shoot down the right FPU context and not the FPUMark Kettenis
context of some random process that happened to be switched onto the FPU after the decision was made to send the IPI.
2010-06-29Add support for mapping ACPI to PCI devicesJordan Hargrave
ok kettenis, deraadt
2010-06-29fpu_kernel_{enter,exit}; Functions to allow the use ofThordur I. Bjornsson
the FPU in the kernel. From Mike Belopuhov; Little bits by myself. Comments/OK kettenis@
2010-06-27Add the TPOFF* and DTP{MOD,OFF}* definitions that ld.so will need forPhilip Guenthe
doing thread-local storage and fix a typo in one that was already defined. ok kettenis@ drahn@
2010-06-22bump up the dmesg buffer size. new boxes have lots of crap in them, soDavid Gwynne
boot messages can be too big to fit. sure deraadt@
2010-05-31there is no spllpt(), since lpt's are just tty devices (call tty functions,Theo de Raadt
and thus should be using spltty() from Matthew Dempsky ok oga guenther
2010-05-22this is amd64, not i386, and the protection was all bustedTheo de Raadt
2010-05-13Synchronise amd64 more with other PMAP_DIRECT architectures. (step 1,Owain Ainsworth
more to come later) Specfically, there is no reason to reserve a special virtual address just so we can do boot dump, we have a direct map of every page anyway. since pmap_map is deprecated and MD only anyway, this means we can remove that interface too. If anything this should increase reliability since pmap_enter won't fail under memory pressure during dump (unlikely but possible). It is also simpler and smaller ;) Tested by myself and ckuethe, no regressions. ok miod@
2010-05-08Page Attribute Tables (PAT) support for x86.Owain Ainsworth
PAT allows setting per-mapping cachability bits. Our main interest in it for write combining mappings so we do not have to rely so heaviliy on mtrrs (which are stupidly set up on more and more machines). MD flags to pmap allow setting these bits (which bus_space now uses for PREFETCHABLE maps), if a vm page has a bit set, then we will use WC for all mappings of a page (used for userland mappings). We also check for known errata and fall back to UC- mappings in that case. comments from kettenis@, tedu@ and william@. kettenis@, tedu@ ok.
2010-04-29Add the CR_PAT MSR to the list of defined msrs.Owain Ainsworth
"Absolutely, don't forget i386" kettenis@.
2010-04-22- remove ptei(), which was verified to be unused.Jasper Lievisse Adriaanse
ok miod@
2010-04-20Instead of using PWT|PCD for uncached (which is wrong on old cpus andOwain Ainsworth
HARD uncached on anything since the P3), use just PCD which is UC- (uncached but mtrrs can override it to write combining). Now kernel mappings of WC-mtrred memory actually get write combining memory. the speed up is very very nice. ok kettenis@, deraadt@, beck@ (who likes his scrollbars non-wibbly)
2010-04-08On amd64, move the bus_dma buftype stuff that is only used by sg_dmaOwain Ainsworth
into the sg_dma code instead of main bus_dma. Add identical code to i386 since this will be used in the next commit. ok kettenis@ back in december.
2010-04-04OpenBSD uses bus_space_copy_#, not bus_space_copy_region_#. Make sure only theMiod Vallat
first name is used, and remove any #define foo_region foo compatibility defines. Also, on sparc64, do not provide a `raw' version of bus_space_copy.
2010-03-21Add some additional Intel CPUID values for recent and upcoming processors.Jonathan Gray
With some additions from sthen@ ok kettenis@ sthen@
2010-01-13As per NetBSD move HAYAKAWA Koichi's licenses to two clause.Jonathan Gray
2009-12-25Do not #include unused <machine/mcontext.h>Miod Vallat
2009-12-09sloppy oga, tsk tsk, you are scaring usTheo de Raadt
spotted by ckuethe and must be in immediately before my build gets there..
2009-12-09add two new MD only pmap apis to amd64 and i386 (not to be used in MIOwain Ainsworth
code): pmap_flush_cache(vaddr_t, vsize_t) and pmap_flush_page(paddr_t) to flush the cache for virtual addresses and physical pages respectively using the clflush instruction. These apis will shortly be used by the agp bus_dma functions to avoid doing a wbinvd on each dmamap_sync. ok kettenis@, some comments from miod@
2009-12-09add cpufunc functions for the clflush instruction and the mfenceOwain Ainsworth
instruction. ok kettenis@ as part of a larger diff.
2009-12-09Detect the cache line size for the clflush instruction when we identifyOwain Ainsworth
the cpu. ok kettenis@ as part of a larger diff.
2009-11-27Move MB_LEN_MAX into the machine-independent sys/limits.h header,Philip Guenthe
rather than defining it separately for each architecture. Also set it to 4, to accommodate for future UTF-8 support (rfc3629). Diff by stsp, committing to catch the libc major bump ok kettenis@, guenther@
2009-11-22Bring amd64 closer to resume, while at it kill dead code. Okay deraadt@.Paul Irofti
2009-11-04Get rid of __HAVE_GENERIC_SOFT_INTERRUPTS now that all our platforms support it.Mark Kettenis
ok jsing@, miod@
2009-10-07add support for the temperature sensor of VIA Nano and C7-M CPUs.Kevin Lo
some improvements suggested by jsg@ "commit" deraadt@
2009-10-06Allow MD limits for allocating PCI io and mem space and specify limits onMark Kettenis
i386 and amd64 to make avoid legacy ISA I/O registers. Fixes issues with ThinkPad T-series Dock II units as reported by sobrado@ ok miod@
2009-09-20Back out via nano temperature sensor changes.Jonathan Gray
They break ramdisks as noticed by jasper, and have not been adequately discussed.
2009-09-20add support for VIA Nano cpu core temperature sensorKevin Lo
ok deraadt@
2009-09-18ldt removal missed some. amd64_{get,set}_ldt gone. also removeMartynas Venckus
ldt_{alloc,free} to shave a few. ok jasper@, oga@
2009-08-22Constify the what/name parameter of pci_intr_establish().Michael Knudsen
Tested by myself, sthen, oga, kettenis, and jasper. Input from sthen and jasper. ok kettenis (Manpage follows shortly.)
2009-08-11fix some stupidity in x86 bus_space_map.Owain Ainsworth
right now, we do a pmap_kenter_pa(), we then get the pte (behind pmap's back) and check for the cache inhibit bit (if needed). If it isn't what we want (this is the normal case) then we change it ourselves, and do a manual tlb shootdown (i386 was a bit more stupid about it than amd64, too). Instead, make it so that like on some other archs (sparc64 comes to mind) you can pass in flags in the low bits of the physical address, pmap then does everything correctly for you. Discovered this when I had some code doing a lot of bus_space_maps(), it was incredibly slow, and profilling was dominated by pmap_tlb_shootwait(); discussed with kettenis@, miod@, toby@ and art@. ok art@
2009-07-30Get rid of the obsolet BUS_BARRIER_xxx constants for bus_space_barrier(), onlyMiod Vallat
provide and use BUS_SPACE_BARRIER_xxx.
2009-07-26Make sure all platforms understand the flags argument of bus_space_map() andMiod Vallat
bus_space_alloc() as a bitmask of flags, and not a boolean controlling cacheability; and make sure the three MI BUS_SPACE_MAP_xxx values documented in the manual page are defined on all platforms as well.
2009-07-22via nano cpus are amd64, and so we need machdep.xcryptTheo de Raadt
2009-07-21Change the rbus md_space_{map,unmap} signature to take a rbus_tag_t insteadMiod Vallat
of the bus_space_tag_t it contains; an upcoming implementation will need to know the rbus_tag_t for which it works at this point. All callers updated accordingly; no functional change intended.
2009-07-20Pass a pci_chipset_tag_t to pci_intr_line(), to eventually allow theMiod Vallat
logic to be chipset dependent; no functional change yet. ok kettenis@
2009-06-16Backout pmemrange (which to most people is more well known as physmemAriane van der Steldt
allocator). "i can't see any obvious problems" oga
2009-06-09revert guenther@'s un-revert of art's curpmap.Kenneth R Westerback
My bios0: ASUSTeK Computer INC. P5K-E cpu0: Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2405.74 MHz cpu1: Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2405.46 MHz cpu2: Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2405.46 MHz cpu3: Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2405.46 MHz can't boot with this in. It always hangs somewhere in fsck'ing if any, or between netstart and local daemons if no fsck'ing. Also fubars theo's real amd machine. Much more testing needed for this.
2009-06-07on amd64, store a pointer to the loaded data and the type. This willOwain Ainsworth
eventually be needed by bouncebuffers, and I need it for some of my evil graphics shitz. ok kettenis@ with some tweaks
2009-06-06Unrevert the curpmap change with the addition of correct %gs handlingPhilip Guenthe
in the IPI handler so that it works when it interrupts userspace, waiting for the droppmap IPI to complete when destroying it, and (most importantly) don't call pmap_tlb_droppmap() from cpu_exit(). Tested by myself and ckuethe, as our machines choked on the original. ok @art
2009-06-06Add vga bios repost support. Fetched from the NetBSD tree mostly.Paul Irofti
Tested on multiple i386 and it works, amd64 works also with a few exceptions that will get fixed. The initial effort of importing was done by oga@, thanks! Lots of testing and debugging by mlarkin@ and me. Okay deraadt@, oga@, mlarkin@.
2009-06-05Revert the curpmap change. We know the IPI is broken on both ends,Philip Guenthe
but even with proposed fixes, the reaper panics are back.
2009-06-02Added interface for cpu idle on amd64Jordan Hargrave
ok gwk@, toby@, marco@
2009-06-01physmem allocator: change the view of free memory from single free pagesAriane van der Steldt
to free ranges. Classify memory based on region with associated use-counter (which is used to construct a priority list of where to allocate memory). Based on code from tedu@, help from many. Ok art@
2009-05-31Add VIA crypto features support to amd64. ok deraadt@Matthieu Herrb
2009-05-28Bring back the curpmap change. It was missing a reload of the pmap onArtur Grabowski
curcpu when we were freeing a pmap. Tested and working for a few weeks now, but I was a bit too busy to commit it earlier.