#
3944ff70 |
| 22-Jan-2022 |
thorpej <thorpej@NetBSD.org> |
Change the devhandle_from_*() functions to also take a "super handle", from which the newly created handle will inherit it's implementation. The root implementation for a new handle type is used if a
Change the devhandle_from_*() functions to also take a "super handle", from which the newly created handle will inherit it's implementation. The root implementation for a new handle type is used if an invalid "super handle" is passed.
show more ...
|
#
4717ce6f |
| 03-Sep-2021 |
macallan <macallan@NetBSD.org> |
switch smu to common fan control code
|
#
c7fb772b |
| 07-Aug-2021 |
thorpej <thorpej@NetBSD.org> |
Merge thorpej-cfargs2.
|
#
2685996b |
| 24-Apr-2021 |
thorpej <thorpej@NetBSD.org> |
Merge thorpej-cfargs branch:
Simplify and make extensible the config_search() / config_found() / config_attach() interfaces: rather than having different variants for which arguments you want pass a
Merge thorpej-cfargs branch:
Simplify and make extensible the config_search() / config_found() / config_attach() interfaces: rather than having different variants for which arguments you want pass along, just have a single call that takes a variadic list of tag-value arguments.
Adjust all call sites: - Simplify wherever possible; don't pass along arguments that aren't actually needed. - Don't be explicit about what interface attribute is attaching if the device only has one. (More simplification.) - Add a config_probe() function to be used in indirect configuiration situations, making is visibly easier to see when indirect config is in play, and allowing for future change in semantics. (As of now, this is just a wrapper around config_match(), but that is an implementation detail.)
Remove unnecessary or redundant interface attributes where they're not needed.
There are currently 5 "cfargs" defined: - CFARG_SUBMATCH (submatch function for direct config) - CFARG_SEARCH (search function for indirect config) - CFARG_IATTR (interface attribte) - CFARG_LOCATORS (locators array) - CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)
...and a sentinel value CFARG_EOL.
Add some extra sanity checking to ensure that interface attributes aren't ambiguous.
Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark ports to associate those device handles with device_t instance. This will trickle trough to more places over time (need back-end for pre-OFW Sun OBP; any others?).
show more ...
|
#
405aa7c5 |
| 09-Mar-2021 |
macallan <macallan@NetBSD.org> |
add support for the CPU temperature sensor found in iMac G5s
|
#
cfe2093d |
| 05-Mar-2021 |
rin <rin@NetBSD.org> |
Convert to intr_establish_xname().
|
#
bd5b38cd |
| 25-Feb-2021 |
macallan <macallan@NetBSD.org> |
deal with node name inconsistencies between PowerMac10,x and 8,x Now we find fans and iic devices on iMac G5
|
#
298a50bd |
| 04-Jul-2020 |
rin <rin@NetBSD.org> |
- Adjust location of \n in attach message. - Convert to aprint_*(9).
|
#
601e1783 |
| 22-Dec-2019 |
thorpej <thorpej@NetBSD.org> |
Cleanup i2c bus acquire / release, centralizing all of the logic into iic_acquire_bus() / iic_release_bus(). "acquire" and "release" hooks no longer need to be provided by back-end controller driver
Cleanup i2c bus acquire / release, centralizing all of the logic into iic_acquire_bus() / iic_release_bus(). "acquire" and "release" hooks no longer need to be provided by back-end controller drivers (only if they need special handling, e.g. powering on the i2c controller). This results in the removal of a bunch of rendundant code from each back-end controller driver.
Assert that we are not in hard interrupt context in iic_acquire_bus(), iic_exec(), and iic_release_bus().
show more ...
|
#
d47bcd29 |
| 10-Nov-2019 |
chs <chs@NetBSD.org> |
in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT and remove code to handle failures that can no longer happen.
|
#
d1579b2d |
| 03-Sep-2018 |
riastradh <riastradh@NetBSD.org> |
Rename min/max -> uimin/uimax for better honesty.
These functions are defined on unsigned int. The generic name min/max should not silently truncate to 32 bits on 64-bit systems. This is purely a n
Rename min/max -> uimin/uimax for better honesty.
These functions are defined on unsigned int. The generic name min/max should not silently truncate to 32 bits on 64-bit systems. This is purely a name change -- no functional change intended.
HOWEVER! Some subsystems have
#define min(a, b) ((a) < (b) ? (a) : (b)) #define max(a, b) ((a) > (b) ? (a) : (b))
even though our standard name for that is MIN/MAX. Although these may invite multiple evaluation bugs, these do _not_ cause integer truncation.
To avoid `fixing' these cases, I first changed the name in libkern, and then compile-tested every file where min/max occurred in order to confirm that it failed -- and thus confirm that nothing shadowed min/max -- before changing it.
I have left a handful of bootloaders that are too annoying to compile-test, and some dead code:
cobalt ews4800mips hp300 hppa ia64 luna68k vax acorn32/if_ie.c (not included in any kernels) macppc/if_gm.c (superseded by gem(4))
It should be easy to fix the fallout once identified -- this way of doing things fails safe, and the goal here, after all, is to _avoid_ silent integer truncations, not introduce them.
Maybe one day we can reintroduce min/max as type-generic things that never silently truncate. But we should avoid doing that for a while, so that existing code has a chance to be detected by the compiler for conversion to uimin/uimax without changing the semantics until we can properly audit it all. (Who knows, maybe in some cases integer truncation is actually intended!)
show more ...
|
#
aa357ed6 |
| 20-Apr-2018 |
macallan <macallan@NetBSD.org> |
overhaul SMU i2c handling: - get rid of the special smuiicbus, use generic i2cbus - use shifted i2c addresses like everyone else - use direct config with this generic i2c drivers should work on the s
overhaul SMU i2c handling: - get rid of the special smuiicbus, use generic i2cbus - use shifted i2c addresses like everyone else - use direct config with this generic i2c drivers should work on the smu's i2c bus.
show more ...
|
#
796d7c94 |
| 09-Mar-2018 |
sevan <sevan@NetBSD.org> |
Initialise ret to avoid returning uninitialised value if the if statement is false. Found when building the POWERMAC_G5 kernel with clang.
|
#
88b533ac |
| 01-Oct-2017 |
macallan <macallan@NetBSD.org> |
we support the drive bay sensor now
|
#
77ec75e5 |
| 29-Sep-2017 |
macallan <macallan@NetBSD.org> |
provide crude but working fan control based on sensor readings
|
#
8ff9ad32 |
| 06-Jun-2017 |
macallan <macallan@NetBSD.org> |
SMU support, from Phileas Fogg
|