Commit Graph

421 Commits

Author SHA1 Message Date
thorpej 8ff6f65daf Remove unnecessary <sys/malloc.h>. 2023-12-20 06:36:01 +00:00
martin fd2f23e6a4 This kernels have no midi configured, so comment out pseudo-device sequencer 2022-06-07 18:33:41 +00:00
andvar ca7653601e fix various typos in comments and log messages. 2021-08-20 20:25:26 +00:00
thorpej c7fb772b85 Merge thorpej-cfargs2. 2021-08-07 16:18:40 +00:00
nia f3c68eb2b0 Remove uscanner(4) driver
This exists for compatibility with a Linux interface which was apparently
deprecated in Linux 2.6. There are various mailing list threads going
back to 2004 where the usefulness of this driver is discussed, but
the conclusion is that scanner software has all moved to using ugen(4)
instead, and enabling this driver will not help you scan things.
2021-06-29 10:22:33 +00:00
christos bb63a3f40f Don't reset MACHINE_ARCH; it can be mipsn64el now, and we need to be able
to find the compiler.
2021-06-06 13:59:48 +00:00
thorpej 2685996b0e 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?).
2021-04-24 23:36:23 +00:00
thorpej ae873cf0eb malloc(9) -> kmem(9) 2020-11-14 02:23:04 +00:00
simonb c26067d669 Add some compile time asserts for endianness on boards/systems that
only support a single endianness.
2020-08-17 07:50:41 +00:00
mrg 13b7915743 remove duplicate symbol now published in shared mips. 2020-08-17 07:22:46 +00:00
thorpej ca8ce3aeb1 Overhaul the interface to pci_configure_bus():
- Don't expose how PCI bus configuration resource management is implemented.
  Provide a new resource provider API:

  ==> pciconf_resource_init() -- Initialize a PCI configuration resources
      container.
  ==> pciconf_resource_add() -- Add a PCI configuration resource to the
      container (I/O, MEM, or prefetchable MEM).  Multiple resources of
      each type may be added.
  ==> pciconf_resource_fini() -- Tear down the PCI configurtation resources
      container once the bus has been configured.

  This is much easier to use than the previous method of providing an
  extent map for each kind of resource, and works better for e.g. ACPI
  platforms that provide potentially multiple PCI resources in tables
  provided by firmware.

- Re-implement PCI configuration resource management using vmem arenas,
  rather than extent maps.
2020-07-07 03:38:45 +00:00
chs 69a3e9b705 replace EX_NOWAIT with EX_WAITOK in device attach methods.
remove checks for failures that can no longer occur.
2020-06-14 01:40:02 +00:00
maya 5cf9e8b81f Remove uyap, USB YAP phone firmware loader.
And the associated ezload EZ-USB code, which is only used by uyap.
It could theoretically be used by other drivers, but none of them are
in tree.

I suspect that this device isn't in use, as phone technology has improved
a lot since 2001 when uyap(4) was added to the tree.

Proposed with no objections on netbsd-users on 13 April 2020
2020-05-16 13:46:10 +00:00
jdolecek 68e97caa11 mark nsmb major obsolete 2020-04-04 16:06:10 +00:00
maya 5e031685d6 remove urio(4), a driver for the Rio500 MP3 player.
At this point it is highly unlikely this 1999 device still has users,
but it still comes up in the context of maxv's USB-fuzzing (and any device
could pretend to be a urio(4)), so it's best to get rid of it.

Renamed all major entries to obsolete, as was done in previous removals.

This still requires an update to sanitizers, but they're located in
"external", perhaps it should be first committed upstream?

Proposed on tech-kern a month ago.
2020-01-29 18:39:00 +00:00
thorpej 6dbc6c953b Retire "le* at pci?" from the shipped kernel configs:
- If the config had both an le@pci and a pcn, simply remove le@pci
  (pcn would match at a higher priority anyway).
- If the config had le@pci enabled, but no pcn, change le@pci to pcn.
- If the config had le@pci commented out, but no pcn, change le@pci
  to pcn and leave it commented out.

The pcn driver supports more chips than le@pci and does DMA directly
to/from mbufs rather than memory copies.
2020-01-25 18:38:34 +00:00
thorpej 4541d6828b Remove FDDI support. 2020-01-20 18:38:17 +00:00
chs d47bcd296c 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.
2019-11-10 21:16:21 +00:00
isaki 47655f2d42 Add drvctl to kernel which has audio device.
audiocfg(1) requires drvctl(4).
2019-04-13 08:22:58 +00:00
rin 56d037034f Add ure(4) to kernel config files. Also add PHY drivers where necessary. 2019-02-06 11:58:30 +00:00
dholland 810a783361 Systematize handling of removed drivers.
- Every driver that was removed and whose number hasn't already been
   reused is now listed with a commented-out "obsolete" line.
 - The format of these has been systematized. Future format changes can
   probably be safely done with a script.
 - This does not include a few cases of assignments that only lasted a
   couple days, or stuff from before major reorgs. Some of these may
   be included nonetheless, because there was a lot of ground to cover
   and therefore not a lot of time to dig into history in detail.

Note that the obsolete listings do not mean the major numbers can
never be reused; that's up to portmasters and/or core. It does mean
that they won't be reused by accident, however, which in some cases
(depending on the driver, how widely used it was, its family of device
nodes, their default permissions, etc.) can be quite dangerous.

Note that some of the things now explicitly listed as obsolete are
really ancient history. My scan went back as far as when the majors
files were added. (But not before that.)
2019-01-28 02:28:56 +00:00
dholland 3f20967234 Restore satlink's majors entries commented out and marked obsolete.
Otherwise they might accidentally get reused later and cause a
security problem.
2019-01-27 17:59:22 +00:00
maxv 65d06f3f0e Remove the satlink driver. It was disabled everywhere, had no man page and
no use either. Spotted by thorpej in PR/21345, ok christos.
2019-01-27 08:53:28 +00:00
pgoyette d91f98a871 Merge the [pgoyette-compat] branch 2019-01-27 02:08:33 +00:00
jdolecek 072aa173aa move DEV_BSIZE, DEV_BSHIFT out of MD param.h, they are same on all ports
also move BLKDEV_IOSIZE, MAXPHYS, but allow override since some ports
have different value (powerpc uses NBPG for BLKDEV_IOSIZE, sun2/sun3
have lower MAXPHYS)
2019-01-07 22:00:30 +00:00
thorpej 6d4870476f Clean up initialization of com_regs structure, in preparation for
some additional changers.
2018-12-08 17:46:09 +00:00
maxv ebec90347e Remove ISDN from the kernel. It has remained unmaintained for a long time,
is of poor quality, and is now an obstacle to MP-ification. It was removed
ten years ago from FreeBSD for the same reason.

This retires a big user of the mbuf API, and will ease maintenance of the
kernel.
2018-09-23 09:20:57 +00:00
maxv 6c90bd5a8d Retire the 'midway' driver. Discussed on tech-net@ recently and also three
years ago, part of removing the network ATM code.
2018-09-06 05:36:49 +00:00
rin 46f2680da4 Add (commented out) mue(4) to where appropriate.
Also add MII/PHY drivers for USB NICs if missing.
2018-08-25 20:52:40 +00:00
maxv f71d13bdf7 Unreference IPF/PF from all the config files, and enable NPF instead when
wanted. This also fixes some inconsistencies I saw in several files (eg
IPF options while IPF was not compiled, IPF+PF enabled by default, etc).
2018-08-01 20:04:09 +00:00
maxv 62c8988166 Remove the kernel PMC code. Sent yesterday on tech-kern@.
This change:

 * Removes "options PERFCTRS", the associated includes, and the associated
   ifdefs. In doing so, it removes several XXXSMPs in the MI code, which is
   good.

 * Removes the PMC code of ARM XSCALE.

 * Removes all the pmc.h files. They were all empty, except for ARM XSCALE.

 * Reorders the x86 PMC code not to rely on the legacy pmc.h file. The
   definitions are put in sysarch.h.

 * Removes the kern/sys_pmc.c file, and along with it, the sys_pmc_control
   and sys_pmc_get_info syscalls. They are marked as OBSOL in kern,
   netbsd32 and rump.

 * Removes the pmc_evid_t and pmc_ctr_t types.

 * Removes all the associated man pages. The sets are marked as obsolete.
2018-07-12 10:46:40 +00:00
mrg 95772a8862 clean up COMPAT_* options for native netbsd code:
- new series of files that are useful for saying "i want everything
  since netbsd 1.4", etc.
- use the fact COMPAT_* options have future dependancies to remove
  many redundant options.

removes about 3000 lines total across kernel configuration files.
tested about 30 random kernels in the changed list.
2017-09-14 07:58:38 +00:00
christos e4cf317682 provide __HAVE_COMPAT_NETBSD32 and fix multiple include protection consistently. 2017-01-26 15:55:08 +00:00
cherry e08917ef90 switch all ports to use uvm_init.c:uvm_md_init()
uvm_setpagesize() is now subsumed within this funciton.
2016-12-22 14:47:53 +00:00
christos ef2deb33e0 wildcard speaker attachments, now that we can handle many of them. 2016-12-13 20:42:15 +00:00
nat 03783bb56a Add a synthesized pc beeper and keyboard bell for platforms with an audio
device.
2016-12-08 11:31:08 +00:00
skrll 4e8b65a17b Adjust evbmips_iointr to pass a clockframe pointer and use it for
pwmclock @ voyager.

Suggested by matt@

Hi macallan!
2016-08-26 15:45:47 +00:00
dholland 10fabf6382 If ALGOR_P6032 is not defined, set sc_bonito to NULL instead of using
random garbage off the stack. PR 51012 from David Binderman.
2016-05-31 03:51:55 +00:00
christos 257ef94e95 Add mips fenv.h (From FreeBSD) 2015-12-21 17:02:32 +00:00
msaitoh 605f564f52 PCI Extended Configuration stuff written by nonaka@:
- Add PCI Extended Configuration Space support into x86.
- Check register offset of pci_conf_read() in MD part. It returns (pcireg_t)-1
  if it isn't accessible.
- Decode Extended Capability in PCI Extended Configuration Space.
  Currently the following extended capabilities are decoded:
   - Advanced Error Reporting
   - Virtual Channel
   - Device Serial Number
   - Power Budgeting
   - Root Complex Link Declaration
   - Root Complex Event Collector Association
   - Access Control Services
   - Alternative Routing-ID Interpretation
   - Address Translation Services
   - Single Root IO Virtualization
   - Page Request
   - TPH Requester
   - Latency Tolerance Reporting
   - Secondary PCI Express
   - Process Address Space ID
   - LN Requester
   - L1 PM Substates
  The following extended capabilities are not decoded yet:
   - Root Complex Internal Link Control
   - Multi-Function Virtual Channel
   - RCRB Header
   - Vendor Unique
   - Configuration Access Correction
   - Multiple Root IO Virtualization
   - Multicast
   - Resizable BAR
   - Dynamic Power Allocation
   - Protocol Multiplexing
   - Downstream Port Containment
   - Precision Time Management
   - M-PCIe
   - Function Reading Status Queueing
   - Readiness Time Reporting
   - Designated Vendor-Specific
2015-10-02 05:22:49 +00:00
uebayasi 7fe7089a02 Add `pseudo-device ksyms' where `options DDB' is used, because
config(1)/config(5) can't handle module dependency correctly at this
moment.

(This is another proof that shared file definition (`file xxx.c a|b')
is a bad idea.)
2015-08-21 01:52:07 +00:00
matt 4732ca2c1e Use cpu_startup_common() 2015-06-30 02:39:03 +00:00
matt b3a5c5652b #include <mips/cpuregs.h> 2015-06-09 22:47:12 +00:00
dholland 4acb6306f5 Systematize (and in many cases, fix) the comments on options COMPAT_NN.
There are quite a few configs that are missing some COMPAT_NN options
in ways that don't make sense; this should probably get cleaned up
too, but for the time being I've not added or removed anything.
2014-08-23 20:26:56 +00:00
joerg a26164117a Reorganize symbol table embedding. The existing option SYMTAB_SPACE is
replaced by the make option COPY_SYMTAB set to any value. The copy of
the symbol table is no longer put into a buffer in kern_ksyms.o, but a
small helper object. This object is build first with a dummy size, then
the kernel is linked to compute the real dimension of the symbol table
buffer. After that, the helper object is rebuild and the kernel linked
again.
2014-08-17 21:17:43 +00:00
alnsn 4af35694d5 Include sljit files. 2014-07-20 10:22:54 +00:00
alnsn e25150d478 Add commented out bpfjit options to mips kernels.
While here, add 2 missing RCS ids.
2014-07-20 10:06:10 +00:00
christos e58a356cba make pci_intr_string and eisa_intr_string take a buffer and a length
instead of relying in local static storage.
2014-03-29 19:28:24 +00:00
christos b2543b9136 use cpu_{g,s}etmodel 2014-03-24 20:06:31 +00:00
christos e46f5f0078 remove obsolete networking options 2013-06-05 23:07:59 +00:00