Commit Graph

2117 Commits

Author SHA1 Message Date
christos e7ae23fd9e include "ioconf.h" to get the 'void <driver>attach(int count);' prototype. 2015-08-20 14:40:16 +00:00
tsutsui bcbfd9f8ca No need to have errno in a MD file. It's in MI src/sys/lib/libsa/errno.c. 2015-08-12 18:32:48 +00:00
tsutsui 1088923901 Try to shrink binary size a bit.
- omit usage of options in SMALLPROG case
- use bool instead of int where appropriate
- rely on zero-initialized-bss
2015-08-12 17:59:51 +00:00
tsutsui 6a40721f00 Make local functions static. 2015-08-12 17:53:03 +00:00
mlelstv 6f00c789e1 Use C99-style initializers for struct dkdriver. 2015-04-26 15:15:19 +00:00
christos 285ccf0c47 rename NV_DEBUG to NVRAM_DEBUG 2015-03-06 12:41:05 +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 555c17c325 declare error 2015-01-01 17:46:09 +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
tsutsui 2c3ae0c218 Regen config files from GENERIC.in rev 1.109 by makeconf:
> Shrink GENERIC and enable options MODULAR instead, as other poor m68k ports.
>
> This allows all (at least ATARITT and FALCON, which have certain users)
> gzipped kernel binaries put into 1440KB 2HD floppy so that users can
> load these kernels on the native TOS using LOADBSD.TTP utility for
> installation.  Note SMALL030 kernel doesn't include any Ethernet
> configuration and requires CD-ROM or other removable disks.
>
> Should be pulled up to netbsd-7.
2014-11-24 08:29:26 +00:00
tsutsui 1083772d09 Shrink GENERIC and enable options MODULAR instead, as other poor m68k ports.
This allows all (at least ATARITT and FALCON, which have certain users)
gzipped kernel binaries put into 1440KB 2HD floppy so that users can
load these kernels on the native TOS using LOADBSD.TTP utility for
installation.  Note SMALL030 kernel doesn't include any Ethernet
configuration and requires CD-ROM or other removable disks.

Should be pulled up to netbsd-7.
2014-11-24 08:23:48 +00:00
tsutsui 38dea050c6 Disable "OS bootversion check" on crunched binaries for installation media.
This oscheck() function seems implemented to check compatibility
between bootloaders and /netbsd kernel, but checking /netbsd using kvm(3)
doesn't make sense on installation or even future cross builds, and
probably we will never bump bootloader version without compatibility
per recent 14 years history.

This works around overflow of 1440KB 2HD sysinst.fs, and would also be
worth to pullup to netbsd-7.
2014-11-24 08:08:23 +00:00
tsutsui 7839e5ad38 Specify -fno-strict-aliasing as a temporary workaround for gcc48.
The existing abcksum() also violates strict-aliasing rule
(while current gcc48 doesn't warn it) and fixing all violations
strictly requires whole reorganization of boot sector structures.
But it won't happen soon and this MD installboot should be integrated
into MI installboot(8) in future, and it requires whole overhaul anyway.
See long discussion in source-changes-d@ for details.

Should be pulled up to netbsd-7 if we switches m68k to using gcc48.
2014-11-24 07:52:04 +00:00
tsutsui e21ac01aa6 Revert previous again.
There are claims that it still violates strict-aliasing rule and
it is no sense to just appease compiler by incorrect implementation.
2014-11-24 07:34:45 +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
tsutsui 5663afc984 Appease gcc48 -Werror=strict-aliasing warning by filling cksum via union.
Discussed in source-changes-d@ thread and tested on TT030.
Should be pulled up to netbsd-7 (if NetBSD/m68k 7.0 will switch to gcc48).
2014-11-16 13:47:52 +00:00
tsutsui bdfce4082b Revert revs 1.29 and 1.30, to make it easier to pullup an alternative fix.
Ok'ed by christos@
http://mail-index.netbsd.org/source-changes-d/2014/11/15/msg007338.html
2014-11-16 13:38:39 +00:00
christos a0a6c85f4d centralize the call unit / dialout macros 2014-11-15 19:20:01 +00:00
tsutsui 1d361e78b9 Expand heap to 64KB so that bootxx can load bootxxx from 32KB blocksize ffs.
Tested on TT030 with 32GB SSD via SATA->IDE->SCSI converters.
Should be pulled up to netbsd-7 and netbsd-6 branches..
2014-11-15 06:30:10 +00:00
christos 8d93fd0227 move to the right offset 2014-11-13 17:46:49 +00:00
christos 299b0ec7bb fix strict aliasing violations 2014-11-13 17:19:29 +00:00
snj f0a7346d21 src is too big these days to tolerate superfluous apostrophes. It's
"its", people!
2014-10-18 08:33:23 +00:00
christos 0e8d594e89 copy the leak fix to the other switch branch (from max) 2014-09-26 17:11:05 +00:00
christos da4c4f5dbc fix leak. 2014-09-21 15:49:21 +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 30a0368950 Add "options COMPAT_70" to all kernel configuration files that
already had "options COMPAT_60".
2014-08-16 17:56:30 +00:00
tsutsui 498146de96 Reorganize and bump VM related constants.
- sync VM_MAXUSER_ADDRESS and VM_MAX_ADDRESS with other hp300 derived ports
  and use same definitions for USRSTACK as other m68k ports
  (no worth to have sun3/sunos compat in these days)
- remove unused KUSER_AREA
- bump MAXTSIZ, MAXDSIZ, and MAXSSIZ

These changes allow my 64MB TT030 build pkgsrc/textproc/icu
which seems to require >200MB VA space.
(note our current 040/060 pmap implementation can't handle >224MB VA size)
2014-07-26 13:24:34 +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 fce93f1ab3 Appease gcc48 -Wunused-but-set-variable warning. 2014-07-05 09:36:49 +00:00
tsutsui afecb865fe Regen from MILAN.in rev 1.27 and GENERIC.in rev 1.106:
> Enable options WSDISPLAY_COMPAT_USL in template, not in generated files.

> Use COPTS="-O2 -fno-reorder-blocks" for kernels except SMALL030_KERNEL.
>
> Also remove COPTS="-Os" from std.* files and specify it in
> GENERIC.in template for SMALL030_KERNEL.
2014-07-05 09:32:48 +00:00
tsutsui 705867df4c Regen from GENERIC.in rev 1.106:
> Use COPTS="-O2 -fno-reorder-blocks" for kernels except SMALL030_KERNEL.
>
> Also remove COPTS="-Os" from std.* files and specify it in
> GENERIC.in template for SMALL030_KERNEL.
2014-07-05 09:31:21 +00:00
tsutsui a7b24ea41d Use COPTS="-O2 -fno-reorder-blocks" for kernels except SMALL030_KERNEL.
Also remove COPTS="-Os" from std.* files and specify it in
GENERIC.in template for SMALL030_KERNEL.
2014-07-05 09:28:48 +00:00
tsutsui f0ff36e86d Enable options WSDISPLAY_COMPAT_USL in template, not in generated files. 2014-07-05 09:24:23 +00:00
ozaki-r d06eab1d01 Fix typo 2014-03-31 06:32:31 +00:00
christos e58a356cba make pci_intr_string and eisa_intr_string take a buffer and a length
instead of relying in local static storage.
2014-03-29 19:28:24 +00:00
tsutsui 114c4a90f7 Make sure to acquire proc_lock mutex on calling psignal(9) in EV_WAKEUP().
Without this, Xserver could cause panic on the DIAGNOSTIC kernel as x68k:
http://mail-index.netbsd.org/source-changes/2012/08/15/msg036632.html
2014-03-29 16:46:19 +00:00
ozaki-r 9296282025 Fix typos 2014-03-29 05:03:43 +00:00
ozaki-r 044269e319 Fix; cts[0] => cts 2014-03-28 13:35:13 +00:00
christos 04166a5a62 kill sprintf 2014-03-26 18:04:33 +00:00
christos 4d24ead901 - remove unused
- use cpu_{g,s}etmodel() (not committed yet)
2014-03-24 18:39:57 +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 7e3311382f Fix kernel crash when a user tries to switch to nonexistent terminal.
Reported by Gabor Sebestyen in PR port-atari/48599.

Should be pulled up to all netbsd-6 branches.
2014-02-19 11:40:31 +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
dsl fb6fad97a4 Remove the _KERNEL part of these two clones of sys/exec_elf.h
Remove the incorrect (and completely unused everywhere) Elf64_Shalf.
Put a better include guard on arch/epoc32/stand/e32boot/include/elf.h
Should be ok because I can't find any references to KERNEL in these
  source trees.
2014-01-03 16:40:58 +00:00
mlelstv aafa26eec9 Fix allocator routines. Instead of abusing CIRCLEQ pointers, add an explicit
type field to tag memory nodes that are or are not on the free list.
2014-01-03 07:14:20 +00:00
christos 9d605174d9 Change the queue.3 *_END(&head) macros to NULL. Since we don't have CIRCLEQ
anymore, all the macros expand to NULL anyway, so this improves readability.
Requested by rmind@
2013-11-27 17:24:43 +00:00
christos 0ecbcb364a convert from CIRCLEQ to TAILQ; remove open coding. 2013-11-23 22:52:40 +00:00
christos 86b6b2fef2 make cpu_need_resched() macros consistent; __USE flags 2013-10-19 19:20:59 +00:00