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.
${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.
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.
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.
(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.
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
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)
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.
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.
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.
- 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
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
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.
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.
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...
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.
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).
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.