Commit Graph

849 Commits

Author SHA1 Message Date
simonb cc8be526c0 The watchdog setup code isn't used (yet), so don't compile in the
octeon_nmi_stack that it uses either.
2021-05-05 06:46:37 +00:00
simonb b95e29aecd Don't force all MALTA kernels to be compiled with -mips64 when they
also support MIPS32-only CPU configs.
2021-04-29 08:47:26 +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
mrg a757c29eb3 enable a few more "generic" items in this configuration, mostly
from what pmax GENERIC enables, but not nearly all of it:

- enable OVERLAY, UMAPFS, FDESC, LFS, UNION, PUFFS (and putter),
  and add some more commented out entries
- enable DISKLABEL_EI and FFS_EI
- turn on GATEWAY and ppp(4) options
- add commented ALTQ section
2021-04-18 10:45:22 +00:00
mrg 6adfa96ca4 remove shadowed (common) declarations of various libsa variables
from various boot programs.  for macppc and zaurus, avoid building
with -fcommon any more.
2021-04-12 03:55:40 +00:00
christos 266bfd152f - 32 bit mips uses oabi, don't force it to n32.
- compile assembly code with soft-float to kill linker warnings
2021-03-15 18:13:54 +00:00
christos 089f26f664 Specify the emulation explicitly (n32) so this builds when the default
emulation changes.
2021-03-14 22:58:10 +00:00
skrll 85c5fcc244 Trailing whitespace 2021-02-17 08:19:06 +00:00
skrll c71c03eac8 Use the PCI_MAPREG_TYPE macro. Same binary after change. 2021-02-17 08:18:39 +00:00
simonb a9214ed12d Whitespace nit. 2021-02-16 15:06:30 +00:00
reinoud 33a3dfef01 I forgot to add the needed conf files for the mipssim virtio addition 2021-02-16 10:58:32 +00:00
reinoud 39e1f6e936 Add VirtIO devices to the MIPSSIM target for use in Qemu. Its supported by a
local patch starting at Qemu-5.1.0nb12
2021-02-15 22:39:46 +00:00
simonb 31dd19e36c Comment out HZ=512. This was only intended to be enabled for profiling. 2021-02-08 00:47:53 +00:00
simonb af7828c9eb Correct the comment at the top of these config files identifying what
they run on.
2021-02-08 00:35:25 +00:00
simonb 4233479fa4 Add support for the QEMU MIPS "mipssim" simulator.
TODO- mipsnet network driver (root on md(4) only for now).
2021-01-27 05:24:16 +00:00
nia f3ec8521a0 add a commented out compat_ossaudio wherever there's compat_linux
requested by mrg
2021-01-21 06:51:54 +00:00
thorpej ad1425b7c2 malloc(9) -> kmem(9) 2020-11-21 15:36:36 +00:00
nia 82f91d33d2 Normalize some machine dependent CPU frequenct sysctl variables.
This moves machdep.*.frequency.* to machdep.cpu.frequency.*.

This was proposed on tech-kern some time ago. The intention is to allow
third-party tools such as estd and conky to more easily and reliably
fetch or modify the current CPU frequency without iterating through
various machine-dependent variables to check their presence.
2020-10-25 16:39:00 +00:00
roy 98f3a8d458 vether: Add to kernel configurations
It's only enabled if the kernel enabled bridge AND tap.
Otherwise it's commented out.
2020-09-27 13:48:49 +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
simonb 02abda66c9 Handle using "octeth" as root device by converting "octethN" to "cnmacN"
for any N < 100.  This allows booting for u-boot to use root=$(ethact)
on the command line and the kernel can use the ethernet interface the
kernel was loaded on as the NFS root device.
2020-08-17 06:23:01 +00:00
maxv b84521f2f3 Remove references to BRIDGE_IPF, it is now compiled in by default. 2020-08-01 08:20:47 +00:00
simonb da5bbaccf3 Change cpus_booted back to a simple variable instead of a kcpuset.
octeon_cpu_spinup() was trying to set CPU status immediately on kernel
startup _well_ before the kcpuset was initialised.
2020-07-28 00:35:38 +00:00
jmcneill 70370e75d4 evbmips: add ofctl(8) and /dev/openfirm support 2020-07-24 12:07:09 +00:00
simonb 032f1363cc Add option to use the early bitbang console. Enable this for now
while debugging MP.
Print out the core mask value passed in by Uboot.
2020-07-22 13:24:17 +00:00
msaitoh 984bb2b315 s/reseting/resetting/ 2020-07-22 01:24:39 +00:00
simonb 6a9dede689 Reserve space for all CPU cores (incorrect logic).
Reserve a full page for each core, not incorrect 4096 (from skrll@).
2020-07-19 08:53:24 +00:00
simonb ba69e4b56c Call fdtbus_intr_init() during startup. 2020-07-19 06:31:13 +00:00
jmcneill 3f09c19cb3 ERLITE -> OCTEON 2020-07-17 14:57:54 +00:00
jmcneill 7a6b3bddd8 Add wedge support 2020-07-17 14:56:47 +00:00
jmcneill 9164e37d6c Add USB3 support. 2020-07-16 21:34:52 +00:00
jmcneill 571c571288 Add driver for Cavium Interrupt Bus. 2020-07-16 18:39:18 +00:00
jmcneill 969e5db0bd Use uart0 for stdout-path 2020-07-16 16:39:54 +00:00
jmcneill 84507484ec FDT support for Cavium OCTEON MIPS SoCs. WIP. 2020-07-16 11:49:37 +00:00
simonb bc6a081a98 Rename the evbmips ERLITE kernel to OCTEON now that it supports more
than just the EdgeRouter Lite.
2020-07-15 12:15:30 +00:00
simonb f732e865a3 Copy "mach reset" logic from arm32 recently added by jmcneill@. The
previous MIPS "mach reset" DDB command was hard-coded for Octeon Cavium
CPUs only.
2020-07-13 05:20:45 +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
simonb a754707195 Support EdgeRouter 4.
Only set RGMII timing params on boards with RGMII.
2020-06-23 05:19:12 +00:00
simonb 092c6bf70a Redo cnmac attachments - cnmacM @ gmxN @ pip0 @ iobus 2020-06-23 05:18:02 +00:00
simonb 896f321e86 Add some rudimentary boot args parsing. Can handle "root=" as well
normal -1adsqvxz flags.  "root=" is limited to cnmacN devices so far;
should be extended to allow arbitary SD devices (and other devices?).
2020-06-20 02:27:55 +00:00
simonb e542f66a7e Add the structure of the CVMX boot descriptor.
Extend the U-boot bootinfo descriptor with latest members, add a few comments.
Add a few extra board type IDs.
2020-06-20 02:01:56 +00:00
simonb 6355ef23c6 Don't include now non-existant "opt_cavium.h". 2020-06-19 12:38:53 +00:00
simonb b30b4831ea OCTEON_MEMSIZE isn't used now, remove declaration. 2020-06-19 12:24:39 +00:00
simonb 7beb3ab79c Finish CPU core support for Octeon Cavium CN70XX:
- decode actual CPU name
 - per CPU core reset logic (partially adapted from OpenBSD)
 - handle Octeon 3 ioclock rate differences to other cores (from OpenBSD)
2020-06-15 07:48:12 +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
simonb 2d5ac8346f Update for proplib(3) API changes. 2020-06-10 07:34:19 +00:00
simonb c8c1c30fc9 Now that we don't zero out the second link in the U-boot bootmem
descripter, use that to configure free memory.
2020-06-05 07:17:38 +00:00
simonb f62ed6fa8e Only clear BSS up to "end" symbol, not all the way to mips_round_page(end).
U-Boot puts some data immediately after the BSS section cleared in the ELF
segments, and we don't want to overwrite that.

XXX: Stop using mips_round_page(end) on all MIPS?
2020-06-04 03:08:59 +00:00
simonb d6f100329c Finish rename of all Cavium Octeon device driver functions, structs etc from
"octeon_foo" to "octfoo" (missed octeon_uart + entries in iobus config).
2020-05-31 14:05:21 +00:00
simonb 8aae866fa5 Clean up Cavium Octeon device names. Rename devices from "octeon_foo"
to "octfoo" - this follows the naming conventions used by many other
MIPS CPUs.
2020-05-31 04:56:35 +00:00
rin 482eef7050 For struct timecounter, use C99 initializers.
Compile tested. No functional changes intended.
2020-05-29 12:30:38 +00:00
riastradh a500e081bc Switch to CFATTACH_DECL_NEW.
This driver doesn't compile -- never has since it was imported from
OpenBSD -- but in case anyone wants to make it work, let's leave fewer
landmines to step on.
2020-05-25 17:56:19 +00:00
rin 94f524d1f0 Fix outdated or misleading comments for MEMORY_DISK_ROOT_SIZE.
No functional changes.
2020-05-19 09:26:44 +00:00
simonb 36c01c395b Enable PTYFS. 2020-05-04 12:15:43 +00:00
jdolecek 68e97caa11 mark nsmb major obsolete 2020-04-04 16:06:10 +00:00
nisimura 525bf1f918 add ukphy as the last resort. enable dmphy for dme 2020-04-02 13:03:53 +00:00
jdolecek 23d0128155 remove 'file-system SMBFS' and 'pseudo-device nsmb' from all kernel configs
to prepare for their eventual removal
2020-03-25 17:06:17 +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
thorpej 85654ec7a9 Remove HIPPI support and the esh(4) driver that uses it. There have not
been any users of HIPPI for some time, and it is unlikely to be resurrected.
2020-01-19 06:55:21 +00:00
thorpej c1d9ec8d89 Remove the strip(4) - Starmode Radio IP - pseudo-device driver. It is
long since obsolete.
2020-01-19 01:25:03 +00:00
thorpej 585dd234ff Eliminate all of the #ifdefs for the "strtc" driver. Define model
properties (similar to what the "dsrtc" driver does), and provide
DT compat strings corresponding to those models.  Allow config flags
to specify the model for non-FDT platforms (also like "dsrtc").
2020-01-03 03:44:42 +00:00
msaitoh e992133145 s/suport/support/ 2019-12-27 09:22:19 +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
msaitoh 8940d9f0eb Fix typo (s/contoller/controller/). 2019-08-21 04:17:40 +00:00
sevan 75d6e670be Enable BUFQ_PRIOCSCAN, CARP, Veriexec by default in GENERIC kernel configs.
On ports without a GENERIC kernel config enable in individul files, e.g evbmips.
Omit on:
atari, dreamcast, emips, epoc32, evbppc/VIRTEX*, ia64, luna68x, mvme68k,
mvmeppc, playstation2, riscv, sun2, sun3, x68k, zaurus due to resource
constraints or port infancy.
2019-04-26 21:40:28 +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
simonb 7924423e1f Generate SREC kernels that YAMON can load. 2019-04-11 04:28:17 +00:00
simonb 4b084a9ecc Be consistent with file^I and include^I. 2019-04-11 02:01:53 +00:00
simonb 83b02d4246 Force all devices to IPL_VM. For some reason serial interrupts at
SPL_SERIAL (SPL_HIGH) wedge.  Gets sbmips to ~multiuser (usually with
a bunch of segfaults).

Possibly a gross hack, but not sure the current code ever worked...
2019-04-11 01:53:41 +00:00
roy 512ac01412 ELRITE is a router .... enable gif(4) by default. 2019-04-10 15:19:09 +00:00
christos 021d832a13 centralize setdisklabel(9) 2019-04-03 22:10:49 +00:00
simonb b94f406906 Handling CFE addresses in 64-bit mode. From the comment in the code:
* We do this KSEG0 to PHYS to KSEG0 dance if running 64-bit because
 * CFE passes in parameters as 32-bit addresses.  When used as a 64-bit
 * address these CFE parameters are in user (XKUSEG) space and can't be
 * accessed!  Convert these to a physical address and and then to the
 * proper KSEG0 address so we can use them in the kernel.

Allows SBMIPS to starting booting with a 64-bit kernel.
2019-04-01 06:33:57 +00:00
msaitoh f24d309180 s/adddress/address/ 2019-04-01 06:12:51 +00:00
simonb e4f8641feb Don't need an 'X' printf specifier if using PRIx64. 2019-03-29 00:24:56 +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
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
sevan 4c21244e9e Enable the per-priority cyclical scan buffer queue strategy on evbmips kernels.
time results of a Lemote Fuloong 2F extracting the pkgsrc tree
brick$ time tar -jxf pkgsrc.tar.bz2
priocscan + log
	612.90 real       103.45 user       194.98 sys
priocscan   nolog
	1345.48 real       103.57 user       274.32 sys
fcfs + log
	736.02 real       101.71 user       192.95 sys
fcfs   nolog
	1475.16 real       103.06 user       271.14 sys
2018-12-30 14:51:36 +00:00
sevan 7d89414a2f Update description, nfc 2018-12-30 00:42:09 +00:00
maxv 43c9320743 Remove compat_svr4 and compat_svr4_32, as discussed on tech-kern@ recently,
but also as discussed several times in the past.
2018-12-19 13:57:44 +00:00
maxv 1a87c65fae Remove references to "lmc" in the kernel configurations. 2018-12-12 06:29:36 +00:00
jdolecek ef2b5d4f55 remove the 'wd* at umass?' for the non-standardized and rare (extinct?)
In-System Design ATA protocol over Bulk-Only devices from most kernels,
leave only in i386/amd64 ALL; it's unmaintained and likely currently broken,
lack of test hardware makes it impossible to support
2018-10-23 19:58:52 +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
rin a6566306c7 Remove invalid option copy-paste from hpcmips. 2018-09-19 23:22:17 +00:00
mrg 499037bde3 enable ext2fs, nullfs, cd9660, disable FFS_NO_SNAPSHOT, and remove
not relevant PCI IDE stuff.
2018-09-16 10:15:22 +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
maxv 357706f272 Replace references to etherip by l2tp. Etherip was already not enabled
anyway.
2018-08-14 06:37:59 +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
maya afd3cd8b87 Remove comment mentioning an i386 problem from non-x86 kernel configs.
(they all say BROKEN in the next comment too)
2018-07-21 19:39:44 +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
thorpej 9351a32e78 Use the "flags" config directive modifier to specify seeprom size
(a pre-existing capability in seeprom driver) now that "size" is no
longer a valid locator for i2c.
2018-06-28 15:21:52 +00:00
thorpej aa41e9922c More cleanup to i2c autoconfiguration:
- Get all of the drivers onto the new match quality constants.
- Introduce a new helper function, iic_use_direct_match(), that has
  all of the logic for direct-config matching.  If it returns true,
  the driver returns the match result (which may be 0).  If it returns
  false, the driver does indirect-config matching.
- iic_compat_match() now returns a weighted match quality; matches to
  lower-indexed "compatible" device property are more-specific matches,
  and return a better match quality accordingly.
2018-06-16 21:22:13 +00:00
thorpej 8619b1ab43 Revert changes that pinned-down i2c parent specs. The i2c subsystem
has been enhanced to make this unnecessary.
2018-06-07 13:36:28 +00:00
maya a50c06709e Remove duplicate ; 2018-06-06 01:49:07 +00:00
thorpej 4df2ee9b7a Fully specifiy the location of indirectly-configured I2C devices. In
particular, the parent spec must not be wild-carded, as doing so doesn't
work well on systems where more than one I2C bus is present.
2018-05-14 21:50:02 +00:00
martin e2838b1f9e The PCI_PRODUCT_VIATECH_VT82C686A_SMB has been renamed, adjust. 2018-03-08 18:48:25 +00:00