aboutsummaryrefslogtreecommitdiff
path: root/sys/isa
Commit message (Collapse)AuthorAgeFilesLines
* bus_alloc_resource: Pass rid by value to BUS_ALLOC_RESOURCE DEVMETHODJohn Baldwin2025-12-092-2/+2
| | | | | | | | | The wrapper functions such as bus_alloc_resource_any() still support passing the rid by value or pointer, but the underlying implementation now passes by value. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D53402
* Revert "isa: Use gone_in_dev(9) for deprecation message"Ed Maste2025-10-281-2/+2
| | | | | | | | | | gone_in(_dev) prints only one message per function call src line, so this would miss reporting for the second and later such devices. This reverts commit ce6792d3cd798079f0c9ba244faba4ea666bb6f4. Reported by: glebius Sponsored by: The FreeBSD Foundation
* isa: Use gone_in_dev(9) for deprecation messageEd Maste2025-10-271-2/+2
| | | | | | Reviewed by: bz, imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D53366
* sys: Bump non-ISA PNP removal to 16.0Ed Maste2025-10-251-1/+1
| | | | | | This may include atkbdc, which is not being removed in 15.0. Sponsored by: The FreeBSD Foundation
* isa_common: allow multiple device instancesShengYi Hung2025-10-031-1/+1
| | | | | | | | | | | | | In some devices, there may be multiple isa bridges available from different sources. Therefore, we allow multiple lpc devices to be generated so that pcie bus won't show "none" anymore. For example, in my AMD based Framework Laptop, there are two such bridges. One is acpi hinted, another is from pcie. Reviewed by: imp Approved by: lwhsu (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D52815
* isa: Fix a typo in a source code commentGordon Bergling2025-08-171-1/+1
| | | | | | - s/Monochome/Monochrome/ MFC after: 3 days
* newbus: replace leftover device unit wildcardsAhmad Khalifa2025-06-211-1/+2
| | | | | | Reviewed by: imp, jhb Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D50913
* machine/stdarg.h -> sys/stdarg.hBrooks Davis2025-06-111-2/+1
| | | | | | | | | | | | | Switch to using sys/stdarg.h for va_list type and va_* builtins. Make an attempt to insert the include in a sensible place. Where style(9) was followed this is easy, where it was ignored, aim for the first block of sys/*.h headers and don't get too fussy or try to fix other style bugs. Reviewed by: imp Exp-run by: antoine (PR 286274) Pull Request: https://github.com/freebsd/freebsd-src/pull/1595
* Replace calls to bus_generic_attach with bus_attach_childrenJohn Baldwin2024-12-062-5/+6
| | | | | Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47675
* Replace calls to bus_generic_probe with bus_identify_childrenJohn Baldwin2024-12-062-2/+2
| | | | | Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47674
* isa: Use a bus_child_deleted method to free ivars for childrenJohn Baldwin2024-11-011-0/+7
| | | | | Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47368
* newbus: replace -1 in BUS_ADD_CHILD(...-1) with DEVICE_UNIT_ANYWarner Losh2024-07-251-1/+1
| | | | Sponsored by: Netflix
* newbus: globally replace device_add_child(..., -1) with DEVICE_UNIT_ANYWarner Losh2024-07-251-1/+1
| | | | Sponsored by: Netflix
* new-bus: Remove the 'rid' and 'type' arguments from BUS_RELEASE_RESOURCEJohn Baldwin2024-03-132-3/+1
| | | | | | | | | | The public bus_release_resource() API still accepts both forms, but the internal kobj method no longer passes the arguments. Implementations which need the rid or type now use rman_get_rid() or rman_get_type() to fetch the value from the allocated resource. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D44131
* sys: Automated cleanup of cdefs and other formattingWarner Losh2023-11-273-3/+0
| | | | | | | | | | | | | | | | Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row. Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/ Sponsored by: Netflix
* sys: Remove ancient SCCS tags.Warner Losh2023-11-272-4/+0
| | | | | | | | Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script. Sponsored by: Netflix
* isa: Postpone removal of the non-PNP driver until 15Zhenlei Huang2023-10-281-1/+1
| | | | | | Reviewed by: imp MFC after: 1 day Differential Revision: https://reviews.freebsd.org/D42387
* sys: Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-161-1/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* sys: Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-166-12/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* sys: Remove $FreeBSD$: one-line .h patternWarner Losh2023-08-162-2/+0
| | | | Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
* sys: Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-165-10/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* isa_common: find next bit fasterDoug Moore2023-08-011-6/+1
| | | | | | | | Since ffs is no longer implemented with a linear search, find_next_bit can work in constant time, with masking. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D41251
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-1210-10/+10
| | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
* Adjust function definition in isa's pnp.c to avoid clang 15 warningDimitry Andric2022-07-271-1/+1
| | | | | | | | | | | | | | | With clang 15, the following -Werror warning is produced: sys/isa/pnp.c:118:24: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] pnp_send_initiation_key() ^ void This is because pnp_send_initiation_key() is declared with a (void) argument list, but defined with an empty argument list. Make the definition match the declaration. MFC after: 3 days
* isa: Remove unused devclass arguments to DRIVER_MODULE.John Baldwin2022-05-063-12/+4
|
* Remove isa_devclass from ISA bus drivers.John Baldwin2022-05-062-5/+2
|
* Remove isab_devclass from ISA bridge drivers.John Baldwin2022-05-062-5/+0
|
* vgapm: Use devclass_find to lookup the vga devclass in suspend and resume.John Baldwin2022-04-211-2/+2
| | | | | Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D35009
* FB_INSTALL_CDEV: Remove this option and related code.John Baldwin2022-04-211-75/+0
| | | | | | | | | This option was never enabled in GENERIC and does not appear to work (the cdevsw is stored in a global array but never passed to make_dev to be associated with a character device). Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D35008
* sc: Use devclass_find to lookup the sc devclass.John Baldwin2022-04-211-4/+7
| | | | | Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D35007
* sys/isa: Use C99 fixed-width integer types.John Baldwin2021-12-282-11/+11
| | | | | | | No functional change. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D33636
* newbus: Move from bus_child_{pnpinfo,location}_src to ↵Warner Losh2021-06-231-10/+7
| | | | | | | | | | | | | | | | | | | | | | bus_child_{pnpinfo,location} with sbuf Now that the upper layers all go through a layer to tie into these information functions that translates an sbuf into char * and len. The current interface suffers issues of what to do in cases of truncation, etc. Instead, migrate all these functions to using struct sbuf and these issues go away. The caller is also in charge of any memory allocation and/or expansion that's needed during this process. Create a bus_generic_child_{pnpinfo,location} and make it default. It just returns success. This is for those busses that have no information for these items. Migrate the now-empty routines to using this as appropriate. Document these new interfaces with man pages, and oversight from before. Reviewed by: jhb, bcr Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D29937
* Remove more remnants of sio(4)Mark Johnston2021-04-071-1/+0
| | | | | | | Reviewed by: imp MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D29626
* Move back the isa non-PNP driver deadline to FreeBSD 14.Warner Losh2021-03-081-1/+1
|
* sc(4) md bits: stop setting sc->kbd entirelyKyle Evans2019-12-301-1/+0
| | | | | | | | The machdep parts no longer need to touch keyboard parts after r356043; sc->kbd will be 0-initialized and this works as expected. Notes: svn path=/head/; revision=356196
* syscons: drop keyboard index from softcKyle Evans2019-12-231-1/+1
| | | | | | | | | | | | | | Analysis seems to reveal that sc->keyboard >= 0 implies sc->kbd != NULL and there's no such scenario where sc->kbd is set (and theoretically used to rebuild sc->keyboard) with the keyboard unavailable. Drop the index softc. The index is only explicitly needed in few places, in which case we can just as easily grab it from sc->kbd. There's no need for keeping sc->kbd and sc->keyboard in sync when it can be readily accomplished with just the former. Notes: svn path=/head/; revision=356043
* Reapply, with minor tweaks, r338025, from the original commit:Warner Losh2018-09-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove unused and easy to misuse PNP macro parameter Inspired by r338025, just remove the element size parameter to the MODULE_PNP_INFO macro entirely. The 'table' parameter is now required to have correct pointer (or array) type. Since all invocations of the macro already had this property and the emitted PNP data continues to include the element size, there is no functional change. Mostly done with the coccinelle 'spatch' tool: $ cat modpnpsize0.cocci @normaltables@ identifier b,c; expression a,d,e; declarer MODULE_PNP_INFO; @@ MODULE_PNP_INFO(a,b,c,d, -sizeof(d[0]), e); @singletons@ identifier b,c,d; expression a; declarer MODULE_PNP_INFO; @@ MODULE_PNP_INFO(a,b,c,&d, -sizeof(d), 1); $ rg -l MODULE_PNP_INFO -- sys | \ xargs spatch --in-place --sp-file modpnpsize0.cocci (Note that coccinelle invokes diff(1) via a PATH search and expects diff to tolerate the -B flag, which BSD diff does not. So I had to link gdiff into PATH as diff to use spatch.) Tinderbox'd (-DMAKE_JUST_KERNELS). Approved by: re (glen) Notes: svn path=/head/; revision=338948
* Back out r338035 until Warner is finished churning GSoC PNP patchesConrad Meyer2018-08-191-1/+1
| | | | | | | | | | I was not aware Warner was making or planning to make forward progress in this area and have since been informed of that. It's easy to apply/reapply when churn dies down. Notes: svn path=/head/; revision=338037
* Remove unused and easy to misuse PNP macro parameterConrad Meyer2018-08-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Inspired by r338025, just remove the element size parameter to the MODULE_PNP_INFO macro entirely. The 'table' parameter is now required to have correct pointer (or array) type. Since all invocations of the macro already had this property and the emitted PNP data continues to include the element size, there is no functional change. Mostly done with the coccinelle 'spatch' tool: $ cat modpnpsize0.cocci @normaltables@ identifier b,c; expression a,d,e; declarer MODULE_PNP_INFO; @@ MODULE_PNP_INFO(a,b,c,d, -sizeof(d[0]), e); @singletons@ identifier b,c,d; expression a; declarer MODULE_PNP_INFO; @@ MODULE_PNP_INFO(a,b,c,&d, -sizeof(d), 1); $ rg -l MODULE_PNP_INFO -- sys | \ xargs spatch --in-place --sp-file modpnpsize0.cocci (Note that coccinelle invokes diff(1) via a PATH search and expects diff to tolerate the -B flag, which BSD diff does not. So I had to link gdiff into PATH as diff to use spatch.) Tinderbox'd (-DMAKE_JUST_KERNELS). Notes: svn path=/head/; revision=338035
* Revert r330780, it was improperly tested and results in taking a spinIan Lepore2018-03-111-1/+1
| | | | | | | | | mutex before acquiring sleep mutexes. Reported by: kib@ Notes: svn path=/head/; revision=330783
* Eliminate atrtc_time_lock, and use atrtc_lock for efirtc locking.Ian Lepore2018-03-111-1/+1
| | | | Notes: svn path=/head/; revision=330780
* Use separate mutexes for atrtc and i8254 locking. Change all the strangeIan Lepore2018-03-111-1/+0
| | | | | | | | | | | un-function-like RTC_LOCK/UNLOCK macro usage into normal function calls. Since there is no longer any need to handle register access from a debugger context, those function calls can just be regular mutex lock/unlock calls. Requested by: bde Notes: svn path=/head/; revision=330773
* Add ISA PNP tables to ISA drivers. Fix a few incidental comments.Warner Losh2018-01-291-1/+10
| | | | | | | ACPI ISA PBP tables not tagged, there's bigger issues with them. Notes: svn path=/head/; revision=328524
* On further testing on actual machines with this hardware, we shouldWarner Losh2017-12-301-2/+3
| | | | | | | only warn for devices that are attached. Add missing \n. Notes: svn path=/head/; revision=327379
* Warn when nonPNP ISA devices are attached in GENERIC that they areWarner Losh2017-12-233-26/+29
| | | | | | | | | | | | | | | being removed from GENERIC in 12. Always print PNP info for ISA when it exists: it doesn't depend on ISAPNP. Add PNP ID to orm and vga to prevent us from warning about them since those devices aren't being removed from GENERIC. PNP devices will be removed from GENERIC too, but they will be automatically loaded, so need no warning. We don't warn for non-GENERIC kernels because people running them are presumed to know what they are doing. MFC After: 2 weeks Notes: svn path=/head/; revision=327120
* Fix cut-and-paste error s/pccard/isa/Warner Losh2017-12-231-1/+1
| | | | Notes: svn path=/head/; revision=327103
* Create a new ISA_PNP_INFO macro. Use this macro every where we haveWarner Losh2017-12-231-0/+4
| | | | | | | | | | ISA PNP card support (replace by hand version in if_ed). Move module declarations to the end of some files. Fix PCCARD_PNP_INFO to use nitems(). Remove some stale comments about pc98, turns out the comment was simply wrong. Notes: svn path=/head/; revision=327102
* sys: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-2710-0/+20
| | | | | | | | | | | | | | | | | 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. No functional change intended. Notes: svn path=/head/; revision=326272
* sys: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-202-0/+4
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. 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. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326023
* spdx: initial adoption of licensing ID tags.Pedro F. Giffuni2017-11-181-0/+2
| | | | | | | | | | | | | | | | | | | | 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. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Initially, only tag files that use BSD 4-Clause "Original" license. RelNotes: yes Differential Revision: https://reviews.freebsd.org/D13133 Notes: svn path=/head/; revision=325966