aboutsummaryrefslogtreecommitdiff
path: root/sys/isa
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Remove i386 XBOX support.Konstantin Belousov2017-11-161-19/+0
| | | | | | | | | | | | | | | It is for console presented at 2001 and featuring Pentium III processor. Even if any of them are still alive and run FreeBSD, we do not have any sign of life from their users. While removing another dozens of #ifdefs from the i386 sources reduces the aversion from looking at the code and improves the platform vitality. Reviewed by: cem, pfg, rink (XBOX support author) Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D13016 Notes: svn path=/head/; revision=325892
* Use better hard-coded defaults for the cursor shape, and remove nearbyBruce Evans2017-08-191-6/+0
| | | | | | | | | | | | | | | | | | | | | redundant initializations. Hard-code base = 0, height = (approx. 1/8 of the boot-time font height) in all cases, and remove the BIOS/MD support for setting these values. This asks for an underline cursor sized for the boot-time font instead of various less hard-coded but worse values. I used that think that the x86 BIOS always gave the same values as the above hard-coding, but on 1 of my systems it gives the wrong value of base = 1. The remaining BIOS fields are shift_state and bell_pitch. These are now consistently not explicitly reinitialized to 0. All sc_get_bios_value() functions except x86's are now empty, and the only useful thing that x86 returns is shift_state. This really belongs in atkbdc, but heavier use of the BIOS to read the more useful typematic rate has been removed there. fb still makes much heavier use of the BIOS. Notes: svn path=/head/; revision=322705
* Stop calling atrtc_set() from the xen timer clock_settime() method. ThatIan Lepore2017-08-111-1/+0
| | | | | | | | | | | | | | | | | removes the only reference to atrtc_set() from outside of atrtc.c, so make it static. The xen timer driver registers as a realtime clock with 1us resolution. In the past that resulted in only the xen timer's clock_settime() getting called, so it would call atrtc_set() to set the hardware clock as well. As of r32090, the clock_settime() method of all registered realtime clocks gets called, so the xen driver no longer needs to chain-call the lower-resolution driver. Thanks to royger@ for talking me through the xen stuff, and for testing. Notes: svn path=/head/; revision=322411
* Protect access to the AT realtime clock with its own mutex.Ian Lepore2017-07-121-0/+1
| | | | | | | | | | | | | | | | | | The mutex protecting access to the registered realtime clock should not be overloaded to protect access to the atrtc hardware, which might not even be the registered rtc. More importantly, the resettodr mutex needs to be eliminated to remove locking/sleeping restrictions on clock drivers, and that can't happen if MD code for amd64 depends on it. This change moves the protection into what's really being protected: access to the atrtc date and time registers. This change also adds protection when the clock is accessed from xentimer_settime(), which bypasses the resettodr locking. Differential Revision: https://reviews.freebsd.org/D11483 Notes: svn path=/head/; revision=320901
* Renumber copyright clause 4Warner Losh2017-02-282-2/+2
| | | | | | | | | | | | Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96 Notes: svn path=/head/; revision=314436
* Remove pc98 support completely.Yoshihiro Takahashi2017-01-284-59/+0
| | | | | | | | | I thank all developers and contributors for pc98. Relnotes: yes Notes: svn path=/head/; revision=312910
* sys/isa: minor spelling fixes.Pedro F. Giffuni2016-05-033-3/+3
| | | | | | | No functional change. Notes: svn path=/head/; revision=299006
* atrtc: export function to set RTCRoger Pau Monné2016-05-021-0/+1
| | | | | | | | | | | | | | This is going to be used by the Xen clock on Dom0 in order to set the RTC of the host. The current logic in atrtc_settime is moved to atrtc_set and the unused device_t parameter is removed from the atrtc_set function call so it can be safely used by other callers. Sponsored by: Citrix Systems R&D Reviewed by: kib, jhb Differential revision: https://reviews.freebsd.org/D6067 Notes: svn path=/head/; revision=298928
* isa/pnp: for pointers replace 0 with NULL.Pedro F. Giffuni2016-04-141-5/+5
| | | | | | | | | These are mostly cosmetical, no functional change. Found with devel/coccinelle. Notes: svn path=/head/; revision=297978
* Fix the resource_list_print_type() calls to use uintmax_t.Justin Hibbits2016-03-221-4/+4
| | | | | | | Missed a bunch from r297000. Notes: svn path=/head/; revision=297199
* Replace all resource occurrences of '0UL/~0UL' with '0/~0'.Justin Hibbits2016-03-031-1/+1
| | | | | | | | | | | | | | | | Summary: The idea behind this is '~0ul' is well-defined, and casting to uintmax_t, on a 32-bit platform, will leave the upper 32 bits as 0. The maximum range of a resource is 0xFFF.... (all bits of the full type set). By dropping the 'ul' suffix, C type promotion rules apply, and the sign extension of ~0 on 32 bit platforms gets it to a type-independent 'unsigned max'. Reviewed By: cem Sponsored by: Alex Perez/Inertial Computing Differential Revision: https://reviews.freebsd.org/D5255 Notes: svn path=/head/; revision=296336
* Replace several bus_alloc_resource() calls using default arguments with ↵Justin Hibbits2016-02-192-8/+8
| | | | | | | | | | | | bus_alloc_resource_any() Since these calls only use default arguments, bus_alloc_resource_any() is the right call. Differential Revision: https://reviews.freebsd.org/D5306 Notes: svn path=/head/; revision=295790
* Convert rman to use rman_res_t instead of u_longJustin Hibbits2016-01-272-2/+3
| | | | | | | | | | | | | | | | | | | | | | | Summary: Migrate to using the semi-opaque type rman_res_t to specify rman resources. For now, this is still compatible with u_long. This is step one in migrating rman to use uintmax_t for resources instead of u_long. Going forward, this could feasibly be used to specify architecture-specific definitions of resource ranges, rather than baking a specific integer type into the API. This change has been broken out to facilitate MFC'ing drivers back to 10 without breaking ABI. Reviewed By: jhb Sponsored by: Alex Perez/Inertial Computing Differential Revision: https://reviews.freebsd.org/D5075 Notes: svn path=/head/; revision=294883
* Remove vestiges of knowing the ISA bus, which we gave up on around 20Warner Losh2014-03-191-115/+1
| | | | | | | years ago. Remove redunant copy of isaregs.h. Notes: svn path=/head/; revision=263379
* - There's no need to overwrite the default device method with the defaultMarius Strobl2011-11-221-2/+1
| | | | | | | | | | | | | one. Interestingly, these are actually the default for quite some time (bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9) since r52045) but even recently added device drivers do this unnecessarily. Discussed with: jhb, marcel - While at it, use DEVMETHOD_END. Discussed with: jhb - Also while at it, use __FBSDID. Notes: svn path=/head/; revision=227843
* Move VT switching hack for suspend/resume from bus drivers to syscons.cJung-uk Kim2011-05-091-127/+0
| | | | | | | | | using event handlers. A different version was Submitted by: Taku YAMAMOTO (taku at tackymt dot homeip dot net) Notes: svn path=/head/; revision=221708
* Retire isa_setup_intr() and isa_teardown_intr() and use the generic busJohn Baldwin2011-05-062-8/+2
| | | | | | | | | versions instead. They were never needed as bus_generic_intr() and bus_teardown_intr() had been changed to pass the original child device up in 42734, but the ISA bus was not converted to new-bus until 45720. Notes: svn path=/head/; revision=221526
* - Enable an extra debugging bootverbose printf when probing ISA PNP cardsJohn Baldwin2011-03-291-2/+2
| | | | | | | | | | | | listing each card as it is found on non-PC98 (PC98 already had this). - Increase the length of the DELAY() used before timing out while reading PNP resource data. Tested by: Steven Nikkel steven_nikkel ertyu org MFC after: 1 week Notes: svn path=/head/; revision=220126
* bus_add_child: change type of order parameter to u_intAndriy Gapon2010-09-101-1/+1
| | | | | | | | | | | | | This reflects actual type used to store and compare child device orders. Change is mostly done via a Coccinelle (soon to be devel/coccinelle) semantic patch. Verified by LINT+modules kernel builds. Followup to: r212213 MFC after: 10 days Notes: svn path=/head/; revision=212413
* When we are not switching VTs, just mark all buffer to be updated.Jung-uk Kim2010-07-151-1/+7
| | | | Notes: svn path=/head/; revision=210149
* Implement new event timers infrastructure. It provides unified APIs forAlexander Motin2010-06-201-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | writing event timer drivers, for choosing best possible drivers by machine independent code and for operating them to supply kernel with hardclock(), statclock() and profclock() events in unified fashion on various hardware. Infrastructure provides support for both per-CPU (independent for every CPU core) and global timers in periodic and one-shot modes. MI management code at this moment uses only periodic mode, but one-shot mode use planned for later, as part of tickless kernel project. For this moment infrastructure used on i386 and amd64 architectures. Other archs are welcome to follow, while their current operation should not be affected. This patch updates existing drivers (i8254, RTC and LAPIC) for the new order, and adds event timers support into the HPET driver. These drivers have different capabilities: LAPIC - per-CPU timer, supports periodic and one-shot operation, may freeze in C3 state, calibrated on first use, so may be not exactly precise. HPET - depending on hardware can work as per-CPU or global, supports periodic and one-shot operation, usually provides several event timers. i8254 - global, limited to periodic mode, because same hardware used also as time counter. RTC - global, supports only periodic mode, set of frequencies in Hz limited by powers of 2. Depending on hardware capabilities, drivers preferred in following orders, either LAPIC, HPETs, i8254, RTC or HPETs, LAPIC, i8254, RTC. User may explicitly specify wanted timers via loader tunables or sysctls: kern.eventtimer.timer1 and kern.eventtimer.timer2. If requested driver is unavailable or unoperational, system will try to replace it. If no more timers available or "NONE" specified for second, system will operate using only one timer, multiplying it's frequency by few times and uing respective dividers to honor hz, stathz and profhz values, set during initial setup. Notes: svn path=/head/; revision=209371
* Do not attempt to switch to the same VTs between suspend and resume.Jung-uk Kim2010-05-261-9/+11
| | | | Notes: svn path=/head/; revision=208567
* Let the first device suspend and the last device resume syscons(4).Jung-uk Kim2010-05-261-10/+5
| | | | Notes: svn path=/head/; revision=208564
* Fix more style(9) nits that I missed in the previous commit.Jung-uk Kim2010-05-221-5/+4
| | | | Notes: svn path=/head/; revision=208413
* Fix style(9) nits.Jung-uk Kim2010-05-221-36/+39
| | | | Notes: svn path=/head/; revision=208412
* Suspend screen updates when the video controller is powered down.Jung-uk Kim2010-05-221-15/+86
| | | | Notes: svn path=/head/; revision=208411
* Introduce the new kernel sub-tree x86 which should contain all the codeAttilio Rao2010-02-252-516/+0
| | | | | | | | | | | | | | | | | shared and generalized between our current amd64, i386 and pc98. This is just an initial step that should lead to a more complete effort. For the moment, a very simple porting of cpufreq modules, BIOS calls and the whole MD specific ISA bus part is added to the sub-tree but ideally a lot of code might be added and more shared support should grow. Sponsored by: Sandvine Incorporated Reviewed by: emaste, kib, jhb, imp Discussed on: arch MFC: 3 weeks Notes: svn path=/head/; revision=204309
* Remove extraneous semicolons, no functional changes.Martin Blapp2010-01-071-1/+1
| | | | | | | | Submitted by: Marc Balmer <marc@msys.ch> MFC after: 1 week Notes: svn path=/head/; revision=201758
* Update d_mmap() to accept vm_ooffset_t and vm_memattr_t.Robert Noland2009-12-291-2/+4
| | | | | | | | | | | | | | | | This replaces d_mmap() with the d_mmap2() implementation and also changes the type of offset to vm_ooffset_t. Purge d_mmap2(). All driver modules will need to be rebuilt since D_VERSION is also bumped. Reviewed by: jhb@ MFC after: Not in this lifetime... Notes: svn path=/head/; revision=201223
* Attach dpms(4) to vgapm and make sure to restore DPMS state afterJung-uk Kim2009-12-151-0/+3
| | | | | | | | | VGA is resumed properly. Reviewed by: jhb Notes: svn path=/head/; revision=200584
* - Partially revert hackish r198964 and r199002.Jung-uk Kim2009-11-121-92/+145
| | | | | | | | | | - Add a proxy driver vgapm to help vgapci to save/load VGA state. - Move device_set_desc() to the right place while we are here. Reviewed by: jhb Notes: svn path=/head/; revision=199229
* Remove duplicate suspend/resume code from vga_pci.c and let vga(4) registerJung-uk Kim2009-11-061-19/+53
| | | | | | | | | itself to an associated PCI device if it exists. It is little bit hackish but it should fix build without frame buffer driver since r198964. Fix some style(9) nits in vga_isa.c while we are here. Notes: svn path=/head/; revision=199002
* Save/restore VGA state from vga_pci.c instead of relying on vga_isa.c.Jung-uk Kim2009-11-051-19/+18
| | | | | | | | It was not working because we were saving its state after the device was powered down. Simplify vesa_load_state() as the culprit is fixed now. Notes: svn path=/head/; revision=198964
* Save/restore VGA color palette while suspending and resuming.Jung-uk Kim2009-11-041-10/+32
| | | | Notes: svn path=/head/; revision=198866