summaryrefslogtreecommitdiff
path: root/sys/arch/i386/include
AgeCommit message (Collapse)Author
2010-07-01another day, another compat gets removed. today is ibcs2's turnTed Unangst
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-05-23seteconf() died years agoTheo de Raadt
2010-05-22protection should use the upper case namesTheo de Raadt
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-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-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-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-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-03Properly handle XMM exceptions instead of panicing the kernel. Fixes theMark Kettenis
issue reported by Slava Pestov. ok deraadt@
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-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-13Make the i386 APIC code closer to the amd64 version. Many whitespace fixes,Mark Kettenis
some additional code. ok toby@, oga@
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-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-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-06It might be a good idea to commit all the diff. *sigh*.Owain Ainsworth
now this builds
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-03Just like on amd64. Instead of keeping a bitmap of which cpus a pmapArtur Grabowski
is active on, save a curpmap pointer in cpu_info. This lets us simplify a few things and do lazy context switching from a user process to a kernel thread. There's a new IPI introduced for forcing a cr3 reload when we're tearing down a dead pmap. kettenis@ ok (after I polished a few minor things)
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-04-30add support for passing db_console from the bootloader to the kernel.David Gwynne
based on the same change in amd64.
2009-04-20Add a BUS_DMA_ZERO flag for bus_dmamem_alloc() to return zeroed memory.Owain Ainsworth
Saves every damned driver calling bzero(), and continues the M_ZERO, PR_ZERO symmetry.
2009-04-19Switch the softinterrupt code on x86 over to mutexes instead ofOwain Ainsworth
simplelocks + splhigh(). First part of making it possible to make mpsafe softinterrupts. "oh yes, definitely" miod@
2009-03-15Introduce splsoftassert(), similar to splassert() but for soft interruptMiod Vallat
levels. This will allow for platforms where soft interrupt levels do not map to real hardware interrupt levels to have soft ipl values overlapping hard ipl values without breaking spl asserts.
2009-03-10remove the _BUS_DMA_PRIVATE define from amd64 and i386.Owain Ainsworth
a define needed to get to ``private'' functions that needs to be defined 5 or more times isn't much use and may cause namespace issues anyway. Other archs will probably follow. Discussed in portugal. "Hell yes" weingart@, ok kettenis@, no objections miod@
2009-02-26Add a two new ioctls to the apm(4) interface.Owain Ainsworth
APM_IOC_{SUSPEND,STANDBY}_REQ: This is to fix an issue with apm suspend where a call to zzz suspended the machine immediately, not giving anyone listening for apm events (other than apmd) a chance to deal with the upcoming change. This hit X hard since the introduction of drm, since it needs to have time to idle the 3d engine and otherwise get the device into a recoverable state. Such things are needed until we support modesetting in the kernel. Now, instead of forcing a suspend, using ioctl sends out an event similar to if you had put the lid down, giving all userland applications a chance to reply. tested by sthen@ and beck@, especial thanks to sthen for sitting there while I tried to debug this remotely, I owe him beer. Prompted by and ok deraadt@
2009-02-16Store conditionally extended cpuid family/model valuesJonathan Gray
in seperate variables in struct cpu_info instead of duplicating the process of extracting it from the signature. Use this value when determining the bus clock on P6/family 0x6 chips, which fixes speedstep on bernd@'s ThinkPad x200s. Discussed with several, 'just do it' weingart@, ok mikeb@
2009-02-05add MD PMAP_NOCACHE flag to i386 and use it to implement theOwain Ainsworth
BUS_DMA_NOCACHE flag with guarantees that the dma memory will be mapped uncached. Some broken/odd hardware needs this. discussion with miod, toby, art and kettenis. ok miod.
2009-02-03Free TSS on the stack of the dead process.Mike Belopuhov
In order to do that we have to remove all sleeping parts: sleeping memory allocation and a sleeping lock. Thus we're moving this code to the spinning lock (mutex) and getting rid of the GDT grow code. Downside is that now we're pre-allocating 64kb of memory per CPU from the start, but this might be optimized in future. This also unifies GDT code and MAXGDTSIZ define across i386 and amd64. With help from mickey. ok toby, art
2009-01-20Install ACPI S3 resume trampoline code in a lowmem page. First partMike Larkin
of ACPI S3 suspend/resume support. This is for i386. Help/comments from art, toby, marco, jordan, kurt ok marco@, kurt@
2008-12-18Don't set the global bit PG_G for kernel pmap low memory mappings. Use aKurt Miller
new function pmap_prealloc_lowmem_ptp() to setup kernel pmap ptp 0 without the PG_G bit set. This fixes the remaining reaper -> pmap_page_remove panics. With much diagnostic help from Art and Theo. ok deraadt@
2008-12-03Remove the x86 and i386 prefixes to the bus_dma types. It's really quiteOwain Ainsworth
pointless and just makes the code different for no reason. This moves i386 and amd64 bus_dma to being a lot closer to identical. suggestion to just remove the prefix instead of merge them from deraadt@. no objections art@, kettenis@, ok weingart@
2008-11-22Allow wired memory to be accounted on i386. This automatically changesMike Belopuhov
the policy for the mlock(2) on this architecture: all users are allowed to call mlock, while the limit is imposed by the current RLIMIT_MEMLOCK value. "makes sense" art, ok hshoexer (who was running with the same change for about 10 months).
2008-11-22The last parts of cpu_unidle. i386, amd64 and sparc64Artur Grabowski
In short, make cpu_unidle do what signotify used to do and make signotify use cpu_unidle. Also, include a cpu_unidle in need_resched, it won't change much right now but will be needed in the future.
2008-11-22same change as for amd64. Move bus_space_* functions from inlines andOwain Ainsworth
defines into real functions. since machdep.c is cluttered as it is move them into bus_space.c (like amd64). a later commit will move the stuff from machdep across too. since machdep.c is cluttered as it is move them into bus_space.c (like amd64). a later commit will move the stuff from machdep across too. some shrinkage stats: GENERIC.MP 209.66kb RAMDISK 50.84kb RAMDISKB 50.04kb RAMDISC 36.28kb RAMDISK_CD 168.03kb don't fill it up all at once! claudio found no network performance hit. toby thought the code went looked alright. art@ ok.
2008-11-14Garbage collect the LDT segments, and simply use the GDT segments.Tobias Weingartner
The beginning of i386 segment review/cleanup. Tested by various people.
2008-10-23Move the va_copy define to <sys/stdrag.h> making sure it is uniformalyMark Kettenis
protected by __ISO_C_VISIBLE > 1999. With a little help from miod@. ok miod@
2008-10-15make random(9) return per-cpu values (by saving the seed in the cpuinfo),Theo de Raadt
which are uniform for the profclock on each cpu in a SMP system (but using a different seed for each cpu). on all cpus, avoid seeding with a value out of the [0, 2^31-1] range (since that is not stable) ok kettenis drahn
2008-10-05Remove IOAPIC ID remapping code. It should not be necessary to avoid reusingMark Kettenis
LAPIC IDs and if there are MPBIOSes we handle them with ACPI now. ok deraadt@