Commit Graph

62710 Commits

Author SHA1 Message Date
christos
ec8d3496ba Elide unused variable warnings (Felix Deichmann) 2016-04-22 18:13:01 +00:00
christos
19537c0f2f Use the right variable (Felix Deichmann) 2016-04-22 18:12:47 +00:00
macallan
b1ae921ac6 cgfourteen needs vcons 2016-04-21 18:27:29 +00:00
macallan
13f197f799 RASTERCONSOLE is no more 2016-04-21 17:59:18 +00:00
kiyohara
6bacadfe0b OVERO's .ub file includes release 2016-04-19 12:02:55 +00:00
palle
5254ca51fa Update sparc64 TODO file: note issue with interrupt handling + issue when booting from iso image 2016-04-17 19:54:32 +00:00
martin
c0a2d7e484 Move the SMP-disabled hack for SUN4V a bit earlier 2016-04-17 14:32:03 +00:00
martin
d6fc88e543 If compiling with SUN4V support, bump MAXCPUS to 256. 2016-04-15 20:29:13 +00:00
macallan
285788209b - purge long obsolete RASTERCONSOLE
- add mgx
2016-04-13 17:32:27 +00:00
riastradh
e0a6926ea4 Enable nouveau by default again in x86 GENERIC. 2016-04-13 15:26:27 +00:00
bouyer
ab971176ac Alternate UART3 pins a PG6-7, not PG8-9 2016-04-12 10:54:29 +00:00
bouyer
2f53f613b4 x86_lfence() calls mcount(), so inline lfence instructions in mcount
helper functions
2016-04-11 14:15:30 +00:00
bouyer
ca03f01a92 __cpu_simple_unlock() is called from _mcount(), so don't call mcount() from
__cpu_simple_unlock().
Kernel profiling should work again
2016-04-11 14:14:27 +00:00
christos
d9da07b963 We don't need TRAP_SIGDEBUG 2016-04-10 15:39:27 +00:00
christos
a9a4b283d5 - Turn on ASLR by default
- Add PAX_MPROTECT_DEBUG flag
2016-04-10 15:28:24 +00:00
palle
d0242aefce Rework locking mechanism introduced in rev. 1.21: use __cpu_simple_lock... instead of mutex_... since this causes issues when LOCKDEBUG is defined 2016-04-07 19:46:39 +00:00
macallan
06576a066a moar registers, less tpyos 2016-04-07 01:00:05 +00:00
mlelstv
234135ea24 Use symbolic constant. No functional change. 2016-04-03 11:04:14 +00:00
mlelstv
7b1a30890f Add more tags understood by the firmware. 2016-04-03 11:02:17 +00:00
mlelstv
d46fae17f1 Only fix up IPMI on ProLiant Microserver when address if set.
Don't assume a specific preconfigured address, just clear the lower bits.
2016-04-03 10:32:00 +00:00
martin
a182d9ea04 Add missing includes 2016-04-03 10:03:34 +00:00
martin
117132e6a6 Adopt to device_t/struct ifnet* changes 2016-04-03 10:03:04 +00:00
martin
9027300348 Use device_t/struct ifnet* for phy callbacks 2016-04-03 10:01:52 +00:00
martin
62078f8320 Fix bpf_mtap argument 2016-04-03 09:58:45 +00:00
martin
044276cb07 Convert # line comments to // line to avoid preprocessor confusion 2016-04-03 09:06:28 +00:00
skrll
b1ee8add7a PR/51017: VEXPRESS_A15 doesn't compile
Don't pretend to be anything other than A15
2016-04-02 08:48:35 +00:00
mlelstv
2232a82848 appease compiler. Fixes options MODULAR build. 2016-04-02 08:16:54 +00:00
palle
0059b91df1 sun4v: Workaround for OpenBoot feature where a 64-bit address is truncated to a 32-bit address. This happends when a write to the console (/virtual-devices@100/console@1) is done. Avoid this by using a static buffer that is mapped below 4GB. Thanks to Tarl Neustaedter for explaining how OpenBoot works. ok martin@ 2016-04-01 20:21:45 +00:00
kiyohara
118e184d7f Ensure enable clocks for omapmputmr. 2016-03-31 14:33:17 +00:00
christos
6952a2b793 PR/51016: David Binderman: comment out pointless code. 2016-03-30 21:16:22 +00:00
christos
40d9145b70 PR/51015: David Binderman: remove useless code 2016-03-30 21:14:54 +00:00
macallan
a3107e02e3 make sure we compile mips_fpu.c and fp.S with -mhard-float 2016-03-29 18:40:32 +00:00
martin
0213dfd655 Add missing include 2016-03-28 10:35:36 +00:00
martin
e002a1e12e Simplify now that we have an internal toolchain 2016-03-28 10:31:45 +00:00
martin
afad7c48d8 Restrict float format hacks to gcc 4.8 2016-03-28 08:10:57 +00:00
mrg
0fd71d0df7 add a normal kernel that builds with PAE enabled. this is not yet
hooked into the normal build, but this is a working configuration
and on my 16GB test system, works fine.
2016-03-27 05:14:14 +00:00
martin
0b2c20760e Do not touch FP register on softfloat kernels. 2016-03-26 17:40:02 +00:00
martin
0eb7da4d7a David Binderman in PR port-newsmips/51014:
Move initialization of remain_cnt up to the declaration.
XXX the #ifdef here does not make much sense to me, but I know nothing
about the hardware. I'd guess it could be removed or inverted and #error'd
instead.
2016-03-26 17:14:38 +00:00
martin
07a988af43 David Binderman in port-arm/51013: masking of rxbdtlen happened before
the value was read - move it down a few lines.
2016-03-26 17:04:03 +00:00
martin
c22389e399 Fix comment 2016-03-26 11:49:10 +00:00
skrll
dc4391d06a Restore HOST1X and AHB_A2 to pmap_devmap to give pmap less work to do 2016-03-26 09:07:31 +00:00
skrll
3e98a566a4 G/C old structs 2016-03-26 08:42:07 +00:00
nakayama
01ff6a8d1b Fix probably a typo. 2016-03-25 14:58:53 +00:00
shm
606dc45ebf Add support for clac and stac instructions. 2016-03-25 10:14:43 +00:00
mrg
4773cc203b avoid a GCC warning with this:
+#if defined(__GNUC__) && (__GNUC__ >= 5) && defined(__OPTIMIZE__)
+       x.fp_sign = 0;
+#endif

(ridiculous, but seems better than disabling the warning entirely.)
2016-03-23 05:25:51 +00:00
mrg
65f5251eae remove a bunch of "@echo done" from the tail of rules. these messages
were vaguely useful back when we didn't run make -j, but now you end
up with a single line "done" every so often, with no idea what it is
for.  very few other targets claim they're done so just remove these.
2016-03-22 08:25:22 +00:00
mrg
3495e41469 revert part of rev 1.66 that converted a tri-state variable into
a bool while leaving a comparision against "< 3".
2016-03-22 04:48:25 +00:00
gdt
af798e7b27 Disable uscanner in all kernel configs
As discussed on current-users@, SANE uses ugen via libusb and not
uscanner, so users are not well served by having uscanner.  Consensus
is that addressing how to adjust permissions for scanners should not
block restoring basic functionionality.

(Compile-tested only, but there are multiple reports of this being the
right approach.)
2016-03-19 23:21:02 +00:00
mrg
3ae3bff701 remove some dead code. 2016-03-19 20:57:48 +00:00
martin
a706a41168 Default kernel builds to USE_SSP=yes. 2016-03-19 18:50:25 +00:00
christos
a75799a386 Add PAX_SEGVGUARD disabled. 2016-03-16 16:13:16 +00:00
skrll
b4740b2a71 Update vcprop_tag_clockrate structure 2016-03-14 07:43:00 +00:00
christos
32829346f4 PR/50964: David Binderman: Avoid signed overflow warning 2016-03-13 17:59:20 +00:00
christos
72fae1ce63 Add NO variables for the things that boot block does not support
(SSP/PIE/DEBUG/FORTIFY)
2016-03-13 17:48:53 +00:00
christos
f415d76a88 PR/50963: David Binderman: Use kmem_zalloc() so all members are initialized. 2016-03-13 17:38:44 +00:00
tsutsui
af8b911cf4 TAB/space cleanup. 2016-03-13 08:57:10 +00:00
tsutsui
741896a7e0 Misc KNF and ANSIfy. 2016-03-13 08:54:45 +00:00
mrg
8872ffd0f4 remove some more GCC 4.5 code. make GCC 5.3 be HAVE_GCC=53, so that,
for example, HAVE_GCC >= 48 works properly.
2016-03-13 01:06:51 +00:00
dholland
32cef18b87 Remove unused variable, found by gcc. 2016-03-12 02:17:05 +00:00
dholland
a9e4e98629 Fix syntax error in previous. Hi christos :-)
(PR 50944)
2016-03-12 02:15:50 +00:00
dholland
88c859a1fb Refine previous so the output is all hex again. followup to PR 50942 2016-03-12 02:13:35 +00:00
jklos
7f15b0acd9 Add kernel configuration file for PogoPlug Pink, PogoPlug Mobile and
PogoPlug v4. Add conditional because PogoPlug v4 can't run SD interface at
50 MHz.
2016-03-12 00:41:30 +00:00
christos
c01666f5da PR/50945: David Binderman: sprinkle parens 2016-03-11 18:31:03 +00:00
christos
c5bd235187 PR/50944: David Binderman: sprinkle parens 2016-03-11 18:29:48 +00:00
christos
a1148110d4 PR/50942: David Binderman: fix printf format 2016-03-11 18:27:37 +00:00
tsutsui
56c764b63d Properly zero out struct fb_devconfig, including rasops_info.
Fix panic after wsconscfg(8) from serial console, caused by
a junk function pointer.
2016-03-11 13:16:55 +00:00
martin
b7bf6f19af Strip debug symbols from boot code 2016-03-10 20:23:35 +00:00
martin
8d92fc86f0 Deal with _edata not being 4-byte aligned 2016-03-10 20:22:52 +00:00
martin
032d514f64 Add a few includes of bsd.own.mk to avoid broken test conditions
on ACTIVE_CC - this might not be the correct fix for PR 50930,
but it avoids the issue.
2016-03-10 09:00:24 +00:00
christos
0a584b1b23 PR/50928: David Binderman: Clarify precedence with parentheses. 2016-03-09 20:11:41 +00:00
nakayama
7cee3f133b 32-bit kernels use 32-bit stack. 2016-03-09 12:20:20 +00:00
skrll
16de05a45e #if 0 a KASSERT for now as it doesn't apply to Raspberry Pi 3 2016-03-08 08:01:23 +00:00
skrll
2a81ae4e13 Use the nvidia,has-utmi-pad-registers property.
From Jared.
2016-03-08 07:49:20 +00:00
christos
8dcf2fd159 Better to panic! Otherwise we end in an endless loop. 2016-03-07 00:28:36 +00:00
christos
d2b754e0c5 Return instead of crashing. This is wrong, and should be fixed properly. 2016-03-07 00:16:48 +00:00
christos
bd45646f1b Don't throw us in the debugger! 2016-03-07 00:11:33 +00:00
tnn
6815b834d0 Don't try to interpret MIPS3-specific status register bit on MIPS1.
Fixes boot of NetBSD/pmax in gxemul 3max emulation mode.
2016-03-06 21:03:01 +00:00
riastradh
566ef8a23e Revert to disabling nouveau by default in x86 GENERIC.
Haven't had time to debug the issues that seem to affect pretty much
everyone.  Maybe soon!
2016-03-05 17:08:48 +00:00
mlelstv
2d6e668d26 Don't modify command line buffer but create a copy of the root argument. 2016-03-05 07:33:58 +00:00
palle
80fa20e7c1 sun4v: rft_kernel should pay attention to the number of register windows that can be restored. We cannot rely on fill traps to occur, since sun4v only has two trap levels available in privileged mode. Based on code from OpenBSD. ok martin@ 2016-03-03 20:45:45 +00:00
skrll
8142c3d9b6 Get the RPI3 working (in aarch32 mode) by recognising Cortex A53 CPUs.
While I'm here add some A57/A72 info as well.

My RPI3 works with FB console - the uart needs some help with its clocks.
2016-03-03 17:01:31 +00:00
christos
179eb6b78f PR/50881: David Binderman: Remove redundant code. 2016-03-02 19:25:32 +00:00
joerg
a542f58193 Don't reuse LDFLAGS for arguments passed directly to ${LD}, share/mk
expects it to be passed to ${CC} or ${CXX}, so they will generally
prefix flags with -Wl.
2016-03-01 16:08:22 +00:00
christos
b2e81b86bb PR/50868: David Binderman: Fix operator precedence. 2016-02-29 18:25:29 +00:00
christos
3aca3860f9 PR/50869: David Binderman: Use logical and instead of arithmetic 2016-02-29 18:24:31 +00:00
christos
13e9c85cdc PR/50870: David Binderman: Use logical and instead of arithmetic 2016-02-29 18:22:06 +00:00
christos
4a89ac6a7b PR/50871: David Binderman: use logical and instead of arithmetic 2016-02-29 18:20:31 +00:00
christos
65cf609744 PR/50854: David Binderman: Remove redundant code. 2016-02-29 15:28:35 +00:00
riastradh
b7a17ef485 Let the compiler decide whether to inline.
Works around ICE in PCC for now:

/home/riastradh/netbsd/current/src/sys/arch/x86/x86/cpu_rng.c, line 195: bad xasm node type 23
/home/riastradh/netbsd/current/src/sys/arch/x86/x86/cpu_rng.c, line 195: bad xasm node type 23
internal compiler error: /home/riastradh/netbsd/current/src/sys/arch/x86/x86/cpu_rng.c, line 195

This code is not performance-critical.
2016-02-29 00:17:54 +00:00
joerg
2f6c48363c Reorder using register_t to the point where it is defined. 2016-02-28 22:19:01 +00:00
riastradh
def0440dfd KNF. No functional change. 2016-02-28 20:51:03 +00:00
rjs
925bb52c9a Set sc_dev field of softc.
Should pullup to 7.
2016-02-28 19:39:27 +00:00
joerg
daac313960 clang now supports normal soft float. 2016-02-27 21:48:34 +00:00
joerg
a8ff50921f Ignore unused arguments for clang as we pass assembler flags and the
like to the preprocessor-only mode. Conditionalize GCC flags that are
not known to clang accordingly.
2016-02-27 19:26:13 +00:00
joerg
e5174fc3b5 When building with clang, optimise for minimal size and skip frame
pointers when possible.
2016-02-27 19:25:08 +00:00
mlelstv
6846a009d9 no condition for cpu_rng here 2016-02-27 15:42:20 +00:00
mlelstv
850f8baca4 add missing cpu_rng.c to kernel 2016-02-27 14:28:50 +00:00
tls
4257ba9cf7 Remove callout-based RNG support in VIA crypto driver; add VIA RNG backend for cpu_rng. 2016-02-27 00:54:59 +00:00
tls
da86e96bef Add RDSEED and RDRAND backends for cpu_rng on amd64 and i386. 2016-02-27 00:43:55 +00:00
tls
1b1730d0f9 Add cpu_rng, a framework for simple on-CPU random number generators. 2016-02-27 00:09:44 +00:00
christos
2a023ae6f4 PR/50859: David Binderman: Remove redundant code. 2016-02-26 18:19:16 +00:00
christos
256dd10e5c PR/50858: David Binderman: Remove redundant code. 2016-02-26 18:17:39 +00:00
christos
1f499e21c3 PR/50857: David Binderman: Remove redundant code. 2016-02-26 18:16:51 +00:00
christos
ffddf40726 PR/50856: David Binderman: Remove redundant code. 2016-02-26 18:15:59 +00:00
christos
9aaf0da75d PR/50855: David Binderman: Remove redundant code. 2016-02-26 18:14:38 +00:00
christos
ebbcb8c3e7 PR/50852: David Binderman: make code more readable (although it was correct
anyway)
2016-02-26 18:11:11 +00:00
ryo
cee558c2f4 fix always false comparison.
pointed out by joerg@
2016-02-25 13:27:33 +00:00
joerg
73916f4bad Garbage collect unused variables comcnaddr, comcnspeed and comcnmode. 2016-02-25 12:22:30 +00:00
christos
be0b117468 move the NODEBUG to the boot blocks only. 2016-02-21 14:50:05 +00:00
christos
47160181d3 No debug, pic, or ctf for standalone code.
- debug makes things not fit
- ctf is useless
- pic does not work with the function call convention standalone uses
2016-02-21 03:33:18 +00:00
christos
0dcb945157 bump size. 2016-02-21 01:33:56 +00:00
macallan
e2007d759e gcc does not pass floating point options to the assembler
by default, because it is afraid that the stricter tests
will break userland code. The new binutils is pickier about
this. Gcc 5.x fixes the issue so for now, set explicitly
the assembler soft-float flags when we build the kernel.
see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64569
2016-02-18 20:50:44 +00:00
macallan
677061ce2a Adapt CI20 HWRNG to synchronous on-demand callback.
Omit needless softint/locking dance.
from riastradh@
2016-02-17 20:12:42 +00:00
bouyer
f35e6799e0 In xennet_xenbus_detach(), remove the event handler early (just after
xennet_stop()) so that we don't get events while slepping (e.g.
in softint_disestablish()) when some structures have already been
freed.
Problem reported and patch tested by Rohan Desai.
2016-02-16 08:41:32 +00:00
nonaka
732816bd3f Reduced INSTALL kernel size. 2016-02-16 05:14:31 +00:00
riastradh
0c08237178 Use KASSERTs supported by CTASSERTs, not __builtin_unreachable.
pcc has no __builtin_unreachable, and this is clearer anyway.
2016-02-15 20:35:59 +00:00
palle
d66d7c235b sun4v: add breakpoint trap entry to the sun4v trap table 2016-02-14 21:13:33 +00:00
chs
2f02870f3b zero the i2c_attach_args structure before filling it in.
fixes occasional crashes in iic_attach().
2016-02-14 19:54:19 +00:00
dholland
cb63f3a3bd Remove extra stray break missed by Christos when committing PR 50783. 2016-02-14 19:11:19 +00:00
dholland
a33f4fbcc2 Add missing va_end, from David Binderman in PR 50798. 2016-02-14 18:12:30 +00:00
dholland
4fbed23287 Add missing va_list, from David Binderman in PR 50796.
XXX: this file and arch/arc/stand/boot/disk.c are cutpaste clones.
2016-02-14 18:09:51 +00:00
dholland
e9150352cd Add missing va_end; PR 50795 from David Binderman. 2016-02-14 18:07:49 +00:00
dholland
28adc7db17 Fix wrong indent. 2016-02-14 18:05:31 +00:00
dholland
48ddc7de4d Add missing va_end(). PR 50794 from David Binderman. 2016-02-14 18:04:47 +00:00
dholland
e19dc66768 Add missing va_end. PR 50793 from David Binderman. 2016-02-14 18:01:45 +00:00
riastradh
091e6ea2fb Add nouveau to x86 GENERIC kernels. 2016-02-13 19:53:23 +00:00
msaitoh
04c8069c04 Fix typo in comment. 2016-02-12 05:32:47 +00:00
kiyohara
99a1b69833 Clear ATAC_CAP_DATA32, if dev is atabus@wdc@pcmcia@aupcmcia. It is 32-bit transfers are not supported. 2016-02-09 12:48:06 +00:00
ozaki-r
9c4cd06355 Introduce softint-based if_input
This change intends to run the whole network stack in softint context
(or normal LWP), not hardware interrupt context. Note that the work is
still incomplete by this change; to that end, we also have to softint-ify
if_link_state_change (and bpf) which can still run in hardware interrupt.

This change softint-ifies at ifp->if_input that is called from
each device driver (and ieee80211_input) to ensure Layer 2 runs
in softint (e.g., ether_input and bridge_input). To this end,
we provide a framework (called percpuq) that utlizes softint(9)
and percpu ifqueues. With this patch, rxintr of most drivers just
queues received packets and schedules a softint, and the softint
dequeues packets and does rest packet processing.

To minimize changes to each driver, percpuq is allocated in struct
ifnet for now and that is initialized by default (in if_attach).
We probably have to move percpuq to softc of each driver, but it's
future work. At this point, only wm(4) has percpuq in its softc
as a reference implementation.

Additional information including performance numbers can be found
in the thread at tech-kern@ and tech-net@:
http://mail-index.netbsd.org/tech-kern/2016/01/14/msg019997.html

Acknowledgment: riastradh@ greatly helped this work.
Thank you very much!
2016-02-09 08:32:07 +00:00
skrll
b0bef51c1f Preserve the .text section alignment 2016-02-08 21:08:03 +00:00
christos
451f7eb546 PR/50783: David Binderman: Indent switch properly, add missing break. 2016-02-08 16:44:45 +00:00
jandberg
e09dd753e1 Fix some awkward language in manpage and code comments. 2016-02-06 20:20:18 +00:00
palle
cd467f86fe sun4v: extend dmmu_set_secondary_context() to handle both sun4u and sun4v. ok martin@ 2016-02-03 20:33:52 +00:00
martin
be2b75ed4e New rawrite32 version out (small bugfixes) 2016-02-03 15:06:25 +00:00
christos
ba3275f8a0 PR/50748: David Binderman: check bounds before dereference 2016-02-03 05:27:53 +00:00
christos
386b5e25f6 one more. 2016-02-02 20:16:59 +00:00
christos
f09f85eee3 more relocations. 2016-02-02 20:16:08 +00:00
christos
a0e0372037 Add more relocation constants 2016-02-02 20:13:59 +00:00
skrll
fc42e17ef4 Fix up bcm283[56] bus_space(4) to really use bus addresses for
peripherals, etc

Simplifies the code in various places and uses the abstraction in
more places. (bcm2835_gpio_subr.c still doesn't)
2016-02-02 13:55:50 +00:00
christos
d3f9dfe250 PR/50740: David Binderman: Provide a copy constructor. 2016-02-01 17:44:19 +00:00
christos
0b5365f66d PR/50737: David Binderman: Check bounds before dereferencing. 2016-02-01 17:39:41 +00:00
christos
ff4ea0ba8c PR/50736: David Binderman: Check bounds before dereferencing. 2016-02-01 17:38:31 +00:00
christos
0a67dc8231 PR/50735: David Binderman: Check bounds before dereferencing. 2016-02-01 17:37:39 +00:00
christos
fa11e0c528 include bsd.init.mk to get Makefile.inc 2016-01-31 15:32:12 +00:00
christos
f56c05e9f6 remove the MKPIE and MKCTF no hack, and move it to the .mk files 2016-01-31 15:29:04 +00:00
christos
cb09bfac79 Disable PIE and CTF for standalone code
XXX: Must be done centrally, and there must be a better way.
2016-01-31 02:16:28 +00:00
palle
46d16bc240 Fixed typo in sparc64_send_ipi_sun4u(): sun4v -> sun4u 2016-01-30 22:47:06 +00:00
christos
736ee7ee51 compile full symbol table for CTF so FBT can get function arguments. 2016-01-30 04:12:38 +00:00
riastradh
461b4ecf4d Always initialize error.
Found by joerg.
2016-01-30 00:00:56 +00:00
christos
83d04d3aa0 use __register. 2016-01-29 21:45:00 +00:00