Commit Graph

671 Commits

Author SHA1 Message Date
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
tsutsui
a628ff77ec Explicitly denote static functions. 2015-02-14 13:07:39 +00:00
tsutsui
908d6ff293 Make local readonly arrays static const. 2015-02-14 13:06:28 +00:00
tsutsui
f5a0bb37f1 Make local functions and variables static. 2015-02-14 06:31:31 +00:00
tsutsui
51dae4bfea Don't use cnputc() directly in an application layer. 2015-02-14 06:16:29 +00:00
tsutsui
5b5099022c Misc KNF and cosmetics. 2015-02-14 05:58:02 +00:00
tsutsui
bdeab44e3f Use proper signedness and exact-width interger types. 2015-02-14 05:03:09 +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
49b7958945 need clock_subr.h for bcdtobin() 2014-11-21 01:16:04 +00:00
christos
b59f66e17c use the inline bcdtobin and bintobcd directly instead through a macro. 2014-11-20 16:34:25 +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
tsutsui
30bc235eca Stop building a.out kernels so that mkldscript.sh is no longer necessary.
Tested "build.sh release", and the default ELF GENERIC kernel loaded by
the native bootloader just works on LUNA-II.
2014-11-13 16:18:38 +00:00
uebayasi
4c0e1c7bb3 Missing dependency on ldscript files. 2014-11-13 15:03:06 +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
tsutsui
25a2e495cb Pull LUNA's framebuffer improvements by Kenji Aoyama from OpenBSD/luna88k.
http://marc.info/?l=openbsd-cvs&m=141199909120631&w=2
>> Use raster(logic) operation, or ROP, function on LUNA frame buffer.
>> It makes 4bpp wscons putchar ~20% faster.

This Makes 4bpp wscons putchar ~30% on LUNA-II.

Also use the similar ROP in 1bpp putchar and cursor functions
and the 1bpp putchar is also ~5% faster.
While here, reduce diffs from OpenBSD a bit.

Tested on all 1bpp/4bpp/8bpp framebuffers.
2014-10-04 16:58:17 +00:00
tsutsui
4d52a6286a Fix unintended RCS Id substitution. 2014-10-04 14:42:41 +00:00
tsutsui
7249f0e282 Put dumb optimizations to avoid conditionals in putchar drawing loops.
~10% improvements of time cat results on LUNA-II 8bpp framebuffer.
2014-09-28 05:00:56 +00:00
tsutsui
c3f99db636 Pull readability changes from OpenBSD/luna88k.
- prepare and use unpack_attr() function to get fg and bg from attribute
- use proper variable names to clarify meanings

Tested on LUNA-II with 8bpp framebuffer.
2014-09-28 04:43:01 +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
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
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
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
martin
cf74145148 Adapt to grown ramdisk image size 2014-08-05 15:52:38 +00:00
tsutsui
f616495c51 Sync VM_MAXUSER_ADDRESS and VM_MAX_ADDRESS with other hp300 derived ports.
There is no particular reason to have different values among m68k ports.
Briefly checked on LUNA-II.
2014-07-26 12:48:07 +00:00
tsutsui
126d0c71da Implement WSDISPLAYIO_SMODE ioctl for proper mmap and colormap handling.
- allow mmap framebuffer memories only in WSDISPLAYIO_DUMBFB
- initialize palette for ANSI text colors on back to WSDISPLAYIO_MODE_EMUL

Tested on LUNA with 4bpp framebuffer.
2014-07-25 16:40:12 +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
tsutsui
a24e0636a7 Add consistent prefix to a softc member name. 2014-07-24 14:09:09 +00:00
tsutsui
6dcde59cac Add options WSDISPLAY_COMPAT_RAWKBD for Xorg server. 2014-07-20 11:33:31 +00:00
tsutsui
0bcc9a72e9 Pull LUNA's keyboard driver changes from OpenBSD/luna88k.
- split keyboard mapping definitions to new files, omkbdmap.[ch]
- add WSDISPLAY_COMPAT_RAWKBD support
  (actually the name is wrong; it doesn't emit raw keycode but
   converts MD code into PS/2 one as "raw keycode on x86" for Xorg server)
- allow to enter into ddb by CTRL+ALT(zenmen)+ESC
- remove unnecessary return values

Now LUNA's keyboard works on Xorg server without tweaks by xmodmap(1) etc.
2014-07-20 11:14:56 +00:00
tsutsui
f6ba350205 Use kmem(9) instead of malloc(9). 2014-07-18 18:17:54 +00:00
tsutsui
f3b63fd9e2 Use C99 struct initialization for wsdisplay_accessops. 2014-07-18 18:03:36 +00:00
tsutsui
b454c4acb3 Minor KNF. No binary changes. 2014-07-18 18:02:08 +00:00
tsutsui
1300ef63c3 Enable INET6 (for modern network) and MODULAR, and disable accept filters. 2014-07-18 17:30:52 +00:00
tsutsui
fb7d7d5abf Setup Bt458 color palette to support ANSI color text on 8bpp framebuffer.
Mostly taken from OpenBSD/luna88k.  Also sync some comments.
Tested on LUNA-II, and mlterm-fb with 8bpp wallpaper also works fine.

Thanks to Kenji Aoyama (OpenBSD/luna88k maintainer) for providing
his spare 8bpp board.
2014-07-13 16:00:32 +00:00
tsutsui
27f5dd222d Use COPTS="-O2 -fno-reorder-blocks" as defined in sys.mk for userland.
with "-O2":
   text    data     bss     dec     hex filename
2064824   48784   85920 2199528  218fe8 netbsd

with "-O2 -fno-reorder-blocks":
   text    data     bss     dec     hex filename
1842944   48784   85920 1977648  1e2d30 netbsd
2014-07-05 09:16:45 +00:00
tsutsui
bc4b954757 Fix stupid botches in previous.
Use a proper device unit number if a unit number or non-default device
is specified on the boot command.
2014-04-21 11:06:55 +00:00
tsutsui
7fad7fe91f Use booted device unit if no unit number is specified on boot command.
Bump version to denote a visible change.
2014-04-16 13:43:02 +00:00
tsutsui
d0f9358c7b Check a status code and return proper errno in sdstrategy().
Suggested by gcc 4.8 -Wunused-but-set-variable warning to use the variable.
2014-04-16 12:01:53 +00:00
tsutsui
718c0089c0 Appease gcc 4.8 -Wunused-but-set-variable warnings. 2014-04-16 11:18:00 +00:00
christos
f8a9f61f7b - use cpu_{g,s}etmodel
- fix unused
2014-03-24 19:46:24 +00:00
martin
40cac1aea1 PR port-luna68k/48677: fix some typos.
From shinnashi takeshi.
2014-03-24 10:46:58 +00:00
tsutsui
7f18e221b3 Remove obsolete ssir stuff which was used for pre-5.0 softintr(9). 2014-03-22 16:52:07 +00:00
riastradh
6cb10275d0 Merge riastradh-drm2 to HEAD. 2014-03-18 18:20:35 +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
b2183d3ee1 Add dhcpcd(8) to luna68k sysinst. Also bump ramdisk size. 2014-02-20 14:30:23 +00:00