summaryrefslogtreecommitdiff
path: root/sys/arch/i386
AgeCommit message (Collapse)Author
2010-04-16Use a somewhat bigger hammer and als flush tlb entries that have the globalMark Kettenis
bit set. While there, add an #ifdef MULTIPROCESSOR to make the diff between amd64 and i386 smaller. ok art@
2010-04-08Since we only start doing tlb shootdowns after setting the CPUF_RUNNING flag,Mark Kettenis
flush the TLB immediately after doing so, to make sure there are no stale TLB entries. Suggested by art@ ok art@, oga@, deraadt@, weingart@
2010-04-08Fill in the bus_dma_sync for intagp to use clflush instead of wbinvd()Owain Ainsworth
if supported. When we do memory management on intel this would lead to a LOT of wbinvd() to deal with gpu->cpu incoherency. no one wants that. Needed for sanity of inteldrm memory management which is coming up next.
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-07Make suspend/resume work on MP machines (running an MP kernel). Joint workMark Kettenis
from mlarkin@ and me, with some amd64 fixes thrown in by deraadt@ ok marco@, deraadt@, pirofti@, mlarkin@
2010-04-05Make this work properly after the cpu_info indexing change.Mark Kettenis
tested by ratchov@
2010-04-02Put se(4) onto these ramdisksTheo de Raadt
2010-04-02SiS 190 ethernet driver ported from FreeBSD by Christopher ZimmermannTheo de Raadt
<madroach@zakweb.de>. SiS 191 is not verified to work yet because he does not have the hardware; if anyone has it, please contact him.
2010-04-02For the VT8251 host bridge, only attach the pci bus is non-zero, otherwiseMark Kettenis
keep attaching bus 0 forever. tested by mk@
2010-04-01Don't index cpu_info by apic id, but by device unit number instead. RecentMark Kettenis
Intel CPUs come up with apic id's >= 32, even on systems with less than 32 logical CPUs. ok krw@, marco@; tested by deraadt@
2010-03-30Prevent the apmd/x races for good.Owain Ainsworth
When we hit suspend time, go through all wsdisplays on the system. if they are in mode MAPPED, but not MODE_DUMBFB then if possible do a full vt switch to a !mapped vt, and prevent switching back until resume time. This has to be called from MD code because this involves userland running so that X can run the vt switch signal handler. This way, any case where we are using the "poke registers from userland" model, we will not be on the hardware when we go down, so the kernel can actually handle thing properly. Tested on several acpi laptops (by kettenis@ and ian@), x40 (me and beck@ at LEAST) and zaurus (me). Maybe others, but if so I forgot who at this time.. Idea from deraadt somewhere over the Faroe Islands (I thought of a similar thing myself a while ago). Much prompting from him. Ok and comments miod@
2010-03-28Driver for microguru sensor microcontroller found on ABIT motherboards.Theo de Raadt
Driver written by Mikko Tolmunen <oskari@sefirosu.org>
2010-03-28Properly initialize variable instead of just ORing in bits into random garbage.Mark Kettenis
Shouldn't change the behaviour since only the ORed in bits are checked later, but it makes the code clearer and should shut up the clang static analyser. ok krw@
2010-03-28Remove uninitialized nitems and use npss as $deity intended.Marco Peereboom
Found by clang and krw ok krw
2010-03-27aria(4) is an audio driver, but hasn't been compatible with audio(9)Jacob Meuser
for a long time (if ever?), so send it to the Attic. "with prejudice" miod@; GENERIC reminder from kettenis@
2010-03-27in _bus_dmamem_map use PMAP_CANFAIL for mapping in the pages.Owain Ainsworth
bus_dmamem_map can fail for a myriad of reasons already, so panicing if pmap fails is just impolite. other archs will be forthcoming. ok krw@, art@ before lock
2010-03-25Make the i386 and amd64 bus_dma functions for isa less stupid:Owain Ainsworth
1) when you have a wrapper function in a dmatag that just calls the _bus_dmamem original, you don't need it, just put the original function in the tag 2) don't trunc_page the avail_end/ISA_BOUNCE_THRESHOLD stuff (see icb for a discussion of why this is wrong about 00:00 gmt). make i386 and amd64 both do this the same (the amd64 way is cleaner and makes the third diff actually possible without a lot of pain). just do dmamem_alloc_range(0, threshold) and if that fails do a alloc_range(0, -1) and assume we'll bounce to pick up the pieces. Also using avail_end for alloc_range is not nice (miod has been trying to avoid these abuses iirc), so just use (paddr_t)-1, which is equivalent since you want "any" memory. 3) now this is the funny one. consider point 2. then considering why using the same bloody function to allocate your bouncebuffer is just f'ing wrong. instead allocate with alloc_range(0, threshold) to make sure that our bouncebuffer is actually uner 16megs. ok deraadt@, kettenis@. Tested by several people.
2010-03-23Use CPUID leaf function 0x80000008 to fetch the physical address sizeMark Kettenis
supported by the processor and use it to calculate the mask used for manipulating the MTRR registers. If CPUID leaf function 0x80000008 isn't supported by the processor, default to the 36-bit mask we used before. Fixes issues on machines that don't have a 36-bit physical address space like Intel Atom and all 64-bit AMD CPUs. ok weingart@, deraadt@
2010-03-21Add some additional Intel CPUID values for recent and upcoming processors.Jonathan Gray
With some additions from sthen@ ok kettenis@ sthen@
2010-03-06remove the (now inaccurate) note about not being able to runJason McIntyre
installboot on a mounted partition; from J.C. Roberts
2010-03-04has been no -r flag for a few years; J.C. RobertsTheo de Raadt
2010-03-03Enable urndis(4) everywhere that has USB enabled to get it tested.Michael Knudsen
Much prodding from deraadt.
2010-02-28enable mpiiJonathan Gray
ok marco deraadt
2010-02-23Restore MTRRs on resume.Mark Kettenis
ok oga@, pirofti@
2010-02-22Don't attempt to repost the video hardware. There are quite a few machinesMark Kettenis
where jumping to the "standard" video BIOS entry point locks up or even resets the machine. This will break resume on some other machines in the sense that the display on them will remain disabled. But hopefully those machines make it into a state where the kernel is running and we can fix that. ok deraadt@, marco@, mlarkin@
2010-02-21Read revision from the correct MSR; no functional change.Miod Vallat
2010-02-19Move auglx(4) from i386-only land to MI land.Miod Vallat
(auglx.c is not modified in this commit yet, only moved around)
2010-02-09Switching the strange VIA VT8251 PCIE host bridge into a PCI-PCI bridgeMark Kettenis
didn't quite work since the bridge seems to end up largely unconfigured, and our PCI resource configuration code isn't quite smart enough (yet) to fix things up. So instead switch it only into PCI-PCI bridge mode long enough to snoop the bus number, and attach pci(4) using that number. This is probably safer anyway, since ACPI may not like us switching things around behind its back. Fixes PR 6253 & 6304.
2010-01-13As per NetBSD move HAYAKAWA Koichi's licenses to two clause.Jonathan Gray
2010-01-11Increase/decrease the per-CPU interrupt depth variable around APIC interruptsMark Kettenis
like we do for PIC interrupts. ok art@, deraadt@, oga@
2010-01-10Fix two bugs in IPsec/HMAC-SHA2:Markus Friedl
(1) use correct (message) block size of 128 byte (instead of 64 bytes) for HMAC-SHA512/384 (RFC4634). (2) RFC4868 specifies that HMAC-SHA-{256,384,512} is truncated to nnn/2 bits, while we still use 96 bits. 96 bits have been specified in draft-ietf-ipsec-ciph-sha-256-00 while draft-ietf-ipsec-ciph-sha-256-01 changed it to 128 bits. WARNING: this change makes IPsec with SHA-256 (the default) incompatible with older OpenBSD versions and other IPsec-implementations that share this bug. ok+tests naddy, fries; requested by reyk/deraadt
2010-01-03enable aibsTheo de Raadt
2009-12-20compile in utrhTheo de Raadt
2009-12-09add uhts(4).Matthieu Herrb
2009-12-09Remove the clean gdt bit and leave the idt part in.Paul Irofti
Fixes most laptops out there on resume. Okay deraadt@.
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-12-04ahc fits againTheo de Raadt
2009-12-01Don't claim to know about nehalem until we can be sureJonathan Gray
the the msr paths are sane. ok deraadt@
2009-12-01The MD ACPI PSS paths are using MSRs they shouldn't beJonathan Gray
so don't try to do EST on machines we don't know the bus_clock on for now. ok deraadt@
2009-11-30KNFPaul Irofti
2009-11-30Bump up array size to prevent overflow when probing memoryCan Erkin Acar
on machines reporting > 32 memory regions. ok kettenis@
2009-11-29At suspend time there is no need for a fancy cr3 dance to decide ifTheo de Raadt
pmap_activate() should be called to force the kthread into the kernel pmap. If it is i386 it is lazy pmap it may not be in the kernel kthread, so it must be called so that pmap_activate can decide. If it is amd64 without lazy pmap, it must not be called. A comment is added to remind us about this in the future in case these assumptions change. ok kettenis
2009-11-29Reload mtrr state on all CPUs after updates. Seems to speed up X on MPMark Kettenis
systems, at least with Intel graphics. ok marco@, deraadt@
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-26Reset the wakeup vector to ensure that we don't resume on reboot.Mike Larkin
Temporarily disabled for debugging purposes, but can be turned on if needed. ok deraadt@
2009-11-26do not pull acpi_wakecode.o into RAMDISKSTheo de Raadt
2009-11-26move gcu* to near what it is used byTheo de Raadt
2009-11-26Add an explicit check for supported models (10, 13, 15) before setting up theNicholas Marriott
Via CPU temperature sensor task, otherwise it is added for model 9 as well which is not supported. ok kevlo