Commit Graph

1997 Commits

Author SHA1 Message Date
joerg e9096488b2 Add a new option CISS_NO_INTERRUPT_HACK for driving ciss(4) by callouts.
This is intended as workaround for certain Xen issues with dom0 kernels
and will likely want to have a high HZ value as well for decent
performance.
2018-02-12 23:11:00 +00:00
maxv dec7dd7200 Add a proper defflag for GPROF, and include opt_gprof.h, otherwise we're
not gonna go very far.
2018-02-04 17:31:51 +00:00
christos b73f1c7610 - Coverity does not like -std=gnu99
- Another lose is that you need to manually edit the compiler XML to add
  all the kernel options because cov-configure barfs because it tries to
  test the compilation environment thinking that we are userland even
  when options like -ffreestanding are present.
2018-01-22 17:38:46 +00:00
mrg f2b04ca083 implement 32-bit compat support for raidframe.
convert several raidframe ioctls to be bitsize idempotent so that
they work the same in 32 and 64 bit worlds, allowing netbsd32 to
configure and query raid properly.  remove useless 'row' in a few
places.  add COMPAT_80 and put the old ioctls there.

raidframeio.h:
  RAIDFRAME_TEST_ACC
  - remove, unused
  RAIDFRAME_GET_COMPONENT_LABEL
  - convert to label not pointer to label
  RAIDFRAME_CHECK_RECON_STATUS_EXT
  RAIDFRAME_CHECK_PARITYREWRITE_STATUS_EXT
  RAIDFRAME_CHECK_COPYBACK_STATUS_EXT
  - convert to progress info not pointer to info
  RAIDFRAME_GET_INFO
  - version entirely.
raidframevar.h:
  - rf_recon_req{} has row, flags and raidPtr removed (they're
    not a useful part of this interface.)
  - RF_Config_s{} and RF_DeviceConfig_s{} have numRow/rows removed.
  - RF_RaidDisk_s{} is re-ordered slightly to fix alignment
    padding - the actual data was already OK.
  - InstallSpareTable() loses row argument

rf_compat32.c has code for RF_Config_s{} in 32 bit mode, used
by RAIDFRAME_CONFIGURE and RAIDFRAME_GET_INFO32.

rf_compat80.c has code for rf_recon_req{}, RF_RaidDisk_s{} and
RF_DeviceConfig_s{} to handle RAIDFRAME_FAIL_DISK,
RAIDFRAME_GET_COMPONENT_LABEL, RAIDFRAME_CHECK_RECON_STATUS_EXT,
RAIDFRAME_CHECK_PARITYREWRITE_STATUS_EXT,
RAIDFRAME_CHECK_COPYBACK_STATUS_EXT, RAIDFRAME_GET_INFO.

move several of the per-ioctl code blocks into separate functions.

add rf_recon_req_internal{} to replace old usage of global
rf_recon_req{} that had unused void * in the structure, ruining
it's 32/64 bit ABI.

add missing case for RAIDFRAME_GET_INFO50.

adjust raid tests to use the new .conf format, and add a case to
test the old method as well.

raidctl:
deal with lack of 'row' members in a couple of places.
fail request no longer takes row.
handle "START array" sections with just "numCol numSpare", ie
no "numRow" specified.  for now, generate old-style configuration
but update raidctl.8 to specify the new style (keeping reference
to the old style.)

note that: RF_ComponentLabel_s::{row,num_rows} and
RF_SingleComponent_s::row are obsolete but not removed yet.
2018-01-18 00:32:48 +00:00
mrg fd2d59769f note that COMPAT_X implies all COMPAT_X+N. 2018-01-15 07:20:10 +00:00
jmcneill da793789d3 Comment out AUTOFS until it compiles 2018-01-10 11:32:29 +00:00
knakahara 4ab3af3e3e add ipsec(4) interface, which is used for route-based VPN.
man and ATF are added later, please see man for details.

reviewed by christos@n.o, joerg@n.o and ozaki-r@n.o, thanks.
https://mail-index.netbsd.org/tech-net/2017/12/18/msg006557.html
2018-01-10 10:56:30 +00:00
christos b985414b8f Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet
2018-01-09 03:31:12 +00:00
jakllsch a4d86e7ef5 Update for 2018 new year 2018-01-01 01:26:06 +00:00
skrll e3cfa66d2e Generalise FDT and OFW 2017-12-18 15:53:38 +00:00
maxv 12c017e94b Fix the linux dependency. It does not depend on COMPAT_16, it just wants
the compat functions (not really controlled by COMPAT_NETBSD, but for the
principle).

Makes it possible to load compat_linux.kmod from the filesystem without
any COMPAT_* option compiled (but COMPAT_NETBSD).
2017-12-16 09:34:18 +00:00
bouyer 39de109673 Add support for I2C designware controllers (as found in Intel PCH devices),
with a pci front-end.
The pci front-end is tied to ACPI and Intel-specific, so it's in arch/x86/pci
and not dev/pci.
Core driver from OpenBSD, PCI front-end by me.
2017-12-10 17:12:54 +00:00
bouyer 404d04cdb7 Factor out bus-independant HID code so that it can be shared by USB, bluetooth
and i2c.
dev/usb/ukbdmap.c is renamed to dev/hid/hidkbdmap.c
dev/usb/hid.[ch] moved to dev/hid/
usage pages moved from dev/usb/usbhid.h moved to dev/hid/hid.h,
and updated with OpenBSD entries.
bus-independant code moved from dev/usb/ums.c to dev/hid/hidms.c
(the same should be done for keyboard and touchpad drivers)

Needed for the upcoming HID over I2C support, proposed on tech-kern@
on Dec, 1.
2017-12-10 17:03:07 +00:00
christos ebcb51c0d2 - Allow multiple .BEGIN targets
- Make their protection consistent
2017-12-10 14:29:47 +00:00
christos 86a8ba0e86 use -@ like bsd.klinks.mk 2017-12-06 02:08:03 +00:00
christos 604ff9ba7a Use similar restrictions to bsd.klinks.mk for .BEGIN rules. 2017-12-05 02:57:37 +00:00
martin 9f8ff67109 We use .BEGIN for our own cleanup and won't ever need DTS support - so
avoid inclusion of dts.mk by defining _SKIP_DTS
2017-12-04 09:44:33 +00:00
christos 4dd927b01c handle absolute $S paths; we want to add ../ if they are relative only. 2017-12-03 17:07:18 +00:00
christos fb3b90b27d Add more complexity because of the path mess in the dts files. Requested
by jmcneill@
2017-12-03 16:36:05 +00:00
jmcneill fb651b612c Add driver for QEMU Firmware Configuration device.
This interface allows the host to pass various data items and files to
the guest OS.
2017-11-25 16:31:03 +00:00
christos accd0839b6 Catch up with the new config version. 2017-11-18 18:44:55 +00:00
jmcneill 6d494689b1 Add driver for Broadcom 802.11a/b/g/n/ac USB wireless devices, based on
the OpenBSD bwfm(4) driver.
2017-10-19 23:58:41 +00:00
kre 267cd2fc52 (untested) attempt to fix b5 evbarm-earmv7hf build - please revert if this
is incorrect, or harms anything else...
2017-10-09 10:28:33 +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
sevan 684872c792 Remove support for VERIFIED_EXEC_FP_RMD160, VERIFIED_EXEC_FP_SHA1, and VERIFIED_EXEC_FP_MD5 options.
These algorithms are either broken or on their way to being broken.

Discussed on tech-security
http://mail-index.netbsd.org/tech-security/2017/08/21/msg000936.html

ok riastradh
2017-09-13 22:24:42 +00:00
jmcneill 30f9e1f2d2 Add support for building dts files from multiple paths, idea from christos 2017-09-07 21:22:19 +00:00
christos 43072a1442 do dts depend processing in two passes, one for /include/ and one for #include 2017-07-15 15:53:48 +00:00
christos 1f3e5b1b5c Move the dts rule to a separate file and add dependencies handling. 2017-07-15 15:20:52 +00:00
jmcneill 1b047987b1 Add support for dts files outside of external/gpl2. 2017-07-13 01:17:03 +00:00
jmcneill a7a3e30ec7 Add a helper for exposing LED controls via sysctl. 2017-07-08 00:54:37 +00:00
flxd 50e68e123b spelling (DEC called it "TURBOchannel") 2017-06-22 16:46:52 +00:00
christos 20db6eee6d Assign DTB files to a variable so we can make -V DTB 2017-06-17 17:08:49 +00:00
jmcneill 65c281d231 bump required config version for multiline makeoptions feature 2017-06-16 21:36:35 +00:00
jmcneill 77f306ac09 Add support for building DTB files during kernel build, from christos. 2017-06-15 21:41:01 +00:00
pgoyette 5b782bb9ef Remove the 'needs-flag' from spkr.c - it's not needed by anything. 2017-06-11 21:45:28 +00:00
nat b377bbb391 New device wsbell - allows for a console beep for non pckbds (usb etc).
Works for platforms without pcppi - can work with spkr at audio and spkr
at pcppi.

To use add the following to your kernel config:
wsbell* at spkr? console?

Ok pgoyette@.
2017-06-11 03:55:56 +00:00
jmcneill 25cf81196f Add driver for ARM PrimeCell PL031 (RTC) Real Time Clock. 2017-06-08 21:00:43 +00:00
jmcneill fa4e708e32 Add driver for ARM PrimeCell Advanced Audio CODEC interface (PL041).
Don't expect this driver to work on real hardware, but QEMU emulates it.
2017-06-08 10:02:39 +00:00
jmcneill 08e913c093 Add driver for ARM PrimeCell PL050 (KMI) PS2 keyboard/mouse interface 2017-06-03 17:03:36 +00:00
bouyer 6e4cb2b9ab merge the bouyer-socketcan branch to HEAD.
CAN stands for Controller Area Network, a broadcast network used
in automation and automotive fields. For example, the NMEA2000 standard
developped for marine devices uses a CAN network as the link layer.

This is an implementation of the linux socketcan API:
https://www.kernel.org/doc/Documentation/networking/can.txt
you can also see can(4).

This adds a new socket family (AF_CAN) and protocol (PF_CAN),
as well as the canconfig(8) utility, used to set timing parameter of
CAN hardware. Also inclued is a driver for the CAN controller
found in the allwinner A20 SoC (I tested it with an Olimex lime2 board,
connected with PIC18-based CAN devices).

There is also the canloop(4) pseudo-device, which allows to use
the socketcan API without CAN hardware.

At this time the CANFD part of the linux socketcan API is not implemented.
Error frames are not implemented either. But I could get the cansend and
canreceive utilities from the canutils package to build and run with minimal
changes. tcpudmp(8) can also be used to record frames, which can be
decoded with etherreal.
2017-05-27 21:02:54 +00:00
christos 6f3dbe105c Fix typo 2017-04-09 14:52:14 +00:00
christos 169a1fef7d Add makefile snippet for vers.c building. 2017-04-08 19:53:54 +00:00
christos 15545435eb - modernize: use getopts/usage/true/false variables
- if ${MKREPRO_TIMESTAMP} is used, synthesize all the information, instead
  of eliding it.
2017-04-08 18:24:09 +00:00
rin 7e8d492b8f Add DKWEDGE_METHOD_RDB option, which is Amiga Rigid Disk Block (RDB)
partitioning detection method for dk(4).
2017-02-26 11:56:49 +00:00
knakahara 939a415a7d add l2tp(4) L2TPv3 interface.
originally implemented by IIJ SEIL team.
2017-02-16 08:12:43 +00:00
macallan a0e93c0528 chipsfb needs glyphcache now 2017-02-02 19:50:35 +00:00
joerg f9c2736326 Disable a couple of warnings until further investigation. 2017-01-11 12:19:43 +00:00
christos 6be7068cf1 Move to ssp.c suggested by uebayasi@ 2017-01-08 17:10:35 +00:00
christos 65ce4b4f2f Add COPTS for xhci.c, since the do_command_locked causes a spurious stack
proector warning.
2017-01-08 05:02:08 +00:00
christos f83bb9fcab Collect a list of kernel swap files to be removed (Yorick Hardy) 2017-01-04 21:37:46 +00:00
christos 393981f1b2 match the M* and N* targets. 2017-01-04 19:55:06 +00:00
christos 772001de84 PR/51772: Yorick Hardy: Don't hard-code "netbsd", use ${.TARGET} consistently. 2017-01-04 15:43:04 +00:00
snj f9c4b1fa54 goodbye 2016, hello 2017! 2017-01-01 06:56:59 +00:00
pgoyette 7f0851cee1 Add a BIOHIST option. As mentioned on tech-kern. 2016-12-26 23:12:33 +00:00
christos 0b335da6c0 Restructure speaker devices so that there can be multiple of them, and have
proper softc's.
2016-12-13 20:20:34 +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
pgoyette a60b99094c * Split sys/kern/sys_process.c into three parts:
1 - ptrace(2) syscall for native emulation
        2 - common ptrace(2) syscall code (shared with compat_netbsd32)
        3 - support routines that are shared with PROCFS and/or KTRACE

* Add module glue for #1 and #2.  Both modules will be built-in to the
  kernel if "options PTRACE" is included in the config file (this is
  the default, defined in sys/conf/std).

* Mark the ptrace(2) syscall as modular in syscalls.master (generated
  files will be committed shortly).

* Conditionalize all remaining portions of PTRACE code on a new kernel
  option PTRACE_HOOKS.

XXX Instead of PROCFS depending on 'options PTRACE', we should probably
    just add a procfs attribute to the sys/kern/sys_process.c file's
    entry in files.kern, and add PROCFS to the "#if defineds" for
    process_domem().  It's really confusing to have two different ways
    of requiring this file.
2016-11-02 00:11:59 +00:00
pgoyette 1adbabf156 Update dependencies for COMPAT_LINUX32 to include COMPAT_NETBSD32
Without this, an attempt to build a kernel with COMPAT_LINUX32 but without
COMPAT_NETBSD32 will fail during the execution of genassym, and the error
messages are not very helpful.

With this change, config(1) will automatically (and silently) select/add
COMPAT_NETBSD32 to the configuration.  It might be better if config(1)
were to issue an appropriate diagnostic, but that is a change for some
future day.
2016-11-01 22:54:33 +00:00
christos e6da8e6442 sppp is not a pseudo-device 2016-09-09 21:10:01 +00:00
nonaka 4a15838ffa Fix to cannnot be opened a nvme(4) namespace device file. 2016-09-08 15:00:08 +00:00
maxv 42e304b16d Remove the last references to KMEMSTATS. 2016-08-19 18:08:50 +00:00
christos 5a7020b9b6 defopt PPPOE_DEBUG kill unknown sessions 2016-08-11 15:16:54 +00:00
christos 520827be3b rename ifmpls to mpls, so we don't have if_ifmpls... 2016-08-07 10:44:04 +00:00
skrll 70699ce203 Fix UVMHIST builds for kernels that don't include usb 2016-06-23 07:32:12 +00:00
nonaka e7c0cc5d9a Add NVMe command passthrough support. 2016-06-04 16:11:50 +00:00
bouyer bdf10c852a The UART in the allwiner SoCs is not full-compatible with the 16550, and
it's not a 16750 either. Like the 16750 it has the IIR_BUSY interrupt,
which is triggered when writing to LCR while the chip
can't accept it. But unlike the 16750, it has a specific register,
HALT, to allow writing to the LCR and divisor registers, and then
commit the changes.
Tested on an A20 SoC, changing the baud rate while keeping the
tty device open and incoming data.
2016-05-27 20:01:49 +00:00
skrll c0bc9f43b6 Clarify the intention here after discussing it with soda@ 2016-05-13 07:41:47 +00:00
soda 5407bb6145 - change major number limit for MI devices from 255 to 511,
because twe is already using 332
- clarify that new MI devices should go to this file
  instead of majors.{ws,usb,std,tty,storage}
- fix major number conflict about hdmicec vs tty

OKed by matt@
the expression "previously not MI" is suggested by matt@ too.
2016-05-13 02:00:36 +00:00
skrll eb30461f6b Update with info about tty/storage reservations 2016-05-11 06:42:06 +00:00
nonaka 8b5163f01f Added nvme(4) for Non-Volatile Memory Host Controller Interface devices.
Ported from OpenBSD.
2016-05-01 10:21:01 +00:00
christos 021cd4d7f5 Add rt2860 now that it compiles. 2016-04-27 19:46:11 +00:00
skrll 9b8e5df7bf First pass at adapting SLHCI_DEBUG to USBHIST 2016-04-26 10:38:42 +00:00
skrll ee8228cf5e Merge nick-nhusb (missed commit) 2016-04-23 12:50:35 +00:00
christos 66e4a9ed95 Add PAX_MPROTECT_DEBUG 2016-04-12 11:51:08 +00:00
riastradh 617d199e69 Use && to fail early if subcommands of kernel link fail.
(Remind me why we string together shell commands instead of just
using make targets?)
2016-04-09 18:51:44 +00:00
skrll 62976e3600 Move linux_work.c and workqueue.h from sys/external/bsd/drm2 to
sys/external/common so that they can be used by others.

LGTM from riastradh@

These should really live outside sys/external, but that can be decided
later
2016-02-24 22:04:15 +00:00
mrg c662775e21 WELCOME 2016! 2015-12-31 15:23:07 +00:00
maxv a1153902a9 Rename verified_exec.c -> veriexec.c.
The old log is now in Attic/.
2015-12-09 18:25:32 +00:00
jmcneill bd0f8235ce Add basic clock device infrastructure. 2015-12-05 13:31:07 +00:00
christos e77b077223 use commands() instead of target() because assym.mk creates all the targets
unconditionally.
2015-11-27 20:59:47 +00:00
christos 8089a0f85d PR/50483: David A. Holland: fix building of assym.d:
1. use += to add to DEPS
	2. move inclusion of rules mk. files before the rules are defined
	   so that variables are set.

Now we get on amd64:

	mkdep: ignoring acpi_wakeup_low.d: No such file or directory
	mkdep: ignoring amd64func.d: No such file or directory
	mkdep: ignoring busfunc.d: No such file or directory
	mkdep: ignoring copy.d: No such file or directory
	mkdep: ignoring cpu_in_cksum.d: No such file or directory
	mkdep: ignoring cpufunc.d: No such file or directory

because there are no rules to generate those, but it is harmless.
2015-11-27 20:33:55 +00:00
pgoyette 78da7b9d09 Always include the "vfs" attribute (module). Although all of the
ufs/xxx file systems depend on the vfs attribute, it is not required
that any file system actually be built-in to the kernel.  (At least
on some architectures, file system modules can be loaded at boot
time.)
2015-11-14 07:31:13 +00:00
pgoyette 7c02a5abd6 Whether or not the semaphore code is loaded as a module or built-in, its
sysctl data belongs with the module code.  Move it from kern/init_sysctl.c
to kern/uipc_sem.c

While here, add a new sysctl variable kern.posix.semcnt (current count of
semaphores) to complement the existing kern.posix.semmax (maximum number
of semaphores).
2015-11-09 01:21:18 +00:00
christos 8c1b3fd3c9 Expose struct kauth_cred for the benefit of the debugger. I can't convince gcc
to produce debug info for the structure if it does not appear in more than
one source file.
2015-10-06 22:13:39 +00:00
uebayasi 229ff8e5ba Clean up splash image build. Print messages when creating files. 2015-09-15 02:22:43 +00:00
uebayasi edc287c6eb Fix build of SPLASHSCREEN without SPLASHSCREEN_IMAGE. Since there is no way
to change ALLFILES by makeoptions, build an empty splash_image.o.
2015-09-15 00:16:42 +00:00
uebayasi 960ec2b2e8 Handle splash image generation better. 2015-09-14 01:40:03 +00:00
nat 22a1d44f65 Fix splashscreen_image option to include splash_image.o
OK from christos@
2015-09-11 15:56:56 +00:00
uebayasi 133a84bb3c Indent. 2015-09-11 01:40:52 +00:00
uebayasi a8bf1974db Fix dependency of *.d -> assym.h in `-S' mode. 2015-09-10 13:11:39 +00:00
uebayasi 1214c2c69c Simplify the dependency line further. 2015-09-10 09:30:01 +00:00
uebayasi 192b39cc22 Improve previous. 2015-09-09 03:27:15 +00:00
uebayasi 7c7453a6f8 Restore *.[sS] -> assym.h dependency in `-S' mode. 2015-09-09 03:16:14 +00:00
uebayasi b04184e8d4 Preserve the order of files in ${ALLFILES} -> ${OBJS} conversion. 2015-09-07 15:55:06 +00:00
uebayasi c009404037 More build ordering. 2015-09-06 15:20:59 +00:00
uebayasi 9e0fc0ebb7 Don't pass ``-DCOPY_SYMTAB'' to ${CC}; it's replaced with opt_copy_symtab.h. 2015-09-06 14:35:01 +00:00
uebayasi 2d76cceae9 Move ldscript related code out of Makefile.kern.inc. 2015-09-06 06:41:14 +00:00
uebayasi ed2bed87de Clean up. Move assym.h/vers.c related code out of Makefile.kern.inc. 2015-09-06 06:13:16 +00:00
uebayasi 347749a8bd Clean up. Move SSP-specific adjustment out of Makefile.kern.inc. 2015-09-06 04:42:06 +00:00
uebayasi 472997e0ab Allow MD to link libraries. Build rules are written in MD makefiles until
config(1) will support library properly.
2015-09-06 02:05:11 +00:00
uebayasi ce4642ec41 Make config(1) output only ${ALLFILES}, selected input files, and pass it to
Makefile.kern.inc, where files are filtered by suffix.
2015-09-04 06:10:47 +00:00
uebayasi bc619545b7 Add generated *.c files (devsw.c and ioconf.c) to ${CFILES} by config(1)
internally.  ${MI_CFILES} in Makefile.kern.inc is no longer needed.
2015-09-03 14:23:52 +00:00
uebayasi 361a961386 Prepare for relative ${MD_OBJS}. 2015-09-03 12:31:16 +00:00
uebayasi eaa72931c4 Move `all' target definition to Makefile.kern.inc. 2015-09-03 09:28:00 +00:00
uebayasi caf44640e0 Kernel depends on swap<kernel>.o too. 2015-09-03 06:24:15 +00:00
uebayasi fc3a975cb5 Sort dependendy to keep alphabetical build order. 2015-09-03 06:10:53 +00:00
uebayasi d891b756ba Define kernel dependency in Makefile.kern.inc. 2015-09-03 06:09:46 +00:00
uebayasi d01cbd6db6 Rename ${COMPILE.c} to ${KCOMPILE.c} to avoid potential conflicts with those
in sys.mk.  Define .go/.po suffix rules.
2015-09-03 04:17:55 +00:00
uebayasi 10a39df2f6 Refactor. 2015-09-03 03:47:25 +00:00
uebayasi 1d638ab7bf Simplify. Wrap long lines. 2015-09-03 01:40:06 +00:00
uebayasi 1587c3fa3a Stop ordering objects alphabetically now that I am sure I can fix fallouts. 2015-09-03 01:30:18 +00:00
uebayasi 185d99e39a Build conf/param.c normally. 2015-09-03 01:09:38 +00:00
uebayasi 4c17ec775b Fix link of kernels whose name don't start with "netbsd*". 2015-09-02 23:03:41 +00:00
uebayasi 350968d06a Build param.c under conf/ using suffix rules in `-S' mode. 2015-09-02 15:35:52 +00:00
uebayasi 4af08e031f Clean up `swap<kernel>.o' handling. 2015-09-02 15:29:23 +00:00
uebayasi 7a8426662a Define ${OBJS} in `Makefile.kern.inc'. Relative paths are not truncated
(a/b/c/x.c -> x.c) in `-S' mode.  Don't provide some explicit rules for `-S'
mode for safety.
2015-09-02 14:17:03 +00:00
uebayasi 558aab1be0 Output relative path for ${CFILES} and ${SFILES} in generated `Makefile'.
`Makefile.kern.inc' knows how to deal with $S prefix, so don't bother it in
config(1).
2015-09-02 13:42:14 +00:00
uebayasi 054cd04942 Add swap<kernel>.o to common ${SYSTEM_LD} as it is always linked. 2015-09-02 12:38:48 +00:00
uebayasi d9bb176d5f Clean up some rules and make them less error prone. 2015-09-02 03:22:41 +00:00
uebayasi 1b2a74aeec Define suffix rules at the end to override system definitions. Provide them
only if ___USE_SUFFIX_RULES___ is defined (config -S).
2015-09-01 23:04:35 +00:00
uebayasi e16ec3ea57 Experimental suffix-rules build (disabled by default). 2015-09-01 16:04:04 +00:00
uebayasi 1effbb59ae Fix "Define compile rules in sys/conf/Makefile.kern.inc ...".
Use `.if !commands(xxx)' to check if `xxx' has a defined, overriden rule,
instead of `.if !targets(xxx)'.  The latter evaluates as true even when `xxx'
has an empty rule to define a dependency.
2015-08-30 21:16:10 +00:00
uebayasi ce0411ffa7 A makeoptions `DEFWARNINGS', forcibly disabling all ${CC} warnings, is only
used by hpcmips's NULLCONF, which doesn't even build for other causes.

If some source doen't build and needs a workaround, that should be deal with
by modifying per-file ${CC} options (e.g. COPTS.foo.c+=-fno-xxx).  Let's not
use DEFWARNINGS any longer.
2015-08-30 14:06:17 +00:00
uebayasi b86d2cc9aa Generate opt_diagnostic.h for DIAGNOSTIC; define unused _DIAGNOSTIC until
thoroughly populated.
2015-08-30 07:52:30 +00:00
uebayasi f5d8ce0f6b Typo. 2015-08-30 07:35:11 +00:00
uebayasi 8e50ed8849 Move splash logic, keep Makefile.kern.inc clean. 2015-08-30 07:33:53 +00:00
uebayasi 5e3f7c3b6d Put back MEMORY_DISK_IMAGE logic, but use generated opt_memory_root_image.h
and don't polute Makefile.kern.inc.
2015-08-30 05:24:03 +00:00
uebayasi 623bd6b2aa Define compile rules in sys/conf/Makefile.kern.inc except those overriden by
"file ... compile-with ...".  As rules are still explicit, be careful to not
override by checking .if !target(xxx.o).
2015-08-30 05:12:00 +00:00
uebayasi c692eec272 Use makeoptions_COPY_SYMTAB via opt_copy_symtab.h in sources. Remove a hack
to set -DCOPY_SYMTAB from sys/conf/Makefile.kern.inc.  Remove unnecessary
dependencies too.
2015-08-30 01:46:02 +00:00
uebayasi 3f77c79895 Move less important part out of Makefile.kern.inc. 2015-08-29 16:27:07 +00:00
uebayasi 46effbfc86 Revert a mistakenly added file. 2015-08-29 16:10:01 +00:00
uebayasi ac62c32d4d Define two suffix rules, .c -> .o and .S -> .o, using ${NORMAL_C} and
${NORMAL_S} respectively.  Use the .c rule to build devsw.c, ioconf.c, and
param.c.  Other .c/.S files have explicit rules in the generated `Makefile',
and unaffected.
2015-08-29 16:07:07 +00:00
uebayasi 43d2d6ab0b Now that MAXUSERS is in opt_param.h, param.o doesn't depend on Makefile. 2015-08-29 15:58:38 +00:00
uebayasi eee4f24ac6 According to nxr.netbsd.org, nothing uses MEMORY_DISK_IMAGE. Retire it.
Premature design and its build rule bloats Makefile.kern.inc.  There are
other ways like MEMORY_DISK_DYNAMIC.

(When kernel will be built as relocatable, embedding binary data will be much
easier, and md(4), splash(4), and ksyms(4) will all benefit.)
2015-08-29 15:51:53 +00:00
uebayasi c0c2ceb91f genassym.cf and machdep.c are _KERNEL_OPT'ed, don't depend on Makefile. 2015-08-29 15:37:18 +00:00
uebayasi d9fd5c1975 conf.c doesn't exist.
autoconf.c exists, but it's just a C file, no need to depend on Makefile.
2015-08-29 15:06:35 +00:00
uebayasi aaedd29630 I don't see how uipc_proto.c can change its content by Makefile, don't depend
on Makefile.  vfs_conf.c doesn't even exist, remove it too.
2015-08-29 14:43:38 +00:00
uebayasi 75298111a7 Convert MAXUSERS, take 2.
Define MAXUSERS in opt_param.h and include it from sys/param.h, for more
accurate dependency.  Don't define -DMAXUSERS and add it to ${CPPFLAGS}.
config(5)'s "maxusers" syntax doesn't change.

(The version just before revert was OK, but I had something bad in my obj
dirs.)
2015-08-29 14:07:45 +00:00
uebayasi 9d7c5e580c Revert MAXUSERS changes. Need fresh air. 2015-08-29 07:33:18 +00:00
uebayasi 4401376950 Define MAXUXERS in opt_param.h. Bump config(1) version. 2015-08-29 07:08:38 +00:00
uebayasi aeabb302e9 Comment. 2015-08-29 05:03:36 +00:00
uebayasi 5c3e77010e Define some suffix rules. Not used and harmless, because all rules are
explicit now.
2015-08-29 05:02:43 +00:00
uebayasi ba2a0d3e7c Specify explicit output (-o) to ${LINT} too. 2015-08-29 04:46:27 +00:00
uebayasi c74142254f Specifiy explicit output (-o) to ${CC}. 2015-08-29 04:43:05 +00:00
uebayasi 0d89ac2159 netbsd depends on $S/kern/kern_ksyms_buf.c; rarely updated but better safe. 2015-08-27 06:28:09 +00:00
uebayasi d6cc60697d Tweak previous. 2015-08-27 03:20:13 +00:00
uebayasi 33dfd38556 Echo exact objects (swap*.o etc.) when linking kernel. 2015-08-27 03:17:46 +00:00
uebayasi 54882650b0 Have MI genassym.cf. 2015-08-26 03:00:52 +00:00
uebayasi 282cd20ff5 Don't allow MD to override the assym.h generation rule.
(Nothing defines it except i386/bioscall/Makefile, but it is not part of
kernel build.)
2015-08-26 02:54:09 +00:00
uebayasi 13f4d6e07e Make <kernel>.ldscript ready to include assym.h. 2015-08-25 08:01:18 +00:00
uebayasi ffe64fad53 Redo Rev. 1.188:
o Explicitly add dependency of `<kernel>' on `<kernel>.ldscript', instead of
  relying on ${SYSTEM_DEP}, which is evaluated much earlier than
  `sys/conf/Makefile.kern.inc' is included, to avoid evaluation ordering
  problems.
o Print a message when creating a `<kernel>.ldscript'.
o Trim empty lines in `<kernel>.ldscript'.
2015-08-25 02:57:32 +00:00
pooka d8e04c9094 to garnish, dust with _KERNEL_OPT 2015-08-24 22:50:32 +00:00
christos ef44aed886 Fix the build: provide compatibility with ports that define KERNLDSCRIPT to
a file?
2015-08-24 18:02:55 +00:00
uebayasi 40e3059a86 If a kernel linker script is provided, preprocess it by cpp(1).
Thus some constants (PAGE_SIZE, COHERENCY_UNIT, ...) can be replaced in linker
scripts without setting unnecessary temporary symbols, or doing ugly sed(1)
hacks.  No headers are included yet.
2015-08-24 15:50:47 +00:00
uebayasi f0a73a3138 Fix vers.o dependency:
o Depend on ${SYSTEM_OBJ} instead of ${SYSTEM_DEP}.  The latter is obviously
  meant for kernels.
o Depend on Makefile instead of ${SYSTEM_SWAP_DEP}, which has existed since
  Rev. 1.1, but seems not used now.  Makefile is a file that must be updated
  after every config(1) run.  This is simpler than dependency on swap<kernel>.c.
2015-08-24 15:44:01 +00:00
uebayasi db0ac56ebf Define ${LINKSCRIPT} in one place. 2015-08-24 14:04:24 +00:00
uebayasi 3117ff9dff Define CHILD_MAX/OPEN_MAX as parameters. 2015-08-21 07:19:39 +00:00
uebayasi 520a795665 Move dev/ definitions out of files.kern. 2015-08-21 02:18:18 +00:00
christos 5a80a6eeb2 bump config version 2015-08-20 09:44:53 +00:00
uebayasi 6ca37d6c33 If MD ldscript is generated, give it dependency on ${SYSTEM_OBJ}. 2015-08-19 05:46:11 +00:00
uebayasi 6019316b24 G/C defpseudo intrctl. 2015-08-18 09:43:38 +00:00
uebayasi b318ac3975 G/C defpseudo fwiso. 2015-08-18 09:39:20 +00:00
knakahara a604df282c Add kernel code to support intrctl(8). 2015-08-17 06:16:02 +00:00
jmcneill 72fc9317eb Add an API for HDMI CEC devices. HDMI Consumer Electronics Control (CEC) is
a protocol that provides high-level control functions between CEC-capable
connected devices.
2015-08-01 21:19:24 +00:00
pgoyette 75eb6c4280 Create a new sysv_ipc module to contain the SYSVSHM, SYSVSEM, and
SYSVMSG options.  Move associated variables out of param.c and into
the module's source file.
2015-05-13 02:06:25 +00:00
nat 05dec8ff13 Include splash with genfb.
splash.o is only included with options SPLASHSCREEN.
splash_image.o target moved to Makefile.kern.inc.

This commit was approved by matt@
2015-05-01 02:00:41 +00:00
pgoyette 37202cb966 Update device dependency information - the sysmon major device now depends on the sysmon module itself, not on the individual components. 2015-04-23 23:22:51 +00:00
pgoyette 1c6efc88e1 Note that sysmon device is also required for sysmon_power.
XXX This will be changing again soon (once I get the various portions of
XXX sysmon modularized).
2015-04-19 09:20:54 +00:00
jmcneill 8a9ff04ba8 Split hdaudio and PCI attach glue. Even though the driver was written with
this separation in mind, all of the code lived in sys/dev/pci/hdaudio. Move
common parts to sys/dev/hdaudio and PCI attach glue to sys/dev/pci.
2015-03-28 14:09:58 +00:00
maxv 471961cbf1 Rename kern_verifiedexec.c to kern_veriexec.c. "Veriexec" is the name of
the subsystem, not "Verifiedexec".

The revisions of kern_verifiedexec.c are now in Attic/.

No change between kern_verifiedexec.c and kern_veriexec.c.

Also, update the man page accordingly.

Okayed by christos@ and blymn@ some months ago.
2015-02-13 17:50:48 +00:00
skrll 5768a2161c ARM PrimeCell PL181 (MMCI) host controller glue. 2015-01-27 21:34:43 +00:00
jmcneill 07e5ed13c4 Add driver for DesignWare 32-bit timer as found in Rockchip RK3066/PX2,
from FUKAUMI Naoki <fun@naobsd.org>
2015-01-17 15:04:47 +00:00
ozaki-r d850ab5089 Introduce defflag for NET_MPSAFE 2015-01-16 10:36:14 +00:00
jmcneill a54a8c291b defflag TODR_DEBUG 2015-01-11 14:22:53 +00:00
uebayasi 308d7d6145 Set BPFJIT flag in opt_bpf.h which is included by bpf.c. 2015-01-04 07:32:32 +00:00
wiz e5eb4ee3b8 Welcome to 2015! 2015-01-01 03:21:49 +00:00
jmcneill 21d168c081 add DesignWare SD/MMC controller driver 2014-12-27 01:18:48 +00:00
uebayasi 2bdcfe8a70 Stop ordering dependencies alphabetically. 2014-11-15 12:56:28 +00:00
uebayasi 1a322b21d7 Don't sort objects for modular build. 2014-11-15 08:20:42 +00:00
uebayasi fdd72c8f74 Separate linker script argument (${LINKSCRIPT}) from ${LINKFORMAT}
${LINKFORMAT} specifies ABI options, and used for ld -r.  ${LINKSCRIPT} (-T
ldscript) is used only for final link.
2014-11-15 08:20:01 +00:00
uebayasi 5065266d77 `ld -r' needs ${LINKFORMAT}. This fixes the experimental config(1) modular
build for MIPS64 ports.
2014-11-13 13:44:31 +00:00
uebayasi c54b571b70 List of all link-set names. 2014-11-13 06:14:47 +00:00
christos f0d25730ac restore previous functionality, and add what we need with -t <template> 2014-11-12 13:23:41 +00:00
christos 0b973a3f7c I don't know what was using this before (but it did not work since it
did not produce valid LDSCRIPT code) and now it does.
2014-11-12 02:15:58 +00:00
nakayama ecc7cc9066 Trim " " at the beginning of version string to follow the change
in rev.1.60 of newvers.sh.

-const char sccs[] = "@(#)${fullversion}";
+const char sccs[] = "@(#)" ${fullversion_source};
2014-11-07 12:34:14 +00:00
uebayasi 26709f3d7e Leave .map when linking .ko in modular build. 2014-11-06 12:02:59 +00:00
uebayasi 8d1f7e29fd More clean files. 2014-11-06 11:59:17 +00:00
uebayasi c42523f496 config(1), config(5): Introduce "select"
o Introduce a new selection directive "select" to select an attribute (as a
  module) and its dependencies.
o Support "no select" too.
o Stop abusing "options" to select an attribute.
o Bump config(1) version.
2014-10-31 07:38:36 +00:00
uebayasi 27424e5fa5 Move kern definitions. 2014-10-12 04:30:42 +00:00
uebayasi d13c4a3b07 Move net definitions. 2014-10-12 03:56:18 +00:00
uebayasi f62ed0e5b2 Define layerfs as an attribute. 2014-10-12 03:52:30 +00:00
uebayasi e500ebe9ee Normalize audio related definitions. 2014-10-10 17:21:20 +00:00
uebayasi 3da6b6cc01 Define net attribute. Always select it for now. 2014-10-10 12:46:32 +00:00
uebayasi ff1a9b99cc Move athn definitions. 2014-10-10 12:39:53 +00:00
uebayasi 89221fef3c Move audio related definitions. 2014-10-10 12:29:28 +00:00
uebayasi b31f13fb95 To make sure that I'm not doing wrong, try to define ffs/ufs/vfs dependencies
a little more strictly.
2014-10-10 12:20:13 +00:00
uebayasi 92b86764e1 Bump config(1) version.
config(1) still keeps backward-compatibility; it is more permissive than
before.  The tree, however, needs the updated config(1), mainly to strictly
define attribute ("module") ownership and dependencies.
2014-10-10 12:10:02 +00:00
uebayasi b411015f8e Now that attribute dependency works, prefer it to options dependency (personal
preference).  Use it for "kern", depending on "machdep" and "uvm".
2014-10-10 10:25:00 +00:00
uebayasi 7449b0ef66 Use option dependency to always select KERN (and its dependencies). 2014-10-10 09:31:40 +00:00
uebayasi 46d7be3c23 Define "machdep" attribute and mark files (in amd64 and x86). 2014-10-10 09:13:21 +00:00
uebayasi bb143539dc Use opt_*.h to not polute CPPFLAGS.
Attribute dependency is not yet.  Revert a definition.
2014-10-10 09:01:01 +00:00
uebayasi ddd87a14b9 Define "uvm" attribute and mark files. 2014-10-10 08:24:54 +00:00
uebayasi 6fb100ce1c Define "kern" attribute (a.k.a module). Mark kern_*.c (and some others) as
"kern".  Always select "kern" in sys/conf/std.
2014-10-10 08:18:04 +00:00
uebayasi c1e169afb0 Fix link echo indent. 2014-10-10 08:13:52 +00:00
uebayasi 7a4efc30db Define a command to generate relocatable objects using ld -r. 2014-10-09 16:35:57 +00:00
christos 4c9d1f022b add the common code for verbose printing of devices. 2014-09-21 14:31:38 +00:00
matt 4e1a8f1325 Also copy the symtab to the .gdb image. If we are producing a .gdb, grab
the symtab from that since it will be a bit larger than the one from the
stripped kernel and thus can't be inserted into the .gdb kernel.
2014-09-20 19:22:09 +00:00
matt 0d3752840d Add comment about new MI device numbers in other files. 2014-09-19 17:46:28 +00:00
matt 73932fdf97 Add some file to define MI major for various classes of stuff.
These are for new ports to use.
2014-09-19 17:32:34 +00:00
matt ab5c9505ae include for configs which includes all file-systems and any dependent
pseudo-devices
2014-09-19 09:05:23 +00:00
jmcneill 0f97be00b0 options MOTG_ALLWINNER to select the awin specific reg layout 2014-09-13 14:47:35 +00:00
martin 6caee94ae6 Config glue for the Designware GMAC core.
Switch allwinner specific awge driver over to use it.
2014-09-08 14:26:16 +00:00
matt bab7f424b2 Add a commented out CWARNFLAGS to enable -Wc++-compat but don't treat them
as errors.
2014-09-05 06:52:12 +00:00
joerg 45c6ebd5f6 Revert last, bump required config version instead. 2014-08-24 20:23:38 +00:00
matt bf06458dd9 Add entry for kern/kern_ksyms_buf.c 2014-08-24 16:42:46 +00:00
tsutsui 22f9ddb84f Add new arcofi(4) audio driver for NetBSD/hp300, ported from OpenBSD.
The arcofi(4) is a driver for the HP "Audio1" device
(Siemens PSB 2160 "ARCOFI" phone quality audio chip)
found on the HP9000/425e and HP9000/{705,710,745,747} models
(but only hp300 attachment is ported for now).
The chip supports 8-bit mono 8kHz U-law, A-law and
16-bit mono slinear_be formats.

The old HP9000/425e playing tunes with this new arcofi(4) audio driver
was also demonstrated at Open Source Conference 2014 Shimane.
2014-08-24 08:17:44 +00:00
jnemeth ee79d5b0e4 Create an "options MODULAR_DEFAULT_AUTOLOAD" config option and add
it to all kernel configs that contain "options MODULAR".  This
option turns on module autoloading by default (which is the current
default).  This allows people who don't want module autoloading on
by default to disable it by simply removing/commentting this line.
2014-08-24 07:59:22 +00:00
skrll 673e836663 More tidyup after joerg's copy&paste disaster. I have ddb symbols again. 2014-08-21 07:57:25 +00:00
joerg 64bc057870 Drop stray } 2014-08-20 22:02:20 +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
apb f498235332 Add COMPAT_70 to conf/files; add compat_70 to kern/syscalls.conf
and compat/netbsd32/syscalls.conf.
2014-08-16 17:24:28 +00:00
tls ea6af427bd Merge tls-earlyentropy branch into HEAD. 2014-08-10 16:44:32 +00:00
joerg dad6006456 The bpendtsleep label has been gone for a long time, so cleanup the
associated hack here.
2014-08-08 14:42:58 +00:00
justin 5d43dac3af Work around escaping issues with quotes in substitutions, to fix cross builds 2014-08-03 13:14:59 +00:00
apb 7fa1ca92e5 BUILDINFO part 1: newvers.sh
If the BUILDINFO environment variable is set, then interpret it as
a string with embedded C-style escapes and store it in a new
buildinfo variable in the emitted vers.c file.

Also centralise the awk code for converting a multi-line string
to C source code.
2014-08-03 09:13:11 +00:00
ozaki-r 64d3f382b2 Call etherinit from ifinit1 only when it is required
This unbreaks the builds of kernels that don't build if_ethersubr.c.
2014-07-30 13:32:09 +00:00
bouyer 55adee8448 Add motg(4), a driver for Mentor Graphic's OTG USB controller IP,
as found in several SoCs.
Only host mode is supported, good enough for umass (USB keys), kubd and ums,
and USB2 hubs.
It fails to properly talk to USB/serial adapters at this time.
2014-07-16 18:22:23 +00:00
apb 8acaaf26b8 Document command line options and other inputs and outputs. 2014-06-14 12:42:41 +00:00
apb 8d7dc1eea4 Append ".${BUILDID}" to the default value of <id>,
provided the "-i <id>" command line option was not used.
2014-06-14 12:35:18 +00:00
christos dbd224bbcc stf is a 6->4 gateway and needs both inet4 and inet6 not one or the other. 2014-06-12 21:08:31 +00:00
rmind 60d350cf6d - Implement pktqueue interface for lockless IP input queue.
- Replace ipintrq and ip6intrq with the pktqueue mechanism.
- Eliminate kernel-lock from ipintr() and ip6intr().
- Some preparation work to push softnet_lock out of ipintr().

Discussed on tech-net.
2014-06-05 23:48:16 +00:00
rmind 8011b285c0 Implement MI IPI interface with cross-call support. 2014-05-19 22:47:53 +00:00
martin ecad429601 As discussed on tech-toolchain, offer a new make variable MKKDEBUG - if
set to "yes", kernel builds will gain debug info and a netbsd.gdb will
be created (same as adding "makeoptions DEBUG=-g" to the config file).
2014-05-05 19:06:29 +00:00
riastradh 46e38060ce Fix apple_smc config in conf/files. 2014-04-01 17:49:30 +00:00
riastradh 9456e37730 Rework Apple SMC attachment goo and split into multiple modules.
The four modules are apple_smc for the core functions, apple_smc_acpi
for attachment at acpi, and apple_smc_fan & apple_smc_temp for stuff
on the SMC.

Seems like there's a lot more bookkeeping necessary to maintain
children of an applesmc device implemented by loadable modules.
Maybe there's a better way I just haven't figured out yet.
2014-04-01 17:48:39 +00:00
riastradh 0396c57641 First draft of drivers for the Apple System Management Controller.
Device interface derived by reading the Linux driver source code and
<http:///www.parhelia.ch/blog/statics/k3_keys.html> as of 2012-12-05.

Includes support for attaching fan and temperature sensors to sysmon.
No accelerometer yet.

Compile-tested only, based on some run-testing of experiments from
userland.  Module attachment is not quite finished, so it won't work
yet.
2014-04-01 17:47:36 +00:00
nonaka c3077021ad Add a driver for Realtek RTS5209/RTS5229 Card Reader.
Ported from OpenBSD.
2014-03-19 15:26:41 +00:00
riastradh 6cb10275d0 Merge riastradh-drm2 to HEAD. 2014-03-18 18:20:35 +00:00
ozaki-r e451c2b3be Do COMPILE_CTFCONVERT on vers.o as same as other targets
Otherwise, we will get the error when building a kernel with -V MKDTRACE:
  ERROR: nbctfmerge: Input file vers.o was partially built from C sources,
  but no CTF data was present
2014-03-10 02:36:50 +00:00
ozaki-r 09938a932a Use CTFMFLAGS, not CTFFLAGS, for CTFMERGE 2014-03-10 02:04:29 +00:00
ozaki-r 2d82c07a81 Build net/zlib.c for DTrace
This is needed for building DTrace on ARM.
2014-03-05 03:16:43 +00:00
joerg 9c3fd52490 Introduce GENASSYM_CPPFLAGS for options during genassym processing.
Consistently drop assembler flags.
2014-03-04 14:58:14 +00:00
hannken d940ddcc62 Currently dead vnodes still reside on the vnodelist of the file system
they have been removed from.

Create a "dead mount" that takes dead vnodes until they get freed.

Discussed on tech-kern.
2014-02-27 13:00:06 +00:00
matt d0fba2d7dc defparam KERNHIST_DELAY 2014-02-21 07:32:43 +00:00
jnemeth 524c82e251 Welcome to 2014! 2014-01-01 00:33:34 +00:00
pooka b4e2514736 Put vfs bits of ktrace into kern_ktrace_vfs.c per convention. 2013-12-09 16:45:23 +00:00
mbalmer 57b6509ecb revert previous 2013-10-18 08:06:06 +00:00
mbalmer b2f05d7f17 add a device-major for lua(4) 2013-10-18 08:03:48 +00:00
skrll 550cac20b5 Remove dotg(4) as it's been replaced by dwctwo(4). 2013-10-15 15:13:17 +00:00
joerg 3657cb7f1d Update LLVM/Clang snapshot to r191105. This brings in a better detection
of unused static variables and functions. Disable this for some external
code and for ioconf.c in the kernel.
2013-09-21 22:28:12 +00:00