Commit Graph

1323 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
chs e589250373 increase ramdisk size for gcc48. 2015-01-23 03:40:25 +00:00
christos 57b864bc85 We don't need a special rule now that the file is called .S (having a
just .o rule before broke the MKDEBUG build).
2014-11-21 20:21:08 +00:00
christos 1b89ed2b88 Add libkern for umoddi3 needed for correct leap yar computation in is_leap_year. 2014-11-21 20:13:18 +00:00
christos 437ea53be7 rename to bugstart.S 2014-11-21 20:10:28 +00:00
christos b59f66e17c use the inline bcdtobin and bintobcd directly instead through a macro. 2014-11-20 16:34:25 +00:00
christos 6a69232e8f this needs clock.h 2014-11-20 15:50:25 +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
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
christos 42dd471e9b remove dead code 2014-09-21 16:33:48 +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
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
tsutsui 63fc04e1bf Use COPTS="-O2 -fno-reorder-blocks" as defined in sys.mk for userland.
Compile tests only.
2014-07-05 09:21:14 +00:00
tsutsui 39e983d4e8 Specify both -Wa,-march=68030 and -Wa,-mcpu=68030 in -m68060 case for gcc45.
Now VME177 builds with both gcc45 and gcc48
(though untested on the real machines).

XXX: is it really worth to use -m68060 (instead of -m68020-60)
     for kernel binaries?
2014-04-05 11:07:30 +00:00
tsutsui 124e6bcb96 Fix "Error: unrecognized option -mcpu68030". 2014-03-30 15:54:37 +00:00
christos 8701607453 fixes for gcc-4.8 (John D. Baker) 2014-03-30 15:20:54 +00:00
christos fb105d926e use cpu_{g,s}etmodel
fix unused
2014-03-24 19:52:27 +00:00
tsutsui b836c6ccfa Use common m68k/busaddrerr.s for bus error and address error handlers.
No binary changes on GENERIC.
2014-03-15 12:04:22 +00:00
tsutsui 6835dc41d7 Remove duplicated INTERRUPT_SAVEREG and INTERRUPT_RESTOREREG macro.
They are in <m68k/asm.h> and now using different register format.
2014-03-15 12:02:28 +00:00
tsutsui 9e3919efaa Remove trailing spaces and tabs. 2014-03-09 14:53:52 +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 86b6b2fef2 make cpu_need_resched() macros consistent; __USE flags 2013-10-19 19:20:59 +00:00
tsutsui 3e5c3216dc Make MVMEPROM_ARG2() macro take two args in a single asm statement.
Fixes a problem that a wrong address is passed to the MVMEPROM outstr
function (then caused garbages on screen) after we switched to gcc-4.5.
Reported and confirmed by Andrew Gillham on port-mvme68k@:
http://mail-index.NetBSD.org/port-mvme68k/2013/09/17/msg000084.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/19/msg000085.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000095.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000097.html
No error on "build.sh -m mvme68k build" builds.

Should be pulled up to netbsd-6 branches.
2013-09-23 01:39:27 +00:00
tsutsui 86bc678896 Explicitly link SRT0.o (Standalone RunTime startup code) first.
This is my fault on changes to make mvme68k bootloaders use MI libsa:
http://mail-index.netbsd.org/source-changes/2011/01/02/msg016539.html
MVME PROM requires raw binaries (by objcopy -O binary) so we have to
make sure the entry point is located at the first address of the binaries.

The problem (6.1 netboot fails with an illegal instruction message)
is reported by Andrew Gillham on port-mvme68k@:
http://mail-index.netbsd.org/port-mvme68k/2013/09/17/msg000082.html
Note mvme68k bootloadres in netbsd-6 still have another bug triggered
by gcc-4.5.

Should be pulled up to netbsd-6 branches.
2013-09-21 08:32:39 +00:00
tsutsui 47d496f11b Move physmem calculations before nptpage initialization.
Fixes mvme68k specific part of PR port-m68k/45915
(panic: pmap_enter_ptpage: can't get KPT page).
Reported and confirmed by Andrew Gillham on his MVME177:
http://mail-index.NetBSD.org/port-mvme68k/2013/09/17/msg000082.html

Should be pulled up to all netbsd-6 branches.
2013-09-19 12:04:36 +00:00
matt 30e34946aa Use <bsd.klinks.mk> 2013-08-21 06:58:58 +00:00
joerg c5837ca27d Build boot loaders without unwind tables. 2013-08-12 16:34:05 +00:00
dholland 2737439da3 fsbtodb() -> FFS_FSBTODB(), EXT2_FSBTODB(), or MFS_FSBTODB()
dbtofsb() -> FFS_DBTOFSB() or EXT2_DBTOFSB()

(Christos already did the lfs ones a few days back)
2013-06-23 02:06:04 +00:00
dholland f1333577b5 Rename ambiguous macros:
MAXDIRSIZE -> UFS_MAXDIRSIZE or LFS_MAXDIRSIZE
   NINDIR -> FFS_NINDIR, EXT2_NINDIR, LFS_NINDIR, or MFS_NINDIR
   INOPB -> FFS_INOPB, LFS_INOPB
   INOPF -> FFS_INOPF, LFS_INOPF
   blksize -> ffs_blksize, ext2_blksize, or lfs_blksize
   sblksize -> ffs_blksize

These are not the only ambiguously defined filesystem macros, of
course, there's a pile more. I may not have found all the ambiguous
definitions of blksize(), too, as there are a lot of other things
called 'blksize' in the system.
2013-06-19 17:51:25 +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
dholland dcd34a91c5 Stuff UFS_ in front of a few of ufs's symbols to reduce namespace
pollution. Specifically:
   ROOTINO -> UFS_ROOTINO
   WINO -> UFS_WINO
   NXADDR -> UFS_NXADDR
   NDADDR -> UFS_NDADDR
   NIADDR -> UFS_NIADDR
   MAXSYMLINKLEN -> UFS_MAXSYMLINKLEN
   MAXSYMLINKLEN_UFS[12] -> UFS[12]_MAXSYMLINKLEN (for consistency)

Sort out ext2fs's misuse of NDADDR and NIADDR; fortunately, these have
the same values in ext2fs and ffs.

No functional change intended.
2013-01-22 09:39:11 +00:00
chs b8c34ff8df fix device/softc split errors. 2012-10-29 12:51:38 +00:00
chs cbab9cadce split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
2012-10-27 17:17:22 +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
mlelstv 8ce4433821 Do not call setroot() from MD code and from MI code, which has
unwanted sideeffects in the RB_ASKNAME case. This fixes PR/46732.

No longer wrap MD cpu_rootconf(), as hp300 port stores reboot information
as a side effect. Instead call MI rootconf() from MD code which makes
rootconf() now a wrapper to setroot().

Adjust several MD routines to set the global booted_device,booted_partition
variables instead of passing partial information to setroot().

Make cpu_rootconf(9) describe the calling order.
2012-07-29 18:05:39 +00:00
matt a971ba5943 Remove declartions of physmem 2012-07-28 19:08:22 +00:00
matt f96ef7b3c5 Remove safepri and use IPL_SAFEPRI instead. This may be defined in a MD
header file (if not, a value of 0 is assmued).
2012-07-27 05:36:09 +00:00
christos 7484a2dbbe - Normalize inclusion protection (remove)
- Move CHAR_{MIN,MAX} to a common file.
- Fix broken comments
2012-03-28 17:03:27 +00:00
rmind ad12c77015 Remove COMPAT_SA / KERN_SA. Welcome to 6.99.3!
Approved by core@.
2012-02-19 21:05:51 +00:00
matt 1d7f24ead8 Change old-style function defintions to C89 prototypes.
Approved by releng.
2012-02-12 16:34:06 +00:00
para 4c23b30cff proper sizing of kmem_arena on different ports
PR port-i386/45946: Kernel locks up in VMEM system
2012-02-10 17:35:47 +00:00
mhitch 0ab96436f4 Sigh, it's been too long since I've done some of this. Fix the RELOC(). 2012-02-10 06:28:39 +00:00
mhitch 0fc239ba27 Oops - have to RELOC(physmem) here. 2012-02-10 06:21:15 +00:00