summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/amdpm.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* timecounting: use C99-style initialization for all timecounter structscheloha2021-02-231-9/+9
| | | | | | | | | | | | | | | | | | The timecounter struct is large and I think it may change in the future. Changing it later will be easier if we use C99-style initialization for all timecounter structs. It also makes reading the code a bit easier. For reasons I cannot explain, switching to C99-style initialization sometimes changes the hash of the resulting object file, even though the resulting struct should be the same. So there is a binary change here, but only sometimes. No behavior should change in either case. I can't compile-test this everywhere but I have been staring at the diff for days now and I'm relatively confident this will not break compilation. Fingers crossed. ok gnezdo@
* Add support for timeconting in userland.pirofti2020-07-061-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | This diff exposes parts of clock_gettime(2) and gettimeofday(2) to userland via libc eliberating processes from the need for a context switch everytime they want to count the passage of time. If a timecounter clock can be exposed to userland than it needs to set its tc_user member to a non-zero value. Tested with one or multiple counters per architecture. The timing data is shared through a pointer found in the new ELF auxiliary vector AUX_openbsd_timekeep containing timehands information that is frequently updated by the kernel. Timing differences between the last kernel update and the current time are adjusted in userland by the tc_get_timecount() function inside the MD usertc.c file. This permits a much more responsive environment, quite visible in browsers, office programs and gaming (apparently one is are able to fly in Minecraft now). Tested by robert@, sthen@, naddy@, kmos@, phessler@, and many others! OK from at least kettenis@, cheloha@, naddy@, sthen@
* dev/rndvar.h no longer has statistical interfaces (removed during variousderaadt2020-05-291-2/+1
| | | | | | conversion steps). it only contains kernel prototypes for 4 interfaces, all of which legitimately belong in sys/systm.h, which are already included by all enqueue_randomness() users.
* Convert sleeps of 1sec or more to tsleep_nsec(9).mpi2020-01-091-2/+3
| | | | ok bluhm@
* replace add_*_randomness with enqueue_randomness()jasper2018-04-281-2/+2
| | | | | | | | | this gets rid of the source annotation which doesn't really add anything other than adding complexitiy. randomess is generally good enough that the few extra bits that the source type would add are not worth it. ok mikeb@ deraadt@
* Add a DVACT_WAKEUP op to the *_activate() API. This is called after thederaadt2013-12-061-12/+6
| | | | | | | | kernel resumes normal (non-cold, able to run processes, etc) operation. Previously we were relying on specific DVACT_RESUME op's in drivers creating callback/threads themselves, but that has become too common, indicating the need for a built-in mechanism. ok dlg kettenis, tested by a sufficient amount of people
* Use %z* for size_tsf2013-10-011-2/+2
| | | | while there, fix a few %d into %u
* fix: cast void * to char *, fix format args for (u)int64_t,sf2013-07-031-2/+2
| | | | | | tc_frequency is unsigned ok kettenis@
* Enforce ca_activate tree-walks over the entire heirarchy for all events,deraadt2013-05-301-4/+15
| | | | | | cleaning up some shutdown-hook related code on the way. (A few drivers related to sparc are still skipped at kettenis' request) ok kettenis mlarkin, tested by many others too
* Avoid uninitiliazed use of ctl and corresponding warnings.haesbaert2012-10-051-1/+3
| | | | | | Part of the work to remove -Wno-uninitialized. ok kettenis@
* we are past the point where timecounters may disappeartedu2012-08-161-9/+1
| | | | ok miod
* use unique wait channelsderaadt2011-04-091-2/+2
|
* at resume time, re-nable the AMDPM_RNGEN bitderaadt2010-08-081-2/+26
|
* these files don't need to include proc.h anymore. ok oga for agptedu2010-04-081-2/+1
|
* First pass at removing clauses 3 and 4 from NetBSD licenses.ray2008-06-261-8/+1
| | | | | | | | | Not sure what's more surprising: how long it took for NetBSD to catch up to the rest of the BSDs (including UCB), or the amount of code that NetBSD has claimed for itself without attributing to the actual authors. OK deraadt@
* AMD_8111_PMC has timecounter, too; ok grange@ some time agomarkus2008-05-061-2/+3
|
* convert lockmgr style locks to rwlocks.dlg2007-05-031-6/+6
| | | | input from art@
* do not bus_space_map devices which are at address 0; ok kettenisderaadt2006-12-111-3/+5
|
* acpi may steal power management functionality, in which case wekettenis2006-11-281-4/+4
| | | | | | | cannot io map the device. Bail out without warning. If we want to retain the rgn we could re-enable io and be very very careful. ok deraadt@
* Provide more info in error messages so we can see what's goinggrange2006-09-281-6/+9
| | | | on. And some cosmetics in debug messages while here.
* unbreak the tree. i dunno how this compiled on my box at home.dlg2006-03-091-12/+10
| | | | found by marco@
* amdpmreg.h is only used by amdpm.c, so merge the header into the c file.dlg2006-03-081-1/+63
| | | | | | this unclutters the tree a bit. ok deraadt@
* tweak the debug macros a bitdlg2006-03-081-9/+9
|
* fix support for the smbus controller on nforce 1 chipsets. only try todlg2006-03-081-65/+77
| | | | | | use the timer and rng on amd chips. diff, testing, and patience from gwk
* whitespace fixesdlg2006-03-071-13/+13
|
* In iic_exec don't fail immediately if bus is already busy. It might begrange2006-01-151-3/+8
| | | | running a BIOS' transfer so wait a bit and try again.
* with an offset tweak, this can also support the nvidia nforce smbusderaadt2006-01-091-28/+38
| | | | | same unit is found on amd756 and amd8111. try to support the RNG as well. from gklok@cogeco.ca
* remove NetBSD's event counter code.brad2006-01-061-33/+2
| | | | ok grange@
* knfgrange2006-01-051-2/+2
|
* Add my copyright.grange2006-01-051-1/+17
|
* Add SMBus host interface support for amdpm(4).grange2006-01-051-4/+236
| | | | ok deraadt@
* use pci_matchbyid.brad2006-01-021-8/+8
|
* Some cleanup:grange2004-09-171-5/+5
| | | | | | | - don't mix unsigned and u_int across the code - un'static some funcs ok art@
* This touches only MI code, and adds new time keeping code. Thetholo2004-07-281-7/+67
| | | | | | | | | | | | | | | code is all conditionalized on __HAVE_TIMECOUNTER, and not enabled on any platforms. adjtime(2) support exists, courtesy of nordin@, sysctl(2) support and a concept of quality for each time source attached exists. High quality time sources exists for PIIX4 ACPI timer as well as some AMD power management chips. This will have to be redone once we actually add ACPI support (at that time we need to use the ACPI interfaces to get at these clocks). ok art@ ken@ miod@ jmc@ and many more
* make this compile; reported by pluf, mickey ok.fgsch2002-11-041-1/+5
|
* steal'' performance calculating loop from pchb.c and have a uniform outputmickey2002-06-051-13/+19
|
* a driver for the rng on the amd768 power management device (no actual power management capabilities are supported yet; from netbsdmickey2002-06-051-0/+171