aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ipmi
Commit message (Collapse)AuthorAgeFilesLines
* Centralize compatability translation macros.Brooks Davis2020-04-141-5/+4
| | | | | | | | | | | | | | | | Copy the CP, PTRIN, etc macros from freebsd32.h into a sys/abi_compat.h and replace existing definitation with includes where required. This eliminates duplicate code and allows Linux and FreeBSD compatability headers to be included in the same files. Input from: cem, jhb Obtained from: CheriBSD MFC after: 2 weeks Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D24275 Notes: svn path=/head/; revision=359937
* [PowerPC64] Fix OPAL IPMI driverLeandro Lupori2020-03-261-40/+115
| | | | | | | | | | | | | | This change fixes a couple of issues with OPAL IPMI driver and implements a mechanism to detect timeouts and discard old messages left in receive queue, to avoid old messages from being confused with the reply of new ones. Reviewed by: jhibbits Sponsored by: Eldorado Research Institute (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D24185 Notes: svn path=/head/; revision=359329
* Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)Pawel Biernacki2020-02-261-1/+1
| | | | | | | | | | | | | | | | | | | r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Mark all obvious cases as MPSAFE. All entries that haven't been marked as MPSAFE before are by default marked as NEEDGIANT Approved by: kib (mentor, blanket) Commented by: kib, gallatin, melifaro Differential Revision: https://reviews.freebsd.org/D23718 Notes: svn path=/head/; revision=358333
* The current IPMI KCS code is waiting 100us for all transitions (roughlyJonathan T. Looney2019-06-121-34/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | between each byte either sent or received). However, most transitions actually complete in 2-3 microseconds. By polling the status register with a delay of 4us with exponential backoff, the performance of most IPMI operations is significantly improved: - A BMC update on a Supermicro x9 or x11 motherboard goes from ~1 hour to ~6-8 minutes. - An ipmitool sensor list time improves by a factor of 4. Testing showed no significant improvements on a modern server by using a lower delay. The changes should also generally reduce the total amount of CPU or I/O bandwidth used for a given IPMI operation. Submitted by: Loic Prylli <lprylli@netflix.com> Reviewed by: jhb MFC after: 2 weeks Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D20527 Notes: svn path=/head/; revision=348996
* Extract eventfilter declarations to sys/_eventfilter.hConrad Meyer2019-05-202-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | This allows replacing "sys/eventfilter.h" includes with "sys/_eventfilter.h" in other header files (e.g., sys/{bus,conf,cpu}.h) and reduces header pollution substantially. EVENTHANDLER_DECLARE and EVENTHANDLER_LIST_DECLAREs were moved out of .c files into appropriate headers (e.g., sys/proc.h, powernv/opal.h). As a side effect of reduced header pollution, many .c files and headers no longer contain needed definitions. The remainder of the patch addresses adding appropriate includes to fix those files. LOCK_DEBUG and LOCK_FILE_LINE_ARG are moved to sys/_lock.h, as required by sys/mutex.h since r326106 (but silently protected by header pollution prior to this change). No functional change (intended). Of course, any out of tree modules that relied on header pollution for sys/eventhandler.h, sys/lock.h, or sys/mutex.h inclusion need to be fixed. __FreeBSD_version has been bumped. Notes: svn path=/head/; revision=347984
* ipmi: Fixes for ipmi_opal(powernv)Justin Hibbits2019-04-021-1/+12
| | | | | | | | | | | | | | | * Crank the OPAL state machine during the receive loop, to make sure the pollers are executed * Add a proper detach function, so the module can be unloaded and reloaded at runtime. It still doesn't reliably work 100% of the time on POWER9, and it appears timing and/or cache related. It may work on POWER8 now. MFC after: 2 weeks Notes: svn path=/head/; revision=345791
* efirt: When present, attempt to use EFI runtime services to shutdownConrad Meyer2018-12-151-2/+2
| | | | | | | | | | PR: maybe related to 233998 (inconclusive at this time) Submitted by: byuu <byuu AT tutanota.com> (previous version) Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D18506 Notes: svn path=/head/; revision=342108
* Distinguish _CID match and _HID match and make lower priority probeTakanori Watanabe2018-10-261-5/+6
| | | | | | | | | | when _CID match. Reviewed by: jhb, imp Differential Revision:https://reviews.freebsd.org/D16468 Notes: svn path=/head/; revision=339754
* Fix a module Makefile error on amd64 so the IPMI HW interfaces are built.Doug Ambrisko2018-08-161-0/+2
| | | | | | | | When the module is being unloaded and no HW interfaces were created don't clean up. This was exposed by the amd64 module build issue. Notes: svn path=/head/; revision=337913
* ipmi/opal: Enable polled mode and proper callbackJustin Hibbits2018-08-121-0/+2
| | | | | | | | | | | Fix a NULL dereference that would occur any time an ioctl() was done, due to a missing ipmi_enqueue_request callback. Just use the default for now, until we decide to properly enable IPMI interrupts. Reported by: kbowling Notes: svn path=/head/; revision=337689
* Support building IPMI as a module on powerpc64Justin Hibbits2018-07-251-0/+241
| | | | | | | | This still only supports IPMI via OPAL on powerpc64, but now it can be tested with a GENERIC kernel. Notes: svn path=/head/; revision=336724
* In cases where an application issues certain IPMI commands at a highJonathan T. Looney2018-04-061-3/+5
| | | | | | | | | | | | | | | | | | enough rate, the IPMI code can print large numbers of messages to the console, such as: ipmi0: KCS: Failed to read completion code ipmi0: KCS error: ff ipmi0: KCS: Failed to read completion code ipmi0: KCS error: ff These seem to be innocuous from a system standpoint, and the user- space code can deal with the failures. Therefore, suppress printing these messages to the console unless bootverbose is enabled. Obtained from: Netflix, Inc. Notes: svn path=/head/; revision=332104
* sys/dev: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-2711-0/+22
| | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Notes: svn path=/head/; revision=326255
* As a follow-on to r325378, make the shutdown timer default to 0 as well.Peter Wemm2017-11-051-1/+1
| | | | | | | | | | Otherwise an orderly shutdown will initiate a watchdog that will cause a 7 minute delayed reboot *by default*, In the freebsd.org cluster's case this often worked out be a surprise reboot a minute or two after the machine came back up. Notes: svn path=/head/; revision=325425
* Make the startup timeout 0 seconds by default rathern than 420s. ThisWarner Losh2017-11-041-1/+1
| | | | | | | | | | makes the default fail safe when watchdogd is disabled (which is also the default). Sponsored by Notes: svn path=/head/; revision=325378
* Make time we wait for a power cycle tunable.Warner Losh2017-10-261-2/+6
| | | | | | | | | | hw.ipmi.cycle_time is the time to wait for the power down phase of the ipmi power cycle before falling back to either reboot or halt. Sponsored by: Netflix Notes: svn path=/head/; revision=325025
* Various IPMI watchdog timer improvementsWarner Losh2017-10-262-6/+108
| | | | | | | | | | | | | | | | o Make hw.ipmi.on a tuneable o Changes to keep shutdown from hanging indefinitately after the wd would normally have been disabled. o Add support for setting pretimeout (which fires an interrupt some time before the actual watchdog expires) o Allow refinement of the actions to take when the watchdog expires o Allow special startup timeout to keep us from hanging in boot before watchdogd is started, but after we've loaded the kernel. Obtained From: Netflix OCA Firmware Notes: svn path=/head/; revision=325024
* Implement IPMI support for RB_POWRECYCLEWarner Losh2017-10-252-4/+63
| | | | | | | | | | | | | | | Some BMCs support power cycling the chassis via the chassis control command 2 subcommand 2 (ipmitool called it 'chassis power cycle'). If the BMC supports the chassis device, register a shutdown_final handler that sends the power cycle command if request and waits up to 10s for it to take effect. To minimize stack strain, we preallocate a ipmi request in the softc. At the moment, we're verbose about what we're doing. Sponsored by: Netflix Notes: svn path=/head/; revision=324990
* Optimize IPMI watchdog patting.Alexander Motin2016-03-221-21/+32
| | | | | | | | | | | | | | | | | | | Set watchdog timer parameters only when they really need to be changed. In other cases just restart the timer with single Reset command instead of two (Set and Reset). From one side this visually reduces amount of CPU time burned in tight loop waiting while some slow BMC configures its watchdog hardware, that seems to be much more complicated task then just resetting the timer. From another side on some BMCs those slow Set commands sometimes tend to timeout, that leads to noisy log messages and even more CPU time burned, so avoiding them can provide even bigger bonuses. MFC after: 2 weeks Notes: svn path=/head/; revision=297179
* Remove support for FreeBSD < 602110.Xin LI2015-08-302-12/+0
| | | | Notes: svn path=/head/; revision=287303
* Watchdog drivers need to support rearming the watchdog in contexts whichJohn Baldwin2015-04-244-9/+17
| | | | | | | | | | | | | | are not permitted to sleep. Only use the IPMI watchdog with backends which poll driver-initiated requests to meet this requirement. In practice this means that watchdogs will no longer be used on systems that use the SSIF backend. Differential Revision: https://reviews.freebsd.org/D2062 MFC after: 2 weeks Notes: svn path=/head/; revision=281941
* Use direct hardware access for internal requests for KCS and SMIC. InJohn Baldwin2015-02-065-58/+122
| | | | | | | | | | | | | | | | | | particular, updates to the watchdog should no longer sleep. - Add a new IPMI_IO_LOCK for low-level I/O access. Use this for kcs_polled_request() and smic_polled_request(). - Add a new backend callback "ipmi_driver_request" to handle a driver request. The new callback performs the request sychronously for KCS and SMIC. SSIF still defers the work to the worker thread since the worker thread sleeps during request processing anyway. - Allocate driver requests on the stack rather than using malloc(). Differential Revision: https://reviews.freebsd.org/D1723 Tested by: scottl MFC after: 2 weeks Notes: svn path=/head/; revision=278321
* Explicitly treat timeouts when waiting for IBF or OBF to change state as anJohn Baldwin2014-12-221-0/+13
| | | | | | | | | | error. This fixes occasional hangs in the IPMI kcs thread when using ipmitool locally. MFC after: 1 week Notes: svn path=/head/; revision=276065
* Update kernel inclusions of capability.h to use capsicum.h instead; someRobert Watson2014-03-161-1/+1
| | | | | | | | | | | further refinement is required as some device drivers intended to be portable over FreeBSD versions rely on __FreeBSD_version to decide whether to include capability.h. MFC after: 3 weeks Notes: svn path=/head/; revision=263233
* Provide a crutch that prevents watchdog to interrupt dumpingGleb Smirnoff2013-10-311-0/+3
| | | | | | | | | | | on a box with IPMI enabled. Okay from: jhb Sponsored by: Netflix Sponsored by: Nginx, Inc. Notes: svn path=/head/; revision=257421
* Change the cap_rights_t type from uint64_t to a structure that we can extendPawel Jakub Dawidek2013-09-051-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in the future in a backward compatible (API and ABI) way. The cap_rights_t represents capability rights. We used to use one bit to represent one right, but we are running out of spare bits. Currently the new structure provides place for 114 rights (so 50 more than the previous cap_rights_t), but it is possible to grow the structure to hold at least 285 rights, although we can make it even larger if 285 rights won't be enough. The structure definition looks like this: struct cap_rights { uint64_t cr_rights[CAP_RIGHTS_VERSION + 2]; }; The initial CAP_RIGHTS_VERSION is 0. The top two bits in the first element of the cr_rights[] array contain total number of elements in the array - 2. This means if those two bits are equal to 0, we have 2 array elements. The top two bits in all remaining array elements should be 0. The next five bits in all array elements contain array index. Only one bit is used and bit position in this five-bits range defines array index. This means there can be at most five array elements in the future. To define new right the CAPRIGHT() macro must be used. The macro takes two arguments - an array index and a bit to set, eg. #define CAP_PDKILL CAPRIGHT(1, 0x0000000000000800ULL) We still support aliases that combine few rights, but the rights have to belong to the same array element, eg: #define CAP_LOOKUP CAPRIGHT(0, 0x0000000000000400ULL) #define CAP_FCHMOD CAPRIGHT(0, 0x0000000000002000ULL) #define CAP_FCHMODAT (CAP_FCHMOD | CAP_LOOKUP) There is new API to manage the new cap_rights_t structure: cap_rights_t *cap_rights_init(cap_rights_t *rights, ...); void cap_rights_set(cap_rights_t *rights, ...); void cap_rights_clear(cap_rights_t *rights, ...); bool cap_rights_is_set(const cap_rights_t *rights, ...); bool cap_rights_is_valid(const cap_rights_t *rights); void cap_rights_merge(cap_rights_t *dst, const cap_rights_t *src); void cap_rights_remove(cap_rights_t *dst, const cap_rights_t *src); bool cap_rights_contains(const cap_rights_t *big, const cap_rights_t *little); Capability rights to the cap_rights_init(), cap_rights_set(), cap_rights_clear() and cap_rights_is_set() functions are provided by separating them with commas, eg: cap_rights_t rights; cap_rights_init(&rights, CAP_READ, CAP_WRITE, CAP_FSTAT); There is no need to terminate the list of rights, as those functions are actually macros that take care of the termination, eg: #define cap_rights_set(rights, ...) \ __cap_rights_set((rights), __VA_ARGS__, 0ULL) void __cap_rights_set(cap_rights_t *rights, ...); Thanks to using one bit as an array index we can assert in those functions that there are no two rights belonging to different array elements provided together. For example this is illegal and will be detected, because CAP_LOOKUP belongs to element 0 and CAP_PDKILL to element 1: cap_rights_init(&rights, CAP_LOOKUP | CAP_PDKILL); Providing several rights that belongs to the same array's element this way is correct, but is not advised. It should only be used for aliases definition. This commit also breaks compatibility with some existing Capsicum system calls, but I see no other way to do that. This should be fine as Capsicum is still experimental and this change is not going to 9.x. Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=255219
* Check for ipmi_attached in ipmi_isa_probe as a suggested alternative toSean Bruno2013-07-301-8/+8
| | | | | | | | | | | ipmi_isa_attach. This keeps unintended but harmless noise about "ipmi1" from appearing in the boot up sequence. Submitted by: jbh@ (suggested by) Sponsored by: Yahoo! Inc. Notes: svn path=/head/; revision=253813
* empirical testing showed that 3 seconds is just too slow for GET_DEVICE_IDSean Bruno2013-07-301-1/+1
| | | | | | | | | | | | to return on newer Dell hardware. Bump to 6 second timeouts until someone has a better idea on how to handle this Reviewed by: jhb@ MFC after: 2 weeks Sponsored by: Yahoo! Inc. Notes: svn path=/head/; revision=253812
* After discussions, revert svn r253708.Sean Bruno2013-07-302-10/+11
| | | | | | | | | | Changelog for 253708 was completely wrong and the code implemented something non-standard for the wrong reasons. Sponsored by: Yahoo! Inc. Notes: svn path=/head/; revision=253811
* At some point after stable/7 the ACPI and ISA interfaces to the IPMI controllerSean Bruno2013-07-272-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | no longer have the parent in the device tree. This causes the identify function in ipmi_isa.c to attempt to probe and poke at the ISA IPMI interface Move the check for ipmi_attached out of the ipmi_isa_attach function and into the ipmi_isa_identify function. Remove the check of the device tree for ipmi devices attached. This probing appears to make Broadcom management firmware on Dell machines crash and emit NMI EISA warnings at various times requiring power cycles of the machines to restore. Bump MAX_TIMEOUT to 6 seconds as a hack for super slow IPMI interfaces that need longer to respond to our intial probes on startup. Tested on Dell R410, R510, R815, HP DL160G6 This is MFC candidate for 9.2R Reviewed by: peter MFC after: 2 weeks Sponsored by: Yahoo! Inc. Notes: svn path=/head/; revision=253708
* Unlock IPMI sc while performing requests via KCS and SMIC interfaces.Alexander V. Chernikov2013-03-252-0/+4
| | | | | | | | | | | | It is already done in SSIF interface code. This reduces contention/spinning reported by many users. PR: kern/172166 Submitted by: Eric van Gyzen <eric at vangyzen.net> MFC after: 2 weeks Notes: svn path=/head/; revision=248705
* - Re-shuffle the <machine/pc/bios.h> headers to move all kernel-specificJohn Baldwin2012-09-281-39/+10
| | | | | | | | | | | | | | bits under #ifdef _KERNEL but leave definitions for various structures defined by standards ($PIR table, SMAP entries, etc.) available to userland. - Consolidate duplicate SMBIOS table structure definitions in ipmi(4) and smbios(4) in <machine/pc/bios.h> and make them available to userland. MFC after: 2 weeks Notes: svn path=/head/; revision=241027
* Don't try to stop the IPMI watchdog timer if it is not running.John Baldwin2012-08-072-3/+5
| | | | | | | | | | | | | | Starting or stopping the IPMI watchdog is rather expensive with the current implementation as all IPMI requests are bounced via thread. This is not viable during shutdown or dumps, and this avoids headache in the common case that the watchdog is not enabled. The IPMI watchdog should probably be reworked to not use a separate thread to fix this in the case when the watchdog timer is enabled. MFC after: 2 weeks Notes: svn path=/head/; revision=239128
* Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.Ed Schouten2011-11-071-1/+2
| | | | | | | | | The SYSCTL_NODE macro defines a list that stores all child-elements of that node. If there's no SYSCTL_DECL macro anywhere else, there's no reason why it shouldn't be static. Notes: svn path=/head/; revision=227309
* Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs.Ed Schouten2011-11-071-1/+1
| | | | | | | This means that their use is restricted to a single C file. Notes: svn path=/head/; revision=227293
* Second-to-last commit implementing Capsicum capabilities in the FreeBSDRobert Watson2011-08-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kernel for FreeBSD 9.0: Add a new capability mask argument to fget(9) and friends, allowing system call code to declare what capabilities are required when an integer file descriptor is converted into an in-kernel struct file *. With options CAPABILITIES compiled into the kernel, this enforces capability protection; without, this change is effectively a no-op. Some cases require special handling, such as mmap(2), which must preserve information about the maximum rights at the time of mapping in the memory map so that they can later be enforced in mprotect(2) -- this is done by narrowing the rights in the existing max_protection field used for similar purposes with file permissions. In namei(9), we assert that the code is not reached from within capability mode, as we're not yet ready to enforce namespace capabilities there. This will follow in a later commit. Update two capability names: CAP_EVENT and CAP_KEVENT become CAP_POST_KEVENT and CAP_POLL_KEVENT to more accurately indicate what they represent. Approved by: re (bz) Submitted by: jonathan Sponsored by: Google Inc Notes: svn path=/head/; revision=224778
* Fixed firmware revision decoding:Ruslan Ermilov2011-04-141-2/+2
| | | | | | | | | | | - the major is 7-bit binary encoded - the minor is BCD encoded PR: kern/151586 MFC after: 3 days Notes: svn path=/head/; revision=220614
* Fix test for double-nul characters that terminate the string table atJohn Baldwin2010-07-291-1/+1
| | | | | | | | | | the end of each SMBIOS/DMI structure. Submitted by: Dmitrij Tejblum @ yandex.ru MFC after: 3 days Notes: svn path=/head/; revision=210604
* Rework the SMBIOS table walker to make it operate like other table walkersJohn Baldwin2010-07-141-49/+33
| | | | | | | | | | | | | | | | | | | | | and remove a buffer overflow: - Remove the array of per-type dispatch functions. Instead, pass each structure to a single callback. The callback should check the type of each table entry to take appropriate action. This matches the behavior of other table walkers such as for the MP Table and MADT. - Don't attempt to save an array of string pointers for each structure entry. Instead, just skip the strings. If this code is reused to provide a generic SMBIOS table walker in the future we could provide a method that looks up a specific string N for a given structure record instead of pre-populating an array of pointers. This fixes a buffer overflow for structure entries with more than 20 strings. PR: kern/148546 Reported by: Spencer Minear @ McAfee MFC after: 3 days Notes: svn path=/head/; revision=210066
* - Fixed incorrect watchdog timeout setting: MSB of a 2-byteRuslan Ermilov2009-12-181-9/+20
| | | | | | | | | | | | | | | | | | | | | | | | value is obtained by dividing it by 256, not by 2550; also, one second is 10^9 nanoseconds, not 1800000000 nanoseconds. - Due to rounding error, setting watchdog to a really small timeout (<1 sec) was turning the watchdog off. It should set the watchdog to a small timeout instead. - Implemented error checking in ipmi_wd_event(), as required by watchdog(9). PR: kern/130512 Submitted by: Dmitrij Tejblum - Additionally, check that the timeout value is within the supported range, and if it's too large, act as required by watchdog(9). MFC after: 3 days Notes: svn path=/head/; revision=200666
* Import ACPICA 20090521.Jung-uk Kim2009-06-051-1/+2
| | | | Notes: svn path=/head/; revision=193530
* Add stuff to support upcoming BMC/IPMI flashing of newer Dell machineDoug Ambrisko2009-03-261-0/+113
| | | | | | | | | | | | | | | | | | | | | | | via the Linux tool. - Add Linux shim to ipmi(4) - Create a partitions file to linprocfs to make Linux fdisk see disks. This file is dynamic so we can see disks come and go. - Convert msdosfs to vfat in mtab since Linux uses that for msdosfs. - In the Linux mount path convert vfat passed in to msdosfs so Linux mount works on FreeBSD. Note that tasting works so that if da0 is a msdos file system /compat/linux/bin/mount /dev/da0 /mnt works. - fix a 64it bug for l_off_t. Grabing sh, mount, fdisk, df from Linux, creating a symlink of mtab to /compat/linux/etc/mtab and then some careful unpacking of the Linux bmc update tool and hacking makes it work on newer Dell boxes. Note, probably if you can't figure out how to do this, then you probably shouldn't be doing it :-) Notes: svn path=/head/; revision=190445
* Don't right-adjust the SMBus slave address for SSIF IPMI BMCs enumeratedJohn Baldwin2009-02-031-1/+1
| | | | | | | | via ACPI either. This is somewhat academic since we don't currently support such devices though. Notes: svn path=/head/; revision=188078
* - Change ichsmb(4) to follow the format of all the other smbus controllersJohn Baldwin2009-02-031-2/+2
| | | | | | | | | | | | | | | | for slave addressing by using left-adjusted slave addresses (i.e. xxxxxxx0b). - Require the low bit of the slave address to always be zero in smb(4) to help catch broken applications. - Adjust some code in the IPMI driver to not convert the slave address for SSIF to a right-adjusted address. I (or possibly ambrisko@) added this in the past to (unknowingly) work around the bug in ichsmb(4). Submitted by: Andriy Gapon <avg of icyb.net.ua> (1,2) MFC after: 1 month Notes: svn path=/head/; revision=188077
* Fix typo where the code was missing the "IPMICTL_RECEIVE_MSG_32" conditionDavid E. O'Brien2008-11-141-1/+1
| | | | | | | test. Notes: svn path=/head/; revision=184949
* Remove hack attempt at using devfs cloning for per-file descriptor storage.John Baldwin2008-08-282-134/+37
| | | | | | | | | | | Use the much simpler cdevpriv for per-fd state and enable it. This allows multiple opens of /dev/ipmi0 (e.g. using ipmitool while ipmievd is running in the background). MFC after: 1 week Notes: svn path=/head/; revision=182322
* - Tweak an error message.John Baldwin2008-08-281-3/+3
| | | | | | | | | | - Fix a buglet where && was used instead of & to test if OBF was set in a couple of places. MFC after: 1 week Notes: svn path=/head/; revision=182321
* Rename the kthread_xxx (e.g. kthread_create()) callsJulian Elischer2007-10-203-6/+6
| | | | | | | | | | | | | | to kproc_xxx as they actually make whole processes. Thos makes way for us to add REAL kthread_create() and friends that actually make theads. it turns out that most of these calls actually end up being moved back to the thread version when it's added. but we need to make this cosmetic change first. I'd LOVE to do this rename in 7.0 so that we can eventually MFC the new kthread_xxx() calls. Notes: svn path=/head/; revision=172836
* Add support to the ipmi, isa attachment to attempt to read ipmiDoug Ambrisko2007-07-161-2/+79
| | | | | | | | | | | | | | | config info. from device.hints. Some machines have ipmi controllers that do not have attachment info in either PCI, SMBIOS or ACPI. This idea was hacked together by me and then done properly by jhb. Submitted by: jhb Reviewed by: jhb (man page) Approved by: re (Ken Smith) MFC after: 1 week Notes: svn path=/head/; revision=171464
* Update __FreeBSD_version check for MFC of pmap_mapbios().John Baldwin2007-05-021-1/+1
| | | | Notes: svn path=/head/; revision=169223