summaryrefslogtreecommitdiff
path: root/sys/arch/macppc/dev
AgeCommit message (Collapse)Author
2014-02-19- don't read beyond array boundsmacallan
- break a bunch of long lines - remove an outdated comment
2013-11-05do what cuda does - if we read garbage from the RTC try a few more timesmacallan
2013-07-30Strip redundant parenthesis.joerg
2013-04-28make this work on G5macallan
from Phileas Fogg, interrupt fixup from me
2013-04-25map more register space on Shasta/K2, needed for SMU mailbox registersmacallan
2013-04-17support Shastamacallan
from Phileas Fogg
2012-11-02My PowerMac3,1 is using gpio4 to detect a connected headphone, and I would betphx
that the same is true for PowerMac3,2.
2012-11-01- apply limits consistentlymacallan
- remove suspect pointer fudgery when interpreting PMU battery data now if we had any idea what units these data are in...
2012-10-31implement limits and support event monitoringmacallan
now emergency shutdown on low battery works
2012-10-27split device_t/softc for all remaining drivers.chs
replace "struct device *" with "device_t". use device_xname(), device_unit(), etc.
2012-09-18fix typomacallan
2012-09-06- make the charge state sensor actually do somethingmacallan
- work around a bug in envsys which expects a valid value for sensors with states that have text descriptions even if the sensor is invalid
2012-09-06only register a PMU callback when we're actually monitoring and reportingmacallan
AC power fixes spontaneous power down with two smartbat instances present
2012-09-05split the envsys sensors into two devices - one SME_CLASS_ACADAPTER and onemacallan
SME_CLASS_BATTERY, register the former only on unit 0 so we don't end up with two of them on powerbooks that have two battery slots. Now userland has a fighting chance to find the AC status. TODO: make the battery sensors look more like acpibat's
2012-07-31Apply back changes that were reverted on Jul 24 and Jul 26 (general ata/wdcbouyer
cleanup and SATA PMP support), now that I'm back to fix the fallouts.
2012-07-26Revert, with intention of restoring in a less invasive way, the SATA Portjakllsch
Multiplier code. ok christos@
2012-07-24Revert dsl@'s changes of Sun, 15 Jul 2012 10:55:35 +0000 andjakllsch
Sun, 15 Jul 2012 10:56:50 +0000, excepting the kernel version bump. First step in reverting regressions to ata(4) subsystem during the addition of port multiplier support.
2012-07-22Fix mii_statchg to take a 'struct ifnet *' instead of device_t. This fixesmatt
problem with a common MDIO bus used for multiple interfaces. Some drivers converted to CFATTACL_DECL_NEW.
2012-07-15Some namespace protection (and add greppablity).dsl
Prefix the DRIVE_ and DRIVET_ constants from atavar.h with ATA_. Don't use an enum for drive_type - you don't know how big it will be. Move driver_type to avoid implicit structure padding (esp on arm). This change is purely lexical and mechanical. Update to 6.99.9 - this wasn't done when the SATA PMP changes were made - I'm sure they warranted a bump.
2012-07-02Add sata Port MultiPlier (PMP) support to the ata bus layer,bouyer
as described in http://mail-index.netbsd.org/tech-kern/2012/06/23/msg013442.html PMP support in integrated to the atabus layer. struct ata_channel's ch_drive[] is not dynamically allocated, and ch_ndrive (renamed to ch_ndrives) closely reflects the size of the ch_drive[] array. Add helper functions atabus_alloc_drives() and atabus_free_drives() to manage ch_drive[]/ch_ndrives. Add wdc_maxdrives to struct wdc_softc so that bus front-end can specify how much drive they really support (master/slave or single). ata_reset_drive() callback gains a uint32_t *sigp argument which, when not NULL, will contain the signature of the device being reset. While there, some cosmetic changes: - added a drive_type enum to ata_drive_datas, and stop encoding the probed drive type in drive_flags (we were out of drive flags anyway). - rename DRIVE_ATAPIST to DRIVE_ATAPIDSCW to better reflect what this really is - remove ata_channel->ata_drives, it's redundant with the pointer in ata_drive_datas - factor out the interpretation of SATA signatures in sata_interpet_sig() propagate these changes to the ATA HBA drivers, and add support for PMP to ahcisata(4) and siisata(4). Thanks to: - Protocase (http://www.protocase.com/) which provided a system with lots of controllers, SATA PMP and drive slots - Conservation Genomics Laboratory, Department of Biology, New Mexico State University for hosting the above system - Brook Milligan, who set up remote access and has been very responsive when SATA cable move was needed
2012-06-02Add some pre-processor magic to verify that the type of the data itemdsl
passed to sysctl_createv() actually matches the declared type for the item itself. In the places where the caller specifies a function and a structure address (typically the 'softc') an explicit (void *) cast is now needed. Fixes bugs in sys/dev/acpi/asus_acpi.c sys/dev/bluetooth/bcsp.c sys/kern/vfs_bio.c sys/miscfs/syncfs/sync_subr.c and setting AcpiGbl_EnableAmlDebugObject. (mostly passing the address of a uint64_t when typed as CTLTYPE_INT). I've test built quite a few kernels, but there may be some unfixed MD fallout. Most likely passing &char[] to char *. Also add CTLFLAG_UNSIGNED for unsiged decimals - not set yet.
2012-05-23malloc -> kmem_allocmacallan
2012-05-23cleanup, remove debug goomacallan
2012-03-13Replace the remaining KAUTH_GENERIC_ISSUSER authorization calls withelad
something meaningful. All relevant documentation has been updated or written. Most of these changes were brought up in the following messages: http://mail-index.netbsd.org/tech-kern/2012/01/18/msg012490.html http://mail-index.netbsd.org/tech-kern/2012/01/19/msg012502.html http://mail-index.netbsd.org/tech-kern/2012/02/17/msg012728.html Thanks to christos, manu, njoly, and jmmv for input. Huge thanks to pgoyette for spinning these changes through some build cycles and ATF.
2012-02-02Entropy-pool implementation move and cleanup.tls
1) Move core entropy-pool code and source/sink/sample management code to sys/kern from sys/dev. 2) Remove use of NRND as test for presence of entropy-pool code throughout source tree. 3) Remove use of RND_ENABLED in device drivers as microoptimization to avoid expensive operations on disabled entropy sources; make the rnd_add calls do this directly so all callers benefit. 4) Fix bug in recent rnd_add_data()/rnd_add_uint32() changes that might have lead to slight entropy overestimation for some sources. 5) Add new source types for environmental sensors, power sensors, VM system events, and skew between clocks, with a sample implementation for each. ok releng to go in before the branch due to the difficulty of later pullup (widespread #ifdef removal and moved files). Tested with release builds on amd64 and evbarm and live testing on amd64.
2012-02-01Use C89 function prototypes.matt
2012-01-24drivers to support the onboard video circuitry found in for example themacallan
Performa 6360
2011-12-13Match adm1030 too in dbcool_ki2c_match.riastradh
PR port-macppc/41916: dbcool at ki2c should support adm1030 ok macallan
2011-11-24put back IPL_AUDIO and splaudio(), at the request of rmind. they aremrg
aliases and now we can easily revert audio to IPL_VM if necessary, without having to revert the whole branch.
2011-11-23Merge jmcneill-audiomp3 branch, which is derived from ad-audiomp2. Fromjmcneill
the original ad-audiomp branch notes: Add MP locking to the audio drivers. Making the audio drivers MP safe is necessary before efforts can be made to make the VM system MP safe. The are two locks per device instance, an ISR lock and a character device lock. The ISR lock replaces calls to splaudio()/splx(), and will be held across calls to device methods which were called at splaudio() before (e.g. trigger_output). The character device lock is held across calls to nearly all of the methods, excluding some only used for initialization, e.g. get_locks. Welcome to 5.99.57.
2011-11-19First step of random number subsystem rework described intls
<20111022023242.BA26F14A158@mail.netbsd.org>. This change includes the following: An initial cleanup and minor reorganization of the entropy pool code in sys/dev/rnd.c and sys/dev/rndpool.c. Several bugs are fixed. Some effort is made to accumulate entropy more quickly at boot time. A generic interface, "rndsink", is added, for stream generators to request that they be re-keyed with good quality entropy from the pool as soon as it is available. The arc4random()/arc4randbytes() implementation in libkern is adjusted to use the rndsink interface for rekeying, which helps address the problem of low-quality keys at boot time. An implementation of the FIPS 140-2 statistical tests for random number generator quality is provided (libkern/rngtest.c). This is based on Greg Rose's implementation from Qualcomm. A new random stream generator, nist_ctr_drbg, is provided. It is based on an implementation of the NIST SP800-90 CTR_DRBG by Henric Jungheim. This generator users AES in a modified counter mode to generate a backtracking-resistant random stream. An abstraction layer, "cprng", is provided for in-kernel consumers of randomness. The arc4random/arc4randbytes API is deprecated for in-kernel use. It is replaced by "cprng_strong". The current cprng_fast implementation wraps the existing arc4random implementation. The current cprng_strong implementation wraps the new CTR_DRBG implementation. Both interfaces are rekeyed from the entropy pool automatically at intervals justifiable from best current cryptographic practice. In some quick tests, cprng_fast() is about the same speed as the old arc4randbytes(), and cprng_strong() is about 20% faster than rnd_extract_data(). Performance is expected to improve. The AES code in src/crypto/rijndael is no longer an optional kernel component, as it is required by cprng_strong, which is not an optional kernel component. The entropy pool output is subjected to the rngtest tests at startup time; if it fails, the system will reboot. There is approximately a 3/10000 chance of a false positive from these tests. Entropy pool _input_ from hardware random numbers is subjected to the rngtest tests at attach time, as well as the FIPS continuous-output test, to detect bad or stuck hardware RNGs; if any are detected, they are detached, but the system continues to run. A problem with rndctl(8) is fixed -- datastructures with pointers in arrays are no longer passed to userspace (this was not a security problem, but rather a major issue for compat32). A new kernel will require a new rndctl. The sysctl kern.arandom() and kern.urandom() nodes are hooked up to the new generators, but the /dev/*random pseudodevices are not, yet. Manual pages for the new kernel interfaces are forthcoming.
2011-10-26more device/softc splittingmacallan
2011-10-19add cpufreq supportmacallan
2011-08-01sanitize sysctl interface in order to appease gcc 4.5macallan
2011-08-01According to the Oxford Dictionary of Etymology, a wether is a male sheepmbalmer
or ram.
2011-07-26finish device_t-ificationmacallan
2011-07-10Initialize sensor state. (Missed the commit for this in my lastpgoyette
roto-till.)
2011-07-01#include <sys/bus.h> instead of <machine/bus.h>.dyoung
2011-06-30Modify mapiodev to take a third argument indicating whether the spacematt
should be prefetchable (true) or not (false).
2011-06-18struct device * -> device_tmatt
struct cfdata * -> cfdata_t use device accessors, use device_private. some softc/device_t splits (macppc needs a bunch more) aprint*_dev used considerably more
2011-04-24Rename ttymalloc() to tty_alloc(), and ttyfree() to tty_free() forrmind
consistency. Remove some unnecessary malloc.h inclusions as well.
2011-03-16change the CPU speed sysctl to look more like the ACPI ones, as inmacallan
machdep.<name>.frequency.available etc. so estd can work with minimal changes
2011-02-20bus_spacify, while there explicitly un-mute the headphone output when usingmacallan
the beige G3's external mixer
2010-12-22we need uvm_extern.h nowmacallan
2010-12-20The driver didn't work, because it expects the whole data packet in aphx
single interrupt. Reality shows that with current kernels a 81 bytes packet is split into 3 interrupts with 32 + 32 + 17 bytes. I have added a workaround to deal with it. The Geyser2 devices with 64 byte packets are unsupported at the moment. Somebody needs to test it. New: Added support for the iBook 12-inch trackpad.
2010-12-20Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtchmatt
from uvmexp to per-cpu cpu_data and move them to 64bits. Remove unneeded includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.
2010-12-16finish device_t-ification, now it works againmacallan
2010-12-10return the right values for ioctl(WSKBDIO_GTYPE) and ioctl(WSMOUSEIO_GTYPE)macallan
fixes PR 23991
2010-12-05The gpio children have either register offsets based on gpio or on obio.phx
Implemented a workaround to deal with this uncertainty. This fixes the machdep.cpu_speed control for 7447A-based iBookG4s.
2010-12-01Follow up the changes done to wivar.h -- the consequence here is thathe
instead of a _disable and _enable routine, we have a single _enable which takes a flag, and has a slightly different function signature. Macppc kernels should build again.