Commit Graph

2342 Commits

Author SHA1 Message Date
christos
ebbcb8c3e7 PR/50852: David Binderman: make code more readable (although it was correct
anyway)
2016-02-26 18:11:11 +00:00
tsutsui
1cc0bb1b71 Fix fatal "intr_dispatch: stray level 6 interrupt" panic by the GENERIC
kernel on machines without arcofi(4) audio (i.e. all hp300 except HP425e).

I failed to pull all necessary changes for arcofi(4) from OpenBSD
and I should have tested 7.0_RC kernels on my HP382 too :-(

Should be pulled up to netbsd-7 and netbsd-7-0.
2016-01-17 17:49:55 +00:00
tsutsui
e559dfd4b7 Enable LIBSA_CREAD_NOCRC. PR/50638
Bump version to denote user visible change.
Tested on HP9000/382.
2016-01-17 08:05:20 +00:00
christos
ed74e51b8a Holiday food satiation. 2015-12-29 14:51:38 +00:00
christos
d5137ecf34 fenv for m68k 2015-12-24 14:12:39 +00:00
dholland
25d3b9e7cb Final bit of PR 41200: headers that declare ioctls should include sys/ioccom.h.
This covers most if not all of the MD headers.

XXX: a lot of the ioctl definitions in some of these files are cutpasted.
2015-09-07 03:49:44 +00:00
uebayasi
44e9385020 Declare dependency on fpsp.o via newly introduced ${MD_LIBS} instead of
${MD_OBJS}.

${MD_OBJS} should be used only for objects that must be linked first (i.e.,
start code).  Objects have to be compiled following common compile rules,
and have to be generated into common places (i.e., top of kernel build
directory).

${MD_LIBS} defines libraries that are built by separate makefiles, under
separate directories.  `Makefile.kern.inc' doesn't know intermediate library
objects.
2015-09-06 02:17:30 +00:00
uebayasi
09199f3246 Fix build of .s files. 2015-08-31 05:46:41 +00:00
maxv
b74522aae1 Remove KMEMSTATS. 2015-08-08 06:36:24 +00:00
mrg
2603e0673f remove various HAVE_GCC=45 fragments. 2015-04-15 19:13:46 +00:00
riastradh
56d3242969 Include <sys/rndsource.h> where it is actually used.
I had removed <sys/rnd.h> from files that didn't mention anything of
the rnd(9) API.  But they included other files which assumed
<sys/rnd.h> had already been included.
2015-04-14 20:32:35 +00:00
riastradh
445478ce67 MD rnd.h cleanups. Please let me know if I broke anything! 2015-04-13 21:18:40 +00:00
martin
79db564711 Handle EINVAL in the fault path and send SIGBUS on mmap'd access past EOF 2015-03-04 20:29:59 +00:00
christos
c182898b0d We have three sets of DTYPE_ constants in the kernel:
altq		Drop 		Type
	disklabel	Disk 		Type
	file		Descriptor	Type
(not to mention constants that contain the string DTYPE).
Let's make them two, by changing the disklabel one to be DisK TYPE since the
other disklabel constants seem to do that. Not many userland programs use
these constants (and the ones that they do are mostly in ifdefs). They will
be fixed shortly.
2015-01-02 19:42:05 +00:00
christos
c60db2e923 make more drivers use disk_ioctl, and add a dev parameter to it so that
we can merge the "easy" disklabel ioctls to it. Ultimately all this will
go do dk_ioctl once all the drivers have been converted.
2014-12-31 19:52:04 +00:00
christos
a95736d447 PR/49207: Kamil Rytarowski: Add sys/clock.h with generic time macros
(derived from clock_subr.h). Keep clock_subr.h with the kernel structures
and functions to reduce diffs, and have clock.h only include standalone
constants and macros.
2014-11-17 02:15:48 +00:00
manu
239cf5506d Remove unused extended attributes kernel options
As Masao Uebayashi pointed to me, UFS_EXTATTR_AUTOSTART, LFS_EXTATTR_AUTOSTART
and UFS_EXTATTR_AUTOCREATE are not used anywhere in the code. Remove them
as they have been obsolete for a long time:
UFS_EXTATTR_AUTOSTART was replaced by mount -o extattr
LFS_EXTATTR_AUTOSTART was created to match obsolete UFS_EXTATTR_AUTOSTART
UFS_EXTATTR_AUTOCREATE was replaced by sysctl vfs.ffs.extattr_autocreate
2014-11-16 16:01:39 +00:00
christos
a0a6c85f4d centralize the call unit / dialout macros 2014-11-15 19:20:01 +00:00
manu
2cab231d44 Support for UFS1 extended attributes in GENERIC and GENERIC-like kernels
This change just brings UFS1 extended attribute *support* in the kernel,
extended attributes are not enabled unless three conditions are met:
1) filesystem is UFS1 (newfs -O1)
2) .attribute/system and .attribute/user directories are created at fs root
3) filesystem is mounted with -o extattr

Some GENERIC kernels are obviously memory constrained, the extended
attributes options were not enabled for them, but just added commented out.
(kernel were considered memory constrained if QUOTA option was disabled)
2014-11-12 10:47:20 +00:00
dholland
5f2b8b191c PR 49245: Fix broken RCSID (Kamil Rytarowski) 2014-10-11 05:33:25 +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
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
apb
a544a9c45e Add commented out "#options COMPAT_70" to all kernel configuration
files that already had commented out "#options COMPAT_60".
2014-08-16 17:57:37 +00:00
apb
30a0368950 Add "options COMPAT_70" to all kernel configuration files that
already had "options COMPAT_60".
2014-08-16 17:56:30 +00:00
tls
ea6af427bd Merge tls-earlyentropy branch into HEAD. 2014-08-10 16:44:32 +00:00
isaki
7b2cf7659d Unify all arch/*/stand's atoi() to MI libsa.
lib/libsa/atoi.c was separated from lib/libsa/bootcfg.c.
PR/49084
2014-08-10 07:40:49 +00:00
joerg
eb6cc7528a Consistently define WARN in a way that passes format string checks, i.e.
always uses the same number of arguments as given in the format string.
2014-08-06 21:57:48 +00:00
dholland
f9228f4225 Add d_discard to all struct cdevsw instances I could find.
All have been set to "nodiscard"; some should get a real implementation.
2014-07-25 08:10:31 +00:00
dholland
8c70ef39af Add d_discard to all struct bdevsw instances I could find.
I've set them all to nodiscard. Some of them (wd, dk, vnd, ld,
raidframe, maybe cgd) should be implemented for real.
2014-07-25 08:02:18 +00:00
tsutsui
2f4855795f More tweaks to GENERIC.
- reduce maxusers from 32 to 8 as other m68k ports
- make NFS_BOOT_DHCP default rather than NFS_BOOT_BOOTP
  (and move these options in "Networking options" block)
- use 8x16 font instead of 12x22 for machines with small screen like HP362
2014-07-18 17:59:12 +00:00
tsutsui
44d12ee93b Shrink GENERIC and enable MODULAR instead. 2014-07-18 17:51:27 +00:00
tsutsui
bb79edc987 Use COPTS="-O2 -fno-reorder-blocks" as defined in sys.mk for userland.
with "-O2":
   text    data     bss     dec     hex filename
3717740   86092  152864 3956696  3c5fd8 netbsd

with "-O2 -fno-reorder-blocks":
   text    data     bss     dec     hex filename
3304404   86092  152864 3543360  361140 netbsd
2014-07-05 09:15:38 +00:00
tsutsui
857033a6e9 Appease gcc48 -Wunused-but-set-variable warnings. 2014-06-21 02:02:40 +00:00
tsutsui
224acff119 Properly use an unused-but-set-variable. Also replace a magic number. 2014-06-21 02:01:21 +00:00
dholland
39b82eecb9 Use accessor functions for the tty's table of control characters.
(at least from outside the core tty sources)

Move some xon/xoff code from net/ppp_tty.c to kern/tty.c.
2014-05-22 16:31:19 +00:00
dholland
5815fa9470 Use uintptr_t so this file can be compile-tested on foreign arches. 2014-05-22 16:30:40 +00:00
tsutsui
18864e9474 Reduce a number of getsecs() calls in le_get() to make netboot a bit faster. 2014-05-01 18:08:47 +00:00
tsutsui
fdbe432a63 Add and enable sti(4) at sgc in install kernels for 425e.
Tested on both serial console and framebuffer console.
(switched by the service switch on the back panel)
2014-04-30 17:51:53 +00:00
tsutsui
ef266e3f3d Probe mcclock only on 425e to avoid an extra "not configured" message. 2014-04-30 15:53:09 +00:00
tsutsui
0be110ccf5 Disable options NVNODE, NBUF and BUFPAGES in the RAMDISK kernel.
These options were specified in the INSTALL kernel for 4MB machines,
but nowadays even the INSTALL kernel would not boot on such machines
and the RAMDISK kernel assumes the target machine has more memories.
Furthermore, these options makes extracting binary sets much slower
and also could cause "wapbl_register_deallocation: out of resources"
panic during extracting binaries into a 32GB SSD with 4KB fragments.

Should be pulled up to netbsd-6* branches.
2014-04-29 18:47:22 +00:00
tsutsui
dc01298fe1 Add "pseudo-device wsmux" in INSTALL (and RAMDISK) kernels.
On NetBSD/hp300, hilkbd(4) is probed in config_interrupts(9)
so it's always attached after wsdisplay(4).  In that case,
wskbd can't be used as a console input device without wsmux(4).
(i.e. keyboard didn't work on installer using screen console)

Should be pulled up to all netbsd-6* branches.
2014-04-29 18:38:27 +00:00
tsutsui
f7f035c7f9 Bump versions to denote recent 425e related changes. 2014-04-26 07:53:41 +00:00
tsutsui
619ff4fb47 Pull random notes on the Apollo Domain keyboard from ancient PR/3528. 2014-04-24 12:10:27 +00:00
tsutsui
f9e543313f Make the Apollo Domain keyboard actually work.
Tested on HP9000/425e and the keyboard model A1630-82001 R2 (RX-60857-HW)
provided by Miod Vallat.  Mouse support needs more work.
2014-04-24 11:58:04 +00:00
tsutsui
be8da3cbb0 Also fix the apci device address in dnkbd.c as apci.c rev 1.12:
http://mail-index.netbsd.org/source-changes/2014/04/10/msg053940.html

Finally dnkbd(4) is confirmed working at least on bootloader.
Thanks again to Miod Vallat.
2014-04-22 15:49:14 +00:00
tsutsui
18155f04b3 Add proper consinit(9) support for sti(4) at sgc framebuffer on hp300.
The cnattach functions for sti(4) and service switch check method
for 425e in com_frodo.c are taken from OpenBSD.
The strategy how to choose the console device in hp300_cninit() is
quite diverged from 4.4BSD and OpenBSD so it's tweaked by me.

Also put several changes in sti_sgc.c to reduce diffs from OpenBSD/hp300.

Tested on 425e and 362 (which still uses gendiofb(4), not sti(4)).

XXX: sti(4) requires uvm_km_alloc(9) and uvm_map_protect(9)
     to copy and call ROM functions on the executable memory region, so
     it can be called before UVM and related initializations are complete.
     Probably it's time to consider about MI "deferred consinit()" API
     in init_main.c (or elsewhere) for modern complicated VM system...
2014-04-20 04:12:54 +00:00
tsutsui
f21b045fdf Add RTC support for HP9000/425e to bootloader too.
Also put several cleanup:
- make local functions and variables static
- use proper variable types
- some KNF

Note it turns out that extreme slowness of netboot on hp300 is
caused by the too slow access of the traditional RTC chip at intio
(i.e. netboot on 425e is so much faster than others). Oh well.
2014-04-19 06:04:58 +00:00
tsutsui
0f84edae2d Add proper RealTime Clock support for HP9000/425e.
As the OpenBSD/hp300 page says 425e doesn't have the traditional
RTC at intio (as it also lacks DCA 16550 serial at intio?),
but after a few hour investigation it turns out that
425e uses mc146818 compatible calendar clock in
the Apollo "frodo" utility chip and the frodo chip on
425e actually has the 32kHz OSC and is actually backed up
by the onboard lithium battery.

Tested on HP425e (with mcclock) and HP362 (with old rtc).
2014-04-19 05:37:54 +00:00
tsutsui
5546b37c59 Check the service switch on 425e to select apci serial console.
Taken from OpenBSD/hp300.  See the following comment for details:
>> * Check the service switch. On the 425e, this is a physical
>> * switch, unlike other frodo-based machines, so we can use it
>> * as a serial vs internal video selector, since the PROM can not
>> * be configured for serial console.
2014-04-17 12:35:24 +00:00