Commit Graph

2315 Commits

Author SHA1 Message Date
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
tsutsui
c6dcfa5a19 Add sti(4) at sgc screen console support. From (the late) OpenBSD/hp300.
Tested on HP9000/425e, which was sent from Miod Vallat and
demonstrated at Open Source unConference 2014 Kagawa.
2014-04-13 15:45:26 +00:00
tsutsui
7a138543c8 Fix a botch on switching from apci (and dca) to MI com(4) 10 years ago.
I.e. fix apci device address per FRODO_BASE macro change
in frodoreg.h rev 1.2.  Now bootloader works with serial console
on HP425e (which has only com at frodo).

Thanks to miod@openbsd for providing his 425e.
2014-04-10 18:10:09 +00:00
christos
1c9d295ac5 kill sprintf 2014-03-26 17:54:46 +00:00
christos
bde065f0b1 - remove unused
- use cpu_{g,s}etmodel
2014-03-24 19:42:58 +00:00
dholland
39aea57337 typos in comments 2014-03-23 06:03:38 +00:00
dholland
a68f9396b6 Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
2014-03-16 05:20:22 +00:00
tsutsui
6b24937e2a Use common m68k/busaddrerr.s for bus error and address error handlers.
No binary changes on GENERIC.
2014-03-15 09:26:36 +00:00
tsutsui
7dbadedea5 Remove an instruction for nonexistent 060 branch prediction error accounting.
It's amiga and atari specific and copied from amiga/locore.s
to mac68k/locore.s in rev 1.80, then pasted into other ports.
Note this is harmless because all these ports don't have 68060 variants
(i.e. it's inside #if defined(M68060) block) and mvme68k (which has 68060)
has removed it since the initial import.
2014-03-09 16:28:43 +00:00
tsutsui
8627c8a745 Remove unused m68k_fault_addr, which is required only on mac68k for SBC.
It looks hp300 one was copied from mac68k in rev 1.75
and then it was pasted to other ports again and again.
2014-03-09 16:18:00 +00:00
tsutsui
b51976e023 defined(LKM) -> defined(MODULAR) 2014-01-31 18:49:35 +00:00
tsutsui
8c436a9898 Add empty LIBCRTI= as LIBCRT0 to build sa programs without installed DESTDIR.
XXX: probabry we should have bsd.saprog.mk or something.
2014-01-12 15:26:28 +00:00
christos
760092e27b don't include bsd.sys.mk 2014-01-10 16:35:11 +00:00
tsutsui
273c5b9bba Change the SCSI select timeout from 2ms to 250ms as kernel spc(4) driver does.
Noticed by miod@openbsd.
2014-01-02 17:43:32 +00:00
christos
86b6b2fef2 make cpu_need_resched() macros consistent; __USE flags 2013-10-19 19:20:59 +00:00
tsutsui
a31977f215 Fix a build error on a kernel config without 68040 machines.
Reported by Andrew Gillham on port-hp300@:
http://mail-index.NetBSD.org/port-hp300/2013/09/09/msg000077.html
(I removed defined(68060) since hp300 doesn't have it)

Should be pulled up to netbsd-6.
2013-09-21 06:24:43 +00:00
tsutsui
91eced933f Make FPU_EMULATE work on NetBSD/hp300. Commented out by default in GENERIC.
Tested on HP9000/362 without optional MC68882 FPU in its socket.
2013-08-16 13:39:47 +00:00
rmind
666e919182 G/C PFIL_HOOKS from the kernel configs. 2013-06-30 21:38:55 +00:00
christos
e46f5f0078 remove obsolete networking options 2013-06-05 23:07:59 +00:00
christos
1cc8b68d4b the bogus number police 2013-04-27 21:43:10 +00:00
christos
dc14ae835f remove confusing numeric locators where they are unused. 2013-04-27 18:19:19 +00:00
christos
2c1aa36c3d Under FAST_IPSEC, IPSEC_ESP is mandatory; GC it. 2013-03-02 02:42:07 +00:00
joerg
e240adbd0b Retire OSI network stack. OK core@ 2013-03-01 18:25:13 +00:00
tsutsui
2eb326fe75 Add sti at sgc framebuffer.
Ported from OpenBSD by kiyohara@.
2013-01-11 12:03:03 +00:00
apb
5c7419e70f Add commented out "#options COMPAT_60" to all kernel configuration files
that already had commented out "#options COMPAT_50".
2012-10-17 14:49:40 +00:00
apb
f3929b106b Add "options COMPAT_60" to all kernel configuration files
that already had "options COMPAT_50".
2012-10-17 14:48:07 +00:00
tsutsui
21f100dd36 struct device * -> device_t, struct cfdata * -> cfdata_t
use device_xname()  (from chs@)
2012-10-13 06:12:23 +00:00
abs
3267a6b9fe Update all kernel configs mentioning WSEMUL_* but not already including
WSDISPLAY_COMPAT_USL using the following rules:
- If WSEMUL_ is commented out, add commented out out WSDISPLAY_COMPAT_USL
- If INSTALL or obviously memory constrained, add WSDISPLAY_DEFAULTSCREENS=1
  and commented out WSDISPLAY_COMPAT_USL
- Otherwise add WSDISPLAY_COMPAT_USL

Some of the INSTALL configs for larger memory machines are probably suitable
for adding WSDISPLAY_COMPAT_USL.

Now wsconscfg(8) should be able to switch VTs when expected.

Implemented after no objection from tech-kern to the following:

On 5 June 2012 09:47, David Brownlee <abs@absd.org> wrote:
> wsconscfg(8) requires WSDISPLAY_COMPAT_USL in order to switch virtual
> terminals.
>
> Except when in an exceptionally memory or space constrained
> environment (INSTALL being the obvious case), is there any reason why
> all GENERIC and GENERIC-like kernels which have wscons enabled
> shouldn't also have WSDISPLAY_COMPAT_USL?
2012-08-17 20:11:37 +00:00