aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* lib/libnetbsd: bring in `__type_m{ax,in}*` macro familyHEADmainEnji Cooper4 hours1-0/+30
| | | | | | | | | | | These macros are used by some of the NetBSD tests which calculate the size of types, e.g., `__type_max(time_t)`. This wraps up the set of macros needed in order to update to the a netbsd-tests snapshot from this past month. Obtained from: https://github.com/netbsd/src (55b4b44) MFC after: 1 week
* style.mdoc: Add example manuals to FILESAlexander Ziaee5 hours1-0/+5
| | | | | | | | This is the OG meat and potatoes. MFC after: 3 days Reviewed by: 0mp, carlavilla Differential Revision: https://reviews.freebsd.org/D55301
* Refinements to the output when the EXTERROR_VERBOSE environment is setKirk McKusick6 hours2-9/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When kernel external errors are available they are included in the err(3) library function messages. In addition to the extended error itself, the kernel also tracks the kernel file and line number at which the error was generated. This additional information is not included in the err(3) messages unless the EXTERROR_VERBOSE environment variable is present. Currently, when EXTERROR_VERBOSE is present, all the internal extended error information associated with the error is printed most of which is redundant with the formatted error message printed by err(3). This change will add only the kernel file and line number to the err(3) message when EXTERROR_VERBOSE is present and set to "brief". Sample output with bad protection bits to mmap: guest_16 % ./Example bigfile Example: mmap bigfile: Invalid argument (unknown PROT bits 0x8) guest_16 % setenv EXTERROR_VERBOSE guest_16 % ./Example bigfile Example: mmap bigfile: Invalid argument (unknown PROT bits 0x8 errno 22 category 1 (src sys/vm/vm_mmap.c:200) p1 0x8 p2 0) guest_16 % setenv EXTERROR_VERBOSE brief guest_16 % ./Example bigfile Example: mmap bigfile: Invalid argument (unknown PROT bits 0x8 (src sys/vm/vm_mmap.c:200)) Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D55494 MFC-after: 1 week Sponsored-by: Netflix
* lpd: Add timeout optionDag-Erling Smørgrav6 hours2-12/+26
| | | | | | | | | Set a 120-second receive timeout on all client connections, and add a command-line option to change that value. MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D55400
* lpd: Improve robustnessDag-Erling Smørgrav6 hours1-102/+189
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Check for integer overflow when receiving file sizes. * Check for buffer overflow when receiving file names, and fully validate the names. * Check for integer overflow when checking for available disk space. * Check for I/O errors when sending status codes. * Enforce one job per connection and one control file per job (see code comments for additional details). * Simplify readfile(), avoiding constructs vulnerable to integer overflow. * Don't delete files we didn't create. * Rename read_number() to read_minfree() since that's all it's used for, and move all the minfree logic into it. * Fix a few style issues. PR: 293278 MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D55399
* mwl: migrate to new net80211 encryption key APIAdrian Chadd8 hours1-8/+18
| | | | | | | | | | | Migrate to the new encryption key API rather than poking at the key struct directly. Notably this driver was very clear about its expectation the net80211 key layout w/ key, TX MIC and RX MIC matches the firmware layout and just memcpy()'ed it. That has been refactored. Differential Revision: https://reviews.freebsd.org/D54484
* wpi: migrate to new net80211 encryption key APIAdrian Chadd8 hours1-3/+6
| | | | | | | Migrate to the new encryption key API rather than poking at the key struct directly. Differential Revision: https://reviews.freebsd.org/D54482
* iwi: migrate to new net80211 encryption key APIAdrian Chadd8 hours1-2/+3
| | | | | | | Migrate to the new encryption key API rather than poking at the key struct directly. Differential Revision: https://reviews.freebsd.org/D54481
* ipw: migrate to new net80211 encryption key APIAdrian Chadd8 hours1-2/+3
| | | | | | | Migrate to the new encryption key API rather than poking at the key struct directly. Differential Revision: https://reviews.freebsd.org/D54480
* ath: migrate to new net80211 encryption key APIAdrian Chadd8 hours1-9/+25
| | | | | | | Migrate to the new encryption key API rather than poking at the key struct directly. Differential Revision: https://reviews.freebsd.org/D54479
* rge.4: correct media types in the manual pageKevin Lo9 hours1-8/+8
| | | | | | | Correct media types for 1000Mbit/s, 2500Mbit/s, 5000Mbit/s and 10Gbit/s. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D55496
* libnetbsd: add math.h and sys/time.hEnji Cooper12 hours2-0/+49
| | | | | | | | | | - `math.h`: `isinff(..)` - `sys/time.h`: `timespec*(x)` These two headers are used by tests in newer snapshots of `contrib/netbsd-tests`. MFC after: 1 week
* procstat: CID 1593951: Resource leakDavid Bright4 days1-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: A trivial resource leak fix; free the allocated memory before return. Test Plan: Code inspection, run command. I built a simple program that waits for a signal on a kqueue, then ran that. The standard procstat displays: ``` fbsd-dev% Waiting for SIGTERM... procstat -a kqueue PID KQFD FILTER IDENT FLAGS FFLAGS DATA UDATA STATUS 84352 3 SIGNAL 15 C - 0 0x0 - ``` The revised procstat displays: ``` fbsd-dev% sudo LD_LIBRARY_PATH=/usr/obj/usr/home/dab/git/freebsd/src/arm64.aarch64/lib/libutil /usr/obj/usr/home/dab/git/freebsd/src/arm64.aarch64/usr.bin/procstat/procstat -a kqueue PID KQFD FILTER IDENT FLAGS FFLAGS DATA UDATA STATUS 84352 3 SIGNAL 15 C - 0 0x0 - fbsd-dev% ``` As expected, the two displays are identical. This doesn't prove that the leak is gone, but it does prove that the revised command still operates correctly. I think it can clearly be seen from inspection of the change that the leak has been remedied. Reviewed-bys: vangyzen Differential Revision: https://reviews.freebsd.org/D55422
* system(3): Fix null caseDag-Erling Smørgrav15 hours2-1/+11
| | | | | | | | | | | | | | | | | | | | | Our manual page states that if given a null pointer, system() returns non-zero if the shell is available and zero if it is not. This is consistent with the C standard's description of system(), but it is not what we actually do. What we actually do is always return non-zero, as required by POSIX. As the POSIX rationale explains, implementing the logic required by the C standard does not violate POSIX, since a conforming system always has a shell, therefore the logic will always return non-zero. Since our libc is commonly used in non-conforming situations such as chroots or thin jails, we should implement the full logic required by the C standard. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: obiwac, bnovkov, kevans Differential Revision: https://reviews.freebsd.org/D55484
* system(3): Clarify return valuesDag-Erling Smørgrav15 hours1-3/+5
| | | | | | | | | | | | Our manual page currently states that system() will return 127 if it fails to execute the shell. The actual return value is, to quote POSIX, “as if the command language interpreter had terminated using exit(127) or _exit(127)”. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: bnovkov, kevans Differential Revision: https://reviews.freebsd.org/D55483
* system(3): Write our own testsDag-Erling Smørgrav15 hours2-1/+166
| | | | | | | | | Replace the somewhat perfunctory NetBSD tests with our own. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: bnovkov, kevans Differential Revision: https://reviews.freebsd.org/D55482
* system(3): Improve signal handlingDag-Erling Smørgrav15 hours1-43/+73
| | | | | | | | | | | | | | | | Ignore SIGINT and SIGQUIT and block SIGCHLD, as POSIX requires. To deal with the concurrency problem described in POSIX, we keep track of the count of concurrent invocations. We ignore and block signals only when the counter was zero before we incremented it, and restore them only when the counter reaches zero after we decrement it. Note that this does not address the issue of thread cancellation. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: bnovkov, sef, kevans Differential Revision: https://reviews.freebsd.org/D55471
* ffs snapshots: pass valid args to vn_start_writeEric van Gyzen19 hours1-1/+1
| | | | | | | | | If the initial no-wait vn_start_write fails, we pass the old PCATCH flag to the following sleepable vn_start_write. Following a75d1ddd74, that flag should be V_PCATCH. Sponsored by: Dell Inc. Differential Revision: https://reviews.freebsd.org/D55512
* mlx5: convert GET_TRUNK_IF() to functionKonstantin Belousov19 hours1-15/+18
| | | | | | | Reviewed by: slavash Tested by: Wafa Hamzah <wafah@nvidia.com> Sponsored by: Nvidia networking MFC after: 1 week
* mlx5: report IPSEC offload capabilities whenever IPSEC_OFFLOAD is configuredKonstantin Belousov19 hours3-5/+18
| | | | | | | | | | | | Do it always for bootverbose if offload was enabled in the kernel config, not only if the device actually supports all required capabilities to do the offload. Otherwise, having the code to print the caps is pointless. Reviewed by: slavash Tested by: Wafa Hamzah <wafah@nvidia.com> Sponsored by: NVidia networking MFC after: 1 week
* ipsec_offload: add comment stating why ipsec_accel_sa_newkey_cb() returns 0Konstantin Belousov19 hours1-0/+7
| | | | | | | Reviewed by: slavash Tested by: Wafa Hamzah <wafah@nvidia.com> Sponsored by: NVidia networking MFC after: 1 week
* netipsec/ipsec_offload.c: handle failures to install SA nicelyKonstantin Belousov19 hours1-6/+21
| | | | | | | | | | | | | | | | | | | | If driver refused to install SA, record rejected handle for SA on the interface always, not only for EOPNOTSUPP case. The ipsec_accel_output() function did the right thing if there is no rejection handle, but not having the handle allows further attempts to install the SA on the interface. If driver installed the SA, but ipsec_accel_handle_sav() returned error, uninstall the SA from the interface. Hardware must not be set up to process packets for which kernel expects no processing is done. In both cases, free the drv_spi if a handle was not installed. But keep drv_spi allocated if the deinstall returned an error from the driver. Reviewed by: slavash Tested by: Wafa Hamzah <wafah@nvidia.com> Sponsored by: NVidia networking MFC after: 1 week
* nullfs: Fix handling of doomed vnodes in nullfs_unlink_lowervp()Mark Johnston20 hours1-10/+4
| | | | | | | | | | | | | | | | | | | | | | nullfs_unlink_lowervp() is called with the lower vnode locked, so the nullfs vnode is locked too. The following can occur: 1. the vunref() call decrements the usecount 2->1, 2. a different thread calls vrele() on the vnode, decrements the usecount 0->1, then blocks on the vnode lock, 3. the first thread tests vp->v_usecount == 0 and observes that it is true, 4. the first thread incorrectly unlocks the lower vnode. Fix this by testing VN_IS_DOOMED directly. Since nullfs_unlink_lowervp() holds the vnode lock, the value of the VIRF_DOOMED flag is stable. Thanks to leres@ for patiently helping to track this down. PR: 288345 MFC after: 1 week Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D55446
* tcp: improve handling of segments in TIME WAITMichael Tuexen23 hours1-1/+1
| | | | | | | | | | | | | The check for excluding duplicate ACKs needs to consider only TH_SYN and TH_FIN. We know that TH_ACK is set and TH_RST is cleared. All other flags, in particular TH_ECE, TH_CWR, and TH_AE needs to be ignored for the check. PR: 292293 Reviewed by: rrs MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D55489
* tcp: BBLog incoming packets in TCPS_TIME_WAITMichael Tuexen23 hours1-0/+3
| | | | | | | | PR: 292293 Reviewed by: rrs, rscheff, pouria, Nick Banks, Peter Lei MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D5546
* When TCP ECN decides it wants to assure an ACK is sent it needs to do it ↵Randall Stewart23 hours3-4/+13
| | | | | | | | | | | | | | correctly and with some limits. So in testing I have found two interesting cases where ECN is going to make it so that an ack will be sent right away. These cases need to be limited to being in the ESTABLISHED state. You don't want ECN sending ACK's when we are transitioning in front or end states. Also we don't start a delayed ack timer <and> at the same time set the ACKNOW flag, thats just plain wrong. Reviewed by: tuexen, rscheff Differential Revision:<https://reviews.freebsd.org/D55460>
* sctp: fix so_proto when peeling off a socketMichael Tuexen23 hours3-4/+6
| | | | | | | Reported by: glebius Reviewed by: rrs Fixes: d195b3783fa4 ("sctp: fix socket type created by sctp_peeloff()") Differential Revision: https://reviews.freebsd.org/D55454
* mpool/mpool_get.c: Avoid clobbering 'errno' when handling 'pread' errorsBojan Novković24 hours1-0/+4
| | | | | | | | | | | | | | POSIX.1-2024 states that the 'free' function "shall not modify errno if ptr is a null pointer or a pointer previously returned as if by malloc() and not yet deallocated". However this is a fairly recent addition and non-compliant allocators might still clobber 'errno', causing 'mpool_get' to return the wrong error code. Fix this by saving and restoring 'errno' after calling 'free'. Sponsored by: Klara, Inc. Reviewed by: obiwac Differential Revision: https://reviews.freebsd.org/D55463 MFC after: 1 week
* asmc: introduce the concept of generic modelsEnji Cooper29 hours1-13/+67
| | | | | | | | | | | | | | | | | | | Having to enter in each of the models for Apple hardware, recompiling, etc, is tedious. Provide generic models so end-users can leverage some of the capabilities provided by the driver, i.e., common features like minimal fans and lights (if present on the generic model) support. The generic models are as follows: - Macmini - MacBookAir - MacBookPro - MacPro This sort of follows the pattern established by the `applesmc` driver in Linux. MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D55395
* asmc: add Wake-on-LAN control via sysctlAbdelkader Boudih29 hours2-0/+50
| | | | | | | | | | | | | | | | | Apple Mac systems support Wake-on-LAN from powered-off state (S5/G2) via the AUPO SMC key. This change adds a convenience sysctl, `dev.asmc.0.wol`. This can be disabled if set to 0 and enabled if set to 1. The AUPO key is volatile and resets to 0x00 on every boot, so WoL must be manually enabled before each shutdown to work from powered-off state. Users need to run: `sysctl dev.asmc.0.wol=1` before shutting down the system. The sysctl is best set to persist in `/etc/sysctl.conf`. MFC after: 1 week Reviewed By: markj, ngie Differential Revision: https://reviews.freebsd.org/D54439
* chore: replace {0, 0} with {DEV,KOBJ}METHOD_ENDEnji Cooper30 hours186-207/+208
| | | | | | | | | | | | | | Both of the aforementioned macros have been present in FreeBSD for well over a decade: 2009 for `KOBJMETHOD_END`; 2011 for `DEVMETHOD_END`. Adapt all hardcoded references of `{0, 0}` with `DEVMETHOD_END` and `KOBJMETHOD_END` as appropriate. This helps ensure that future adaptations to drivers following patterns documented in driver(9) can be made more easily/without issue. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D55414
* syscall_timing: add Makefile.dependKa Ho Ng30 hours1-0/+13
| | | | | | | | | This was part of review D44761. It was separated into another commit for better clarity. Obtained from: Hewlett Packard Enterprise MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D44761
* Use NO_SHARED instead of explicitly using -static flagStephen J. Kiernan30 hours1-1/+2
| | | | | | | | | | NO_SHARED is the proper way to declare linking a program without shared libraries. Obtained from: Hewlett Packard Enterprise MFC after: 1 week Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D44761
* LinuxKPI: 802.11: fold the sta state machine againBjoern A. Zeeb31 hours1-532/+254
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In and around d9f59799fc3e7 we adjusted the initial sta state machine implementation and unfolded some functions, duplicating code. This version tries to undo some of that as it seems that we can get away with doing it more cleanly these days. There are 5 main functions for the path from INIT to RUN (UP1,2,3.1,3.2,4) and 4 main functions for the path from RUN to INIT (DOWN1,2,3,4). The reason there is one more on the patch up is that we can go directly from AUTH to RUN without going through ASSOC first. In addition there are further functions relying only on these 9 base state change functions in order to implement the remaining possible state transitions net80211 can do (without CSA and SLEEP). Another change is that we no longer take a sta always through INIT/SCAN first and then back up to AUTH, that is, we are no longer deleting the sta from the firmware unless net80211 would also take us down to that state and in a follow-up back up. This is a preparation for another fix to come in order to import a newer version of iwlwifi (v6.19). I have run a few days of mlme_assoc (see tools) and some other basic regression tests. The only thing I managed was to deadlock net80211 for other reasons (ieee80211_waitfor_parent()). But this will need excessive user testing as the various options which may have an effect on the subtle details are great as we learnt in the past years. Sponsored by: The FreeBSD Foundation MFC after: 5 days
* LinuxKPI: 802.11: improve crypto debug loggingBjoern A. Zeeb31 hours1-0/+8
| | | | | | | | | | Add a log entry to lkpi_ieee80211_iterate_keys() in order to be able to determine if there are still keys available when a driver calls into this (e.g., iwlwifi does before removing the sta to make sure the keys are gone). Sponsored by: The FreeBSD Foundation MFC after: 3 days
* LinuxKPI: 802.11: adjust assoc check before key deletionBjoern A. Zeeb31 hours1-9/+21
| | | | | | | | | | | | | | | There is a discrepancy between the vif assoc state and the sta state (see comment in lkpi_sta_run_to_init()). Adjust the check in lkpi_iv_key_delete() and add it to lkpi_sta_del_keys() so that we can take way the keys after whatever comes first: the sta went away from AUTHORIZED (RUN) or if the vif is no longer marked assoc. This is needed as we may only take the sta down partially back to State 2 (cf. 802.11-2024, Figure 11-23) and key material is no longer valid before the vif gets cleaned up and the sta is removed entirely. Sponsored by: The FreeBSD Foundation MFC after: 3 days
* cxgbe tom: Use the same WRs as iSCSI to send PDUs for NVMeJohn Baldwin34 hours1-99/+13
| | | | | | Reviewed by: np (earlier version) Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D55470
* sys: Declare 'end' as an extern char[]John Baldwin34 hours4-5/+3
| | | | | | | | While here, remove an unused declaration. Reviewed by: jrtc27 Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D53898
* Do not fail 'devctl clear driver' if another driver is not foundMarcin Cieslak34 hours2-2/+15
| | | | | | | | | Detaching the bhyve(4) ppt driver from an unsupported PCI device should not raise a "Device not configured" error. We do not expect that a new driver must take over the device in this case. Reviewed by: imp, jhb Differential Revision: https://reviews.freebsd.org/D52050
* kern/sched_shims.c: back to ifuncKonstantin Belousov34 hours1-3/+2
| | | | | | | | | Reported by: kevans Reviewed by: kevans, mhorne Fixes: 0d3652f67d246348e2c017205c6782caf4484449 Sponsored by: The FreeBSD Foundation MFC after: 1 week Differrential revision: https://reviews.freebsd.org/D55490
* qoriq / nxp: Fix spelling take IIBjoern A. Zeeb37 hours2-2/+2
| | | | | | | | Fix spelling of NXP, which is not NPX, in two places. Improves: a4e30909ec98 Reported by: Kevin Bowling (kevin.bowling kev009.com), qoriq_dw_pci.c MFC after: 3 days
* LinuxKPI: 802.11: do not leak BA sessions when tearing down stateBjoern A. Zeeb38 hours1-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In certain cases we may tear down state of a node with 'ongoing' BA sessions. This can trigger a firmware crash with iwlwifi as reported in [1] when trying to remove the sta from the firmware. 0x2010303A | ADVANCED_SYSASSERT .. 0x00000000 | umac data1 (sta id=0) .. 0x0088030C | last host cmd (STA_RM) [1] https://lists.freebsd.org/archives/freebsd-wireless/2025-November/003901.html I hit the same problem while running regression tests after reworking some LinuxKPI 802.11 sta state machine bits. Add the missing calls to lkpi_sta_run_to_assoc() and lkpi_sta_run_to_init() to make sure (through net80211) we call (*ampdu_action) with IEEE80211_AMPDU_RX_STOP to avoid the firmware crash. Note: this specific patch was not excessively tested. The upcoming change to the state machine including this fix has seen more testing but also only needed the change in one place. The reason for putting this in upfront is to document the case well. Reported by: Mohammad Amin (the.madamin20 gmail.com) [1] Sponsored by: The FreeBSSD Foundation MFC after: 3 days
* ofed: reduce usage of struct dma_attrs *dma_attrsBjoern A. Zeeb38 hours1-4/+4
| | | | | | | | | | | | | | | | | | | | | | | ib_verbs.h still uses struct dma_attrs *dma_attrs everywhere. It is beyond my knowledge when that struct got deprecated upstream but it is still supported by our LinuxKPI. The problem is that the functions called with that argument (dma_map_single_attrs, dma_unmap_single_attrs, dma_map_sg_attrs, dma_unmap_sg_attrs) so far are #defines in LinuxKPI and drop the last argument (attrs) so it was never a problem. In preparation to pass the attrs to the actual implementation in LinuxKPI, which has gained support for them, we now pass dma_sttrs->flags which is the expected unsigned long bit field. If anyone has serious interest in updating our ofed implementation they could look into this some more and remove the usage of struct dma_attrs entirely. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D55390
* qoriq: fix spelling in device_set_desc()Bjoern A. Zeeb38 hours1-1/+1
| | | | | | | | The product series is called NXP QorIQ Layerscape. Remove the extra 'e. MFC after: 3 days Reviewed by: mmel, emaste Differential Revision: https://reviews.freebsd.org/D55388
* bsdinstall: fix EFI boot entry creationAhmad Khalifa39 hours1-11/+14
| | | | | | | | | | | | | | | | | | | | update_uefi_bootentry assumes that the caller sets FREEBSD_BOOTNAME and mntpt, which isn't the case anymore. The result is that there is no "FreeBSD" boot entry created/updated after install. Most machines manage to boot from the removable media path (if the loader is installed there too), but some don't. Take the loader's path as an argument and rename the variable used in the ZFS mirror loop so mntpt can be reused below. Also mark nentries as a local variable so it doesn't leak out of the function. PR: 293385 Fixes: 494de51bc0074472d1b01604f085daea0844f240 MFC after: 2 days Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D55469
* efibootmgr.8: capitalize examples section headerAhmad Khalifa39 hours1-1/+1
| | | | MFC after: 3 days
* tools/build/stddef.h: fix stock clang/gcc headersAhmad Khalifa39 hours1-2/+12
| | | | | | | | | | | | | Both clang and gcc's stddef.h are designed to be included multiple times with different combinations of __need_* macros defined (e.g __need_size_t). Remove the #pragma once to accommodate this, ptraddr_t is guarded by _PTRADDR_T_DECLARED anyways. Also use __SIZE_TYPE__ instead of size_t since it's not guaranteed to be defined. Reviewed by: brooks, imp, kib Differential Revision: https://reviews.freebsd.org/D55453
* acpi: Use __BUS_ACCESSOR_DEFAULT and __BUS_ACCESSOR for IVARsJohn Baldwin39 hours1-25/+4
| | | | | | | | | | | - Use __BUS_ACCESSOR_DEFAULT for the global handle IVAR to preserve existing behavior for acpi_get_handle. - Use __BUS_ACCESSOR for the private ACPI IVARs as these are only used with direct children of acpi0. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D55355
* acpi: Split ACPI IVARs into global and private setsJohn Baldwin39 hours3-4/+8
| | | | | | | | | | | | ACPI_IVAR_HANDLE is the only true "global" IVAR that can be used across multiple bus drivers. The other IVARs are private to direct children of acpi0. However, they need to be numbered after ISA IVARs as ACPI mimics an ISA bus device. To ensure this remains true, add an ISA_IVAR_LAST to use in assert that the private ACPI IVARs do not overlap with ISA IVARs. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D55354
* bus: Add __BUS_ACCESSOR_DEFAULTJohn Baldwin39 hours1-11/+29
| | | | | | | | | This macro is similar to __BUS_ACCESSOR in that it creates three helper routines for an ivar, but the "get" wrapper returns a default value if BUS_READ_IVAR does not return a value. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D55353