summaryrefslogtreecommitdiff
path: root/sys/arch/i386
AgeCommit message (Collapse)Author
2014-07-11CPU_BUSY_CYCLE(): A new MI statement for busy loop power reductionMasao Uebayashi
The new CPU_BUSY_CYCLE() may be put in a busy loop body so that CPU can reduce power consumption, as Linux's cpu_relax() and FreeBSD's cpu_spinwait(). To start minimally, use PAUSE on i386/amd64 and empty on others. The name is chosen following the existing cpu_idle_*() functions. Naming and API may be polished later. OK kettenis@
2014-07-11Convert bus_dmamem_map(9) to km_alloc(9) in order to make it fail andMartin Pieuchot
not sleep if the allocator cannot obtain a lock when BUS_DMA_NOWAIT is specified. idea and inputs from kettenis@, ok miod@
2014-07-10Set cold to 1 before executing the DVACT_POWERDOWN handlers when halting orMartin Pieuchot
rebooting a machine, like it is done in the hibernate case. At least some USB host controller drivers rely on this to busy way instead of sleeping. Avoid a panic on macppc with an uhci(4) cardbus plugged in. ok deraadt@, uebayashi@
2014-07-10boot(9): Remove comments about RB_*, "cold", and savectx()Masao Uebayashi
Again remove slightly different comments to reduce diffs. These will be re-added once boot() become MI and its specification is clearly re-defined. OK miod@
2014-07-10boot(): Remove comments about RB_TIMEBAD to reduce diffsMasao Uebayashi
RB_TIMEBAD is documented well enough that the comment is not needed. sparc64 does slightly different and its comment is left with XXX. OK deraadt@ miod@
2014-07-10fix some errors in lockdebug code. not enabled by default.Mike Larkin
ok dlg@
2014-07-10boot(): Unify declarationsMasao Uebayashi
OK deraadt@
2014-07-09Don't use the suspending kernel's VA mapping for the piglet. It's farMike Larkin
easier and much less error-prone to just identity map it in the resuming kernel as we have more control over the VA space layout there (otherwise we are at the mercy of the suspending kernel's placement of the piglet VA). This diff also increases the size of the piglet to 4 chunks, to avoid an overwrite issue seen in m2k14 where the start of the kernel text was overwritten with a bounced chunk before unpack.
2014-07-09Fixes a resume time page table issue on amd64 if the piglet was locatedMike Larkin
above 1GB physical (caused by using an incorrect page size mask) Also removes some unneeded low memory mappings on both amd64 and i386 (this is a cosmetic fix but makes things easier to debug).
2014-07-09Cleanup the chunk placement routine by removing the conflict resolver.Mike Larkin
Chunks are now sorted by ascending PA and all chunks are bounced before unpack. This fixes an issue where the trampoline chunks were being placed at the end of the unpack ordering, causing overwrite during unpack.
2014-07-09Fixes a hibernate issue wherein we locked the kernel lock while hatchingMike Larkin
but then parked ourselves in real mode without completing acquisition of said lock. Also removes the park routine from i386 since we don't need it (the APs are already parked at the time we start unpack). discussed with and ok kettenis@, also ok deraadt@
2014-07-09Fix boot -d. refreshcreds() should be called when trapping from userspace,Philip Guenther
but I flipped the test on i386/amd64, thus breaking kernel traps before enough proc0 bits were set up. In theory, this could have resulted in a NFS read for a page fault being done with a process's old credentials. pointed out by Patrick Wildt of bitrig
2014-07-08decouple struct uvmexp into a new file, so that uvm_extern.h and sysctl.hTheo de Raadt
don't need to be married. ok guenther miod beck jsing kettenis
2014-07-08This is bootblock code. Don't pull in uvm header files to deal withTheo de Raadt
page rounding! Disgusting. Instead, define local copies of those macros.
2014-07-08A few missing sys/systm.h includes. Soon the universes dragged in viaTheo de Raadt
uvm_extern.h, uvm_param.h, and sysctl.h will no longer gaurantee that _KERNEL code gets it.
2014-07-05Matthias Pfaller rescinded clauses three and four of his licenseJonathan Gray
http://mail-index.netbsd.org/source-changes/2009/10/18/msg002090.html
2014-07-04Create the ioport_ex and iomem_ex extents after we've set up the gdt gatesMark Kettenis
such that curcpu() works. The extent code creates pools, and if we want to add any sort of locking to the pool code we need that working. Found out the hard way by guenther@. ok dlg@, guenther@
2014-07-03Add identcpu detection for 1-GByte pagesMatthew Dempsky
ok mlarkin
2014-06-29Don't ridiculously assume that sysctl.h will (through a set of extremelyTheo de Raadt
unfortunate circumstances) pull machine/cpufunc.h
2014-06-22PROCFS has been broken for months without complaints, so stop building itPhilip Guenther
suggested by sthen@
2014-06-15Fix a few format string bugs with -DDEBUGStefan Fritsch
2014-06-11Don't map phys pages < 64KB in the resume page table. We stopped doing thisMike Larkin
in the kernel a few months back and there's no reason these pages need to be mapped during unpack either.
2014-06-09Remove {amd64,i386}/stand/installboot - we now use usr.sbin/installbootJoel Sing
and these have been unhooked from the build for a while now.
2014-06-08check both rsdp checksums in the case of rsdp revision >= 2.Daniel Dickman
ok mlarkin@
2014-06-01Remove real mode VGA repost option. It was used by nobody, and even if itMike Larkin
were to be enabled, it had a bug that prevented it from working anyway. ok deraadt@, kettenis@
2014-05-31Revert previous diff setting cold to 1 on shutdown because it breaks machineMartin Pieuchot
with softraid(4) disks. softraid(4) is the last real consumer of the doshutdownhooks(9) API and it is not trivial to convert its hook to a DVACT_POWERDOWN handler since the latter does not allow to sleep.
2014-05-31Remove some unused code that we added at the 2013 Toronto hackathon butMike Larkin
don't need anymore.
2014-05-30Set cold to 1 before executing the DVACT_POWERDOWN handlers when halting orMartin Pieuchot
rebooting a machine, like it is done in the hibernate case. At least some USB host controller drivers rely on this to busy way instead of sleeping. Avoid a panic on macppc with an uhci(4) cardbus plugged in. ok deraadt@, uebayashi@
2014-05-26Replace some magic constants with appropriate defines.Mark Kettenis
ok krw@, deraadt@
2014-05-23Free the est_fqlist allocations if we end up not using it.Philip Guenther
suggested by Benjamin Baier (programmer (at) netzbasis.de) ok and comment suggestion kettenis@
2014-05-20remove irrelevant, outdated, and misleading sentence suggesting thatAlexander Hall
you need to set up a local mirror for the install sets brought to attention by pascal@ ok krw@
2014-05-11Move the increment of uvmexp.softs back to the caller of mi_ast():Philip Guenther
it needs to be done atomicly on some MP archs and we don't have atomic_add_int() everywhere yet. Also, mi_ast() was meant to be inline. noted by miod@
2014-05-10Disable speedstep instead of panicing if the high and low speeds are the same.Philip Guenther
Problem noted by Benjamin Baier (programmer (at) netzbasis.de) improvements and ok kettenis@
2014-05-10Factor out the common ast bits into mi_ast()Philip Guenther
ok deraadt@
2014-05-08Enable -Wno-format in the kernel on i386 & amd64Stefan Fritsch
ok jsg@ "go for it" kettenis@
2014-05-04format string fixes for bus_addr_t and bus_size_tStefan Fritsch
bus_addr_t and bus_size_t are u_long everywhere ok kettenis@
2014-04-25Defer the free of the hibernate structures until later, when it is safe toMike Larkin
do so. Freeing the hibernate structures too early leads to inadvertent calls into splx when we aren't ready for them yet. Found when trapping splx calls in the resume path. discussed with deraadt@ at m2k14
2014-04-20emc on my cx500 works as well as rdac on all my rebadged engenio kit.David Gwynne
2014-04-19Don't panic if we're trying to disestablish an MSI but the hardware is gone.Mark Kettenis
tested by & ok mlarkin@
2014-04-18Have each thread keeps its own (counted!) reference to the process's ucredsPhilip Guenther
to avoid possible use-after-free references when swapping ids in threaded processes. "Do I have the right creds?" checks are always made with the threads creds. Inspired by FreeBSD and NetBSD "right time" deraadt@
2014-04-08No need for <uvm/uvm_page.h>Martin Pieuchot
2014-04-07Enable upd(4) on archs where uhidev(4) is present, requested by mpi@.andre
2014-04-07Add axen(4) wherever axe(4) is.Brad Smith
ok mpi@ yuo@
2014-04-05enable hds, and give up on ispTheo de Raadt
2014-04-01More <uvm/uvm.h> -> <uvm/uvm_extern.h> cleaning.Martin Pieuchot
ok kettenis@, deraadt@
2014-03-31Change the order of operations during a suspend/resume cycle andMartin Pieuchot
call bufq_quiesce() after executing the DVACT_QUIESCE handlers. This should be safe since no disk nor controller drivers have such handler but it will allow us to detach sd(4) devices attached to a USB bus. Another benefit pointed out by kettenis@ is that drivers that need to read a firmware from the disk should be able to do it at resume time in a DVACT_WAKEUP handler. ok kettenis@, deraadt@
2014-03-29It's been a quarter century: we can assume volatile is present with that name.Philip Guenther
ok dlg@ mpi@ deraadt@
2014-03-28enable mpath plus sym and rdac on some archs so we can learn about whatDavid Gwynne
the effects will be. sgi will follow after i fix some known fallout first.
2014-03-27Add commented out entries for xhci(4).Brad Smith
ok mpi@
2014-03-26No need to include <sys/lock.h> when only <sys/rwlock.h> is needed,Martin Pieuchot
so remove the former and include the latter instead of pulling it in <dev/pci/agpvar.h>. This header already requires various other types anyway. While here remove unneeded headers.